@stack-spot/portal-network 0.1.0 → 0.2.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 +9 -0
- package/package.json +7 -6
- package/src/apis.json +2 -10
- package/src/client/account.ts +44 -2
- package/src/error/CanceledError.ts +3 -0
- package/src/error/DefaultAPIError.ts +27 -1
- package/src/error/StackspotAPIError.ts +33 -1
- package/src/network/AutoInfiniteQuery.ts +97 -0
- package/src/network/AutoQuery.ts +2 -1
- package/src/network/ManualInfiniteQuery.ts +88 -0
- package/src/network/ManualQuery.ts +2 -2
- package/src/network/NetworkClient.ts +79 -13
- package/src/network/ReactQueryNetworkClient.ts +130 -12
- package/src/network/react-query-client.ts +3 -0
- package/src/network/types.ts +208 -2
- package/.generate-api.failed.json +0 -1
- package/dist/api/account.d.ts +0 -2368
- package/dist/api/account.d.ts.map +0 -1
- package/dist/api/account.js +0 -1521
- package/dist/api/account.js.map +0 -1
- package/dist/api/ai.d.ts +0 -1432
- package/dist/api/ai.d.ts.map +0 -1
- package/dist/api/ai.js +0 -1342
- package/dist/api/ai.js.map +0 -1
- package/dist/api/apiRuntime.d.ts +0 -922
- package/dist/api/apiRuntime.d.ts.map +0 -1
- package/dist/api/apiRuntime.js +0 -599
- package/dist/api/apiRuntime.js.map +0 -1
- package/dist/api/cloudAccount.d.ts +0 -473
- package/dist/api/cloudAccount.d.ts.map +0 -1
- package/dist/api/cloudAccount.js +0 -300
- package/dist/api/cloudAccount.js.map +0 -1
- package/dist/api/cloudServices.d.ts +0 -1233
- package/dist/api/cloudServices.d.ts.map +0 -1
- package/dist/api/cloudServices.js +0 -715
- package/dist/api/cloudServices.js.map +0 -1
- package/dist/api/insights.d.ts +0 -123
- package/dist/api/insights.d.ts.map +0 -1
- package/dist/api/insights.js +0 -112
- package/dist/api/insights.js.map +0 -1
- package/dist/api/plugin.d.ts +0 -368
- package/dist/api/plugin.d.ts.map +0 -1
- package/dist/api/plugin.js +0 -218
- package/dist/api/plugin.js.map +0 -1
- package/dist/api/serviceCatalog.d.ts +0 -737
- package/dist/api/serviceCatalog.d.ts.map +0 -1
- package/dist/api/serviceCatalog.js +0 -611
- package/dist/api/serviceCatalog.js.map +0 -1
- package/dist/api/workflows.d.ts +0 -366
- package/dist/api/workflows.d.ts.map +0 -1
- package/dist/api/workflows.js +0 -175
- package/dist/api/workflows.js.map +0 -1
- package/dist/api/workspace.js +0 -1476
- package/dist/api/workspace.js.map +0 -1
- package/dist/api/workspaceManager.d.ts +0 -1121
- package/dist/api/workspaceManager.d.ts.map +0 -1
- package/dist/api/workspaceManager.js +0 -357
- package/dist/api/workspaceManager.js.map +0 -1
- package/dist/api/workspaceSearchEngine.d.ts +0 -93
- package/dist/api/workspaceSearchEngine.d.ts.map +0 -1
- package/dist/api/workspaceSearchEngine.js +0 -55
- package/dist/api/workspaceSearchEngine.js.map +0 -1
- package/dist/apis.json +0 -129
- package/dist/client/account.d.ts +0 -46
- package/dist/client/account.d.ts.map +0 -1
- package/dist/client/account.js +0 -104
- package/dist/client/account.js.map +0 -1
- package/dist/error/CanceledError.d.ts +0 -5
- package/dist/error/CanceledError.d.ts.map +0 -1
- package/dist/error/CanceledError.js +0 -7
- package/dist/error/CanceledError.js.map +0 -1
- package/dist/error/DefaultAPIError.d.ts +0 -9
- package/dist/error/DefaultAPIError.d.ts.map +0 -1
- package/dist/error/DefaultAPIError.js +0 -58
- package/dist/error/DefaultAPIError.js.map +0 -1
- package/dist/error/StackspotAPIError.d.ts +0 -19
- package/dist/error/StackspotAPIError.d.ts.map +0 -1
- package/dist/error/StackspotAPIError.js +0 -39
- package/dist/error/StackspotAPIError.js.map +0 -1
- package/dist/error/dictionary/account.d.ts +0 -55
- package/dist/error/dictionary/account.d.ts.map +0 -1
- package/dist/error/dictionary/account.js +0 -55
- package/dist/error/dictionary/account.js.map +0 -1
- package/dist/error/dictionary/action.d.ts +0 -163
- package/dist/error/dictionary/action.d.ts.map +0 -1
- package/dist/error/dictionary/action.js +0 -163
- package/dist/error/dictionary/action.js.map +0 -1
- package/dist/error/dictionary/base.d.ts +0 -21
- package/dist/error/dictionary/base.d.ts.map +0 -1
- package/dist/error/dictionary/base.js +0 -21
- package/dist/error/dictionary/base.js.map +0 -1
- package/dist/error/dictionary/cnt-fields.d.ts +0 -13
- package/dist/error/dictionary/cnt-fields.d.ts.map +0 -1
- package/dist/error/dictionary/cnt-fields.js +0 -13
- package/dist/error/dictionary/cnt-fields.js.map +0 -1
- package/dist/error/dictionary/cnt.d.ts +0 -79
- package/dist/error/dictionary/cnt.d.ts.map +0 -1
- package/dist/error/dictionary/cnt.js +0 -79
- package/dist/error/dictionary/cnt.js.map +0 -1
- package/dist/error/dictionary/rte.d.ts +0 -23
- package/dist/error/dictionary/rte.d.ts.map +0 -1
- package/dist/error/dictionary/rte.js +0 -23
- package/dist/error/dictionary/rte.js.map +0 -1
- package/dist/error/dictionary/rtm.d.ts +0 -9
- package/dist/error/dictionary/rtm.d.ts.map +0 -1
- package/dist/error/dictionary/rtm.js +0 -9
- package/dist/error/dictionary/rtm.js.map +0 -1
- package/dist/error/dictionary/workspace-fields.d.ts +0 -9
- package/dist/error/dictionary/workspace-fields.d.ts.map +0 -1
- package/dist/error/dictionary/workspace-fields.js +0 -9
- package/dist/error/dictionary/workspace-fields.js.map +0 -1
- package/dist/error/dictionary/workspace.d.ts +0 -99
- package/dist/error/dictionary/workspace.d.ts.map +0 -1
- package/dist/error/dictionary/workspace.js +0 -99
- package/dist/error/dictionary/workspace.js.map +0 -1
- package/dist/index.d.ts +0 -6
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -6
- package/dist/index.js.map +0 -1
- package/dist/network/AutoMutation.d.ts +0 -10
- package/dist/network/AutoMutation.d.ts.map +0 -1
- package/dist/network/AutoMutation.js +0 -20
- package/dist/network/AutoMutation.js.map +0 -1
- package/dist/network/AutoOperation.d.ts +0 -19
- package/dist/network/AutoOperation.d.ts.map +0 -1
- package/dist/network/AutoOperation.js +0 -99
- package/dist/network/AutoOperation.js.map +0 -1
- package/dist/network/AutoQuery.d.ts +0 -19
- package/dist/network/AutoQuery.d.ts.map +0 -1
- package/dist/network/AutoQuery.js +0 -70
- package/dist/network/AutoQuery.js.map +0 -1
- package/dist/network/ManualMutation.d.ts +0 -11
- package/dist/network/ManualMutation.d.ts.map +0 -1
- package/dist/network/ManualMutation.js +0 -32
- package/dist/network/ManualMutation.js.map +0 -1
- package/dist/network/ManualOperation.d.ts +0 -13
- package/dist/network/ManualOperation.d.ts.map +0 -1
- package/dist/network/ManualOperation.js +0 -53
- package/dist/network/ManualOperation.js.map +0 -1
- package/dist/network/ManualQuery.d.ts +0 -20
- package/dist/network/ManualQuery.d.ts.map +0 -1
- package/dist/network/ManualQuery.js +0 -77
- package/dist/network/ManualQuery.js.map +0 -1
- package/dist/network/NetworkClient.d.ts +0 -20
- package/dist/network/NetworkClient.d.ts.map +0 -1
- package/dist/network/NetworkClient.js +0 -85
- package/dist/network/NetworkClient.js.map +0 -1
- package/dist/network/ReactQueryNetworkClient.d.ts +0 -16
- package/dist/network/ReactQueryNetworkClient.d.ts.map +0 -1
- package/dist/network/ReactQueryNetworkClient.js +0 -125
- package/dist/network/ReactQueryNetworkClient.js.map +0 -1
- package/dist/network/react-query-client.d.ts +0 -3
- package/dist/network/react-query-client.d.ts.map +0 -1
- package/dist/network/react-query-client.js +0 -3
- package/dist/network/react-query-client.js.map +0 -1
- package/dist/network/types.d.ts +0 -55
- package/dist/network/types.d.ts.map +0 -1
- package/dist/network/types.js +0 -2
- package/dist/network/types.js.map +0 -1
- package/src/api/plugin.ts +0 -685
package/dist/api/account.js
DELETED
|
@@ -1,1521 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* OpenAPI definition
|
|
3
|
-
* v0
|
|
4
|
-
* DO NOT MODIFY - This file has been generated using oazapfts.
|
|
5
|
-
* See https://www.npmjs.com/package/oazapfts
|
|
6
|
-
*/
|
|
7
|
-
import * as Oazapfts from "@oazapfts/runtime";
|
|
8
|
-
import * as QS from "@oazapfts/runtime/query";
|
|
9
|
-
export const defaults = {
|
|
10
|
-
headers: {},
|
|
11
|
-
baseUrl: "https://account-account-api.dev.stackspot.com",
|
|
12
|
-
};
|
|
13
|
-
const oazapfts = Oazapfts.runtime(defaults);
|
|
14
|
-
export const servers = {
|
|
15
|
-
generatedServerUrl: "https://account-account-api.dev.stackspot.com"
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* List User repository credential's.
|
|
19
|
-
*/
|
|
20
|
-
export function listScmCredentials(opts) {
|
|
21
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/users/scm-credentials", {
|
|
22
|
-
...opts
|
|
23
|
-
}));
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Update User repository credential's.
|
|
27
|
-
*/
|
|
28
|
-
export function scmCredentialUpdate({ userScmInfoRequest }, opts) {
|
|
29
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/users/scm-credentials", oazapfts.json({
|
|
30
|
-
...opts,
|
|
31
|
-
method: "PUT",
|
|
32
|
-
body: userScmInfoRequest
|
|
33
|
-
})));
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Save User repository credential's.
|
|
37
|
-
*/
|
|
38
|
-
export function scmCredentialSave({ userScmInfoRequest }, opts) {
|
|
39
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/users/scm-credentials", oazapfts.json({
|
|
40
|
-
...opts,
|
|
41
|
-
method: "POST",
|
|
42
|
-
body: userScmInfoRequest
|
|
43
|
-
})));
|
|
44
|
-
}
|
|
45
|
-
/**
|
|
46
|
-
* Delete an user SCM credentials.
|
|
47
|
-
*/
|
|
48
|
-
export function scmDelete(opts) {
|
|
49
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/users/scm-credentials", {
|
|
50
|
-
...opts,
|
|
51
|
-
method: "DELETE"
|
|
52
|
-
}));
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Get scope by ID
|
|
56
|
-
*/
|
|
57
|
-
export function getById({ scopeId }, opts) {
|
|
58
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/scopes/${encodeURIComponent(scopeId)}`, {
|
|
59
|
-
...opts
|
|
60
|
-
}));
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Update scope information
|
|
64
|
-
*/
|
|
65
|
-
export function updateScope({ scopeId, iamUpdateScopeRequest }, opts) {
|
|
66
|
-
return oazapfts.ok(oazapfts.fetchText(`/v1/scopes/${encodeURIComponent(scopeId)}`, oazapfts.json({
|
|
67
|
-
...opts,
|
|
68
|
-
method: "PUT",
|
|
69
|
-
body: iamUpdateScopeRequest
|
|
70
|
-
})));
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Delete scope by ID
|
|
74
|
-
*/
|
|
75
|
-
export function deleteScope({ scopeId }, opts) {
|
|
76
|
-
return oazapfts.ok(oazapfts.fetchText(`/v1/scopes/${encodeURIComponent(scopeId)}`, {
|
|
77
|
-
...opts,
|
|
78
|
-
method: "DELETE"
|
|
79
|
-
}));
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* List repository credential's.
|
|
83
|
-
*/
|
|
84
|
-
export function listScmCredentials1(opts) {
|
|
85
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/scm-credentials", {
|
|
86
|
-
...opts
|
|
87
|
-
}));
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Update repository credential's.
|
|
91
|
-
*/
|
|
92
|
-
export function scmCredentialUpdate1({ accountScmInfoUpdateRequest }, opts) {
|
|
93
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/scm-credentials", oazapfts.json({
|
|
94
|
-
...opts,
|
|
95
|
-
method: "PUT",
|
|
96
|
-
body: accountScmInfoUpdateRequest
|
|
97
|
-
})));
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Save repository credential's.
|
|
101
|
-
*/
|
|
102
|
-
export function scmCredentialSave1({ accountScmInfoSaveRequest }, opts) {
|
|
103
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/scm-credentials", oazapfts.json({
|
|
104
|
-
...opts,
|
|
105
|
-
method: "POST",
|
|
106
|
-
body: accountScmInfoSaveRequest
|
|
107
|
-
})));
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Update a new role for Account
|
|
111
|
-
*/
|
|
112
|
-
export function updateAccountRole({ roleId, updateAccountRoleRequest }, opts) {
|
|
113
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/roles/${encodeURIComponent(roleId)}`, oazapfts.json({
|
|
114
|
-
...opts,
|
|
115
|
-
method: "PUT",
|
|
116
|
-
body: updateAccountRoleRequest
|
|
117
|
-
})));
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Delete a role for Account
|
|
121
|
-
*/
|
|
122
|
-
export function deleteAccountRole({ roleId }, opts) {
|
|
123
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/roles/${encodeURIComponent(roleId)}`, {
|
|
124
|
-
...opts,
|
|
125
|
-
method: "DELETE"
|
|
126
|
-
}));
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Get all Global Reources and Actions compared to role
|
|
130
|
-
*/
|
|
131
|
-
export function getResourcesAndActionsWithStatus({ roleId, size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }, opts) {
|
|
132
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/roles/${encodeURIComponent(roleId)}/resources${QS.query(QS.explode({
|
|
133
|
-
size,
|
|
134
|
-
page,
|
|
135
|
-
sort,
|
|
136
|
-
direction,
|
|
137
|
-
search,
|
|
138
|
-
filterMode,
|
|
139
|
-
filterBy,
|
|
140
|
-
filterValue,
|
|
141
|
-
multiFilterMode,
|
|
142
|
-
filterIn
|
|
143
|
-
}))}`, {
|
|
144
|
-
...opts
|
|
145
|
-
}));
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Update role with new resource and actions
|
|
149
|
-
*/
|
|
150
|
-
export function updateRoleWithNewActions({ roleId, body }, opts) {
|
|
151
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/roles/${encodeURIComponent(roleId)}/resources`, oazapfts.json({
|
|
152
|
-
...opts,
|
|
153
|
-
method: "PUT",
|
|
154
|
-
body
|
|
155
|
-
})));
|
|
156
|
-
}
|
|
157
|
-
/**
|
|
158
|
-
* Get user by id
|
|
159
|
-
*/
|
|
160
|
-
export function getMemberById({ memberId }, opts) {
|
|
161
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/members/${encodeURIComponent(memberId)}`, {
|
|
162
|
-
...opts
|
|
163
|
-
}));
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Update user on current tenant
|
|
167
|
-
*/
|
|
168
|
-
export function updateUser({ memberId, updateUserRequest }, opts) {
|
|
169
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/members/${encodeURIComponent(memberId)}`, oazapfts.json({
|
|
170
|
-
...opts,
|
|
171
|
-
method: "PUT",
|
|
172
|
-
body: updateUserRequest
|
|
173
|
-
})));
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Update user password on current tenant
|
|
177
|
-
*/
|
|
178
|
-
export function updateUserPassword({ memberId, updatePasswordRequest }, opts) {
|
|
179
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/members/${encodeURIComponent(memberId)}/password`, oazapfts.json({
|
|
180
|
-
...opts,
|
|
181
|
-
method: "PUT",
|
|
182
|
-
body: updatePasswordRequest
|
|
183
|
-
})));
|
|
184
|
-
}
|
|
185
|
-
/**
|
|
186
|
-
* Accept user invitation
|
|
187
|
-
*/
|
|
188
|
-
export function accept({ id }, opts) {
|
|
189
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/invitations/${encodeURIComponent(id)}/accept`, {
|
|
190
|
-
...opts,
|
|
191
|
-
method: "PUT"
|
|
192
|
-
}));
|
|
193
|
-
}
|
|
194
|
-
/**
|
|
195
|
-
* Update a Feature Flag
|
|
196
|
-
*/
|
|
197
|
-
export function update({ id, updateFeatureFlagRequest }, opts) {
|
|
198
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/feature-flags/${encodeURIComponent(id)}`, oazapfts.json({
|
|
199
|
-
...opts,
|
|
200
|
-
method: "PUT",
|
|
201
|
-
body: updateFeatureFlagRequest
|
|
202
|
-
})));
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* Update status account
|
|
206
|
-
*/
|
|
207
|
-
export function updateAccountStatus({ accountId, accountStatusRequest }, opts) {
|
|
208
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/accounts/${encodeURIComponent(accountId)}/status`, oazapfts.json({
|
|
209
|
-
...opts,
|
|
210
|
-
method: "PUT",
|
|
211
|
-
body: accountStatusRequest
|
|
212
|
-
})));
|
|
213
|
-
}
|
|
214
|
-
/**
|
|
215
|
-
* Get a configured SSO from account
|
|
216
|
-
*/
|
|
217
|
-
export function getAccountSso({ id }, opts) {
|
|
218
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/accounts/sso/${encodeURIComponent(id)}`, {
|
|
219
|
-
...opts
|
|
220
|
-
}));
|
|
221
|
-
}
|
|
222
|
-
/**
|
|
223
|
-
* Update a configured SSO from account
|
|
224
|
-
*/
|
|
225
|
-
export function updateSso({ id, accountSsoUpdateRequest }, opts) {
|
|
226
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/accounts/sso/${encodeURIComponent(id)}`, oazapfts.json({
|
|
227
|
-
...opts,
|
|
228
|
-
method: "PUT",
|
|
229
|
-
body: accountSsoUpdateRequest
|
|
230
|
-
})));
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* Delete a configured Account SSO from account
|
|
234
|
-
*/
|
|
235
|
-
export function deleteSso({ id }, opts) {
|
|
236
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/accounts/sso/${encodeURIComponent(id)}`, {
|
|
237
|
-
...opts,
|
|
238
|
-
method: "DELETE"
|
|
239
|
-
}));
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Update partially a configured SSO from account
|
|
243
|
-
*/
|
|
244
|
-
export function partialUpdateSso({ id, accountSsoPartialUpdateRequest }, opts) {
|
|
245
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/accounts/sso/${encodeURIComponent(id)}`, oazapfts.json({
|
|
246
|
-
...opts,
|
|
247
|
-
method: "PATCH",
|
|
248
|
-
body: accountSsoPartialUpdateRequest
|
|
249
|
-
})));
|
|
250
|
-
}
|
|
251
|
-
/**
|
|
252
|
-
* Get SSO Group Mapping By Id
|
|
253
|
-
*/
|
|
254
|
-
export function getGroupMapById({ id, attributeImporterId }, opts) {
|
|
255
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/accounts/sso/${encodeURIComponent(id)}/group-mapping/${encodeURIComponent(attributeImporterId)}`, {
|
|
256
|
-
...opts
|
|
257
|
-
}));
|
|
258
|
-
}
|
|
259
|
-
/**
|
|
260
|
-
* Update SSO Group Mapping
|
|
261
|
-
*/
|
|
262
|
-
export function updateGroupMapping({ id, attributeImporterId, accountGroupMappingUpdateRequest }, opts) {
|
|
263
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/accounts/sso/${encodeURIComponent(id)}/group-mapping/${encodeURIComponent(attributeImporterId)}`, oazapfts.json({
|
|
264
|
-
...opts,
|
|
265
|
-
method: "PUT",
|
|
266
|
-
body: accountGroupMappingUpdateRequest
|
|
267
|
-
})));
|
|
268
|
-
}
|
|
269
|
-
/**
|
|
270
|
-
* Delete SSO Group Mapping
|
|
271
|
-
*/
|
|
272
|
-
export function deleteGroupMapping({ id, attributeImporterId }, opts) {
|
|
273
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/accounts/sso/${encodeURIComponent(id)}/group-mapping/${encodeURIComponent(attributeImporterId)}`, {
|
|
274
|
-
...opts,
|
|
275
|
-
method: "DELETE"
|
|
276
|
-
}));
|
|
277
|
-
}
|
|
278
|
-
/**
|
|
279
|
-
* Create Service Credential v2
|
|
280
|
-
*/
|
|
281
|
-
export function createServiceCredential({ serviceCredentialCreateRequestV2 }, opts) {
|
|
282
|
-
return oazapfts.ok(oazapfts.fetchJson("/v2/service-credentials", oazapfts.json({
|
|
283
|
-
...opts,
|
|
284
|
-
method: "POST",
|
|
285
|
-
body: serviceCredentialCreateRequestV2
|
|
286
|
-
})));
|
|
287
|
-
}
|
|
288
|
-
/**
|
|
289
|
-
* Get Service Credentials
|
|
290
|
-
*/
|
|
291
|
-
export function getServiceCredentials({ name, status, page, size }, opts) {
|
|
292
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/service-credentials${QS.query(QS.explode({
|
|
293
|
-
name,
|
|
294
|
-
status,
|
|
295
|
-
page,
|
|
296
|
-
size
|
|
297
|
-
}))}`, {
|
|
298
|
-
...opts
|
|
299
|
-
}));
|
|
300
|
-
}
|
|
301
|
-
/**
|
|
302
|
-
* Create Service Credential
|
|
303
|
-
*/
|
|
304
|
-
export function createServiceCredential1({ serviceCredentialCreateRequest }, opts) {
|
|
305
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/service-credentials", oazapfts.json({
|
|
306
|
-
...opts,
|
|
307
|
-
method: "POST",
|
|
308
|
-
body: serviceCredentialCreateRequest
|
|
309
|
-
})));
|
|
310
|
-
}
|
|
311
|
-
/**
|
|
312
|
-
* Notify about Service Credential expiration
|
|
313
|
-
*/
|
|
314
|
-
export function notifyServiceCredentialExpiration({ serviceCredentialExpirationRequest }, opts) {
|
|
315
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/service-credentials/expiration", oazapfts.json({
|
|
316
|
-
...opts,
|
|
317
|
-
method: "POST",
|
|
318
|
-
body: serviceCredentialExpirationRequest
|
|
319
|
-
})));
|
|
320
|
-
}
|
|
321
|
-
/**
|
|
322
|
-
* Find all the existing scopes
|
|
323
|
-
*/
|
|
324
|
-
export function findScopes({ page }, opts) {
|
|
325
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/scopes${QS.query(QS.explode({
|
|
326
|
-
page
|
|
327
|
-
}))}`, {
|
|
328
|
-
...opts
|
|
329
|
-
}));
|
|
330
|
-
}
|
|
331
|
-
/**
|
|
332
|
-
* Create a new scope
|
|
333
|
-
*/
|
|
334
|
-
export function createScope({ iamCreateScopeRequest }, opts) {
|
|
335
|
-
return oazapfts.ok(oazapfts.fetchText("/v1/scopes", oazapfts.json({
|
|
336
|
-
...opts,
|
|
337
|
-
method: "POST",
|
|
338
|
-
body: iamCreateScopeRequest
|
|
339
|
-
})));
|
|
340
|
-
}
|
|
341
|
-
/**
|
|
342
|
-
* Get Roles
|
|
343
|
-
*/
|
|
344
|
-
export function getRoles({ size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }, opts) {
|
|
345
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/roles${QS.query(QS.explode({
|
|
346
|
-
size,
|
|
347
|
-
page,
|
|
348
|
-
sort,
|
|
349
|
-
direction,
|
|
350
|
-
search,
|
|
351
|
-
filterMode,
|
|
352
|
-
filterBy,
|
|
353
|
-
filterValue,
|
|
354
|
-
multiFilterMode,
|
|
355
|
-
filterIn
|
|
356
|
-
}))}`, {
|
|
357
|
-
...opts
|
|
358
|
-
}));
|
|
359
|
-
}
|
|
360
|
-
/**
|
|
361
|
-
* Create a new role for Account
|
|
362
|
-
*/
|
|
363
|
-
export function createAccountRole({ createAccountRoleRequest }, opts) {
|
|
364
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/roles", oazapfts.json({
|
|
365
|
-
...opts,
|
|
366
|
-
method: "POST",
|
|
367
|
-
body: createAccountRoleRequest
|
|
368
|
-
})));
|
|
369
|
-
}
|
|
370
|
-
/**
|
|
371
|
-
* Get role members
|
|
372
|
-
*/
|
|
373
|
-
export function getRoleMembers({ roleId, size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }, opts) {
|
|
374
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/roles/${encodeURIComponent(roleId)}/members${QS.query(QS.explode({
|
|
375
|
-
size,
|
|
376
|
-
page,
|
|
377
|
-
sort,
|
|
378
|
-
direction,
|
|
379
|
-
search,
|
|
380
|
-
filterMode,
|
|
381
|
-
filterBy,
|
|
382
|
-
filterValue,
|
|
383
|
-
multiFilterMode,
|
|
384
|
-
filterIn
|
|
385
|
-
}))}`, {
|
|
386
|
-
...opts
|
|
387
|
-
}));
|
|
388
|
-
}
|
|
389
|
-
/**
|
|
390
|
-
* Add Role to Member
|
|
391
|
-
*/
|
|
392
|
-
export function addRoleToMember({ roleId, addRoleToMemberRequest }, opts) {
|
|
393
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/roles/${encodeURIComponent(roleId)}/members`, oazapfts.json({
|
|
394
|
-
...opts,
|
|
395
|
-
method: "POST",
|
|
396
|
-
body: addRoleToMemberRequest
|
|
397
|
-
})));
|
|
398
|
-
}
|
|
399
|
-
/**
|
|
400
|
-
* Get Groups from role
|
|
401
|
-
*/
|
|
402
|
-
export function getRoleGroups({ roleId, size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }, opts) {
|
|
403
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/roles/${encodeURIComponent(roleId)}/groups${QS.query(QS.explode({
|
|
404
|
-
size,
|
|
405
|
-
page,
|
|
406
|
-
sort,
|
|
407
|
-
direction,
|
|
408
|
-
search,
|
|
409
|
-
filterMode,
|
|
410
|
-
filterBy,
|
|
411
|
-
filterValue,
|
|
412
|
-
multiFilterMode,
|
|
413
|
-
filterIn
|
|
414
|
-
}))}`, {
|
|
415
|
-
...opts
|
|
416
|
-
}));
|
|
417
|
-
}
|
|
418
|
-
/**
|
|
419
|
-
* Bind roles groups
|
|
420
|
-
*/
|
|
421
|
-
export function bindRoleGroups({ roleId, roleGroupIdsRequest }, opts) {
|
|
422
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/roles/${encodeURIComponent(roleId)}/groups`, oazapfts.json({
|
|
423
|
-
...opts,
|
|
424
|
-
method: "POST",
|
|
425
|
-
body: roleGroupIdsRequest
|
|
426
|
-
})));
|
|
427
|
-
}
|
|
428
|
-
/**
|
|
429
|
-
* Get Resources
|
|
430
|
-
*/
|
|
431
|
-
export function getResources({ size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }, opts) {
|
|
432
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/resources${QS.query(QS.explode({
|
|
433
|
-
size,
|
|
434
|
-
page,
|
|
435
|
-
sort,
|
|
436
|
-
direction,
|
|
437
|
-
search,
|
|
438
|
-
filterMode,
|
|
439
|
-
filterBy,
|
|
440
|
-
filterValue,
|
|
441
|
-
multiFilterMode,
|
|
442
|
-
filterIn
|
|
443
|
-
}))}`, {
|
|
444
|
-
...opts
|
|
445
|
-
}));
|
|
446
|
-
}
|
|
447
|
-
/**
|
|
448
|
-
* Create a new resource for Account
|
|
449
|
-
*/
|
|
450
|
-
export function createResource({ createResourceRequest }, opts) {
|
|
451
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/resources", oazapfts.json({
|
|
452
|
-
...opts,
|
|
453
|
-
method: "POST",
|
|
454
|
-
body: createResourceRequest
|
|
455
|
-
})));
|
|
456
|
-
}
|
|
457
|
-
/**
|
|
458
|
-
* Get Account Members
|
|
459
|
-
*/
|
|
460
|
-
export function getAccountMembers1({ size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }, opts) {
|
|
461
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/members${QS.query(QS.explode({
|
|
462
|
-
size,
|
|
463
|
-
page,
|
|
464
|
-
sort,
|
|
465
|
-
direction,
|
|
466
|
-
search,
|
|
467
|
-
filterMode,
|
|
468
|
-
filterBy,
|
|
469
|
-
filterValue,
|
|
470
|
-
multiFilterMode,
|
|
471
|
-
filterIn
|
|
472
|
-
}))}`, {
|
|
473
|
-
...opts
|
|
474
|
-
}));
|
|
475
|
-
}
|
|
476
|
-
/**
|
|
477
|
-
* Create user on current tenant
|
|
478
|
-
*/
|
|
479
|
-
export function createUser({ createUserRequest }, opts) {
|
|
480
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/members", oazapfts.json({
|
|
481
|
-
...opts,
|
|
482
|
-
method: "POST",
|
|
483
|
-
body: createUserRequest
|
|
484
|
-
})));
|
|
485
|
-
}
|
|
486
|
-
/**
|
|
487
|
-
* Get member roles
|
|
488
|
-
*/
|
|
489
|
-
export function getRoles1({ memberId, size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }, opts) {
|
|
490
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/members/${encodeURIComponent(memberId)}/roles${QS.query(QS.explode({
|
|
491
|
-
size,
|
|
492
|
-
page,
|
|
493
|
-
sort,
|
|
494
|
-
direction,
|
|
495
|
-
search,
|
|
496
|
-
filterMode,
|
|
497
|
-
filterBy,
|
|
498
|
-
filterValue,
|
|
499
|
-
multiFilterMode,
|
|
500
|
-
filterIn
|
|
501
|
-
}))}`, {
|
|
502
|
-
...opts
|
|
503
|
-
}));
|
|
504
|
-
}
|
|
505
|
-
/**
|
|
506
|
-
* Bind users to roles
|
|
507
|
-
*/
|
|
508
|
-
export function bindToRoles({ memberId, memberIdsCommonRequest }, opts) {
|
|
509
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/members/${encodeURIComponent(memberId)}/roles`, oazapfts.json({
|
|
510
|
-
...opts,
|
|
511
|
-
method: "POST",
|
|
512
|
-
body: memberIdsCommonRequest
|
|
513
|
-
})));
|
|
514
|
-
}
|
|
515
|
-
/**
|
|
516
|
-
* Get member Groups
|
|
517
|
-
*/
|
|
518
|
-
export function getMemberGroups({ memberId, size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }, opts) {
|
|
519
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/members/${encodeURIComponent(memberId)}/groups${QS.query(QS.explode({
|
|
520
|
-
size,
|
|
521
|
-
page,
|
|
522
|
-
sort,
|
|
523
|
-
direction,
|
|
524
|
-
search,
|
|
525
|
-
filterMode,
|
|
526
|
-
filterBy,
|
|
527
|
-
filterValue,
|
|
528
|
-
multiFilterMode,
|
|
529
|
-
filterIn
|
|
530
|
-
}))}`, {
|
|
531
|
-
...opts
|
|
532
|
-
}));
|
|
533
|
-
}
|
|
534
|
-
/**
|
|
535
|
-
* Bind users to groups
|
|
536
|
-
*/
|
|
537
|
-
export function bindToGroups({ memberId, memberIdsCommonRequest }, opts) {
|
|
538
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/members/${encodeURIComponent(memberId)}/groups`, oazapfts.json({
|
|
539
|
-
...opts,
|
|
540
|
-
method: "POST",
|
|
541
|
-
body: memberIdsCommonRequest
|
|
542
|
-
})));
|
|
543
|
-
}
|
|
544
|
-
/**
|
|
545
|
-
* Send Email to reset password
|
|
546
|
-
*/
|
|
547
|
-
export function resetPassword({ memberEmailRequest }, opts) {
|
|
548
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/members/reset-password", oazapfts.json({
|
|
549
|
-
...opts,
|
|
550
|
-
method: "POST",
|
|
551
|
-
body: memberEmailRequest
|
|
552
|
-
})));
|
|
553
|
-
}
|
|
554
|
-
/**
|
|
555
|
-
* Invite new members to account
|
|
556
|
-
*/
|
|
557
|
-
export function inviteMembers({ body }, opts) {
|
|
558
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/members/invitation", oazapfts.json({
|
|
559
|
-
...opts,
|
|
560
|
-
method: "POST",
|
|
561
|
-
body
|
|
562
|
-
})));
|
|
563
|
-
}
|
|
564
|
-
/**
|
|
565
|
-
* List user invitations for account
|
|
566
|
-
*/
|
|
567
|
-
export function listUserInvitations({ filterBy, filterValue, page, size }, opts) {
|
|
568
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/invitations${QS.query(QS.explode({
|
|
569
|
-
filterBy,
|
|
570
|
-
filterValue,
|
|
571
|
-
page,
|
|
572
|
-
size
|
|
573
|
-
}))}`, {
|
|
574
|
-
...opts
|
|
575
|
-
}));
|
|
576
|
-
}
|
|
577
|
-
/**
|
|
578
|
-
* Create user invitations for account
|
|
579
|
-
*/
|
|
580
|
-
export function createUserInvitation({ createUserInvitationRequest }, opts) {
|
|
581
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/invitations", oazapfts.json({
|
|
582
|
-
...opts,
|
|
583
|
-
method: "POST",
|
|
584
|
-
body: createUserInvitationRequest
|
|
585
|
-
})));
|
|
586
|
-
}
|
|
587
|
-
/**
|
|
588
|
-
* Get Groups
|
|
589
|
-
*/
|
|
590
|
-
export function getGroups({ size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }, opts) {
|
|
591
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/groups${QS.query(QS.explode({
|
|
592
|
-
size,
|
|
593
|
-
page,
|
|
594
|
-
sort,
|
|
595
|
-
direction,
|
|
596
|
-
search,
|
|
597
|
-
filterMode,
|
|
598
|
-
filterBy,
|
|
599
|
-
filterValue,
|
|
600
|
-
multiFilterMode,
|
|
601
|
-
filterIn
|
|
602
|
-
}))}`, {
|
|
603
|
-
...opts
|
|
604
|
-
}));
|
|
605
|
-
}
|
|
606
|
-
/**
|
|
607
|
-
* Create Group
|
|
608
|
-
*/
|
|
609
|
-
export function save({ newGroupRequest }, opts) {
|
|
610
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/groups", oazapfts.json({
|
|
611
|
-
...opts,
|
|
612
|
-
method: "POST",
|
|
613
|
-
body: newGroupRequest
|
|
614
|
-
})));
|
|
615
|
-
}
|
|
616
|
-
/**
|
|
617
|
-
* Get Group members
|
|
618
|
-
*/
|
|
619
|
-
export function getRoles2({ groupId, size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }, opts) {
|
|
620
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/groups/${encodeURIComponent(groupId)}/roles${QS.query(QS.explode({
|
|
621
|
-
size,
|
|
622
|
-
page,
|
|
623
|
-
sort,
|
|
624
|
-
direction,
|
|
625
|
-
search,
|
|
626
|
-
filterMode,
|
|
627
|
-
filterBy,
|
|
628
|
-
filterValue,
|
|
629
|
-
multiFilterMode,
|
|
630
|
-
filterIn
|
|
631
|
-
}))}`, {
|
|
632
|
-
...opts
|
|
633
|
-
}));
|
|
634
|
-
}
|
|
635
|
-
/**
|
|
636
|
-
* Bind Group roles
|
|
637
|
-
*/
|
|
638
|
-
export function bindRoles({ groupId, groupRoleIdsRequest }, opts) {
|
|
639
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/groups/${encodeURIComponent(groupId)}/roles`, oazapfts.json({
|
|
640
|
-
...opts,
|
|
641
|
-
method: "POST",
|
|
642
|
-
body: groupRoleIdsRequest
|
|
643
|
-
})));
|
|
644
|
-
}
|
|
645
|
-
/**
|
|
646
|
-
* Get Group Resources
|
|
647
|
-
*/
|
|
648
|
-
export function getGroupResources({ groupId, size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }, opts) {
|
|
649
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/groups/${encodeURIComponent(groupId)}/resources${QS.query(QS.explode({
|
|
650
|
-
size,
|
|
651
|
-
page,
|
|
652
|
-
sort,
|
|
653
|
-
direction,
|
|
654
|
-
search,
|
|
655
|
-
filterMode,
|
|
656
|
-
filterBy,
|
|
657
|
-
filterValue,
|
|
658
|
-
multiFilterMode,
|
|
659
|
-
filterIn
|
|
660
|
-
}))}`, {
|
|
661
|
-
...opts
|
|
662
|
-
}));
|
|
663
|
-
}
|
|
664
|
-
/**
|
|
665
|
-
* Add Multiple Resources to Group
|
|
666
|
-
*/
|
|
667
|
-
export function addResourcesToGroup({ groupId, addResourcesToGroupRequest }, opts) {
|
|
668
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/groups/${encodeURIComponent(groupId)}/resources`, oazapfts.json({
|
|
669
|
-
...opts,
|
|
670
|
-
method: "POST",
|
|
671
|
-
body: addResourcesToGroupRequest
|
|
672
|
-
})));
|
|
673
|
-
}
|
|
674
|
-
/**
|
|
675
|
-
* Get Group members
|
|
676
|
-
*/
|
|
677
|
-
export function getMembers({ groupId, size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }, opts) {
|
|
678
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/groups/${encodeURIComponent(groupId)}/members${QS.query(QS.explode({
|
|
679
|
-
size,
|
|
680
|
-
page,
|
|
681
|
-
sort,
|
|
682
|
-
direction,
|
|
683
|
-
search,
|
|
684
|
-
filterMode,
|
|
685
|
-
filterBy,
|
|
686
|
-
filterValue,
|
|
687
|
-
multiFilterMode,
|
|
688
|
-
filterIn
|
|
689
|
-
}))}`, {
|
|
690
|
-
...opts
|
|
691
|
-
}));
|
|
692
|
-
}
|
|
693
|
-
/**
|
|
694
|
-
* Bind Group member
|
|
695
|
-
*/
|
|
696
|
-
export function bindGroupMembers({ groupId, groupMemberIdsRequest }, opts) {
|
|
697
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/groups/${encodeURIComponent(groupId)}/members`, oazapfts.json({
|
|
698
|
-
...opts,
|
|
699
|
-
method: "POST",
|
|
700
|
-
body: groupMemberIdsRequest
|
|
701
|
-
})));
|
|
702
|
-
}
|
|
703
|
-
/**
|
|
704
|
-
* List Feature Flags in an Account
|
|
705
|
-
*/
|
|
706
|
-
export function getFeatures(opts) {
|
|
707
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/feature-flags", {
|
|
708
|
-
...opts
|
|
709
|
-
}));
|
|
710
|
-
}
|
|
711
|
-
/**
|
|
712
|
-
* Create a Feature Flag
|
|
713
|
-
*/
|
|
714
|
-
export function create({ createFeatureFlagRequest }, opts) {
|
|
715
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/feature-flags", oazapfts.json({
|
|
716
|
-
...opts,
|
|
717
|
-
method: "POST",
|
|
718
|
-
body: createFeatureFlagRequest
|
|
719
|
-
})));
|
|
720
|
-
}
|
|
721
|
-
/**
|
|
722
|
-
* Send Welcome Email
|
|
723
|
-
*/
|
|
724
|
-
export function sendWelcomeEmail({ welcomeEmailRequest }, opts) {
|
|
725
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/emails/welcome", oazapfts.json({
|
|
726
|
-
...opts,
|
|
727
|
-
method: "POST",
|
|
728
|
-
body: welcomeEmailRequest
|
|
729
|
-
})));
|
|
730
|
-
}
|
|
731
|
-
/**
|
|
732
|
-
* Send Download Email
|
|
733
|
-
*/
|
|
734
|
-
export function sendDownloadEmail(opts) {
|
|
735
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/emails/download", {
|
|
736
|
-
...opts,
|
|
737
|
-
method: "POST"
|
|
738
|
-
}));
|
|
739
|
-
}
|
|
740
|
-
/**
|
|
741
|
-
* Send contact email
|
|
742
|
-
*/
|
|
743
|
-
export function sendContactEmail({ contactEmailRequest }, opts) {
|
|
744
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/emails/contact", oazapfts.json({
|
|
745
|
-
...opts,
|
|
746
|
-
method: "POST",
|
|
747
|
-
body: contactEmailRequest
|
|
748
|
-
})));
|
|
749
|
-
}
|
|
750
|
-
/**
|
|
751
|
-
* Switch user to account passed in the body
|
|
752
|
-
*/
|
|
753
|
-
export function switchAccount({ switchAccountRequest }, opts) {
|
|
754
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/authentication/switch-account", oazapfts.json({
|
|
755
|
-
...opts,
|
|
756
|
-
method: "POST",
|
|
757
|
-
body: switchAccountRequest
|
|
758
|
-
})));
|
|
759
|
-
}
|
|
760
|
-
/**
|
|
761
|
-
* Get credentials from personal service client (create if not exists one to the logged user).
|
|
762
|
-
*/
|
|
763
|
-
export function getPersonalClientCredentials(opts) {
|
|
764
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/authentication/personal-client-credentials", {
|
|
765
|
-
...opts,
|
|
766
|
-
method: "POST"
|
|
767
|
-
}));
|
|
768
|
-
}
|
|
769
|
-
/**
|
|
770
|
-
* Get an Access Token generated With Audience on logged user behalf, since previously authorized.
|
|
771
|
-
*/
|
|
772
|
-
export function getPersonalAccessToken1({ apiAuthorization, generateTokenFromPersonalAccountRequest }, opts) {
|
|
773
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/authentication/personal-access-token", oazapfts.json({
|
|
774
|
-
...opts,
|
|
775
|
-
method: "POST",
|
|
776
|
-
body: generateTokenFromPersonalAccountRequest,
|
|
777
|
-
headers: oazapfts.mergeHeaders(opts?.headers, {
|
|
778
|
-
"Api-Authorization": apiAuthorization
|
|
779
|
-
})
|
|
780
|
-
})));
|
|
781
|
-
}
|
|
782
|
-
/**
|
|
783
|
-
* Disable client that generates Personal Access Tokens.
|
|
784
|
-
*/
|
|
785
|
-
export function disablePersonalAccessTokenGeneration(opts) {
|
|
786
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/authentication/personal-access-token/unauthorize", {
|
|
787
|
-
...opts,
|
|
788
|
-
method: "POST"
|
|
789
|
-
}));
|
|
790
|
-
}
|
|
791
|
-
/**
|
|
792
|
-
* Verify if exists a client created (authorized) to generate Access Token on logged user behalf.
|
|
793
|
-
*/
|
|
794
|
-
export function personalAccessTokenAuthorization(opts) {
|
|
795
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/authentication/personal-access-token/authorize", {
|
|
796
|
-
...opts
|
|
797
|
-
}));
|
|
798
|
-
}
|
|
799
|
-
/**
|
|
800
|
-
* Authorize creating a client to generate Personal Access Tokens on your behalf.
|
|
801
|
-
*/
|
|
802
|
-
export function createPersonalAccessToken(opts) {
|
|
803
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/authentication/personal-access-token/authorize", {
|
|
804
|
-
...opts,
|
|
805
|
-
method: "POST"
|
|
806
|
-
}));
|
|
807
|
-
}
|
|
808
|
-
/**
|
|
809
|
-
* Get an Access Token generated on logged user's service account behalf, since previously authorized.
|
|
810
|
-
*/
|
|
811
|
-
export function getPersonalAccessTokenFromServiceAccountOnly(opts) {
|
|
812
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/authentication/personal-access-token-sa", {
|
|
813
|
-
...opts,
|
|
814
|
-
method: "POST"
|
|
815
|
-
}));
|
|
816
|
-
}
|
|
817
|
-
/**
|
|
818
|
-
* Generate device code.
|
|
819
|
-
*/
|
|
820
|
-
export function deviceCode({ email, freemiumAccess, codeChallenge, body }, opts) {
|
|
821
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/authentication/device-code${QS.query(QS.explode({
|
|
822
|
-
email,
|
|
823
|
-
freemium_access: freemiumAccess,
|
|
824
|
-
code_challenge: codeChallenge
|
|
825
|
-
}))}`, oazapfts.form({
|
|
826
|
-
...opts,
|
|
827
|
-
method: "POST",
|
|
828
|
-
body
|
|
829
|
-
})));
|
|
830
|
-
}
|
|
831
|
-
/**
|
|
832
|
-
* Find accounts
|
|
833
|
-
*/
|
|
834
|
-
export function getAccounts1({ size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }, opts) {
|
|
835
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/admin/accounts${QS.query(QS.explode({
|
|
836
|
-
size,
|
|
837
|
-
page,
|
|
838
|
-
sort,
|
|
839
|
-
direction,
|
|
840
|
-
search,
|
|
841
|
-
filterMode,
|
|
842
|
-
filterBy,
|
|
843
|
-
filterValue,
|
|
844
|
-
multiFilterMode,
|
|
845
|
-
filterIn
|
|
846
|
-
}))}`, {
|
|
847
|
-
...opts
|
|
848
|
-
}));
|
|
849
|
-
}
|
|
850
|
-
/**
|
|
851
|
-
* Create an Enterprise Account Order
|
|
852
|
-
*/
|
|
853
|
-
export function create1({ createAccountOrderRequest }, opts) {
|
|
854
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/admin/accounts", oazapfts.json({
|
|
855
|
-
...opts,
|
|
856
|
-
method: "POST",
|
|
857
|
-
body: createAccountOrderRequest
|
|
858
|
-
})));
|
|
859
|
-
}
|
|
860
|
-
/**
|
|
861
|
-
* Get All SSO Group Mapping
|
|
862
|
-
*/
|
|
863
|
-
export function getAllGroupMapping({ id, size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }, opts) {
|
|
864
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/accounts/sso/${encodeURIComponent(id)}/group-mapping${QS.query(QS.explode({
|
|
865
|
-
size,
|
|
866
|
-
page,
|
|
867
|
-
sort,
|
|
868
|
-
direction,
|
|
869
|
-
search,
|
|
870
|
-
filterMode,
|
|
871
|
-
filterBy,
|
|
872
|
-
filterValue,
|
|
873
|
-
multiFilterMode,
|
|
874
|
-
filterIn
|
|
875
|
-
}))}`, {
|
|
876
|
-
...opts
|
|
877
|
-
}));
|
|
878
|
-
}
|
|
879
|
-
/**
|
|
880
|
-
* Create SSO Group Mapping
|
|
881
|
-
*/
|
|
882
|
-
export function createGroupMapping({ id, accountGroupMappingCreateRequest }, opts) {
|
|
883
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/accounts/sso/${encodeURIComponent(id)}/group-mapping`, oazapfts.json({
|
|
884
|
-
...opts,
|
|
885
|
-
method: "POST",
|
|
886
|
-
body: accountGroupMappingCreateRequest
|
|
887
|
-
})));
|
|
888
|
-
}
|
|
889
|
-
/**
|
|
890
|
-
* Configure new SSO in account
|
|
891
|
-
*/
|
|
892
|
-
export function ssoConfigure({ protocol, accountSsoCreateRequest }, opts) {
|
|
893
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/accounts/sso/protocol/${encodeURIComponent(protocol)}`, oazapfts.json({
|
|
894
|
-
...opts,
|
|
895
|
-
method: "POST",
|
|
896
|
-
body: accountSsoCreateRequest
|
|
897
|
-
})));
|
|
898
|
-
}
|
|
899
|
-
/**
|
|
900
|
-
* Parse SSO configuration file
|
|
901
|
-
*/
|
|
902
|
-
export function ssoParseConfigurationFile({ protocol, file }, opts) {
|
|
903
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/accounts/sso/protocol/${encodeURIComponent(protocol)}/parser${QS.query(QS.explode({
|
|
904
|
-
file
|
|
905
|
-
}))}`, {
|
|
906
|
-
...opts,
|
|
907
|
-
method: "POST"
|
|
908
|
-
}));
|
|
909
|
-
}
|
|
910
|
-
/**
|
|
911
|
-
* Create Account Freemium
|
|
912
|
-
*/
|
|
913
|
-
export function createAccountFreemium({ accountFreemiumCreateRequest }, opts) {
|
|
914
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/accounts/freemium", oazapfts.json({
|
|
915
|
-
...opts,
|
|
916
|
-
method: "POST",
|
|
917
|
-
body: accountFreemiumCreateRequest
|
|
918
|
-
})));
|
|
919
|
-
}
|
|
920
|
-
/**
|
|
921
|
-
* Adding Collaborator Account
|
|
922
|
-
*/
|
|
923
|
-
export function addCollaborator({ accountCollaboratorRequest }, opts) {
|
|
924
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/accounts/freemium/collaborators", oazapfts.json({
|
|
925
|
-
...opts,
|
|
926
|
-
method: "POST",
|
|
927
|
-
body: accountCollaboratorRequest
|
|
928
|
-
})));
|
|
929
|
-
}
|
|
930
|
-
/**
|
|
931
|
-
* Create an Account Order for Partner
|
|
932
|
-
*/
|
|
933
|
-
export function createPartner({ createAccountPartnerOrderRequest }, opts) {
|
|
934
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/account-orders/partners", oazapfts.json({
|
|
935
|
-
...opts,
|
|
936
|
-
method: "POST",
|
|
937
|
-
body: createAccountPartnerOrderRequest
|
|
938
|
-
})));
|
|
939
|
-
}
|
|
940
|
-
/**
|
|
941
|
-
* Validate new Partner account data
|
|
942
|
-
*/
|
|
943
|
-
export function validateNewPartnerData({ validateAccountPartnerDataRequest }, opts) {
|
|
944
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/account-orders/partners/validations/creation-data", oazapfts.json({
|
|
945
|
-
...opts,
|
|
946
|
-
method: "POST",
|
|
947
|
-
body: validateAccountPartnerDataRequest
|
|
948
|
-
})));
|
|
949
|
-
}
|
|
950
|
-
/**
|
|
951
|
-
* Rotate Service Credential Secret v2
|
|
952
|
-
*/
|
|
953
|
-
export function rotateServiceCredentialSecret({ id, rotateServiceCredentialSecretRequest }, opts) {
|
|
954
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v2/service-credentials/${encodeURIComponent(id)}/secret`, oazapfts.json({
|
|
955
|
-
...opts,
|
|
956
|
-
method: "PATCH",
|
|
957
|
-
body: rotateServiceCredentialSecretRequest
|
|
958
|
-
})));
|
|
959
|
-
}
|
|
960
|
-
/**
|
|
961
|
-
* Revoke Service Credential v2
|
|
962
|
-
*/
|
|
963
|
-
export function revokeServiceCredential({ id }, opts) {
|
|
964
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v2/service-credentials/${encodeURIComponent(id)}/revoke`, {
|
|
965
|
-
...opts,
|
|
966
|
-
method: "PATCH"
|
|
967
|
-
}));
|
|
968
|
-
}
|
|
969
|
-
/**
|
|
970
|
-
* Associate Group to Service Credential
|
|
971
|
-
*/
|
|
972
|
-
export function associateGroupToServiceCredential({ id, serviceCredentialAssociateGroupRequest }, opts) {
|
|
973
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/service-credentials/${encodeURIComponent(id)}/teams`, oazapfts.json({
|
|
974
|
-
...opts,
|
|
975
|
-
method: "PATCH",
|
|
976
|
-
body: serviceCredentialAssociateGroupRequest
|
|
977
|
-
})));
|
|
978
|
-
}
|
|
979
|
-
/**
|
|
980
|
-
* Revoke Service Credential
|
|
981
|
-
*/
|
|
982
|
-
export function revokeServiceCredential1({ id }, opts) {
|
|
983
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/service-credentials/${encodeURIComponent(id)}/revocation`, {
|
|
984
|
-
...opts,
|
|
985
|
-
method: "PATCH"
|
|
986
|
-
}));
|
|
987
|
-
}
|
|
988
|
-
/**
|
|
989
|
-
* Delete a member permissions
|
|
990
|
-
*/
|
|
991
|
-
export function deleteMemberPermissions({ memberId, deleteMemberPermissionsRequest }, opts) {
|
|
992
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/members/${encodeURIComponent(memberId)}/permissions`, oazapfts.json({
|
|
993
|
-
...opts,
|
|
994
|
-
method: "DELETE",
|
|
995
|
-
body: deleteMemberPermissionsRequest
|
|
996
|
-
})));
|
|
997
|
-
}
|
|
998
|
-
/**
|
|
999
|
-
* Update member permissions
|
|
1000
|
-
*/
|
|
1001
|
-
export function updateMemberPermissions({ memberId, updateMemberPermissionsRequest }, opts) {
|
|
1002
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/members/${encodeURIComponent(memberId)}/permissions`, oazapfts.json({
|
|
1003
|
-
...opts,
|
|
1004
|
-
method: "PATCH",
|
|
1005
|
-
body: updateMemberPermissionsRequest
|
|
1006
|
-
})));
|
|
1007
|
-
}
|
|
1008
|
-
/**
|
|
1009
|
-
* Get All Fido credentials for given user
|
|
1010
|
-
*/
|
|
1011
|
-
export function getAllMemberFidoCredentials({ memberId, size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }, opts) {
|
|
1012
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/members/${encodeURIComponent(memberId)}/fido-credentials${QS.query(QS.explode({
|
|
1013
|
-
size,
|
|
1014
|
-
page,
|
|
1015
|
-
sort,
|
|
1016
|
-
direction,
|
|
1017
|
-
search,
|
|
1018
|
-
filterMode,
|
|
1019
|
-
filterBy,
|
|
1020
|
-
filterValue,
|
|
1021
|
-
multiFilterMode,
|
|
1022
|
-
filterIn
|
|
1023
|
-
}))}`, {
|
|
1024
|
-
...opts
|
|
1025
|
-
}));
|
|
1026
|
-
}
|
|
1027
|
-
/**
|
|
1028
|
-
* Disables Fido credentials for given user
|
|
1029
|
-
*/
|
|
1030
|
-
export function deactivateFidoCredentials({ memberId }, opts) {
|
|
1031
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/members/${encodeURIComponent(memberId)}/fido-credentials`, {
|
|
1032
|
-
...opts,
|
|
1033
|
-
method: "DELETE"
|
|
1034
|
-
}));
|
|
1035
|
-
}
|
|
1036
|
-
/**
|
|
1037
|
-
* Enable Fido credentials for given user
|
|
1038
|
-
*/
|
|
1039
|
-
export function enableFidoCredentials({ memberId }, opts) {
|
|
1040
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/members/${encodeURIComponent(memberId)}/fido-credentials`, {
|
|
1041
|
-
...opts,
|
|
1042
|
-
method: "PATCH"
|
|
1043
|
-
}));
|
|
1044
|
-
}
|
|
1045
|
-
/**
|
|
1046
|
-
* Revoke user invitation
|
|
1047
|
-
*/
|
|
1048
|
-
export function cancelUserInvitation({ id }, opts) {
|
|
1049
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/invitations/${encodeURIComponent(id)}`, {
|
|
1050
|
-
...opts,
|
|
1051
|
-
method: "DELETE"
|
|
1052
|
-
}));
|
|
1053
|
-
}
|
|
1054
|
-
/**
|
|
1055
|
-
* Resend user invitation
|
|
1056
|
-
*/
|
|
1057
|
-
export function resendUserInvitation({ id }, opts) {
|
|
1058
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/invitations/${encodeURIComponent(id)}`, {
|
|
1059
|
-
...opts,
|
|
1060
|
-
method: "PATCH"
|
|
1061
|
-
}));
|
|
1062
|
-
}
|
|
1063
|
-
/**
|
|
1064
|
-
* Get Group by ID
|
|
1065
|
-
*/
|
|
1066
|
-
export function getGroupById({ groupId }, opts) {
|
|
1067
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/groups/${encodeURIComponent(groupId)}`, {
|
|
1068
|
-
...opts
|
|
1069
|
-
}));
|
|
1070
|
-
}
|
|
1071
|
-
/**
|
|
1072
|
-
* Delete Group
|
|
1073
|
-
*/
|
|
1074
|
-
export function deleteV1GroupsByGroupId({ groupId }, opts) {
|
|
1075
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/groups/${encodeURIComponent(groupId)}`, {
|
|
1076
|
-
...opts,
|
|
1077
|
-
method: "DELETE"
|
|
1078
|
-
}));
|
|
1079
|
-
}
|
|
1080
|
-
/**
|
|
1081
|
-
* Update Group
|
|
1082
|
-
*/
|
|
1083
|
-
export function update1({ groupId, updateGroupRequest }, opts) {
|
|
1084
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/groups/${encodeURIComponent(groupId)}`, oazapfts.json({
|
|
1085
|
-
...opts,
|
|
1086
|
-
method: "PATCH",
|
|
1087
|
-
body: updateGroupRequest
|
|
1088
|
-
})));
|
|
1089
|
-
}
|
|
1090
|
-
/**
|
|
1091
|
-
* Delete Group permissions
|
|
1092
|
-
*/
|
|
1093
|
-
export function deleteGroupPermissions({ groupId, deleteGroupPermissionsRequest }, opts) {
|
|
1094
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/groups/${encodeURIComponent(groupId)}/permissions`, oazapfts.json({
|
|
1095
|
-
...opts,
|
|
1096
|
-
method: "DELETE",
|
|
1097
|
-
body: deleteGroupPermissionsRequest
|
|
1098
|
-
})));
|
|
1099
|
-
}
|
|
1100
|
-
/**
|
|
1101
|
-
* Update Group permissions
|
|
1102
|
-
*/
|
|
1103
|
-
export function updateGroupPermissions({ groupId, updateGroupPermissionsRequest }, opts) {
|
|
1104
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/groups/${encodeURIComponent(groupId)}/permissions`, oazapfts.json({
|
|
1105
|
-
...opts,
|
|
1106
|
-
method: "PATCH",
|
|
1107
|
-
body: updateGroupPermissionsRequest
|
|
1108
|
-
})));
|
|
1109
|
-
}
|
|
1110
|
-
/**
|
|
1111
|
-
* Enable a Feature Flag in an Account
|
|
1112
|
-
*/
|
|
1113
|
-
export function enable({ id }, opts) {
|
|
1114
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/feature-flags/${encodeURIComponent(id)}/enable`, {
|
|
1115
|
-
...opts,
|
|
1116
|
-
method: "PATCH"
|
|
1117
|
-
}));
|
|
1118
|
-
}
|
|
1119
|
-
/**
|
|
1120
|
-
* Disable a Feature Flag in an Account
|
|
1121
|
-
*/
|
|
1122
|
-
export function disable({ id }, opts) {
|
|
1123
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/feature-flags/${encodeURIComponent(id)}/disable`, {
|
|
1124
|
-
...opts,
|
|
1125
|
-
method: "PATCH"
|
|
1126
|
-
}));
|
|
1127
|
-
}
|
|
1128
|
-
/**
|
|
1129
|
-
* Get configured account SSO attributes
|
|
1130
|
-
*/
|
|
1131
|
-
export function ssoGetAttributesConfig({ id }, opts) {
|
|
1132
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/accounts/sso/${encodeURIComponent(id)}/attributes-configuration`, {
|
|
1133
|
-
...opts
|
|
1134
|
-
}));
|
|
1135
|
-
}
|
|
1136
|
-
/**
|
|
1137
|
-
* Configure account SSO attributes
|
|
1138
|
-
*/
|
|
1139
|
-
export function ssoAddAttributes({ id, accountSsoAddAttributesConfigRequest }, opts) {
|
|
1140
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/accounts/sso/${encodeURIComponent(id)}/attributes-configuration`, oazapfts.json({
|
|
1141
|
-
...opts,
|
|
1142
|
-
method: "PATCH",
|
|
1143
|
-
body: accountSsoAddAttributesConfigRequest
|
|
1144
|
-
})));
|
|
1145
|
-
}
|
|
1146
|
-
/**
|
|
1147
|
-
* Get Partner by account Id
|
|
1148
|
-
*/
|
|
1149
|
-
export function getPartnerAccount({ id }, opts) {
|
|
1150
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/account-partners/${encodeURIComponent(id)}`, {
|
|
1151
|
-
...opts
|
|
1152
|
-
}));
|
|
1153
|
-
}
|
|
1154
|
-
/**
|
|
1155
|
-
* Delete Partner
|
|
1156
|
-
*/
|
|
1157
|
-
export function deletePartner({ id }, opts) {
|
|
1158
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/account-partners/${encodeURIComponent(id)}`, {
|
|
1159
|
-
...opts,
|
|
1160
|
-
method: "DELETE"
|
|
1161
|
-
}));
|
|
1162
|
-
}
|
|
1163
|
-
/**
|
|
1164
|
-
* Update Partner Account data.
|
|
1165
|
-
*/
|
|
1166
|
-
export function updatePartnerAccountData({ id, accountPartnerAccountDataUpdateRequest }, opts) {
|
|
1167
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/account-partners/${encodeURIComponent(id)}`, oazapfts.json({
|
|
1168
|
-
...opts,
|
|
1169
|
-
method: "PATCH",
|
|
1170
|
-
body: accountPartnerAccountDataUpdateRequest
|
|
1171
|
-
})));
|
|
1172
|
-
}
|
|
1173
|
-
/**
|
|
1174
|
-
* Update Partner Account Admin data.
|
|
1175
|
-
*/
|
|
1176
|
-
export function updatePartnerAccountAdminData({ id, accountPartnerAdminDataUpdateRequest }, opts) {
|
|
1177
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/account-partners/${encodeURIComponent(id)}/admin`, oazapfts.json({
|
|
1178
|
-
...opts,
|
|
1179
|
-
method: "PATCH",
|
|
1180
|
-
body: accountPartnerAdminDataUpdateRequest
|
|
1181
|
-
})));
|
|
1182
|
-
}
|
|
1183
|
-
/**
|
|
1184
|
-
* Verify User repository credential configuration status.
|
|
1185
|
-
*/
|
|
1186
|
-
export function isCreatedScmCredentials(opts) {
|
|
1187
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/users/scm-credentials/configuration-status", {
|
|
1188
|
-
...opts
|
|
1189
|
-
}));
|
|
1190
|
-
}
|
|
1191
|
-
/**
|
|
1192
|
-
* List Accounts of User can use and collaborate.
|
|
1193
|
-
*/
|
|
1194
|
-
export function getUserAccountWithRole(opts) {
|
|
1195
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/users/accounts", {
|
|
1196
|
-
...opts
|
|
1197
|
-
}));
|
|
1198
|
-
}
|
|
1199
|
-
/**
|
|
1200
|
-
* Get Accounts
|
|
1201
|
-
*/
|
|
1202
|
-
export function getAccounts({ accountType, slug, id }, opts) {
|
|
1203
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/stackspot/accounts${QS.query(QS.explode({
|
|
1204
|
-
accountType,
|
|
1205
|
-
slug,
|
|
1206
|
-
id
|
|
1207
|
-
}))}`, {
|
|
1208
|
-
...opts
|
|
1209
|
-
}));
|
|
1210
|
-
}
|
|
1211
|
-
/**
|
|
1212
|
-
* Get Account by id
|
|
1213
|
-
*/
|
|
1214
|
-
export function getAccount({ id }, opts) {
|
|
1215
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/stackspot/accounts/${encodeURIComponent(id)}`, {
|
|
1216
|
-
...opts
|
|
1217
|
-
}));
|
|
1218
|
-
}
|
|
1219
|
-
/**
|
|
1220
|
-
* Get Account Members
|
|
1221
|
-
*/
|
|
1222
|
-
export function getAccountMembers({ id, size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }, opts) {
|
|
1223
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/stackspot/accounts/${encodeURIComponent(id)}/members${QS.query(QS.explode({
|
|
1224
|
-
size,
|
|
1225
|
-
page,
|
|
1226
|
-
sort,
|
|
1227
|
-
direction,
|
|
1228
|
-
search,
|
|
1229
|
-
filterMode,
|
|
1230
|
-
filterBy,
|
|
1231
|
-
filterValue,
|
|
1232
|
-
multiFilterMode,
|
|
1233
|
-
filterIn
|
|
1234
|
-
}))}`, {
|
|
1235
|
-
...opts
|
|
1236
|
-
}));
|
|
1237
|
-
}
|
|
1238
|
-
/**
|
|
1239
|
-
* Get Service Credential by ID (Client ID)
|
|
1240
|
-
*/
|
|
1241
|
-
export function getServiceCredential({ id }, opts) {
|
|
1242
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/service-credentials/${encodeURIComponent(id)}`, {
|
|
1243
|
-
...opts
|
|
1244
|
-
}));
|
|
1245
|
-
}
|
|
1246
|
-
/**
|
|
1247
|
-
* List service credential permissions
|
|
1248
|
-
*/
|
|
1249
|
-
export function getServiceCredentialPermissions({ id }, opts) {
|
|
1250
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/service-credentials/${encodeURIComponent(id)}/permissions`, {
|
|
1251
|
-
...opts
|
|
1252
|
-
}));
|
|
1253
|
-
}
|
|
1254
|
-
/**
|
|
1255
|
-
* List service credential groups
|
|
1256
|
-
*/
|
|
1257
|
-
export function getServiceCredentialGroups({ id }, opts) {
|
|
1258
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/service-credentials/${encodeURIComponent(id)}/groups`, {
|
|
1259
|
-
...opts
|
|
1260
|
-
}));
|
|
1261
|
-
}
|
|
1262
|
-
/**
|
|
1263
|
-
* Get SCM provider.
|
|
1264
|
-
*/
|
|
1265
|
-
export function getScmProvider(opts) {
|
|
1266
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/scm-credentials/provider", {
|
|
1267
|
-
...opts
|
|
1268
|
-
}));
|
|
1269
|
-
}
|
|
1270
|
-
/**
|
|
1271
|
-
* Verify repository credential configuration status.
|
|
1272
|
-
*/
|
|
1273
|
-
export function isCreatedScmCredentials1(opts) {
|
|
1274
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/scm-credentials/configuration-status", {
|
|
1275
|
-
...opts
|
|
1276
|
-
}));
|
|
1277
|
-
}
|
|
1278
|
-
/**
|
|
1279
|
-
* Get Permissions from role
|
|
1280
|
-
*/
|
|
1281
|
-
export function getPermissionsWithStatus({ roleId, size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }, opts) {
|
|
1282
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/roles/${encodeURIComponent(roleId)}/permissions${QS.query(QS.explode({
|
|
1283
|
-
size,
|
|
1284
|
-
page,
|
|
1285
|
-
sort,
|
|
1286
|
-
direction,
|
|
1287
|
-
search,
|
|
1288
|
-
filterMode,
|
|
1289
|
-
filterBy,
|
|
1290
|
-
filterValue,
|
|
1291
|
-
multiFilterMode,
|
|
1292
|
-
filterIn
|
|
1293
|
-
}))}`, {
|
|
1294
|
-
...opts
|
|
1295
|
-
}));
|
|
1296
|
-
}
|
|
1297
|
-
/**
|
|
1298
|
-
* Get Members from Resource
|
|
1299
|
-
*/
|
|
1300
|
-
export function getResourceMembers({ resourceId, size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }, opts) {
|
|
1301
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/resources/${encodeURIComponent(resourceId)}/members${QS.query(QS.explode({
|
|
1302
|
-
size,
|
|
1303
|
-
page,
|
|
1304
|
-
sort,
|
|
1305
|
-
direction,
|
|
1306
|
-
search,
|
|
1307
|
-
filterMode,
|
|
1308
|
-
filterBy,
|
|
1309
|
-
filterValue,
|
|
1310
|
-
multiFilterMode,
|
|
1311
|
-
filterIn
|
|
1312
|
-
}))}`, {
|
|
1313
|
-
...opts
|
|
1314
|
-
}));
|
|
1315
|
-
}
|
|
1316
|
-
/**
|
|
1317
|
-
* Get Groups from Resource
|
|
1318
|
-
*/
|
|
1319
|
-
export function getResourceGroups({ resourceId, size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }, opts) {
|
|
1320
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/resources/${encodeURIComponent(resourceId)}/groups${QS.query(QS.explode({
|
|
1321
|
-
size,
|
|
1322
|
-
page,
|
|
1323
|
-
sort,
|
|
1324
|
-
direction,
|
|
1325
|
-
search,
|
|
1326
|
-
filterMode,
|
|
1327
|
-
filterBy,
|
|
1328
|
-
filterValue,
|
|
1329
|
-
multiFilterMode,
|
|
1330
|
-
filterIn
|
|
1331
|
-
}))}`, {
|
|
1332
|
-
...opts
|
|
1333
|
-
}));
|
|
1334
|
-
}
|
|
1335
|
-
/**
|
|
1336
|
-
* Get Resource Types
|
|
1337
|
-
*/
|
|
1338
|
-
export function getResourceTypes({ size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }, opts) {
|
|
1339
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/resource-types${QS.query(QS.explode({
|
|
1340
|
-
size,
|
|
1341
|
-
page,
|
|
1342
|
-
sort,
|
|
1343
|
-
direction,
|
|
1344
|
-
search,
|
|
1345
|
-
filterMode,
|
|
1346
|
-
filterBy,
|
|
1347
|
-
filterValue,
|
|
1348
|
-
multiFilterMode,
|
|
1349
|
-
filterIn
|
|
1350
|
-
}))}`, {
|
|
1351
|
-
...opts
|
|
1352
|
-
}));
|
|
1353
|
-
}
|
|
1354
|
-
/**
|
|
1355
|
-
* Get Resources Members
|
|
1356
|
-
*/
|
|
1357
|
-
export function getResources1({ memberId }, opts) {
|
|
1358
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/members/${encodeURIComponent(memberId)}/resources`, {
|
|
1359
|
-
...opts
|
|
1360
|
-
}));
|
|
1361
|
-
}
|
|
1362
|
-
/**
|
|
1363
|
-
* Get Account Collaborators Members
|
|
1364
|
-
*/
|
|
1365
|
-
export function getAccountMembersToCollaborators({ size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }, opts) {
|
|
1366
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/members/collaborators${QS.query(QS.explode({
|
|
1367
|
-
size,
|
|
1368
|
-
page,
|
|
1369
|
-
sort,
|
|
1370
|
-
direction,
|
|
1371
|
-
search,
|
|
1372
|
-
filterMode,
|
|
1373
|
-
filterBy,
|
|
1374
|
-
filterValue,
|
|
1375
|
-
multiFilterMode,
|
|
1376
|
-
filterIn
|
|
1377
|
-
}))}`, {
|
|
1378
|
-
...opts
|
|
1379
|
-
}));
|
|
1380
|
-
}
|
|
1381
|
-
/**
|
|
1382
|
-
* Get Authentication Configuration for account
|
|
1383
|
-
*/
|
|
1384
|
-
export function getAuthenticationConfig({ tenantSlug }, opts) {
|
|
1385
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/authentication/config${QS.query(QS.explode({
|
|
1386
|
-
tenant_slug: tenantSlug
|
|
1387
|
-
}))}`, {
|
|
1388
|
-
...opts
|
|
1389
|
-
}));
|
|
1390
|
-
}
|
|
1391
|
-
/**
|
|
1392
|
-
* Get account data (tenant, IDP alias, account freemium available to user) by email
|
|
1393
|
-
*/
|
|
1394
|
-
export function getAccountDataByEmail({ email }, opts) {
|
|
1395
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/accounts${QS.query(QS.explode({
|
|
1396
|
-
email
|
|
1397
|
-
}))}`, {
|
|
1398
|
-
...opts
|
|
1399
|
-
}));
|
|
1400
|
-
}
|
|
1401
|
-
/**
|
|
1402
|
-
* Get account Slug - this API is temporary
|
|
1403
|
-
*/
|
|
1404
|
-
export function getAccountSlug({ accountId }, opts) {
|
|
1405
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/accounts/${encodeURIComponent(accountId)}`, {
|
|
1406
|
-
...opts
|
|
1407
|
-
}));
|
|
1408
|
-
}
|
|
1409
|
-
/**
|
|
1410
|
-
* Get all SSO configured in account
|
|
1411
|
-
*/
|
|
1412
|
-
export function getAllAccountSso({ size, page, sort, direction, search, filterMode, filterBy, filterValue, multiFilterMode, filterIn }, opts) {
|
|
1413
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/accounts/sso${QS.query(QS.explode({
|
|
1414
|
-
size,
|
|
1415
|
-
page,
|
|
1416
|
-
sort,
|
|
1417
|
-
direction,
|
|
1418
|
-
search,
|
|
1419
|
-
filterMode,
|
|
1420
|
-
filterBy,
|
|
1421
|
-
filterValue,
|
|
1422
|
-
multiFilterMode,
|
|
1423
|
-
filterIn
|
|
1424
|
-
}))}`, {
|
|
1425
|
-
...opts
|
|
1426
|
-
}));
|
|
1427
|
-
}
|
|
1428
|
-
/**
|
|
1429
|
-
* Returns information if account data (name and slug) are available to be registered
|
|
1430
|
-
*/
|
|
1431
|
-
export function accountDataIsAvailable({ name, slug }, opts) {
|
|
1432
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/accounts/freemium/available${QS.query(QS.explode({
|
|
1433
|
-
name,
|
|
1434
|
-
slug
|
|
1435
|
-
}))}`, {
|
|
1436
|
-
...opts
|
|
1437
|
-
}));
|
|
1438
|
-
}
|
|
1439
|
-
/**
|
|
1440
|
-
* Get Partners who are sharing content.
|
|
1441
|
-
*/
|
|
1442
|
-
export function getSharingPartners({ name }, opts) {
|
|
1443
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/account-partners/sharing${QS.query(QS.explode({
|
|
1444
|
-
name
|
|
1445
|
-
}))}`, {
|
|
1446
|
-
...opts
|
|
1447
|
-
}));
|
|
1448
|
-
}
|
|
1449
|
-
/**
|
|
1450
|
-
* Get Partners with whom it is allowed to share content.
|
|
1451
|
-
*/
|
|
1452
|
-
export function getPartnersSharingAllowed({ name }, opts) {
|
|
1453
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/account-partners/sharing-allowed${QS.query(QS.explode({
|
|
1454
|
-
name
|
|
1455
|
-
}))}`, {
|
|
1456
|
-
...opts
|
|
1457
|
-
}));
|
|
1458
|
-
}
|
|
1459
|
-
/**
|
|
1460
|
-
* Validate Partner association limit
|
|
1461
|
-
*/
|
|
1462
|
-
export function validatePartnerAssociationLimit(opts) {
|
|
1463
|
-
return oazapfts.ok(oazapfts.fetchJson("/v1/account-orders/partners/validations/association-limit", {
|
|
1464
|
-
...opts
|
|
1465
|
-
}));
|
|
1466
|
-
}
|
|
1467
|
-
/**
|
|
1468
|
-
* Disassociate Group to Service Credential
|
|
1469
|
-
*/
|
|
1470
|
-
export function disassociateGroupToServiceCredential({ id, groupId }, opts) {
|
|
1471
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/service-credentials/${encodeURIComponent(id)}/teams/${encodeURIComponent(groupId)}`, {
|
|
1472
|
-
...opts,
|
|
1473
|
-
method: "DELETE"
|
|
1474
|
-
}));
|
|
1475
|
-
}
|
|
1476
|
-
/**
|
|
1477
|
-
* Remove Role from Member
|
|
1478
|
-
*/
|
|
1479
|
-
export function removeRoleFromMember({ roleId, memberId }, opts) {
|
|
1480
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/roles/${encodeURIComponent(roleId)}/members/${encodeURIComponent(memberId)}`, {
|
|
1481
|
-
...opts,
|
|
1482
|
-
method: "DELETE"
|
|
1483
|
-
}));
|
|
1484
|
-
}
|
|
1485
|
-
/**
|
|
1486
|
-
* Delete a resource from Account
|
|
1487
|
-
*/
|
|
1488
|
-
export function deleteResource({ resourceId }, opts) {
|
|
1489
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/resources/${encodeURIComponent(resourceId)}`, {
|
|
1490
|
-
...opts,
|
|
1491
|
-
method: "DELETE"
|
|
1492
|
-
}));
|
|
1493
|
-
}
|
|
1494
|
-
/**
|
|
1495
|
-
* Delete Group role
|
|
1496
|
-
*/
|
|
1497
|
-
export function deleteRole({ groupId, roleId }, opts) {
|
|
1498
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/groups/${encodeURIComponent(groupId)}/roles/${encodeURIComponent(roleId)}`, {
|
|
1499
|
-
...opts,
|
|
1500
|
-
method: "DELETE"
|
|
1501
|
-
}));
|
|
1502
|
-
}
|
|
1503
|
-
/**
|
|
1504
|
-
* Delete Resource from Group
|
|
1505
|
-
*/
|
|
1506
|
-
export function deleteResourceFromGroup({ groupId, resourceId }, opts) {
|
|
1507
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/groups/${encodeURIComponent(groupId)}/resources/${encodeURIComponent(resourceId)}`, {
|
|
1508
|
-
...opts,
|
|
1509
|
-
method: "DELETE"
|
|
1510
|
-
}));
|
|
1511
|
-
}
|
|
1512
|
-
/**
|
|
1513
|
-
* Delete Group member
|
|
1514
|
-
*/
|
|
1515
|
-
export function deleteMember({ groupId, memberId }, opts) {
|
|
1516
|
-
return oazapfts.ok(oazapfts.fetchJson(`/v1/groups/${encodeURIComponent(groupId)}/members/${encodeURIComponent(memberId)}`, {
|
|
1517
|
-
...opts,
|
|
1518
|
-
method: "DELETE"
|
|
1519
|
-
}));
|
|
1520
|
-
}
|
|
1521
|
-
//# sourceMappingURL=account.js.map
|