@rbaileysr/zephyr-managed-api 1.3.2 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +104 -40
- package/dist/README.md +104 -40
- package/dist/groups/All.d.ts.map +1 -1
- package/dist/groups/Private/PrivateAttachments.d.ts +2 -0
- package/dist/groups/Private/PrivateAttachments.d.ts.map +1 -1
- package/dist/groups/Private/PrivateAttachments.js +13 -4
- package/dist/groups/Private/PrivateComments.d.ts +1 -0
- package/dist/groups/Private/PrivateComments.d.ts.map +1 -1
- package/dist/groups/Private/PrivateComments.js +11 -4
- package/dist/groups/Private/PrivateConfig.d.ts +47 -0
- package/dist/groups/Private/PrivateConfig.d.ts.map +1 -1
- package/dist/groups/Private/PrivateConfig.js +100 -0
- package/dist/groups/Private/PrivateVersionControl.d.ts +169 -0
- package/dist/groups/Private/PrivateVersionControl.d.ts.map +1 -0
- package/dist/groups/Private/PrivateVersionControl.js +709 -0
- package/dist/groups/Private.d.ts +5 -0
- package/dist/groups/Private.d.ts.map +1 -1
- package/dist/groups/Private.js +2 -0
- package/dist/groups/TestCase.d.ts +1 -1
- package/dist/groups/TestCase.js +1 -1
- package/dist/package.json +1 -1
- package/dist/types.d.ts +129 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,8 +22,8 @@ import { createZephyrApi } from '@rbaileysr/zephyr-managed-api';
|
|
|
22
22
|
|
|
23
23
|
// Base URL is configured in the Generic Connector
|
|
24
24
|
const api = createZephyrApi(ZephyrApiConnection);
|
|
25
|
-
```
|
|
26
|
-
|
|
25
|
+
```
|
|
26
|
+
|
|
27
27
|
**Using OAuth Token:**
|
|
28
28
|
```typescript
|
|
29
29
|
import { createZephyrApi } from '@rbaileysr/zephyr-managed-api';
|
|
@@ -133,47 +133,28 @@ const apiEU = createZephyrApi(
|
|
|
133
133
|
- Authentication
|
|
134
134
|
- **getContextJwt** - Get Jira Context JWT token (required for all private API calls)
|
|
135
135
|
- Comments
|
|
136
|
-
- **
|
|
137
|
-
- **
|
|
138
|
-
- **
|
|
139
|
-
- **createTestCaseComment** - Create a comment on a test case
|
|
140
|
-
- **createTestCycleComment** - Create a comment on a test cycle
|
|
141
|
-
- **createTestPlanComment** - Create a comment on a test plan
|
|
136
|
+
- **Test Case**: `getTestCaseComments`, `createTestCaseComment`
|
|
137
|
+
- **Test Cycle**: `getTestCycleComments`, `createTestCycleComment`
|
|
138
|
+
- **Test Plan**: `getTestPlanComments`, `createTestPlanComment`
|
|
142
139
|
- Config
|
|
143
|
-
- **CustomFields
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
- **
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
- **Iterations**
|
|
150
|
-
- **getIterations** - Get all iterations for a project
|
|
151
|
-
- **createIteration** - Create a new iteration
|
|
152
|
-
- **DataSets**
|
|
153
|
-
- **getDataSets** - Get all data sets for a project
|
|
154
|
-
- **createDataSet** - Create a new data set
|
|
155
|
-
- **updateDataSet** - Update a data set (add items/options)
|
|
140
|
+
- **CustomFields**: `createCustomField`, `getCustomFields`
|
|
141
|
+
- **Labels**: `getLabels`, `createLabel`
|
|
142
|
+
- **Iterations**: `getIterations`, `createIteration`
|
|
143
|
+
- **DataSets**: `getDataSets`, `createDataSet`, `updateDataSet`
|
|
144
|
+
- **archiveConfig** - Archive an Environment or Iteration
|
|
145
|
+
- **unarchiveConfig** - Unarchive an Environment or Iteration
|
|
156
146
|
- Versions
|
|
157
147
|
- **createTestCaseVersion** - Create a new test case version
|
|
158
148
|
- Attachments
|
|
159
|
-
- **
|
|
160
|
-
- **
|
|
161
|
-
- **
|
|
162
|
-
- **
|
|
163
|
-
- **
|
|
164
|
-
- **
|
|
165
|
-
|
|
166
|
-
- **
|
|
167
|
-
- **
|
|
168
|
-
- **getTestPlanAttachments** - Get all attachments for a test plan
|
|
169
|
-
- **downloadTestPlanAttachment** - Download an attachment from a test plan
|
|
170
|
-
- **createTestPlanAttachment** - Upload an attachment to a test plan
|
|
171
|
-
- **getTestExecutionAttachments** - Get all attachments for a test execution
|
|
172
|
-
- **downloadTestExecutionAttachment** - Download an attachment from a test execution
|
|
173
|
-
- **createTestExecutionAttachment** - Upload an attachment to a test execution
|
|
174
|
-
- **getTestExecutionStepAttachments** - Get all attachments for a test execution step
|
|
175
|
-
- **downloadTestExecutionStepAttachment** - Download an attachment from a test execution step
|
|
176
|
-
- **createTestExecutionStepAttachment** - Upload an attachment to a test execution step
|
|
149
|
+
- **Test Case**: `getTestCaseAttachments`, `downloadAttachment`, `createTestCaseAttachment`
|
|
150
|
+
- **Test Step**: `getTestStepAttachments`, `downloadTestStepAttachment`, `createTestStepAttachment`
|
|
151
|
+
- **Test Cycle**: `getTestCycleAttachments`, `downloadTestCycleAttachment`, `createTestCycleAttachment`
|
|
152
|
+
- **Test Plan**: `getTestPlanAttachments`, `downloadTestPlanAttachment`, `createTestPlanAttachment`
|
|
153
|
+
- **Test Execution**: `getTestExecutionAttachments`, `downloadTestExecutionAttachment`, `createTestExecutionAttachment`
|
|
154
|
+
- **Test Execution Step**: `getTestExecutionStepAttachments`, `downloadTestExecutionStepAttachment`, `createTestExecutionStepAttachment`
|
|
155
|
+
- VersionControl
|
|
156
|
+
- **Test Case (version-specific)**: `getTestCaseIssueLinks`, `getTestCaseWebLinks`, `getTestCaseTestScript`, `getTestCaseTestSteps`
|
|
157
|
+
- **Test Execution Step**: `getTestExecutionStepIssueLinks`, `createTestExecutionStepIssueLink`
|
|
177
158
|
|
|
178
159
|
## Private API Authentication
|
|
179
160
|
|
|
@@ -277,6 +258,24 @@ const dataSets = await api.Private.Config.DataSets.getDataSets(credentials, {
|
|
|
277
258
|
});
|
|
278
259
|
```
|
|
279
260
|
|
|
261
|
+
### Example: Archive and Unarchive Config Items
|
|
262
|
+
|
|
263
|
+
```typescript
|
|
264
|
+
// Archive an environment
|
|
265
|
+
const archivedEnv = await api.Private.Config.archiveConfig(credentials, {
|
|
266
|
+
type: 'Environment',
|
|
267
|
+
id: 10873400,
|
|
268
|
+
projectId: 10233
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
// Unarchive an iteration
|
|
272
|
+
const unarchivedIteration = await api.Private.Config.unarchiveConfig(credentials, {
|
|
273
|
+
type: 'Iteration',
|
|
274
|
+
id: 10909775,
|
|
275
|
+
projectId: 10233
|
|
276
|
+
});
|
|
277
|
+
```
|
|
278
|
+
|
|
280
279
|
### Example: Create Test Case Version
|
|
281
280
|
|
|
282
281
|
```typescript
|
|
@@ -296,7 +295,7 @@ const newVersion = await api.Private.Versions.createTestCaseVersion(
|
|
|
296
295
|
// Upload an attachment to a test case
|
|
297
296
|
const file = new Blob(['file content'], { type: 'text/plain' });
|
|
298
297
|
|
|
299
|
-
const attachment = await api.Private.Attachments.
|
|
298
|
+
const attachment = await api.Private.Attachments.createTestCaseAttachment(
|
|
300
299
|
credentials,
|
|
301
300
|
{
|
|
302
301
|
testCaseKey: 'PROJ-T1',
|
|
@@ -308,6 +307,56 @@ const attachment = await api.Private.Attachments.createAttachment(
|
|
|
308
307
|
);
|
|
309
308
|
```
|
|
310
309
|
|
|
310
|
+
### Example: Get Version-Specific Data
|
|
311
|
+
|
|
312
|
+
```typescript
|
|
313
|
+
// Get issue links for current version
|
|
314
|
+
const issueLinks = await api.Private.VersionControl.getTestCaseIssueLinks(credentials, {
|
|
315
|
+
testCaseKey: 'PROJ-T1',
|
|
316
|
+
projectId: 10233
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
// Get web links for version 2 (previous version)
|
|
320
|
+
const webLinks = await api.Private.VersionControl.getTestCaseWebLinks(credentials, {
|
|
321
|
+
testCaseKey: 'PROJ-T1',
|
|
322
|
+
projectId: 10233,
|
|
323
|
+
version: 2
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
// Get test script for version 3
|
|
327
|
+
const testScript = await api.Private.VersionControl.getTestCaseTestScript(credentials, {
|
|
328
|
+
testCaseKey: 'PROJ-T1',
|
|
329
|
+
projectId: 10233,
|
|
330
|
+
version: 3
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
// Get test steps for version 4 (current version, if there are 4 versions total)
|
|
334
|
+
const testSteps = await api.Private.VersionControl.getTestCaseTestSteps(credentials, {
|
|
335
|
+
testCaseKey: 'PROJ-T1',
|
|
336
|
+
projectId: 10233,
|
|
337
|
+
version: 4
|
|
338
|
+
});
|
|
339
|
+
|
|
340
|
+
// Get issue links for a test execution step (useful for migration)
|
|
341
|
+
const stepIssueLinks = await api.Private.VersionControl.getTestExecutionStepIssueLinks(credentials, {
|
|
342
|
+
testExecutionKey: 'PROJ-E1',
|
|
343
|
+
stepIndex: 0,
|
|
344
|
+
projectId: 10233
|
|
345
|
+
});
|
|
346
|
+
// Returns: [{ id: 169099471, issueId: '66019', type: 'BLOCKS' }, ...]
|
|
347
|
+
|
|
348
|
+
// Create an issue link for a test execution step
|
|
349
|
+
const stepLink = await api.Private.VersionControl.createTestExecutionStepIssueLink(credentials, {
|
|
350
|
+
testExecutionKey: 'PROJ-E1',
|
|
351
|
+
stepIndex: 0,
|
|
352
|
+
issueId: 66019,
|
|
353
|
+
type: 'RELATED',
|
|
354
|
+
projectId: 10233
|
|
355
|
+
});
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
**Note:** Version numbers are absolute (1-based: 1 = first version ever created, 2 = second version, etc. The highest number is the current/latest version). Use `listTestCaseVersions()` to find the total number of versions and identify the latest. If `version` is not provided, the latest version is used.
|
|
359
|
+
|
|
311
360
|
**Important Notes:**
|
|
312
361
|
- Private API methods require a `PrivateApiCredentials` object with `userEmail`, `apiToken`, and `jiraInstanceUrl`
|
|
313
362
|
- The Context JWT token expires after 15 minutes and must be retrieved for each private API call
|
|
@@ -320,6 +369,21 @@ Feel free to drop ideas, suggestions or improvements into our [Community hub](ht
|
|
|
320
369
|
|
|
321
370
|
## Changelog
|
|
322
371
|
|
|
372
|
+
### 1.3.4
|
|
373
|
+
|
|
374
|
+
- **Added**: `getTestExecutionStepIssueLinks()` - Get issue links for a test execution step (for migration purposes)
|
|
375
|
+
- **Added**: `createTestExecutionStepIssueLink()` - Create an issue link for a test execution step
|
|
376
|
+
|
|
377
|
+
### 1.3.3
|
|
378
|
+
|
|
379
|
+
- **Added**: New VersionControl sub-group under Private API for version-specific operations
|
|
380
|
+
- **Added**: `getTestCaseIssueLinks()` - Get issue links for a test case with version support
|
|
381
|
+
- **Added**: `getTestCaseWebLinks()` - Get web links for a test case with version support
|
|
382
|
+
- **Added**: `getTestCaseTestScript()` - Get test script for a test case with version support
|
|
383
|
+
- **Added**: `getTestCaseTestSteps()` - Get test steps for a test case with version support
|
|
384
|
+
- **Added**: Version parameter support to `getTestCaseComments()`, `getTestCaseAttachments()`, and `downloadAttachment()` methods
|
|
385
|
+
- **Changed**: Private API now organized as: Authentication, Comments, Config, Versions, Attachments, VersionControl
|
|
386
|
+
|
|
323
387
|
### 1.3.2
|
|
324
388
|
|
|
325
389
|
- **Changed**: `updateDataSet` now takes `id` in the request object instead of as a separate parameter
|
package/dist/README.md
CHANGED
|
@@ -22,8 +22,8 @@ import { createZephyrApi } from '@rbaileysr/zephyr-managed-api';
|
|
|
22
22
|
|
|
23
23
|
// Base URL is configured in the Generic Connector
|
|
24
24
|
const api = createZephyrApi(ZephyrApiConnection);
|
|
25
|
-
```
|
|
26
|
-
|
|
25
|
+
```
|
|
26
|
+
|
|
27
27
|
**Using OAuth Token:**
|
|
28
28
|
```typescript
|
|
29
29
|
import { createZephyrApi } from '@rbaileysr/zephyr-managed-api';
|
|
@@ -133,47 +133,28 @@ const apiEU = createZephyrApi(
|
|
|
133
133
|
- Authentication
|
|
134
134
|
- **getContextJwt** - Get Jira Context JWT token (required for all private API calls)
|
|
135
135
|
- Comments
|
|
136
|
-
- **
|
|
137
|
-
- **
|
|
138
|
-
- **
|
|
139
|
-
- **createTestCaseComment** - Create a comment on a test case
|
|
140
|
-
- **createTestCycleComment** - Create a comment on a test cycle
|
|
141
|
-
- **createTestPlanComment** - Create a comment on a test plan
|
|
136
|
+
- **Test Case**: `getTestCaseComments`, `createTestCaseComment`
|
|
137
|
+
- **Test Cycle**: `getTestCycleComments`, `createTestCycleComment`
|
|
138
|
+
- **Test Plan**: `getTestPlanComments`, `createTestPlanComment`
|
|
142
139
|
- Config
|
|
143
|
-
- **CustomFields
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
- **
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
- **Iterations**
|
|
150
|
-
- **getIterations** - Get all iterations for a project
|
|
151
|
-
- **createIteration** - Create a new iteration
|
|
152
|
-
- **DataSets**
|
|
153
|
-
- **getDataSets** - Get all data sets for a project
|
|
154
|
-
- **createDataSet** - Create a new data set
|
|
155
|
-
- **updateDataSet** - Update a data set (add items/options)
|
|
140
|
+
- **CustomFields**: `createCustomField`, `getCustomFields`
|
|
141
|
+
- **Labels**: `getLabels`, `createLabel`
|
|
142
|
+
- **Iterations**: `getIterations`, `createIteration`
|
|
143
|
+
- **DataSets**: `getDataSets`, `createDataSet`, `updateDataSet`
|
|
144
|
+
- **archiveConfig** - Archive an Environment or Iteration
|
|
145
|
+
- **unarchiveConfig** - Unarchive an Environment or Iteration
|
|
156
146
|
- Versions
|
|
157
147
|
- **createTestCaseVersion** - Create a new test case version
|
|
158
148
|
- Attachments
|
|
159
|
-
- **
|
|
160
|
-
- **
|
|
161
|
-
- **
|
|
162
|
-
- **
|
|
163
|
-
- **
|
|
164
|
-
- **
|
|
165
|
-
|
|
166
|
-
- **
|
|
167
|
-
- **
|
|
168
|
-
- **getTestPlanAttachments** - Get all attachments for a test plan
|
|
169
|
-
- **downloadTestPlanAttachment** - Download an attachment from a test plan
|
|
170
|
-
- **createTestPlanAttachment** - Upload an attachment to a test plan
|
|
171
|
-
- **getTestExecutionAttachments** - Get all attachments for a test execution
|
|
172
|
-
- **downloadTestExecutionAttachment** - Download an attachment from a test execution
|
|
173
|
-
- **createTestExecutionAttachment** - Upload an attachment to a test execution
|
|
174
|
-
- **getTestExecutionStepAttachments** - Get all attachments for a test execution step
|
|
175
|
-
- **downloadTestExecutionStepAttachment** - Download an attachment from a test execution step
|
|
176
|
-
- **createTestExecutionStepAttachment** - Upload an attachment to a test execution step
|
|
149
|
+
- **Test Case**: `getTestCaseAttachments`, `downloadAttachment`, `createTestCaseAttachment`
|
|
150
|
+
- **Test Step**: `getTestStepAttachments`, `downloadTestStepAttachment`, `createTestStepAttachment`
|
|
151
|
+
- **Test Cycle**: `getTestCycleAttachments`, `downloadTestCycleAttachment`, `createTestCycleAttachment`
|
|
152
|
+
- **Test Plan**: `getTestPlanAttachments`, `downloadTestPlanAttachment`, `createTestPlanAttachment`
|
|
153
|
+
- **Test Execution**: `getTestExecutionAttachments`, `downloadTestExecutionAttachment`, `createTestExecutionAttachment`
|
|
154
|
+
- **Test Execution Step**: `getTestExecutionStepAttachments`, `downloadTestExecutionStepAttachment`, `createTestExecutionStepAttachment`
|
|
155
|
+
- VersionControl
|
|
156
|
+
- **Test Case (version-specific)**: `getTestCaseIssueLinks`, `getTestCaseWebLinks`, `getTestCaseTestScript`, `getTestCaseTestSteps`
|
|
157
|
+
- **Test Execution Step**: `getTestExecutionStepIssueLinks`, `createTestExecutionStepIssueLink`
|
|
177
158
|
|
|
178
159
|
## Private API Authentication
|
|
179
160
|
|
|
@@ -277,6 +258,24 @@ const dataSets = await api.Private.Config.DataSets.getDataSets(credentials, {
|
|
|
277
258
|
});
|
|
278
259
|
```
|
|
279
260
|
|
|
261
|
+
### Example: Archive and Unarchive Config Items
|
|
262
|
+
|
|
263
|
+
```typescript
|
|
264
|
+
// Archive an environment
|
|
265
|
+
const archivedEnv = await api.Private.Config.archiveConfig(credentials, {
|
|
266
|
+
type: 'Environment',
|
|
267
|
+
id: 10873400,
|
|
268
|
+
projectId: 10233
|
|
269
|
+
});
|
|
270
|
+
|
|
271
|
+
// Unarchive an iteration
|
|
272
|
+
const unarchivedIteration = await api.Private.Config.unarchiveConfig(credentials, {
|
|
273
|
+
type: 'Iteration',
|
|
274
|
+
id: 10909775,
|
|
275
|
+
projectId: 10233
|
|
276
|
+
});
|
|
277
|
+
```
|
|
278
|
+
|
|
280
279
|
### Example: Create Test Case Version
|
|
281
280
|
|
|
282
281
|
```typescript
|
|
@@ -296,7 +295,7 @@ const newVersion = await api.Private.Versions.createTestCaseVersion(
|
|
|
296
295
|
// Upload an attachment to a test case
|
|
297
296
|
const file = new Blob(['file content'], { type: 'text/plain' });
|
|
298
297
|
|
|
299
|
-
const attachment = await api.Private.Attachments.
|
|
298
|
+
const attachment = await api.Private.Attachments.createTestCaseAttachment(
|
|
300
299
|
credentials,
|
|
301
300
|
{
|
|
302
301
|
testCaseKey: 'PROJ-T1',
|
|
@@ -308,6 +307,56 @@ const attachment = await api.Private.Attachments.createAttachment(
|
|
|
308
307
|
);
|
|
309
308
|
```
|
|
310
309
|
|
|
310
|
+
### Example: Get Version-Specific Data
|
|
311
|
+
|
|
312
|
+
```typescript
|
|
313
|
+
// Get issue links for current version
|
|
314
|
+
const issueLinks = await api.Private.VersionControl.getTestCaseIssueLinks(credentials, {
|
|
315
|
+
testCaseKey: 'PROJ-T1',
|
|
316
|
+
projectId: 10233
|
|
317
|
+
});
|
|
318
|
+
|
|
319
|
+
// Get web links for version 2 (previous version)
|
|
320
|
+
const webLinks = await api.Private.VersionControl.getTestCaseWebLinks(credentials, {
|
|
321
|
+
testCaseKey: 'PROJ-T1',
|
|
322
|
+
projectId: 10233,
|
|
323
|
+
version: 2
|
|
324
|
+
});
|
|
325
|
+
|
|
326
|
+
// Get test script for version 3
|
|
327
|
+
const testScript = await api.Private.VersionControl.getTestCaseTestScript(credentials, {
|
|
328
|
+
testCaseKey: 'PROJ-T1',
|
|
329
|
+
projectId: 10233,
|
|
330
|
+
version: 3
|
|
331
|
+
});
|
|
332
|
+
|
|
333
|
+
// Get test steps for version 4 (current version, if there are 4 versions total)
|
|
334
|
+
const testSteps = await api.Private.VersionControl.getTestCaseTestSteps(credentials, {
|
|
335
|
+
testCaseKey: 'PROJ-T1',
|
|
336
|
+
projectId: 10233,
|
|
337
|
+
version: 4
|
|
338
|
+
});
|
|
339
|
+
|
|
340
|
+
// Get issue links for a test execution step (useful for migration)
|
|
341
|
+
const stepIssueLinks = await api.Private.VersionControl.getTestExecutionStepIssueLinks(credentials, {
|
|
342
|
+
testExecutionKey: 'PROJ-E1',
|
|
343
|
+
stepIndex: 0,
|
|
344
|
+
projectId: 10233
|
|
345
|
+
});
|
|
346
|
+
// Returns: [{ id: 169099471, issueId: '66019', type: 'BLOCKS' }, ...]
|
|
347
|
+
|
|
348
|
+
// Create an issue link for a test execution step
|
|
349
|
+
const stepLink = await api.Private.VersionControl.createTestExecutionStepIssueLink(credentials, {
|
|
350
|
+
testExecutionKey: 'PROJ-E1',
|
|
351
|
+
stepIndex: 0,
|
|
352
|
+
issueId: 66019,
|
|
353
|
+
type: 'RELATED',
|
|
354
|
+
projectId: 10233
|
|
355
|
+
});
|
|
356
|
+
```
|
|
357
|
+
|
|
358
|
+
**Note:** Version numbers are absolute (1-based: 1 = first version ever created, 2 = second version, etc. The highest number is the current/latest version). Use `listTestCaseVersions()` to find the total number of versions and identify the latest. If `version` is not provided, the latest version is used.
|
|
359
|
+
|
|
311
360
|
**Important Notes:**
|
|
312
361
|
- Private API methods require a `PrivateApiCredentials` object with `userEmail`, `apiToken`, and `jiraInstanceUrl`
|
|
313
362
|
- The Context JWT token expires after 15 minutes and must be retrieved for each private API call
|
|
@@ -320,6 +369,21 @@ Feel free to drop ideas, suggestions or improvements into our [Community hub](ht
|
|
|
320
369
|
|
|
321
370
|
## Changelog
|
|
322
371
|
|
|
372
|
+
### 1.3.4
|
|
373
|
+
|
|
374
|
+
- **Added**: `getTestExecutionStepIssueLinks()` - Get issue links for a test execution step (for migration purposes)
|
|
375
|
+
- **Added**: `createTestExecutionStepIssueLink()` - Create an issue link for a test execution step
|
|
376
|
+
|
|
377
|
+
### 1.3.3
|
|
378
|
+
|
|
379
|
+
- **Added**: New VersionControl sub-group under Private API for version-specific operations
|
|
380
|
+
- **Added**: `getTestCaseIssueLinks()` - Get issue links for a test case with version support
|
|
381
|
+
- **Added**: `getTestCaseWebLinks()` - Get web links for a test case with version support
|
|
382
|
+
- **Added**: `getTestCaseTestScript()` - Get test script for a test case with version support
|
|
383
|
+
- **Added**: `getTestCaseTestSteps()` - Get test steps for a test case with version support
|
|
384
|
+
- **Added**: Version parameter support to `getTestCaseComments()`, `getTestCaseAttachments()`, and `downloadAttachment()` methods
|
|
385
|
+
- **Changed**: Private API now organized as: Authentication, Comments, Config, Versions, Attachments, VersionControl
|
|
386
|
+
|
|
323
387
|
### 1.3.2
|
|
324
388
|
|
|
325
389
|
- **Changed**: `updateDataSet` now takes `id` in the request object instead of as a separate parameter
|
package/dist/groups/All.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"All.d.ts","sourceRoot":"","sources":["../../groups/All.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAcpD,qBAAa,QAAQ;IACpB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAgB;IACzC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiB;IAC3C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAqB;IACnD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAgB;IACzC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;IACrC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAe;IACvC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAc;IACrC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAgB;IACzC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAmB;IAC/C,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAY;IACjC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiB;IAC3C,OAAO,CAAC,QAAQ,CAAC,UA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cAAc,gGAEjB;IAGD,IAAI,gBAAgB,yGAEnB;IAED,IAAI,cAAc,mGAEjB;IAED,IAAI,iBAAiB,sGAEpB;IAED,IAAI,iBAAiB,sGAEpB;IAGD,IAAI,UAAU,qEAEb;IAGD,IAAI,qBAAqB,wHAExB;IAED,IAAI,sBAAsB,+GAEzB;IAED,IAAI,qBAAqB,6GAExB;IAED,IAAI,sBAAsB,mHAEzB;IAGD,IAAI,sBAAsB,yHAEzB;IAED,IAAI,wBAAwB,2HAE3B;IAED,IAAI,qBAAqB,wHAExB;IAED,IAAI,oBAAoB,+EAEvB;CACD"}
|
|
@@ -25,6 +25,7 @@ export declare class PrivateAttachments extends PrivateBase {
|
|
|
25
25
|
* @param request - Get attachments request
|
|
26
26
|
* @param request.testCaseKey - Test case key (e.g., 'PROJ-T1'). The numeric ID will be looked up automatically if Zephyr Connector is available.
|
|
27
27
|
* @param request.projectId - Jira project ID (numeric, not the project key)
|
|
28
|
+
* @param request.version - Optional version number (absolute, 1-based: 1 = first version ever created, 2 = second version, etc. The highest number is the current/latest version). If not provided, uses the latest version.
|
|
28
29
|
* @returns Test case attachments response with array of attachment details
|
|
29
30
|
* @throws {BadRequestError} If the request is invalid
|
|
30
31
|
* @throws {UnauthorizedError} If authentication fails
|
|
@@ -50,6 +51,7 @@ export declare class PrivateAttachments extends PrivateBase {
|
|
|
50
51
|
* @param request.testCaseKey - Test case key (e.g., 'PROJ-T1'). The numeric ID will be looked up automatically if Zephyr Connector is available.
|
|
51
52
|
* @param request.projectId - Jira project ID (numeric, not the project key)
|
|
52
53
|
* @param request.attachmentId - Attachment ID (UUID string, e.g., 'c3f14125-638f-47f9-9211-12a9777c09e7')
|
|
54
|
+
* @param request.version - Optional version number (absolute, 1-based: 1 = first version ever created, 2 = second version, etc. The highest number is the current/latest version). If not provided, uses the latest version.
|
|
53
55
|
* @returns Blob containing the attachment file data
|
|
54
56
|
* @throws {BadRequestError} If the request is invalid
|
|
55
57
|
* @throws {UnauthorizedError} If authentication fails
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivateAttachments.d.ts","sourceRoot":"","sources":["../../../groups/Private/PrivateAttachments.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AAEH,OAAO,KAAK,EACX,qBAAqB,EACrB,6BAA6B,EAC7B,8BAA8B,EAC9B,yBAAyB,EACzB,+BAA+B,EAC/B,8BAA8B,EAC9B,+BAA+B,EAC/B,kCAAkC,EAClC,gCAAgC,EAChC,6BAA6B,EAC7B,8BAA8B,EAC9B,iCAAiC,EACjC,+BAA+B,EAC/B,6BAA6B,EAC7B,8BAA8B,EAC9B,iCAAiC,EACjC,+BAA+B,EAC/B,kCAAkC,EAClC,mCAAmC,EACnC,sCAAsC,EACtC,oCAAoC,EACpC,sCAAsC,EACtC,uCAAuC,EACvC,0CAA0C,EAC1C,wCAAwC,EAGxC,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAS5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,qBAAa,kBAAmB,SAAQ,WAAW;gBACtC,aAAa,CAAC,EAAE,mBAAmB;IAI/C
|
|
1
|
+
{"version":3,"file":"PrivateAttachments.d.ts","sourceRoot":"","sources":["../../../groups/Private/PrivateAttachments.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AAEH,OAAO,KAAK,EACX,qBAAqB,EACrB,6BAA6B,EAC7B,8BAA8B,EAC9B,yBAAyB,EACzB,+BAA+B,EAC/B,8BAA8B,EAC9B,+BAA+B,EAC/B,kCAAkC,EAClC,gCAAgC,EAChC,6BAA6B,EAC7B,8BAA8B,EAC9B,iCAAiC,EACjC,+BAA+B,EAC/B,6BAA6B,EAC7B,8BAA8B,EAC9B,iCAAiC,EACjC,+BAA+B,EAC/B,kCAAkC,EAClC,mCAAmC,EACnC,sCAAsC,EACtC,oCAAoC,EACpC,sCAAsC,EACt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;;;;;;;;;;;;;;;;OAuBG;IACG,+BAA+B,CACpC,WAAW,EAAE,qBAAqB,EAClC,OAAO,EAAE,sCAAsC,GAC7C,OAAO,CAAC,IAAI,CAAC;IA+ChB;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACG,6BAA6B,CAClC,WAAW,EAAE,qBAAqB,EAClC,OAAO,EAAE,oCAAoC,GAC3C,OAAO,CAAC,OAAO,CAAC;IAqDnB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACG,+BAA+B,CACpC,WAAW,EAAE,qBAAqB,EAClC,OAAO,EAAE,sCAAsC,GAC7C,OAAO,CAAC,uCAAuC,CAAC;IA+FnD;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACG,mCAAmC,CACxC,WAAW,EAAE,qBAAqB,EAClC,OAAO,EAAE,0CAA0C,GACjD,OAAO,CAAC,IAAI,CAAC;IAgDhB;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACG,iCAAiC,CACtC,WAAW,EAAE,qBAAqB,EAClC,OAAO,EAAE,wCAAwC,GAC/C,OAAO,CAAC,OAAO,CAAC;IAuDnB;;;;;;;;;;;;;;OAcG;YACW,qBAAqB;IAuEnC;;;;;;;;;;;;;;;;;OAiBG;YACW,8BAA8B;IAgE5C;;;;;;;;;;;;;;OAcG;YACW,0BAA0B;IAuExC;;;;;;;;;;;;;;;;;OAiBG;YACW,mCAAmC;IAgEjD;;;;;;;;;;;;;;OAcG;YACW,8BAA8B;IAuE5C;;;;;;;;;;;;;;;;;OAiBG;YACW,uCAAuC;CA+DrD"}
|
|
@@ -20,6 +20,7 @@ export class PrivateAttachments extends PrivateBase {
|
|
|
20
20
|
* @param request - Get attachments request
|
|
21
21
|
* @param request.testCaseKey - Test case key (e.g., 'PROJ-T1'). The numeric ID will be looked up automatically if Zephyr Connector is available.
|
|
22
22
|
* @param request.projectId - Jira project ID (numeric, not the project key)
|
|
23
|
+
* @param request.version - Optional version number (absolute, 1-based: 1 = first version ever created, 2 = second version, etc. The highest number is the current/latest version). If not provided, uses the latest version.
|
|
23
24
|
* @returns Test case attachments response with array of attachment details
|
|
24
25
|
* @throws {BadRequestError} If the request is invalid
|
|
25
26
|
* @throws {UnauthorizedError} If authentication fails
|
|
@@ -33,15 +34,21 @@ export class PrivateAttachments extends PrivateBase {
|
|
|
33
34
|
let testCaseId;
|
|
34
35
|
if (this.testCaseGroup) {
|
|
35
36
|
try {
|
|
36
|
-
|
|
37
|
+
// If version is specified, get the versioned test case; otherwise get the current version
|
|
38
|
+
const testCase = request.version !== undefined && request.version > 0
|
|
39
|
+
? await this.testCaseGroup.getTestCaseVersion({
|
|
40
|
+
testCaseKey: request.testCaseKey,
|
|
41
|
+
version: request.version,
|
|
42
|
+
})
|
|
43
|
+
: await this.testCaseGroup.getTestCase({ testCaseKey: request.testCaseKey });
|
|
37
44
|
if (!testCase) {
|
|
38
|
-
throw new NotFoundError(`Test case with key '${request.testCaseKey}' not found.`);
|
|
45
|
+
throw new NotFoundError(`Test case with key '${request.testCaseKey}'${request.version !== undefined && request.version > 0 ? ` version ${request.version}` : ''} not found.`);
|
|
39
46
|
}
|
|
40
47
|
testCaseId = testCase.id;
|
|
41
48
|
}
|
|
42
49
|
catch (error) {
|
|
43
50
|
if (error instanceof NotFoundError) {
|
|
44
|
-
throw new NotFoundError(`Test case with key '${request.testCaseKey}' not found.`);
|
|
51
|
+
throw new NotFoundError(`Test case with key '${request.testCaseKey}'${request.version !== undefined && request.version > 0 ? ` version ${request.version}` : ''} not found.`);
|
|
45
52
|
}
|
|
46
53
|
throw new UnexpectedError(`Failed to look up test case ID from key '${request.testCaseKey}'. Ensure Zephyr Connector is configured.`, error);
|
|
47
54
|
}
|
|
@@ -73,7 +80,7 @@ export class PrivateAttachments extends PrivateBase {
|
|
|
73
80
|
throw new ForbiddenError('Insufficient permissions to get attachments.');
|
|
74
81
|
}
|
|
75
82
|
if (response.status === 404) {
|
|
76
|
-
throw new NotFoundError(`Test case with key '${request.testCaseKey}' not found.`);
|
|
83
|
+
throw new NotFoundError(`Test case with key '${request.testCaseKey}'${request.version !== undefined && request.version > 0 ? ` version ${request.version}` : ''} not found.`);
|
|
77
84
|
}
|
|
78
85
|
throw new ServerError(`Failed to get test case attachments. Status: ${response.status}`, response.status, response.statusText);
|
|
79
86
|
}
|
|
@@ -107,6 +114,7 @@ export class PrivateAttachments extends PrivateBase {
|
|
|
107
114
|
* @param request.testCaseKey - Test case key (e.g., 'PROJ-T1'). The numeric ID will be looked up automatically if Zephyr Connector is available.
|
|
108
115
|
* @param request.projectId - Jira project ID (numeric, not the project key)
|
|
109
116
|
* @param request.attachmentId - Attachment ID (UUID string, e.g., 'c3f14125-638f-47f9-9211-12a9777c09e7')
|
|
117
|
+
* @param request.version - Optional version number (absolute, 1-based: 1 = first version ever created, 2 = second version, etc. The highest number is the current/latest version). If not provided, uses the latest version.
|
|
110
118
|
* @returns Blob containing the attachment file data
|
|
111
119
|
* @throws {BadRequestError} If the request is invalid
|
|
112
120
|
* @throws {UnauthorizedError} If authentication fails
|
|
@@ -120,6 +128,7 @@ export class PrivateAttachments extends PrivateBase {
|
|
|
120
128
|
const attachmentsResponse = await this.getTestCaseAttachments(credentials, {
|
|
121
129
|
testCaseKey: request.testCaseKey,
|
|
122
130
|
projectId: request.projectId,
|
|
131
|
+
version: request.version,
|
|
123
132
|
});
|
|
124
133
|
// Step 2: Find the requested attachment
|
|
125
134
|
const attachment = attachmentsResponse.attachments.find((att) => att.id === request.attachmentId);
|
|
@@ -24,6 +24,7 @@ export declare class PrivateComments extends PrivateBase {
|
|
|
24
24
|
* @param request - Get comments request
|
|
25
25
|
* @param request.testCaseKey - Test case key (e.g., 'PROJ-T1'). The numeric ID will be looked up automatically if Zephyr Connector is available.
|
|
26
26
|
* @param request.projectId - Jira project ID (numeric, not the project key)
|
|
27
|
+
* @param request.version - Optional version number (absolute, 1-based: 1 = first version ever created, 2 = second version, etc. The highest number is the current/latest version). If not provided, uses the latest version.
|
|
27
28
|
* @returns Array of comments
|
|
28
29
|
* @throws {BadRequestError} If the request is invalid
|
|
29
30
|
* @throws {UnauthorizedError} If authentication fails
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivateComments.d.ts","sourceRoot":"","sources":["../../../groups/Private/PrivateComments.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AAEH,OAAO,KAAK,EACX,qBAAqB,EACrB,cAAc,EACd,0BAA0B,EAC1B,2BAA2B,EAC3B,0BAA0B,EAC1B,4BAA4B,EAC5B,6BAA6B,EAC7B,6BAA6B,EAC7B,4BAA4B,EAC5B,qBAAqB,EACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAS5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,qBAAa,eAAgB,SAAQ,WAAW;gBACnC,aAAa,CAAC,EAAE,mBAAmB;IAI/C
|
|
1
|
+
{"version":3,"file":"PrivateComments.d.ts","sourceRoot":"","sources":["../../../groups/Private/PrivateComments.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AAEH,OAAO,KAAK,EACX,qBAAqB,EACrB,cAAc,EACd,0BAA0B,EAC1B,2BAA2B,EAC3B,0BAA0B,EAC1B,4BAA4B,EAC5B,6BAA6B,EAC7B,6BAA6B,EAC7B,4BAA4B,EAC5B,qBAAqB,EACrB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAS5C,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,qBAAa,eAAgB,SAAQ,WAAW;gBACnC,aAAa,CAAC,EAAE,mBAAmB;IAI/C;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,mBAAmB,CACxB,WAAW,EAAE,qBAAqB,EAClC,OAAO,EAAE,0BAA0B,GACjC,OAAO,CAAC,cAAc,EAAE,CAAC;IA0F5B;;;;;;;;;;;;;;;;;;OAkBG;IACG,oBAAoB,CACzB,WAAW,EAAE,qBAAqB,EAClC,OAAO,EAAE,2BAA2B,GAClC,OAAO,CAAC,cAAc,EAAE,CAAC;IAqD5B;;;;;;;;;;;;;;;;;;OAkBG;IACG,mBAAmB,CACxB,WAAW,EAAE,qBAAqB,EAClC,OAAO,EAAE,0BAA0B,GACjC,OAAO,CAAC,cAAc,EAAE,CAAC;IAqD5B;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACG,qBAAqB,CAC1B,WAAW,EAAE,qBAAqB,EAClC,OAAO,EAAE,4BAA4B,GACnC,OAAO,CAAC,6BAA6B,CAAC;IAoFzC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACG,sBAAsB,CAC3B,WAAW,EAAE,qBAAqB,EAClC,OAAO,EAAE,6BAA6B,GACpC,OAAO,CAAC,qBAAqB,CAAC;IAoFjC;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACG,qBAAqB,CAC1B,WAAW,EAAE,qBAAqB,EAClC,OAAO,EAAE,4BAA4B,GACnC,OAAO,CAAC,qBAAqB,CAAC;CAmFjC"}
|
|
@@ -19,6 +19,7 @@ export class PrivateComments extends PrivateBase {
|
|
|
19
19
|
* @param request - Get comments request
|
|
20
20
|
* @param request.testCaseKey - Test case key (e.g., 'PROJ-T1'). The numeric ID will be looked up automatically if Zephyr Connector is available.
|
|
21
21
|
* @param request.projectId - Jira project ID (numeric, not the project key)
|
|
22
|
+
* @param request.version - Optional version number (absolute, 1-based: 1 = first version ever created, 2 = second version, etc. The highest number is the current/latest version). If not provided, uses the latest version.
|
|
22
23
|
* @returns Array of comments
|
|
23
24
|
* @throws {BadRequestError} If the request is invalid
|
|
24
25
|
* @throws {UnauthorizedError} If authentication fails
|
|
@@ -32,15 +33,21 @@ export class PrivateComments extends PrivateBase {
|
|
|
32
33
|
let testCaseId;
|
|
33
34
|
if (this.testCaseGroup) {
|
|
34
35
|
try {
|
|
35
|
-
|
|
36
|
+
// If version is specified, get the versioned test case; otherwise get the current version
|
|
37
|
+
const testCase = request.version !== undefined && request.version > 0
|
|
38
|
+
? await this.testCaseGroup.getTestCaseVersion({
|
|
39
|
+
testCaseKey: request.testCaseKey,
|
|
40
|
+
version: request.version,
|
|
41
|
+
})
|
|
42
|
+
: await this.testCaseGroup.getTestCase({ testCaseKey: request.testCaseKey });
|
|
36
43
|
if (!testCase) {
|
|
37
|
-
throw new NotFoundError(`Test case with key '${request.testCaseKey}' not found.`);
|
|
44
|
+
throw new NotFoundError(`Test case with key '${request.testCaseKey}'${request.version !== undefined && request.version > 0 ? ` version ${request.version}` : ''} not found.`);
|
|
38
45
|
}
|
|
39
46
|
testCaseId = testCase.id;
|
|
40
47
|
}
|
|
41
48
|
catch (error) {
|
|
42
49
|
if (error instanceof NotFoundError) {
|
|
43
|
-
throw new NotFoundError(`Test case with key '${request.testCaseKey}' not found.`);
|
|
50
|
+
throw new NotFoundError(`Test case with key '${request.testCaseKey}'${request.version !== undefined && request.version > 0 ? ` version ${request.version}` : ''} not found.`);
|
|
44
51
|
}
|
|
45
52
|
throw new UnexpectedError(`Failed to look up test case ID from key '${request.testCaseKey}'. Ensure Zephyr Connector is configured.`, error);
|
|
46
53
|
}
|
|
@@ -72,7 +79,7 @@ export class PrivateComments extends PrivateBase {
|
|
|
72
79
|
throw new ForbiddenError('Insufficient permissions to get comments.');
|
|
73
80
|
}
|
|
74
81
|
if (response.status === 404) {
|
|
75
|
-
throw new NotFoundError(`Test case with key '${request.testCaseKey}' not found.`);
|
|
82
|
+
throw new NotFoundError(`Test case with key '${request.testCaseKey}'${request.version !== undefined && request.version > 0 ? ` version ${request.version}` : ''} not found.`);
|
|
76
83
|
}
|
|
77
84
|
throw new ServerError(`Failed to get comments. Status: ${response.status}`, response.status, response.statusText);
|
|
78
85
|
}
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* ⚠️ WARNING: These methods use private APIs that are not officially supported.
|
|
9
9
|
*/
|
|
10
|
+
import type { PrivateApiCredentials, ArchiveConfigRequest, ArchiveConfigResponse } from '../../types';
|
|
10
11
|
import type { ZephyrApiConnection } from '../../index';
|
|
11
12
|
import { PrivateBase } from './PrivateBase';
|
|
12
13
|
import { PrivateCustomFields } from './PrivateCustomFields';
|
|
@@ -31,5 +32,51 @@ export declare class PrivateConfig extends PrivateBase {
|
|
|
31
32
|
*/
|
|
32
33
|
readonly DataSets: PrivateDataSets;
|
|
33
34
|
constructor(apiConnection?: ZephyrApiConnection);
|
|
35
|
+
/**
|
|
36
|
+
* Archive a config item (Environment or Iteration) using private API
|
|
37
|
+
*
|
|
38
|
+
* Archives an Environment or Iteration by setting its `isArchived` flag to `true`.
|
|
39
|
+
*
|
|
40
|
+
* ⚠️ WARNING: This uses a private Zephyr API endpoint that is not officially supported.
|
|
41
|
+
* The endpoint may change or be removed at any time without notice.
|
|
42
|
+
*
|
|
43
|
+
* @param credentials - Private API credentials
|
|
44
|
+
* @param request - Archive config request
|
|
45
|
+
* @param request.type - Type of config item: 'Environment' or 'Iteration'
|
|
46
|
+
* @param request.id - Numeric ID of the environment or iteration to archive
|
|
47
|
+
* @param request.projectId - Jira project ID (numeric, not the project key)
|
|
48
|
+
* @returns Archive response with the ID of the archived item
|
|
49
|
+
* @throws {BadRequestError} If the request is invalid
|
|
50
|
+
* @throws {UnauthorizedError} If authentication fails
|
|
51
|
+
* @throws {ForbiddenError} If the user doesn't have permission
|
|
52
|
+
* @throws {NotFoundError} If the environment or iteration is not found
|
|
53
|
+
* @throws {ServerError} If the server returns an error
|
|
54
|
+
*/
|
|
55
|
+
archiveConfig(credentials: PrivateApiCredentials, request: ArchiveConfigRequest): Promise<ArchiveConfigResponse>;
|
|
56
|
+
/**
|
|
57
|
+
* Unarchive a config item (Environment or Iteration) using private API
|
|
58
|
+
*
|
|
59
|
+
* Unarchives an Environment or Iteration by setting its `isArchived` flag to `false`.
|
|
60
|
+
*
|
|
61
|
+
* ⚠️ WARNING: This uses a private Zephyr API endpoint that is not officially supported.
|
|
62
|
+
* The endpoint may change or be removed at any time without notice.
|
|
63
|
+
*
|
|
64
|
+
* @param credentials - Private API credentials
|
|
65
|
+
* @param request - Archive config request (same interface as archive, but sets isArchived to false)
|
|
66
|
+
* @param request.type - Type of config item: 'Environment' or 'Iteration'
|
|
67
|
+
* @param request.id - Numeric ID of the environment or iteration to unarchive
|
|
68
|
+
* @param request.projectId - Jira project ID (numeric, not the project key)
|
|
69
|
+
* @returns Archive response with the ID of the unarchived item
|
|
70
|
+
* @throws {BadRequestError} If the request is invalid
|
|
71
|
+
* @throws {UnauthorizedError} If authentication fails
|
|
72
|
+
* @throws {ForbiddenError} If the user doesn't have permission
|
|
73
|
+
* @throws {NotFoundError} If the environment or iteration is not found
|
|
74
|
+
* @throws {ServerError} If the server returns an error
|
|
75
|
+
*/
|
|
76
|
+
unarchiveConfig(credentials: PrivateApiCredentials, request: ArchiveConfigRequest): Promise<ArchiveConfigResponse>;
|
|
77
|
+
/**
|
|
78
|
+
* Internal method to update archive status
|
|
79
|
+
*/
|
|
80
|
+
private updateArchiveStatus;
|
|
34
81
|
}
|
|
35
82
|
//# sourceMappingURL=PrivateConfig.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PrivateConfig.d.ts","sourceRoot":"","sources":["../../../groups/Private/PrivateConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"PrivateConfig.d.ts","sourceRo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