@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,578 +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
- export type CustomContextVariable =
8
- | UserContextVariable
9
- | IssueContextVariable
10
- | JsonContextVariable;
11
- /**
12
- * The project that is available under the `project` variable when evaluating the
13
- * expression.
14
- */
15
- export interface IdOrKeyBean {
16
- /** The ID of the referenced item. */
17
- id?: number;
18
- /** The key of the referenced item. */
19
- key?: string;
20
- }
21
- /**
22
- * An
23
- * [issue](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue)
24
- * specified by ID or key. All the fields of the issue object are available in the
25
- * Jira expression.
26
- */
27
- export interface IssueContextVariable {
28
- /** Type of custom context variable. */
29
- type: string;
30
- /** The issue ID. */
31
- id?: number;
32
- /** The issue key. */
33
- key?: string;
34
- }
35
- /** The description of the page of issues loaded by the provided JQL query. */
36
- export interface IssuesJqlMetaDataBean {
37
- /** The number of issues that were loaded in this evaluation. */
38
- count: number;
39
- /** The maximum number of issues that could be loaded in this evaluation. */
40
- maxResults: number;
41
- /** The index of the first issue. */
42
- startAt: number;
43
- /** The total number of issues the JQL returned. */
44
- totalCount: number;
45
- /**
46
- * Any warnings related to the JQL query. Present only if the validation mode was
47
- * set to `warn`.
48
- */
49
- validationWarnings?: string[];
50
- }
51
- /** Meta data describing the `issues` context variable. */
52
- export interface IssuesMetaBean {
53
- /** The description of the page of issues loaded by the provided JQL query. */
54
- jql?: IssuesJqlMetaDataBean;
55
- }
56
- /**
57
- * The JQL specifying the issues available in the evaluated Jira expression under
58
- * the `issues` context variable.
59
- */
60
- export interface JexpIssues {
61
- /** The JQL query that specifies the set of issues available in the Jira expression. */
62
- jql?: JexpJqlIssues;
63
- }
64
- /**
65
- * The JQL specifying the issues available in the evaluated Jira expression under
66
- * the `issues` context variable. Not all issues returned by the JQL query are
67
- * loaded, only those described by the `startAt` and `maxResults` properties. To
68
- * determine whether it is necessary to iterate to ensure all the issues returned
69
- * by the JQL query are evaluated, inspect `meta.issues.jql.count` in the response.
70
- */
71
- export interface JexpJqlIssues {
72
- /**
73
- * The maximum number of issues to return from the JQL query. Inspect
74
- * `meta.issues.jql.maxResults` in the response to ensure the maximum value has
75
- * not been exceeded.
76
- */
77
- maxResults?: number;
78
- /** The JQL query. */
79
- query?: string;
80
- /** The index of the first issue to return from the JQL query. */
81
- startAt?: number;
82
- /** Determines how to validate the JQL query and treat the validation results. */
83
- validation?: "strict" | "warn" | "none";
84
- }
85
- /** Details about the analysed Jira expression. */
86
- export interface JiraExpressionAnalysis {
87
- /** Details about the complexity of the analysed Jira expression. */
88
- complexity?: JiraExpressionComplexity;
89
- /** A list of validation errors. Not included if the expression is valid. */
90
- errors?: JiraExpressionValidationError[];
91
- /** The analysed expression. */
92
- expression: string;
93
- /** EXPERIMENTAL. The inferred type of the expression. */
94
- type?: string;
95
- /**
96
- * Whether the expression is valid and the interpreter will evaluate it. Note that
97
- * the expression may fail at runtime (for example, if it executes too many
98
- * expensive operations).
99
- */
100
- valid: boolean;
101
- }
102
- /** Details about the complexity of the analysed Jira expression. */
103
- export interface JiraExpressionComplexity {
104
- /**
105
- * Information that can be used to determine how many [expensive
106
- * operations](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#expensive-operations)
107
- * the evaluation of the expression will perform. This information may be a
108
- * formula or number. For example:
109
- *
110
- * * `issues.map(i => i.comments)` performs as many expensive operations as
111
- * there are issues on the issues list. So this parameter returns `N`, where `N`
112
- * is the size of issue list.
113
- * * `new Issue(10010).comments` gets comments for one issue, so its complexity
114
- * is `2` (`1` to retrieve issue 10010 from the database plus `1` to get its
115
- * comments).
116
- */
117
- expensiveOperations: string;
118
- /**
119
- * Variables used in the formula, mapped to the parts of the expression they refer
120
- * to.
121
- */
122
- variables?: {
123
- /**
124
- * Variables used in the formula, mapped to the parts of the expression they refer
125
- * to.
126
- */
127
- [key: string]: string;
128
- };
129
- }
130
- /** The context in which the Jira expression is evaluated. */
131
- export interface JiraExpressionEvalContextBean {
132
- /**
133
- * The ID of the board that is available under the `board` variable when
134
- * evaluating the expression.
135
- */
136
- board?: number;
137
- /**
138
- * Custom context variables and their types. These variable types are available
139
- * for use in a custom context:
140
- *
141
- * * `user`: A
142
- * [user](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#user)
143
- * specified as an Atlassian account ID.
144
- * * `issue`: An
145
- * [issue](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#issue)
146
- * specified by ID or key. All the fields of the issue object are available in the
147
- * Jira expression.
148
- * * `json`: A JSON object containing custom content.
149
- * * `list`: A JSON list of `user`, `issue`, or `json` variable types.
150
- */
151
- custom?: CustomContextVariable[];
152
- /**
153
- * The ID of the customer request that is available under the `customerRequest`
154
- * variable when evaluating the expression. This is the same as the ID of the
155
- * underlying Jira issue, but the customer request context variable will have a
156
- * different type.
157
- */
158
- customerRequest?: number;
159
- /**
160
- * The issue that is available under the `issue` variable when evaluating the
161
- * expression.
162
- */
163
- issue?: IdOrKeyBean;
164
- /**
165
- * The collection of issues that is available under the `issues` variable when
166
- * evaluating the expression.
167
- */
168
- issues?: JexpIssues;
169
- /**
170
- * The project that is available under the `project` variable when evaluating the
171
- * expression.
172
- */
173
- project?: IdOrKeyBean;
174
- /**
175
- * The ID of the service desk that is available under the `serviceDesk` variable
176
- * when evaluating the expression.
177
- */
178
- serviceDesk?: number;
179
- /**
180
- * The ID of the sprint that is available under the `sprint` variable when
181
- * evaluating the expression.
182
- */
183
- sprint?: number;
184
- }
185
- export interface JiraExpressionEvalRequestBean {
186
- /** The context in which the Jira expression is evaluated. */
187
- context?: JiraExpressionEvalContextBean;
188
- /**
189
- * The Jira expression to evaluate.
190
- *
191
- * @example { key: issue.key, type: issue.issueType.name, links: issue.links.map(link =>
192
- * link.linkedIssue.id) }
193
- */
194
- expression: string;
195
- }
196
- /** Contains various characteristics of the performed expression evaluation. */
197
- export interface JiraExpressionEvaluationMetaDataBean {
198
- /**
199
- * Contains information about the expression complexity. For example, the number
200
- * of steps it took to evaluate the expression.
201
- */
202
- complexity?: JiraExpressionsComplexityBean;
203
- /**
204
- * Contains information about the `issues` variable in the context. For example,
205
- * is the issues were loaded with JQL, information about the page will be included
206
- * here.
207
- */
208
- issues?: IssuesMetaBean;
209
- }
210
- /** Details of Jira expressions for analysis. */
211
- export interface JiraExpressionForAnalysis {
212
- /**
213
- * Context variables and their types. The type checker assumes that [common
214
- * context
215
- * variables](https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#context-variables),
216
- * such as `issue` or `project`, are available in context and sets their type. Use
217
- * this property to override the default types or provide details of new variables.
218
- */
219
- contextVariables?: {
220
- /**
221
- * Context variables and their types. The type checker assumes that
222
- * https://developer.atlassian.com/cloud/jira/platform/jira-expressions/#context-variables
223
- * common context variables, such as <code>issue</code> or <code>project</code>,
224
- * are available in context and sets their type. Use this property to override the
225
- * default types or provide details of new variables.
226
- */
227
- [key: string]: string;
228
- };
229
- /**
230
- * The list of Jira expressions to analyse.
231
- *
232
- * @example issues.map(issue => issue.properties['property_key'])
233
- */
234
- expressions: string[];
235
- }
236
- /** The result of evaluating a Jira expression. */
237
- export interface JiraExpressionResult {
238
- /** Contains various characteristics of the performed expression evaluation. */
239
- meta?: JiraExpressionEvaluationMetaDataBean;
240
- /**
241
- * The value of the evaluated expression. It may be a primitive JSON value or a
242
- * Jira REST API object. (Some expressions do not produce any meaningful
243
- * results—for example, an expression that returns a lambda function—if that's the
244
- * case a simple string representation is returned. These string representations
245
- * should not be relied upon and may change without notice.)
246
- */
247
- value: unknown;
248
- }
249
- /** Details about the analysed Jira expression. */
250
- export interface JiraExpressionsAnalysis {
251
- /** The results of Jira expressions analysis. */
252
- results: JiraExpressionAnalysis[];
253
- }
254
- /**
255
- * Contains information about the expression complexity. For example, the number
256
- * of steps it took to evaluate the expression.
257
- */
258
- export interface JiraExpressionsComplexityBean {
259
- /** The number of Jira REST API beans returned in the response. */
260
- beans: JiraExpressionsComplexityValueBean;
261
- /**
262
- * The number of expensive operations executed while evaluating the expression.
263
- * Expensive operations are those that load additional data, such as entity
264
- * properties, comments, or custom fields.
265
- */
266
- expensiveOperations: JiraExpressionsComplexityValueBean;
267
- /** The number of primitive values returned in the response. */
268
- primitiveValues: JiraExpressionsComplexityValueBean;
269
- /**
270
- * The number of steps it took to evaluate the expression, where a step is a
271
- * high-level operation performed by the expression. A step is an operation such
272
- * as arithmetic, accessing a property, accessing a context variable, or calling a
273
- * function.
274
- */
275
- steps: JiraExpressionsComplexityValueBean;
276
- }
277
- /**
278
- * The number of steps it took to evaluate the expression, where a step is a
279
- * high-level operation performed by the expression. A step is an operation such
280
- * as arithmetic, accessing a property, accessing a context variable, or calling a
281
- * function.
282
- */
283
- export interface JiraExpressionsComplexityValueBean {
284
- /**
285
- * The maximum allowed complexity. The evaluation will fail if this value is
286
- * exceeded.
287
- */
288
- limit: number;
289
- /** The complexity value of the current expression. */
290
- value: number;
291
- }
292
- /**
293
- * Details about syntax and type errors. The error details apply to the entire
294
- * expression, unless the object includes:
295
- *
296
- * * `line` and `column`
297
- * * `expression`
298
- */
299
- export interface JiraExpressionValidationError {
300
- /** The text column in which the error occurred. */
301
- column?: number;
302
- /** The part of the expression in which the error occurred. */
303
- expression?: string;
304
- /** The text line in which the error occurred. */
305
- line?: number;
306
- /**
307
- * Details about the error.
308
- *
309
- * @example !, -, typeof, (, IDENTIFIER, null, true, false, NUMBER, STRING,
310
- * TEMPLATE_LITERAL, new, [ or { expected, > encountered.
311
- */
312
- message: string;
313
- /** The error type. */
314
- type: "syntax" | "type" | "other";
315
- }
316
- /** A JSON object with custom content. */
317
- export interface JsonContextVariable {
318
- /** Type of custom context variable. */
319
- type: string;
320
- /** A JSON object containing custom content. */
321
- value?: {
322
- [key: string]: unknown;
323
- };
324
- }
325
- /**
326
- * A
327
- * [user](https://developer.atlassian.com/cloud/jira/platform/jira-expressions-type-reference#user)
328
- * specified as an Atlassian account ID.
329
- */
330
- export interface UserContextVariable {
331
- /** Type of custom context variable. */
332
- type: string;
333
- /** The account ID of the user. */
334
- accountId: string;
335
- }
336
- export function registerJiraExpressionsValidationSchemas(
337
- validationSchemaStorage: CommonValidationSchemaStorage<ZodTypeAny>,
338
- ) {
339
- validationSchemaStorage.register(
340
- "CustomContextVariable",
341
- z
342
- .union([
343
- validationSchemaStorage.lazy("UserContextVariable"),
344
- validationSchemaStorage.lazy("IssueContextVariable"),
345
- validationSchemaStorage.lazy("JsonContextVariable"),
346
- ])
347
- .describe("CustomContextVariable"),
348
- );
349
- validationSchemaStorage.register(
350
- "IdOrKeyBean",
351
- z
352
- .object({
353
- id: z.number().int().optional(),
354
- key: z.string().optional(),
355
- })
356
- .strict()
357
- .describe("IdOrKeyBean"),
358
- );
359
- validationSchemaStorage.register(
360
- "IssueContextVariable",
361
- z
362
- .object({
363
- type: z.string(),
364
- id: z.number().int().optional(),
365
- key: z.string().optional(),
366
- })
367
- .strict()
368
- .describe("IssueContextVariable"),
369
- );
370
- validationSchemaStorage.register(
371
- "IssuesJqlMetaDataBean",
372
- z
373
- .object({
374
- count: z.number().int(),
375
- maxResults: z.number().int(),
376
- startAt: z.number().int(),
377
- totalCount: z.number().int(),
378
- validationWarnings: z.array(z.string()).optional(),
379
- })
380
- .strict()
381
- .describe("IssuesJqlMetaDataBean"),
382
- );
383
- validationSchemaStorage.register(
384
- "IssuesMetaBean",
385
- z
386
- .object({
387
- jql: validationSchemaStorage.lazy("IssuesJqlMetaDataBean").optional(),
388
- })
389
- .strict()
390
- .describe("IssuesMetaBean"),
391
- );
392
- validationSchemaStorage.register(
393
- "JexpIssues",
394
- z
395
- .object({
396
- jql: validationSchemaStorage.lazy("JexpJqlIssues").optional(),
397
- })
398
- .strict()
399
- .describe("JexpIssues"),
400
- );
401
- validationSchemaStorage.register(
402
- "JexpJqlIssues",
403
- z
404
- .object({
405
- maxResults: z.number().int().optional(),
406
- query: z.string().optional(),
407
- startAt: z.number().int().optional(),
408
- validation: z.enum(["strict", "warn", "none"]).optional(),
409
- })
410
- .strict()
411
- .describe("JexpJqlIssues"),
412
- );
413
- validationSchemaStorage.register(
414
- "JiraExpressionAnalysis",
415
- z
416
- .object({
417
- complexity: validationSchemaStorage
418
- .lazy("JiraExpressionComplexity")
419
- .optional(),
420
- errors: z
421
- .array(validationSchemaStorage.lazy("JiraExpressionValidationError"))
422
- .optional(),
423
- expression: z.string(),
424
- type: z.string().optional(),
425
- valid: z.boolean(),
426
- })
427
- .strict()
428
- .describe("JiraExpressionAnalysis"),
429
- );
430
- validationSchemaStorage.register(
431
- "JiraExpressionComplexity",
432
- z
433
- .object({
434
- expensiveOperations: z.string(),
435
- variables: z.object({}).catchall(z.string()).optional(),
436
- })
437
- .strict()
438
- .describe("JiraExpressionComplexity"),
439
- );
440
- validationSchemaStorage.register(
441
- "JiraExpressionEvalContextBean",
442
- z
443
- .object({
444
- board: z.number().int().optional(),
445
- custom: z
446
- .array(validationSchemaStorage.lazy("CustomContextVariable"))
447
- .optional(),
448
- customerRequest: z.number().int().optional(),
449
- issue: validationSchemaStorage.lazy("IdOrKeyBean").optional(),
450
- issues: validationSchemaStorage.lazy("JexpIssues").optional(),
451
- project: validationSchemaStorage.lazy("IdOrKeyBean").optional(),
452
- serviceDesk: z.number().int().optional(),
453
- sprint: z.number().int().optional(),
454
- })
455
- .strict()
456
- .describe("JiraExpressionEvalContextBean"),
457
- );
458
- validationSchemaStorage.register(
459
- "JiraExpressionEvalRequestBean",
460
- z
461
- .object({
462
- context: validationSchemaStorage
463
- .lazy("JiraExpressionEvalContextBean")
464
- .optional(),
465
- expression: z.string(),
466
- })
467
- .strict()
468
- .describe("JiraExpressionEvalRequestBean"),
469
- );
470
- validationSchemaStorage.register(
471
- "JiraExpressionEvaluationMetaDataBean",
472
- z
473
- .object({
474
- complexity: validationSchemaStorage
475
- .lazy("JiraExpressionsComplexityBean")
476
- .optional(),
477
- issues: validationSchemaStorage.lazy("IssuesMetaBean").optional(),
478
- })
479
- .strict()
480
- .describe("JiraExpressionEvaluationMetaDataBean"),
481
- );
482
- validationSchemaStorage.register(
483
- "JiraExpressionForAnalysis",
484
- z
485
- .object({
486
- contextVariables: z.object({}).catchall(z.string()).optional(),
487
- expressions: z.array(z.string()),
488
- })
489
- .strict()
490
- .describe("JiraExpressionForAnalysis"),
491
- );
492
- validationSchemaStorage.register(
493
- "JiraExpressionResult",
494
- z
495
- .object({
496
- meta: validationSchemaStorage
497
- .lazy("JiraExpressionEvaluationMetaDataBean")
498
- .optional(),
499
- value: z.unknown(),
500
- })
501
- .strict()
502
- .describe("JiraExpressionResult"),
503
- );
504
- validationSchemaStorage.register(
505
- "JiraExpressionsAnalysis",
506
- z
507
- .object({
508
- results: z.array(
509
- validationSchemaStorage.lazy("JiraExpressionAnalysis"),
510
- ),
511
- })
512
- .strict()
513
- .describe("JiraExpressionsAnalysis"),
514
- );
515
- validationSchemaStorage.register(
516
- "JiraExpressionsComplexityBean",
517
- z
518
- .object({
519
- beans: validationSchemaStorage.lazy(
520
- "JiraExpressionsComplexityValueBean",
521
- ),
522
- expensiveOperations: validationSchemaStorage.lazy(
523
- "JiraExpressionsComplexityValueBean",
524
- ),
525
- primitiveValues: validationSchemaStorage.lazy(
526
- "JiraExpressionsComplexityValueBean",
527
- ),
528
- steps: validationSchemaStorage.lazy(
529
- "JiraExpressionsComplexityValueBean",
530
- ),
531
- })
532
- .strict()
533
- .describe("JiraExpressionsComplexityBean"),
534
- );
535
- validationSchemaStorage.register(
536
- "JiraExpressionsComplexityValueBean",
537
- z
538
- .object({
539
- limit: z.number().int(),
540
- value: z.number().int(),
541
- })
542
- .strict()
543
- .describe("JiraExpressionsComplexityValueBean"),
544
- );
545
- validationSchemaStorage.register(
546
- "JiraExpressionValidationError",
547
- z
548
- .object({
549
- column: z.number().int().optional(),
550
- expression: z.string().optional(),
551
- line: z.number().int().optional(),
552
- message: z.string(),
553
- type: z.enum(["syntax", "type", "other"]),
554
- })
555
- .strict()
556
- .describe("JiraExpressionValidationError"),
557
- );
558
- validationSchemaStorage.register(
559
- "JsonContextVariable",
560
- z
561
- .object({
562
- type: z.string(),
563
- value: z.object({}).catchall(z.unknown()).optional(),
564
- })
565
- .strict()
566
- .describe("JsonContextVariable"),
567
- );
568
- validationSchemaStorage.register(
569
- "UserContextVariable",
570
- z
571
- .object({
572
- type: z.string(),
573
- accountId: z.string(),
574
- })
575
- .strict()
576
- .describe("UserContextVariable"),
577
- );
578
- }
@@ -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
- import {
8
- registerCommonValidationSchemas,
9
- type TimeTrackingConfiguration,
10
- } from "./common";
11
- /** Details of an application property. */
12
- export interface ApplicationProperty {
13
- /** The allowed values, if applicable. */
14
- allowedValues?: string[];
15
- /** The default value of the application property. */
16
- defaultValue?: string;
17
- /** The description of the application property. */
18
- desc?: string;
19
- example?: string;
20
- /** The ID of the application property. The ID and key are the same. */
21
- id?: string;
22
- /** The key of the application property. The ID and key are the same. */
23
- key?: string;
24
- /** The name of the application property. */
25
- name?: string;
26
- /** The data type of the application property. */
27
- type?: string;
28
- /** The new value. */
29
- value?: string;
30
- }
31
- /** Details about the configuration of Jira. */
32
- export interface Configuration {
33
- /** Whether the ability to add attachments to issues is enabled. */
34
- attachmentsEnabled?: boolean;
35
- /** Whether the ability to link issues is enabled. */
36
- issueLinkingEnabled?: boolean;
37
- /** Whether the ability to create subtasks for issues is enabled. */
38
- subTasksEnabled?: boolean;
39
- /** The configuration of time tracking. */
40
- timeTrackingConfiguration?: TimeTrackingConfiguration;
41
- /**
42
- * Whether the ability to track time is enabled. This property is deprecated.
43
- *
44
- * @deprecated
45
- */
46
- timeTrackingEnabled?: boolean;
47
- /**
48
- * Whether the ability to create unassigned issues is enabled. See [Configuring
49
- * Jira application options](https://confluence.atlassian.com/x/uYXKM) for details.
50
- */
51
- unassignedIssuesAllowed?: boolean;
52
- /**
53
- * Whether the ability for users to vote on issues is enabled. See [Configuring
54
- * Jira application options](https://confluence.atlassian.com/x/uYXKM) for details.
55
- */
56
- votingEnabled?: boolean;
57
- /**
58
- * Whether the ability for users to watch issues is enabled. See [Configuring Jira
59
- * application options](https://confluence.atlassian.com/x/uYXKM) for details.
60
- */
61
- watchingEnabled?: boolean;
62
- }
63
- export interface SimpleApplicationPropertyBean {
64
- /** The ID of the application property. */
65
- id?: string;
66
- /** The new value. */
67
- value?: string;
68
- }
69
- export function registerJiraSettingsValidationSchemas(
70
- validationSchemaStorage: CommonValidationSchemaStorage<ZodTypeAny>,
71
- ) {
72
- validationSchemaStorage.register(
73
- "ApplicationProperty",
74
- z
75
- .object({
76
- allowedValues: z.array(z.string()).optional(),
77
- defaultValue: z.string().optional(),
78
- desc: z.string().optional(),
79
- example: z.string().optional(),
80
- id: z.string().optional(),
81
- key: z.string().optional(),
82
- name: z.string().optional(),
83
- type: z.string().optional(),
84
- value: z.string().optional(),
85
- })
86
- .strict()
87
- .describe("ApplicationProperty"),
88
- );
89
- validationSchemaStorage.register(
90
- "Configuration",
91
- z
92
- .object({
93
- attachmentsEnabled: z.boolean().optional(),
94
- issueLinkingEnabled: z.boolean().optional(),
95
- subTasksEnabled: z.boolean().optional(),
96
- timeTrackingConfiguration: validationSchemaStorage
97
- .lazy("TimeTrackingConfiguration")
98
- .optional(),
99
- timeTrackingEnabled: z.boolean().optional(),
100
- unassignedIssuesAllowed: z.boolean().optional(),
101
- votingEnabled: z.boolean().optional(),
102
- watchingEnabled: z.boolean().optional(),
103
- })
104
- .strict()
105
- .describe("Configuration"),
106
- );
107
- validationSchemaStorage.register(
108
- "SimpleApplicationPropertyBean",
109
- z
110
- .object({
111
- id: z.string().optional(),
112
- value: z.string().optional(),
113
- })
114
- .strict()
115
- .describe("SimpleApplicationPropertyBean"),
116
- );
117
- validationSchemaStorage.registerOnce([registerCommonValidationSchemas]);
118
- }