@resolution/jira-api-client 0.1.0 → 0.1.2
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/CHANGELOG.md +22 -0
- package/package.json +10 -3
- package/.eslintrc.js +0 -3
- package/config/api-typescript-generator.config.ts +0 -91
- package/config/compare-schemas.ts +0 -307
- package/src/index.ts +0 -47
- package/src/openapi/platform/base-jira-platform-api-client.ts +0 -2298
- package/src/openapi/platform/core/common-http-client.ts +0 -723
- package/src/openapi/platform/core/common-http-service.ts +0 -22
- package/src/openapi/platform/core/common-validation-schema-storage.ts +0 -105
- package/src/openapi/platform/models/announcement-banner.ts +0 -59
- package/src/openapi/platform/models/app-data-policies.ts +0 -79
- package/src/openapi/platform/models/app-migration.ts +0 -172
- package/src/openapi/platform/models/app-properties.ts +0 -32
- package/src/openapi/platform/models/audit-records.ts +0 -140
- package/src/openapi/platform/models/avatars.ts +0 -48
- package/src/openapi/platform/models/classification-levels.ts +0 -58
- package/src/openapi/platform/models/common.ts +0 -2669
- package/src/openapi/platform/models/dashboards.ts +0 -849
- package/src/openapi/platform/models/dynamic-modules.ts +0 -121
- package/src/openapi/platform/models/filter-sharing.ts +0 -103
- package/src/openapi/platform/models/filters.ts +0 -319
- package/src/openapi/platform/models/group-and-user-picker.ts +0 -85
- package/src/openapi/platform/models/groups.ts +0 -247
- package/src/openapi/platform/models/issue-attachments.ts +0 -290
- package/src/openapi/platform/models/issue-comment-properties.ts +0 -27
- package/src/openapi/platform/models/issue-comments.ts +0 -91
- package/src/openapi/platform/models/issue-custom-field-configuration-apps.ts +0 -96
- package/src/openapi/platform/models/issue-custom-field-contexts.ts +0 -1072
- package/src/openapi/platform/models/issue-custom-field-options-apps.ts +0 -273
- package/src/openapi/platform/models/issue-custom-field-options.ts +0 -283
- package/src/openapi/platform/models/issue-custom-field-values-apps.ts +0 -118
- package/src/openapi/platform/models/issue-field-configurations.ts +0 -435
- package/src/openapi/platform/models/issue-fields.ts +0 -392
- package/src/openapi/platform/models/issue-link-types.ts +0 -28
- package/src/openapi/platform/models/issue-links.ts +0 -185
- package/src/openapi/platform/models/issue-notification-schemes.ts +0 -370
- package/src/openapi/platform/models/issue-priorities.ts +0 -196
- package/src/openapi/platform/models/issue-properties.ts +0 -259
- package/src/openapi/platform/models/issue-remote-links.ts +0 -207
- package/src/openapi/platform/models/issue-resolutions.ts +0 -180
- package/src/openapi/platform/models/issue-search.ts +0 -367
- package/src/openapi/platform/models/issue-security-level.ts +0 -76
- package/src/openapi/platform/models/issue-security-schemes.ts +0 -496
- package/src/openapi/platform/models/issue-type-schemes.ts +0 -290
- package/src/openapi/platform/models/issue-type-screen-schemes.ts +0 -286
- package/src/openapi/platform/models/issue-types.ts +0 -66
- package/src/openapi/platform/models/issue-votes.ts +0 -38
- package/src/openapi/platform/models/issue-watchers.ts +0 -67
- package/src/openapi/platform/models/issue-worklogs.ts +0 -190
- package/src/openapi/platform/models/issues.ts +0 -1268
- package/src/openapi/platform/models/jira-expressions.ts +0 -578
- package/src/openapi/platform/models/jira-settings.ts +0 -118
- package/src/openapi/platform/models/jql-functions-apps.ts +0 -128
- package/src/openapi/platform/models/jql.ts +0 -783
- package/src/openapi/platform/models/labels.ts +0 -42
- package/src/openapi/platform/models/license-metrics.ts +0 -68
- package/src/openapi/platform/models/myself.ts +0 -29
- package/src/openapi/platform/models/permission-schemes.ts +0 -89
- package/src/openapi/platform/models/permissions.ts +0 -308
- package/src/openapi/platform/models/priority-schemes.ts +0 -527
- package/src/openapi/platform/models/project-avatars.ts +0 -29
- package/src/openapi/platform/models/project-classification-levels.ts +0 -24
- package/src/openapi/platform/models/project-components.ts +0 -231
- package/src/openapi/platform/models/project-email.ts +0 -27
- package/src/openapi/platform/models/project-features.ts +0 -78
- package/src/openapi/platform/models/project-permission-schemes.ts +0 -43
- package/src/openapi/platform/models/project-role-actors.ts +0 -107
- package/src/openapi/platform/models/project-roles.ts +0 -76
- package/src/openapi/platform/models/project-types.ts +0 -36
- package/src/openapi/platform/models/project-versions.ts +0 -216
- package/src/openapi/platform/models/projects.ts +0 -429
- package/src/openapi/platform/models/screen-schemes.ts +0 -192
- package/src/openapi/platform/models/screen-tab-fields.ts +0 -45
- package/src/openapi/platform/models/screens.ts +0 -171
- package/src/openapi/platform/models/server-info.ts +0 -100
- package/src/openapi/platform/models/service-registry.ts +0 -68
- package/src/openapi/platform/models/status.ts +0 -229
- package/src/openapi/platform/models/time-tracking.ts +0 -38
- package/src/openapi/platform/models/ui-modifications-apps.ts +0 -229
- package/src/openapi/platform/models/user-search.ts +0 -69
- package/src/openapi/platform/models/users.ts +0 -121
- package/src/openapi/platform/models/webhooks.ts +0 -307
- package/src/openapi/platform/models/workflow-scheme-drafts.ts +0 -58
- package/src/openapi/platform/models/workflow-scheme-project-associations.ts +0 -68
- package/src/openapi/platform/models/workflow-schemes.ts +0 -545
- package/src/openapi/platform/models/workflow-transition-properties.ts +0 -33
- package/src/openapi/platform/models/workflow-transition-rules.ts +0 -261
- package/src/openapi/platform/models/workflows.ts +0 -1943
- package/src/openapi/platform/services/announcement-banner-service.ts +0 -142
- package/src/openapi/platform/services/app-data-policies-service.ts +0 -136
- package/src/openapi/platform/services/app-migration-service.ts +0 -289
- package/src/openapi/platform/services/app-properties-service.ts +0 -441
- package/src/openapi/platform/services/application-roles-service.ts +0 -247
- package/src/openapi/platform/services/audit-records-service.ts +0 -164
- package/src/openapi/platform/services/avatars-service.ts +0 -769
- package/src/openapi/platform/services/classification-levels-service.ts +0 -131
- package/src/openapi/platform/services/dashboards-service.ts +0 -1721
- package/src/openapi/platform/services/dynamic-modules-service.ts +0 -127
- package/src/openapi/platform/services/filter-sharing-service.ts +0 -687
- package/src/openapi/platform/services/filters-service.ts +0 -1901
- package/src/openapi/platform/services/group-and-user-picker-service.ts +0 -224
- package/src/openapi/platform/services/groups-service.ts +0 -751
- package/src/openapi/platform/services/issue-attachments-service.ts +0 -900
- package/src/openapi/platform/services/issue-comment-properties-service.ts +0 -324
- package/src/openapi/platform/services/issue-comments-service.ts +0 -812
- package/src/openapi/platform/services/issue-custom-field-configuration-apps-service.ts +0 -277
- package/src/openapi/platform/services/issue-custom-field-contexts-service.ts +0 -1339
- package/src/openapi/platform/services/issue-custom-field-options-apps-service.ts +0 -994
- package/src/openapi/platform/services/issue-custom-field-options-service.ts +0 -651
- package/src/openapi/platform/services/issue-custom-field-values-apps-service.ts +0 -201
- package/src/openapi/platform/services/issue-field-configurations-service.ts +0 -1294
- package/src/openapi/platform/services/issue-fields-service.ts +0 -837
- package/src/openapi/platform/services/issue-link-types-service.ts +0 -360
- package/src/openapi/platform/services/issue-links-service.ts +0 -345
- package/src/openapi/platform/services/issue-navigator-settings-service.ts +0 -119
- package/src/openapi/platform/services/issue-notification-schemes-service.ts +0 -1209
- package/src/openapi/platform/services/issue-priorities-service.ts +0 -575
- package/src/openapi/platform/services/issue-properties-service.ts +0 -606
- package/src/openapi/platform/services/issue-remote-links-service.ts +0 -597
- package/src/openapi/platform/services/issue-resolutions-service.ts +0 -534
- package/src/openapi/platform/services/issue-search-service.ts +0 -1139
- package/src/openapi/platform/services/issue-security-level-service.ts +0 -250
- package/src/openapi/platform/services/issue-security-schemes-service.ts +0 -1240
- package/src/openapi/platform/services/issue-type-properties-service.ts +0 -325
- package/src/openapi/platform/services/issue-type-schemes-service.ts +0 -940
- package/src/openapi/platform/services/issue-type-screen-schemes-service.ts +0 -994
- package/src/openapi/platform/services/issue-types-service.ts +0 -679
- package/src/openapi/platform/services/issue-votes-service.ts +0 -221
- package/src/openapi/platform/services/issue-watchers-service.ts +0 -331
- package/src/openapi/platform/services/issue-worklog-properties-service.ts +0 -348
- package/src/openapi/platform/services/issue-worklogs-service.ts +0 -1089
- package/src/openapi/platform/services/issues-service.ts +0 -3346
- package/src/openapi/platform/services/jira-expressions-service.ts +0 -407
- package/src/openapi/platform/services/jira-settings-service.ts +0 -415
- package/src/openapi/platform/services/jql-functions-apps-service.ts +0 -219
- package/src/openapi/platform/services/jql-service.ts +0 -896
- package/src/openapi/platform/services/labels-service.ts +0 -89
- package/src/openapi/platform/services/license-metrics-service.ts +0 -216
- package/src/openapi/platform/services/myself-service.ts +0 -520
- package/src/openapi/platform/services/permission-schemes-service.ts +0 -926
- package/src/openapi/platform/services/permissions-service.ts +0 -407
- package/src/openapi/platform/services/priority-schemes-service.ts +0 -1001
- package/src/openapi/platform/services/project-avatars-service.ts +0 -341
- package/src/openapi/platform/services/project-categories-service.ts +0 -318
- package/src/openapi/platform/services/project-classification-levels-service.ts +0 -232
- package/src/openapi/platform/services/project-components-service.ts +0 -1332
- package/src/openapi/platform/services/project-email-service.ts +0 -161
- package/src/openapi/platform/services/project-features-service.ts +0 -207
- package/src/openapi/platform/services/project-key-and-name-validation-service.ts +0 -200
- package/src/openapi/platform/services/project-permission-schemes-service.ts +0 -384
- package/src/openapi/platform/services/project-properties-service.ts +0 -320
- package/src/openapi/platform/services/project-role-actors-service.ts +0 -627
- package/src/openapi/platform/services/project-roles-service.ts +0 -867
- package/src/openapi/platform/services/project-types-service.ts +0 -297
- package/src/openapi/platform/services/project-versions-service.ts +0 -1287
- package/src/openapi/platform/services/projects-service.ts +0 -2196
- package/src/openapi/platform/services/screen-schemes-service.ts +0 -334
- package/src/openapi/platform/services/screen-tab-fields-service.ts +0 -276
- package/src/openapi/platform/services/screen-tabs-service.ts +0 -421
- package/src/openapi/platform/services/screens-service.ts +0 -528
- package/src/openapi/platform/services/server-info-service.ts +0 -88
- package/src/openapi/platform/services/service-registry-service.ts +0 -89
- package/src/openapi/platform/services/status-service.ts +0 -498
- package/src/openapi/platform/services/tasks-service.ts +0 -159
- package/src/openapi/platform/services/time-tracking-service.ts +0 -386
- package/src/openapi/platform/services/ui-modifications-apps-service.ts +0 -403
- package/src/openapi/platform/services/user-properties-service.ts +0 -413
- package/src/openapi/platform/services/user-search-service.ts +0 -1214
- package/src/openapi/platform/services/users-service.ts +0 -1108
- package/src/openapi/platform/services/webhooks-service.ts +0 -458
- package/src/openapi/platform/services/workflow-scheme-drafts-service.ts +0 -1313
- package/src/openapi/platform/services/workflow-scheme-project-associations-service.ts +0 -189
- package/src/openapi/platform/services/workflow-schemes-service.ts +0 -1617
- package/src/openapi/platform/services/workflow-status-categories-service.ts +0 -151
- package/src/openapi/platform/services/workflow-statuses-service.ts +0 -176
- package/src/openapi/platform/services/workflow-transition-properties-service.ts +0 -388
- package/src/openapi/platform/services/workflow-transition-rules-service.ts +0 -485
- package/src/openapi/platform/services/workflows-service.ts +0 -3477
- package/src/openapi/platform/validation-schema-storage.ts +0 -186
- package/src/openapi/software/base-jira-software-api-client.ts +0 -447
- package/src/openapi/software/core/common-http-client.ts +0 -723
- package/src/openapi/software/core/common-http-service.ts +0 -22
- package/src/openapi/software/core/common-validation-schema-storage.ts +0 -105
- package/src/openapi/software/models/board.ts +0 -918
- package/src/openapi/software/services/backlog-service.ts +0 -160
- package/src/openapi/software/services/board-service.ts +0 -4189
- package/src/openapi/software/services/builds-service.ts +0 -571
- package/src/openapi/software/services/deployments-service.ts +0 -403
- package/src/openapi/software/services/dev-ops-components-service.ts +0 -371
- package/src/openapi/software/services/development-information-service.ts +0 -2357
- package/src/openapi/software/services/epic-service.ts +0 -854
- package/src/openapi/software/services/feature-flags-service.ts +0 -303
- package/src/openapi/software/services/issue-service.ts +0 -529
- package/src/openapi/software/services/operations-service.ts +0 -741
- package/src/openapi/software/services/remote-links-service.ts +0 -653
- package/src/openapi/software/services/security-information-service.ts +0 -495
- package/src/openapi/software/services/sprint-service.ts +0 -969
- package/src/openapi/software/validation-schema-storage.ts +0 -186
- package/tsconfig.build.json +0 -7
- package/tsconfig.json +0 -4
|
@@ -1,837 +0,0 @@
|
|
|
1
|
-
// DO NOT EDIT!
|
|
2
|
-
// This file is generated by "api-typescript-generator".
|
|
3
|
-
// To update this file run "yarn build:openapi".
|
|
4
|
-
import { z } from "zod";
|
|
5
|
-
|
|
6
|
-
import * as commonHttpClient from "../core/common-http-client";
|
|
7
|
-
import { CommonHttpService } from "../core/common-http-service";
|
|
8
|
-
import {
|
|
9
|
-
type FieldDetails,
|
|
10
|
-
registerCommonValidationSchemas,
|
|
11
|
-
} from "../models/common";
|
|
12
|
-
import {
|
|
13
|
-
type CustomFieldDefinitionJsonBean,
|
|
14
|
-
type PageBeanContext,
|
|
15
|
-
type PageBeanField,
|
|
16
|
-
registerIssueFieldsValidationSchemas,
|
|
17
|
-
type UpdateCustomFieldDetails,
|
|
18
|
-
} from "../models/issue-fields";
|
|
19
|
-
import { validationSchemaStorage } from "../validation-schema-storage";
|
|
20
|
-
/**
|
|
21
|
-
* This resource represents issue fields, both system and custom fields. Use it to
|
|
22
|
-
* get fields, field configurations, and create custom fields.
|
|
23
|
-
*/
|
|
24
|
-
export class IssueFieldsService extends CommonHttpService {
|
|
25
|
-
/**
|
|
26
|
-
* Creates a custom field.
|
|
27
|
-
*
|
|
28
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
29
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
30
|
-
*
|
|
31
|
-
* @returns Returned if the custom field is created.
|
|
32
|
-
*
|
|
33
|
-
* example: {
|
|
34
|
-
* "clauseNames": [
|
|
35
|
-
* "cf[10101]",
|
|
36
|
-
* "New custom field"
|
|
37
|
-
* ],
|
|
38
|
-
* "custom": true,
|
|
39
|
-
* "id": "customfield_10101",
|
|
40
|
-
* "key": "customfield_10101",
|
|
41
|
-
* "name": "New custom field",
|
|
42
|
-
* "navigable": true,
|
|
43
|
-
* "orderable": true,
|
|
44
|
-
* "schema": {
|
|
45
|
-
* "custom": "com.atlassian.jira.plugin.system.customfieldtypes:project",
|
|
46
|
-
* "customId": 10101,
|
|
47
|
-
* "type": "project"
|
|
48
|
-
* },
|
|
49
|
-
* "searchable": true,
|
|
50
|
-
* "untranslatedName": "New custom field"
|
|
51
|
-
* }
|
|
52
|
-
* @path {POST} /rest/api/3/field
|
|
53
|
-
* @scopes-current manage:jira-configuration
|
|
54
|
-
* @scopes-beta write:field:jira, read:avatar:jira, read:field:jira,
|
|
55
|
-
* read:project-category:jira, read:project:jira, read:field-configuration:jira
|
|
56
|
-
*/
|
|
57
|
-
createCustomField({
|
|
58
|
-
customFieldDefinitionJsonBean,
|
|
59
|
-
}: {
|
|
60
|
-
/**
|
|
61
|
-
* Definition of the custom field to be created
|
|
62
|
-
*
|
|
63
|
-
* @example {
|
|
64
|
-
* "description": "Custom field for picking groups",
|
|
65
|
-
* "name": "New custom field",
|
|
66
|
-
* "searcherKey":
|
|
67
|
-
* "com.atlassian.jira.plugin.system.customfieldtypes:grouppickersearcher",
|
|
68
|
-
* "type": "com.atlassian.jira.plugin.system.customfieldtypes:grouppicker"
|
|
69
|
-
* }
|
|
70
|
-
*/
|
|
71
|
-
customFieldDefinitionJsonBean: CustomFieldDefinitionJsonBean;
|
|
72
|
-
}): Promise<FieldDetails> {
|
|
73
|
-
return this.getClientInstance()
|
|
74
|
-
.request({
|
|
75
|
-
path: "/rest/api/3/field",
|
|
76
|
-
method: "POST",
|
|
77
|
-
headers: {
|
|
78
|
-
"Content-Type": "application/json",
|
|
79
|
-
},
|
|
80
|
-
body: customFieldDefinitionJsonBean,
|
|
81
|
-
})
|
|
82
|
-
.then(
|
|
83
|
-
this.getClientInstance().responseHandler({
|
|
84
|
-
201: {
|
|
85
|
-
"application/json": "json",
|
|
86
|
-
},
|
|
87
|
-
}),
|
|
88
|
-
)
|
|
89
|
-
.then(
|
|
90
|
-
commonHttpClient.castResponse<{
|
|
91
|
-
status: 201;
|
|
92
|
-
mediaType: "application/json";
|
|
93
|
-
body: FieldDetails;
|
|
94
|
-
}>(),
|
|
95
|
-
)
|
|
96
|
-
.then(
|
|
97
|
-
validationSchemaStorage.validator(
|
|
98
|
-
"IssueFieldsService.createCustomField.response",
|
|
99
|
-
),
|
|
100
|
-
)
|
|
101
|
-
.then(commonHttpClient.getBody);
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Deletes a custom field. The custom field is deleted whether it is in the trash
|
|
105
|
-
* or not. See [Edit or delete a custom
|
|
106
|
-
* field](https://confluence.atlassian.com/x/Z44fOw) for more information on
|
|
107
|
-
* trashing and deleting custom fields.
|
|
108
|
-
*
|
|
109
|
-
* This operation is [asynchronous](#async). Follow the `location` link in the
|
|
110
|
-
* response to determine the status of the task and use [Get
|
|
111
|
-
* task](#api-rest-api-3-task-taskId-get) to obtain subsequent updates.
|
|
112
|
-
*
|
|
113
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
114
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
115
|
-
*
|
|
116
|
-
* @path {DELETE} /rest/api/3/field/{id}
|
|
117
|
-
* @scopes-current manage:jira-configuration
|
|
118
|
-
* @scopes-beta delete:field:jira
|
|
119
|
-
*/
|
|
120
|
-
deleteCustomField({
|
|
121
|
-
id,
|
|
122
|
-
}: {
|
|
123
|
-
/** The ID of a custom field. */
|
|
124
|
-
id: string;
|
|
125
|
-
}): Promise<void> {
|
|
126
|
-
return this.getClientInstance()
|
|
127
|
-
.request({
|
|
128
|
-
path: "/rest/api/3/field/{id}",
|
|
129
|
-
method: "DELETE",
|
|
130
|
-
pathParams: {
|
|
131
|
-
id,
|
|
132
|
-
},
|
|
133
|
-
})
|
|
134
|
-
.then(commonHttpClient.discardResult);
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Returns a [paginated](#pagination) list of the contexts a field is used in.
|
|
138
|
-
* Deprecated, use [ Get custom field
|
|
139
|
-
* contexts](#api-rest-api-3-field-fieldId-context-get).
|
|
140
|
-
*
|
|
141
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
142
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
143
|
-
*
|
|
144
|
-
* @deprecated
|
|
145
|
-
* @returns Returned if the request is successful.
|
|
146
|
-
*
|
|
147
|
-
* example: {
|
|
148
|
-
* "isLast": false,
|
|
149
|
-
* "maxResults": 1,
|
|
150
|
-
* "startAt": 0,
|
|
151
|
-
* "total": 5,
|
|
152
|
-
* "values": [
|
|
153
|
-
* {
|
|
154
|
-
* "id": 10001,
|
|
155
|
-
* "name": "Default Context"
|
|
156
|
-
* }
|
|
157
|
-
* ]
|
|
158
|
-
* }
|
|
159
|
-
* @path {GET} /rest/api/3/field/{fieldId}/contexts
|
|
160
|
-
* @scopes-current manage:jira-project
|
|
161
|
-
* @scopes-beta read:field:jira, read:avatar:jira, read:project-category:jira, read:project:jira
|
|
162
|
-
*/
|
|
163
|
-
getContextsForFieldDeprecated({
|
|
164
|
-
fieldId,
|
|
165
|
-
startAt,
|
|
166
|
-
maxResults,
|
|
167
|
-
}: {
|
|
168
|
-
/** The ID of the field to return contexts for. */
|
|
169
|
-
fieldId: string;
|
|
170
|
-
/** The index of the first item to return in a page of results (page offset). */
|
|
171
|
-
startAt?: number;
|
|
172
|
-
/** The maximum number of items to return per page. */
|
|
173
|
-
maxResults?: number;
|
|
174
|
-
}): Promise<PageBeanContext> {
|
|
175
|
-
return this.getClientInstance()
|
|
176
|
-
.request({
|
|
177
|
-
path: "/rest/api/3/field/{fieldId}/contexts",
|
|
178
|
-
method: "GET",
|
|
179
|
-
pathParams: {
|
|
180
|
-
fieldId,
|
|
181
|
-
},
|
|
182
|
-
query: {
|
|
183
|
-
startAt,
|
|
184
|
-
maxResults,
|
|
185
|
-
},
|
|
186
|
-
})
|
|
187
|
-
.then(
|
|
188
|
-
this.getClientInstance().responseHandler({
|
|
189
|
-
200: {
|
|
190
|
-
"application/json": "json",
|
|
191
|
-
},
|
|
192
|
-
}),
|
|
193
|
-
)
|
|
194
|
-
.then(
|
|
195
|
-
commonHttpClient.castResponse<{
|
|
196
|
-
status: 200;
|
|
197
|
-
mediaType: "application/json";
|
|
198
|
-
body: PageBeanContext;
|
|
199
|
-
}>(),
|
|
200
|
-
)
|
|
201
|
-
.then(
|
|
202
|
-
validationSchemaStorage.validator(
|
|
203
|
-
"IssueFieldsService.getContextsForFieldDeprecated.response",
|
|
204
|
-
),
|
|
205
|
-
)
|
|
206
|
-
.then(commonHttpClient.getBody);
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* Returns system and custom issue fields according to the following rules:
|
|
210
|
-
*
|
|
211
|
-
* * Fields that cannot be added to the issue navigator are always returned.
|
|
212
|
-
* * Fields that cannot be placed on an issue screen are always returned.
|
|
213
|
-
* * Fields that depend on global Jira settings are only returned if the setting
|
|
214
|
-
* is enabled. That is, timetracking fields, subtasks, votes, and watches.
|
|
215
|
-
* * For all other fields, this operation only returns the fields that the user
|
|
216
|
-
* has permission to view (that is, the field is used in at least one project that
|
|
217
|
-
* the user has *Browse Projects* [project
|
|
218
|
-
* permission](https://confluence.atlassian.com/x/yodKLg) for.)
|
|
219
|
-
*
|
|
220
|
-
* This operation can be accessed anonymously.
|
|
221
|
-
*
|
|
222
|
-
* **[Permissions](#permissions) required:** None.
|
|
223
|
-
*
|
|
224
|
-
* @returns Returned if the request is successful.
|
|
225
|
-
*
|
|
226
|
-
* example: [
|
|
227
|
-
* {
|
|
228
|
-
* "clauseNames": [
|
|
229
|
-
* "description"
|
|
230
|
-
* ],
|
|
231
|
-
* "custom": false,
|
|
232
|
-
* "id": "description",
|
|
233
|
-
* "name": "Description",
|
|
234
|
-
* "navigable": true,
|
|
235
|
-
* "orderable": true,
|
|
236
|
-
* "schema": {
|
|
237
|
-
* "system": "description",
|
|
238
|
-
* "type": "string"
|
|
239
|
-
* },
|
|
240
|
-
* "searchable": true
|
|
241
|
-
* },
|
|
242
|
-
* {
|
|
243
|
-
* "clauseNames": [
|
|
244
|
-
* "summary"
|
|
245
|
-
* ],
|
|
246
|
-
* "custom": false,
|
|
247
|
-
* "id": "summary",
|
|
248
|
-
* "key": "summary",
|
|
249
|
-
* "name": "Summary",
|
|
250
|
-
* "navigable": true,
|
|
251
|
-
* "orderable": true,
|
|
252
|
-
* "schema": {
|
|
253
|
-
* "system": "summary",
|
|
254
|
-
* "type": "string"
|
|
255
|
-
* },
|
|
256
|
-
* "searchable": true
|
|
257
|
-
* }
|
|
258
|
-
* ]
|
|
259
|
-
* @path {GET} /rest/api/3/field
|
|
260
|
-
* @scopes-current read:jira-work
|
|
261
|
-
* @scopes-beta read:field:jira, read:avatar:jira, read:project-category:jira,
|
|
262
|
-
* read:project:jira, read:field-configuration:jira
|
|
263
|
-
*/
|
|
264
|
-
getFields(): Promise<FieldDetails[]> {
|
|
265
|
-
return this.getClientInstance()
|
|
266
|
-
.request({
|
|
267
|
-
path: "/rest/api/3/field",
|
|
268
|
-
method: "GET",
|
|
269
|
-
})
|
|
270
|
-
.then(
|
|
271
|
-
this.getClientInstance().responseHandler({
|
|
272
|
-
200: {
|
|
273
|
-
"application/json": "json",
|
|
274
|
-
},
|
|
275
|
-
}),
|
|
276
|
-
)
|
|
277
|
-
.then(
|
|
278
|
-
commonHttpClient.castResponse<{
|
|
279
|
-
status: 200;
|
|
280
|
-
mediaType: "application/json";
|
|
281
|
-
body: FieldDetails[];
|
|
282
|
-
}>(),
|
|
283
|
-
)
|
|
284
|
-
.then(
|
|
285
|
-
validationSchemaStorage.validator(
|
|
286
|
-
"IssueFieldsService.getFields.response",
|
|
287
|
-
),
|
|
288
|
-
)
|
|
289
|
-
.then(commonHttpClient.getBody);
|
|
290
|
-
}
|
|
291
|
-
/**
|
|
292
|
-
* Returns a [paginated](#pagination) list of fields for Classic Jira projects.
|
|
293
|
-
* The list can include:
|
|
294
|
-
*
|
|
295
|
-
* * all fields
|
|
296
|
-
* * specific fields, by defining `id`
|
|
297
|
-
* * fields that contain a string in the field name or description, by defining
|
|
298
|
-
* `query`
|
|
299
|
-
* * specific fields that contain a string in the field name or description, by
|
|
300
|
-
* defining `id` and `query`
|
|
301
|
-
*
|
|
302
|
-
* Only custom fields can be queried, `type` must be set to `custom`.
|
|
303
|
-
*
|
|
304
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
305
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
306
|
-
*
|
|
307
|
-
* @returns Returned if the request is successful.
|
|
308
|
-
*
|
|
309
|
-
* example: {
|
|
310
|
-
* "isLast": false,
|
|
311
|
-
* "maxResults": 50,
|
|
312
|
-
* "startAt": 0,
|
|
313
|
-
* "total": 2,
|
|
314
|
-
* "values": [
|
|
315
|
-
* {
|
|
316
|
-
* "id": "customfield_10000",
|
|
317
|
-
* "name": "Approvers",
|
|
318
|
-
* "schema": {
|
|
319
|
-
* "custom":
|
|
320
|
-
* "com.atlassian.jira.plugin.system.customfieldtypes:multiuserpicker",
|
|
321
|
-
* "customId": 10000,
|
|
322
|
-
* "items": "user",
|
|
323
|
-
* "type": "array"
|
|
324
|
-
* },
|
|
325
|
-
* "description": "Contains users needed for approval. This custom field was
|
|
326
|
-
* created by Jira Service Desk.",
|
|
327
|
-
* "key": "customfield_10000",
|
|
328
|
-
* "stableId": "sfid:approvers",
|
|
329
|
-
* "isLocked": true,
|
|
330
|
-
* "searcherKey":
|
|
331
|
-
* "com.atlassian.jira.plugin.system.customfieldtypes:userpickergroupsearcher",
|
|
332
|
-
* "screensCount": 2,
|
|
333
|
-
* "contextsCount": 2,
|
|
334
|
-
* "lastUsed": {
|
|
335
|
-
* "type": "TRACKED",
|
|
336
|
-
* "value": "2021-01-28T07:37:40.000+0000"
|
|
337
|
-
* }
|
|
338
|
-
* },
|
|
339
|
-
* {
|
|
340
|
-
* "id": "customfield_10001",
|
|
341
|
-
* "name": "Change reason",
|
|
342
|
-
* "schema": {
|
|
343
|
-
* "custom": "com.atlassian.jira.plugin.system.customfieldtypes:select",
|
|
344
|
-
* "customId": 10001,
|
|
345
|
-
* "type": "option"
|
|
346
|
-
* },
|
|
347
|
-
* "description": "Choose the reason for the change request",
|
|
348
|
-
* "key": "customfield_10001",
|
|
349
|
-
* "stableId": "sfid:change-reason",
|
|
350
|
-
* "isLocked": false,
|
|
351
|
-
* "searcherKey":
|
|
352
|
-
* "com.atlassian.jira.plugin.system.customfieldtypes:multiselectsearcher",
|
|
353
|
-
* "screensCount": 2,
|
|
354
|
-
* "contextsCount": 2,
|
|
355
|
-
* "projectsCount": 2,
|
|
356
|
-
* "lastUsed": {
|
|
357
|
-
* "type": "NOT_TRACKED"
|
|
358
|
-
* }
|
|
359
|
-
* }
|
|
360
|
-
* ]
|
|
361
|
-
* }
|
|
362
|
-
* @path {GET} /rest/api/3/field/search
|
|
363
|
-
* @scopes-current read:jira-work
|
|
364
|
-
* @scopes-beta read:field:jira, read:field-configuration:jira
|
|
365
|
-
*/
|
|
366
|
-
getFieldsPaginated({
|
|
367
|
-
startAt,
|
|
368
|
-
maxResults,
|
|
369
|
-
type,
|
|
370
|
-
id,
|
|
371
|
-
query,
|
|
372
|
-
orderBy,
|
|
373
|
-
expand,
|
|
374
|
-
}: {
|
|
375
|
-
/** The index of the first item to return in a page of results (page offset). */
|
|
376
|
-
startAt?: number;
|
|
377
|
-
/** The maximum number of items to return per page. */
|
|
378
|
-
maxResults?: number;
|
|
379
|
-
/** The type of fields to search. */
|
|
380
|
-
type?: ("custom" | "system")[];
|
|
381
|
-
/** The IDs of the custom fields to return or, where `query` is specified, filter. */
|
|
382
|
-
id?: string[];
|
|
383
|
-
/**
|
|
384
|
-
* String used to perform a case-insensitive partial match with field names or
|
|
385
|
-
* descriptions.
|
|
386
|
-
*/
|
|
387
|
-
query?: string;
|
|
388
|
-
/**
|
|
389
|
-
* [Order](#ordering) the results by a field:
|
|
390
|
-
*
|
|
391
|
-
* * `contextsCount` sorts by the number of contexts related to a field
|
|
392
|
-
* * `lastUsed` sorts by the date when the value of the field last changed
|
|
393
|
-
* * `name` sorts by the field name
|
|
394
|
-
* * `screensCount` sorts by the number of screens related to a field
|
|
395
|
-
*/
|
|
396
|
-
orderBy?:
|
|
397
|
-
| "contextsCount"
|
|
398
|
-
| "-contextsCount"
|
|
399
|
-
| "+contextsCount"
|
|
400
|
-
| "lastUsed"
|
|
401
|
-
| "-lastUsed"
|
|
402
|
-
| "+lastUsed"
|
|
403
|
-
| "name"
|
|
404
|
-
| "-name"
|
|
405
|
-
| "+name"
|
|
406
|
-
| "screensCount"
|
|
407
|
-
| "-screensCount"
|
|
408
|
-
| "+screensCount"
|
|
409
|
-
| "projectsCount"
|
|
410
|
-
| "-projectsCount"
|
|
411
|
-
| "+projectsCount";
|
|
412
|
-
/**
|
|
413
|
-
* Use [expand](#expansion) to include additional information in the response.
|
|
414
|
-
* This parameter accepts a comma-separated list. Expand options include:
|
|
415
|
-
*
|
|
416
|
-
* * `key` returns the key for each field
|
|
417
|
-
* * `stableId` returns the stableId for each field
|
|
418
|
-
* * `lastUsed` returns the date when the value of the field last changed
|
|
419
|
-
* * `screensCount` returns the number of screens related to a field
|
|
420
|
-
* * `contextsCount` returns the number of contexts related to a field
|
|
421
|
-
* * `isLocked` returns information about whether the field is
|
|
422
|
-
* [locked](https://confluence.atlassian.com/x/ZSN7Og)
|
|
423
|
-
* * `searcherKey` returns the searcher key for each custom field
|
|
424
|
-
*/
|
|
425
|
-
expand?: string;
|
|
426
|
-
}): Promise<PageBeanField> {
|
|
427
|
-
return this.getClientInstance()
|
|
428
|
-
.request({
|
|
429
|
-
path: "/rest/api/3/field/search",
|
|
430
|
-
method: "GET",
|
|
431
|
-
query: {
|
|
432
|
-
startAt,
|
|
433
|
-
maxResults,
|
|
434
|
-
type,
|
|
435
|
-
id,
|
|
436
|
-
query,
|
|
437
|
-
orderBy,
|
|
438
|
-
expand,
|
|
439
|
-
},
|
|
440
|
-
})
|
|
441
|
-
.then(
|
|
442
|
-
this.getClientInstance().responseHandler({
|
|
443
|
-
200: {
|
|
444
|
-
"application/json": "json",
|
|
445
|
-
},
|
|
446
|
-
}),
|
|
447
|
-
)
|
|
448
|
-
.then(
|
|
449
|
-
commonHttpClient.castResponse<{
|
|
450
|
-
status: 200;
|
|
451
|
-
mediaType: "application/json";
|
|
452
|
-
body: PageBeanField;
|
|
453
|
-
}>(),
|
|
454
|
-
)
|
|
455
|
-
.then(
|
|
456
|
-
validationSchemaStorage.validator(
|
|
457
|
-
"IssueFieldsService.getFieldsPaginated.response",
|
|
458
|
-
),
|
|
459
|
-
)
|
|
460
|
-
.then(commonHttpClient.getBody);
|
|
461
|
-
}
|
|
462
|
-
/**
|
|
463
|
-
* Returns a [paginated](#pagination) list of fields in the trash. The list may be
|
|
464
|
-
* restricted to fields whose field name or description partially match a string.
|
|
465
|
-
*
|
|
466
|
-
* Only custom fields can be queried, `type` must be set to `custom`.
|
|
467
|
-
*
|
|
468
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
469
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
470
|
-
*
|
|
471
|
-
* @returns Returned if the request is successful.
|
|
472
|
-
*
|
|
473
|
-
* example: {
|
|
474
|
-
* "isLast": false,
|
|
475
|
-
* "maxResults": 50,
|
|
476
|
-
* "startAt": 0,
|
|
477
|
-
* "total": 1,
|
|
478
|
-
* "values": [
|
|
479
|
-
* {
|
|
480
|
-
* "id": "customfield_10000",
|
|
481
|
-
* "name": "Approvers",
|
|
482
|
-
* "schema": {
|
|
483
|
-
* "custom":
|
|
484
|
-
* "com.atlassian.jira.plugin.system.customfieldtypes:multiuserpicker",
|
|
485
|
-
* "customId": 10003,
|
|
486
|
-
* "type": "array"
|
|
487
|
-
* },
|
|
488
|
-
* "description": "Contains users needed for approval. This custom field was
|
|
489
|
-
* created by Jira Service Desk.",
|
|
490
|
-
* "key": "customfield_10003",
|
|
491
|
-
* "trashedDate": "2022-10-06T07:32:47.000+0000",
|
|
492
|
-
* "trashedBy": {
|
|
493
|
-
* "accountId": "5b10a2844c20165700ede21g",
|
|
494
|
-
* "active": true,
|
|
495
|
-
* "avatarUrls": {
|
|
496
|
-
* "16x16":
|
|
497
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
|
|
498
|
-
* "24x24":
|
|
499
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
|
|
500
|
-
* "32x32":
|
|
501
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
|
|
502
|
-
* "48x48":
|
|
503
|
-
* "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
|
|
504
|
-
* },
|
|
505
|
-
* "displayName": "Mia Krystof",
|
|
506
|
-
* "emailAddress": "mia@example.com",
|
|
507
|
-
* "self":
|
|
508
|
-
* "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g",
|
|
509
|
-
* "timeZone": "Australia/Sydney"
|
|
510
|
-
* },
|
|
511
|
-
* "plannedDeletionDate": "2022-10-24T07:32:47.000+0000"
|
|
512
|
-
* }
|
|
513
|
-
* ]
|
|
514
|
-
* }
|
|
515
|
-
* @path {GET} /rest/api/3/field/search/trashed
|
|
516
|
-
* @scopes-current read:jira-work
|
|
517
|
-
* @scopes-beta read:field:jira, read:field-configuration:jira, read:user:jira
|
|
518
|
-
*/
|
|
519
|
-
getTrashedFieldsPaginated({
|
|
520
|
-
startAt,
|
|
521
|
-
maxResults,
|
|
522
|
-
id,
|
|
523
|
-
query,
|
|
524
|
-
expand,
|
|
525
|
-
orderBy,
|
|
526
|
-
}: {
|
|
527
|
-
/** The index of the first item to return in a page of results (page offset). */
|
|
528
|
-
startAt?: number;
|
|
529
|
-
/** The maximum number of items to return per page. */
|
|
530
|
-
maxResults?: number;
|
|
531
|
-
id?: string[];
|
|
532
|
-
/**
|
|
533
|
-
* String used to perform a case-insensitive partial match with field names or
|
|
534
|
-
* descriptions.
|
|
535
|
-
*/
|
|
536
|
-
query?: string;
|
|
537
|
-
expand?:
|
|
538
|
-
| "name"
|
|
539
|
-
| "-name"
|
|
540
|
-
| "+name"
|
|
541
|
-
| "trashDate"
|
|
542
|
-
| "-trashDate"
|
|
543
|
-
| "+trashDate"
|
|
544
|
-
| "plannedDeletionDate"
|
|
545
|
-
| "-plannedDeletionDate"
|
|
546
|
-
| "+plannedDeletionDate"
|
|
547
|
-
| "projectsCount"
|
|
548
|
-
| "-projectsCount"
|
|
549
|
-
| "+projectsCount";
|
|
550
|
-
/**
|
|
551
|
-
* [Order](#ordering) the results by a field:
|
|
552
|
-
*
|
|
553
|
-
* * `name` sorts by the field name
|
|
554
|
-
* * `trashDate` sorts by the date the field was moved to the trash
|
|
555
|
-
* * `plannedDeletionDate` sorts by the planned deletion date
|
|
556
|
-
*/
|
|
557
|
-
orderBy?: string;
|
|
558
|
-
}): Promise<PageBeanField> {
|
|
559
|
-
return this.getClientInstance()
|
|
560
|
-
.request({
|
|
561
|
-
path: "/rest/api/3/field/search/trashed",
|
|
562
|
-
method: "GET",
|
|
563
|
-
query: {
|
|
564
|
-
startAt,
|
|
565
|
-
maxResults,
|
|
566
|
-
id,
|
|
567
|
-
query,
|
|
568
|
-
expand,
|
|
569
|
-
orderBy,
|
|
570
|
-
},
|
|
571
|
-
})
|
|
572
|
-
.then(
|
|
573
|
-
this.getClientInstance().responseHandler({
|
|
574
|
-
200: {
|
|
575
|
-
"application/json": "json",
|
|
576
|
-
},
|
|
577
|
-
}),
|
|
578
|
-
)
|
|
579
|
-
.then(
|
|
580
|
-
commonHttpClient.castResponse<{
|
|
581
|
-
status: 200;
|
|
582
|
-
mediaType: "application/json";
|
|
583
|
-
body: PageBeanField;
|
|
584
|
-
}>(),
|
|
585
|
-
)
|
|
586
|
-
.then(
|
|
587
|
-
validationSchemaStorage.validator(
|
|
588
|
-
"IssueFieldsService.getTrashedFieldsPaginated.response",
|
|
589
|
-
),
|
|
590
|
-
)
|
|
591
|
-
.then(commonHttpClient.getBody);
|
|
592
|
-
}
|
|
593
|
-
/**
|
|
594
|
-
* Restores a custom field from trash. See [Edit or delete a custom
|
|
595
|
-
* field](https://confluence.atlassian.com/x/Z44fOw) for more information on
|
|
596
|
-
* trashing and deleting custom fields.
|
|
597
|
-
*
|
|
598
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
599
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
600
|
-
*
|
|
601
|
-
* @returns Returned if the request is successful.
|
|
602
|
-
* @path {POST} /rest/api/3/field/{id}/restore
|
|
603
|
-
* @scopes-current manage:jira-configuration
|
|
604
|
-
* @scopes-beta write:field:jira
|
|
605
|
-
*/
|
|
606
|
-
restoreCustomField({
|
|
607
|
-
id,
|
|
608
|
-
}: {
|
|
609
|
-
/** The ID of a custom field. */
|
|
610
|
-
id: string;
|
|
611
|
-
}): Promise<unknown> {
|
|
612
|
-
return this.getClientInstance()
|
|
613
|
-
.request({
|
|
614
|
-
path: "/rest/api/3/field/{id}/restore",
|
|
615
|
-
method: "POST",
|
|
616
|
-
pathParams: {
|
|
617
|
-
id,
|
|
618
|
-
},
|
|
619
|
-
})
|
|
620
|
-
.then(
|
|
621
|
-
this.getClientInstance().responseHandler({
|
|
622
|
-
200: {
|
|
623
|
-
"application/json": "json",
|
|
624
|
-
},
|
|
625
|
-
}),
|
|
626
|
-
)
|
|
627
|
-
.then(
|
|
628
|
-
commonHttpClient.castResponse<{
|
|
629
|
-
status: 200;
|
|
630
|
-
mediaType: "application/json";
|
|
631
|
-
body: unknown;
|
|
632
|
-
}>(),
|
|
633
|
-
)
|
|
634
|
-
.then(
|
|
635
|
-
validationSchemaStorage.validator(
|
|
636
|
-
"IssueFieldsService.restoreCustomField.response",
|
|
637
|
-
),
|
|
638
|
-
)
|
|
639
|
-
.then(commonHttpClient.getBody);
|
|
640
|
-
}
|
|
641
|
-
/**
|
|
642
|
-
* Moves a custom field to trash. See [Edit or delete a custom
|
|
643
|
-
* field](https://confluence.atlassian.com/x/Z44fOw) for more information on
|
|
644
|
-
* trashing and deleting custom fields.
|
|
645
|
-
*
|
|
646
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
647
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
648
|
-
*
|
|
649
|
-
* @returns Returned if the request is successful.
|
|
650
|
-
* @path {POST} /rest/api/3/field/{id}/trash
|
|
651
|
-
* @scopes-current manage:jira-configuration
|
|
652
|
-
* @scopes-beta delete:field:jira
|
|
653
|
-
*/
|
|
654
|
-
trashCustomField({
|
|
655
|
-
id,
|
|
656
|
-
}: {
|
|
657
|
-
/** The ID of a custom field. */
|
|
658
|
-
id: string;
|
|
659
|
-
}): Promise<unknown> {
|
|
660
|
-
return this.getClientInstance()
|
|
661
|
-
.request({
|
|
662
|
-
path: "/rest/api/3/field/{id}/trash",
|
|
663
|
-
method: "POST",
|
|
664
|
-
pathParams: {
|
|
665
|
-
id,
|
|
666
|
-
},
|
|
667
|
-
})
|
|
668
|
-
.then(
|
|
669
|
-
this.getClientInstance().responseHandler({
|
|
670
|
-
200: {
|
|
671
|
-
"application/json": "json",
|
|
672
|
-
},
|
|
673
|
-
}),
|
|
674
|
-
)
|
|
675
|
-
.then(
|
|
676
|
-
commonHttpClient.castResponse<{
|
|
677
|
-
status: 200;
|
|
678
|
-
mediaType: "application/json";
|
|
679
|
-
body: unknown;
|
|
680
|
-
}>(),
|
|
681
|
-
)
|
|
682
|
-
.then(
|
|
683
|
-
validationSchemaStorage.validator(
|
|
684
|
-
"IssueFieldsService.trashCustomField.response",
|
|
685
|
-
),
|
|
686
|
-
)
|
|
687
|
-
.then(commonHttpClient.getBody);
|
|
688
|
-
}
|
|
689
|
-
/**
|
|
690
|
-
* Updates a custom field.
|
|
691
|
-
*
|
|
692
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
693
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
694
|
-
*
|
|
695
|
-
* @returns Returned if the request is successful.
|
|
696
|
-
* @path {PUT} /rest/api/3/field/{fieldId}
|
|
697
|
-
* @scopes-current manage:jira-configuration
|
|
698
|
-
* @scopes-beta write:field:jira
|
|
699
|
-
*/
|
|
700
|
-
updateCustomField({
|
|
701
|
-
fieldId,
|
|
702
|
-
updateCustomFieldDetails,
|
|
703
|
-
}: {
|
|
704
|
-
/** The ID of the custom field. */
|
|
705
|
-
fieldId: string;
|
|
706
|
-
/**
|
|
707
|
-
* The custom field update details.
|
|
708
|
-
*
|
|
709
|
-
* @example {
|
|
710
|
-
* "description": "Select the manager and the corresponding employee.",
|
|
711
|
-
* "name": "Managers and employees list",
|
|
712
|
-
* "searcherKey":
|
|
713
|
-
* "com.atlassian.jira.plugin.system.customfieldtypes:cascadingselectsearcher"
|
|
714
|
-
* }
|
|
715
|
-
*/
|
|
716
|
-
updateCustomFieldDetails: UpdateCustomFieldDetails;
|
|
717
|
-
}): Promise<void> {
|
|
718
|
-
return this.getClientInstance()
|
|
719
|
-
.request({
|
|
720
|
-
path: "/rest/api/3/field/{fieldId}",
|
|
721
|
-
method: "PUT",
|
|
722
|
-
pathParams: {
|
|
723
|
-
fieldId,
|
|
724
|
-
},
|
|
725
|
-
headers: {
|
|
726
|
-
"Content-Type": "application/json",
|
|
727
|
-
},
|
|
728
|
-
body: updateCustomFieldDetails,
|
|
729
|
-
})
|
|
730
|
-
.then(
|
|
731
|
-
this.getClientInstance().responseHandler({
|
|
732
|
-
204: {
|
|
733
|
-
"application/json": "json",
|
|
734
|
-
},
|
|
735
|
-
}),
|
|
736
|
-
)
|
|
737
|
-
.then(
|
|
738
|
-
commonHttpClient.castResponse<{
|
|
739
|
-
status: 204;
|
|
740
|
-
mediaType: "application/json";
|
|
741
|
-
body: void;
|
|
742
|
-
}>(),
|
|
743
|
-
)
|
|
744
|
-
.then(
|
|
745
|
-
validationSchemaStorage.validator(
|
|
746
|
-
"IssueFieldsService.updateCustomField.response",
|
|
747
|
-
),
|
|
748
|
-
)
|
|
749
|
-
.then(commonHttpClient.getBody);
|
|
750
|
-
}
|
|
751
|
-
static initialize() {
|
|
752
|
-
validationSchemaStorage.registerExtensible(
|
|
753
|
-
"IssueFieldsService.getFields.response",
|
|
754
|
-
z
|
|
755
|
-
.object({
|
|
756
|
-
status: z.literal(200),
|
|
757
|
-
mediaType: z.literal("application/json"),
|
|
758
|
-
body: z.array(validationSchemaStorage.lazy("FieldDetails")),
|
|
759
|
-
})
|
|
760
|
-
.describe("IssueFieldsService.getFields.response"),
|
|
761
|
-
);
|
|
762
|
-
validationSchemaStorage.registerExtensible(
|
|
763
|
-
"IssueFieldsService.createCustomField.response",
|
|
764
|
-
z
|
|
765
|
-
.object({
|
|
766
|
-
status: z.literal(201),
|
|
767
|
-
mediaType: z.literal("application/json"),
|
|
768
|
-
body: validationSchemaStorage.lazy("FieldDetails"),
|
|
769
|
-
})
|
|
770
|
-
.describe("IssueFieldsService.createCustomField.response"),
|
|
771
|
-
);
|
|
772
|
-
validationSchemaStorage.registerExtensible(
|
|
773
|
-
"IssueFieldsService.updateCustomField.response",
|
|
774
|
-
z
|
|
775
|
-
.object({
|
|
776
|
-
status: z.literal(204),
|
|
777
|
-
mediaType: z.literal("application/json"),
|
|
778
|
-
body: z.unknown(),
|
|
779
|
-
})
|
|
780
|
-
.describe("IssueFieldsService.updateCustomField.response"),
|
|
781
|
-
);
|
|
782
|
-
validationSchemaStorage.registerExtensible(
|
|
783
|
-
"IssueFieldsService.getContextsForFieldDeprecated.response",
|
|
784
|
-
z
|
|
785
|
-
.object({
|
|
786
|
-
status: z.literal(200),
|
|
787
|
-
mediaType: z.literal("application/json"),
|
|
788
|
-
body: validationSchemaStorage.lazy("PageBeanContext"),
|
|
789
|
-
})
|
|
790
|
-
.describe("IssueFieldsService.getContextsForFieldDeprecated.response"),
|
|
791
|
-
);
|
|
792
|
-
validationSchemaStorage.registerExtensible(
|
|
793
|
-
"IssueFieldsService.restoreCustomField.response",
|
|
794
|
-
z
|
|
795
|
-
.object({
|
|
796
|
-
status: z.literal(200),
|
|
797
|
-
mediaType: z.literal("application/json"),
|
|
798
|
-
body: z.unknown(),
|
|
799
|
-
})
|
|
800
|
-
.describe("IssueFieldsService.restoreCustomField.response"),
|
|
801
|
-
);
|
|
802
|
-
validationSchemaStorage.registerExtensible(
|
|
803
|
-
"IssueFieldsService.trashCustomField.response",
|
|
804
|
-
z
|
|
805
|
-
.object({
|
|
806
|
-
status: z.literal(200),
|
|
807
|
-
mediaType: z.literal("application/json"),
|
|
808
|
-
body: z.unknown(),
|
|
809
|
-
})
|
|
810
|
-
.describe("IssueFieldsService.trashCustomField.response"),
|
|
811
|
-
);
|
|
812
|
-
validationSchemaStorage.registerExtensible(
|
|
813
|
-
"IssueFieldsService.getFieldsPaginated.response",
|
|
814
|
-
z
|
|
815
|
-
.object({
|
|
816
|
-
status: z.literal(200),
|
|
817
|
-
mediaType: z.literal("application/json"),
|
|
818
|
-
body: validationSchemaStorage.lazy("PageBeanField"),
|
|
819
|
-
})
|
|
820
|
-
.describe("IssueFieldsService.getFieldsPaginated.response"),
|
|
821
|
-
);
|
|
822
|
-
validationSchemaStorage.registerExtensible(
|
|
823
|
-
"IssueFieldsService.getTrashedFieldsPaginated.response",
|
|
824
|
-
z
|
|
825
|
-
.object({
|
|
826
|
-
status: z.literal(200),
|
|
827
|
-
mediaType: z.literal("application/json"),
|
|
828
|
-
body: validationSchemaStorage.lazy("PageBeanField"),
|
|
829
|
-
})
|
|
830
|
-
.describe("IssueFieldsService.getTrashedFieldsPaginated.response"),
|
|
831
|
-
);
|
|
832
|
-
validationSchemaStorage.registerOnce([
|
|
833
|
-
registerCommonValidationSchemas,
|
|
834
|
-
registerIssueFieldsValidationSchemas,
|
|
835
|
-
]);
|
|
836
|
-
}
|
|
837
|
-
}
|