@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,273 +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
- * Defines the behavior of the option within the global context. If this property
9
- * is set, even if set to an empty object, then the option is available in all
10
- * projects.
11
- */
12
- export interface GlobalScopeBean {
13
- /**
14
- * Defines the behavior of the option in the global context.If notSelectable is
15
- * set, the option cannot be set as the field's value. This is useful for
16
- * archiving an option that has previously been selected but shouldn't be used
17
- * anymore.If defaultValue is set, the option is selected by default.
18
- */
19
- attributes?: ("notSelectable" | "defaultValue")[];
20
- }
21
- /** Details of the options for a select list issue field. */
22
- export interface IssueFieldOption {
23
- /** Details of the projects the option is available in. */
24
- config?: IssueFieldOptionConfiguration;
25
- /**
26
- * The unique identifier for the option. This is only unique within the select
27
- * field's set of options.
28
- */
29
- id: number;
30
- /**
31
- * The properties of the object, as arbitrary key-value pairs. These properties
32
- * can be searched using JQL, if the extractions (see [Issue Field Option Property
33
- * Index](https://developer.atlassian.com/cloud/jira/platform/modules/issue-field-option-property-index/))
34
- * are defined in the descriptor for the issue field module.
35
- */
36
- properties?: {
37
- [key: string]: unknown;
38
- };
39
- /** The option's name, which is displayed in Jira. */
40
- value: string;
41
- }
42
- /** Details of the projects the option is available in. */
43
- export interface IssueFieldOptionConfiguration {
44
- /**
45
- * DEPRECATED
46
- *
47
- * @deprecated
48
- */
49
- attributes?: ("notSelectable" | "defaultValue")[];
50
- /**
51
- * Defines the projects that the option is available in. If the scope is not
52
- * defined, then the option is available in all projects.
53
- */
54
- scope?: IssueFieldOptionScopeBean;
55
- }
56
- export interface IssueFieldOptionCreateBean extends Record<string, unknown> {
57
- /** Details of the projects the option is available in. */
58
- config?: IssueFieldOptionConfiguration;
59
- /**
60
- * The properties of the option as arbitrary key-value pairs. These properties can
61
- * be searched using JQL, if the extractions (see
62
- * https://developer.atlassian.com/cloud/jira/platform/modules/issue-field-option-property-index/)
63
- * are defined in the descriptor for the issue field module.
64
- */
65
- properties?: {
66
- [key: string]: unknown;
67
- };
68
- /** The option's name, which is displayed in Jira. */
69
- value: string;
70
- }
71
- /**
72
- * Defines the projects that the option is available in. If the scope is not
73
- * defined, then the option is available in all projects.
74
- */
75
- export interface IssueFieldOptionScopeBean {
76
- /**
77
- * Defines the behavior of the option within the global context. If this property
78
- * is set, even if set to an empty object, then the option is available in all
79
- * projects.
80
- */
81
- global?: GlobalScopeBean;
82
- /**
83
- * DEPRECATED
84
- *
85
- * @deprecated
86
- */
87
- projects?: number[];
88
- /**
89
- * Defines the projects in which the option is available and the behavior of the
90
- * option within each project. Specify one object per project. The behavior of the
91
- * option in a project context overrides the behavior in the global context.
92
- */
93
- projects2?: ProjectScopeBean[];
94
- }
95
- /** A page of items. */
96
- export interface PageBeanIssueFieldOption {
97
- /** Whether this is the last page. */
98
- isLast?: boolean;
99
- /** The maximum number of items that could be returned. */
100
- maxResults?: number;
101
- /** If there is another page of results, the URL of the next page. */
102
- nextPage?: string;
103
- /** The URL of the page. */
104
- self?: string;
105
- /** The index of the first item returned. */
106
- startAt?: number;
107
- /** The number of items returned. */
108
- total?: number;
109
- /** The list of items. */
110
- values?: IssueFieldOption[];
111
- }
112
- export interface ProjectScopeBean {
113
- /**
114
- * Defines the behavior of the option in the project.If notSelectable is set, the
115
- * option cannot be set as the field's value. This is useful for archiving an
116
- * option that has previously been selected but shouldn't be used anymore.If
117
- * defaultValue is set, the option is selected by default.
118
- */
119
- attributes?: ("notSelectable" | "defaultValue")[];
120
- /** The ID of the project that the option's behavior applies to. */
121
- id?: number;
122
- }
123
- export function registerIssueCustomFieldOptionsAppsValidationSchemas(
124
- validationSchemaStorage: CommonValidationSchemaStorage<ZodTypeAny>,
125
- ) {
126
- validationSchemaStorage.register(
127
- "GlobalScopeBean",
128
- z
129
- .object({
130
- attributes: z
131
- .array(z.enum(["notSelectable", "defaultValue"]))
132
- .superRefine((items, ctx) => {
133
- if (new Set(items).size !== items.length) {
134
- ctx.addIssue({
135
- code: z.ZodIssueCode.custom,
136
- path: [],
137
- message: "Array items must be unique",
138
- });
139
- }
140
- })
141
- .optional(),
142
- })
143
- .strict()
144
- .describe("GlobalScopeBean"),
145
- );
146
- validationSchemaStorage.register(
147
- "IssueFieldOption",
148
- z
149
- .object({
150
- config: validationSchemaStorage
151
- .lazy("IssueFieldOptionConfiguration")
152
- .optional(),
153
- id: z.number().int(),
154
- properties: z.object({}).catchall(z.unknown()).optional(),
155
- value: z.string(),
156
- })
157
- .strict()
158
- .describe("IssueFieldOption"),
159
- );
160
- validationSchemaStorage.register(
161
- "IssueFieldOptionConfiguration",
162
- z
163
- .object({
164
- attributes: z
165
- .array(z.enum(["notSelectable", "defaultValue"]))
166
- .superRefine((items, ctx) => {
167
- if (new Set(items).size !== items.length) {
168
- ctx.addIssue({
169
- code: z.ZodIssueCode.custom,
170
- path: [],
171
- message: "Array items must be unique",
172
- });
173
- }
174
- })
175
- .optional(),
176
- scope: validationSchemaStorage
177
- .lazy("IssueFieldOptionScopeBean")
178
- .optional(),
179
- })
180
- .strict()
181
- .describe("IssueFieldOptionConfiguration"),
182
- );
183
- validationSchemaStorage.register(
184
- "IssueFieldOptionCreateBean",
185
- z
186
- .object({
187
- config: validationSchemaStorage
188
- .lazy("IssueFieldOptionConfiguration")
189
- .optional(),
190
- properties: z.object({}).catchall(z.unknown()).optional(),
191
- value: z.string(),
192
- })
193
- .catchall(z.unknown())
194
- .describe("IssueFieldOptionCreateBean"),
195
- );
196
- validationSchemaStorage.register(
197
- "IssueFieldOptionScopeBean",
198
- z
199
- .object({
200
- global: validationSchemaStorage.lazy("GlobalScopeBean").optional(),
201
- projects: z
202
- .array(z.number().int())
203
- .superRefine((items, ctx) => {
204
- if (
205
- new Set(items.map((item) => JSON.stringify(item))).size !==
206
- items.length
207
- ) {
208
- ctx.addIssue({
209
- code: z.ZodIssueCode.custom,
210
- path: [],
211
- message: "Array items must be unique",
212
- });
213
- }
214
- })
215
- .optional(),
216
- projects2: z
217
- .array(validationSchemaStorage.lazy("ProjectScopeBean"))
218
- .superRefine((items, ctx) => {
219
- if (
220
- new Set(items.map((item) => JSON.stringify(item))).size !==
221
- items.length
222
- ) {
223
- ctx.addIssue({
224
- code: z.ZodIssueCode.custom,
225
- path: [],
226
- message: "Array items must be unique",
227
- });
228
- }
229
- })
230
- .optional(),
231
- })
232
- .strict()
233
- .describe("IssueFieldOptionScopeBean"),
234
- );
235
- validationSchemaStorage.register(
236
- "PageBeanIssueFieldOption",
237
- z
238
- .object({
239
- isLast: z.boolean().optional(),
240
- maxResults: z.number().int().optional(),
241
- nextPage: z.string().optional(),
242
- self: z.string().optional(),
243
- startAt: z.number().int().optional(),
244
- total: z.number().int().optional(),
245
- values: z
246
- .array(validationSchemaStorage.lazy("IssueFieldOption"))
247
- .optional(),
248
- })
249
- .strict()
250
- .describe("PageBeanIssueFieldOption"),
251
- );
252
- validationSchemaStorage.register(
253
- "ProjectScopeBean",
254
- z
255
- .object({
256
- attributes: z
257
- .array(z.enum(["notSelectable", "defaultValue"]))
258
- .superRefine((items, ctx) => {
259
- if (new Set(items).size !== items.length) {
260
- ctx.addIssue({
261
- code: z.ZodIssueCode.custom,
262
- path: [],
263
- message: "Array items must be unique",
264
- });
265
- }
266
- })
267
- .optional(),
268
- id: z.number().int().optional(),
269
- })
270
- .strict()
271
- .describe("ProjectScopeBean"),
272
- );
273
- }
@@ -1,283 +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 of the options to create for a custom field. */
8
- export interface BulkCustomFieldOptionCreateRequest {
9
- /** Details of options to create. */
10
- options?: CustomFieldOptionCreate[];
11
- }
12
- /** Details of the options to update for a custom field. */
13
- export interface BulkCustomFieldOptionUpdateRequest {
14
- /** Details of the options to update. */
15
- options?: CustomFieldOptionUpdate[];
16
- }
17
- /** Details of the custom field options for a context. */
18
- export interface CustomFieldContextOption {
19
- /** Whether the option is disabled. */
20
- disabled: boolean;
21
- /** The ID of the custom field option. */
22
- id: string;
23
- /**
24
- * For cascading options, the ID of the custom field option containing the
25
- * cascading option.
26
- */
27
- optionId?: string;
28
- /** The value of the custom field option. */
29
- value: string;
30
- }
31
- /** A list of custom field options for a context. */
32
- export interface CustomFieldCreatedContextOptionsList {
33
- /** The created custom field options. */
34
- options?: CustomFieldContextOption[];
35
- }
36
- /** Details of a custom option for a field. */
37
- export interface CustomFieldOption {
38
- /** The URL of these custom field option details. */
39
- self?: string;
40
- /** The value of the custom field option. */
41
- value?: string;
42
- }
43
- /** Details of a custom field option to create. */
44
- export interface CustomFieldOptionCreate {
45
- /** Whether the option is disabled. */
46
- disabled?: boolean;
47
- /**
48
- * For cascading options, the ID of the custom field object containing the
49
- * cascading option.
50
- */
51
- optionId?: string;
52
- /** The value of the custom field option. */
53
- value: string;
54
- }
55
- /** Details of a custom field option for a context. */
56
- export interface CustomFieldOptionUpdate {
57
- /** Whether the option is disabled. */
58
- disabled?: boolean;
59
- /** The ID of the custom field option. */
60
- id: string;
61
- /** The value of the custom field option. */
62
- value?: string;
63
- }
64
- /** A list of custom field options for a context. */
65
- export interface CustomFieldUpdatedContextOptionsList {
66
- /** The updated custom field options. */
67
- options?: CustomFieldOptionUpdate[];
68
- }
69
- /**
70
- * An ordered list of custom field option IDs and information on where to move
71
- * them.
72
- */
73
- export interface OrderOfCustomFieldOptions {
74
- /**
75
- * The ID of the custom field option or cascading option to place the moved
76
- * options after. Required if `position` isn't provided.
77
- */
78
- after?: string;
79
- /**
80
- * A list of IDs of custom field options to move. The order of the custom field
81
- * option IDs in the list is the order they are given after the move. The list
82
- * must contain custom field options or cascading options, but not both.
83
- */
84
- customFieldOptionIds: string[];
85
- /**
86
- * The position the custom field options should be moved to. Required if `after`
87
- * isn't provided.
88
- */
89
- position?: "First" | "Last";
90
- }
91
- /** A page of items. */
92
- export interface PageBeanCustomFieldContextOption {
93
- /** Whether this is the last page. */
94
- isLast?: boolean;
95
- /** The maximum number of items that could be returned. */
96
- maxResults?: number;
97
- /** If there is another page of results, the URL of the next page. */
98
- nextPage?: string;
99
- /** The URL of the page. */
100
- self?: string;
101
- /** The index of the first item returned. */
102
- startAt?: number;
103
- /** The number of items returned. */
104
- total?: number;
105
- /** The list of items. */
106
- values?: CustomFieldContextOption[];
107
- }
108
- /** The result of the task execution. */
109
- export interface RemoveOptionFromIssuesResult {
110
- /**
111
- * A collection of errors related to unchanged issues. The collection size is
112
- * limited, which means not all errors may be returned.
113
- */
114
- errors?: SimpleErrorCollection;
115
- /** The IDs of the modified issues. */
116
- modifiedIssues?: number[];
117
- /** The IDs of the unchanged issues, those issues where errors prevent modification. */
118
- unmodifiedIssues?: number[];
119
- }
120
- /**
121
- * A collection of errors related to unchanged issues. The collection size is
122
- * limited, which means not all errors may be returned.
123
- */
124
- export interface SimpleErrorCollection {
125
- /**
126
- * The list of error messages produced by this operation. For example, "input
127
- * parameter 'key' must be provided"
128
- */
129
- errorMessages?: string[];
130
- /**
131
- * The list of errors by parameter returned by the operation. For
132
- * example,"projectKey": "Project keys must start with an uppercase letter,
133
- * followed by one or more uppercase alphanumeric characters."
134
- */
135
- errors?: {
136
- [key: string]: string;
137
- };
138
- httpStatusCode?: number;
139
- }
140
- export function registerIssueCustomFieldOptionsValidationSchemas(
141
- validationSchemaStorage: CommonValidationSchemaStorage<ZodTypeAny>,
142
- ) {
143
- validationSchemaStorage.register(
144
- "BulkCustomFieldOptionCreateRequest",
145
- z
146
- .object({
147
- options: z
148
- .array(validationSchemaStorage.lazy("CustomFieldOptionCreate"))
149
- .optional(),
150
- })
151
- .strict()
152
- .describe("BulkCustomFieldOptionCreateRequest"),
153
- );
154
- validationSchemaStorage.register(
155
- "BulkCustomFieldOptionUpdateRequest",
156
- z
157
- .object({
158
- options: z
159
- .array(validationSchemaStorage.lazy("CustomFieldOptionUpdate"))
160
- .optional(),
161
- })
162
- .strict()
163
- .describe("BulkCustomFieldOptionUpdateRequest"),
164
- );
165
- validationSchemaStorage.register(
166
- "CustomFieldContextOption",
167
- z
168
- .object({
169
- disabled: z.boolean(),
170
- id: z.string(),
171
- optionId: z.string().optional(),
172
- value: z.string(),
173
- })
174
- .strict()
175
- .describe("CustomFieldContextOption"),
176
- );
177
- validationSchemaStorage.register(
178
- "CustomFieldCreatedContextOptionsList",
179
- z
180
- .object({
181
- options: z
182
- .array(validationSchemaStorage.lazy("CustomFieldContextOption"))
183
- .optional(),
184
- })
185
- .strict()
186
- .describe("CustomFieldCreatedContextOptionsList"),
187
- );
188
- validationSchemaStorage.register(
189
- "CustomFieldOption",
190
- z
191
- .object({
192
- self: z.string().optional(),
193
- value: z.string().optional(),
194
- })
195
- .strict()
196
- .describe("CustomFieldOption"),
197
- );
198
- validationSchemaStorage.register(
199
- "CustomFieldOptionCreate",
200
- z
201
- .object({
202
- disabled: z.boolean().optional(),
203
- optionId: z.string().optional(),
204
- value: z.string(),
205
- })
206
- .strict()
207
- .describe("CustomFieldOptionCreate"),
208
- );
209
- validationSchemaStorage.register(
210
- "CustomFieldOptionUpdate",
211
- z
212
- .object({
213
- disabled: z.boolean().optional(),
214
- id: z.string(),
215
- value: z.string().optional(),
216
- })
217
- .strict()
218
- .describe("CustomFieldOptionUpdate"),
219
- );
220
- validationSchemaStorage.register(
221
- "CustomFieldUpdatedContextOptionsList",
222
- z
223
- .object({
224
- options: z
225
- .array(validationSchemaStorage.lazy("CustomFieldOptionUpdate"))
226
- .optional(),
227
- })
228
- .strict()
229
- .describe("CustomFieldUpdatedContextOptionsList"),
230
- );
231
- validationSchemaStorage.register(
232
- "OrderOfCustomFieldOptions",
233
- z
234
- .object({
235
- after: z.string().optional(),
236
- customFieldOptionIds: z.array(z.string()),
237
- position: z.enum(["First", "Last"]).optional(),
238
- })
239
- .strict()
240
- .describe("OrderOfCustomFieldOptions"),
241
- );
242
- validationSchemaStorage.register(
243
- "PageBeanCustomFieldContextOption",
244
- z
245
- .object({
246
- isLast: z.boolean().optional(),
247
- maxResults: z.number().int().optional(),
248
- nextPage: z.string().optional(),
249
- self: z.string().optional(),
250
- startAt: z.number().int().optional(),
251
- total: z.number().int().optional(),
252
- values: z
253
- .array(validationSchemaStorage.lazy("CustomFieldContextOption"))
254
- .optional(),
255
- })
256
- .strict()
257
- .describe("PageBeanCustomFieldContextOption"),
258
- );
259
- validationSchemaStorage.register(
260
- "RemoveOptionFromIssuesResult",
261
- z
262
- .object({
263
- errors: validationSchemaStorage
264
- .lazy("SimpleErrorCollection")
265
- .optional(),
266
- modifiedIssues: z.array(z.number().int()).optional(),
267
- unmodifiedIssues: z.array(z.number().int()).optional(),
268
- })
269
- .strict()
270
- .describe("RemoveOptionFromIssuesResult"),
271
- );
272
- validationSchemaStorage.register(
273
- "SimpleErrorCollection",
274
- z
275
- .object({
276
- errorMessages: z.array(z.string()).optional(),
277
- errors: z.object({}).catchall(z.string()).optional(),
278
- httpStatusCode: z.number().int().optional(),
279
- })
280
- .strict()
281
- .describe("SimpleErrorCollection"),
282
- );
283
- }
@@ -1,118 +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
- /** A list of issue IDs and the value to update a custom field to. */
8
- export interface CustomFieldValueUpdate {
9
- /** The list of issue IDs. */
10
- issueIds: number[];
11
- /**
12
- * The value for the custom field. The value must be compatible with the [custom
13
- * field
14
- * type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field/#data-types)
15
- * as follows:
16
- *
17
- * * `string` the value must be a string.
18
- * * `number` the value must be a number.
19
- * * `datetime` the value must be a string that represents a date in the ISO
20
- * format or the simplified extended ISO format. For example,
21
- * `"2023-01-18T12:00:00-03:00"` or `"2023-01-18T12:00:00.000Z"`. However, the
22
- * milliseconds part is ignored.
23
- * * `user` the value must be an object that contains the `accountId` field.
24
- * * `group` the value must be an object that contains the group `name` or
25
- * `groupId` field. Because group names can change, we recommend using `groupId`.
26
- *
27
- * A list of appropriate values must be provided if the field is of the `list`
28
- * [collection
29
- * type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field/#collection-types).
30
- */
31
- value: unknown;
32
- }
33
- /** Details of updates for a custom field. */
34
- export interface CustomFieldValueUpdateDetails {
35
- /** The list of custom field update details. */
36
- updates?: CustomFieldValueUpdate[];
37
- }
38
- /** A custom field and its new value with a list of issue to update. */
39
- export interface MultipleCustomFieldValuesUpdate {
40
- /** The ID or key of the custom field. For example, `customfield_10010`. */
41
- customField: string;
42
- /** The list of issue IDs. */
43
- issueIds: number[];
44
- /**
45
- * The value for the custom field. The value must be compatible with the [custom
46
- * field
47
- * type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field/#data-types)
48
- * as follows:
49
- *
50
- * * `string` the value must be a string.
51
- * * `number` the value must be a number.
52
- * * `datetime` the value must be a string that represents a date in the ISO
53
- * format or the simplified extended ISO format. For example,
54
- * `"2023-01-18T12:00:00-03:00"` or `"2023-01-18T12:00:00.000Z"`. However, the
55
- * milliseconds part is ignored.
56
- * * `user` the value must be an object that contains the `accountId` field.
57
- * * `group` the value must be an object that contains the group `name` or
58
- * `groupId` field. Because group names can change, we recommend using `groupId`.
59
- *
60
- * A list of appropriate values must be provided if the field is of the `list`
61
- * [collection
62
- * type](https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field/#collection-types).
63
- */
64
- value: unknown;
65
- }
66
- /** List of updates for a custom fields. */
67
- export interface MultipleCustomFieldValuesUpdateDetails {
68
- updates?: MultipleCustomFieldValuesUpdate[];
69
- }
70
- export function registerIssueCustomFieldValuesAppsValidationSchemas(
71
- validationSchemaStorage: CommonValidationSchemaStorage<ZodTypeAny>,
72
- ) {
73
- validationSchemaStorage.register(
74
- "CustomFieldValueUpdate",
75
- z
76
- .object({
77
- issueIds: z.array(z.number().int()),
78
- value: z.unknown(),
79
- })
80
- .strict()
81
- .describe("CustomFieldValueUpdate"),
82
- );
83
- validationSchemaStorage.register(
84
- "CustomFieldValueUpdateDetails",
85
- z
86
- .object({
87
- updates: z
88
- .array(validationSchemaStorage.lazy("CustomFieldValueUpdate"))
89
- .optional(),
90
- })
91
- .strict()
92
- .describe("CustomFieldValueUpdateDetails"),
93
- );
94
- validationSchemaStorage.register(
95
- "MultipleCustomFieldValuesUpdate",
96
- z
97
- .object({
98
- customField: z.string(),
99
- issueIds: z.array(z.number().int()),
100
- value: z.unknown(),
101
- })
102
- .strict()
103
- .describe("MultipleCustomFieldValuesUpdate"),
104
- );
105
- validationSchemaStorage.register(
106
- "MultipleCustomFieldValuesUpdateDetails",
107
- z
108
- .object({
109
- updates: z
110
- .array(
111
- validationSchemaStorage.lazy("MultipleCustomFieldValuesUpdate"),
112
- )
113
- .optional(),
114
- })
115
- .strict()
116
- .describe("MultipleCustomFieldValuesUpdateDetails"),
117
- );
118
- }