@raystack/frontier 0.0.0 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2197 -2
- package/dist/index.js +1987 -3
- package/dist/index.mjs +1988 -3
- package/package.json +3 -2
- package/react/dist/index.d.ts +2207 -71
- package/react/dist/index.js +2006 -72
- package/react/dist/index.mjs +2006 -72
- package/dist/index.cjs +0 -32
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/shield.min.js +0 -27
package/react/dist/index.js
CHANGED
|
@@ -97,51 +97,1960 @@ var import_react3 = require("react");
|
|
|
97
97
|
// react/contexts/FrontierContext.tsx
|
|
98
98
|
var import_react = __toESM(require("react"));
|
|
99
99
|
|
|
100
|
-
//
|
|
101
|
-
var
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
this.
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
this.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
)
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
this.
|
|
130
|
-
|
|
100
|
+
// client/http-client.ts
|
|
101
|
+
var HttpClient = class {
|
|
102
|
+
constructor(apiConfig = {}) {
|
|
103
|
+
this.baseUrl = "http://127.0.0.1:7400";
|
|
104
|
+
this.securityData = null;
|
|
105
|
+
this.abortControllers = /* @__PURE__ */ new Map();
|
|
106
|
+
this.customFetch = (...fetchParams) => fetch(...fetchParams);
|
|
107
|
+
this.baseApiParams = {
|
|
108
|
+
credentials: "same-origin",
|
|
109
|
+
headers: {},
|
|
110
|
+
redirect: "follow",
|
|
111
|
+
referrerPolicy: "no-referrer"
|
|
112
|
+
};
|
|
113
|
+
this.setSecurityData = (data) => {
|
|
114
|
+
this.securityData = data;
|
|
115
|
+
};
|
|
116
|
+
this.contentFormatters = {
|
|
117
|
+
["application/json" /* Json */]: (input) => input !== null && (typeof input === "object" || typeof input === "string") ? JSON.stringify(input) : input,
|
|
118
|
+
["text/plain" /* Text */]: (input) => input !== null && typeof input !== "string" ? JSON.stringify(input) : input,
|
|
119
|
+
["multipart/form-data" /* FormData */]: (input) => Object.keys(input || {}).reduce((formData, key) => {
|
|
120
|
+
const property = input[key];
|
|
121
|
+
formData.append(
|
|
122
|
+
key,
|
|
123
|
+
property instanceof Blob ? property : typeof property === "object" && property !== null ? JSON.stringify(property) : `${property}`
|
|
124
|
+
);
|
|
125
|
+
return formData;
|
|
126
|
+
}, new FormData()),
|
|
127
|
+
["application/x-www-form-urlencoded" /* UrlEncoded */]: (input) => this.toQueryString(input)
|
|
128
|
+
};
|
|
129
|
+
this.createAbortSignal = (cancelToken) => {
|
|
130
|
+
if (this.abortControllers.has(cancelToken)) {
|
|
131
|
+
const abortController2 = this.abortControllers.get(cancelToken);
|
|
132
|
+
if (abortController2) {
|
|
133
|
+
return abortController2.signal;
|
|
134
|
+
}
|
|
135
|
+
return void 0;
|
|
136
|
+
}
|
|
137
|
+
const abortController = new AbortController();
|
|
138
|
+
this.abortControllers.set(cancelToken, abortController);
|
|
139
|
+
return abortController.signal;
|
|
140
|
+
};
|
|
141
|
+
this.abortRequest = (cancelToken) => {
|
|
142
|
+
const abortController = this.abortControllers.get(cancelToken);
|
|
143
|
+
if (abortController) {
|
|
144
|
+
abortController.abort();
|
|
145
|
+
this.abortControllers.delete(cancelToken);
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
this.request = (_a) => __async(this, null, function* () {
|
|
149
|
+
var _b = _a, {
|
|
150
|
+
body,
|
|
151
|
+
secure,
|
|
152
|
+
path,
|
|
153
|
+
type,
|
|
154
|
+
query,
|
|
155
|
+
format,
|
|
156
|
+
baseUrl,
|
|
157
|
+
cancelToken
|
|
158
|
+
} = _b, params = __objRest(_b, [
|
|
159
|
+
"body",
|
|
160
|
+
"secure",
|
|
161
|
+
"path",
|
|
162
|
+
"type",
|
|
163
|
+
"query",
|
|
164
|
+
"format",
|
|
165
|
+
"baseUrl",
|
|
166
|
+
"cancelToken"
|
|
167
|
+
]);
|
|
168
|
+
const secureParams = (typeof secure === "boolean" ? secure : this.baseApiParams.secure) && this.securityWorker && (yield this.securityWorker(this.securityData)) || {};
|
|
169
|
+
const requestParams = this.mergeRequestParams(params, secureParams);
|
|
170
|
+
const queryString = query && this.toQueryString(query);
|
|
171
|
+
const payloadFormatter = this.contentFormatters[type || "application/json" /* Json */];
|
|
172
|
+
const responseFormat = format || requestParams.format;
|
|
173
|
+
return this.customFetch(`${baseUrl || this.baseUrl || ""}${path}${queryString ? `?${queryString}` : ""}`, __spreadProps(__spreadValues({}, requestParams), {
|
|
174
|
+
headers: __spreadValues(__spreadValues({}, requestParams.headers || {}), type && type !== "multipart/form-data" /* FormData */ ? { "Content-Type": type } : {}),
|
|
175
|
+
signal: (cancelToken ? this.createAbortSignal(cancelToken) : requestParams.signal) || null,
|
|
176
|
+
body: typeof body === "undefined" || body === null ? null : payloadFormatter(body)
|
|
177
|
+
})).then((response) => __async(this, null, function* () {
|
|
178
|
+
const r = response;
|
|
179
|
+
r.data = null;
|
|
180
|
+
r.error = null;
|
|
181
|
+
const data = !responseFormat ? r : yield response[responseFormat]().then((data2) => {
|
|
182
|
+
if (r.ok) {
|
|
183
|
+
r.data = data2;
|
|
184
|
+
} else {
|
|
185
|
+
r.error = data2;
|
|
186
|
+
}
|
|
187
|
+
return r;
|
|
188
|
+
}).catch((e) => {
|
|
189
|
+
r.error = e;
|
|
190
|
+
return r;
|
|
191
|
+
});
|
|
192
|
+
if (cancelToken) {
|
|
193
|
+
this.abortControllers.delete(cancelToken);
|
|
194
|
+
}
|
|
195
|
+
if (!response.ok)
|
|
196
|
+
throw data;
|
|
197
|
+
return data;
|
|
198
|
+
}));
|
|
131
199
|
});
|
|
132
|
-
this
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
200
|
+
Object.assign(this, apiConfig);
|
|
201
|
+
}
|
|
202
|
+
encodeQueryParam(key, value) {
|
|
203
|
+
const encodedKey = encodeURIComponent(key);
|
|
204
|
+
return `${encodedKey}=${encodeURIComponent(typeof value === "number" ? value : `${value}`)}`;
|
|
205
|
+
}
|
|
206
|
+
addQueryParam(query, key) {
|
|
207
|
+
return this.encodeQueryParam(key, query[key]);
|
|
208
|
+
}
|
|
209
|
+
addArrayQueryParam(query, key) {
|
|
210
|
+
const value = query[key];
|
|
211
|
+
return value.map((v) => this.encodeQueryParam(key, v)).join("&");
|
|
212
|
+
}
|
|
213
|
+
toQueryString(rawQuery) {
|
|
214
|
+
const query = rawQuery || {};
|
|
215
|
+
const keys = Object.keys(query).filter((key) => "undefined" !== typeof query[key]);
|
|
216
|
+
return keys.map((key) => Array.isArray(query[key]) ? this.addArrayQueryParam(query, key) : this.addQueryParam(query, key)).join("&");
|
|
217
|
+
}
|
|
218
|
+
addQueryParams(rawQuery) {
|
|
219
|
+
const queryString = this.toQueryString(rawQuery);
|
|
220
|
+
return queryString ? `?${queryString}` : "";
|
|
221
|
+
}
|
|
222
|
+
mergeRequestParams(params1, params2) {
|
|
223
|
+
return __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, this.baseApiParams), params1), params2 || {}), {
|
|
224
|
+
headers: __spreadValues(__spreadValues(__spreadValues({}, this.baseApiParams.headers || {}), params1.headers || {}), params2 && params2.headers || {})
|
|
136
225
|
});
|
|
137
226
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
// client/V1Beta1.ts
|
|
230
|
+
var V1Beta1 = class extends HttpClient {
|
|
231
|
+
constructor() {
|
|
232
|
+
super(...arguments);
|
|
233
|
+
/**
|
|
234
|
+
* @description Lists all the groups from all the organizations in a Frontier instance. It can be filtered by organization and state.
|
|
235
|
+
*
|
|
236
|
+
* @tags Group
|
|
237
|
+
* @name AdminServiceListGroups
|
|
238
|
+
* @summary List all groups
|
|
239
|
+
* @request GET:/v1beta1/admin/groups
|
|
240
|
+
* @secure
|
|
241
|
+
*/
|
|
242
|
+
this.adminServiceListGroups = (query, params = {}) => this.request(__spreadValues({
|
|
243
|
+
path: `/v1beta1/admin/groups`,
|
|
244
|
+
method: "GET",
|
|
245
|
+
query,
|
|
246
|
+
secure: true,
|
|
247
|
+
format: "json"
|
|
248
|
+
}, params));
|
|
249
|
+
/**
|
|
250
|
+
* @description Lists all the organizations in a Frontier instance. It can be filtered by user and state.
|
|
251
|
+
*
|
|
252
|
+
* @tags Organization
|
|
253
|
+
* @name AdminServiceListAllOrganizations
|
|
254
|
+
* @summary List all organizations
|
|
255
|
+
* @request GET:/v1beta1/admin/organizations
|
|
256
|
+
* @secure
|
|
257
|
+
*/
|
|
258
|
+
this.adminServiceListAllOrganizations = (query, params = {}) => this.request(__spreadValues({
|
|
259
|
+
path: `/v1beta1/admin/organizations`,
|
|
260
|
+
method: "GET",
|
|
261
|
+
query,
|
|
262
|
+
secure: true,
|
|
263
|
+
format: "json"
|
|
264
|
+
}, params));
|
|
265
|
+
/**
|
|
266
|
+
* @description Lists all the projects from all the organizations in a Frontier instance. It can be filtered by organization and state.
|
|
267
|
+
*
|
|
268
|
+
* @tags Project
|
|
269
|
+
* @name AdminServiceListProjects
|
|
270
|
+
* @summary List all projects
|
|
271
|
+
* @request GET:/v1beta1/admin/projects
|
|
272
|
+
* @secure
|
|
273
|
+
*/
|
|
274
|
+
this.adminServiceListProjects = (query, params = {}) => this.request(__spreadValues({
|
|
275
|
+
path: `/v1beta1/admin/projects`,
|
|
276
|
+
method: "GET",
|
|
277
|
+
query,
|
|
278
|
+
secure: true,
|
|
279
|
+
format: "json"
|
|
280
|
+
}, params));
|
|
281
|
+
/**
|
|
282
|
+
* No description
|
|
283
|
+
*
|
|
284
|
+
* @tags Relation
|
|
285
|
+
* @name AdminServiceListRelations
|
|
286
|
+
* @summary List all relations
|
|
287
|
+
* @request GET:/v1beta1/admin/relations
|
|
288
|
+
* @secure
|
|
289
|
+
*/
|
|
290
|
+
this.adminServiceListRelations = (params = {}) => this.request(__spreadValues({
|
|
291
|
+
path: `/v1beta1/admin/relations`,
|
|
292
|
+
method: "GET",
|
|
293
|
+
secure: true,
|
|
294
|
+
format: "json"
|
|
295
|
+
}, params));
|
|
296
|
+
/**
|
|
297
|
+
* @description Lists all the resources from all the organizations in a Frontier instance. It can be filtered by user, project, organization and namespace.
|
|
298
|
+
*
|
|
299
|
+
* @tags Resource
|
|
300
|
+
* @name AdminServiceListResources
|
|
301
|
+
* @summary List all resources
|
|
302
|
+
* @request GET:/v1beta1/admin/resources
|
|
303
|
+
* @secure
|
|
304
|
+
*/
|
|
305
|
+
this.adminServiceListResources = (query, params = {}) => this.request(__spreadValues({
|
|
306
|
+
path: `/v1beta1/admin/resources`,
|
|
307
|
+
method: "GET",
|
|
308
|
+
query,
|
|
309
|
+
secure: true,
|
|
310
|
+
format: "json"
|
|
311
|
+
}, params));
|
|
312
|
+
/**
|
|
313
|
+
* @description Lists all the users from all the organizations in a Frontier instance. It can be filtered by keyword, organization, group and state.
|
|
314
|
+
*
|
|
315
|
+
* @tags User
|
|
316
|
+
* @name AdminServiceListAllUsers
|
|
317
|
+
* @summary List all users
|
|
318
|
+
* @request GET:/v1beta1/admin/users
|
|
319
|
+
* @secure
|
|
320
|
+
*/
|
|
321
|
+
this.adminServiceListAllUsers = (query, params = {}) => this.request(__spreadValues({
|
|
322
|
+
path: `/v1beta1/admin/users`,
|
|
323
|
+
method: "GET",
|
|
324
|
+
query,
|
|
325
|
+
secure: true,
|
|
326
|
+
format: "json"
|
|
327
|
+
}, params));
|
|
328
|
+
/**
|
|
329
|
+
* @description Returns a list of identity providers configured on an instance level in Frontier. e.g Google, AzureAD, Github etc
|
|
330
|
+
*
|
|
331
|
+
* @tags Authn
|
|
332
|
+
* @name FrontierServiceListAuthStrategies
|
|
333
|
+
* @summary List authentication strategies
|
|
334
|
+
* @request GET:/v1beta1/auth
|
|
335
|
+
* @secure
|
|
336
|
+
*/
|
|
337
|
+
this.frontierServiceListAuthStrategies = (params = {}) => this.request(__spreadValues({
|
|
338
|
+
path: `/v1beta1/auth`,
|
|
339
|
+
method: "GET",
|
|
340
|
+
secure: true,
|
|
341
|
+
format: "json"
|
|
342
|
+
}, params));
|
|
343
|
+
/**
|
|
344
|
+
* @description Callback from a strategy. This is the endpoint where the strategy will redirect the user after successful authentication. This endpoint will be called with the code and state query parameters. The code will be used to get the access token from the strategy and the state will be used to get the return_to url from the session and redirect the user to that url.
|
|
345
|
+
*
|
|
346
|
+
* @tags Authn
|
|
347
|
+
* @name FrontierServiceAuthCallback
|
|
348
|
+
* @summary Callback from a strategy
|
|
349
|
+
* @request GET:/v1beta1/auth/callback
|
|
350
|
+
* @secure
|
|
351
|
+
*/
|
|
352
|
+
this.frontierServiceAuthCallback = (query, params = {}) => this.request(__spreadValues({
|
|
353
|
+
path: `/v1beta1/auth/callback`,
|
|
354
|
+
method: "GET",
|
|
355
|
+
query,
|
|
356
|
+
secure: true,
|
|
357
|
+
format: "json"
|
|
358
|
+
}, params));
|
|
359
|
+
/**
|
|
360
|
+
* @description Callback from a strategy. This is the endpoint where the strategy will redirect the user after successful authentication. This endpoint will be called with the code and state query parameters. The code will be used to get the access token from the strategy and the state will be used to get the return_to url from the session and redirect the user to that url.
|
|
361
|
+
*
|
|
362
|
+
* @tags Authn
|
|
363
|
+
* @name FrontierServiceAuthCallback2
|
|
364
|
+
* @summary Callback from a strategy
|
|
365
|
+
* @request POST:/v1beta1/auth/callback
|
|
366
|
+
* @secure
|
|
367
|
+
*/
|
|
368
|
+
this.frontierServiceAuthCallback2 = (body, params = {}) => this.request(__spreadValues({
|
|
369
|
+
path: `/v1beta1/auth/callback`,
|
|
370
|
+
method: "POST",
|
|
371
|
+
body,
|
|
372
|
+
secure: true,
|
|
373
|
+
type: "application/json" /* Json */,
|
|
374
|
+
format: "json"
|
|
375
|
+
}, params));
|
|
376
|
+
/**
|
|
377
|
+
* No description
|
|
378
|
+
*
|
|
379
|
+
* @tags Authz
|
|
380
|
+
* @name FrontierServiceGetJwKs
|
|
381
|
+
* @summary Get well known JWKs
|
|
382
|
+
* @request GET:/v1beta1/auth/jwks
|
|
383
|
+
* @secure
|
|
384
|
+
*/
|
|
385
|
+
this.frontierServiceGetJwKs = (params = {}) => this.request(__spreadValues({
|
|
386
|
+
path: `/v1beta1/auth/jwks`,
|
|
387
|
+
method: "GET",
|
|
388
|
+
secure: true,
|
|
389
|
+
format: "json"
|
|
390
|
+
}, params));
|
|
391
|
+
/**
|
|
392
|
+
* No description
|
|
393
|
+
*
|
|
394
|
+
* @tags Authn
|
|
395
|
+
* @name FrontierServiceAuthLogout
|
|
396
|
+
* @summary Logout from a strategy
|
|
397
|
+
* @request GET:/v1beta1/auth/logout
|
|
398
|
+
* @secure
|
|
399
|
+
*/
|
|
400
|
+
this.frontierServiceAuthLogout = (params = {}) => this.request(__spreadValues({
|
|
401
|
+
path: `/v1beta1/auth/logout`,
|
|
402
|
+
method: "GET",
|
|
403
|
+
secure: true,
|
|
404
|
+
format: "json"
|
|
405
|
+
}, params));
|
|
406
|
+
/**
|
|
407
|
+
* No description
|
|
408
|
+
*
|
|
409
|
+
* @tags Authn
|
|
410
|
+
* @name FrontierServiceAuthLogout2
|
|
411
|
+
* @summary Logout from a strategy
|
|
412
|
+
* @request DELETE:/v1beta1/auth/logout
|
|
413
|
+
* @secure
|
|
414
|
+
*/
|
|
415
|
+
this.frontierServiceAuthLogout2 = (params = {}) => this.request(__spreadValues({
|
|
416
|
+
path: `/v1beta1/auth/logout`,
|
|
417
|
+
method: "DELETE",
|
|
418
|
+
secure: true,
|
|
419
|
+
format: "json"
|
|
420
|
+
}, params));
|
|
421
|
+
/**
|
|
422
|
+
* @description Authenticate a user with a strategy. By default, after successful authentication no operation will be performed to apply redirection in case of browsers, provide a url in the authenticate request body that will be used for redirection after authentication. Also set redirect as true for redirecting the user request to the redirect_url after successful authentication.
|
|
423
|
+
*
|
|
424
|
+
* @tags Authn
|
|
425
|
+
* @name FrontierServiceAuthenticate
|
|
426
|
+
* @summary Authenticate with a strategy
|
|
427
|
+
* @request GET:/v1beta1/auth/register/{strategyName}
|
|
428
|
+
* @secure
|
|
429
|
+
*/
|
|
430
|
+
this.frontierServiceAuthenticate = (strategyName, query, params = {}) => this.request(__spreadValues({
|
|
431
|
+
path: `/v1beta1/auth/register/${strategyName}`,
|
|
432
|
+
method: "GET",
|
|
433
|
+
query,
|
|
434
|
+
secure: true,
|
|
435
|
+
format: "json"
|
|
436
|
+
}, params));
|
|
437
|
+
/**
|
|
438
|
+
* @description Authenticate a user with a strategy. By default, after successful authentication no operation will be performed to apply redirection in case of browsers, provide a url in the authenticate request body that will be used for redirection after authentication. Also set redirect as true for redirecting the user request to the redirect_url after successful authentication.
|
|
439
|
+
*
|
|
440
|
+
* @tags Authn
|
|
441
|
+
* @name FrontierServiceAuthenticate2
|
|
442
|
+
* @summary Authenticate with a strategy
|
|
443
|
+
* @request POST:/v1beta1/auth/register/{strategyName}
|
|
444
|
+
* @secure
|
|
445
|
+
*/
|
|
446
|
+
this.frontierServiceAuthenticate2 = (strategyName, body, params = {}) => this.request(__spreadValues({
|
|
447
|
+
path: `/v1beta1/auth/register/${strategyName}`,
|
|
448
|
+
method: "POST",
|
|
449
|
+
body,
|
|
450
|
+
secure: true,
|
|
451
|
+
type: "application/json" /* Json */,
|
|
452
|
+
format: "json"
|
|
453
|
+
}, params));
|
|
454
|
+
/**
|
|
455
|
+
* @description Access token can be generated by providing the credentials in the request body/header. The credentials can be client id and secret or service account generated key jwt. Use the generated access token in Authorization header to access the frontier resources.
|
|
456
|
+
*
|
|
457
|
+
* @tags Authn
|
|
458
|
+
* @name FrontierServiceAuthToken
|
|
459
|
+
* @summary Generate access token by given credentials
|
|
460
|
+
* @request POST:/v1beta1/auth/token
|
|
461
|
+
* @secure
|
|
462
|
+
*/
|
|
463
|
+
this.frontierServiceAuthToken = (body, params = {}) => this.request(__spreadValues({
|
|
464
|
+
path: `/v1beta1/auth/token`,
|
|
465
|
+
method: "POST",
|
|
466
|
+
body,
|
|
467
|
+
secure: true,
|
|
468
|
+
type: "application/json" /* Json */,
|
|
469
|
+
format: "json"
|
|
470
|
+
}, params));
|
|
471
|
+
/**
|
|
472
|
+
* @description Returns true if a principal has required permissions to access a resource and false otherwise.<br/> Note the principal can be a user or a service account, and Frontier will the credentials from the current logged in principal from the session cookie (if any), or the client id and secret (in case of service users) or the access token (in case of human user accounts).
|
|
473
|
+
*
|
|
474
|
+
* @tags Authz
|
|
475
|
+
* @name FrontierServiceCheckResourcePermission
|
|
476
|
+
* @summary Check
|
|
477
|
+
* @request POST:/v1beta1/check
|
|
478
|
+
* @secure
|
|
479
|
+
*/
|
|
480
|
+
this.frontierServiceCheckResourcePermission = (body, params = {}) => this.request(__spreadValues({
|
|
481
|
+
path: `/v1beta1/check`,
|
|
482
|
+
method: "POST",
|
|
483
|
+
body,
|
|
484
|
+
secure: true,
|
|
485
|
+
type: "application/json" /* Json */,
|
|
486
|
+
format: "json"
|
|
487
|
+
}, params));
|
|
488
|
+
/**
|
|
489
|
+
* @description Returns a list of all metaschemas configured on an instance level in Frontier. e.g user, project, organization etc
|
|
490
|
+
*
|
|
491
|
+
* @tags MetaSchema
|
|
492
|
+
* @name FrontierServiceListMetaSchemas
|
|
493
|
+
* @summary List metaschemas
|
|
494
|
+
* @request GET:/v1beta1/meta/schemas
|
|
495
|
+
* @secure
|
|
496
|
+
*/
|
|
497
|
+
this.frontierServiceListMetaSchemas = (params = {}) => this.request(__spreadValues({
|
|
498
|
+
path: `/v1beta1/meta/schemas`,
|
|
499
|
+
method: "GET",
|
|
500
|
+
secure: true,
|
|
501
|
+
format: "json"
|
|
502
|
+
}, params));
|
|
503
|
+
/**
|
|
504
|
+
* @description Create a new metadata schema. The metaschema **name** must be unique within the entire Frontier instance and can contain only alphanumeric characters, dashes and underscores. The metaschema **schema** must be a valid JSON schema.Please refer to https://json-schema.org/ to know more about json schema. <br/>*Example:* `{name:"user",schema:{"type":"object","properties":{"label":{"type":"object","additionalProperties":{"type":"string"}},"description":{"type":"string"}}}}`
|
|
505
|
+
*
|
|
506
|
+
* @tags MetaSchema
|
|
507
|
+
* @name FrontierServiceCreateMetaSchema
|
|
508
|
+
* @summary Create metaschema
|
|
509
|
+
* @request POST:/v1beta1/meta/schemas
|
|
510
|
+
* @secure
|
|
511
|
+
*/
|
|
512
|
+
this.frontierServiceCreateMetaSchema = (body, params = {}) => this.request(__spreadValues({
|
|
513
|
+
path: `/v1beta1/meta/schemas`,
|
|
514
|
+
method: "POST",
|
|
515
|
+
body,
|
|
516
|
+
secure: true,
|
|
517
|
+
format: "json"
|
|
518
|
+
}, params));
|
|
519
|
+
/**
|
|
520
|
+
* @description Get a metadata schema by ID.
|
|
521
|
+
*
|
|
522
|
+
* @tags MetaSchema
|
|
523
|
+
* @name FrontierServiceGetMetaSchema
|
|
524
|
+
* @summary Get metaschema
|
|
525
|
+
* @request GET:/v1beta1/meta/schemas/{id}
|
|
526
|
+
* @secure
|
|
527
|
+
*/
|
|
528
|
+
this.frontierServiceGetMetaSchema = (id, params = {}) => this.request(__spreadValues({
|
|
529
|
+
path: `/v1beta1/meta/schemas/${id}`,
|
|
530
|
+
method: "GET",
|
|
531
|
+
secure: true,
|
|
532
|
+
format: "json"
|
|
533
|
+
}, params));
|
|
534
|
+
/**
|
|
535
|
+
* @description Delete a metadata schema permanently. Once deleted the metaschema won't be used to validate the metadata. For example, if a metaschema(with `label` and `description` fields) is used to validate the metadata of a user, then deleting the metaschema will not validate the metadata of the user and metadata field can contain any key-value pair(and say another field called `foo` can be inserted in a user's metadata).
|
|
536
|
+
*
|
|
537
|
+
* @tags MetaSchema
|
|
538
|
+
* @name FrontierServiceDeleteMetaSchema
|
|
539
|
+
* @summary Delete metaschema
|
|
540
|
+
* @request DELETE:/v1beta1/meta/schemas/{id}
|
|
541
|
+
* @secure
|
|
542
|
+
*/
|
|
543
|
+
this.frontierServiceDeleteMetaSchema = (id, params = {}) => this.request(__spreadValues({
|
|
544
|
+
path: `/v1beta1/meta/schemas/${id}`,
|
|
545
|
+
method: "DELETE",
|
|
546
|
+
secure: true,
|
|
547
|
+
format: "json"
|
|
548
|
+
}, params));
|
|
549
|
+
/**
|
|
550
|
+
* @description Update a metadata schema. Only `schema` field of a metaschema can be updated. The metaschema `schema` must be a valid JSON schema.Please refer to https://json-schema.org/ to know more about json schema. <br/>*Example:* `{name:"user",schema:{"type":"object","properties":{"label":{"type":"object","additionalProperties":{"type":"string"}},"description":{"type":"string"}}}}`
|
|
551
|
+
*
|
|
552
|
+
* @tags MetaSchema
|
|
553
|
+
* @name FrontierServiceUpdateMetaSchema
|
|
554
|
+
* @summary Update metaschema
|
|
555
|
+
* @request PUT:/v1beta1/meta/schemas/{id}
|
|
556
|
+
* @secure
|
|
557
|
+
*/
|
|
558
|
+
this.frontierServiceUpdateMetaSchema = (id, body, params = {}) => this.request(__spreadValues({
|
|
559
|
+
path: `/v1beta1/meta/schemas/${id}`,
|
|
560
|
+
method: "PUT",
|
|
561
|
+
body,
|
|
562
|
+
secure: true,
|
|
563
|
+
format: "json"
|
|
564
|
+
}, params));
|
|
565
|
+
/**
|
|
566
|
+
* @description Returns the list of all namespaces in a Frontier instance
|
|
567
|
+
*
|
|
568
|
+
* @tags Namespace
|
|
569
|
+
* @name FrontierServiceListNamespaces
|
|
570
|
+
* @summary Get all namespaces
|
|
571
|
+
* @request GET:/v1beta1/namespaces
|
|
572
|
+
* @secure
|
|
573
|
+
*/
|
|
574
|
+
this.frontierServiceListNamespaces = (params = {}) => this.request(__spreadValues({
|
|
575
|
+
path: `/v1beta1/namespaces`,
|
|
576
|
+
method: "GET",
|
|
577
|
+
secure: true,
|
|
578
|
+
format: "json"
|
|
579
|
+
}, params));
|
|
580
|
+
/**
|
|
581
|
+
* @description Returns a namespace by ID
|
|
582
|
+
*
|
|
583
|
+
* @tags Namespace
|
|
584
|
+
* @name FrontierServiceGetNamespace
|
|
585
|
+
* @summary Get namespace
|
|
586
|
+
* @request GET:/v1beta1/namespaces/{id}
|
|
587
|
+
* @secure
|
|
588
|
+
*/
|
|
589
|
+
this.frontierServiceGetNamespace = (id, params = {}) => this.request(__spreadValues({
|
|
590
|
+
path: `/v1beta1/namespaces/${id}`,
|
|
591
|
+
method: "GET",
|
|
592
|
+
secure: true,
|
|
593
|
+
format: "json"
|
|
594
|
+
}, params));
|
|
595
|
+
/**
|
|
596
|
+
* @description Returns a list of audit logs of an organization in Frontier.
|
|
597
|
+
*
|
|
598
|
+
* @tags AuditLog
|
|
599
|
+
* @name FrontierServiceListOrganizationAuditLogs
|
|
600
|
+
* @summary List audit logs
|
|
601
|
+
* @request GET:/v1beta1/organization/{orgId}/auditlogs
|
|
602
|
+
* @secure
|
|
603
|
+
*/
|
|
604
|
+
this.frontierServiceListOrganizationAuditLogs = (orgId, query, params = {}) => this.request(__spreadValues({
|
|
605
|
+
path: `/v1beta1/organization/${orgId}/auditlogs`,
|
|
606
|
+
method: "GET",
|
|
607
|
+
query,
|
|
608
|
+
secure: true,
|
|
609
|
+
format: "json"
|
|
610
|
+
}, params));
|
|
611
|
+
/**
|
|
612
|
+
* @description Create new audit logs in a batch.
|
|
613
|
+
*
|
|
614
|
+
* @tags AuditLog
|
|
615
|
+
* @name FrontierServiceCreateOrganizationAuditLogs
|
|
616
|
+
* @summary Create audit log
|
|
617
|
+
* @request POST:/v1beta1/organization/{orgId}/auditlogs
|
|
618
|
+
* @secure
|
|
619
|
+
*/
|
|
620
|
+
this.frontierServiceCreateOrganizationAuditLogs = (orgId, body, params = {}) => this.request(__spreadValues({
|
|
621
|
+
path: `/v1beta1/organization/${orgId}/auditlogs`,
|
|
622
|
+
method: "POST",
|
|
623
|
+
body,
|
|
624
|
+
secure: true,
|
|
625
|
+
type: "application/json" /* Json */,
|
|
626
|
+
format: "json"
|
|
627
|
+
}, params));
|
|
628
|
+
/**
|
|
629
|
+
* @description Get an audit log by ID.
|
|
630
|
+
*
|
|
631
|
+
* @tags AuditLog
|
|
632
|
+
* @name FrontierServiceGetOrganizationAuditLog
|
|
633
|
+
* @summary Get audit log
|
|
634
|
+
* @request GET:/v1beta1/organization/{orgId}/auditlogs/{id}
|
|
635
|
+
* @secure
|
|
636
|
+
*/
|
|
637
|
+
this.frontierServiceGetOrganizationAuditLog = (orgId, id, params = {}) => this.request(__spreadValues({
|
|
638
|
+
path: `/v1beta1/organization/${orgId}/auditlogs/${id}`,
|
|
639
|
+
method: "GET",
|
|
640
|
+
secure: true,
|
|
641
|
+
format: "json"
|
|
642
|
+
}, params));
|
|
643
|
+
/**
|
|
644
|
+
* @description Returns a list of organizations. It can be filtered by userID or organization state.
|
|
645
|
+
*
|
|
646
|
+
* @tags Organization
|
|
647
|
+
* @name FrontierServiceListOrganizations
|
|
648
|
+
* @summary List organizations
|
|
649
|
+
* @request GET:/v1beta1/organizations
|
|
650
|
+
* @secure
|
|
651
|
+
*/
|
|
652
|
+
this.frontierServiceListOrganizations = (query, params = {}) => this.request(__spreadValues({
|
|
653
|
+
path: `/v1beta1/organizations`,
|
|
654
|
+
method: "GET",
|
|
655
|
+
query,
|
|
656
|
+
secure: true,
|
|
657
|
+
format: "json"
|
|
658
|
+
}, params));
|
|
659
|
+
/**
|
|
660
|
+
* No description
|
|
661
|
+
*
|
|
662
|
+
* @tags Organization
|
|
663
|
+
* @name FrontierServiceCreateOrganization
|
|
664
|
+
* @summary Create organization
|
|
665
|
+
* @request POST:/v1beta1/organizations
|
|
666
|
+
* @secure
|
|
667
|
+
*/
|
|
668
|
+
this.frontierServiceCreateOrganization = (body, params = {}) => this.request(__spreadValues({
|
|
669
|
+
path: `/v1beta1/organizations`,
|
|
670
|
+
method: "POST",
|
|
671
|
+
body,
|
|
672
|
+
secure: true,
|
|
673
|
+
format: "json"
|
|
674
|
+
}, params));
|
|
675
|
+
/**
|
|
676
|
+
* @description Get organization by ID or name
|
|
677
|
+
*
|
|
678
|
+
* @tags Organization
|
|
679
|
+
* @name FrontierServiceGetOrganization
|
|
680
|
+
* @summary Get organization
|
|
681
|
+
* @request GET:/v1beta1/organizations/{id}
|
|
682
|
+
* @secure
|
|
683
|
+
*/
|
|
684
|
+
this.frontierServiceGetOrganization = (id, params = {}) => this.request(__spreadValues({
|
|
685
|
+
path: `/v1beta1/organizations/${id}`,
|
|
686
|
+
method: "GET",
|
|
687
|
+
secure: true,
|
|
688
|
+
format: "json"
|
|
689
|
+
}, params));
|
|
690
|
+
/**
|
|
691
|
+
* @description Delete an organization and all of its relations permanently. The organization users will not be deleted from Frontier.
|
|
692
|
+
*
|
|
693
|
+
* @tags Organization
|
|
694
|
+
* @name FrontierServiceDeleteOrganization
|
|
695
|
+
* @summary Delete organization
|
|
696
|
+
* @request DELETE:/v1beta1/organizations/{id}
|
|
697
|
+
* @secure
|
|
698
|
+
*/
|
|
699
|
+
this.frontierServiceDeleteOrganization = (id, params = {}) => this.request(__spreadValues({
|
|
700
|
+
path: `/v1beta1/organizations/${id}`,
|
|
701
|
+
method: "DELETE",
|
|
702
|
+
secure: true,
|
|
703
|
+
format: "json"
|
|
704
|
+
}, params));
|
|
705
|
+
/**
|
|
706
|
+
* @description Update organization by ID
|
|
707
|
+
*
|
|
708
|
+
* @tags Organization
|
|
709
|
+
* @name FrontierServiceUpdateOrganization
|
|
710
|
+
* @summary Update organization
|
|
711
|
+
* @request PUT:/v1beta1/organizations/{id}
|
|
712
|
+
* @secure
|
|
713
|
+
*/
|
|
714
|
+
this.frontierServiceUpdateOrganization = (id, body, params = {}) => this.request(__spreadValues({
|
|
715
|
+
path: `/v1beta1/organizations/${id}`,
|
|
716
|
+
method: "PUT",
|
|
717
|
+
body,
|
|
718
|
+
secure: true,
|
|
719
|
+
format: "json"
|
|
720
|
+
}, params));
|
|
721
|
+
/**
|
|
722
|
+
* @description Returns a list admins of an organization
|
|
723
|
+
*
|
|
724
|
+
* @tags Organization
|
|
725
|
+
* @name FrontierServiceListOrganizationAdmins
|
|
726
|
+
* @summary List organization admins
|
|
727
|
+
* @request GET:/v1beta1/organizations/{id}/admins
|
|
728
|
+
* @secure
|
|
729
|
+
*/
|
|
730
|
+
this.frontierServiceListOrganizationAdmins = (id, params = {}) => this.request(__spreadValues({
|
|
731
|
+
path: `/v1beta1/organizations/${id}/admins`,
|
|
732
|
+
method: "GET",
|
|
733
|
+
secure: true,
|
|
734
|
+
format: "json"
|
|
735
|
+
}, params));
|
|
736
|
+
/**
|
|
737
|
+
* @description Sets the state of the organization as disabled. The existing users in the org will not be able to access any organization resources.
|
|
738
|
+
*
|
|
739
|
+
* @tags Organization
|
|
740
|
+
* @name FrontierServiceDisableOrganization
|
|
741
|
+
* @summary Disable organization
|
|
742
|
+
* @request POST:/v1beta1/organizations/{id}/disable
|
|
743
|
+
* @secure
|
|
744
|
+
*/
|
|
745
|
+
this.frontierServiceDisableOrganization = (id, body, params = {}) => this.request(__spreadValues({
|
|
746
|
+
path: `/v1beta1/organizations/${id}/disable`,
|
|
747
|
+
method: "POST",
|
|
748
|
+
body,
|
|
749
|
+
secure: true,
|
|
750
|
+
format: "json"
|
|
751
|
+
}, params));
|
|
752
|
+
/**
|
|
753
|
+
* @description Sets the state of the organization as enabled. The existing users in the org will be able to access any organization resources.
|
|
754
|
+
*
|
|
755
|
+
* @tags Organization
|
|
756
|
+
* @name FrontierServiceEnableOrganization
|
|
757
|
+
* @summary Enable organization
|
|
758
|
+
* @request POST:/v1beta1/organizations/{id}/enable
|
|
759
|
+
* @secure
|
|
760
|
+
*/
|
|
761
|
+
this.frontierServiceEnableOrganization = (id, body, params = {}) => this.request(__spreadValues({
|
|
762
|
+
path: `/v1beta1/organizations/${id}/enable`,
|
|
763
|
+
method: "POST",
|
|
764
|
+
body,
|
|
765
|
+
secure: true,
|
|
766
|
+
format: "json"
|
|
767
|
+
}, params));
|
|
768
|
+
/**
|
|
769
|
+
* @description Get all projects that belong to an organization
|
|
770
|
+
*
|
|
771
|
+
* @tags Organization
|
|
772
|
+
* @name FrontierServiceListOrganizationProjects
|
|
773
|
+
* @summary Get organization projects
|
|
774
|
+
* @request GET:/v1beta1/organizations/{id}/projects
|
|
775
|
+
* @secure
|
|
776
|
+
*/
|
|
777
|
+
this.frontierServiceListOrganizationProjects = (id, query, params = {}) => this.request(__spreadValues({
|
|
778
|
+
path: `/v1beta1/organizations/${id}/projects`,
|
|
779
|
+
method: "GET",
|
|
780
|
+
query,
|
|
781
|
+
secure: true,
|
|
782
|
+
format: "json"
|
|
783
|
+
}, params));
|
|
784
|
+
/**
|
|
785
|
+
* No description
|
|
786
|
+
*
|
|
787
|
+
* @tags Organization
|
|
788
|
+
* @name FrontierServiceListOrganizationServiceUsers
|
|
789
|
+
* @summary List organization service users
|
|
790
|
+
* @request GET:/v1beta1/organizations/{id}/serviceusers
|
|
791
|
+
* @secure
|
|
792
|
+
*/
|
|
793
|
+
this.frontierServiceListOrganizationServiceUsers = (id, params = {}) => this.request(__spreadValues({
|
|
794
|
+
path: `/v1beta1/organizations/${id}/serviceusers`,
|
|
795
|
+
method: "GET",
|
|
796
|
+
secure: true,
|
|
797
|
+
format: "json"
|
|
798
|
+
}, params));
|
|
799
|
+
/**
|
|
800
|
+
* No description
|
|
801
|
+
*
|
|
802
|
+
* @tags Organization
|
|
803
|
+
* @name FrontierServiceListOrganizationUsers
|
|
804
|
+
* @summary List organization users
|
|
805
|
+
* @request GET:/v1beta1/organizations/{id}/users
|
|
806
|
+
* @secure
|
|
807
|
+
*/
|
|
808
|
+
this.frontierServiceListOrganizationUsers = (id, query, params = {}) => this.request(__spreadValues({
|
|
809
|
+
path: `/v1beta1/organizations/${id}/users`,
|
|
810
|
+
method: "GET",
|
|
811
|
+
query,
|
|
812
|
+
secure: true,
|
|
813
|
+
format: "json"
|
|
814
|
+
}, params));
|
|
815
|
+
/**
|
|
816
|
+
* @description Add a user to an organization. A user must exists in Frontier before adding it to an org. This request will fail if the user doesn't exists
|
|
817
|
+
*
|
|
818
|
+
* @tags Organization
|
|
819
|
+
* @name FrontierServiceAddOrganizationUsers
|
|
820
|
+
* @summary Add organization user
|
|
821
|
+
* @request POST:/v1beta1/organizations/{id}/users
|
|
822
|
+
* @secure
|
|
823
|
+
*/
|
|
824
|
+
this.frontierServiceAddOrganizationUsers = (id, body, params = {}) => this.request(__spreadValues({
|
|
825
|
+
path: `/v1beta1/organizations/${id}/users`,
|
|
826
|
+
method: "POST",
|
|
827
|
+
body,
|
|
828
|
+
secure: true,
|
|
829
|
+
type: "application/json" /* Json */,
|
|
830
|
+
format: "json"
|
|
831
|
+
}, params));
|
|
832
|
+
/**
|
|
833
|
+
* @description Remove a user from an organization
|
|
834
|
+
*
|
|
835
|
+
* @tags Organization
|
|
836
|
+
* @name FrontierServiceRemoveOrganizationUser
|
|
837
|
+
* @summary Remove organization user
|
|
838
|
+
* @request DELETE:/v1beta1/organizations/{id}/users/{userId}
|
|
839
|
+
* @secure
|
|
840
|
+
*/
|
|
841
|
+
this.frontierServiceRemoveOrganizationUser = (id, userId, params = {}) => this.request(__spreadValues({
|
|
842
|
+
path: `/v1beta1/organizations/${id}/users/${userId}`,
|
|
843
|
+
method: "DELETE",
|
|
844
|
+
secure: true,
|
|
845
|
+
format: "json"
|
|
846
|
+
}, params));
|
|
847
|
+
/**
|
|
848
|
+
* @description Get all groups that belong to an organization. The results can be filtered by state which can be either be enabled or disabled.
|
|
849
|
+
*
|
|
850
|
+
* @tags Group
|
|
851
|
+
* @name FrontierServiceListOrganizationGroups
|
|
852
|
+
* @summary List organization groups
|
|
853
|
+
* @request GET:/v1beta1/organizations/{orgId}/groups
|
|
854
|
+
* @secure
|
|
855
|
+
*/
|
|
856
|
+
this.frontierServiceListOrganizationGroups = (orgId, query, params = {}) => this.request(__spreadValues({
|
|
857
|
+
path: `/v1beta1/organizations/${orgId}/groups`,
|
|
858
|
+
method: "GET",
|
|
859
|
+
query,
|
|
860
|
+
secure: true,
|
|
861
|
+
format: "json"
|
|
862
|
+
}, params));
|
|
863
|
+
/**
|
|
864
|
+
* @description Create a new group in an organization which serves as a container for users. The group can be assigned roles and permissions and can be used to manage access to resources. Also a group can also be assigned to other groups.
|
|
865
|
+
*
|
|
866
|
+
* @tags Group
|
|
867
|
+
* @name FrontierServiceCreateGroup
|
|
868
|
+
* @summary Create group
|
|
869
|
+
* @request POST:/v1beta1/organizations/{orgId}/groups
|
|
870
|
+
* @secure
|
|
871
|
+
*/
|
|
872
|
+
this.frontierServiceCreateGroup = (orgId, body, params = {}) => this.request(__spreadValues({
|
|
873
|
+
path: `/v1beta1/organizations/${orgId}/groups`,
|
|
874
|
+
method: "POST",
|
|
875
|
+
body,
|
|
876
|
+
secure: true,
|
|
877
|
+
format: "json"
|
|
878
|
+
}, params));
|
|
879
|
+
/**
|
|
880
|
+
* No description
|
|
881
|
+
*
|
|
882
|
+
* @tags Group
|
|
883
|
+
* @name FrontierServiceGetGroup
|
|
884
|
+
* @summary Get group
|
|
885
|
+
* @request GET:/v1beta1/organizations/{orgId}/groups/{id}
|
|
886
|
+
* @secure
|
|
887
|
+
*/
|
|
888
|
+
this.frontierServiceGetGroup = (orgId, id, params = {}) => this.request(__spreadValues({
|
|
889
|
+
path: `/v1beta1/organizations/${orgId}/groups/${id}`,
|
|
890
|
+
method: "GET",
|
|
891
|
+
secure: true,
|
|
892
|
+
format: "json"
|
|
893
|
+
}, params));
|
|
894
|
+
/**
|
|
895
|
+
* @description Delete an organization group permanently and all of its relations
|
|
896
|
+
*
|
|
897
|
+
* @tags Group
|
|
898
|
+
* @name FrontierServiceDeleteGroup
|
|
899
|
+
* @summary Delete group
|
|
900
|
+
* @request DELETE:/v1beta1/organizations/{orgId}/groups/{id}
|
|
901
|
+
* @secure
|
|
902
|
+
*/
|
|
903
|
+
this.frontierServiceDeleteGroup = (orgId, id, params = {}) => this.request(__spreadValues({
|
|
904
|
+
path: `/v1beta1/organizations/${orgId}/groups/${id}`,
|
|
905
|
+
method: "DELETE",
|
|
906
|
+
secure: true,
|
|
907
|
+
format: "json"
|
|
908
|
+
}, params));
|
|
909
|
+
/**
|
|
910
|
+
* No description
|
|
911
|
+
*
|
|
912
|
+
* @tags Group
|
|
913
|
+
* @name FrontierServiceUpdateGroup
|
|
914
|
+
* @summary Update group
|
|
915
|
+
* @request PUT:/v1beta1/organizations/{orgId}/groups/{id}
|
|
916
|
+
* @secure
|
|
917
|
+
*/
|
|
918
|
+
this.frontierServiceUpdateGroup = (orgId, id, body, params = {}) => this.request(__spreadValues({
|
|
919
|
+
path: `/v1beta1/organizations/${orgId}/groups/${id}`,
|
|
920
|
+
method: "PUT",
|
|
921
|
+
body,
|
|
922
|
+
secure: true,
|
|
923
|
+
format: "json"
|
|
924
|
+
}, params));
|
|
925
|
+
/**
|
|
926
|
+
* @description Sets the state of the group as disabled. The group will not be available for access control and the existing users in the group will not be able to access any resources that are assigned to the group. No other users can be added to the group while it is disabled.
|
|
927
|
+
*
|
|
928
|
+
* @tags Group
|
|
929
|
+
* @name FrontierServiceDisableGroup
|
|
930
|
+
* @summary Disable group
|
|
931
|
+
* @request POST:/v1beta1/organizations/{orgId}/groups/{id}/disable
|
|
932
|
+
* @secure
|
|
933
|
+
*/
|
|
934
|
+
this.frontierServiceDisableGroup = (orgId, id, body, params = {}) => this.request(__spreadValues({
|
|
935
|
+
path: `/v1beta1/organizations/${orgId}/groups/${id}/disable`,
|
|
936
|
+
method: "POST",
|
|
937
|
+
body,
|
|
938
|
+
secure: true,
|
|
939
|
+
format: "json"
|
|
940
|
+
}, params));
|
|
941
|
+
/**
|
|
942
|
+
* @description Sets the state of the group as enabled. The `enabled` flag is used to determine if the group can be used for access control.
|
|
943
|
+
*
|
|
944
|
+
* @tags Group
|
|
945
|
+
* @name FrontierServiceEnableGroup
|
|
946
|
+
* @summary Enable group
|
|
947
|
+
* @request POST:/v1beta1/organizations/{orgId}/groups/{id}/enable
|
|
948
|
+
* @secure
|
|
949
|
+
*/
|
|
950
|
+
this.frontierServiceEnableGroup = (orgId, id, body, params = {}) => this.request(__spreadValues({
|
|
951
|
+
path: `/v1beta1/organizations/${orgId}/groups/${id}/enable`,
|
|
952
|
+
method: "POST",
|
|
953
|
+
body,
|
|
954
|
+
secure: true,
|
|
955
|
+
format: "json"
|
|
956
|
+
}, params));
|
|
957
|
+
/**
|
|
958
|
+
* @description Returns a list of users that belong to a group.
|
|
959
|
+
*
|
|
960
|
+
* @tags Group
|
|
961
|
+
* @name FrontierServiceListGroupUsers
|
|
962
|
+
* @summary List group users
|
|
963
|
+
* @request GET:/v1beta1/organizations/{orgId}/groups/{id}/users
|
|
964
|
+
* @secure
|
|
965
|
+
*/
|
|
966
|
+
this.frontierServiceListGroupUsers = (orgId, id, params = {}) => this.request(__spreadValues({
|
|
967
|
+
path: `/v1beta1/organizations/${orgId}/groups/${id}/users`,
|
|
968
|
+
method: "GET",
|
|
969
|
+
secure: true,
|
|
970
|
+
format: "json"
|
|
971
|
+
}, params));
|
|
972
|
+
/**
|
|
973
|
+
* @description Adds a principle(user and service-users) to a group, existing users in the group will be ignored. A group can't have nested groups as members.
|
|
974
|
+
*
|
|
975
|
+
* @tags Group
|
|
976
|
+
* @name FrontierServiceAddGroupUsers
|
|
977
|
+
* @summary Add group user
|
|
978
|
+
* @request POST:/v1beta1/organizations/{orgId}/groups/{id}/users
|
|
979
|
+
* @secure
|
|
980
|
+
*/
|
|
981
|
+
this.frontierServiceAddGroupUsers = (orgId, id, body, params = {}) => this.request(__spreadValues({
|
|
982
|
+
path: `/v1beta1/organizations/${orgId}/groups/${id}/users`,
|
|
983
|
+
method: "POST",
|
|
984
|
+
body,
|
|
985
|
+
secure: true,
|
|
986
|
+
type: "application/json" /* Json */,
|
|
987
|
+
format: "json"
|
|
988
|
+
}, params));
|
|
989
|
+
/**
|
|
990
|
+
* @description Removes a principle(user and service-users) from a group. If the user is not in the group, the request will succeed but no changes will be made.
|
|
991
|
+
*
|
|
992
|
+
* @tags Group
|
|
993
|
+
* @name FrontierServiceRemoveGroupUser
|
|
994
|
+
* @summary Remove group user
|
|
995
|
+
* @request DELETE:/v1beta1/organizations/{orgId}/groups/{id}/users/{userId}
|
|
996
|
+
* @secure
|
|
997
|
+
*/
|
|
998
|
+
this.frontierServiceRemoveGroupUser = (orgId, id, userId, params = {}) => this.request(__spreadValues({
|
|
999
|
+
path: `/v1beta1/organizations/${orgId}/groups/${id}/users/${userId}`,
|
|
1000
|
+
method: "DELETE",
|
|
1001
|
+
secure: true,
|
|
1002
|
+
format: "json"
|
|
1003
|
+
}, params));
|
|
1004
|
+
/**
|
|
1005
|
+
* @description Returns all pending invitations queued for an organization
|
|
1006
|
+
*
|
|
1007
|
+
* @tags Organization
|
|
1008
|
+
* @name FrontierServiceListOrganizationInvitations
|
|
1009
|
+
* @summary List pending invitations
|
|
1010
|
+
* @request GET:/v1beta1/organizations/{orgId}/invitations
|
|
1011
|
+
* @secure
|
|
1012
|
+
*/
|
|
1013
|
+
this.frontierServiceListOrganizationInvitations = (orgId, query, params = {}) => this.request(__spreadValues({
|
|
1014
|
+
path: `/v1beta1/organizations/${orgId}/invitations`,
|
|
1015
|
+
method: "GET",
|
|
1016
|
+
query,
|
|
1017
|
+
secure: true,
|
|
1018
|
+
format: "json"
|
|
1019
|
+
}, params));
|
|
1020
|
+
/**
|
|
1021
|
+
* @description Invite users to an organization, if the user doesn't exists, it will be created and notified. Invitations expire in 7 days
|
|
1022
|
+
*
|
|
1023
|
+
* @tags Organization
|
|
1024
|
+
* @name FrontierServiceCreateOrganizationInvitation
|
|
1025
|
+
* @summary Invite user
|
|
1026
|
+
* @request POST:/v1beta1/organizations/{orgId}/invitations
|
|
1027
|
+
* @secure
|
|
1028
|
+
*/
|
|
1029
|
+
this.frontierServiceCreateOrganizationInvitation = (orgId, body, params = {}) => this.request(__spreadValues({
|
|
1030
|
+
path: `/v1beta1/organizations/${orgId}/invitations`,
|
|
1031
|
+
method: "POST",
|
|
1032
|
+
body,
|
|
1033
|
+
secure: true,
|
|
1034
|
+
type: "application/json" /* Json */,
|
|
1035
|
+
format: "json"
|
|
1036
|
+
}, params));
|
|
1037
|
+
/**
|
|
1038
|
+
* @description Returns a pending invitation queued for an organization
|
|
1039
|
+
*
|
|
1040
|
+
* @tags Organization
|
|
1041
|
+
* @name FrontierServiceGetOrganizationInvitation
|
|
1042
|
+
* @summary Get pending invitation
|
|
1043
|
+
* @request GET:/v1beta1/organizations/{orgId}/invitations/{id}
|
|
1044
|
+
* @secure
|
|
1045
|
+
*/
|
|
1046
|
+
this.frontierServiceGetOrganizationInvitation = (orgId, id, params = {}) => this.request(__spreadValues({
|
|
1047
|
+
path: `/v1beta1/organizations/${orgId}/invitations/${id}`,
|
|
1048
|
+
method: "GET",
|
|
1049
|
+
secure: true,
|
|
1050
|
+
format: "json"
|
|
1051
|
+
}, params));
|
|
1052
|
+
/**
|
|
1053
|
+
* @description Delete a pending invitation queued for an organization
|
|
1054
|
+
*
|
|
1055
|
+
* @tags Organization
|
|
1056
|
+
* @name FrontierServiceDeleteOrganizationInvitation
|
|
1057
|
+
* @summary Delete pending invitation
|
|
1058
|
+
* @request DELETE:/v1beta1/organizations/{orgId}/invitations/{id}
|
|
1059
|
+
* @secure
|
|
1060
|
+
*/
|
|
1061
|
+
this.frontierServiceDeleteOrganizationInvitation = (orgId, id, params = {}) => this.request(__spreadValues({
|
|
1062
|
+
path: `/v1beta1/organizations/${orgId}/invitations/${id}`,
|
|
1063
|
+
method: "DELETE",
|
|
1064
|
+
secure: true,
|
|
1065
|
+
format: "json"
|
|
1066
|
+
}, params));
|
|
1067
|
+
/**
|
|
1068
|
+
* @description Accept pending invitation queued for an organization. The user will be added to the organization and groups defined in the invitation
|
|
1069
|
+
*
|
|
1070
|
+
* @tags Organization
|
|
1071
|
+
* @name FrontierServiceAcceptOrganizationInvitation
|
|
1072
|
+
* @summary Accept pending invitation
|
|
1073
|
+
* @request POST:/v1beta1/organizations/{orgId}/invitations/{id}/accept
|
|
1074
|
+
* @secure
|
|
1075
|
+
*/
|
|
1076
|
+
this.frontierServiceAcceptOrganizationInvitation = (orgId, id, params = {}) => this.request(__spreadValues({
|
|
1077
|
+
path: `/v1beta1/organizations/${orgId}/invitations/${id}/accept`,
|
|
1078
|
+
method: "POST",
|
|
1079
|
+
secure: true,
|
|
1080
|
+
format: "json"
|
|
1081
|
+
}, params));
|
|
1082
|
+
/**
|
|
1083
|
+
* @description Returns a list of custom roles created under an organization with their associated permissions
|
|
1084
|
+
*
|
|
1085
|
+
* @tags Role
|
|
1086
|
+
* @name FrontierServiceListOrganizationRoles
|
|
1087
|
+
* @summary List organization roles
|
|
1088
|
+
* @request GET:/v1beta1/organizations/{orgId}/roles
|
|
1089
|
+
* @secure
|
|
1090
|
+
*/
|
|
1091
|
+
this.frontierServiceListOrganizationRoles = (orgId, query, params = {}) => this.request(__spreadValues({
|
|
1092
|
+
path: `/v1beta1/organizations/${orgId}/roles`,
|
|
1093
|
+
method: "GET",
|
|
1094
|
+
query,
|
|
1095
|
+
secure: true,
|
|
1096
|
+
format: "json"
|
|
1097
|
+
}, params));
|
|
1098
|
+
/**
|
|
1099
|
+
* @description Create a custom role under an organization. This custom role will only be available for assignment to the principles within the organization.
|
|
1100
|
+
*
|
|
1101
|
+
* @tags Role
|
|
1102
|
+
* @name FrontierServiceCreateOrganizationRole
|
|
1103
|
+
* @summary Create organization role
|
|
1104
|
+
* @request POST:/v1beta1/organizations/{orgId}/roles
|
|
1105
|
+
* @secure
|
|
1106
|
+
*/
|
|
1107
|
+
this.frontierServiceCreateOrganizationRole = (orgId, body, params = {}) => this.request(__spreadValues({
|
|
1108
|
+
path: `/v1beta1/organizations/${orgId}/roles`,
|
|
1109
|
+
method: "POST",
|
|
1110
|
+
body,
|
|
1111
|
+
secure: true,
|
|
1112
|
+
format: "json"
|
|
1113
|
+
}, params));
|
|
1114
|
+
/**
|
|
1115
|
+
* @description Returns a custom role under an organization along with its associated permissions
|
|
1116
|
+
*
|
|
1117
|
+
* @tags Role
|
|
1118
|
+
* @name FrontierServiceGetOrganizationRole
|
|
1119
|
+
* @summary Get organization role
|
|
1120
|
+
* @request GET:/v1beta1/organizations/{orgId}/roles/{id}
|
|
1121
|
+
* @secure
|
|
1122
|
+
*/
|
|
1123
|
+
this.frontierServiceGetOrganizationRole = (orgId, id, params = {}) => this.request(__spreadValues({
|
|
1124
|
+
path: `/v1beta1/organizations/${orgId}/roles/${id}`,
|
|
1125
|
+
method: "GET",
|
|
1126
|
+
secure: true,
|
|
1127
|
+
format: "json"
|
|
1128
|
+
}, params));
|
|
1129
|
+
/**
|
|
1130
|
+
* @description Delete a custom role and all of its relations under an organization permanently.
|
|
1131
|
+
*
|
|
1132
|
+
* @tags Role
|
|
1133
|
+
* @name FrontierServiceDeleteOrganizationRole
|
|
1134
|
+
* @summary Delete organization role
|
|
1135
|
+
* @request DELETE:/v1beta1/organizations/{orgId}/roles/{id}
|
|
1136
|
+
* @secure
|
|
1137
|
+
*/
|
|
1138
|
+
this.frontierServiceDeleteOrganizationRole = (orgId, id, params = {}) => this.request(__spreadValues({
|
|
1139
|
+
path: `/v1beta1/organizations/${orgId}/roles/${id}`,
|
|
1140
|
+
method: "DELETE",
|
|
1141
|
+
secure: true,
|
|
1142
|
+
format: "json"
|
|
1143
|
+
}, params));
|
|
1144
|
+
/**
|
|
1145
|
+
* @description Update a custom role under an organization. This custom role will only be available for assignment to the principles within the organization.
|
|
1146
|
+
*
|
|
1147
|
+
* @tags Role
|
|
1148
|
+
* @name FrontierServiceUpdateOrganizationRole
|
|
1149
|
+
* @summary Update organization role
|
|
1150
|
+
* @request PUT:/v1beta1/organizations/{orgId}/roles/{id}
|
|
1151
|
+
* @secure
|
|
1152
|
+
*/
|
|
1153
|
+
this.frontierServiceUpdateOrganizationRole = (orgId, id, body, params = {}) => this.request(__spreadValues({
|
|
1154
|
+
path: `/v1beta1/organizations/${orgId}/roles/${id}`,
|
|
1155
|
+
method: "PUT",
|
|
1156
|
+
body,
|
|
1157
|
+
secure: true,
|
|
1158
|
+
format: "json"
|
|
1159
|
+
}, params));
|
|
1160
|
+
/**
|
|
1161
|
+
* No description
|
|
1162
|
+
*
|
|
1163
|
+
* @tags Permission
|
|
1164
|
+
* @name FrontierServiceListPermissions
|
|
1165
|
+
* @summary Get all permissions
|
|
1166
|
+
* @request GET:/v1beta1/permissions
|
|
1167
|
+
* @secure
|
|
1168
|
+
*/
|
|
1169
|
+
this.frontierServiceListPermissions = (params = {}) => this.request(__spreadValues({
|
|
1170
|
+
path: `/v1beta1/permissions`,
|
|
1171
|
+
method: "GET",
|
|
1172
|
+
secure: true,
|
|
1173
|
+
format: "json"
|
|
1174
|
+
}, params));
|
|
1175
|
+
/**
|
|
1176
|
+
* @description Creates a permission. It can be used to grant permissions to all the resources in a Frontier instance.
|
|
1177
|
+
*
|
|
1178
|
+
* @tags Permission
|
|
1179
|
+
* @name AdminServiceCreatePermission
|
|
1180
|
+
* @summary Create platform permission
|
|
1181
|
+
* @request POST:/v1beta1/permissions
|
|
1182
|
+
* @secure
|
|
1183
|
+
*/
|
|
1184
|
+
this.adminServiceCreatePermission = (body, params = {}) => this.request(__spreadValues({
|
|
1185
|
+
path: `/v1beta1/permissions`,
|
|
1186
|
+
method: "POST",
|
|
1187
|
+
body,
|
|
1188
|
+
secure: true,
|
|
1189
|
+
type: "application/json" /* Json */,
|
|
1190
|
+
format: "json"
|
|
1191
|
+
}, params));
|
|
1192
|
+
/**
|
|
1193
|
+
* @description Returns a permission by ID
|
|
1194
|
+
*
|
|
1195
|
+
* @tags Permission
|
|
1196
|
+
* @name FrontierServiceGetPermission
|
|
1197
|
+
* @summary Get permission
|
|
1198
|
+
* @request GET:/v1beta1/permissions/{id}
|
|
1199
|
+
* @secure
|
|
1200
|
+
*/
|
|
1201
|
+
this.frontierServiceGetPermission = (id, params = {}) => this.request(__spreadValues({
|
|
1202
|
+
path: `/v1beta1/permissions/${id}`,
|
|
1203
|
+
method: "GET",
|
|
1204
|
+
secure: true,
|
|
1205
|
+
format: "json"
|
|
1206
|
+
}, params));
|
|
1207
|
+
/**
|
|
1208
|
+
* No description
|
|
1209
|
+
*
|
|
1210
|
+
* @tags Permission
|
|
1211
|
+
* @name AdminServiceDeletePermission
|
|
1212
|
+
* @summary Delete platform permission
|
|
1213
|
+
* @request DELETE:/v1beta1/permissions/{id}
|
|
1214
|
+
* @secure
|
|
1215
|
+
*/
|
|
1216
|
+
this.adminServiceDeletePermission = (id, params = {}) => this.request(__spreadValues({
|
|
1217
|
+
path: `/v1beta1/permissions/${id}`,
|
|
1218
|
+
method: "DELETE",
|
|
1219
|
+
secure: true,
|
|
1220
|
+
format: "json"
|
|
1221
|
+
}, params));
|
|
1222
|
+
/**
|
|
1223
|
+
* @description Updates a permission by ID. It can be used to grant permissions to all the resources in a Frontier instance.
|
|
1224
|
+
*
|
|
1225
|
+
* @tags Permission
|
|
1226
|
+
* @name AdminServiceUpdatePermission
|
|
1227
|
+
* @summary Update platform permission
|
|
1228
|
+
* @request PUT:/v1beta1/permissions/{id}
|
|
1229
|
+
* @secure
|
|
1230
|
+
*/
|
|
1231
|
+
this.adminServiceUpdatePermission = (id, body, params = {}) => this.request(__spreadValues({
|
|
1232
|
+
path: `/v1beta1/permissions/${id}`,
|
|
1233
|
+
method: "PUT",
|
|
1234
|
+
body,
|
|
1235
|
+
secure: true,
|
|
1236
|
+
type: "application/json" /* Json */,
|
|
1237
|
+
format: "json"
|
|
1238
|
+
}, params));
|
|
1239
|
+
/**
|
|
1240
|
+
* @description Lists all the policies from all the organizations in a Frontier instance. It can be filtered by organization, project, user, role and group.
|
|
1241
|
+
*
|
|
1242
|
+
* @tags Policy
|
|
1243
|
+
* @name AdminServiceListPolicies
|
|
1244
|
+
* @summary List all policies
|
|
1245
|
+
* @request GET:/v1beta1/policies
|
|
1246
|
+
* @secure
|
|
1247
|
+
*/
|
|
1248
|
+
this.adminServiceListPolicies = (query, params = {}) => this.request(__spreadValues({
|
|
1249
|
+
path: `/v1beta1/policies`,
|
|
1250
|
+
method: "GET",
|
|
1251
|
+
query,
|
|
1252
|
+
secure: true,
|
|
1253
|
+
format: "json"
|
|
1254
|
+
}, params));
|
|
1255
|
+
/**
|
|
1256
|
+
* @description Creates a policy
|
|
1257
|
+
*
|
|
1258
|
+
* @tags Policy
|
|
1259
|
+
* @name FrontierServiceCreatePolicy
|
|
1260
|
+
* @summary Create policy
|
|
1261
|
+
* @request POST:/v1beta1/policies
|
|
1262
|
+
* @secure
|
|
1263
|
+
*/
|
|
1264
|
+
this.frontierServiceCreatePolicy = (body, params = {}) => this.request(__spreadValues({
|
|
1265
|
+
path: `/v1beta1/policies`,
|
|
1266
|
+
method: "POST",
|
|
1267
|
+
body,
|
|
1268
|
+
secure: true,
|
|
1269
|
+
format: "json"
|
|
1270
|
+
}, params));
|
|
1271
|
+
/**
|
|
1272
|
+
* @description Returns a policy by ID
|
|
1273
|
+
*
|
|
1274
|
+
* @tags Policy
|
|
1275
|
+
* @name FrontierServiceGetPolicy
|
|
1276
|
+
* @summary Get policy
|
|
1277
|
+
* @request GET:/v1beta1/policies/{id}
|
|
1278
|
+
* @secure
|
|
1279
|
+
*/
|
|
1280
|
+
this.frontierServiceGetPolicy = (id, params = {}) => this.request(__spreadValues({
|
|
1281
|
+
path: `/v1beta1/policies/${id}`,
|
|
1282
|
+
method: "GET",
|
|
1283
|
+
secure: true,
|
|
1284
|
+
format: "json"
|
|
1285
|
+
}, params));
|
|
1286
|
+
/**
|
|
1287
|
+
* @description Delete a policy all of its relations permanently.
|
|
1288
|
+
*
|
|
1289
|
+
* @tags Policy
|
|
1290
|
+
* @name FrontierServiceDeletePolicy
|
|
1291
|
+
* @summary Delete Policy
|
|
1292
|
+
* @request DELETE:/v1beta1/policies/{id}
|
|
1293
|
+
* @secure
|
|
1294
|
+
*/
|
|
1295
|
+
this.frontierServiceDeletePolicy = (id, params = {}) => this.request(__spreadValues({
|
|
1296
|
+
path: `/v1beta1/policies/${id}`,
|
|
1297
|
+
method: "DELETE",
|
|
1298
|
+
secure: true,
|
|
1299
|
+
format: "json"
|
|
1300
|
+
}, params));
|
|
1301
|
+
/**
|
|
1302
|
+
* @description Updates a policy by ID
|
|
1303
|
+
*
|
|
1304
|
+
* @tags Policy
|
|
1305
|
+
* @name FrontierServiceUpdatePolicy
|
|
1306
|
+
* @summary Update policy
|
|
1307
|
+
* @request PUT:/v1beta1/policies/{id}
|
|
1308
|
+
* @secure
|
|
1309
|
+
*/
|
|
1310
|
+
this.frontierServiceUpdatePolicy = (id, body, params = {}) => this.request(__spreadValues({
|
|
1311
|
+
path: `/v1beta1/policies/${id}`,
|
|
1312
|
+
method: "PUT",
|
|
1313
|
+
body,
|
|
1314
|
+
secure: true,
|
|
1315
|
+
format: "json"
|
|
1316
|
+
}, params));
|
|
1317
|
+
/**
|
|
1318
|
+
* No description
|
|
1319
|
+
*
|
|
1320
|
+
* @tags Project
|
|
1321
|
+
* @name FrontierServiceCreateProject
|
|
1322
|
+
* @summary Create project
|
|
1323
|
+
* @request POST:/v1beta1/projects
|
|
1324
|
+
* @secure
|
|
1325
|
+
*/
|
|
1326
|
+
this.frontierServiceCreateProject = (body, params = {}) => this.request(__spreadValues({
|
|
1327
|
+
path: `/v1beta1/projects`,
|
|
1328
|
+
method: "POST",
|
|
1329
|
+
body,
|
|
1330
|
+
secure: true,
|
|
1331
|
+
format: "json"
|
|
1332
|
+
}, params));
|
|
1333
|
+
/**
|
|
1334
|
+
* @description Returns a project by ID
|
|
1335
|
+
*
|
|
1336
|
+
* @tags Project
|
|
1337
|
+
* @name FrontierServiceGetProject
|
|
1338
|
+
* @summary Get project
|
|
1339
|
+
* @request GET:/v1beta1/projects/{id}
|
|
1340
|
+
* @secure
|
|
1341
|
+
*/
|
|
1342
|
+
this.frontierServiceGetProject = (id, params = {}) => this.request(__spreadValues({
|
|
1343
|
+
path: `/v1beta1/projects/${id}`,
|
|
1344
|
+
method: "GET",
|
|
1345
|
+
secure: true,
|
|
1346
|
+
format: "json"
|
|
1347
|
+
}, params));
|
|
1348
|
+
/**
|
|
1349
|
+
* @description Delete a project all of its relations permanently.
|
|
1350
|
+
*
|
|
1351
|
+
* @tags Project
|
|
1352
|
+
* @name FrontierServiceDeleteProject
|
|
1353
|
+
* @summary Delete Project
|
|
1354
|
+
* @request DELETE:/v1beta1/projects/{id}
|
|
1355
|
+
* @secure
|
|
1356
|
+
*/
|
|
1357
|
+
this.frontierServiceDeleteProject = (id, params = {}) => this.request(__spreadValues({
|
|
1358
|
+
path: `/v1beta1/projects/${id}`,
|
|
1359
|
+
method: "DELETE",
|
|
1360
|
+
secure: true,
|
|
1361
|
+
format: "json"
|
|
1362
|
+
}, params));
|
|
1363
|
+
/**
|
|
1364
|
+
* @description Updates a project by ID
|
|
1365
|
+
*
|
|
1366
|
+
* @tags Project
|
|
1367
|
+
* @name FrontierServiceUpdateProject
|
|
1368
|
+
* @summary Update project
|
|
1369
|
+
* @request PUT:/v1beta1/projects/{id}
|
|
1370
|
+
* @secure
|
|
1371
|
+
*/
|
|
1372
|
+
this.frontierServiceUpdateProject = (id, body, params = {}) => this.request(__spreadValues({
|
|
1373
|
+
path: `/v1beta1/projects/${id}`,
|
|
1374
|
+
method: "PUT",
|
|
1375
|
+
body,
|
|
1376
|
+
secure: true,
|
|
1377
|
+
format: "json"
|
|
1378
|
+
}, params));
|
|
1379
|
+
/**
|
|
1380
|
+
* @description Returns a collection of admins of a project
|
|
1381
|
+
*
|
|
1382
|
+
* @tags Project
|
|
1383
|
+
* @name FrontierServiceListProjectAdmins
|
|
1384
|
+
* @summary List project admins
|
|
1385
|
+
* @request GET:/v1beta1/projects/{id}/admins
|
|
1386
|
+
* @secure
|
|
1387
|
+
*/
|
|
1388
|
+
this.frontierServiceListProjectAdmins = (id, params = {}) => this.request(__spreadValues({
|
|
1389
|
+
path: `/v1beta1/projects/${id}/admins`,
|
|
1390
|
+
method: "GET",
|
|
1391
|
+
secure: true,
|
|
1392
|
+
format: "json"
|
|
1393
|
+
}, params));
|
|
1394
|
+
/**
|
|
1395
|
+
* No description
|
|
1396
|
+
*
|
|
1397
|
+
* @tags Project
|
|
1398
|
+
* @name FrontierServiceDisableProject
|
|
1399
|
+
* @summary Disable project
|
|
1400
|
+
* @request POST:/v1beta1/projects/{id}/disable
|
|
1401
|
+
* @secure
|
|
1402
|
+
*/
|
|
1403
|
+
this.frontierServiceDisableProject = (id, body, params = {}) => this.request(__spreadValues({
|
|
1404
|
+
path: `/v1beta1/projects/${id}/disable`,
|
|
1405
|
+
method: "POST",
|
|
1406
|
+
body,
|
|
1407
|
+
secure: true,
|
|
1408
|
+
format: "json"
|
|
1409
|
+
}, params));
|
|
1410
|
+
/**
|
|
1411
|
+
* No description
|
|
1412
|
+
*
|
|
1413
|
+
* @tags Project
|
|
1414
|
+
* @name FrontierServiceEnableProject
|
|
1415
|
+
* @summary Enable project
|
|
1416
|
+
* @request POST:/v1beta1/projects/{id}/enable
|
|
1417
|
+
* @secure
|
|
1418
|
+
*/
|
|
1419
|
+
this.frontierServiceEnableProject = (id, body, params = {}) => this.request(__spreadValues({
|
|
1420
|
+
path: `/v1beta1/projects/${id}/enable`,
|
|
1421
|
+
method: "POST",
|
|
1422
|
+
body,
|
|
1423
|
+
secure: true,
|
|
1424
|
+
format: "json"
|
|
1425
|
+
}, params));
|
|
1426
|
+
/**
|
|
1427
|
+
* @description Returns a collection of users of a project. Filter by user permissions is supported.
|
|
1428
|
+
*
|
|
1429
|
+
* @tags Project
|
|
1430
|
+
* @name FrontierServiceListProjectUsers
|
|
1431
|
+
* @summary List project users
|
|
1432
|
+
* @request GET:/v1beta1/projects/{id}/users
|
|
1433
|
+
* @secure
|
|
1434
|
+
*/
|
|
1435
|
+
this.frontierServiceListProjectUsers = (id, query, params = {}) => this.request(__spreadValues({
|
|
1436
|
+
path: `/v1beta1/projects/${id}/users`,
|
|
1437
|
+
method: "GET",
|
|
1438
|
+
query,
|
|
1439
|
+
secure: true,
|
|
1440
|
+
format: "json"
|
|
1441
|
+
}, params));
|
|
1442
|
+
/**
|
|
1443
|
+
* No description
|
|
1444
|
+
*
|
|
1445
|
+
* @tags Resource
|
|
1446
|
+
* @name FrontierServiceListProjectResources
|
|
1447
|
+
* @summary Get all resources
|
|
1448
|
+
* @request GET:/v1beta1/projects/{projectId}/resources
|
|
1449
|
+
* @secure
|
|
1450
|
+
*/
|
|
1451
|
+
this.frontierServiceListProjectResources = (projectId, query, params = {}) => this.request(__spreadValues({
|
|
1452
|
+
path: `/v1beta1/projects/${projectId}/resources`,
|
|
1453
|
+
method: "GET",
|
|
1454
|
+
query,
|
|
1455
|
+
secure: true,
|
|
1456
|
+
format: "json"
|
|
1457
|
+
}, params));
|
|
1458
|
+
/**
|
|
1459
|
+
* @description Creates a resource in a project
|
|
1460
|
+
*
|
|
1461
|
+
* @tags Resource
|
|
1462
|
+
* @name FrontierServiceCreateProjectResource
|
|
1463
|
+
* @summary Create resource
|
|
1464
|
+
* @request POST:/v1beta1/projects/{projectId}/resources
|
|
1465
|
+
* @secure
|
|
1466
|
+
*/
|
|
1467
|
+
this.frontierServiceCreateProjectResource = (projectId, body, query, params = {}) => this.request(__spreadValues({
|
|
1468
|
+
path: `/v1beta1/projects/${projectId}/resources`,
|
|
1469
|
+
method: "POST",
|
|
1470
|
+
query,
|
|
1471
|
+
body,
|
|
1472
|
+
secure: true,
|
|
1473
|
+
format: "json"
|
|
1474
|
+
}, params));
|
|
1475
|
+
/**
|
|
1476
|
+
* @description Returns a project resource by ID
|
|
1477
|
+
*
|
|
1478
|
+
* @tags Resource
|
|
1479
|
+
* @name FrontierServiceGetProjectResource
|
|
1480
|
+
* @summary Get resource
|
|
1481
|
+
* @request GET:/v1beta1/projects/{projectId}/resources/{id}
|
|
1482
|
+
* @secure
|
|
1483
|
+
*/
|
|
1484
|
+
this.frontierServiceGetProjectResource = (projectId, id, params = {}) => this.request(__spreadValues({
|
|
1485
|
+
path: `/v1beta1/projects/${projectId}/resources/${id}`,
|
|
1486
|
+
method: "GET",
|
|
1487
|
+
secure: true,
|
|
1488
|
+
format: "json"
|
|
1489
|
+
}, params));
|
|
1490
|
+
/**
|
|
1491
|
+
* @description Deletes a resource from a project permanently
|
|
1492
|
+
*
|
|
1493
|
+
* @tags Resource
|
|
1494
|
+
* @name FrontierServiceDeleteProjectResource
|
|
1495
|
+
* @summary Delete resource
|
|
1496
|
+
* @request DELETE:/v1beta1/projects/{projectId}/resources/{id}
|
|
1497
|
+
* @secure
|
|
1498
|
+
*/
|
|
1499
|
+
this.frontierServiceDeleteProjectResource = (projectId, id, params = {}) => this.request(__spreadValues({
|
|
1500
|
+
path: `/v1beta1/projects/${projectId}/resources/${id}`,
|
|
1501
|
+
method: "DELETE",
|
|
1502
|
+
secure: true,
|
|
1503
|
+
format: "json"
|
|
1504
|
+
}, params));
|
|
1505
|
+
/**
|
|
1506
|
+
* @description Updates a resource in a project
|
|
1507
|
+
*
|
|
1508
|
+
* @tags Resource
|
|
1509
|
+
* @name FrontierServiceUpdateProjectResource
|
|
1510
|
+
* @summary Update resource
|
|
1511
|
+
* @request PUT:/v1beta1/projects/{projectId}/resources/{id}
|
|
1512
|
+
* @secure
|
|
1513
|
+
*/
|
|
1514
|
+
this.frontierServiceUpdateProjectResource = (projectId, id, body, params = {}) => this.request(__spreadValues({
|
|
1515
|
+
path: `/v1beta1/projects/${projectId}/resources/${id}`,
|
|
1516
|
+
method: "PUT",
|
|
1517
|
+
body,
|
|
1518
|
+
secure: true,
|
|
1519
|
+
format: "json"
|
|
1520
|
+
}, params));
|
|
1521
|
+
/**
|
|
1522
|
+
* No description
|
|
1523
|
+
*
|
|
1524
|
+
* @tags Relation
|
|
1525
|
+
* @name FrontierServiceCreateRelation
|
|
1526
|
+
* @summary Create relation
|
|
1527
|
+
* @request POST:/v1beta1/relations
|
|
1528
|
+
* @secure
|
|
1529
|
+
*/
|
|
1530
|
+
this.frontierServiceCreateRelation = (body, params = {}) => this.request(__spreadValues({
|
|
1531
|
+
path: `/v1beta1/relations`,
|
|
1532
|
+
method: "POST",
|
|
1533
|
+
body,
|
|
1534
|
+
secure: true,
|
|
1535
|
+
type: "application/json" /* Json */,
|
|
1536
|
+
format: "json"
|
|
1537
|
+
}, params));
|
|
1538
|
+
/**
|
|
1539
|
+
* @description Returns a relation by ID
|
|
1540
|
+
*
|
|
1541
|
+
* @tags Relation
|
|
1542
|
+
* @name FrontierServiceGetRelation
|
|
1543
|
+
* @summary Get relation
|
|
1544
|
+
* @request GET:/v1beta1/relations/{id}
|
|
1545
|
+
* @secure
|
|
1546
|
+
*/
|
|
1547
|
+
this.frontierServiceGetRelation = (id, params = {}) => this.request(__spreadValues({
|
|
1548
|
+
path: `/v1beta1/relations/${id}`,
|
|
1549
|
+
method: "GET",
|
|
1550
|
+
secure: true,
|
|
1551
|
+
format: "json"
|
|
1552
|
+
}, params));
|
|
1553
|
+
/**
|
|
1554
|
+
* @description Remove a subject having a relation from an object
|
|
1555
|
+
*
|
|
1556
|
+
* @tags Relation
|
|
1557
|
+
* @name FrontierServiceDeleteRelation
|
|
1558
|
+
* @summary Delete relation
|
|
1559
|
+
* @request DELETE:/v1beta1/relations/{relation}/object/{object}/subject/{subject}
|
|
1560
|
+
* @secure
|
|
1561
|
+
*/
|
|
1562
|
+
this.frontierServiceDeleteRelation = (relation, object2, subject, params = {}) => this.request(__spreadValues({
|
|
1563
|
+
path: `/v1beta1/relations/${relation}/object/${object2}/subject/${subject}`,
|
|
1564
|
+
method: "DELETE",
|
|
1565
|
+
secure: true,
|
|
1566
|
+
format: "json"
|
|
1567
|
+
}, params));
|
|
1568
|
+
/**
|
|
1569
|
+
* @description Returns a list of platform wide roles available in enitre Frontier instance along with their associated permissions
|
|
1570
|
+
*
|
|
1571
|
+
* @tags Role
|
|
1572
|
+
* @name FrontierServiceListRoles
|
|
1573
|
+
* @summary List platform roles
|
|
1574
|
+
* @request GET:/v1beta1/roles
|
|
1575
|
+
* @secure
|
|
1576
|
+
*/
|
|
1577
|
+
this.frontierServiceListRoles = (query, params = {}) => this.request(__spreadValues({
|
|
1578
|
+
path: `/v1beta1/roles`,
|
|
1579
|
+
method: "GET",
|
|
1580
|
+
query,
|
|
1581
|
+
secure: true,
|
|
1582
|
+
format: "json"
|
|
1583
|
+
}, params));
|
|
1584
|
+
/**
|
|
1585
|
+
* @description Creates a platform wide role. It can be used to grant permissions to all the resources in a Frontier instance.
|
|
1586
|
+
*
|
|
1587
|
+
* @tags Role
|
|
1588
|
+
* @name AdminServiceCreateRole
|
|
1589
|
+
* @summary Create platform role
|
|
1590
|
+
* @request POST:/v1beta1/roles
|
|
1591
|
+
* @secure
|
|
1592
|
+
*/
|
|
1593
|
+
this.adminServiceCreateRole = (body, params = {}) => this.request(__spreadValues({
|
|
1594
|
+
path: `/v1beta1/roles`,
|
|
1595
|
+
method: "POST",
|
|
1596
|
+
body,
|
|
1597
|
+
secure: true,
|
|
1598
|
+
format: "json"
|
|
1599
|
+
}, params));
|
|
1600
|
+
/**
|
|
1601
|
+
* @description Delete a platform wide role and all of its relations.
|
|
1602
|
+
*
|
|
1603
|
+
* @tags Role
|
|
1604
|
+
* @name AdminServiceDeleteRole
|
|
1605
|
+
* @summary Delete platform role
|
|
1606
|
+
* @request DELETE:/v1beta1/roles/{id}
|
|
1607
|
+
* @secure
|
|
1608
|
+
*/
|
|
1609
|
+
this.adminServiceDeleteRole = (id, params = {}) => this.request(__spreadValues({
|
|
1610
|
+
path: `/v1beta1/roles/${id}`,
|
|
1611
|
+
method: "DELETE",
|
|
1612
|
+
secure: true,
|
|
1613
|
+
format: "json"
|
|
1614
|
+
}, params));
|
|
1615
|
+
/**
|
|
1616
|
+
* @description Returns the service user of an organization in a Frontier instance. It can be filter by it's state
|
|
1617
|
+
*
|
|
1618
|
+
* @tags ServiceUser
|
|
1619
|
+
* @name FrontierServiceListServiceUsers
|
|
1620
|
+
* @summary List org service users
|
|
1621
|
+
* @request GET:/v1beta1/serviceusers
|
|
1622
|
+
* @secure
|
|
1623
|
+
*/
|
|
1624
|
+
this.frontierServiceListServiceUsers = (query, params = {}) => this.request(__spreadValues({
|
|
1625
|
+
path: `/v1beta1/serviceusers`,
|
|
1626
|
+
method: "GET",
|
|
1627
|
+
query,
|
|
1628
|
+
secure: true,
|
|
1629
|
+
format: "json"
|
|
1630
|
+
}, params));
|
|
1631
|
+
/**
|
|
1632
|
+
* @description Create a service user.
|
|
1633
|
+
*
|
|
1634
|
+
* @tags ServiceUser
|
|
1635
|
+
* @name FrontierServiceCreateServiceUser
|
|
1636
|
+
* @summary Create service user
|
|
1637
|
+
* @request POST:/v1beta1/serviceusers
|
|
1638
|
+
* @secure
|
|
1639
|
+
*/
|
|
1640
|
+
this.frontierServiceCreateServiceUser = (body, params = {}) => this.request(__spreadValues({
|
|
1641
|
+
path: `/v1beta1/serviceusers`,
|
|
1642
|
+
method: "POST",
|
|
1643
|
+
body,
|
|
1644
|
+
secure: true,
|
|
1645
|
+
type: "application/json" /* Json */,
|
|
1646
|
+
format: "json"
|
|
1647
|
+
}, params));
|
|
1648
|
+
/**
|
|
1649
|
+
* @description Get service user details by its id.
|
|
1650
|
+
*
|
|
1651
|
+
* @tags ServiceUser
|
|
1652
|
+
* @name FrontierServiceGetServiceUser
|
|
1653
|
+
* @summary Get service user
|
|
1654
|
+
* @request GET:/v1beta1/serviceusers/{id}
|
|
1655
|
+
* @secure
|
|
1656
|
+
*/
|
|
1657
|
+
this.frontierServiceGetServiceUser = (id, params = {}) => this.request(__spreadValues({
|
|
1658
|
+
path: `/v1beta1/serviceusers/${id}`,
|
|
1659
|
+
method: "GET",
|
|
1660
|
+
secure: true,
|
|
1661
|
+
format: "json"
|
|
1662
|
+
}, params));
|
|
1663
|
+
/**
|
|
1664
|
+
* @description Delete a service user permanently and all of its relations (keys, organizations, roles, etc)
|
|
1665
|
+
*
|
|
1666
|
+
* @tags ServiceUser
|
|
1667
|
+
* @name FrontierServiceDeleteServiceUser
|
|
1668
|
+
* @summary Delete service user
|
|
1669
|
+
* @request DELETE:/v1beta1/serviceusers/{id}
|
|
1670
|
+
* @secure
|
|
1671
|
+
*/
|
|
1672
|
+
this.frontierServiceDeleteServiceUser = (id, query, params = {}) => this.request(__spreadValues({
|
|
1673
|
+
path: `/v1beta1/serviceusers/${id}`,
|
|
1674
|
+
method: "DELETE",
|
|
1675
|
+
query,
|
|
1676
|
+
secure: true,
|
|
1677
|
+
format: "json"
|
|
1678
|
+
}, params));
|
|
1679
|
+
/**
|
|
1680
|
+
* @description List all the keys of a service user with its details except jwk.
|
|
1681
|
+
*
|
|
1682
|
+
* @tags ServiceUser
|
|
1683
|
+
* @name FrontierServiceListServiceUserKeys
|
|
1684
|
+
* @summary List service user keys
|
|
1685
|
+
* @request GET:/v1beta1/serviceusers/{id}/keys
|
|
1686
|
+
* @secure
|
|
1687
|
+
*/
|
|
1688
|
+
this.frontierServiceListServiceUserKeys = (id, params = {}) => this.request(__spreadValues({
|
|
1689
|
+
path: `/v1beta1/serviceusers/${id}/keys`,
|
|
1690
|
+
method: "GET",
|
|
1691
|
+
secure: true,
|
|
1692
|
+
format: "json"
|
|
1693
|
+
}, params));
|
|
1694
|
+
/**
|
|
1695
|
+
* @description Generate a service user key and return it, the private key part of the response will not be persisted and should be kept securely by client.
|
|
1696
|
+
*
|
|
1697
|
+
* @tags ServiceUser
|
|
1698
|
+
* @name FrontierServiceCreateServiceUserKey
|
|
1699
|
+
* @summary Create service user key
|
|
1700
|
+
* @request POST:/v1beta1/serviceusers/{id}/keys
|
|
1701
|
+
* @secure
|
|
1702
|
+
*/
|
|
1703
|
+
this.frontierServiceCreateServiceUserKey = (id, body, params = {}) => this.request(__spreadValues({
|
|
1704
|
+
path: `/v1beta1/serviceusers/${id}/keys`,
|
|
1705
|
+
method: "POST",
|
|
1706
|
+
body,
|
|
1707
|
+
secure: true,
|
|
1708
|
+
format: "json"
|
|
1709
|
+
}, params));
|
|
1710
|
+
/**
|
|
1711
|
+
* @description Get a service user public RSA JWK set.
|
|
1712
|
+
*
|
|
1713
|
+
* @tags ServiceUser
|
|
1714
|
+
* @name FrontierServiceGetServiceUserKey
|
|
1715
|
+
* @summary Get service user key
|
|
1716
|
+
* @request GET:/v1beta1/serviceusers/{id}/keys/{keyId}
|
|
1717
|
+
* @secure
|
|
1718
|
+
*/
|
|
1719
|
+
this.frontierServiceGetServiceUserKey = (id, keyId, params = {}) => this.request(__spreadValues({
|
|
1720
|
+
path: `/v1beta1/serviceusers/${id}/keys/${keyId}`,
|
|
1721
|
+
method: "GET",
|
|
1722
|
+
secure: true,
|
|
1723
|
+
format: "json"
|
|
1724
|
+
}, params));
|
|
1725
|
+
/**
|
|
1726
|
+
* @description Delete a service user key permanently.
|
|
1727
|
+
*
|
|
1728
|
+
* @tags ServiceUser
|
|
1729
|
+
* @name FrontierServiceDeleteServiceUserKey
|
|
1730
|
+
* @summary Delete service user key
|
|
1731
|
+
* @request DELETE:/v1beta1/serviceusers/{id}/keys/{keyId}
|
|
1732
|
+
* @secure
|
|
1733
|
+
*/
|
|
1734
|
+
this.frontierServiceDeleteServiceUserKey = (id, keyId, params = {}) => this.request(__spreadValues({
|
|
1735
|
+
path: `/v1beta1/serviceusers/${id}/keys/${keyId}`,
|
|
1736
|
+
method: "DELETE",
|
|
1737
|
+
secure: true,
|
|
1738
|
+
format: "json"
|
|
1739
|
+
}, params));
|
|
1740
|
+
/**
|
|
1741
|
+
* @description List all the secrets of a service user.
|
|
1742
|
+
*
|
|
1743
|
+
* @tags ServiceUser
|
|
1744
|
+
* @name FrontierServiceListServiceUserSecrets
|
|
1745
|
+
* @summary List service user secrets
|
|
1746
|
+
* @request GET:/v1beta1/serviceusers/{id}/secrets
|
|
1747
|
+
* @secure
|
|
1748
|
+
*/
|
|
1749
|
+
this.frontierServiceListServiceUserSecrets = (id, params = {}) => this.request(__spreadValues({
|
|
1750
|
+
path: `/v1beta1/serviceusers/${id}/secrets`,
|
|
1751
|
+
method: "GET",
|
|
1752
|
+
secure: true,
|
|
1753
|
+
format: "json"
|
|
1754
|
+
}, params));
|
|
1755
|
+
/**
|
|
1756
|
+
* @description Generate a service user secret and return it. The secret value will not be persisted and should be securely stored by client.
|
|
1757
|
+
*
|
|
1758
|
+
* @tags ServiceUser
|
|
1759
|
+
* @name FrontierServiceCreateServiceUserSecret
|
|
1760
|
+
* @summary Create service user secret
|
|
1761
|
+
* @request POST:/v1beta1/serviceusers/{id}/secrets
|
|
1762
|
+
* @secure
|
|
1763
|
+
*/
|
|
1764
|
+
this.frontierServiceCreateServiceUserSecret = (id, body, params = {}) => this.request(__spreadValues({
|
|
1765
|
+
path: `/v1beta1/serviceusers/${id}/secrets`,
|
|
1766
|
+
method: "POST",
|
|
1767
|
+
body,
|
|
1768
|
+
secure: true,
|
|
1769
|
+
format: "json"
|
|
1770
|
+
}, params));
|
|
1771
|
+
/**
|
|
1772
|
+
* @description Delete a service user secret credential.
|
|
1773
|
+
*
|
|
1774
|
+
* @tags ServiceUser
|
|
1775
|
+
* @name FrontierServiceDeleteServiceUserSecret
|
|
1776
|
+
* @summary Delete service user secret
|
|
1777
|
+
* @request DELETE:/v1beta1/serviceusers/{id}/secrets/{secretId}
|
|
1778
|
+
* @secure
|
|
1779
|
+
*/
|
|
1780
|
+
this.frontierServiceDeleteServiceUserSecret = (id, secretId, params = {}) => this.request(__spreadValues({
|
|
1781
|
+
path: `/v1beta1/serviceusers/${id}/secrets/${secretId}`,
|
|
1782
|
+
method: "DELETE",
|
|
1783
|
+
secure: true,
|
|
1784
|
+
format: "json"
|
|
1785
|
+
}, params));
|
|
1786
|
+
/**
|
|
1787
|
+
* @description Returns the users from all the organizations in a Frontier instance. It can be filtered by keyword, organization, group and state. Additionally you can include page number and page size for pagination.
|
|
1788
|
+
*
|
|
1789
|
+
* @tags User
|
|
1790
|
+
* @name FrontierServiceListUsers
|
|
1791
|
+
* @summary List public users
|
|
1792
|
+
* @request GET:/v1beta1/users
|
|
1793
|
+
* @secure
|
|
1794
|
+
*/
|
|
1795
|
+
this.frontierServiceListUsers = (query, params = {}) => this.request(__spreadValues({
|
|
1796
|
+
path: `/v1beta1/users`,
|
|
1797
|
+
method: "GET",
|
|
1798
|
+
query,
|
|
1799
|
+
secure: true,
|
|
1800
|
+
format: "json"
|
|
1801
|
+
}, params));
|
|
1802
|
+
/**
|
|
1803
|
+
* @description Create a user with the given details. A user is not attached to an organization or a group by default,and can be invited to the org/group. The name of the user must be unique within the entire Frontier instance. If a user name is not provided, Frontier automatically generates a name from the user email. The user metadata is validated against the user metaschema. By default the user metaschema contains `labels` and `descriptions` for the user. The `title` field can be optionally added for a user-friendly name. <br/><br/>*Example:*`{"email":"john.doe@raystack.org","title":"John Doe",metadata:{"label": {"key1": "value1"}, "description": "User Description"}}`
|
|
1804
|
+
*
|
|
1805
|
+
* @tags User
|
|
1806
|
+
* @name FrontierServiceCreateUser
|
|
1807
|
+
* @summary Create user
|
|
1808
|
+
* @request POST:/v1beta1/users
|
|
1809
|
+
*/
|
|
1810
|
+
this.frontierServiceCreateUser = (body, params = {}) => this.request(__spreadValues({
|
|
1811
|
+
path: `/v1beta1/users`,
|
|
1812
|
+
method: "POST",
|
|
1813
|
+
body,
|
|
1814
|
+
format: "json"
|
|
1815
|
+
}, params));
|
|
1816
|
+
/**
|
|
1817
|
+
* @description Get a user by id searched over all organizations in Frontier.
|
|
1818
|
+
*
|
|
1819
|
+
* @tags User
|
|
1820
|
+
* @name FrontierServiceGetUser
|
|
1821
|
+
* @summary Get user
|
|
1822
|
+
* @request GET:/v1beta1/users/{id}
|
|
1823
|
+
* @secure
|
|
1824
|
+
*/
|
|
1825
|
+
this.frontierServiceGetUser = (id, params = {}) => this.request(__spreadValues({
|
|
1826
|
+
path: `/v1beta1/users/${id}`,
|
|
1827
|
+
method: "GET",
|
|
1828
|
+
secure: true,
|
|
1829
|
+
format: "json"
|
|
1830
|
+
}, params));
|
|
1831
|
+
/**
|
|
1832
|
+
* @description Delete an user permanently forever and all of its relations (organizations, groups, etc)
|
|
1833
|
+
*
|
|
1834
|
+
* @tags User
|
|
1835
|
+
* @name FrontierServiceDeleteUser
|
|
1836
|
+
* @summary Delete user
|
|
1837
|
+
* @request DELETE:/v1beta1/users/{id}
|
|
1838
|
+
* @secure
|
|
1839
|
+
*/
|
|
1840
|
+
this.frontierServiceDeleteUser = (id, params = {}) => this.request(__spreadValues({
|
|
1841
|
+
path: `/v1beta1/users/${id}`,
|
|
1842
|
+
method: "DELETE",
|
|
1843
|
+
secure: true,
|
|
1844
|
+
format: "json"
|
|
1845
|
+
}, params));
|
|
1846
|
+
/**
|
|
1847
|
+
* No description
|
|
1848
|
+
*
|
|
1849
|
+
* @tags User
|
|
1850
|
+
* @name FrontierServiceUpdateUser
|
|
1851
|
+
* @summary Update user
|
|
1852
|
+
* @request PUT:/v1beta1/users/{id}
|
|
1853
|
+
* @secure
|
|
1854
|
+
*/
|
|
1855
|
+
this.frontierServiceUpdateUser = (id, body, params = {}) => this.request(__spreadValues({
|
|
1856
|
+
path: `/v1beta1/users/${id}`,
|
|
1857
|
+
method: "PUT",
|
|
1858
|
+
body,
|
|
1859
|
+
secure: true,
|
|
1860
|
+
format: "json"
|
|
1861
|
+
}, params));
|
|
1862
|
+
/**
|
|
1863
|
+
* @description Sets the state of the user as diabled.The user's membership to groups and organizations will still exist along with all it's roles for access control, but the user will not be able to log in and access the Frontier instance.
|
|
1864
|
+
*
|
|
1865
|
+
* @tags User
|
|
1866
|
+
* @name FrontierServiceDisableUser
|
|
1867
|
+
* @summary Disable user
|
|
1868
|
+
* @request POST:/v1beta1/users/{id}/disable
|
|
1869
|
+
* @secure
|
|
1870
|
+
*/
|
|
1871
|
+
this.frontierServiceDisableUser = (id, body, params = {}) => this.request(__spreadValues({
|
|
1872
|
+
path: `/v1beta1/users/${id}/disable`,
|
|
1873
|
+
method: "POST",
|
|
1874
|
+
body,
|
|
1875
|
+
secure: true,
|
|
1876
|
+
format: "json"
|
|
1877
|
+
}, params));
|
|
1878
|
+
/**
|
|
1879
|
+
* @description Sets the state of the user as enabled. The user will be able to log in and access the Frontier instance.
|
|
1880
|
+
*
|
|
1881
|
+
* @tags User
|
|
1882
|
+
* @name FrontierServiceEnableUser
|
|
1883
|
+
* @summary Enable user
|
|
1884
|
+
* @request POST:/v1beta1/users/{id}/enable
|
|
1885
|
+
* @secure
|
|
1886
|
+
*/
|
|
1887
|
+
this.frontierServiceEnableUser = (id, body, params = {}) => this.request(__spreadValues({
|
|
1888
|
+
path: `/v1beta1/users/${id}/enable`,
|
|
1889
|
+
method: "POST",
|
|
1890
|
+
body,
|
|
1891
|
+
secure: true,
|
|
1892
|
+
format: "json"
|
|
1893
|
+
}, params));
|
|
1894
|
+
/**
|
|
1895
|
+
* @description Lists all the groups a user belongs to across all organization in Frontier. To get the groups of a user in a specific organization, use the org_id filter in the query parameter.
|
|
1896
|
+
*
|
|
1897
|
+
* @tags User
|
|
1898
|
+
* @name FrontierServiceListUserGroups
|
|
1899
|
+
* @summary List user groups
|
|
1900
|
+
* @request GET:/v1beta1/users/{id}/groups
|
|
1901
|
+
* @secure
|
|
1902
|
+
*/
|
|
1903
|
+
this.frontierServiceListUserGroups = (id, query, params = {}) => this.request(__spreadValues({
|
|
1904
|
+
path: `/v1beta1/users/${id}/groups`,
|
|
1905
|
+
method: "GET",
|
|
1906
|
+
query,
|
|
1907
|
+
secure: true,
|
|
1908
|
+
format: "json"
|
|
1909
|
+
}, params));
|
|
1910
|
+
/**
|
|
1911
|
+
* @description List all the invitations sent to a user.
|
|
1912
|
+
*
|
|
1913
|
+
* @tags User
|
|
1914
|
+
* @name FrontierServiceListUserInvitations
|
|
1915
|
+
* @summary List user invitations
|
|
1916
|
+
* @request GET:/v1beta1/users/{id}/invitations
|
|
1917
|
+
* @secure
|
|
1918
|
+
*/
|
|
1919
|
+
this.frontierServiceListUserInvitations = (id, params = {}) => this.request(__spreadValues({
|
|
1920
|
+
path: `/v1beta1/users/${id}/invitations`,
|
|
1921
|
+
method: "GET",
|
|
1922
|
+
secure: true,
|
|
1923
|
+
format: "json"
|
|
1924
|
+
}, params));
|
|
1925
|
+
/**
|
|
1926
|
+
* @description Get all the organizations a user belongs to.
|
|
1927
|
+
*
|
|
1928
|
+
* @tags User
|
|
1929
|
+
* @name FrontierServiceGetOrganizationsByUser
|
|
1930
|
+
* @summary Get user organizations
|
|
1931
|
+
* @request GET:/v1beta1/users/{id}/organizations
|
|
1932
|
+
* @secure
|
|
1933
|
+
*/
|
|
1934
|
+
this.frontierServiceGetOrganizationsByUser = (id, params = {}) => this.request(__spreadValues({
|
|
1935
|
+
path: `/v1beta1/users/${id}/organizations`,
|
|
1936
|
+
method: "GET",
|
|
1937
|
+
secure: true,
|
|
1938
|
+
format: "json"
|
|
1939
|
+
}, params));
|
|
1940
|
+
/**
|
|
1941
|
+
* @description Get all the projects a user belongs to.
|
|
1942
|
+
*
|
|
1943
|
+
* @tags User
|
|
1944
|
+
* @name FrontierServiceGetProjectsByUser
|
|
1945
|
+
* @summary Get user projects
|
|
1946
|
+
* @request GET:/v1beta1/users/{id}/projects
|
|
1947
|
+
* @secure
|
|
1948
|
+
*/
|
|
1949
|
+
this.frontierServiceGetProjectsByUser = (id, params = {}) => this.request(__spreadValues({
|
|
1950
|
+
path: `/v1beta1/users/${id}/projects`,
|
|
1951
|
+
method: "GET",
|
|
1952
|
+
secure: true,
|
|
1953
|
+
format: "json"
|
|
1954
|
+
}, params));
|
|
1955
|
+
/**
|
|
1956
|
+
* No description
|
|
1957
|
+
*
|
|
1958
|
+
* @tags User
|
|
1959
|
+
* @name FrontierServiceGetCurrentUser
|
|
1960
|
+
* @summary Get current user
|
|
1961
|
+
* @request GET:/v1beta1/users/self
|
|
1962
|
+
* @secure
|
|
1963
|
+
*/
|
|
1964
|
+
this.frontierServiceGetCurrentUser = (params = {}) => this.request(__spreadValues({
|
|
1965
|
+
path: `/v1beta1/users/self`,
|
|
1966
|
+
method: "GET",
|
|
1967
|
+
secure: true,
|
|
1968
|
+
format: "json"
|
|
1969
|
+
}, params));
|
|
1970
|
+
/**
|
|
1971
|
+
* No description
|
|
1972
|
+
*
|
|
1973
|
+
* @tags User
|
|
1974
|
+
* @name FrontierServiceUpdateCurrentUser
|
|
1975
|
+
* @summary Update current user
|
|
1976
|
+
* @request PUT:/v1beta1/users/self
|
|
1977
|
+
* @secure
|
|
1978
|
+
*/
|
|
1979
|
+
this.frontierServiceUpdateCurrentUser = (body, params = {}) => this.request(__spreadValues({
|
|
1980
|
+
path: `/v1beta1/users/self`,
|
|
1981
|
+
method: "PUT",
|
|
1982
|
+
body,
|
|
1983
|
+
secure: true,
|
|
1984
|
+
format: "json"
|
|
1985
|
+
}, params));
|
|
1986
|
+
/**
|
|
1987
|
+
* No description
|
|
1988
|
+
*
|
|
1989
|
+
* @tags User
|
|
1990
|
+
* @name FrontierServiceListCurrentUserGroups
|
|
1991
|
+
* @summary List my groups
|
|
1992
|
+
* @request GET:/v1beta1/users/self/groups
|
|
1993
|
+
* @secure
|
|
1994
|
+
*/
|
|
1995
|
+
this.frontierServiceListCurrentUserGroups = (params = {}) => this.request(__spreadValues({
|
|
1996
|
+
path: `/v1beta1/users/self/groups`,
|
|
1997
|
+
method: "GET",
|
|
1998
|
+
secure: true,
|
|
1999
|
+
format: "json"
|
|
2000
|
+
}, params));
|
|
2001
|
+
/**
|
|
2002
|
+
* @description Get all organizations the current user belongs to
|
|
2003
|
+
*
|
|
2004
|
+
* @tags User
|
|
2005
|
+
* @name FrontierServiceGetOrganizationsByCurrentUser
|
|
2006
|
+
* @summary Get my organizations
|
|
2007
|
+
* @request GET:/v1beta1/users/self/organizations
|
|
2008
|
+
* @secure
|
|
2009
|
+
*/
|
|
2010
|
+
this.frontierServiceGetOrganizationsByCurrentUser = (params = {}) => this.request(__spreadValues({
|
|
2011
|
+
path: `/v1beta1/users/self/organizations`,
|
|
2012
|
+
method: "GET",
|
|
2013
|
+
secure: true,
|
|
2014
|
+
format: "json"
|
|
2015
|
+
}, params));
|
|
2016
|
+
/**
|
|
2017
|
+
* @description Get all projects the current user belongs to
|
|
2018
|
+
*
|
|
2019
|
+
* @tags User
|
|
2020
|
+
* @name FrontierServiceGetProjectsByCurrentUser
|
|
2021
|
+
* @summary Get my projects
|
|
2022
|
+
* @request GET:/v1beta1/users/self/projects
|
|
2023
|
+
* @secure
|
|
2024
|
+
*/
|
|
2025
|
+
this.frontierServiceGetProjectsByCurrentUser = (params = {}) => this.request(__spreadValues({
|
|
2026
|
+
path: `/v1beta1/users/self/projects`,
|
|
2027
|
+
method: "GET",
|
|
2028
|
+
secure: true,
|
|
2029
|
+
format: "json"
|
|
2030
|
+
}, params));
|
|
2031
|
+
}
|
|
2032
|
+
};
|
|
2033
|
+
|
|
2034
|
+
// src/index.ts
|
|
2035
|
+
var FrontierClient = V1Beta1;
|
|
2036
|
+
|
|
2037
|
+
// react/frontier.ts
|
|
2038
|
+
var Frontier = class {
|
|
2039
|
+
constructor() {
|
|
2040
|
+
}
|
|
2041
|
+
static getInstance({ endpoint }) {
|
|
2042
|
+
if (!this.instance) {
|
|
2043
|
+
this.instance = new FrontierClient({
|
|
2044
|
+
baseUrl: endpoint,
|
|
2045
|
+
baseApiParams: {
|
|
2046
|
+
credentials: "include"
|
|
2047
|
+
}
|
|
2048
|
+
});
|
|
141
2049
|
}
|
|
142
|
-
return this.
|
|
2050
|
+
return this.instance;
|
|
143
2051
|
}
|
|
144
2052
|
};
|
|
2053
|
+
Frontier.instance = null;
|
|
145
2054
|
|
|
146
2055
|
// react/contexts/FrontierContext.tsx
|
|
147
2056
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -153,14 +2062,14 @@ var defaultConfig = {
|
|
|
153
2062
|
};
|
|
154
2063
|
var initialValues = {
|
|
155
2064
|
config: defaultConfig,
|
|
156
|
-
client:
|
|
2065
|
+
client: void 0,
|
|
157
2066
|
organizations: [],
|
|
158
2067
|
setOrganizations: () => void 0,
|
|
159
2068
|
groups: [],
|
|
160
2069
|
setGroups: () => void 0,
|
|
161
2070
|
strategies: [],
|
|
162
2071
|
setStrategies: () => void 0,
|
|
163
|
-
user:
|
|
2072
|
+
user: void 0,
|
|
164
2073
|
setUser: () => void 0
|
|
165
2074
|
};
|
|
166
2075
|
var FrontierContext = (0, import_react.createContext)(initialValues);
|
|
@@ -179,14 +2088,14 @@ var FrontierContextProvider = (_a) => {
|
|
|
179
2088
|
const [organizations, setOrganizations] = (0, import_react.useState)([]);
|
|
180
2089
|
const [groups, setGroups] = (0, import_react.useState)([]);
|
|
181
2090
|
const [strategies, setStrategies] = (0, import_react.useState)([]);
|
|
182
|
-
const [user, setUser] = (0, import_react.useState)(
|
|
2091
|
+
const [user, setUser] = (0, import_react.useState)();
|
|
183
2092
|
(0, import_react.useEffect)(() => {
|
|
184
2093
|
function getFrontierInformation() {
|
|
185
2094
|
return __async(this, null, function* () {
|
|
186
2095
|
try {
|
|
187
2096
|
const {
|
|
188
|
-
data: { strategies: strategies2 }
|
|
189
|
-
} = yield frontierClient.
|
|
2097
|
+
data: { strategies: strategies2 = [] }
|
|
2098
|
+
} = yield frontierClient.frontierServiceListAuthStrategies();
|
|
190
2099
|
setStrategies(strategies2);
|
|
191
2100
|
} catch (error) {
|
|
192
2101
|
console.error(
|
|
@@ -203,7 +2112,7 @@ var FrontierContextProvider = (_a) => {
|
|
|
203
2112
|
try {
|
|
204
2113
|
const {
|
|
205
2114
|
data: { user: user2 }
|
|
206
|
-
} = yield frontierClient.
|
|
2115
|
+
} = yield frontierClient.frontierServiceGetCurrentUser();
|
|
207
2116
|
setUser(user2);
|
|
208
2117
|
} catch (error) {
|
|
209
2118
|
console.error(
|
|
@@ -219,8 +2128,8 @@ var FrontierContextProvider = (_a) => {
|
|
|
219
2128
|
return __async(this, null, function* () {
|
|
220
2129
|
try {
|
|
221
2130
|
const {
|
|
222
|
-
data: { groups: groups2 }
|
|
223
|
-
} = yield frontierClient.
|
|
2131
|
+
data: { groups: groups2 = [] }
|
|
2132
|
+
} = yield frontierClient.frontierServiceListUserGroups(userId);
|
|
224
2133
|
setGroups(groups2);
|
|
225
2134
|
} catch (error) {
|
|
226
2135
|
console.error(
|
|
@@ -229,7 +2138,7 @@ var FrontierContextProvider = (_a) => {
|
|
|
229
2138
|
}
|
|
230
2139
|
});
|
|
231
2140
|
}
|
|
232
|
-
if (user) {
|
|
2141
|
+
if (user == null ? void 0 : user.id) {
|
|
233
2142
|
getFrontierCurrentUserGroups(user.id);
|
|
234
2143
|
}
|
|
235
2144
|
}, [user]);
|
|
@@ -238,8 +2147,8 @@ var FrontierContextProvider = (_a) => {
|
|
|
238
2147
|
return __async(this, null, function* () {
|
|
239
2148
|
try {
|
|
240
2149
|
const {
|
|
241
|
-
data: { organizations: organizations2 }
|
|
242
|
-
} = yield frontierClient.
|
|
2150
|
+
data: { organizations: organizations2 = [] }
|
|
2151
|
+
} = yield frontierClient.frontierServiceGetOrganizationsByUser(userId);
|
|
243
2152
|
setOrganizations(organizations2);
|
|
244
2153
|
} catch (error) {
|
|
245
2154
|
console.error(
|
|
@@ -248,7 +2157,7 @@ var FrontierContextProvider = (_a) => {
|
|
|
248
2157
|
}
|
|
249
2158
|
});
|
|
250
2159
|
}
|
|
251
|
-
if (user) {
|
|
2160
|
+
if (user == null ? void 0 : user.id) {
|
|
252
2161
|
getFrontierCurrentUserOrganizations(user.id);
|
|
253
2162
|
}
|
|
254
2163
|
}, [user]);
|
|
@@ -272,10 +2181,7 @@ var FrontierContextProvider = (_a) => {
|
|
|
272
2181
|
);
|
|
273
2182
|
};
|
|
274
2183
|
var useFrontierClient = (options) => {
|
|
275
|
-
const frontierClient = import_react.default.useMemo(
|
|
276
|
-
() => Frontier.getOrCreateInstance(options),
|
|
277
|
-
[]
|
|
278
|
-
);
|
|
2184
|
+
const frontierClient = import_react.default.useMemo(() => Frontier.getInstance(options), []);
|
|
279
2185
|
return { frontierClient };
|
|
280
2186
|
};
|
|
281
2187
|
function useFrontier() {
|
|
@@ -417,9 +2323,13 @@ var MagicLink = (_a) => {
|
|
|
417
2323
|
const magicLinkClickHandler = (0, import_react2.useCallback)(() => __async(void 0, null, function* () {
|
|
418
2324
|
setLoading(true);
|
|
419
2325
|
try {
|
|
2326
|
+
if (!client)
|
|
2327
|
+
return;
|
|
420
2328
|
const {
|
|
421
|
-
data: { state: state2 }
|
|
422
|
-
} = yield client.
|
|
2329
|
+
data: { state: state2 = "" }
|
|
2330
|
+
} = yield client.frontierServiceAuthenticate("mailotp", {
|
|
2331
|
+
email
|
|
2332
|
+
});
|
|
423
2333
|
const searchParams = new URLSearchParams({ state: state2, email });
|
|
424
2334
|
window.location = `${config.redirectMagicLinkVerify}?${searchParams.toString()}`;
|
|
425
2335
|
} finally {
|
|
@@ -501,25 +2411,32 @@ var styles5 = {
|
|
|
501
2411
|
var SignedIn = (_a) => {
|
|
502
2412
|
var _b = _a, {
|
|
503
2413
|
logo,
|
|
504
|
-
title = "Login to Raypoint"
|
|
2414
|
+
title = "Login to Raypoint",
|
|
2415
|
+
excludes = []
|
|
505
2416
|
} = _b, props = __objRest(_b, [
|
|
506
2417
|
"logo",
|
|
507
|
-
"title"
|
|
2418
|
+
"title",
|
|
2419
|
+
"excludes"
|
|
508
2420
|
]);
|
|
509
|
-
const { config } = useFrontier();
|
|
510
|
-
const { client, strategies = [] } = useFrontier();
|
|
2421
|
+
const { config, client, strategies = [] } = useFrontier();
|
|
511
2422
|
const clickHandler = (0, import_react3.useCallback)(
|
|
512
2423
|
(name) => __async(void 0, null, function* () {
|
|
2424
|
+
if (!name)
|
|
2425
|
+
return;
|
|
2426
|
+
if (!client)
|
|
2427
|
+
return;
|
|
513
2428
|
const {
|
|
514
|
-
data: { endpoint }
|
|
515
|
-
} = yield client.
|
|
2429
|
+
data: { endpoint = "" }
|
|
2430
|
+
} = yield client.frontierServiceAuthenticate(name);
|
|
516
2431
|
window.location.href = endpoint;
|
|
517
2432
|
}),
|
|
518
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
519
2433
|
[strategies]
|
|
520
2434
|
);
|
|
521
2435
|
const mailotp = strategies.find((s) => s.name === "mailotp");
|
|
522
|
-
const filteredOIDC = strategies.filter((s) => s.name !== "mailotp")
|
|
2436
|
+
const filteredOIDC = strategies.filter((s) => s.name !== "mailotp").filter((s) => {
|
|
2437
|
+
var _a2;
|
|
2438
|
+
return !excludes.includes((_a2 = s.name) != null ? _a2 : "");
|
|
2439
|
+
});
|
|
523
2440
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Container, __spreadProps(__spreadValues({}, props), { children: [
|
|
524
2441
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Header, { logo, title }),
|
|
525
2442
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_apsara5.Flex, { direction: "column", style: { width: "100%", gap: "var(--pd-16)" }, children: [
|
|
@@ -589,7 +2506,13 @@ var MagicLinkVerify = (_a) => {
|
|
|
589
2506
|
const OTPVerifyClickHandler = (0, import_react4.useCallback)(() => __async(void 0, null, function* () {
|
|
590
2507
|
setLoading(true);
|
|
591
2508
|
try {
|
|
592
|
-
|
|
2509
|
+
if (!client)
|
|
2510
|
+
return;
|
|
2511
|
+
yield client.frontierServiceAuthCallback({
|
|
2512
|
+
strategyName: "mailotp",
|
|
2513
|
+
code: otp,
|
|
2514
|
+
state: stateParam
|
|
2515
|
+
});
|
|
593
2516
|
const searchParams = new URLSearchParams(
|
|
594
2517
|
hasWindow() ? window.location.search : ``
|
|
595
2518
|
);
|
|
@@ -692,9 +2615,11 @@ var CreateOrganization = (_a) => {
|
|
|
692
2615
|
const { client } = useFrontier();
|
|
693
2616
|
function onSubmit(data) {
|
|
694
2617
|
return __async(this, null, function* () {
|
|
2618
|
+
if (!client)
|
|
2619
|
+
return;
|
|
695
2620
|
const {
|
|
696
2621
|
data: { organization }
|
|
697
|
-
} = yield client.
|
|
2622
|
+
} = yield client.frontierServiceCreateOrganization(data);
|
|
698
2623
|
window.location = `${window.location.origin}/${organization.name}`;
|
|
699
2624
|
});
|
|
700
2625
|
}
|
|
@@ -772,24 +2697,33 @@ var styles8 = {
|
|
|
772
2697
|
var Signup = (_a) => {
|
|
773
2698
|
var _b = _a, {
|
|
774
2699
|
logo,
|
|
775
|
-
title = "Create your account"
|
|
2700
|
+
title = "Create your account",
|
|
2701
|
+
excludes = []
|
|
776
2702
|
} = _b, props = __objRest(_b, [
|
|
777
2703
|
"logo",
|
|
778
|
-
"title"
|
|
2704
|
+
"title",
|
|
2705
|
+
"excludes"
|
|
779
2706
|
]);
|
|
780
2707
|
const { config } = useFrontier();
|
|
781
2708
|
const { client, strategies = [] } = useFrontier();
|
|
782
2709
|
const clickHandler = (0, import_react5.useCallback)(
|
|
783
2710
|
(name) => __async(void 0, null, function* () {
|
|
2711
|
+
if (!name)
|
|
2712
|
+
return;
|
|
2713
|
+
if (!client)
|
|
2714
|
+
return;
|
|
784
2715
|
const {
|
|
785
|
-
data: { endpoint }
|
|
786
|
-
} = yield client.
|
|
2716
|
+
data: { endpoint = "" }
|
|
2717
|
+
} = yield client.frontierServiceAuthenticate(name);
|
|
787
2718
|
window.location.href = endpoint;
|
|
788
2719
|
}),
|
|
789
2720
|
[strategies]
|
|
790
2721
|
);
|
|
791
2722
|
const mailotp = strategies.find((s) => s.name === "mailotp");
|
|
792
|
-
const filteredOIDC = strategies.filter((s) => s.name !== "mailotp")
|
|
2723
|
+
const filteredOIDC = strategies.filter((s) => s.name !== "mailotp").filter((s) => {
|
|
2724
|
+
var _a2;
|
|
2725
|
+
return !excludes.includes((_a2 = s.name) != null ? _a2 : "");
|
|
2726
|
+
});
|
|
793
2727
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Container, __spreadProps(__spreadValues({}, props), { children: [
|
|
794
2728
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Header, { logo, title }),
|
|
795
2729
|
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_apsara8.Flex, { direction: "column", style: { width: "100%", gap: "8px" }, children: [
|