@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.
- package/LICENSE.md +19 -0
- package/README.md +110 -0
- package/lib/index.d.ts +39 -0
- package/lib/index.js +46 -0
- package/lib/index.js.map +1 -0
- package/lib/openapi/core/CommonHttpClient.d.ts +316 -0
- package/lib/openapi/core/CommonHttpClient.js +639 -0
- package/lib/openapi/core/CommonHttpClient.js.map +1 -0
- package/lib/openapi/core/CommonHttpService.d.ts +26 -0
- package/lib/openapi/core/CommonHttpService.js +40 -0
- package/lib/openapi/core/CommonHttpService.js.map +1 -0
- package/lib/openapi/core/CommonValidationSchemaStorage.d.ts +35 -0
- package/lib/openapi/core/CommonValidationSchemaStorage.js +63 -0
- package/lib/openapi/core/CommonValidationSchemaStorage.js.map +1 -0
- package/lib/openapi/organizations/BaseOrganizationsApiClient.d.ts +94 -0
- package/lib/openapi/organizations/BaseOrganizationsApiClient.js +127 -0
- package/lib/openapi/organizations/BaseOrganizationsApiClient.js.map +1 -0
- package/lib/openapi/organizations/models/common.d.ts +222 -0
- package/lib/openapi/organizations/models/common.js +66 -0
- package/lib/openapi/organizations/models/common.js.map +1 -0
- package/lib/openapi/organizations/models/directory.d.ts +151 -0
- package/lib/openapi/organizations/models/directory.js +58 -0
- package/lib/openapi/organizations/models/directory.js.map +1 -0
- package/lib/openapi/organizations/models/domains.d.ts +52 -0
- package/lib/openapi/organizations/models/domains.js +35 -0
- package/lib/openapi/organizations/models/domains.js.map +1 -0
- package/lib/openapi/organizations/models/events.d.ts +280 -0
- package/lib/openapi/organizations/models/events.js +129 -0
- package/lib/openapi/organizations/models/events.js.map +1 -0
- package/lib/openapi/organizations/models/groups.d.ts +297 -0
- package/lib/openapi/organizations/models/groups.js +114 -0
- package/lib/openapi/organizations/models/groups.js.map +1 -0
- package/lib/openapi/organizations/models/orgs.d.ts +52 -0
- package/lib/openapi/organizations/models/orgs.js +36 -0
- package/lib/openapi/organizations/models/orgs.js.map +1 -0
- package/lib/openapi/organizations/models/policies.d.ts +169 -0
- package/lib/openapi/organizations/models/policies.js +101 -0
- package/lib/openapi/organizations/models/policies.js.map +1 -0
- package/lib/openapi/organizations/models/users.d.ts +477 -0
- package/lib/openapi/organizations/models/users.js +178 -0
- package/lib/openapi/organizations/models/users.js.map +1 -0
- package/lib/openapi/organizations/models/workspaces.d.ts +200 -0
- package/lib/openapi/organizations/models/workspaces.js +106 -0
- package/lib/openapi/organizations/models/workspaces.js.map +1 -0
- package/lib/openapi/organizations/services/DirectoryService.d.ts +637 -0
- package/lib/openapi/organizations/services/DirectoryService.js +599 -0
- package/lib/openapi/organizations/services/DirectoryService.js.map +1 -0
- package/lib/openapi/organizations/services/DomainsService.d.ts +51 -0
- package/lib/openapi/organizations/services/DomainsService.js +89 -0
- package/lib/openapi/organizations/services/DomainsService.js.map +1 -0
- package/lib/openapi/organizations/services/EventsService.d.ts +142 -0
- package/lib/openapi/organizations/services/EventsService.js +187 -0
- package/lib/openapi/organizations/services/EventsService.js.map +1 -0
- package/lib/openapi/organizations/services/GroupsService.d.ts +268 -0
- package/lib/openapi/organizations/services/GroupsService.js +210 -0
- package/lib/openapi/organizations/services/GroupsService.js.map +1 -0
- package/lib/openapi/organizations/services/OrgsService.d.ts +38 -0
- package/lib/openapi/organizations/services/OrgsService.js +79 -0
- package/lib/openapi/organizations/services/OrgsService.js.map +1 -0
- package/lib/openapi/organizations/services/PoliciesService.d.ts +172 -0
- package/lib/openapi/organizations/services/PoliciesService.js +272 -0
- package/lib/openapi/organizations/services/PoliciesService.js.map +1 -0
- package/lib/openapi/organizations/services/UsersService.d.ts +310 -0
- package/lib/openapi/organizations/services/UsersService.js +214 -0
- package/lib/openapi/organizations/services/UsersService.js.map +1 -0
- package/lib/openapi/organizations/services/ValidateService.d.ts +25 -0
- package/lib/openapi/organizations/services/ValidateService.js +38 -0
- package/lib/openapi/organizations/services/ValidateService.js.map +1 -0
- package/lib/openapi/organizations/services/WorkspacesService.d.ts +78 -0
- package/lib/openapi/organizations/services/WorkspacesService.js +63 -0
- package/lib/openapi/organizations/services/WorkspacesService.js.map +1 -0
- package/lib/openapi/organizations/validationSchemaStorage.d.ts +3 -0
- package/lib/openapi/organizations/validationSchemaStorage.js +134 -0
- package/lib/openapi/organizations/validationSchemaStorage.js.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
import { CommonHttpService } from "../../core/CommonHttpService";
|
|
2
|
+
import { type UserPage, type UsersSearchRequest, type UsersSearchPage, type MultiDirectoryUserPage, type MultiDirectoryUserRoleAssignmentPage, type MultiDirectoryUserStats } from "../models/users";
|
|
3
|
+
/**
|
|
4
|
+
* Orgs Users APIs
|
|
5
|
+
*
|
|
6
|
+
* @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users
|
|
7
|
+
* @category Services
|
|
8
|
+
*/
|
|
9
|
+
export declare class UsersService extends CommonHttpService {
|
|
10
|
+
/**
|
|
11
|
+
* Returns a page of users in an organization that match the supplied parameters.
|
|
12
|
+
*
|
|
13
|
+
* @returns Returned if the request is successful.
|
|
14
|
+
* @path GET `/v2/orgs/{orgId}/directories/{directoryId}/users`
|
|
15
|
+
* @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users#api-v2-orgs-orgid-directories-directoryid-users-get
|
|
16
|
+
* @param params
|
|
17
|
+
*/
|
|
18
|
+
getDirectoryUsers: ({ orgId, directoryId, cursor, limit, accountIds, directoryIds, resourceIds, groupIds, claimStatus, status, accountStatus, membershipStatus, roleIds, searchTerm, sortBy }: {
|
|
19
|
+
/**
|
|
20
|
+
* Your organization is identified by a Unique ID. You get your organization ID
|
|
21
|
+
* and Organization API key simultaneously.
|
|
22
|
+
*/
|
|
23
|
+
orgId: string;
|
|
24
|
+
/**
|
|
25
|
+
* Unique ID associated with a directory. The `-` character can be used to
|
|
26
|
+
* increase the operation scope to all directories the requestor has permission
|
|
27
|
+
* to manage.
|
|
28
|
+
*/
|
|
29
|
+
directoryId: string;
|
|
30
|
+
/**
|
|
31
|
+
* Sets the cursor position to retrieve the next set of results. If present, all
|
|
32
|
+
* other parameters are discarded when searching.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```
|
|
36
|
+
* Qh8E1QpVV00ys/xI7pHI7Q..
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
cursor?: string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* The desired number of results for the search request.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```
|
|
45
|
+
* 20
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
limit?: number | undefined;
|
|
49
|
+
/** A list of user account IDs. */
|
|
50
|
+
accountIds?: string[] | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* A list of directory IDs. The requestor must have permissions to administer
|
|
53
|
+
* resources linked to these directories.
|
|
54
|
+
*/
|
|
55
|
+
directoryIds?: string[] | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* A list of resource IDs. The resource IDs should be specified using the
|
|
58
|
+
* Atlassian Resource Identifier (ARI) format. Example ARI:
|
|
59
|
+
* `ari:cloud:jira-core::site/1`
|
|
60
|
+
*/
|
|
61
|
+
resourceIds?: string[] | undefined;
|
|
62
|
+
/** A list of group IDs. */
|
|
63
|
+
groupIds?: string[] | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* The claim status for the user account. By default, both `managed` and
|
|
66
|
+
* `unmanaged` accounts are returned.
|
|
67
|
+
* - `managed` - Returns only managed accounts. For more on managed accounts:
|
|
68
|
+
* https://support.atlassian.com/user-management/docs/what-are-managed-accounts/
|
|
69
|
+
* - `unmanaged` - Returns only unmanaged accounts.
|
|
70
|
+
*/
|
|
71
|
+
claimStatus?: "managed" | "unmanaged" | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* The status for the user account. This status is a composite of `accountStatus`
|
|
74
|
+
* and `membershipStatus`.
|
|
75
|
+
* - `active` - `accountStatus` is `active` and `membershipStatus` is `active`.
|
|
76
|
+
* - `suspended` - `accountStatus` is `active` and `membershipStatus` is
|
|
77
|
+
* `suspended`.
|
|
78
|
+
* - `not_invited` - `accountStatus` is `active` and `membershipStatus` is
|
|
79
|
+
* `no_membership`.
|
|
80
|
+
* - `deactivated` - `accountStatus` is `inactive`.
|
|
81
|
+
*/
|
|
82
|
+
status?: ("active" | "suspended" | "not_invited" | "deactivated")[] | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* The lifecycle status of the account.
|
|
85
|
+
* - `active` - The account is active and can be used.
|
|
86
|
+
* - `inactive` - The account is inactive and doesn't have access to any
|
|
87
|
+
* resources.
|
|
88
|
+
* - `closed` - The account is closed and can't be used.
|
|
89
|
+
*/
|
|
90
|
+
accountStatus?: ("active" | "inactive" | "closed")[] | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* A list of membership statuses. The membership status is the status of the user
|
|
93
|
+
* account in the organization.
|
|
94
|
+
* - `active` - the account has an active membership for one or more directories
|
|
95
|
+
* within the organization.
|
|
96
|
+
* - `suspended` - the account is suspended in ALL directories within the
|
|
97
|
+
* organization, to which the requestor has permission to access.
|
|
98
|
+
* - `no_membership` - the account is in NONE of the organization’s directories.
|
|
99
|
+
*/
|
|
100
|
+
membershipStatus?: ("active" | "suspended" | "no_membership")[] | undefined;
|
|
101
|
+
/**
|
|
102
|
+
* A list of role IDs. The Atlassian canonical roles are used to determine the
|
|
103
|
+
* permissions of the user against resources within the organization. The allowed
|
|
104
|
+
* roles are:
|
|
105
|
+
* - `atlassian/user` - Can access the product, with no product admin
|
|
106
|
+
* permissions
|
|
107
|
+
* - `atlassian/admin` - Can access the product, with product admin permissions
|
|
108
|
+
* - `atlassian/guest` - Can only access one space you or space admins specify
|
|
109
|
+
* - `atlassian/customer` - (Jira Service Management) Can visit help center,
|
|
110
|
+
* submit help requests, and view articles (non-billable)
|
|
111
|
+
* - `atlassian/user-access-admin` - No product access. Can administer users
|
|
112
|
+
* and groups for this product in Atlassian Administration
|
|
113
|
+
* - `atlassian/contributor` - Can access the product to view, comment, and
|
|
114
|
+
* vote only (non-billable)
|
|
115
|
+
* - `atlassian/basic` - Can access basic product features, with no product
|
|
116
|
+
* admin permissions (non-billable)
|
|
117
|
+
* - `atlassian/stakeholder` - Can receive incident updates and has the same
|
|
118
|
+
* product access as Customer. Non-billable but available only on Premium and
|
|
119
|
+
* Enterprise plans
|
|
120
|
+
* - `atlassian/org-admin` - An organization admin is the highest level of
|
|
121
|
+
* admin and can complete any administrative task in Atlassian Administration
|
|
122
|
+
* - `atlassian/site-admin` - Site admins can access Atlassian Administration
|
|
123
|
+
* and complete tasks related to the specific site they are administering.
|
|
124
|
+
*/
|
|
125
|
+
roleIds?: ("atlassian/user" | "atlassian/user-access-admin" | "atlassian/admin" | "atlassian/guest" | "atlassian/contributor" | "atlassian/customer" | "atlassian/basic" | "atlassian/stakeholder" | "atlassian/site-admin" | "atlassian/org-admin")[] | undefined;
|
|
126
|
+
/** A search term to search the `nickname` and `email` fields. */
|
|
127
|
+
searchTerm?: string | undefined;
|
|
128
|
+
/**
|
|
129
|
+
* The field and direction to sort the results by. Currently, only a single field
|
|
130
|
+
* can be sorted by. If `null`, the default sorting will be used.
|
|
131
|
+
*/
|
|
132
|
+
sortBy?: ({
|
|
133
|
+
/** The name of the field to sort the results by. */
|
|
134
|
+
field: "nick_name" | "email";
|
|
135
|
+
/** The direction to sort the results by. */
|
|
136
|
+
direction: "asc" | "desc";
|
|
137
|
+
} & {
|
|
138
|
+
[key: string]: unknown;
|
|
139
|
+
})[] | undefined;
|
|
140
|
+
}) => Promise<MultiDirectoryUserPage>;
|
|
141
|
+
/**
|
|
142
|
+
* Returns a page of role assignments for a user that match the supplied
|
|
143
|
+
* parameters.
|
|
144
|
+
*
|
|
145
|
+
* @returns Returned if the request is successful.
|
|
146
|
+
* @path GET `/v2/orgs/{orgId}/directories/{directoryId}/users/{accountId}/role-assignments`
|
|
147
|
+
* @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users#api-v2-orgs-orgid-directories-directoryid-users-accountid-role-assignments-get
|
|
148
|
+
* @param params
|
|
149
|
+
*/
|
|
150
|
+
getUserRoleAssignments: ({ orgId, directoryId, accountId, cursor, limit, directoryIds, resourceOwners, resourceIds, roleIds }: {
|
|
151
|
+
/**
|
|
152
|
+
* Your organization is identified by a Unique ID. You get your organization ID
|
|
153
|
+
* and Organization API key simultaneously.
|
|
154
|
+
*/
|
|
155
|
+
orgId: string;
|
|
156
|
+
/**
|
|
157
|
+
* Unique ID associated with a directory. The `-` character can be used to
|
|
158
|
+
* increase the operation scope to all directories the requestor has permission
|
|
159
|
+
* to manage.
|
|
160
|
+
*/
|
|
161
|
+
directoryId: string;
|
|
162
|
+
/** Unique ID associated with a user account. */
|
|
163
|
+
accountId: string;
|
|
164
|
+
/**
|
|
165
|
+
* Sets the cursor position to retrieve the next set of results. If present, all
|
|
166
|
+
* other parameters are discarded when searching.
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* ```
|
|
170
|
+
* Qh8E1QpVV00ys/xI7pHI7Q..
|
|
171
|
+
* ```
|
|
172
|
+
*/
|
|
173
|
+
cursor?: string | undefined;
|
|
174
|
+
/**
|
|
175
|
+
* The desired number of results for the search request.
|
|
176
|
+
*
|
|
177
|
+
* @example
|
|
178
|
+
* ```
|
|
179
|
+
* 20
|
|
180
|
+
* ```
|
|
181
|
+
*/
|
|
182
|
+
limit?: number | undefined;
|
|
183
|
+
/**
|
|
184
|
+
* A list of directory IDs. The requestor must have permissions to administer
|
|
185
|
+
* resources linked to these directories.
|
|
186
|
+
*/
|
|
187
|
+
directoryIds?: string[] | undefined;
|
|
188
|
+
/**
|
|
189
|
+
* The list of resource owners to filter the results by. Used to identify
|
|
190
|
+
* resources using their owner to which the user has at least one role assigned to.
|
|
191
|
+
*/
|
|
192
|
+
resourceOwners?: string[] | undefined;
|
|
193
|
+
/**
|
|
194
|
+
* A list of resource IDs. The resource IDs should be specified using the
|
|
195
|
+
* Atlassian Resource Identifier (ARI) format. Example ARI:
|
|
196
|
+
* `ari:cloud:jira-core::site/1`
|
|
197
|
+
*/
|
|
198
|
+
resourceIds?: string[] | undefined;
|
|
199
|
+
/**
|
|
200
|
+
* A list of role IDs. The Atlassian canonical roles are used to determine the
|
|
201
|
+
* permissions of the user against resources within the organization. The allowed
|
|
202
|
+
* roles are:
|
|
203
|
+
* - `atlassian/user` - Can access the product, with no product admin
|
|
204
|
+
* permissions
|
|
205
|
+
* - `atlassian/admin` - Can access the product, with product admin permissions
|
|
206
|
+
* - `atlassian/guest` - Can only access one space you or space admins specify
|
|
207
|
+
* - `atlassian/customer` - (Jira Service Management) Can visit help center,
|
|
208
|
+
* submit help requests, and view articles (non-billable)
|
|
209
|
+
* - `atlassian/user-access-admin` - No product access. Can administer users
|
|
210
|
+
* and groups for this product in Atlassian Administration
|
|
211
|
+
* - `atlassian/contributor` - Can access the product to view, comment, and
|
|
212
|
+
* vote only (non-billable)
|
|
213
|
+
* - `atlassian/basic` - Can access basic product features, with no product
|
|
214
|
+
* admin permissions (non-billable)
|
|
215
|
+
* - `atlassian/stakeholder` - Can receive incident updates and has the same
|
|
216
|
+
* product access as Customer. Non-billable but available only on Premium and
|
|
217
|
+
* Enterprise plans
|
|
218
|
+
* - `atlassian/org-admin` - An organization admin is the highest level of
|
|
219
|
+
* admin and can complete any administrative task in Atlassian Administration
|
|
220
|
+
* - `atlassian/site-admin` - Site admins can access Atlassian Administration
|
|
221
|
+
* and complete tasks related to the specific site they are administering.
|
|
222
|
+
*/
|
|
223
|
+
roleIds?: ("atlassian/user" | "atlassian/user-access-admin" | "atlassian/admin" | "atlassian/guest" | "atlassian/contributor" | "atlassian/customer" | "atlassian/basic" | "atlassian/stakeholder" | "atlassian/site-admin" | "atlassian/org-admin")[] | undefined;
|
|
224
|
+
}) => Promise<MultiDirectoryUserRoleAssignmentPage>;
|
|
225
|
+
/**
|
|
226
|
+
* Returns a list of managed accounts in an organization.
|
|
227
|
+
*
|
|
228
|
+
* @returns Successful operation
|
|
229
|
+
* @path GET `/v1/orgs/{orgId}/users`
|
|
230
|
+
* @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users#api-v1-orgs-orgid-users-get
|
|
231
|
+
* @param params
|
|
232
|
+
*/
|
|
233
|
+
getUsers: ({ orgId, cursor }: {
|
|
234
|
+
/**
|
|
235
|
+
* Your organization is identified by a Unique ID. You get your organization ID
|
|
236
|
+
* and Organization API key simultaneously.
|
|
237
|
+
*/
|
|
238
|
+
orgId: string;
|
|
239
|
+
/** Sets the starting point for the page of results to return. */
|
|
240
|
+
cursor?: string | undefined;
|
|
241
|
+
}) => Promise<UserPage>;
|
|
242
|
+
/**
|
|
243
|
+
* Returns user stats for the organization.
|
|
244
|
+
*
|
|
245
|
+
* @returns Returned if the request is successful.
|
|
246
|
+
* @path GET `/v2/orgs/{orgId}/directories/{directoryId}/users/stats`
|
|
247
|
+
* @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users#api-v2-orgs-orgid-directories-directoryid-users-stats-get
|
|
248
|
+
* @param params
|
|
249
|
+
*/
|
|
250
|
+
getUserStats: ({ orgId, directoryId }: {
|
|
251
|
+
/**
|
|
252
|
+
* Your organization is identified by a Unique ID. You get your organization ID
|
|
253
|
+
* and Organization API key simultaneously.
|
|
254
|
+
*/
|
|
255
|
+
orgId: string;
|
|
256
|
+
/**
|
|
257
|
+
* Unique ID associated with a directory. The `-` character can be used to
|
|
258
|
+
* increase the operation scope to all directories the requestor has permission
|
|
259
|
+
* to manage.
|
|
260
|
+
*/
|
|
261
|
+
directoryId: string;
|
|
262
|
+
}) => Promise<MultiDirectoryUserStats>;
|
|
263
|
+
/**
|
|
264
|
+
* **The API is available for customers using the new user management experience
|
|
265
|
+
* only. [How the new user management experience
|
|
266
|
+
* works](https://community.atlassian.com/t5/Atlassian-Access-articles/User-management-for-cloud-admins-just-got-easier/ba-p/1576592)**
|
|
267
|
+
*
|
|
268
|
+
* Returns a list of users within an organization, offering search functionality
|
|
269
|
+
* through multiple parameters for more precise results.
|
|
270
|
+
*
|
|
271
|
+
* @returns Organization found. Response contains user search results
|
|
272
|
+
*
|
|
273
|
+
* example: " users_search_response":
|
|
274
|
+
* ```
|
|
275
|
+
* {
|
|
276
|
+
* "data": [
|
|
277
|
+
* {
|
|
278
|
+
* "accountId": "123e4567-e89b-12d3-a456-426614174000",
|
|
279
|
+
* "accountType": "atlassian",
|
|
280
|
+
* "accountStatus": "active"
|
|
281
|
+
* }
|
|
282
|
+
* ],
|
|
283
|
+
* "links": {
|
|
284
|
+
* "next": "MDNlZWRmNzMtMWYwMi00NGM5LWI4NjgtZGQ1NTIwMjIwYjhj",
|
|
285
|
+
* "self": "MDI0MzkwOGEtMmYyOC00NzgzLWI5YTktMDUwZTExNzJjZDU4"
|
|
286
|
+
* }
|
|
287
|
+
* }
|
|
288
|
+
* ```
|
|
289
|
+
* @path POST `/v1/orgs/{orgId}/users/search`
|
|
290
|
+
* @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users#api-v1-orgs-orgid-users-search-post
|
|
291
|
+
* @param params
|
|
292
|
+
*/
|
|
293
|
+
searchUsers: ({ orgId, usersSearchRequest }: {
|
|
294
|
+
/**
|
|
295
|
+
* Your organization is identified by a Unique ID. You get your organization ID
|
|
296
|
+
* and Organization API key simultaneously.
|
|
297
|
+
*/
|
|
298
|
+
orgId: string;
|
|
299
|
+
/**
|
|
300
|
+
* @example limit_only
|
|
301
|
+
* ```
|
|
302
|
+
* {
|
|
303
|
+
* "limit": 20
|
|
304
|
+
* }
|
|
305
|
+
* ```
|
|
306
|
+
*/
|
|
307
|
+
usersSearchRequest: UsersSearchRequest;
|
|
308
|
+
}) => Promise<UsersSearchPage>;
|
|
309
|
+
protected static initialize(): void;
|
|
310
|
+
}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UsersService = void 0;
|
|
4
|
+
// DO NOT EDIT!
|
|
5
|
+
// This file is generated by "api-typescript-generator".
|
|
6
|
+
// To update this file run "yarn build:openapi".
|
|
7
|
+
const commonHttpClient = require("../../core/CommonHttpClient");
|
|
8
|
+
const CommonHttpService_1 = require("../../core/CommonHttpService");
|
|
9
|
+
const users_1 = require("../models/users");
|
|
10
|
+
const validationSchemaStorage_1 = require("../validationSchemaStorage");
|
|
11
|
+
const zod_1 = require("zod");
|
|
12
|
+
/**
|
|
13
|
+
* Orgs Users APIs
|
|
14
|
+
*
|
|
15
|
+
* @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users
|
|
16
|
+
* @category Services
|
|
17
|
+
*/
|
|
18
|
+
class UsersService extends CommonHttpService_1.CommonHttpService {
|
|
19
|
+
constructor() {
|
|
20
|
+
super(...arguments);
|
|
21
|
+
/**
|
|
22
|
+
* Returns a page of users in an organization that match the supplied parameters.
|
|
23
|
+
*
|
|
24
|
+
* @returns Returned if the request is successful.
|
|
25
|
+
* @path GET `/v2/orgs/{orgId}/directories/{directoryId}/users`
|
|
26
|
+
* @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users#api-v2-orgs-orgid-directories-directoryid-users-get
|
|
27
|
+
* @param params
|
|
28
|
+
*/
|
|
29
|
+
this.getDirectoryUsers = ({ orgId, directoryId, cursor, limit, accountIds, directoryIds, resourceIds, groupIds, claimStatus, status, accountStatus, membershipStatus, roleIds, searchTerm, sortBy }) => {
|
|
30
|
+
return this.getClientInstance().request({
|
|
31
|
+
path: "/v2/orgs/{orgId}/directories/{directoryId}/users",
|
|
32
|
+
method: "GET",
|
|
33
|
+
pathParams: {
|
|
34
|
+
orgId,
|
|
35
|
+
directoryId
|
|
36
|
+
},
|
|
37
|
+
query: {
|
|
38
|
+
cursor,
|
|
39
|
+
limit,
|
|
40
|
+
accountIds,
|
|
41
|
+
directoryIds,
|
|
42
|
+
resourceIds,
|
|
43
|
+
groupIds,
|
|
44
|
+
claimStatus,
|
|
45
|
+
status,
|
|
46
|
+
accountStatus,
|
|
47
|
+
membershipStatus,
|
|
48
|
+
roleIds,
|
|
49
|
+
searchTerm,
|
|
50
|
+
sortBy
|
|
51
|
+
}
|
|
52
|
+
}).then(this.getClientInstance().responseHandler({
|
|
53
|
+
200: {
|
|
54
|
+
"application/json": "json"
|
|
55
|
+
}
|
|
56
|
+
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("UsersService.getDirectoryUsers.response"))).then(commonHttpClient.getBody);
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Returns a page of role assignments for a user that match the supplied
|
|
60
|
+
* parameters.
|
|
61
|
+
*
|
|
62
|
+
* @returns Returned if the request is successful.
|
|
63
|
+
* @path GET `/v2/orgs/{orgId}/directories/{directoryId}/users/{accountId}/role-assignments`
|
|
64
|
+
* @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users#api-v2-orgs-orgid-directories-directoryid-users-accountid-role-assignments-get
|
|
65
|
+
* @param params
|
|
66
|
+
*/
|
|
67
|
+
this.getUserRoleAssignments = ({ orgId, directoryId, accountId, cursor, limit, directoryIds, resourceOwners, resourceIds, roleIds }) => {
|
|
68
|
+
return this.getClientInstance().request({
|
|
69
|
+
path: "/v2/orgs/{orgId}/directories/{directoryId}/users/{accountId}/role-assignments",
|
|
70
|
+
method: "GET",
|
|
71
|
+
pathParams: {
|
|
72
|
+
orgId,
|
|
73
|
+
directoryId,
|
|
74
|
+
accountId
|
|
75
|
+
},
|
|
76
|
+
query: {
|
|
77
|
+
cursor,
|
|
78
|
+
limit,
|
|
79
|
+
directoryIds,
|
|
80
|
+
resourceOwners,
|
|
81
|
+
resourceIds,
|
|
82
|
+
roleIds
|
|
83
|
+
}
|
|
84
|
+
}).then(this.getClientInstance().responseHandler({
|
|
85
|
+
200: {
|
|
86
|
+
"application/json": "json"
|
|
87
|
+
}
|
|
88
|
+
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("UsersService.getUserRoleAssignments.response"))).then(commonHttpClient.getBody);
|
|
89
|
+
};
|
|
90
|
+
/**
|
|
91
|
+
* Returns a list of managed accounts in an organization.
|
|
92
|
+
*
|
|
93
|
+
* @returns Successful operation
|
|
94
|
+
* @path GET `/v1/orgs/{orgId}/users`
|
|
95
|
+
* @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users#api-v1-orgs-orgid-users-get
|
|
96
|
+
* @param params
|
|
97
|
+
*/
|
|
98
|
+
this.getUsers = ({ orgId, cursor }) => {
|
|
99
|
+
return this.getClientInstance().request({
|
|
100
|
+
path: "/v1/orgs/{orgId}/users",
|
|
101
|
+
method: "GET",
|
|
102
|
+
pathParams: {
|
|
103
|
+
orgId
|
|
104
|
+
},
|
|
105
|
+
query: {
|
|
106
|
+
cursor
|
|
107
|
+
}
|
|
108
|
+
}).then(this.getClientInstance().responseHandler({
|
|
109
|
+
200: {
|
|
110
|
+
"application/json": "json"
|
|
111
|
+
}
|
|
112
|
+
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("UsersService.getUsers.response"))).then(commonHttpClient.getBody);
|
|
113
|
+
};
|
|
114
|
+
/**
|
|
115
|
+
* Returns user stats for the organization.
|
|
116
|
+
*
|
|
117
|
+
* @returns Returned if the request is successful.
|
|
118
|
+
* @path GET `/v2/orgs/{orgId}/directories/{directoryId}/users/stats`
|
|
119
|
+
* @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users#api-v2-orgs-orgid-directories-directoryid-users-stats-get
|
|
120
|
+
* @param params
|
|
121
|
+
*/
|
|
122
|
+
this.getUserStats = ({ orgId, directoryId }) => {
|
|
123
|
+
return this.getClientInstance().request({
|
|
124
|
+
path: "/v2/orgs/{orgId}/directories/{directoryId}/users/stats",
|
|
125
|
+
method: "GET",
|
|
126
|
+
pathParams: {
|
|
127
|
+
orgId,
|
|
128
|
+
directoryId
|
|
129
|
+
}
|
|
130
|
+
}).then(this.getClientInstance().responseHandler({
|
|
131
|
+
200: {
|
|
132
|
+
"application/json": "json"
|
|
133
|
+
}
|
|
134
|
+
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("UsersService.getUserStats.response"))).then(commonHttpClient.getBody);
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* **The API is available for customers using the new user management experience
|
|
138
|
+
* only. [How the new user management experience
|
|
139
|
+
* works](https://community.atlassian.com/t5/Atlassian-Access-articles/User-management-for-cloud-admins-just-got-easier/ba-p/1576592)**
|
|
140
|
+
*
|
|
141
|
+
* Returns a list of users within an organization, offering search functionality
|
|
142
|
+
* through multiple parameters for more precise results.
|
|
143
|
+
*
|
|
144
|
+
* @returns Organization found. Response contains user search results
|
|
145
|
+
*
|
|
146
|
+
* example: " users_search_response":
|
|
147
|
+
* ```
|
|
148
|
+
* {
|
|
149
|
+
* "data": [
|
|
150
|
+
* {
|
|
151
|
+
* "accountId": "123e4567-e89b-12d3-a456-426614174000",
|
|
152
|
+
* "accountType": "atlassian",
|
|
153
|
+
* "accountStatus": "active"
|
|
154
|
+
* }
|
|
155
|
+
* ],
|
|
156
|
+
* "links": {
|
|
157
|
+
* "next": "MDNlZWRmNzMtMWYwMi00NGM5LWI4NjgtZGQ1NTIwMjIwYjhj",
|
|
158
|
+
* "self": "MDI0MzkwOGEtMmYyOC00NzgzLWI5YTktMDUwZTExNzJjZDU4"
|
|
159
|
+
* }
|
|
160
|
+
* }
|
|
161
|
+
* ```
|
|
162
|
+
* @path POST `/v1/orgs/{orgId}/users/search`
|
|
163
|
+
* @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-users#api-v1-orgs-orgid-users-search-post
|
|
164
|
+
* @param params
|
|
165
|
+
*/
|
|
166
|
+
this.searchUsers = ({ orgId, usersSearchRequest }) => {
|
|
167
|
+
return this.getClientInstance().request({
|
|
168
|
+
path: "/v1/orgs/{orgId}/users/search",
|
|
169
|
+
method: "POST",
|
|
170
|
+
pathParams: {
|
|
171
|
+
orgId
|
|
172
|
+
},
|
|
173
|
+
headers: {
|
|
174
|
+
"Content-Type": "application/json"
|
|
175
|
+
},
|
|
176
|
+
body: usersSearchRequest
|
|
177
|
+
}).then(this.getClientInstance().responseHandler({
|
|
178
|
+
200: {
|
|
179
|
+
"application/json": "json"
|
|
180
|
+
}
|
|
181
|
+
})).then(commonHttpClient.castResponse()).then(this.getClientInstance().validation(validationSchemaStorage_1.validationSchemaStorage.validator("UsersService.searchUsers.response"))).then(commonHttpClient.getBody);
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
static initialize() {
|
|
185
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("UsersService.getUsers.response", zod_1.z.object({
|
|
186
|
+
status: zod_1.z.literal(200),
|
|
187
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
188
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("UserPage")
|
|
189
|
+
}).describe("UsersService.getUsers.response"));
|
|
190
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("UsersService.searchUsers.response", zod_1.z.object({
|
|
191
|
+
status: zod_1.z.literal(200),
|
|
192
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
193
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("UsersSearchPage")
|
|
194
|
+
}).describe("UsersService.searchUsers.response"));
|
|
195
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("UsersService.getDirectoryUsers.response", zod_1.z.object({
|
|
196
|
+
status: zod_1.z.literal(200),
|
|
197
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
198
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("MultiDirectoryUserPage")
|
|
199
|
+
}).describe("UsersService.getDirectoryUsers.response"));
|
|
200
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("UsersService.getUserRoleAssignments.response", zod_1.z.object({
|
|
201
|
+
status: zod_1.z.literal(200),
|
|
202
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
203
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("MultiDirectoryUserRoleAssignmentPage")
|
|
204
|
+
}).describe("UsersService.getUserRoleAssignments.response"));
|
|
205
|
+
validationSchemaStorage_1.validationSchemaStorage.registerExtensible("UsersService.getUserStats.response", zod_1.z.object({
|
|
206
|
+
status: zod_1.z.literal(200),
|
|
207
|
+
mediaType: zod_1.z.literal("application/json"),
|
|
208
|
+
body: validationSchemaStorage_1.validationSchemaStorage.lazy("MultiDirectoryUserStats")
|
|
209
|
+
}).describe("UsersService.getUserStats.response"));
|
|
210
|
+
validationSchemaStorage_1.validationSchemaStorage.registerOnce([users_1.registerUsersValidationSchemas]);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
exports.UsersService = UsersService;
|
|
214
|
+
//# sourceMappingURL=UsersService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UsersService.js","sourceRoot":"","sources":["../../../../src/openapi/organizations/services/UsersService.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,wDAAwD;AACxD,gDAAgD;AAChD,gEAAgE;AAChE,oEAAiE;AACjE,2CAAqO;AACrO,wEAAqE;AACrE,6BAAwB;AACxB;;;;;GAKG;AACH,MAAa,YAAa,SAAQ,qCAAiB;IAAnD;;QACE;;;;;;;WAOG;QACH,sBAAiB,GAAG,CAAC,EACnB,KAAK,EACL,WAAW,EACX,MAAM,EACN,KAAK,EACL,UAAU,EACV,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,WAAW,EACX,MAAM,EACN,aAAa,EACb,gBAAgB,EAChB,OAAO,EACP,UAAU,EACV,MAAM,EA2HP,EAAmC,EAAE;YACpC,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC,OAAO,CAAC;gBACtC,IAAI,EAAE,kDAAkD;gBACxD,MAAM,EAAE,KAAK;gBACb,UAAU,EAAE;oBACV,KAAK;oBACL,WA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,CAAC,CAAC;QACnD,iDAAuB,CAAC,YAAY,CAAC,CAAC,sCAA8B,CAAC,CAAC,CAAC;IACzE,CAAC;CACF;AA7dD,oCA6dC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { CommonHttpService } from "../../core/CommonHttpService";
|
|
2
|
+
/**
|
|
3
|
+
* @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-validate
|
|
4
|
+
* @category Services
|
|
5
|
+
*/
|
|
6
|
+
export declare class ValidateService extends CommonHttpService {
|
|
7
|
+
/**
|
|
8
|
+
* Validate a policy based on specific requirements. For example, Trigger CDEN
|
|
9
|
+
* validation by pushing a task into the SQS dns-validation queue
|
|
10
|
+
*
|
|
11
|
+
* @path GET `/v1/orgs/{orgId}/policies/{policyId}/validate`
|
|
12
|
+
* @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-policies#api-v1-orgs-orgid-policies-policyid-validate-get
|
|
13
|
+
* @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-validate#api-v1-orgs-orgid-policies-policyid-validate-get
|
|
14
|
+
* @param params
|
|
15
|
+
*/
|
|
16
|
+
validatePolicy: ({ orgId, policyId }: {
|
|
17
|
+
/**
|
|
18
|
+
* Your organization is identified by a Unique ID. You get your organization ID
|
|
19
|
+
* and Organization API key simultaneously.
|
|
20
|
+
*/
|
|
21
|
+
orgId: string;
|
|
22
|
+
/** Policy ID */
|
|
23
|
+
policyId: string;
|
|
24
|
+
}) => Promise<void>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ValidateService = void 0;
|
|
4
|
+
// DO NOT EDIT!
|
|
5
|
+
// This file is generated by "api-typescript-generator".
|
|
6
|
+
// To update this file run "yarn build:openapi".
|
|
7
|
+
const commonHttpClient = require("../../core/CommonHttpClient");
|
|
8
|
+
const CommonHttpService_1 = require("../../core/CommonHttpService");
|
|
9
|
+
/**
|
|
10
|
+
* @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-validate
|
|
11
|
+
* @category Services
|
|
12
|
+
*/
|
|
13
|
+
class ValidateService extends CommonHttpService_1.CommonHttpService {
|
|
14
|
+
constructor() {
|
|
15
|
+
super(...arguments);
|
|
16
|
+
/**
|
|
17
|
+
* Validate a policy based on specific requirements. For example, Trigger CDEN
|
|
18
|
+
* validation by pushing a task into the SQS dns-validation queue
|
|
19
|
+
*
|
|
20
|
+
* @path GET `/v1/orgs/{orgId}/policies/{policyId}/validate`
|
|
21
|
+
* @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-policies#api-v1-orgs-orgid-policies-policyid-validate-get
|
|
22
|
+
* @see https://developer.atlassian.com/cloud/admin/organization/rest/api-group-validate#api-v1-orgs-orgid-policies-policyid-validate-get
|
|
23
|
+
* @param params
|
|
24
|
+
*/
|
|
25
|
+
this.validatePolicy = ({ orgId, policyId }) => {
|
|
26
|
+
return this.getClientInstance().request({
|
|
27
|
+
path: "/v1/orgs/{orgId}/policies/{policyId}/validate",
|
|
28
|
+
method: "GET",
|
|
29
|
+
pathParams: {
|
|
30
|
+
orgId,
|
|
31
|
+
policyId
|
|
32
|
+
}
|
|
33
|
+
}).then(commonHttpClient.discardResult);
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.ValidateService = ValidateService;
|
|
38
|
+
//# sourceMappingURL=ValidateService.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ValidateService.js","sourceRoot":"","sources":["../../../../src/openapi/organizations/services/ValidateService.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,wDAAwD;AACxD,gDAAgD;AAChD,gEAAgE;AAChE,oEAAiE;AACjE;;;GAGG;AACH,MAAa,eAAgB,SAAQ,qCAAiB;IAAtD;;QACE;;;;;;;;WAQG;QACH,mBAAc,GAAG,CAAC,EAChB,KAAK,EACL,QAAQ,EAST,EAAiB,EAAE;YAClB,OAAO,IAAI,CAAC,iBAAiB,EAAE,CAAC,OAAO,CAAC;gBACtC,IAAI,EAAE,+CAA+C;gBACrD,MAAM,EAAE,KAAK;gBACb,UAAU,EAAE;oBACV,KAAK;oBACL,QAAQ;iBACT;aACF,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;QAC1C,CAAC,CAAC;IACJ,CAAC;CAAA;AA/BD,0CA+BC"}
|