@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.
Files changed (137) hide show
  1. package/README.md +22 -0
  2. package/dist/cli/auth.d.ts +21 -0
  3. package/dist/cli/auth.js +16 -0
  4. package/dist/cli/body.d.ts +42 -0
  5. package/dist/cli/body.js +89 -0
  6. package/dist/cli/dispatch.d.ts +16 -0
  7. package/dist/cli/dispatch.js +87 -0
  8. package/dist/cli/handler-context.d.ts +43 -0
  9. package/dist/cli/handler-context.js +2 -0
  10. package/dist/cli/handlers/case-write.d.ts +4 -0
  11. package/dist/cli/handlers/case-write.js +26 -0
  12. package/dist/cli/handlers/case.d.ts +4 -0
  13. package/dist/cli/handlers/case.js +11 -0
  14. package/dist/cli/handlers/milestone.d.ts +4 -0
  15. package/dist/cli/handlers/milestone.js +15 -0
  16. package/dist/cli/handlers/project.d.ts +4 -0
  17. package/dist/cli/handlers/project.js +11 -0
  18. package/dist/cli/handlers/result-write.d.ts +4 -0
  19. package/dist/cli/handlers/result-write.js +40 -0
  20. package/dist/cli/handlers/result.d.ts +3 -0
  21. package/dist/cli/handlers/result.js +11 -0
  22. package/dist/cli/handlers/run-write.d.ts +10 -0
  23. package/dist/cli/handlers/run-write.js +29 -0
  24. package/dist/cli/handlers/run.d.ts +4 -0
  25. package/dist/cli/handlers/run.js +15 -0
  26. package/dist/cli/handlers/suite.d.ts +4 -0
  27. package/dist/cli/handlers/suite.js +10 -0
  28. package/dist/cli/handlers/user.d.ts +4 -0
  29. package/dist/cli/handlers/user.js +11 -0
  30. package/dist/cli/ids.d.ts +6 -0
  31. package/dist/cli/ids.js +20 -0
  32. package/dist/cli/index.d.ts +3 -0
  33. package/dist/cli/index.js +198 -0
  34. package/dist/cli/install-skill.d.ts +35 -0
  35. package/dist/cli/install-skill.js +71 -0
  36. package/dist/cli/metadata.d.ts +37 -0
  37. package/dist/cli/metadata.js +151 -0
  38. package/dist/cli/output.d.ts +28 -0
  39. package/dist/cli/output.js +84 -0
  40. package/dist/cli.d.ts +1 -1
  41. package/dist/cli.js +1 -266
  42. package/dist/client-core.d.ts +16 -7
  43. package/dist/client-core.js +153 -27
  44. package/dist/client.d.ts +274 -118
  45. package/dist/client.js +404 -463
  46. package/dist/constants.d.ts +1 -0
  47. package/dist/constants.js +1 -0
  48. package/dist/errors.d.ts +11 -9
  49. package/dist/errors.js +12 -8
  50. package/dist/index.d.ts +4 -2
  51. package/dist/index.js +2 -1
  52. package/dist/modules/attachments.d.ts +19 -0
  53. package/dist/modules/attachments.js +64 -0
  54. package/dist/modules/cases.d.ts +13 -0
  55. package/dist/modules/cases.js +58 -0
  56. package/dist/modules/configurations.d.ts +14 -0
  57. package/dist/modules/configurations.js +37 -0
  58. package/dist/modules/datasets.d.ts +12 -0
  59. package/dist/modules/datasets.js +28 -0
  60. package/dist/modules/metadata.d.ts +14 -0
  61. package/dist/modules/metadata.js +31 -0
  62. package/dist/modules/milestones.d.ts +12 -0
  63. package/dist/modules/milestones.js +36 -0
  64. package/dist/modules/plans.d.ts +16 -0
  65. package/dist/modules/plans.js +59 -0
  66. package/dist/modules/projects.d.ts +36 -0
  67. package/dist/modules/projects.js +55 -0
  68. package/dist/modules/reports.d.ts +9 -0
  69. package/dist/modules/reports.js +16 -0
  70. package/dist/modules/results.d.ts +14 -0
  71. package/dist/modules/results.js +69 -0
  72. package/dist/modules/runs.d.ts +14 -0
  73. package/dist/modules/runs.js +57 -0
  74. package/dist/modules/sections.d.ts +16 -0
  75. package/dist/modules/sections.js +37 -0
  76. package/dist/modules/sharedSteps.d.ts +12 -0
  77. package/dist/modules/sharedSteps.js +28 -0
  78. package/dist/modules/suites.d.ts +37 -0
  79. package/dist/modules/suites.js +54 -0
  80. package/dist/modules/tests.d.ts +9 -0
  81. package/dist/modules/tests.js +25 -0
  82. package/dist/modules/users.d.ts +18 -0
  83. package/dist/modules/users.js +62 -0
  84. package/dist/modules/variables.d.ts +11 -0
  85. package/dist/modules/variables.js +24 -0
  86. package/dist/schemas.d.ts +544 -0
  87. package/dist/schemas.js +419 -0
  88. package/dist/types.d.ts +1 -55
  89. package/dist/utils.d.ts +2 -0
  90. package/dist/utils.js +4 -0
  91. package/package.json +23 -15
  92. package/skill/SKILL.md +395 -0
  93. package/src/cli/auth.ts +37 -0
  94. package/src/cli/body.ts +100 -0
  95. package/src/cli/dispatch.ts +91 -0
  96. package/src/cli/handler-context.ts +46 -0
  97. package/src/cli/handlers/case-write.ts +26 -0
  98. package/src/cli/handlers/case.ts +13 -0
  99. package/src/cli/handlers/milestone.ts +19 -0
  100. package/src/cli/handlers/project.ts +13 -0
  101. package/src/cli/handlers/result-write.ts +40 -0
  102. package/src/cli/handlers/result.ts +14 -0
  103. package/src/cli/handlers/run-write.ts +30 -0
  104. package/src/cli/handlers/run.ts +19 -0
  105. package/src/cli/handlers/suite.ts +12 -0
  106. package/src/cli/handlers/user.ts +13 -0
  107. package/src/cli/ids.ts +20 -0
  108. package/src/cli/index.ts +224 -0
  109. package/src/cli/install-skill.ts +89 -0
  110. package/src/cli/metadata.ts +194 -0
  111. package/src/cli/output.ts +96 -0
  112. package/src/cli.ts +1 -286
  113. package/src/client-core.ts +183 -67
  114. package/src/client.ts +414 -483
  115. package/src/constants.ts +1 -0
  116. package/src/errors.ts +18 -11
  117. package/src/index.ts +50 -8
  118. package/src/modules/attachments.ts +125 -0
  119. package/src/modules/cases.ts +78 -0
  120. package/src/modules/configurations.ts +68 -0
  121. package/src/modules/datasets.ts +44 -0
  122. package/src/modules/metadata.ts +63 -0
  123. package/src/modules/milestones.ts +54 -0
  124. package/src/modules/plans.ts +89 -0
  125. package/src/modules/projects.ts +67 -0
  126. package/src/modules/reports.ts +23 -0
  127. package/src/modules/results.ts +90 -0
  128. package/src/modules/runs.ts +70 -0
  129. package/src/modules/sections.ts +55 -0
  130. package/src/modules/sharedSteps.ts +44 -0
  131. package/src/modules/suites.ts +67 -0
  132. package/src/modules/tests.ts +28 -0
  133. package/src/modules/users.ts +87 -0
  134. package/src/modules/variables.ts +36 -0
  135. package/src/schemas.ts +551 -0
  136. package/src/types.ts +11 -60
  137. 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, AddCasePayload, UpdateCasePayload, AddSuitePayload, UpdateSuitePayload, AddPlanPayload, UpdatePlanPayload, AddPlanEntryPayload, UpdatePlanEntryPayload, PlanEntry, AddRunPayload, UpdateRunPayload, AddResultPayload, AddResultsForCasesPayload, 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';
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 all milestones for a project with optional filters.
314
- * @param projectId - The project ID
315
- * @param options - Optional filter parameters (is_completed, limit, offset)
316
- * @throws {TestRailValidationError} When projectId is invalid
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 a new milestone to a project.
322
- * @throws {TestRailValidationError} When projectId is invalid
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 an existing milestone.
328
- * @throws {TestRailValidationError} When milestoneId is invalid
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 a milestone.
334
- * @throws {TestRailValidationError} When milestoneId is invalid
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 a user by ID.
340
- * @throws {TestRailValidationError} When userId is invalid
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 a user by email address.
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 all users, optionally scoped to a project.
352
- * @param limit - Maximum number of users to return
353
- * @param offset - Number of users to skip
354
- * @param projectId - When provided, returns only users with access to the specified project
355
- * @throws {TestRailValidationError} When pagination or projectId is invalid
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
- * Get all test statuses.
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 all case priorities.
436
+ * Get priorities.
371
437
  * @throws {TestRailApiError} When the API request fails
372
438
  */
373
439
  getPriorities(): Promise<Priority[]>;
374
440
  /**
375
- * Get all available custom result fields.
441
+ * Get result fields.
376
442
  * @throws {TestRailApiError} When the API request fails
377
443
  */
378
444
  getResultFields(): Promise<ResultField[]>;
379
445
  /**
380
- * Get all available custom case fields.
446
+ * Get case fields.
381
447
  * @throws {TestRailApiError} When the API request fails
382
448
  */
383
449
  getCaseFields(): Promise<CaseField[]>;
384
450
  /**
385
- * Get all available case types.
451
+ * Get case types.
386
452
  * @throws {TestRailApiError} When the API request fails
387
453
  */
388
454
  getCaseTypes(): Promise<CaseType[]>;
389
455
  /**
390
- * Get all available case templates for a project (requires TestRail 5.2+).
391
- * @throws {TestRailValidationError} When projectId is invalid
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 all configuration groups and their configurations for a project.
397
- * @throws {TestRailValidationError} When projectId is invalid
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 a new configuration group to a project.
403
- * @throws {TestRailValidationError} When projectId is invalid
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 an existing configuration group.
409
- * @throws {TestRailValidationError} When configGroupId is invalid
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 an existing configuration group and all its configurations.
415
- * @throws {TestRailValidationError} When configGroupId is invalid
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 a new configuration to a configuration group.
421
- * @throws {TestRailValidationError} When configGroupId is invalid
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 an existing configuration.
427
- * @throws {TestRailValidationError} When configId is invalid
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 an existing configuration.
433
- * @throws {TestRailValidationError} When configId is invalid
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
- * Create a new TestRail user (requires TestRail 7.3+).
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 a single group by ID (requires TestRail 7.5+).
455
- * @throws {TestRailValidationError} When groupId is invalid
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 all groups (requires TestRail 7.5+).
537
+ * Get groups.
461
538
  * @throws {TestRailApiError} When the API request fails
462
539
  */
463
540
  getGroups(): Promise<Group[]>;
464
541
  /**
465
- * Create a new group (requires TestRail 7.5+).
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 an existing group (requires TestRail 7.5+).
471
- * @throws {TestRailValidationError} When groupId is invalid
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 a group (requires TestRail 7.5+).
477
- * @throws {TestRailValidationError} When groupId is invalid
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 all attachments for a test case.
483
- * @throws {TestRailValidationError} When caseId is invalid
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 all attachments for a test run.
489
- * @throws {TestRailValidationError} When runId is invalid
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 all attachments for a test.
495
- * @throws {TestRailValidationError} When testId is invalid
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 all attachments for a test plan.
501
- * @throws {TestRailValidationError} When planId is invalid
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 all attachments for a specific plan entry.
507
- * @throws {TestRailValidationError} When planId or entryId is invalid
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 the raw binary content of an attachment.
513
- * @param attachmentId - The attachment ID (numeric)
514
- * @throws {TestRailValidationError} When attachmentId is invalid
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
- * Upload a file attachment to a test case.
520
- * @throws {TestRailValidationError} When caseId is invalid
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
- * Upload a file attachment to a test result.
526
- * @throws {TestRailValidationError} When resultId is invalid
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
- * Upload a file attachment to a test run.
532
- * @throws {TestRailValidationError} When runId is invalid
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
- * Upload a file attachment to a test plan (requires TestRail 6.5.2+).
538
- * @throws {TestRailValidationError} When planId is invalid
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
- * Upload a file attachment to a specific plan entry (requires TestRail 6.5.2+).
544
- * @throws {TestRailValidationError} When planId or entryId is invalid
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 an attachment by ID.
550
- * @throws {TestRailValidationError} When attachmentId is invalid
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 a single shared step by ID (requires TestRail 7.0+).
556
- * @throws {TestRailValidationError} When sharedStepId is invalid
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 all shared steps for a project (requires TestRail 7.0+).
562
- * @throws {TestRailValidationError} When projectId is invalid
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
- * Create a new shared step in a project (requires TestRail 7.0+).
568
- * @throws {TestRailValidationError} When projectId is invalid
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 an existing shared step (requires TestRail 7.0+).
574
- * @throws {TestRailValidationError} When sharedStepId is invalid
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 a shared step (requires TestRail 7.0+).
580
- * @throws {TestRailValidationError} When sharedStepId is invalid
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 all variables for a project.
586
- * @throws {TestRailValidationError} When projectId is invalid
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
- * Create a new variable in a project.
592
- * @throws {TestRailValidationError} When projectId is invalid
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 an existing variable.
598
- * @throws {TestRailValidationError} When variableId is invalid
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 a variable.
604
- * @throws {TestRailValidationError} When variableId is invalid
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 a single dataset by ID.
610
- * @throws {TestRailValidationError} When datasetId is invalid
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 all datasets for a project.
616
- * @throws {TestRailValidationError} When projectId is invalid
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
- * Create a new dataset in a project.
622
- * @throws {TestRailValidationError} When projectId is invalid
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 an existing dataset.
628
- * @throws {TestRailValidationError} When datasetId is invalid
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 a dataset.
634
- * @throws {TestRailValidationError} When datasetId is invalid
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 all available report templates for a project.
640
- * @throws {TestRailValidationError} When projectId is invalid
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
- * Execute a report template and return URLs to the generated output.
646
- * @throws {TestRailValidationError} When reportTemplateId is invalid
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