@stack-spot/portal-network 0.57.0 → 0.58.1
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 +14 -0
- package/dist/api/account.d.ts +88 -3
- package/dist/api/account.d.ts.map +1 -1
- package/dist/api/account.js +66 -0
- package/dist/api/account.js.map +1 -1
- package/dist/api/workspace.d.ts +221 -74
- package/dist/api/workspace.d.ts.map +1 -1
- package/dist/api/workspace.js +125 -62
- package/dist/api/workspace.js.map +1 -1
- package/dist/client/account.d.ts +10 -1
- package/dist/client/account.d.ts.map +1 -1
- package/dist/client/account.js +22 -1
- package/dist/client/account.js.map +1 -1
- package/dist/client/workspace.d.ts +2 -0
- package/dist/client/workspace.d.ts.map +1 -1
- package/dist/client/workspace.js +13 -13
- package/dist/client/workspace.js.map +1 -1
- package/package.json +1 -1
- package/src/api/account.ts +196 -4
- package/src/api/workspace.ts +348 -100
- package/src/client/account.ts +16 -0
- package/src/client/workspace.ts +39 -39
package/src/api/account.ts
CHANGED
|
@@ -147,6 +147,9 @@ export type AccountMemberStackspotIamDto = {
|
|
|
147
147
|
company?: string;
|
|
148
148
|
isActive: boolean;
|
|
149
149
|
isEmailVerified: boolean;
|
|
150
|
+
properties?: {
|
|
151
|
+
[key: string]: object;
|
|
152
|
+
};
|
|
150
153
|
};
|
|
151
154
|
export type UpdateUserRequest = {
|
|
152
155
|
/** User username */
|
|
@@ -359,7 +362,7 @@ export type ServiceCredentialCreateResponseV2 = {
|
|
|
359
362
|
/** Client ID service credential */
|
|
360
363
|
clientId: string;
|
|
361
364
|
/** Client Secret service credential */
|
|
362
|
-
clientSecret
|
|
365
|
+
clientSecret?: string;
|
|
363
366
|
/** Service credential scopes */
|
|
364
367
|
scopes: string[];
|
|
365
368
|
/** Service credential expiration date */
|
|
@@ -598,7 +601,7 @@ export type AccountMemberResponse = {
|
|
|
598
601
|
/** Account member username */
|
|
599
602
|
username: string;
|
|
600
603
|
/** Account member email */
|
|
601
|
-
email
|
|
604
|
+
email?: string;
|
|
602
605
|
/** Account member first name */
|
|
603
606
|
firstName: string;
|
|
604
607
|
/** Account member last name */
|
|
@@ -673,6 +676,18 @@ export type GroupReadResponse = {
|
|
|
673
676
|
/** Creation time of group */
|
|
674
677
|
createdAt?: string;
|
|
675
678
|
};
|
|
679
|
+
export type FavoriteResourcesResponse = {
|
|
680
|
+
/** The type of the resource flag name */
|
|
681
|
+
resourceType: string;
|
|
682
|
+
/** List of resource ids */
|
|
683
|
+
resources: string[];
|
|
684
|
+
};
|
|
685
|
+
export type CreateFavoriteResourceRequest = {
|
|
686
|
+
/** The type of the resource flag name */
|
|
687
|
+
resourceType: string;
|
|
688
|
+
/** The resource identifier */
|
|
689
|
+
resourceId: string;
|
|
690
|
+
};
|
|
676
691
|
export type MemberEmailRequest = {
|
|
677
692
|
/** Member email */
|
|
678
693
|
email: string;
|
|
@@ -997,6 +1012,10 @@ export type CreateAccountPartnerOrderRequest = {
|
|
|
997
1012
|
/** Account logo image in base64 */
|
|
998
1013
|
image?: string;
|
|
999
1014
|
};
|
|
1015
|
+
export type IdDefaultResponse = {
|
|
1016
|
+
/** Id response. */
|
|
1017
|
+
id: string;
|
|
1018
|
+
};
|
|
1000
1019
|
export type ValidateAccountPartnerDataRequest = {
|
|
1001
1020
|
/** The account's name. Example: Zup IT Innovation */
|
|
1002
1021
|
name?: string;
|
|
@@ -1014,6 +1033,22 @@ export type ServiceCredentialAssociateGroupRequest = {
|
|
|
1014
1033
|
/** Service credential groups ids */
|
|
1015
1034
|
teams: string[];
|
|
1016
1035
|
};
|
|
1036
|
+
export type ReadPreferencesResponse = {
|
|
1037
|
+
/** Dashboard widgets preferences */
|
|
1038
|
+
dashboardWidgets?: string[];
|
|
1039
|
+
/** Preferred language preferences */
|
|
1040
|
+
preferredLanguage?: "PT" | "EN";
|
|
1041
|
+
/** Theme preferences */
|
|
1042
|
+
theme?: "DARK" | "LIGHT";
|
|
1043
|
+
};
|
|
1044
|
+
export type UpdateMemberPreferencesRequest = {
|
|
1045
|
+
/** Dashboard widgets preferences Key */
|
|
1046
|
+
dashboardWidgets?: string[];
|
|
1047
|
+
/** Preferred language preferences Key */
|
|
1048
|
+
preferredLanguage?: "PT" | "EN";
|
|
1049
|
+
/** Theme preferences Key */
|
|
1050
|
+
theme?: "DARK" | "LIGHT";
|
|
1051
|
+
};
|
|
1017
1052
|
export type DeleteMemberPermissionsRequest = {
|
|
1018
1053
|
/** Permission Action */
|
|
1019
1054
|
actionName: string;
|
|
@@ -2608,6 +2643,49 @@ export function bindToGroups({ memberId, memberIdsCommonRequest }: {
|
|
|
2608
2643
|
body: memberIdsCommonRequest
|
|
2609
2644
|
})));
|
|
2610
2645
|
}
|
|
2646
|
+
/**
|
|
2647
|
+
* Get account member favorite resources
|
|
2648
|
+
*/
|
|
2649
|
+
export function listAccountMemberFavorites({ memberId }: {
|
|
2650
|
+
memberId: string;
|
|
2651
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
2652
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
2653
|
+
status: 200;
|
|
2654
|
+
data: FavoriteResourcesResponse[];
|
|
2655
|
+
} | {
|
|
2656
|
+
status: 404;
|
|
2657
|
+
data: ErrorResponse;
|
|
2658
|
+
} | {
|
|
2659
|
+
status: 500;
|
|
2660
|
+
data: ErrorResponse;
|
|
2661
|
+
}>(`/v1/members/${encodeURIComponent(memberId)}/favorites`, {
|
|
2662
|
+
...opts
|
|
2663
|
+
}));
|
|
2664
|
+
}
|
|
2665
|
+
/**
|
|
2666
|
+
* Add account member favorite resource
|
|
2667
|
+
*/
|
|
2668
|
+
export function addAccountMemberFavorite({ memberId, createFavoriteResourceRequest }: {
|
|
2669
|
+
memberId: string;
|
|
2670
|
+
createFavoriteResourceRequest: CreateFavoriteResourceRequest;
|
|
2671
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
2672
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
2673
|
+
status: 201;
|
|
2674
|
+
} | {
|
|
2675
|
+
status: 400;
|
|
2676
|
+
data: ErrorResponse;
|
|
2677
|
+
} | {
|
|
2678
|
+
status: 409;
|
|
2679
|
+
data: ErrorResponse;
|
|
2680
|
+
} | {
|
|
2681
|
+
status: 500;
|
|
2682
|
+
data: ErrorResponse;
|
|
2683
|
+
}>(`/v1/members/${encodeURIComponent(memberId)}/favorites`, oazapfts.json({
|
|
2684
|
+
...opts,
|
|
2685
|
+
method: "POST",
|
|
2686
|
+
body: createFavoriteResourceRequest
|
|
2687
|
+
})));
|
|
2688
|
+
}
|
|
2611
2689
|
/**
|
|
2612
2690
|
* Send Email to reset password
|
|
2613
2691
|
*/
|
|
@@ -3484,7 +3562,7 @@ export function createPartner({ createAccountPartnerOrderRequest }: {
|
|
|
3484
3562
|
}, opts?: Oazapfts.RequestOpts) {
|
|
3485
3563
|
return oazapfts.ok(oazapfts.fetchJson<{
|
|
3486
3564
|
status: 202;
|
|
3487
|
-
data:
|
|
3565
|
+
data: IdDefaultResponse;
|
|
3488
3566
|
} | {
|
|
3489
3567
|
status: 400;
|
|
3490
3568
|
data: ErrorResponse;
|
|
@@ -3493,7 +3571,7 @@ export function createPartner({ createAccountPartnerOrderRequest }: {
|
|
|
3493
3571
|
data: ErrorResponse;
|
|
3494
3572
|
} | {
|
|
3495
3573
|
status: 500;
|
|
3496
|
-
data:
|
|
3574
|
+
data: IdDefaultResponse;
|
|
3497
3575
|
}>("/v1/account-orders/partners", oazapfts.json({
|
|
3498
3576
|
...opts,
|
|
3499
3577
|
method: "POST",
|
|
@@ -3606,6 +3684,55 @@ export function revokeServiceCredential1({ id }: {
|
|
|
3606
3684
|
method: "PATCH"
|
|
3607
3685
|
}));
|
|
3608
3686
|
}
|
|
3687
|
+
/**
|
|
3688
|
+
* Update member preferences
|
|
3689
|
+
*/
|
|
3690
|
+
export function getMemberPreferences({ memberId }: {
|
|
3691
|
+
memberId: string;
|
|
3692
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
3693
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
3694
|
+
status: 204;
|
|
3695
|
+
data: ReadPreferencesResponse;
|
|
3696
|
+
} | {
|
|
3697
|
+
status: 403;
|
|
3698
|
+
data: ErrorResponse;
|
|
3699
|
+
} | {
|
|
3700
|
+
status: 404;
|
|
3701
|
+
data: ErrorResponse;
|
|
3702
|
+
} | {
|
|
3703
|
+
status: 500;
|
|
3704
|
+
data: ErrorResponse;
|
|
3705
|
+
}>(`/v1/members/${encodeURIComponent(memberId)}/preferences`, {
|
|
3706
|
+
...opts
|
|
3707
|
+
}));
|
|
3708
|
+
}
|
|
3709
|
+
/**
|
|
3710
|
+
* Update member preferences
|
|
3711
|
+
*/
|
|
3712
|
+
export function updateMemberPreferences({ memberId, updateMemberPreferencesRequest }: {
|
|
3713
|
+
memberId: string;
|
|
3714
|
+
updateMemberPreferencesRequest: UpdateMemberPreferencesRequest;
|
|
3715
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
3716
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
3717
|
+
status: 204;
|
|
3718
|
+
} | {
|
|
3719
|
+
status: 400;
|
|
3720
|
+
data: ErrorResponse;
|
|
3721
|
+
} | {
|
|
3722
|
+
status: 403;
|
|
3723
|
+
data: ErrorResponse;
|
|
3724
|
+
} | {
|
|
3725
|
+
status: 404;
|
|
3726
|
+
data: ErrorResponse;
|
|
3727
|
+
} | {
|
|
3728
|
+
status: 500;
|
|
3729
|
+
data: ErrorResponse;
|
|
3730
|
+
}>(`/v1/members/${encodeURIComponent(memberId)}/preferences`, oazapfts.json({
|
|
3731
|
+
...opts,
|
|
3732
|
+
method: "PATCH",
|
|
3733
|
+
body: updateMemberPreferencesRequest
|
|
3734
|
+
})));
|
|
3735
|
+
}
|
|
3609
3736
|
/**
|
|
3610
3737
|
* Delete a member permissions
|
|
3611
3738
|
*/
|
|
@@ -4489,6 +4616,30 @@ export function getResourceTypes({ size, page, sort, direction, search, filterMo
|
|
|
4489
4616
|
...opts
|
|
4490
4617
|
}));
|
|
4491
4618
|
}
|
|
4619
|
+
/**
|
|
4620
|
+
* Validate permission access
|
|
4621
|
+
*/
|
|
4622
|
+
export function getAccess({ resourceType, resource, action, attribute }: {
|
|
4623
|
+
resourceType: string;
|
|
4624
|
+
resource: string;
|
|
4625
|
+
action: string;
|
|
4626
|
+
attribute?: string;
|
|
4627
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
4628
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
4629
|
+
status: 200;
|
|
4630
|
+
data: boolean;
|
|
4631
|
+
} | {
|
|
4632
|
+
status: 403;
|
|
4633
|
+
data: ErrorResponse;
|
|
4634
|
+
}>(`/v1/permissions/access${QS.query(QS.explode({
|
|
4635
|
+
resourceType,
|
|
4636
|
+
resource,
|
|
4637
|
+
action,
|
|
4638
|
+
attribute
|
|
4639
|
+
}))}`, {
|
|
4640
|
+
...opts
|
|
4641
|
+
}));
|
|
4642
|
+
}
|
|
4492
4643
|
/**
|
|
4493
4644
|
* Get Resources Members
|
|
4494
4645
|
*/
|
|
@@ -4508,6 +4659,26 @@ export function getResources1({ memberId }: {
|
|
|
4508
4659
|
...opts
|
|
4509
4660
|
}));
|
|
4510
4661
|
}
|
|
4662
|
+
/**
|
|
4663
|
+
* Get member favorite resources by type
|
|
4664
|
+
*/
|
|
4665
|
+
export function listMemberFavoritesByResource({ memberId, resourceType }: {
|
|
4666
|
+
memberId: string;
|
|
4667
|
+
resourceType: string;
|
|
4668
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
4669
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
4670
|
+
status: 200;
|
|
4671
|
+
data: any;
|
|
4672
|
+
} | {
|
|
4673
|
+
status: 404;
|
|
4674
|
+
data: ErrorResponse;
|
|
4675
|
+
} | {
|
|
4676
|
+
status: 500;
|
|
4677
|
+
data: ErrorResponse;
|
|
4678
|
+
}>(`/v1/members/${encodeURIComponent(memberId)}/favorites/resources/${encodeURIComponent(resourceType)}`, {
|
|
4679
|
+
...opts
|
|
4680
|
+
}));
|
|
4681
|
+
}
|
|
4511
4682
|
/**
|
|
4512
4683
|
* Get Account Collaborators Members
|
|
4513
4684
|
*/
|
|
@@ -4843,6 +5014,27 @@ export function deleteResource({ resourceId }: {
|
|
|
4843
5014
|
method: "DELETE"
|
|
4844
5015
|
}));
|
|
4845
5016
|
}
|
|
5017
|
+
/**
|
|
5018
|
+
* Remove resource from member favorites
|
|
5019
|
+
*/
|
|
5020
|
+
export function deleteMemberFavorite({ memberId, resourceType, resourceId }: {
|
|
5021
|
+
memberId: string;
|
|
5022
|
+
resourceType: string;
|
|
5023
|
+
resourceId: string;
|
|
5024
|
+
}, opts?: Oazapfts.RequestOpts) {
|
|
5025
|
+
return oazapfts.ok(oazapfts.fetchJson<{
|
|
5026
|
+
status: 204;
|
|
5027
|
+
} | {
|
|
5028
|
+
status: 404;
|
|
5029
|
+
data: ErrorResponse;
|
|
5030
|
+
} | {
|
|
5031
|
+
status: 500;
|
|
5032
|
+
data: ErrorResponse;
|
|
5033
|
+
}>(`/v1/members/${encodeURIComponent(memberId)}/favorites/${encodeURIComponent(resourceType)}/${encodeURIComponent(resourceId)}`, {
|
|
5034
|
+
...opts,
|
|
5035
|
+
method: "DELETE"
|
|
5036
|
+
}));
|
|
5037
|
+
}
|
|
4846
5038
|
/**
|
|
4847
5039
|
* Delete Group role
|
|
4848
5040
|
*/
|