@resolution/organizations-api-client 0.16.1 → 0.16.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.
package/lib/index.js CHANGED
@@ -34,13 +34,31 @@ const BaseOrganizationsApiClient_1 = require("./openapi/organizations/BaseOrgani
34
34
  const validationSchemaStorage_1 = require("./openapi/organizations/validationSchemaStorage");
35
35
  __exportStar(require("./openapi/organizations/BaseOrganizationsApiClient"), exports);
36
36
  validationSchemaStorage_1.validationSchemaStorage.setErrorClass(atlassian_api_common_1.ApiError);
37
+ // Organizations API uses JSON stringified query parameters for some endpoints
38
+ const jsonStringifyQueryParams = {
39
+ "GET /v2/orgs/{orgId}/directories/{directoryId}/groups": ["counts", "sortBy"],
40
+ "GET /v2/orgs/{orgId}/directories/{directoryId}/users": ["sortBy"],
41
+ };
37
42
  const BASE_PATH = "/admin";
38
43
  class OrganizationsApiClient extends BaseOrganizationsApiClient_1.BaseOrganizationsApiClient {
39
44
  constructor(_a) {
40
45
  var { apiKey, shouldRetryOnError, processError } = _a, otherProps = __rest(_a, ["apiKey", "shouldRetryOnError", "processError"]);
41
46
  super(Object.assign({ baseUrl: "https://api.atlassian.com", headers: {
42
47
  Authorization: `Bearer ${apiKey}`,
43
- }, formatHttpErrorMessage: atlassian_api_common_1.formatHttpErrorMessage, errorClass: atlassian_api_common_1.ApiError, preprocessRequest: (request) => Promise.resolve(Object.assign(Object.assign({}, request), { path: BASE_PATH + request.path })), shouldRetryOnError: shouldRetryOnError, processError: processError, fetch: (url, request) => {
48
+ }, formatHttpErrorMessage: atlassian_api_common_1.formatHttpErrorMessage, errorClass: atlassian_api_common_1.ApiError, preprocessRequest: (request) => {
49
+ let result = request;
50
+ const methodAndPath = `${request.method} ${request.path}`;
51
+ if (jsonStringifyQueryParams.hasOwnProperty(methodAndPath)) {
52
+ for (const paramName of jsonStringifyQueryParams[methodAndPath]) {
53
+ if (result.query &&
54
+ result.query[paramName] !== undefined &&
55
+ result.query[paramName] !== null) {
56
+ result = Object.assign(Object.assign({}, result), { query: Object.assign(Object.assign({}, result.query), { [paramName]: JSON.stringify(result.query[paramName]) }) });
57
+ }
58
+ }
59
+ }
60
+ return Promise.resolve(Object.assign(Object.assign({}, result), { path: BASE_PATH + request.path }));
61
+ }, shouldRetryOnError: shouldRetryOnError, processError: processError, fetch: (url, request) => {
44
62
  this.currentRequestCount += 1;
45
63
  return (0, CommonHttpClient_1.defaultFetch)(url, request);
46
64
  } }, otherProps));
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2EAI0C;AAYjC,yFAfP,+BAAQ,OAeO;AAAE,gHAbjB,sDAA+B,OAaiB;AATlD,sEAGyC;AACzC,mGAAgG;AAChG,6FAA0F;AAE1F,qFAAmE;AAInE,iDAAuB,CAAC,aAAa,CAAC,+BAAQ,CAAC,CAAC;AAyChD,MAAM,SAAS,GAAG,QAAQ,CAAC;AAE3B,MAAa,sBAAuB,SAAQ,uDAA0B;IAGpE,YAAY,EAKoB;YALpB,EACV,MAAM,EACN,kBAAkB,EAClB,YAAY,OAEkB,EAD3B,UAAU,cAJH,gDAKX,CADc;QAEb,KAAK,iBACH,OAAO,EAAE,2BAA2B,EACpC,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,MAAM,EAAE;aAClC,EACD,sBAAsB,EAAtB,6CAAsB,EACtB,UAAU,EAAE,+BAAQ,EACpB,iBAAiB,EAAE,CAAC,OAAO,EAAE,EAAE,CAC7B,OAAO,CAAC,OAAO,iCACV,OAAO,KACV,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,IAC9B,EACJ,kBAAkB,EAChB,kBAAmE,EACrE,YAAY,EAAE,YAAuD,EACrE,KAAK,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;gBACtB,IAAI,CAAC,mBAAmB,IAAI,CAAC,CAAC;gBAC9B,OAAO,IAAA,+BAAY,EAAC,GAAG,EAAE,OAAO,CAAC,CAAC;YACpC,CAAC,IACE,UAAU,EACb,CAAC;QA5BK,wBAAmB,GAAG,CAAC,CAAC;IA6BlC,CAAC;IAED;;OAEG;IACH,sBAAsB;QACpB,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;CACF;AAtCD,wDAsCC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2EAI0C;AAYjC,yFAfP,+BAAQ,OAeO;AAAE,gHAbjB,sDAA+B,OAaiB;AATlD,sEAGyC;AACzC,mGAAgG;AAChG,6FAA0F;AAE1F,qFAAmE;AAInE,iDAAuB,CAAC,aAAa,CAAC,+BAAQ,CAAC,CAAC;AAyChD,8EAA8E;AAC9E,MAAM,wBAAwB,GAA6B;IACzD,uDAAuD,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC;IAC7E,sDAAsD,EAAE,CAAC,QAAQ,CAAC;CACnE,CAAC;AAEF,MAAM,SAAS,GAAG,QAAQ,CAAC;AAE3B,MAAa,sBAAuB,SAAQ,uDAA0B;IAGpE,YAAY,EAKoB;YALpB,EACV,MAAM,EACN,kBAAkB,EAClB,YAAY,OAEkB,EAD3B,UAAU,cAJH,gDAKX,CADc;QAEb,KAAK,iBACH,OAAO,EAAE,2BAA2B,EACpC,OAAO,EAAE;gBACP,aAAa,EAAE,UAAU,MAAM,EAAE;aAClC,EACD,sBAAsB,EAAtB,6CAAsB,EACtB,UAAU,EAAE,+BAAQ,EACpB,iBAAiB,EAAE,CAAC,OAAO,EAAE,EAAE;gBAC7B,IAAI,MAAM,GAAG,OAAO,CAAC;gBACrB,MAAM,aAAa,GAAG,GAAG,OAAO,CAAC,MAAM,IAAI,OAAO,CAAC,IAAI,EAAE,CAAC;gBAC1D,IAAI,wBAAwB,CAAC,cAAc,CAAC,aAAa,CAAC,EAAE,CAAC;oBAC3D,KAAK,MAAM,SAAS,IAAI,wBAAwB,CAAC,aAAa,CAAC,EAAE,CAAC;wBAChE,IACE,MAAM,CAAC,KAAK;4BACZ,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,SAAS;4BACrC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,IAAI,EAChC,CAAC;4BACD,MAAM,mCACD,MAAM,KACT,KAAK,kCACA,MAAM,CAAC,KAAK,KACf,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,MAEvD,CAAC;wBACJ,CAAC;oBACH,CAAC;gBACH,CAAC;gBACD,OAAO,OAAO,CAAC,OAAO,iCACjB,MAAM,KACT,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,IAC9B,CAAC;YACL,CAAC,EACD,kBAAkB,EAChB,kBAAmE,EACrE,YAAY,EAAE,YAAuD,EACrE,KAAK,EAAE,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;gBACtB,IAAI,CAAC,mBAAmB,IAAI,CAAC,CAAC;gBAC9B,OAAO,IAAA,+BAAY,EAAC,GAAG,EAAE,OAAO,CAAC,CAAC;YACpC,CAAC,IACE,UAAU,EACb,CAAC;QAhDK,wBAAmB,GAAG,CAAC,CAAC;IAiDlC,CAAC;IAED;;OAEG;IACH,sBAAsB;QACpB,OAAO,IAAI,CAAC,mBAAmB,CAAC;IAClC,CAAC;CACF;AA1DD,wDA0DC"}
@@ -7,6 +7,49 @@ import { type CreateGroupInput, type AddGroupMembershipInput, type GroupRoleAssi
7
7
  * @category Services
8
8
  */
9
9
  export declare class GroupsService extends CommonHttpService {
10
+ /**
11
+ * Add a user to a group. This gives the user the same app access and permissions
12
+ * as the group. The user must be in the same directory as the group.
13
+ *
14
+ * You can’t add a user to a group synced from an identity provider. Manage this
15
+ * group in your identity provider instead.
16
+ *
17
+ * You can’t add a user to a group if you’ve exceeded your user limit for an app
18
+ * that the group grants access to. Increase your user limit or suspend another
19
+ * user from the app first.
20
+ *
21
+ * @path POST `/v2/orgs/{orgId}/directories/{directoryId}/groups/{groupId}/memberships`
22
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-groups#api-v2-orgs-orgid-directories-directoryid-groups-groupid-memberships-post
23
+ * @param params
24
+ */
25
+ addUserToGroup: ({ orgId, directoryId, groupId, requestBody }: {
26
+ /**
27
+ * Your organization has a unique ID. Find this ID in your Atlassian
28
+ * Administration URL or when you create your API key.
29
+ */
30
+ orgId: string;
31
+ /**
32
+ * A directory has a unique ID. Use the [Get directories
33
+ * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory/#api-v2-orgs-orgid-directories-get)
34
+ * to find the directory ID.
35
+ */
36
+ directoryId: string;
37
+ /**
38
+ * A group has a unique ID. Use the [Get groups
39
+ * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-groups/#api-v2-orgs-orgid-directories-directoryid-groups-get)
40
+ * to find the group ID.
41
+ */
42
+ groupId: string;
43
+ requestBody: {
44
+ /**
45
+ * Every user has a unique ID. Find a user’s account ID by using the [Get users
46
+ * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users/#api-v2-orgs-orgid-directories-directoryid-users-get).
47
+ */
48
+ accountId: string;
49
+ } & {
50
+ [key: string]: unknown;
51
+ };
52
+ }) => Promise<void>;
10
53
  /**
11
54
  * **This API is deprecated and will no longer work after June 30, 2026.** Use the
12
55
  * [Grant access to group
@@ -52,6 +95,64 @@ export declare class GroupsService extends CommonHttpService {
52
95
  } & {
53
96
  [key: string]: unknown;
54
97
  }>;
98
+ /**
99
+ * Create a group in a directory to manage app access and permissions for multiple
100
+ * users together.
101
+ *
102
+ * @path POST `/v2/orgs/{orgId}/directories/{directoryId}/groups`
103
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-groups#api-v2-orgs-orgid-directories-directoryid-groups-post
104
+ * @param params
105
+ */
106
+ createGroup: ({ orgId, directoryId, requestBody }: {
107
+ /**
108
+ * Your organization has a unique ID. Find this ID in your Atlassian
109
+ * Administration URL or when you create your API key.
110
+ */
111
+ orgId: string;
112
+ /**
113
+ * A directory has a unique ID. Use the [Get directories
114
+ * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory/#api-v2-orgs-orgid-directories-get)
115
+ * to find the directory ID.
116
+ */
117
+ directoryId: string;
118
+ requestBody: {
119
+ /** Name the group. */
120
+ name: string;
121
+ /** Describe what the group is or what it might be used for. */
122
+ description?: string | undefined;
123
+ } & {
124
+ [key: string]: unknown;
125
+ };
126
+ }) => Promise<void>;
127
+ /**
128
+ * Delete a group from a directory if you don’t need this group anymore. This
129
+ * removes any app access and permissions granted by this group from all members.
130
+ * A member can still access an app if they’re in another group that grants access
131
+ * to the same app.
132
+ *
133
+ * @path DELETE `/v2/orgs/{orgId}/directories/{directoryId}/groups/{groupId}`
134
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-groups#api-v2-orgs-orgid-directories-directoryid-groups-groupid-delete
135
+ * @param params
136
+ */
137
+ deleteGroup: ({ orgId, directoryId, groupId }: {
138
+ /**
139
+ * Your organization has a unique ID. Find this ID in your Atlassian
140
+ * Administration URL or when you create your API key.
141
+ */
142
+ orgId: string;
143
+ /**
144
+ * A directory has a unique ID. Use the [Get directories
145
+ * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory/#api-v2-orgs-orgid-directories-get)
146
+ * to find the directory ID.
147
+ */
148
+ directoryId: string;
149
+ /**
150
+ * A group has a unique ID. Use the [Get groups
151
+ * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-groups/#api-v2-orgs-orgid-directories-directoryid-groups-get)
152
+ * to find the group ID.
153
+ */
154
+ groupId: string;
155
+ }) => Promise<void>;
55
156
  /**
56
157
  * **This API is deprecated and will no longer work after June 30, 2026.** Use the
57
158
  * [new Delete group
@@ -195,68 +296,6 @@ export declare class GroupsService extends CommonHttpService {
195
296
  } & {
196
297
  [key: string]: unknown;
197
298
  }>;
198
- /**
199
- * Delete a group from a directory if you don’t need this group anymore. This
200
- * removes any app access and permissions granted by this group from all members.
201
- * A member can still access an app if they’re in another group that grants access
202
- * to the same app.
203
- *
204
- * @path DELETE `/v2/orgs/{orgId}/directories/{directoryId}/groups/{groupId}`
205
- * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-groups#api-v2-orgs-orgid-directories-directoryid-groups-groupid-delete
206
- * @param params
207
- */
208
- deleteV2OrgsOrgIdDirectoriesDirectoryIdGroupsGroupId: ({ orgId, directoryId, groupId }: {
209
- /**
210
- * Your organization has a unique ID. Find this ID in your Atlassian
211
- * Administration URL or when you create your API key.
212
- */
213
- orgId: string;
214
- /**
215
- * A directory has a unique ID. Use the [Get directories
216
- * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory/#api-v2-orgs-orgid-directories-get)
217
- * to find the directory ID.
218
- */
219
- directoryId: string;
220
- /**
221
- * A group has a unique ID. Use the [Get groups
222
- * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-groups/#api-v2-orgs-orgid-directories-directoryid-groups-get)
223
- * to find the group ID.
224
- */
225
- groupId: string;
226
- }) => Promise<void>;
227
- /**
228
- * Remove a user from a group. This removes any app access and permissions granted
229
- * by this group, but the user may still be in other groups that grant the same
230
- * app access and permissions.
231
- *
232
- * @path DELETE `/v2/orgs/{orgId}/directories/{directoryId}/groups/{groupId}/memberships/{accountId}`
233
- * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-groups#api-v2-orgs-orgid-directories-directoryid-groups-groupid-memberships-accountid-delete
234
- * @param params
235
- */
236
- deleteV2OrgsOrgIdDirectoriesDirectoryIdGroupsGroupIdMembershipsAccountId: ({ orgId, directoryId, groupId, accountId }: {
237
- /**
238
- * Your organization has a unique ID. Find this ID in your Atlassian
239
- * Administration URL or when you create your API key.
240
- */
241
- orgId: string;
242
- /**
243
- * A directory has a unique ID. Use the [Get directories
244
- * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory/#api-v2-orgs-orgid-directories-get)
245
- * to find the directory ID.
246
- */
247
- directoryId: string;
248
- /**
249
- * A group has a unique ID. Use the [Get groups
250
- * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-groups/#api-v2-orgs-orgid-directories-directoryid-groups-get)
251
- * to find the group ID.
252
- */
253
- groupId: string;
254
- /**
255
- * Every user has a unique ID. Find a user’s account ID by using the [Get users
256
- * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users/#api-v2-orgs-orgid-directories-directoryid-users-get).
257
- */
258
- accountId: string;
259
- }) => Promise<void>;
260
299
  /**
261
300
  * Returns the details of a group.
262
301
  *
@@ -573,6 +612,49 @@ export declare class GroupsService extends CommonHttpService {
573
612
  */
574
613
  directoryId: string;
575
614
  }) => Promise<MultiDirectoryGroupStats>;
615
+ /**
616
+ * Assign a role to a group to assign all members the same role.
617
+ *
618
+ * @path POST `/v2/orgs/{orgId}/directories/{directoryId}/groups/{groupId}/role-assignments/assign`
619
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-groups#api-v2-orgs-orgid-directories-directoryid-groups-groupid-role-assignments-assign-post
620
+ * @param params
621
+ */
622
+ grantAccessToGroup: ({ orgId, directoryId, groupId, requestBody }: {
623
+ /**
624
+ * Your organization has a unique ID. Find this ID in your Atlassian
625
+ * Administration URL or when you create your API key.
626
+ */
627
+ orgId: string;
628
+ /**
629
+ * A directory has a unique ID. Use the [Get directories
630
+ * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory/#api-v2-orgs-orgid-directories-get)
631
+ * to find the directory ID.
632
+ */
633
+ directoryId: string;
634
+ /**
635
+ * A group has a unique ID. Use the [Get groups
636
+ * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-groups/#api-v2-orgs-orgid-directories-directoryid-groups-get)
637
+ * to find the group ID.
638
+ */
639
+ groupId: string;
640
+ requestBody: {
641
+ /**
642
+ * A resource or workspace refers to a specific instance of an Atlassian app,
643
+ * which has a unique ID. Use the [Get workspaces
644
+ * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-workspaces/#api-v2-orgs-orgid-workspaces-post)
645
+ * to find the resource ID.
646
+ */
647
+ resourceId: string;
648
+ /**
649
+ * Valid values: atlassian/user, atlassian/user-access-admin, atlassian/admin,
650
+ * atlassian/guest, atlassian/contributor, atlassian/customer, atlassian/basic,
651
+ * atlassian/stakeholder, atlassian/viewer
652
+ */
653
+ roleId: string;
654
+ } & {
655
+ [key: string]: unknown;
656
+ };
657
+ }) => Promise<void>;
576
658
  /**
577
659
  * **This API is deprecated and will no longer work after June 30, 2026.** Use the
578
660
  * [new Create group
@@ -701,85 +783,15 @@ export declare class GroupsService extends CommonHttpService {
701
783
  [key: string]: unknown;
702
784
  }>;
703
785
  /**
704
- * Create a group in a directory to manage app access and permissions for multiple
705
- * users together.
706
- *
707
- * @path POST `/v2/orgs/{orgId}/directories/{directoryId}/groups`
708
- * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-groups#api-v2-orgs-orgid-directories-directoryid-groups-post
709
- * @param params
710
- */
711
- postV2OrgsOrgIdDirectoriesDirectoryIdGroups: ({ orgId, directoryId, requestBody }: {
712
- /**
713
- * Your organization has a unique ID. Find this ID in your Atlassian
714
- * Administration URL or when you create your API key.
715
- */
716
- orgId: string;
717
- /**
718
- * A directory has a unique ID. Use the [Get directories
719
- * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory/#api-v2-orgs-orgid-directories-get)
720
- * to find the directory ID.
721
- */
722
- directoryId: string;
723
- requestBody: {
724
- /** Name the group. */
725
- name: string;
726
- /** Describe what the group is or what it might be used for. */
727
- description?: string | undefined;
728
- } & {
729
- [key: string]: unknown;
730
- };
731
- }) => Promise<void>;
732
- /**
733
- * Add a user to a group. This gives the user the same app access and permissions
734
- * as the group. The user must be in the same directory as the group.
735
- *
736
- * You can’t add a user to a group synced from an identity provider. Manage this
737
- * group in your identity provider instead.
738
- *
739
- * You can’t add a user to a group if you’ve exceeded your user limit for an app
740
- * that the group grants access to. Increase your user limit or suspend another
741
- * user from the app first.
742
- *
743
- * @path POST `/v2/orgs/{orgId}/directories/{directoryId}/groups/{groupId}/memberships`
744
- * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-groups#api-v2-orgs-orgid-directories-directoryid-groups-groupid-memberships-post
745
- * @param params
746
- */
747
- postV2OrgsOrgIdDirectoriesDirectoryIdGroupsGroupIdMemberships: ({ orgId, directoryId, groupId, requestBody }: {
748
- /**
749
- * Your organization has a unique ID. Find this ID in your Atlassian
750
- * Administration URL or when you create your API key.
751
- */
752
- orgId: string;
753
- /**
754
- * A directory has a unique ID. Use the [Get directories
755
- * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-directory/#api-v2-orgs-orgid-directories-get)
756
- * to find the directory ID.
757
- */
758
- directoryId: string;
759
- /**
760
- * A group has a unique ID. Use the [Get groups
761
- * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-groups/#api-v2-orgs-orgid-directories-directoryid-groups-get)
762
- * to find the group ID.
763
- */
764
- groupId: string;
765
- requestBody: {
766
- /**
767
- * Every user has a unique ID. Find a user’s account ID by using the [Get users
768
- * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users/#api-v2-orgs-orgid-directories-directoryid-users-get).
769
- */
770
- accountId: string;
771
- } & {
772
- [key: string]: unknown;
773
- };
774
- }) => Promise<void>;
775
- /**
776
- * Assign a role to a group to assign all members the same role.
786
+ * Revoke a role from a group to remove access to an app from all members. A
787
+ * member can still access the app if they’re in another group that grants access
788
+ * to the same app.
777
789
  *
778
- * @path POST `/v2/orgs/{orgId}/directories/{directoryId}/groups/{groupId}/role-assignments/assign`
779
- * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-groups#api-v2-orgs-orgid-directories-directoryid-groups-groupid-role-assignments-assign-post
790
+ * @path POST `/v2/orgs/{orgId}/directories/{directoryId}/groups/{groupId}/role-assignments/revoke`
791
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-groups#api-v2-orgs-orgid-directories-directoryid-groups-groupid-role-assignments-revoke-post
780
792
  * @param params
781
793
  */
782
- postV2OrgsOrgIdDirectoriesDirectoryIdGroupsGroupIdRoleAssignmentsAssign: ({ orgId, directoryId, groupId, requestBody }: {
794
+ removeAccessFromGroup: ({ orgId, directoryId, groupId, requestBody }: {
783
795
  /**
784
796
  * Your organization has a unique ID. Find this ID in your Atlassian
785
797
  * Administration URL or when you create your API key.
@@ -816,15 +828,15 @@ export declare class GroupsService extends CommonHttpService {
816
828
  };
817
829
  }) => Promise<void>;
818
830
  /**
819
- * Revoke a role from a group to remove access to an app from all members. A
820
- * member can still access the app if they’re in another group that grants access
821
- * to the same app.
831
+ * Remove a user from a group. This removes any app access and permissions granted
832
+ * by this group, but the user may still be in other groups that grant the same
833
+ * app access and permissions.
822
834
  *
823
- * @path POST `/v2/orgs/{orgId}/directories/{directoryId}/groups/{groupId}/role-assignments/revoke'`
824
- * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-groups#api-v2-orgs-orgid-directories-directoryid-groups-groupid-role-assignments-revoke-post
835
+ * @path DELETE `/v2/orgs/{orgId}/directories/{directoryId}/groups/{groupId}/memberships/{accountId}`
836
+ * @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-groups#api-v2-orgs-orgid-directories-directoryid-groups-groupid-memberships-accountid-delete
825
837
  * @param params
826
838
  */
827
- postV2OrgsOrgIdDirectoriesDirectoryIdGroupsGroupIdRoleAssignmentsRevoke: ({ orgId, directoryId, groupId, requestBody }: {
839
+ removeUserFromGroup: ({ orgId, directoryId, groupId, accountId }: {
828
840
  /**
829
841
  * Your organization has a unique ID. Find this ID in your Atlassian
830
842
  * Administration URL or when you create your API key.
@@ -842,23 +854,11 @@ export declare class GroupsService extends CommonHttpService {
842
854
  * to find the group ID.
843
855
  */
844
856
  groupId: string;
845
- requestBody: {
846
- /**
847
- * A resource or workspace refers to a specific instance of an Atlassian app,
848
- * which has a unique ID. Use the [Get workspaces
849
- * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-workspaces/#api-v2-orgs-orgid-workspaces-post)
850
- * to find the resource ID.
851
- */
852
- resourceId: string;
853
- /**
854
- * Valid values: atlassian/user, atlassian/user-access-admin, atlassian/admin,
855
- * atlassian/guest, atlassian/contributor, atlassian/customer, atlassian/basic,
856
- * atlassian/stakeholder, atlassian/viewer
857
- */
858
- roleId: string;
859
- } & {
860
- [key: string]: unknown;
861
- };
857
+ /**
858
+ * Every user has a unique ID. Find a user’s account ID by using the [Get users
859
+ * endpoint](https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users/#api-v2-orgs-orgid-directories-directoryid-users-get).
860
+ */
861
+ accountId: string;
862
862
  }) => Promise<void>;
863
863
  /**
864
864
  * **This API is deprecated and will no longer work after June 30, 2026.** Use the