@resolution/organizations-api-client 0.14.0

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 (75) hide show
  1. package/LICENSE.md +19 -0
  2. package/README.md +110 -0
  3. package/lib/index.d.ts +39 -0
  4. package/lib/index.js +46 -0
  5. package/lib/index.js.map +1 -0
  6. package/lib/openapi/core/CommonHttpClient.d.ts +316 -0
  7. package/lib/openapi/core/CommonHttpClient.js +639 -0
  8. package/lib/openapi/core/CommonHttpClient.js.map +1 -0
  9. package/lib/openapi/core/CommonHttpService.d.ts +26 -0
  10. package/lib/openapi/core/CommonHttpService.js +40 -0
  11. package/lib/openapi/core/CommonHttpService.js.map +1 -0
  12. package/lib/openapi/core/CommonValidationSchemaStorage.d.ts +35 -0
  13. package/lib/openapi/core/CommonValidationSchemaStorage.js +63 -0
  14. package/lib/openapi/core/CommonValidationSchemaStorage.js.map +1 -0
  15. package/lib/openapi/organizations/BaseOrganizationsApiClient.d.ts +94 -0
  16. package/lib/openapi/organizations/BaseOrganizationsApiClient.js +127 -0
  17. package/lib/openapi/organizations/BaseOrganizationsApiClient.js.map +1 -0
  18. package/lib/openapi/organizations/models/common.d.ts +222 -0
  19. package/lib/openapi/organizations/models/common.js +66 -0
  20. package/lib/openapi/organizations/models/common.js.map +1 -0
  21. package/lib/openapi/organizations/models/directory.d.ts +151 -0
  22. package/lib/openapi/organizations/models/directory.js +58 -0
  23. package/lib/openapi/organizations/models/directory.js.map +1 -0
  24. package/lib/openapi/organizations/models/domains.d.ts +52 -0
  25. package/lib/openapi/organizations/models/domains.js +35 -0
  26. package/lib/openapi/organizations/models/domains.js.map +1 -0
  27. package/lib/openapi/organizations/models/events.d.ts +280 -0
  28. package/lib/openapi/organizations/models/events.js +129 -0
  29. package/lib/openapi/organizations/models/events.js.map +1 -0
  30. package/lib/openapi/organizations/models/groups.d.ts +297 -0
  31. package/lib/openapi/organizations/models/groups.js +114 -0
  32. package/lib/openapi/organizations/models/groups.js.map +1 -0
  33. package/lib/openapi/organizations/models/orgs.d.ts +52 -0
  34. package/lib/openapi/organizations/models/orgs.js +36 -0
  35. package/lib/openapi/organizations/models/orgs.js.map +1 -0
  36. package/lib/openapi/organizations/models/policies.d.ts +169 -0
  37. package/lib/openapi/organizations/models/policies.js +101 -0
  38. package/lib/openapi/organizations/models/policies.js.map +1 -0
  39. package/lib/openapi/organizations/models/users.d.ts +477 -0
  40. package/lib/openapi/organizations/models/users.js +178 -0
  41. package/lib/openapi/organizations/models/users.js.map +1 -0
  42. package/lib/openapi/organizations/models/workspaces.d.ts +200 -0
  43. package/lib/openapi/organizations/models/workspaces.js +106 -0
  44. package/lib/openapi/organizations/models/workspaces.js.map +1 -0
  45. package/lib/openapi/organizations/services/DirectoryService.d.ts +637 -0
  46. package/lib/openapi/organizations/services/DirectoryService.js +599 -0
  47. package/lib/openapi/organizations/services/DirectoryService.js.map +1 -0
  48. package/lib/openapi/organizations/services/DomainsService.d.ts +51 -0
  49. package/lib/openapi/organizations/services/DomainsService.js +89 -0
  50. package/lib/openapi/organizations/services/DomainsService.js.map +1 -0
  51. package/lib/openapi/organizations/services/EventsService.d.ts +142 -0
  52. package/lib/openapi/organizations/services/EventsService.js +187 -0
  53. package/lib/openapi/organizations/services/EventsService.js.map +1 -0
  54. package/lib/openapi/organizations/services/GroupsService.d.ts +268 -0
  55. package/lib/openapi/organizations/services/GroupsService.js +210 -0
  56. package/lib/openapi/organizations/services/GroupsService.js.map +1 -0
  57. package/lib/openapi/organizations/services/OrgsService.d.ts +38 -0
  58. package/lib/openapi/organizations/services/OrgsService.js +79 -0
  59. package/lib/openapi/organizations/services/OrgsService.js.map +1 -0
  60. package/lib/openapi/organizations/services/PoliciesService.d.ts +172 -0
  61. package/lib/openapi/organizations/services/PoliciesService.js +272 -0
  62. package/lib/openapi/organizations/services/PoliciesService.js.map +1 -0
  63. package/lib/openapi/organizations/services/UsersService.d.ts +310 -0
  64. package/lib/openapi/organizations/services/UsersService.js +214 -0
  65. package/lib/openapi/organizations/services/UsersService.js.map +1 -0
  66. package/lib/openapi/organizations/services/ValidateService.d.ts +25 -0
  67. package/lib/openapi/organizations/services/ValidateService.js +38 -0
  68. package/lib/openapi/organizations/services/ValidateService.js.map +1 -0
  69. package/lib/openapi/organizations/services/WorkspacesService.d.ts +78 -0
  70. package/lib/openapi/organizations/services/WorkspacesService.js +63 -0
  71. package/lib/openapi/organizations/services/WorkspacesService.js.map +1 -0
  72. package/lib/openapi/organizations/validationSchemaStorage.d.ts +3 -0
  73. package/lib/openapi/organizations/validationSchemaStorage.js +134 -0
  74. package/lib/openapi/organizations/validationSchemaStorage.js.map +1 -0
  75. package/package.json +47 -0
@@ -0,0 +1,637 @@
1
+ import { CommonHttpService } from "../../core/CommonHttpService";
2
+ import { type CreateGroupInput, type AddGroupMembershipInput, type GroupRoleAssignmentInput, type UserProductAccessActivityPage, type RoleApiRequest, type InviteApiRequest } from "../models/directory";
3
+ /**
4
+ * Org Directory APIs
5
+ *
6
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory
7
+ * @category Services
8
+ */
9
+ export declare class DirectoryService extends CommonHttpService {
10
+ /**
11
+ * **The API is available for customers using the [new user management experience
12
+ * only](https://community.atlassian.com/t5/Atlassian-Access-articles/User-management-for-cloud-admins-just-got-easier/ba-p/1576592)**.
13
+ *
14
+ * **This API is in limited availability and access. The development, release, and
15
+ * timing of any features or functionality described herein remain at the sole
16
+ * discretion of Atlassian and are subject to change. Please reach out to
17
+ * Atlassian support to get access to this API.**
18
+ *
19
+ * This API can be used to grant Platform Roles to a user.
20
+ *
21
+ * @path POST `/v1/orgs/{orgId}/users/{userId}/roles/assign`
22
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory#api-v1-orgs-orgid-users-userid-roles-assign-post
23
+ * @param params
24
+ */
25
+ assignRole: ({ orgId, userId, roleApiRequest }: {
26
+ /**
27
+ * Your organization is identified by a Unique ID. You get your organization ID
28
+ * and Organization API key simultaneously.
29
+ */
30
+ orgId: string;
31
+ /**
32
+ * The UserId on which the action(Role Assign) needs to happen. Use the [Search
33
+ * for users within an organization
34
+ * API](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users/#api-v1-orgs-orgid-users-get)
35
+ * to get the userId.
36
+ */
37
+ userId: string;
38
+ roleApiRequest: RoleApiRequest;
39
+ }) => Promise<void>;
40
+ /**
41
+ * **The API is available for customers using the [new user management experience
42
+ * only](https://community.atlassian.com/t5/Atlassian-Access-articles/User-management-for-cloud-admins-just-got-easier/ba-p/1576592)**.
43
+ *
44
+ * **This API is in limited availability and access. The development, release, and
45
+ * timing of any features or functionality described herein remain at the sole
46
+ * discretion of Atlassian and are subject to change. Please reach out to
47
+ * Atlassian support to get access to this API.**
48
+ *
49
+ * Assign roles that grant product access to groups. Please note that this
50
+ * operation adheres to eventual consistency, and it might take up to 30 seconds
51
+ * for changes to take effect.
52
+ *
53
+ * @returns Roles were successfully added to the group
54
+ * @path POST `/v1/orgs/{orgId}/directory/groups/{groupId}/roles/assign`
55
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory#api-v1-orgs-orgid-directory-groups-groupid-roles-assign-post
56
+ * @param params
57
+ */
58
+ assignRoleToGroup: ({ orgId, groupId, groupRoleAssignmentInput }: {
59
+ /**
60
+ * Your organization is identified by a Unique ID. You get your organization ID
61
+ * and Organization API key simultaneously.
62
+ */
63
+ orgId: string;
64
+ /**
65
+ * Unique ID that serves as reference to the group. Use the [Search for groups
66
+ * within an organization
67
+ * API](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-groups/#api-v1-orgs-orgid-groups-search-post)
68
+ * to get the groupId.
69
+ */
70
+ groupId: string;
71
+ groupRoleAssignmentInput: GroupRoleAssignmentInput;
72
+ }) => Promise<{
73
+ /**
74
+ * A description of the entities affected, and changes made as a result of calling
75
+ * this API.
76
+ *
77
+ * @example
78
+ * Group 12345 added Roles. ROLE `user` for RESOURCE `ari:cloud:identity::group/test-group-uuid1` and ROLE `user-access-admin` for RESOURCE `ari:cloud:identity::group/test-group-uuid2` is in progress. Changes may take up to 30 seconds to reflect.
79
+ */
80
+ message: string;
81
+ } & {
82
+ [key: string]: unknown;
83
+ }>;
84
+ /**
85
+ * **The API is available for customers using the new user management experience
86
+ * only. Learn more about the [new user management
87
+ * experience](https://community.atlassian.com/t5/Atlassian-Access-articles/User-management-for-cloud-admins-just-got-easier/ba-p/1576592).**
88
+ *
89
+ * This API will:
90
+ * - Delete a group from the organization's directory.
91
+ * - Delete the permissions, content access, notification schemes, and roles
92
+ * granted to the users.
93
+ *
94
+ * This API will not:
95
+ * - Delete groups that are synchronized through SCIM. To delete these groups, you
96
+ * will need to delete them within your external identity provider. Learn more
97
+ * about [configuring user provisioning with an identity
98
+ * provider](https://support.atlassian.com/provisioning-users/docs/configure-user-provisioning-with-an-identity-provider/).
99
+ * - Delete a group if it’s marked as a [default
100
+ * group](https://support.atlassian.com/user-management/docs/default-groups-and-permissions).
101
+ * - Delete `site-admin` group and therefore revoke org-admin role from a user.
102
+ * - Delete a group if it contains users (unless forced).
103
+ *
104
+ * Learn the fastest way to call the API with a detailed
105
+ * [tutorial](https://developer.atlassian.com/cloud/admin/organization/delete-group/#delete-group).
106
+ *
107
+ * @returns Group was successfully deleted from organization's directory.
108
+ * @path DELETE `/v1/orgs/{orgId}/directory/groups/{groupId}`
109
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory#api-v1-orgs-orgid-directory-groups-groupid-delete
110
+ * @param params
111
+ */
112
+ deleteV1OrgsOrgIdDirectoryGroupsGroupId: ({ orgId, groupId, forceIfNotEmpty }: {
113
+ /**
114
+ * Your organization is identified by a Unique ID. You get your organization ID
115
+ * and Organization API key simultaneously.
116
+ */
117
+ orgId: string;
118
+ /**
119
+ * Unique ID that serves as reference to the group.
120
+ * Use the [Jira Group Search
121
+ * API](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-groups/#api-rest-api-3-groups-picker-get)
122
+ * to get the groupId (if Jira is available for your Organization). **Jira APIs
123
+ * use a different [authentication method
124
+ * ](https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/).**
125
+ * If you don’t have Jira, export a .csv of the user list. Make sure to select
126
+ * **pivot to column** when prompted. Learn how to [export users from a
127
+ * site](https://support.atlassian.com/organization-administration/docs/export-users-from-a-site/).
128
+ */
129
+ groupId: string;
130
+ /**
131
+ * Groups cannot be deleted if it contains users, unless `forceIfNotEmpty=true` is
132
+ * provided
133
+ */
134
+ forceIfNotEmpty?: boolean | undefined;
135
+ }) => Promise<{
136
+ /**
137
+ * A description of the entities affected, and changes made as a result of calling
138
+ * this API.
139
+ *
140
+ * @example
141
+ * Group 0980d761-fce5-4ea1-83e4-9cc8f5db92ae was removed
142
+ */
143
+ message?: string | undefined;
144
+ } & {
145
+ [key: string]: unknown;
146
+ }>;
147
+ /**
148
+ * **The API is available for customers using the new user management experience
149
+ * only. Learn more about the [new user management
150
+ * experience](https://community.atlassian.com/t5/Atlassian-Access-articles/User-management-for-cloud-admins-just-got-easier/ba-p/1576592).**
151
+ *
152
+ * This API will:
153
+ * - Remove user from a group.
154
+ * - Remove multiple permissions for user at once.
155
+ * - Easily manage permissions, content access, notification schemes, and roles.
156
+ *
157
+ * This API will not:
158
+ * - Make modifications to group memberships that are synchronized through SCIM.
159
+ * To make changes to these memberships, you will need to modify them within your
160
+ * external identity provider. Learn more about [configuring user provisioning
161
+ * with an identity
162
+ * provider](https://support.atlassian.com/provisioning-users/docs/configure-user-provisioning-with-an-identity-provider/).
163
+ * - Modify `site-admin` group and therefore revoke org-admin role from a user.
164
+ *
165
+ * Learn the fastest way to call the API with a detailed
166
+ * [tutorial](https://developer.atlassian.com/cloud/admin/organization/remove-user-to-group/).
167
+ *
168
+ * @returns User was successfully removed from the group in the organization directory.
169
+ * @path DELETE `/v1/orgs/{orgId}/directory/groups/{groupId}/memberships/{accountId}`
170
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory#api-v1-orgs-orgid-directory-groups-groupid-memberships-accountid-delete
171
+ * @param params
172
+ */
173
+ deleteV1OrgsOrgIdDirectoryGroupsGroupIdMembershipsAccountId: ({ orgId, groupId, accountId }: {
174
+ /**
175
+ * Your organization is identified by a Unique ID. You get your organization ID
176
+ * and Organization API key simultaneously.
177
+ */
178
+ orgId: string;
179
+ /**
180
+ * Unique ID that serves as reference to the group.
181
+ * Use the [Jira Group Search
182
+ * API](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-groups/#api-rest-api-3-groups-picker-get)
183
+ * to get the groupId (if Jira is available for your Organization). **Jira APIs
184
+ * use a different [authentication method
185
+ * ](https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/).**
186
+ * If you don’t have Jira, export a .csv of the user list. Make sure to select
187
+ * **pivot to column** when prompted. Learn how to [export users from a
188
+ * site](https://support.atlassian.com/organization-administration/docs/export-users-from-a-site/).
189
+ */
190
+ groupId: string;
191
+ /**
192
+ * Unique ID of the user's account that you are adding to the group.
193
+ * Use the [Jira User Search
194
+ * API](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-users-search-get)
195
+ * to get the accountId (if Jira is available for your Organization). **Jira APIs
196
+ * use a different [authentication method
197
+ * ](https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/).**
198
+ * If you don’t have Jira, export a .csv of the user list. Learn how to [export
199
+ * users from a
200
+ * site](https://support.atlassian.com/organization-administration/docs/export-users-from-a-site/).
201
+ */
202
+ accountId: string;
203
+ }) => Promise<{
204
+ /**
205
+ * A description of the entities affected, and changes made as a result of calling
206
+ * this API.
207
+ *
208
+ * @example
209
+ * User 63ec0aa0c5061c632c0cddde was removed from group fca77b90-a2a9-4385-961b-1377b3dbeb0b
210
+ */
211
+ message?: string | undefined;
212
+ } & {
213
+ [key: string]: unknown;
214
+ }>;
215
+ /**
216
+ * **The API is available for customers using the new user management experience
217
+ * only.** Learn more about the [new user management
218
+ * experience](https://community.atlassian.com/t5/Atlassian-Access-articles/User-management-for-cloud-admins-just-got-easier/ba-p/1576592).
219
+ *
220
+ * Specifications:
221
+ * - Remove user access to products listed in Atlassian Administration.
222
+ * - Remove users from **Users** and **Groups** in **Directory**.
223
+ * - Make product licenses available for active users.
224
+ *
225
+ * The users are not removed immediately; instead, they are placed in a queue for
226
+ * deletion. Please note that it may take some time for all users to be completely
227
+ * removed.
228
+ *
229
+ * Users with emails whose domain is claimed can still be found in **Managed
230
+ * accounts** in **Directory**.
231
+ *
232
+ * Learn the fastest way to call the API with a detailed
233
+ * [tutorial](https://developer.atlassian.com/cloud/admin/organization/remove-user/).
234
+ *
235
+ * @path DELETE `/v1/orgs/{orgId}/directory/users/{accountId}`
236
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory#api-v1-orgs-orgid-directory-users-accountid-delete
237
+ * @param params
238
+ */
239
+ deleteV1OrgsOrgIdDirectoryUsersAccountId: ({ orgId, accountId }: {
240
+ /**
241
+ * Your organization is identified by a Unique ID. You get your organization ID
242
+ * and Organization API key simultaneously.
243
+ */
244
+ orgId: string;
245
+ /**
246
+ * Unique ID of the user's account that you are deleting.
247
+ * Use the [Jira User Search
248
+ * API](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-users-search-get)
249
+ * to get the accountId (if Jira is available for your Organization). **Jira APIs
250
+ * use a different [authentication method
251
+ * ](https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/).**
252
+ * If you don’t have Jira, export a .csv of the user list. Learn how to [export
253
+ * users from a
254
+ * site](https://support.atlassian.com/organization-administration/docs/export-users-from-a-site/).
255
+ */
256
+ accountId: string;
257
+ }) => Promise<void>;
258
+ /**
259
+ * **Additional response parameters of the API (for e.g., `added_to_org`) are
260
+ * available only to customers using the new user management experience.** Learn
261
+ * more about the [new user management
262
+ * experience](https://community.atlassian.com/t5/Atlassian-Access-articles/User-management-for-cloud-admins-just-got-easier/ba-p/1576592).
263
+ *
264
+ * Specifications:
265
+ * - Return a user’s last active date for each product listed in Atlassian
266
+ * Administration.
267
+ * - Active is defined as viewing a product's page for a minimum of 2 seconds.
268
+ * - The data for the last activity may be delayed by up to 24 hours.
269
+ * - If the user has not accessed a product, the `product_access` response field
270
+ * will be empty.
271
+ *
272
+ * Learn the fastest way to call the API with a detailed
273
+ * [tutorial](https://developer.atlassian.com/cloud/admin/organization/user-last-active-dates/).
274
+ *
275
+ * @returns Successful operation
276
+ * @path GET `/v1/orgs/{orgId}/directory/users/{accountId}/last-active-dates`
277
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory#api-v1-orgs-orgid-directory-users-accountid-last-active-dates-get
278
+ * @param params
279
+ */
280
+ getV1OrgsOrgIdDirectoryUsersAccountIdLastActiveDates: ({ orgId, accountId, cursor }: {
281
+ /**
282
+ * Your organization is identified by a Unique ID. You get your organization ID
283
+ * and Organization API key simultaneously.
284
+ */
285
+ orgId: string;
286
+ /**
287
+ * Unique ID of the user's account.
288
+ * Use the [Jira User Search
289
+ * API](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-users-search-get)
290
+ * to get the accountId (if Jira is available for your Organization). **Jira APIs
291
+ * use a different [authentication method
292
+ * ](https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/).**
293
+ * If you don’t have Jira, export a .csv of the user list. Learn how to [export
294
+ * users from a
295
+ * site](https://support.atlassian.com/organization-administration/docs/export-users-from-a-site/).
296
+ */
297
+ accountId: string;
298
+ /** Cursor to fetch the next page */
299
+ cursor?: string | undefined;
300
+ }) => Promise<UserProductAccessActivityPage>;
301
+ /**
302
+ * **The API is available for customers using the new user management experience
303
+ * only. Learn more about the [new user management
304
+ * experience](https://community.atlassian.com/t5/Atlassian-Access-articles/User-management-for-cloud-admins-just-got-easier/ba-p/1576592).**
305
+ *
306
+ * This API will:
307
+ * - Create a group in the organization's directory.
308
+ * - Create a collection of users that you can use to easily manage permissions,
309
+ * content access, notification schemes, and roles.
310
+ *
311
+ * **The creation of new groups using existing group names is not permitted.**
312
+ *
313
+ * Learn the fastest way to call the API with a detailed
314
+ * [tutorial](https://developer.atlassian.com/cloud/admin/organization/create-group/#create-group).
315
+ *
316
+ * @returns Request to create group was successfully accepted and will be eventually created in the organization directory.
317
+ * @path POST `/v1/orgs/{orgId}/directory/groups`
318
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory#api-v1-orgs-orgid-directory-groups-post
319
+ * @param params
320
+ */
321
+ postV1OrgsOrgIdDirectoryGroups: ({ orgId, createGroupInput }: {
322
+ /**
323
+ * Your organization is identified by a Unique ID. You get your organization ID
324
+ * and Organization API key simultaneously.
325
+ */
326
+ orgId: string;
327
+ createGroupInput: CreateGroupInput;
328
+ }) => Promise<{
329
+ /**
330
+ * A description of the entities affected, and changes made as a result of calling
331
+ * this API.
332
+ *
333
+ * @example
334
+ * Group test-group was created
335
+ */
336
+ message?: string | undefined;
337
+ /**
338
+ * The unique identifier of the group.
339
+ *
340
+ * @example
341
+ * f29c72a8-7681-4ed0-8a2c-83372bf67437
342
+ */
343
+ groupId?: string | undefined;
344
+ } & {
345
+ [key: string]: unknown;
346
+ }>;
347
+ /**
348
+ * **The API is available for customers using the new user management experience
349
+ * only. Learn more about the [new user management
350
+ * experience](https://community.atlassian.com/t5/Atlassian-Access-articles/User-management-for-cloud-admins-just-got-easier/ba-p/1576592).**
351
+ *
352
+ * This API will:
353
+ * - Add user to a group.
354
+ * - Assign multiple permissions to user at once.
355
+ * - Easily manage permissions, content access, notification schemes, and roles.
356
+ *
357
+ * This API will not:
358
+ * - Make modifications to group memberships that are synchronized through SCIM.
359
+ * To make changes to these memberships, you will need to modify them within your
360
+ * external identity provider. Learn more about [configuring user provisioning
361
+ * with an identity
362
+ * provider](https://support.atlassian.com/provisioning-users/docs/configure-user-provisioning-with-an-identity-provider/).
363
+ * - Add a user to a group that gives access to a product which is breaching it's
364
+ * license limit.\
365
+ * To make these changes, you will need to [remove
366
+ * users](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory/#api-v1-orgs-orgid-directory-groups-groupid-memberships-accountid-delete)
367
+ * from the group or
368
+ * [suspend
369
+ * users](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory/#api-v1-orgs-orgid-directory-users-accountid-suspend-access-post)
370
+ * that are in the group first.\
371
+ * You can also [manage your
372
+ * subscription](https://support.atlassian.com/subscriptions-and-billing/resources/)
373
+ * for the breaching product to increase your license limits.
374
+ * - Add a user to any group when your organisation has too many products that are
375
+ * breaching their license limits.
376
+ *
377
+ * Learn the fastest way to call the API with a detailed
378
+ * [tutorial](https://developer.atlassian.com/cloud/admin/organization/add-user-to-group/).
379
+ *
380
+ * @returns User was successfully added to the group in the organization directory.
381
+ * @path POST `/v1/orgs/{orgId}/directory/groups/{groupId}/memberships`
382
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory#api-v1-orgs-orgid-directory-groups-groupid-memberships-post
383
+ * @param params
384
+ */
385
+ postV1OrgsOrgIdDirectoryGroupsGroupIdMemberships: ({ orgId, groupId, addGroupMembershipInput }: {
386
+ /**
387
+ * Your organization is identified by a Unique ID. You get your organization ID
388
+ * and Organization API key simultaneously.
389
+ */
390
+ orgId: string;
391
+ /**
392
+ * Unique ID that serves as reference to the group.
393
+ * Use the [Jira Group Search
394
+ * API](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-groups/#api-rest-api-3-groups-picker-get)
395
+ * to get the groupId (if Jira is available for your Organization). **Jira APIs
396
+ * use a different [authentication method
397
+ * ](https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/).**
398
+ * If you don’t have Jira, export a .csv of the user list. Make sure to select
399
+ * **pivot to column** when prompted. Learn how to [export users from a
400
+ * site](https://support.atlassian.com/organization-administration/docs/export-users-from-a-site/).
401
+ */
402
+ groupId: string;
403
+ addGroupMembershipInput: AddGroupMembershipInput;
404
+ }) => Promise<{
405
+ /**
406
+ * A description of the entities affected, and changes made as a result of calling
407
+ * this API.
408
+ *
409
+ * @example
410
+ * User 637194fa77acd224b33bfae3 was added to group 9233fb03-53cc-4463-9698-047aedbffb5c
411
+ */
412
+ message?: string | undefined;
413
+ } & {
414
+ [key: string]: unknown;
415
+ }>;
416
+ /**
417
+ * **The API is available for customers using the new user management experience
418
+ * only.** Learn more about the [new user management
419
+ * experience](https://community.atlassian.com/t5/Atlassian-Access-articles/User-management-for-cloud-admins-just-got-easier/ba-p/1576592).
420
+ *
421
+ * This API will:
422
+ * - Restore access of an existing user to products listed in Atlassian
423
+ * Administration.
424
+ * - Retract the suspend user action.
425
+ *
426
+ * This API will not:
427
+ * - Restore access to a user when they have access to a product which is
428
+ * breaching it's license limit.\
429
+ * To make these changes, you will need to [remove
430
+ * users](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory/#api-v1-orgs-orgid-directory-groups-groupid-memberships-accountid-delete)
431
+ * from the group or
432
+ * [suspend
433
+ * users](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory/#api-v1-orgs-orgid-directory-users-accountid-suspend-access-post)
434
+ * that are in the group first.\
435
+ * You can also [manage your
436
+ * subscription](https://support.atlassian.com/subscriptions-and-billing/resources/)
437
+ * for the breaching product to increase your license limits.
438
+ * - Restore access to any user when your organisation has too many products that
439
+ * are breaching their license limits.
440
+ *
441
+ * Learn the fastest way to call the API with a detailed
442
+ * [tutorial](https://developer.atlassian.com/cloud/admin/organization/restore-user/).
443
+ *
444
+ * @returns User's access is successfully restored in the organization directory.
445
+ * @path POST `/v1/orgs/{orgId}/directory/users/{accountId}/restore-access`
446
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory#api-v1-orgs-orgid-directory-users-accountid-restore-access-post
447
+ * @param params
448
+ */
449
+ postV1OrgsOrgIdDirectoryUsersAccountIdRestoreAccess: ({ orgId, accountId }: {
450
+ /**
451
+ * Your organization is identified by a Unique ID. You get your organization ID
452
+ * and Organization API key simultaneously.
453
+ */
454
+ orgId: string;
455
+ /**
456
+ * Unique ID of the user's account that you are suspending.
457
+ * Use the [Jira User Search
458
+ * API](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-users-search-get)
459
+ * to get the accountId (if Jira is available for your Organization). **Jira APIs
460
+ * use a different [authentication method
461
+ * ](https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/).**
462
+ * If you don’t have Jira, export a .csv of the user list. Learn how to [export
463
+ * users from a
464
+ * site](https://support.atlassian.com/organization-administration/docs/export-users-from-a-site/).
465
+ */
466
+ accountId: string;
467
+ }) => Promise<{
468
+ /**
469
+ * A description of the entities affected, and changes made as a result of calling
470
+ * this API.
471
+ *
472
+ * @example
473
+ * Access to organization 6665kc2j-4644-14k8-j32c-68cc0b1d15b8 was restored for user 637194fa77acd224b33bfae3
474
+ */
475
+ message?: string | undefined;
476
+ } & {
477
+ [key: string]: unknown;
478
+ }>;
479
+ /**
480
+ * **The API is available for customers using the new user management experience
481
+ * only.** Learn more about the [new user management
482
+ * experience](https://community.atlassian.com/t5/Atlassian-Access-articles/User-management-for-cloud-admins-just-got-easier/ba-p/1576592).
483
+ *
484
+ * Specifications:
485
+ * - Suspend user access to products listed in Atlassian Administration while
486
+ * keeping the account active.
487
+ * - Make product licenses available for active users.
488
+ * - Maintain respective users in **Groups** for easy restoration.
489
+ *
490
+ * User access can be restored anytime via the [Restore access
491
+ * API](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory/#api-v1-orgs-orgid-directory-users-accountid-restore-access-post)
492
+ *
493
+ * Learn the fastest way to call the API with a detailed
494
+ * [tutorial](https://developer.atlassian.com/cloud/admin/organization/suspend-user/).
495
+ *
496
+ * @returns User was successfully suspended in the organization directory.
497
+ * @path POST `/v1/orgs/{orgId}/directory/users/{accountId}/suspend-access`
498
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory#api-v1-orgs-orgid-directory-users-accountid-suspend-access-post
499
+ * @param params
500
+ */
501
+ postV1OrgsOrgIdDirectoryUsersAccountIdSuspendAccess: ({ orgId, accountId }: {
502
+ /**
503
+ * Your organization is identified by a Unique ID. You get your organization ID
504
+ * and Organization API key simultaneously.
505
+ */
506
+ orgId: string;
507
+ /**
508
+ * Unique ID of the user's account that you are suspending.
509
+ * Use the [Jira User Search
510
+ * API](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-users-search-get)
511
+ * to get the accountId (if Jira is available for your Organization). **Jira APIs
512
+ * use a different [authentication method
513
+ * ](https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/).**
514
+ * If you don’t have Jira, export a .csv of the user list. Learn how to [export
515
+ * users from a
516
+ * site](https://support.atlassian.com/organization-administration/docs/export-users-from-a-site/).
517
+ */
518
+ accountId: string;
519
+ }) => Promise<{
520
+ /**
521
+ * A description of the entities affected, and changes made as a result of calling
522
+ * this API.
523
+ *
524
+ * @example
525
+ * Access to organization 6665kc2j-4644-14k8-j32c-68cc0b1d15b8 was suspended for user 637194fa77acd224b33bfae3
526
+ */
527
+ message?: string | undefined;
528
+ } & {
529
+ [key: string]: unknown;
530
+ }>;
531
+ /**
532
+ * **The API is available for customers using the [new user management experience
533
+ * only](https://community.atlassian.com/t5/Atlassian-Access-articles/User-management-for-cloud-admins-just-got-easier/ba-p/1576592)**.
534
+ *
535
+ * **This API is in limited availability and access. The development, release, and
536
+ * timing of any features or functionality described herein remain at the sole
537
+ * discretion of Atlassian and are subject to change. Please reach out to
538
+ * Atlassian support to get access to this API.**
539
+ *
540
+ * This API will:
541
+ * - invite user to org and add them to the directory
542
+ * - assign a role for a given resource
543
+ * - send email if the sendNotification field is set true with optional custom
544
+ * message for the email
545
+ *
546
+ * This API will not:
547
+ * - add users to group
548
+ *
549
+ * @returns Invitation successfully sent
550
+ * @path POST `/v1/orgs/{orgId}/users/invite`
551
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory#api-v1-orgs-orgid-users-invite-post
552
+ * @param params
553
+ */
554
+ postV1OrgsOrgIdUsersInvite: ({ orgId, inviteApiRequest }: {
555
+ /**
556
+ * Your organization is identified by a Unique ID. You get your organization ID
557
+ * and Organization API key simultaneously.
558
+ */
559
+ orgId: string;
560
+ inviteApiRequest: InviteApiRequest;
561
+ }) => Promise<string[]>;
562
+ /**
563
+ * **The API is available for customers using the [new user management experience
564
+ * only](https://community.atlassian.com/t5/Atlassian-Access-articles/User-management-for-cloud-admins-just-got-easier/ba-p/1576592)**.
565
+ *
566
+ * **This API is in limited availability and access. The development, release, and
567
+ * timing of any features or functionality described herein remain at the sole
568
+ * discretion of Atlassian and are subject to change. Please reach out to
569
+ * Atlassian support to get access to this API.**
570
+ *
571
+ * This API can be used to revoke Platform Roles from a user.
572
+ *
573
+ * @path POST `/v1/orgs/{orgId}/users/{userId}/roles/revoke`
574
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory#api-v1-orgs-orgid-users-userid-roles-revoke-post
575
+ * @param params
576
+ */
577
+ revokeRole: ({ orgId, userId, roleApiRequest }: {
578
+ /**
579
+ * Your organization is identified by a Unique ID. You get your organization ID
580
+ * and Organization API key simultaneously.
581
+ */
582
+ orgId: string;
583
+ /**
584
+ * The UserId on which the action(Role Revoke) needs to happen. Use the [Search
585
+ * for users within an organization
586
+ * API](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users/#api-v1-orgs-orgid-users-get)
587
+ * to get the userId.
588
+ */
589
+ userId: string;
590
+ roleApiRequest: RoleApiRequest;
591
+ }) => Promise<void>;
592
+ /**
593
+ * **The API is available for customers using the [new user management experience
594
+ * only](https://community.atlassian.com/t5/Atlassian-Access-articles/User-management-for-cloud-admins-just-got-easier/ba-p/1576592)**.
595
+ *
596
+ * **This API is in limited availability and access. The development, release, and
597
+ * timing of any features or functionality described herein remain at the sole
598
+ * discretion of Atlassian and are subject to change. Please reach out to
599
+ * Atlassian support to get access to this API.**
600
+ *
601
+ * Revoke roles that provide product access to groups. It's important to note that
602
+ * this operation follows eventual consistency principles and may require up to 30
603
+ * seconds to take effect.
604
+ *
605
+ * @returns Roles were successfully removed from the group
606
+ * @path POST `/v1/orgs/{orgId}/directory/groups/{groupId}/roles/revoke`
607
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory#api-v1-orgs-orgid-directory-groups-groupid-roles-revoke-post
608
+ * @param params
609
+ */
610
+ revokeRoleToGroup: ({ orgId, groupId, groupRoleAssignmentInput }: {
611
+ /**
612
+ * Your organization is identified by a Unique ID. You get your organization ID
613
+ * and Organization API key simultaneously.
614
+ */
615
+ orgId: string;
616
+ /**
617
+ * Unique ID that serves as reference to the group. Use the [Search for groups
618
+ * within an organization
619
+ * API](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-groups/#api-v1-orgs-orgid-groups-search-post)
620
+ * to get the groupId.
621
+ */
622
+ groupId: string;
623
+ groupRoleAssignmentInput: GroupRoleAssignmentInput;
624
+ }) => Promise<{
625
+ /**
626
+ * A description of the entities affected, and changes made as a result of calling
627
+ * this API.
628
+ *
629
+ * @example
630
+ * Group 12345 revoked Roles. ROLE1 for RESOURCE1 and ROLE2 for RESOURCE2 is in progress. Changes may take up to 30 seconds to reflect.
631
+ */
632
+ message: string;
633
+ } & {
634
+ [key: string]: unknown;
635
+ }>;
636
+ protected static initialize(): void;
637
+ }