@resolution/jira-api-client 0.15.8 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/openapi/core/CommonHttpClient.d.ts +4 -0
- package/lib/openapi/core/CommonHttpClient.js +2 -1
- package/lib/openapi/core/CommonHttpClient.js.map +1 -1
- package/lib/openapi/platform/BaseJiraPlatformApiClient.d.ts +40 -11
- package/lib/openapi/platform/BaseJiraPlatformApiClient.js +36 -4
- package/lib/openapi/platform/BaseJiraPlatformApiClient.js.map +1 -1
- package/lib/openapi/platform/models/announcementBanner.d.ts +1 -1
- package/lib/openapi/platform/models/announcementBanner.js +1 -1
- package/lib/openapi/platform/models/common.d.ts +28 -0
- package/lib/openapi/platform/models/common.js +6 -0
- package/lib/openapi/platform/models/common.js.map +1 -1
- package/lib/openapi/platform/models/fieldSchemes.d.ts +458 -0
- package/lib/openapi/platform/models/fieldSchemes.js +318 -0
- package/lib/openapi/platform/models/fieldSchemes.js.map +1 -0
- package/lib/openapi/platform/models/issueFields.d.ts +29 -0
- package/lib/openapi/platform/models/issueFields.js +16 -0
- package/lib/openapi/platform/models/issueFields.js.map +1 -1
- package/lib/openapi/platform/models/issueSearch.d.ts +2 -1
- package/lib/openapi/platform/models/issueSearch.js.map +1 -1
- package/lib/openapi/platform/models/licenseMetrics.d.ts +0 -3
- package/lib/openapi/platform/models/licenseMetrics.js +0 -1
- package/lib/openapi/platform/models/licenseMetrics.js.map +1 -1
- package/lib/openapi/platform/models/migrationOfConnectModulesToForge.d.ts +36 -0
- package/lib/openapi/platform/models/migrationOfConnectModulesToForge.js +23 -0
- package/lib/openapi/platform/models/migrationOfConnectModulesToForge.js.map +1 -0
- package/lib/openapi/platform/models/projectRoles.d.ts +2 -0
- package/lib/openapi/platform/models/projectRoles.js +2 -1
- package/lib/openapi/platform/models/projectRoles.js.map +1 -1
- package/lib/openapi/platform/models/projectTemplates.d.ts +11 -0
- package/lib/openapi/platform/models/projectTemplates.js +1 -0
- package/lib/openapi/platform/models/projectTemplates.js.map +1 -1
- package/lib/openapi/platform/models/projects.d.ts +1 -1
- package/lib/openapi/platform/models/projects.js +1 -1
- package/lib/openapi/platform/models/projects.js.map +1 -1
- package/lib/openapi/platform/models/uiModificationsApps.d.ts +24 -5
- package/lib/openapi/platform/models/uiModificationsApps.js +3 -1
- package/lib/openapi/platform/models/uiModificationsApps.js.map +1 -1
- package/lib/openapi/platform/models/webhooks.d.ts +2 -2
- package/lib/openapi/platform/models/webhooks.js +2 -2
- package/lib/openapi/platform/models/webhooks.js.map +1 -1
- package/lib/openapi/platform/models/workflowSchemes.d.ts +43 -18
- package/lib/openapi/platform/models/workflowSchemes.js +9 -4
- package/lib/openapi/platform/models/workflowSchemes.js.map +1 -1
- package/lib/openapi/platform/models/workflows.d.ts +88 -0
- package/lib/openapi/platform/models/workflows.js +74 -0
- package/lib/openapi/platform/models/workflows.js.map +1 -1
- package/lib/openapi/platform/services/AppPropertiesService.d.ts +1 -2
- package/lib/openapi/platform/services/AppPropertiesService.js +1 -2
- package/lib/openapi/platform/services/AppPropertiesService.js.map +1 -1
- package/lib/openapi/platform/services/FieldSchemesService.d.ts +901 -0
- package/lib/openapi/platform/services/FieldSchemesService.js +992 -0
- package/lib/openapi/platform/services/FieldSchemesService.js.map +1 -0
- package/lib/openapi/platform/services/IssueFieldsService.d.ts +30 -1
- package/lib/openapi/platform/services/IssueFieldsService.js +39 -0
- package/lib/openapi/platform/services/IssueFieldsService.js.map +1 -1
- package/lib/openapi/platform/services/IssueRemoteLinksService.d.ts +2 -2
- package/lib/openapi/platform/services/IssueRemoteLinksService.js +2 -2
- package/lib/openapi/platform/services/IssueRemoteLinksService.js.map +1 -1
- package/lib/openapi/platform/services/IssueSearchService.d.ts +2 -1
- package/lib/openapi/platform/services/IssueSearchService.js.map +1 -1
- package/lib/openapi/platform/services/MigrationOfConnectModulesToForgeService.d.ts +61 -0
- package/lib/openapi/platform/services/MigrationOfConnectModulesToForgeService.js +76 -0
- package/lib/openapi/platform/services/MigrationOfConnectModulesToForgeService.js.map +1 -0
- package/lib/openapi/platform/services/ProjectRolesService.d.ts +8 -2
- package/lib/openapi/platform/services/ProjectRolesService.js +5 -3
- package/lib/openapi/platform/services/ProjectRolesService.js.map +1 -1
- package/lib/openapi/platform/services/ProjectsService.d.ts +3 -6
- package/lib/openapi/platform/services/ProjectsService.js +3 -6
- package/lib/openapi/platform/services/ProjectsService.js.map +1 -1
- package/lib/openapi/platform/services/UiModificationsAppsService.d.ts +68 -10
- package/lib/openapi/platform/services/UiModificationsAppsService.js +54 -10
- package/lib/openapi/platform/services/UiModificationsAppsService.js.map +1 -1
- package/lib/openapi/platform/services/UserSearchService.d.ts +3 -1
- package/lib/openapi/platform/services/UserSearchService.js +4 -2
- package/lib/openapi/platform/services/UserSearchService.js.map +1 -1
- package/lib/openapi/platform/services/UsersService.d.ts +4 -1
- package/lib/openapi/platform/services/UsersService.js +4 -1
- package/lib/openapi/platform/services/UsersService.js.map +1 -1
- package/lib/openapi/platform/services/WorkflowSchemesService.d.ts +65 -1
- package/lib/openapi/platform/services/WorkflowSchemesService.js +31 -0
- package/lib/openapi/platform/services/WorkflowSchemesService.js.map +1 -1
- package/lib/openapi/platform/services/WorkflowsService.d.ts +152 -8
- package/lib/openapi/platform/services/WorkflowsService.js +160 -5
- package/lib/openapi/platform/services/WorkflowsService.js.map +1 -1
- package/lib/openapi/serviceManagement/BaseJiraServiceManagementApiClient.d.ts +1 -1
- package/lib/openapi/serviceManagement/BaseJiraServiceManagementApiClient.js +1 -1
- package/lib/openapi/serviceManagement/services/CustomerService.d.ts +23 -0
- package/lib/openapi/serviceManagement/services/CustomerService.js +34 -0
- package/lib/openapi/serviceManagement/services/CustomerService.js.map +1 -1
- package/lib/openapi/software/models/board.d.ts +9 -0
- package/lib/openapi/software/models/board.js +1 -0
- package/lib/openapi/software/models/board.js.map +1 -1
- package/package.json +3 -3
- package/lib/openapi/platform/models/appProperties.d.ts +0 -19
- package/lib/openapi/platform/models/appProperties.js +0 -12
- package/lib/openapi/platform/models/appProperties.js.map +0 -1
|
@@ -0,0 +1,992 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FieldSchemesService = void 0;
|
|
4
|
+
// DO NOT EDIT!
|
|
5
|
+
// This file is generated by "api-typescript-generator".
|
|
6
|
+
// To update this file run "yarn build:openapi".
|
|
7
|
+
const commonHttpClient = require("../../core/CommonHttpClient");
|
|
8
|
+
const CommonHttpService_1 = require("../../core/CommonHttpService");
|
|
9
|
+
const fieldSchemes_1 = require("../models/fieldSchemes");
|
|
10
|
+
const validationSchemaStorage_1 = require("../validationSchemaStorage");
|
|
11
|
+
const zod_1 = require("zod");
|
|
12
|
+
/**
|
|
13
|
+
* This resource represents field schemes which are replacing field configuration
|
|
14
|
+
* schemes to control field associations. They are currently in beta and only
|
|
15
|
+
* available to customers who have opted-in to the beta program. For more
|
|
16
|
+
* information see [RFC-103: Jira Field Configuration Overhaul: Admin Experience
|
|
17
|
+
* and API
|
|
18
|
+
* Changes](https://community.developer.atlassian.com/t/rfc-103-jira-field-configuration-overhaul-admin-experience-and-api-changes/94205)
|
|
19
|
+
*
|
|
20
|
+
* @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-field-schemes
|
|
21
|
+
* @category Services
|
|
22
|
+
*/
|
|
23
|
+
class FieldSchemesService extends CommonHttpService_1.CommonHttpService {
|
|
24
|
+
constructor() {
|
|
25
|
+
super(...arguments);
|
|
26
|
+
/**
|
|
27
|
+
* Associate projects to field association schemes.
|
|
28
|
+
*
|
|
29
|
+
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
30
|
+
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
31
|
+
*
|
|
32
|
+
* @returns
|
|
33
|
+
* * status: 200, mediaType: application/json
|
|
34
|
+
*
|
|
35
|
+
* Returned if the association was successful.
|
|
36
|
+
*
|
|
37
|
+
* example:
|
|
38
|
+
* ```
|
|
39
|
+
* {
|
|
40
|
+
* "results": [
|
|
41
|
+
* {
|
|
42
|
+
* "projectId": 10001,
|
|
43
|
+
* "schemeId": 10000,
|
|
44
|
+
* "success": true
|
|
45
|
+
* },
|
|
46
|
+
* {
|
|
47
|
+
* "projectId": 10002,
|
|
48
|
+
* "schemeId": 10001,
|
|
49
|
+
* "success": true
|
|
50
|
+
* }
|
|
51
|
+
* ]
|
|
52
|
+
* }
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* * status: 204, mediaType: application/json
|
|
56
|
+
*
|
|
57
|
+
* The request completed successfully. No additional content will be sent in the response.
|
|
58
|
+
*
|
|
59
|
+
* * status: 207, mediaType: application/json
|
|
60
|
+
*
|
|
61
|
+
* Returned if the association was partially successful.
|
|
62
|
+
*
|
|
63
|
+
* example:
|
|
64
|
+
* ```
|
|
65
|
+
* {
|
|
66
|
+
* "results": [
|
|
67
|
+
* {
|
|
68
|
+
* "projectId": 10001,
|
|
69
|
+
* "schemeId": 10000,
|
|
70
|
+
* "success": true
|
|
71
|
+
* },
|
|
72
|
+
* {
|
|
73
|
+
* "error": "Project #10001 doesn't exist",
|
|
74
|
+
* "projectId": 10002,
|
|
75
|
+
* "schemeId": 10001,
|
|
76
|
+
* "success": false
|
|
77
|
+
* }
|
|
78
|
+
* ]
|
|
79
|
+
* }
|
|
80
|
+
* ```
|
|
81
|
+
* @path PUT `/rest/api/3/config/fieldschemes/projects`
|
|
82
|
+
* @scopes-current manage:jira-configuration
|
|
83
|
+
* @scopes-beta write:field-configuration:jira
|
|
84
|
+
* @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-field-schemes#api-rest-api-3-config-fieldschemes-projects-put
|
|
85
|
+
* @param params
|
|
86
|
+
*/
|
|
87
|
+
this.associateProjectsToFieldAssociationSchemes = ({ requestBody }) => {
|
|
88
|
+
return this.getClientInstance().request({
|
|
89
|
+
path: "/rest/api/3/config/fieldschemes/projects",
|
|
90
|
+
method: "PUT",
|
|
91
|
+
headers: {
|
|
92
|
+
"Content-Type": "application/json"
|
|
93
|
+
},
|
|
94
|
+
body: requestBody
|
|
95
|
+
}).then(this.getClientInstance().responseHandler({
|
|
96
|
+
200: {
|
|
97
|
+
"application/json": "json"
|
|
98
|
+
},
|
|
99
|
+
204: {
|
|
100
|
+
"application/json": "json"
|
|
101
|
+
},
|
|
102
|
+
207: {
|
|
103
|
+
"application/json": "json"
|
|
104
|
+
}
|
|
105
|
+
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("FieldSchemesService.associateProjectsToFieldAssociationSchemes.response")));
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Endpoint for creating a new field association scheme.
|
|
109
|
+
*
|
|
110
|
+
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
111
|
+
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
112
|
+
*
|
|
113
|
+
* @returns Returned if the creation was successful.
|
|
114
|
+
*
|
|
115
|
+
* example:
|
|
116
|
+
* ```
|
|
117
|
+
* {
|
|
118
|
+
* "description": "Field association scheme description",
|
|
119
|
+
* "id": 10000,
|
|
120
|
+
* "links": {
|
|
121
|
+
* "associations": "{BASE_API_URL}/rest/api/2/config/fieldschemes/9/associations",
|
|
122
|
+
* "projects": "{BASE_API_URL}/rest/api/2/config/fieldschemes/9/projects"
|
|
123
|
+
* },
|
|
124
|
+
* "name": "Field association scheme name"
|
|
125
|
+
* }
|
|
126
|
+
* ```
|
|
127
|
+
* @path POST `/rest/api/3/config/fieldschemes`
|
|
128
|
+
* @scopes-current manage:jira-configuration
|
|
129
|
+
* @scopes-beta write:field-configuration-scheme:jira
|
|
130
|
+
* @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-field-schemes#api-rest-api-3-config-fieldschemes-post
|
|
131
|
+
* @param params
|
|
132
|
+
*/
|
|
133
|
+
this.createFieldAssociationScheme = ({ createFieldAssociationSchemeRequest }) => {
|
|
134
|
+
return this.getClientInstance().request({
|
|
135
|
+
path: "/rest/api/3/config/fieldschemes",
|
|
136
|
+
method: "POST",
|
|
137
|
+
headers: {
|
|
138
|
+
"Content-Type": "application/json"
|
|
139
|
+
},
|
|
140
|
+
body: createFieldAssociationSchemeRequest
|
|
141
|
+
}).then(this.getClientInstance().responseHandler({
|
|
142
|
+
200: {
|
|
143
|
+
"application/json": "json"
|
|
144
|
+
}
|
|
145
|
+
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("FieldSchemesService.createFieldAssociationScheme.response"))).then(commonHttpClient.getBody);
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* Delete a specified field association scheme
|
|
149
|
+
*
|
|
150
|
+
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
151
|
+
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
152
|
+
*
|
|
153
|
+
* @returns Returned if the field association scheme deletion was successful.
|
|
154
|
+
*
|
|
155
|
+
* example:
|
|
156
|
+
* ```
|
|
157
|
+
* {
|
|
158
|
+
* "deleted": true,
|
|
159
|
+
* "id": "10000"
|
|
160
|
+
* }
|
|
161
|
+
* ```
|
|
162
|
+
* @path DELETE `/rest/api/3/config/fieldschemes/{id}`
|
|
163
|
+
* @scopes-current manage:jira-configuration
|
|
164
|
+
* @scopes-beta write:field-configuration-scheme:jira
|
|
165
|
+
* @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-field-schemes#api-rest-api-3-config-fieldschemes-id-delete
|
|
166
|
+
* @param params
|
|
167
|
+
*/
|
|
168
|
+
this.deleteFieldAssociationScheme = ({ id }) => {
|
|
169
|
+
return this.getClientInstance().request({
|
|
170
|
+
path: "/rest/api/3/config/fieldschemes/{id}",
|
|
171
|
+
method: "DELETE",
|
|
172
|
+
pathParams: {
|
|
173
|
+
id
|
|
174
|
+
}
|
|
175
|
+
}).then(this.getClientInstance().responseHandler({
|
|
176
|
+
200: {
|
|
177
|
+
"application/json": "json"
|
|
178
|
+
}
|
|
179
|
+
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("FieldSchemesService.deleteFieldAssociationScheme.response"))).then(commonHttpClient.getBody);
|
|
180
|
+
};
|
|
181
|
+
/**
|
|
182
|
+
* Endpoint for fetching a field association scheme by its ID
|
|
183
|
+
*
|
|
184
|
+
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
185
|
+
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
186
|
+
*
|
|
187
|
+
* @returns Returned if a field association scheme matches the given scheme ID
|
|
188
|
+
*
|
|
189
|
+
* example:
|
|
190
|
+
* ```
|
|
191
|
+
* {
|
|
192
|
+
* "description": "This is a field association scheme",
|
|
193
|
+
* "id": "123",
|
|
194
|
+
* "isDefault": false,
|
|
195
|
+
* "links": {
|
|
196
|
+
* "associations": "rest/api/3/config/fieldschemes/10000/associations",
|
|
197
|
+
* "projects": "rest/api/3/config/fieldschemes/10000/projects"
|
|
198
|
+
* },
|
|
199
|
+
* "name": "Scheme"
|
|
200
|
+
* }
|
|
201
|
+
* ```
|
|
202
|
+
* @path GET `/rest/api/3/config/fieldschemes/{id}`
|
|
203
|
+
* @scopes-current manage:jira-configuration
|
|
204
|
+
* @scopes-beta read:field-configuration-scheme:jira
|
|
205
|
+
* @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-field-schemes#api-rest-api-3-config-fieldschemes-id-get
|
|
206
|
+
* @param params
|
|
207
|
+
*/
|
|
208
|
+
this.getFieldAssociationSchemeById = ({ id }) => {
|
|
209
|
+
return this.getClientInstance().request({
|
|
210
|
+
path: "/rest/api/3/config/fieldschemes/{id}",
|
|
211
|
+
method: "GET",
|
|
212
|
+
pathParams: {
|
|
213
|
+
id
|
|
214
|
+
}
|
|
215
|
+
}).then(this.getClientInstance().responseHandler({
|
|
216
|
+
200: {
|
|
217
|
+
"application/json": "json"
|
|
218
|
+
}
|
|
219
|
+
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("FieldSchemesService.getFieldAssociationSchemeById.response"))).then(commonHttpClient.getBody);
|
|
220
|
+
};
|
|
221
|
+
/**
|
|
222
|
+
* Retrieve field association parameters on a field association scheme
|
|
223
|
+
*
|
|
224
|
+
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
225
|
+
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
226
|
+
*
|
|
227
|
+
* @returns Returned if the parameters fetched were successful.
|
|
228
|
+
*
|
|
229
|
+
* example:
|
|
230
|
+
* ```
|
|
231
|
+
* {
|
|
232
|
+
* "fieldId": "customfield_10000",
|
|
233
|
+
* "parameters": {
|
|
234
|
+
* "description": "Teams field",
|
|
235
|
+
* "isRequired": true
|
|
236
|
+
* },
|
|
237
|
+
* "workTypeParameters": [
|
|
238
|
+
* {
|
|
239
|
+
* "description": "Teams field",
|
|
240
|
+
* "isRequired": false,
|
|
241
|
+
* "workTypeId": 10010
|
|
242
|
+
* }
|
|
243
|
+
* ]
|
|
244
|
+
* }
|
|
245
|
+
* ```
|
|
246
|
+
* @path GET `/rest/api/3/config/fieldschemes/{id}/fields/{fieldId}/parameters`
|
|
247
|
+
* @scopes-current manage:jira-configuration
|
|
248
|
+
* @scopes-beta read:field-configuration:jira
|
|
249
|
+
* @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-field-schemes#api-rest-api-3-config-fieldschemes-id-fields-fieldid-parameters-get
|
|
250
|
+
* @param params
|
|
251
|
+
*/
|
|
252
|
+
this.getFieldAssociationSchemeItemParameters = ({ id, fieldId }) => {
|
|
253
|
+
return this.getClientInstance().request({
|
|
254
|
+
path: "/rest/api/3/config/fieldschemes/{id}/fields/{fieldId}/parameters",
|
|
255
|
+
method: "GET",
|
|
256
|
+
pathParams: {
|
|
257
|
+
id,
|
|
258
|
+
fieldId
|
|
259
|
+
}
|
|
260
|
+
}).then(this.getClientInstance().responseHandler({
|
|
261
|
+
200: {
|
|
262
|
+
"application/json": "json"
|
|
263
|
+
}
|
|
264
|
+
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("FieldSchemesService.getFieldAssociationSchemeItemParameters.response"))).then(commonHttpClient.getBody);
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* REST endpoint for retrieving a paginated list of field association schemes with
|
|
268
|
+
* optional filtering.
|
|
269
|
+
*
|
|
270
|
+
* This endpoint allows clients to fetch field association schemes with optional
|
|
271
|
+
* filtering by project IDs and text queries. The response includes scheme details
|
|
272
|
+
* with navigation links and filter metadata when applicable.
|
|
273
|
+
*
|
|
274
|
+
* Filtering Behavior:
|
|
275
|
+
*
|
|
276
|
+
* * When projectId or query parameters are provided, the response includes
|
|
277
|
+
* matchedFilters metadata showing which filters were applied.
|
|
278
|
+
* * When no filters are applied, matchedFilters is omitted from individual
|
|
279
|
+
* scheme objects
|
|
280
|
+
*
|
|
281
|
+
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
282
|
+
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
283
|
+
*
|
|
284
|
+
* @returns Pagianted list of field association schemes
|
|
285
|
+
*
|
|
286
|
+
* example:
|
|
287
|
+
* ```
|
|
288
|
+
* {
|
|
289
|
+
* "description": "Field Association Scheme test description",
|
|
290
|
+
* "id": 1000,
|
|
291
|
+
* "isDefault": false,
|
|
292
|
+
* "links": {
|
|
293
|
+
* "associations": "rest/api/3/config/fieldschemes/10000/associations",
|
|
294
|
+
* "projects": "rest/api/3/config/fieldschemes/10000/projects"
|
|
295
|
+
* },
|
|
296
|
+
* "matchedFilters": {
|
|
297
|
+
* "projectIds": [
|
|
298
|
+
* 10001,
|
|
299
|
+
* 10002
|
|
300
|
+
* ],
|
|
301
|
+
* "query": "query"
|
|
302
|
+
* },
|
|
303
|
+
* "name": "Field Association Scheme test name"
|
|
304
|
+
* }
|
|
305
|
+
* ```
|
|
306
|
+
* @path GET `/rest/api/3/config/fieldschemes`
|
|
307
|
+
* @scopes-current manage:jira-configuration
|
|
308
|
+
* @scopes-beta read:field-configuration-scheme:jira
|
|
309
|
+
* @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-field-schemes#api-rest-api-3-config-fieldschemes-get
|
|
310
|
+
* @param params
|
|
311
|
+
*/
|
|
312
|
+
this.getFieldAssociationSchemes = ({ projectId, query, startAt, maxResults } = {}) => {
|
|
313
|
+
return this.getClientInstance().request({
|
|
314
|
+
path: "/rest/api/3/config/fieldschemes",
|
|
315
|
+
method: "GET",
|
|
316
|
+
query: {
|
|
317
|
+
projectId,
|
|
318
|
+
query,
|
|
319
|
+
startAt,
|
|
320
|
+
maxResults
|
|
321
|
+
}
|
|
322
|
+
}).then(this.getClientInstance().responseHandler({
|
|
323
|
+
200: {
|
|
324
|
+
"application/json": "json"
|
|
325
|
+
}
|
|
326
|
+
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("FieldSchemesService.getFieldAssociationSchemes.response"))).then(commonHttpClient.getBody);
|
|
327
|
+
};
|
|
328
|
+
/**
|
|
329
|
+
* Get projects with field association schemes. This will be a temporary API but
|
|
330
|
+
* useful when transitioning from the legacy field configuration APIs to the new
|
|
331
|
+
* ones.
|
|
332
|
+
*
|
|
333
|
+
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
334
|
+
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
335
|
+
*
|
|
336
|
+
* @returns Returns the list of project with field association schemes.
|
|
337
|
+
*
|
|
338
|
+
* example:
|
|
339
|
+
* ```
|
|
340
|
+
* {
|
|
341
|
+
* "isLast": true,
|
|
342
|
+
* "maxResults": 3,
|
|
343
|
+
* "startAt": 0,
|
|
344
|
+
* "total": 3,
|
|
345
|
+
* "values": [
|
|
346
|
+
* {
|
|
347
|
+
* "projectId": 10000,
|
|
348
|
+
* "schemeId": 1
|
|
349
|
+
* },
|
|
350
|
+
* {
|
|
351
|
+
* "projectId": 10001,
|
|
352
|
+
* "schemeId": 1
|
|
353
|
+
* },
|
|
354
|
+
* {
|
|
355
|
+
* "projectId": 10002,
|
|
356
|
+
* "schemeId": 2
|
|
357
|
+
* }
|
|
358
|
+
* ]
|
|
359
|
+
* }
|
|
360
|
+
* ```
|
|
361
|
+
* @path GET `/rest/api/3/config/fieldschemes/projects`
|
|
362
|
+
* @scopes-current manage:jira-configuration
|
|
363
|
+
* @scopes-beta read:field-configuration-scheme:jira
|
|
364
|
+
* @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-field-schemes#api-rest-api-3-config-fieldschemes-projects-get
|
|
365
|
+
* @param params
|
|
366
|
+
*/
|
|
367
|
+
this.getProjectsWithFieldSchemes = ({ startAt, maxResults, projectId }) => {
|
|
368
|
+
return this.getClientInstance().request({
|
|
369
|
+
path: "/rest/api/3/config/fieldschemes/projects",
|
|
370
|
+
method: "GET",
|
|
371
|
+
query: {
|
|
372
|
+
startAt,
|
|
373
|
+
maxResults,
|
|
374
|
+
projectId
|
|
375
|
+
}
|
|
376
|
+
}).then(this.getClientInstance().responseHandler({
|
|
377
|
+
200: {
|
|
378
|
+
"application/json": "json"
|
|
379
|
+
}
|
|
380
|
+
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("FieldSchemesService.getProjectsWithFieldSchemes.response"))).then(commonHttpClient.getBody);
|
|
381
|
+
};
|
|
382
|
+
/**
|
|
383
|
+
* Remove field association parameters overrides for work types.
|
|
384
|
+
*
|
|
385
|
+
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
386
|
+
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
387
|
+
*
|
|
388
|
+
* @returns
|
|
389
|
+
* * status: 204, mediaType: application/json
|
|
390
|
+
*
|
|
391
|
+
* The request completed successfully. No additional content will be sent in the response.
|
|
392
|
+
*
|
|
393
|
+
* * status: 207, mediaType: application/json
|
|
394
|
+
*
|
|
395
|
+
* Returned if the removal was partially successful.
|
|
396
|
+
*
|
|
397
|
+
* example:
|
|
398
|
+
* ```
|
|
399
|
+
* {
|
|
400
|
+
* "results": [
|
|
401
|
+
* {
|
|
402
|
+
* "error": {
|
|
403
|
+
* "code": "FIELD_IS_NOT_ASSOCIATED",
|
|
404
|
+
* "message": "The field 'customfield_10000' is not associated with the scheme '10000'."
|
|
405
|
+
* },
|
|
406
|
+
* "fieldId": "customfield_10000",
|
|
407
|
+
* "schemeId": 10000,
|
|
408
|
+
* "success": false,
|
|
409
|
+
* "workTypeIds": [
|
|
410
|
+
* 1,
|
|
411
|
+
* 2
|
|
412
|
+
* ]
|
|
413
|
+
* },
|
|
414
|
+
* {
|
|
415
|
+
* "fieldId": "description",
|
|
416
|
+
* "schemeId": 10001,
|
|
417
|
+
* "success": true,
|
|
418
|
+
* "workTypeIds": [
|
|
419
|
+
* 3
|
|
420
|
+
* ]
|
|
421
|
+
* }
|
|
422
|
+
* ]
|
|
423
|
+
* }
|
|
424
|
+
* ```
|
|
425
|
+
* @path DELETE `/rest/api/3/config/fieldschemes/fields/parameters`
|
|
426
|
+
* @scopes-current manage:jira-configuration
|
|
427
|
+
* @scopes-beta write:field-configuration:jira
|
|
428
|
+
* @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-field-schemes#api-rest-api-3-config-fieldschemes-fields-parameters-delete
|
|
429
|
+
* @param params
|
|
430
|
+
*/
|
|
431
|
+
this.removeFieldAssociationSchemeItemParameters = ({ requestBody }) => {
|
|
432
|
+
return this.getClientInstance().request({
|
|
433
|
+
path: "/rest/api/3/config/fieldschemes/fields/parameters",
|
|
434
|
+
method: "DELETE",
|
|
435
|
+
headers: {
|
|
436
|
+
"Content-Type": "application/json"
|
|
437
|
+
},
|
|
438
|
+
body: requestBody
|
|
439
|
+
}).then(this.getClientInstance().responseHandler({
|
|
440
|
+
200: {},
|
|
441
|
+
204: {
|
|
442
|
+
"application/json": "json"
|
|
443
|
+
},
|
|
444
|
+
207: {
|
|
445
|
+
"application/json": "json"
|
|
446
|
+
}
|
|
447
|
+
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("FieldSchemesService.removeFieldAssociationSchemeItemParameters.response")));
|
|
448
|
+
};
|
|
449
|
+
/**
|
|
450
|
+
* Remove fields associated with field association schemes.
|
|
451
|
+
*
|
|
452
|
+
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
453
|
+
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
454
|
+
*
|
|
455
|
+
* @returns
|
|
456
|
+
* * status: 200, mediaType: application/json
|
|
457
|
+
*
|
|
458
|
+
* Returned if the field association update was successful.
|
|
459
|
+
*
|
|
460
|
+
* example:
|
|
461
|
+
* ```
|
|
462
|
+
* {
|
|
463
|
+
* "results": [
|
|
464
|
+
* {
|
|
465
|
+
* "fieldId": "customfield_10000",
|
|
466
|
+
* "schemeId": 10000,
|
|
467
|
+
* "success": true
|
|
468
|
+
* },
|
|
469
|
+
* {
|
|
470
|
+
* "fieldId": "customfield_10001",
|
|
471
|
+
* "schemeId": 10002,
|
|
472
|
+
* "success": true
|
|
473
|
+
* }
|
|
474
|
+
* ]
|
|
475
|
+
* }
|
|
476
|
+
* ```
|
|
477
|
+
*
|
|
478
|
+
* * status: 204, mediaType: application/json
|
|
479
|
+
*
|
|
480
|
+
* The request completed successfully. No additional content will be sent in the response.
|
|
481
|
+
*
|
|
482
|
+
* * status: 207, mediaType: application/json
|
|
483
|
+
*
|
|
484
|
+
* Returned if the field association update was partially successful.
|
|
485
|
+
*
|
|
486
|
+
* example:
|
|
487
|
+
* ```
|
|
488
|
+
* {
|
|
489
|
+
* "results": [
|
|
490
|
+
* {
|
|
491
|
+
* "fieldId": "customfield_10000",
|
|
492
|
+
* "schemeId": 10000,
|
|
493
|
+
* "success": true
|
|
494
|
+
* },
|
|
495
|
+
* {
|
|
496
|
+
* "error": "Scheme 10001 doesn't exist",
|
|
497
|
+
* "fieldId": "customfield_10001",
|
|
498
|
+
* "schemeId": 10001,
|
|
499
|
+
* "success": false
|
|
500
|
+
* }
|
|
501
|
+
* ]
|
|
502
|
+
* }
|
|
503
|
+
* ```
|
|
504
|
+
* @path DELETE `/rest/api/3/config/fieldschemes/fields`
|
|
505
|
+
* @scopes-current manage:jira-configuration
|
|
506
|
+
* @scopes-beta write:field-configuration:jira
|
|
507
|
+
* @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-field-schemes#api-rest-api-3-config-fieldschemes-fields-delete
|
|
508
|
+
* @param params
|
|
509
|
+
*/
|
|
510
|
+
this.removeFieldsAssociatedWithSchemes = ({ requestBody }) => {
|
|
511
|
+
return this.getClientInstance().request({
|
|
512
|
+
path: "/rest/api/3/config/fieldschemes/fields",
|
|
513
|
+
method: "DELETE",
|
|
514
|
+
headers: {
|
|
515
|
+
"Content-Type": "application/json"
|
|
516
|
+
},
|
|
517
|
+
body: requestBody
|
|
518
|
+
}).then(this.getClientInstance().responseHandler({
|
|
519
|
+
200: {
|
|
520
|
+
"application/json": "json"
|
|
521
|
+
},
|
|
522
|
+
204: {
|
|
523
|
+
"application/json": "json"
|
|
524
|
+
},
|
|
525
|
+
207: {
|
|
526
|
+
"application/json": "json"
|
|
527
|
+
}
|
|
528
|
+
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("FieldSchemesService.removeFieldsAssociatedWithSchemes.response")));
|
|
529
|
+
};
|
|
530
|
+
/**
|
|
531
|
+
* Search for fields belonging to a given field association scheme.
|
|
532
|
+
*
|
|
533
|
+
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
534
|
+
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
535
|
+
*
|
|
536
|
+
* @returns Returns the matching fields, at the specified page of the results.
|
|
537
|
+
*
|
|
538
|
+
* example:
|
|
539
|
+
* ```
|
|
540
|
+
* {
|
|
541
|
+
* "allowedOperations": [
|
|
542
|
+
* "REMOVE",
|
|
543
|
+
* "CHANGE_REQUIRED",
|
|
544
|
+
* "CHANGE_DESCRIPTION"
|
|
545
|
+
* ],
|
|
546
|
+
* "fieldId": "customfield_10000",
|
|
547
|
+
* "parameters": {
|
|
548
|
+
* "description": "text",
|
|
549
|
+
* "isRequired": true
|
|
550
|
+
* },
|
|
551
|
+
* "restrictedToWorkTypes": [
|
|
552
|
+
* "1",
|
|
553
|
+
* "2"
|
|
554
|
+
* ],
|
|
555
|
+
* "workTypeParameters": [
|
|
556
|
+
* {
|
|
557
|
+
* "description": "text",
|
|
558
|
+
* "isRequired": true,
|
|
559
|
+
* "workTypeId": "1"
|
|
560
|
+
* },
|
|
561
|
+
* {
|
|
562
|
+
* "description": "textarea",
|
|
563
|
+
* "isRequired": false,
|
|
564
|
+
* "workTypeId": "2"
|
|
565
|
+
* }
|
|
566
|
+
* ]
|
|
567
|
+
* }
|
|
568
|
+
* ```
|
|
569
|
+
* @path GET `/rest/api/3/config/fieldschemes/{id}/fields`
|
|
570
|
+
* @scopes-current manage:jira-configuration
|
|
571
|
+
* @scopes-beta read:field-configuration:jira
|
|
572
|
+
* @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-field-schemes#api-rest-api-3-config-fieldschemes-id-fields-get
|
|
573
|
+
* @param params
|
|
574
|
+
*/
|
|
575
|
+
this.searchFieldAssociationSchemeFields = ({ id, startAt, maxResults, fieldId }) => {
|
|
576
|
+
return this.getClientInstance().request({
|
|
577
|
+
path: "/rest/api/3/config/fieldschemes/{id}/fields",
|
|
578
|
+
method: "GET",
|
|
579
|
+
pathParams: {
|
|
580
|
+
id
|
|
581
|
+
},
|
|
582
|
+
query: {
|
|
583
|
+
startAt,
|
|
584
|
+
maxResults,
|
|
585
|
+
fieldId
|
|
586
|
+
}
|
|
587
|
+
}).then(this.getClientInstance().responseHandler({
|
|
588
|
+
200: {
|
|
589
|
+
"application/json": "json"
|
|
590
|
+
}
|
|
591
|
+
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("FieldSchemesService.searchFieldAssociationSchemeFields.response"))).then(commonHttpClient.getBody);
|
|
592
|
+
};
|
|
593
|
+
/**
|
|
594
|
+
* REST Endpoint for searching for projects belonging to a given field association
|
|
595
|
+
* scheme
|
|
596
|
+
*
|
|
597
|
+
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
598
|
+
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
599
|
+
*
|
|
600
|
+
* @returns Returns a paginated list of projects associated with the field association scheme, matching the specified filter criteria.
|
|
601
|
+
* @path GET `/rest/api/3/config/fieldschemes/{id}/projects`
|
|
602
|
+
* @scopes-current manage:jira-configuration
|
|
603
|
+
* @scopes-beta read:field-configuration:jira
|
|
604
|
+
* @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-field-schemes#api-rest-api-3-config-fieldschemes-id-projects-get
|
|
605
|
+
* @param params
|
|
606
|
+
*/
|
|
607
|
+
this.searchFieldAssociationSchemeProjects = ({ id, startAt, maxResults, projectId }) => {
|
|
608
|
+
return this.getClientInstance().request({
|
|
609
|
+
path: "/rest/api/3/config/fieldschemes/{id}/projects",
|
|
610
|
+
method: "GET",
|
|
611
|
+
pathParams: {
|
|
612
|
+
id
|
|
613
|
+
},
|
|
614
|
+
query: {
|
|
615
|
+
startAt,
|
|
616
|
+
maxResults,
|
|
617
|
+
projectId
|
|
618
|
+
}
|
|
619
|
+
}).then(this.getClientInstance().responseHandler({
|
|
620
|
+
200: {
|
|
621
|
+
"application/json": "json"
|
|
622
|
+
}
|
|
623
|
+
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("FieldSchemesService.searchFieldAssociationSchemeProjects.response"))).then(commonHttpClient.getBody);
|
|
624
|
+
};
|
|
625
|
+
/**
|
|
626
|
+
* Endpoint for updating an existing field association scheme.
|
|
627
|
+
*
|
|
628
|
+
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
629
|
+
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
630
|
+
*
|
|
631
|
+
* @returns Returned if the update was successful.
|
|
632
|
+
*
|
|
633
|
+
* example:
|
|
634
|
+
* ```
|
|
635
|
+
* {
|
|
636
|
+
* "description": "Field association scheme description",
|
|
637
|
+
* "id": 10000,
|
|
638
|
+
* "links": {
|
|
639
|
+
* "associations": "{BASE_API_URL}/rest/api/2/config/fieldschemes/9/associations",
|
|
640
|
+
* "projects": "{BASE_API_URL}/rest/api/2/config/fieldschemes/9/projects"
|
|
641
|
+
* },
|
|
642
|
+
* "name": "Field association scheme name"
|
|
643
|
+
* }
|
|
644
|
+
* ```
|
|
645
|
+
* @path PUT `/rest/api/3/config/fieldschemes/{id}`
|
|
646
|
+
* @scopes-current manage:jira-configuration
|
|
647
|
+
* @scopes-beta write:field-configuration-scheme:jira
|
|
648
|
+
* @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-field-schemes#api-rest-api-3-config-fieldschemes-id-put
|
|
649
|
+
* @param params
|
|
650
|
+
*/
|
|
651
|
+
this.updateFieldAssociationScheme = ({ id, updateFieldAssociationSchemeRequest }) => {
|
|
652
|
+
return this.getClientInstance().request({
|
|
653
|
+
path: "/rest/api/3/config/fieldschemes/{id}",
|
|
654
|
+
method: "PUT",
|
|
655
|
+
pathParams: {
|
|
656
|
+
id
|
|
657
|
+
},
|
|
658
|
+
headers: {
|
|
659
|
+
"Content-Type": "application/json"
|
|
660
|
+
},
|
|
661
|
+
body: updateFieldAssociationSchemeRequest
|
|
662
|
+
}).then(this.getClientInstance().responseHandler({
|
|
663
|
+
200: {
|
|
664
|
+
"application/json": "json"
|
|
665
|
+
}
|
|
666
|
+
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("FieldSchemesService.updateFieldAssociationScheme.response"))).then(commonHttpClient.getBody);
|
|
667
|
+
};
|
|
668
|
+
/**
|
|
669
|
+
* Update field association item parameters in field association schemes.
|
|
670
|
+
*
|
|
671
|
+
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
672
|
+
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
673
|
+
*
|
|
674
|
+
* @returns
|
|
675
|
+
* * status: 200, mediaType: application/json
|
|
676
|
+
*
|
|
677
|
+
* Returned if the field parameter update was successful.
|
|
678
|
+
*
|
|
679
|
+
* example:
|
|
680
|
+
* ```
|
|
681
|
+
* {
|
|
682
|
+
* "results": [
|
|
683
|
+
* {
|
|
684
|
+
* "fieldId": "customfield_10000",
|
|
685
|
+
* "schemeId": 10000,
|
|
686
|
+
* "success": true
|
|
687
|
+
* },
|
|
688
|
+
* {
|
|
689
|
+
* "fieldId": "customfield_10001",
|
|
690
|
+
* "schemeId": 10002,
|
|
691
|
+
* "success": true,
|
|
692
|
+
* "workTypeId": 10001
|
|
693
|
+
* }
|
|
694
|
+
* ]
|
|
695
|
+
* }
|
|
696
|
+
* ```
|
|
697
|
+
*
|
|
698
|
+
* * status: 204, mediaType: application/json
|
|
699
|
+
*
|
|
700
|
+
* The request completed successfully. No additional content will be sent in the response.
|
|
701
|
+
*
|
|
702
|
+
* * status: 207, mediaType: application/json
|
|
703
|
+
*
|
|
704
|
+
* Returned if the field parameter update was partially successful.
|
|
705
|
+
*
|
|
706
|
+
* example:
|
|
707
|
+
* ```
|
|
708
|
+
* {
|
|
709
|
+
* "results": [
|
|
710
|
+
* {
|
|
711
|
+
* "fieldId": "customfield_10000",
|
|
712
|
+
* "schemeId": 10000,
|
|
713
|
+
* "success": true
|
|
714
|
+
* },
|
|
715
|
+
* {
|
|
716
|
+
* "error": "Scheme 10001 doesn't exist",
|
|
717
|
+
* "fieldId": "customfield_10001",
|
|
718
|
+
* "schemeId": 10001,
|
|
719
|
+
* "success": false,
|
|
720
|
+
* "workTypeId": 10001
|
|
721
|
+
* }
|
|
722
|
+
* ]
|
|
723
|
+
* }
|
|
724
|
+
* ```
|
|
725
|
+
* @path PUT `/rest/api/3/config/fieldschemes/fields/parameters`
|
|
726
|
+
* @scopes-current manage:jira-configuration
|
|
727
|
+
* @scopes-beta write:field-configuration:jira
|
|
728
|
+
* @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-field-schemes#api-rest-api-3-config-fieldschemes-fields-parameters-put
|
|
729
|
+
* @param params
|
|
730
|
+
*/
|
|
731
|
+
this.updateFieldAssociationSchemeItemParameters = ({ requestBody }) => {
|
|
732
|
+
return this.getClientInstance().request({
|
|
733
|
+
path: "/rest/api/3/config/fieldschemes/fields/parameters",
|
|
734
|
+
method: "PUT",
|
|
735
|
+
headers: {
|
|
736
|
+
"Content-Type": "application/json"
|
|
737
|
+
},
|
|
738
|
+
body: requestBody
|
|
739
|
+
}).then(this.getClientInstance().responseHandler({
|
|
740
|
+
200: {
|
|
741
|
+
"application/json": "json"
|
|
742
|
+
},
|
|
743
|
+
204: {
|
|
744
|
+
"application/json": "json"
|
|
745
|
+
},
|
|
746
|
+
207: {
|
|
747
|
+
"application/json": "json"
|
|
748
|
+
}
|
|
749
|
+
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("FieldSchemesService.updateFieldAssociationSchemeItemParameters.response")));
|
|
750
|
+
};
|
|
751
|
+
/**
|
|
752
|
+
* Update fields associated with field association schemes.
|
|
753
|
+
*
|
|
754
|
+
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
755
|
+
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
756
|
+
*
|
|
757
|
+
* @returns
|
|
758
|
+
* * status: 200, mediaType: application/json
|
|
759
|
+
*
|
|
760
|
+
* Returned if the field association update was successful.
|
|
761
|
+
*
|
|
762
|
+
* example:
|
|
763
|
+
* ```
|
|
764
|
+
* {
|
|
765
|
+
* "results": [
|
|
766
|
+
* {
|
|
767
|
+
* "fieldId": "customfield_10000",
|
|
768
|
+
* "schemeId": 10000,
|
|
769
|
+
* "success": true,
|
|
770
|
+
* "workTypeIds": [
|
|
771
|
+
* 1,
|
|
772
|
+
* 2
|
|
773
|
+
* ]
|
|
774
|
+
* },
|
|
775
|
+
* {
|
|
776
|
+
* "fieldId": "customfield_10001",
|
|
777
|
+
* "schemeId": 10002,
|
|
778
|
+
* "success": true,
|
|
779
|
+
* "workTypeIds": []
|
|
780
|
+
* }
|
|
781
|
+
* ]
|
|
782
|
+
* }
|
|
783
|
+
* ```
|
|
784
|
+
*
|
|
785
|
+
* * status: 204, mediaType: application/json
|
|
786
|
+
*
|
|
787
|
+
* The request completed successfully. No additional content will be sent in the response.
|
|
788
|
+
*
|
|
789
|
+
* * status: 207, mediaType: application/json
|
|
790
|
+
*
|
|
791
|
+
* Returned if the field association update was partially successful.
|
|
792
|
+
*
|
|
793
|
+
* example:
|
|
794
|
+
* ```
|
|
795
|
+
* {
|
|
796
|
+
* "results": [
|
|
797
|
+
* {
|
|
798
|
+
* "fieldId": "customfield_10000",
|
|
799
|
+
* "schemeId": 10000,
|
|
800
|
+
* "success": true,
|
|
801
|
+
* "workTypeIds": [
|
|
802
|
+
* 1
|
|
803
|
+
* ]
|
|
804
|
+
* },
|
|
805
|
+
* {
|
|
806
|
+
* "error": "Scheme 10001 doesn't exist",
|
|
807
|
+
* "fieldId": "customfield_10001",
|
|
808
|
+
* "schemeId": 10001,
|
|
809
|
+
* "success": false,
|
|
810
|
+
* "workTypeIds": [
|
|
811
|
+
* 2
|
|
812
|
+
* ]
|
|
813
|
+
* }
|
|
814
|
+
* ]
|
|
815
|
+
* }
|
|
816
|
+
* ```
|
|
817
|
+
* @path PUT `/rest/api/3/config/fieldschemes/fields`
|
|
818
|
+
* @scopes-current manage:jira-configuration
|
|
819
|
+
* @scopes-beta write:field-configuration:jira
|
|
820
|
+
* @see https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-field-schemes#api-rest-api-3-config-fieldschemes-fields-put
|
|
821
|
+
* @param params
|
|
822
|
+
*/
|
|
823
|
+
this.updateFieldsAssociatedWithSchemes = ({ requestBody }) => {
|
|
824
|
+
return this.getClientInstance().request({
|
|
825
|
+
path: "/rest/api/3/config/fieldschemes/fields",
|
|
826
|
+
method: "PUT",
|
|
827
|
+
headers: {
|
|
828
|
+
"Content-Type": "application/json"
|
|
829
|
+
},
|
|
830
|
+
body: requestBody
|
|
831
|
+
}).then(this.getClientInstance().responseHandler({
|
|
832
|
+
200: {
|
|
833
|
+
"application/json": "json"
|
|
834
|
+
},
|
|
835
|
+
204: {
|
|
836
|
+
"application/json": "json"
|
|
837
|
+
},
|
|
838
|
+
207: {
|
|
839
|
+
"application/json": "json"
|
|
840
|
+
}
|
|
841
|
+
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("FieldSchemesService.updateFieldsAssociatedWithSchemes.response")));
|
|
842
|
+
};
|
|
843
|
+
}
|
|
844
|
+
static initialize() {
|
|
845
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("FieldSchemesService.getFieldAssociationSchemes.response", zod_1.z.object({
|
|
846
|
+
status: zod_1.z.literal(200),
|
|
847
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
848
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("PageBean2GetFieldAssociationSchemeResponse")
|
|
849
|
+
}).describe("FieldSchemesService.getFieldAssociationSchemes.response"));
|
|
850
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("FieldSchemesService.createFieldAssociationScheme.response", zod_1.z.object({
|
|
851
|
+
status: zod_1.z.literal(200),
|
|
852
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
853
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("CreateFieldAssociationSchemeResponse")
|
|
854
|
+
}).describe("FieldSchemesService.createFieldAssociationScheme.response"));
|
|
855
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("FieldSchemesService.getFieldAssociationSchemeById.response", zod_1.z.object({
|
|
856
|
+
status: zod_1.z.literal(200),
|
|
857
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
858
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("GetFieldAssociationSchemeByIdResponse")
|
|
859
|
+
}).describe("FieldSchemesService.getFieldAssociationSchemeById.response"));
|
|
860
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("FieldSchemesService.updateFieldAssociationScheme.response", zod_1.z.object({
|
|
861
|
+
status: zod_1.z.literal(200),
|
|
862
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
863
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("UpdateFieldAssociationSchemeResponse")
|
|
864
|
+
}).describe("FieldSchemesService.updateFieldAssociationScheme.response"));
|
|
865
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("FieldSchemesService.deleteFieldAssociationScheme.response", zod_1.z.object({
|
|
866
|
+
status: zod_1.z.literal(200),
|
|
867
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
868
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("DeleteFieldAssociationSchemeResponse")
|
|
869
|
+
}).describe("FieldSchemesService.deleteFieldAssociationScheme.response"));
|
|
870
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("FieldSchemesService.searchFieldAssociationSchemeFields.response", zod_1.z.object({
|
|
871
|
+
status: zod_1.z.literal(200),
|
|
872
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
873
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("PageBean2FieldAssociationSchemeFieldSearchResult")
|
|
874
|
+
}).describe("FieldSchemesService.searchFieldAssociationSchemeFields.response"));
|
|
875
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("FieldSchemesService.getFieldAssociationSchemeItemParameters.response", zod_1.z.object({
|
|
876
|
+
status: zod_1.z.literal(200),
|
|
877
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
878
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("GetFieldAssociationParametersResponse")
|
|
879
|
+
}).describe("FieldSchemesService.getFieldAssociationSchemeItemParameters.response"));
|
|
880
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("FieldSchemesService.searchFieldAssociationSchemeProjects.response", zod_1.z.object({
|
|
881
|
+
status: zod_1.z.literal(200),
|
|
882
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
883
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("PageBean2FieldAssociationSchemeProjectSearchResult")
|
|
884
|
+
}).describe("FieldSchemesService.searchFieldAssociationSchemeProjects.response"));
|
|
885
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("FieldSchemesService.updateFieldsAssociatedWithSchemes.response", zod_1.z.object({
|
|
886
|
+
status: zod_1.z.number(),
|
|
887
|
+
mediaType: zod_1.z.string(),
|
|
888
|
+
body: zod_1.z.unknown()
|
|
889
|
+
}).superRefine(({ status: status, body: body }, ctx) => {
|
|
890
|
+
if (status === 200 || status === 207) {
|
|
891
|
+
validationSchemaStorage_1.validationSchemaStorage.lazy("FieldSchemeToFieldsResponse").parse(body);
|
|
892
|
+
}
|
|
893
|
+
else if (status === 204) {
|
|
894
|
+
zod_1.z.unknown().parse(body);
|
|
895
|
+
}
|
|
896
|
+
else {
|
|
897
|
+
ctx.addIssue({
|
|
898
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
899
|
+
path: ["status"],
|
|
900
|
+
message: `Unexpected status code: ${status}`
|
|
901
|
+
});
|
|
902
|
+
}
|
|
903
|
+
}).describe("FieldSchemesService.updateFieldsAssociatedWithSchemes.response"));
|
|
904
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("FieldSchemesService.removeFieldsAssociatedWithSchemes.response", zod_1.z.object({
|
|
905
|
+
status: zod_1.z.number(),
|
|
906
|
+
mediaType: zod_1.z.string(),
|
|
907
|
+
body: zod_1.z.unknown()
|
|
908
|
+
}).superRefine(({ status: status, body: body }, ctx) => {
|
|
909
|
+
if (status === 200 || status === 207) {
|
|
910
|
+
validationSchemaStorage_1.validationSchemaStorage.lazy("MinimalFieldSchemeToFieldsResponse").parse(body);
|
|
911
|
+
}
|
|
912
|
+
else if (status === 204) {
|
|
913
|
+
zod_1.z.unknown().parse(body);
|
|
914
|
+
}
|
|
915
|
+
else {
|
|
916
|
+
ctx.addIssue({
|
|
917
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
918
|
+
path: ["status"],
|
|
919
|
+
message: `Unexpected status code: ${status}`
|
|
920
|
+
});
|
|
921
|
+
}
|
|
922
|
+
}).describe("FieldSchemesService.removeFieldsAssociatedWithSchemes.response"));
|
|
923
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("FieldSchemesService.updateFieldAssociationSchemeItemParameters.response", zod_1.z.object({
|
|
924
|
+
status: zod_1.z.number(),
|
|
925
|
+
mediaType: zod_1.z.string(),
|
|
926
|
+
body: zod_1.z.unknown()
|
|
927
|
+
}).superRefine(({ status: status, body: body }, ctx) => {
|
|
928
|
+
if (status === 200 || status === 207) {
|
|
929
|
+
validationSchemaStorage_1.validationSchemaStorage.lazy("UpdateFieldSchemeParametersResponse").parse(body);
|
|
930
|
+
}
|
|
931
|
+
else if (status === 204) {
|
|
932
|
+
zod_1.z.unknown().parse(body);
|
|
933
|
+
}
|
|
934
|
+
else {
|
|
935
|
+
ctx.addIssue({
|
|
936
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
937
|
+
path: ["status"],
|
|
938
|
+
message: `Unexpected status code: ${status}`
|
|
939
|
+
});
|
|
940
|
+
}
|
|
941
|
+
}).describe("FieldSchemesService.updateFieldAssociationSchemeItemParameters.response"));
|
|
942
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("FieldSchemesService.removeFieldAssociationSchemeItemParameters.response", zod_1.z.object({
|
|
943
|
+
status: zod_1.z.number(),
|
|
944
|
+
mediaType: zod_1.z.string(),
|
|
945
|
+
body: zod_1.z.unknown()
|
|
946
|
+
}).superRefine(({ status: status, body: body }, ctx) => {
|
|
947
|
+
if (status === 200) {
|
|
948
|
+
return;
|
|
949
|
+
}
|
|
950
|
+
else if (status === 204) {
|
|
951
|
+
zod_1.z.unknown().parse(body);
|
|
952
|
+
}
|
|
953
|
+
else if (status === 207) {
|
|
954
|
+
validationSchemaStorage_1.validationSchemaStorage.lazy("RemoveFieldParametersResult").parse(body);
|
|
955
|
+
}
|
|
956
|
+
else {
|
|
957
|
+
ctx.addIssue({
|
|
958
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
959
|
+
path: ["status"],
|
|
960
|
+
message: `Unexpected status code: ${status}`
|
|
961
|
+
});
|
|
962
|
+
}
|
|
963
|
+
}).describe("FieldSchemesService.removeFieldAssociationSchemeItemParameters.response"));
|
|
964
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("FieldSchemesService.getProjectsWithFieldSchemes.response", zod_1.z.object({
|
|
965
|
+
status: zod_1.z.literal(200),
|
|
966
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
967
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("PageBean2GetProjectsWithFieldSchemesResponse")
|
|
968
|
+
}).describe("FieldSchemesService.getProjectsWithFieldSchemes.response"));
|
|
969
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("FieldSchemesService.associateProjectsToFieldAssociationSchemes.response", zod_1.z.object({
|
|
970
|
+
status: zod_1.z.number(),
|
|
971
|
+
mediaType: zod_1.z.string(),
|
|
972
|
+
body: zod_1.z.unknown()
|
|
973
|
+
}).superRefine(({ status: status, body: body }, ctx) => {
|
|
974
|
+
if (status === 200 || status === 207) {
|
|
975
|
+
validationSchemaStorage_1.validationSchemaStorage.lazy("FieldSchemeToProjectsResponse").parse(body);
|
|
976
|
+
}
|
|
977
|
+
else if (status === 204) {
|
|
978
|
+
zod_1.z.unknown().parse(body);
|
|
979
|
+
}
|
|
980
|
+
else {
|
|
981
|
+
ctx.addIssue({
|
|
982
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
983
|
+
path: ["status"],
|
|
984
|
+
message: `Unexpected status code: ${status}`
|
|
985
|
+
});
|
|
986
|
+
}
|
|
987
|
+
}).describe("FieldSchemesService.associateProjectsToFieldAssociationSchemes.response"));
|
|
988
|
+
validationSchemaStorage_1.validationSchemaStorage.registerOnce([fieldSchemes_1.registerFieldSchemesValidationSchemas]);
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
exports.FieldSchemesService = FieldSchemesService;
|
|
992
|
+
//# sourceMappingURL=FieldSchemesService.js.map
|