UNPKG

@nicodoggie/node-kiwi-tcms-api

Version:

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

99 lines (98 loc) 3.07 kB
import { KiwiClient } from './client'; import { KiwiConfig } from './types'; import { AuthAPI } from './modules/auth'; import { TestCaseAPI } from './modules/testcase'; import { TestPlanAPI } from './modules/testplan'; import { TestRunAPI } from './modules/testrun'; import { TestExecutionAPI } from './modules/testexecution'; import { ProductAPI, BuildAPI, ComponentAPI, ClassificationAPI, CategoryAPI, VersionAPI, PlanTypeAPI, PriorityAPI, TestCaseStatusAPI, TestExecutionStatusAPI, EnvironmentAPI, TagAPI, UserAPI, BugAPI } from './modules/management'; import { AttachmentAPI, MarkdownAPI, KiwiUtilsAPI, UrlAPI } from './modules/utilities'; /** * Main Kiwi TCMS API client * * This is the primary interface for interacting with Kiwi TCMS. * It provides access to all API modules through a single client instance. * * @example * ```typescript * import { KiwiTCMS } from 'node-kiwi-tcms'; * * const kiwi = new KiwiTCMS({ * baseUrl: 'https://your-kiwi-instance.com', * username: 'your-username', * password: 'your-password' * }); * * // Get all test cases * const testCases = await kiwi.testCase.filter(); * * // Create a new test plan * const testPlan = await kiwi.testPlan.create({ * name: 'My Test Plan', * product_version_id: 1, * author_id: 1, * type_id: 1 * }); * ``` */ export declare class KiwiTCMS { private client; readonly auth: AuthAPI; readonly testCase: TestCaseAPI; readonly testPlan: TestPlanAPI; readonly testRun: TestRunAPI; readonly testExecution: TestExecutionAPI; readonly product: ProductAPI; readonly build: BuildAPI; readonly component: ComponentAPI; readonly classification: ClassificationAPI; readonly category: CategoryAPI; readonly version: VersionAPI; readonly planType: PlanTypeAPI; readonly priority: PriorityAPI; readonly testCaseStatus: TestCaseStatusAPI; readonly testExecutionStatus: TestExecutionStatusAPI; readonly environment: EnvironmentAPI; readonly tag: TagAPI; readonly user: UserAPI; readonly bug: BugAPI; readonly attachment: AttachmentAPI; readonly markdown: MarkdownAPI; readonly utils: KiwiUtilsAPI; readonly url: UrlAPI; constructor(config: KiwiConfig); /** * Authenticate with the Kiwi TCMS server * * @returns Session ID */ login(): Promise<string>; /** * Logout from the Kiwi TCMS server */ logout(): Promise<void>; /** * Check if client is authenticated */ isAuthenticated(): boolean; /** * Get current session ID */ getSessionId(): string | undefined; /** * Set session ID manually (useful for token-based authentication) */ setSessionId(sessionId: string): void; /** * Get Kiwi TCMS server version */ getVersion(): Promise<string>; /** * List available XML-RPC methods (useful for debugging) */ listMethods(): Promise<string[]>; /** * Get the underlying XML-RPC client for advanced usage */ getClient(): KiwiClient; }