@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,1214 +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 FoundUsers,
10
- type PageBeanUser,
11
- registerCommonValidationSchemas,
12
- type User,
13
- } from "../models/common";
14
- import {
15
- type PageBeanUserKey,
16
- registerUserSearchValidationSchemas,
17
- } from "../models/user-search";
18
- import { validationSchemaStorage } from "../validation-schema-storage";
19
- /**
20
- * This resource represents various ways to search for and find users. Use it to
21
- * obtain list of users including users assignable to projects and issues, users
22
- * with permissions, user lists for pickup fields, and user lists generated using
23
- * structured queries. Note that the operations in this resource only return users
24
- * found within the first 1000 users.
25
- */
26
- export class UserSearchService extends CommonHttpService {
27
- /**
28
- * Returns a list of users that can be assigned to an issue. Use this operation to
29
- * find the list of users who can be assigned to:
30
- *
31
- * * a new issue, by providing the `projectKeyOrId`.
32
- * * an updated issue, by providing the `issueKey`.
33
- * * to an issue during a transition (workflow action), by providing the
34
- * `issueKey` and the transition id in `actionDescriptorId`. You can obtain the
35
- * IDs of an issue's valid transitions using the `transitions` option in the
36
- * `expand` parameter of [ Get issue](#api-rest-api-3-issue-issueIdOrKey-get).
37
- *
38
- * In all these cases, you can pass an account ID to determine if a user can be
39
- * assigned to an issue. The user is returned in the response if they can be
40
- * assigned to the issue or issue transition.
41
- *
42
- * This operation takes the users in the range defined by `startAt` and
43
- * `maxResults`, up to the thousandth user, and then returns only the users from
44
- * that range that can be assigned the issue. This means the operation usually
45
- * returns fewer users than specified in `maxResults`. To get all the users who
46
- * can be assigned the issue, use [Get all
47
- * users](#api-rest-api-3-users-search-get) and filter the records in your code.
48
- *
49
- * Privacy controls are applied to the response based on the users' preferences.
50
- * This could mean, for example, that the user's email address is hidden. See the
51
- * [Profile visibility
52
- * overview](https://developer.atlassian.com/cloud/jira/platform/profile-visibility/)
53
- * for more details.
54
- *
55
- * **[Permissions](#permissions) required:** *Browse users and groups* [global
56
- * permission](https://confluence.atlassian.com/x/x4dKLg) or *Assign issues*
57
- * [project permission](https://confluence.atlassian.com/x/yodKLg)
58
- *
59
- * @returns Returned if the request is successful.
60
- *
61
- * example: {
62
- * "accountId": "5b10a2844c20165700ede21g",
63
- * "accountType": "atlassian",
64
- * "active": true,
65
- * "applicationRoles": {
66
- * "items": [],
67
- * "size": 1
68
- * },
69
- * "avatarUrls": {
70
- * "16x16":
71
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
72
- * "24x24":
73
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
74
- * "32x32":
75
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
76
- * "48x48":
77
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
78
- * },
79
- * "displayName": "Mia Krystof",
80
- * "emailAddress": "mia@example.com",
81
- * "groups": {
82
- * "items": [],
83
- * "size": 3
84
- * },
85
- * "key": "",
86
- * "name": "",
87
- * "self":
88
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g",
89
- * "timeZone": "Australia/Sydney"
90
- * }
91
- * @path {GET} /rest/api/3/user/assignable/search
92
- * @scopes-current read:jira-user
93
- * @scopes-beta read:issue:jira, read:project:jira, read:user:jira, read:application-role:jira,
94
- * read:avatar:jira, read:group:jira
95
- */
96
- findAssignableUsers({
97
- query,
98
- sessionId,
99
- username,
100
- accountId,
101
- project,
102
- issueKey,
103
- startAt,
104
- maxResults,
105
- actionDescriptorId,
106
- recommend,
107
- }: {
108
- /**
109
- * A query string that is matched against user attributes, such as `displayName`,
110
- * and `emailAddress`, to find relevant users. The string can match the prefix of
111
- * the attribute's value. For example, *query=john* matches a user with a
112
- * `displayName` of *John Smith* and a user with an `emailAddress` of
113
- * *johnson@example.com*. Required, unless `username` or `accountId` is specified.
114
- */
115
- query?: string;
116
- /** The sessionId of this request. SessionId is the same until the assignee is set. */
117
- sessionId?: string;
118
- /**
119
- * This parameter is no longer available. See the [deprecation
120
- * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/)
121
- * for details.
122
- */
123
- username?: string;
124
- /**
125
- * A query string that is matched exactly against user `accountId`. Required,
126
- * unless `query` is specified.
127
- */
128
- accountId?: string;
129
- /**
130
- * The project ID or project key (case sensitive). Required, unless `issueKey` is
131
- * specified.
132
- */
133
- project?: string;
134
- /** The key of the issue. Required, unless `project` is specified. */
135
- issueKey?: string;
136
- /** The index of the first item to return in a page of results (page offset). */
137
- startAt?: number;
138
- /**
139
- * The maximum number of items to return. This operation may return less than the
140
- * maximum number of items even if more are available. The operation fetches users
141
- * up to the maximum and then, from the fetched users, returns only the users that
142
- * can be assigned to the issue.
143
- */
144
- maxResults?: number;
145
- /** The ID of the transition. */
146
- actionDescriptorId?: number;
147
- recommend?: boolean;
148
- }): Promise<User[]> {
149
- return this.getClientInstance()
150
- .request({
151
- path: "/rest/api/3/user/assignable/search",
152
- method: "GET",
153
- query: {
154
- query,
155
- sessionId,
156
- username,
157
- accountId,
158
- project,
159
- issueKey,
160
- startAt,
161
- maxResults,
162
- actionDescriptorId,
163
- recommend,
164
- },
165
- })
166
- .then(
167
- this.getClientInstance().responseHandler({
168
- 200: {
169
- "application/json": "json",
170
- },
171
- }),
172
- )
173
- .then(
174
- commonHttpClient.castResponse<{
175
- status: 200;
176
- mediaType: "application/json";
177
- body: User[];
178
- }>(),
179
- )
180
- .then(
181
- validationSchemaStorage.validator(
182
- "UserSearchService.findAssignableUsers.response",
183
- ),
184
- )
185
- .then(commonHttpClient.getBody);
186
- }
187
- /**
188
- * Returns a list of users who can be assigned issues in one or more projects. The
189
- * list may be restricted to users whose attributes match a string.
190
- *
191
- * This operation takes the users in the range defined by `startAt` and
192
- * `maxResults`, up to the thousandth user, and then returns only the users from
193
- * that range that can be assigned issues in the projects. This means the
194
- * operation usually returns fewer users than specified in `maxResults`. To get
195
- * all the users who can be assigned issues in the projects, use [Get all
196
- * users](#api-rest-api-3-users-search-get) and filter the records in your code.
197
- *
198
- * Privacy controls are applied to the response based on the users' preferences.
199
- * This could mean, for example, that the user's email address is hidden. See the
200
- * [Profile visibility
201
- * overview](https://developer.atlassian.com/cloud/jira/platform/profile-visibility/)
202
- * for more details.
203
- *
204
- * This operation can be accessed anonymously.
205
- *
206
- * **[Permissions](#permissions) required:** None.
207
- *
208
- * @returns Returned if the request is successful.
209
- *
210
- * example: [
211
- * {
212
- * "accountId": "5b10a2844c20165700ede21g",
213
- * "accountType": "atlassian",
214
- * "active": false,
215
- * "avatarUrls": {
216
- * "16x16":
217
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
218
- * "24x24":
219
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
220
- * "32x32":
221
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
222
- * "48x48":
223
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
224
- * },
225
- * "displayName": "Mia Krystof",
226
- * "key": "",
227
- * "name": "",
228
- * "self":
229
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
230
- * },
231
- * {
232
- * "accountId": "5b10ac8d82e05b22cc7d4ef5",
233
- * "accountType": "atlassian",
234
- * "active": false,
235
- * "avatarUrls": {
236
- * "16x16":
237
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=16&s=16",
238
- * "24x24":
239
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=24&s=24",
240
- * "32x32":
241
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=32&s=32",
242
- * "48x48":
243
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=48&s=48"
244
- * },
245
- * "displayName": "Emma Richards",
246
- * "key": "",
247
- * "name": "",
248
- * "self":
249
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10ac8d82e05b22cc7d4ef5"
250
- * }
251
- * ]
252
- * @path {GET} /rest/api/3/user/assignable/multiProjectSearch
253
- * @scopes-current read:jira-user
254
- * @scopes-beta read:project:jira, read:user:jira, read:application-role:jira,
255
- * read:avatar:jira, read:group:jira
256
- */
257
- findBulkAssignableUsers({
258
- query,
259
- username,
260
- accountId,
261
- projectKeys,
262
- startAt,
263
- maxResults,
264
- }: {
265
- /**
266
- * A query string that is matched against user attributes, such as `displayName`
267
- * and `emailAddress`, to find relevant users. The string can match the prefix of
268
- * the attribute's value. For example, *query=john* matches a user with a
269
- * `displayName` of *John Smith* and a user with an `emailAddress` of
270
- * *johnson@example.com*. Required, unless `accountId` is specified.
271
- */
272
- query?: string;
273
- /**
274
- * This parameter is no longer available. See the [deprecation
275
- * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/)
276
- * for details.
277
- */
278
- username?: string;
279
- /**
280
- * A query string that is matched exactly against user `accountId`. Required,
281
- * unless `query` is specified.
282
- */
283
- accountId?: string;
284
- /**
285
- * A list of project keys (case sensitive). This parameter accepts a
286
- * comma-separated list.
287
- */
288
- projectKeys: string;
289
- /** The index of the first item to return in a page of results (page offset). */
290
- startAt?: number;
291
- /** The maximum number of items to return per page. */
292
- maxResults?: number;
293
- }): Promise<User[]> {
294
- return this.getClientInstance()
295
- .request({
296
- path: "/rest/api/3/user/assignable/multiProjectSearch",
297
- method: "GET",
298
- query: {
299
- query,
300
- username,
301
- accountId,
302
- projectKeys,
303
- startAt,
304
- maxResults,
305
- },
306
- })
307
- .then(
308
- this.getClientInstance().responseHandler({
309
- 200: {
310
- "application/json": "json",
311
- },
312
- }),
313
- )
314
- .then(
315
- commonHttpClient.castResponse<{
316
- status: 200;
317
- mediaType: "application/json";
318
- body: User[];
319
- }>(),
320
- )
321
- .then(
322
- validationSchemaStorage.validator(
323
- "UserSearchService.findBulkAssignableUsers.response",
324
- ),
325
- )
326
- .then(commonHttpClient.getBody);
327
- }
328
- /**
329
- * Finds users with a structured query and returns a [paginated](#pagination) list
330
- * of user keys.
331
- *
332
- * This operation takes the users in the range defined by `startAt` and
333
- * `maxResults`, up to the thousandth user, and then returns only the users from
334
- * that range that match the structured query. This means the operation usually
335
- * returns fewer users than specified in `maxResults`. To get all the users who
336
- * match the structured query, use [Get all
337
- * users](#api-rest-api-3-users-search-get) and filter the records in your code.
338
- *
339
- * **[Permissions](#permissions) required:** *Browse users and groups* [global
340
- * permission](https://confluence.atlassian.com/x/x4dKLg).
341
- *
342
- * The query statements are:
343
- *
344
- * * `is assignee of PROJ` Returns the users that are assignees of at least one
345
- * issue in project *PROJ*.
346
- * * `is assignee of (PROJ-1, PROJ-2)` Returns users that are assignees on the
347
- * issues *PROJ-1* or *PROJ-2*.
348
- * * `is reporter of (PROJ-1, PROJ-2)` Returns users that are reporters on the
349
- * issues *PROJ-1* or *PROJ-2*.
350
- * * `is watcher of (PROJ-1, PROJ-2)` Returns users that are watchers on the
351
- * issues *PROJ-1* or *PROJ-2*.
352
- * * `is voter of (PROJ-1, PROJ-2)` Returns users that are voters on the issues
353
- * *PROJ-1* or *PROJ-2*.
354
- * * `is commenter of (PROJ-1, PROJ-2)` Returns users that have posted a comment
355
- * on the issues *PROJ-1* or *PROJ-2*.
356
- * * `is transitioner of (PROJ-1, PROJ-2)` Returns users that have performed a
357
- * transition on issues *PROJ-1* or *PROJ-2*.
358
- * * `[propertyKey].entity.property.path is "property value"` Returns users with
359
- * the entity property value.
360
- *
361
- * The list of issues can be extended as needed, as in *(PROJ-1, PROJ-2, ...
362
- * PROJ-n)*. Statements can be combined using the `AND` and `OR` operators to form
363
- * more complex queries. For example:
364
- *
365
- * `is assignee of PROJ AND [propertyKey].entity.property.path is "property value"`
366
- *
367
- * @returns Returned if the request is successful.
368
- * @path {GET} /rest/api/3/user/search/query/key
369
- * @scopes-current read:jira-user
370
- * @scopes-beta read:comment:jira, read:issue:jira, read:issue.vote:jira,
371
- * read:issue.watcher:jira, read:project:jira, read:user.property:jira,
372
- * read:user:jira
373
- */
374
- findUserKeysByQuery({
375
- query,
376
- startAt,
377
- maxResult,
378
- }: {
379
- /** The search query. */
380
- query: string;
381
- /** The index of the first item to return in a page of results (page offset). */
382
- startAt?: number;
383
- /** The maximum number of items to return per page. */
384
- maxResult?: number;
385
- }): Promise<PageBeanUserKey> {
386
- return this.getClientInstance()
387
- .request({
388
- path: "/rest/api/3/user/search/query/key",
389
- method: "GET",
390
- query: {
391
- query,
392
- startAt,
393
- maxResult,
394
- },
395
- })
396
- .then(
397
- this.getClientInstance().responseHandler({
398
- 200: {
399
- "application/json": "json",
400
- },
401
- }),
402
- )
403
- .then(
404
- commonHttpClient.castResponse<{
405
- status: 200;
406
- mediaType: "application/json";
407
- body: PageBeanUserKey;
408
- }>(),
409
- )
410
- .then(
411
- validationSchemaStorage.validator(
412
- "UserSearchService.findUserKeysByQuery.response",
413
- ),
414
- )
415
- .then(commonHttpClient.getBody);
416
- }
417
- /**
418
- * Returns a list of active users that match the search string and property.
419
- *
420
- * This operation first applies a filter to match the search string and property,
421
- * and then takes the filtered users in the range defined by `startAt` and
422
- * `maxResults`, up to the thousandth user. To get all the users who match the
423
- * search string and property, use [Get all
424
- * users](#api-rest-api-3-users-search-get) and filter the records in your code.
425
- *
426
- * This operation can be accessed anonymously.
427
- *
428
- * Privacy controls are applied to the response based on the users' preferences.
429
- * This could mean, for example, that the user's email address is hidden. See the
430
- * [Profile visibility
431
- * overview](https://developer.atlassian.com/cloud/jira/platform/profile-visibility/)
432
- * for more details.
433
- *
434
- * **[Permissions](#permissions) required:** *Browse users and groups* [global
435
- * permission](https://confluence.atlassian.com/x/x4dKLg). Anonymous calls or
436
- * calls by users without the required permission return empty search results.
437
- *
438
- * @returns Returned if the request is successful.
439
- *
440
- * example: [
441
- * {
442
- * "accountId": "5b10a2844c20165700ede21g",
443
- * "accountType": "atlassian",
444
- * "active": false,
445
- * "avatarUrls": {
446
- * "16x16":
447
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
448
- * "24x24":
449
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
450
- * "32x32":
451
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
452
- * "48x48":
453
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
454
- * },
455
- * "displayName": "Mia Krystof",
456
- * "key": "",
457
- * "name": "",
458
- * "self":
459
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
460
- * },
461
- * {
462
- * "accountId": "5b10ac8d82e05b22cc7d4ef5",
463
- * "accountType": "atlassian",
464
- * "active": false,
465
- * "avatarUrls": {
466
- * "16x16":
467
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=16&s=16",
468
- * "24x24":
469
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=24&s=24",
470
- * "32x32":
471
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=32&s=32",
472
- * "48x48":
473
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=48&s=48"
474
- * },
475
- * "displayName": "Emma Richards",
476
- * "key": "",
477
- * "name": "",
478
- * "self":
479
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10ac8d82e05b22cc7d4ef5"
480
- * }
481
- * ]
482
- * @path {GET} /rest/api/3/user/search
483
- * @scopes-current read:jira-user
484
- * @scopes-beta read:user:jira, read:user.property:jira, read:application-role:jira,
485
- * read:avatar:jira, read:group:jira
486
- */
487
- findUsers({
488
- query,
489
- username,
490
- accountId,
491
- startAt,
492
- maxResults,
493
- property,
494
- }: {
495
- /**
496
- * A query string that is matched against user attributes ( `displayName`, and
497
- * `emailAddress`) to find relevant users. The string can match the prefix of the
498
- * attribute's value. For example, *query=john* matches a user with a
499
- * `displayName` of *John Smith* and a user with an `emailAddress` of
500
- * *johnson@example.com*. Required, unless `accountId` or `property` is specified.
501
- */
502
- query?: string;
503
- username?: string;
504
- /**
505
- * A query string that is matched exactly against a user `accountId`. Required,
506
- * unless `query` or `property` is specified.
507
- */
508
- accountId?: string;
509
- /**
510
- * The index of the first item to return in a page of filtered results (page
511
- * offset).
512
- */
513
- startAt?: number;
514
- /** The maximum number of items to return per page. */
515
- maxResults?: number;
516
- /**
517
- * A query string used to search properties. Property keys are specified by path,
518
- * so property keys containing dot (.) or equals (=) characters cannot be used.
519
- * The query string cannot be specified using a JSON object. Example: To search
520
- * for the value of `nested` from `{"something":{"nested":1,"other":2}}` use
521
- * `thepropertykey.something.nested=1`. Required, unless `accountId` or `query` is
522
- * specified.
523
- */
524
- property?: string;
525
- }): Promise<User[]> {
526
- return this.getClientInstance()
527
- .request({
528
- path: "/rest/api/3/user/search",
529
- method: "GET",
530
- query: {
531
- query,
532
- username,
533
- accountId,
534
- startAt,
535
- maxResults,
536
- property,
537
- },
538
- })
539
- .then(
540
- this.getClientInstance().responseHandler({
541
- 200: {
542
- "application/json": "json",
543
- },
544
- }),
545
- )
546
- .then(
547
- commonHttpClient.castResponse<{
548
- status: 200;
549
- mediaType: "application/json";
550
- body: User[];
551
- }>(),
552
- )
553
- .then(
554
- validationSchemaStorage.validator(
555
- "UserSearchService.findUsers.response",
556
- ),
557
- )
558
- .then(commonHttpClient.getBody);
559
- }
560
- /**
561
- * Finds users with a structured query and returns a [paginated](#pagination) list
562
- * of user details.
563
- *
564
- * This operation takes the users in the range defined by `startAt` and
565
- * `maxResults`, up to the thousandth user, and then returns only the users from
566
- * that range that match the structured query. This means the operation usually
567
- * returns fewer users than specified in `maxResults`. To get all the users who
568
- * match the structured query, use [Get all
569
- * users](#api-rest-api-3-users-search-get) and filter the records in your code.
570
- *
571
- * **[Permissions](#permissions) required:** *Browse users and groups* [global
572
- * permission](https://confluence.atlassian.com/x/x4dKLg).
573
- *
574
- * The query statements are:
575
- *
576
- * * `is assignee of PROJ` Returns the users that are assignees of at least one
577
- * issue in project *PROJ*.
578
- * * `is assignee of (PROJ-1, PROJ-2)` Returns users that are assignees on the
579
- * issues *PROJ-1* or *PROJ-2*.
580
- * * `is reporter of (PROJ-1, PROJ-2)` Returns users that are reporters on the
581
- * issues *PROJ-1* or *PROJ-2*.
582
- * * `is watcher of (PROJ-1, PROJ-2)` Returns users that are watchers on the
583
- * issues *PROJ-1* or *PROJ-2*.
584
- * * `is voter of (PROJ-1, PROJ-2)` Returns users that are voters on the issues
585
- * *PROJ-1* or *PROJ-2*.
586
- * * `is commenter of (PROJ-1, PROJ-2)` Returns users that have posted a comment
587
- * on the issues *PROJ-1* or *PROJ-2*.
588
- * * `is transitioner of (PROJ-1, PROJ-2)` Returns users that have performed a
589
- * transition on issues *PROJ-1* or *PROJ-2*.
590
- * * `[propertyKey].entity.property.path is "property value"` Returns users with
591
- * the entity property value.
592
- *
593
- * The list of issues can be extended as needed, as in *(PROJ-1, PROJ-2, ...
594
- * PROJ-n)*. Statements can be combined using the `AND` and `OR` operators to form
595
- * more complex queries. For example:
596
- *
597
- * `is assignee of PROJ AND [propertyKey].entity.property.path is "property value"`
598
- *
599
- * @returns Returned if the request is successful.
600
- * @path {GET} /rest/api/3/user/search/query
601
- * @scopes-current read:jira-user
602
- * @scopes-beta read:comment:jira, read:issue:jira, read:issue.vote:jira,
603
- * read:issue.watcher:jira, read:project:jira, read:user:jira,
604
- * read:user.property:jira, read:application-role:jira, read:avatar:jira,
605
- * read:group:jira
606
- */
607
- findUsersByQuery({
608
- query,
609
- startAt,
610
- maxResults,
611
- }: {
612
- /** The search query. */
613
- query: string;
614
- /** The index of the first item to return in a page of results (page offset). */
615
- startAt?: number;
616
- /** The maximum number of items to return per page. */
617
- maxResults?: number;
618
- }): Promise<PageBeanUser> {
619
- return this.getClientInstance()
620
- .request({
621
- path: "/rest/api/3/user/search/query",
622
- method: "GET",
623
- query: {
624
- query,
625
- startAt,
626
- maxResults,
627
- },
628
- })
629
- .then(
630
- this.getClientInstance().responseHandler({
631
- 200: {
632
- "application/json": "json",
633
- },
634
- }),
635
- )
636
- .then(
637
- commonHttpClient.castResponse<{
638
- status: 200;
639
- mediaType: "application/json";
640
- body: PageBeanUser;
641
- }>(),
642
- )
643
- .then(
644
- validationSchemaStorage.validator(
645
- "UserSearchService.findUsersByQuery.response",
646
- ),
647
- )
648
- .then(commonHttpClient.getBody);
649
- }
650
- /**
651
- * Returns a list of users whose attributes match the query term. The returned
652
- * object includes the `html` field where the matched query term is highlighted
653
- * with the HTML strong tag. A list of account IDs can be provided to exclude
654
- * users from the results.
655
- *
656
- * This operation takes the users in the range defined by `maxResults`, up to the
657
- * thousandth user, and then returns only the users from that range that match the
658
- * query term. This means the operation usually returns fewer users than specified
659
- * in `maxResults`. To get all the users who match the query term, use [Get all
660
- * users](#api-rest-api-3-users-search-get) and filter the records in your code.
661
- *
662
- * Privacy controls are applied to the response based on the users' preferences.
663
- * This could mean, for example, that the user's email address is hidden. See the
664
- * [Profile visibility
665
- * overview](https://developer.atlassian.com/cloud/jira/platform/profile-visibility/)
666
- * for more details.
667
- *
668
- * This operation can be accessed anonymously.
669
- *
670
- * **[Permissions](#permissions) required:** *Browse users and groups* [global
671
- * permission](https://confluence.atlassian.com/x/x4dKLg). Anonymous calls and
672
- * calls by users without the required permission return search results for an
673
- * exact name match only.
674
- *
675
- * @returns Returned if the request is successful.
676
- *
677
- * example: {
678
- * "header": "Showing 20 of 25 matching groups",
679
- * "total": 25,
680
- * "users": [
681
- * {
682
- * "accountId": "5b10a2844c20165700ede21g",
683
- * "accountType": "atlassian",
684
- * "avatarUrl":
685
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
686
- * "displayName": "Mia Krystof",
687
- * "html": "<strong>Mi</strong>a Krystof - <strong>mi</strong>a@example.com
688
- * (<strong>mi</strong>a)",
689
- * "key": "mia",
690
- * "name": "mia"
691
- * }
692
- * ]
693
- * }
694
- * @path {GET} /rest/api/3/user/picker
695
- * @scopes-current read:jira-user
696
- * @scopes-beta read:user:jira
697
- */
698
- findUsersForPicker({
699
- query,
700
- maxResults,
701
- showAvatar,
702
- exclude,
703
- excludeAccountIds,
704
- avatarSize,
705
- excludeConnectUsers,
706
- }: {
707
- /**
708
- * A query string that is matched against user attributes, such as `displayName`,
709
- * and `emailAddress`, to find relevant users. The string can match the prefix of
710
- * the attribute's value. For example, *query=john* matches a user with a
711
- * `displayName` of *John Smith* and a user with an `emailAddress` of
712
- * *johnson@example.com*.
713
- */
714
- query: string;
715
- /**
716
- * The maximum number of items to return. The total number of matched users is
717
- * returned in `total`.
718
- */
719
- maxResults?: number;
720
- /** Include the URI to the user's avatar. */
721
- showAvatar?: boolean;
722
- /**
723
- * This parameter is no longer available. See the [deprecation
724
- * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/)
725
- * for details.
726
- */
727
- exclude?: string[];
728
- /**
729
- * A list of account IDs to exclude from the search results. This parameter
730
- * accepts a comma-separated list. Multiple account IDs can also be provided using
731
- * an ampersand-separated list. For example,
732
- * `excludeAccountIds=5b10a2844c20165700ede21g,5b10a0effa615349cb016cd8&excludeAccountIds=5b10ac8d82e05b22cc7d4ef5`.
733
- * Cannot be provided with `exclude`.
734
- */
735
- excludeAccountIds?: string[];
736
- avatarSize?: string;
737
- excludeConnectUsers?: boolean;
738
- }): Promise<FoundUsers> {
739
- return this.getClientInstance()
740
- .request({
741
- path: "/rest/api/3/user/picker",
742
- method: "GET",
743
- query: {
744
- query,
745
- maxResults,
746
- showAvatar,
747
- exclude,
748
- excludeAccountIds,
749
- avatarSize,
750
- excludeConnectUsers,
751
- },
752
- })
753
- .then(
754
- this.getClientInstance().responseHandler({
755
- 200: {
756
- "application/json": "json",
757
- },
758
- }),
759
- )
760
- .then(
761
- commonHttpClient.castResponse<{
762
- status: 200;
763
- mediaType: "application/json";
764
- body: FoundUsers;
765
- }>(),
766
- )
767
- .then(
768
- validationSchemaStorage.validator(
769
- "UserSearchService.findUsersForPicker.response",
770
- ),
771
- )
772
- .then(commonHttpClient.getBody);
773
- }
774
- /**
775
- * Returns a list of users who fulfill these criteria:
776
- *
777
- * * their user attributes match a search string.
778
- * * they have a set of permissions for a project or issue.
779
- *
780
- * If no search string is provided, a list of all users with the permissions is
781
- * returned.
782
- *
783
- * This operation takes the users in the range defined by `startAt` and
784
- * `maxResults`, up to the thousandth user, and then returns only the users from
785
- * that range that match the search string and have permission for the project or
786
- * issue. This means the operation usually returns fewer users than specified in
787
- * `maxResults`. To get all the users who match the search string and have
788
- * permission for the project or issue, use [Get all
789
- * users](#api-rest-api-3-users-search-get) and filter the records in your code.
790
- *
791
- * Privacy controls are applied to the response based on the users' preferences.
792
- * This could mean, for example, that the user's email address is hidden. See the
793
- * [Profile visibility
794
- * overview](https://developer.atlassian.com/cloud/jira/platform/profile-visibility/)
795
- * for more details.
796
- *
797
- * This operation can be accessed anonymously.
798
- *
799
- * **[Permissions](#permissions) required:**
800
- *
801
- * * *Administer Jira* [global
802
- * permission](https://confluence.atlassian.com/x/x4dKLg), to get users for any
803
- * project.
804
- * * *Administer Projects* [project
805
- * permission](https://confluence.atlassian.com/x/yodKLg) for a project, to get
806
- * users for that project.
807
- *
808
- * @returns Returned if the request is successful.
809
- *
810
- * example: [
811
- * {
812
- * "accountId": "5b10a2844c20165700ede21g",
813
- * "accountType": "atlassian",
814
- * "active": false,
815
- * "avatarUrls": {
816
- * "16x16":
817
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
818
- * "24x24":
819
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
820
- * "32x32":
821
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
822
- * "48x48":
823
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
824
- * },
825
- * "displayName": "Mia Krystof",
826
- * "key": "",
827
- * "name": "",
828
- * "self":
829
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
830
- * },
831
- * {
832
- * "accountId": "5b10ac8d82e05b22cc7d4ef5",
833
- * "accountType": "atlassian",
834
- * "active": false,
835
- * "avatarUrls": {
836
- * "16x16":
837
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=16&s=16",
838
- * "24x24":
839
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=24&s=24",
840
- * "32x32":
841
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=32&s=32",
842
- * "48x48":
843
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=48&s=48"
844
- * },
845
- * "displayName": "Emma Richards",
846
- * "key": "",
847
- * "name": "",
848
- * "self":
849
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10ac8d82e05b22cc7d4ef5"
850
- * }
851
- * ]
852
- * @path {GET} /rest/api/3/user/permission/search
853
- * @scopes-current read:jira-user
854
- * @scopes-beta read:issue:jira, read:project:jira, read:user:jira, read:application-role:jira,
855
- * read:avatar:jira, read:group:jira
856
- */
857
- findUsersWithAllPermissions({
858
- query,
859
- username,
860
- accountId,
861
- permissions,
862
- issueKey,
863
- projectKey,
864
- startAt,
865
- maxResults,
866
- }: {
867
- /**
868
- * A query string that is matched against user attributes, such as `displayName`
869
- * and `emailAddress`, to find relevant users. The string can match the prefix of
870
- * the attribute's value. For example, *query=john* matches a user with a
871
- * `displayName` of *John Smith* and a user with an `emailAddress` of
872
- * *johnson@example.com*. Required, unless `accountId` is specified.
873
- */
874
- query?: string;
875
- /**
876
- * This parameter is no longer available. See the [deprecation
877
- * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/)
878
- * for details.
879
- */
880
- username?: string;
881
- /**
882
- * A query string that is matched exactly against user `accountId`. Required,
883
- * unless `query` is specified.
884
- */
885
- accountId?: string;
886
- /**
887
- * A comma separated list of permissions. Permissions can be specified as any:
888
- *
889
- * * permission returned by [Get all
890
- * permissions](#api-rest-api-3-permissions-get).
891
- * * custom project permission added by Connect apps.
892
- * * (deprecated) one of the following:
893
- *
894
- * * ASSIGNABLE\_USER
895
- * * ASSIGN\_ISSUE
896
- * * ATTACHMENT\_DELETE\_ALL
897
- * * ATTACHMENT\_DELETE\_OWN
898
- * * BROWSE
899
- * * CLOSE\_ISSUE
900
- * * COMMENT\_DELETE\_ALL
901
- * * COMMENT\_DELETE\_OWN
902
- * * COMMENT\_EDIT\_ALL
903
- * * COMMENT\_EDIT\_OWN
904
- * * COMMENT\_ISSUE
905
- * * CREATE\_ATTACHMENT
906
- * * CREATE\_ISSUE
907
- * * DELETE\_ISSUE
908
- * * EDIT\_ISSUE
909
- * * LINK\_ISSUE
910
- * * MANAGE\_WATCHER\_LIST
911
- * * MODIFY\_REPORTER
912
- * * MOVE\_ISSUE
913
- * * PROJECT\_ADMIN
914
- * * RESOLVE\_ISSUE
915
- * * SCHEDULE\_ISSUE
916
- * * SET\_ISSUE\_SECURITY
917
- * * TRANSITION\_ISSUE
918
- * * VIEW\_VERSION\_CONTROL
919
- * * VIEW\_VOTERS\_AND\_WATCHERS
920
- * * VIEW\_WORKFLOW\_READONLY
921
- * * WORKLOG\_DELETE\_ALL
922
- * * WORKLOG\_DELETE\_OWN
923
- * * WORKLOG\_EDIT\_ALL
924
- * * WORKLOG\_EDIT\_OWN
925
- * * WORK\_ISSUE
926
- */
927
- permissions: string;
928
- /** The issue key for the issue. */
929
- issueKey?: string;
930
- /** The project key for the project (case sensitive). */
931
- projectKey?: string;
932
- /** The index of the first item to return in a page of results (page offset). */
933
- startAt?: number;
934
- /** The maximum number of items to return per page. */
935
- maxResults?: number;
936
- }): Promise<User[]> {
937
- return this.getClientInstance()
938
- .request({
939
- path: "/rest/api/3/user/permission/search",
940
- method: "GET",
941
- query: {
942
- query,
943
- username,
944
- accountId,
945
- permissions,
946
- issueKey,
947
- projectKey,
948
- startAt,
949
- maxResults,
950
- },
951
- })
952
- .then(
953
- this.getClientInstance().responseHandler({
954
- 200: {
955
- "application/json": "json",
956
- },
957
- }),
958
- )
959
- .then(
960
- commonHttpClient.castResponse<{
961
- status: 200;
962
- mediaType: "application/json";
963
- body: User[];
964
- }>(),
965
- )
966
- .then(
967
- validationSchemaStorage.validator(
968
- "UserSearchService.findUsersWithAllPermissions.response",
969
- ),
970
- )
971
- .then(commonHttpClient.getBody);
972
- }
973
- /**
974
- * Returns a list of users who fulfill these criteria:
975
- *
976
- * * their user attributes match a search string.
977
- * * they have permission to browse issues.
978
- *
979
- * Use this resource to find users who can browse:
980
- *
981
- * * an issue, by providing the `issueKey`.
982
- * * any issue in a project, by providing the `projectKey`.
983
- *
984
- * This operation takes the users in the range defined by `startAt` and
985
- * `maxResults`, up to the thousandth user, and then returns only the users from
986
- * that range that match the search string and have permission to browse issues.
987
- * This means the operation usually returns fewer users than specified in
988
- * `maxResults`. To get all the users who match the search string and have
989
- * permission to browse issues, use [Get all
990
- * users](#api-rest-api-3-users-search-get) and filter the records in your code.
991
- *
992
- * Privacy controls are applied to the response based on the users' preferences.
993
- * This could mean, for example, that the user's email address is hidden. See the
994
- * [Profile visibility
995
- * overview](https://developer.atlassian.com/cloud/jira/platform/profile-visibility/)
996
- * for more details.
997
- *
998
- * This operation can be accessed anonymously.
999
- *
1000
- * **[Permissions](#permissions) required:** *Browse users and groups* [global
1001
- * permission](https://confluence.atlassian.com/x/x4dKLg). Anonymous calls and
1002
- * calls by users without the required permission return empty search results.
1003
- *
1004
- * @returns Returned if the request is successful.
1005
- *
1006
- * example: [
1007
- * {
1008
- * "accountId": "5b10a2844c20165700ede21g",
1009
- * "accountType": "atlassian",
1010
- * "active": false,
1011
- * "avatarUrls": {
1012
- * "16x16":
1013
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=16&s=16",
1014
- * "24x24":
1015
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=24&s=24",
1016
- * "32x32":
1017
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=32&s=32",
1018
- * "48x48":
1019
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/MK-5.png?size=48&s=48"
1020
- * },
1021
- * "displayName": "Mia Krystof",
1022
- * "key": "",
1023
- * "name": "",
1024
- * "self":
1025
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10a2844c20165700ede21g"
1026
- * },
1027
- * {
1028
- * "accountId": "5b10ac8d82e05b22cc7d4ef5",
1029
- * "accountType": "atlassian",
1030
- * "active": false,
1031
- * "avatarUrls": {
1032
- * "16x16":
1033
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=16&s=16",
1034
- * "24x24":
1035
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=24&s=24",
1036
- * "32x32":
1037
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=32&s=32",
1038
- * "48x48":
1039
- * "https://avatar-management--avatars.server-location.prod.public.atl-paas.net/initials/AA-3.png?size=48&s=48"
1040
- * },
1041
- * "displayName": "Emma Richards",
1042
- * "key": "",
1043
- * "name": "",
1044
- * "self":
1045
- * "https://your-domain.atlassian.net/rest/api/3/user?accountId=5b10ac8d82e05b22cc7d4ef5"
1046
- * }
1047
- * ]
1048
- * @path {GET} /rest/api/3/user/viewissue/search
1049
- * @scopes-current read:jira-user
1050
- * @scopes-beta read:issue:jira, read:project:jira, read:user:jira, read:application-role:jira,
1051
- * read:avatar:jira, read:group:jira
1052
- */
1053
- findUsersWithBrowsePermission({
1054
- query,
1055
- username,
1056
- accountId,
1057
- issueKey,
1058
- projectKey,
1059
- startAt,
1060
- maxResults,
1061
- }: {
1062
- /**
1063
- * A query string that is matched against user attributes, such as `displayName`
1064
- * and `emailAddress`, to find relevant users. The string can match the prefix of
1065
- * the attribute's value. For example, *query=john* matches a user with a
1066
- * `displayName` of *John Smith* and a user with an `emailAddress` of
1067
- * *johnson@example.com*. Required, unless `accountId` is specified.
1068
- */
1069
- query?: string;
1070
- /**
1071
- * This parameter is no longer available. See the [deprecation
1072
- * notice](https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/)
1073
- * for details.
1074
- */
1075
- username?: string;
1076
- /**
1077
- * A query string that is matched exactly against user `accountId`. Required,
1078
- * unless `query` is specified.
1079
- */
1080
- accountId?: string;
1081
- /** The issue key for the issue. Required, unless `projectKey` is specified. */
1082
- issueKey?: string;
1083
- /**
1084
- * The project key for the project (case sensitive). Required, unless `issueKey`
1085
- * is specified.
1086
- */
1087
- projectKey?: string;
1088
- /** The index of the first item to return in a page of results (page offset). */
1089
- startAt?: number;
1090
- /** The maximum number of items to return per page. */
1091
- maxResults?: number;
1092
- }): Promise<User[]> {
1093
- return this.getClientInstance()
1094
- .request({
1095
- path: "/rest/api/3/user/viewissue/search",
1096
- method: "GET",
1097
- query: {
1098
- query,
1099
- username,
1100
- accountId,
1101
- issueKey,
1102
- projectKey,
1103
- startAt,
1104
- maxResults,
1105
- },
1106
- })
1107
- .then(
1108
- this.getClientInstance().responseHandler({
1109
- 200: {
1110
- "application/json": "json",
1111
- },
1112
- }),
1113
- )
1114
- .then(
1115
- commonHttpClient.castResponse<{
1116
- status: 200;
1117
- mediaType: "application/json";
1118
- body: User[];
1119
- }>(),
1120
- )
1121
- .then(
1122
- validationSchemaStorage.validator(
1123
- "UserSearchService.findUsersWithBrowsePermission.response",
1124
- ),
1125
- )
1126
- .then(commonHttpClient.getBody);
1127
- }
1128
- static initialize() {
1129
- validationSchemaStorage.registerExtensible(
1130
- "UserSearchService.findBulkAssignableUsers.response",
1131
- z
1132
- .object({
1133
- status: z.literal(200),
1134
- mediaType: z.literal("application/json"),
1135
- body: z.array(validationSchemaStorage.lazy("User")),
1136
- })
1137
- .describe("UserSearchService.findBulkAssignableUsers.response"),
1138
- );
1139
- validationSchemaStorage.registerExtensible(
1140
- "UserSearchService.findAssignableUsers.response",
1141
- z
1142
- .object({
1143
- status: z.literal(200),
1144
- mediaType: z.literal("application/json"),
1145
- body: z.array(validationSchemaStorage.lazy("User")),
1146
- })
1147
- .describe("UserSearchService.findAssignableUsers.response"),
1148
- );
1149
- validationSchemaStorage.registerExtensible(
1150
- "UserSearchService.findUsersWithAllPermissions.response",
1151
- z
1152
- .object({
1153
- status: z.literal(200),
1154
- mediaType: z.literal("application/json"),
1155
- body: z.array(validationSchemaStorage.lazy("User")),
1156
- })
1157
- .describe("UserSearchService.findUsersWithAllPermissions.response"),
1158
- );
1159
- validationSchemaStorage.registerExtensible(
1160
- "UserSearchService.findUsersForPicker.response",
1161
- z
1162
- .object({
1163
- status: z.literal(200),
1164
- mediaType: z.literal("application/json"),
1165
- body: validationSchemaStorage.lazy("FoundUsers"),
1166
- })
1167
- .describe("UserSearchService.findUsersForPicker.response"),
1168
- );
1169
- validationSchemaStorage.registerExtensible(
1170
- "UserSearchService.findUsers.response",
1171
- z
1172
- .object({
1173
- status: z.literal(200),
1174
- mediaType: z.literal("application/json"),
1175
- body: z.array(validationSchemaStorage.lazy("User")),
1176
- })
1177
- .describe("UserSearchService.findUsers.response"),
1178
- );
1179
- validationSchemaStorage.registerExtensible(
1180
- "UserSearchService.findUsersByQuery.response",
1181
- z
1182
- .object({
1183
- status: z.literal(200),
1184
- mediaType: z.literal("application/json"),
1185
- body: validationSchemaStorage.lazy("PageBeanUser"),
1186
- })
1187
- .describe("UserSearchService.findUsersByQuery.response"),
1188
- );
1189
- validationSchemaStorage.registerExtensible(
1190
- "UserSearchService.findUserKeysByQuery.response",
1191
- z
1192
- .object({
1193
- status: z.literal(200),
1194
- mediaType: z.literal("application/json"),
1195
- body: validationSchemaStorage.lazy("PageBeanUserKey"),
1196
- })
1197
- .describe("UserSearchService.findUserKeysByQuery.response"),
1198
- );
1199
- validationSchemaStorage.registerExtensible(
1200
- "UserSearchService.findUsersWithBrowsePermission.response",
1201
- z
1202
- .object({
1203
- status: z.literal(200),
1204
- mediaType: z.literal("application/json"),
1205
- body: z.array(validationSchemaStorage.lazy("User")),
1206
- })
1207
- .describe("UserSearchService.findUsersWithBrowsePermission.response"),
1208
- );
1209
- validationSchemaStorage.registerOnce([
1210
- registerCommonValidationSchemas,
1211
- registerUserSearchValidationSchemas,
1212
- ]);
1213
- }
1214
- }