@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,370 +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 {
8
- type FieldDetails,
9
- type GroupName,
10
- type NotificationScheme,
11
- type ProjectRole,
12
- registerCommonValidationSchemas,
13
- type UserDetails,
14
- } from "./common";
15
- /** Details of notifications which should be added to the notification scheme. */
16
- export interface AddNotificationsDetails extends Record<string, unknown> {
17
- /** The list of notifications which should be added to the notification scheme. */
18
- notificationSchemeEvents: NotificationSchemeEventDetails[];
19
- }
20
- /** Details of an notification scheme. */
21
- export interface CreateNotificationSchemeDetails
22
- extends Record<string, unknown> {
23
- /** The description of the notification scheme. */
24
- description?: string;
25
- /** The name of the notification scheme. Must be unique (case-insensitive). */
26
- name: string;
27
- /** The list of notifications which should be added to the notification scheme. */
28
- notificationSchemeEvents?: NotificationSchemeEventDetails[];
29
- }
30
- /** Details about a notification associated with an event. */
31
- export interface EventNotification {
32
- /** The email address. */
33
- emailAddress?: string;
34
- /**
35
- * Expand options that include additional event notification details in the
36
- * response.
37
- */
38
- expand?: string;
39
- /** The custom user or group field. */
40
- field?: FieldDetails;
41
- /** The specified group. */
42
- group?: GroupName;
43
- /** The ID of the notification. */
44
- id?: number;
45
- /** Identifies the recipients of the notification. */
46
- notificationType?:
47
- | "CurrentAssignee"
48
- | "Reporter"
49
- | "CurrentUser"
50
- | "ProjectLead"
51
- | "ComponentLead"
52
- | "User"
53
- | "Group"
54
- | "ProjectRole"
55
- | "EmailAddress"
56
- | "AllWatchers"
57
- | "UserCustomField"
58
- | "GroupCustomField";
59
- /**
60
- * As a group's name can change, use of `recipient` is recommended. The identifier
61
- * associated with the `notificationType` value that defines the receiver of the
62
- * notification, where the receiver isn't implied by `notificationType` value. So,
63
- * when `notificationType` is:
64
- *
65
- * * `User` The `parameter` is the user account ID.
66
- * * `Group` The `parameter` is the group name.
67
- * * `ProjectRole` The `parameter` is the project role ID.
68
- * * `UserCustomField` The `parameter` is the ID of the custom field.
69
- * * `GroupCustomField` The `parameter` is the ID of the custom field.
70
- */
71
- parameter?: string;
72
- /** The specified project role. */
73
- projectRole?: ProjectRole;
74
- /**
75
- * The identifier associated with the `notificationType` value that defines the
76
- * receiver of the notification, where the receiver isn't implied by the
77
- * `notificationType` value. So, when `notificationType` is:
78
- *
79
- * * `User`, `recipient` is the user account ID.
80
- * * `Group`, `recipient` is the group ID.
81
- * * `ProjectRole`, `recipient` is the project role ID.
82
- * * `UserCustomField`, `recipient` is the ID of the custom field.
83
- * * `GroupCustomField`, `recipient` is the ID of the custom field.
84
- */
85
- recipient?: string;
86
- /** The specified user. */
87
- user?: UserDetails;
88
- }
89
- /** Details about a notification event. */
90
- export interface NotificationEvent {
91
- /** The description of the event. */
92
- description?: string;
93
- /**
94
- * The ID of the event. The event can be a [Jira system
95
- * event](https://confluence.atlassian.com/x/8YdKLg#Creatinganotificationscheme-eventsEvents)
96
- * or a [custom event](https://confluence.atlassian.com/x/AIlKLg).
97
- */
98
- id?: number;
99
- /** The name of the event. */
100
- name?: string;
101
- /**
102
- * The template of the event. Only custom events configured by Jira administrators
103
- * have template.
104
- */
105
- templateEvent?: NotificationEvent;
106
- }
107
- export interface NotificationSchemeAndProjectMappingJsonBean {
108
- notificationSchemeId?: string;
109
- projectId?: string;
110
- }
111
- /** Details about a notification scheme event. */
112
- export interface NotificationSchemeEvent {
113
- /** Details about a notification event. */
114
- event?: NotificationEvent;
115
- notifications?: EventNotification[];
116
- }
117
- /** Details of a notification scheme event. */
118
- export interface NotificationSchemeEventDetails
119
- extends Record<string, unknown> {
120
- /** The ID of the event. */
121
- event: NotificationSchemeEventTypeId;
122
- /** The list of notifications mapped to a specified event. */
123
- notifications: NotificationSchemeNotificationDetails[];
124
- }
125
- /** The ID of an event that is being mapped to notifications. */
126
- export interface NotificationSchemeEventTypeId extends Record<string, unknown> {
127
- /** The ID of the notification scheme event. */
128
- id: string;
129
- }
130
- /** The ID of a notification scheme. */
131
- export interface NotificationSchemeId extends Record<string, unknown> {
132
- /** The ID of a notification scheme. */
133
- id: string;
134
- }
135
- /** Details of a notification within a notification scheme. */
136
- export interface NotificationSchemeNotificationDetails
137
- extends Record<string, unknown> {
138
- /** The notification type, e.g `CurrentAssignee`, `Group`, `EmailAddress`. */
139
- notificationType: string;
140
- /** The value corresponding to the specified notification type. */
141
- parameter?: string;
142
- }
143
- /** A page of items. */
144
- export interface PageBeanNotificationScheme {
145
- /** Whether this is the last page. */
146
- isLast?: boolean;
147
- /** The maximum number of items that could be returned. */
148
- maxResults?: number;
149
- /** If there is another page of results, the URL of the next page. */
150
- nextPage?: string;
151
- /** The URL of the page. */
152
- self?: string;
153
- /** The index of the first item returned. */
154
- startAt?: number;
155
- /** The number of items returned. */
156
- total?: number;
157
- /** The list of items. */
158
- values?: NotificationScheme[];
159
- }
160
- /** A page of items. */
161
- export interface PageBeanNotificationSchemeAndProjectMappingJsonBean {
162
- /** Whether this is the last page. */
163
- isLast?: boolean;
164
- /** The maximum number of items that could be returned. */
165
- maxResults?: number;
166
- /** If there is another page of results, the URL of the next page. */
167
- nextPage?: string;
168
- /** The URL of the page. */
169
- self?: string;
170
- /** The index of the first item returned. */
171
- startAt?: number;
172
- /** The number of items returned. */
173
- total?: number;
174
- /** The list of items. */
175
- values?: NotificationSchemeAndProjectMappingJsonBean[];
176
- }
177
- /** Details of a notification scheme. */
178
- export interface UpdateNotificationSchemeDetails
179
- extends Record<string, unknown> {
180
- /** The description of the notification scheme. */
181
- description?: string;
182
- /** The name of the notification scheme. Must be unique. */
183
- name?: string;
184
- }
185
- export function registerIssueNotificationSchemesValidationSchemas(
186
- validationSchemaStorage: CommonValidationSchemaStorage<ZodTypeAny>,
187
- ) {
188
- validationSchemaStorage.register(
189
- "AddNotificationsDetails",
190
- z
191
- .object({
192
- notificationSchemeEvents: z.array(
193
- validationSchemaStorage.lazy("NotificationSchemeEventDetails"),
194
- ),
195
- })
196
- .catchall(z.unknown())
197
- .describe("AddNotificationsDetails"),
198
- );
199
- validationSchemaStorage.register(
200
- "CreateNotificationSchemeDetails",
201
- z
202
- .object({
203
- description: z.string().max(4000).optional(),
204
- name: z.string().max(255),
205
- notificationSchemeEvents: z
206
- .array(validationSchemaStorage.lazy("NotificationSchemeEventDetails"))
207
- .optional(),
208
- })
209
- .catchall(z.unknown())
210
- .describe("CreateNotificationSchemeDetails"),
211
- );
212
- validationSchemaStorage.register(
213
- "EventNotification",
214
- z
215
- .object({
216
- emailAddress: z.string().optional(),
217
- expand: z.string().optional(),
218
- field: validationSchemaStorage.lazy("FieldDetails").optional(),
219
- group: validationSchemaStorage.lazy("GroupName").optional(),
220
- id: z.number().int().optional(),
221
- notificationType: z
222
- .enum([
223
- "CurrentAssignee",
224
- "Reporter",
225
- "CurrentUser",
226
- "ProjectLead",
227
- "ComponentLead",
228
- "User",
229
- "Group",
230
- "ProjectRole",
231
- "EmailAddress",
232
- "AllWatchers",
233
- "UserCustomField",
234
- "GroupCustomField",
235
- ])
236
- .optional(),
237
- parameter: z.string().optional(),
238
- projectRole: validationSchemaStorage.lazy("ProjectRole").optional(),
239
- recipient: z.string().optional(),
240
- user: validationSchemaStorage.lazy("UserDetails").optional(),
241
- })
242
- .strict()
243
- .describe("EventNotification"),
244
- );
245
- validationSchemaStorage.register(
246
- "NotificationEvent",
247
- z
248
- .object({
249
- description: z.string().optional(),
250
- id: z.number().int().optional(),
251
- name: z.string().optional(),
252
- templateEvent: validationSchemaStorage
253
- .lazy("NotificationEvent")
254
- .optional(),
255
- })
256
- .strict()
257
- .describe("NotificationEvent"),
258
- );
259
- validationSchemaStorage.register(
260
- "NotificationSchemeAndProjectMappingJsonBean",
261
- z
262
- .object({
263
- notificationSchemeId: z.string().optional(),
264
- projectId: z.string().optional(),
265
- })
266
- .strict()
267
- .describe("NotificationSchemeAndProjectMappingJsonBean"),
268
- );
269
- validationSchemaStorage.register(
270
- "NotificationSchemeEvent",
271
- z
272
- .object({
273
- event: validationSchemaStorage.lazy("NotificationEvent").optional(),
274
- notifications: z
275
- .array(validationSchemaStorage.lazy("EventNotification"))
276
- .optional(),
277
- })
278
- .strict()
279
- .describe("NotificationSchemeEvent"),
280
- );
281
- validationSchemaStorage.register(
282
- "NotificationSchemeEventDetails",
283
- z
284
- .object({
285
- event: validationSchemaStorage.lazy("NotificationSchemeEventTypeId"),
286
- notifications: z.array(
287
- validationSchemaStorage.lazy("NotificationSchemeNotificationDetails"),
288
- ),
289
- })
290
- .catchall(z.unknown())
291
- .describe("NotificationSchemeEventDetails"),
292
- );
293
- validationSchemaStorage.register(
294
- "NotificationSchemeEventTypeId",
295
- z
296
- .object({
297
- id: z.string(),
298
- })
299
- .catchall(z.unknown())
300
- .describe("NotificationSchemeEventTypeId"),
301
- );
302
- validationSchemaStorage.register(
303
- "NotificationSchemeId",
304
- z
305
- .object({
306
- id: z.string(),
307
- })
308
- .catchall(z.unknown())
309
- .describe("NotificationSchemeId"),
310
- );
311
- validationSchemaStorage.register(
312
- "NotificationSchemeNotificationDetails",
313
- z
314
- .object({
315
- notificationType: z.string(),
316
- parameter: z.string().optional(),
317
- })
318
- .catchall(z.unknown())
319
- .describe("NotificationSchemeNotificationDetails"),
320
- );
321
- validationSchemaStorage.register(
322
- "PageBeanNotificationScheme",
323
- z
324
- .object({
325
- isLast: z.boolean().optional(),
326
- maxResults: z.number().int().optional(),
327
- nextPage: z.string().optional(),
328
- self: z.string().optional(),
329
- startAt: z.number().int().optional(),
330
- total: z.number().int().optional(),
331
- values: z
332
- .array(validationSchemaStorage.lazy("NotificationScheme"))
333
- .optional(),
334
- })
335
- .strict()
336
- .describe("PageBeanNotificationScheme"),
337
- );
338
- validationSchemaStorage.register(
339
- "PageBeanNotificationSchemeAndProjectMappingJsonBean",
340
- z
341
- .object({
342
- isLast: z.boolean().optional(),
343
- maxResults: z.number().int().optional(),
344
- nextPage: z.string().optional(),
345
- self: z.string().optional(),
346
- startAt: z.number().int().optional(),
347
- total: z.number().int().optional(),
348
- values: z
349
- .array(
350
- validationSchemaStorage.lazy(
351
- "NotificationSchemeAndProjectMappingJsonBean",
352
- ),
353
- )
354
- .optional(),
355
- })
356
- .strict()
357
- .describe("PageBeanNotificationSchemeAndProjectMappingJsonBean"),
358
- );
359
- validationSchemaStorage.register(
360
- "UpdateNotificationSchemeDetails",
361
- z
362
- .object({
363
- description: z.string().max(4000).optional(),
364
- name: z.string().max(255).optional(),
365
- })
366
- .catchall(z.unknown())
367
- .describe("UpdateNotificationSchemeDetails"),
368
- );
369
- validationSchemaStorage.registerOnce([registerCommonValidationSchemas]);
370
- }
@@ -1,196 +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 { type Priority, registerCommonValidationSchemas } from "./common";
8
- /** Details of an issue priority. */
9
- export interface CreatePriorityDetails extends Record<string, unknown> {
10
- /** The description of the priority. */
11
- description?: string;
12
- /**
13
- * The URL of an icon for the priority. Accepted protocols are HTTP and HTTPS.
14
- * Built in icons can also be used.
15
- */
16
- iconUrl?:
17
- | "/images/icons/priorities/blocker.png"
18
- | "/images/icons/priorities/critical.png"
19
- | "/images/icons/priorities/high.png"
20
- | "/images/icons/priorities/highest.png"
21
- | "/images/icons/priorities/low.png"
22
- | "/images/icons/priorities/lowest.png"
23
- | "/images/icons/priorities/major.png"
24
- | "/images/icons/priorities/medium.png"
25
- | "/images/icons/priorities/minor.png"
26
- | "/images/icons/priorities/trivial.png";
27
- /** The name of the priority. Must be unique. */
28
- name: string;
29
- /** The status color of the priority in 3-digit or 6-digit hexadecimal format. */
30
- statusColor: string;
31
- }
32
- /** A page of items. */
33
- export interface PageBeanPriority {
34
- /** Whether this is the last page. */
35
- isLast?: boolean;
36
- /** The maximum number of items that could be returned. */
37
- maxResults?: number;
38
- /** If there is another page of results, the URL of the next page. */
39
- nextPage?: string;
40
- /** The URL of the page. */
41
- self?: string;
42
- /** The index of the first item returned. */
43
- startAt?: number;
44
- /** The number of items returned. */
45
- total?: number;
46
- /** The list of items. */
47
- values?: Priority[];
48
- }
49
- /** The ID of an issue priority. */
50
- export interface PriorityId extends Record<string, unknown> {
51
- /** The ID of the issue priority. */
52
- id: string;
53
- }
54
- /** Change the order of issue priorities. */
55
- export interface ReorderIssuePriorities {
56
- /** The ID of the priority. Required if `position` isn't provided. */
57
- after?: string;
58
- /** The list of issue IDs to be reordered. Cannot contain duplicates nor after ID. */
59
- ids: string[];
60
- /**
61
- * The position for issue priorities to be moved to. Required if `after` isn't
62
- * provided.
63
- */
64
- position?: string;
65
- }
66
- /** The new default issue priority. */
67
- export interface SetDefaultPriorityRequest {
68
- /**
69
- * The ID of the new default issue priority. Must be an existing ID or null.
70
- * Setting this to null erases the default priority setting.
71
- */
72
- id: string;
73
- }
74
- /** Details of an issue priority. */
75
- export interface UpdatePriorityDetails extends Record<string, unknown> {
76
- /** The description of the priority. */
77
- description?: string;
78
- /**
79
- * The URL of an icon for the priority. Accepted protocols are HTTP and HTTPS.
80
- * Built in icons can also be used.
81
- */
82
- iconUrl?:
83
- | "/images/icons/priorities/blocker.png"
84
- | "/images/icons/priorities/critical.png"
85
- | "/images/icons/priorities/high.png"
86
- | "/images/icons/priorities/highest.png"
87
- | "/images/icons/priorities/low.png"
88
- | "/images/icons/priorities/lowest.png"
89
- | "/images/icons/priorities/major.png"
90
- | "/images/icons/priorities/medium.png"
91
- | "/images/icons/priorities/minor.png"
92
- | "/images/icons/priorities/trivial.png";
93
- /** The name of the priority. Must be unique. */
94
- name?: string;
95
- /** The status color of the priority in 3-digit or 6-digit hexadecimal format. */
96
- statusColor?: string;
97
- }
98
- export function registerIssuePrioritiesValidationSchemas(
99
- validationSchemaStorage: CommonValidationSchemaStorage<ZodTypeAny>,
100
- ) {
101
- validationSchemaStorage.register(
102
- "CreatePriorityDetails",
103
- z
104
- .object({
105
- description: z.string().max(255).optional(),
106
- iconUrl: z
107
- .enum([
108
- "/images/icons/priorities/blocker.png",
109
- "/images/icons/priorities/critical.png",
110
- "/images/icons/priorities/high.png",
111
- "/images/icons/priorities/highest.png",
112
- "/images/icons/priorities/low.png",
113
- "/images/icons/priorities/lowest.png",
114
- "/images/icons/priorities/major.png",
115
- "/images/icons/priorities/medium.png",
116
- "/images/icons/priorities/minor.png",
117
- "/images/icons/priorities/trivial.png",
118
- ])
119
- .optional(),
120
- name: z.string().max(60),
121
- statusColor: z.string(),
122
- })
123
- .catchall(z.unknown())
124
- .describe("CreatePriorityDetails"),
125
- );
126
- validationSchemaStorage.register(
127
- "PageBeanPriority",
128
- z
129
- .object({
130
- isLast: z.boolean().optional(),
131
- maxResults: z.number().int().optional(),
132
- nextPage: z.string().optional(),
133
- self: z.string().optional(),
134
- startAt: z.number().int().optional(),
135
- total: z.number().int().optional(),
136
- values: z.array(validationSchemaStorage.lazy("Priority")).optional(),
137
- })
138
- .strict()
139
- .describe("PageBeanPriority"),
140
- );
141
- validationSchemaStorage.register(
142
- "PriorityId",
143
- z
144
- .object({
145
- id: z.string(),
146
- })
147
- .catchall(z.unknown())
148
- .describe("PriorityId"),
149
- );
150
- validationSchemaStorage.register(
151
- "ReorderIssuePriorities",
152
- z
153
- .object({
154
- after: z.string().optional(),
155
- ids: z.array(z.string()),
156
- position: z.string().optional(),
157
- })
158
- .strict()
159
- .describe("ReorderIssuePriorities"),
160
- );
161
- validationSchemaStorage.register(
162
- "SetDefaultPriorityRequest",
163
- z
164
- .object({
165
- id: z.string(),
166
- })
167
- .strict()
168
- .describe("SetDefaultPriorityRequest"),
169
- );
170
- validationSchemaStorage.register(
171
- "UpdatePriorityDetails",
172
- z
173
- .object({
174
- description: z.string().max(255).optional(),
175
- iconUrl: z
176
- .enum([
177
- "/images/icons/priorities/blocker.png",
178
- "/images/icons/priorities/critical.png",
179
- "/images/icons/priorities/high.png",
180
- "/images/icons/priorities/highest.png",
181
- "/images/icons/priorities/low.png",
182
- "/images/icons/priorities/lowest.png",
183
- "/images/icons/priorities/major.png",
184
- "/images/icons/priorities/medium.png",
185
- "/images/icons/priorities/minor.png",
186
- "/images/icons/priorities/trivial.png",
187
- ])
188
- .optional(),
189
- name: z.string().max(60).optional(),
190
- statusColor: z.string().optional(),
191
- })
192
- .catchall(z.unknown())
193
- .describe("UpdatePriorityDetails"),
194
- );
195
- validationSchemaStorage.registerOnce([registerCommonValidationSchemas]);
196
- }