UNPKG

@nicodoggie/node-kiwi-tcms-api

Version:

Vibe-coded Node.js wrapper for Kiwi TCMS XML-RPC API. Use at your own risk.

71 lines (70 loc) 2.18 kB
import { KiwiClient } from '../client'; import { TestCase, TestCaseFilter, TestCaseWithPermalinks, FilterOutputOptions, Comment, Attachment, Tag, Component } from '../types'; /** * Test Case API module */ export declare class TestCaseAPI { private client; constructor(client: KiwiClient); /** * Create a new test case */ create(testCaseData: Partial<TestCase>): Promise<TestCase>; /** * Filter test cases */ filter(query?: TestCaseFilter): Promise<TestCase[]>; /** * Filter test cases with output options */ filter(query: TestCaseFilter | undefined, options: FilterOutputOptions): Promise<TestCase[] | TestCaseWithPermalinks[]>; /** * Get the URL API instance for permalink injection * @private */ private getUrlApi; /** * Update a test case */ update(testCaseId: number, updateData: Partial<TestCase>): Promise<TestCase>; /** * Remove/delete a test case */ remove(testCaseId: number): Promise<void>; /** * Add a comment to test case */ addComment(testCaseId: number, comment: string): Promise<Comment>; /** * Remove a comment from test case */ removeComment(testCaseId: number, commentId: number): Promise<void>; /** * Add a tag to test case */ addTag(testCaseId: number, tag: string): Promise<Tag>; /** * Remove a tag from test case */ removeTag(testCaseId: number, tag: string): Promise<void>; /** * Add a component to test case */ addComponent(testCaseId: number, componentId: number): Promise<Component>; /** * Remove a component from test case */ removeComponent(testCaseId: number, componentId: number): Promise<void>; /** * Add an attachment to test case */ addAttachment(testCaseId: number, filename: string, b64content: string): Promise<Attachment>; /** * List attachments for test case */ listAttachments(testCaseId: number): Promise<Attachment[]>; /** * Get attachments for test case (alias for listAttachments method) */ getAttachments(testCaseId: number): Promise<Attachment[]>; }