@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,307 +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, type ZodTypeAny } from "zod";
5
-
6
- import type { CommonValidationSchemaStorage } from "../core/common-validation-schema-storage";
7
- /**
8
- * Container for a list of registered webhooks. Webhook details are returned in
9
- * the same order as the request.
10
- */
11
- export interface ContainerForRegisteredWebhooks {
12
- /** A list of registered webhooks. */
13
- webhookRegistrationResult?: RegisteredWebhook[];
14
- }
15
- /** Container for a list of webhook IDs. */
16
- export interface ContainerForWebhookIds {
17
- /** A list of webhook IDs. */
18
- webhookIds: number[];
19
- }
20
- /** Details about a failed webhook. */
21
- export interface FailedWebhook {
22
- /** The webhook body. */
23
- body?: string;
24
- /**
25
- * The time the webhook was added to the list of failed webhooks (that is, the
26
- * time of the last failed retry).
27
- */
28
- failureTime: number;
29
- /**
30
- * The webhook ID, as sent in the `X-Atlassian-Webhook-Identifier` header with the
31
- * webhook.
32
- */
33
- id: string;
34
- /** The original webhook destination. */
35
- url: string;
36
- }
37
- /** A page of failed webhooks. */
38
- export interface FailedWebhooks {
39
- /**
40
- * The maximum number of items on the page. If the list of values is shorter than
41
- * this number, then there are no more pages.
42
- */
43
- maxResults: number;
44
- /**
45
- * The URL to the next page of results. Present only if the request returned at
46
- * least one result.The next page may be empty at the time of receiving the
47
- * response, but new failed webhooks may appear in time. You can save the URL to
48
- * the next page and query for new results periodically (for example, every hour).
49
- */
50
- next?: string;
51
- /** The list of webhooks. */
52
- values: FailedWebhook[];
53
- }
54
- /** A page of items. */
55
- export interface PageBeanWebhook {
56
- /** Whether this is the last page. */
57
- isLast?: boolean;
58
- /** The maximum number of items that could be returned. */
59
- maxResults?: number;
60
- /** If there is another page of results, the URL of the next page. */
61
- nextPage?: string;
62
- /** The URL of the page. */
63
- self?: string;
64
- /** The index of the first item returned. */
65
- startAt?: number;
66
- /** The number of items returned. */
67
- total?: number;
68
- /** The list of items. */
69
- values?: Webhook[];
70
- }
71
- /**
72
- * ID of a registered webhook or error messages explaining why a webhook wasn't
73
- * registered.
74
- */
75
- export interface RegisteredWebhook {
76
- /** The ID of the webhook. Returned if the webhook is created. */
77
- createdWebhookId?: number;
78
- /** Error messages specifying why the webhook creation failed. */
79
- errors?: string[];
80
- }
81
- /** A webhook. */
82
- export interface Webhook {
83
- /** The Jira events that trigger the webhook. */
84
- events: (
85
- | "jira:issue_created"
86
- | "jira:issue_updated"
87
- | "jira:issue_deleted"
88
- | "comment_created"
89
- | "comment_updated"
90
- | "comment_deleted"
91
- | "issue_property_set"
92
- | "issue_property_deleted"
93
- )[];
94
- /**
95
- * The date after which the webhook is no longer sent. Use [Extend webhook
96
- * life](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-webhooks/#api-rest-api-3-webhook-refresh-put)
97
- * to extend the date.
98
- */
99
- expirationDate?: number;
100
- /**
101
- * A list of field IDs. When the issue changelog contains any of the fields, the
102
- * webhook `jira:issue_updated` is sent. If this parameter is not present, the app
103
- * is notified about all field updates.
104
- */
105
- fieldIdsFilter?: string[];
106
- /** The ID of the webhook. */
107
- id: number;
108
- /**
109
- * A list of issue property keys. A change of those issue properties triggers the
110
- * `issue_property_set` or `issue_property_deleted` webhooks. If this parameter is
111
- * not present, the app is notified about all issue property updates.
112
- */
113
- issuePropertyKeysFilter?: string[];
114
- /** The JQL filter that specifies which issues the webhook is sent for. */
115
- jqlFilter: string;
116
- }
117
- /** A list of webhooks. */
118
- export interface WebhookDetails {
119
- /** The Jira events that trigger the webhook. */
120
- events: (
121
- | "jira:issue_created"
122
- | "jira:issue_updated"
123
- | "jira:issue_deleted"
124
- | "comment_created"
125
- | "comment_updated"
126
- | "comment_deleted"
127
- | "issue_property_set"
128
- | "issue_property_deleted"
129
- )[];
130
- /**
131
- * A list of field IDs. When the issue changelog contains any of the fields, the
132
- * webhook `jira:issue_updated` is sent. If this parameter is not present, the app
133
- * is notified about all field updates.
134
- */
135
- fieldIdsFilter?: string[];
136
- /**
137
- * A list of issue property keys. A change of those issue properties triggers the
138
- * `issue_property_set` or `issue_property_deleted` webhooks. If this parameter is
139
- * not present, the app is notified about all issue property updates.
140
- */
141
- issuePropertyKeysFilter?: string[];
142
- /**
143
- * The JQL filter that specifies which issues the webhook is sent for. Only a
144
- * subset of JQL can be used. The supported elements are:
145
- *
146
- * * Fields: `issueKey`, `project`, `issuetype`, `status`, `assignee`,
147
- * `reporter`, `issue.property`, and `cf[id]`. For custom fields (`cf[id]`), only
148
- * the epic label custom field is supported.".
149
- * * Operators: `=`, `!=`, `IN`, and `NOT IN`.
150
- */
151
- jqlFilter: string;
152
- }
153
- /** Details of webhooks to register. */
154
- export interface WebhookRegistrationDetails {
155
- /**
156
- * The URL that specifies where to send the webhooks. This URL must use the same
157
- * base URL as the Connect app. Only a single URL per app is allowed to be
158
- * registered.
159
- */
160
- url: string;
161
- /** A list of webhooks. */
162
- webhooks: WebhookDetails[];
163
- }
164
- /** The date the refreshed webhooks expire. */
165
- export interface WebhooksExpirationDate {
166
- /** The expiration date of all the refreshed webhooks. */
167
- expirationDate: number;
168
- }
169
- export function registerWebhooksValidationSchemas(
170
- validationSchemaStorage: CommonValidationSchemaStorage<ZodTypeAny>,
171
- ) {
172
- validationSchemaStorage.register(
173
- "ContainerForRegisteredWebhooks",
174
- z
175
- .object({
176
- webhookRegistrationResult: z
177
- .array(validationSchemaStorage.lazy("RegisteredWebhook"))
178
- .optional(),
179
- })
180
- .strict()
181
- .describe("ContainerForRegisteredWebhooks"),
182
- );
183
- validationSchemaStorage.register(
184
- "ContainerForWebhookIds",
185
- z
186
- .object({
187
- webhookIds: z.array(z.number().int()),
188
- })
189
- .strict()
190
- .describe("ContainerForWebhookIds"),
191
- );
192
- validationSchemaStorage.register(
193
- "FailedWebhook",
194
- z
195
- .object({
196
- body: z.string().optional(),
197
- failureTime: z.number().int(),
198
- id: z.string(),
199
- url: z.string(),
200
- })
201
- .strict()
202
- .describe("FailedWebhook"),
203
- );
204
- validationSchemaStorage.register(
205
- "FailedWebhooks",
206
- z
207
- .object({
208
- maxResults: z.number().int(),
209
- next: z.string().optional(),
210
- values: z.array(validationSchemaStorage.lazy("FailedWebhook")),
211
- })
212
- .strict()
213
- .describe("FailedWebhooks"),
214
- );
215
- validationSchemaStorage.register(
216
- "PageBeanWebhook",
217
- z
218
- .object({
219
- isLast: z.boolean().optional(),
220
- maxResults: z.number().int().optional(),
221
- nextPage: z.string().optional(),
222
- self: z.string().optional(),
223
- startAt: z.number().int().optional(),
224
- total: z.number().int().optional(),
225
- values: z.array(validationSchemaStorage.lazy("Webhook")).optional(),
226
- })
227
- .strict()
228
- .describe("PageBeanWebhook"),
229
- );
230
- validationSchemaStorage.register(
231
- "RegisteredWebhook",
232
- z
233
- .object({
234
- createdWebhookId: z.number().int().optional(),
235
- errors: z.array(z.string()).optional(),
236
- })
237
- .strict()
238
- .describe("RegisteredWebhook"),
239
- );
240
- validationSchemaStorage.register(
241
- "Webhook",
242
- z
243
- .object({
244
- events: z.array(
245
- z.enum([
246
- "jira:issue_created",
247
- "jira:issue_updated",
248
- "jira:issue_deleted",
249
- "comment_created",
250
- "comment_updated",
251
- "comment_deleted",
252
- "issue_property_set",
253
- "issue_property_deleted",
254
- ]),
255
- ),
256
- expirationDate: z.number().int().optional(),
257
- fieldIdsFilter: z.array(z.string()).optional(),
258
- id: z.number().int(),
259
- issuePropertyKeysFilter: z.array(z.string()).optional(),
260
- jqlFilter: z.string(),
261
- })
262
- .strict()
263
- .describe("Webhook"),
264
- );
265
- validationSchemaStorage.register(
266
- "WebhookDetails",
267
- z
268
- .object({
269
- events: z.array(
270
- z.enum([
271
- "jira:issue_created",
272
- "jira:issue_updated",
273
- "jira:issue_deleted",
274
- "comment_created",
275
- "comment_updated",
276
- "comment_deleted",
277
- "issue_property_set",
278
- "issue_property_deleted",
279
- ]),
280
- ),
281
- fieldIdsFilter: z.array(z.string()).optional(),
282
- issuePropertyKeysFilter: z.array(z.string()).optional(),
283
- jqlFilter: z.string(),
284
- })
285
- .strict()
286
- .describe("WebhookDetails"),
287
- );
288
- validationSchemaStorage.register(
289
- "WebhookRegistrationDetails",
290
- z
291
- .object({
292
- url: z.string(),
293
- webhooks: z.array(validationSchemaStorage.lazy("WebhookDetails")),
294
- })
295
- .strict()
296
- .describe("WebhookRegistrationDetails"),
297
- );
298
- validationSchemaStorage.register(
299
- "WebhooksExpirationDate",
300
- z
301
- .object({
302
- expirationDate: z.number().int(),
303
- })
304
- .strict()
305
- .describe("WebhooksExpirationDate"),
306
- );
307
- }
@@ -1,58 +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, type ZodTypeAny } from "zod";
5
-
6
- import type { CommonValidationSchemaStorage } from "../core/common-validation-schema-storage";
7
- /** Details about the status mappings for publishing a draft workflow scheme. */
8
- export interface PublishDraftWorkflowScheme {
9
- /** Mappings of statuses to new statuses for issue types. */
10
- statusMappings?: StatusMapping[];
11
- }
12
- /** Details about the mapping from a status to a new status for an issue type. */
13
- export interface StatusMapping {
14
- /** The ID of the issue type. */
15
- issueTypeId: string;
16
- /** The ID of the new status. */
17
- newStatusId: string;
18
- /** The ID of the status. */
19
- statusId: string;
20
- }
21
- export function registerWorkflowSchemeDraftsValidationSchemas(
22
- validationSchemaStorage: CommonValidationSchemaStorage<ZodTypeAny>,
23
- ) {
24
- validationSchemaStorage.register(
25
- "PublishDraftWorkflowScheme",
26
- z
27
- .object({
28
- statusMappings: z
29
- .array(validationSchemaStorage.lazy("StatusMapping"))
30
- .superRefine((items, ctx) => {
31
- if (
32
- new Set(items.map((item) => JSON.stringify(item))).size !==
33
- items.length
34
- ) {
35
- ctx.addIssue({
36
- code: z.ZodIssueCode.custom,
37
- path: [],
38
- message: "Array items must be unique",
39
- });
40
- }
41
- })
42
- .optional(),
43
- })
44
- .strict()
45
- .describe("PublishDraftWorkflowScheme"),
46
- );
47
- validationSchemaStorage.register(
48
- "StatusMapping",
49
- z
50
- .object({
51
- issueTypeId: z.string(),
52
- newStatusId: z.string(),
53
- statusId: z.string(),
54
- })
55
- .strict()
56
- .describe("StatusMapping"),
57
- );
58
- }
@@ -1,68 +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, type ZodTypeAny } from "zod";
5
-
6
- import type { CommonValidationSchemaStorage } from "../core/common-validation-schema-storage";
7
- import { registerCommonValidationSchemas, type WorkflowScheme } from "./common";
8
- /**
9
- * A container for a list of workflow schemes together with the projects they are
10
- * associated with.
11
- */
12
- export interface ContainerOfWorkflowSchemeAssociations {
13
- /** A list of workflow schemes together with projects they are associated with. */
14
- values: WorkflowSchemeAssociations[];
15
- }
16
- /** A workflow scheme along with a list of projects that use it. */
17
- export interface WorkflowSchemeAssociations {
18
- /** The list of projects that use the workflow scheme. */
19
- projectIds: string[];
20
- /** The workflow scheme. */
21
- workflowScheme: WorkflowScheme;
22
- }
23
- /** An associated workflow scheme and project. */
24
- export interface WorkflowSchemeProjectAssociation {
25
- /** The ID of the project. */
26
- projectId: string;
27
- /**
28
- * The ID of the workflow scheme. If the workflow scheme ID is `null`, the
29
- * operation assigns the default workflow scheme.
30
- */
31
- workflowSchemeId?: string;
32
- }
33
- export function registerWorkflowSchemeProjectAssociationsValidationSchemas(
34
- validationSchemaStorage: CommonValidationSchemaStorage<ZodTypeAny>,
35
- ) {
36
- validationSchemaStorage.register(
37
- "ContainerOfWorkflowSchemeAssociations",
38
- z
39
- .object({
40
- values: z.array(
41
- validationSchemaStorage.lazy("WorkflowSchemeAssociations"),
42
- ),
43
- })
44
- .strict()
45
- .describe("ContainerOfWorkflowSchemeAssociations"),
46
- );
47
- validationSchemaStorage.register(
48
- "WorkflowSchemeAssociations",
49
- z
50
- .object({
51
- projectIds: z.array(z.string()),
52
- workflowScheme: validationSchemaStorage.lazy("WorkflowScheme"),
53
- })
54
- .strict()
55
- .describe("WorkflowSchemeAssociations"),
56
- );
57
- validationSchemaStorage.register(
58
- "WorkflowSchemeProjectAssociation",
59
- z
60
- .object({
61
- projectId: z.string(),
62
- workflowSchemeId: z.string().optional(),
63
- })
64
- .strict()
65
- .describe("WorkflowSchemeProjectAssociation"),
66
- );
67
- validationSchemaStorage.registerOnce([registerCommonValidationSchemas]);
68
- }