@raystack/frontier 0.0.0 → 0.0.2

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