@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,1108 +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 } from "zod";
5
-
6
- import * as commonHttpClient from "../core/common-http-client";
7
- import { CommonHttpService } from "../core/common-http-service";
8
- import {
9
- type ColumnItem,
10
- type GroupName,
11
- type PageBeanUser,
12
- registerCommonValidationSchemas,
13
- type User,
14
- } from "../models/common";
15
- import {
16
- type NewUserDetails,
17
- registerUsersValidationSchemas,
18
- type UnrestrictedUserEmail,
19
- type UserColumnRequestBody,
20
- type UserMigrationBean,
21
- } from "../models/users";
22
- import { validationSchemaStorage } from "../validation-schema-storage";
23
- /**
24
- * This resource represent users. Use it to:
25
- *
26
- * * get, get a list of, create, and delete users.
27
- * * get, set, and reset a user's default issue table columns.
28
- * * get a list of the groups the user belongs to.
29
- * * get a list of user account IDs for a list of usernames or user keys.
30
- */
31
- export class UsersService extends CommonHttpService {
32
- /**
33
- * Returns a [paginated](#pagination) list of the users specified by one or more
34
- * account IDs.
35
- *
36
- * **[Permissions](#permissions) required:** Permission to access Jira.
37
- *
38
- * @returns Returned if the request is successful.
39
- *
40
- * example: {
41
- * "isLast": true,
42
- * "maxResults": 100,
43
- * "startAt": 0,
44
- * "total": 1,
45
- * "values": [
46
- * {
47
- * "accountId": "5b10a2844c20165700ede21g",
48
- * "accountType": "atlassian",
49
- * "active": true,
50
- * "avatarUrls": {
51
- * "16x16":
52
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
53
- * "24x24":
54
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
55
- * "32x32":
56
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
57
- * "48x48":
58
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
59
- * },
60
- * "displayName": "Mia Krystof",
61
- * "emailAddress": "mia@example.com",
62
- * "self":
63
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g",
64
- * "timeZone": "Australia/Sydney"
65
- * }
66
- * ]
67
- * }
68
- * @path {GET} /rest/api/3/user/bulk
69
- * @scopes-current read:jira-user
70
- * @scopes-beta read:application-role:jira, read:group:jira, read:user:jira, read:avatar:jira
71
- */
72
- bulkGetUsers({
73
- startAt,
74
- maxResults,
75
- username,
76
- key,
77
- accountId,
78
- }: {
79
- /** The index of the first item to return in a page of results (page offset). */
80
- startAt?: number;
81
- /** The maximum number of items to return per page. */
82
- maxResults?: number;
83
- /**
84
- * This parameter is no longer available and will be removed from the
85
- * documentation soon. See the [deprecation
86
- * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/)
87
- * for details.
88
- */
89
- username?: string[];
90
- /**
91
- * This parameter is no longer available and will be removed from the
92
- * documentation soon. See the [deprecation
93
- * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/)
94
- * for details.
95
- */
96
- key?: string[];
97
- /**
98
- * The account ID of a user. To specify multiple users, pass multiple `accountId`
99
- * parameters. For example,
100
- * `accountId=5b10a2844c20165700ede21g&accountId=5b10ac8d82e05b22cc7d4ef5`.
101
- */
102
- accountId: string[];
103
- }): Promise<PageBeanUser> {
104
- return this.getClientInstance()
105
- .request({
106
- path: "/rest/api/3/user/bulk",
107
- method: "GET",
108
- query: {
109
- startAt,
110
- maxResults,
111
- username,
112
- key,
113
- accountId,
114
- },
115
- })
116
- .then(
117
- this.getClientInstance().responseHandler({
118
- 200: {
119
- "application/json": "json",
120
- },
121
- }),
122
- )
123
- .then(
124
- commonHttpClient.castResponse<{
125
- status: 200;
126
- mediaType: "application/json";
127
- body: PageBeanUser;
128
- }>(),
129
- )
130
- .then(
131
- validationSchemaStorage.validator("UsersService.bulkGetUsers.response"),
132
- )
133
- .then(commonHttpClient.getBody);
134
- }
135
- /**
136
- * Returns the account IDs for the users specified in the `key` or `username`
137
- * parameters. Note that multiple `key` or `username` parameters can be specified.
138
- *
139
- * **[Permissions](#permissions) required:** Permission to access Jira.
140
- *
141
- * @returns Returned if the request is successful.
142
- *
143
- * example: [
144
- * {
145
- * "username": "mia",
146
- * "accountId": "5b10a2844c20165700ede21g"
147
- * },
148
- * {
149
- * "username": "emma",
150
- * "accountId": "5b10ac8d82e05b22cc7d4ef5"
151
- * }
152
- * ]
153
- * @path {GET} /rest/api/3/user/bulk/migration
154
- * @scopes-current read:jira-user
155
- * @scopes-beta read:user:jira
156
- */
157
- bulkGetUsersMigration({
158
- startAt,
159
- maxResults,
160
- username,
161
- key,
162
- }: {
163
- /** The index of the first item to return in a page of results (page offset). */
164
- startAt?: number;
165
- /** The maximum number of items to return per page. */
166
- maxResults?: number;
167
- /**
168
- * Username of a user. To specify multiple users, pass multiple copies of this
169
- * parameter. For example, `username=fred&username=barney`. Required if `key`
170
- * isn't provided. Cannot be provided if `key` is present.
171
- */
172
- username?: string[];
173
- /**
174
- * Key of a user. To specify multiple users, pass multiple copies of this
175
- * parameter. For example, `key=fred&key=barney`. Required if `username` isn't
176
- * provided. Cannot be provided if `username` is present.
177
- */
178
- key?: string[];
179
- }): Promise<UserMigrationBean[]> {
180
- return this.getClientInstance()
181
- .request({
182
- path: "/rest/api/3/user/bulk/migration",
183
- method: "GET",
184
- query: {
185
- startAt,
186
- maxResults,
187
- username,
188
- key,
189
- },
190
- })
191
- .then(
192
- this.getClientInstance().responseHandler({
193
- 200: {
194
- "application/json": "json",
195
- },
196
- }),
197
- )
198
- .then(
199
- commonHttpClient.castResponse<{
200
- status: 200;
201
- mediaType: "application/json";
202
- body: UserMigrationBean[];
203
- }>(),
204
- )
205
- .then(
206
- validationSchemaStorage.validator(
207
- "UsersService.bulkGetUsersMigration.response",
208
- ),
209
- )
210
- .then(commonHttpClient.getBody);
211
- }
212
- /**
213
- * Creates a user. This resource is retained for legacy compatibility. As soon as
214
- * a more suitable alternative is available this resource will be deprecated.
215
- *
216
- * If the user exists and has access to Jira, the operation returns a 201 status.
217
- * If the user exists but does not have access to Jira, the operation returns a
218
- * 400 status.
219
- *
220
- * **[Permissions](#permissions) required:** *Administer Jira* [global
221
- * permission](https://confluence.atlassian.com/x/x4dKLg).
222
- *
223
- * @returns Returned if the request is successful.
224
- *
225
- * example: {
226
- * "accountId": "5b10a2844c20165700ede21g",
227
- * "accountType": "atlassian",
228
- * "active": true,
229
- * "applicationRoles": {
230
- * "items": [],
231
- * "size": 1
232
- * },
233
- * "avatarUrls": {
234
- * "16x16":
235
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
236
- * "24x24":
237
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
238
- * "32x32":
239
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
240
- * "48x48":
241
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
242
- * },
243
- * "displayName": "Mia Krystof",
244
- * "emailAddress": "mia@example.com",
245
- * "groups": {
246
- * "items": [],
247
- * "size": 3
248
- * },
249
- * "key": "",
250
- * "name": "",
251
- * "self":
252
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g",
253
- * "timeZone": "Australia/Sydney"
254
- * }
255
- * @path {POST} /rest/api/3/user
256
- */
257
- createUser({
258
- newUserDetails,
259
- }: {
260
- /**
261
- * Details about the user to be created.
262
- *
263
- * @example {
264
- * "emailAddress": "mia@atlassian.com"
265
- * }
266
- */
267
- newUserDetails: NewUserDetails;
268
- }): Promise<User> {
269
- return this.getClientInstance()
270
- .request({
271
- path: "/rest/api/3/user",
272
- method: "POST",
273
- headers: {
274
- "Content-Type": "application/json",
275
- },
276
- body: newUserDetails,
277
- })
278
- .then(
279
- this.getClientInstance().responseHandler({
280
- 201: {
281
- "application/json": "json",
282
- },
283
- }),
284
- )
285
- .then(
286
- commonHttpClient.castResponse<{
287
- status: 201;
288
- mediaType: "application/json";
289
- body: User;
290
- }>(),
291
- )
292
- .then(
293
- validationSchemaStorage.validator("UsersService.createUser.response"),
294
- )
295
- .then(commonHttpClient.getBody);
296
- }
297
- /**
298
- * Returns a list of all users, including active users, inactive users and
299
- * previously deleted users that have an Atlassian account.
300
- *
301
- * Privacy controls are applied to the response based on the users' preferences.
302
- * This could mean, for example, that the user's email address is hidden. See the
303
- * [Profile visibility
304
- * overview](https://developer.atlassian.com/cloud/jira/platform/profile-visibility/)
305
- * for more details.
306
- *
307
- * **[Permissions](#permissions) required:** *Browse users and groups* [global
308
- * permission](https://confluence.atlassian.com/x/x4dKLg).
309
- *
310
- * @returns Returned if the request is successful.
311
- *
312
- * example: [
313
- * {
314
- * "accountId": "5b10a2844c20165700ede21g",
315
- * "accountType": "atlassian",
316
- * "active": false,
317
- * "avatarUrls": {
318
- * "16x16":
319
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
320
- * "24x24":
321
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
322
- * "32x32":
323
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
324
- * "48x48":
325
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
326
- * },
327
- * "displayName": "Mia Krystof",
328
- * "key": "",
329
- * "name": "",
330
- * "self":
331
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
332
- * },
333
- * {
334
- * "accountId": "5b10ac8d82e05b22cc7d4ef5",
335
- * "accountType": "atlassian",
336
- * "active": false,
337
- * "avatarUrls": {
338
- * "16x16":
339
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=16&s=16",
340
- * "24x24":
341
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=24&s=24",
342
- * "32x32":
343
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=32&s=32",
344
- * "48x48":
345
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=48&s=48"
346
- * },
347
- * "displayName": "Emma Richards",
348
- * "key": "",
349
- * "name": "",
350
- * "self":
351
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10ac8d82e05b22cc7d4ef5"
352
- * }
353
- * ]
354
- * @path {GET} /rest/api/3/users/search
355
- * @scopes-current read:jira-user
356
- * @scopes-beta read:user:jira, read:application-role:jira, read:avatar:jira, read:group:jira
357
- */
358
- getAllUsers({
359
- startAt,
360
- maxResults,
361
- }: {
362
- /** The index of the first item to return. */
363
- startAt?: number;
364
- /** The maximum number of items to return. */
365
- maxResults?: number;
366
- }): Promise<User[]> {
367
- return this.getClientInstance()
368
- .request({
369
- path: "/rest/api/3/users/search",
370
- method: "GET",
371
- query: {
372
- startAt,
373
- maxResults,
374
- },
375
- })
376
- .then(
377
- this.getClientInstance().responseHandler({
378
- 200: {
379
- "application/json": "json",
380
- },
381
- }),
382
- )
383
- .then(
384
- commonHttpClient.castResponse<{
385
- status: 200;
386
- mediaType: "application/json";
387
- body: User[];
388
- }>(),
389
- )
390
- .then(
391
- validationSchemaStorage.validator("UsersService.getAllUsers.response"),
392
- )
393
- .then(commonHttpClient.getBody);
394
- }
395
- /**
396
- * Returns a list of all users, including active users, inactive users and
397
- * previously deleted users that have an Atlassian account.
398
- *
399
- * Privacy controls are applied to the response based on the users' preferences.
400
- * This could mean, for example, that the user's email address is hidden. See the
401
- * [Profile visibility
402
- * overview](https://developer.atlassian.com/cloud/jira/platform/profile-visibility/)
403
- * for more details.
404
- *
405
- * **[Permissions](#permissions) required:** *Browse users and groups* [global
406
- * permission](https://confluence.atlassian.com/x/x4dKLg).
407
- *
408
- * @returns Returned if the request is successful.
409
- *
410
- * example: [
411
- * {
412
- * "accountId": "5b10a2844c20165700ede21g",
413
- * "accountType": "atlassian",
414
- * "active": false,
415
- * "avatarUrls": {
416
- * "16x16":
417
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
418
- * "24x24":
419
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
420
- * "32x32":
421
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
422
- * "48x48":
423
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
424
- * },
425
- * "displayName": "Mia Krystof",
426
- * "key": "",
427
- * "name": "",
428
- * "self":
429
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
430
- * },
431
- * {
432
- * "accountId": "5b10ac8d82e05b22cc7d4ef5",
433
- * "accountType": "atlassian",
434
- * "active": false,
435
- * "avatarUrls": {
436
- * "16x16":
437
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=16&s=16",
438
- * "24x24":
439
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=24&s=24",
440
- * "32x32":
441
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=32&s=32",
442
- * "48x48":
443
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=48&s=48"
444
- * },
445
- * "displayName": "Emma Richards",
446
- * "key": "",
447
- * "name": "",
448
- * "self":
449
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10ac8d82e05b22cc7d4ef5"
450
- * }
451
- * ]
452
- * @path {GET} /rest/api/3/users
453
- * @scopes-current read:jira-user
454
- * @scopes-beta read:user:jira, read:application-role:jira, read:avatar:jira, read:group:jira
455
- */
456
- getAllUsersDefault({
457
- startAt,
458
- maxResults,
459
- }: {
460
- /** The index of the first item to return. */
461
- startAt?: number;
462
- /** The maximum number of items to return. */
463
- maxResults?: number;
464
- }): Promise<User[]> {
465
- return this.getClientInstance()
466
- .request({
467
- path: "/rest/api/3/users",
468
- method: "GET",
469
- query: {
470
- startAt,
471
- maxResults,
472
- },
473
- })
474
- .then(
475
- this.getClientInstance().responseHandler({
476
- 200: {
477
- "application/json": "json",
478
- },
479
- }),
480
- )
481
- .then(
482
- commonHttpClient.castResponse<{
483
- status: 200;
484
- mediaType: "application/json";
485
- body: User[];
486
- }>(),
487
- )
488
- .then(
489
- validationSchemaStorage.validator(
490
- "UsersService.getAllUsersDefault.response",
491
- ),
492
- )
493
- .then(commonHttpClient.getBody);
494
- }
495
- /**
496
- * Returns a user.
497
- *
498
- * Privacy controls are applied to the response based on the user's preferences.
499
- * This could mean, for example, that the user's email address is hidden. See the
500
- * [Profile visibility
501
- * overview](https://developer.atlassian.com/cloud/jira/platform/profile-visibility/)
502
- * for more details.
503
- *
504
- * **[Permissions](#permissions) required:** *Browse users and groups* [global
505
- * permission](https://confluence.atlassian.com/x/x4dKLg).
506
- *
507
- * @returns Returned if the request is successful.
508
- *
509
- * example: {
510
- * "accountId": "5b10a2844c20165700ede21g",
511
- * "accountType": "atlassian",
512
- * "active": true,
513
- * "applicationRoles": {
514
- * "items": [],
515
- * "size": 1
516
- * },
517
- * "avatarUrls": {
518
- * "16x16":
519
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
520
- * "24x24":
521
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
522
- * "32x32":
523
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
524
- * "48x48":
525
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
526
- * },
527
- * "displayName": "Mia Krystof",
528
- * "emailAddress": "mia@example.com",
529
- * "groups": {
530
- * "items": [],
531
- * "size": 3
532
- * },
533
- * "key": "",
534
- * "name": "",
535
- * "self":
536
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g",
537
- * "timeZone": "Australia/Sydney"
538
- * }
539
- * @path {GET} /rest/api/3/user
540
- * @scopes-current read:jira-user
541
- * @scopes-beta read:application-role:jira, read:group:jira, read:user:jira, read:avatar:jira
542
- */
543
- getUser({
544
- accountId,
545
- username,
546
- key,
547
- expand,
548
- }: {
549
- /**
550
- * The account ID of the user, which uniquely identifies the user across all
551
- * Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*. Required.
552
- */
553
- accountId?: string;
554
- /**
555
- * This parameter is no longer available. See the [deprecation
556
- * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide)
557
- * for details.
558
- */
559
- username?: string;
560
- /**
561
- * This parameter is no longer available. See the [deprecation
562
- * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide)
563
- * for details.
564
- */
565
- key?: string;
566
- /**
567
- * Use [expand](#expansion) to include additional information about users in the
568
- * response. This parameter accepts a comma-separated list. Expand options include:
569
- *
570
- * * `groups` includes all groups and nested groups to which the user belongs.
571
- * * `applicationRoles` includes details of all the applications to which the
572
- * user has access.
573
- */
574
- expand?: string;
575
- }): Promise<User> {
576
- return this.getClientInstance()
577
- .request({
578
- path: "/rest/api/3/user",
579
- method: "GET",
580
- query: {
581
- accountId,
582
- username,
583
- key,
584
- expand,
585
- },
586
- })
587
- .then(
588
- this.getClientInstance().responseHandler({
589
- 200: {
590
- "application/json": "json",
591
- },
592
- }),
593
- )
594
- .then(
595
- commonHttpClient.castResponse<{
596
- status: 200;
597
- mediaType: "application/json";
598
- body: User;
599
- }>(),
600
- )
601
- .then(validationSchemaStorage.validator("UsersService.getUser.response"))
602
- .then(commonHttpClient.getBody);
603
- }
604
- /**
605
- * Returns the default [issue table
606
- * columns](https://confluence.atlassian.com/x/XYdKLg) for the user. If
607
- * `accountId` is not passed in the request, the calling user's details are
608
- * returned.
609
- *
610
- * **[Permissions](#permissions) required:**
611
- *
612
- * * *Administer Jira* [global
613
- * permission](https://confluence.atlassian.com/x/x4dKLgl), to get the column
614
- * details for any user.
615
- * * Permission to access Jira, to get the calling user's column details.
616
- *
617
- * @returns Returned if the request is successful.
618
- * @path {GET} /rest/api/3/user/columns
619
- * @scopes-current read:jira-user
620
- * @scopes-beta read:user.columns:jira, read:filter.column:jira
621
- */
622
- getUserDefaultColumns({
623
- accountId,
624
- username,
625
- }: {
626
- /**
627
- * The account ID of the user, which uniquely identifies the user across all
628
- * Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*.
629
- */
630
- accountId?: string;
631
- /**
632
- * This parameter is no longer available See the [deprecation
633
- * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/)
634
- * for details.
635
- */
636
- username?: string;
637
- }): Promise<ColumnItem[]> {
638
- return this.getClientInstance()
639
- .request({
640
- path: "/rest/api/3/user/columns",
641
- method: "GET",
642
- query: {
643
- accountId,
644
- username,
645
- },
646
- })
647
- .then(
648
- this.getClientInstance().responseHandler({
649
- 200: {
650
- "application/json": "json",
651
- },
652
- }),
653
- )
654
- .then(
655
- commonHttpClient.castResponse<{
656
- status: 200;
657
- mediaType: "application/json";
658
- body: ColumnItem[];
659
- }>(),
660
- )
661
- .then(
662
- validationSchemaStorage.validator(
663
- "UsersService.getUserDefaultColumns.response",
664
- ),
665
- )
666
- .then(commonHttpClient.getBody);
667
- }
668
- /**
669
- * Returns a user's email address. This API is only available to apps approved by
670
- * Atlassian, according to these
671
- * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603).
672
- *
673
- * @returns Returned if the request is successful.
674
- *
675
- * example: name@example.com
676
- * @path {GET} /rest/api/3/user/email
677
- */
678
- getUserEmail({
679
- accountId,
680
- }: {
681
- /**
682
- * The account ID of the user, which uniquely identifies the user across all
683
- * Atlassian products. For example, `5b10ac8d82e05b22cc7d4ef5`.
684
- */
685
- accountId: string;
686
- }): Promise<UnrestrictedUserEmail> {
687
- return this.getClientInstance()
688
- .request({
689
- path: "/rest/api/3/user/email",
690
- method: "GET",
691
- query: {
692
- accountId,
693
- },
694
- })
695
- .then(
696
- this.getClientInstance().responseHandler({
697
- 200: {
698
- "application/json": "json",
699
- },
700
- }),
701
- )
702
- .then(
703
- commonHttpClient.castResponse<{
704
- status: 200;
705
- mediaType: "application/json";
706
- body: UnrestrictedUserEmail;
707
- }>(),
708
- )
709
- .then(
710
- validationSchemaStorage.validator("UsersService.getUserEmail.response"),
711
- )
712
- .then(commonHttpClient.getBody);
713
- }
714
- /**
715
- * Returns a user's email address. This API is only available to apps approved by
716
- * Atlassian, according to these
717
- * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603).
718
- *
719
- * @returns Returned if the request is successful.
720
- * @path {GET} /rest/api/3/user/email/bulk
721
- */
722
- getUserEmailBulk({
723
- accountId,
724
- }: {
725
- /**
726
- * The account IDs of the users for which emails are required. An `accountId` is
727
- * an identifier that uniquely identifies the user across all Atlassian products.
728
- * For example, `5b10ac8d82e05b22cc7d4ef5`. Note, this should be treated as an
729
- * opaque identifier (that is, do not assume any structure in the value).
730
- */
731
- accountId: string[];
732
- }): Promise<UnrestrictedUserEmail> {
733
- return this.getClientInstance()
734
- .request({
735
- path: "/rest/api/3/user/email/bulk",
736
- method: "GET",
737
- query: {
738
- accountId,
739
- },
740
- })
741
- .then(
742
- this.getClientInstance().responseHandler({
743
- 200: {
744
- "application/json": "json",
745
- },
746
- }),
747
- )
748
- .then(
749
- commonHttpClient.castResponse<{
750
- status: 200;
751
- mediaType: "application/json";
752
- body: UnrestrictedUserEmail;
753
- }>(),
754
- )
755
- .then(
756
- validationSchemaStorage.validator(
757
- "UsersService.getUserEmailBulk.response",
758
- ),
759
- )
760
- .then(commonHttpClient.getBody);
761
- }
762
- /**
763
- * Returns the groups to which a user belongs.
764
- *
765
- * **[Permissions](#permissions) required:** *Browse users and groups* [global
766
- * permission](https://confluence.atlassian.com/x/x4dKLg).
767
- *
768
- * @returns Returned if the request is successful.
769
- *
770
- * example: {
771
- * "groupId": "276f955c-63d7-42c8-9520-92d01dca0625",
772
- * "name": "jira-administrators",
773
- * "self":
774
- * "https://your-domain.atlassian.net/rest/api/3/group?groupId=276f955c-63d7-42c8-9520-92d01dca0625"
775
- * }
776
- * @path {GET} /rest/api/3/user/groups
777
- * @scopes-current read:jira-user
778
- * @scopes-beta read:group:jira
779
- */
780
- getUserGroups({
781
- accountId,
782
- username,
783
- key,
784
- }: {
785
- /**
786
- * The account ID of the user, which uniquely identifies the user across all
787
- * Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*.
788
- */
789
- accountId: string;
790
- /**
791
- * This parameter is no longer available. See the [deprecation
792
- * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/)
793
- * for details.
794
- */
795
- username?: string;
796
- /**
797
- * This parameter is no longer available. See the [deprecation
798
- * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/)
799
- * for details.
800
- */
801
- key?: string;
802
- }): Promise<GroupName[]> {
803
- return this.getClientInstance()
804
- .request({
805
- path: "/rest/api/3/user/groups",
806
- method: "GET",
807
- query: {
808
- accountId,
809
- username,
810
- key,
811
- },
812
- })
813
- .then(
814
- this.getClientInstance().responseHandler({
815
- 200: {
816
- "application/json": "json",
817
- },
818
- }),
819
- )
820
- .then(
821
- commonHttpClient.castResponse<{
822
- status: 200;
823
- mediaType: "application/json";
824
- body: GroupName[];
825
- }>(),
826
- )
827
- .then(
828
- validationSchemaStorage.validator(
829
- "UsersService.getUserGroups.response",
830
- ),
831
- )
832
- .then(commonHttpClient.getBody);
833
- }
834
- /**
835
- * Deletes a user. If the operation completes successfully then the user is
836
- * removed from Jira's user base. This operation does not delete the user's
837
- * Atlassian account.
838
- *
839
- * **[Permissions](#permissions) required:** Site administration (that is,
840
- * membership of the *site-admin*
841
- * [group](https://confluence.atlassian.com/x/24xjL)).
842
- *
843
- * @path {DELETE} /rest/api/3/user
844
- */
845
- removeUser({
846
- accountId,
847
- username,
848
- key,
849
- }: {
850
- /**
851
- * The account ID of the user, which uniquely identifies the user across all
852
- * Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*.
853
- */
854
- accountId: string;
855
- /**
856
- * This parameter is no longer available. See the [deprecation
857
- * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/)
858
- * for details.
859
- */
860
- username?: string;
861
- /**
862
- * This parameter is no longer available. See the [deprecation
863
- * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/)
864
- * for details.
865
- */
866
- key?: string;
867
- }): Promise<void> {
868
- return this.getClientInstance()
869
- .request({
870
- path: "/rest/api/3/user",
871
- method: "DELETE",
872
- query: {
873
- accountId,
874
- username,
875
- key,
876
- },
877
- })
878
- .then(commonHttpClient.discardResult);
879
- }
880
- /**
881
- * Resets the default [ issue table
882
- * columns](https://confluence.atlassian.com/x/XYdKLg) for the user to the system
883
- * default. If `accountId` is not passed, the calling user's default columns are
884
- * reset.
885
- *
886
- * **[Permissions](#permissions) required:**
887
- *
888
- * * *Administer Jira* [global
889
- * permission](https://confluence.atlassian.com/x/x4dKLg), to set the columns on
890
- * any user.
891
- * * Permission to access Jira, to set the calling user's columns.
892
- *
893
- * @path {DELETE} /rest/api/3/user/columns
894
- */
895
- resetUserColumns({
896
- accountId,
897
- username,
898
- }: {
899
- /**
900
- * The account ID of the user, which uniquely identifies the user across all
901
- * Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*.
902
- */
903
- accountId?: string;
904
- /**
905
- * This parameter is no longer available. See the [deprecation
906
- * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/)
907
- * for details.
908
- */
909
- username?: string;
910
- }): Promise<void> {
911
- return this.getClientInstance()
912
- .request({
913
- path: "/rest/api/3/user/columns",
914
- method: "DELETE",
915
- query: {
916
- accountId,
917
- username,
918
- },
919
- })
920
- .then(commonHttpClient.discardResult);
921
- }
922
- /**
923
- * Sets the default [ issue table
924
- * columns](https://confluence.atlassian.com/x/XYdKLg) for the user. If an account
925
- * ID is not passed, the calling user's default columns are set. If no column
926
- * details are sent, then all default columns are removed.
927
- *
928
- * The parameters for this resource are expressed as HTML form data. For example,
929
- * in curl:
930
- *
931
- * `curl -X PUT -d columns=summary -d columns=description
932
- * https://your-domain.atlassian.net/rest/api/3/user/columns?accountId=5b10ac8d82e05b22cc7d4ef5'`
933
- *
934
- * **[Permissions](#permissions) required:**
935
- *
936
- * * *Administer Jira* [global
937
- * permission](https://confluence.atlassian.com/x/x4dKLg), to set the columns on
938
- * any user.
939
- * * Permission to access Jira, to set the calling user's columns.
940
- *
941
- * @returns Returned if the request is successful.
942
- * @path {PUT} /rest/api/3/user/columns
943
- */
944
- setUserColumns({
945
- accountId,
946
- userColumnRequestBody,
947
- }: {
948
- /**
949
- * The account ID of the user, which uniquely identifies the user across all
950
- * Atlassian products. For example, *5b10ac8d82e05b22cc7d4ef5*.
951
- */
952
- accountId?: string;
953
- /**
954
- * The ID of a column to set. To set multiple columns, send multiple `columns`
955
- * parameters.
956
- */
957
- userColumnRequestBody: UserColumnRequestBody;
958
- }): Promise<unknown> {
959
- return this.getClientInstance()
960
- .request({
961
- path: "/rest/api/3/user/columns",
962
- method: "PUT",
963
- query: {
964
- accountId,
965
- },
966
- headers: {
967
- "Content-Type": "multipart/form-data",
968
- },
969
- body: userColumnRequestBody,
970
- })
971
- .then(
972
- this.getClientInstance().responseHandler({
973
- 200: {
974
- "application/json": "json",
975
- },
976
- }),
977
- )
978
- .then(
979
- commonHttpClient.castResponse<{
980
- status: 200;
981
- mediaType: "application/json";
982
- body: unknown;
983
- }>(),
984
- )
985
- .then(
986
- validationSchemaStorage.validator(
987
- "UsersService.setUserColumns.response",
988
- ),
989
- )
990
- .then(commonHttpClient.getBody);
991
- }
992
- static initialize() {
993
- validationSchemaStorage.registerExtensible(
994
- "UsersService.getUser.response",
995
- z
996
- .object({
997
- status: z.literal(200),
998
- mediaType: z.literal("application/json"),
999
- body: validationSchemaStorage.lazy("User"),
1000
- })
1001
- .describe("UsersService.getUser.response"),
1002
- );
1003
- validationSchemaStorage.registerExtensible(
1004
- "UsersService.createUser.response",
1005
- z
1006
- .object({
1007
- status: z.literal(201),
1008
- mediaType: z.literal("application/json"),
1009
- body: validationSchemaStorage.lazy("User"),
1010
- })
1011
- .describe("UsersService.createUser.response"),
1012
- );
1013
- validationSchemaStorage.registerExtensible(
1014
- "UsersService.bulkGetUsers.response",
1015
- z
1016
- .object({
1017
- status: z.literal(200),
1018
- mediaType: z.literal("application/json"),
1019
- body: validationSchemaStorage.lazy("PageBeanUser"),
1020
- })
1021
- .describe("UsersService.bulkGetUsers.response"),
1022
- );
1023
- validationSchemaStorage.registerExtensible(
1024
- "UsersService.bulkGetUsersMigration.response",
1025
- z
1026
- .object({
1027
- status: z.literal(200),
1028
- mediaType: z.literal("application/json"),
1029
- body: z.array(validationSchemaStorage.lazy("UserMigrationBean")),
1030
- })
1031
- .describe("UsersService.bulkGetUsersMigration.response"),
1032
- );
1033
- validationSchemaStorage.registerExtensible(
1034
- "UsersService.getUserDefaultColumns.response",
1035
- z
1036
- .object({
1037
- status: z.literal(200),
1038
- mediaType: z.literal("application/json"),
1039
- body: z.array(validationSchemaStorage.lazy("ColumnItem")),
1040
- })
1041
- .describe("UsersService.getUserDefaultColumns.response"),
1042
- );
1043
- validationSchemaStorage.registerExtensible(
1044
- "UsersService.setUserColumns.response",
1045
- z
1046
- .object({
1047
- status: z.literal(200),
1048
- mediaType: z.literal("application/json"),
1049
- body: z.unknown(),
1050
- })
1051
- .describe("UsersService.setUserColumns.response"),
1052
- );
1053
- validationSchemaStorage.registerExtensible(
1054
- "UsersService.getUserEmail.response",
1055
- z
1056
- .object({
1057
- status: z.literal(200),
1058
- mediaType: z.literal("application/json"),
1059
- body: validationSchemaStorage.lazy("UnrestrictedUserEmail"),
1060
- })
1061
- .describe("UsersService.getUserEmail.response"),
1062
- );
1063
- validationSchemaStorage.registerExtensible(
1064
- "UsersService.getUserEmailBulk.response",
1065
- z
1066
- .object({
1067
- status: z.literal(200),
1068
- mediaType: z.literal("application/json"),
1069
- body: validationSchemaStorage.lazy("UnrestrictedUserEmail"),
1070
- })
1071
- .describe("UsersService.getUserEmailBulk.response"),
1072
- );
1073
- validationSchemaStorage.registerExtensible(
1074
- "UsersService.getUserGroups.response",
1075
- z
1076
- .object({
1077
- status: z.literal(200),
1078
- mediaType: z.literal("application/json"),
1079
- body: z.array(validationSchemaStorage.lazy("GroupName")),
1080
- })
1081
- .describe("UsersService.getUserGroups.response"),
1082
- );
1083
- validationSchemaStorage.registerExtensible(
1084
- "UsersService.getAllUsersDefault.response",
1085
- z
1086
- .object({
1087
- status: z.literal(200),
1088
- mediaType: z.literal("application/json"),
1089
- body: z.array(validationSchemaStorage.lazy("User")),
1090
- })
1091
- .describe("UsersService.getAllUsersDefault.response"),
1092
- );
1093
- validationSchemaStorage.registerExtensible(
1094
- "UsersService.getAllUsers.response",
1095
- z
1096
- .object({
1097
- status: z.literal(200),
1098
- mediaType: z.literal("application/json"),
1099
- body: z.array(validationSchemaStorage.lazy("User")),
1100
- })
1101
- .describe("UsersService.getAllUsers.response"),
1102
- );
1103
- validationSchemaStorage.registerOnce([
1104
- registerCommonValidationSchemas,
1105
- registerUsersValidationSchemas,
1106
- ]);
1107
- }
1108
- }