@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.
@@ -1,6 +1,5 @@
1
1
  import * as React from 'react';
2
2
  import React__default, { ComponentPropsWithRef, Dispatch, SetStateAction } from 'react';
3
- import { AxiosInstance, AxiosResponse } from 'axios';
4
3
 
5
4
  type ContainerProps = ComponentPropsWithRef<'div'> & {
6
5
  children?: React__default.ReactNode;
@@ -12,8 +11,9 @@ declare const Container: ({ children, shadow, radius, style }: ContainerProps) =
12
11
  type SignedInProps = ComponentPropsWithRef<typeof Container> & {
13
12
  logo?: React__default.ReactNode;
14
13
  title?: string;
14
+ excludes?: string[];
15
15
  };
16
- declare const SignedIn: ({ logo, title, ...props }: SignedInProps) => JSX.Element;
16
+ declare const SignedIn: ({ logo, title, excludes, ...props }: SignedInProps) => JSX.Element;
17
17
 
18
18
  type MagicLinkVerifyProps = ComponentPropsWithRef<typeof Container> & {
19
19
  logo?: React__default.ReactNode;
@@ -30,38 +30,10 @@ declare const CreateOrganization: ({ title, description, ...props }: CreateOrgan
30
30
  type SignupProps = ComponentPropsWithRef<typeof Container> & {
31
31
  logo?: React__default.ReactNode;
32
32
  title?: string;
33
+ excludes?: string[];
33
34
  };
34
- declare const Signup: ({ logo, title, ...props }: SignupProps) => JSX.Element;
35
+ declare const Signup: ({ logo, title, excludes, ...props }: SignupProps) => JSX.Element;
35
36
 
36
- interface Strategy {
37
- name: string;
38
- params: any;
39
- endpoint: string;
40
- }
41
- interface User {
42
- id: string;
43
- name: string;
44
- email: string;
45
- createdAt: Date;
46
- updatedAt: Date;
47
- }
48
- interface Group {
49
- id: string;
50
- name: string;
51
- slug: string;
52
- backend: string;
53
- resoure_type: string;
54
- createdAt: Date;
55
- updatedAt: Date;
56
- }
57
- interface Organization {
58
- id: string;
59
- name: string;
60
- slug: string;
61
- metadata: Record<string, string>;
62
- createdAt: Date;
63
- updatedAt: Date;
64
- }
65
37
  interface FrontierClientOptions {
66
38
  endpoint?: string;
67
39
  redirectSignup?: string;
@@ -77,49 +49,2213 @@ interface FrontierProviderProps {
77
49
  initialState?: InitialState;
78
50
  }
79
51
 
80
- declare class Frontier {
81
- protected readonly instance: AxiosInstance;
82
- private readonly options;
83
- private static classInstance?;
84
- static getOrCreateInstance(options: FrontierClientOptions): Frontier;
85
- constructor(options: FrontierClientOptions);
86
- getAuthAtrategies: () => Promise<AxiosResponse<{
87
- strategies: Strategy[];
88
- }>>;
89
- getAuthStrategyEndpoint: (strategy: string) => Promise<AxiosResponse<{
90
- endpoint: string;
91
- }>>;
92
- getMagicLinkAuthStrategyEndpoint: (email: string) => Promise<AxiosResponse<{
93
- state: string;
94
- }>>;
95
- verifyMagicLinkAuthStrategyEndpoint: (code: string, state: string) => Promise<AxiosResponse<{
96
- state: string;
97
- }, any>>;
98
- getCurrentUser: () => Promise<AxiosResponse<{
99
- user: User;
100
- }>>;
101
- getUserGroups: (userId: string) => Promise<AxiosResponse<{
102
- groups: Group[];
103
- }>>;
104
- getUserOrganisations: (userId: string) => Promise<AxiosResponse<{
105
- organizations: Organization[];
106
- }>>;
107
- createOrganisation: (data: any) => Promise<AxiosResponse<{
108
- organization: Organization;
109
- }>>;
52
+ type QueryParamsType = Record<string | number, any>;
53
+ type ResponseFormat = keyof Omit<Body, 'body' | 'bodyUsed'>;
54
+ interface FullRequestParams extends Omit<RequestInit, 'body'> {
55
+ /** set parameter to `true` for call `securityWorker` for this request */
56
+ secure?: boolean;
57
+ /** request path */
58
+ path: string;
59
+ /** content type of request body */
60
+ type?: ContentType;
61
+ /** query params */
62
+ query?: QueryParamsType;
63
+ /** format of response (i.e. response.json() -> format: "json") */
64
+ format?: ResponseFormat;
65
+ /** request body */
66
+ body?: unknown;
67
+ /** base url */
68
+ baseUrl?: string;
69
+ /** request cancellation token */
70
+ cancelToken?: CancelToken;
71
+ }
72
+ type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'query' | 'path'>;
73
+ interface ApiConfig<SecurityDataType = unknown> {
74
+ baseUrl?: string;
75
+ baseApiParams?: Omit<RequestParams, 'baseUrl' | 'cancelToken' | 'signal'>;
76
+ securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
77
+ customFetch?: typeof fetch;
78
+ }
79
+ interface HttpResponse<D extends unknown, E extends unknown = unknown> extends Response {
80
+ data: D;
81
+ error: E;
82
+ }
83
+ type CancelToken = Symbol | string | number;
84
+ declare enum ContentType {
85
+ Json = "application/json",
86
+ FormData = "multipart/form-data",
87
+ UrlEncoded = "application/x-www-form-urlencoded",
88
+ Text = "text/plain"
89
+ }
90
+ declare class HttpClient<SecurityDataType = unknown> {
91
+ baseUrl: string;
92
+ private securityData;
93
+ private securityWorker?;
94
+ private abortControllers;
95
+ private customFetch;
96
+ private baseApiParams;
97
+ constructor(apiConfig?: ApiConfig<SecurityDataType>);
98
+ setSecurityData: (data: SecurityDataType | null) => void;
99
+ protected encodeQueryParam(key: string, value: any): string;
100
+ protected addQueryParam(query: QueryParamsType, key: string): string;
101
+ protected addArrayQueryParam(query: QueryParamsType, key: string): any;
102
+ protected toQueryString(rawQuery?: QueryParamsType): string;
103
+ protected addQueryParams(rawQuery?: QueryParamsType): string;
104
+ private contentFormatters;
105
+ protected mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams;
106
+ protected createAbortSignal: (cancelToken: CancelToken) => AbortSignal | undefined;
107
+ abortRequest: (cancelToken: CancelToken) => void;
108
+ request: <T = any, E = any>({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise<HttpResponse<T, E>>;
109
+ }
110
+
111
+ interface ProtobufAny {
112
+ '@type'?: string;
113
+ [key: string]: any;
114
+ }
115
+ interface RpcStatus {
116
+ /** @format int32 */
117
+ code?: number;
118
+ message?: string;
119
+ details?: ProtobufAny[];
120
+ }
121
+ interface V1Beta1AuditLog {
122
+ /** A unique identifier of the audit log if not supplied will be autogenerated */
123
+ id?: string;
124
+ /**
125
+ * Source service generating the event
126
+ * The source service generating the event.
127
+ * @example "auth"
128
+ */
129
+ source: string;
130
+ /** Action performed, e.g. project.create, user.update, serviceuser.delete */
131
+ action: string;
132
+ /** Actor performing the action */
133
+ actor?: V1Beta1AuditLogActor;
134
+ /** Target of the action */
135
+ target?: V1Beta1AuditLogTarget;
136
+ /** Context contains additional information about the event */
137
+ context?: Record<string, string>;
138
+ /**
139
+ * The time the log was created.
140
+ * @format date-time
141
+ * @example "2023-06-07T05:39:56.961Z"
142
+ */
143
+ createdAt?: string;
144
+ }
145
+ interface V1Beta1AuditLogActor {
146
+ id?: string;
147
+ type?: string;
148
+ name?: string;
149
+ }
150
+ interface V1Beta1AuditLogTarget {
151
+ id?: string;
152
+ type?: string;
153
+ name?: string;
154
+ }
155
+ interface V1Beta1AuthCallbackRequest {
156
+ /** strategy_name will not be set for oidc but can be utilized for methods like email magic links */
157
+ strategyName?: string;
158
+ /** for oidc & magic links */
159
+ state?: string;
160
+ code?: string;
161
+ }
162
+ interface V1Beta1AuthStrategy {
163
+ name?: string;
164
+ params?: object;
165
+ }
166
+ interface V1Beta1AuthTokenRequest {
167
+ /**
168
+ * grant_type can be one of the following:
169
+ * - client_credentials
170
+ * - urn:ietf:params:oauth:grant-type:jwt-bearer
171
+ */
172
+ grantType?: string;
173
+ /** client_id and client_secret are required for grant_type client_credentials */
174
+ clientId?: string;
175
+ clientSecret?: string;
176
+ /** assertion is required for grant_type urn:ietf:params:oauth:grant-type:jwt-bearer */
177
+ assertion?: string;
178
+ }
179
+ interface V1Beta1AuthTokenResponse {
180
+ accessToken?: string;
181
+ tokenType?: string;
182
+ }
183
+ interface V1Beta1AuthenticateResponse {
184
+ endpoint?: string;
185
+ state?: string;
186
+ }
187
+ interface V1Beta1CheckResourcePermissionRequest {
188
+ /** Deprecated. Use `resource` field instead. */
189
+ objectId?: string;
190
+ /** Deprecated. Use `resource` field instead. */
191
+ objectNamespace?: string;
192
+ /** the permission name to check. <br/> *Example:* `get` or `list` */
193
+ permission: string;
194
+ /** `namespace:uuid` or `namespace:name` of the org or project, and `namespace:urn` of a resource under a project. In case of an org/project either provide the complete namespace (app/organization) or Frontier can also parse aliases for the same as `org` or `project`. <br/> *Example:* `organization:92f69c3a-334b-4f25-90b8-4d4f3be6b825` or `app/project:project-name` or `compute/instance:92f69c3a-334b-4f25-90b8-4d4f3be6b825` */
195
+ resource?: string;
196
+ }
197
+ interface V1Beta1CheckResourcePermissionResponse {
198
+ status?: boolean;
199
+ }
200
+ interface V1Beta1CreateGroupResponse {
201
+ group?: V1Beta1Group;
202
+ }
203
+ interface V1Beta1CreateMetaSchemaResponse {
204
+ metaschema?: V1Beta1MetaSchema;
205
+ }
206
+ interface V1Beta1CreateOrganizationInvitationResponse {
207
+ invitation?: V1Beta1Invitation;
208
+ }
209
+ interface V1Beta1CreateOrganizationResponse {
210
+ organization?: V1Beta1Organization;
211
+ }
212
+ interface V1Beta1CreateOrganizationRoleResponse {
213
+ role?: V1Beta1Role;
214
+ }
215
+ interface V1Beta1CreatePermissionRequest {
216
+ bodies?: V1Beta1PermissionRequestBody[];
217
+ }
218
+ interface V1Beta1CreatePermissionResponse {
219
+ permissions?: V1Beta1Permission[];
220
+ }
221
+ interface V1Beta1CreatePolicyResponse {
222
+ policy?: V1Beta1Policy;
223
+ }
224
+ interface V1Beta1CreateProjectResourceResponse {
225
+ resource?: V1Beta1Resource;
226
+ }
227
+ interface V1Beta1CreateProjectResponse {
228
+ project?: V1Beta1Project;
229
+ }
230
+ interface V1Beta1CreateRelationResponse {
231
+ relation?: V1Beta1Relation;
232
+ }
233
+ interface V1Beta1CreateRoleResponse {
234
+ role?: V1Beta1Role;
235
+ }
236
+ interface V1Beta1CreateServiceUserKeyResponse {
237
+ key?: V1Beta1KeyCredential;
238
+ }
239
+ interface V1Beta1CreateServiceUserRequest {
240
+ body?: V1Beta1ServiceUserRequestBody;
241
+ /** The organization ID to which the service user belongs to. */
242
+ orgId: string;
243
+ }
244
+ interface V1Beta1CreateServiceUserResponse {
245
+ serviceuser?: V1Beta1ServiceUser;
246
+ }
247
+ interface V1Beta1CreateServiceUserSecretResponse {
248
+ secret?: V1Beta1SecretCredential;
249
+ }
250
+ interface V1Beta1CreateUserResponse {
251
+ user?: V1Beta1User;
252
+ }
253
+ interface V1Beta1GetCurrentUserResponse {
254
+ user?: V1Beta1User;
255
+ serviceuser?: V1Beta1ServiceUser;
256
+ }
257
+ interface V1Beta1GetGroupResponse {
258
+ group?: V1Beta1Group;
259
+ }
260
+ /** GetJWKsResponse is a valid JSON Web Key Set as specififed in rfc 7517 */
261
+ interface V1Beta1GetJWKsResponse {
262
+ keys?: V1Beta1JSONWebKey[];
263
+ }
264
+ interface V1Beta1GetMetaSchemaResponse {
265
+ metaschema?: V1Beta1MetaSchema;
266
+ }
267
+ interface V1Beta1GetNamespaceResponse {
268
+ namespace?: V1Beta1Namespace;
269
+ }
270
+ interface V1Beta1GetOrganizationAuditLogResponse {
271
+ log?: V1Beta1AuditLog;
272
+ }
273
+ interface V1Beta1GetOrganizationInvitationResponse {
274
+ invitation?: V1Beta1Invitation;
275
+ }
276
+ interface V1Beta1GetOrganizationResponse {
277
+ organization?: V1Beta1Organization;
278
+ }
279
+ interface V1Beta1GetOrganizationRoleResponse {
280
+ role?: V1Beta1Role;
281
+ }
282
+ interface V1Beta1GetOrganizationsByCurrentUserResponse {
283
+ organizations?: V1Beta1Organization[];
284
+ }
285
+ interface V1Beta1GetOrganizationsByUserResponse {
286
+ organizations?: V1Beta1Organization[];
287
+ }
288
+ interface V1Beta1GetPermissionResponse {
289
+ permission?: V1Beta1Permission;
290
+ }
291
+ interface V1Beta1GetPolicyResponse {
292
+ policy?: V1Beta1Policy;
293
+ }
294
+ interface V1Beta1GetProjectResourceResponse {
295
+ resource?: V1Beta1Resource;
296
+ }
297
+ interface V1Beta1GetProjectResponse {
298
+ project?: V1Beta1Project;
299
+ }
300
+ interface V1Beta1GetProjectsByCurrentUserResponse {
301
+ projects?: V1Beta1Project[];
302
+ }
303
+ interface V1Beta1GetProjectsByUserResponse {
304
+ projects?: V1Beta1Project[];
305
+ }
306
+ interface V1Beta1GetRelationResponse {
307
+ relation?: V1Beta1Relation;
308
+ }
309
+ interface V1Beta1GetServiceUserKeyResponse {
310
+ keys?: V1Beta1JSONWebKey[];
311
+ }
312
+ interface V1Beta1GetServiceUserResponse {
313
+ serviceuser?: V1Beta1ServiceUser;
314
+ }
315
+ interface V1Beta1GetUserResponse {
316
+ user?: V1Beta1User;
317
+ }
318
+ interface V1Beta1Group {
319
+ id?: string;
320
+ name?: string;
321
+ title?: string;
322
+ orgId?: string;
323
+ metadata?: object;
324
+ /**
325
+ * The time the group was created.
326
+ * @format date-time
327
+ * @example "2023-06-07T05:39:56.961Z"
328
+ */
329
+ createdAt?: string;
330
+ /**
331
+ * The time the group was last updated.
332
+ * @format date-time
333
+ * @example "2023-06-07T05:39:56.961Z"
334
+ */
335
+ updatedAt?: string;
336
+ }
337
+ interface V1Beta1GroupRequestBody {
338
+ /** The name of the group. The name must be unique within the entire Frontier instance. The name can contain only alphanumeric characters, dashes and underscores. */
339
+ name: string;
340
+ /** The title can contain any UTF-8 character, used to provide a human-readable name for the group. Can also be left empty. */
341
+ title?: string;
342
+ /** Metadata object for groups that can hold key value pairs defined in Group Metaschema. The metadata object can be used to store arbitrary information about the group such as labels, descriptions etc. The default Group Metaschema contains labels and descripton fields. Update the Group Metaschema to add more fields.<br/>*Example:*`{"labels": {"key": "value"}, "description": "Group description"}` */
343
+ metadata?: object;
344
+ }
345
+ interface V1Beta1Invitation {
346
+ /**
347
+ * The unique invitation identifier.
348
+ * @example "k9c4f4e2-9b9a-4c1a-8f1a-2b9b9b9b9b9b"
349
+ */
350
+ id?: string;
351
+ /**
352
+ * The user email of the invited user.
353
+ * @example "john.doe@raystack.org"
354
+ */
355
+ userId?: string;
356
+ /**
357
+ * The organization id to which the user is invited.
358
+ * @example "b9c4f4e2-9b9a-4c1a-8f1a-2b9b9b9b9b9b"
359
+ */
360
+ orgId?: string;
361
+ /**
362
+ * The list of group ids to which the user is invited.
363
+ * @example "c9c4f4e2-9b9a-4c1a-8f1a-2b9b9b9b9b9b"
364
+ */
365
+ groupIds?: string[];
366
+ /**
367
+ * The metadata of the invitation.
368
+ * @example {"key":"value"}
369
+ */
370
+ metadata?: object;
371
+ /**
372
+ * The time when the invitation was created.
373
+ * @format date-time
374
+ * @example "2023-06-07T05:39:56.961Z"
375
+ */
376
+ createdAt?: string;
377
+ /**
378
+ * The time when the invitation expires.
379
+ * @format date-time
380
+ * @example "2023-06-07T05:39:56.961Z"
381
+ */
382
+ expiresAt?: string;
383
+ }
384
+ /** JSON Web Key as specified in RFC 7517 */
385
+ interface V1Beta1JSONWebKey {
386
+ /** Key Type. */
387
+ kty?: string;
388
+ /** Algorithm. */
389
+ alg?: string;
390
+ /** Permitted uses for the public keys. */
391
+ use?: string;
392
+ /** Key ID. */
393
+ kid?: string;
394
+ /** Used for RSA keys. */
395
+ n?: string;
396
+ /** Used for RSA keys. */
397
+ e?: string;
398
+ /** Used for ECDSA keys. */
399
+ x?: string;
400
+ /** Used for ECDSA keys. */
401
+ y?: string;
402
+ /** Used for ECDSA keys. */
403
+ crv?: string;
404
+ }
405
+ interface V1Beta1KeyCredential {
406
+ type?: string;
407
+ kid?: string;
408
+ principalId?: string;
409
+ /** RSA private key as string */
410
+ privateKey?: string;
411
+ }
412
+ interface V1Beta1ListAllOrganizationsResponse {
413
+ organizations?: V1Beta1Organization[];
414
+ }
415
+ interface V1Beta1ListAllUsersResponse {
416
+ /** @format int32 */
417
+ count?: number;
418
+ users?: V1Beta1User[];
419
+ }
420
+ interface V1Beta1ListAuthStrategiesResponse {
421
+ strategies?: V1Beta1AuthStrategy[];
422
+ }
423
+ interface V1Beta1ListCurrentUserGroupsResponse {
424
+ groups?: V1Beta1Group[];
425
+ }
426
+ interface V1Beta1ListGroupUsersResponse {
427
+ users?: V1Beta1User[];
428
+ }
429
+ interface V1Beta1ListGroupsResponse {
430
+ groups?: V1Beta1Group[];
431
+ }
432
+ interface V1Beta1ListMetaSchemasResponse {
433
+ metaschemas?: V1Beta1MetaSchema[];
434
+ }
435
+ interface V1Beta1ListNamespacesResponse {
436
+ namespaces?: V1Beta1Namespace[];
437
+ }
438
+ interface V1Beta1ListOrganizationAdminsResponse {
439
+ users?: V1Beta1User[];
440
+ }
441
+ interface V1Beta1ListOrganizationAuditLogsResponse {
442
+ logs?: V1Beta1AuditLog[];
443
+ }
444
+ interface V1Beta1ListOrganizationGroupsResponse {
445
+ groups?: V1Beta1Group[];
446
+ }
447
+ interface V1Beta1ListOrganizationInvitationsResponse {
448
+ invitations?: V1Beta1Invitation[];
449
+ }
450
+ interface V1Beta1ListOrganizationProjectsResponse {
451
+ projects?: V1Beta1Project[];
452
+ }
453
+ interface V1Beta1ListOrganizationRolesResponse {
454
+ roles?: V1Beta1Role[];
455
+ }
456
+ interface V1Beta1ListOrganizationServiceUsersResponse {
457
+ serviceusers?: V1Beta1ServiceUser[];
458
+ }
459
+ interface V1Beta1ListOrganizationUsersResponse {
460
+ users?: V1Beta1User[];
461
+ }
462
+ interface V1Beta1ListOrganizationsResponse {
463
+ organizations?: V1Beta1Organization[];
464
+ }
465
+ interface V1Beta1ListPermissionsResponse {
466
+ permissions?: V1Beta1Permission[];
467
+ }
468
+ interface V1Beta1ListPoliciesResponse {
469
+ policies?: V1Beta1Policy[];
470
+ }
471
+ interface V1Beta1ListProjectAdminsResponse {
472
+ users?: V1Beta1User[];
473
+ }
474
+ interface V1Beta1ListProjectResourcesResponse {
475
+ resources?: V1Beta1Resource[];
476
+ }
477
+ interface V1Beta1ListProjectUsersResponse {
478
+ users?: V1Beta1User[];
479
+ }
480
+ interface V1Beta1ListProjectsResponse {
481
+ projects?: V1Beta1Project[];
482
+ }
483
+ interface V1Beta1ListRelationsResponse {
484
+ relations?: V1Beta1Relation[];
485
+ }
486
+ interface V1Beta1ListResourcesResponse {
487
+ resources?: V1Beta1Resource[];
488
+ }
489
+ interface V1Beta1ListRolesResponse {
490
+ roles?: V1Beta1Role[];
491
+ }
492
+ interface V1Beta1ListServiceUserKeysResponse {
493
+ keys?: V1Beta1ServiceUserKey[];
494
+ }
495
+ interface V1Beta1ListServiceUserSecretsResponse {
496
+ /** secrets will be listed without the secret value */
497
+ secrets?: V1Beta1SecretCredential[];
498
+ }
499
+ interface V1Beta1ListServiceUsersResponse {
500
+ serviceusers?: V1Beta1ServiceUser[];
501
+ }
502
+ interface V1Beta1ListUserGroupsResponse {
503
+ groups?: V1Beta1Group[];
504
+ }
505
+ interface V1Beta1ListUserInvitationsResponse {
506
+ invitations?: V1Beta1Invitation[];
507
+ }
508
+ interface V1Beta1ListUsersResponse {
509
+ /** @format int32 */
510
+ count?: number;
511
+ users?: V1Beta1User[];
512
+ }
513
+ interface V1Beta1MetaSchema {
514
+ /**
515
+ * The unique metaschema uuid.
516
+ * @example "a9c4f4e2-9b9a-4c1a-8f1a-2b9b9b9b9b9b"
517
+ */
518
+ id?: string;
519
+ name?: string;
520
+ /**
521
+ * The metaschema json schema.
522
+ * @example {"type":"object"}
523
+ */
524
+ schema?: string;
525
+ /**
526
+ * The time when the metaschema was created.
527
+ * @format date-time
528
+ * @example "2023-06-07T05:39:56.961Z"
529
+ */
530
+ createdAt?: string;
531
+ /**
532
+ * The time when the metaschema was updated.
533
+ * @format date-time
534
+ * @example "2023-06-07T05:39:56.961Z"
535
+ */
536
+ updatedAt?: string;
537
+ }
538
+ interface V1Beta1MetaSchemaRequestBody {
539
+ /** The name of the metaschema. The name must be unique within the entire Frontier instance. The name can contain only alphanumeric characters, dashes and underscores. */
540
+ name: string;
541
+ /** The schema of the metaschema. The schema must be a valid JSON schema.Please refer to https://json-schema.org/ to know more about json schema. */
542
+ schema: string;
543
+ }
544
+ interface V1Beta1Namespace {
545
+ id?: string;
546
+ /** name could be in a format like: app/organization */
547
+ name?: string;
548
+ metadata?: object;
549
+ /**
550
+ * The time the namespace was created.
551
+ * @format date-time
552
+ * @example "2023-06-07T05:39:56.961Z"
553
+ */
554
+ createdAt?: string;
555
+ /**
556
+ * The time the namespace was last updated.
557
+ * @format date-time
558
+ * @example "2023-06-07T05:39:56.961Z"
559
+ */
560
+ updatedAt?: string;
561
+ }
562
+ interface V1Beta1Organization {
563
+ id?: string;
564
+ name?: string;
565
+ title?: string;
566
+ metadata?: object;
567
+ /**
568
+ * The time the organization was created.
569
+ * @format date-time
570
+ * @example "2023-06-07T05:39:56.961Z"
571
+ */
572
+ createdAt?: string;
573
+ /**
574
+ * The time the organization was last updated.
575
+ * @format date-time
576
+ * @example "2023-06-07T05:39:56.961Z"
577
+ */
578
+ updatedAt?: string;
579
+ }
580
+ interface V1Beta1OrganizationRequestBody {
581
+ /** The name of the organization. The name must be unique within the entire Frontier instance. The name can contain only alphanumeric characters, dashes and underscores.<br/>*Example:*`"frontier-org1-acme"` */
582
+ name: string;
583
+ /** The title can contain any UTF-8 character, used to provide a human-readable name for the organization. Can also be left empty.<br/> *Example*: `"Acme Inc"` */
584
+ title?: string;
585
+ /** Metadata object for organizations that can hold key value pairs defined in Organization Metaschema. The metadata object can be used to store arbitrary information about the organization such as labels, descriptions etc. The default Organization Metaschema contains labels and descripton fields. Update the Organization Metaschema to add more fields. <br/>*Example*:`{"labels": {"key": "value"}, "description": "Organization description"}` */
586
+ metadata?: object;
587
+ }
588
+ interface V1Beta1Permission {
589
+ id?: string;
590
+ name?: string;
591
+ title?: string;
592
+ /**
593
+ * The time the permission was created.
594
+ * @format date-time
595
+ * @example "2023-06-07T05:39:56.961Z"
596
+ */
597
+ createdAt?: string;
598
+ /**
599
+ * The time the permission was last updated.
600
+ * @format date-time
601
+ * @example "2023-06-07T05:39:56.961Z"
602
+ */
603
+ updatedAt?: string;
604
+ namespace?: string;
605
+ metadata?: object;
606
+ /**
607
+ * Permission path key is composed of three parts, 'service.resource.verb'. Where 'service.resource' works as a namespace for the 'verb'.
608
+ * @example "compute.instance.get"
609
+ */
610
+ key?: string;
611
+ }
612
+ interface V1Beta1PermissionRequestBody {
613
+ /** The name of the permission. It should be unique across a Frontier instance and can contain only alphanumeric characters. */
614
+ name?: string;
615
+ /**
616
+ * namespace should be in service/resource format
617
+ * The namespace of the permission.The namespace should be in service/resource format.<br/>*Example:*`app/guardian`
618
+ */
619
+ namespace?: string;
620
+ /** The metadata object for permissions that can hold key value pairs. */
621
+ metadata?: object;
622
+ /** The title can contain any UTF-8 character, used to provide a human-readable name for the permissions. Can also be left empty. */
623
+ title?: string;
624
+ /**
625
+ * Permission path key is composed of three parts, 'service.resource.verb'. Where 'service.resource' works as a namespace for the 'verb'.
626
+ * @example "compute.instance.get"
627
+ */
628
+ key?: string;
629
+ }
630
+ interface V1Beta1Policy {
631
+ id?: string;
632
+ title?: string;
633
+ /**
634
+ * The time the policy was created.
635
+ * @format date-time
636
+ * @example "2023-06-07T05:39:56.961Z"
637
+ */
638
+ createdAt?: string;
639
+ /**
640
+ * The time the policy was last updated.
641
+ * @format date-time
642
+ * @example "2023-06-07T05:39:56.961Z"
643
+ */
644
+ updatedAt?: string;
645
+ roleId?: string;
646
+ /** namespace:uuid */
647
+ resource?: string;
648
+ /** namespace:uuid */
649
+ principal?: string;
650
+ metadata?: object;
651
+ }
652
+ interface V1Beta1PolicyRequestBody {
653
+ /** unique id of the role to which policy is assigned */
654
+ roleId: string;
655
+ /** The title can contain any UTF-8 character, used to provide a human-readable name for the policy. Can also be left empty. <br/> *Example:* `Policy title` */
656
+ title?: string;
657
+ /** The resource to which policy is assigned in this format `namespace:uuid`. <br/> *Example:* `app/guardian:70f69c3a-334b-4f25-90b8-4d4f3be6b8e2` */
658
+ resource: string;
659
+ /** principal is the user or group to which policy is assigned. The principal id must be prefixed with its namespace id in this format `namespace:uuid`. The namespace can be `app/user`, `app/group` or `app/serviceuser` (coming up!) and uuid is the unique id of the principal. <br/> *Example:* `app/user:92f69c3a-334b-4f25-90b8-4d4f3be6b825` */
660
+ principal: string;
661
+ /** Metadata object for policies that can hold key value pairs defined in Policy Metaschema.<br/> *Example:* `{"labels": {"key": "value"}, "description": "Policy description"}` */
662
+ metadata?: object;
663
+ }
664
+ interface V1Beta1Project {
665
+ id?: string;
666
+ name?: string;
667
+ title?: string;
668
+ orgId?: string;
669
+ metadata?: object;
670
+ /**
671
+ * The time the project was created.
672
+ * @format date-time
673
+ * @example "2023-06-07T05:39:56.961Z"
674
+ */
675
+ createdAt?: string;
676
+ /**
677
+ * The time the project was last updated.
678
+ * @format date-time
679
+ * @example "2023-06-07T05:39:56.961Z"
680
+ */
681
+ updatedAt?: string;
682
+ }
683
+ interface V1Beta1ProjectRequestBody {
684
+ /** The name of the project. The name must be unique within the entire Frontier instance. The name can contain only alphanumeric characters, dashes and underscores.<br/> *Example:* `frontier-playground` */
685
+ name: string;
686
+ /** The title can contain any UTF-8 character, used to provide a human-readable name for the project. Can also be left empty. <br/> *Example:* `Frontier Playground` */
687
+ title?: string;
688
+ /** Metadata object for projects that can hold key value pairs defined in Project Metaschema. */
689
+ metadata?: object;
690
+ /** unique id of the organization to which project belongs */
691
+ orgId: string;
692
+ }
693
+ interface V1Beta1Relation {
694
+ id?: string;
695
+ /**
696
+ * The time the relation was created.
697
+ * @format date-time
698
+ * @example "2023-06-07T05:39:56.961Z"
699
+ */
700
+ createdAt?: string;
701
+ /**
702
+ * The time the relation was last updated.
703
+ * @format date-time
704
+ * @example "2023-06-07T05:39:56.961Z"
705
+ */
706
+ updatedAt?: string;
707
+ subjectSubRelation?: string;
708
+ relation?: string;
709
+ /** objectnamespace:id */
710
+ object?: string;
711
+ /** subjectnamespace:id */
712
+ subject?: string;
713
+ }
714
+ interface V1Beta1RelationRequestBody {
715
+ /** objectnamespace:uuid */
716
+ object?: string;
717
+ /** subjectnamespace:uuid */
718
+ subject?: string;
719
+ relation?: string;
720
+ subjectSubRelation?: string;
721
+ }
722
+ interface V1Beta1Resource {
723
+ id?: string;
724
+ /** Name of the resource. Must be unique within the project. */
725
+ name?: string;
726
+ /**
727
+ * The time the resource was created.
728
+ * @format date-time
729
+ * @example "2023-06-07T05:39:56.961Z"
730
+ */
731
+ createdAt?: string;
732
+ /**
733
+ * The time the resource was last updated.
734
+ * @format date-time
735
+ * @example "2023-06-07T05:39:56.961Z"
736
+ */
737
+ updatedAt?: string;
738
+ urn?: string;
739
+ projectId?: string;
740
+ namespace?: string;
741
+ principal?: string;
742
+ metadata?: object;
743
+ }
744
+ interface V1Beta1ResourceRequestBody {
745
+ /** The name of the resource. Must be unique within the project. <br/> *Example:* `my-resource` */
746
+ name: string;
747
+ /** The title can contain any UTF-8 character, used to provide a human-readable name for the resource. Can also be left empty. */
748
+ title?: string;
749
+ /** The namespace of the resource. The resource namespace are created when permissions for that resource is created in Frontier. If namespace doesn't exists the request will fail. <br/> *Example:* `compute/instance` */
750
+ namespace: string;
751
+ /**
752
+ * format namespace:uuid or just uuid for user
753
+ * UserID or ServiceUserID that should be marked as owner of the resource. If not provided, the current logged in user will be made the resource owner. <br/> *Example:* `user:92f69c3a-334b-4f25-90b8-4d4f3be6b825`
754
+ */
755
+ principal?: string;
756
+ metadata?: object;
757
+ }
758
+ interface V1Beta1Role {
759
+ id?: string;
760
+ name?: string;
761
+ permissions?: string[];
762
+ title?: string;
763
+ metadata?: object;
764
+ /**
765
+ * The time the role was created.
766
+ * @format date-time
767
+ * @example "2023-06-07T05:39:56.961Z"
768
+ */
769
+ createdAt?: string;
770
+ /**
771
+ * The time the role was last updated.
772
+ * @format date-time
773
+ * @example "2023-06-07T05:39:56.961Z"
774
+ */
775
+ updatedAt?: string;
776
+ orgId?: string;
777
+ state?: string;
778
+ }
779
+ interface V1Beta1RoleRequestBody {
780
+ name?: string;
781
+ permissions?: string[];
782
+ metadata?: object;
783
+ title?: string;
784
+ }
785
+ interface V1Beta1SecretCredential {
786
+ id?: string;
787
+ title?: string;
788
+ /**
789
+ * secret will only be returned once as part of the create process
790
+ * this value is never persisted in the system so if lost, can't be recovered
791
+ */
792
+ secret?: string;
793
+ /**
794
+ * The time when the secret was created.
795
+ * @format date-time
796
+ * @example "2023-06-07T05:39:56.961Z"
797
+ */
798
+ createdAt?: string;
799
+ }
800
+ interface V1Beta1ServiceUser {
801
+ id?: string;
802
+ /**
803
+ * User friendly name of the service user.
804
+ * @example "Order Service"
805
+ */
806
+ title?: string;
807
+ metadata?: object;
808
+ /**
809
+ * The time the user was created.
810
+ * @format date-time
811
+ * @example "2023-06-07T05:39:56.961Z"
812
+ */
813
+ createdAt?: string;
814
+ /**
815
+ * The time the user was last updated.
816
+ * @format date-time
817
+ * @example "2023-06-07T05:39:56.961Z"
818
+ */
819
+ updatedAt?: string;
820
+ state?: string;
821
+ orgId?: string;
822
+ }
823
+ interface V1Beta1ServiceUserKey {
824
+ id?: string;
825
+ title?: string;
826
+ principalId?: string;
827
+ publicKey?: string;
828
+ /**
829
+ * The time when the secret was created.
830
+ * @format date-time
831
+ * @example "2023-06-07T05:39:56.961Z"
832
+ */
833
+ createdAt?: string;
834
+ }
835
+ interface V1Beta1ServiceUserRequestBody {
836
+ /**
837
+ * User friendly name of the service user.
838
+ * @example "Order Service"
839
+ */
840
+ title?: string;
841
+ metadata?: object;
842
+ }
843
+ interface V1Beta1UpdateCurrentUserResponse {
844
+ user?: V1Beta1User;
845
+ }
846
+ interface V1Beta1UpdateGroupResponse {
847
+ group?: V1Beta1Group;
848
+ }
849
+ interface V1Beta1UpdateMetaSchemaResponse {
850
+ metaschema?: V1Beta1MetaSchema;
851
+ }
852
+ interface V1Beta1UpdateOrganizationResponse {
853
+ organization?: V1Beta1Organization;
854
+ }
855
+ interface V1Beta1UpdateOrganizationRoleResponse {
856
+ role?: V1Beta1Role;
857
+ }
858
+ interface V1Beta1UpdatePermissionResponse {
859
+ permission?: V1Beta1Permission;
860
+ }
861
+ interface V1Beta1UpdatePolicyResponse {
862
+ policies?: V1Beta1Policy[];
863
+ }
864
+ interface V1Beta1UpdateProjectResourceResponse {
865
+ resource?: V1Beta1Resource;
866
+ }
867
+ interface V1Beta1UpdateProjectResponse {
868
+ project?: V1Beta1Project;
869
+ }
870
+ interface V1Beta1UpdateUserResponse {
871
+ user?: V1Beta1User;
872
+ }
873
+ interface V1Beta1User {
874
+ id?: string;
875
+ /**
876
+ * can either be empty or must start with a character
877
+ * Unique name of the user.
878
+ * @example "johndoe"
879
+ */
880
+ name?: string;
881
+ /**
882
+ * Name of the user.
883
+ * @example "John Doe"
884
+ */
885
+ title?: string;
886
+ email?: string;
887
+ metadata?: object;
888
+ /**
889
+ * The time the user was created.
890
+ * @format date-time
891
+ * @example "2023-06-07T05:39:56.961Z"
892
+ */
893
+ createdAt?: string;
894
+ /**
895
+ * The time the user was last updated.
896
+ * @format date-time
897
+ * @example "2023-06-07T05:39:56.961Z"
898
+ */
899
+ updatedAt?: string;
900
+ state?: string;
901
+ }
902
+ interface V1Beta1UserRequestBody {
903
+ /** The name of the user. The name must be unique within the entire Frontier instance. The name can contain only alphanumeric characters, dashes and underscores and must start with a letter. If not provided, Frontier automatically generates a name from the user email. */
904
+ name?: string;
905
+ /** The email of the user. The email must be unique within the entire Frontier instance.<br/>*Example:*`"john.doe@raystack.org"` */
906
+ email: string;
907
+ /** Metadata object for users that can hold key value pairs pre-defined in User Metaschema. The metadata object can be used to store arbitrary information about the user such as label, description etc. By default the user metaschema contains labels and descriptions for the user. Update the same to add more fields to the user metadata object. <br/>*Example:*`{"label": {"key1": "value1"}, "description": "User Description"}` */
908
+ metadata?: object;
909
+ /** The title can contain any UTF-8 character, used to provide a human-readable name for the user. Can also be left empty. <br/>*Example:*`"John Doe"` */
910
+ title?: string;
911
+ }
912
+
913
+ declare class V1Beta1<SecurityDataType = unknown> extends HttpClient<SecurityDataType> {
914
+ /**
915
+ * @description Lists all the groups from all the organizations in a Frontier instance. It can be filtered by organization and state.
916
+ *
917
+ * @tags Group
918
+ * @name AdminServiceListGroups
919
+ * @summary List all groups
920
+ * @request GET:/v1beta1/admin/groups
921
+ * @secure
922
+ */
923
+ adminServiceListGroups: (query?: {
924
+ /** The organization id to filter by. */
925
+ orgId?: string;
926
+ /** The state to filter by. It can be enabled or disabled. */
927
+ state?: string;
928
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListGroupsResponse, RpcStatus>>;
929
+ /**
930
+ * @description Lists all the organizations in a Frontier instance. It can be filtered by user and state.
931
+ *
932
+ * @tags Organization
933
+ * @name AdminServiceListAllOrganizations
934
+ * @summary List all organizations
935
+ * @request GET:/v1beta1/admin/organizations
936
+ * @secure
937
+ */
938
+ adminServiceListAllOrganizations: (query?: {
939
+ /** The user id to filter by. */
940
+ userId?: string;
941
+ /** The state to filter by. It can be enabled or disabled. */
942
+ state?: string;
943
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListAllOrganizationsResponse, RpcStatus>>;
944
+ /**
945
+ * @description Lists all the projects from all the organizations in a Frontier instance. It can be filtered by organization and state.
946
+ *
947
+ * @tags Project
948
+ * @name AdminServiceListProjects
949
+ * @summary List all projects
950
+ * @request GET:/v1beta1/admin/projects
951
+ * @secure
952
+ */
953
+ adminServiceListProjects: (query?: {
954
+ /** The organization id to filter by. */
955
+ orgId?: string;
956
+ /** The state to filter by. It can be enabled or disabled. */
957
+ state?: string;
958
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListProjectsResponse, RpcStatus>>;
959
+ /**
960
+ * No description
961
+ *
962
+ * @tags Relation
963
+ * @name AdminServiceListRelations
964
+ * @summary List all relations
965
+ * @request GET:/v1beta1/admin/relations
966
+ * @secure
967
+ */
968
+ adminServiceListRelations: (params?: RequestParams) => Promise<HttpResponse<V1Beta1ListRelationsResponse, RpcStatus>>;
969
+ /**
970
+ * @description Lists all the resources from all the organizations in a Frontier instance. It can be filtered by user, project, organization and namespace.
971
+ *
972
+ * @tags Resource
973
+ * @name AdminServiceListResources
974
+ * @summary List all resources
975
+ * @request GET:/v1beta1/admin/resources
976
+ * @secure
977
+ */
978
+ adminServiceListResources: (query?: {
979
+ /** The user id to filter by. */
980
+ userId?: string;
981
+ /** The project id to filter by. */
982
+ projectId?: string;
983
+ /** The organization id to filter by. */
984
+ organizationId?: string;
985
+ /** The namespace to filter by. */
986
+ namespace?: string;
987
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListResourcesResponse, RpcStatus>>;
988
+ /**
989
+ * @description Lists all the users from all the organizations in a Frontier instance. It can be filtered by keyword, organization, group and state.
990
+ *
991
+ * @tags User
992
+ * @name AdminServiceListAllUsers
993
+ * @summary List all users
994
+ * @request GET:/v1beta1/admin/users
995
+ * @secure
996
+ */
997
+ adminServiceListAllUsers: (query?: {
998
+ /**
999
+ * The maximum number of users to return per page. The default is 50.
1000
+ * @format int32
1001
+ */
1002
+ pageSize?: number;
1003
+ /**
1004
+ * The page number to return. The default is 1.
1005
+ * @format int32
1006
+ */
1007
+ pageNum?: number;
1008
+ /** The keyword to search for. It can be a user's name, email,metadata or id. */
1009
+ keyword?: string;
1010
+ /** The organization id to filter by. */
1011
+ orgId?: string;
1012
+ /** The group id to filter by. */
1013
+ groupId?: string;
1014
+ /** The state to filter by. It can be enabled or disabled. */
1015
+ state?: string;
1016
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListAllUsersResponse, RpcStatus>>;
1017
+ /**
1018
+ * @description Returns a list of identity providers configured on an instance level in Frontier. e.g Google, AzureAD, Github etc
1019
+ *
1020
+ * @tags Authn
1021
+ * @name FrontierServiceListAuthStrategies
1022
+ * @summary List authentication strategies
1023
+ * @request GET:/v1beta1/auth
1024
+ * @secure
1025
+ */
1026
+ frontierServiceListAuthStrategies: (params?: RequestParams) => Promise<HttpResponse<V1Beta1ListAuthStrategiesResponse, RpcStatus>>;
1027
+ /**
1028
+ * @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.
1029
+ *
1030
+ * @tags Authn
1031
+ * @name FrontierServiceAuthCallback
1032
+ * @summary Callback from a strategy
1033
+ * @request GET:/v1beta1/auth/callback
1034
+ * @secure
1035
+ */
1036
+ frontierServiceAuthCallback: (query?: {
1037
+ /** strategy_name will not be set for oidc but can be utilized for methods like email magic links */
1038
+ strategyName?: string;
1039
+ /** for oidc & magic links */
1040
+ state?: string;
1041
+ code?: string;
1042
+ }, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1043
+ /**
1044
+ * @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.
1045
+ *
1046
+ * @tags Authn
1047
+ * @name FrontierServiceAuthCallback2
1048
+ * @summary Callback from a strategy
1049
+ * @request POST:/v1beta1/auth/callback
1050
+ * @secure
1051
+ */
1052
+ frontierServiceAuthCallback2: (body: V1Beta1AuthCallbackRequest, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1053
+ /**
1054
+ * No description
1055
+ *
1056
+ * @tags Authz
1057
+ * @name FrontierServiceGetJwKs
1058
+ * @summary Get well known JWKs
1059
+ * @request GET:/v1beta1/auth/jwks
1060
+ * @secure
1061
+ */
1062
+ frontierServiceGetJwKs: (params?: RequestParams) => Promise<HttpResponse<V1Beta1GetJWKsResponse, RpcStatus>>;
1063
+ /**
1064
+ * No description
1065
+ *
1066
+ * @tags Authn
1067
+ * @name FrontierServiceAuthLogout
1068
+ * @summary Logout from a strategy
1069
+ * @request GET:/v1beta1/auth/logout
1070
+ * @secure
1071
+ */
1072
+ frontierServiceAuthLogout: (params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1073
+ /**
1074
+ * No description
1075
+ *
1076
+ * @tags Authn
1077
+ * @name FrontierServiceAuthLogout2
1078
+ * @summary Logout from a strategy
1079
+ * @request DELETE:/v1beta1/auth/logout
1080
+ * @secure
1081
+ */
1082
+ frontierServiceAuthLogout2: (params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1083
+ /**
1084
+ * @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.
1085
+ *
1086
+ * @tags Authn
1087
+ * @name FrontierServiceAuthenticate
1088
+ * @summary Authenticate with a strategy
1089
+ * @request GET:/v1beta1/auth/register/{strategyName}
1090
+ * @secure
1091
+ */
1092
+ frontierServiceAuthenticate: (strategyName: string, query?: {
1093
+ /**
1094
+ * by default, location redirect header for starting authentication flow if applicable
1095
+ * will be skipped unless this is set to true, useful in browser
1096
+ *
1097
+ * If set to true, location header will be set for redirect
1098
+ */
1099
+ redirect?: boolean;
1100
+ /**
1101
+ * by default, after successful authentication no operation will be performed
1102
+ * to apply redirection in case of browsers, provide a url that will be used
1103
+ * for redirection after authentication
1104
+ *
1105
+ * URL to redirect after successful authentication.<br/> *Example:*`"https://frontier.example.com"`
1106
+ */
1107
+ returnTo?: string;
1108
+ /**
1109
+ * email of the user for magic links
1110
+ *
1111
+ * Email of the user to authenticate. Used for magic links.<br/> *Example:*`example@acme.org`
1112
+ */
1113
+ email?: string;
1114
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1AuthenticateResponse, RpcStatus>>;
1115
+ /**
1116
+ * @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.
1117
+ *
1118
+ * @tags Authn
1119
+ * @name FrontierServiceAuthenticate2
1120
+ * @summary Authenticate with a strategy
1121
+ * @request POST:/v1beta1/auth/register/{strategyName}
1122
+ * @secure
1123
+ */
1124
+ frontierServiceAuthenticate2: (strategyName: string, body: {
1125
+ /**
1126
+ * by default, location redirect header for starting authentication flow if applicable
1127
+ * will be skipped unless this is set to true, useful in browser
1128
+ * If set to true, location header will be set for redirect
1129
+ */
1130
+ redirect?: boolean;
1131
+ /**
1132
+ * by default, after successful authentication no operation will be performed
1133
+ * to apply redirection in case of browsers, provide a url that will be used
1134
+ * for redirection after authentication
1135
+ * URL to redirect after successful authentication.<br/> *Example:*`"https://frontier.example.com"`
1136
+ */
1137
+ returnTo?: string;
1138
+ /**
1139
+ * email of the user for magic links
1140
+ * Email of the user to authenticate. Used for magic links.<br/> *Example:*`example@acme.org`
1141
+ */
1142
+ email?: string;
1143
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1AuthenticateResponse, RpcStatus>>;
1144
+ /**
1145
+ * @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.
1146
+ *
1147
+ * @tags Authn
1148
+ * @name FrontierServiceAuthToken
1149
+ * @summary Generate access token by given credentials
1150
+ * @request POST:/v1beta1/auth/token
1151
+ * @secure
1152
+ */
1153
+ frontierServiceAuthToken: (body: V1Beta1AuthTokenRequest, params?: RequestParams) => Promise<HttpResponse<V1Beta1AuthTokenResponse, RpcStatus>>;
1154
+ /**
1155
+ * @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).
1156
+ *
1157
+ * @tags Authz
1158
+ * @name FrontierServiceCheckResourcePermission
1159
+ * @summary Check
1160
+ * @request POST:/v1beta1/check
1161
+ * @secure
1162
+ */
1163
+ frontierServiceCheckResourcePermission: (body: V1Beta1CheckResourcePermissionRequest, params?: RequestParams) => Promise<HttpResponse<V1Beta1CheckResourcePermissionResponse, RpcStatus>>;
1164
+ /**
1165
+ * @description Returns a list of all metaschemas configured on an instance level in Frontier. e.g user, project, organization etc
1166
+ *
1167
+ * @tags MetaSchema
1168
+ * @name FrontierServiceListMetaSchemas
1169
+ * @summary List metaschemas
1170
+ * @request GET:/v1beta1/meta/schemas
1171
+ * @secure
1172
+ */
1173
+ frontierServiceListMetaSchemas: (params?: RequestParams) => Promise<HttpResponse<V1Beta1ListMetaSchemasResponse, RpcStatus>>;
1174
+ /**
1175
+ * @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"}}}}`
1176
+ *
1177
+ * @tags MetaSchema
1178
+ * @name FrontierServiceCreateMetaSchema
1179
+ * @summary Create metaschema
1180
+ * @request POST:/v1beta1/meta/schemas
1181
+ * @secure
1182
+ */
1183
+ frontierServiceCreateMetaSchema: (body: V1Beta1MetaSchemaRequestBody, params?: RequestParams) => Promise<HttpResponse<V1Beta1CreateMetaSchemaResponse, RpcStatus>>;
1184
+ /**
1185
+ * @description Get a metadata schema by ID.
1186
+ *
1187
+ * @tags MetaSchema
1188
+ * @name FrontierServiceGetMetaSchema
1189
+ * @summary Get metaschema
1190
+ * @request GET:/v1beta1/meta/schemas/{id}
1191
+ * @secure
1192
+ */
1193
+ frontierServiceGetMetaSchema: (id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetMetaSchemaResponse, RpcStatus>>;
1194
+ /**
1195
+ * @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).
1196
+ *
1197
+ * @tags MetaSchema
1198
+ * @name FrontierServiceDeleteMetaSchema
1199
+ * @summary Delete metaschema
1200
+ * @request DELETE:/v1beta1/meta/schemas/{id}
1201
+ * @secure
1202
+ */
1203
+ frontierServiceDeleteMetaSchema: (id: string, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1204
+ /**
1205
+ * @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"}}}}`
1206
+ *
1207
+ * @tags MetaSchema
1208
+ * @name FrontierServiceUpdateMetaSchema
1209
+ * @summary Update metaschema
1210
+ * @request PUT:/v1beta1/meta/schemas/{id}
1211
+ * @secure
1212
+ */
1213
+ frontierServiceUpdateMetaSchema: (id: string, body: V1Beta1MetaSchemaRequestBody, params?: RequestParams) => Promise<HttpResponse<V1Beta1UpdateMetaSchemaResponse, RpcStatus>>;
1214
+ /**
1215
+ * @description Returns the list of all namespaces in a Frontier instance
1216
+ *
1217
+ * @tags Namespace
1218
+ * @name FrontierServiceListNamespaces
1219
+ * @summary Get all namespaces
1220
+ * @request GET:/v1beta1/namespaces
1221
+ * @secure
1222
+ */
1223
+ frontierServiceListNamespaces: (params?: RequestParams) => Promise<HttpResponse<V1Beta1ListNamespacesResponse, RpcStatus>>;
1224
+ /**
1225
+ * @description Returns a namespace by ID
1226
+ *
1227
+ * @tags Namespace
1228
+ * @name FrontierServiceGetNamespace
1229
+ * @summary Get namespace
1230
+ * @request GET:/v1beta1/namespaces/{id}
1231
+ * @secure
1232
+ */
1233
+ frontierServiceGetNamespace: (id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetNamespaceResponse, RpcStatus>>;
1234
+ /**
1235
+ * @description Returns a list of audit logs of an organization in Frontier.
1236
+ *
1237
+ * @tags AuditLog
1238
+ * @name FrontierServiceListOrganizationAuditLogs
1239
+ * @summary List audit logs
1240
+ * @request GET:/v1beta1/organization/{orgId}/auditlogs
1241
+ * @secure
1242
+ */
1243
+ frontierServiceListOrganizationAuditLogs: (orgId: string, query?: {
1244
+ source?: string;
1245
+ action?: string;
1246
+ /**
1247
+ * start_time and end_time are inclusive
1248
+ * @format date-time
1249
+ */
1250
+ startTime?: string;
1251
+ /** @format date-time */
1252
+ endTime?: string;
1253
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListOrganizationAuditLogsResponse, RpcStatus>>;
1254
+ /**
1255
+ * @description Create new audit logs in a batch.
1256
+ *
1257
+ * @tags AuditLog
1258
+ * @name FrontierServiceCreateOrganizationAuditLogs
1259
+ * @summary Create audit log
1260
+ * @request POST:/v1beta1/organization/{orgId}/auditlogs
1261
+ * @secure
1262
+ */
1263
+ frontierServiceCreateOrganizationAuditLogs: (orgId: string, body: {
1264
+ logs?: V1Beta1AuditLog[];
1265
+ }, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1266
+ /**
1267
+ * @description Get an audit log by ID.
1268
+ *
1269
+ * @tags AuditLog
1270
+ * @name FrontierServiceGetOrganizationAuditLog
1271
+ * @summary Get audit log
1272
+ * @request GET:/v1beta1/organization/{orgId}/auditlogs/{id}
1273
+ * @secure
1274
+ */
1275
+ frontierServiceGetOrganizationAuditLog: (orgId: string, id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetOrganizationAuditLogResponse, RpcStatus>>;
1276
+ /**
1277
+ * @description Returns a list of organizations. It can be filtered by userID or organization state.
1278
+ *
1279
+ * @tags Organization
1280
+ * @name FrontierServiceListOrganizations
1281
+ * @summary List organizations
1282
+ * @request GET:/v1beta1/organizations
1283
+ * @secure
1284
+ */
1285
+ frontierServiceListOrganizations: (query?: {
1286
+ /** The user ID to filter by. It can be used to list all the organizations that the user is a member of. Otherwise, all the organizations in the Frontier instance will be listed. */
1287
+ userId?: string;
1288
+ /** The state to filter by. It can be `enabled` or `disabled`. */
1289
+ state?: string;
1290
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListOrganizationsResponse, RpcStatus>>;
1291
+ /**
1292
+ * No description
1293
+ *
1294
+ * @tags Organization
1295
+ * @name FrontierServiceCreateOrganization
1296
+ * @summary Create organization
1297
+ * @request POST:/v1beta1/organizations
1298
+ * @secure
1299
+ */
1300
+ frontierServiceCreateOrganization: (body: V1Beta1OrganizationRequestBody, params?: RequestParams) => Promise<HttpResponse<V1Beta1CreateOrganizationResponse, RpcStatus>>;
1301
+ /**
1302
+ * @description Get organization by ID or name
1303
+ *
1304
+ * @tags Organization
1305
+ * @name FrontierServiceGetOrganization
1306
+ * @summary Get organization
1307
+ * @request GET:/v1beta1/organizations/{id}
1308
+ * @secure
1309
+ */
1310
+ frontierServiceGetOrganization: (id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetOrganizationResponse, RpcStatus>>;
1311
+ /**
1312
+ * @description Delete an organization and all of its relations permanently. The organization users will not be deleted from Frontier.
1313
+ *
1314
+ * @tags Organization
1315
+ * @name FrontierServiceDeleteOrganization
1316
+ * @summary Delete organization
1317
+ * @request DELETE:/v1beta1/organizations/{id}
1318
+ * @secure
1319
+ */
1320
+ frontierServiceDeleteOrganization: (id: string, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1321
+ /**
1322
+ * @description Update organization by ID
1323
+ *
1324
+ * @tags Organization
1325
+ * @name FrontierServiceUpdateOrganization
1326
+ * @summary Update organization
1327
+ * @request PUT:/v1beta1/organizations/{id}
1328
+ * @secure
1329
+ */
1330
+ frontierServiceUpdateOrganization: (id: string, body: V1Beta1OrganizationRequestBody, params?: RequestParams) => Promise<HttpResponse<V1Beta1UpdateOrganizationResponse, RpcStatus>>;
1331
+ /**
1332
+ * @description Returns a list admins of an organization
1333
+ *
1334
+ * @tags Organization
1335
+ * @name FrontierServiceListOrganizationAdmins
1336
+ * @summary List organization admins
1337
+ * @request GET:/v1beta1/organizations/{id}/admins
1338
+ * @secure
1339
+ */
1340
+ frontierServiceListOrganizationAdmins: (id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListOrganizationAdminsResponse, RpcStatus>>;
1341
+ /**
1342
+ * @description Sets the state of the organization as disabled. The existing users in the org will not be able to access any organization resources.
1343
+ *
1344
+ * @tags Organization
1345
+ * @name FrontierServiceDisableOrganization
1346
+ * @summary Disable organization
1347
+ * @request POST:/v1beta1/organizations/{id}/disable
1348
+ * @secure
1349
+ */
1350
+ frontierServiceDisableOrganization: (id: string, body: object, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1351
+ /**
1352
+ * @description Sets the state of the organization as enabled. The existing users in the org will be able to access any organization resources.
1353
+ *
1354
+ * @tags Organization
1355
+ * @name FrontierServiceEnableOrganization
1356
+ * @summary Enable organization
1357
+ * @request POST:/v1beta1/organizations/{id}/enable
1358
+ * @secure
1359
+ */
1360
+ frontierServiceEnableOrganization: (id: string, body: object, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1361
+ /**
1362
+ * @description Get all projects that belong to an organization
1363
+ *
1364
+ * @tags Organization
1365
+ * @name FrontierServiceListOrganizationProjects
1366
+ * @summary Get organization projects
1367
+ * @request GET:/v1beta1/organizations/{id}/projects
1368
+ * @secure
1369
+ */
1370
+ frontierServiceListOrganizationProjects: (id: string, query?: {
1371
+ /** Filter projects by state. If not specified, all projects are returned. <br/> *Possible values:* `enabled` or `disabled` */
1372
+ state?: string;
1373
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListOrganizationProjectsResponse, RpcStatus>>;
1374
+ /**
1375
+ * No description
1376
+ *
1377
+ * @tags Organization
1378
+ * @name FrontierServiceListOrganizationServiceUsers
1379
+ * @summary List organization service users
1380
+ * @request GET:/v1beta1/organizations/{id}/serviceusers
1381
+ * @secure
1382
+ */
1383
+ frontierServiceListOrganizationServiceUsers: (id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListOrganizationServiceUsersResponse, RpcStatus>>;
1384
+ /**
1385
+ * No description
1386
+ *
1387
+ * @tags Organization
1388
+ * @name FrontierServiceListOrganizationUsers
1389
+ * @summary List organization users
1390
+ * @request GET:/v1beta1/organizations/{id}/users
1391
+ * @secure
1392
+ */
1393
+ frontierServiceListOrganizationUsers: (id: string, query?: {
1394
+ permissionFilter?: string;
1395
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListOrganizationUsersResponse, RpcStatus>>;
1396
+ /**
1397
+ * @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
1398
+ *
1399
+ * @tags Organization
1400
+ * @name FrontierServiceAddOrganizationUsers
1401
+ * @summary Add organization user
1402
+ * @request POST:/v1beta1/organizations/{id}/users
1403
+ * @secure
1404
+ */
1405
+ frontierServiceAddOrganizationUsers: (id: string, body: {
1406
+ /** List of user IDs to be added to the organization. */
1407
+ userIds?: string[];
1408
+ }, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1409
+ /**
1410
+ * @description Remove a user from an organization
1411
+ *
1412
+ * @tags Organization
1413
+ * @name FrontierServiceRemoveOrganizationUser
1414
+ * @summary Remove organization user
1415
+ * @request DELETE:/v1beta1/organizations/{id}/users/{userId}
1416
+ * @secure
1417
+ */
1418
+ frontierServiceRemoveOrganizationUser: (id: string, userId: string, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1419
+ /**
1420
+ * @description Get all groups that belong to an organization. The results can be filtered by state which can be either be enabled or disabled.
1421
+ *
1422
+ * @tags Group
1423
+ * @name FrontierServiceListOrganizationGroups
1424
+ * @summary List organization groups
1425
+ * @request GET:/v1beta1/organizations/{orgId}/groups
1426
+ * @secure
1427
+ */
1428
+ frontierServiceListOrganizationGroups: (orgId: string, query?: {
1429
+ /** The state of the group to filter by. It can be enabled or disabled. */
1430
+ state?: string;
1431
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListOrganizationGroupsResponse, RpcStatus>>;
1432
+ /**
1433
+ * @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.
1434
+ *
1435
+ * @tags Group
1436
+ * @name FrontierServiceCreateGroup
1437
+ * @summary Create group
1438
+ * @request POST:/v1beta1/organizations/{orgId}/groups
1439
+ * @secure
1440
+ */
1441
+ frontierServiceCreateGroup: (orgId: string, body: V1Beta1GroupRequestBody, params?: RequestParams) => Promise<HttpResponse<V1Beta1CreateGroupResponse, RpcStatus>>;
1442
+ /**
1443
+ * No description
1444
+ *
1445
+ * @tags Group
1446
+ * @name FrontierServiceGetGroup
1447
+ * @summary Get group
1448
+ * @request GET:/v1beta1/organizations/{orgId}/groups/{id}
1449
+ * @secure
1450
+ */
1451
+ frontierServiceGetGroup: (orgId: string, id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetGroupResponse, RpcStatus>>;
1452
+ /**
1453
+ * @description Delete an organization group permanently and all of its relations
1454
+ *
1455
+ * @tags Group
1456
+ * @name FrontierServiceDeleteGroup
1457
+ * @summary Delete group
1458
+ * @request DELETE:/v1beta1/organizations/{orgId}/groups/{id}
1459
+ * @secure
1460
+ */
1461
+ frontierServiceDeleteGroup: (orgId: string, id: string, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1462
+ /**
1463
+ * No description
1464
+ *
1465
+ * @tags Group
1466
+ * @name FrontierServiceUpdateGroup
1467
+ * @summary Update group
1468
+ * @request PUT:/v1beta1/organizations/{orgId}/groups/{id}
1469
+ * @secure
1470
+ */
1471
+ frontierServiceUpdateGroup: (orgId: string, id: string, body: V1Beta1GroupRequestBody, params?: RequestParams) => Promise<HttpResponse<V1Beta1UpdateGroupResponse, RpcStatus>>;
1472
+ /**
1473
+ * @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.
1474
+ *
1475
+ * @tags Group
1476
+ * @name FrontierServiceDisableGroup
1477
+ * @summary Disable group
1478
+ * @request POST:/v1beta1/organizations/{orgId}/groups/{id}/disable
1479
+ * @secure
1480
+ */
1481
+ frontierServiceDisableGroup: (orgId: string, id: string, body: object, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1482
+ /**
1483
+ * @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.
1484
+ *
1485
+ * @tags Group
1486
+ * @name FrontierServiceEnableGroup
1487
+ * @summary Enable group
1488
+ * @request POST:/v1beta1/organizations/{orgId}/groups/{id}/enable
1489
+ * @secure
1490
+ */
1491
+ frontierServiceEnableGroup: (orgId: string, id: string, body: object, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1492
+ /**
1493
+ * @description Returns a list of users that belong to a group.
1494
+ *
1495
+ * @tags Group
1496
+ * @name FrontierServiceListGroupUsers
1497
+ * @summary List group users
1498
+ * @request GET:/v1beta1/organizations/{orgId}/groups/{id}/users
1499
+ * @secure
1500
+ */
1501
+ frontierServiceListGroupUsers: (orgId: string, id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListGroupUsersResponse, RpcStatus>>;
1502
+ /**
1503
+ * @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.
1504
+ *
1505
+ * @tags Group
1506
+ * @name FrontierServiceAddGroupUsers
1507
+ * @summary Add group user
1508
+ * @request POST:/v1beta1/organizations/{orgId}/groups/{id}/users
1509
+ * @secure
1510
+ */
1511
+ frontierServiceAddGroupUsers: (orgId: string, id: string, body: {
1512
+ userIds?: string[];
1513
+ }, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1514
+ /**
1515
+ * @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.
1516
+ *
1517
+ * @tags Group
1518
+ * @name FrontierServiceRemoveGroupUser
1519
+ * @summary Remove group user
1520
+ * @request DELETE:/v1beta1/organizations/{orgId}/groups/{id}/users/{userId}
1521
+ * @secure
1522
+ */
1523
+ frontierServiceRemoveGroupUser: (orgId: string, id: string, userId: string, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1524
+ /**
1525
+ * @description Returns all pending invitations queued for an organization
1526
+ *
1527
+ * @tags Organization
1528
+ * @name FrontierServiceListOrganizationInvitations
1529
+ * @summary List pending invitations
1530
+ * @request GET:/v1beta1/organizations/{orgId}/invitations
1531
+ * @secure
1532
+ */
1533
+ frontierServiceListOrganizationInvitations: (orgId: string, query?: {
1534
+ /** user_id filter is the email id of user who are invited inside the organization. */
1535
+ userId?: string;
1536
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListOrganizationInvitationsResponse, RpcStatus>>;
1537
+ /**
1538
+ * @description Invite users to an organization, if the user doesn't exists, it will be created and notified. Invitations expire in 7 days
1539
+ *
1540
+ * @tags Organization
1541
+ * @name FrontierServiceCreateOrganizationInvitation
1542
+ * @summary Invite user
1543
+ * @request POST:/v1beta1/organizations/{orgId}/invitations
1544
+ * @secure
1545
+ */
1546
+ frontierServiceCreateOrganizationInvitation: (orgId: string, body: {
1547
+ /** user_id is email id of user who are invited inside the organization. If user is not registered on the platform, it will be notified */
1548
+ userId: string;
1549
+ /** list of group ids to which user needs to be added as a member. */
1550
+ groupIds?: string[];
1551
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1CreateOrganizationInvitationResponse, RpcStatus>>;
1552
+ /**
1553
+ * @description Returns a pending invitation queued for an organization
1554
+ *
1555
+ * @tags Organization
1556
+ * @name FrontierServiceGetOrganizationInvitation
1557
+ * @summary Get pending invitation
1558
+ * @request GET:/v1beta1/organizations/{orgId}/invitations/{id}
1559
+ * @secure
1560
+ */
1561
+ frontierServiceGetOrganizationInvitation: (orgId: string, id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetOrganizationInvitationResponse, RpcStatus>>;
1562
+ /**
1563
+ * @description Delete a pending invitation queued for an organization
1564
+ *
1565
+ * @tags Organization
1566
+ * @name FrontierServiceDeleteOrganizationInvitation
1567
+ * @summary Delete pending invitation
1568
+ * @request DELETE:/v1beta1/organizations/{orgId}/invitations/{id}
1569
+ * @secure
1570
+ */
1571
+ frontierServiceDeleteOrganizationInvitation: (orgId: string, id: string, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1572
+ /**
1573
+ * @description Accept pending invitation queued for an organization. The user will be added to the organization and groups defined in the invitation
1574
+ *
1575
+ * @tags Organization
1576
+ * @name FrontierServiceAcceptOrganizationInvitation
1577
+ * @summary Accept pending invitation
1578
+ * @request POST:/v1beta1/organizations/{orgId}/invitations/{id}/accept
1579
+ * @secure
1580
+ */
1581
+ frontierServiceAcceptOrganizationInvitation: (orgId: string, id: string, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1582
+ /**
1583
+ * @description Returns a list of custom roles created under an organization with their associated permissions
1584
+ *
1585
+ * @tags Role
1586
+ * @name FrontierServiceListOrganizationRoles
1587
+ * @summary List organization roles
1588
+ * @request GET:/v1beta1/organizations/{orgId}/roles
1589
+ * @secure
1590
+ */
1591
+ frontierServiceListOrganizationRoles: (orgId: string, query?: {
1592
+ state?: string;
1593
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListOrganizationRolesResponse, RpcStatus>>;
1594
+ /**
1595
+ * @description Create a custom role under an organization. This custom role will only be available for assignment to the principles within the organization.
1596
+ *
1597
+ * @tags Role
1598
+ * @name FrontierServiceCreateOrganizationRole
1599
+ * @summary Create organization role
1600
+ * @request POST:/v1beta1/organizations/{orgId}/roles
1601
+ * @secure
1602
+ */
1603
+ frontierServiceCreateOrganizationRole: (orgId: string, body: V1Beta1RoleRequestBody, params?: RequestParams) => Promise<HttpResponse<V1Beta1CreateOrganizationRoleResponse, RpcStatus>>;
1604
+ /**
1605
+ * @description Returns a custom role under an organization along with its associated permissions
1606
+ *
1607
+ * @tags Role
1608
+ * @name FrontierServiceGetOrganizationRole
1609
+ * @summary Get organization role
1610
+ * @request GET:/v1beta1/organizations/{orgId}/roles/{id}
1611
+ * @secure
1612
+ */
1613
+ frontierServiceGetOrganizationRole: (orgId: string, id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetOrganizationRoleResponse, RpcStatus>>;
1614
+ /**
1615
+ * @description Delete a custom role and all of its relations under an organization permanently.
1616
+ *
1617
+ * @tags Role
1618
+ * @name FrontierServiceDeleteOrganizationRole
1619
+ * @summary Delete organization role
1620
+ * @request DELETE:/v1beta1/organizations/{orgId}/roles/{id}
1621
+ * @secure
1622
+ */
1623
+ frontierServiceDeleteOrganizationRole: (orgId: string, id: string, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1624
+ /**
1625
+ * @description Update a custom role under an organization. This custom role will only be available for assignment to the principles within the organization.
1626
+ *
1627
+ * @tags Role
1628
+ * @name FrontierServiceUpdateOrganizationRole
1629
+ * @summary Update organization role
1630
+ * @request PUT:/v1beta1/organizations/{orgId}/roles/{id}
1631
+ * @secure
1632
+ */
1633
+ frontierServiceUpdateOrganizationRole: (orgId: string, id: string, body: V1Beta1RoleRequestBody, params?: RequestParams) => Promise<HttpResponse<V1Beta1UpdateOrganizationRoleResponse, RpcStatus>>;
1634
+ /**
1635
+ * No description
1636
+ *
1637
+ * @tags Permission
1638
+ * @name FrontierServiceListPermissions
1639
+ * @summary Get all permissions
1640
+ * @request GET:/v1beta1/permissions
1641
+ * @secure
1642
+ */
1643
+ frontierServiceListPermissions: (params?: RequestParams) => Promise<HttpResponse<V1Beta1ListPermissionsResponse, RpcStatus>>;
1644
+ /**
1645
+ * @description Creates a permission. It can be used to grant permissions to all the resources in a Frontier instance.
1646
+ *
1647
+ * @tags Permission
1648
+ * @name AdminServiceCreatePermission
1649
+ * @summary Create platform permission
1650
+ * @request POST:/v1beta1/permissions
1651
+ * @secure
1652
+ */
1653
+ adminServiceCreatePermission: (body: V1Beta1CreatePermissionRequest, params?: RequestParams) => Promise<HttpResponse<V1Beta1CreatePermissionResponse, RpcStatus>>;
1654
+ /**
1655
+ * @description Returns a permission by ID
1656
+ *
1657
+ * @tags Permission
1658
+ * @name FrontierServiceGetPermission
1659
+ * @summary Get permission
1660
+ * @request GET:/v1beta1/permissions/{id}
1661
+ * @secure
1662
+ */
1663
+ frontierServiceGetPermission: (id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetPermissionResponse, RpcStatus>>;
1664
+ /**
1665
+ * No description
1666
+ *
1667
+ * @tags Permission
1668
+ * @name AdminServiceDeletePermission
1669
+ * @summary Delete platform permission
1670
+ * @request DELETE:/v1beta1/permissions/{id}
1671
+ * @secure
1672
+ */
1673
+ adminServiceDeletePermission: (id: string, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1674
+ /**
1675
+ * @description Updates a permission by ID. It can be used to grant permissions to all the resources in a Frontier instance.
1676
+ *
1677
+ * @tags Permission
1678
+ * @name AdminServiceUpdatePermission
1679
+ * @summary Update platform permission
1680
+ * @request PUT:/v1beta1/permissions/{id}
1681
+ * @secure
1682
+ */
1683
+ adminServiceUpdatePermission: (id: string, body: V1Beta1PermissionRequestBody, params?: RequestParams) => Promise<HttpResponse<V1Beta1UpdatePermissionResponse, RpcStatus>>;
1684
+ /**
1685
+ * @description Lists all the policies from all the organizations in a Frontier instance. It can be filtered by organization, project, user, role and group.
1686
+ *
1687
+ * @tags Policy
1688
+ * @name AdminServiceListPolicies
1689
+ * @summary List all policies
1690
+ * @request GET:/v1beta1/policies
1691
+ * @secure
1692
+ */
1693
+ adminServiceListPolicies: (query?: {
1694
+ /** The organization id to filter by. */
1695
+ orgId?: string;
1696
+ /** The project id to filter by. */
1697
+ projectId?: string;
1698
+ /** The user id to filter by. */
1699
+ userId?: string;
1700
+ /** The role id to filter by. */
1701
+ roleId?: string;
1702
+ /** The group id to filter by. */
1703
+ groupId?: string;
1704
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListPoliciesResponse, RpcStatus>>;
1705
+ /**
1706
+ * @description Creates a policy
1707
+ *
1708
+ * @tags Policy
1709
+ * @name FrontierServiceCreatePolicy
1710
+ * @summary Create policy
1711
+ * @request POST:/v1beta1/policies
1712
+ * @secure
1713
+ */
1714
+ frontierServiceCreatePolicy: (body: V1Beta1PolicyRequestBody, params?: RequestParams) => Promise<HttpResponse<V1Beta1CreatePolicyResponse, RpcStatus>>;
1715
+ /**
1716
+ * @description Returns a policy by ID
1717
+ *
1718
+ * @tags Policy
1719
+ * @name FrontierServiceGetPolicy
1720
+ * @summary Get policy
1721
+ * @request GET:/v1beta1/policies/{id}
1722
+ * @secure
1723
+ */
1724
+ frontierServiceGetPolicy: (id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetPolicyResponse, RpcStatus>>;
1725
+ /**
1726
+ * @description Delete a policy all of its relations permanently.
1727
+ *
1728
+ * @tags Policy
1729
+ * @name FrontierServiceDeletePolicy
1730
+ * @summary Delete Policy
1731
+ * @request DELETE:/v1beta1/policies/{id}
1732
+ * @secure
1733
+ */
1734
+ frontierServiceDeletePolicy: (id: string, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1735
+ /**
1736
+ * @description Updates a policy by ID
1737
+ *
1738
+ * @tags Policy
1739
+ * @name FrontierServiceUpdatePolicy
1740
+ * @summary Update policy
1741
+ * @request PUT:/v1beta1/policies/{id}
1742
+ * @secure
1743
+ */
1744
+ frontierServiceUpdatePolicy: (id: string, body: V1Beta1PolicyRequestBody, params?: RequestParams) => Promise<HttpResponse<V1Beta1UpdatePolicyResponse, RpcStatus>>;
1745
+ /**
1746
+ * No description
1747
+ *
1748
+ * @tags Project
1749
+ * @name FrontierServiceCreateProject
1750
+ * @summary Create project
1751
+ * @request POST:/v1beta1/projects
1752
+ * @secure
1753
+ */
1754
+ frontierServiceCreateProject: (body: V1Beta1ProjectRequestBody, params?: RequestParams) => Promise<HttpResponse<V1Beta1CreateProjectResponse, RpcStatus>>;
1755
+ /**
1756
+ * @description Returns a project by ID
1757
+ *
1758
+ * @tags Project
1759
+ * @name FrontierServiceGetProject
1760
+ * @summary Get project
1761
+ * @request GET:/v1beta1/projects/{id}
1762
+ * @secure
1763
+ */
1764
+ frontierServiceGetProject: (id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetProjectResponse, RpcStatus>>;
1765
+ /**
1766
+ * @description Delete a project all of its relations permanently.
1767
+ *
1768
+ * @tags Project
1769
+ * @name FrontierServiceDeleteProject
1770
+ * @summary Delete Project
1771
+ * @request DELETE:/v1beta1/projects/{id}
1772
+ * @secure
1773
+ */
1774
+ frontierServiceDeleteProject: (id: string, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1775
+ /**
1776
+ * @description Updates a project by ID
1777
+ *
1778
+ * @tags Project
1779
+ * @name FrontierServiceUpdateProject
1780
+ * @summary Update project
1781
+ * @request PUT:/v1beta1/projects/{id}
1782
+ * @secure
1783
+ */
1784
+ frontierServiceUpdateProject: (id: string, body: V1Beta1ProjectRequestBody, params?: RequestParams) => Promise<HttpResponse<V1Beta1UpdateProjectResponse, RpcStatus>>;
1785
+ /**
1786
+ * @description Returns a collection of admins of a project
1787
+ *
1788
+ * @tags Project
1789
+ * @name FrontierServiceListProjectAdmins
1790
+ * @summary List project admins
1791
+ * @request GET:/v1beta1/projects/{id}/admins
1792
+ * @secure
1793
+ */
1794
+ frontierServiceListProjectAdmins: (id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListProjectAdminsResponse, RpcStatus>>;
1795
+ /**
1796
+ * No description
1797
+ *
1798
+ * @tags Project
1799
+ * @name FrontierServiceDisableProject
1800
+ * @summary Disable project
1801
+ * @request POST:/v1beta1/projects/{id}/disable
1802
+ * @secure
1803
+ */
1804
+ frontierServiceDisableProject: (id: string, body: object, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1805
+ /**
1806
+ * No description
1807
+ *
1808
+ * @tags Project
1809
+ * @name FrontierServiceEnableProject
1810
+ * @summary Enable project
1811
+ * @request POST:/v1beta1/projects/{id}/enable
1812
+ * @secure
1813
+ */
1814
+ frontierServiceEnableProject: (id: string, body: object, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1815
+ /**
1816
+ * @description Returns a collection of users of a project. Filter by user permissions is supported.
1817
+ *
1818
+ * @tags Project
1819
+ * @name FrontierServiceListProjectUsers
1820
+ * @summary List project users
1821
+ * @request GET:/v1beta1/projects/{id}/users
1822
+ * @secure
1823
+ */
1824
+ frontierServiceListProjectUsers: (id: string, query?: {
1825
+ permissionFilter?: string;
1826
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListProjectUsersResponse, RpcStatus>>;
1827
+ /**
1828
+ * No description
1829
+ *
1830
+ * @tags Resource
1831
+ * @name FrontierServiceListProjectResources
1832
+ * @summary Get all resources
1833
+ * @request GET:/v1beta1/projects/{projectId}/resources
1834
+ * @secure
1835
+ */
1836
+ frontierServiceListProjectResources: (projectId: string, query?: {
1837
+ namespace?: string;
1838
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListProjectResourcesResponse, RpcStatus>>;
1839
+ /**
1840
+ * @description Creates a resource in a project
1841
+ *
1842
+ * @tags Resource
1843
+ * @name FrontierServiceCreateProjectResource
1844
+ * @summary Create resource
1845
+ * @request POST:/v1beta1/projects/{projectId}/resources
1846
+ * @secure
1847
+ */
1848
+ frontierServiceCreateProjectResource: (projectId: string, body: V1Beta1ResourceRequestBody, query?: {
1849
+ /** Autogenerated if skipped. */
1850
+ id?: string;
1851
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1CreateProjectResourceResponse, RpcStatus>>;
1852
+ /**
1853
+ * @description Returns a project resource by ID
1854
+ *
1855
+ * @tags Resource
1856
+ * @name FrontierServiceGetProjectResource
1857
+ * @summary Get resource
1858
+ * @request GET:/v1beta1/projects/{projectId}/resources/{id}
1859
+ * @secure
1860
+ */
1861
+ frontierServiceGetProjectResource: (projectId: string, id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetProjectResourceResponse, RpcStatus>>;
1862
+ /**
1863
+ * @description Deletes a resource from a project permanently
1864
+ *
1865
+ * @tags Resource
1866
+ * @name FrontierServiceDeleteProjectResource
1867
+ * @summary Delete resource
1868
+ * @request DELETE:/v1beta1/projects/{projectId}/resources/{id}
1869
+ * @secure
1870
+ */
1871
+ frontierServiceDeleteProjectResource: (projectId: string, id: string, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1872
+ /**
1873
+ * @description Updates a resource in a project
1874
+ *
1875
+ * @tags Resource
1876
+ * @name FrontierServiceUpdateProjectResource
1877
+ * @summary Update resource
1878
+ * @request PUT:/v1beta1/projects/{projectId}/resources/{id}
1879
+ * @secure
1880
+ */
1881
+ frontierServiceUpdateProjectResource: (projectId: string, id: string, body: V1Beta1ResourceRequestBody, params?: RequestParams) => Promise<HttpResponse<V1Beta1UpdateProjectResourceResponse, RpcStatus>>;
1882
+ /**
1883
+ * No description
1884
+ *
1885
+ * @tags Relation
1886
+ * @name FrontierServiceCreateRelation
1887
+ * @summary Create relation
1888
+ * @request POST:/v1beta1/relations
1889
+ * @secure
1890
+ */
1891
+ frontierServiceCreateRelation: (body: V1Beta1RelationRequestBody, params?: RequestParams) => Promise<HttpResponse<V1Beta1CreateRelationResponse, RpcStatus>>;
1892
+ /**
1893
+ * @description Returns a relation by ID
1894
+ *
1895
+ * @tags Relation
1896
+ * @name FrontierServiceGetRelation
1897
+ * @summary Get relation
1898
+ * @request GET:/v1beta1/relations/{id}
1899
+ * @secure
1900
+ */
1901
+ frontierServiceGetRelation: (id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetRelationResponse, RpcStatus>>;
1902
+ /**
1903
+ * @description Remove a subject having a relation from an object
1904
+ *
1905
+ * @tags Relation
1906
+ * @name FrontierServiceDeleteRelation
1907
+ * @summary Delete relation
1908
+ * @request DELETE:/v1beta1/relations/{relation}/object/{object}/subject/{subject}
1909
+ * @secure
1910
+ */
1911
+ frontierServiceDeleteRelation: (relation: string, object: string, subject: string, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1912
+ /**
1913
+ * @description Returns a list of platform wide roles available in enitre Frontier instance along with their associated permissions
1914
+ *
1915
+ * @tags Role
1916
+ * @name FrontierServiceListRoles
1917
+ * @summary List platform roles
1918
+ * @request GET:/v1beta1/roles
1919
+ * @secure
1920
+ */
1921
+ frontierServiceListRoles: (query?: {
1922
+ state?: string;
1923
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListRolesResponse, RpcStatus>>;
1924
+ /**
1925
+ * @description Creates a platform wide role. It can be used to grant permissions to all the resources in a Frontier instance.
1926
+ *
1927
+ * @tags Role
1928
+ * @name AdminServiceCreateRole
1929
+ * @summary Create platform role
1930
+ * @request POST:/v1beta1/roles
1931
+ * @secure
1932
+ */
1933
+ adminServiceCreateRole: (body: V1Beta1RoleRequestBody, params?: RequestParams) => Promise<HttpResponse<V1Beta1CreateRoleResponse, RpcStatus>>;
1934
+ /**
1935
+ * @description Delete a platform wide role and all of its relations.
1936
+ *
1937
+ * @tags Role
1938
+ * @name AdminServiceDeleteRole
1939
+ * @summary Delete platform role
1940
+ * @request DELETE:/v1beta1/roles/{id}
1941
+ * @secure
1942
+ */
1943
+ adminServiceDeleteRole: (id: string, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1944
+ /**
1945
+ * @description Returns the service user of an organization in a Frontier instance. It can be filter by it's state
1946
+ *
1947
+ * @tags ServiceUser
1948
+ * @name FrontierServiceListServiceUsers
1949
+ * @summary List org service users
1950
+ * @request GET:/v1beta1/serviceusers
1951
+ * @secure
1952
+ */
1953
+ frontierServiceListServiceUsers: (query: {
1954
+ /** The organization ID to filter service users by. */
1955
+ orgId: string;
1956
+ /** The state to filter by. It can be enabled or disabled. */
1957
+ state?: string;
1958
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListServiceUsersResponse, RpcStatus>>;
1959
+ /**
1960
+ * @description Create a service user.
1961
+ *
1962
+ * @tags ServiceUser
1963
+ * @name FrontierServiceCreateServiceUser
1964
+ * @summary Create service user
1965
+ * @request POST:/v1beta1/serviceusers
1966
+ * @secure
1967
+ */
1968
+ frontierServiceCreateServiceUser: (body: V1Beta1CreateServiceUserRequest, params?: RequestParams) => Promise<HttpResponse<V1Beta1CreateServiceUserResponse, RpcStatus>>;
1969
+ /**
1970
+ * @description Get service user details by its id.
1971
+ *
1972
+ * @tags ServiceUser
1973
+ * @name FrontierServiceGetServiceUser
1974
+ * @summary Get service user
1975
+ * @request GET:/v1beta1/serviceusers/{id}
1976
+ * @secure
1977
+ */
1978
+ frontierServiceGetServiceUser: (id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetServiceUserResponse, RpcStatus>>;
1979
+ /**
1980
+ * @description Delete a service user permanently and all of its relations (keys, organizations, roles, etc)
1981
+ *
1982
+ * @tags ServiceUser
1983
+ * @name FrontierServiceDeleteServiceUser
1984
+ * @summary Delete service user
1985
+ * @request DELETE:/v1beta1/serviceusers/{id}
1986
+ * @secure
1987
+ */
1988
+ frontierServiceDeleteServiceUser: (id: string, query?: {
1989
+ orgId?: string;
1990
+ }, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
1991
+ /**
1992
+ * @description List all the keys of a service user with its details except jwk.
1993
+ *
1994
+ * @tags ServiceUser
1995
+ * @name FrontierServiceListServiceUserKeys
1996
+ * @summary List service user keys
1997
+ * @request GET:/v1beta1/serviceusers/{id}/keys
1998
+ * @secure
1999
+ */
2000
+ frontierServiceListServiceUserKeys: (id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListServiceUserKeysResponse, RpcStatus>>;
2001
+ /**
2002
+ * @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.
2003
+ *
2004
+ * @tags ServiceUser
2005
+ * @name FrontierServiceCreateServiceUserKey
2006
+ * @summary Create service user key
2007
+ * @request POST:/v1beta1/serviceusers/{id}/keys
2008
+ * @secure
2009
+ */
2010
+ frontierServiceCreateServiceUserKey: (id: string, body: {
2011
+ title?: string;
2012
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1CreateServiceUserKeyResponse, RpcStatus>>;
2013
+ /**
2014
+ * @description Get a service user public RSA JWK set.
2015
+ *
2016
+ * @tags ServiceUser
2017
+ * @name FrontierServiceGetServiceUserKey
2018
+ * @summary Get service user key
2019
+ * @request GET:/v1beta1/serviceusers/{id}/keys/{keyId}
2020
+ * @secure
2021
+ */
2022
+ frontierServiceGetServiceUserKey: (id: string, keyId: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetServiceUserKeyResponse, RpcStatus>>;
2023
+ /**
2024
+ * @description Delete a service user key permanently.
2025
+ *
2026
+ * @tags ServiceUser
2027
+ * @name FrontierServiceDeleteServiceUserKey
2028
+ * @summary Delete service user key
2029
+ * @request DELETE:/v1beta1/serviceusers/{id}/keys/{keyId}
2030
+ * @secure
2031
+ */
2032
+ frontierServiceDeleteServiceUserKey: (id: string, keyId: string, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
2033
+ /**
2034
+ * @description List all the secrets of a service user.
2035
+ *
2036
+ * @tags ServiceUser
2037
+ * @name FrontierServiceListServiceUserSecrets
2038
+ * @summary List service user secrets
2039
+ * @request GET:/v1beta1/serviceusers/{id}/secrets
2040
+ * @secure
2041
+ */
2042
+ frontierServiceListServiceUserSecrets: (id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListServiceUserSecretsResponse, RpcStatus>>;
2043
+ /**
2044
+ * @description Generate a service user secret and return it. The secret value will not be persisted and should be securely stored by client.
2045
+ *
2046
+ * @tags ServiceUser
2047
+ * @name FrontierServiceCreateServiceUserSecret
2048
+ * @summary Create service user secret
2049
+ * @request POST:/v1beta1/serviceusers/{id}/secrets
2050
+ * @secure
2051
+ */
2052
+ frontierServiceCreateServiceUserSecret: (id: string, body: {
2053
+ title?: string;
2054
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1CreateServiceUserSecretResponse, RpcStatus>>;
2055
+ /**
2056
+ * @description Delete a service user secret credential.
2057
+ *
2058
+ * @tags ServiceUser
2059
+ * @name FrontierServiceDeleteServiceUserSecret
2060
+ * @summary Delete service user secret
2061
+ * @request DELETE:/v1beta1/serviceusers/{id}/secrets/{secretId}
2062
+ * @secure
2063
+ */
2064
+ frontierServiceDeleteServiceUserSecret: (id: string, secretId: string, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
2065
+ /**
2066
+ * @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.
2067
+ *
2068
+ * @tags User
2069
+ * @name FrontierServiceListUsers
2070
+ * @summary List public users
2071
+ * @request GET:/v1beta1/users
2072
+ * @secure
2073
+ */
2074
+ frontierServiceListUsers: (query?: {
2075
+ /**
2076
+ * The maximum number of users to return per page. The default is 50.
2077
+ * @format int32
2078
+ */
2079
+ pageSize?: number;
2080
+ /**
2081
+ * The page number to return. The default is 1.
2082
+ * @format int32
2083
+ */
2084
+ pageNum?: number;
2085
+ /** The keyword to search for in name or email. */
2086
+ keyword?: string;
2087
+ /** The organization ID to filter users by. */
2088
+ orgId?: string;
2089
+ /** The group id to filter by. */
2090
+ groupId?: string;
2091
+ /** The state to filter by. It can be enabled or disabled. */
2092
+ state?: string;
2093
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListUsersResponse, RpcStatus>>;
2094
+ /**
2095
+ * @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"}}`
2096
+ *
2097
+ * @tags User
2098
+ * @name FrontierServiceCreateUser
2099
+ * @summary Create user
2100
+ * @request POST:/v1beta1/users
2101
+ */
2102
+ frontierServiceCreateUser: (body: V1Beta1UserRequestBody, params?: RequestParams) => Promise<HttpResponse<V1Beta1CreateUserResponse, RpcStatus>>;
2103
+ /**
2104
+ * @description Get a user by id searched over all organizations in Frontier.
2105
+ *
2106
+ * @tags User
2107
+ * @name FrontierServiceGetUser
2108
+ * @summary Get user
2109
+ * @request GET:/v1beta1/users/{id}
2110
+ * @secure
2111
+ */
2112
+ frontierServiceGetUser: (id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetUserResponse, RpcStatus>>;
2113
+ /**
2114
+ * @description Delete an user permanently forever and all of its relations (organizations, groups, etc)
2115
+ *
2116
+ * @tags User
2117
+ * @name FrontierServiceDeleteUser
2118
+ * @summary Delete user
2119
+ * @request DELETE:/v1beta1/users/{id}
2120
+ * @secure
2121
+ */
2122
+ frontierServiceDeleteUser: (id: string, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
2123
+ /**
2124
+ * No description
2125
+ *
2126
+ * @tags User
2127
+ * @name FrontierServiceUpdateUser
2128
+ * @summary Update user
2129
+ * @request PUT:/v1beta1/users/{id}
2130
+ * @secure
2131
+ */
2132
+ frontierServiceUpdateUser: (id: string, body: V1Beta1UserRequestBody, params?: RequestParams) => Promise<HttpResponse<V1Beta1UpdateUserResponse, RpcStatus>>;
2133
+ /**
2134
+ * @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.
2135
+ *
2136
+ * @tags User
2137
+ * @name FrontierServiceDisableUser
2138
+ * @summary Disable user
2139
+ * @request POST:/v1beta1/users/{id}/disable
2140
+ * @secure
2141
+ */
2142
+ frontierServiceDisableUser: (id: string, body: object, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
2143
+ /**
2144
+ * @description Sets the state of the user as enabled. The user will be able to log in and access the Frontier instance.
2145
+ *
2146
+ * @tags User
2147
+ * @name FrontierServiceEnableUser
2148
+ * @summary Enable user
2149
+ * @request POST:/v1beta1/users/{id}/enable
2150
+ * @secure
2151
+ */
2152
+ frontierServiceEnableUser: (id: string, body: object, params?: RequestParams) => Promise<HttpResponse<object, RpcStatus>>;
2153
+ /**
2154
+ * @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.
2155
+ *
2156
+ * @tags User
2157
+ * @name FrontierServiceListUserGroups
2158
+ * @summary List user groups
2159
+ * @request GET:/v1beta1/users/{id}/groups
2160
+ * @secure
2161
+ */
2162
+ frontierServiceListUserGroups: (id: string, query?: {
2163
+ /** The organization ID to filter groups by. If not provided, groups from all organizations are returned. */
2164
+ orgId?: string;
2165
+ }, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListUserGroupsResponse, RpcStatus>>;
2166
+ /**
2167
+ * @description List all the invitations sent to a user.
2168
+ *
2169
+ * @tags User
2170
+ * @name FrontierServiceListUserInvitations
2171
+ * @summary List user invitations
2172
+ * @request GET:/v1beta1/users/{id}/invitations
2173
+ * @secure
2174
+ */
2175
+ frontierServiceListUserInvitations: (id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1ListUserInvitationsResponse, RpcStatus>>;
2176
+ /**
2177
+ * @description Get all the organizations a user belongs to.
2178
+ *
2179
+ * @tags User
2180
+ * @name FrontierServiceGetOrganizationsByUser
2181
+ * @summary Get user organizations
2182
+ * @request GET:/v1beta1/users/{id}/organizations
2183
+ * @secure
2184
+ */
2185
+ frontierServiceGetOrganizationsByUser: (id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetOrganizationsByUserResponse, RpcStatus>>;
2186
+ /**
2187
+ * @description Get all the projects a user belongs to.
2188
+ *
2189
+ * @tags User
2190
+ * @name FrontierServiceGetProjectsByUser
2191
+ * @summary Get user projects
2192
+ * @request GET:/v1beta1/users/{id}/projects
2193
+ * @secure
2194
+ */
2195
+ frontierServiceGetProjectsByUser: (id: string, params?: RequestParams) => Promise<HttpResponse<V1Beta1GetProjectsByUserResponse, RpcStatus>>;
2196
+ /**
2197
+ * No description
2198
+ *
2199
+ * @tags User
2200
+ * @name FrontierServiceGetCurrentUser
2201
+ * @summary Get current user
2202
+ * @request GET:/v1beta1/users/self
2203
+ * @secure
2204
+ */
2205
+ frontierServiceGetCurrentUser: (params?: RequestParams) => Promise<HttpResponse<V1Beta1GetCurrentUserResponse, RpcStatus>>;
2206
+ /**
2207
+ * No description
2208
+ *
2209
+ * @tags User
2210
+ * @name FrontierServiceUpdateCurrentUser
2211
+ * @summary Update current user
2212
+ * @request PUT:/v1beta1/users/self
2213
+ * @secure
2214
+ */
2215
+ frontierServiceUpdateCurrentUser: (body: V1Beta1UserRequestBody, params?: RequestParams) => Promise<HttpResponse<V1Beta1UpdateCurrentUserResponse, RpcStatus>>;
2216
+ /**
2217
+ * No description
2218
+ *
2219
+ * @tags User
2220
+ * @name FrontierServiceListCurrentUserGroups
2221
+ * @summary List my groups
2222
+ * @request GET:/v1beta1/users/self/groups
2223
+ * @secure
2224
+ */
2225
+ frontierServiceListCurrentUserGroups: (params?: RequestParams) => Promise<HttpResponse<V1Beta1ListCurrentUserGroupsResponse, RpcStatus>>;
2226
+ /**
2227
+ * @description Get all organizations the current user belongs to
2228
+ *
2229
+ * @tags User
2230
+ * @name FrontierServiceGetOrganizationsByCurrentUser
2231
+ * @summary Get my organizations
2232
+ * @request GET:/v1beta1/users/self/organizations
2233
+ * @secure
2234
+ */
2235
+ frontierServiceGetOrganizationsByCurrentUser: (params?: RequestParams) => Promise<HttpResponse<V1Beta1GetOrganizationsByCurrentUserResponse, RpcStatus>>;
2236
+ /**
2237
+ * @description Get all projects the current user belongs to
2238
+ *
2239
+ * @tags User
2240
+ * @name FrontierServiceGetProjectsByCurrentUser
2241
+ * @summary Get my projects
2242
+ * @request GET:/v1beta1/users/self/projects
2243
+ * @secure
2244
+ */
2245
+ frontierServiceGetProjectsByCurrentUser: (params?: RequestParams) => Promise<HttpResponse<V1Beta1GetProjectsByCurrentUserResponse, RpcStatus>>;
110
2246
  }
111
2247
 
112
2248
  interface FrontierContextProviderProps {
113
2249
  config: FrontierClientOptions;
114
- client: Frontier;
115
- organizations: Organization[];
116
- setOrganizations: Dispatch<SetStateAction<Organization[]>>;
117
- groups: Group[];
118
- setGroups: Dispatch<SetStateAction<Group[]>>;
119
- strategies: Strategy[];
120
- setStrategies: Dispatch<SetStateAction<Strategy[]>>;
121
- user: User | null;
122
- setUser: Dispatch<SetStateAction<User | null>>;
2250
+ client: V1Beta1<unknown> | undefined;
2251
+ organizations: V1Beta1Organization[];
2252
+ setOrganizations: Dispatch<SetStateAction<V1Beta1Organization[]>>;
2253
+ groups: V1Beta1Group[];
2254
+ setGroups: Dispatch<SetStateAction<V1Beta1Group[]>>;
2255
+ strategies: V1Beta1AuthStrategy[];
2256
+ setStrategies: Dispatch<SetStateAction<V1Beta1AuthStrategy[]>>;
2257
+ user: V1Beta1User | undefined;
2258
+ setUser: Dispatch<SetStateAction<V1Beta1User | undefined>>;
123
2259
  }
124
2260
  declare function useFrontier(): FrontierContextProviderProps;
125
2261