@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,1072 +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
- /** The project and issue type mapping with a matching custom field context. */
8
- export interface ContextForProjectAndIssueType {
9
- /** The ID of the custom field context. */
10
- contextId: string;
11
- /** The ID of the issue type. */
12
- issueTypeId: string;
13
- /** The ID of the project. */
14
- projectId: string;
15
- }
16
- /** The details of a created custom field context. */
17
- export interface CreateCustomFieldContext {
18
- /** The description of the context. */
19
- description?: string;
20
- /** The ID of the context. */
21
- id?: string;
22
- /**
23
- * The list of issue types IDs for the context. If the list is empty, the context
24
- * refers to all issue types.
25
- */
26
- issueTypeIds?: string[];
27
- /** The name of the context. */
28
- name: string;
29
- /**
30
- * The list of project IDs associated with the context. If the list is empty, the
31
- * context is global.
32
- */
33
- projectIds?: string[];
34
- }
35
- /** The details of a custom field context. */
36
- export interface CustomFieldContext {
37
- /** The description of the context. */
38
- description: string;
39
- /** The ID of the context. */
40
- id: string;
41
- /** Whether the context apply to all issue types. */
42
- isAnyIssueType: boolean;
43
- /** Whether the context is global. */
44
- isGlobalContext: boolean;
45
- /** The name of the context. */
46
- name: string;
47
- }
48
- export type CustomFieldContextDefaultValue =
49
- | CustomFieldContextDefaultValueCascadingOption
50
- | CustomFieldContextDefaultValueMultipleOption
51
- | CustomFieldContextDefaultValueSingleOption
52
- | CustomFieldContextSingleUserPickerDefaults
53
- | CustomFieldContextDefaultValueMultiUserPicker
54
- | CustomFieldContextDefaultValueSingleGroupPicker
55
- | CustomFieldContextDefaultValueMultipleGroupPicker
56
- | CustomFieldContextDefaultValueDate
57
- | CustomFieldContextDefaultValueDateTime
58
- | CustomFieldContextDefaultValueUrl
59
- | CustomFieldContextDefaultValueProject
60
- | CustomFieldContextDefaultValueFloat
61
- | CustomFieldContextDefaultValueLabels
62
- | CustomFieldContextDefaultValueTextField
63
- | CustomFieldContextDefaultValueTextArea
64
- | CustomFieldContextDefaultValueReadOnly
65
- | CustomFieldContextDefaultValueSingleVersionPicker
66
- | CustomFieldContextDefaultValueMultipleVersionPicker
67
- | CustomFieldContextDefaultValueForgeStringField
68
- | CustomFieldContextDefaultValueForgeMultiStringField
69
- | CustomFieldContextDefaultValueForgeObjectField
70
- | CustomFieldContextDefaultValueForgeDateTimeField
71
- | CustomFieldContextDefaultValueForgeGroupField
72
- | CustomFieldContextDefaultValueForgeMultiGroupField
73
- | CustomFieldContextDefaultValueForgeNumberField
74
- | CustomFieldContextDefaultValueForgeUserField
75
- | CustomFieldContextDefaultValueForgeMultiUserField;
76
- /** The default value for a cascading select custom field. */
77
- export interface CustomFieldContextDefaultValueCascadingOption {
78
- /** The ID of the default cascading option. */
79
- cascadingOptionId?: string;
80
- /** The ID of the context. */
81
- contextId: string;
82
- /** The ID of the default option. */
83
- optionId: string;
84
- type: string;
85
- }
86
- /** The default value for a Date custom field. */
87
- export interface CustomFieldContextDefaultValueDate {
88
- /** The default date in ISO format. Ignored if `useCurrent` is true. */
89
- date?: string;
90
- type: string;
91
- /** Whether to use the current date. */
92
- useCurrent?: boolean;
93
- }
94
- /** The default value for a date time custom field. */
95
- export interface CustomFieldContextDefaultValueDateTime {
96
- /** The default date-time in ISO format. Ignored if `useCurrent` is true. */
97
- dateTime?: string;
98
- type: string;
99
- /** Whether to use the current date. */
100
- useCurrent?: boolean;
101
- }
102
- /** Default value for a float (number) custom field. */
103
- export interface CustomFieldContextDefaultValueFloat {
104
- /** The default floating-point number. */
105
- number: number;
106
- type: string;
107
- }
108
- /** The default value for a Forge date time custom field. */
109
- export interface CustomFieldContextDefaultValueForgeDateTimeField {
110
- /** The ID of the context. */
111
- contextId: string;
112
- /** The default date-time in ISO format. Ignored if `useCurrent` is true. */
113
- dateTime?: string;
114
- type: string;
115
- /** Whether to use the current date. */
116
- useCurrent?: boolean;
117
- }
118
- /** The default value for a Forge group custom field. */
119
- export interface CustomFieldContextDefaultValueForgeGroupField {
120
- /** The ID of the context. */
121
- contextId: string;
122
- /** The ID of the the default group. */
123
- groupId: string;
124
- type: string;
125
- }
126
- /** The default value for a Forge collection of groups custom field. */
127
- export interface CustomFieldContextDefaultValueForgeMultiGroupField {
128
- /** The ID of the context. */
129
- contextId: string;
130
- /** The IDs of the default groups. */
131
- groupIds: string[];
132
- type: string;
133
- }
134
- /** The default text for a Forge collection of strings custom field. */
135
- export interface CustomFieldContextDefaultValueForgeMultiStringField {
136
- type: string;
137
- /** List of string values. The maximum length for a value is 254 characters. */
138
- values?: string[];
139
- }
140
- /** Defaults for a Forge collection of users custom field. */
141
- export interface CustomFieldContextDefaultValueForgeMultiUserField {
142
- /** The IDs of the default users. */
143
- accountIds: string[];
144
- /** The ID of the context. */
145
- contextId: string;
146
- type: string;
147
- }
148
- /** Default value for a Forge number custom field. */
149
- export interface CustomFieldContextDefaultValueForgeNumberField {
150
- /** The ID of the context. */
151
- contextId: string;
152
- /** The default floating-point number. */
153
- number: number;
154
- type: string;
155
- }
156
- /** The default value for a Forge object custom field. */
157
- export interface CustomFieldContextDefaultValueForgeObjectField {
158
- /** The default JSON object. */
159
- object?: {
160
- [key: string]: unknown;
161
- };
162
- type: string;
163
- }
164
- /** The default text for a Forge string custom field. */
165
- export interface CustomFieldContextDefaultValueForgeStringField {
166
- /** The ID of the context. */
167
- contextId: string;
168
- /** The default text. The maximum length is 254 characters. */
169
- text?: string;
170
- type: string;
171
- }
172
- /** Defaults for a Forge user custom field. */
173
- export interface CustomFieldContextDefaultValueForgeUserField {
174
- /** The ID of the default user. */
175
- accountId: string;
176
- /** The ID of the context. */
177
- contextId: string;
178
- type: string;
179
- /** Filter for a User Picker (single) custom field. */
180
- userFilter: UserFilter;
181
- }
182
- /** Default value for a labels custom field. */
183
- export interface CustomFieldContextDefaultValueLabels {
184
- /** The default labels value. */
185
- labels: string[];
186
- type: string;
187
- }
188
- /** The default value for a multiple group picker custom field. */
189
- export interface CustomFieldContextDefaultValueMultipleGroupPicker {
190
- /** The ID of the context. */
191
- contextId: string;
192
- /** The IDs of the default groups. */
193
- groupIds: string[];
194
- type: string;
195
- }
196
- /** The default value for a multi-select custom field. */
197
- export interface CustomFieldContextDefaultValueMultipleOption {
198
- /** The ID of the context. */
199
- contextId: string;
200
- /** The list of IDs of the default options. */
201
- optionIds: string[];
202
- type: string;
203
- }
204
- /** The default value for a multiple version picker custom field. */
205
- export interface CustomFieldContextDefaultValueMultipleVersionPicker {
206
- type: string;
207
- /** The IDs of the default versions. */
208
- versionIds: string[];
209
- /**
210
- * The order the pickable versions are displayed in. If not provided, the
211
- * released-first order is used. Available version orders are `"releasedFirst"`
212
- * and `"unreleasedFirst"`.
213
- */
214
- versionOrder?: string;
215
- }
216
- /** The default value for a User Picker (multiple) custom field. */
217
- export interface CustomFieldContextDefaultValueMultiUserPicker {
218
- /** The IDs of the default users. */
219
- accountIds: string[];
220
- /** The ID of the context. */
221
- contextId: string;
222
- type: string;
223
- }
224
- /** The default value for a project custom field. */
225
- export interface CustomFieldContextDefaultValueProject {
226
- /** The ID of the context. */
227
- contextId: string;
228
- /** The ID of the default project. */
229
- projectId: string;
230
- type: string;
231
- }
232
- /** The default text for a read only custom field. */
233
- export interface CustomFieldContextDefaultValueReadOnly {
234
- /** The default text. The maximum length is 255 characters. */
235
- text?: string;
236
- type: string;
237
- }
238
- /** The default value for a group picker custom field. */
239
- export interface CustomFieldContextDefaultValueSingleGroupPicker {
240
- /** The ID of the context. */
241
- contextId: string;
242
- /** The ID of the the default group. */
243
- groupId: string;
244
- type: string;
245
- }
246
- /** The default value for a single select custom field. */
247
- export interface CustomFieldContextDefaultValueSingleOption {
248
- /** The ID of the context. */
249
- contextId: string;
250
- /** The ID of the default option. */
251
- optionId: string;
252
- type: string;
253
- }
254
- /** The default value for a version picker custom field. */
255
- export interface CustomFieldContextDefaultValueSingleVersionPicker {
256
- type: string;
257
- /** The ID of the default version. */
258
- versionId: string;
259
- /**
260
- * The order the pickable versions are displayed in. If not provided, the
261
- * released-first order is used. Available version orders are `"releasedFirst"`
262
- * and `"unreleasedFirst"`.
263
- */
264
- versionOrder?: string;
265
- }
266
- /** The default text for a text area custom field. */
267
- export interface CustomFieldContextDefaultValueTextArea {
268
- /** The default text. The maximum length is 32767 characters. */
269
- text?: string;
270
- type: string;
271
- }
272
- /** The default text for a text custom field. */
273
- export interface CustomFieldContextDefaultValueTextField {
274
- /** The default text. The maximum length is 254 characters. */
275
- text?: string;
276
- type: string;
277
- }
278
- /** Default values to update. */
279
- export interface CustomFieldContextDefaultValueUpdate {
280
- defaultValues?: CustomFieldContextDefaultValue[];
281
- }
282
- /** The default value for a URL custom field. */
283
- export interface CustomFieldContextDefaultValueUrl {
284
- /** The ID of the context. */
285
- contextId: string;
286
- type: string;
287
- /** The default URL. */
288
- url: string;
289
- }
290
- /** Details of a context to project association. */
291
- export interface CustomFieldContextProjectMapping {
292
- /** The ID of the context. */
293
- contextId: string;
294
- /** Whether context is global. */
295
- isGlobalContext?: boolean;
296
- /** The ID of the project. */
297
- projectId?: string;
298
- }
299
- /** Defaults for a User Picker (single) custom field. */
300
- export interface CustomFieldContextSingleUserPickerDefaults {
301
- /** The ID of the default user. */
302
- accountId: string;
303
- /** The ID of the context. */
304
- contextId: string;
305
- type: string;
306
- /** Filter for a User Picker (single) custom field. */
307
- userFilter: UserFilter;
308
- }
309
- /** Details of a custom field context. */
310
- export interface CustomFieldContextUpdateDetails {
311
- /**
312
- * The description of the custom field context. The maximum length is 255
313
- * characters.
314
- */
315
- description?: string;
316
- /**
317
- * The name of the custom field context. The name must be unique. The maximum
318
- * length is 255 characters.
319
- */
320
- name?: string;
321
- }
322
- /** Mapping of an issue type to a context. */
323
- export interface IssueTypeToContextMapping {
324
- /** The ID of the context. */
325
- contextId: string;
326
- /** Whether the context is mapped to any issue type. */
327
- isAnyIssueType?: boolean;
328
- /** The ID of the issue type. */
329
- issueTypeId?: string;
330
- }
331
- /** A page of items. */
332
- export interface PageBeanContextForProjectAndIssueType {
333
- /** Whether this is the last page. */
334
- isLast?: boolean;
335
- /** The maximum number of items that could be returned. */
336
- maxResults?: number;
337
- /** If there is another page of results, the URL of the next page. */
338
- nextPage?: string;
339
- /** The URL of the page. */
340
- self?: string;
341
- /** The index of the first item returned. */
342
- startAt?: number;
343
- /** The number of items returned. */
344
- total?: number;
345
- /** The list of items. */
346
- values?: ContextForProjectAndIssueType[];
347
- }
348
- /** A page of items. */
349
- export interface PageBeanCustomFieldContext {
350
- /** Whether this is the last page. */
351
- isLast?: boolean;
352
- /** The maximum number of items that could be returned. */
353
- maxResults?: number;
354
- /** If there is another page of results, the URL of the next page. */
355
- nextPage?: string;
356
- /** The URL of the page. */
357
- self?: string;
358
- /** The index of the first item returned. */
359
- startAt?: number;
360
- /** The number of items returned. */
361
- total?: number;
362
- /** The list of items. */
363
- values?: CustomFieldContext[];
364
- }
365
- /** A page of items. */
366
- export interface PageBeanCustomFieldContextDefaultValue {
367
- /** Whether this is the last page. */
368
- isLast?: boolean;
369
- /** The maximum number of items that could be returned. */
370
- maxResults?: number;
371
- /** If there is another page of results, the URL of the next page. */
372
- nextPage?: string;
373
- /** The URL of the page. */
374
- self?: string;
375
- /** The index of the first item returned. */
376
- startAt?: number;
377
- /** The number of items returned. */
378
- total?: number;
379
- /** The list of items. */
380
- values?: CustomFieldContextDefaultValue[];
381
- }
382
- /** A page of items. */
383
- export interface PageBeanCustomFieldContextProjectMapping {
384
- /** Whether this is the last page. */
385
- isLast?: boolean;
386
- /** The maximum number of items that could be returned. */
387
- maxResults?: number;
388
- /** If there is another page of results, the URL of the next page. */
389
- nextPage?: string;
390
- /** The URL of the page. */
391
- self?: string;
392
- /** The index of the first item returned. */
393
- startAt?: number;
394
- /** The number of items returned. */
395
- total?: number;
396
- /** The list of items. */
397
- values?: CustomFieldContextProjectMapping[];
398
- }
399
- /** A page of items. */
400
- export interface PageBeanIssueTypeToContextMapping {
401
- /** Whether this is the last page. */
402
- isLast?: boolean;
403
- /** The maximum number of items that could be returned. */
404
- maxResults?: number;
405
- /** If there is another page of results, the URL of the next page. */
406
- nextPage?: string;
407
- /** The URL of the page. */
408
- self?: string;
409
- /** The index of the first item returned. */
410
- startAt?: number;
411
- /** The number of items returned. */
412
- total?: number;
413
- /** The list of items. */
414
- values?: IssueTypeToContextMapping[];
415
- }
416
- /** A list of project IDs. */
417
- export interface ProjectIds {
418
- /** The IDs of projects. */
419
- projectIds: string[];
420
- }
421
- /** The project and issue type mapping. */
422
- export interface ProjectIssueTypeMapping {
423
- /** The ID of the issue type. */
424
- issueTypeId: string;
425
- /** The ID of the project. */
426
- projectId: string;
427
- }
428
- /** The project and issue type mappings. */
429
- export interface ProjectIssueTypeMappings {
430
- /** The project and issue type mappings. */
431
- mappings: ProjectIssueTypeMapping[];
432
- }
433
- /** Filter for a User Picker (single) custom field. */
434
- export interface UserFilter extends Record<string, unknown> {
435
- /** Whether the filter is enabled. */
436
- enabled: boolean;
437
- /**
438
- * User groups autocomplete suggestion users must belong to. If not provided, the
439
- * default values are used. A maximum of 10 groups can be provided.
440
- */
441
- groups?: string[];
442
- /**
443
- * Roles that autocomplete suggestion users must belong to. If not provided, the
444
- * default values are used. A maximum of 10 roles can be provided.
445
- */
446
- roleIds?: number[];
447
- }
448
- export function registerIssueCustomFieldContextsValidationSchemas(
449
- validationSchemaStorage: CommonValidationSchemaStorage<ZodTypeAny>,
450
- ) {
451
- validationSchemaStorage.register(
452
- "ContextForProjectAndIssueType",
453
- z
454
- .object({
455
- contextId: z.string(),
456
- issueTypeId: z.string(),
457
- projectId: z.string(),
458
- })
459
- .strict()
460
- .describe("ContextForProjectAndIssueType"),
461
- );
462
- validationSchemaStorage.register(
463
- "CreateCustomFieldContext",
464
- z
465
- .object({
466
- description: z.string().optional(),
467
- id: z.string().optional(),
468
- issueTypeIds: z.array(z.string()).optional(),
469
- name: z.string(),
470
- projectIds: z.array(z.string()).optional(),
471
- })
472
- .strict()
473
- .describe("CreateCustomFieldContext"),
474
- );
475
- validationSchemaStorage.register(
476
- "CustomFieldContext",
477
- z
478
- .object({
479
- description: z.string(),
480
- id: z.string(),
481
- isAnyIssueType: z.boolean(),
482
- isGlobalContext: z.boolean(),
483
- name: z.string(),
484
- })
485
- .strict()
486
- .describe("CustomFieldContext"),
487
- );
488
- validationSchemaStorage.register(
489
- "CustomFieldContextDefaultValue",
490
- z
491
- .union([
492
- validationSchemaStorage.lazy(
493
- "CustomFieldContextDefaultValueCascadingOption",
494
- ),
495
- validationSchemaStorage.lazy(
496
- "CustomFieldContextDefaultValueMultipleOption",
497
- ),
498
- validationSchemaStorage.lazy(
499
- "CustomFieldContextDefaultValueSingleOption",
500
- ),
501
- validationSchemaStorage.lazy(
502
- "CustomFieldContextSingleUserPickerDefaults",
503
- ),
504
- validationSchemaStorage.lazy(
505
- "CustomFieldContextDefaultValueMultiUserPicker",
506
- ),
507
- validationSchemaStorage.lazy(
508
- "CustomFieldContextDefaultValueSingleGroupPicker",
509
- ),
510
- validationSchemaStorage.lazy(
511
- "CustomFieldContextDefaultValueMultipleGroupPicker",
512
- ),
513
- validationSchemaStorage.lazy("CustomFieldContextDefaultValueDate"),
514
- validationSchemaStorage.lazy("CustomFieldContextDefaultValueDateTime"),
515
- validationSchemaStorage.lazy("CustomFieldContextDefaultValueUrl"),
516
- validationSchemaStorage.lazy("CustomFieldContextDefaultValueProject"),
517
- validationSchemaStorage.lazy("CustomFieldContextDefaultValueFloat"),
518
- validationSchemaStorage.lazy("CustomFieldContextDefaultValueLabels"),
519
- validationSchemaStorage.lazy("CustomFieldContextDefaultValueTextField"),
520
- validationSchemaStorage.lazy("CustomFieldContextDefaultValueTextArea"),
521
- validationSchemaStorage.lazy("CustomFieldContextDefaultValueReadOnly"),
522
- validationSchemaStorage.lazy(
523
- "CustomFieldContextDefaultValueSingleVersionPicker",
524
- ),
525
- validationSchemaStorage.lazy(
526
- "CustomFieldContextDefaultValueMultipleVersionPicker",
527
- ),
528
- validationSchemaStorage.lazy(
529
- "CustomFieldContextDefaultValueForgeStringField",
530
- ),
531
- validationSchemaStorage.lazy(
532
- "CustomFieldContextDefaultValueForgeMultiStringField",
533
- ),
534
- validationSchemaStorage.lazy(
535
- "CustomFieldContextDefaultValueForgeObjectField",
536
- ),
537
- validationSchemaStorage.lazy(
538
- "CustomFieldContextDefaultValueForgeDateTimeField",
539
- ),
540
- validationSchemaStorage.lazy(
541
- "CustomFieldContextDefaultValueForgeGroupField",
542
- ),
543
- validationSchemaStorage.lazy(
544
- "CustomFieldContextDefaultValueForgeMultiGroupField",
545
- ),
546
- validationSchemaStorage.lazy(
547
- "CustomFieldContextDefaultValueForgeNumberField",
548
- ),
549
- validationSchemaStorage.lazy(
550
- "CustomFieldContextDefaultValueForgeUserField",
551
- ),
552
- validationSchemaStorage.lazy(
553
- "CustomFieldContextDefaultValueForgeMultiUserField",
554
- ),
555
- ])
556
- .describe("CustomFieldContextDefaultValue"),
557
- );
558
- validationSchemaStorage.register(
559
- "CustomFieldContextDefaultValueCascadingOption",
560
- z
561
- .object({
562
- cascadingOptionId: z.string().optional(),
563
- contextId: z.string(),
564
- optionId: z.string(),
565
- type: z.string(),
566
- })
567
- .strict()
568
- .describe("CustomFieldContextDefaultValueCascadingOption"),
569
- );
570
- validationSchemaStorage.register(
571
- "CustomFieldContextDefaultValueDate",
572
- z
573
- .object({
574
- date: z.string().optional(),
575
- type: z.string(),
576
- useCurrent: z.boolean().optional(),
577
- })
578
- .strict()
579
- .describe("CustomFieldContextDefaultValueDate"),
580
- );
581
- validationSchemaStorage.register(
582
- "CustomFieldContextDefaultValueDateTime",
583
- z
584
- .object({
585
- dateTime: z.string().optional(),
586
- type: z.string(),
587
- useCurrent: z.boolean().optional(),
588
- })
589
- .strict()
590
- .describe("CustomFieldContextDefaultValueDateTime"),
591
- );
592
- validationSchemaStorage.register(
593
- "CustomFieldContextDefaultValueFloat",
594
- z
595
- .object({
596
- number: z.number(),
597
- type: z.string(),
598
- })
599
- .strict()
600
- .describe("CustomFieldContextDefaultValueFloat"),
601
- );
602
- validationSchemaStorage.register(
603
- "CustomFieldContextDefaultValueForgeDateTimeField",
604
- z
605
- .object({
606
- contextId: z.string(),
607
- dateTime: z.string().optional(),
608
- type: z.string(),
609
- useCurrent: z.boolean().optional(),
610
- })
611
- .strict()
612
- .describe("CustomFieldContextDefaultValueForgeDateTimeField"),
613
- );
614
- validationSchemaStorage.register(
615
- "CustomFieldContextDefaultValueForgeGroupField",
616
- z
617
- .object({
618
- contextId: z.string(),
619
- groupId: z.string(),
620
- type: z.string(),
621
- })
622
- .strict()
623
- .describe("CustomFieldContextDefaultValueForgeGroupField"),
624
- );
625
- validationSchemaStorage.register(
626
- "CustomFieldContextDefaultValueForgeMultiGroupField",
627
- z
628
- .object({
629
- contextId: z.string(),
630
- groupIds: z.array(z.string()).superRefine((items, ctx) => {
631
- if (new Set(items).size !== items.length) {
632
- ctx.addIssue({
633
- code: z.ZodIssueCode.custom,
634
- path: [],
635
- message: "Array items must be unique",
636
- });
637
- }
638
- }),
639
- type: z.string(),
640
- })
641
- .strict()
642
- .describe("CustomFieldContextDefaultValueForgeMultiGroupField"),
643
- );
644
- validationSchemaStorage.register(
645
- "CustomFieldContextDefaultValueForgeMultiStringField",
646
- z
647
- .object({
648
- type: z.string(),
649
- values: z.array(z.string()).optional(),
650
- })
651
- .strict()
652
- .describe("CustomFieldContextDefaultValueForgeMultiStringField"),
653
- );
654
- validationSchemaStorage.register(
655
- "CustomFieldContextDefaultValueForgeMultiUserField",
656
- z
657
- .object({
658
- accountIds: z.array(z.string()),
659
- contextId: z.string(),
660
- type: z.string(),
661
- })
662
- .strict()
663
- .describe("CustomFieldContextDefaultValueForgeMultiUserField"),
664
- );
665
- validationSchemaStorage.register(
666
- "CustomFieldContextDefaultValueForgeNumberField",
667
- z
668
- .object({
669
- contextId: z.string(),
670
- number: z.number(),
671
- type: z.string(),
672
- })
673
- .strict()
674
- .describe("CustomFieldContextDefaultValueForgeNumberField"),
675
- );
676
- validationSchemaStorage.register(
677
- "CustomFieldContextDefaultValueForgeObjectField",
678
- z
679
- .object({
680
- object: z.object({}).catchall(z.unknown()).optional(),
681
- type: z.string(),
682
- })
683
- .strict()
684
- .describe("CustomFieldContextDefaultValueForgeObjectField"),
685
- );
686
- validationSchemaStorage.register(
687
- "CustomFieldContextDefaultValueForgeStringField",
688
- z
689
- .object({
690
- contextId: z.string(),
691
- text: z.string().optional(),
692
- type: z.string(),
693
- })
694
- .strict()
695
- .describe("CustomFieldContextDefaultValueForgeStringField"),
696
- );
697
- validationSchemaStorage.register(
698
- "CustomFieldContextDefaultValueForgeUserField",
699
- z
700
- .object({
701
- accountId: z.string(),
702
- contextId: z.string(),
703
- type: z.string(),
704
- userFilter: validationSchemaStorage.lazy("UserFilter"),
705
- })
706
- .strict()
707
- .describe("CustomFieldContextDefaultValueForgeUserField"),
708
- );
709
- validationSchemaStorage.register(
710
- "CustomFieldContextDefaultValueLabels",
711
- z
712
- .object({
713
- labels: z.array(z.string()),
714
- type: z.string(),
715
- })
716
- .strict()
717
- .describe("CustomFieldContextDefaultValueLabels"),
718
- );
719
- validationSchemaStorage.register(
720
- "CustomFieldContextDefaultValueMultipleGroupPicker",
721
- z
722
- .object({
723
- contextId: z.string(),
724
- groupIds: z.array(z.string()).superRefine((items, ctx) => {
725
- if (new Set(items).size !== items.length) {
726
- ctx.addIssue({
727
- code: z.ZodIssueCode.custom,
728
- path: [],
729
- message: "Array items must be unique",
730
- });
731
- }
732
- }),
733
- type: z.string(),
734
- })
735
- .strict()
736
- .describe("CustomFieldContextDefaultValueMultipleGroupPicker"),
737
- );
738
- validationSchemaStorage.register(
739
- "CustomFieldContextDefaultValueMultipleOption",
740
- z
741
- .object({
742
- contextId: z.string(),
743
- optionIds: z.array(z.string()),
744
- type: z.string(),
745
- })
746
- .strict()
747
- .describe("CustomFieldContextDefaultValueMultipleOption"),
748
- );
749
- validationSchemaStorage.register(
750
- "CustomFieldContextDefaultValueMultipleVersionPicker",
751
- z
752
- .object({
753
- type: z.string(),
754
- versionIds: z.array(z.string()).superRefine((items, ctx) => {
755
- if (new Set(items).size !== items.length) {
756
- ctx.addIssue({
757
- code: z.ZodIssueCode.custom,
758
- path: [],
759
- message: "Array items must be unique",
760
- });
761
- }
762
- }),
763
- versionOrder: z.string().optional(),
764
- })
765
- .strict()
766
- .describe("CustomFieldContextDefaultValueMultipleVersionPicker"),
767
- );
768
- validationSchemaStorage.register(
769
- "CustomFieldContextDefaultValueMultiUserPicker",
770
- z
771
- .object({
772
- accountIds: z.array(z.string()),
773
- contextId: z.string(),
774
- type: z.string(),
775
- })
776
- .strict()
777
- .describe("CustomFieldContextDefaultValueMultiUserPicker"),
778
- );
779
- validationSchemaStorage.register(
780
- "CustomFieldContextDefaultValueProject",
781
- z
782
- .object({
783
- contextId: z.string(),
784
- projectId: z.string(),
785
- type: z.string(),
786
- })
787
- .strict()
788
- .describe("CustomFieldContextDefaultValueProject"),
789
- );
790
- validationSchemaStorage.register(
791
- "CustomFieldContextDefaultValueReadOnly",
792
- z
793
- .object({
794
- text: z.string().optional(),
795
- type: z.string(),
796
- })
797
- .strict()
798
- .describe("CustomFieldContextDefaultValueReadOnly"),
799
- );
800
- validationSchemaStorage.register(
801
- "CustomFieldContextDefaultValueSingleGroupPicker",
802
- z
803
- .object({
804
- contextId: z.string(),
805
- groupId: z.string(),
806
- type: z.string(),
807
- })
808
- .strict()
809
- .describe("CustomFieldContextDefaultValueSingleGroupPicker"),
810
- );
811
- validationSchemaStorage.register(
812
- "CustomFieldContextDefaultValueSingleOption",
813
- z
814
- .object({
815
- contextId: z.string(),
816
- optionId: z.string(),
817
- type: z.string(),
818
- })
819
- .strict()
820
- .describe("CustomFieldContextDefaultValueSingleOption"),
821
- );
822
- validationSchemaStorage.register(
823
- "CustomFieldContextDefaultValueSingleVersionPicker",
824
- z
825
- .object({
826
- type: z.string(),
827
- versionId: z.string(),
828
- versionOrder: z.string().optional(),
829
- })
830
- .strict()
831
- .describe("CustomFieldContextDefaultValueSingleVersionPicker"),
832
- );
833
- validationSchemaStorage.register(
834
- "CustomFieldContextDefaultValueTextArea",
835
- z
836
- .object({
837
- text: z.string().optional(),
838
- type: z.string(),
839
- })
840
- .strict()
841
- .describe("CustomFieldContextDefaultValueTextArea"),
842
- );
843
- validationSchemaStorage.register(
844
- "CustomFieldContextDefaultValueTextField",
845
- z
846
- .object({
847
- text: z.string().optional(),
848
- type: z.string(),
849
- })
850
- .strict()
851
- .describe("CustomFieldContextDefaultValueTextField"),
852
- );
853
- validationSchemaStorage.register(
854
- "CustomFieldContextDefaultValueUpdate",
855
- z
856
- .object({
857
- defaultValues: z
858
- .array(validationSchemaStorage.lazy("CustomFieldContextDefaultValue"))
859
- .optional(),
860
- })
861
- .strict()
862
- .describe("CustomFieldContextDefaultValueUpdate"),
863
- );
864
- validationSchemaStorage.register(
865
- "CustomFieldContextDefaultValueUrl",
866
- z
867
- .object({
868
- contextId: z.string(),
869
- type: z.string(),
870
- url: z.string(),
871
- })
872
- .strict()
873
- .describe("CustomFieldContextDefaultValueUrl"),
874
- );
875
- validationSchemaStorage.register(
876
- "CustomFieldContextProjectMapping",
877
- z
878
- .object({
879
- contextId: z.string(),
880
- isGlobalContext: z.boolean().optional(),
881
- projectId: z.string().optional(),
882
- })
883
- .strict()
884
- .describe("CustomFieldContextProjectMapping"),
885
- );
886
- validationSchemaStorage.register(
887
- "CustomFieldContextSingleUserPickerDefaults",
888
- z
889
- .object({
890
- accountId: z.string(),
891
- contextId: z.string(),
892
- type: z.string(),
893
- userFilter: validationSchemaStorage.lazy("UserFilter"),
894
- })
895
- .strict()
896
- .describe("CustomFieldContextSingleUserPickerDefaults"),
897
- );
898
- validationSchemaStorage.register(
899
- "CustomFieldContextUpdateDetails",
900
- z
901
- .object({
902
- description: z.string().optional(),
903
- name: z.string().optional(),
904
- })
905
- .strict()
906
- .describe("CustomFieldContextUpdateDetails"),
907
- );
908
- validationSchemaStorage.register(
909
- "IssueTypeToContextMapping",
910
- z
911
- .object({
912
- contextId: z.string(),
913
- isAnyIssueType: z.boolean().optional(),
914
- issueTypeId: z.string().optional(),
915
- })
916
- .strict()
917
- .describe("IssueTypeToContextMapping"),
918
- );
919
- validationSchemaStorage.register(
920
- "PageBeanContextForProjectAndIssueType",
921
- z
922
- .object({
923
- isLast: z.boolean().optional(),
924
- maxResults: z.number().int().optional(),
925
- nextPage: z.string().optional(),
926
- self: z.string().optional(),
927
- startAt: z.number().int().optional(),
928
- total: z.number().int().optional(),
929
- values: z
930
- .array(validationSchemaStorage.lazy("ContextForProjectAndIssueType"))
931
- .optional(),
932
- })
933
- .strict()
934
- .describe("PageBeanContextForProjectAndIssueType"),
935
- );
936
- validationSchemaStorage.register(
937
- "PageBeanCustomFieldContext",
938
- z
939
- .object({
940
- isLast: z.boolean().optional(),
941
- maxResults: z.number().int().optional(),
942
- nextPage: z.string().optional(),
943
- self: z.string().optional(),
944
- startAt: z.number().int().optional(),
945
- total: z.number().int().optional(),
946
- values: z
947
- .array(validationSchemaStorage.lazy("CustomFieldContext"))
948
- .optional(),
949
- })
950
- .strict()
951
- .describe("PageBeanCustomFieldContext"),
952
- );
953
- validationSchemaStorage.register(
954
- "PageBeanCustomFieldContextDefaultValue",
955
- z
956
- .object({
957
- isLast: z.boolean().optional(),
958
- maxResults: z.number().int().optional(),
959
- nextPage: z.string().optional(),
960
- self: z.string().optional(),
961
- startAt: z.number().int().optional(),
962
- total: z.number().int().optional(),
963
- values: z
964
- .array(validationSchemaStorage.lazy("CustomFieldContextDefaultValue"))
965
- .optional(),
966
- })
967
- .strict()
968
- .describe("PageBeanCustomFieldContextDefaultValue"),
969
- );
970
- validationSchemaStorage.register(
971
- "PageBeanCustomFieldContextProjectMapping",
972
- z
973
- .object({
974
- isLast: z.boolean().optional(),
975
- maxResults: z.number().int().optional(),
976
- nextPage: z.string().optional(),
977
- self: z.string().optional(),
978
- startAt: z.number().int().optional(),
979
- total: z.number().int().optional(),
980
- values: z
981
- .array(
982
- validationSchemaStorage.lazy("CustomFieldContextProjectMapping"),
983
- )
984
- .optional(),
985
- })
986
- .strict()
987
- .describe("PageBeanCustomFieldContextProjectMapping"),
988
- );
989
- validationSchemaStorage.register(
990
- "PageBeanIssueTypeToContextMapping",
991
- z
992
- .object({
993
- isLast: z.boolean().optional(),
994
- maxResults: z.number().int().optional(),
995
- nextPage: z.string().optional(),
996
- self: z.string().optional(),
997
- startAt: z.number().int().optional(),
998
- total: z.number().int().optional(),
999
- values: z
1000
- .array(validationSchemaStorage.lazy("IssueTypeToContextMapping"))
1001
- .optional(),
1002
- })
1003
- .strict()
1004
- .describe("PageBeanIssueTypeToContextMapping"),
1005
- );
1006
- validationSchemaStorage.register(
1007
- "ProjectIds",
1008
- z
1009
- .object({
1010
- projectIds: z.array(z.string()),
1011
- })
1012
- .strict()
1013
- .describe("ProjectIds"),
1014
- );
1015
- validationSchemaStorage.register(
1016
- "ProjectIssueTypeMapping",
1017
- z
1018
- .object({
1019
- issueTypeId: z.string(),
1020
- projectId: z.string(),
1021
- })
1022
- .strict()
1023
- .describe("ProjectIssueTypeMapping"),
1024
- );
1025
- validationSchemaStorage.register(
1026
- "ProjectIssueTypeMappings",
1027
- z
1028
- .object({
1029
- mappings: z.array(
1030
- validationSchemaStorage.lazy("ProjectIssueTypeMapping"),
1031
- ),
1032
- })
1033
- .strict()
1034
- .describe("ProjectIssueTypeMappings"),
1035
- );
1036
- validationSchemaStorage.register(
1037
- "UserFilter",
1038
- z
1039
- .object({
1040
- enabled: z.boolean(),
1041
- groups: z
1042
- .array(z.string())
1043
- .superRefine((items, ctx) => {
1044
- if (new Set(items).size !== items.length) {
1045
- ctx.addIssue({
1046
- code: z.ZodIssueCode.custom,
1047
- path: [],
1048
- message: "Array items must be unique",
1049
- });
1050
- }
1051
- })
1052
- .optional(),
1053
- roleIds: z
1054
- .array(z.number().int())
1055
- .superRefine((items, ctx) => {
1056
- if (
1057
- new Set(items.map((item) => JSON.stringify(item))).size !==
1058
- items.length
1059
- ) {
1060
- ctx.addIssue({
1061
- code: z.ZodIssueCode.custom,
1062
- path: [],
1063
- message: "Array items must be unique",
1064
- });
1065
- }
1066
- })
1067
- .optional(),
1068
- })
1069
- .catchall(z.unknown())
1070
- .describe("UserFilter"),
1071
- );
1072
- }