@stack-spot/portal-network 0.230.0 → 0.232.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 +14 -0
- package/dist/api/account.d.ts +294 -677
- package/dist/api/account.d.ts.map +1 -1
- package/dist/api/account.js +274 -466
- package/dist/api/account.js.map +1 -1
- package/dist/client/account.d.ts.map +1 -1
- package/dist/client/account.js +180 -180
- package/dist/client/account.js.map +1 -1
- package/dist/client/content.d.ts +11 -0
- package/dist/client/content.d.ts.map +1 -1
- package/dist/client/content.js +10 -1
- package/dist/client/content.js.map +1 -1
- package/dist/client/workspace-manager.d.ts +12 -0
- package/dist/client/workspace-manager.d.ts.map +1 -1
- package/dist/client/workspace-manager.js +19 -1
- package/dist/client/workspace-manager.js.map +1 -1
- package/package.json +1 -1
- package/src/api/account.ts +321 -1006
- package/src/client/account.ts +353 -329
- package/src/client/content.ts +5 -0
- package/src/client/workspace-manager.ts +10 -0
package/src/client/account.ts
CHANGED
|
@@ -1,156 +1,177 @@
|
|
|
1
1
|
import { HttpError, RequestOpts } from '@oazapfts/runtime'
|
|
2
2
|
import { getApiAddresses } from '../api-addresses'
|
|
3
3
|
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
4
|
+
memberFavoritesControllerAddAccountMemberFavorite,
|
|
5
|
+
adminAccountControllerAddNewEmailDomain,
|
|
6
|
+
groupControllerAddResourcesToGroup,
|
|
7
|
+
roleControllerAddRoleToMember,
|
|
8
|
+
serviceCredentialControllerAssociateGroupToServiceCredential,
|
|
9
|
+
groupControllerBindGroupMembers,
|
|
10
|
+
roleControllerBindRoleGroups,
|
|
11
|
+
groupControllerBindRoles,
|
|
12
|
+
memberControllerBindToGroups,
|
|
13
|
+
memberControllerBindToRoles,
|
|
14
|
+
secretControllerCancelSecretDelete,
|
|
15
|
+
serviceCredentialControllerV3Create,
|
|
16
|
+
featureFlagAdminControllerV2Create,
|
|
17
|
+
adminAccountControllerCreate,
|
|
18
|
+
roleControllerCreateAccountRole,
|
|
19
|
+
extensionControllerCreateExtension,
|
|
20
|
+
extensionControllerCreateExtensionLink,
|
|
21
|
+
extensionControllerCreateExtensionVersion,
|
|
22
|
+
memberControllerCreateFidoMagicLink,
|
|
23
|
+
ssoControllerCreateGroupMapping,
|
|
24
|
+
accountOrderControllerCreatePartner,
|
|
25
|
+
authenticationControllerCreatePersonalAccessToken,
|
|
26
|
+
secretControllerCreateSecret,
|
|
27
|
+
serviceCredentialControllerV2CreateServiceCredential,
|
|
28
|
+
serviceCredentialControllerCreateServiceCredential,
|
|
29
|
+
accountControllerCreateTrialAccount,
|
|
30
|
+
memberControllerCreateUser,
|
|
31
|
+
memberControllerDeactivateFidoCredentials,
|
|
28
32
|
defaults,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
33
|
+
groupControllerDelete,
|
|
34
|
+
roleControllerDeleteAccountRole,
|
|
35
|
+
extensionControllerDeleteExtension,
|
|
36
|
+
extensionControllerDeleteExtensionLink,
|
|
37
|
+
extensionControllerDeleteExtensionVersion,
|
|
38
|
+
memberControllerDeleteFidoKey,
|
|
39
|
+
ssoControllerDeleteGroupMapping,
|
|
40
|
+
groupControllerDeleteMember,
|
|
41
|
+
memberFavoritesControllerDeleteMemberFavorite,
|
|
42
|
+
accountPartnerControllerDeletePartner,
|
|
43
|
+
memberControllerDeleteProfileImage,
|
|
44
|
+
groupControllerDeleteResourceFromGroup,
|
|
45
|
+
groupControllerDeleteRole,
|
|
46
|
+
secretControllerDeleteSecret,
|
|
47
|
+
ssoControllerDeleteSso,
|
|
48
|
+
authenticationControllerDisablePersonalAccessTokenGeneration,
|
|
49
|
+
secretControllerDisableSecret,
|
|
50
|
+
serviceCredentialControllerDisassociateGroupToServiceCredential,
|
|
51
|
+
memberControllerEnableFidoCredentials,
|
|
52
|
+
secretControllerEnableSecret,
|
|
53
|
+
leadControllerEnterpriseContact,
|
|
54
|
+
secretControllerFindAssociations,
|
|
55
|
+
secretControllerFindSecrets,
|
|
56
|
+
permissionControllerGetAccess,
|
|
57
|
+
adminAccountControllerGetAccount,
|
|
58
|
+
memberControllerGetAccountMembers,
|
|
59
|
+
memberControllerV2GetAccountMembers,
|
|
60
|
+
accountControllerGetAccountRateLimit,
|
|
61
|
+
adminAccountControllerGetAccounts,
|
|
62
|
+
ssoControllerGetAccountSso,
|
|
63
|
+
extensionControllerGetActiveExtensionVersion,
|
|
64
|
+
ssoControllerGetAllAccountSso,
|
|
65
|
+
ssoControllerGetAllGroupMapping,
|
|
66
|
+
memberControllerGetAllMemberFidoCredentials,
|
|
67
|
+
serviceCredentialControllerV2GetAllServiceCredentialRateLimit,
|
|
68
|
+
secretControllerGetById,
|
|
69
|
+
featureFlagControllerV2GetEnabledFeatureFlagsForAccount,
|
|
70
|
+
extensionControllerGetExtensionVersion,
|
|
71
|
+
externalLinkControllerGetExternalLinksByType,
|
|
72
|
+
featureFlagControllerV2GetFeatureFlag,
|
|
73
|
+
featureFlagControllerV2GetFeatures,
|
|
74
|
+
featureFlagControllerGetFeatures,
|
|
75
|
+
groupControllerGetGroupById,
|
|
76
|
+
groupControllerV2GetGroupResources,
|
|
77
|
+
groupControllerGetGroupResources,
|
|
78
|
+
groupControllerGetGroups,
|
|
79
|
+
groupControllerV2GetGroups,
|
|
80
|
+
memberControllerGetMemberById,
|
|
81
|
+
memberControllerGetMemberGroups,
|
|
82
|
+
memberControllerV2GetMemberGroups,
|
|
83
|
+
memberControllerGetMemberPreferences,
|
|
84
|
+
groupControllerGetMembers,
|
|
85
|
+
groupControllerV2GetMembers,
|
|
86
|
+
accountPartnerControllerGetPartnerAccount,
|
|
87
|
+
accountPartnerControllerGetPartnersSharingAllowed,
|
|
88
|
+
accountControllerGetPersonalAccountDetails,
|
|
89
|
+
accountControllerGetPersonalAccountExpirationData,
|
|
90
|
+
authenticationControllerGetPersonalClientCredentials,
|
|
91
|
+
resourceControllerV2GetResources,
|
|
92
|
+
memberControllerGetResources,
|
|
93
|
+
roleControllerGetResourcesAndActionsWithStatus,
|
|
94
|
+
resourceTypeControllerGetResourceTypes,
|
|
95
|
+
roleControllerGetRoleGroups,
|
|
96
|
+
roleControllerV2GetRoleGroups,
|
|
97
|
+
roleControllerGetRoleMembers,
|
|
98
|
+
roleControllerV2GetRoleMembers,
|
|
99
|
+
roleControllerGetRoles,
|
|
100
|
+
memberControllerGetRoles,
|
|
101
|
+
groupControllerGetRoles,
|
|
102
|
+
roleControllerV2GetRoles,
|
|
103
|
+
memberControllerV2GetRoles,
|
|
104
|
+
groupControllerV2GetRoles,
|
|
105
|
+
accountScmControllerGetScmProvider,
|
|
106
|
+
serviceCredentialControllerGetServiceCredential,
|
|
107
|
+
serviceCredentialControllerV2GetServiceCredentialByIdRateLimit,
|
|
108
|
+
serviceCredentialControllerV2GetServiceCredentialGroups,
|
|
109
|
+
serviceCredentialControllerGetServiceCredentialPermissions,
|
|
110
|
+
serviceCredentialControllerV2GetServiceCredentials,
|
|
111
|
+
serviceCredentialControllerGetServiceCredentials,
|
|
112
|
+
userControllerIsCreatedScmCredentials,
|
|
113
|
+
accountScmControllerIsCreatedScmCredentials,
|
|
114
|
+
memberFavoritesControllerListAccountMemberFavorites,
|
|
115
|
+
extensionControllerListExtensionLinks,
|
|
116
|
+
extensionControllerListExtensionVersions,
|
|
117
|
+
extensionControllerListManageableExtensions,
|
|
118
|
+
memberFavoritesControllerListMemberFavoritesByResource,
|
|
119
|
+
accountScmControllerListScmCredentials,
|
|
120
|
+
userControllerV2ListScmCredentials,
|
|
121
|
+
ssoControllerPartialUpdateSso,
|
|
122
|
+
authenticationControllerPersonalAccessTokenAuthorization,
|
|
123
|
+
leadControllerPersonalContact,
|
|
124
|
+
accountControllerReactivateTrialAccount,
|
|
125
|
+
serviceCredentialControllerV3RemoveGroup,
|
|
126
|
+
serviceCredentialControllerV3RemovePermissions,
|
|
127
|
+
roleControllerRemoveRoleFromMember,
|
|
128
|
+
accountControllerRemoveTrialAccount,
|
|
129
|
+
serviceCredentialControllerV3ReplacePermissions,
|
|
130
|
+
memberControllerResetOtp,
|
|
131
|
+
memberControllerResetPassword,
|
|
132
|
+
serviceCredentialControllerV3Revoke,
|
|
133
|
+
serviceCredentialControllerV2RevokeServiceCredential,
|
|
134
|
+
serviceCredentialControllerRevokeServiceCredential,
|
|
135
|
+
serviceCredentialControllerV2RotateServiceCredentialSecret,
|
|
136
|
+
groupControllerSave,
|
|
137
|
+
userControllerScmCredentialSave,
|
|
138
|
+
accountScmControllerScmCredentialSave,
|
|
139
|
+
userControllerScmCredentialUpdate,
|
|
140
|
+
accountScmControllerScmCredentialUpdate,
|
|
141
|
+
userControllerScmDelete,
|
|
142
|
+
emailControllerSendDownloadEmail,
|
|
143
|
+
ssoControllerSsoAddAttributes,
|
|
144
|
+
ssoControllerSsoConfigure,
|
|
145
|
+
ssoControllerSsoGetAttributesConfig,
|
|
146
|
+
ssoControllerSsoParseConfigurationFile,
|
|
147
|
+
groupControllerUpdate,
|
|
148
|
+
roleControllerUpdateAccountRole,
|
|
149
|
+
extensionControllerUpdateExtension,
|
|
150
|
+
extensionControllerUpdateExtensionLink,
|
|
151
|
+
featureFlagControllerV2UpdateFeatureFlag,
|
|
152
|
+
ssoControllerUpdateGroupMapping,
|
|
153
|
+
memberControllerUpdateMemberPreferences,
|
|
154
|
+
accountPartnerControllerUpdatePartnerAccountAdminData,
|
|
155
|
+
accountPartnerControllerUpdatePartnerAccountData,
|
|
156
|
+
accountControllerUpdatePersonalAccountDetails,
|
|
157
|
+
accountControllerUpdateRateLimit,
|
|
158
|
+
roleControllerUpdateResourceActions,
|
|
159
|
+
roleControllerUpdateRoleWithNewActions,
|
|
160
|
+
adminAccountControllerUpdateSalesRepresentatives,
|
|
161
|
+
secretControllerUpdateSecret,
|
|
162
|
+
serviceCredentialControllerV2UpdateRateLimitForServiceCredential,
|
|
163
|
+
serviceCredentialControllerV2UpdateServiceCredentialScopes,
|
|
164
|
+
ssoControllerUpdateSso,
|
|
165
|
+
memberControllerUpdateUser,
|
|
166
|
+
campaignControllerValidateCampaignCode,
|
|
167
|
+
accountOrderControllerValidateNewPartnerData,
|
|
168
|
+
accountOrderControllerValidatePartnerAssociationLimit,
|
|
169
|
+
resourceControllerV3GetAiResources,
|
|
170
|
+
serviceCredentialControllerV3GetAll,
|
|
171
|
+
serviceCredentialControllerV3GetById,
|
|
172
|
+
serviceCredentialControllerV3GetGroups,
|
|
173
|
+
serviceCredentialControllerV3GetPermissions,
|
|
174
|
+
resourceTypeControllerV3GetResourceTypes,
|
|
154
175
|
} from '../api/account'
|
|
155
176
|
import { DefaultAPIError } from '../error/DefaultAPIError'
|
|
156
177
|
import { accountDictionary } from '../error/dictionary/account'
|
|
@@ -159,8 +180,8 @@ import { ReactQueryNetworkClient } from '../network/ReactQueryNetworkClient'
|
|
|
159
180
|
import { removeAuthorizationParam } from '../utils/remove-authorization-param'
|
|
160
181
|
import { CreateSCMRequest, SCMStatus, UpdateSCMRequest } from './types'
|
|
161
182
|
|
|
162
|
-
const listAllResourcesOfGroup = removeAuthorizationParam(
|
|
163
|
-
const getsListAllResourcesOfGroup = removeAuthorizationParam(
|
|
183
|
+
const listAllResourcesOfGroup = removeAuthorizationParam(groupControllerV2GetGroupResources)
|
|
184
|
+
const getsListAllResourcesOfGroup = removeAuthorizationParam(resourceControllerV2GetResources)
|
|
164
185
|
|
|
165
186
|
class AccountClient extends ReactQueryNetworkClient {
|
|
166
187
|
constructor() {
|
|
@@ -174,56 +195,56 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
174
195
|
/**
|
|
175
196
|
* Gets credentials from personal service client (create if not exists one to the logged user).
|
|
176
197
|
*/
|
|
177
|
-
generatePersonalClientCredentials = this.mutation(
|
|
198
|
+
generatePersonalClientCredentials = this.mutation(authenticationControllerGetPersonalClientCredentials)
|
|
178
199
|
/**
|
|
179
200
|
* Creates a Feature Flag
|
|
180
201
|
*/
|
|
181
|
-
createFeatureFlag = this.mutation(
|
|
202
|
+
createFeatureFlag = this.mutation(featureFlagAdminControllerV2Create)
|
|
182
203
|
/**
|
|
183
204
|
* Lists all Feature Flags in an Account
|
|
184
205
|
*/
|
|
185
|
-
featureFlags = this.query(
|
|
206
|
+
featureFlags = this.query(featureFlagControllerGetFeatures)
|
|
186
207
|
/**
|
|
187
208
|
* Lists all Feature Flags in an Account With Pagination
|
|
188
209
|
*/
|
|
189
|
-
featureFlagsWithPagination = this.query(
|
|
210
|
+
featureFlagsWithPagination = this.query(featureFlagControllerV2GetFeatures)
|
|
190
211
|
/**
|
|
191
212
|
* Gets Partners with whom it is allowed to share content.
|
|
192
213
|
*/
|
|
193
|
-
partners = this.query(
|
|
214
|
+
partners = this.query(accountPartnerControllerGetPartnersSharingAllowed)
|
|
194
215
|
/**
|
|
195
216
|
* Gets Partner by account Id
|
|
196
217
|
*/
|
|
197
|
-
partner = this.query(
|
|
218
|
+
partner = this.query(accountPartnerControllerGetPartnerAccount)
|
|
198
219
|
/**
|
|
199
220
|
* Creates an Account Order for Partner
|
|
200
221
|
*/
|
|
201
|
-
createPartner = this.mutation(
|
|
222
|
+
createPartner = this.mutation(accountOrderControllerCreatePartner)
|
|
202
223
|
/**
|
|
203
224
|
* Updates Partner Account data.
|
|
204
225
|
*/
|
|
205
|
-
updatePartner = this.mutation(
|
|
226
|
+
updatePartner = this.mutation(accountPartnerControllerUpdatePartnerAccountData)
|
|
206
227
|
/**
|
|
207
228
|
* Updates Partner Account Admin data.
|
|
208
229
|
*/
|
|
209
|
-
updatePartnerAdmin = this.mutation(
|
|
230
|
+
updatePartnerAdmin = this.mutation(accountPartnerControllerUpdatePartnerAccountAdminData)
|
|
210
231
|
/**
|
|
211
232
|
* Deletes Partner
|
|
212
233
|
*/
|
|
213
|
-
deactivatePartner = this.mutation(
|
|
234
|
+
deactivatePartner = this.mutation(accountPartnerControllerDeletePartner)
|
|
214
235
|
/**
|
|
215
236
|
* Validates new Partner account data
|
|
216
237
|
*/
|
|
217
|
-
validateNewPartnerData = this.mutation(
|
|
238
|
+
validateNewPartnerData = this.mutation(accountOrderControllerValidateNewPartnerData)
|
|
218
239
|
/**
|
|
219
240
|
* Validates the association limit for the partner. Yields `{ isValid: true }` if valid or `{ isValid: false, message: string }`
|
|
220
241
|
* otherwise.
|
|
221
242
|
*/
|
|
222
243
|
validatePartnerAssociationLimit = this.query({
|
|
223
|
-
name: '
|
|
244
|
+
name: 'accountOrderControllerValidatePartnerAssociationLimit',
|
|
224
245
|
request: async (signal) => {
|
|
225
246
|
try {
|
|
226
|
-
await
|
|
247
|
+
await accountOrderControllerValidatePartnerAssociationLimit({ signal })
|
|
227
248
|
return { isValid: true, message: '' }
|
|
228
249
|
} catch (error) {
|
|
229
250
|
if (error instanceof HttpError) {
|
|
@@ -237,107 +258,107 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
237
258
|
/**
|
|
238
259
|
* Gets member by id.
|
|
239
260
|
*/
|
|
240
|
-
member = this.query(
|
|
261
|
+
member = this.query(memberControllerGetMemberById)
|
|
241
262
|
/**
|
|
242
263
|
* Gets all members (paginated).
|
|
243
264
|
*/
|
|
244
|
-
allMembers = this.infiniteQuery(
|
|
265
|
+
allMembers = this.infiniteQuery(memberControllerGetAccountMembers)
|
|
245
266
|
/**
|
|
246
267
|
* Gets member Groups (paginated).
|
|
247
268
|
*/
|
|
248
|
-
memberGroups = this.infiniteQuery(
|
|
269
|
+
memberGroups = this.infiniteQuery(memberControllerGetMemberGroups)
|
|
249
270
|
/**
|
|
250
271
|
* Gets member roles (paginated).
|
|
251
272
|
*/
|
|
252
|
-
memberRoles = this.infiniteQuery(
|
|
273
|
+
memberRoles = this.infiniteQuery(memberControllerGetRoles)
|
|
253
274
|
/**
|
|
254
275
|
* Gets member resources.
|
|
255
276
|
*/
|
|
256
|
-
memberResources = this.query(
|
|
277
|
+
memberResources = this.query(memberControllerGetResources)
|
|
257
278
|
/**
|
|
258
279
|
* Gets All Fido credentials for the given member (paginated).
|
|
259
280
|
*/
|
|
260
|
-
fidoCredentials = this.infiniteQuery(
|
|
281
|
+
fidoCredentials = this.infiniteQuery(memberControllerGetAllMemberFidoCredentials, { accumulator: 'items' })
|
|
261
282
|
/**
|
|
262
283
|
* Creates member on current tenant.
|
|
263
284
|
*/
|
|
264
|
-
createMember = this.mutation(
|
|
285
|
+
createMember = this.mutation(memberControllerCreateUser)
|
|
265
286
|
/**
|
|
266
287
|
* Updates member on current tenant.
|
|
267
288
|
*/
|
|
268
|
-
updateMember = this.mutation(
|
|
289
|
+
updateMember = this.mutation(memberControllerUpdateUser)
|
|
269
290
|
/**
|
|
270
291
|
* Adds a member to several groups.
|
|
271
292
|
*/
|
|
272
|
-
addMemberToGroups = this.mutation(
|
|
293
|
+
addMemberToGroups = this.mutation(memberControllerBindToGroups)
|
|
273
294
|
/**
|
|
274
295
|
* Attributes several roles to a member.
|
|
275
296
|
*/
|
|
276
|
-
addRolesToMember = this.mutation(
|
|
297
|
+
addRolesToMember = this.mutation(memberControllerBindToRoles)
|
|
277
298
|
/**
|
|
278
299
|
* Removes a role from a member.
|
|
279
300
|
*/
|
|
280
|
-
removeRoleFromMember = this.mutation(
|
|
301
|
+
removeRoleFromMember = this.mutation(roleControllerRemoveRoleFromMember)
|
|
281
302
|
/**
|
|
282
303
|
* Sends an e-mail to reset the password of the member with the provided e-mail address.
|
|
283
304
|
*/
|
|
284
|
-
resetMemberPassword = this.mutation(
|
|
305
|
+
resetMemberPassword = this.mutation(memberControllerResetPassword)
|
|
285
306
|
/**
|
|
286
307
|
* Reset member OTP
|
|
287
308
|
*/
|
|
288
|
-
resetOtp = this.mutation(
|
|
309
|
+
resetOtp = this.mutation(memberControllerResetOtp)
|
|
289
310
|
/**
|
|
290
311
|
* Enables Fido credentials for the given member.
|
|
291
312
|
*/
|
|
292
|
-
enableFidoCredentials = this.mutation(
|
|
313
|
+
enableFidoCredentials = this.mutation(memberControllerEnableFidoCredentials)
|
|
293
314
|
/**
|
|
294
315
|
* Disables Fido credentials for the given member.
|
|
295
316
|
*/
|
|
296
|
-
disableFidoCredentials = this.mutation(
|
|
317
|
+
disableFidoCredentials = this.mutation(memberControllerDeactivateFidoCredentials)
|
|
297
318
|
/**
|
|
298
319
|
* Gets group by id.
|
|
299
320
|
*/
|
|
300
|
-
group = this.query(
|
|
321
|
+
group = this.query(groupControllerGetGroupById)
|
|
301
322
|
/**
|
|
302
323
|
* Get all groups (paginated).
|
|
303
324
|
*/
|
|
304
|
-
allGroups = this.infiniteQuery(
|
|
325
|
+
allGroups = this.infiniteQuery(groupControllerGetGroups)
|
|
305
326
|
/**
|
|
306
327
|
* Creates a group.
|
|
307
328
|
*/
|
|
308
|
-
createGroup = this.mutation(
|
|
329
|
+
createGroup = this.mutation(groupControllerSave)
|
|
309
330
|
/**
|
|
310
331
|
* Updates a group.
|
|
311
332
|
*/
|
|
312
|
-
updateGroup = this.mutation(
|
|
333
|
+
updateGroup = this.mutation(groupControllerUpdate)
|
|
313
334
|
/**
|
|
314
335
|
* Deletes a group.
|
|
315
336
|
*/
|
|
316
|
-
deleteGroup = this.mutation(
|
|
337
|
+
deleteGroup = this.mutation(groupControllerDelete)
|
|
317
338
|
/**
|
|
318
339
|
* Gets all members in a group (paginated).
|
|
319
340
|
*/
|
|
320
|
-
groupMembers = this.infiniteQuery(
|
|
341
|
+
groupMembers = this.infiniteQuery(groupControllerGetMembers)
|
|
321
342
|
/**
|
|
322
343
|
* Adds several members to a group
|
|
323
344
|
*/
|
|
324
|
-
addMembersToGroup = this.mutation(
|
|
345
|
+
addMembersToGroup = this.mutation(groupControllerBindGroupMembers)
|
|
325
346
|
/**
|
|
326
347
|
* Removes a member from a group
|
|
327
348
|
*/
|
|
328
|
-
removeMemberFromGroup = this.mutation(
|
|
349
|
+
removeMemberFromGroup = this.mutation(groupControllerDeleteMember)
|
|
329
350
|
/**
|
|
330
351
|
* Gets all roles of a group.
|
|
331
352
|
*/
|
|
332
|
-
groupRoles = this.infiniteQuery(
|
|
353
|
+
groupRoles = this.infiniteQuery(groupControllerGetRoles)
|
|
333
354
|
/**
|
|
334
355
|
* Adds several roles to a group.
|
|
335
356
|
*/
|
|
336
|
-
addRolesToGroup = this.mutation(
|
|
357
|
+
addRolesToGroup = this.mutation(groupControllerBindRoles)
|
|
337
358
|
/**
|
|
338
359
|
* Removes a role from a group.
|
|
339
360
|
*/
|
|
340
|
-
removeRoleFromGroup = this.mutation(
|
|
361
|
+
removeRoleFromGroup = this.mutation(groupControllerDeleteRole)
|
|
341
362
|
/**
|
|
342
363
|
* Get all resources by groups with pagination.
|
|
343
364
|
*/
|
|
@@ -345,22 +366,22 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
345
366
|
/**
|
|
346
367
|
* Adds several resources to a group.
|
|
347
368
|
*/
|
|
348
|
-
addResourcesToGroup = this.mutation(
|
|
369
|
+
addResourcesToGroup = this.mutation(groupControllerAddResourcesToGroup)
|
|
349
370
|
/**
|
|
350
371
|
* Removes a resource from a group.
|
|
351
372
|
*/
|
|
352
|
-
removeResourceFromGroup = this.mutation(
|
|
373
|
+
removeResourceFromGroup = this.mutation(groupControllerDeleteResourceFromGroup)
|
|
353
374
|
/**
|
|
354
375
|
* Gets all roles in the account (paginated)
|
|
355
376
|
*/
|
|
356
|
-
allRoles = this.infiniteQuery(
|
|
377
|
+
allRoles = this.infiniteQuery(roleControllerGetRoles)
|
|
357
378
|
/**
|
|
358
379
|
* Get a role by id
|
|
359
380
|
*/
|
|
360
381
|
role = this.query({
|
|
361
|
-
name: 'account.
|
|
382
|
+
name: 'account.roleControllerGetRoles',
|
|
362
383
|
request: async (signal, { id }: { id: string }) => {
|
|
363
|
-
const roles = await
|
|
384
|
+
const roles = await roleControllerGetRoles({ filterBy: 'id', filterValue: id }, { signal })
|
|
364
385
|
if (!roles.length) throw new StackspotAPIError({ status: 404 })
|
|
365
386
|
return roles[0]
|
|
366
387
|
},
|
|
@@ -368,43 +389,43 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
368
389
|
/**
|
|
369
390
|
* Gets all members with the provided role (paginated)
|
|
370
391
|
*/
|
|
371
|
-
roleMembers = this.infiniteQuery(
|
|
392
|
+
roleMembers = this.infiniteQuery(roleControllerGetRoleMembers)
|
|
372
393
|
/**
|
|
373
394
|
* Creates a role
|
|
374
395
|
*/
|
|
375
|
-
createRole = this.mutation(
|
|
396
|
+
createRole = this.mutation(roleControllerCreateAccountRole)
|
|
376
397
|
/**
|
|
377
398
|
* Updates a role
|
|
378
399
|
*/
|
|
379
|
-
updateRole = this.mutation(
|
|
400
|
+
updateRole = this.mutation(roleControllerUpdateAccountRole)
|
|
380
401
|
/**
|
|
381
402
|
* Deletes a role
|
|
382
403
|
*/
|
|
383
|
-
deleteRole = this.mutation(
|
|
404
|
+
deleteRole = this.mutation(roleControllerDeleteAccountRole)
|
|
384
405
|
/**
|
|
385
406
|
* Adds a role to several members
|
|
386
407
|
*/
|
|
387
|
-
addRoleToMembers = this.mutation(
|
|
408
|
+
addRoleToMembers = this.mutation(roleControllerAddRoleToMember)
|
|
388
409
|
/**
|
|
389
410
|
* Gets all groups with the provided role (paginated)
|
|
390
411
|
*/
|
|
391
|
-
roleGroups = this.infiniteQuery(
|
|
412
|
+
roleGroups = this.infiniteQuery(roleControllerGetRoleGroups)
|
|
392
413
|
/**
|
|
393
414
|
* Adds a role to several groups
|
|
394
415
|
*/
|
|
395
|
-
addRoleToGroups = this.mutation(
|
|
416
|
+
addRoleToGroups = this.mutation(roleControllerBindRoleGroups)
|
|
396
417
|
/**
|
|
397
418
|
* Get the actions a role is allowed to perform
|
|
398
419
|
*/
|
|
399
|
-
rolePermissions = this.infiniteQuery(
|
|
420
|
+
rolePermissions = this.infiniteQuery(roleControllerGetResourcesAndActionsWithStatus)
|
|
400
421
|
/**
|
|
401
422
|
* Updates a role with new list of permissions
|
|
402
423
|
*/
|
|
403
|
-
updateRolePermissions = this.mutation(
|
|
424
|
+
updateRolePermissions = this.mutation(roleControllerUpdateRoleWithNewActions)
|
|
404
425
|
/**
|
|
405
426
|
* Updates a specific role permission
|
|
406
427
|
*/
|
|
407
|
-
updateRolePermission = this.mutation(
|
|
428
|
+
updateRolePermission = this.mutation(roleControllerUpdateResourceActions)
|
|
408
429
|
/**
|
|
409
430
|
* Gets all resources (paginated)
|
|
410
431
|
*/
|
|
@@ -412,23 +433,25 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
412
433
|
/**
|
|
413
434
|
* Gets all resource types (paginated)
|
|
414
435
|
*/
|
|
415
|
-
allResourceTypes = this.infiniteQuery(
|
|
436
|
+
allResourceTypes = this.infiniteQuery(resourceTypeControllerGetResourceTypes)
|
|
416
437
|
/**
|
|
417
438
|
* Sends an email for downloading the CLI
|
|
418
439
|
*/
|
|
419
|
-
sendDownloadCLIEmail = this.mutation(
|
|
440
|
+
sendDownloadCLIEmail = this.mutation(emailControllerSendDownloadEmail)
|
|
420
441
|
/**
|
|
421
442
|
* Creates an SCM credential (account level).
|
|
422
443
|
*/
|
|
423
|
-
createSCMCredential =
|
|
444
|
+
createSCMCredential =
|
|
445
|
+
this.mutation(accountScmControllerScmCredentialSave as (variables: CreateSCMRequest, opts?: RequestOpts) => Promise<unknown>)
|
|
424
446
|
/**
|
|
425
447
|
* Updates an SCM credential (account level).
|
|
426
448
|
*/
|
|
427
|
-
updateSCMCredential =
|
|
449
|
+
updateSCMCredential =
|
|
450
|
+
this.mutation(accountScmControllerScmCredentialUpdate as (variables: UpdateSCMRequest, opts?: RequestOpts) => Promise<unknown>)
|
|
428
451
|
/**
|
|
429
452
|
* Gets all SCM credentials (account level).
|
|
430
453
|
*/
|
|
431
|
-
allSCMCredentials = this.query(
|
|
454
|
+
allSCMCredentials = this.query(accountScmControllerListScmCredentials)
|
|
432
455
|
/**
|
|
433
456
|
* Gets the status for the SCM credential.
|
|
434
457
|
*
|
|
@@ -443,7 +466,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
443
466
|
name: 'account.scmStatus',
|
|
444
467
|
request: async (signal): Promise<SCMStatus> => {
|
|
445
468
|
try {
|
|
446
|
-
const data = await
|
|
469
|
+
const data = await accountScmControllerIsCreatedScmCredentials({ signal })
|
|
447
470
|
return { status: 'valid', ...data }
|
|
448
471
|
} catch (error) {
|
|
449
472
|
if (error instanceof HttpError) {
|
|
@@ -459,11 +482,11 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
459
482
|
/**
|
|
460
483
|
* Enables Personal Access Token (PAT) generation.
|
|
461
484
|
*/
|
|
462
|
-
enablePATGeneration = this.mutation(
|
|
485
|
+
enablePATGeneration = this.mutation(authenticationControllerCreatePersonalAccessToken)
|
|
463
486
|
/**
|
|
464
487
|
* Disables Personal Access Token (PAT) generation.
|
|
465
488
|
*/
|
|
466
|
-
disablePATGeneration = this.mutation(
|
|
489
|
+
disablePATGeneration = this.mutation(authenticationControllerDisablePersonalAccessTokenGeneration)
|
|
467
490
|
/**
|
|
468
491
|
* Verifies if Personal Access Token (PAT) generation is enabled.
|
|
469
492
|
*/
|
|
@@ -471,7 +494,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
471
494
|
name: 'account.patEnabled',
|
|
472
495
|
request: async (signal) => {
|
|
473
496
|
try {
|
|
474
|
-
await
|
|
497
|
+
await authenticationControllerPersonalAccessTokenAuthorization({ signal })
|
|
475
498
|
return true
|
|
476
499
|
} catch (error) {
|
|
477
500
|
if (error instanceof HttpError && error.status === 404) return false
|
|
@@ -486,7 +509,7 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
486
509
|
name: 'account.userHasSCMCredential',
|
|
487
510
|
request: async (signal) => {
|
|
488
511
|
try {
|
|
489
|
-
await
|
|
512
|
+
await userControllerIsCreatedScmCredentials({ signal })
|
|
490
513
|
return true
|
|
491
514
|
} catch {
|
|
492
515
|
return false
|
|
@@ -496,294 +519,295 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
496
519
|
/**
|
|
497
520
|
* Creates an SCM credential for the user currently logged in.
|
|
498
521
|
*/
|
|
499
|
-
createUserSCMCredential = this.mutation(
|
|
522
|
+
createUserSCMCredential = this.mutation(userControllerScmCredentialSave)
|
|
500
523
|
/**
|
|
501
524
|
* Updates an SCM credential for the user currently logged in.
|
|
502
525
|
*/
|
|
503
|
-
updateUserSCMCredential = this.mutation(
|
|
526
|
+
updateUserSCMCredential = this.mutation(userControllerScmCredentialUpdate)
|
|
504
527
|
/**
|
|
505
528
|
* Gets all SCM credentials for the user currently logged in.
|
|
506
529
|
*/
|
|
507
|
-
allUserSCMCredentials = this.query(
|
|
530
|
+
allUserSCMCredentials = this.query(userControllerV2ListScmCredentials)
|
|
508
531
|
/**
|
|
509
532
|
* Gets the SCM provider.
|
|
510
533
|
*/
|
|
511
|
-
scmProvider = this.query(
|
|
534
|
+
scmProvider = this.query(accountScmControllerGetScmProvider)
|
|
512
535
|
/**
|
|
513
536
|
* Deletes the SCM credentials for the user currently logged in.
|
|
514
537
|
*/
|
|
515
|
-
deleteSCMCredentials = this.mutation(
|
|
538
|
+
deleteSCMCredentials = this.mutation(userControllerScmDelete)
|
|
516
539
|
/**
|
|
517
540
|
* Gets all service credentials (paginated).
|
|
518
541
|
*/
|
|
519
|
-
allServiceCredentials = this.infiniteQuery(
|
|
542
|
+
allServiceCredentials = this.infiniteQuery(serviceCredentialControllerGetServiceCredentials)
|
|
520
543
|
/**
|
|
521
544
|
* Gets a service credential by id.
|
|
522
545
|
*/
|
|
523
|
-
serviceCredential = this.query(
|
|
546
|
+
serviceCredential = this.query(serviceCredentialControllerGetServiceCredential)
|
|
524
547
|
/**
|
|
525
548
|
* Gets all the permissions linked to a service credential.
|
|
526
549
|
*/
|
|
527
|
-
serviceCredentialPermissions = this.query(
|
|
550
|
+
serviceCredentialPermissions = this.query(serviceCredentialControllerGetServiceCredentialPermissions)
|
|
528
551
|
/**
|
|
529
552
|
* Gets all groups linked to a service credential.
|
|
530
553
|
*/
|
|
531
|
-
serviceCredentialGroups = this.query(
|
|
554
|
+
serviceCredentialGroups = this.query(serviceCredentialControllerV2GetServiceCredentialGroups)
|
|
532
555
|
/**
|
|
533
556
|
* Creates a service credential.
|
|
534
557
|
*/
|
|
535
|
-
createServiceCredential = this.mutation(
|
|
558
|
+
createServiceCredential = this.mutation(serviceCredentialControllerCreateServiceCredential)
|
|
536
559
|
/**
|
|
537
560
|
* Adds a service credential to several groups.
|
|
538
561
|
*/
|
|
539
|
-
addServiceCredentialToGroups = this.mutation(
|
|
562
|
+
addServiceCredentialToGroups = this.mutation(serviceCredentialControllerAssociateGroupToServiceCredential)
|
|
540
563
|
/**
|
|
541
564
|
* Removes a service credential from a group.
|
|
542
565
|
*/
|
|
543
|
-
removeServiceCredentialFromGroup = this.mutation(
|
|
566
|
+
removeServiceCredentialFromGroup = this.mutation(serviceCredentialControllerDisassociateGroupToServiceCredential)
|
|
544
567
|
/**
|
|
545
568
|
* Revokes a service credential.
|
|
546
569
|
*/
|
|
547
|
-
revokeServiceCredential = this.mutation(
|
|
570
|
+
revokeServiceCredential = this.mutation(serviceCredentialControllerRevokeServiceCredential)
|
|
548
571
|
/**
|
|
549
572
|
* Creates a group mapping within an SSO.
|
|
550
573
|
*/
|
|
551
|
-
createSSOGroupMapping = this.mutation(
|
|
574
|
+
createSSOGroupMapping = this.mutation(ssoControllerCreateGroupMapping)
|
|
552
575
|
/**
|
|
553
576
|
* Deletes a group mapping from an SSO.
|
|
554
577
|
*/
|
|
555
|
-
deleteSSOGroupMapping = this.mutation(
|
|
578
|
+
deleteSSOGroupMapping = this.mutation(ssoControllerDeleteGroupMapping)
|
|
556
579
|
/**
|
|
557
580
|
* Updates a group mapping within an SSO.
|
|
558
581
|
*/
|
|
559
|
-
updateSSOGroupMapping = this.mutation(
|
|
582
|
+
updateSSOGroupMapping = this.mutation(ssoControllerUpdateGroupMapping)
|
|
560
583
|
/**
|
|
561
584
|
* Get All SSO Group Mappings (paginated).
|
|
562
585
|
*/
|
|
563
|
-
allSSOGroupMappings = this.infiniteQuery(
|
|
586
|
+
allSSOGroupMappings = this.infiniteQuery(ssoControllerGetAllGroupMapping, { accumulator: 'items' })
|
|
564
587
|
/**
|
|
565
588
|
* Parses a file with a configuration for an SSO. The protocol can be either SAML or OPENID.
|
|
566
589
|
*/
|
|
567
|
-
parseSSOConfig = this.mutation(
|
|
590
|
+
parseSSOConfig = this.mutation(ssoControllerSsoParseConfigurationFile)
|
|
568
591
|
/**
|
|
569
592
|
* Creates an SSO. The protocol can be either SAML or OPENID.
|
|
570
593
|
*/
|
|
571
|
-
setupSSO = this.mutation(
|
|
594
|
+
setupSSO = this.mutation(ssoControllerSsoConfigure)
|
|
572
595
|
/**
|
|
573
596
|
* Gets all SSOs.
|
|
574
597
|
*/
|
|
575
|
-
allSSO = this.query(
|
|
598
|
+
allSSO = this.query(ssoControllerGetAllAccountSso)
|
|
576
599
|
/**
|
|
577
600
|
* Updates an SSO. The payload will replace everything in the current configuration (won't be merged). Use `patchSSO` for merging.
|
|
578
601
|
*/
|
|
579
|
-
updateSSO = this.mutation(
|
|
602
|
+
updateSSO = this.mutation(ssoControllerUpdateSso)
|
|
580
603
|
/**
|
|
581
604
|
* Patches an SSO with a partial configuration change.
|
|
582
605
|
*/
|
|
583
|
-
patchSSO = this.mutation(
|
|
606
|
+
patchSSO = this.mutation(ssoControllerPartialUpdateSso)
|
|
584
607
|
/**
|
|
585
608
|
* Gets an SSO by id.
|
|
586
609
|
*/
|
|
587
|
-
sso = this.query(
|
|
610
|
+
sso = this.query(ssoControllerGetAccountSso)
|
|
588
611
|
/**
|
|
589
612
|
* Deletes an SSO.
|
|
590
613
|
*/
|
|
591
|
-
deleteSSO = this.mutation(
|
|
614
|
+
deleteSSO = this.mutation(ssoControllerDeleteSso)
|
|
592
615
|
/**
|
|
593
616
|
* Gets the attributes of an SSO.
|
|
594
617
|
*/
|
|
595
|
-
ssoAttributes = this.query(
|
|
618
|
+
ssoAttributes = this.query(ssoControllerSsoGetAttributesConfig)
|
|
596
619
|
/**
|
|
597
620
|
* Updates the attributes in a SSO.
|
|
598
621
|
*/
|
|
599
|
-
updateSSOAttributes = this.mutation(
|
|
622
|
+
updateSSOAttributes = this.mutation(ssoControllerSsoAddAttributes)
|
|
600
623
|
|
|
601
624
|
/**
|
|
602
625
|
* Gets the preferences of a member.
|
|
603
626
|
*/
|
|
604
|
-
preferences = this.query(
|
|
627
|
+
preferences = this.query(memberControllerGetMemberPreferences)
|
|
605
628
|
|
|
606
629
|
/**
|
|
607
630
|
* Updates the preferences of a member.
|
|
608
631
|
*/
|
|
609
|
-
updatePreferences = this.mutation(
|
|
632
|
+
updatePreferences = this.mutation(memberControllerUpdateMemberPreferences)
|
|
610
633
|
|
|
611
634
|
/**
|
|
612
635
|
* Get account member favorite resources
|
|
613
636
|
*/
|
|
614
|
-
getAccountMemberFavoriteResources = this.query(
|
|
637
|
+
getAccountMemberFavoriteResources = this.query(memberFavoritesControllerListAccountMemberFavorites)
|
|
615
638
|
/**
|
|
616
639
|
* Add account member favorite resource
|
|
617
640
|
*/
|
|
618
|
-
addAccountMemberFavoriteResource = this.mutation(
|
|
641
|
+
addAccountMemberFavoriteResource = this.mutation(memberFavoritesControllerAddAccountMemberFavorite)
|
|
619
642
|
/**
|
|
620
643
|
* Get member favorite resources by type
|
|
621
644
|
*/
|
|
622
|
-
getMemberFavoriteResourcesByType = this.query(
|
|
645
|
+
getMemberFavoriteResourcesByType = this.query(memberFavoritesControllerListMemberFavoritesByResource)
|
|
623
646
|
/**
|
|
624
647
|
* Remove resource from member favorites
|
|
625
648
|
*/
|
|
626
|
-
removeResourceFromMemberFavorites = this.mutation(
|
|
649
|
+
removeResourceFromMemberFavorites = this.mutation(memberFavoritesControllerDeleteMemberFavorite)
|
|
627
650
|
/**
|
|
628
651
|
* Validate permission access
|
|
629
652
|
*/
|
|
630
653
|
validatePermissionAccess = this.query({
|
|
631
|
-
name: 'account.
|
|
632
|
-
request: async (signal, variables: Parameters<typeof
|
|
654
|
+
name: 'account.permissionControllerGetAccess',
|
|
655
|
+
request: async (signal, variables: Parameters<typeof permissionControllerGetAccess>[0]) => {
|
|
633
656
|
try {
|
|
634
|
-
await
|
|
657
|
+
await permissionControllerGetAccess(variables, { signal })
|
|
635
658
|
return true
|
|
636
659
|
} catch {
|
|
637
660
|
return false
|
|
638
661
|
}
|
|
639
662
|
},
|
|
640
|
-
permission: this.createPermissionFunctionFor(
|
|
663
|
+
permission: this.createPermissionFunctionFor(permissionControllerGetAccess),
|
|
641
664
|
})
|
|
642
665
|
/**
|
|
643
666
|
* Get all account members with pagination
|
|
644
667
|
*/
|
|
645
|
-
allMembersWithPagination = this.query(
|
|
668
|
+
allMembersWithPagination = this.query(memberControllerV2GetAccountMembers)
|
|
646
669
|
/**
|
|
647
670
|
* Get Members Groups By Profile
|
|
648
671
|
*/
|
|
649
|
-
allMembersGroupsByProfileWithPagination = this.query(
|
|
672
|
+
allMembersGroupsByProfileWithPagination = this.query(memberControllerV2GetMemberGroups)
|
|
650
673
|
/**
|
|
651
674
|
* Get Members Roles By Profile
|
|
652
675
|
*/
|
|
653
|
-
allMembersRolesByProfileWithPagination = this.query(
|
|
676
|
+
allMembersRolesByProfileWithPagination = this.query(memberControllerV2GetRoles)
|
|
654
677
|
/**
|
|
655
678
|
* Get all account groups with pagination
|
|
656
679
|
*/
|
|
657
|
-
allGroupsWithPagination = this.query(
|
|
680
|
+
allGroupsWithPagination = this.query(groupControllerV2GetGroups)
|
|
658
681
|
/**
|
|
659
682
|
* Get groups with infinite query
|
|
660
683
|
*/
|
|
661
|
-
groups = this.infiniteQuery(
|
|
684
|
+
groups = this.infiniteQuery(groupControllerV2GetGroups, { accumulator: 'items' })
|
|
662
685
|
/**
|
|
663
686
|
* Get all members by group with pagination
|
|
664
687
|
*/
|
|
665
|
-
allMembersByGroupWithPagination = this.query(
|
|
688
|
+
allMembersByGroupWithPagination = this.query(groupControllerV2GetMembers)
|
|
666
689
|
/**
|
|
667
690
|
* Get all roles by groups with pagination
|
|
668
691
|
*/
|
|
669
|
-
allRolesByGroupWithPagination = this.query(
|
|
692
|
+
allRolesByGroupWithPagination = this.query(groupControllerV2GetRoles)
|
|
670
693
|
/**
|
|
671
694
|
* Gets all resources of a group (paginated)
|
|
672
695
|
*/
|
|
673
|
-
groupResources = this.query(
|
|
696
|
+
groupResources = this.query(groupControllerGetGroupResources)
|
|
674
697
|
/**
|
|
675
698
|
* Get all roles account with pagination
|
|
676
699
|
*/
|
|
677
|
-
allRolesWithPagination = this.query(
|
|
700
|
+
allRolesWithPagination = this.query(roleControllerV2GetRoles)
|
|
678
701
|
/**
|
|
679
702
|
* Get all members by role with pagination
|
|
680
703
|
*/
|
|
681
|
-
allMembersByRoleWithPagination = this.query(
|
|
704
|
+
allMembersByRoleWithPagination = this.query(roleControllerV2GetRoleMembers)
|
|
682
705
|
/**
|
|
683
706
|
* Get all groups by roles with pagination
|
|
684
707
|
*/
|
|
685
|
-
allGroupsByRoleWithPagination = this.query(
|
|
708
|
+
allGroupsByRoleWithPagination = this.query(roleControllerV2GetRoleGroups)
|
|
686
709
|
/**
|
|
687
710
|
* Get Service Credentials
|
|
688
711
|
*/
|
|
689
|
-
allServiceCredentialsWithPagination = this.query(
|
|
712
|
+
allServiceCredentialsWithPagination = this.query(serviceCredentialControllerV2GetServiceCredentials)
|
|
690
713
|
|
|
691
714
|
/**
|
|
692
715
|
* Creates an extension.
|
|
693
716
|
*/
|
|
694
|
-
createExtension = this.mutation(
|
|
717
|
+
createExtension = this.mutation(extensionControllerCreateExtension)
|
|
695
718
|
|
|
696
719
|
/**
|
|
697
720
|
* Deletes an extension.
|
|
698
721
|
*/
|
|
699
|
-
deleteExtension = this.mutation(
|
|
722
|
+
deleteExtension = this.mutation(extensionControllerDeleteExtension)
|
|
700
723
|
|
|
701
724
|
/**
|
|
702
725
|
* Updates an extension with a patch operation.
|
|
703
726
|
*/
|
|
704
|
-
patchExtension = this.mutation(
|
|
727
|
+
patchExtension = this.mutation(extensionControllerUpdateExtension)
|
|
705
728
|
|
|
706
729
|
/**
|
|
707
730
|
* Lists all extensions.
|
|
708
731
|
*/
|
|
709
|
-
extensions = this.query(
|
|
732
|
+
extensions = this.query(extensionControllerListManageableExtensions)
|
|
710
733
|
|
|
711
734
|
/**
|
|
712
735
|
* Lists all versions of an extension.
|
|
713
736
|
*/
|
|
714
|
-
extensionVersions = this.query(
|
|
737
|
+
extensionVersions = this.query(extensionControllerListExtensionVersions)
|
|
715
738
|
|
|
716
739
|
/**
|
|
717
740
|
* Gets a specific version of an extension.
|
|
718
741
|
*/
|
|
719
|
-
getExtensionVersion = this.query(
|
|
742
|
+
getExtensionVersion = this.query(extensionControllerGetExtensionVersion)
|
|
720
743
|
|
|
721
744
|
/**
|
|
722
745
|
* Gets the active version of an extension.
|
|
723
746
|
*/
|
|
724
|
-
getActiveExtensionVersion = this.query(
|
|
747
|
+
getActiveExtensionVersion = this.query(extensionControllerGetActiveExtensionVersion)
|
|
725
748
|
|
|
726
749
|
/**
|
|
727
750
|
* Creates a new version of an extension.
|
|
728
751
|
*/
|
|
729
|
-
createExtensionVersion = this.mutation(
|
|
752
|
+
createExtensionVersion = this.mutation(extensionControllerCreateExtensionVersion)
|
|
730
753
|
|
|
731
754
|
/**
|
|
732
755
|
* Deletes a specific version of an extension.
|
|
733
756
|
*/
|
|
734
|
-
deleteExtensionVersion = this.mutation(
|
|
757
|
+
deleteExtensionVersion = this.mutation(extensionControllerDeleteExtensionVersion)
|
|
735
758
|
|
|
736
759
|
/**
|
|
737
760
|
* Lists all extension links.
|
|
738
761
|
*/
|
|
739
|
-
extensionLinks = this.query(
|
|
762
|
+
extensionLinks = this.query(extensionControllerListExtensionLinks)
|
|
740
763
|
|
|
741
764
|
/**
|
|
742
765
|
* Updates an extension link with a patch operation.
|
|
743
766
|
*/
|
|
744
|
-
patchExtensionLink = this.mutation(
|
|
767
|
+
patchExtensionLink = this.mutation(extensionControllerUpdateExtensionLink)
|
|
745
768
|
|
|
746
769
|
/**
|
|
747
770
|
* Creates a new extension link.
|
|
748
771
|
*/
|
|
749
|
-
createExtensionLink = this.mutation(
|
|
772
|
+
createExtensionLink = this.mutation(extensionControllerCreateExtensionLink)
|
|
750
773
|
|
|
751
774
|
/**
|
|
752
775
|
* Deletes an extension link.
|
|
753
776
|
*/
|
|
754
|
-
deleteExtensionLink = this.mutation(
|
|
777
|
+
deleteExtensionLink = this.mutation(extensionControllerDeleteExtensionLink)
|
|
755
778
|
|
|
756
779
|
/*
|
|
757
780
|
* Delete profile image
|
|
758
781
|
*/
|
|
759
|
-
deleteProfileImage = this.mutation(
|
|
782
|
+
deleteProfileImage = this.mutation(memberControllerDeleteProfileImage)
|
|
760
783
|
|
|
761
784
|
/**
|
|
762
785
|
* Get secrets
|
|
763
786
|
*/
|
|
764
|
-
getSecrets = this.query(
|
|
787
|
+
getSecrets = this.query(secretControllerFindSecrets)
|
|
765
788
|
/**
|
|
766
789
|
* Get workspace and spot secrets
|
|
767
790
|
*/
|
|
768
791
|
getWorkspaceAndSpotSecrets = this.query({
|
|
769
792
|
name: 'account.getWorkspaceAndSpotSecrets',
|
|
770
793
|
request: async (signal) => {
|
|
771
|
-
const workspaceSecrets =
|
|
772
|
-
|
|
794
|
+
const workspaceSecrets =
|
|
795
|
+
await secretControllerFindSecrets({ filterByScope: 'SCOPED', filterByScopedBy: 'WORKSPACE', size: 1500 }, { signal })
|
|
796
|
+
const spotSecrets = await secretControllerFindSecrets({ filterByScope: 'SCOPED', filterByScopedBy: 'SPOT', size: 1500 }, { signal })
|
|
773
797
|
return { workspaces: workspaceSecrets?.items, spots: spotSecrets?.items }
|
|
774
798
|
},
|
|
775
799
|
})
|
|
776
800
|
/**
|
|
777
801
|
* Get secret by id
|
|
778
802
|
*/
|
|
779
|
-
getSecret = this.query(
|
|
803
|
+
getSecret = this.query(secretControllerGetById)
|
|
780
804
|
/**
|
|
781
805
|
* Get secrets by ids
|
|
782
806
|
*/
|
|
783
807
|
getSecretsByIds = this.query({
|
|
784
808
|
name: 'getSecretsByIds',
|
|
785
809
|
request: (signal, variables: { ids: string[] }) => {
|
|
786
|
-
const requests = variables?.ids?.map((secretId) =>
|
|
810
|
+
const requests = variables?.ids?.map((secretId) => secretControllerGetById({ secretId }, { signal }))
|
|
787
811
|
return Promise.all(requests)
|
|
788
812
|
},
|
|
789
813
|
})
|
|
@@ -791,203 +815,203 @@ class AccountClient extends ReactQueryNetworkClient {
|
|
|
791
815
|
/**
|
|
792
816
|
* Create secret
|
|
793
817
|
*/
|
|
794
|
-
createSecret = this.mutation(
|
|
818
|
+
createSecret = this.mutation(secretControllerCreateSecret)
|
|
795
819
|
/**
|
|
796
820
|
* Delete secret
|
|
797
821
|
*/
|
|
798
|
-
deleteSecret = this.mutation(
|
|
822
|
+
deleteSecret = this.mutation(secretControllerDeleteSecret)
|
|
799
823
|
/**
|
|
800
824
|
* Update secret
|
|
801
825
|
*/
|
|
802
|
-
updateSecret = this.mutation(
|
|
826
|
+
updateSecret = this.mutation(secretControllerUpdateSecret)
|
|
803
827
|
/**
|
|
804
828
|
* Enable secret
|
|
805
829
|
*/
|
|
806
|
-
enableSecret = this.mutation(
|
|
830
|
+
enableSecret = this.mutation(secretControllerEnableSecret)
|
|
807
831
|
/**
|
|
808
832
|
* Disable secret
|
|
809
833
|
*/
|
|
810
|
-
disableSecret = this.mutation(
|
|
834
|
+
disableSecret = this.mutation(secretControllerDisableSecret)
|
|
811
835
|
/**
|
|
812
836
|
* Cancel Secret delete
|
|
813
837
|
*/
|
|
814
|
-
cancelSecretDelete = this.mutation(
|
|
838
|
+
cancelSecretDelete = this.mutation(secretControllerCancelSecretDelete)
|
|
815
839
|
|
|
816
840
|
// TRIAL
|
|
817
841
|
/**
|
|
818
842
|
* Create trial account
|
|
819
843
|
*/
|
|
820
|
-
createTrialAccount = this.mutation(
|
|
844
|
+
createTrialAccount = this.mutation(accountControllerCreateTrialAccount)
|
|
821
845
|
/**
|
|
822
846
|
* Deletes trial account
|
|
823
847
|
*/
|
|
824
|
-
deleteTrialAccount = this.mutation(
|
|
848
|
+
deleteTrialAccount = this.mutation(accountControllerRemoveTrialAccount)
|
|
825
849
|
/**
|
|
826
850
|
* Update trial account info
|
|
827
851
|
*/
|
|
828
|
-
updateTrialAccount = this.mutation(
|
|
852
|
+
updateTrialAccount = this.mutation(accountControllerUpdatePersonalAccountDetails)
|
|
829
853
|
/**
|
|
830
854
|
* Creates a personal contact lead
|
|
831
855
|
*/
|
|
832
|
-
personalContact = this.mutation(
|
|
856
|
+
personalContact = this.mutation(leadControllerPersonalContact)
|
|
833
857
|
/**
|
|
834
858
|
* Creates an enterprise contact lead
|
|
835
859
|
*/
|
|
836
|
-
enterpriseContact = this.mutation(
|
|
860
|
+
enterpriseContact = this.mutation(leadControllerEnterpriseContact)
|
|
837
861
|
/**
|
|
838
862
|
* Get trial expiration info
|
|
839
863
|
*/
|
|
840
|
-
trialAccountDetails = this.query(
|
|
864
|
+
trialAccountDetails = this.query(accountControllerGetPersonalAccountDetails)
|
|
841
865
|
/**
|
|
842
866
|
* Get account rate limit
|
|
843
867
|
*/
|
|
844
|
-
getAccountRateLimit = this.query(
|
|
868
|
+
getAccountRateLimit = this.query(accountControllerGetAccountRateLimit)
|
|
845
869
|
/**
|
|
846
870
|
* Update Account rate limit
|
|
847
871
|
*/
|
|
848
|
-
updateRateLimit = this.mutation(
|
|
872
|
+
updateRateLimit = this.mutation(accountControllerUpdateRateLimit)
|
|
849
873
|
/**
|
|
850
874
|
* Get all service credential rate limit
|
|
851
875
|
*/
|
|
852
|
-
getAllServiceCredentialRateLimit = this.query(
|
|
876
|
+
getAllServiceCredentialRateLimit = this.query(serviceCredentialControllerV2GetAllServiceCredentialRateLimit)
|
|
853
877
|
/**
|
|
854
878
|
* Update service credential rate limit
|
|
855
879
|
*/
|
|
856
|
-
updateServiceCredentialRateLimit = this.mutation(
|
|
880
|
+
updateServiceCredentialRateLimit = this.mutation(serviceCredentialControllerV2UpdateRateLimitForServiceCredential)
|
|
857
881
|
/**
|
|
858
882
|
* Get service credential rate limit by id
|
|
859
883
|
*/
|
|
860
|
-
getServiceCredentialByIdRateLimit = this.query(
|
|
884
|
+
getServiceCredentialByIdRateLimit = this.query(serviceCredentialControllerV2GetServiceCredentialByIdRateLimit)
|
|
861
885
|
/**
|
|
862
886
|
* Create a new service credential V2
|
|
863
887
|
*/
|
|
864
|
-
createServiceCredentialV2 = this.mutation(
|
|
888
|
+
createServiceCredentialV2 = this.mutation(serviceCredentialControllerV2CreateServiceCredential)
|
|
865
889
|
|
|
866
890
|
/**
|
|
867
891
|
* Rotate the secret of a service credential
|
|
868
892
|
*/
|
|
869
|
-
rotateServiceCredentialSecret = this.mutation(
|
|
893
|
+
rotateServiceCredentialSecret = this.mutation(serviceCredentialControllerV2RotateServiceCredentialSecret)
|
|
870
894
|
|
|
871
895
|
/**
|
|
872
896
|
* Update the scopes of a service credential
|
|
873
897
|
*/
|
|
874
|
-
updateServiceCredentialScopes = this.mutation(
|
|
898
|
+
updateServiceCredentialScopes = this.mutation(serviceCredentialControllerV2UpdateServiceCredentialScopes)
|
|
875
899
|
|
|
876
900
|
/**
|
|
877
901
|
* Revoke a service credential V2
|
|
878
902
|
*/
|
|
879
|
-
revokeServiceCredentialV2 = this.mutation(
|
|
903
|
+
revokeServiceCredentialV2 = this.mutation(serviceCredentialControllerV2RevokeServiceCredential)
|
|
880
904
|
|
|
881
905
|
/**
|
|
882
906
|
* Validates a campaign code.
|
|
883
907
|
*/
|
|
884
|
-
validateCampaignCode = this.query(
|
|
908
|
+
validateCampaignCode = this.query(campaignControllerValidateCampaignCode)
|
|
885
909
|
|
|
886
910
|
/**
|
|
887
911
|
* Get feature flag by id
|
|
888
912
|
*/
|
|
889
|
-
featureFlagById = this.query(
|
|
913
|
+
featureFlagById = this.query(featureFlagControllerV2GetFeatureFlag)
|
|
890
914
|
/**
|
|
891
915
|
* Update feature flag by id
|
|
892
916
|
*/
|
|
893
|
-
updateFeatureFlagById = this.mutation(
|
|
917
|
+
updateFeatureFlagById = this.mutation(featureFlagControllerV2UpdateFeatureFlag)
|
|
894
918
|
/**
|
|
895
919
|
* Get enabled feature flags for an account
|
|
896
920
|
*/
|
|
897
|
-
getEnabledFeatureFlagsForAccount = this.query(
|
|
921
|
+
getEnabledFeatureFlagsForAccount = this.query(featureFlagControllerV2GetEnabledFeatureFlagsForAccount)
|
|
898
922
|
|
|
899
923
|
/**
|
|
900
924
|
* Retries a external link by type.
|
|
901
925
|
*/
|
|
902
|
-
getExternalLinksByType = this.query(
|
|
926
|
+
getExternalLinksByType = this.query(externalLinkControllerGetExternalLinksByType)
|
|
903
927
|
|
|
904
928
|
/** Account admin flow - for backoffice use */
|
|
905
929
|
|
|
906
930
|
/**
|
|
907
931
|
* Create an enterprise account
|
|
908
932
|
*/
|
|
909
|
-
createEnterpriseAccount = this.mutation(
|
|
933
|
+
createEnterpriseAccount = this.mutation(adminAccountControllerCreate)
|
|
910
934
|
/**
|
|
911
935
|
* Lists enterprise accounts
|
|
912
936
|
*/
|
|
913
|
-
getEnterpriseAccounts = this.query(
|
|
937
|
+
getEnterpriseAccounts = this.query(adminAccountControllerGetAccounts)
|
|
914
938
|
/**
|
|
915
939
|
* Get an enterprise account
|
|
916
940
|
*/
|
|
917
|
-
getEnterpriseAccount = this.query(
|
|
941
|
+
getEnterpriseAccount = this.query(adminAccountControllerGetAccount)
|
|
918
942
|
/**
|
|
919
943
|
* Adds a new email domain to an existing account
|
|
920
944
|
*/
|
|
921
|
-
addEmailDomain = this.mutation(
|
|
945
|
+
addEmailDomain = this.mutation(adminAccountControllerAddNewEmailDomain)
|
|
922
946
|
/**
|
|
923
947
|
* Updates the sales representatives
|
|
924
948
|
*/
|
|
925
|
-
updateSalesRepresentatives = this.mutation(
|
|
949
|
+
updateSalesRepresentatives = this.mutation(adminAccountControllerUpdateSalesRepresentatives)
|
|
926
950
|
/**
|
|
927
951
|
* Create FIDO magic link
|
|
928
952
|
*/
|
|
929
|
-
createFidoMagicLink = this.mutation(
|
|
953
|
+
createFidoMagicLink = this.mutation(memberControllerCreateFidoMagicLink)
|
|
930
954
|
/**
|
|
931
955
|
* Delete FIDO key
|
|
932
956
|
*/
|
|
933
|
-
deleteFidoKey = this.mutation(
|
|
957
|
+
deleteFidoKey = this.mutation(memberControllerDeleteFidoKey)
|
|
934
958
|
/**
|
|
935
959
|
* Find Secret Associations
|
|
936
960
|
*/
|
|
937
|
-
findSecretAssociations = this.infiniteQuery(
|
|
961
|
+
findSecretAssociations = this.infiniteQuery(secretControllerFindAssociations, { accumulator: 'items' })
|
|
938
962
|
/**
|
|
939
963
|
* Get expiration data
|
|
940
964
|
*/
|
|
941
|
-
getExpirationData = this.query(
|
|
965
|
+
getExpirationData = this.query(accountControllerGetPersonalAccountExpirationData)
|
|
942
966
|
/**
|
|
943
967
|
* Reactive trial account
|
|
944
968
|
*/
|
|
945
|
-
reactivateTrialAccount = this.mutation(
|
|
969
|
+
reactivateTrialAccount = this.mutation(accountControllerReactivateTrialAccount)
|
|
946
970
|
|
|
947
971
|
/**
|
|
948
972
|
* Get all service credentials paginated
|
|
949
973
|
*/
|
|
950
|
-
getServicesCredentials = this.infiniteQuery(
|
|
974
|
+
getServicesCredentials = this.infiniteQuery(serviceCredentialControllerV3GetAll, { accumulator: 'items' })
|
|
951
975
|
/**
|
|
952
976
|
* Get Service Credential V3
|
|
953
977
|
*/
|
|
954
|
-
getServiceCredential = this.query(
|
|
978
|
+
getServiceCredential = this.query(serviceCredentialControllerV3GetById)
|
|
955
979
|
/**
|
|
956
980
|
* Get Resources Types with actions
|
|
957
981
|
*/
|
|
958
|
-
resourcesTypesWithActions = this.infiniteQuery(
|
|
982
|
+
resourcesTypesWithActions = this.infiniteQuery(resourceTypeControllerV3GetResourceTypes, { accumulator: 'items' })
|
|
959
983
|
/**
|
|
960
984
|
* Get Permissions from Service Credential
|
|
961
985
|
*/
|
|
962
|
-
getPermissionsServiceCredential = this.query(
|
|
986
|
+
getPermissionsServiceCredential = this.query(serviceCredentialControllerV3GetPermissions)
|
|
963
987
|
/**
|
|
964
988
|
* Get Groups from Service Credential
|
|
965
989
|
*/
|
|
966
|
-
getGroupsServiceCredential = this.query(
|
|
990
|
+
getGroupsServiceCredential = this.query(serviceCredentialControllerV3GetGroups)
|
|
967
991
|
/**
|
|
968
992
|
* Create Service Credential with Permissions
|
|
969
993
|
*/
|
|
970
|
-
createServiceCredentialWithResources = this.mutation(
|
|
994
|
+
createServiceCredentialWithResources = this.mutation(serviceCredentialControllerV3Create)
|
|
971
995
|
/**
|
|
972
996
|
* Add Permissions to Service Credential
|
|
973
997
|
*/
|
|
974
|
-
updatePermissionsToServiceCredential = this.mutation(
|
|
998
|
+
updatePermissionsToServiceCredential = this.mutation(serviceCredentialControllerV3ReplacePermissions)
|
|
975
999
|
/**
|
|
976
1000
|
* Remove permission from Service Credential
|
|
977
1001
|
*/
|
|
978
|
-
removePermissionFromServiceCredential = this.mutation(
|
|
1002
|
+
removePermissionFromServiceCredential = this.mutation(serviceCredentialControllerV3RemovePermissions)
|
|
979
1003
|
/**
|
|
980
1004
|
* Remove group from Service Credential
|
|
981
1005
|
*/
|
|
982
|
-
removeGroupFromServiceCredential = this.mutation(
|
|
1006
|
+
removeGroupFromServiceCredential = this.mutation(serviceCredentialControllerV3RemoveGroup)
|
|
983
1007
|
/**
|
|
984
1008
|
* Revoke Service Credential V3
|
|
985
1009
|
*/
|
|
986
|
-
revokeServiceCredentialV3 = this.mutation(
|
|
1010
|
+
revokeServiceCredentialV3 = this.mutation(serviceCredentialControllerV3Revoke)
|
|
987
1011
|
/**
|
|
988
1012
|
* Get list of resources
|
|
989
1013
|
*/
|
|
990
|
-
getResources = this.infiniteQuery(
|
|
1014
|
+
getResources = this.infiniteQuery(resourceControllerV3GetAiResources, { accumulator: 'items' })
|
|
991
1015
|
}
|
|
992
1016
|
|
|
993
1017
|
export const accountClient = new AccountClient()
|