@rbaileysr/zephyr-managed-api 1.0.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 (56) hide show
  1. package/README.md +618 -0
  2. package/dist/error-strategy.d.ts +69 -0
  3. package/dist/error-strategy.d.ts.map +1 -0
  4. package/dist/error-strategy.js +125 -0
  5. package/dist/groups/All.d.ts +90 -0
  6. package/dist/groups/All.d.ts.map +1 -0
  7. package/dist/groups/All.js +236 -0
  8. package/dist/groups/Automation.d.ts +75 -0
  9. package/dist/groups/Automation.d.ts.map +1 -0
  10. package/dist/groups/Automation.js +133 -0
  11. package/dist/groups/Environment.d.ts +73 -0
  12. package/dist/groups/Environment.d.ts.map +1 -0
  13. package/dist/groups/Environment.js +93 -0
  14. package/dist/groups/Folder.d.ts +55 -0
  15. package/dist/groups/Folder.d.ts.map +1 -0
  16. package/dist/groups/Folder.js +68 -0
  17. package/dist/groups/IssueLink.d.ts +59 -0
  18. package/dist/groups/IssueLink.d.ts.map +1 -0
  19. package/dist/groups/IssueLink.js +70 -0
  20. package/dist/groups/Link.d.ts +23 -0
  21. package/dist/groups/Link.d.ts.map +1 -0
  22. package/dist/groups/Link.js +34 -0
  23. package/dist/groups/Priority.d.ts +77 -0
  24. package/dist/groups/Priority.d.ts.map +1 -0
  25. package/dist/groups/Priority.js +97 -0
  26. package/dist/groups/Project.d.ts +36 -0
  27. package/dist/groups/Project.d.ts.map +1 -0
  28. package/dist/groups/Project.js +42 -0
  29. package/dist/groups/Status.d.ts +82 -0
  30. package/dist/groups/Status.d.ts.map +1 -0
  31. package/dist/groups/Status.js +102 -0
  32. package/dist/groups/TestCase.d.ts +254 -0
  33. package/dist/groups/TestCase.d.ts.map +1 -0
  34. package/dist/groups/TestCase.js +327 -0
  35. package/dist/groups/TestCycle.d.ts +127 -0
  36. package/dist/groups/TestCycle.d.ts.map +1 -0
  37. package/dist/groups/TestCycle.js +166 -0
  38. package/dist/groups/TestExecution.d.ts +176 -0
  39. package/dist/groups/TestExecution.d.ts.map +1 -0
  40. package/dist/groups/TestExecution.js +239 -0
  41. package/dist/groups/TestPlan.d.ts +103 -0
  42. package/dist/groups/TestPlan.d.ts.map +1 -0
  43. package/dist/groups/TestPlan.js +137 -0
  44. package/dist/index.d.ts +119 -0
  45. package/dist/index.d.ts.map +1 -0
  46. package/dist/index.js +124 -0
  47. package/dist/types.d.ts +1353 -0
  48. package/dist/types.d.ts.map +1 -0
  49. package/dist/types.js +7 -0
  50. package/dist/utils-api-call.d.ts +22 -0
  51. package/dist/utils-api-call.d.ts.map +1 -0
  52. package/dist/utils-api-call.js +80 -0
  53. package/dist/utils.d.ts +144 -0
  54. package/dist/utils.d.ts.map +1 -0
  55. package/dist/utils.js +432 -0
  56. package/package.json +54 -0
@@ -0,0 +1,127 @@
1
+ /**
2
+ * Test Cycle API group
3
+ * Handles test cycle-related operations
4
+ */
5
+ import type { TestCycle, TestCycleList, ListTestCyclesOptions, GetTestCycleOptions, CreateTestCycleRequest, UpdateTestCycleRequest, TestCycleLinkList, CreateTestCycleIssueLinkRequest, CreateTestCycleWebLinkRequest, KeyedCreatedResource, CreatedResource } from '../types';
6
+ import type { ZephyrApiConnection } from '../index';
7
+ export declare class TestCycleGroup {
8
+ private api;
9
+ constructor(api: ZephyrApiConnection);
10
+ /**
11
+ * List all test cycles
12
+ *
13
+ * Retrieves a paginated list of all test cycles. Query parameters can be used to filter by project, folder, and Jira project version.
14
+ *
15
+ * @param options - Optional query parameters for filtering and pagination
16
+ * @param options.projectKey - Filter test cycles by Jira project key
17
+ * @param options.folderId - Filter test cycles by folder ID
18
+ * @param options.jiraProjectVersionId - Filter by Jira Project Version ID (relates to 'Version' or 'Releases' in Jira projects)
19
+ * @param options.maxResults - Maximum number of results to return (default: 10, max: 1000)
20
+ * @param options.startAt - Zero-indexed starting position (must be multiple of maxResults)
21
+ * @returns Paginated list of test cycles with metadata (total, isLast, etc.)
22
+ *
23
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/listTestCycles Official API Documentation}
24
+ */
25
+ listTestCycles(options?: ListTestCyclesOptions): Promise<TestCycleList>;
26
+ /**
27
+ * Get a specific test cycle
28
+ *
29
+ * Retrieves detailed information about a specific test cycle by its ID or key (e.g., 'PROJ-R1').
30
+ *
31
+ * @param options - Get test cycle options
32
+ * @param options.testCycleIdOrKey - The test cycle ID or key (e.g., 'PROJ-R1')
33
+ * @returns Test cycle object with all fields
34
+ *
35
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/getTestCycle Official API Documentation}
36
+ */
37
+ getTestCycle(options: GetTestCycleOptions): Promise<TestCycle>;
38
+ /**
39
+ * Create a new test cycle
40
+ *
41
+ * Creates a new test cycle in the specified project. Required fields include projectKey, name, plannedStartDate, and plannedEndDate.
42
+ * Optional fields include description, jiraProjectVersionId, folderId, ownerId, labels, and customFields.
43
+ *
44
+ * @param request - Create test cycle request
45
+ * @param request.body - Test cycle data
46
+ * @param request.body.projectKey - Jira project key (required)
47
+ * @param request.body.name - Test cycle name (required)
48
+ * @param request.body.plannedStartDate - Planned start date in ISO 8601 format (required)
49
+ * @param request.body.plannedEndDate - Planned end date in ISO 8601 format (required)
50
+ * @param request.body.description - Test cycle description (optional)
51
+ * @param request.body.jiraProjectVersionId - Jira Project Version ID (optional)
52
+ * @param request.body.folderId - Folder ID (optional)
53
+ * @param request.body.ownerId - Owner account ID (optional)
54
+ * @param request.body.labels - Array of labels (optional)
55
+ * @param request.body.customFields - Custom field values (optional)
56
+ * @returns Created test cycle with key, id, and self link
57
+ *
58
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/createTestCycle Official API Documentation}
59
+ */
60
+ createTestCycle(request: CreateTestCycleRequest): Promise<KeyedCreatedResource>;
61
+ /**
62
+ * Update an existing test cycle
63
+ *
64
+ * Updates an existing test cycle. For each non-specified field the value will be cleared.
65
+ * If the project has test cycle custom fields, all custom fields should be present in the request.
66
+ *
67
+ * @param request - Update test cycle request
68
+ * @param request.testCycleIdOrKey - The test cycle ID or key to update (e.g., 'PROJ-R1')
69
+ * @param request.body - Test cycle data to update (all fields optional, but unspecified fields will be cleared)
70
+ * @param request.body.name - Test cycle name (optional)
71
+ * @param request.body.description - Test cycle description (optional)
72
+ * @param request.body.plannedStartDate - Planned start date in ISO 8601 format (optional)
73
+ * @param request.body.plannedEndDate - Planned end date in ISO 8601 format (optional)
74
+ * @param request.body.jiraProjectVersionId - Jira Project Version ID (optional)
75
+ * @param request.body.folderId - Folder ID (optional)
76
+ * @param request.body.ownerId - Owner account ID (optional)
77
+ * @param request.body.labels - Array of labels (optional)
78
+ * @param request.body.customFields - Custom field values (optional, but all custom fields must be present if any are included)
79
+ * @returns Promise that resolves when update is complete
80
+ *
81
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/updateTestCycle Official API Documentation}
82
+ */
83
+ updateTestCycle(request: UpdateTestCycleRequest): Promise<void>;
84
+ /**
85
+ * Get links for a test cycle
86
+ *
87
+ * Retrieves all links associated with a test cycle, including issue links, web links, and test plan links.
88
+ *
89
+ * @param testCycleIdOrKey - The test cycle ID or key (e.g., 'PROJ-R1')
90
+ * @returns List of links including issues, webLinks, and testPlans arrays
91
+ *
92
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/getTestCycleLinks Official API Documentation}
93
+ */
94
+ getTestCycleLinks(testCycleIdOrKey: string | number): Promise<TestCycleLinkList>;
95
+ /**
96
+ * Create a link between a test cycle and a Jira issue
97
+ *
98
+ * Creates a link between a test cycle and a Jira issue. The link type can be COVERAGE, BLOCKS, or RELATED.
99
+ *
100
+ * @param request - Create issue link request
101
+ * @param request.testCycleIdOrKey - The test cycle ID or key (e.g., 'PROJ-R1')
102
+ * @param request.body - Link data
103
+ * @param request.body.issueId - Jira issue ID (required)
104
+ * @param request.body.type - Link type: 'COVERAGE', 'BLOCKS', or 'RELATED' (optional, defaults to 'COVERAGE')
105
+ * @returns Created link resource with id and self link
106
+ *
107
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/createTestCycleIssueLink Official API Documentation}
108
+ */
109
+ createTestCycleIssueLink(request: CreateTestCycleIssueLinkRequest): Promise<CreatedResource>;
110
+ /**
111
+ * Create a link between a test cycle and a generic URL
112
+ *
113
+ * Creates a web link between a test cycle and an external URL. Useful for linking to documentation, requirements, or other resources.
114
+ *
115
+ * @param request - Create web link request
116
+ * @param request.testCycleIdOrKey - The test cycle ID or key (e.g., 'PROJ-R1')
117
+ * @param request.body - Web link data
118
+ * @param request.body.url - The URL to link to (required)
119
+ * @param request.body.description - Link description (optional)
120
+ * @param request.body.type - Link type: 'COVERAGE', 'BLOCKS', or 'RELATED' (optional, defaults to 'COVERAGE')
121
+ * @returns Created link resource with id and self link
122
+ *
123
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/createTestCycleWebLink Official API Documentation}
124
+ */
125
+ createTestCycleWebLink(request: CreateTestCycleWebLinkRequest): Promise<CreatedResource>;
126
+ }
127
+ //# sourceMappingURL=TestCycle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TestCycle.d.ts","sourceRoot":"","sources":["../../groups/TestCycle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,SAAS,EACT,aAAa,EACb,qBAAqB,EACrB,mBAAmB,EACnB,sBAAsB,EACtB,sBAAsB,EACtB,iBAAiB,EACjB,+BAA+B,EAC/B,6BAA6B,EAC7B,oBAAoB,EACpB,eAAe,EACf,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,qBAAa,cAAc;IACd,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,mBAAmB;IAE5C;;;;;;;;;;;;;;OAcG;IACG,cAAc,CAAC,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,aAAa,CAAC;IAM7E;;;;;;;;;;OAUG;IACG,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,SAAS,CAAC;IAKpE;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,oBAAoB,CAAC;IASrF;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,eAAe,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;IAWrE;;;;;;;;;OASG;IACG,iBAAiB,CAAC,gBAAgB,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAKtF;;;;;;;;;;;;;OAaG;IACG,wBAAwB,CAC7B,OAAO,EAAE,+BAA+B,GACtC,OAAO,CAAC,eAAe,CAAC;IAY3B;;;;;;;;;;;;;;OAcG;IACG,sBAAsB,CAAC,OAAO,EAAE,6BAA6B,GAAG,OAAO,CAAC,eAAe,CAAC;CAW9F"}
@@ -0,0 +1,166 @@
1
+ /**
2
+ * Test Cycle API group
3
+ * Handles test cycle-related operations
4
+ */
5
+ import { buildQueryString, parseResponse, buildRequestBody } from '../utils';
6
+ export class TestCycleGroup {
7
+ constructor(api) {
8
+ this.api = api;
9
+ }
10
+ /**
11
+ * List all test cycles
12
+ *
13
+ * Retrieves a paginated list of all test cycles. Query parameters can be used to filter by project, folder, and Jira project version.
14
+ *
15
+ * @param options - Optional query parameters for filtering and pagination
16
+ * @param options.projectKey - Filter test cycles by Jira project key
17
+ * @param options.folderId - Filter test cycles by folder ID
18
+ * @param options.jiraProjectVersionId - Filter by Jira Project Version ID (relates to 'Version' or 'Releases' in Jira projects)
19
+ * @param options.maxResults - Maximum number of results to return (default: 10, max: 1000)
20
+ * @param options.startAt - Zero-indexed starting position (must be multiple of maxResults)
21
+ * @returns Paginated list of test cycles with metadata (total, isLast, etc.)
22
+ *
23
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/listTestCycles Official API Documentation}
24
+ */
25
+ async listTestCycles(options) {
26
+ const queryString = buildQueryString(options);
27
+ const response = await this.api.fetch(`/testcycles${queryString}`);
28
+ return parseResponse(response);
29
+ }
30
+ /**
31
+ * Get a specific test cycle
32
+ *
33
+ * Retrieves detailed information about a specific test cycle by its ID or key (e.g., 'PROJ-R1').
34
+ *
35
+ * @param options - Get test cycle options
36
+ * @param options.testCycleIdOrKey - The test cycle ID or key (e.g., 'PROJ-R1')
37
+ * @returns Test cycle object with all fields
38
+ *
39
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/getTestCycle Official API Documentation}
40
+ */
41
+ async getTestCycle(options) {
42
+ const response = await this.api.fetch(`/testcycles/${options.testCycleIdOrKey}`);
43
+ return parseResponse(response);
44
+ }
45
+ /**
46
+ * Create a new test cycle
47
+ *
48
+ * Creates a new test cycle in the specified project. Required fields include projectKey, name, plannedStartDate, and plannedEndDate.
49
+ * Optional fields include description, jiraProjectVersionId, folderId, ownerId, labels, and customFields.
50
+ *
51
+ * @param request - Create test cycle request
52
+ * @param request.body - Test cycle data
53
+ * @param request.body.projectKey - Jira project key (required)
54
+ * @param request.body.name - Test cycle name (required)
55
+ * @param request.body.plannedStartDate - Planned start date in ISO 8601 format (required)
56
+ * @param request.body.plannedEndDate - Planned end date in ISO 8601 format (required)
57
+ * @param request.body.description - Test cycle description (optional)
58
+ * @param request.body.jiraProjectVersionId - Jira Project Version ID (optional)
59
+ * @param request.body.folderId - Folder ID (optional)
60
+ * @param request.body.ownerId - Owner account ID (optional)
61
+ * @param request.body.labels - Array of labels (optional)
62
+ * @param request.body.customFields - Custom field values (optional)
63
+ * @returns Created test cycle with key, id, and self link
64
+ *
65
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/createTestCycle Official API Documentation}
66
+ */
67
+ async createTestCycle(request) {
68
+ const response = await this.api.fetch('/testcycles', {
69
+ method: 'POST',
70
+ headers: { 'Content-Type': 'application/json' },
71
+ body: buildRequestBody(request.body),
72
+ });
73
+ return parseResponse(response);
74
+ }
75
+ /**
76
+ * Update an existing test cycle
77
+ *
78
+ * Updates an existing test cycle. For each non-specified field the value will be cleared.
79
+ * If the project has test cycle custom fields, all custom fields should be present in the request.
80
+ *
81
+ * @param request - Update test cycle request
82
+ * @param request.testCycleIdOrKey - The test cycle ID or key to update (e.g., 'PROJ-R1')
83
+ * @param request.body - Test cycle data to update (all fields optional, but unspecified fields will be cleared)
84
+ * @param request.body.name - Test cycle name (optional)
85
+ * @param request.body.description - Test cycle description (optional)
86
+ * @param request.body.plannedStartDate - Planned start date in ISO 8601 format (optional)
87
+ * @param request.body.plannedEndDate - Planned end date in ISO 8601 format (optional)
88
+ * @param request.body.jiraProjectVersionId - Jira Project Version ID (optional)
89
+ * @param request.body.folderId - Folder ID (optional)
90
+ * @param request.body.ownerId - Owner account ID (optional)
91
+ * @param request.body.labels - Array of labels (optional)
92
+ * @param request.body.customFields - Custom field values (optional, but all custom fields must be present if any are included)
93
+ * @returns Promise that resolves when update is complete
94
+ *
95
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/updateTestCycle Official API Documentation}
96
+ */
97
+ async updateTestCycle(request) {
98
+ const response = await this.api.fetch(`/testcycles/${request.testCycleIdOrKey}`, {
99
+ method: 'PUT',
100
+ headers: { 'Content-Type': 'application/json' },
101
+ body: buildRequestBody(request.body),
102
+ });
103
+ if (!response.ok) {
104
+ await parseResponse(response);
105
+ }
106
+ }
107
+ /**
108
+ * Get links for a test cycle
109
+ *
110
+ * Retrieves all links associated with a test cycle, including issue links, web links, and test plan links.
111
+ *
112
+ * @param testCycleIdOrKey - The test cycle ID or key (e.g., 'PROJ-R1')
113
+ * @returns List of links including issues, webLinks, and testPlans arrays
114
+ *
115
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/getTestCycleLinks Official API Documentation}
116
+ */
117
+ async getTestCycleLinks(testCycleIdOrKey) {
118
+ const response = await this.api.fetch(`/testcycles/${testCycleIdOrKey}/links`);
119
+ return parseResponse(response);
120
+ }
121
+ /**
122
+ * Create a link between a test cycle and a Jira issue
123
+ *
124
+ * Creates a link between a test cycle and a Jira issue. The link type can be COVERAGE, BLOCKS, or RELATED.
125
+ *
126
+ * @param request - Create issue link request
127
+ * @param request.testCycleIdOrKey - The test cycle ID or key (e.g., 'PROJ-R1')
128
+ * @param request.body - Link data
129
+ * @param request.body.issueId - Jira issue ID (required)
130
+ * @param request.body.type - Link type: 'COVERAGE', 'BLOCKS', or 'RELATED' (optional, defaults to 'COVERAGE')
131
+ * @returns Created link resource with id and self link
132
+ *
133
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/createTestCycleIssueLink Official API Documentation}
134
+ */
135
+ async createTestCycleIssueLink(request) {
136
+ const response = await this.api.fetch(`/testcycles/${request.testCycleIdOrKey}/links/issues`, {
137
+ method: 'POST',
138
+ headers: { 'Content-Type': 'application/json' },
139
+ body: buildRequestBody(request.body),
140
+ });
141
+ return parseResponse(response);
142
+ }
143
+ /**
144
+ * Create a link between a test cycle and a generic URL
145
+ *
146
+ * Creates a web link between a test cycle and an external URL. Useful for linking to documentation, requirements, or other resources.
147
+ *
148
+ * @param request - Create web link request
149
+ * @param request.testCycleIdOrKey - The test cycle ID or key (e.g., 'PROJ-R1')
150
+ * @param request.body - Web link data
151
+ * @param request.body.url - The URL to link to (required)
152
+ * @param request.body.description - Link description (optional)
153
+ * @param request.body.type - Link type: 'COVERAGE', 'BLOCKS', or 'RELATED' (optional, defaults to 'COVERAGE')
154
+ * @returns Created link resource with id and self link
155
+ *
156
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/createTestCycleWebLink Official API Documentation}
157
+ */
158
+ async createTestCycleWebLink(request) {
159
+ const response = await this.api.fetch(`/testcycles/${request.testCycleIdOrKey}/links/weblinks`, {
160
+ method: 'POST',
161
+ headers: { 'Content-Type': 'application/json' },
162
+ body: buildRequestBody(request.body),
163
+ });
164
+ return parseResponse(response);
165
+ }
166
+ }
@@ -0,0 +1,176 @@
1
+ /**
2
+ * Test Execution API group
3
+ * Handles test execution-related operations
4
+ */
5
+ import type { TestExecution, TestExecutionList, CursorPagedTestExecutionList, ListTestExecutionsOptions, ListTestExecutionsNextgenOptions, GetTestExecutionOptions, CreateTestExecutionRequest, UpdateTestExecutionRequest, GetTestExecutionTestStepsOptions, PutTestExecutionTestStepsRequest, SyncTestExecutionScriptRequest, CreateTestExecutionIssueLinkRequest, TestExecutionLinkList, TestExecutionTestStepsList, Link, CreatedResource } from '../types';
6
+ import type { ZephyrApiConnection } from '../index';
7
+ export declare class TestExecutionGroup {
8
+ private api;
9
+ constructor(api: ZephyrApiConnection);
10
+ /**
11
+ * List all test executions
12
+ *
13
+ * Retrieves a paginated list of all test executions. Query parameters can be used to filter by project, test cycle, test case, dates, and more.
14
+ *
15
+ * @param options - Optional query parameters for filtering and pagination
16
+ * @param options.projectKey - Filter test executions by Jira project key
17
+ * @param options.testCycle - Filter by test cycle key
18
+ * @param options.testCase - Filter by test case key
19
+ * @param options.actualEndDateAfter - Filter for 'Actual End Date' after the given time (ISO 8601 format)
20
+ * @param options.actualEndDateBefore - Filter for 'Actual End Date' before the given time (ISO 8601 format)
21
+ * @param options.includeStepLinks - If true, execution step issue links will be included in the response
22
+ * @param options.jiraProjectVersionId - Filter by Jira Project Version ID
23
+ * @param options.maxResults - Maximum number of results to return (default: 10, max: 1000)
24
+ * @param options.startAt - Zero-indexed starting position (must be multiple of maxResults)
25
+ * @returns Paginated list of test executions with metadata (total, isLast, etc.)
26
+ *
27
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/listTestExecutions Official API Documentation}
28
+ */
29
+ listTestExecutions(options?: ListTestExecutionsOptions): Promise<TestExecutionList>;
30
+ /**
31
+ * List all test executions (NextGen - cursor-based pagination)
32
+ *
33
+ * Retrieves test executions using cursor-based pagination. Use this endpoint for retrieving large volumes of test executions
34
+ * as it provides better performance than offset-based pagination.
35
+ *
36
+ * @param options - Optional query parameters for filtering and pagination
37
+ * @param options.projectKey - Filter test executions by Jira project key
38
+ * @param options.testCycle - Filter by test cycle key
39
+ * @param options.testCase - Filter by test case key
40
+ * @param options.actualEndDateAfter - Filter for 'Actual End Date' after the given time (ISO 8601 format)
41
+ * @param options.actualEndDateBefore - Filter for 'Actual End Date' before the given time (ISO 8601 format)
42
+ * @param options.limit - Maximum number of results to return per page (default: 100)
43
+ * @param options.startAtId - Starting ID for cursor-based pagination (use null for first page)
44
+ * @returns Cursor-paginated list of test executions with nextStartAtId for pagination
45
+ *
46
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/listTestExecutionsNextgen Official API Documentation}
47
+ */
48
+ listTestExecutionsNextgen(options?: ListTestExecutionsNextgenOptions): Promise<CursorPagedTestExecutionList>;
49
+ /**
50
+ * Get a specific test execution
51
+ *
52
+ * Retrieves detailed information about a specific test execution by its ID or key.
53
+ *
54
+ * @param options - Get test execution options
55
+ * @param options.testExecutionIdOrKey - The test execution ID or key
56
+ * @param options.includeStepLinks - If true, execution step issue links will be included in the response
57
+ * @returns Test execution object with all fields
58
+ *
59
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/getTestExecution Official API Documentation}
60
+ */
61
+ getTestExecution(options: GetTestExecutionOptions): Promise<TestExecution>;
62
+ /**
63
+ * Create a new test execution
64
+ *
65
+ * Creates a new test execution for a test case within a test cycle. Required fields include projectKey, testCaseKey, testCycleKey, and statusName.
66
+ * Optional fields include environmentName, actualEndDate, executionTime, executedById, assignedToId, comment, and customFields.
67
+ *
68
+ * @param request - Create test execution request
69
+ * @param request.body - Test execution data
70
+ * @param request.body.projectKey - Jira project key (required)
71
+ * @param request.body.testCaseKey - Test case key (required)
72
+ * @param request.body.testCycleKey - Test cycle key (required)
73
+ * @param request.body.statusName - Status name (required)
74
+ * @param request.body.environmentName - Environment name (optional)
75
+ * @param request.body.actualEndDate - Actual end date in ISO 8601 format (optional)
76
+ * @param request.body.executionTime - Actual test execution time in milliseconds (optional)
77
+ * @param request.body.executedById - Account ID of user who executed the test (optional)
78
+ * @param request.body.assignedToId - Account ID of user assigned to the test (optional)
79
+ * @param request.body.comment - Comment added against overall test case execution (optional)
80
+ * @param request.body.customFields - Custom field values (optional)
81
+ * @returns Created test execution with id and self link
82
+ *
83
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/createTestExecution Official API Documentation}
84
+ */
85
+ createTestExecution(request: CreateTestExecutionRequest): Promise<CreatedResource>;
86
+ /**
87
+ * Update a test execution
88
+ *
89
+ * Updates an existing test execution. All fields are optional. Note that test executions may become immutable if there's a more recent execution for the same test case.
90
+ *
91
+ * @param request - Update test execution request
92
+ * @param request.testExecutionIdOrKey - The test execution ID or key to update
93
+ * @param request.body - Test execution data to update (all fields optional)
94
+ * @param request.body.statusName - Status name (optional)
95
+ * @param request.body.environmentName - Environment name (optional)
96
+ * @param request.body.actualEndDate - Actual end date in ISO 8601 format (optional)
97
+ * @param request.body.executionTime - Actual test execution time in milliseconds (optional)
98
+ * @param request.body.executedById - Account ID of user who executed the test (optional)
99
+ * @param request.body.assignedToId - Account ID of user assigned to the test (optional)
100
+ * @param request.body.comment - Comment added against overall test case execution (optional)
101
+ * @returns Promise that resolves when update is complete
102
+ *
103
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/updateTestExecution Official API Documentation}
104
+ */
105
+ updateTestExecution(request: UpdateTestExecutionRequest): Promise<void>;
106
+ /**
107
+ * Get test steps for a test execution
108
+ *
109
+ * Retrieves the test steps associated with a test execution. Provides a paged response.
110
+ *
111
+ * @param options - Get test steps options
112
+ * @param options.testExecutionIdOrKey - The test execution ID or key
113
+ * @param options.maxResults - Maximum number of results to return (default: 50)
114
+ * @param options.startAt - Zero-indexed starting position (must be multiple of maxResults)
115
+ * @param options.testDataRowNumber - Filter by test data row number (optional)
116
+ * @returns Paginated list of test execution steps
117
+ *
118
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/getTestExecutionTestSteps Official API Documentation}
119
+ */
120
+ getTestExecutionTestSteps(options: GetTestExecutionTestStepsOptions): Promise<TestExecutionTestStepsList>;
121
+ /**
122
+ * Update test steps for a test execution
123
+ *
124
+ * Updates the test steps for a test execution. The number of steps sent must match the number of steps in the test execution.
125
+ * Update of test execution containing test data is not supported.
126
+ *
127
+ * @param request - Update test steps request
128
+ * @param request.testExecutionIdOrKey - The test execution ID or key
129
+ * @param request.body - Test steps data
130
+ * @param request.body.items - Array of test step items with id, statusName, and optional comment
131
+ * @returns Promise that resolves when update is complete
132
+ *
133
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/putTestExecutionTestSteps Official API Documentation}
134
+ */
135
+ putTestExecutionTestSteps(request: PutTestExecutionTestStepsRequest): Promise<void>;
136
+ /**
137
+ * Sync test execution with content of test case script
138
+ *
139
+ * Synchronizes the test execution steps with the content of the test case script. This updates the test execution
140
+ * to match any changes made to the test case's test script or test steps.
141
+ *
142
+ * @param request - Sync test execution script request
143
+ * @param request.testExecutionIdOrKey - The test execution ID or key
144
+ * @returns Link object with id and self link
145
+ *
146
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/syncTestExecutionScript Official API Documentation}
147
+ */
148
+ syncTestExecutionScript(request: SyncTestExecutionScriptRequest): Promise<Link>;
149
+ /**
150
+ * Get links for a test execution
151
+ *
152
+ * Retrieves all links associated with a test execution, including issue links.
153
+ *
154
+ * @param testExecutionIdOrKey - The test execution ID or key
155
+ * @returns List of links including issues array
156
+ *
157
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/listTestExecutionLinks Official API Documentation}
158
+ */
159
+ listTestExecutionLinks(testExecutionIdOrKey: string | number): Promise<TestExecutionLinkList>;
160
+ /**
161
+ * Create a link between a test execution and a Jira issue
162
+ *
163
+ * Creates a link between a test execution and a Jira issue. The link type can be COVERAGE, BLOCKS, or RELATED.
164
+ *
165
+ * @param request - Create issue link request
166
+ * @param request.testExecutionIdOrKey - The test execution ID or key
167
+ * @param request.body - Link data
168
+ * @param request.body.issueId - Jira issue ID (required)
169
+ * @param request.body.type - Link type: 'COVERAGE', 'BLOCKS', or 'RELATED' (optional, defaults to 'COVERAGE')
170
+ * @returns Created link resource with id and self link
171
+ *
172
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/createTestExecutionIssueLink Official API Documentation}
173
+ */
174
+ createTestExecutionIssueLink(request: CreateTestExecutionIssueLinkRequest): Promise<CreatedResource>;
175
+ }
176
+ //# sourceMappingURL=TestExecution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TestExecution.d.ts","sourceRoot":"","sources":["../../groups/TestExecution.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,aAAa,EACb,iBAAiB,EACjB,4BAA4B,EAC5B,yBAAyB,EACzB,gCAAgC,EAChC,uBAAuB,EACvB,0BAA0B,EAC1B,0BAA0B,EAC1B,gCAAgC,EAChC,gCAAgC,EAChC,8BAA8B,EAC9B,mCAAmC,EACnC,qBAAqB,EACrB,0BAA0B,EAC1B,IAAI,EACJ,eAAe,EACf,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,qBAAa,kBAAkB;IAClB,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,mBAAmB;IAE5C;;;;;;;;;;;;;;;;;;OAkBG;IACG,kBAAkB,CAAC,OAAO,CAAC,EAAE,yBAAyB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAMzF;;;;;;;;;;;;;;;;;OAiBG;IACG,yBAAyB,CAC9B,OAAO,CAAC,EAAE,gCAAgC,GACxC,OAAO,CAAC,4BAA4B,CAAC;IAMxC;;;;;;;;;;;OAWG;IACG,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,aAAa,CAAC;IAYhF;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACG,mBAAmB,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,eAAe,CAAC;IASxF;;;;;;;;;;;;;;;;;;OAkBG;IACG,mBAAmB,CAAC,OAAO,EAAE,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC;IAW7E;;;;;;;;;;;;;OAaG;IACG,yBAAyB,CAC9B,OAAO,EAAE,gCAAgC,GACvC,OAAO,CAAC,0BAA0B,CAAC;IAYtC;;;;;;;;;;;;;OAaG;IACG,yBAAyB,CAAC,OAAO,EAAE,gCAAgC,GAAG,OAAO,CAAC,IAAI,CAAC;IAczF;;;;;;;;;;;OAWG;IACG,uBAAuB,CAAC,OAAO,EAAE,8BAA8B,GAAG,OAAO,CAAC,IAAI,CAAC;IAUrF;;;;;;;;;OASG;IACG,sBAAsB,CAAC,oBAAoB,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAKnG;;;;;;;;;;;;;OAaG;IACG,4BAA4B,CACjC,OAAO,EAAE,mCAAmC,GAC1C,OAAO,CAAC,eAAe,CAAC;CAW3B"}