@dichovsky/testrail-api-client 1.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -0
- package/dist/cli/auth.d.ts +21 -0
- package/dist/cli/auth.js +16 -0
- package/dist/cli/body.d.ts +42 -0
- package/dist/cli/body.js +89 -0
- package/dist/cli/dispatch.d.ts +16 -0
- package/dist/cli/dispatch.js +87 -0
- package/dist/cli/handler-context.d.ts +43 -0
- package/dist/cli/handler-context.js +2 -0
- package/dist/cli/handlers/case-write.d.ts +4 -0
- package/dist/cli/handlers/case-write.js +26 -0
- package/dist/cli/handlers/case.d.ts +4 -0
- package/dist/cli/handlers/case.js +11 -0
- package/dist/cli/handlers/milestone.d.ts +4 -0
- package/dist/cli/handlers/milestone.js +15 -0
- package/dist/cli/handlers/project.d.ts +4 -0
- package/dist/cli/handlers/project.js +11 -0
- package/dist/cli/handlers/result-write.d.ts +4 -0
- package/dist/cli/handlers/result-write.js +40 -0
- package/dist/cli/handlers/result.d.ts +3 -0
- package/dist/cli/handlers/result.js +11 -0
- package/dist/cli/handlers/run-write.d.ts +10 -0
- package/dist/cli/handlers/run-write.js +29 -0
- package/dist/cli/handlers/run.d.ts +4 -0
- package/dist/cli/handlers/run.js +15 -0
- package/dist/cli/handlers/suite.d.ts +4 -0
- package/dist/cli/handlers/suite.js +10 -0
- package/dist/cli/handlers/user.d.ts +4 -0
- package/dist/cli/handlers/user.js +11 -0
- package/dist/cli/ids.d.ts +6 -0
- package/dist/cli/ids.js +20 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.js +198 -0
- package/dist/cli/install-skill.d.ts +35 -0
- package/dist/cli/install-skill.js +71 -0
- package/dist/cli/metadata.d.ts +37 -0
- package/dist/cli/metadata.js +151 -0
- package/dist/cli/output.d.ts +28 -0
- package/dist/cli/output.js +84 -0
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +1 -266
- package/dist/client-core.d.ts +16 -7
- package/dist/client-core.js +153 -27
- package/dist/client.d.ts +274 -118
- package/dist/client.js +404 -463
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +1 -0
- package/dist/errors.d.ts +11 -9
- package/dist/errors.js +12 -8
- package/dist/index.d.ts +4 -2
- package/dist/index.js +2 -1
- package/dist/modules/attachments.d.ts +19 -0
- package/dist/modules/attachments.js +64 -0
- package/dist/modules/cases.d.ts +13 -0
- package/dist/modules/cases.js +58 -0
- package/dist/modules/configurations.d.ts +14 -0
- package/dist/modules/configurations.js +37 -0
- package/dist/modules/datasets.d.ts +12 -0
- package/dist/modules/datasets.js +28 -0
- package/dist/modules/metadata.d.ts +14 -0
- package/dist/modules/metadata.js +31 -0
- package/dist/modules/milestones.d.ts +12 -0
- package/dist/modules/milestones.js +36 -0
- package/dist/modules/plans.d.ts +16 -0
- package/dist/modules/plans.js +59 -0
- package/dist/modules/projects.d.ts +36 -0
- package/dist/modules/projects.js +55 -0
- package/dist/modules/reports.d.ts +9 -0
- package/dist/modules/reports.js +16 -0
- package/dist/modules/results.d.ts +14 -0
- package/dist/modules/results.js +69 -0
- package/dist/modules/runs.d.ts +14 -0
- package/dist/modules/runs.js +57 -0
- package/dist/modules/sections.d.ts +16 -0
- package/dist/modules/sections.js +37 -0
- package/dist/modules/sharedSteps.d.ts +12 -0
- package/dist/modules/sharedSteps.js +28 -0
- package/dist/modules/suites.d.ts +37 -0
- package/dist/modules/suites.js +54 -0
- package/dist/modules/tests.d.ts +9 -0
- package/dist/modules/tests.js +25 -0
- package/dist/modules/users.d.ts +18 -0
- package/dist/modules/users.js +62 -0
- package/dist/modules/variables.d.ts +11 -0
- package/dist/modules/variables.js +24 -0
- package/dist/schemas.d.ts +544 -0
- package/dist/schemas.js +419 -0
- package/dist/types.d.ts +1 -55
- package/dist/utils.d.ts +2 -0
- package/dist/utils.js +4 -0
- package/package.json +23 -15
- package/skill/SKILL.md +395 -0
- package/src/cli/auth.ts +37 -0
- package/src/cli/body.ts +100 -0
- package/src/cli/dispatch.ts +91 -0
- package/src/cli/handler-context.ts +46 -0
- package/src/cli/handlers/case-write.ts +26 -0
- package/src/cli/handlers/case.ts +13 -0
- package/src/cli/handlers/milestone.ts +19 -0
- package/src/cli/handlers/project.ts +13 -0
- package/src/cli/handlers/result-write.ts +40 -0
- package/src/cli/handlers/result.ts +14 -0
- package/src/cli/handlers/run-write.ts +30 -0
- package/src/cli/handlers/run.ts +19 -0
- package/src/cli/handlers/suite.ts +12 -0
- package/src/cli/handlers/user.ts +13 -0
- package/src/cli/ids.ts +20 -0
- package/src/cli/index.ts +224 -0
- package/src/cli/install-skill.ts +89 -0
- package/src/cli/metadata.ts +194 -0
- package/src/cli/output.ts +96 -0
- package/src/cli.ts +1 -286
- package/src/client-core.ts +183 -67
- package/src/client.ts +414 -483
- package/src/constants.ts +1 -0
- package/src/errors.ts +18 -11
- package/src/index.ts +50 -8
- package/src/modules/attachments.ts +125 -0
- package/src/modules/cases.ts +78 -0
- package/src/modules/configurations.ts +68 -0
- package/src/modules/datasets.ts +44 -0
- package/src/modules/metadata.ts +63 -0
- package/src/modules/milestones.ts +54 -0
- package/src/modules/plans.ts +89 -0
- package/src/modules/projects.ts +67 -0
- package/src/modules/reports.ts +23 -0
- package/src/modules/results.ts +90 -0
- package/src/modules/runs.ts +70 -0
- package/src/modules/sections.ts +55 -0
- package/src/modules/sharedSteps.ts +44 -0
- package/src/modules/suites.ts +67 -0
- package/src/modules/tests.ts +28 -0
- package/src/modules/users.ts +87 -0
- package/src/modules/variables.ts +36 -0
- package/src/schemas.ts +551 -0
- package/src/types.ts +11 -60
- package/src/utils.ts +5 -0
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
|
-
import type { Case, Suite, Section, Project, Plan, Run, Test, Result, Milestone, User, Status, Priority,
|
|
1
|
+
import type { Case, Suite, Section, Project, Plan, Run, Test, Result, Milestone, User, Status, Priority, AddSuitePayload, UpdateSuitePayload, AddPlanPayload, UpdatePlanPayload, AddPlanEntryPayload, UpdatePlanEntryPayload, PlanEntry, AddSectionPayload, UpdateSectionPayload, AddMilestonePayload, UpdateMilestonePayload, AddProjectPayload, UpdateProjectPayload, GetPlansOptions, GetTestsOptions, GetResultsOptions, GetMilestonesOptions, GetRunsOptions, GetCasesOptions, ResultField, CaseField, CaseType, Template, ConfigurationGroup, Configuration, AddConfigurationGroupPayload, UpdateConfigurationGroupPayload, AddConfigurationPayload, UpdateConfigurationPayload, AddUserPayload, UpdateUserPayload, Role, Group, AddGroupPayload, UpdateGroupPayload, Attachment, SharedStep, AddSharedStepPayload, UpdateSharedStepPayload, Variable, AddVariablePayload, UpdateVariablePayload, Dataset, AddDatasetPayload, UpdateDatasetPayload, Report, ReportResult } from './types.js';
|
|
2
|
+
import type { AddCasePayload, UpdateCasePayload, AddRunPayload, UpdateRunPayload, AddResultPayload, AddResultsForCasesPayload } from './schemas.js';
|
|
2
3
|
import { TestRailClientCore } from './client-core.js';
|
|
4
|
+
import { ProjectModule } from './modules/projects.js';
|
|
5
|
+
import { SuiteModule } from './modules/suites.js';
|
|
6
|
+
import { SectionModule } from './modules/sections.js';
|
|
7
|
+
import { CaseModule } from './modules/cases.js';
|
|
8
|
+
import { PlanModule } from './modules/plans.js';
|
|
9
|
+
import { RunModule } from './modules/runs.js';
|
|
10
|
+
import { TestModule } from './modules/tests.js';
|
|
11
|
+
import { ResultModule } from './modules/results.js';
|
|
12
|
+
import { MilestoneModule } from './modules/milestones.js';
|
|
13
|
+
import { UsersModule } from './modules/users.js';
|
|
14
|
+
import { MetadataModule } from './modules/metadata.js';
|
|
15
|
+
import { ConfigurationModule } from './modules/configurations.js';
|
|
16
|
+
import { AttachmentModule } from './modules/attachments.js';
|
|
17
|
+
import { SharedStepModule } from './modules/sharedSteps.js';
|
|
18
|
+
import { VariableModule } from './modules/variables.js';
|
|
19
|
+
import { DatasetModule } from './modules/datasets.js';
|
|
20
|
+
import { ReportModule } from './modules/reports.js';
|
|
3
21
|
export { TestRailApiError, TestRailValidationError } from './errors.js';
|
|
4
22
|
/**
|
|
5
23
|
* TestRail API Client
|
|
@@ -9,6 +27,24 @@ export { TestRailApiError, TestRailValidationError } from './errors.js';
|
|
|
9
27
|
* Extends {@link TestRailClientCore} for HTTP pipeline, caching, rate limiting, and retry.
|
|
10
28
|
*/
|
|
11
29
|
export declare class TestRailClient extends TestRailClientCore {
|
|
30
|
+
readonly projects: ProjectModule;
|
|
31
|
+
readonly suites: SuiteModule;
|
|
32
|
+
readonly sections: SectionModule;
|
|
33
|
+
readonly cases: CaseModule;
|
|
34
|
+
readonly plans: PlanModule;
|
|
35
|
+
readonly runs: RunModule;
|
|
36
|
+
readonly tests: TestModule;
|
|
37
|
+
readonly results: ResultModule;
|
|
38
|
+
readonly milestones: MilestoneModule;
|
|
39
|
+
readonly users: UsersModule;
|
|
40
|
+
readonly metadata: MetadataModule;
|
|
41
|
+
readonly configurations: ConfigurationModule;
|
|
42
|
+
readonly attachments: AttachmentModule;
|
|
43
|
+
readonly sharedSteps: SharedStepModule;
|
|
44
|
+
readonly variables: VariableModule;
|
|
45
|
+
readonly datasets: DatasetModule;
|
|
46
|
+
readonly reports: ReportModule;
|
|
47
|
+
constructor(...args: ConstructorParameters<typeof TestRailClientCore>);
|
|
12
48
|
/**
|
|
13
49
|
* Get a project by ID.
|
|
14
50
|
* @throws {TestRailValidationError} When projectId is invalid
|
|
@@ -310,49 +346,63 @@ export declare class TestRailClient extends TestRailClientCore {
|
|
|
310
346
|
*/
|
|
311
347
|
getMilestone(milestoneId: number): Promise<Milestone>;
|
|
312
348
|
/**
|
|
313
|
-
* Get
|
|
314
|
-
*
|
|
315
|
-
* @param
|
|
316
|
-
* @
|
|
349
|
+
* Get milestones.
|
|
350
|
+
*
|
|
351
|
+
* @param projectId - Project identifier.
|
|
352
|
+
* @param options - Optional filters and pagination settings.
|
|
353
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
317
354
|
* @throws {TestRailApiError} When the API request fails
|
|
318
355
|
*/
|
|
319
356
|
getMilestones(projectId: number, options?: GetMilestonesOptions): Promise<Milestone[]>;
|
|
320
357
|
/**
|
|
321
|
-
* Add
|
|
322
|
-
*
|
|
358
|
+
* Add milestone.
|
|
359
|
+
*
|
|
360
|
+
* @param projectId - Project identifier.
|
|
361
|
+
* @param payload - Request payload for this operation.
|
|
362
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
323
363
|
* @throws {TestRailApiError} When the API request fails
|
|
324
364
|
*/
|
|
325
365
|
addMilestone(projectId: number, payload: AddMilestonePayload): Promise<Milestone>;
|
|
326
366
|
/**
|
|
327
|
-
* Update
|
|
328
|
-
*
|
|
367
|
+
* Update milestone.
|
|
368
|
+
*
|
|
369
|
+
* @param milestoneId - Milestone identifier.
|
|
370
|
+
* @param payload - Request payload for this operation.
|
|
371
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
329
372
|
* @throws {TestRailApiError} When the API request fails
|
|
330
373
|
*/
|
|
331
374
|
updateMilestone(milestoneId: number, payload: UpdateMilestonePayload): Promise<Milestone>;
|
|
332
375
|
/**
|
|
333
|
-
* Delete
|
|
334
|
-
*
|
|
376
|
+
* Delete milestone.
|
|
377
|
+
*
|
|
378
|
+
* @param milestoneId - Milestone identifier.
|
|
379
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
335
380
|
* @throws {TestRailApiError} When the API request fails
|
|
336
381
|
*/
|
|
337
382
|
deleteMilestone(milestoneId: number): Promise<void>;
|
|
338
383
|
/**
|
|
339
|
-
* Get
|
|
340
|
-
*
|
|
384
|
+
* Get user.
|
|
385
|
+
*
|
|
386
|
+
* @param userId - User identifier.
|
|
387
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
341
388
|
* @throws {TestRailApiError} When the API request fails
|
|
342
389
|
*/
|
|
343
390
|
getUser(userId: number): Promise<User>;
|
|
344
391
|
/**
|
|
345
|
-
* Get
|
|
392
|
+
* Get user by email.
|
|
393
|
+
*
|
|
394
|
+
* @param email - Email address to look up.
|
|
346
395
|
* @throws {TestRailValidationError} When email format is invalid
|
|
347
396
|
* @throws {TestRailApiError} When the API request fails
|
|
348
397
|
*/
|
|
349
398
|
getUserByEmail(email: string): Promise<User>;
|
|
350
399
|
/**
|
|
351
|
-
* Get
|
|
352
|
-
*
|
|
353
|
-
* @param
|
|
354
|
-
* @param
|
|
355
|
-
* @
|
|
400
|
+
* Get users.
|
|
401
|
+
*
|
|
402
|
+
* @param limit - Optional maximum number of results to return.
|
|
403
|
+
* @param offset - Optional number of results to skip before returning results.
|
|
404
|
+
* @param projectId - Optional project identifier to scope results when provided.
|
|
405
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
356
406
|
* @throws {TestRailApiError} When the API request fails
|
|
357
407
|
*/
|
|
358
408
|
getUsers(limit?: number, offset?: number, projectId?: number): Promise<User[]>;
|
|
@@ -362,291 +412,397 @@ export declare class TestRailClient extends TestRailClientCore {
|
|
|
362
412
|
*/
|
|
363
413
|
getCurrentUser(): Promise<User>;
|
|
364
414
|
/**
|
|
365
|
-
*
|
|
415
|
+
* Add user.
|
|
416
|
+
*
|
|
417
|
+
* @param payload - Request payload for this operation.
|
|
418
|
+
* @throws {TestRailApiError} When the API request fails
|
|
419
|
+
*/
|
|
420
|
+
addUser(payload: AddUserPayload): Promise<User>;
|
|
421
|
+
/**
|
|
422
|
+
* Update user.
|
|
423
|
+
*
|
|
424
|
+
* @param userId - User identifier.
|
|
425
|
+
* @param payload - Request payload for this operation.
|
|
426
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
427
|
+
* @throws {TestRailApiError} When the API request fails
|
|
428
|
+
*/
|
|
429
|
+
updateUser(userId: number, payload: UpdateUserPayload): Promise<User>;
|
|
430
|
+
/**
|
|
431
|
+
* Get statuses.
|
|
366
432
|
* @throws {TestRailApiError} When the API request fails
|
|
367
433
|
*/
|
|
368
434
|
getStatuses(): Promise<Status[]>;
|
|
369
435
|
/**
|
|
370
|
-
* Get
|
|
436
|
+
* Get priorities.
|
|
371
437
|
* @throws {TestRailApiError} When the API request fails
|
|
372
438
|
*/
|
|
373
439
|
getPriorities(): Promise<Priority[]>;
|
|
374
440
|
/**
|
|
375
|
-
* Get
|
|
441
|
+
* Get result fields.
|
|
376
442
|
* @throws {TestRailApiError} When the API request fails
|
|
377
443
|
*/
|
|
378
444
|
getResultFields(): Promise<ResultField[]>;
|
|
379
445
|
/**
|
|
380
|
-
* Get
|
|
446
|
+
* Get case fields.
|
|
381
447
|
* @throws {TestRailApiError} When the API request fails
|
|
382
448
|
*/
|
|
383
449
|
getCaseFields(): Promise<CaseField[]>;
|
|
384
450
|
/**
|
|
385
|
-
* Get
|
|
451
|
+
* Get case types.
|
|
386
452
|
* @throws {TestRailApiError} When the API request fails
|
|
387
453
|
*/
|
|
388
454
|
getCaseTypes(): Promise<CaseType[]>;
|
|
389
455
|
/**
|
|
390
|
-
* Get
|
|
391
|
-
*
|
|
456
|
+
* Get templates.
|
|
457
|
+
*
|
|
458
|
+
* @param projectId - Project identifier.
|
|
459
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
392
460
|
* @throws {TestRailApiError} When the API request fails
|
|
393
461
|
*/
|
|
394
462
|
getTemplates(projectId: number): Promise<Template[]>;
|
|
395
463
|
/**
|
|
396
|
-
* Get
|
|
397
|
-
*
|
|
464
|
+
* Get configurations.
|
|
465
|
+
*
|
|
466
|
+
* @param projectId - Project identifier.
|
|
467
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
398
468
|
* @throws {TestRailApiError} When the API request fails
|
|
399
469
|
*/
|
|
400
470
|
getConfigurations(projectId: number): Promise<ConfigurationGroup[]>;
|
|
401
471
|
/**
|
|
402
|
-
* Add
|
|
403
|
-
*
|
|
472
|
+
* Add configuration group.
|
|
473
|
+
*
|
|
474
|
+
* @param projectId - Project identifier.
|
|
475
|
+
* @param payload - Request payload for this operation.
|
|
476
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
404
477
|
* @throws {TestRailApiError} When the API request fails
|
|
405
478
|
*/
|
|
406
479
|
addConfigurationGroup(projectId: number, payload: AddConfigurationGroupPayload): Promise<ConfigurationGroup>;
|
|
407
480
|
/**
|
|
408
|
-
* Update
|
|
409
|
-
*
|
|
481
|
+
* Update configuration group.
|
|
482
|
+
*
|
|
483
|
+
* @param configGroupId - Config group identifier.
|
|
484
|
+
* @param payload - Request payload for this operation.
|
|
485
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
410
486
|
* @throws {TestRailApiError} When the API request fails
|
|
411
487
|
*/
|
|
412
488
|
updateConfigurationGroup(configGroupId: number, payload: UpdateConfigurationGroupPayload): Promise<ConfigurationGroup>;
|
|
413
489
|
/**
|
|
414
|
-
* Delete
|
|
415
|
-
*
|
|
490
|
+
* Delete configuration group.
|
|
491
|
+
*
|
|
492
|
+
* @param configGroupId - Config group identifier.
|
|
493
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
416
494
|
* @throws {TestRailApiError} When the API request fails
|
|
417
495
|
*/
|
|
418
496
|
deleteConfigurationGroup(configGroupId: number): Promise<void>;
|
|
419
497
|
/**
|
|
420
|
-
* Add
|
|
421
|
-
*
|
|
498
|
+
* Add configuration.
|
|
499
|
+
*
|
|
500
|
+
* @param configGroupId - Config group identifier.
|
|
501
|
+
* @param payload - Request payload for this operation.
|
|
502
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
422
503
|
* @throws {TestRailApiError} When the API request fails
|
|
423
504
|
*/
|
|
424
505
|
addConfiguration(configGroupId: number, payload: AddConfigurationPayload): Promise<Configuration>;
|
|
425
506
|
/**
|
|
426
|
-
* Update
|
|
427
|
-
*
|
|
507
|
+
* Update configuration.
|
|
508
|
+
*
|
|
509
|
+
* @param configId - Config identifier.
|
|
510
|
+
* @param payload - Request payload for this operation.
|
|
511
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
428
512
|
* @throws {TestRailApiError} When the API request fails
|
|
429
513
|
*/
|
|
430
514
|
updateConfiguration(configId: number, payload: UpdateConfigurationPayload): Promise<Configuration>;
|
|
431
515
|
/**
|
|
432
|
-
* Delete
|
|
433
|
-
*
|
|
516
|
+
* Delete configuration.
|
|
517
|
+
*
|
|
518
|
+
* @param configId - Config identifier.
|
|
519
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
434
520
|
* @throws {TestRailApiError} When the API request fails
|
|
435
521
|
*/
|
|
436
522
|
deleteConfiguration(configId: number): Promise<void>;
|
|
437
523
|
/**
|
|
438
|
-
*
|
|
439
|
-
* @throws {TestRailApiError} When the API request fails
|
|
440
|
-
*/
|
|
441
|
-
addUser(payload: AddUserPayload): Promise<User>;
|
|
442
|
-
/**
|
|
443
|
-
* Update an existing TestRail user (requires TestRail 7.3+).
|
|
444
|
-
* @throws {TestRailValidationError} When userId is invalid
|
|
445
|
-
* @throws {TestRailApiError} When the API request fails
|
|
446
|
-
*/
|
|
447
|
-
updateUser(userId: number, payload: UpdateUserPayload): Promise<User>;
|
|
448
|
-
/**
|
|
449
|
-
* Get all available user roles (requires TestRail 7.3+).
|
|
524
|
+
* Get roles.
|
|
450
525
|
* @throws {TestRailApiError} When the API request fails
|
|
451
526
|
*/
|
|
452
527
|
getRoles(): Promise<Role[]>;
|
|
453
528
|
/**
|
|
454
|
-
* Get
|
|
455
|
-
*
|
|
529
|
+
* Get group.
|
|
530
|
+
*
|
|
531
|
+
* @param groupId - Group identifier.
|
|
532
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
456
533
|
* @throws {TestRailApiError} When the API request fails
|
|
457
534
|
*/
|
|
458
535
|
getGroup(groupId: number): Promise<Group>;
|
|
459
536
|
/**
|
|
460
|
-
* Get
|
|
537
|
+
* Get groups.
|
|
461
538
|
* @throws {TestRailApiError} When the API request fails
|
|
462
539
|
*/
|
|
463
540
|
getGroups(): Promise<Group[]>;
|
|
464
541
|
/**
|
|
465
|
-
*
|
|
542
|
+
* Add group.
|
|
543
|
+
*
|
|
544
|
+
* @param payload - Request payload for this operation.
|
|
466
545
|
* @throws {TestRailApiError} When the API request fails
|
|
467
546
|
*/
|
|
468
547
|
addGroup(payload: AddGroupPayload): Promise<Group>;
|
|
469
548
|
/**
|
|
470
|
-
* Update
|
|
471
|
-
*
|
|
549
|
+
* Update group.
|
|
550
|
+
*
|
|
551
|
+
* @param groupId - Group identifier.
|
|
552
|
+
* @param payload - Request payload for this operation.
|
|
553
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
472
554
|
* @throws {TestRailApiError} When the API request fails
|
|
473
555
|
*/
|
|
474
556
|
updateGroup(groupId: number, payload: UpdateGroupPayload): Promise<Group>;
|
|
475
557
|
/**
|
|
476
|
-
* Delete
|
|
477
|
-
*
|
|
558
|
+
* Delete group.
|
|
559
|
+
*
|
|
560
|
+
* @param groupId - Group identifier.
|
|
561
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
478
562
|
* @throws {TestRailApiError} When the API request fails
|
|
479
563
|
*/
|
|
480
564
|
deleteGroup(groupId: number): Promise<void>;
|
|
481
565
|
/**
|
|
482
|
-
* Get
|
|
483
|
-
*
|
|
566
|
+
* Get attachments for case.
|
|
567
|
+
*
|
|
568
|
+
* @param caseId - Case identifier.
|
|
569
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
484
570
|
* @throws {TestRailApiError} When the API request fails
|
|
485
571
|
*/
|
|
486
572
|
getAttachmentsForCase(caseId: number): Promise<Attachment[]>;
|
|
487
573
|
/**
|
|
488
|
-
* Get
|
|
489
|
-
*
|
|
574
|
+
* Get attachments for run.
|
|
575
|
+
*
|
|
576
|
+
* @param runId - Run identifier.
|
|
577
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
490
578
|
* @throws {TestRailApiError} When the API request fails
|
|
491
579
|
*/
|
|
492
580
|
getAttachmentsForRun(runId: number): Promise<Attachment[]>;
|
|
493
581
|
/**
|
|
494
|
-
* Get
|
|
495
|
-
*
|
|
582
|
+
* Get attachments for test.
|
|
583
|
+
*
|
|
584
|
+
* @param testId - Test identifier.
|
|
585
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
496
586
|
* @throws {TestRailApiError} When the API request fails
|
|
497
587
|
*/
|
|
498
588
|
getAttachmentsForTest(testId: number): Promise<Attachment[]>;
|
|
499
589
|
/**
|
|
500
|
-
* Get
|
|
501
|
-
*
|
|
590
|
+
* Get attachments for plan.
|
|
591
|
+
*
|
|
592
|
+
* @param planId - Plan identifier.
|
|
593
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
502
594
|
* @throws {TestRailApiError} When the API request fails
|
|
503
595
|
*/
|
|
504
596
|
getAttachmentsForPlan(planId: number): Promise<Attachment[]>;
|
|
505
597
|
/**
|
|
506
|
-
* Get
|
|
507
|
-
*
|
|
598
|
+
* Get attachments for plan entry.
|
|
599
|
+
*
|
|
600
|
+
* @param planId - Plan identifier.
|
|
601
|
+
* @param entryId - Plan entry identifier.
|
|
602
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
508
603
|
* @throws {TestRailApiError} When the API request fails
|
|
509
604
|
*/
|
|
510
605
|
getAttachmentsForPlanEntry(planId: number, entryId: number): Promise<Attachment[]>;
|
|
511
606
|
/**
|
|
512
|
-
* Download
|
|
513
|
-
*
|
|
514
|
-
* @
|
|
607
|
+
* Download an attachment by ID.
|
|
608
|
+
*
|
|
609
|
+
* @param attachmentId - Attachment identifier.
|
|
610
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
515
611
|
* @throws {TestRailApiError} When the API request fails
|
|
516
612
|
*/
|
|
517
613
|
getAttachment(attachmentId: number): Promise<ArrayBuffer>;
|
|
518
614
|
/**
|
|
519
|
-
*
|
|
520
|
-
*
|
|
615
|
+
* Add attachment to case.
|
|
616
|
+
*
|
|
617
|
+
* @param caseId - Case identifier.
|
|
618
|
+
* @param file - Attachment contents to upload.
|
|
619
|
+
* @param filename - Filename to send with the uploaded attachment.
|
|
620
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
521
621
|
* @throws {TestRailApiError} When the API request fails
|
|
522
622
|
*/
|
|
523
623
|
addAttachmentToCase(caseId: number, file: globalThis.Blob | Uint8Array | globalThis.File, filename: string): Promise<Attachment>;
|
|
524
624
|
/**
|
|
525
|
-
*
|
|
526
|
-
*
|
|
625
|
+
* Add attachment to result.
|
|
626
|
+
*
|
|
627
|
+
* @param resultId - Result identifier.
|
|
628
|
+
* @param file - Attachment contents to upload.
|
|
629
|
+
* @param filename - Filename to send with the uploaded attachment.
|
|
630
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
527
631
|
* @throws {TestRailApiError} When the API request fails
|
|
528
632
|
*/
|
|
529
633
|
addAttachmentToResult(resultId: number, file: globalThis.Blob | Uint8Array | globalThis.File, filename: string): Promise<Attachment>;
|
|
530
634
|
/**
|
|
531
|
-
*
|
|
532
|
-
*
|
|
635
|
+
* Add attachment to run.
|
|
636
|
+
*
|
|
637
|
+
* @param runId - Run identifier.
|
|
638
|
+
* @param file - Attachment contents to upload.
|
|
639
|
+
* @param filename - Filename to send with the uploaded attachment.
|
|
640
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
533
641
|
* @throws {TestRailApiError} When the API request fails
|
|
534
642
|
*/
|
|
535
643
|
addAttachmentToRun(runId: number, file: globalThis.Blob | Uint8Array | globalThis.File, filename: string): Promise<Attachment>;
|
|
536
644
|
/**
|
|
537
|
-
*
|
|
538
|
-
*
|
|
645
|
+
* Add attachment to plan.
|
|
646
|
+
*
|
|
647
|
+
* @param planId - Plan identifier.
|
|
648
|
+
* @param file - Attachment contents to upload.
|
|
649
|
+
* @param filename - Filename to send with the uploaded attachment.
|
|
650
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
539
651
|
* @throws {TestRailApiError} When the API request fails
|
|
540
652
|
*/
|
|
541
653
|
addAttachmentToPlan(planId: number, file: globalThis.Blob | Uint8Array | globalThis.File, filename: string): Promise<Attachment>;
|
|
542
654
|
/**
|
|
543
|
-
*
|
|
544
|
-
*
|
|
655
|
+
* Add attachment to plan entry.
|
|
656
|
+
*
|
|
657
|
+
* @param planId - Plan identifier.
|
|
658
|
+
* @param entryId - Plan entry identifier.
|
|
659
|
+
* @param file - Attachment contents to upload.
|
|
660
|
+
* @param filename - Filename to send with the uploaded attachment.
|
|
661
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
545
662
|
* @throws {TestRailApiError} When the API request fails
|
|
546
663
|
*/
|
|
547
664
|
addAttachmentToPlanEntry(planId: number, entryId: number, file: globalThis.Blob | Uint8Array | globalThis.File, filename: string): Promise<Attachment>;
|
|
548
665
|
/**
|
|
549
|
-
* Delete
|
|
550
|
-
*
|
|
666
|
+
* Delete attachment.
|
|
667
|
+
*
|
|
668
|
+
* @param attachmentId - Attachment identifier.
|
|
669
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
551
670
|
* @throws {TestRailApiError} When the API request fails
|
|
552
671
|
*/
|
|
553
672
|
deleteAttachment(attachmentId: number): Promise<void>;
|
|
554
673
|
/**
|
|
555
|
-
* Get
|
|
556
|
-
*
|
|
674
|
+
* Get shared step.
|
|
675
|
+
*
|
|
676
|
+
* @param sharedStepId - Shared step identifier.
|
|
677
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
557
678
|
* @throws {TestRailApiError} When the API request fails
|
|
558
679
|
*/
|
|
559
680
|
getSharedStep(sharedStepId: number): Promise<SharedStep>;
|
|
560
681
|
/**
|
|
561
|
-
* Get
|
|
562
|
-
*
|
|
682
|
+
* Get shared steps.
|
|
683
|
+
*
|
|
684
|
+
* @param projectId - Project identifier.
|
|
685
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
563
686
|
* @throws {TestRailApiError} When the API request fails
|
|
564
687
|
*/
|
|
565
688
|
getSharedSteps(projectId: number): Promise<SharedStep[]>;
|
|
566
689
|
/**
|
|
567
|
-
*
|
|
568
|
-
*
|
|
690
|
+
* Add shared step.
|
|
691
|
+
*
|
|
692
|
+
* @param projectId - Project identifier.
|
|
693
|
+
* @param payload - Request payload for this operation.
|
|
694
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
569
695
|
* @throws {TestRailApiError} When the API request fails
|
|
570
696
|
*/
|
|
571
697
|
addSharedStep(projectId: number, payload: AddSharedStepPayload): Promise<SharedStep>;
|
|
572
698
|
/**
|
|
573
|
-
* Update
|
|
574
|
-
*
|
|
699
|
+
* Update shared step.
|
|
700
|
+
*
|
|
701
|
+
* @param sharedStepId - Shared step identifier.
|
|
702
|
+
* @param payload - Request payload for this operation.
|
|
703
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
575
704
|
* @throws {TestRailApiError} When the API request fails
|
|
576
705
|
*/
|
|
577
706
|
updateSharedStep(sharedStepId: number, payload: UpdateSharedStepPayload): Promise<SharedStep>;
|
|
578
707
|
/**
|
|
579
|
-
* Delete
|
|
580
|
-
*
|
|
708
|
+
* Delete shared step.
|
|
709
|
+
*
|
|
710
|
+
* @param sharedStepId - Shared step identifier.
|
|
711
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
581
712
|
* @throws {TestRailApiError} When the API request fails
|
|
582
713
|
*/
|
|
583
714
|
deleteSharedStep(sharedStepId: number): Promise<void>;
|
|
584
715
|
/**
|
|
585
|
-
* Get
|
|
586
|
-
*
|
|
716
|
+
* Get variables.
|
|
717
|
+
*
|
|
718
|
+
* @param projectId - Project identifier.
|
|
719
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
587
720
|
* @throws {TestRailApiError} When the API request fails
|
|
588
721
|
*/
|
|
589
722
|
getVariables(projectId: number): Promise<Variable[]>;
|
|
590
723
|
/**
|
|
591
|
-
*
|
|
592
|
-
*
|
|
724
|
+
* Add variable.
|
|
725
|
+
*
|
|
726
|
+
* @param projectId - Project identifier.
|
|
727
|
+
* @param payload - Request payload for this operation.
|
|
728
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
593
729
|
* @throws {TestRailApiError} When the API request fails
|
|
594
730
|
*/
|
|
595
731
|
addVariable(projectId: number, payload: AddVariablePayload): Promise<Variable>;
|
|
596
732
|
/**
|
|
597
|
-
* Update
|
|
598
|
-
*
|
|
733
|
+
* Update variable.
|
|
734
|
+
*
|
|
735
|
+
* @param variableId - Variable identifier.
|
|
736
|
+
* @param payload - Request payload for this operation.
|
|
737
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
599
738
|
* @throws {TestRailApiError} When the API request fails
|
|
600
739
|
*/
|
|
601
740
|
updateVariable(variableId: number, payload: UpdateVariablePayload): Promise<Variable>;
|
|
602
741
|
/**
|
|
603
|
-
* Delete
|
|
604
|
-
*
|
|
742
|
+
* Delete variable.
|
|
743
|
+
*
|
|
744
|
+
* @param variableId - Variable identifier.
|
|
745
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
605
746
|
* @throws {TestRailApiError} When the API request fails
|
|
606
747
|
*/
|
|
607
748
|
deleteVariable(variableId: number): Promise<void>;
|
|
608
749
|
/**
|
|
609
|
-
* Get
|
|
610
|
-
*
|
|
750
|
+
* Get dataset.
|
|
751
|
+
*
|
|
752
|
+
* @param datasetId - Dataset identifier.
|
|
753
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
611
754
|
* @throws {TestRailApiError} When the API request fails
|
|
612
755
|
*/
|
|
613
756
|
getDataset(datasetId: number): Promise<Dataset>;
|
|
614
757
|
/**
|
|
615
|
-
* Get
|
|
616
|
-
*
|
|
758
|
+
* Get datasets.
|
|
759
|
+
*
|
|
760
|
+
* @param projectId - Project identifier.
|
|
761
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
617
762
|
* @throws {TestRailApiError} When the API request fails
|
|
618
763
|
*/
|
|
619
764
|
getDatasets(projectId: number): Promise<Dataset[]>;
|
|
620
765
|
/**
|
|
621
|
-
*
|
|
622
|
-
*
|
|
766
|
+
* Add dataset.
|
|
767
|
+
*
|
|
768
|
+
* @param projectId - Project identifier.
|
|
769
|
+
* @param payload - Request payload for this operation.
|
|
770
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
623
771
|
* @throws {TestRailApiError} When the API request fails
|
|
624
772
|
*/
|
|
625
773
|
addDataset(projectId: number, payload: AddDatasetPayload): Promise<Dataset>;
|
|
626
774
|
/**
|
|
627
|
-
* Update
|
|
628
|
-
*
|
|
775
|
+
* Update dataset.
|
|
776
|
+
*
|
|
777
|
+
* @param datasetId - Dataset identifier.
|
|
778
|
+
* @param payload - Request payload for this operation.
|
|
779
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
629
780
|
* @throws {TestRailApiError} When the API request fails
|
|
630
781
|
*/
|
|
631
782
|
updateDataset(datasetId: number, payload: UpdateDatasetPayload): Promise<Dataset>;
|
|
632
783
|
/**
|
|
633
|
-
* Delete
|
|
634
|
-
*
|
|
784
|
+
* Delete dataset.
|
|
785
|
+
*
|
|
786
|
+
* @param datasetId - Dataset identifier.
|
|
787
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
635
788
|
* @throws {TestRailApiError} When the API request fails
|
|
636
789
|
*/
|
|
637
790
|
deleteDataset(datasetId: number): Promise<void>;
|
|
638
791
|
/**
|
|
639
|
-
* Get
|
|
640
|
-
*
|
|
792
|
+
* Get reports.
|
|
793
|
+
*
|
|
794
|
+
* @param projectId - Project identifier.
|
|
795
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
641
796
|
* @throws {TestRailApiError} When the API request fails
|
|
642
797
|
*/
|
|
643
798
|
getReports(projectId: number): Promise<Report[]>;
|
|
644
799
|
/**
|
|
645
|
-
*
|
|
646
|
-
*
|
|
800
|
+
* Run report.
|
|
801
|
+
*
|
|
802
|
+
* @param reportTemplateId - Report template identifier.
|
|
803
|
+
* @throws {TestRailValidationError} When identifiers or request parameters are invalid
|
|
647
804
|
* @throws {TestRailApiError} When the API request fails
|
|
648
805
|
*/
|
|
649
806
|
runReport(reportTemplateId: number): Promise<ReportResult>;
|
|
650
|
-
private serializeIdList;
|
|
651
807
|
}
|
|
652
808
|
//# sourceMappingURL=client.d.ts.map
|