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