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