@resolution/organizations-api-client 0.16.1 → 0.16.4

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.
@@ -8,6 +8,30 @@ import { type UserProductAccessActivityPage, type UserPage, type OrganizationLev
8
8
  * @category Services
9
9
  */
10
10
  export declare class UsersService extends CommonHttpService {
11
+ /**
12
+ * Assign an organization-level role to a user. These are roles that have
13
+ * organization-wide privileges, like organization admin.
14
+ *
15
+ * This operation follows eventual consistency. Changes may take up to 30 seconds
16
+ * to be reflected after the operation is performed.
17
+ *
18
+ * @path POST `/v1/orgs/{orgId}/users/{userId}/role-assignments/assign`
19
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users#api-v1-orgs-orgid-users-userid-role-assignments-assign-post
20
+ * @param params
21
+ */
22
+ assignOrganizationLevelRole: ({ orgId, userId, organizationLevelRoleApiRequest }: {
23
+ /**
24
+ * Your organization has a unique ID. Find this ID in your Atlassian
25
+ * Administration URL or when you create your API key.
26
+ */
27
+ orgId: string;
28
+ /**
29
+ * Every user has a unique ID. Find a user’s account ID by using the [Get users
30
+ * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users/#api-v2-orgs-orgid-directories-directoryid-users-get).
31
+ */
32
+ userId: string;
33
+ organizationLevelRoleApiRequest: OrganizationLevelRoleApiRequest;
34
+ }) => Promise<void>;
11
35
  /**
12
36
  * **The API is available for customers using the [new user management experience
13
37
  * only](https://community.atlassian.com/t5/Atlassian-Access-articles/User-management-for-cloud-admins-just-got-easier/ba-p/1576592)**.
@@ -82,36 +106,6 @@ export declare class UsersService extends CommonHttpService {
82
106
  */
83
107
  accountId: string;
84
108
  }) => Promise<void>;
85
- /**
86
- * Remove a user from a directory if you don’t want them to appear in your
87
- * directory or have access to your apps anymore. You’re not billed for a user
88
- * once they’re removed.
89
- * You must invite the user to your organization again if you want to reinstate
90
- * their access to your apps. You’ll need to assign their roles and group
91
- * memberships again.
92
- *
93
- * @path DELETE `/v2/orgs/{orgId}/directories/{directoryId}/users/{accountId}`
94
- * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users#api-v2-orgs-orgid-directories-directoryid-users-accountid-delete
95
- * @param params
96
- */
97
- deleteV2OrgsOrgIdDirectoriesDirectoryIdUsersAccountId: ({ orgId, directoryId, accountId }: {
98
- /**
99
- * Your organization has a unique ID. Find this ID in your Atlassian
100
- * Administration URL or when you create your API key.
101
- */
102
- orgId: string;
103
- /**
104
- * A directory has a unique ID. Use the [Get directories
105
- * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory/#api-v2-orgs-orgid-directories-get)
106
- * to find the directory ID.
107
- */
108
- directoryId: string;
109
- /**
110
- * Every user has a unique ID. Find a user’s account ID by using the [Get users
111
- * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users/#api-v2-orgs-orgid-directories-directoryid-users-get).
112
- */
113
- accountId: string;
114
- }) => Promise<void>;
115
109
  /**
116
110
  * Return a page of users in your organization that match the supplied parameters.
117
111
  * By default, users in all your directories and all your managed accounts are
@@ -394,6 +388,49 @@ export declare class UsersService extends CommonHttpService {
394
388
  } & {
395
389
  [key: string]: unknown;
396
390
  }>;
391
+ /**
392
+ * **Additional response parameters of the API (for e.g., `added_to_org`) are
393
+ * available only to customers using the new user management experience.** Learn
394
+ * more about the [new user management
395
+ * experience](https://community.atlassian.com/t5/Atlassian-Access-articles/User-management-for-cloud-admins-just-got-easier/ba-p/1576592).
396
+ *
397
+ * Specifications:
398
+ * - Return a user’s last active date for each product listed in Atlassian
399
+ * Administration.
400
+ * - Active is defined as viewing a product's page for a minimum of 2 seconds.
401
+ * - The data for the last activity may be delayed by up to 24 hours.
402
+ * - If the user has not accessed a product, the `product_access` response field
403
+ * will be empty.
404
+ *
405
+ * Learn the fastest way to call the API with a detailed
406
+ * [tutorial](https://developer.atlassian.com/cloud/admin/organization/user-last-active-dates/).
407
+ *
408
+ * @returns Successful operation
409
+ * @path GET `/v1/orgs/{orgId}/directory/users/{accountId}/last-active-dates`
410
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users#api-v1-orgs-orgid-directory-users-accountid-last-active-dates-get
411
+ * @param params
412
+ */
413
+ getUserLastActiveDates: ({ orgId, accountId, cursor }: {
414
+ /**
415
+ * Your organization has a unique ID. Find this ID in your Atlassian
416
+ * Administration URL or when you create your API key.
417
+ */
418
+ orgId: string;
419
+ /**
420
+ * Unique ID of the user's account.
421
+ * Use the [Jira User Search
422
+ * API](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-users-search-get)
423
+ * to get the accountId (if Jira is available for your Organization). **Jira APIs
424
+ * use a different [authentication method
425
+ * ](https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/).**
426
+ * If you don’t have Jira, export a .csv of the user list. Learn how to [export
427
+ * users from a
428
+ * site](https://support.atlassian.com/organization-administration/docs/export-users-from-a-site/).
429
+ */
430
+ accountId: string;
431
+ /** Cursor to fetch the next page */
432
+ cursor?: string | undefined;
433
+ }) => Promise<UserProductAccessActivityPage>;
397
434
  /**
398
435
  * Returns a page of role assignments for a user that match the supplied
399
436
  * parameters.
@@ -519,48 +556,41 @@ export declare class UsersService extends CommonHttpService {
519
556
  directoryId: string;
520
557
  }) => Promise<MultiDirectoryUserStats>;
521
558
  /**
522
- * **Additional response parameters of the API (for e.g., `added_to_org`) are
523
- * available only to customers using the new user management experience.** Learn
524
- * more about the [new user management
525
- * experience](https://community.atlassian.com/t5/Atlassian-Access-articles/User-management-for-cloud-admins-just-got-easier/ba-p/1576592).
559
+ * Invite people to your organization. When you invite someone:
560
+ * - they’re given app roles according to your invitation.
561
+ * - they’re added to directories based on apps in your invitation.
562
+ * - they’re added to groups according to your invitation.
563
+ * - they receive an email invitation if the `sendNotification` field is set to
564
+ * `true` and the `notificationText` field contains a message to include in the
565
+ * email invitation.
526
566
  *
527
- * Specifications:
528
- * - Return a user’s last active date for each product listed in Atlassian
529
- * Administration.
530
- * - Active is defined as viewing a product's page for a minimum of 2 seconds.
531
- * - The data for the last activity may be delayed by up to 24 hours.
532
- * - If the user has not accessed a product, the `product_access` response field
533
- * will be empty.
567
+ * **This API is only available to customers who have at least one paid
568
+ * subscription in their organization.**
534
569
  *
535
- * Learn the fastest way to call the API with a detailed
536
- * [tutorial](https://developer.atlassian.com/cloud/admin/organization/user-last-active-dates/).
570
+ * @returns
571
+ * * status: 200, mediaType: application/json
537
572
  *
538
- * @returns Successful operation
539
- * @path GET `/v1/orgs/{orgId}/directory/users/{accountId}/last-active-dates`
540
- * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users#api-v1-orgs-orgid-directory-users-accountid-last-active-dates-get
573
+ * Success
574
+ *
575
+ * * status: 206, mediaType: application/json
576
+ *
577
+ * At least one invitation failed
578
+ * @path POST `/v2/orgs/{orgId}/users/invite`
579
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users#api-v2-orgs-orgid-users-invite-post
541
580
  * @param params
542
581
  */
543
- getV1OrgsOrgIdDirectoryUsersAccountIdLastActiveDates: ({ orgId, accountId, cursor }: {
582
+ inviteUsersToOrganization: ({ orgId, multidirectoryInviteApiRequest }: {
544
583
  /**
545
584
  * Your organization has a unique ID. Find this ID in your Atlassian
546
585
  * Administration URL or when you create your API key.
547
586
  */
548
587
  orgId: string;
549
- /**
550
- * Unique ID of the user's account.
551
- * Use the [Jira User Search
552
- * API](https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-users/#api-rest-api-3-users-search-get)
553
- * to get the accountId (if Jira is available for your Organization). **Jira APIs
554
- * use a different [authentication method
555
- * ](https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/).**
556
- * If you don’t have Jira, export a .csv of the user list. Learn how to [export
557
- * users from a
558
- * site](https://support.atlassian.com/organization-administration/docs/export-users-from-a-site/).
559
- */
560
- accountId: string;
561
- /** Cursor to fetch the next page */
562
- cursor?: string | undefined;
563
- }) => Promise<UserProductAccessActivityPage>;
588
+ multidirectoryInviteApiRequest: MultidirectoryInviteApiRequest;
589
+ }) => Promise<commonHttpClient.WithResponse<{
590
+ status: 200 | 206;
591
+ mediaType: "application/json";
592
+ body: MultidirectoryInviteSuccessResponse;
593
+ }>>;
564
594
  /**
565
595
  * **This API is deprecated and will no longer work after June 30, 2026.** Use the
566
596
  * [Restore user access in directory
@@ -718,30 +748,6 @@ export declare class UsersService extends CommonHttpService {
718
748
  orgId: string;
719
749
  inviteApiRequest: InviteApiRequest;
720
750
  }) => Promise<string[]>;
721
- /**
722
- * Assign an organization-level role to a user. These are roles that have
723
- * organization-wide privileges, like organization admin.
724
- *
725
- * This operation follows eventual consistency. Changes may take up to 30 seconds
726
- * to be reflected after the operation is performed.
727
- *
728
- * @path POST `/v1/orgs/{orgId}/users/{userId}/role-assignments/assign`
729
- * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users#api-v1-orgs-orgid-users-userid-role-assignments-assign-post
730
- * @param params
731
- */
732
- postV1OrgsOrgIdUsersUserIdRoleAssignmentsAssign: ({ orgId, userId, organizationLevelRoleApiRequest }: {
733
- /**
734
- * Your organization has a unique ID. Find this ID in your Atlassian
735
- * Administration URL or when you create your API key.
736
- */
737
- orgId: string;
738
- /**
739
- * Every user has a unique ID. Find a user’s account ID by using the [Get users
740
- * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users/#api-v2-orgs-orgid-directories-directoryid-users-get).
741
- */
742
- userId: string;
743
- organizationLevelRoleApiRequest: OrganizationLevelRoleApiRequest;
744
- }) => Promise<void>;
745
751
  /**
746
752
  * Remove an organization-level role from a user. These are roles that have
747
753
  * organization-wide privileges, like organization admin.
@@ -753,7 +759,7 @@ export declare class UsersService extends CommonHttpService {
753
759
  * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users#api-v1-orgs-orgid-users-userid-role-assignments-revoke-post
754
760
  * @param params
755
761
  */
756
- postV1OrgsOrgIdUsersUserIdRoleAssignmentsRevoke: ({ orgId, userId, organizationLevelRoleApiRequest }: {
762
+ removeOrganizationLevelRole: ({ orgId, userId, organizationLevelRoleApiRequest }: {
757
763
  /**
758
764
  * Your organization has a unique ID. Find this ID in your Atlassian
759
765
  * Administration URL or when you create your API key.
@@ -767,15 +773,18 @@ export declare class UsersService extends CommonHttpService {
767
773
  organizationLevelRoleApiRequest: OrganizationLevelRoleApiRequest;
768
774
  }) => Promise<void>;
769
775
  /**
770
- * Restore a user’s access in a directory to let them access apps again. They
771
- * regain their roles and group memberships from before their access was
772
- * suspended. We resume billing you for this user.
776
+ * Remove a user from a directory if you don’t want them to appear in your
777
+ * directory or have access to your apps anymore. You’re not billed for a user
778
+ * once they’re removed.
779
+ * You must invite the user to your organization again if you want to reinstate
780
+ * their access to your apps. You’ll need to assign their roles and group
781
+ * memberships again.
773
782
  *
774
- * @path POST `/v2/orgs/{orgId}/directories/{directoryId}/users/{accountId}/restore`
775
- * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users#api-v2-orgs-orgid-directories-directoryid-users-accountid-restore-post
783
+ * @path DELETE `/v2/orgs/{orgId}/directories/{directoryId}/users/{accountId}`
784
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users#api-v2-orgs-orgid-directories-directoryid-users-accountid-delete
776
785
  * @param params
777
786
  */
778
- postV2OrgsOrgIdDirectoriesDirectoryIdUsersAccountIdRestore: ({ orgId, directoryId, accountId }: {
787
+ removeUserFromDirectory: ({ orgId, directoryId, accountId }: {
779
788
  /**
780
789
  * Your organization has a unique ID. Find this ID in your Atlassian
781
790
  * Administration URL or when you create your API key.
@@ -794,15 +803,15 @@ export declare class UsersService extends CommonHttpService {
794
803
  accountId: string;
795
804
  }) => Promise<void>;
796
805
  /**
797
- * Suspend a user’s access in a directory to remove their access to apps
798
- * temporarily. You’re not billed for a user when their access is suspended. They
799
- * regain their roles and group memberships when you restore their access.
806
+ * Restore a user’s access in a directory to let them access apps again. They
807
+ * regain their roles and group memberships from before their access was
808
+ * suspended. We resume billing you for this user.
800
809
  *
801
- * @path POST `/v2/orgs/{orgId}/directories/{directoryId}/users/{accountId}/suspend`
802
- * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users#api-v2-orgs-orgid-directories-directoryid-users-accountid-suspend-post
810
+ * @path POST `/v2/orgs/{orgId}/directories/{directoryId}/users/{accountId}/restore`
811
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users#api-v2-orgs-orgid-directories-directoryid-users-accountid-restore-post
803
812
  * @param params
804
813
  */
805
- postV2OrgsOrgIdDirectoriesDirectoryIdUsersAccountIdSuspend: ({ orgId, directoryId, accountId }: {
814
+ restoreUserAccessInDirectory: ({ orgId, directoryId, accountId }: {
806
815
  /**
807
816
  * Your organization has a unique ID. Find this ID in your Atlassian
808
817
  * Administration URL or when you create your API key.
@@ -820,42 +829,6 @@ export declare class UsersService extends CommonHttpService {
820
829
  */
821
830
  accountId: string;
822
831
  }) => Promise<void>;
823
- /**
824
- * Invite people to your organization. When you invite someone:
825
- * - they’re given app roles according to your invitation.
826
- * - they’re added to directories based on apps in your invitation.
827
- * - they’re added to groups according to your invitation.
828
- * - they receive an email invitation if the `sendNotification` field is set to
829
- * `true` and the `notificationText` field contains a message to include in the
830
- * email invitation.
831
- *
832
- * **This API is only available to customers who have at least one paid
833
- * subscription in their organization.**
834
- *
835
- * @returns
836
- * * status: 200, mediaType: application/json
837
- *
838
- * Success
839
- *
840
- * * status: 206, mediaType: application/json
841
- *
842
- * At least one invitation failed
843
- * @path POST `/v2/orgs/{orgId}/users/invite`
844
- * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users#api-v2-orgs-orgid-users-invite-post
845
- * @param params
846
- */
847
- postV2OrgsOrgIdUsersInvite: ({ orgId, multidirectoryInviteApiRequest }: {
848
- /**
849
- * Your organization has a unique ID. Find this ID in your Atlassian
850
- * Administration URL or when you create your API key.
851
- */
852
- orgId: string;
853
- multidirectoryInviteApiRequest: MultidirectoryInviteApiRequest;
854
- }) => Promise<commonHttpClient.WithResponse<{
855
- status: 200 | 206;
856
- mediaType: "application/json";
857
- body: MultidirectoryInviteSuccessResponse;
858
- }>>;
859
832
  /**
860
833
  * **The API is available for customers using the [new user management experience
861
834
  * only](https://community.atlassian.com/t5/Atlassian-Access-articles/User-management-for-cloud-admins-just-got-easier/ba-p/1576592)**.
@@ -933,5 +906,32 @@ export declare class UsersService extends CommonHttpService {
933
906
  */
934
907
  usersSearchRequest: UsersSearchRequest;
935
908
  }) => Promise<UsersSearchPage>;
909
+ /**
910
+ * Suspend a user’s access in a directory to remove their access to apps
911
+ * temporarily. You’re not billed for a user when their access is suspended. They
912
+ * regain their roles and group memberships when you restore their access.
913
+ *
914
+ * @path POST `/v2/orgs/{orgId}/directories/{directoryId}/users/{accountId}/suspend`
915
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users#api-v2-orgs-orgid-directories-directoryid-users-accountid-suspend-post
916
+ * @param params
917
+ */
918
+ suspendUserAccessInDirectory: ({ orgId, directoryId, accountId }: {
919
+ /**
920
+ * Your organization has a unique ID. Find this ID in your Atlassian
921
+ * Administration URL or when you create your API key.
922
+ */
923
+ orgId: string;
924
+ /**
925
+ * A directory has a unique ID. Use the [Get directories
926
+ * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory/#api-v2-orgs-orgid-directories-get)
927
+ * to find the directory ID.
928
+ */
929
+ directoryId: string;
930
+ /**
931
+ * Every user has a unique ID. Find a user’s account ID by using the [Get users
932
+ * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users/#api-v2-orgs-orgid-directories-directoryid-users-get).
933
+ */
934
+ accountId: string;
935
+ }) => Promise<void>;
936
936
  protected static initialize(): void;
937
937
  }