@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,125 @@
1
+ /**
2
+ * Error Strategy Types and Utilities
3
+ * Provides flexible error handling for API calls
4
+ */
5
+ /**
6
+ * Create a retry action
7
+ */
8
+ export function retry(delay) {
9
+ return { type: 'retry', delay };
10
+ }
11
+ /**
12
+ * Continue error propagation (default behavior)
13
+ */
14
+ export function continuePropagation() {
15
+ return { type: 'continue' };
16
+ }
17
+ /**
18
+ * Error strategy builder pattern
19
+ */
20
+ export class ErrorStrategyBuilder {
21
+ constructor() {
22
+ this.handlers = {};
23
+ }
24
+ http400Error(handler) {
25
+ this.handlers.handleHttp400Error = handler;
26
+ return this;
27
+ }
28
+ http401Error(handler) {
29
+ this.handlers.handleHttp401Error = handler;
30
+ return this;
31
+ }
32
+ http403Error(handler) {
33
+ this.handlers.handleHttp403Error = handler;
34
+ return this;
35
+ }
36
+ http404Error(handler) {
37
+ this.handlers.handleHttp404Error = handler;
38
+ return this;
39
+ }
40
+ http429Error(handler) {
41
+ this.handlers.handleHttp429Error = handler;
42
+ return this;
43
+ }
44
+ http500Error(handler) {
45
+ this.handlers.handleHttp500Error = handler;
46
+ return this;
47
+ }
48
+ httpError(handler) {
49
+ this.handlers.handleHttpError = handler;
50
+ return this;
51
+ }
52
+ /**
53
+ * Retry on rate limiting with specified max retries
54
+ */
55
+ retryOnRateLimiting(maxRetries) {
56
+ let retryCount = 0;
57
+ this.handlers.handleHttp429Error = (response, count) => {
58
+ retryCount = count;
59
+ if (retryCount < maxRetries) {
60
+ // Use exponential backoff: 1s, 2s, 4s, 8s, etc.
61
+ const delay = Math.min(1000 * Math.pow(2, retryCount), 60000);
62
+ return retry(delay);
63
+ }
64
+ return continuePropagation();
65
+ };
66
+ return this;
67
+ }
68
+ build() {
69
+ return this.handlers;
70
+ }
71
+ }
72
+ /**
73
+ * Apply error strategy to a response
74
+ */
75
+ export async function applyErrorStrategy(response, errorStrategy, retryCount = 0) {
76
+ if (!errorStrategy || response.ok) {
77
+ return continuePropagation();
78
+ }
79
+ let errorData = null;
80
+ try {
81
+ errorData = await response.json();
82
+ }
83
+ catch {
84
+ // If JSON parsing fails, errorData remains null
85
+ }
86
+ // Try specific status code handlers first
87
+ switch (response.status) {
88
+ case 400:
89
+ if (errorStrategy.handleHttp400Error) {
90
+ return await errorStrategy.handleHttp400Error(response, errorData);
91
+ }
92
+ break;
93
+ case 401:
94
+ if (errorStrategy.handleHttp401Error) {
95
+ return await errorStrategy.handleHttp401Error(response, errorData);
96
+ }
97
+ break;
98
+ case 403:
99
+ if (errorStrategy.handleHttp403Error) {
100
+ return await errorStrategy.handleHttp403Error(response, errorData);
101
+ }
102
+ break;
103
+ case 404:
104
+ if (errorStrategy.handleHttp404Error) {
105
+ return await errorStrategy.handleHttp404Error(response, errorData);
106
+ }
107
+ break;
108
+ case 429:
109
+ if (errorStrategy.handleHttp429Error) {
110
+ return await errorStrategy.handleHttp429Error(response, retryCount);
111
+ }
112
+ break;
113
+ default:
114
+ if (response.status >= 500 && errorStrategy.handleHttp500Error) {
115
+ return await errorStrategy.handleHttp500Error(response, errorData);
116
+ }
117
+ break;
118
+ }
119
+ // Try generic HTTP error handler
120
+ if (errorStrategy.handleHttpError) {
121
+ return await errorStrategy.handleHttpError(response, errorData);
122
+ }
123
+ // Default: continue propagation
124
+ return continuePropagation();
125
+ }
@@ -0,0 +1,90 @@
1
+ /**
2
+ * All API Group
3
+ * Provides access to all API methods in a flat structure
4
+ * Useful for programmatic access or when the specific group is unknown
5
+ *
6
+ * Note: Prefer using specific groups (e.g., TestCase, TestCycle) for better organization
7
+ */
8
+ import type { ZephyrApiConnection } from '../index';
9
+ export declare class AllGroup {
10
+ private readonly testCase;
11
+ private readonly testCycle;
12
+ private readonly testExecution;
13
+ private readonly testPlan;
14
+ private readonly folder;
15
+ private readonly project;
16
+ private readonly status;
17
+ private readonly priority;
18
+ private readonly environment;
19
+ private readonly link;
20
+ private readonly issueLink;
21
+ private readonly automation;
22
+ constructor(apiConnection: ZephyrApiConnection);
23
+ get listTestCases(): (options?: import("../types").ListTestCasesOptions) => Promise<import("../types").TestCaseList>;
24
+ get listTestCasesCursorPaginated(): (options?: import("../types").ListTestCasesOptions) => Promise<import("../types").CursorPagedTestCaseList>;
25
+ get getTestCase(): (options: import("../types").GetTestCaseOptions, errorStrategy?: import("../error-strategy").ErrorStrategyHandlers<import("../types").TestCase | null>) => Promise<import("../types").TestCase | null>;
26
+ get createTestCase(): (request: import("../types").CreateTestCaseRequest) => Promise<import("../types").KeyedCreatedResource>;
27
+ get updateTestCase(): (request: import("../types").UpdateTestCaseRequest) => Promise<void>;
28
+ get getTestCaseLinks(): (testCaseKey: string) => Promise<import("../types").TestCaseLinkList>;
29
+ get createTestCaseIssueLink(): (request: import("../types").CreateTestCaseIssueLinkRequest) => Promise<import("../types").CreatedResource>;
30
+ get createTestCaseWebLink(): (request: import("../types").CreateTestCaseWebLinkRequest) => Promise<import("../types").CreatedResource>;
31
+ get listTestCaseVersions(): (options: import("../types").ListTestCaseVersionsOptions) => Promise<import("../types").TestCaseVersionLinkList>;
32
+ get getTestCaseVersion(): (options: import("../types").GetTestCaseVersionOptions) => Promise<import("../types").TestCase>;
33
+ get getTestCaseTestScript(): (testCaseKey: string) => Promise<import("../types").TestScript>;
34
+ get createTestCaseTestScript(): (request: import("../types").CreateTestCaseTestScriptRequest) => Promise<import("../types").CreatedResource>;
35
+ get getTestCaseTestSteps(): (testCaseKey: string, options?: {
36
+ maxResults?: number;
37
+ startAt?: number;
38
+ }) => Promise<import("../types").TestStepsList>;
39
+ get createTestCaseTestSteps(): (request: import("../types").CreateTestCaseTestStepsRequest) => Promise<import("../types").CreatedResource>;
40
+ get listTestCycles(): (options?: import("../types").ListTestCyclesOptions) => Promise<import("../types").TestCycleList>;
41
+ get getTestCycle(): (options: import("../types").GetTestCycleOptions) => Promise<import("../types").TestCycle>;
42
+ get createTestCycle(): (request: import("../types").CreateTestCycleRequest) => Promise<import("../types").KeyedCreatedResource>;
43
+ get updateTestCycle(): (request: import("../types").UpdateTestCycleRequest) => Promise<void>;
44
+ get getTestCycleLinks(): (testCycleIdOrKey: string | number) => Promise<import("../types").TestCycleLinkList>;
45
+ get createTestCycleIssueLink(): (request: import("../types").CreateTestCycleIssueLinkRequest) => Promise<import("../types").CreatedResource>;
46
+ get createTestCycleWebLink(): (request: import("../types").CreateTestCycleWebLinkRequest) => Promise<import("../types").CreatedResource>;
47
+ get listTestExecutions(): (options?: import("../types").ListTestExecutionsOptions) => Promise<import("../types").TestExecutionList>;
48
+ get listTestExecutionsNextgen(): (options?: import("../types").ListTestExecutionsNextgenOptions) => Promise<import("../types").CursorPagedTestExecutionList>;
49
+ get getTestExecution(): (options: import("../types").GetTestExecutionOptions) => Promise<import("../types").TestExecution>;
50
+ get createTestExecution(): (request: import("../types").CreateTestExecutionRequest) => Promise<import("../types").CreatedResource>;
51
+ get updateTestExecution(): (request: import("../types").UpdateTestExecutionRequest) => Promise<void>;
52
+ get listTestExecutionLinks(): (testExecutionIdOrKey: string | number) => Promise<import("../types").TestExecutionLinkList>;
53
+ get createTestExecutionIssueLink(): (request: import("../types").CreateTestExecutionIssueLinkRequest) => Promise<import("../types").CreatedResource>;
54
+ get getTestExecutionTestSteps(): (options: import("../types").GetTestExecutionTestStepsOptions) => Promise<import("../types").TestExecutionTestStepsList>;
55
+ get putTestExecutionTestSteps(): (request: import("../types").PutTestExecutionTestStepsRequest) => Promise<void>;
56
+ get syncTestExecutionScript(): (request: import("../types").SyncTestExecutionScriptRequest) => Promise<import("../types").Link>;
57
+ get listTestPlans(): (options?: import("../types").ListTestPlansOptions) => Promise<import("../types").TestPlanList>;
58
+ get getTestPlan(): (options: import("../types").GetTestPlanOptions) => Promise<import("../types").TestPlan>;
59
+ get createTestPlan(): (request: import("../types").CreateTestPlanRequest) => Promise<import("../types").KeyedCreatedResource>;
60
+ get createTestPlanIssueLink(): (request: import("../types").CreateTestPlanIssueLinkRequest) => Promise<import("../types").CreatedResource>;
61
+ get createTestPlanWebLink(): (request: import("../types").CreateTestPlanWebLinkRequest) => Promise<import("../types").CreatedResource>;
62
+ get createTestPlanTestCycleLink(): (request: import("../types").CreateTestPlanTestCycleLinkRequest) => Promise<import("../types").CreatedResource>;
63
+ get listFolders(): (options: import("../types").ListFoldersOptions) => Promise<import("../types").FolderList>;
64
+ get getFolder(): (options: import("../types").GetFolderOptions) => Promise<import("../types").Folder>;
65
+ get createFolder(): (request: import("../types").CreateFolderRequest) => Promise<import("../types").Folder>;
66
+ get listProjects(): (options?: import("../types").ListProjectsOptions) => Promise<import("../types").ProjectList>;
67
+ get getProject(): (options: import("../types").GetProjectOptions) => Promise<import("../types").Project>;
68
+ get listStatuses(): (options: import("../types").ListStatusesOptions) => Promise<import("../types").StatusList>;
69
+ get getStatus(): (options: import("../types").GetStatusOptions) => Promise<import("../types").Status>;
70
+ get createStatus(): (request: import("../types").CreateStatusRequest) => Promise<import("../types").Status>;
71
+ get updateStatus(): (request: import("../types").UpdateStatusRequest) => Promise<import("../types").Status>;
72
+ get listPriorities(): (options: import("../types").ListPrioritiesOptions) => Promise<import("../types").PriorityList>;
73
+ get getPriority(): (options: import("../types").GetPriorityOptions) => Promise<import("../types").Priority>;
74
+ get createPriority(): (request: import("../types").CreatePriorityRequest) => Promise<import("../types").Priority>;
75
+ get updatePriority(): (request: import("../types").UpdatePriorityRequest) => Promise<import("../types").Priority>;
76
+ get listEnvironments(): (options: import("../types").ListEnvironmentsOptions) => Promise<import("../types").EnvironmentList>;
77
+ get getEnvironment(): (options: import("../types").GetEnvironmentOptions) => Promise<import("../types").Environment>;
78
+ get createEnvironment(): (request: import("../types").CreateEnvironmentRequest) => Promise<import("../types").Environment>;
79
+ get updateEnvironment(): (request: import("../types").UpdateEnvironmentRequest) => Promise<import("../types").Environment>;
80
+ get deleteLink(): (options: import("../types").DeleteLinkOptions) => Promise<void>;
81
+ get getIssueLinkTestCases(): (options: import("../types").GetIssueLinkTestCasesOptions) => Promise<import("../types").TestCaseKeyAndVersionList>;
82
+ get getIssueLinkTestCycles(): (options: import("../types").GetIssueLinkTestCyclesOptions) => Promise<import("../types").TestCycleIdList>;
83
+ get getIssueLinkTestPlans(): (options: import("../types").GetIssueLinkTestPlansOptions) => Promise<import("../types").TestPlanIdList>;
84
+ get getIssueLinkExecutions(): (options: import("../types").GetIssueLinkExecutionsOptions) => Promise<import("../types").TestExecutionIdList>;
85
+ get createCustomExecutions(): (request: import("../types").CreateAutomationExecutionCustomRequest) => Promise<import("../types").AutomationResult>;
86
+ get createCucumberExecutions(): (request: import("../types").CreateAutomationExecutionCucumberRequest) => Promise<import("../types").AutomationResult>;
87
+ get createJUnitExecutions(): (request: import("../types").CreateAutomationExecutionJunitRequest) => Promise<import("../types").AutomationResult>;
88
+ get retrieveBDDTestCases(): (options: import("../types").RetrieveBDDTestCasesOptions) => Promise<Blob>;
89
+ }
90
+ //# sourceMappingURL=All.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"All.d.ts","sourceRoot":"","sources":["../../groups/All.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,236 @@
1
+ /**
2
+ * All API Group
3
+ * Provides access to all API methods in a flat structure
4
+ * Useful for programmatic access or when the specific group is unknown
5
+ *
6
+ * Note: Prefer using specific groups (e.g., TestCase, TestCycle) for better organization
7
+ */
8
+ import { TestCaseGroup } from './TestCase';
9
+ import { TestCycleGroup } from './TestCycle';
10
+ import { TestExecutionGroup } from './TestExecution';
11
+ import { TestPlanGroup } from './TestPlan';
12
+ import { FolderGroup } from './Folder';
13
+ import { ProjectGroup } from './Project';
14
+ import { StatusGroup } from './Status';
15
+ import { PriorityGroup } from './Priority';
16
+ import { EnvironmentGroup } from './Environment';
17
+ import { LinkGroup } from './Link';
18
+ import { IssueLinkGroup } from './IssueLink';
19
+ import { AutomationGroup } from './Automation';
20
+ export class AllGroup {
21
+ constructor(apiConnection) {
22
+ this.testCase = new TestCaseGroup(apiConnection);
23
+ this.testCycle = new TestCycleGroup(apiConnection);
24
+ this.testExecution = new TestExecutionGroup(apiConnection);
25
+ this.testPlan = new TestPlanGroup(apiConnection);
26
+ this.folder = new FolderGroup(apiConnection);
27
+ this.project = new ProjectGroup(apiConnection);
28
+ this.status = new StatusGroup(apiConnection);
29
+ this.priority = new PriorityGroup(apiConnection);
30
+ this.environment = new EnvironmentGroup(apiConnection);
31
+ this.link = new LinkGroup(apiConnection);
32
+ this.issueLink = new IssueLinkGroup(apiConnection);
33
+ this.automation = new AutomationGroup(apiConnection);
34
+ }
35
+ // TestCase methods
36
+ get listTestCases() {
37
+ return this.testCase.listTestCases.bind(this.testCase);
38
+ }
39
+ get listTestCasesCursorPaginated() {
40
+ return this.testCase.listTestCasesCursorPaginated.bind(this.testCase);
41
+ }
42
+ get getTestCase() {
43
+ return this.testCase.getTestCase.bind(this.testCase);
44
+ }
45
+ get createTestCase() {
46
+ return this.testCase.createTestCase.bind(this.testCase);
47
+ }
48
+ get updateTestCase() {
49
+ return this.testCase.updateTestCase.bind(this.testCase);
50
+ }
51
+ get getTestCaseLinks() {
52
+ return this.testCase.getTestCaseLinks.bind(this.testCase);
53
+ }
54
+ get createTestCaseIssueLink() {
55
+ return this.testCase.createTestCaseIssueLink.bind(this.testCase);
56
+ }
57
+ get createTestCaseWebLink() {
58
+ return this.testCase.createTestCaseWebLink.bind(this.testCase);
59
+ }
60
+ get listTestCaseVersions() {
61
+ return this.testCase.listTestCaseVersions.bind(this.testCase);
62
+ }
63
+ get getTestCaseVersion() {
64
+ return this.testCase.getTestCaseVersion.bind(this.testCase);
65
+ }
66
+ get getTestCaseTestScript() {
67
+ return this.testCase.getTestCaseTestScript.bind(this.testCase);
68
+ }
69
+ get createTestCaseTestScript() {
70
+ return this.testCase.createTestCaseTestScript.bind(this.testCase);
71
+ }
72
+ get getTestCaseTestSteps() {
73
+ return this.testCase.getTestCaseTestSteps.bind(this.testCase);
74
+ }
75
+ get createTestCaseTestSteps() {
76
+ return this.testCase.createTestCaseTestSteps.bind(this.testCase);
77
+ }
78
+ // TestCycle methods
79
+ get listTestCycles() {
80
+ return this.testCycle.listTestCycles.bind(this.testCycle);
81
+ }
82
+ get getTestCycle() {
83
+ return this.testCycle.getTestCycle.bind(this.testCycle);
84
+ }
85
+ get createTestCycle() {
86
+ return this.testCycle.createTestCycle.bind(this.testCycle);
87
+ }
88
+ get updateTestCycle() {
89
+ return this.testCycle.updateTestCycle.bind(this.testCycle);
90
+ }
91
+ get getTestCycleLinks() {
92
+ return this.testCycle.getTestCycleLinks.bind(this.testCycle);
93
+ }
94
+ get createTestCycleIssueLink() {
95
+ return this.testCycle.createTestCycleIssueLink.bind(this.testCycle);
96
+ }
97
+ get createTestCycleWebLink() {
98
+ return this.testCycle.createTestCycleWebLink.bind(this.testCycle);
99
+ }
100
+ // TestExecution methods
101
+ get listTestExecutions() {
102
+ return this.testExecution.listTestExecutions.bind(this.testExecution);
103
+ }
104
+ get listTestExecutionsNextgen() {
105
+ return this.testExecution.listTestExecutionsNextgen.bind(this.testExecution);
106
+ }
107
+ get getTestExecution() {
108
+ return this.testExecution.getTestExecution.bind(this.testExecution);
109
+ }
110
+ get createTestExecution() {
111
+ return this.testExecution.createTestExecution.bind(this.testExecution);
112
+ }
113
+ get updateTestExecution() {
114
+ return this.testExecution.updateTestExecution.bind(this.testExecution);
115
+ }
116
+ get listTestExecutionLinks() {
117
+ return this.testExecution.listTestExecutionLinks.bind(this.testExecution);
118
+ }
119
+ get createTestExecutionIssueLink() {
120
+ return this.testExecution.createTestExecutionIssueLink.bind(this.testExecution);
121
+ }
122
+ get getTestExecutionTestSteps() {
123
+ return this.testExecution.getTestExecutionTestSteps.bind(this.testExecution);
124
+ }
125
+ get putTestExecutionTestSteps() {
126
+ return this.testExecution.putTestExecutionTestSteps.bind(this.testExecution);
127
+ }
128
+ get syncTestExecutionScript() {
129
+ return this.testExecution.syncTestExecutionScript.bind(this.testExecution);
130
+ }
131
+ // TestPlan methods
132
+ get listTestPlans() {
133
+ return this.testPlan.listTestPlans.bind(this.testPlan);
134
+ }
135
+ get getTestPlan() {
136
+ return this.testPlan.getTestPlan.bind(this.testPlan);
137
+ }
138
+ get createTestPlan() {
139
+ return this.testPlan.createTestPlan.bind(this.testPlan);
140
+ }
141
+ get createTestPlanIssueLink() {
142
+ return this.testPlan.createTestPlanIssueLink.bind(this.testPlan);
143
+ }
144
+ get createTestPlanWebLink() {
145
+ return this.testPlan.createTestPlanWebLink.bind(this.testPlan);
146
+ }
147
+ get createTestPlanTestCycleLink() {
148
+ return this.testPlan.createTestPlanTestCycleLink.bind(this.testPlan);
149
+ }
150
+ // Folder methods
151
+ get listFolders() {
152
+ return this.folder.listFolders.bind(this.folder);
153
+ }
154
+ get getFolder() {
155
+ return this.folder.getFolder.bind(this.folder);
156
+ }
157
+ get createFolder() {
158
+ return this.folder.createFolder.bind(this.folder);
159
+ }
160
+ // Project methods
161
+ get listProjects() {
162
+ return this.project.listProjects.bind(this.project);
163
+ }
164
+ get getProject() {
165
+ return this.project.getProject.bind(this.project);
166
+ }
167
+ // Status methods
168
+ get listStatuses() {
169
+ return this.status.listStatuses.bind(this.status);
170
+ }
171
+ get getStatus() {
172
+ return this.status.getStatus.bind(this.status);
173
+ }
174
+ get createStatus() {
175
+ return this.status.createStatus.bind(this.status);
176
+ }
177
+ get updateStatus() {
178
+ return this.status.updateStatus.bind(this.status);
179
+ }
180
+ // Priority methods
181
+ get listPriorities() {
182
+ return this.priority.listPriorities.bind(this.priority);
183
+ }
184
+ get getPriority() {
185
+ return this.priority.getPriority.bind(this.priority);
186
+ }
187
+ get createPriority() {
188
+ return this.priority.createPriority.bind(this.priority);
189
+ }
190
+ get updatePriority() {
191
+ return this.priority.updatePriority.bind(this.priority);
192
+ }
193
+ // Environment methods
194
+ get listEnvironments() {
195
+ return this.environment.listEnvironments.bind(this.environment);
196
+ }
197
+ get getEnvironment() {
198
+ return this.environment.getEnvironment.bind(this.environment);
199
+ }
200
+ get createEnvironment() {
201
+ return this.environment.createEnvironment.bind(this.environment);
202
+ }
203
+ get updateEnvironment() {
204
+ return this.environment.updateEnvironment.bind(this.environment);
205
+ }
206
+ // Link methods
207
+ get deleteLink() {
208
+ return this.link.deleteLink.bind(this.link);
209
+ }
210
+ // IssueLink methods
211
+ get getIssueLinkTestCases() {
212
+ return this.issueLink.getIssueLinkTestCases.bind(this.issueLink);
213
+ }
214
+ get getIssueLinkTestCycles() {
215
+ return this.issueLink.getIssueLinkTestCycles.bind(this.issueLink);
216
+ }
217
+ get getIssueLinkTestPlans() {
218
+ return this.issueLink.getIssueLinkTestPlans.bind(this.issueLink);
219
+ }
220
+ get getIssueLinkExecutions() {
221
+ return this.issueLink.getIssueLinkExecutions.bind(this.issueLink);
222
+ }
223
+ // Automation methods
224
+ get createCustomExecutions() {
225
+ return this.automation.createCustomExecutions.bind(this.automation);
226
+ }
227
+ get createCucumberExecutions() {
228
+ return this.automation.createCucumberExecutions.bind(this.automation);
229
+ }
230
+ get createJUnitExecutions() {
231
+ return this.automation.createJUnitExecutions.bind(this.automation);
232
+ }
233
+ get retrieveBDDTestCases() {
234
+ return this.automation.retrieveBDDTestCases.bind(this.automation);
235
+ }
236
+ }
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Automation API group
3
+ * Handles automation-related operations
4
+ */
5
+ import type { CreateAutomationExecutionCustomRequest, CreateAutomationExecutionCucumberRequest, CreateAutomationExecutionJunitRequest, RetrieveBDDTestCasesOptions, AutomationResult } from '../types';
6
+ import type { ZephyrApiConnection } from '../index';
7
+ export declare class AutomationGroup {
8
+ private api;
9
+ constructor(api: ZephyrApiConnection);
10
+ /**
11
+ * Create results using Zephyr's custom results format
12
+ *
13
+ * Creates test execution results using Zephyr's custom results format. The zip file containing custom execution results.
14
+ * The max file size is 10MB. Optionally, you can send a `testCycle` part in your form data to customize the created test cycle.
15
+ *
16
+ * @param request - Create custom executions request
17
+ * @param request.projectKey - Jira project key (required)
18
+ * @param request.autoCreateTestCases - Indicate if test cases should be created if non-existent (optional, default: false)
19
+ * @param request.body - FormData containing the zip file and optional testCycle JSON
20
+ * @param request.body.file - The zip file containing custom execution results (required, max 10MB)
21
+ * @param request.body.testCycle - Test cycle customization data as JSON (optional)
22
+ * @returns Automation result with created test cycle information
23
+ *
24
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/createCustomExecutions Official API Documentation}
25
+ */
26
+ createCustomExecutions(request: CreateAutomationExecutionCustomRequest): Promise<AutomationResult>;
27
+ /**
28
+ * Create results using the Cucumber results format
29
+ *
30
+ * Creates test execution results using the Cucumber results format. The zip file containing Cucumber execution results
31
+ * as one or more files. The max file size is 2MB. Optionally, you can send a `testCycle` part in your form data to customize the created test cycle.
32
+ *
33
+ * @param request - Create Cucumber executions request
34
+ * @param request.projectKey - Jira project key (required)
35
+ * @param request.autoCreateTestCases - Indicate if test cases should be created if non-existent (optional, default: false)
36
+ * @param request.body - FormData containing the zip file and optional testCycle JSON
37
+ * @param request.body.file - The zip file containing Cucumber execution results (required, max 2MB)
38
+ * @param request.body.testCycle - Test cycle customization data as JSON (optional)
39
+ * @returns Automation result with created test cycle information
40
+ *
41
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/createCucumberExecutions Official API Documentation}
42
+ */
43
+ createCucumberExecutions(request: CreateAutomationExecutionCucumberRequest): Promise<AutomationResult>;
44
+ /**
45
+ * Create results using the JUnit XML results format
46
+ *
47
+ * Creates test execution results using the JUnit XML results format. The zip or single file containing JUnit execution results.
48
+ * The max file size is 10MB. Optionally, you can send a `testCycle` part in your form data to customize the created test cycle.
49
+ *
50
+ * @param request - Create JUnit executions request
51
+ * @param request.projectKey - Jira project key (required)
52
+ * @param request.autoCreateTestCases - Indicate if test cases should be created if non-existent (optional, default: false)
53
+ * @param request.body - FormData containing the zip/file and optional testCycle JSON
54
+ * @param request.body.file - The zip or single file containing JUnit execution results (required, max 10MB)
55
+ * @param request.body.testCycle - Test cycle customization data as JSON (optional)
56
+ * @returns Automation result with created test cycle information
57
+ *
58
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/createJUnitExecutions Official API Documentation}
59
+ */
60
+ createJUnitExecutions(request: CreateAutomationExecutionJunitRequest): Promise<AutomationResult>;
61
+ /**
62
+ * Retrieve a zip file containing Cucumber Feature Files
63
+ *
64
+ * Retrieves a zip file containing Cucumber Feature Files that matches the query passed as parameter.
65
+ * Returns application/zip content type.
66
+ *
67
+ * @param options - Retrieve BDD test cases options
68
+ * @param options.projectKey - Filter by Jira project key (optional)
69
+ * @returns Blob containing the zip file with Cucumber Feature Files
70
+ *
71
+ * @see {@link https://support.smartbear.com/zephyr-scale-cloud/api-docs/v2/#operation/retrieveBDDTestCases Official API Documentation}
72
+ */
73
+ retrieveBDDTestCases(options: RetrieveBDDTestCasesOptions): Promise<Blob>;
74
+ }
75
+ //# sourceMappingURL=Automation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Automation.d.ts","sourceRoot":"","sources":["../../groups/Automation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,sCAAsC,EACtC,wCAAwC,EACxC,qCAAqC,EACrC,2BAA2B,EAC3B,gBAAgB,EAChB,MAAM,UAAU,CAAC;AAElB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAEpD,qBAAa,eAAe;IACf,OAAO,CAAC,GAAG;gBAAH,GAAG,EAAE,mBAAmB;IAE5C;;;;;;;;;;;;;;;OAeG;IACG,sBAAsB,CAC3B,OAAO,EAAE,sCAAsC,GAC7C,OAAO,CAAC,gBAAgB,CAAC;IAgB5B;;;;;;;;;;;;;;;OAeG;IACG,wBAAwB,CAC7B,OAAO,EAAE,wCAAwC,GAC/C,OAAO,CAAC,gBAAgB,CAAC;IAgB5B;;;;;;;;;;;;;;;OAeG;IACG,qBAAqB,CAC1B,OAAO,EAAE,qCAAqC,GAC5C,OAAO,CAAC,gBAAgB,CAAC;IAgB5B;;;;;;;;;;;OAWG;IACG,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,GAAG,OAAO,CAAC,IAAI,CAAC;CAkB/E"}