@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.
Files changed (201) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/package.json +10 -3
  3. package/.eslintrc.js +0 -3
  4. package/config/api-typescript-generator.config.ts +0 -91
  5. package/config/compare-schemas.ts +0 -307
  6. package/src/index.ts +0 -47
  7. package/src/openapi/platform/base-jira-platform-api-client.ts +0 -2298
  8. package/src/openapi/platform/core/common-http-client.ts +0 -723
  9. package/src/openapi/platform/core/common-http-service.ts +0 -22
  10. package/src/openapi/platform/core/common-validation-schema-storage.ts +0 -105
  11. package/src/openapi/platform/models/announcement-banner.ts +0 -59
  12. package/src/openapi/platform/models/app-data-policies.ts +0 -79
  13. package/src/openapi/platform/models/app-migration.ts +0 -172
  14. package/src/openapi/platform/models/app-properties.ts +0 -32
  15. package/src/openapi/platform/models/audit-records.ts +0 -140
  16. package/src/openapi/platform/models/avatars.ts +0 -48
  17. package/src/openapi/platform/models/classification-levels.ts +0 -58
  18. package/src/openapi/platform/models/common.ts +0 -2669
  19. package/src/openapi/platform/models/dashboards.ts +0 -849
  20. package/src/openapi/platform/models/dynamic-modules.ts +0 -121
  21. package/src/openapi/platform/models/filter-sharing.ts +0 -103
  22. package/src/openapi/platform/models/filters.ts +0 -319
  23. package/src/openapi/platform/models/group-and-user-picker.ts +0 -85
  24. package/src/openapi/platform/models/groups.ts +0 -247
  25. package/src/openapi/platform/models/issue-attachments.ts +0 -290
  26. package/src/openapi/platform/models/issue-comment-properties.ts +0 -27
  27. package/src/openapi/platform/models/issue-comments.ts +0 -91
  28. package/src/openapi/platform/models/issue-custom-field-configuration-apps.ts +0 -96
  29. package/src/openapi/platform/models/issue-custom-field-contexts.ts +0 -1072
  30. package/src/openapi/platform/models/issue-custom-field-options-apps.ts +0 -273
  31. package/src/openapi/platform/models/issue-custom-field-options.ts +0 -283
  32. package/src/openapi/platform/models/issue-custom-field-values-apps.ts +0 -118
  33. package/src/openapi/platform/models/issue-field-configurations.ts +0 -435
  34. package/src/openapi/platform/models/issue-fields.ts +0 -392
  35. package/src/openapi/platform/models/issue-link-types.ts +0 -28
  36. package/src/openapi/platform/models/issue-links.ts +0 -185
  37. package/src/openapi/platform/models/issue-notification-schemes.ts +0 -370
  38. package/src/openapi/platform/models/issue-priorities.ts +0 -196
  39. package/src/openapi/platform/models/issue-properties.ts +0 -259
  40. package/src/openapi/platform/models/issue-remote-links.ts +0 -207
  41. package/src/openapi/platform/models/issue-resolutions.ts +0 -180
  42. package/src/openapi/platform/models/issue-search.ts +0 -367
  43. package/src/openapi/platform/models/issue-security-level.ts +0 -76
  44. package/src/openapi/platform/models/issue-security-schemes.ts +0 -496
  45. package/src/openapi/platform/models/issue-type-schemes.ts +0 -290
  46. package/src/openapi/platform/models/issue-type-screen-schemes.ts +0 -286
  47. package/src/openapi/platform/models/issue-types.ts +0 -66
  48. package/src/openapi/platform/models/issue-votes.ts +0 -38
  49. package/src/openapi/platform/models/issue-watchers.ts +0 -67
  50. package/src/openapi/platform/models/issue-worklogs.ts +0 -190
  51. package/src/openapi/platform/models/issues.ts +0 -1268
  52. package/src/openapi/platform/models/jira-expressions.ts +0 -578
  53. package/src/openapi/platform/models/jira-settings.ts +0 -118
  54. package/src/openapi/platform/models/jql-functions-apps.ts +0 -128
  55. package/src/openapi/platform/models/jql.ts +0 -783
  56. package/src/openapi/platform/models/labels.ts +0 -42
  57. package/src/openapi/platform/models/license-metrics.ts +0 -68
  58. package/src/openapi/platform/models/myself.ts +0 -29
  59. package/src/openapi/platform/models/permission-schemes.ts +0 -89
  60. package/src/openapi/platform/models/permissions.ts +0 -308
  61. package/src/openapi/platform/models/priority-schemes.ts +0 -527
  62. package/src/openapi/platform/models/project-avatars.ts +0 -29
  63. package/src/openapi/platform/models/project-classification-levels.ts +0 -24
  64. package/src/openapi/platform/models/project-components.ts +0 -231
  65. package/src/openapi/platform/models/project-email.ts +0 -27
  66. package/src/openapi/platform/models/project-features.ts +0 -78
  67. package/src/openapi/platform/models/project-permission-schemes.ts +0 -43
  68. package/src/openapi/platform/models/project-role-actors.ts +0 -107
  69. package/src/openapi/platform/models/project-roles.ts +0 -76
  70. package/src/openapi/platform/models/project-types.ts +0 -36
  71. package/src/openapi/platform/models/project-versions.ts +0 -216
  72. package/src/openapi/platform/models/projects.ts +0 -429
  73. package/src/openapi/platform/models/screen-schemes.ts +0 -192
  74. package/src/openapi/platform/models/screen-tab-fields.ts +0 -45
  75. package/src/openapi/platform/models/screens.ts +0 -171
  76. package/src/openapi/platform/models/server-info.ts +0 -100
  77. package/src/openapi/platform/models/service-registry.ts +0 -68
  78. package/src/openapi/platform/models/status.ts +0 -229
  79. package/src/openapi/platform/models/time-tracking.ts +0 -38
  80. package/src/openapi/platform/models/ui-modifications-apps.ts +0 -229
  81. package/src/openapi/platform/models/user-search.ts +0 -69
  82. package/src/openapi/platform/models/users.ts +0 -121
  83. package/src/openapi/platform/models/webhooks.ts +0 -307
  84. package/src/openapi/platform/models/workflow-scheme-drafts.ts +0 -58
  85. package/src/openapi/platform/models/workflow-scheme-project-associations.ts +0 -68
  86. package/src/openapi/platform/models/workflow-schemes.ts +0 -545
  87. package/src/openapi/platform/models/workflow-transition-properties.ts +0 -33
  88. package/src/openapi/platform/models/workflow-transition-rules.ts +0 -261
  89. package/src/openapi/platform/models/workflows.ts +0 -1943
  90. package/src/openapi/platform/services/announcement-banner-service.ts +0 -142
  91. package/src/openapi/platform/services/app-data-policies-service.ts +0 -136
  92. package/src/openapi/platform/services/app-migration-service.ts +0 -289
  93. package/src/openapi/platform/services/app-properties-service.ts +0 -441
  94. package/src/openapi/platform/services/application-roles-service.ts +0 -247
  95. package/src/openapi/platform/services/audit-records-service.ts +0 -164
  96. package/src/openapi/platform/services/avatars-service.ts +0 -769
  97. package/src/openapi/platform/services/classification-levels-service.ts +0 -131
  98. package/src/openapi/platform/services/dashboards-service.ts +0 -1721
  99. package/src/openapi/platform/services/dynamic-modules-service.ts +0 -127
  100. package/src/openapi/platform/services/filter-sharing-service.ts +0 -687
  101. package/src/openapi/platform/services/filters-service.ts +0 -1901
  102. package/src/openapi/platform/services/group-and-user-picker-service.ts +0 -224
  103. package/src/openapi/platform/services/groups-service.ts +0 -751
  104. package/src/openapi/platform/services/issue-attachments-service.ts +0 -900
  105. package/src/openapi/platform/services/issue-comment-properties-service.ts +0 -324
  106. package/src/openapi/platform/services/issue-comments-service.ts +0 -812
  107. package/src/openapi/platform/services/issue-custom-field-configuration-apps-service.ts +0 -277
  108. package/src/openapi/platform/services/issue-custom-field-contexts-service.ts +0 -1339
  109. package/src/openapi/platform/services/issue-custom-field-options-apps-service.ts +0 -994
  110. package/src/openapi/platform/services/issue-custom-field-options-service.ts +0 -651
  111. package/src/openapi/platform/services/issue-custom-field-values-apps-service.ts +0 -201
  112. package/src/openapi/platform/services/issue-field-configurations-service.ts +0 -1294
  113. package/src/openapi/platform/services/issue-fields-service.ts +0 -837
  114. package/src/openapi/platform/services/issue-link-types-service.ts +0 -360
  115. package/src/openapi/platform/services/issue-links-service.ts +0 -345
  116. package/src/openapi/platform/services/issue-navigator-settings-service.ts +0 -119
  117. package/src/openapi/platform/services/issue-notification-schemes-service.ts +0 -1209
  118. package/src/openapi/platform/services/issue-priorities-service.ts +0 -575
  119. package/src/openapi/platform/services/issue-properties-service.ts +0 -606
  120. package/src/openapi/platform/services/issue-remote-links-service.ts +0 -597
  121. package/src/openapi/platform/services/issue-resolutions-service.ts +0 -534
  122. package/src/openapi/platform/services/issue-search-service.ts +0 -1139
  123. package/src/openapi/platform/services/issue-security-level-service.ts +0 -250
  124. package/src/openapi/platform/services/issue-security-schemes-service.ts +0 -1240
  125. package/src/openapi/platform/services/issue-type-properties-service.ts +0 -325
  126. package/src/openapi/platform/services/issue-type-schemes-service.ts +0 -940
  127. package/src/openapi/platform/services/issue-type-screen-schemes-service.ts +0 -994
  128. package/src/openapi/platform/services/issue-types-service.ts +0 -679
  129. package/src/openapi/platform/services/issue-votes-service.ts +0 -221
  130. package/src/openapi/platform/services/issue-watchers-service.ts +0 -331
  131. package/src/openapi/platform/services/issue-worklog-properties-service.ts +0 -348
  132. package/src/openapi/platform/services/issue-worklogs-service.ts +0 -1089
  133. package/src/openapi/platform/services/issues-service.ts +0 -3346
  134. package/src/openapi/platform/services/jira-expressions-service.ts +0 -407
  135. package/src/openapi/platform/services/jira-settings-service.ts +0 -415
  136. package/src/openapi/platform/services/jql-functions-apps-service.ts +0 -219
  137. package/src/openapi/platform/services/jql-service.ts +0 -896
  138. package/src/openapi/platform/services/labels-service.ts +0 -89
  139. package/src/openapi/platform/services/license-metrics-service.ts +0 -216
  140. package/src/openapi/platform/services/myself-service.ts +0 -520
  141. package/src/openapi/platform/services/permission-schemes-service.ts +0 -926
  142. package/src/openapi/platform/services/permissions-service.ts +0 -407
  143. package/src/openapi/platform/services/priority-schemes-service.ts +0 -1001
  144. package/src/openapi/platform/services/project-avatars-service.ts +0 -341
  145. package/src/openapi/platform/services/project-categories-service.ts +0 -318
  146. package/src/openapi/platform/services/project-classification-levels-service.ts +0 -232
  147. package/src/openapi/platform/services/project-components-service.ts +0 -1332
  148. package/src/openapi/platform/services/project-email-service.ts +0 -161
  149. package/src/openapi/platform/services/project-features-service.ts +0 -207
  150. package/src/openapi/platform/services/project-key-and-name-validation-service.ts +0 -200
  151. package/src/openapi/platform/services/project-permission-schemes-service.ts +0 -384
  152. package/src/openapi/platform/services/project-properties-service.ts +0 -320
  153. package/src/openapi/platform/services/project-role-actors-service.ts +0 -627
  154. package/src/openapi/platform/services/project-roles-service.ts +0 -867
  155. package/src/openapi/platform/services/project-types-service.ts +0 -297
  156. package/src/openapi/platform/services/project-versions-service.ts +0 -1287
  157. package/src/openapi/platform/services/projects-service.ts +0 -2196
  158. package/src/openapi/platform/services/screen-schemes-service.ts +0 -334
  159. package/src/openapi/platform/services/screen-tab-fields-service.ts +0 -276
  160. package/src/openapi/platform/services/screen-tabs-service.ts +0 -421
  161. package/src/openapi/platform/services/screens-service.ts +0 -528
  162. package/src/openapi/platform/services/server-info-service.ts +0 -88
  163. package/src/openapi/platform/services/service-registry-service.ts +0 -89
  164. package/src/openapi/platform/services/status-service.ts +0 -498
  165. package/src/openapi/platform/services/tasks-service.ts +0 -159
  166. package/src/openapi/platform/services/time-tracking-service.ts +0 -386
  167. package/src/openapi/platform/services/ui-modifications-apps-service.ts +0 -403
  168. package/src/openapi/platform/services/user-properties-service.ts +0 -413
  169. package/src/openapi/platform/services/user-search-service.ts +0 -1214
  170. package/src/openapi/platform/services/users-service.ts +0 -1108
  171. package/src/openapi/platform/services/webhooks-service.ts +0 -458
  172. package/src/openapi/platform/services/workflow-scheme-drafts-service.ts +0 -1313
  173. package/src/openapi/platform/services/workflow-scheme-project-associations-service.ts +0 -189
  174. package/src/openapi/platform/services/workflow-schemes-service.ts +0 -1617
  175. package/src/openapi/platform/services/workflow-status-categories-service.ts +0 -151
  176. package/src/openapi/platform/services/workflow-statuses-service.ts +0 -176
  177. package/src/openapi/platform/services/workflow-transition-properties-service.ts +0 -388
  178. package/src/openapi/platform/services/workflow-transition-rules-service.ts +0 -485
  179. package/src/openapi/platform/services/workflows-service.ts +0 -3477
  180. package/src/openapi/platform/validation-schema-storage.ts +0 -186
  181. package/src/openapi/software/base-jira-software-api-client.ts +0 -447
  182. package/src/openapi/software/core/common-http-client.ts +0 -723
  183. package/src/openapi/software/core/common-http-service.ts +0 -22
  184. package/src/openapi/software/core/common-validation-schema-storage.ts +0 -105
  185. package/src/openapi/software/models/board.ts +0 -918
  186. package/src/openapi/software/services/backlog-service.ts +0 -160
  187. package/src/openapi/software/services/board-service.ts +0 -4189
  188. package/src/openapi/software/services/builds-service.ts +0 -571
  189. package/src/openapi/software/services/deployments-service.ts +0 -403
  190. package/src/openapi/software/services/dev-ops-components-service.ts +0 -371
  191. package/src/openapi/software/services/development-information-service.ts +0 -2357
  192. package/src/openapi/software/services/epic-service.ts +0 -854
  193. package/src/openapi/software/services/feature-flags-service.ts +0 -303
  194. package/src/openapi/software/services/issue-service.ts +0 -529
  195. package/src/openapi/software/services/operations-service.ts +0 -741
  196. package/src/openapi/software/services/remote-links-service.ts +0 -653
  197. package/src/openapi/software/services/security-information-service.ts +0 -495
  198. package/src/openapi/software/services/sprint-service.ts +0 -969
  199. package/src/openapi/software/validation-schema-storage.ts +0 -186
  200. package/tsconfig.build.json +0 -7
  201. package/tsconfig.json +0 -4
@@ -1,926 +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 PermissionScheme,
10
- registerCommonValidationSchemas,
11
- } from "../models/common";
12
- import {
13
- type PermissionGrant,
14
- type PermissionGrants,
15
- type PermissionSchemes,
16
- registerPermissionSchemesValidationSchemas,
17
- } from "../models/permission-schemes";
18
- import { validationSchemaStorage } from "../validation-schema-storage";
19
- /**
20
- * This resource represents permission schemes. Use it to get, create, update, and
21
- * delete permission schemes as well as get, create, update, and delete details of
22
- * the permissions granted in those schemes.
23
- */
24
- export class PermissionSchemesService extends CommonHttpService {
25
- /**
26
- * Creates a permission grant in a permission scheme.
27
- *
28
- * **[Permissions](#permissions) required:** *Administer Jira* [global
29
- * permission](https://confluence.atlassian.com/x/x4dKLg).
30
- *
31
- * @returns Returned if the scheme permission is created.
32
- *
33
- * example: {
34
- * "holder": {
35
- * "expand": "group",
36
- * "parameter": "jira-core-users",
37
- * "type": "group",
38
- * "value": "ca85fac0-d974-40ca-a615-7af99c48d24f"
39
- * },
40
- * "id": 10000,
41
- * "permission": "ADMINISTER_PROJECTS",
42
- * "self":
43
- * "https://your-domain.atlassian.net/rest/api/3/permissionscheme/permission/10000"
44
- * }
45
- * @path {POST} /rest/api/3/permissionscheme/{schemeId}/permission
46
- * @scopes-current manage:jira-configuration
47
- * @scopes-beta read:application-role:jira, read:field:jira, read:group:jira,
48
- * read:permission:jira, read:project-role:jira, read:user:jira,
49
- * write:permission:jira
50
- */
51
- createPermissionGrant({
52
- schemeId,
53
- expand,
54
- permissionGrant,
55
- }: {
56
- /** The ID of the permission scheme in which to create a new permission grant. */
57
- schemeId: number;
58
- /**
59
- * Use expand to include additional information in the response. This parameter
60
- * accepts a comma-separated list. Note that permissions are always included when
61
- * you specify any value. Expand options include:
62
- *
63
- * * `permissions` Returns all permission grants for each permission scheme.
64
- * * `user` Returns information about the user who is granted the permission.
65
- * * `group` Returns information about the group that is granted the permission.
66
- * * `projectRole` Returns information about the project role granted the
67
- * permission.
68
- * * `field` Returns information about the custom field granted the permission.
69
- * * `all` Returns all expandable information.
70
- */
71
- expand?: string;
72
- /**
73
- * The permission grant to create.
74
- *
75
- * @example {
76
- * "holder": {
77
- * "parameter": "jira-core-users",
78
- * "type": "group",
79
- * "value": "ca85fac0-d974-40ca-a615-7af99c48d24f"
80
- * },
81
- * "permission": "ADMINISTER_PROJECTS"
82
- * }
83
- */
84
- permissionGrant: PermissionGrant;
85
- }): Promise<PermissionGrant> {
86
- return this.getClientInstance()
87
- .request({
88
- path: "/rest/api/3/permissionscheme/{schemeId}/permission",
89
- method: "POST",
90
- pathParams: {
91
- schemeId,
92
- },
93
- query: {
94
- expand,
95
- },
96
- headers: {
97
- "Content-Type": "application/json",
98
- },
99
- body: permissionGrant,
100
- })
101
- .then(
102
- this.getClientInstance().responseHandler({
103
- 201: {
104
- "application/json": "json",
105
- },
106
- }),
107
- )
108
- .then(
109
- commonHttpClient.castResponse<{
110
- status: 201;
111
- mediaType: "application/json";
112
- body: PermissionGrant;
113
- }>(),
114
- )
115
- .then(
116
- validationSchemaStorage.validator(
117
- "PermissionSchemesService.createPermissionGrant.response",
118
- ),
119
- )
120
- .then(commonHttpClient.getBody);
121
- }
122
- /**
123
- * Creates a new permission scheme. You can create a permission scheme with or
124
- * without defining a set of permission grants.
125
- *
126
- * **[Permissions](#permissions) required:** *Administer Jira* [global
127
- * permission](https://confluence.atlassian.com/x/x4dKLg).
128
- *
129
- * @returns Returned if the permission scheme is created.
130
- *
131
- * example: {
132
- * "description": "description",
133
- * "id": 10000,
134
- * "name": "Example permission scheme",
135
- * "permissions": [
136
- * {
137
- * "holder": {
138
- * "expand": "group",
139
- * "parameter": "jira-core-users",
140
- * "type": "group",
141
- * "value": "ca85fac0-d974-40ca-a615-7af99c48d24f"
142
- * },
143
- * "id": 10000,
144
- * "permission": "ADMINISTER_PROJECTS",
145
- * "self":
146
- * "https://your-domain.atlassian.net/rest/api/3/permissionscheme/permission/10000"
147
- * }
148
- * ],
149
- * "self": "https://your-domain.atlassian.net/rest/api/3/permissionscheme/10000"
150
- * }
151
- * @path {POST} /rest/api/3/permissionscheme
152
- * @scopes-current manage:jira-configuration
153
- * @scopes-beta write:permission-scheme:jira, read:application-role:jira, read:field:jira,
154
- * read:group:jira, read:permission-scheme:jira, read:permission:jira,
155
- * read:project-role:jira, read:user:jira, read:avatar:jira,
156
- * read:project-category:jira, read:project:jira
157
- */
158
- createPermissionScheme({
159
- expand,
160
- permissionScheme,
161
- }: {
162
- /**
163
- * Use expand to include additional information in the response. This parameter
164
- * accepts a comma-separated list. Note that permissions are always included when
165
- * you specify any value. Expand options include:
166
- *
167
- * * `all` Returns all expandable information.
168
- * * `field` Returns information about the custom field granted the permission.
169
- * * `group` Returns information about the group that is granted the permission.
170
- * * `permissions` Returns all permission grants for each permission scheme.
171
- * * `projectRole` Returns information about the project role granted the
172
- * permission.
173
- * * `user` Returns information about the user who is granted the permission.
174
- */
175
- expand?: string;
176
- /**
177
- * The permission scheme to create.
178
- *
179
- * @example {
180
- * "description": "description",
181
- * "name": "Example permission scheme",
182
- * "permissions": [
183
- * {
184
- * "holder": {
185
- * "parameter": "jira-core-users",
186
- * "type": "group",
187
- * "value": "ca85fac0-d974-40ca-a615-7af99c48d24f"
188
- * },
189
- * "permission": "ADMINISTER_PROJECTS"
190
- * }
191
- * ]
192
- * }
193
- */
194
- permissionScheme: PermissionScheme;
195
- }): Promise<PermissionScheme> {
196
- return this.getClientInstance()
197
- .request({
198
- path: "/rest/api/3/permissionscheme",
199
- method: "POST",
200
- query: {
201
- expand,
202
- },
203
- headers: {
204
- "Content-Type": "application/json",
205
- },
206
- body: permissionScheme,
207
- })
208
- .then(
209
- this.getClientInstance().responseHandler({
210
- 201: {
211
- "application/json": "json",
212
- },
213
- }),
214
- )
215
- .then(
216
- commonHttpClient.castResponse<{
217
- status: 201;
218
- mediaType: "application/json";
219
- body: PermissionScheme;
220
- }>(),
221
- )
222
- .then(
223
- validationSchemaStorage.validator(
224
- "PermissionSchemesService.createPermissionScheme.response",
225
- ),
226
- )
227
- .then(commonHttpClient.getBody);
228
- }
229
- /**
230
- * Deletes a permission scheme.
231
- *
232
- * **[Permissions](#permissions) required:** *Administer Jira* [global
233
- * permission](https://confluence.atlassian.com/x/x4dKLg).
234
- *
235
- * @path {DELETE} /rest/api/3/permissionscheme/{schemeId}
236
- * @scopes-current manage:jira-configuration
237
- * @scopes-beta delete:permission-scheme:jira
238
- */
239
- deletePermissionScheme({
240
- schemeId,
241
- }: {
242
- /** The ID of the permission scheme being deleted. */
243
- schemeId: number;
244
- }): Promise<void> {
245
- return this.getClientInstance()
246
- .request({
247
- path: "/rest/api/3/permissionscheme/{schemeId}",
248
- method: "DELETE",
249
- pathParams: {
250
- schemeId,
251
- },
252
- })
253
- .then(commonHttpClient.discardResult);
254
- }
255
- /**
256
- * Deletes a permission grant from a permission scheme. See [About permission
257
- * schemes and
258
- * grants](../api-group-permission-schemes/#about-permission-schemes-and-grants)
259
- * for more details.
260
- *
261
- * **[Permissions](#permissions) required:** *Administer Jira* [global
262
- * permission](https://confluence.atlassian.com/x/x4dKLg).
263
- *
264
- * @path {DELETE} /rest/api/3/permissionscheme/{schemeId}/permission/{permissionId}
265
- * @scopes-current manage:jira-configuration
266
- * @scopes-beta delete:permission:jira
267
- */
268
- deletePermissionSchemeEntity({
269
- schemeId,
270
- permissionId,
271
- }: {
272
- /** The ID of the permission scheme to delete the permission grant from. */
273
- schemeId: number;
274
- /** The ID of the permission grant to delete. */
275
- permissionId: number;
276
- }): Promise<void> {
277
- return this.getClientInstance()
278
- .request({
279
- path: "/rest/api/3/permissionscheme/{schemeId}/permission/{permissionId}",
280
- method: "DELETE",
281
- pathParams: {
282
- schemeId,
283
- permissionId,
284
- },
285
- })
286
- .then(commonHttpClient.discardResult);
287
- }
288
- /**
289
- * Returns all permission schemes.
290
- *
291
- * ### About permission schemes and grants ###
292
- *
293
- * A permission scheme is a collection of permission grants. A permission grant
294
- * consists of a `holder` and a `permission`.
295
- *
296
- * #### Holder object ####
297
- *
298
- * The `holder` object contains information about the user or group being granted
299
- * the permission. For example, the *Administer projects* permission is granted to
300
- * a group named *Teams in space administrators*. In this case, the type is
301
- * `"type": "group"`, and the parameter is the group name, `"parameter": "Teams in
302
- * space administrators"` and the value is group ID, `"value":
303
- * "ca85fac0-d974-40ca-a615-7af99c48d24f"`.
304
- *
305
- * The `holder` object is defined by the following properties:
306
- *
307
- * * `type` Identifies the user or group (see the list of types below).
308
- * * `parameter` As a group's name can change, use of `value` is recommended.
309
- * The value of this property depends on the `type`. For example, if the `type` is
310
- * a group, then you need to specify the group name.
311
- * * `value` The value of this property depends on the `type`. If the `type` is
312
- * a group, then you need to specify the group ID. For other `type` it has the
313
- * same value as `parameter`
314
- *
315
- * The following `types` are available. The expected values for `parameter` and
316
- * `value` are given in parentheses (some types may not have a `parameter` or
317
- * `value`):
318
- *
319
- * * `anyone` Grant for anonymous users.
320
- * * `applicationRole` Grant for users with access to the specified application
321
- * (application name, application name). See [Update product access
322
- * settings](https://confluence.atlassian.com/x/3YxjL) for more information.
323
- * * `assignee` Grant for the user currently assigned to an issue.
324
- * * `group` Grant for the specified group (`parameter` : group name, `value` :
325
- * group ID).
326
- * * `groupCustomField` Grant for a user in the group selected in the specified
327
- * custom field (`parameter` : custom field ID, `value` : custom field ID).
328
- * * `projectLead` Grant for a project lead.
329
- * * `projectRole` Grant for the specified project role (`parameter` :project
330
- * role ID, `value` : project role ID).
331
- * * `reporter` Grant for the user who reported the issue.
332
- * * `sd.customer.portal.only` Jira Service Desk only. Grants customers
333
- * permission to access the customer portal but not Jira. See [Customizing Jira
334
- * Service Desk permissions](https://confluence.atlassian.com/x/24dKLg) for more
335
- * information.
336
- * * `user` Grant for the specified user (`parameter` : user ID - historically
337
- * this was the userkey but that is deprecated and the account ID should be used,
338
- * `value` : user ID).
339
- * * `userCustomField` Grant for a user selected in the specified custom field
340
- * (`parameter` : custom field ID, `value` : custom field ID).
341
- *
342
- * #### Built-in permissions ####
343
- *
344
- * The [built-in Jira permissions](https://confluence.atlassian.com/x/yodKLg) are
345
- * listed below. Apps can also define custom permissions. See the [project
346
- * permission](https://developer.atlassian.com/cloud/jira/platform/modules/project-permission/)
347
- * and [global
348
- * permission](https://developer.atlassian.com/cloud/jira/platform/modules/global-permission/)
349
- * module documentation for more information.
350
- *
351
- * **Project permissions**
352
- *
353
- * * `ADMINISTER_PROJECTS`
354
- * * `BROWSE_PROJECTS`
355
- * * `MANAGE_SPRINTS_PERMISSION` (Jira Software only)
356
- * * `SERVICEDESK_AGENT` (Jira Service Desk only)
357
- * * `VIEW_DEV_TOOLS` (Jira Software only)
358
- * * `VIEW_READONLY_WORKFLOW`
359
- *
360
- * **Issue permissions**
361
- *
362
- * * `ASSIGNABLE_USER`
363
- * * `ASSIGN_ISSUES`
364
- * * `CLOSE_ISSUES`
365
- * * `CREATE_ISSUES`
366
- * * `DELETE_ISSUES`
367
- * * `EDIT_ISSUES`
368
- * * `LINK_ISSUES`
369
- * * `MODIFY_REPORTER`
370
- * * `MOVE_ISSUES`
371
- * * `RESOLVE_ISSUES`
372
- * * `SCHEDULE_ISSUES`
373
- * * `SET_ISSUE_SECURITY`
374
- * * `TRANSITION_ISSUES`
375
- *
376
- * **Voters and watchers permissions**
377
- *
378
- * * `MANAGE_WATCHERS`
379
- * * `VIEW_VOTERS_AND_WATCHERS`
380
- *
381
- * **Comments permissions**
382
- *
383
- * * `ADD_COMMENTS`
384
- * * `DELETE_ALL_COMMENTS`
385
- * * `DELETE_OWN_COMMENTS`
386
- * * `EDIT_ALL_COMMENTS`
387
- * * `EDIT_OWN_COMMENTS`
388
- *
389
- * **Attachments permissions**
390
- *
391
- * * `CREATE_ATTACHMENTS`
392
- * * `DELETE_ALL_ATTACHMENTS`
393
- * * `DELETE_OWN_ATTACHMENTS`
394
- *
395
- * **Time tracking permissions**
396
- *
397
- * * `DELETE_ALL_WORKLOGS`
398
- * * `DELETE_OWN_WORKLOGS`
399
- * * `EDIT_ALL_WORKLOGS`
400
- * * `EDIT_OWN_WORKLOGS`
401
- * * `WORK_ON_ISSUES`
402
- *
403
- * **[Permissions](#permissions) required:** Permission to access Jira.
404
- *
405
- * @returns Returned if the request is successful.
406
- *
407
- * example: {
408
- * "permissionSchemes": [
409
- * {
410
- * "description": "description",
411
- * "id": 10000,
412
- * "name": "Example permission scheme",
413
- * "self":
414
- * "https://your-domain.atlassian.net/rest/api/3/permissionscheme/10000"
415
- * }
416
- * ]
417
- * }
418
- * @path {GET} /rest/api/3/permissionscheme
419
- * @scopes-current read:jira-work
420
- * @scopes-beta read:application-role:jira, read:field:jira, read:group:jira,
421
- * read:permission-scheme:jira, read:permission:jira, read:project-role:jira,
422
- * read:user:jira, read:avatar:jira, read:project-category:jira, read:project:jira
423
- */
424
- getAllPermissionSchemes({
425
- expand,
426
- }: {
427
- /**
428
- * Use expand to include additional information in the response. This parameter
429
- * accepts a comma-separated list. Note that permissions are included when you
430
- * specify any value. Expand options include:
431
- *
432
- * * `all` Returns all expandable information.
433
- * * `field` Returns information about the custom field granted the permission.
434
- * * `group` Returns information about the group that is granted the permission.
435
- * * `permissions` Returns all permission grants for each permission scheme.
436
- * * `projectRole` Returns information about the project role granted the
437
- * permission.
438
- * * `user` Returns information about the user who is granted the permission.
439
- */
440
- expand?: string;
441
- }): Promise<PermissionSchemes> {
442
- return this.getClientInstance()
443
- .request({
444
- path: "/rest/api/3/permissionscheme",
445
- method: "GET",
446
- query: {
447
- expand,
448
- },
449
- })
450
- .then(
451
- this.getClientInstance().responseHandler({
452
- 200: {
453
- "application/json": "json",
454
- },
455
- }),
456
- )
457
- .then(
458
- commonHttpClient.castResponse<{
459
- status: 200;
460
- mediaType: "application/json";
461
- body: PermissionSchemes;
462
- }>(),
463
- )
464
- .then(
465
- validationSchemaStorage.validator(
466
- "PermissionSchemesService.getAllPermissionSchemes.response",
467
- ),
468
- )
469
- .then(commonHttpClient.getBody);
470
- }
471
- /**
472
- * Returns a permission scheme.
473
- *
474
- * **[Permissions](#permissions) required:** Permission to access Jira.
475
- *
476
- * @returns Returned if the request is successful.
477
- *
478
- * example: {
479
- * "description": "description",
480
- * "id": 10000,
481
- * "name": "Example permission scheme",
482
- * "permissions": [
483
- * {
484
- * "holder": {
485
- * "expand": "group",
486
- * "parameter": "jira-core-users",
487
- * "type": "group",
488
- * "value": "ca85fac0-d974-40ca-a615-7af99c48d24f"
489
- * },
490
- * "id": 10000,
491
- * "permission": "ADMINISTER_PROJECTS",
492
- * "self":
493
- * "https://your-domain.atlassian.net/rest/api/3/permissionscheme/permission/10000"
494
- * }
495
- * ],
496
- * "self": "https://your-domain.atlassian.net/rest/api/3/permissionscheme/10000"
497
- * }
498
- * @path {GET} /rest/api/3/permissionscheme/{schemeId}
499
- * @scopes-current read:jira-work
500
- * @scopes-beta read:application-role:jira, read:field:jira, read:group:jira,
501
- * read:permission-scheme:jira, read:permission:jira, read:project-role:jira,
502
- * read:user:jira, read:avatar:jira, read:project-category:jira, read:project:jira
503
- */
504
- getPermissionScheme({
505
- schemeId,
506
- expand,
507
- }: {
508
- /** The ID of the permission scheme to return. */
509
- schemeId: number;
510
- /**
511
- * Use expand to include additional information in the response. This parameter
512
- * accepts a comma-separated list. Note that permissions are included when you
513
- * specify any value. Expand options include:
514
- *
515
- * * `all` Returns all expandable information.
516
- * * `field` Returns information about the custom field granted the permission.
517
- * * `group` Returns information about the group that is granted the permission.
518
- * * `permissions` Returns all permission grants for each permission scheme.
519
- * * `projectRole` Returns information about the project role granted the
520
- * permission.
521
- * * `user` Returns information about the user who is granted the permission.
522
- */
523
- expand?: string;
524
- }): Promise<PermissionScheme> {
525
- return this.getClientInstance()
526
- .request({
527
- path: "/rest/api/3/permissionscheme/{schemeId}",
528
- method: "GET",
529
- pathParams: {
530
- schemeId,
531
- },
532
- query: {
533
- expand,
534
- },
535
- })
536
- .then(
537
- this.getClientInstance().responseHandler({
538
- 200: {
539
- "application/json": "json",
540
- },
541
- }),
542
- )
543
- .then(
544
- commonHttpClient.castResponse<{
545
- status: 200;
546
- mediaType: "application/json";
547
- body: PermissionScheme;
548
- }>(),
549
- )
550
- .then(
551
- validationSchemaStorage.validator(
552
- "PermissionSchemesService.getPermissionScheme.response",
553
- ),
554
- )
555
- .then(commonHttpClient.getBody);
556
- }
557
- /**
558
- * Returns a permission grant.
559
- *
560
- * **[Permissions](#permissions) required:** Permission to access Jira.
561
- *
562
- * @returns Returned if the request is successful.
563
- *
564
- * example: {
565
- * "holder": {
566
- * "expand": "group",
567
- * "parameter": "jira-core-users",
568
- * "type": "group",
569
- * "value": "ca85fac0-d974-40ca-a615-7af99c48d24f"
570
- * },
571
- * "id": 10000,
572
- * "permission": "ADMINISTER_PROJECTS",
573
- * "self":
574
- * "https://your-domain.atlassian.net/rest/api/3/permissionscheme/permission/10000"
575
- * }
576
- * @path {GET} /rest/api/3/permissionscheme/{schemeId}/permission/{permissionId}
577
- * @scopes-current read:jira-work
578
- * @scopes-beta read:application-role:jira, read:field:jira, read:group:jira,
579
- * read:permission:jira, read:project-role:jira, read:user:jira
580
- */
581
- getPermissionSchemeGrant({
582
- schemeId,
583
- permissionId,
584
- expand,
585
- }: {
586
- /** The ID of the permission scheme. */
587
- schemeId: number;
588
- /** The ID of the permission grant. */
589
- permissionId: number;
590
- /**
591
- * Use expand to include additional information in the response. This parameter
592
- * accepts a comma-separated list. Note that permissions are always included when
593
- * you specify any value. Expand options include:
594
- *
595
- * * `all` Returns all expandable information.
596
- * * `field` Returns information about the custom field granted the permission.
597
- * * `group` Returns information about the group that is granted the permission.
598
- * * `permissions` Returns all permission grants for each permission scheme.
599
- * * `projectRole` Returns information about the project role granted the
600
- * permission.
601
- * * `user` Returns information about the user who is granted the permission.
602
- */
603
- expand?: string;
604
- }): Promise<PermissionGrant> {
605
- return this.getClientInstance()
606
- .request({
607
- path: "/rest/api/3/permissionscheme/{schemeId}/permission/{permissionId}",
608
- method: "GET",
609
- pathParams: {
610
- schemeId,
611
- permissionId,
612
- },
613
- query: {
614
- expand,
615
- },
616
- })
617
- .then(
618
- this.getClientInstance().responseHandler({
619
- 200: {
620
- "application/json": "json",
621
- },
622
- }),
623
- )
624
- .then(
625
- commonHttpClient.castResponse<{
626
- status: 200;
627
- mediaType: "application/json";
628
- body: PermissionGrant;
629
- }>(),
630
- )
631
- .then(
632
- validationSchemaStorage.validator(
633
- "PermissionSchemesService.getPermissionSchemeGrant.response",
634
- ),
635
- )
636
- .then(commonHttpClient.getBody);
637
- }
638
- /**
639
- * Returns all permission grants for a permission scheme.
640
- *
641
- * **[Permissions](#permissions) required:** Permission to access Jira.
642
- *
643
- * @returns Returned if the request is successful.
644
- *
645
- * example: {
646
- * "expand": "user,group,projectRole,field,all",
647
- * "permissions": [
648
- * {
649
- * "holder": {
650
- * "expand": "group",
651
- * "parameter": "jira-core-users",
652
- * "type": "group",
653
- * "value": "ca85fac0-d974-40ca-a615-7af99c48d24f"
654
- * },
655
- * "id": 10000,
656
- * "permission": "ADMINISTER_PROJECTS",
657
- * "self":
658
- * "https://your-domain.atlassian.net/rest/api/3/permissionscheme/permission/10000"
659
- * }
660
- * ]
661
- * }
662
- * @path {GET} /rest/api/3/permissionscheme/{schemeId}/permission
663
- * @scopes-current read:jira-work
664
- * @scopes-beta read:application-role:jira, read:field:jira, read:group:jira,
665
- * read:permission:jira, read:project-role:jira, read:user:jira
666
- */
667
- getPermissionSchemeGrants({
668
- schemeId,
669
- expand,
670
- }: {
671
- /** The ID of the permission scheme. */
672
- schemeId: number;
673
- /**
674
- * Use expand to include additional information in the response. This parameter
675
- * accepts a comma-separated list. Note that permissions are always included when
676
- * you specify any value. Expand options include:
677
- *
678
- * * `permissions` Returns all permission grants for each permission scheme.
679
- * * `user` Returns information about the user who is granted the permission.
680
- * * `group` Returns information about the group that is granted the permission.
681
- * * `projectRole` Returns information about the project role granted the
682
- * permission.
683
- * * `field` Returns information about the custom field granted the permission.
684
- * * `all` Returns all expandable information.
685
- */
686
- expand?: string;
687
- }): Promise<PermissionGrants> {
688
- return this.getClientInstance()
689
- .request({
690
- path: "/rest/api/3/permissionscheme/{schemeId}/permission",
691
- method: "GET",
692
- pathParams: {
693
- schemeId,
694
- },
695
- query: {
696
- expand,
697
- },
698
- })
699
- .then(
700
- this.getClientInstance().responseHandler({
701
- 200: {
702
- "application/json": "json",
703
- },
704
- }),
705
- )
706
- .then(
707
- commonHttpClient.castResponse<{
708
- status: 200;
709
- mediaType: "application/json";
710
- body: PermissionGrants;
711
- }>(),
712
- )
713
- .then(
714
- validationSchemaStorage.validator(
715
- "PermissionSchemesService.getPermissionSchemeGrants.response",
716
- ),
717
- )
718
- .then(commonHttpClient.getBody);
719
- }
720
- /**
721
- * Updates a permission scheme. Below are some important things to note when using
722
- * this resource:
723
- *
724
- * * If a permissions list is present in the request, then it is set in the
725
- * permission scheme, overwriting *all existing* grants.
726
- * * If you want to update only the name and description, then do not send a
727
- * permissions list in the request.
728
- * * Sending an empty list will remove all permission grants from the permission
729
- * scheme.
730
- *
731
- * If you want to add or delete a permission grant instead of updating the whole
732
- * list, see [Create permission
733
- * grant](#api-rest-api-3-permissionscheme-schemeId-permission-post) or [Delete
734
- * permission scheme
735
- * entity](#api-rest-api-3-permissionscheme-schemeId-permission-permissionId-delete).
736
- *
737
- * See [About permission schemes and
738
- * grants](../api-group-permission-schemes/#about-permission-schemes-and-grants)
739
- * for more details.
740
- *
741
- * **[Permissions](#permissions) required:** *Administer Jira* [global
742
- * permission](https://confluence.atlassian.com/x/x4dKLg).
743
- *
744
- * @returns Returned if the scheme is updated.
745
- *
746
- * example: {
747
- * "description": "description",
748
- * "id": 10000,
749
- * "name": "Example permission scheme",
750
- * "permissions": [
751
- * {
752
- * "holder": {
753
- * "expand": "group",
754
- * "parameter": "jira-core-users",
755
- * "type": "group",
756
- * "value": "ca85fac0-d974-40ca-a615-7af99c48d24f"
757
- * },
758
- * "id": 10000,
759
- * "permission": "ADMINISTER_PROJECTS",
760
- * "self":
761
- * "https://your-domain.atlassian.net/rest/api/3/permissionscheme/permission/10000"
762
- * }
763
- * ],
764
- * "self": "https://your-domain.atlassian.net/rest/api/3/permissionscheme/10000"
765
- * }
766
- * @path {PUT} /rest/api/3/permissionscheme/{schemeId}
767
- * @scopes-current manage:jira-configuration
768
- * @scopes-beta write:permission-scheme:jira, read:application-role:jira, read:field:jira,
769
- * read:group:jira, read:permission-scheme:jira, read:permission:jira,
770
- * read:project-role:jira, read:user:jira, read:avatar:jira,
771
- * read:project-category:jira, read:project:jira
772
- */
773
- updatePermissionScheme({
774
- schemeId,
775
- expand,
776
- permissionScheme,
777
- }: {
778
- /** The ID of the permission scheme to update. */
779
- schemeId: number;
780
- /**
781
- * Use expand to include additional information in the response. This parameter
782
- * accepts a comma-separated list. Note that permissions are always included when
783
- * you specify any value. Expand options include:
784
- *
785
- * * `all` Returns all expandable information.
786
- * * `field` Returns information about the custom field granted the permission.
787
- * * `group` Returns information about the group that is granted the permission.
788
- * * `permissions` Returns all permission grants for each permission scheme.
789
- * * `projectRole` Returns information about the project role granted the
790
- * permission.
791
- * * `user` Returns information about the user who is granted the permission.
792
- */
793
- expand?: string;
794
- /**
795
- * @example {
796
- * "description": "description",
797
- * "name": "Example permission scheme",
798
- * "permissions": [
799
- * {
800
- * "holder": {
801
- * "parameter": "jira-core-users",
802
- * "type": "group",
803
- * "value": "ca85fac0-d974-40ca-a615-7af99c48d24f"
804
- * },
805
- * "permission": "ADMINISTER_PROJECTS"
806
- * }
807
- * ]
808
- * }
809
- */
810
- permissionScheme: PermissionScheme;
811
- }): Promise<PermissionScheme> {
812
- return this.getClientInstance()
813
- .request({
814
- path: "/rest/api/3/permissionscheme/{schemeId}",
815
- method: "PUT",
816
- pathParams: {
817
- schemeId,
818
- },
819
- query: {
820
- expand,
821
- },
822
- headers: {
823
- "Content-Type": "application/json",
824
- },
825
- body: permissionScheme,
826
- })
827
- .then(
828
- this.getClientInstance().responseHandler({
829
- 200: {
830
- "application/json": "json",
831
- },
832
- }),
833
- )
834
- .then(
835
- commonHttpClient.castResponse<{
836
- status: 200;
837
- mediaType: "application/json";
838
- body: PermissionScheme;
839
- }>(),
840
- )
841
- .then(
842
- validationSchemaStorage.validator(
843
- "PermissionSchemesService.updatePermissionScheme.response",
844
- ),
845
- )
846
- .then(commonHttpClient.getBody);
847
- }
848
- static initialize() {
849
- validationSchemaStorage.registerExtensible(
850
- "PermissionSchemesService.getAllPermissionSchemes.response",
851
- z
852
- .object({
853
- status: z.literal(200),
854
- mediaType: z.literal("application/json"),
855
- body: validationSchemaStorage.lazy("PermissionSchemes"),
856
- })
857
- .describe("PermissionSchemesService.getAllPermissionSchemes.response"),
858
- );
859
- validationSchemaStorage.registerExtensible(
860
- "PermissionSchemesService.createPermissionScheme.response",
861
- z
862
- .object({
863
- status: z.literal(201),
864
- mediaType: z.literal("application/json"),
865
- body: validationSchemaStorage.lazy("PermissionScheme"),
866
- })
867
- .describe("PermissionSchemesService.createPermissionScheme.response"),
868
- );
869
- validationSchemaStorage.registerExtensible(
870
- "PermissionSchemesService.getPermissionScheme.response",
871
- z
872
- .object({
873
- status: z.literal(200),
874
- mediaType: z.literal("application/json"),
875
- body: validationSchemaStorage.lazy("PermissionScheme"),
876
- })
877
- .describe("PermissionSchemesService.getPermissionScheme.response"),
878
- );
879
- validationSchemaStorage.registerExtensible(
880
- "PermissionSchemesService.updatePermissionScheme.response",
881
- z
882
- .object({
883
- status: z.literal(200),
884
- mediaType: z.literal("application/json"),
885
- body: validationSchemaStorage.lazy("PermissionScheme"),
886
- })
887
- .describe("PermissionSchemesService.updatePermissionScheme.response"),
888
- );
889
- validationSchemaStorage.registerExtensible(
890
- "PermissionSchemesService.getPermissionSchemeGrants.response",
891
- z
892
- .object({
893
- status: z.literal(200),
894
- mediaType: z.literal("application/json"),
895
- body: validationSchemaStorage.lazy("PermissionGrants"),
896
- })
897
- .describe(
898
- "PermissionSchemesService.getPermissionSchemeGrants.response",
899
- ),
900
- );
901
- validationSchemaStorage.registerExtensible(
902
- "PermissionSchemesService.createPermissionGrant.response",
903
- z
904
- .object({
905
- status: z.literal(201),
906
- mediaType: z.literal("application/json"),
907
- body: validationSchemaStorage.lazy("PermissionGrant"),
908
- })
909
- .describe("PermissionSchemesService.createPermissionGrant.response"),
910
- );
911
- validationSchemaStorage.registerExtensible(
912
- "PermissionSchemesService.getPermissionSchemeGrant.response",
913
- z
914
- .object({
915
- status: z.literal(200),
916
- mediaType: z.literal("application/json"),
917
- body: validationSchemaStorage.lazy("PermissionGrant"),
918
- })
919
- .describe("PermissionSchemesService.getPermissionSchemeGrant.response"),
920
- );
921
- validationSchemaStorage.registerOnce([
922
- registerPermissionSchemesValidationSchemas,
923
- registerCommonValidationSchemas,
924
- ]);
925
- }
926
- }