@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,367 +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 IssueBean,
9
- type JsonTypeBean,
10
- registerCommonValidationSchemas,
11
- } from "./common";
12
- export interface IdSearchRequestBean {
13
- /**
14
- * A [JQL](https://confluence.atlassian.com/x/egORLQ) expression. Order by clauses
15
- * are not allowed.
16
- */
17
- jql?: string;
18
- /** The maximum number of items to return per page. */
19
- maxResults?: number;
20
- /**
21
- * The continuation token to fetch the next page. This token is provided by the
22
- * response of this endpoint.
23
- */
24
- nextPageToken?: string;
25
- }
26
- /**
27
- * Result of your JQL search. Returns a list of issue IDs and a token to fetch the
28
- * next page if one exists.
29
- */
30
- export interface IdSearchResults {
31
- /** The list of issue IDs found by the search. */
32
- issueIds?: number[];
33
- /**
34
- * Continuation token to fetch the next page. If this result represents the last
35
- * or the only page this token will be null.
36
- */
37
- nextPageToken?: string;
38
- }
39
- /**
40
- * A list of matched issues or errors for each JQL query, in the order the JQL
41
- * queries were passed.
42
- */
43
- export interface IssueMatches {
44
- matches: IssueMatchesForJql[];
45
- }
46
- /**
47
- * A list of the issues matched to a JQL query or details of errors encountered
48
- * during matching.
49
- */
50
- export interface IssueMatchesForJql {
51
- /** A list of errors. */
52
- errors: string[];
53
- /** A list of issue IDs. */
54
- matchedIssues: number[];
55
- }
56
- /** A list of issues suggested for use in auto-completion. */
57
- export interface IssuePickerSuggestions {
58
- /** A list of issues for an issue type suggested for use in auto-completion. */
59
- sections?: IssuePickerSuggestionsIssueType[];
60
- }
61
- /** A type of issue suggested for use in auto-completion. */
62
- export interface IssuePickerSuggestionsIssueType {
63
- /** The ID of the type of issues suggested for use in auto-completion. */
64
- id?: string;
65
- /** A list of issues suggested for use in auto-completion. */
66
- issues?: SuggestedIssue[];
67
- /** The label of the type of issues suggested for use in auto-completion. */
68
- label?: string;
69
- /**
70
- * If no issue suggestions are found, returns a message indicating no suggestions
71
- * were found,
72
- */
73
- msg?: string;
74
- /**
75
- * If issue suggestions are found, returns a message indicating the number of
76
- * issues suggestions found and returned.
77
- */
78
- sub?: string;
79
- }
80
- /** List of issues and JQL queries. */
81
- export interface IssuesAndJqlQueries {
82
- /** A list of issue IDs. */
83
- issueIds: number[];
84
- /** A list of JQL queries. */
85
- jqls: string[];
86
- }
87
- export interface SearchRequestBean {
88
- /**
89
- * Use [expand](em>#expansion) to include additional information about issues in
90
- * the response. Note that, unlike the majority of instances where `expand` is
91
- * specified, `expand` is defined as a list of values. The expand options are:
92
- *
93
- * * `renderedFields` Returns field values rendered in HTML format.
94
- * * `names` Returns the display name of each field.
95
- * * `schema` Returns the schema describing a field type.
96
- * * `transitions` Returns all possible transitions for the issue.
97
- * * `operations` Returns all possible operations for the issue.
98
- * * `editmeta` Returns information about how each field can be edited.
99
- * * `changelog` Returns a list of recent updates to an issue, sorted by date,
100
- * starting from the most recent.
101
- * * `versionedRepresentations` Instead of `fields`, returns
102
- * `versionedRepresentations` a JSON array containing each version of a field's
103
- * value, with the highest numbered item representing the most recent version.
104
- */
105
- expand?: string[];
106
- /**
107
- * A list of fields to return for each issue, use it to retrieve a subset of
108
- * fields. This parameter accepts a comma-separated list. Expand options include:
109
- *
110
- * * `*all` Returns all fields.
111
- * * `*navigable` Returns navigable fields.
112
- * * Any issue field, prefixed with a minus to exclude.
113
- *
114
- * The default is `*navigable`.
115
- *
116
- * Examples:
117
- *
118
- * * `summary,comment` Returns the summary and comments fields only.
119
- * * `-description` Returns all navigable (default) fields except description.
120
- * * `*all,-comment` Returns all fields except comments.
121
- *
122
- * Multiple `fields` parameters can be included in a request.
123
- *
124
- * Note: All navigable fields are returned by default. This differs from [GET
125
- * issue](#api-rest-api-3-issue-issueIdOrKey-get) where the default is all fields.
126
- */
127
- fields?: string[];
128
- /** Reference fields by their key (rather than ID). The default is `false`. */
129
- fieldsByKeys?: boolean;
130
- /** A [JQL](https://confluence.atlassian.com/x/egORLQ) expression. */
131
- jql?: string;
132
- /** The maximum number of items to return per page. */
133
- maxResults?: number;
134
- /**
135
- * A list of up to 5 issue properties to include in the results. This parameter
136
- * accepts a comma-separated list.
137
- */
138
- properties?: string[];
139
- /**
140
- * The index of the first item to return in the page of results (page offset). The
141
- * base index is `0`.
142
- */
143
- startAt?: number;
144
- /**
145
- * Determines how to validate the JQL query and treat the validation results.
146
- * Supported values:
147
- *
148
- * * `strict` Returns a 400 response code if any errors are found, along with a
149
- * list of all errors (and warnings).
150
- * * `warn` Returns all errors as warnings.
151
- * * `none` No validation is performed.
152
- * * `true` *Deprecated* A legacy synonym for `strict`.
153
- * * `false` *Deprecated* A legacy synonym for `warn`.
154
- *
155
- * The default is `strict`.
156
- *
157
- * Note: If the JQL is not correctly formed a 400 response code is returned,
158
- * regardless of the `validateQuery` value.
159
- */
160
- validateQuery?: "strict" | "warn" | "none" | "true" | "false";
161
- }
162
- /** The result of a JQL search. */
163
- export interface SearchResults {
164
- /** Expand options that include additional search result details in the response. */
165
- expand?: string;
166
- /** The list of issues found by the search. */
167
- issues?: IssueBean[];
168
- /** The maximum number of results that could be on the page. */
169
- maxResults?: number;
170
- /** The ID and name of each field in the search results. */
171
- names?: {
172
- [key: string]: string;
173
- };
174
- /** The schema describing the field types in the search results. */
175
- schema?: {
176
- /** The schema of a field. */
177
- [key: string]: JsonTypeBean;
178
- };
179
- /** The index of the first item returned on the page. */
180
- startAt?: number;
181
- /** The number of results on the page. */
182
- total?: number;
183
- /** Any warnings related to the JQL query. */
184
- warningMessages?: string[];
185
- }
186
- /** An issue suggested for use in the issue picker auto-completion. */
187
- export interface SuggestedIssue {
188
- /** The ID of the issue. */
189
- id?: number;
190
- /** The URL of the issue type's avatar. */
191
- img?: string;
192
- /** The key of the issue. */
193
- key?: string;
194
- /** The key of the issue in HTML format. */
195
- keyHtml?: string;
196
- /**
197
- * The phrase containing the query string in HTML format, with the string
198
- * highlighted with HTML bold tags.
199
- */
200
- summary?: string;
201
- /** The phrase containing the query string, as plain text. */
202
- summaryText?: string;
203
- }
204
- export function registerIssueSearchValidationSchemas(
205
- validationSchemaStorage: CommonValidationSchemaStorage<ZodTypeAny>,
206
- ) {
207
- validationSchemaStorage.register(
208
- "IdSearchRequestBean",
209
- z
210
- .object({
211
- jql: z.string().optional(),
212
- maxResults: z.number().int().optional(),
213
- nextPageToken: z.string().optional(),
214
- })
215
- .strict()
216
- .describe("IdSearchRequestBean"),
217
- );
218
- validationSchemaStorage.register(
219
- "IdSearchResults",
220
- z
221
- .object({
222
- issueIds: z.array(z.number().int()).optional(),
223
- nextPageToken: z.string().optional(),
224
- })
225
- .strict()
226
- .describe("IdSearchResults"),
227
- );
228
- validationSchemaStorage.register(
229
- "IssueMatches",
230
- z
231
- .object({
232
- matches: z.array(validationSchemaStorage.lazy("IssueMatchesForJql")),
233
- })
234
- .strict()
235
- .describe("IssueMatches"),
236
- );
237
- validationSchemaStorage.register(
238
- "IssueMatchesForJql",
239
- z
240
- .object({
241
- errors: z.array(z.string()).superRefine((items, ctx) => {
242
- if (new Set(items).size !== items.length) {
243
- ctx.addIssue({
244
- code: z.ZodIssueCode.custom,
245
- path: [],
246
- message: "Array items must be unique",
247
- });
248
- }
249
- }),
250
- matchedIssues: z.array(z.number().int()).superRefine((items, ctx) => {
251
- if (
252
- new Set(items.map((item) => JSON.stringify(item))).size !==
253
- items.length
254
- ) {
255
- ctx.addIssue({
256
- code: z.ZodIssueCode.custom,
257
- path: [],
258
- message: "Array items must be unique",
259
- });
260
- }
261
- }),
262
- })
263
- .strict()
264
- .describe("IssueMatchesForJql"),
265
- );
266
- validationSchemaStorage.register(
267
- "IssuePickerSuggestions",
268
- z
269
- .object({
270
- sections: z
271
- .array(
272
- validationSchemaStorage.lazy("IssuePickerSuggestionsIssueType"),
273
- )
274
- .optional(),
275
- })
276
- .strict()
277
- .describe("IssuePickerSuggestions"),
278
- );
279
- validationSchemaStorage.register(
280
- "IssuePickerSuggestionsIssueType",
281
- z
282
- .object({
283
- id: z.string().optional(),
284
- issues: z
285
- .array(validationSchemaStorage.lazy("SuggestedIssue"))
286
- .optional(),
287
- label: z.string().optional(),
288
- msg: z.string().optional(),
289
- sub: z.string().optional(),
290
- })
291
- .strict()
292
- .describe("IssuePickerSuggestionsIssueType"),
293
- );
294
- validationSchemaStorage.register(
295
- "IssuesAndJqlQueries",
296
- z
297
- .object({
298
- issueIds: z.array(z.number().int()).superRefine((items, ctx) => {
299
- if (
300
- new Set(items.map((item) => JSON.stringify(item))).size !==
301
- items.length
302
- ) {
303
- ctx.addIssue({
304
- code: z.ZodIssueCode.custom,
305
- path: [],
306
- message: "Array items must be unique",
307
- });
308
- }
309
- }),
310
- jqls: z.array(z.string()),
311
- })
312
- .strict()
313
- .describe("IssuesAndJqlQueries"),
314
- );
315
- validationSchemaStorage.register(
316
- "SearchRequestBean",
317
- z
318
- .object({
319
- expand: z.array(z.string()).optional(),
320
- fields: z.array(z.string()).optional(),
321
- fieldsByKeys: z.boolean().optional(),
322
- jql: z.string().optional(),
323
- maxResults: z.number().int().optional(),
324
- properties: z.array(z.string()).optional(),
325
- startAt: z.number().int().optional(),
326
- validateQuery: z
327
- .enum(["strict", "warn", "none", "true", "false"])
328
- .optional(),
329
- })
330
- .strict()
331
- .describe("SearchRequestBean"),
332
- );
333
- validationSchemaStorage.register(
334
- "SearchResults",
335
- z
336
- .object({
337
- expand: z.string().optional(),
338
- issues: z.array(validationSchemaStorage.lazy("IssueBean")).optional(),
339
- maxResults: z.number().int().optional(),
340
- names: z.object({}).catchall(z.string()).optional(),
341
- schema: z
342
- .object({})
343
- .catchall(validationSchemaStorage.lazy("JsonTypeBean"))
344
- .optional(),
345
- startAt: z.number().int().optional(),
346
- total: z.number().int().optional(),
347
- warningMessages: z.array(z.string()).optional(),
348
- })
349
- .strict()
350
- .describe("SearchResults"),
351
- );
352
- validationSchemaStorage.register(
353
- "SuggestedIssue",
354
- z
355
- .object({
356
- id: z.number().int().optional(),
357
- img: z.string().optional(),
358
- key: z.string().optional(),
359
- keyHtml: z.string().optional(),
360
- summary: z.string().optional(),
361
- summaryText: z.string().optional(),
362
- })
363
- .strict()
364
- .describe("SuggestedIssue"),
365
- );
366
- validationSchemaStorage.registerOnce([registerCommonValidationSchemas]);
367
- }
@@ -1,76 +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 PermissionHolder,
9
- registerCommonValidationSchemas,
10
- } from "./common";
11
- /** Issue security level member. */
12
- export interface IssueSecurityLevelMember {
13
- /**
14
- * The user or group being granted the permission. It consists of a `type` and a
15
- * type-dependent `parameter`. See [Holder
16
- * object](../api-group-permission-schemes/#holder-object) in *Get all permission
17
- * schemes* for more information.
18
- */
19
- holder: PermissionHolder;
20
- /** The ID of the issue security level member. */
21
- id: number;
22
- /** The ID of the issue security level. */
23
- issueSecurityLevelId: number;
24
- managed?: boolean;
25
- }
26
- /** A page of items. */
27
- export interface PageBeanIssueSecurityLevelMember {
28
- /** Whether this is the last page. */
29
- isLast?: boolean;
30
- /** The maximum number of items that could be returned. */
31
- maxResults?: number;
32
- /** If there is another page of results, the URL of the next page. */
33
- nextPage?: string;
34
- /** The URL of the page. */
35
- self?: string;
36
- /** The index of the first item returned. */
37
- startAt?: number;
38
- /** The number of items returned. */
39
- total?: number;
40
- /** The list of items. */
41
- values?: IssueSecurityLevelMember[];
42
- }
43
- export function registerIssueSecurityLevelValidationSchemas(
44
- validationSchemaStorage: CommonValidationSchemaStorage<ZodTypeAny>,
45
- ) {
46
- validationSchemaStorage.register(
47
- "IssueSecurityLevelMember",
48
- z
49
- .object({
50
- holder: validationSchemaStorage.lazy("PermissionHolder"),
51
- id: z.number().int(),
52
- issueSecurityLevelId: z.number().int(),
53
- managed: z.boolean().optional(),
54
- })
55
- .strict()
56
- .describe("IssueSecurityLevelMember"),
57
- );
58
- validationSchemaStorage.register(
59
- "PageBeanIssueSecurityLevelMember",
60
- z
61
- .object({
62
- isLast: z.boolean().optional(),
63
- maxResults: z.number().int().optional(),
64
- nextPage: z.string().optional(),
65
- self: z.string().optional(),
66
- startAt: z.number().int().optional(),
67
- total: z.number().int().optional(),
68
- values: z
69
- .array(validationSchemaStorage.lazy("IssueSecurityLevelMember"))
70
- .optional(),
71
- })
72
- .strict()
73
- .describe("PageBeanIssueSecurityLevelMember"),
74
- );
75
- validationSchemaStorage.registerOnce([registerCommonValidationSchemas]);
76
- }