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