@stack-spot/portal-network 0.71.0 → 0.72.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/CHANGELOG.md +7 -0
- package/dist/api/account.d.ts +519 -85
- package/dist/api/account.d.ts.map +1 -1
- package/dist/api/account.js +337 -22
- package/dist/api/account.js.map +1 -1
- package/dist/client/account.d.ts +178 -2
- package/dist/client/account.d.ts.map +1 -1
- package/dist/client/account.js +115 -16
- package/dist/client/account.js.map +1 -1
- package/package.json +1 -1
- package/src/api/account.ts +1127 -293
- package/src/client/account.ts +74 -19
package/src/client/account.ts
CHANGED
|
@@ -21,6 +21,7 @@ import {
|
|
|
21
21
|
deletePartner, deleteResourceFromGroup, deleteRole, deleteSso, deleteV1GroupsByGroupId, disablePersonalAccessTokenGeneration,
|
|
22
22
|
disassociateGroupToServiceCredential, enableFidoCredentials,
|
|
23
23
|
getAccess,
|
|
24
|
+
getAccountMembers,
|
|
24
25
|
getAccountMembers1,
|
|
25
26
|
getAccountSso,
|
|
26
27
|
getAllAccountSso,
|
|
@@ -28,26 +29,36 @@ import {
|
|
|
28
29
|
getAllMemberFidoCredentials, getFeatures,
|
|
29
30
|
getGroupById,
|
|
30
31
|
getGroupResources,
|
|
32
|
+
getGroupResources1,
|
|
31
33
|
getGroups,
|
|
34
|
+
getGroups1,
|
|
32
35
|
getMemberById,
|
|
33
36
|
getMemberGroups,
|
|
37
|
+
getMemberGroups1,
|
|
34
38
|
getMemberPreferences,
|
|
35
39
|
getMembers,
|
|
40
|
+
getMembers1,
|
|
36
41
|
getPartnerAccount, getPartnersSharingAllowed,
|
|
37
42
|
getPersonalClientCredentials,
|
|
38
|
-
getResources,
|
|
39
43
|
getResources1,
|
|
40
|
-
|
|
41
|
-
|
|
44
|
+
getResources2,
|
|
45
|
+
getResourcesAndActionsWithStatus1,
|
|
46
|
+
getResourceTypes1,
|
|
42
47
|
getRoleGroups,
|
|
48
|
+
getRoleGroups1,
|
|
43
49
|
getRoleMembers,
|
|
50
|
+
getRoleMembers1,
|
|
44
51
|
getRoles,
|
|
45
|
-
getRoles1,
|
|
52
|
+
getRoles1,
|
|
53
|
+
getRoles2,
|
|
54
|
+
getRoles3,
|
|
55
|
+
getRoles4, getRoles5,
|
|
46
56
|
getScmProvider,
|
|
47
57
|
getServiceCredential,
|
|
48
58
|
getServiceCredentialGroups,
|
|
49
59
|
getServiceCredentialPermissions,
|
|
50
60
|
getServiceCredentials,
|
|
61
|
+
getServiceCredentials1,
|
|
51
62
|
isCreatedScmCredentials,
|
|
52
63
|
isCreatedScmCredentials1,
|
|
53
64
|
listAccountMemberFavorites,
|
|
@@ -161,15 +172,15 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
161
172
|
/**
|
|
162
173
|
* Gets member Groups (paginated).
|
|
163
174
|
*/
|
|
164
|
-
memberGroups = this.infiniteQuery(
|
|
175
|
+
memberGroups = this.infiniteQuery(getMemberGroups1)
|
|
165
176
|
/**
|
|
166
177
|
* Gets member roles (paginated).
|
|
167
178
|
*/
|
|
168
|
-
memberRoles = this.infiniteQuery(
|
|
179
|
+
memberRoles = this.infiniteQuery(getRoles4)
|
|
169
180
|
/**
|
|
170
181
|
* Gets member resources.
|
|
171
182
|
*/
|
|
172
|
-
memberResources = this.query(
|
|
183
|
+
memberResources = this.query(getResources2)
|
|
173
184
|
/**
|
|
174
185
|
* Gets All Fido credentials for the given member (paginated).
|
|
175
186
|
*/
|
|
@@ -217,7 +228,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
217
228
|
/**
|
|
218
229
|
* Get all groups (paginated).
|
|
219
230
|
*/
|
|
220
|
-
allGroups = this.infiniteQuery(
|
|
231
|
+
allGroups = this.infiniteQuery(getGroups1)
|
|
221
232
|
/**
|
|
222
233
|
* Creates a group.
|
|
223
234
|
*/
|
|
@@ -233,7 +244,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
233
244
|
/**
|
|
234
245
|
* Gets all members in a group (paginated).
|
|
235
246
|
*/
|
|
236
|
-
groupMembers = this.infiniteQuery(
|
|
247
|
+
groupMembers = this.infiniteQuery(getMembers1)
|
|
237
248
|
/**
|
|
238
249
|
* Adds several members to a group
|
|
239
250
|
*/
|
|
@@ -245,7 +256,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
245
256
|
/**
|
|
246
257
|
* Gets all roles of a group.
|
|
247
258
|
*/
|
|
248
|
-
groupRoles = this.infiniteQuery(
|
|
259
|
+
groupRoles = this.infiniteQuery(getRoles5)
|
|
249
260
|
/**
|
|
250
261
|
* Adds several roles to a group.
|
|
251
262
|
*/
|
|
@@ -257,7 +268,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
257
268
|
/**
|
|
258
269
|
* Gets all resources of a group (paginated).
|
|
259
270
|
*/
|
|
260
|
-
groupResources = this.infiniteQuery(
|
|
271
|
+
groupResources = this.infiniteQuery(getGroupResources1)
|
|
261
272
|
/**
|
|
262
273
|
* Adds several resources to a group.
|
|
263
274
|
*/
|
|
@@ -269,14 +280,14 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
269
280
|
/**
|
|
270
281
|
* Gets all roles in the account (paginated)
|
|
271
282
|
*/
|
|
272
|
-
allRoles = this.infiniteQuery(
|
|
283
|
+
allRoles = this.infiniteQuery(getRoles3)
|
|
273
284
|
/**
|
|
274
285
|
* Get a role by id
|
|
275
286
|
*/
|
|
276
287
|
role = this.query({
|
|
277
288
|
name: 'account.role',
|
|
278
289
|
request: async (signal, { id }: { id: string }) => {
|
|
279
|
-
const roles = await
|
|
290
|
+
const roles = await getRoles3({ filterBy: 'id', filterValue: id }, { signal })
|
|
280
291
|
if (!roles.length) throw new StackspotAPIError({ status: 404 })
|
|
281
292
|
return roles[0]
|
|
282
293
|
},
|
|
@@ -284,7 +295,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
284
295
|
/**
|
|
285
296
|
* Gets all members with the provided role (paginated)
|
|
286
297
|
*/
|
|
287
|
-
roleMembers = this.infiniteQuery(
|
|
298
|
+
roleMembers = this.infiniteQuery(getRoleMembers1)
|
|
288
299
|
/**
|
|
289
300
|
* Creates a role
|
|
290
301
|
*/
|
|
@@ -304,7 +315,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
304
315
|
/**
|
|
305
316
|
* Gets all groups with the provided role (paginated)
|
|
306
317
|
*/
|
|
307
|
-
roleGroups = this.infiniteQuery(
|
|
318
|
+
roleGroups = this.infiniteQuery(getRoleGroups1)
|
|
308
319
|
/**
|
|
309
320
|
* Adds a role to several groups
|
|
310
321
|
*/
|
|
@@ -312,7 +323,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
312
323
|
/**
|
|
313
324
|
* Get the actions a role is allowed to perform
|
|
314
325
|
*/
|
|
315
|
-
rolePermissions = this.infiniteQuery(
|
|
326
|
+
rolePermissions = this.infiniteQuery(getResourcesAndActionsWithStatus1)
|
|
316
327
|
/**
|
|
317
328
|
* Updates a role with new list of permissions
|
|
318
329
|
*/
|
|
@@ -324,11 +335,11 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
324
335
|
/**
|
|
325
336
|
* Gets all resources (paginated)
|
|
326
337
|
*/
|
|
327
|
-
allResources = this.infiniteQuery(
|
|
338
|
+
allResources = this.infiniteQuery(getResources1)
|
|
328
339
|
/**
|
|
329
340
|
* Gets all resource types (paginated)
|
|
330
341
|
*/
|
|
331
|
-
allResourceTypes = this.infiniteQuery(
|
|
342
|
+
allResourceTypes = this.infiniteQuery(getResourceTypes1)
|
|
332
343
|
/**
|
|
333
344
|
* Sends an email for downloading the CLI
|
|
334
345
|
*/
|
|
@@ -432,7 +443,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
432
443
|
/**
|
|
433
444
|
* Gets all service credentials (paginated).
|
|
434
445
|
*/
|
|
435
|
-
allServiceCredentials = this.infiniteQuery(
|
|
446
|
+
allServiceCredentials = this.infiniteQuery(getServiceCredentials1)
|
|
436
447
|
/**
|
|
437
448
|
* Gets a service credential by id.
|
|
438
449
|
*/
|
|
@@ -555,6 +566,50 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
555
566
|
},
|
|
556
567
|
permission: this.createPermissionFunctionFor(getAccess),
|
|
557
568
|
})
|
|
569
|
+
/**
|
|
570
|
+
* Get all account members with pagination
|
|
571
|
+
*/
|
|
572
|
+
allMembersWithPagination = this.query(getAccountMembers)
|
|
573
|
+
/**
|
|
574
|
+
* Get Members Groups By Perfil
|
|
575
|
+
*/
|
|
576
|
+
allMembersGroupsByPerfilWithPagination = this.query(getMemberGroups)
|
|
577
|
+
/**
|
|
578
|
+
* Get Members Roles By Perfil
|
|
579
|
+
*/
|
|
580
|
+
allMembersRolesByPerfilWithPagination = this.query(getRoles1)
|
|
581
|
+
/**
|
|
582
|
+
* Get all account groups with pagination
|
|
583
|
+
*/
|
|
584
|
+
allGroupsWithPagination = this.query(getGroups)
|
|
585
|
+
/**
|
|
586
|
+
* Get all members by group with pagination
|
|
587
|
+
*/
|
|
588
|
+
allMembersByGroupWithPagination = this.query(getMembers)
|
|
589
|
+
/**
|
|
590
|
+
* Get all roles by groups with pagination
|
|
591
|
+
*/
|
|
592
|
+
allRolesByGroupWithPagination = this.query(getRoles2)
|
|
593
|
+
/**
|
|
594
|
+
* Get all resources by groups with pagination
|
|
595
|
+
*/
|
|
596
|
+
allResourcesByGroupWithPagination = this.query(getGroupResources)
|
|
597
|
+
/**
|
|
598
|
+
* Get all roles account with pagination
|
|
599
|
+
*/
|
|
600
|
+
allRolesWithPagination = this.query(getRoles)
|
|
601
|
+
/**
|
|
602
|
+
* Get all members by role with pagination
|
|
603
|
+
*/
|
|
604
|
+
allMembersByRoleWithPagination = this.query(getRoleMembers)
|
|
605
|
+
/**
|
|
606
|
+
* Get all groups by roles with pagination
|
|
607
|
+
*/
|
|
608
|
+
allGroupsByRoleWithPagination = this.query(getRoleGroups)
|
|
609
|
+
/**
|
|
610
|
+
* Get Service Credentials
|
|
611
|
+
*/
|
|
612
|
+
allServiceCredentialsWithPagination = this.query(getServiceCredentials)
|
|
558
613
|
}
|
|
559
614
|
|
|
560
615
|
export const accountClient = new AccountClient()
|