@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,1339 +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 type { IssueTypeIds } from "../models/common";
|
|
9
|
-
import {
|
|
10
|
-
type CreateCustomFieldContext,
|
|
11
|
-
type CustomFieldContextDefaultValueUpdate,
|
|
12
|
-
type CustomFieldContextUpdateDetails,
|
|
13
|
-
type PageBeanContextForProjectAndIssueType,
|
|
14
|
-
type PageBeanCustomFieldContext,
|
|
15
|
-
type PageBeanCustomFieldContextDefaultValue,
|
|
16
|
-
type PageBeanCustomFieldContextProjectMapping,
|
|
17
|
-
type PageBeanIssueTypeToContextMapping,
|
|
18
|
-
type ProjectIds,
|
|
19
|
-
type ProjectIssueTypeMappings,
|
|
20
|
-
registerIssueCustomFieldContextsValidationSchemas,
|
|
21
|
-
} from "../models/issue-custom-field-contexts";
|
|
22
|
-
import { validationSchemaStorage } from "../validation-schema-storage";
|
|
23
|
-
/**
|
|
24
|
-
* This resource represents issue custom field contexts. Use it to:
|
|
25
|
-
*
|
|
26
|
-
* * get, create, update, and delete custom field contexts.
|
|
27
|
-
* * get context to issue types and projects mappings.
|
|
28
|
-
* * get custom field contexts for projects and issue types.
|
|
29
|
-
* * assign custom field contexts to projects.
|
|
30
|
-
* * remove custom field contexts from projects.
|
|
31
|
-
* * add issue types to custom field contexts.
|
|
32
|
-
*/
|
|
33
|
-
export class IssueCustomFieldContextsService extends CommonHttpService {
|
|
34
|
-
/**
|
|
35
|
-
* Adds issue types to a custom field context, appending the issue types to the
|
|
36
|
-
* issue types list.
|
|
37
|
-
*
|
|
38
|
-
* A custom field context without any issue types applies to all issue types.
|
|
39
|
-
* Adding issue types to such a custom field context would result in it applying
|
|
40
|
-
* to only the listed issue types.
|
|
41
|
-
*
|
|
42
|
-
* If any of the issue types exists in the custom field context, the operation
|
|
43
|
-
* fails and no issue types are added.
|
|
44
|
-
*
|
|
45
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
46
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
47
|
-
*
|
|
48
|
-
* @returns Returned if operation is successful.
|
|
49
|
-
* @path {PUT} /rest/api/3/field/{fieldId}/context/{contextId}/issuetype
|
|
50
|
-
* @scopes-current manage:jira-configuration
|
|
51
|
-
* @scopes-beta write:field:jira
|
|
52
|
-
*/
|
|
53
|
-
addIssueTypesToContext({
|
|
54
|
-
fieldId,
|
|
55
|
-
contextId,
|
|
56
|
-
issueTypeIds,
|
|
57
|
-
}: {
|
|
58
|
-
/** The ID of the custom field. */
|
|
59
|
-
fieldId: string;
|
|
60
|
-
/** The ID of the context. */
|
|
61
|
-
contextId: number;
|
|
62
|
-
/**
|
|
63
|
-
* @example {
|
|
64
|
-
* "issueTypeIds": [
|
|
65
|
-
* "10001",
|
|
66
|
-
* "10005",
|
|
67
|
-
* "10006"
|
|
68
|
-
* ]
|
|
69
|
-
* }
|
|
70
|
-
*/
|
|
71
|
-
issueTypeIds: IssueTypeIds;
|
|
72
|
-
}): Promise<void> {
|
|
73
|
-
return this.getClientInstance()
|
|
74
|
-
.request({
|
|
75
|
-
path: "/rest/api/3/field/{fieldId}/context/{contextId}/issuetype",
|
|
76
|
-
method: "PUT",
|
|
77
|
-
pathParams: {
|
|
78
|
-
fieldId,
|
|
79
|
-
contextId,
|
|
80
|
-
},
|
|
81
|
-
headers: {
|
|
82
|
-
"Content-Type": "application/json",
|
|
83
|
-
},
|
|
84
|
-
body: issueTypeIds,
|
|
85
|
-
})
|
|
86
|
-
.then(
|
|
87
|
-
this.getClientInstance().responseHandler({
|
|
88
|
-
204: {
|
|
89
|
-
"application/json": "json",
|
|
90
|
-
},
|
|
91
|
-
}),
|
|
92
|
-
)
|
|
93
|
-
.then(
|
|
94
|
-
commonHttpClient.castResponse<{
|
|
95
|
-
status: 204;
|
|
96
|
-
mediaType: "application/json";
|
|
97
|
-
body: void;
|
|
98
|
-
}>(),
|
|
99
|
-
)
|
|
100
|
-
.then(
|
|
101
|
-
validationSchemaStorage.validator(
|
|
102
|
-
"IssueCustomFieldContextsService.addIssueTypesToContext.response",
|
|
103
|
-
),
|
|
104
|
-
)
|
|
105
|
-
.then(commonHttpClient.getBody);
|
|
106
|
-
}
|
|
107
|
-
/**
|
|
108
|
-
* Assigns a custom field context to projects.
|
|
109
|
-
*
|
|
110
|
-
* If any project in the request is assigned to any context of the custom field,
|
|
111
|
-
* the operation fails.
|
|
112
|
-
*
|
|
113
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
114
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
115
|
-
*
|
|
116
|
-
* @returns Returned if operation is successful.
|
|
117
|
-
* @path {PUT} /rest/api/3/field/{fieldId}/context/{contextId}/project
|
|
118
|
-
* @scopes-current manage:jira-configuration
|
|
119
|
-
* @scopes-beta write:field:jira
|
|
120
|
-
*/
|
|
121
|
-
assignProjectsToCustomFieldContext({
|
|
122
|
-
fieldId,
|
|
123
|
-
contextId,
|
|
124
|
-
projectIds,
|
|
125
|
-
}: {
|
|
126
|
-
/** The ID of the custom field. */
|
|
127
|
-
fieldId: string;
|
|
128
|
-
/** The ID of the context. */
|
|
129
|
-
contextId: number;
|
|
130
|
-
/**
|
|
131
|
-
* @example {
|
|
132
|
-
* "projectIds": [
|
|
133
|
-
* "10001",
|
|
134
|
-
* "10005",
|
|
135
|
-
* "10006"
|
|
136
|
-
* ]
|
|
137
|
-
* }
|
|
138
|
-
*/
|
|
139
|
-
projectIds: ProjectIds;
|
|
140
|
-
}): Promise<void> {
|
|
141
|
-
return this.getClientInstance()
|
|
142
|
-
.request({
|
|
143
|
-
path: "/rest/api/3/field/{fieldId}/context/{contextId}/project",
|
|
144
|
-
method: "PUT",
|
|
145
|
-
pathParams: {
|
|
146
|
-
fieldId,
|
|
147
|
-
contextId,
|
|
148
|
-
},
|
|
149
|
-
headers: {
|
|
150
|
-
"Content-Type": "application/json",
|
|
151
|
-
},
|
|
152
|
-
body: projectIds,
|
|
153
|
-
})
|
|
154
|
-
.then(
|
|
155
|
-
this.getClientInstance().responseHandler({
|
|
156
|
-
204: {
|
|
157
|
-
"application/json": "json",
|
|
158
|
-
},
|
|
159
|
-
}),
|
|
160
|
-
)
|
|
161
|
-
.then(
|
|
162
|
-
commonHttpClient.castResponse<{
|
|
163
|
-
status: 204;
|
|
164
|
-
mediaType: "application/json";
|
|
165
|
-
body: void;
|
|
166
|
-
}>(),
|
|
167
|
-
)
|
|
168
|
-
.then(
|
|
169
|
-
validationSchemaStorage.validator(
|
|
170
|
-
"IssueCustomFieldContextsService.assignProjectsToCustomFieldContext.response",
|
|
171
|
-
),
|
|
172
|
-
)
|
|
173
|
-
.then(commonHttpClient.getBody);
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Creates a custom field context.
|
|
177
|
-
*
|
|
178
|
-
* If `projectIds` is empty, a global context is created. A global context is one
|
|
179
|
-
* that applies to all project. If `issueTypeIds` is empty, the context applies to
|
|
180
|
-
* all issue types.
|
|
181
|
-
*
|
|
182
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
183
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
184
|
-
*
|
|
185
|
-
* @returns Returned if the custom field context is created.
|
|
186
|
-
*
|
|
187
|
-
* example: {
|
|
188
|
-
* "id": "10025",
|
|
189
|
-
* "name": "Bug fields context",
|
|
190
|
-
* "description": "A context used to define the custom field options for bugs.",
|
|
191
|
-
* "projectIds": [],
|
|
192
|
-
* "issueTypeIds": [
|
|
193
|
-
* "10010"
|
|
194
|
-
* ]
|
|
195
|
-
* }
|
|
196
|
-
* @path {POST} /rest/api/3/field/{fieldId}/context
|
|
197
|
-
* @scopes-current manage:jira-configuration
|
|
198
|
-
* @scopes-beta read:field:jira, write:field:jira,
|
|
199
|
-
* read:custom-field-contextual-configuration:jira
|
|
200
|
-
*/
|
|
201
|
-
createCustomFieldContext({
|
|
202
|
-
fieldId,
|
|
203
|
-
createCustomFieldContext,
|
|
204
|
-
}: {
|
|
205
|
-
/** The ID of the custom field. */
|
|
206
|
-
fieldId: string;
|
|
207
|
-
/**
|
|
208
|
-
* @example {
|
|
209
|
-
* "description": "A context used to define the custom field options for
|
|
210
|
-
* bugs.",
|
|
211
|
-
* "issueTypeIds": [
|
|
212
|
-
* "10010"
|
|
213
|
-
* ],
|
|
214
|
-
* "name": "Bug fields context",
|
|
215
|
-
* "projectIds": []
|
|
216
|
-
* }
|
|
217
|
-
*/
|
|
218
|
-
createCustomFieldContext: CreateCustomFieldContext;
|
|
219
|
-
}): Promise<CreateCustomFieldContext> {
|
|
220
|
-
return this.getClientInstance()
|
|
221
|
-
.request({
|
|
222
|
-
path: "/rest/api/3/field/{fieldId}/context",
|
|
223
|
-
method: "POST",
|
|
224
|
-
pathParams: {
|
|
225
|
-
fieldId,
|
|
226
|
-
},
|
|
227
|
-
headers: {
|
|
228
|
-
"Content-Type": "application/json",
|
|
229
|
-
},
|
|
230
|
-
body: createCustomFieldContext,
|
|
231
|
-
})
|
|
232
|
-
.then(
|
|
233
|
-
this.getClientInstance().responseHandler({
|
|
234
|
-
201: {
|
|
235
|
-
"application/json": "json",
|
|
236
|
-
},
|
|
237
|
-
}),
|
|
238
|
-
)
|
|
239
|
-
.then(
|
|
240
|
-
commonHttpClient.castResponse<{
|
|
241
|
-
status: 201;
|
|
242
|
-
mediaType: "application/json";
|
|
243
|
-
body: CreateCustomFieldContext;
|
|
244
|
-
}>(),
|
|
245
|
-
)
|
|
246
|
-
.then(
|
|
247
|
-
validationSchemaStorage.validator(
|
|
248
|
-
"IssueCustomFieldContextsService.createCustomFieldContext.response",
|
|
249
|
-
),
|
|
250
|
-
)
|
|
251
|
-
.then(commonHttpClient.getBody);
|
|
252
|
-
}
|
|
253
|
-
/**
|
|
254
|
-
* Deletes a [ custom field
|
|
255
|
-
* context](https://confluence.atlassian.com/adminjiracloud/what-are-custom-field-contexts-991923859.html).
|
|
256
|
-
*
|
|
257
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
258
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
259
|
-
*
|
|
260
|
-
* @returns Returned if the context is deleted.
|
|
261
|
-
* @path {DELETE} /rest/api/3/field/{fieldId}/context/{contextId}
|
|
262
|
-
* @scopes-current manage:jira-configuration
|
|
263
|
-
* @scopes-beta delete:field:jira
|
|
264
|
-
*/
|
|
265
|
-
deleteCustomFieldContext({
|
|
266
|
-
fieldId,
|
|
267
|
-
contextId,
|
|
268
|
-
}: {
|
|
269
|
-
/** The ID of the custom field. */
|
|
270
|
-
fieldId: string;
|
|
271
|
-
/** The ID of the context. */
|
|
272
|
-
contextId: number;
|
|
273
|
-
}): Promise<void> {
|
|
274
|
-
return this.getClientInstance()
|
|
275
|
-
.request({
|
|
276
|
-
path: "/rest/api/3/field/{fieldId}/context/{contextId}",
|
|
277
|
-
method: "DELETE",
|
|
278
|
-
pathParams: {
|
|
279
|
-
fieldId,
|
|
280
|
-
contextId,
|
|
281
|
-
},
|
|
282
|
-
})
|
|
283
|
-
.then(
|
|
284
|
-
this.getClientInstance().responseHandler({
|
|
285
|
-
204: {
|
|
286
|
-
"application/json": "json",
|
|
287
|
-
},
|
|
288
|
-
}),
|
|
289
|
-
)
|
|
290
|
-
.then(
|
|
291
|
-
commonHttpClient.castResponse<{
|
|
292
|
-
status: 204;
|
|
293
|
-
mediaType: "application/json";
|
|
294
|
-
body: void;
|
|
295
|
-
}>(),
|
|
296
|
-
)
|
|
297
|
-
.then(
|
|
298
|
-
validationSchemaStorage.validator(
|
|
299
|
-
"IssueCustomFieldContextsService.deleteCustomFieldContext.response",
|
|
300
|
-
),
|
|
301
|
-
)
|
|
302
|
-
.then(commonHttpClient.getBody);
|
|
303
|
-
}
|
|
304
|
-
/**
|
|
305
|
-
* Returns a [paginated](#pagination) list of [
|
|
306
|
-
* contexts](https://confluence.atlassian.com/adminjiracloud/what-are-custom-field-contexts-991923859.html)
|
|
307
|
-
* for a custom field. Contexts can be returned as follows:
|
|
308
|
-
*
|
|
309
|
-
* * With no other parameters set, all contexts.
|
|
310
|
-
* * By defining `id` only, all contexts from the list of IDs.
|
|
311
|
-
* * By defining `isAnyIssueType`, limit the list of contexts returned to either
|
|
312
|
-
* those that apply to all issue types (true) or those that apply to only a subset
|
|
313
|
-
* of issue types (false)
|
|
314
|
-
* * By defining `isGlobalContext`, limit the list of contexts return to either
|
|
315
|
-
* those that apply to all projects (global contexts) (true) or those that apply
|
|
316
|
-
* to only a subset of projects (false).
|
|
317
|
-
*
|
|
318
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
319
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
320
|
-
*
|
|
321
|
-
* @returns Returned if the request is successful.
|
|
322
|
-
*
|
|
323
|
-
* example: {
|
|
324
|
-
* "isLast": true,
|
|
325
|
-
* "maxResults": 100,
|
|
326
|
-
* "startAt": 0,
|
|
327
|
-
* "total": 2,
|
|
328
|
-
* "values": [
|
|
329
|
-
* {
|
|
330
|
-
* "id": "10025",
|
|
331
|
-
* "name": "Bug fields context",
|
|
332
|
-
* "description": "A context used to define the custom field options for
|
|
333
|
-
* bugs.",
|
|
334
|
-
* "isGlobalContext": true,
|
|
335
|
-
* "isAnyIssueType": false
|
|
336
|
-
* },
|
|
337
|
-
* {
|
|
338
|
-
* "id": "10026",
|
|
339
|
-
* "name": "Task fields context",
|
|
340
|
-
* "description": "A context used to define the custom field options for
|
|
341
|
-
* tasks.",
|
|
342
|
-
* "isGlobalContext": false,
|
|
343
|
-
* "isAnyIssueType": false
|
|
344
|
-
* }
|
|
345
|
-
* ]
|
|
346
|
-
* }
|
|
347
|
-
* @path {GET} /rest/api/3/field/{fieldId}/context
|
|
348
|
-
* @scopes-current manage:jira-configuration
|
|
349
|
-
* @scopes-beta read:field:jira, read:custom-field-contextual-configuration:jira
|
|
350
|
-
*/
|
|
351
|
-
getContextsForField({
|
|
352
|
-
fieldId,
|
|
353
|
-
isAnyIssueType,
|
|
354
|
-
isGlobalContext,
|
|
355
|
-
contextId,
|
|
356
|
-
startAt,
|
|
357
|
-
maxResults,
|
|
358
|
-
}: {
|
|
359
|
-
/** The ID of the custom field. */
|
|
360
|
-
fieldId: string;
|
|
361
|
-
/** Whether to return contexts that apply to all issue types. */
|
|
362
|
-
isAnyIssueType?: boolean;
|
|
363
|
-
/** Whether to return contexts that apply to all projects. */
|
|
364
|
-
isGlobalContext?: boolean;
|
|
365
|
-
/**
|
|
366
|
-
* The list of context IDs. To include multiple contexts, separate IDs with
|
|
367
|
-
* ampersand: `contextId=10000&contextId=10001`.
|
|
368
|
-
*/
|
|
369
|
-
contextId?: number[];
|
|
370
|
-
/** The index of the first item to return in a page of results (page offset). */
|
|
371
|
-
startAt?: number;
|
|
372
|
-
/** The maximum number of items to return per page. */
|
|
373
|
-
maxResults?: number;
|
|
374
|
-
}): Promise<PageBeanCustomFieldContext> {
|
|
375
|
-
return this.getClientInstance()
|
|
376
|
-
.request({
|
|
377
|
-
path: "/rest/api/3/field/{fieldId}/context",
|
|
378
|
-
method: "GET",
|
|
379
|
-
pathParams: {
|
|
380
|
-
fieldId,
|
|
381
|
-
},
|
|
382
|
-
query: {
|
|
383
|
-
isAnyIssueType,
|
|
384
|
-
isGlobalContext,
|
|
385
|
-
contextId,
|
|
386
|
-
startAt,
|
|
387
|
-
maxResults,
|
|
388
|
-
},
|
|
389
|
-
})
|
|
390
|
-
.then(
|
|
391
|
-
this.getClientInstance().responseHandler({
|
|
392
|
-
200: {
|
|
393
|
-
"application/json": "json",
|
|
394
|
-
},
|
|
395
|
-
}),
|
|
396
|
-
)
|
|
397
|
-
.then(
|
|
398
|
-
commonHttpClient.castResponse<{
|
|
399
|
-
status: 200;
|
|
400
|
-
mediaType: "application/json";
|
|
401
|
-
body: PageBeanCustomFieldContext;
|
|
402
|
-
}>(),
|
|
403
|
-
)
|
|
404
|
-
.then(
|
|
405
|
-
validationSchemaStorage.validator(
|
|
406
|
-
"IssueCustomFieldContextsService.getContextsForField.response",
|
|
407
|
-
),
|
|
408
|
-
)
|
|
409
|
-
.then(commonHttpClient.getBody);
|
|
410
|
-
}
|
|
411
|
-
/**
|
|
412
|
-
* Returns a [paginated](#pagination) list of project and issue type mappings and,
|
|
413
|
-
* for each mapping, the ID of a [custom field
|
|
414
|
-
* context](https://confluence.atlassian.com/x/k44fOw) that applies to the project
|
|
415
|
-
* and issue type.
|
|
416
|
-
*
|
|
417
|
-
* If there is no custom field context assigned to the project then, if present,
|
|
418
|
-
* the custom field context that applies to all projects is returned if it also
|
|
419
|
-
* applies to the issue type or all issue types. If a custom field context is not
|
|
420
|
-
* found, the returned custom field context ID is `null`.
|
|
421
|
-
*
|
|
422
|
-
* Duplicate project and issue type mappings cannot be provided in the request.
|
|
423
|
-
*
|
|
424
|
-
* The order of the returned values is the same as provided in the request.
|
|
425
|
-
*
|
|
426
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
427
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
428
|
-
*
|
|
429
|
-
* @returns Returned if the request is successful.
|
|
430
|
-
*
|
|
431
|
-
* example: {
|
|
432
|
-
* "isLast": true,
|
|
433
|
-
* "maxResults": 50,
|
|
434
|
-
* "startAt": 0,
|
|
435
|
-
* "total": 3,
|
|
436
|
-
* "values": [
|
|
437
|
-
* {
|
|
438
|
-
* "projectId": "10000",
|
|
439
|
-
* "issueTypeId": "10000",
|
|
440
|
-
* "contextId": "10000"
|
|
441
|
-
* },
|
|
442
|
-
* {
|
|
443
|
-
* "projectId": "10000",
|
|
444
|
-
* "issueTypeId": "10001",
|
|
445
|
-
* "contextId": null
|
|
446
|
-
* },
|
|
447
|
-
* {
|
|
448
|
-
* "projectId": "10001",
|
|
449
|
-
* "issueTypeId": "10002",
|
|
450
|
-
* "contextId": "10003"
|
|
451
|
-
* }
|
|
452
|
-
* ]
|
|
453
|
-
* }
|
|
454
|
-
* @path {POST} /rest/api/3/field/{fieldId}/context/mapping
|
|
455
|
-
* @scopes-current manage:jira-configuration
|
|
456
|
-
* @scopes-beta read:field:jira
|
|
457
|
-
*/
|
|
458
|
-
getCustomFieldContextsForProjectsAndIssueTypes({
|
|
459
|
-
fieldId,
|
|
460
|
-
startAt,
|
|
461
|
-
maxResults,
|
|
462
|
-
projectIssueTypeMappings,
|
|
463
|
-
}: {
|
|
464
|
-
/** The ID of the custom field. */
|
|
465
|
-
fieldId: string;
|
|
466
|
-
/** The index of the first item to return in a page of results (page offset). */
|
|
467
|
-
startAt?: number;
|
|
468
|
-
/** The maximum number of items to return per page. */
|
|
469
|
-
maxResults?: number;
|
|
470
|
-
/**
|
|
471
|
-
* The list of project and issue type mappings.
|
|
472
|
-
*
|
|
473
|
-
* @example {
|
|
474
|
-
* "mappings": [
|
|
475
|
-
* {
|
|
476
|
-
* "issueTypeId": "10000",
|
|
477
|
-
* "projectId": "10000"
|
|
478
|
-
* },
|
|
479
|
-
* {
|
|
480
|
-
* "issueTypeId": "10001",
|
|
481
|
-
* "projectId": "10000"
|
|
482
|
-
* },
|
|
483
|
-
* {
|
|
484
|
-
* "issueTypeId": "10002",
|
|
485
|
-
* "projectId": "10001"
|
|
486
|
-
* }
|
|
487
|
-
* ]
|
|
488
|
-
* }
|
|
489
|
-
*/
|
|
490
|
-
projectIssueTypeMappings: ProjectIssueTypeMappings;
|
|
491
|
-
}): Promise<PageBeanContextForProjectAndIssueType> {
|
|
492
|
-
return this.getClientInstance()
|
|
493
|
-
.request({
|
|
494
|
-
path: "/rest/api/3/field/{fieldId}/context/mapping",
|
|
495
|
-
method: "POST",
|
|
496
|
-
pathParams: {
|
|
497
|
-
fieldId,
|
|
498
|
-
},
|
|
499
|
-
query: {
|
|
500
|
-
startAt,
|
|
501
|
-
maxResults,
|
|
502
|
-
},
|
|
503
|
-
headers: {
|
|
504
|
-
"Content-Type": "application/json",
|
|
505
|
-
},
|
|
506
|
-
body: projectIssueTypeMappings,
|
|
507
|
-
})
|
|
508
|
-
.then(
|
|
509
|
-
this.getClientInstance().responseHandler({
|
|
510
|
-
200: {
|
|
511
|
-
"application/json": "json",
|
|
512
|
-
},
|
|
513
|
-
}),
|
|
514
|
-
)
|
|
515
|
-
.then(
|
|
516
|
-
commonHttpClient.castResponse<{
|
|
517
|
-
status: 200;
|
|
518
|
-
mediaType: "application/json";
|
|
519
|
-
body: PageBeanContextForProjectAndIssueType;
|
|
520
|
-
}>(),
|
|
521
|
-
)
|
|
522
|
-
.then(
|
|
523
|
-
validationSchemaStorage.validator(
|
|
524
|
-
"IssueCustomFieldContextsService.getCustomFieldContextsForProjectsAndIssueTypes.response",
|
|
525
|
-
),
|
|
526
|
-
)
|
|
527
|
-
.then(commonHttpClient.getBody);
|
|
528
|
-
}
|
|
529
|
-
/**
|
|
530
|
-
* Returns a [paginated](#pagination) list of defaults for a custom field. The
|
|
531
|
-
* results can be filtered by `contextId`, otherwise all values are returned. If
|
|
532
|
-
* no defaults are set for a context, nothing is returned.
|
|
533
|
-
* The returned object depends on type of the custom field:
|
|
534
|
-
*
|
|
535
|
-
* * `CustomFieldContextDefaultValueDate` (type `datepicker`) for date fields.
|
|
536
|
-
* * `CustomFieldContextDefaultValueDateTime` (type `datetimepicker`) for
|
|
537
|
-
* date-time fields.
|
|
538
|
-
* * `CustomFieldContextDefaultValueSingleOption` (type `option.single`) for
|
|
539
|
-
* single choice select lists and radio buttons.
|
|
540
|
-
* * `CustomFieldContextDefaultValueMultipleOption` (type `option.multiple`) for
|
|
541
|
-
* multiple choice select lists and checkboxes.
|
|
542
|
-
* * `CustomFieldContextDefaultValueCascadingOption` (type `option.cascading`)
|
|
543
|
-
* for cascading select lists.
|
|
544
|
-
* * `CustomFieldContextSingleUserPickerDefaults` (type `single.user.select`)
|
|
545
|
-
* for single users.
|
|
546
|
-
* * `CustomFieldContextDefaultValueMultiUserPicker` (type `multi.user.select`)
|
|
547
|
-
* for user lists.
|
|
548
|
-
* * `CustomFieldContextDefaultValueSingleGroupPicker` (type
|
|
549
|
-
* `grouppicker.single`) for single choice group pickers.
|
|
550
|
-
* * `CustomFieldContextDefaultValueMultipleGroupPicker` (type
|
|
551
|
-
* `grouppicker.multiple`) for multiple choice group pickers.
|
|
552
|
-
* * `CustomFieldContextDefaultValueURL` (type `url`) for URLs.
|
|
553
|
-
* * `CustomFieldContextDefaultValueProject` (type `project`) for project
|
|
554
|
-
* pickers.
|
|
555
|
-
* * `CustomFieldContextDefaultValueFloat` (type `float`) for floats
|
|
556
|
-
* (floating-point numbers).
|
|
557
|
-
* * `CustomFieldContextDefaultValueLabels` (type `labels`) for labels.
|
|
558
|
-
* * `CustomFieldContextDefaultValueTextField` (type `textfield`) for text
|
|
559
|
-
* fields.
|
|
560
|
-
* * `CustomFieldContextDefaultValueTextArea` (type `textarea`) for text area
|
|
561
|
-
* fields.
|
|
562
|
-
* * `CustomFieldContextDefaultValueReadOnly` (type `readonly`) for read only
|
|
563
|
-
* (text) fields.
|
|
564
|
-
* * `CustomFieldContextDefaultValueMultipleVersion` (type `version.multiple`)
|
|
565
|
-
* for single choice version pickers.
|
|
566
|
-
* * `CustomFieldContextDefaultValueSingleVersion` (type `version.single`) for
|
|
567
|
-
* multiple choice version pickers.
|
|
568
|
-
*
|
|
569
|
-
* Forge custom fields
|
|
570
|
-
* [types](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/#data-types)
|
|
571
|
-
* are also supported, returning:
|
|
572
|
-
*
|
|
573
|
-
* * `CustomFieldContextDefaultValueForgeStringFieldBean` (type `forge.string`)
|
|
574
|
-
* for Forge string fields.
|
|
575
|
-
* * `CustomFieldContextDefaultValueForgeMultiStringFieldBean` (type
|
|
576
|
-
* `forge.string.list`) for Forge string collection fields.
|
|
577
|
-
* * `CustomFieldContextDefaultValueForgeObjectFieldBean` (type `forge.object`)
|
|
578
|
-
* for Forge object fields.
|
|
579
|
-
* * `CustomFieldContextDefaultValueForgeDateTimeFieldBean` (type
|
|
580
|
-
* `forge.datetime`) for Forge date-time fields.
|
|
581
|
-
* * `CustomFieldContextDefaultValueForgeGroupFieldBean` (type `forge.group`)
|
|
582
|
-
* for Forge group fields.
|
|
583
|
-
* * `CustomFieldContextDefaultValueForgeMultiGroupFieldBean` (type
|
|
584
|
-
* `forge.group.list`) for Forge group collection fields.
|
|
585
|
-
* * `CustomFieldContextDefaultValueForgeNumberFieldBean` (type `forge.number`)
|
|
586
|
-
* for Forge number fields.
|
|
587
|
-
* * `CustomFieldContextDefaultValueForgeUserFieldBean` (type `forge.user`) for
|
|
588
|
-
* Forge user fields.
|
|
589
|
-
* * `CustomFieldContextDefaultValueForgeMultiUserFieldBean` (type
|
|
590
|
-
* `forge.user.list`) for Forge user collection fields.
|
|
591
|
-
*
|
|
592
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
593
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
594
|
-
*
|
|
595
|
-
* @returns Returned if the request is successful.
|
|
596
|
-
*
|
|
597
|
-
* example: {
|
|
598
|
-
* "isLast": true,
|
|
599
|
-
* "maxResults": 50,
|
|
600
|
-
* "startAt": 0,
|
|
601
|
-
* "total": 3,
|
|
602
|
-
* "values": [
|
|
603
|
-
* {
|
|
604
|
-
* "contextId": "10100",
|
|
605
|
-
* "optionId": "10001"
|
|
606
|
-
* },
|
|
607
|
-
* {
|
|
608
|
-
* "contextId": "10101",
|
|
609
|
-
* "optionId": "10003"
|
|
610
|
-
* },
|
|
611
|
-
* {
|
|
612
|
-
* "contextId": "10103"
|
|
613
|
-
* }
|
|
614
|
-
* ]
|
|
615
|
-
* }
|
|
616
|
-
* @path {GET} /rest/api/3/field/{fieldId}/context/defaultValue
|
|
617
|
-
* @scopes-current manage:jira-configuration
|
|
618
|
-
* @scopes-beta read:field.default-value:jira
|
|
619
|
-
*/
|
|
620
|
-
getDefaultValues({
|
|
621
|
-
fieldId,
|
|
622
|
-
contextId,
|
|
623
|
-
startAt,
|
|
624
|
-
maxResults,
|
|
625
|
-
}: {
|
|
626
|
-
/** The ID of the custom field, for example `customfield\_10000`. */
|
|
627
|
-
fieldId: string;
|
|
628
|
-
/** The IDs of the contexts. */
|
|
629
|
-
contextId?: number[];
|
|
630
|
-
/** The index of the first item to return in a page of results (page offset). */
|
|
631
|
-
startAt?: number;
|
|
632
|
-
/** The maximum number of items to return per page. */
|
|
633
|
-
maxResults?: number;
|
|
634
|
-
}): Promise<PageBeanCustomFieldContextDefaultValue> {
|
|
635
|
-
return this.getClientInstance()
|
|
636
|
-
.request({
|
|
637
|
-
path: "/rest/api/3/field/{fieldId}/context/defaultValue",
|
|
638
|
-
method: "GET",
|
|
639
|
-
pathParams: {
|
|
640
|
-
fieldId,
|
|
641
|
-
},
|
|
642
|
-
query: {
|
|
643
|
-
contextId,
|
|
644
|
-
startAt,
|
|
645
|
-
maxResults,
|
|
646
|
-
},
|
|
647
|
-
})
|
|
648
|
-
.then(
|
|
649
|
-
this.getClientInstance().responseHandler({
|
|
650
|
-
200: {
|
|
651
|
-
"application/json": "json",
|
|
652
|
-
},
|
|
653
|
-
}),
|
|
654
|
-
)
|
|
655
|
-
.then(
|
|
656
|
-
commonHttpClient.castResponse<{
|
|
657
|
-
status: 200;
|
|
658
|
-
mediaType: "application/json";
|
|
659
|
-
body: PageBeanCustomFieldContextDefaultValue;
|
|
660
|
-
}>(),
|
|
661
|
-
)
|
|
662
|
-
.then(
|
|
663
|
-
validationSchemaStorage.validator(
|
|
664
|
-
"IssueCustomFieldContextsService.getDefaultValues.response",
|
|
665
|
-
),
|
|
666
|
-
)
|
|
667
|
-
.then(commonHttpClient.getBody);
|
|
668
|
-
}
|
|
669
|
-
/**
|
|
670
|
-
* Returns a [paginated](#pagination) list of context to issue type mappings for a
|
|
671
|
-
* custom field. Mappings are returned for all contexts or a list of contexts.
|
|
672
|
-
* Mappings are ordered first by context ID and then by issue type ID.
|
|
673
|
-
*
|
|
674
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
675
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
676
|
-
*
|
|
677
|
-
* @returns Returned if operation is successful.
|
|
678
|
-
*
|
|
679
|
-
* example: {
|
|
680
|
-
* "isLast": true,
|
|
681
|
-
* "maxResults": 100,
|
|
682
|
-
* "startAt": 0,
|
|
683
|
-
* "total": 3,
|
|
684
|
-
* "values": [
|
|
685
|
-
* {
|
|
686
|
-
* "contextId": "10001",
|
|
687
|
-
* "issueTypeId": "10010"
|
|
688
|
-
* },
|
|
689
|
-
* {
|
|
690
|
-
* "contextId": "10001",
|
|
691
|
-
* "issueTypeId": "10011"
|
|
692
|
-
* },
|
|
693
|
-
* {
|
|
694
|
-
* "contextId": "10002",
|
|
695
|
-
* "isAnyIssueType": true
|
|
696
|
-
* }
|
|
697
|
-
* ]
|
|
698
|
-
* }
|
|
699
|
-
* @path {GET} /rest/api/3/field/{fieldId}/context/issuetypemapping
|
|
700
|
-
* @scopes-current manage:jira-configuration
|
|
701
|
-
* @scopes-beta read:field:jira
|
|
702
|
-
*/
|
|
703
|
-
getIssueTypeMappingsForContexts({
|
|
704
|
-
fieldId,
|
|
705
|
-
contextId,
|
|
706
|
-
startAt,
|
|
707
|
-
maxResults,
|
|
708
|
-
}: {
|
|
709
|
-
/** The ID of the custom field. */
|
|
710
|
-
fieldId: string;
|
|
711
|
-
/**
|
|
712
|
-
* The ID of the context. To include multiple contexts, provide an
|
|
713
|
-
* ampersand-separated list. For example, `contextId=10001&contextId=10002`.
|
|
714
|
-
*/
|
|
715
|
-
contextId?: number[];
|
|
716
|
-
/** The index of the first item to return in a page of results (page offset). */
|
|
717
|
-
startAt?: number;
|
|
718
|
-
/** The maximum number of items to return per page. */
|
|
719
|
-
maxResults?: number;
|
|
720
|
-
}): Promise<PageBeanIssueTypeToContextMapping> {
|
|
721
|
-
return this.getClientInstance()
|
|
722
|
-
.request({
|
|
723
|
-
path: "/rest/api/3/field/{fieldId}/context/issuetypemapping",
|
|
724
|
-
method: "GET",
|
|
725
|
-
pathParams: {
|
|
726
|
-
fieldId,
|
|
727
|
-
},
|
|
728
|
-
query: {
|
|
729
|
-
contextId,
|
|
730
|
-
startAt,
|
|
731
|
-
maxResults,
|
|
732
|
-
},
|
|
733
|
-
})
|
|
734
|
-
.then(
|
|
735
|
-
this.getClientInstance().responseHandler({
|
|
736
|
-
200: {
|
|
737
|
-
"application/json": "json",
|
|
738
|
-
},
|
|
739
|
-
}),
|
|
740
|
-
)
|
|
741
|
-
.then(
|
|
742
|
-
commonHttpClient.castResponse<{
|
|
743
|
-
status: 200;
|
|
744
|
-
mediaType: "application/json";
|
|
745
|
-
body: PageBeanIssueTypeToContextMapping;
|
|
746
|
-
}>(),
|
|
747
|
-
)
|
|
748
|
-
.then(
|
|
749
|
-
validationSchemaStorage.validator(
|
|
750
|
-
"IssueCustomFieldContextsService.getIssueTypeMappingsForContexts.response",
|
|
751
|
-
),
|
|
752
|
-
)
|
|
753
|
-
.then(commonHttpClient.getBody);
|
|
754
|
-
}
|
|
755
|
-
/**
|
|
756
|
-
* Returns a [paginated](#pagination) list of context to project mappings for a
|
|
757
|
-
* custom field. The result can be filtered by `contextId`. Otherwise, all
|
|
758
|
-
* mappings are returned. Invalid IDs are ignored.
|
|
759
|
-
*
|
|
760
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
761
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
762
|
-
*
|
|
763
|
-
* @returns Returned if the request is successful.
|
|
764
|
-
*
|
|
765
|
-
* example: {
|
|
766
|
-
* "isLast": true,
|
|
767
|
-
* "maxResults": 100,
|
|
768
|
-
* "startAt": 0,
|
|
769
|
-
* "total": 2,
|
|
770
|
-
* "values": [
|
|
771
|
-
* {
|
|
772
|
-
* "contextId": "10025",
|
|
773
|
-
* "projectId": "10001"
|
|
774
|
-
* },
|
|
775
|
-
* {
|
|
776
|
-
* "contextId": "10026",
|
|
777
|
-
* "isGlobalContext": true
|
|
778
|
-
* }
|
|
779
|
-
* ]
|
|
780
|
-
* }
|
|
781
|
-
* @path {GET} /rest/api/3/field/{fieldId}/context/projectmapping
|
|
782
|
-
* @scopes-current manage:jira-configuration
|
|
783
|
-
* @scopes-beta read:field:jira
|
|
784
|
-
*/
|
|
785
|
-
getProjectContextMapping({
|
|
786
|
-
fieldId,
|
|
787
|
-
contextId,
|
|
788
|
-
startAt,
|
|
789
|
-
maxResults,
|
|
790
|
-
}: {
|
|
791
|
-
/** The ID of the custom field, for example `customfield\_10000`. */
|
|
792
|
-
fieldId: string;
|
|
793
|
-
/**
|
|
794
|
-
* The list of context IDs. To include multiple context, separate IDs with
|
|
795
|
-
* ampersand: `contextId=10000&contextId=10001`.
|
|
796
|
-
*/
|
|
797
|
-
contextId?: number[];
|
|
798
|
-
/** The index of the first item to return in a page of results (page offset). */
|
|
799
|
-
startAt?: number;
|
|
800
|
-
/** The maximum number of items to return per page. */
|
|
801
|
-
maxResults?: number;
|
|
802
|
-
}): Promise<PageBeanCustomFieldContextProjectMapping> {
|
|
803
|
-
return this.getClientInstance()
|
|
804
|
-
.request({
|
|
805
|
-
path: "/rest/api/3/field/{fieldId}/context/projectmapping",
|
|
806
|
-
method: "GET",
|
|
807
|
-
pathParams: {
|
|
808
|
-
fieldId,
|
|
809
|
-
},
|
|
810
|
-
query: {
|
|
811
|
-
contextId,
|
|
812
|
-
startAt,
|
|
813
|
-
maxResults,
|
|
814
|
-
},
|
|
815
|
-
})
|
|
816
|
-
.then(
|
|
817
|
-
this.getClientInstance().responseHandler({
|
|
818
|
-
200: {
|
|
819
|
-
"application/json": "json",
|
|
820
|
-
},
|
|
821
|
-
}),
|
|
822
|
-
)
|
|
823
|
-
.then(
|
|
824
|
-
commonHttpClient.castResponse<{
|
|
825
|
-
status: 200;
|
|
826
|
-
mediaType: "application/json";
|
|
827
|
-
body: PageBeanCustomFieldContextProjectMapping;
|
|
828
|
-
}>(),
|
|
829
|
-
)
|
|
830
|
-
.then(
|
|
831
|
-
validationSchemaStorage.validator(
|
|
832
|
-
"IssueCustomFieldContextsService.getProjectContextMapping.response",
|
|
833
|
-
),
|
|
834
|
-
)
|
|
835
|
-
.then(commonHttpClient.getBody);
|
|
836
|
-
}
|
|
837
|
-
/**
|
|
838
|
-
* Removes a custom field context from projects.
|
|
839
|
-
*
|
|
840
|
-
* A custom field context without any projects applies to all projects. Removing
|
|
841
|
-
* all projects from a custom field context would result in it applying to all
|
|
842
|
-
* projects.
|
|
843
|
-
*
|
|
844
|
-
* If any project in the request is not assigned to the context, or the operation
|
|
845
|
-
* would result in two global contexts for the field, the operation fails.
|
|
846
|
-
*
|
|
847
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
848
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
849
|
-
*
|
|
850
|
-
* @returns Returned if the custom field context is removed from the projects.
|
|
851
|
-
* @path {POST} /rest/api/3/field/{fieldId}/context/{contextId}/project/remove
|
|
852
|
-
* @scopes-current manage:jira-configuration
|
|
853
|
-
* @scopes-beta write:field:jira
|
|
854
|
-
*/
|
|
855
|
-
removeCustomFieldContextFromProjects({
|
|
856
|
-
fieldId,
|
|
857
|
-
contextId,
|
|
858
|
-
projectIds,
|
|
859
|
-
}: {
|
|
860
|
-
/** The ID of the custom field. */
|
|
861
|
-
fieldId: string;
|
|
862
|
-
/** The ID of the context. */
|
|
863
|
-
contextId: number;
|
|
864
|
-
/**
|
|
865
|
-
* @example {
|
|
866
|
-
* "projectIds": [
|
|
867
|
-
* "10001",
|
|
868
|
-
* "10005",
|
|
869
|
-
* "10006"
|
|
870
|
-
* ]
|
|
871
|
-
* }
|
|
872
|
-
*/
|
|
873
|
-
projectIds: ProjectIds;
|
|
874
|
-
}): Promise<void> {
|
|
875
|
-
return this.getClientInstance()
|
|
876
|
-
.request({
|
|
877
|
-
path: "/rest/api/3/field/{fieldId}/context/{contextId}/project/remove",
|
|
878
|
-
method: "POST",
|
|
879
|
-
pathParams: {
|
|
880
|
-
fieldId,
|
|
881
|
-
contextId,
|
|
882
|
-
},
|
|
883
|
-
headers: {
|
|
884
|
-
"Content-Type": "application/json",
|
|
885
|
-
},
|
|
886
|
-
body: projectIds,
|
|
887
|
-
})
|
|
888
|
-
.then(
|
|
889
|
-
this.getClientInstance().responseHandler({
|
|
890
|
-
204: {
|
|
891
|
-
"application/json": "json",
|
|
892
|
-
},
|
|
893
|
-
}),
|
|
894
|
-
)
|
|
895
|
-
.then(
|
|
896
|
-
commonHttpClient.castResponse<{
|
|
897
|
-
status: 204;
|
|
898
|
-
mediaType: "application/json";
|
|
899
|
-
body: void;
|
|
900
|
-
}>(),
|
|
901
|
-
)
|
|
902
|
-
.then(
|
|
903
|
-
validationSchemaStorage.validator(
|
|
904
|
-
"IssueCustomFieldContextsService.removeCustomFieldContextFromProjects.response",
|
|
905
|
-
),
|
|
906
|
-
)
|
|
907
|
-
.then(commonHttpClient.getBody);
|
|
908
|
-
}
|
|
909
|
-
/**
|
|
910
|
-
* Removes issue types from a custom field context.
|
|
911
|
-
*
|
|
912
|
-
* A custom field context without any issue types applies to all issue types.
|
|
913
|
-
*
|
|
914
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
915
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
916
|
-
*
|
|
917
|
-
* @returns Returned if operation is successful.
|
|
918
|
-
* @path {POST} /rest/api/3/field/{fieldId}/context/{contextId}/issuetype/remove
|
|
919
|
-
* @scopes-current manage:jira-configuration
|
|
920
|
-
* @scopes-beta write:field:jira
|
|
921
|
-
*/
|
|
922
|
-
removeIssueTypesFromContext({
|
|
923
|
-
fieldId,
|
|
924
|
-
contextId,
|
|
925
|
-
issueTypeIds,
|
|
926
|
-
}: {
|
|
927
|
-
/** The ID of the custom field. */
|
|
928
|
-
fieldId: string;
|
|
929
|
-
/** The ID of the context. */
|
|
930
|
-
contextId: number;
|
|
931
|
-
/**
|
|
932
|
-
* @example {
|
|
933
|
-
* "issueTypeIds": [
|
|
934
|
-
* "10001",
|
|
935
|
-
* "10005",
|
|
936
|
-
* "10006"
|
|
937
|
-
* ]
|
|
938
|
-
* }
|
|
939
|
-
*/
|
|
940
|
-
issueTypeIds: IssueTypeIds;
|
|
941
|
-
}): Promise<void> {
|
|
942
|
-
return this.getClientInstance()
|
|
943
|
-
.request({
|
|
944
|
-
path: "/rest/api/3/field/{fieldId}/context/{contextId}/issuetype/remove",
|
|
945
|
-
method: "POST",
|
|
946
|
-
pathParams: {
|
|
947
|
-
fieldId,
|
|
948
|
-
contextId,
|
|
949
|
-
},
|
|
950
|
-
headers: {
|
|
951
|
-
"Content-Type": "application/json",
|
|
952
|
-
},
|
|
953
|
-
body: issueTypeIds,
|
|
954
|
-
})
|
|
955
|
-
.then(
|
|
956
|
-
this.getClientInstance().responseHandler({
|
|
957
|
-
204: {
|
|
958
|
-
"application/json": "json",
|
|
959
|
-
},
|
|
960
|
-
}),
|
|
961
|
-
)
|
|
962
|
-
.then(
|
|
963
|
-
commonHttpClient.castResponse<{
|
|
964
|
-
status: 204;
|
|
965
|
-
mediaType: "application/json";
|
|
966
|
-
body: void;
|
|
967
|
-
}>(),
|
|
968
|
-
)
|
|
969
|
-
.then(
|
|
970
|
-
validationSchemaStorage.validator(
|
|
971
|
-
"IssueCustomFieldContextsService.removeIssueTypesFromContext.response",
|
|
972
|
-
),
|
|
973
|
-
)
|
|
974
|
-
.then(commonHttpClient.getBody);
|
|
975
|
-
}
|
|
976
|
-
/**
|
|
977
|
-
* Sets default for contexts of a custom field. Default are defined using these
|
|
978
|
-
* objects:
|
|
979
|
-
*
|
|
980
|
-
* * `CustomFieldContextDefaultValueDate` (type `datepicker`) for date fields.
|
|
981
|
-
* * `CustomFieldContextDefaultValueDateTime` (type `datetimepicker`) for
|
|
982
|
-
* date-time fields.
|
|
983
|
-
* * `CustomFieldContextDefaultValueSingleOption` (type `option.single`) for
|
|
984
|
-
* single choice select lists and radio buttons.
|
|
985
|
-
* * `CustomFieldContextDefaultValueMultipleOption` (type `option.multiple`) for
|
|
986
|
-
* multiple choice select lists and checkboxes.
|
|
987
|
-
* * `CustomFieldContextDefaultValueCascadingOption` (type `option.cascading`)
|
|
988
|
-
* for cascading select lists.
|
|
989
|
-
* * `CustomFieldContextSingleUserPickerDefaults` (type `single.user.select`)
|
|
990
|
-
* for single users.
|
|
991
|
-
* * `CustomFieldContextDefaultValueMultiUserPicker` (type `multi.user.select`)
|
|
992
|
-
* for user lists.
|
|
993
|
-
* * `CustomFieldContextDefaultValueSingleGroupPicker` (type
|
|
994
|
-
* `grouppicker.single`) for single choice group pickers.
|
|
995
|
-
* * `CustomFieldContextDefaultValueMultipleGroupPicker` (type
|
|
996
|
-
* `grouppicker.multiple`) for multiple choice group pickers.
|
|
997
|
-
* * `CustomFieldContextDefaultValueURL` (type `url`) for URLs.
|
|
998
|
-
* * `CustomFieldContextDefaultValueProject` (type `project`) for project
|
|
999
|
-
* pickers.
|
|
1000
|
-
* * `CustomFieldContextDefaultValueFloat` (type `float`) for floats
|
|
1001
|
-
* (floating-point numbers).
|
|
1002
|
-
* * `CustomFieldContextDefaultValueLabels` (type `labels`) for labels.
|
|
1003
|
-
* * `CustomFieldContextDefaultValueTextField` (type `textfield`) for text
|
|
1004
|
-
* fields.
|
|
1005
|
-
* * `CustomFieldContextDefaultValueTextArea` (type `textarea`) for text area
|
|
1006
|
-
* fields.
|
|
1007
|
-
* * `CustomFieldContextDefaultValueReadOnly` (type `readonly`) for read only
|
|
1008
|
-
* (text) fields.
|
|
1009
|
-
* * `CustomFieldContextDefaultValueMultipleVersion` (type `version.multiple`)
|
|
1010
|
-
* for single choice version pickers.
|
|
1011
|
-
* * `CustomFieldContextDefaultValueSingleVersion` (type `version.single`) for
|
|
1012
|
-
* multiple choice version pickers.
|
|
1013
|
-
*
|
|
1014
|
-
* Forge custom fields
|
|
1015
|
-
* [types](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/#data-types)
|
|
1016
|
-
* are also supported, returning:
|
|
1017
|
-
*
|
|
1018
|
-
* * `CustomFieldContextDefaultValueForgeStringFieldBean` (type `forge.string`)
|
|
1019
|
-
* for Forge string fields.
|
|
1020
|
-
* * `CustomFieldContextDefaultValueForgeMultiStringFieldBean` (type
|
|
1021
|
-
* `forge.string.list`) for Forge string collection fields.
|
|
1022
|
-
* * `CustomFieldContextDefaultValueForgeObjectFieldBean` (type `forge.object`)
|
|
1023
|
-
* for Forge object fields.
|
|
1024
|
-
* * `CustomFieldContextDefaultValueForgeDateTimeFieldBean` (type
|
|
1025
|
-
* `forge.datetime`) for Forge date-time fields.
|
|
1026
|
-
* * `CustomFieldContextDefaultValueForgeGroupFieldBean` (type `forge.group`)
|
|
1027
|
-
* for Forge group fields.
|
|
1028
|
-
* * `CustomFieldContextDefaultValueForgeMultiGroupFieldBean` (type
|
|
1029
|
-
* `forge.group.list`) for Forge group collection fields.
|
|
1030
|
-
* * `CustomFieldContextDefaultValueForgeNumberFieldBean` (type `forge.number`)
|
|
1031
|
-
* for Forge number fields.
|
|
1032
|
-
* * `CustomFieldContextDefaultValueForgeUserFieldBean` (type `forge.user`) for
|
|
1033
|
-
* Forge user fields.
|
|
1034
|
-
* * `CustomFieldContextDefaultValueForgeMultiUserFieldBean` (type
|
|
1035
|
-
* `forge.user.list`) for Forge user collection fields.
|
|
1036
|
-
*
|
|
1037
|
-
* Only one type of default object can be included in a request. To remove a
|
|
1038
|
-
* default for a context, set the default parameter to `null`.
|
|
1039
|
-
*
|
|
1040
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
1041
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
1042
|
-
*
|
|
1043
|
-
* @returns Returned if operation is successful.
|
|
1044
|
-
* @path {PUT} /rest/api/3/field/{fieldId}/context/defaultValue
|
|
1045
|
-
* @scopes-current manage:jira-configuration
|
|
1046
|
-
* @scopes-beta write:field.default-value:jira
|
|
1047
|
-
*/
|
|
1048
|
-
setDefaultValues({
|
|
1049
|
-
fieldId,
|
|
1050
|
-
customFieldContextDefaultValueUpdate,
|
|
1051
|
-
}: {
|
|
1052
|
-
/** The ID of the custom field. */
|
|
1053
|
-
fieldId: string;
|
|
1054
|
-
/**
|
|
1055
|
-
* @example {
|
|
1056
|
-
* "defaultValues": [
|
|
1057
|
-
* {
|
|
1058
|
-
* "contextId": "10100",
|
|
1059
|
-
* "optionId": "10001",
|
|
1060
|
-
* "type": "option.single"
|
|
1061
|
-
* },
|
|
1062
|
-
* {
|
|
1063
|
-
* "contextId": "10101",
|
|
1064
|
-
* "optionId": "10003",
|
|
1065
|
-
* "type": "option.single"
|
|
1066
|
-
* },
|
|
1067
|
-
* {
|
|
1068
|
-
* "contextId": "10103",
|
|
1069
|
-
* "optionId": "10005",
|
|
1070
|
-
* "type": "option.single"
|
|
1071
|
-
* }
|
|
1072
|
-
* ]
|
|
1073
|
-
* }
|
|
1074
|
-
*/
|
|
1075
|
-
customFieldContextDefaultValueUpdate: CustomFieldContextDefaultValueUpdate;
|
|
1076
|
-
}): Promise<void> {
|
|
1077
|
-
return this.getClientInstance()
|
|
1078
|
-
.request({
|
|
1079
|
-
path: "/rest/api/3/field/{fieldId}/context/defaultValue",
|
|
1080
|
-
method: "PUT",
|
|
1081
|
-
pathParams: {
|
|
1082
|
-
fieldId,
|
|
1083
|
-
},
|
|
1084
|
-
headers: {
|
|
1085
|
-
"Content-Type": "application/json",
|
|
1086
|
-
},
|
|
1087
|
-
body: customFieldContextDefaultValueUpdate,
|
|
1088
|
-
})
|
|
1089
|
-
.then(
|
|
1090
|
-
this.getClientInstance().responseHandler({
|
|
1091
|
-
204: {
|
|
1092
|
-
"application/json": "json",
|
|
1093
|
-
},
|
|
1094
|
-
}),
|
|
1095
|
-
)
|
|
1096
|
-
.then(
|
|
1097
|
-
commonHttpClient.castResponse<{
|
|
1098
|
-
status: 204;
|
|
1099
|
-
mediaType: "application/json";
|
|
1100
|
-
body: void;
|
|
1101
|
-
}>(),
|
|
1102
|
-
)
|
|
1103
|
-
.then(
|
|
1104
|
-
validationSchemaStorage.validator(
|
|
1105
|
-
"IssueCustomFieldContextsService.setDefaultValues.response",
|
|
1106
|
-
),
|
|
1107
|
-
)
|
|
1108
|
-
.then(commonHttpClient.getBody);
|
|
1109
|
-
}
|
|
1110
|
-
/**
|
|
1111
|
-
* Updates a [ custom field
|
|
1112
|
-
* context](https://confluence.atlassian.com/adminjiracloud/what-are-custom-field-contexts-991923859.html).
|
|
1113
|
-
*
|
|
1114
|
-
* **[Permissions](#permissions) required:** *Administer Jira* [global
|
|
1115
|
-
* permission](https://confluence.atlassian.com/x/x4dKLg).
|
|
1116
|
-
*
|
|
1117
|
-
* @returns Returned if the context is updated.
|
|
1118
|
-
* @path {PUT} /rest/api/3/field/{fieldId}/context/{contextId}
|
|
1119
|
-
* @scopes-current manage:jira-configuration
|
|
1120
|
-
* @scopes-beta write:field:jira
|
|
1121
|
-
*/
|
|
1122
|
-
updateCustomFieldContext({
|
|
1123
|
-
fieldId,
|
|
1124
|
-
contextId,
|
|
1125
|
-
customFieldContextUpdateDetails,
|
|
1126
|
-
}: {
|
|
1127
|
-
/** The ID of the custom field. */
|
|
1128
|
-
fieldId: string;
|
|
1129
|
-
/** The ID of the context. */
|
|
1130
|
-
contextId: number;
|
|
1131
|
-
/**
|
|
1132
|
-
* @example {
|
|
1133
|
-
* "description": "A context used to define the custom field options for
|
|
1134
|
-
* bugs.",
|
|
1135
|
-
* "name": "Bug fields context"
|
|
1136
|
-
* }
|
|
1137
|
-
*/
|
|
1138
|
-
customFieldContextUpdateDetails: CustomFieldContextUpdateDetails;
|
|
1139
|
-
}): Promise<void> {
|
|
1140
|
-
return this.getClientInstance()
|
|
1141
|
-
.request({
|
|
1142
|
-
path: "/rest/api/3/field/{fieldId}/context/{contextId}",
|
|
1143
|
-
method: "PUT",
|
|
1144
|
-
pathParams: {
|
|
1145
|
-
fieldId,
|
|
1146
|
-
contextId,
|
|
1147
|
-
},
|
|
1148
|
-
headers: {
|
|
1149
|
-
"Content-Type": "application/json",
|
|
1150
|
-
},
|
|
1151
|
-
body: customFieldContextUpdateDetails,
|
|
1152
|
-
})
|
|
1153
|
-
.then(
|
|
1154
|
-
this.getClientInstance().responseHandler({
|
|
1155
|
-
204: {
|
|
1156
|
-
"application/json": "json",
|
|
1157
|
-
},
|
|
1158
|
-
}),
|
|
1159
|
-
)
|
|
1160
|
-
.then(
|
|
1161
|
-
commonHttpClient.castResponse<{
|
|
1162
|
-
status: 204;
|
|
1163
|
-
mediaType: "application/json";
|
|
1164
|
-
body: void;
|
|
1165
|
-
}>(),
|
|
1166
|
-
)
|
|
1167
|
-
.then(
|
|
1168
|
-
validationSchemaStorage.validator(
|
|
1169
|
-
"IssueCustomFieldContextsService.updateCustomFieldContext.response",
|
|
1170
|
-
),
|
|
1171
|
-
)
|
|
1172
|
-
.then(commonHttpClient.getBody);
|
|
1173
|
-
}
|
|
1174
|
-
static initialize() {
|
|
1175
|
-
validationSchemaStorage.registerExtensible(
|
|
1176
|
-
"IssueCustomFieldContextsService.getContextsForField.response",
|
|
1177
|
-
z
|
|
1178
|
-
.object({
|
|
1179
|
-
status: z.literal(200),
|
|
1180
|
-
mediaType: z.literal("application/json"),
|
|
1181
|
-
body: validationSchemaStorage.lazy("PageBeanCustomFieldContext"),
|
|
1182
|
-
})
|
|
1183
|
-
.describe(
|
|
1184
|
-
"IssueCustomFieldContextsService.getContextsForField.response",
|
|
1185
|
-
),
|
|
1186
|
-
);
|
|
1187
|
-
validationSchemaStorage.registerExtensible(
|
|
1188
|
-
"IssueCustomFieldContextsService.createCustomFieldContext.response",
|
|
1189
|
-
z
|
|
1190
|
-
.object({
|
|
1191
|
-
status: z.literal(201),
|
|
1192
|
-
mediaType: z.literal("application/json"),
|
|
1193
|
-
body: validationSchemaStorage.lazy("CreateCustomFieldContext"),
|
|
1194
|
-
})
|
|
1195
|
-
.describe(
|
|
1196
|
-
"IssueCustomFieldContextsService.createCustomFieldContext.response",
|
|
1197
|
-
),
|
|
1198
|
-
);
|
|
1199
|
-
validationSchemaStorage.registerExtensible(
|
|
1200
|
-
"IssueCustomFieldContextsService.updateCustomFieldContext.response",
|
|
1201
|
-
z
|
|
1202
|
-
.object({
|
|
1203
|
-
status: z.literal(204),
|
|
1204
|
-
mediaType: z.literal("application/json"),
|
|
1205
|
-
body: z.unknown(),
|
|
1206
|
-
})
|
|
1207
|
-
.describe(
|
|
1208
|
-
"IssueCustomFieldContextsService.updateCustomFieldContext.response",
|
|
1209
|
-
),
|
|
1210
|
-
);
|
|
1211
|
-
validationSchemaStorage.registerExtensible(
|
|
1212
|
-
"IssueCustomFieldContextsService.deleteCustomFieldContext.response",
|
|
1213
|
-
z
|
|
1214
|
-
.object({
|
|
1215
|
-
status: z.literal(204),
|
|
1216
|
-
mediaType: z.literal("application/json"),
|
|
1217
|
-
body: z.unknown(),
|
|
1218
|
-
})
|
|
1219
|
-
.describe(
|
|
1220
|
-
"IssueCustomFieldContextsService.deleteCustomFieldContext.response",
|
|
1221
|
-
),
|
|
1222
|
-
);
|
|
1223
|
-
validationSchemaStorage.registerExtensible(
|
|
1224
|
-
"IssueCustomFieldContextsService.addIssueTypesToContext.response",
|
|
1225
|
-
z
|
|
1226
|
-
.object({
|
|
1227
|
-
status: z.literal(204),
|
|
1228
|
-
mediaType: z.literal("application/json"),
|
|
1229
|
-
body: z.unknown(),
|
|
1230
|
-
})
|
|
1231
|
-
.describe(
|
|
1232
|
-
"IssueCustomFieldContextsService.addIssueTypesToContext.response",
|
|
1233
|
-
),
|
|
1234
|
-
);
|
|
1235
|
-
validationSchemaStorage.registerExtensible(
|
|
1236
|
-
"IssueCustomFieldContextsService.removeIssueTypesFromContext.response",
|
|
1237
|
-
z
|
|
1238
|
-
.object({
|
|
1239
|
-
status: z.literal(204),
|
|
1240
|
-
mediaType: z.literal("application/json"),
|
|
1241
|
-
body: z.unknown(),
|
|
1242
|
-
})
|
|
1243
|
-
.describe(
|
|
1244
|
-
"IssueCustomFieldContextsService.removeIssueTypesFromContext.response",
|
|
1245
|
-
),
|
|
1246
|
-
);
|
|
1247
|
-
validationSchemaStorage.registerExtensible(
|
|
1248
|
-
"IssueCustomFieldContextsService.assignProjectsToCustomFieldContext.response",
|
|
1249
|
-
z
|
|
1250
|
-
.object({
|
|
1251
|
-
status: z.literal(204),
|
|
1252
|
-
mediaType: z.literal("application/json"),
|
|
1253
|
-
body: z.unknown(),
|
|
1254
|
-
})
|
|
1255
|
-
.describe(
|
|
1256
|
-
"IssueCustomFieldContextsService.assignProjectsToCustomFieldContext.response",
|
|
1257
|
-
),
|
|
1258
|
-
);
|
|
1259
|
-
validationSchemaStorage.registerExtensible(
|
|
1260
|
-
"IssueCustomFieldContextsService.removeCustomFieldContextFromProjects.response",
|
|
1261
|
-
z
|
|
1262
|
-
.object({
|
|
1263
|
-
status: z.literal(204),
|
|
1264
|
-
mediaType: z.literal("application/json"),
|
|
1265
|
-
body: z.unknown(),
|
|
1266
|
-
})
|
|
1267
|
-
.describe(
|
|
1268
|
-
"IssueCustomFieldContextsService.removeCustomFieldContextFromProjects.response",
|
|
1269
|
-
),
|
|
1270
|
-
);
|
|
1271
|
-
validationSchemaStorage.registerExtensible(
|
|
1272
|
-
"IssueCustomFieldContextsService.getDefaultValues.response",
|
|
1273
|
-
z
|
|
1274
|
-
.object({
|
|
1275
|
-
status: z.literal(200),
|
|
1276
|
-
mediaType: z.literal("application/json"),
|
|
1277
|
-
body: validationSchemaStorage.lazy(
|
|
1278
|
-
"PageBeanCustomFieldContextDefaultValue",
|
|
1279
|
-
),
|
|
1280
|
-
})
|
|
1281
|
-
.describe("IssueCustomFieldContextsService.getDefaultValues.response"),
|
|
1282
|
-
);
|
|
1283
|
-
validationSchemaStorage.registerExtensible(
|
|
1284
|
-
"IssueCustomFieldContextsService.setDefaultValues.response",
|
|
1285
|
-
z
|
|
1286
|
-
.object({
|
|
1287
|
-
status: z.literal(204),
|
|
1288
|
-
mediaType: z.literal("application/json"),
|
|
1289
|
-
body: z.unknown(),
|
|
1290
|
-
})
|
|
1291
|
-
.describe("IssueCustomFieldContextsService.setDefaultValues.response"),
|
|
1292
|
-
);
|
|
1293
|
-
validationSchemaStorage.registerExtensible(
|
|
1294
|
-
"IssueCustomFieldContextsService.getIssueTypeMappingsForContexts.response",
|
|
1295
|
-
z
|
|
1296
|
-
.object({
|
|
1297
|
-
status: z.literal(200),
|
|
1298
|
-
mediaType: z.literal("application/json"),
|
|
1299
|
-
body: validationSchemaStorage.lazy(
|
|
1300
|
-
"PageBeanIssueTypeToContextMapping",
|
|
1301
|
-
),
|
|
1302
|
-
})
|
|
1303
|
-
.describe(
|
|
1304
|
-
"IssueCustomFieldContextsService.getIssueTypeMappingsForContexts.response",
|
|
1305
|
-
),
|
|
1306
|
-
);
|
|
1307
|
-
validationSchemaStorage.registerExtensible(
|
|
1308
|
-
"IssueCustomFieldContextsService.getCustomFieldContextsForProjectsAndIssueTypes.response",
|
|
1309
|
-
z
|
|
1310
|
-
.object({
|
|
1311
|
-
status: z.literal(200),
|
|
1312
|
-
mediaType: z.literal("application/json"),
|
|
1313
|
-
body: validationSchemaStorage.lazy(
|
|
1314
|
-
"PageBeanContextForProjectAndIssueType",
|
|
1315
|
-
),
|
|
1316
|
-
})
|
|
1317
|
-
.describe(
|
|
1318
|
-
"IssueCustomFieldContextsService.getCustomFieldContextsForProjectsAndIssueTypes.response",
|
|
1319
|
-
),
|
|
1320
|
-
);
|
|
1321
|
-
validationSchemaStorage.registerExtensible(
|
|
1322
|
-
"IssueCustomFieldContextsService.getProjectContextMapping.response",
|
|
1323
|
-
z
|
|
1324
|
-
.object({
|
|
1325
|
-
status: z.literal(200),
|
|
1326
|
-
mediaType: z.literal("application/json"),
|
|
1327
|
-
body: validationSchemaStorage.lazy(
|
|
1328
|
-
"PageBeanCustomFieldContextProjectMapping",
|
|
1329
|
-
),
|
|
1330
|
-
})
|
|
1331
|
-
.describe(
|
|
1332
|
-
"IssueCustomFieldContextsService.getProjectContextMapping.response",
|
|
1333
|
-
),
|
|
1334
|
-
);
|
|
1335
|
-
validationSchemaStorage.registerOnce([
|
|
1336
|
-
registerIssueCustomFieldContextsValidationSchemas,
|
|
1337
|
-
]);
|
|
1338
|
-
}
|
|
1339
|
-
}
|