@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,441 +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 OperationMessage,
10
- registerAppPropertiesValidationSchemas,
11
- } from "../models/app-properties";
12
- import {
13
- type EntityProperty,
14
- type PropertyKeys,
15
- registerCommonValidationSchemas,
16
- } from "../models/common";
17
- import { validationSchemaStorage } from "../validation-schema-storage";
18
- /**
19
- * This resource represents app properties. Use it to store arbitrary data for your
20
- * [Connect
21
- * app](https://developer.atlassian.com/cloud/jira/platform/index/#connect-apps).
22
- */
23
- export class AppPropertiesService extends CommonHttpService {
24
- /**
25
- * Deletes an app's property.
26
- *
27
- * **[Permissions](#permissions) required:** Only a Connect app whose key matches
28
- * `addonKey` can make this request.
29
- * Additionally, Forge apps can access Connect app properties (stored against the
30
- * same `app.connect.key`).
31
- *
32
- * @path {DELETE} /rest/atlassian-connect/1/addons/{addonKey}/properties/{propertyKey}
33
- * @scopes-current
34
- * @scopes-beta
35
- */
36
- addonPropertiesResourceDeleteAddonPropertyDelete({
37
- addonKey,
38
- propertyKey,
39
- }: {
40
- /** The key of the app, as defined in its descriptor. */
41
- addonKey: string;
42
- /** The key of the property. */
43
- propertyKey: string;
44
- }): Promise<void> {
45
- return this.getClientInstance()
46
- .request({
47
- path: "/rest/atlassian-connect/1/addons/{addonKey}/properties/{propertyKey}",
48
- method: "DELETE",
49
- pathParams: {
50
- addonKey,
51
- propertyKey,
52
- },
53
- })
54
- .then(commonHttpClient.discardResult);
55
- }
56
- /**
57
- * Gets all the properties of an app.
58
- *
59
- * **[Permissions](#permissions) required:** Only a Connect app whose key matches
60
- * `addonKey` can make this request.
61
- * Additionally, Forge apps can access Connect app properties (stored against the
62
- * same `app.connect.key`).
63
- *
64
- * @returns Returned if the request is successful.
65
- *
66
- * example: {
67
- * "keys": [
68
- * {
69
- * "self":
70
- * "https://your-domain.atlassian.net/jira/rest/atlassian-connect/1/addon/example.app.key/properties/propertyKey",
71
- * "key": "propertyKey"
72
- * }
73
- * ]
74
- * }
75
- * @path {GET} /rest/atlassian-connect/1/addons/{addonKey}/properties
76
- * @scopes-current
77
- * @scopes-beta
78
- */
79
- addonPropertiesResourceGetAddonPropertiesGet({
80
- addonKey,
81
- }: {
82
- /** The key of the app, as defined in its descriptor. */
83
- addonKey: string;
84
- }): Promise<PropertyKeys> {
85
- return this.getClientInstance()
86
- .request({
87
- path: "/rest/atlassian-connect/1/addons/{addonKey}/properties",
88
- method: "GET",
89
- pathParams: {
90
- addonKey,
91
- },
92
- })
93
- .then(
94
- this.getClientInstance().responseHandler({
95
- 200: {
96
- "application/json": "json",
97
- },
98
- }),
99
- )
100
- .then(
101
- commonHttpClient.castResponse<{
102
- status: 200;
103
- mediaType: "application/json";
104
- body: PropertyKeys;
105
- }>(),
106
- )
107
- .then(
108
- validationSchemaStorage.validator(
109
- "AppPropertiesService.AddonPropertiesResource.getAddonProperties_get.response",
110
- ),
111
- )
112
- .then(commonHttpClient.getBody);
113
- }
114
- /**
115
- * Returns the key and value of an app's property.
116
- *
117
- * **[Permissions](#permissions) required:** Only a Connect app whose key matches
118
- * `addonKey` can make this request.
119
- * Additionally, Forge apps can access Connect app properties (stored against the
120
- * same `app.connect.key`).
121
- *
122
- * @returns Returned if the request is successful.
123
- *
124
- * example: {
125
- * "self":
126
- * "https://your-domain.atlassian.net/jira/rest/atlassian-connect/1/addon/example.app.key/properties/propertyKey",
127
- * "key": "propertyKey",
128
- * "value": "propertyValue"
129
- * }
130
- * @path {GET} /rest/atlassian-connect/1/addons/{addonKey}/properties/{propertyKey}
131
- * @scopes-current
132
- * @scopes-beta
133
- */
134
- addonPropertiesResourceGetAddonPropertyGet({
135
- addonKey,
136
- propertyKey,
137
- }: {
138
- /** The key of the app, as defined in its descriptor. */
139
- addonKey: string;
140
- /** The key of the property. */
141
- propertyKey: string;
142
- }): Promise<EntityProperty> {
143
- return this.getClientInstance()
144
- .request({
145
- path: "/rest/atlassian-connect/1/addons/{addonKey}/properties/{propertyKey}",
146
- method: "GET",
147
- pathParams: {
148
- addonKey,
149
- propertyKey,
150
- },
151
- })
152
- .then(
153
- this.getClientInstance().responseHandler({
154
- 200: {
155
- "application/json": "json",
156
- },
157
- }),
158
- )
159
- .then(
160
- commonHttpClient.castResponse<{
161
- status: 200;
162
- mediaType: "application/json";
163
- body: EntityProperty;
164
- }>(),
165
- )
166
- .then(
167
- validationSchemaStorage.validator(
168
- "AppPropertiesService.AddonPropertiesResource.getAddonProperty_get.response",
169
- ),
170
- )
171
- .then(commonHttpClient.getBody);
172
- }
173
- /**
174
- * Sets the value of an app's property. Use this resource to store custom data for
175
- * your app.
176
- *
177
- * The value of the request body must be a
178
- * [valid](http://tools.ietf.org/html/rfc4627), non-empty JSON blob. The maximum
179
- * length is 32768 characters.
180
- *
181
- * **[Permissions](#permissions) required:** Only a Connect app whose key matches
182
- * `addonKey` can make this request.
183
- * Additionally, Forge apps can access Connect app properties (stored against the
184
- * same `app.connect.key`).
185
- *
186
- * @returns * status: 200, mediaType: application/json
187
- *
188
- * Returned if the property is updated.
189
- *
190
- * example: {
191
- * "message": "Property updated.",
192
- * "statusCode": 200
193
- * }
194
- *
195
- * * status: 201, mediaType: application/json
196
- *
197
- * Returned is the property is created.
198
- *
199
- * example: {
200
- * "message": "Property created.",
201
- * "statusCode": 201
202
- * }
203
- * @path {PUT} /rest/atlassian-connect/1/addons/{addonKey}/properties/{propertyKey}
204
- * @scopes-current
205
- * @scopes-beta
206
- */
207
- addonPropertiesResourcePutAddonPropertyPut({
208
- addonKey,
209
- propertyKey,
210
- requestBody,
211
- }: {
212
- /** The key of the app, as defined in its descriptor. */
213
- addonKey: string;
214
- /** The key of the property. */
215
- propertyKey: string;
216
- requestBody: unknown;
217
- }): Promise<{
218
- created: boolean;
219
- operationMessage: OperationMessage;
220
- }> {
221
- return this.getClientInstance()
222
- .request({
223
- path: "/rest/atlassian-connect/1/addons/{addonKey}/properties/{propertyKey}",
224
- method: "PUT",
225
- pathParams: {
226
- addonKey,
227
- propertyKey,
228
- },
229
- headers: {
230
- "Content-Type": "application/json",
231
- },
232
- body: requestBody,
233
- })
234
- .then(
235
- this.getClientInstance().responseHandler({
236
- 200: {
237
- "application/json": "json",
238
- },
239
- 201: {
240
- "application/json": "json",
241
- },
242
- }),
243
- )
244
- .then(
245
- commonHttpClient.castResponse<{
246
- status: 200 | 201;
247
- mediaType: "application/json";
248
- body: OperationMessage;
249
- }>(),
250
- )
251
- .then(
252
- validationSchemaStorage.validator(
253
- "AppPropertiesService.AddonPropertiesResource.putAddonProperty_put.response",
254
- ),
255
- )
256
- .then(commonHttpClient.asCreatedResponse("operationMessage"));
257
- }
258
- /**
259
- * Deletes a Forge app's property.
260
- *
261
- * **[Permissions](#permissions) required:** Only Forge apps can make this request.
262
- *
263
- * @path {DELETE} /rest/forge/1/app/properties/{propertyKey}
264
- * @scopes-current
265
- * @scopes-beta
266
- */
267
- deleteForgeAppProperty({
268
- propertyKey,
269
- }: {
270
- /** The key of the property. */
271
- propertyKey: string;
272
- }): Promise<void> {
273
- return this.getClientInstance()
274
- .request({
275
- path: "/rest/forge/1/app/properties/{propertyKey}",
276
- method: "DELETE",
277
- pathParams: {
278
- propertyKey,
279
- },
280
- })
281
- .then(commonHttpClient.discardResult);
282
- }
283
- /**
284
- * Sets the value of a Forge app's property.
285
- * These values can be retrieved in [Jira
286
- * expressions](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/)
287
- * through the `app` [context
288
- * variable](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#context-variables).
289
- *
290
- * For other use cases, use the [Storage
291
- * API](https://developer.atlassian.com/platform/forge/runtime-reference/storage-api/).
292
- *
293
- * The value of the request body must be a
294
- * [valid](http://tools.ietf.org/html/rfc4627), non-empty JSON blob. The maximum
295
- * length is 32768 characters.
296
- *
297
- * **[Permissions](#permissions) required:** Only Forge apps can make this request.
298
- *
299
- * @returns * status: 200, mediaType: application/json
300
- *
301
- * Returned if the property is updated.
302
- *
303
- * example: {
304
- * "message": "Property updated.",
305
- * "statusCode": 200
306
- * }
307
- *
308
- * * status: 201, mediaType: application/json
309
- *
310
- * Returned is the property is created.
311
- *
312
- * example: {
313
- * "message": "Property created.",
314
- * "statusCode": 201
315
- * }
316
- * @path {PUT} /rest/forge/1/app/properties/{propertyKey}
317
- * @scopes-current
318
- * @scopes-beta
319
- */
320
- putForgeAppProperty({
321
- propertyKey,
322
- requestBody,
323
- }: {
324
- /** The key of the property. */
325
- propertyKey: string;
326
- requestBody: unknown;
327
- }): Promise<{
328
- created: boolean;
329
- operationMessage: OperationMessage;
330
- }> {
331
- return this.getClientInstance()
332
- .request({
333
- path: "/rest/forge/1/app/properties/{propertyKey}",
334
- method: "PUT",
335
- pathParams: {
336
- propertyKey,
337
- },
338
- headers: {
339
- "Content-Type": "application/json",
340
- },
341
- body: requestBody,
342
- })
343
- .then(
344
- this.getClientInstance().responseHandler({
345
- 200: {
346
- "application/json": "json",
347
- },
348
- 201: {
349
- "application/json": "json",
350
- },
351
- }),
352
- )
353
- .then(
354
- commonHttpClient.castResponse<{
355
- status: 200 | 201;
356
- mediaType: "application/json";
357
- body: OperationMessage;
358
- }>(),
359
- )
360
- .then(
361
- validationSchemaStorage.validator(
362
- "AppPropertiesService.putForgeAppProperty.response",
363
- ),
364
- )
365
- .then(commonHttpClient.asCreatedResponse("operationMessage"));
366
- }
367
- static initialize() {
368
- validationSchemaStorage.registerExtensible(
369
- "AppPropertiesService.AddonPropertiesResource.getAddonProperties_get.response",
370
- z
371
- .object({
372
- status: z.literal(200),
373
- mediaType: z.literal("application/json"),
374
- body: validationSchemaStorage.lazy("PropertyKeys"),
375
- })
376
- .describe(
377
- "AppPropertiesService.AddonPropertiesResource.getAddonProperties_get.response",
378
- ),
379
- );
380
- validationSchemaStorage.registerExtensible(
381
- "AppPropertiesService.AddonPropertiesResource.getAddonProperty_get.response",
382
- z
383
- .object({
384
- status: z.literal(200),
385
- mediaType: z.literal("application/json"),
386
- body: validationSchemaStorage.lazy("EntityProperty"),
387
- })
388
- .describe(
389
- "AppPropertiesService.AddonPropertiesResource.getAddonProperty_get.response",
390
- ),
391
- );
392
- validationSchemaStorage.registerExtensible(
393
- "AppPropertiesService.AddonPropertiesResource.putAddonProperty_put.response",
394
- z
395
- .object({
396
- status: z.number(),
397
- mediaType: z.string(),
398
- body: z.unknown(),
399
- })
400
- .superRefine(({ status: status, body: body }, ctx) => {
401
- if (status === 200 || status === 201) {
402
- validationSchemaStorage.lazy("OperationMessage").parse(body);
403
- } else {
404
- ctx.addIssue({
405
- code: z.ZodIssueCode.custom,
406
- path: ["status"],
407
- message: `Unexpected status code: ${status}`,
408
- });
409
- }
410
- })
411
- .describe(
412
- "AppPropertiesService.AddonPropertiesResource.putAddonProperty_put.response",
413
- ),
414
- );
415
- validationSchemaStorage.registerExtensible(
416
- "AppPropertiesService.putForgeAppProperty.response",
417
- z
418
- .object({
419
- status: z.number(),
420
- mediaType: z.string(),
421
- body: z.unknown(),
422
- })
423
- .superRefine(({ status: status, body: body }, ctx) => {
424
- if (status === 200 || status === 201) {
425
- validationSchemaStorage.lazy("OperationMessage").parse(body);
426
- } else {
427
- ctx.addIssue({
428
- code: z.ZodIssueCode.custom,
429
- path: ["status"],
430
- message: `Unexpected status code: ${status}`,
431
- });
432
- }
433
- })
434
- .describe("AppPropertiesService.putForgeAppProperty.response"),
435
- );
436
- validationSchemaStorage.registerOnce([
437
- registerCommonValidationSchemas,
438
- registerAppPropertiesValidationSchemas,
439
- ]);
440
- }
441
- }
@@ -1,247 +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 ApplicationRole,
10
- registerCommonValidationSchemas,
11
- } from "../models/common";
12
- import { validationSchemaStorage } from "../validation-schema-storage";
13
- /**
14
- * This resource represents application roles. Use it to get details of an
15
- * application role or all application roles.
16
- */
17
- export class ApplicationRolesService extends CommonHttpService {
18
- /**
19
- * Returns all application roles. In Jira, application roles are managed using the
20
- * [Application access configuration](https://confluence.atlassian.com/x/3YxjL)
21
- * page.
22
- *
23
- * **[Permissions](#permissions) required:** *Administer Jira* [global
24
- * permission](https://confluence.atlassian.com/x/x4dKLg).
25
- *
26
- * @returns Returned if the request is successful.
27
- *
28
- * example: [
29
- * {
30
- * "defaultGroups": [
31
- * "jira-software-users"
32
- * ],
33
- * "defaultGroupsDetails": [
34
- * {
35
- * "groupId": "276f955c-63d7-42c8-9520-92d01dca0625",
36
- * "name": "jira-software-users",
37
- * "self":
38
- * "https://your-domain.atlassian.net/rest/api/3/group?groupId=276f955c-63d7-42c8-9520-92d01dca0625"
39
- * }
40
- * ],
41
- * "defined": false,
42
- * "groupDetails": [
43
- * {
44
- * "groupId": "42c8955c-63d7-42c8-9520-63d7aca0625",
45
- * "name": "jira-testers",
46
- * "self":
47
- * "https://your-domain.atlassian.net/rest/api/3/group?groupId=42c8955c-63d7-42c8-9520-63d7aca0625"
48
- * },
49
- * {
50
- * "groupId": "276f955c-63d7-42c8-9520-92d01dca0625",
51
- * "name": "jira-software-users",
52
- * "self":
53
- * "https://your-domain.atlassian.net/rest/api/3/group?groupId=276f955c-63d7-42c8-9520-92d01dca0625"
54
- * }
55
- * ],
56
- * "groups": [
57
- * "jira-software-users",
58
- * "jira-testers"
59
- * ],
60
- * "hasUnlimitedSeats": false,
61
- * "key": "jira-software",
62
- * "name": "Jira Software",
63
- * "numberOfSeats": 10,
64
- * "platform": false,
65
- * "remainingSeats": 5,
66
- * "selectedByDefault": false,
67
- * "userCount": 5,
68
- * "userCountDescription": "5 developers"
69
- * },
70
- * {
71
- * "defaultGroups": [
72
- * "jira-core-users"
73
- * ],
74
- * "defaultGroupsDetails": [
75
- * {
76
- * "groupId": "92d01dca0625-42c8-42c8-9520-276f955c",
77
- * "name": "jira-core-users",
78
- * "self":
79
- * "https://your-domain.atlassian.net/rest/api/3/group?groupId=92d01dca0625-42c8-42c8-9520-276f955c"
80
- * }
81
- * ],
82
- * "defined": false,
83
- * "groupDetails": [
84
- * {
85
- * "groupId": "92d01dca0625-42c8-42c8-9520-276f955c",
86
- * "name": "jira-core-users",
87
- * "self":
88
- * "https://your-domain.atlassian.net/rest/api/3/group?groupId=92d01dca0625-42c8-42c8-9520-276f955c"
89
- * }
90
- * ],
91
- * "groups": [
92
- * "jira-core-users"
93
- * ],
94
- * "hasUnlimitedSeats": false,
95
- * "key": "jira-core",
96
- * "name": "Jira Core",
97
- * "numberOfSeats": 1,
98
- * "platform": true,
99
- * "remainingSeats": 1,
100
- * "selectedByDefault": false,
101
- * "userCount": 0,
102
- * "userCountDescription": "0 users"
103
- * }
104
- * ]
105
- * @path {GET} /rest/api/3/applicationrole
106
- */
107
- getAllApplicationRoles(): Promise<ApplicationRole[]> {
108
- return this.getClientInstance()
109
- .request({
110
- path: "/rest/api/3/applicationrole",
111
- method: "GET",
112
- })
113
- .then(
114
- this.getClientInstance().responseHandler({
115
- 200: {
116
- "application/json": "json",
117
- },
118
- }),
119
- )
120
- .then(
121
- commonHttpClient.castResponse<{
122
- status: 200;
123
- mediaType: "application/json";
124
- body: ApplicationRole[];
125
- }>(),
126
- )
127
- .then(
128
- validationSchemaStorage.validator(
129
- "ApplicationRolesService.getAllApplicationRoles.response",
130
- ),
131
- )
132
- .then(commonHttpClient.getBody);
133
- }
134
- /**
135
- * Returns an application role.
136
- *
137
- * **[Permissions](#permissions) required:** *Administer Jira* [global
138
- * permission](https://confluence.atlassian.com/x/x4dKLg).
139
- *
140
- * @returns Returned if the request is successful.
141
- *
142
- * example: {
143
- * "defaultGroups": [
144
- * "jira-software-users"
145
- * ],
146
- * "defaultGroupsDetails": [
147
- * {
148
- * "groupId": "276f955c-63d7-42c8-9520-92d01dca0625",
149
- * "name": "jira-software-users",
150
- * "self":
151
- * "https://your-domain.atlassian.net/rest/api/3/group?groupId=276f955c-63d7-42c8-9520-92d01dca0625"
152
- * }
153
- * ],
154
- * "defined": false,
155
- * "groupDetails": [
156
- * {
157
- * "groupId": "42c8955c-63d7-42c8-9520-63d7aca0625",
158
- * "name": "jira-testers",
159
- * "self":
160
- * "https://your-domain.atlassian.net/rest/api/3/group?groupId=42c8955c-63d7-42c8-9520-63d7aca0625"
161
- * },
162
- * {
163
- * "groupId": "276f955c-63d7-42c8-9520-92d01dca0625",
164
- * "name": "jira-software-users",
165
- * "self":
166
- * "https://your-domain.atlassian.net/rest/api/3/group?groupId=276f955c-63d7-42c8-9520-92d01dca0625"
167
- * }
168
- * ],
169
- * "groups": [
170
- * "jira-software-users",
171
- * "jira-testers"
172
- * ],
173
- * "hasUnlimitedSeats": false,
174
- * "key": "jira-software",
175
- * "name": "Jira Software",
176
- * "numberOfSeats": 10,
177
- * "platform": false,
178
- * "remainingSeats": 5,
179
- * "selectedByDefault": false,
180
- * "userCount": 5,
181
- * "userCountDescription": "5 developers"
182
- * }
183
- * @path {GET} /rest/api/3/applicationrole/{key}
184
- */
185
- getApplicationRole({
186
- key,
187
- }: {
188
- /**
189
- * The key of the application role. Use the [Get all application
190
- * roles](#api-rest-api-3-applicationrole-get) operation to get the key for each
191
- * application role.
192
- */
193
- key: string;
194
- }): Promise<ApplicationRole> {
195
- return this.getClientInstance()
196
- .request({
197
- path: "/rest/api/3/applicationrole/{key}",
198
- method: "GET",
199
- pathParams: {
200
- key,
201
- },
202
- })
203
- .then(
204
- this.getClientInstance().responseHandler({
205
- 200: {
206
- "application/json": "json",
207
- },
208
- }),
209
- )
210
- .then(
211
- commonHttpClient.castResponse<{
212
- status: 200;
213
- mediaType: "application/json";
214
- body: ApplicationRole;
215
- }>(),
216
- )
217
- .then(
218
- validationSchemaStorage.validator(
219
- "ApplicationRolesService.getApplicationRole.response",
220
- ),
221
- )
222
- .then(commonHttpClient.getBody);
223
- }
224
- static initialize() {
225
- validationSchemaStorage.registerExtensible(
226
- "ApplicationRolesService.getAllApplicationRoles.response",
227
- z
228
- .object({
229
- status: z.literal(200),
230
- mediaType: z.literal("application/json"),
231
- body: z.array(validationSchemaStorage.lazy("ApplicationRole")),
232
- })
233
- .describe("ApplicationRolesService.getAllApplicationRoles.response"),
234
- );
235
- validationSchemaStorage.registerExtensible(
236
- "ApplicationRolesService.getApplicationRole.response",
237
- z
238
- .object({
239
- status: z.literal(200),
240
- mediaType: z.literal("application/json"),
241
- body: validationSchemaStorage.lazy("ApplicationRole"),
242
- })
243
- .describe("ApplicationRolesService.getApplicationRole.response"),
244
- );
245
- validationSchemaStorage.registerOnce([registerCommonValidationSchemas]);
246
- }
247
- }