@conduitplatform/grpc-sdk 0.17.0-alpha.7 → 0.17.0-alpha.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -107,9 +107,15 @@ declare enum ValidateAccessTokenResponse_Status {
107
107
  }
108
108
  declare function validateAccessTokenResponse_StatusFromJSON(object: any): ValidateAccessTokenResponse_Status;
109
109
  declare function validateAccessTokenResponse_StatusToJSON(object: ValidateAccessTokenResponse_Status): string;
110
+ /**
111
+ * Issues tokens for a user without a login. This is a trusted path: it does not run a
112
+ * login strategy and satisfies a realm's requireTwoFa policy without a 2FA step.
113
+ */
110
114
  interface UserLoginRequest {
111
115
  userId: string;
112
116
  clientId: string;
117
+ /** realm slug the session is bound to; defaults to the user's home realm */
118
+ realm?: string | undefined;
113
119
  }
114
120
  declare const UserLoginRequest: MessageFns$9<UserLoginRequest>;
115
121
  interface UserCreateRequest {
@@ -118,19 +124,36 @@ interface UserCreateRequest {
118
124
  verify: boolean;
119
125
  anonymousId?: string | undefined;
120
126
  userData?: string | undefined;
127
+ realm?: string | undefined;
121
128
  }
122
129
  declare const UserCreateRequest: MessageFns$9<UserCreateRequest>;
123
130
  interface UserCreateByUsernameRequest {
124
131
  username: string;
125
132
  password?: string | undefined;
126
133
  anonymousId?: string | undefined;
134
+ realm?: string | undefined;
127
135
  }
128
136
  declare const UserCreateByUsernameRequest: MessageFns$9<UserCreateByUsernameRequest>;
129
137
  interface UserChangePass {
130
138
  email: string;
131
139
  password?: string | undefined;
140
+ /**
141
+ * Realm slug of the account to change, needed when the email is held by several accounts
142
+ * (isolated identity mode). 'global' names the account without a home realm. Unset: the
143
+ * deployment-wide lookup, which refuses an email held by several accounts.
144
+ */
145
+ realm?: string | undefined;
132
146
  }
133
147
  declare const UserChangePass: MessageFns$9<UserChangePass>;
148
+ interface UserChangeEmail {
149
+ userId: string;
150
+ newEmail: string;
151
+ }
152
+ declare const UserChangeEmail: MessageFns$9<UserChangeEmail>;
153
+ interface UserChangeEmailResponse {
154
+ message: string;
155
+ }
156
+ declare const UserChangeEmailResponse: MessageFns$9<UserChangeEmailResponse>;
134
157
  interface UserDeleteRequest {
135
158
  userId: string;
136
159
  }
@@ -167,6 +190,8 @@ interface Team {
167
190
  name: string;
168
191
  parentTeam: string;
169
192
  isDefault: boolean;
193
+ realmEnabled: boolean;
194
+ realmSlug?: string | undefined;
170
195
  }
171
196
  declare const Team: MessageFns$9<Team>;
172
197
  interface TeamDeleteResponse {
@@ -178,6 +203,15 @@ interface ModifyTeamMembersRequest {
178
203
  memberIds: string[];
179
204
  }
180
205
  declare const ModifyTeamMembersRequest: MessageFns$9<ModifyTeamMembersRequest>;
206
+ interface GetUserRequest {
207
+ userId: string;
208
+ }
209
+ declare const GetUserRequest: MessageFns$9<GetUserRequest>;
210
+ interface GetUserResponse {
211
+ /** user document as JSON, hashedPassword never included */
212
+ user: string;
213
+ }
214
+ declare const GetUserResponse: MessageFns$9<GetUserResponse>;
181
215
  interface ValidateAccessTokenRequest {
182
216
  accessToken: string;
183
217
  path?: string | undefined;
@@ -186,10 +220,14 @@ declare const ValidateAccessTokenRequest: MessageFns$9<ValidateAccessTokenReques
186
220
  interface ValidateAccessTokenResponse {
187
221
  status: ValidateAccessTokenResponse_Status;
188
222
  userId?: string | undefined;
223
+ /** slugs; absent for global sessions and global users */
224
+ realm?: string | undefined;
225
+ homeRealm?: string | undefined;
189
226
  }
190
227
  declare const ValidateAccessTokenResponse: MessageFns$9<ValidateAccessTokenResponse>;
191
228
  interface AnonymousUserCreateRequest {
192
229
  clientId: string;
230
+ realm?: string | undefined;
193
231
  }
194
232
  declare const AnonymousUserCreateRequest: MessageFns$9<AnonymousUserCreateRequest>;
195
233
  interface UserModifyStatusRequest {
@@ -229,6 +267,58 @@ interface UpdateTeamRequest {
229
267
  newParentTeamId?: string | undefined;
230
268
  }
231
269
  declare const UpdateTeamRequest: MessageFns$9<UpdateTeamRequest>;
270
+ interface SetTeamRealmRequest {
271
+ teamId: string;
272
+ slug: string;
273
+ /** JSON of the realm settings (strategies, policies, registration, active); may carry secrets */
274
+ settingsJson?: string | undefined;
275
+ /** required to change the slug of an existing realm */
276
+ force: boolean;
277
+ }
278
+ declare const SetTeamRealmRequest: MessageFns$9<SetTeamRealmRequest>;
279
+ interface GetRealmSettingsRequest {
280
+ teamId: string;
281
+ }
282
+ declare const GetRealmSettingsRequest: MessageFns$9<GetRealmSettingsRequest>;
283
+ interface RealmResponse {
284
+ team: Team | undefined;
285
+ /** JSON of the masked realm settings, secrets never included */
286
+ settingsJson: string;
287
+ homeCount: number;
288
+ guestCount: number;
289
+ }
290
+ declare const RealmResponse: MessageFns$9<RealmResponse>;
291
+ interface UnsetTeamRealmRequest {
292
+ teamId: string;
293
+ force: boolean;
294
+ }
295
+ declare const UnsetTeamRealmRequest: MessageFns$9<UnsetTeamRealmRequest>;
296
+ interface UnsetTeamRealmResponse {
297
+ message: string;
298
+ blockedUsers: number;
299
+ }
300
+ declare const UnsetTeamRealmResponse: MessageFns$9<UnsetTeamRealmResponse>;
301
+ interface RealmMembershipRequest {
302
+ teamId: string;
303
+ userId: string;
304
+ /** 'home' | 'guest', anything else is INVALID_ARGUMENT (ignored by RevokeRealmMembership) */
305
+ type: string;
306
+ /**
307
+ * GrantRealmMembership(home) only: the user already has a different home realm. Without
308
+ * force that is FAILED_PRECONDITION; with it the user is moved and all their tokens are
309
+ * revoked.
310
+ */
311
+ force: boolean;
312
+ }
313
+ declare const RealmMembershipRequest: MessageFns$9<RealmMembershipRequest>;
314
+ /**
315
+ * Errors raised by the realm RPCs (and the other Authentication RPCs) keep their gRPC
316
+ * code. Module errors (REALM_NOT_FOUND, REALM_SLUG_TAKEN, GUESTS_NOT_ALLOWED...) carry
317
+ * the message as a JSON string, `{"conduitCode": "...", "message": "..."}`: clients
318
+ * should key on conduitCode. GrantRealmMembership(guest) for a user whose home realm is
319
+ * that realm, and GrantRealmMembership(home) over a different home realm without force,
320
+ * are FAILED_PRECONDITION.
321
+ */
232
322
  type AuthenticationDefinition = typeof AuthenticationDefinition;
233
323
  declare const AuthenticationDefinition: {
234
324
  readonly name: "Authentication";
@@ -282,6 +372,14 @@ declare const AuthenticationDefinition: {
282
372
  readonly responseStream: false;
283
373
  readonly options: {};
284
374
  };
375
+ readonly changeEmail: {
376
+ readonly name: "ChangeEmail";
377
+ readonly requestType: typeof UserChangeEmail;
378
+ readonly requestStream: false;
379
+ readonly responseType: typeof UserChangeEmailResponse;
380
+ readonly responseStream: false;
381
+ readonly options: {};
382
+ };
285
383
  readonly userDelete: {
286
384
  readonly name: "UserDelete";
287
385
  readonly requestType: typeof UserDeleteRequest;
@@ -330,6 +428,14 @@ declare const AuthenticationDefinition: {
330
428
  readonly responseStream: false;
331
429
  readonly options: {};
332
430
  };
431
+ readonly getUser: {
432
+ readonly name: "GetUser";
433
+ readonly requestType: typeof GetUserRequest;
434
+ readonly requestStream: false;
435
+ readonly responseType: typeof GetUserResponse;
436
+ readonly responseStream: false;
437
+ readonly options: {};
438
+ };
333
439
  readonly validateAccessToken: {
334
440
  readonly name: "ValidateAccessToken";
335
441
  readonly requestType: typeof ValidateAccessTokenRequest;
@@ -362,6 +468,46 @@ declare const AuthenticationDefinition: {
362
468
  readonly responseStream: false;
363
469
  readonly options: {};
364
470
  };
471
+ readonly setTeamRealm: {
472
+ readonly name: "SetTeamRealm";
473
+ readonly requestType: typeof SetTeamRealmRequest;
474
+ readonly requestStream: false;
475
+ readonly responseType: typeof RealmResponse;
476
+ readonly responseStream: false;
477
+ readonly options: {};
478
+ };
479
+ readonly getRealmSettings: {
480
+ readonly name: "GetRealmSettings";
481
+ readonly requestType: typeof GetRealmSettingsRequest;
482
+ readonly requestStream: false;
483
+ readonly responseType: typeof RealmResponse;
484
+ readonly responseStream: false;
485
+ readonly options: {};
486
+ };
487
+ readonly unsetTeamRealm: {
488
+ readonly name: "UnsetTeamRealm";
489
+ readonly requestType: typeof UnsetTeamRealmRequest;
490
+ readonly requestStream: false;
491
+ readonly responseType: typeof UnsetTeamRealmResponse;
492
+ readonly responseStream: false;
493
+ readonly options: {};
494
+ };
495
+ readonly grantRealmMembership: {
496
+ readonly name: "GrantRealmMembership";
497
+ readonly requestType: typeof RealmMembershipRequest;
498
+ readonly requestStream: false;
499
+ readonly responseType: typeof Empty;
500
+ readonly responseStream: false;
501
+ readonly options: {};
502
+ };
503
+ readonly revokeRealmMembership: {
504
+ readonly name: "RevokeRealmMembership";
505
+ readonly requestType: typeof RealmMembershipRequest;
506
+ readonly requestStream: false;
507
+ readonly responseType: typeof Empty;
508
+ readonly responseStream: false;
509
+ readonly options: {};
510
+ };
365
511
  };
366
512
  };
367
513
  type Builtin$9 = Date | Function | Uint8Array | string | number | boolean | undefined;
@@ -482,6 +628,34 @@ interface Decision {
482
628
  allow: boolean;
483
629
  }
484
630
  declare const Decision: MessageFns$8<Decision>;
631
+ /**
632
+ * Lists actions declared on the resource definition. A direct grant for an
633
+ * undeclared action can still pass Can and is omitted here.
634
+ * actionPrefix is a literal prefix: "overview" also matches "overviewer".
635
+ * Prefer a separator such as "overview_" for a snake_case group.
636
+ * Results stay cached for about 60s. Grant, revoke, and relation changes for
637
+ * this subject drop the entry, as do resource create, update, and delete.
638
+ * Inherited access through an intermediate subject can lag until that TTL,
639
+ * the same as Can.
640
+ */
641
+ interface SubjectPermissionsRequest {
642
+ subject: string;
643
+ resource: string;
644
+ actionPrefix?: string | undefined;
645
+ }
646
+ declare const SubjectPermissionsRequest: MessageFns$8<SubjectPermissionsRequest>;
647
+ interface SubjectPermission {
648
+ action: string;
649
+ direct: boolean;
650
+ inherited: boolean;
651
+ implicit: boolean;
652
+ allowed: boolean;
653
+ }
654
+ declare const SubjectPermission: MessageFns$8<SubjectPermission>;
655
+ interface SubjectPermissionsResponse {
656
+ permissions: SubjectPermission[];
657
+ }
658
+ declare const SubjectPermissionsResponse: MessageFns$8<SubjectPermissionsResponse>;
485
659
  type AuthorizationDefinition = typeof AuthorizationDefinition;
486
660
  declare const AuthorizationDefinition: {
487
661
  readonly name: "Authorization";
@@ -575,6 +749,14 @@ declare const AuthorizationDefinition: {
575
749
  readonly responseStream: false;
576
750
  readonly options: {};
577
751
  };
752
+ readonly getSubjectPermissions: {
753
+ readonly name: "GetSubjectPermissions";
754
+ readonly requestType: typeof SubjectPermissionsRequest;
755
+ readonly requestStream: false;
756
+ readonly responseType: typeof SubjectPermissionsResponse;
757
+ readonly responseStream: false;
758
+ readonly options: {};
759
+ };
578
760
  readonly getAllowedResources: {
579
761
  readonly name: "GetAllowedResources";
580
762
  readonly requestType: typeof AllowedResourcesRequest;
@@ -626,6 +808,11 @@ interface EditMessageRequest {
626
808
  newMessage: string;
627
809
  }
628
810
  declare const EditMessageRequest: MessageFns$7<EditMessageRequest>;
811
+ interface DeleteMessageRequest {
812
+ messageId: string;
813
+ userId: string;
814
+ }
815
+ declare const DeleteMessageRequest: MessageFns$7<DeleteMessageRequest>;
629
816
  interface DeleteRoomRequest {
630
817
  _id: string;
631
818
  }
@@ -677,6 +864,14 @@ declare const ChatDefinition: {
677
864
  readonly responseStream: false;
678
865
  readonly options: {};
679
866
  };
867
+ readonly deleteMessage: {
868
+ readonly name: "DeleteMessage";
869
+ readonly requestType: typeof DeleteMessageRequest;
870
+ readonly requestStream: false;
871
+ readonly responseType: typeof Empty;
872
+ readonly responseStream: false;
873
+ readonly options: {};
874
+ };
680
875
  };
681
876
  };
682
877
  type Builtin$7 = Date | Function | Uint8Array | string | number | boolean | undefined;
@@ -1222,6 +1417,13 @@ interface MessageFns$6<T> {
1222
1417
  fromPartial(object: DeepPartial$6<T>): T;
1223
1418
  }
1224
1419
 
1420
+ interface SocketPushRequest {
1421
+ event: string;
1422
+ data?: string | undefined;
1423
+ receivers: string[];
1424
+ rooms: string[];
1425
+ }
1426
+ declare const SocketPushRequest: MessageFns$5<SocketPushRequest>;
1225
1427
  interface RegisterAdminRouteRequest {
1226
1428
  routes: RegisterAdminRouteRequest_PathDefinition[];
1227
1429
  routerUrl?: string | undefined;
@@ -1474,6 +1676,14 @@ declare const AdminDefinition: {
1474
1676
  readonly responseStream: false;
1475
1677
  readonly options: {};
1476
1678
  };
1679
+ readonly socketPush: {
1680
+ readonly name: "SocketPush";
1681
+ readonly requestType: typeof SocketPushRequest;
1682
+ readonly requestStream: false;
1683
+ readonly responseType: typeof Empty;
1684
+ readonly responseStream: false;
1685
+ readonly options: {};
1686
+ };
1477
1687
  };
1478
1688
  };
1479
1689
  type Builtin$5 = Date | Function | Uint8Array | string | number | boolean | undefined;
@@ -2809,6 +3019,16 @@ declare enum PostgresIndexType {
2809
3019
  GIN = "GIN",
2810
3020
  BRIN = "BRIN"
2811
3021
  }
3022
+ /**
3023
+ * Portable ascending/descending indexes that exist on MongoDB and every SQL dialect.
3024
+ * Map to Mongo 1/-1 and SQL BTREE ASC/DESC. Optional uniqueness lives on index options.
3025
+ */
3026
+ declare enum CompatibleIndexType {
3027
+ Ascending = "Ascending",
3028
+ Descending = "Descending"
3029
+ }
3030
+ type IndexType = MongoIndexType | PostgresIndexType | CompatibleIndexType;
3031
+ type ModelOptionsIndexTypes = IndexType | readonly IndexType[];
2812
3032
  type Array$1 = any[];
2813
3033
  interface ConduitStringValidation {
2814
3034
  format?: 'email' | 'url' | 'uuid' | 'objectId';
@@ -2924,6 +3144,9 @@ interface ConduitSchemaOptions {
2924
3144
  authorization?: {
2925
3145
  enabled: boolean;
2926
3146
  };
3147
+ realtime?: {
3148
+ enabled: boolean;
3149
+ };
2927
3150
  /** Mongoose read preference for this schema (ignored by SQL); per-query wins. */
2928
3151
  readPreference?: string;
2929
3152
  };
@@ -2932,14 +3155,16 @@ interface ConduitSchemaOptions {
2932
3155
  vectorIndexes?: ReadonlyArray<VectorIndexDefinition>;
2933
3156
  }
2934
3157
  interface SchemaFieldIndex {
2935
- type?: MongoIndexType | PostgresIndexType;
3158
+ type?: IndexType;
2936
3159
  options?: MongoIndexOptions | PostgresIndexOptions;
2937
3160
  [field: string]: any;
2938
3161
  }
2939
3162
  interface ModelOptionsIndexes {
2940
3163
  fields: string[] | readonly string[];
2941
- types?: MongoIndexType[] | PostgresIndexType;
3164
+ types?: ModelOptionsIndexTypes;
2942
3165
  options?: MongoIndexOptions | PostgresIndexOptions;
3166
+ /** Optional. Generated deterministically when omitted. */
3167
+ name?: string;
2943
3168
  [field: string]: any;
2944
3169
  }
2945
3170
  interface MongoIndexOptions {
@@ -3138,6 +3363,16 @@ interface ConduitRouteOptions {
3138
3363
  * by security middleware are excluded.
3139
3364
  */
3140
3365
  captureRawHeaders?: boolean;
3366
+ /**
3367
+ * Whether module-tools hydrates context.user from the user id of a verified access token.
3368
+ * Defaults to true.
3369
+ *
3370
+ * DEPRECATION: the default-true behavior is deprecated. The default flips to false in the
3371
+ * next major version; modules will call grpcSdk.authentication.getUser explicitly. Set
3372
+ * this to false now on routes that do not need context.user, and call getUser yourself
3373
+ * on those that do.
3374
+ */
3375
+ hydrateUser?: boolean;
3141
3376
  }
3142
3377
  interface ConduitRouteObject {
3143
3378
  options: ConduitRouteOptions;
@@ -3441,6 +3676,28 @@ interface IConduitMetrics {
3441
3676
  observe(metric: string, value: number, labels?: LabelValues<any>): void;
3442
3677
  }
3443
3678
 
3679
+ /** Claims carried by a short-lived Ed25519-signed access token ("jwt" session mode). */
3680
+ interface AccessTokenClaims {
3681
+ sub: string;
3682
+ sid: string;
3683
+ cid: string;
3684
+ rid?: string;
3685
+ realm?: string;
3686
+ home?: string;
3687
+ rtype?: 'home' | 'guest';
3688
+ authorized: boolean;
3689
+ sudo: boolean;
3690
+ tv: number;
3691
+ teams?: {
3692
+ id: string;
3693
+ role: string;
3694
+ }[];
3695
+ teamsTruncated?: boolean;
3696
+ iat: number;
3697
+ exp: number;
3698
+ iss: string;
3699
+ }
3700
+
3444
3701
  declare class ConduitSchema {
3445
3702
  readonly name: string;
3446
3703
  readonly fields: ConduitModel;
@@ -3784,6 +4041,7 @@ declare class Admin extends ConduitModule<typeof AdminDefinition> {
3784
4041
  readonly moduleName: string;
3785
4042
  constructor(moduleName: string, url: string, grpcToken?: string);
3786
4043
  register(paths: RegisterAdminRouteRequest_PathDefinition[], serverUrl?: string): Promise<any>;
4044
+ socketPush(data: SocketPushRequest): Promise<Empty>;
3787
4045
  patchRouteMiddlewares(path: string, action: ConduitRouteActions, middlewares: string[]): Promise<Empty>;
3788
4046
  }
3789
4047
 
@@ -3831,6 +4089,7 @@ declare class Chat extends ConduitModule<typeof ChatDefinition> {
3831
4089
  constructor(moduleName: string, url: string, grpcToken?: string);
3832
4090
  sendMessage(messageData: SendMessageInput): Promise<any>;
3833
4091
  editMessage(messageData: EditMessageRequest): Promise<any>;
4092
+ deleteMessage(messageData: DeleteMessageRequest): Promise<any>;
3834
4093
  createRoom(name: string, participants: string[]): Promise<Room>;
3835
4094
  deleteRoom(id: string): Promise<Room>;
3836
4095
  }
@@ -3847,21 +4106,103 @@ declare class Authorization extends ConduitModule<typeof AuthorizationDefinition
3847
4106
  createRelations(subject: string, relation: string, resources: string[]): Promise<unknown>;
3848
4107
  findRelation(data: FindRelationRequest): Promise<FindRelationResponse>;
3849
4108
  can(data: PermissionCheck): Promise<Decision>;
4109
+ /**
4110
+ * Lists actions declared on the resource definition.
4111
+ * A direct grant for an undeclared action can still pass `can()` and is omitted.
4112
+ * `actionPrefix` is literal (`overview` also matches `overviewer`; prefer `overview_`).
4113
+ * Subject and resource-definition changes drop the ~60s cache immediately.
4114
+ * Inherited access through an intermediate subject can lag until the TTL, as with `can()`.
4115
+ */
4116
+ getSubjectPermissions(data: SubjectPermissionsRequest): Promise<SubjectPermissionsResponse>;
3850
4117
  grantPermission(data: PermissionRequest): Promise<unknown>;
3851
4118
  removePermission(data: PermissionRequest): Promise<unknown>;
3852
4119
  getAllowedResources(data: AllowedResourcesRequest): Promise<AllowedResourcesResponse>;
3853
4120
  createResourceAccessList(data: ResourceAccessListRequest): Promise<ResourceAccessListResponse>;
3854
4121
  }
3855
4122
 
4123
+ declare class RedisManager {
4124
+ redisConnection: RedisOptions | {
4125
+ nodes: {
4126
+ host: string;
4127
+ port: number;
4128
+ }[];
4129
+ options: ClusterOptions;
4130
+ };
4131
+ constructor(redisDetails?: RedisOptions | {
4132
+ nodes: {
4133
+ host: string;
4134
+ port: number;
4135
+ }[];
4136
+ options: ClusterOptions;
4137
+ });
4138
+ getClient(options?: RedisOptions | {
4139
+ nodes: {
4140
+ host: string;
4141
+ port: number;
4142
+ }[];
4143
+ options: ClusterOptions;
4144
+ }): Redis | Cluster;
4145
+ }
4146
+
4147
+ declare const USER_CACHE_PREFIX = "auth_user_";
4148
+ declare const USER_CACHE_TTL_MS = 5000;
4149
+ /**
4150
+ * Short-lived Redis cache of user documents, stored under `auth_user_<id>` (the prefix is
4151
+ * part of the key itself, so the layout is identical on standalone Redis and Cluster).
4152
+ *
4153
+ * Every operation is bounded by a 200 ms timeout and degrades to a passthrough (miss /
4154
+ * no-op) when Redis fails or is unreachable.
4155
+ *
4156
+ * Staleness: entries live for up to 5 s (`USER_CACHE_TTL_MS`). `invalidate` is not atomic
4157
+ * with a concurrent miss: a reader that fetched the user before the invalidation can write
4158
+ * the stale document back afterwards, where it stays for up to the TTL.
4159
+ */
4160
+ declare class UserCache {
4161
+ private readonly client;
4162
+ constructor(redisManager: Pick<RedisManager, 'getClient'>);
4163
+ private key;
4164
+ get(id: string): Promise<Indexable | null>;
4165
+ set(id: string, user: Indexable): Promise<void>;
4166
+ invalidate(id: string): Promise<void>;
4167
+ invalidateMany(ids: string[]): Promise<void>;
4168
+ }
4169
+
3856
4170
  declare class Authentication extends ConduitModule<typeof AuthenticationDefinition> {
3857
4171
  private readonly moduleName;
3858
4172
  constructor(moduleName: string, url: string, grpcToken?: string);
3859
- userLogin(userId: string, clientId: string): Promise<UserLoginResponse>;
4173
+ private userCacheProvider?;
4174
+ /**
4175
+ * Attaches a cache (or a lazy provider of one, resolved on every `getUser` call so that
4176
+ * no Redis connection is opened until it is needed) that `getUser` reads through.
4177
+ */
4178
+ attachUserCache(cache: UserCache | (() => UserCache | undefined) | undefined): void;
4179
+ hasUserCache(): boolean;
4180
+ /**
4181
+ * Fetches a user document (never includes `hashedPassword`), reading through the
4182
+ * attached user cache (5 s TTL, see UserCache) when there is one. Cache problems never
4183
+ * fail or delay the call beyond the cache's own timeout; the cache write is fire-and-forget.
4184
+ *
4185
+ * The server answers gRPC NOT_FOUND for an unknown id and this method rejects with that
4186
+ * error (an empty response is also turned into a `GrpcError` NOT_FOUND).
4187
+ */
4188
+ getUser(userId: string): Promise<Indexable>;
4189
+ /**
4190
+ * Issues tokens for a user without a login. Trusted path: it runs no login strategy
4191
+ * and satisfies a realm's `requireTwoFa` policy without a 2FA step. `realm` (slug)
4192
+ * defaults to the user's home realm.
4193
+ */
4194
+ userLogin(userId: string, clientId: string, realm?: string): Promise<UserLoginResponse>;
3860
4195
  userDelete(userId: string): Promise<UserDeleteResponse>;
3861
- userCreate(email: string, verify?: boolean, password?: string, anonymousId?: string, userData?: Indexable): Promise<UserCreateResponse>;
3862
- userCreateByUsername(username: string, password?: string, anonymousId?: string): Promise<UserCreateResponse>;
3863
- anonymousUserCreate(clientId: string): Promise<UserLoginResponse>;
3864
- changePass(email: string, password?: string): Promise<UserCreateResponse>;
4196
+ userCreate(email: string, verify?: boolean, password?: string, anonymousId?: string, userData?: Indexable, realm?: string): Promise<UserCreateResponse>;
4197
+ userCreateByUsername(username: string, password?: string, anonymousId?: string, realm?: string): Promise<UserCreateResponse>;
4198
+ anonymousUserCreate(clientId: string, realm?: string): Promise<UserLoginResponse>;
4199
+ /**
4200
+ * Sets a new password. `realm` picks the account when the email is held by several accounts
4201
+ * (isolated identity mode): a realm slug picks that realm's account, `'global'` picks the
4202
+ * account without a home realm. Without it such an email is refused with FAILED_PRECONDITION.
4203
+ */
4204
+ changePass(email: string, password?: string, realm?: string): Promise<UserCreateResponse>;
4205
+ changeEmail(userId: string, newEmail: string): Promise<UserChangeEmailResponse>;
3865
4206
  getTeam(teamId: string): Promise<Team>;
3866
4207
  createTeam(name: string, parentTeam?: string, isDefault?: boolean): Promise<Team>;
3867
4208
  teamDelete(teamId: string): Promise<TeamDeleteResponse>;
@@ -3872,6 +4213,31 @@ declare class Authentication extends ConduitModule<typeof AuthenticationDefiniti
3872
4213
  invitationDelete(teamId: string, email: string): Promise<InvitationDeleteResponse>;
3873
4214
  inviteUserToTeam(teamId: string, email: string, role: string, inviterUserId: string, redirectUri?: string, userData?: Indexable): Promise<InviteUserToTeamResponse>;
3874
4215
  updateTeam(teamId: string, name?: string, newParentTeamId?: string): Promise<Team>;
4216
+ /**
4217
+ * Turns a top-level team into a realm, or updates the settings of an existing realm.
4218
+ * `settings` is the realm settings body (strategies, policies, registration, active);
4219
+ * it may carry OAuth secrets (write-only). Changing the slug of an existing realm
4220
+ * needs `force`.
4221
+ * Errors keep their gRPC code; module errors (REALM_SLUG_TAKEN, REALM_NESTED,
4222
+ * GUESTS_NOT_ALLOWED...) carry a JSON string message (`{"conduitCode", "message"}`),
4223
+ * so key on `conduitCode`.
4224
+ */
4225
+ setTeamRealm(teamId: string, slug: string, settings?: Indexable, force?: boolean): Promise<RealmResponse>;
4226
+ /** The team, its masked realm settings (`settingsJson`, no secrets) and user counts. */
4227
+ getRealmSettings(teamId: string): Promise<RealmResponse>;
4228
+ /** Demotes a realm. Refused while home users exist unless `force`, which blocks them. */
4229
+ unsetTeamRealm(teamId: string, force?: boolean): Promise<UnsetTeamRealmResponse>;
4230
+ /**
4231
+ * `home` makes the realm the user's home realm, `guest` adds a guest membership.
4232
+ * Fails with FAILED_PRECONDITION when `home` would replace a different home realm
4233
+ * (unless `force`, which moves the user and revokes all their tokens) and when `guest`
4234
+ * is requested for a user whose home realm is this realm.
4235
+ * Errors keep their gRPC code; module errors carry a JSON string message
4236
+ * (`{"conduitCode", "message"}`), so key on `conduitCode`.
4237
+ */
4238
+ grantRealmMembership(teamId: string, userId: string, type: 'home' | 'guest', force?: boolean): Promise<Empty>;
4239
+ /** Removes a guest membership (home users are moved, not removed). */
4240
+ revokeRealmMembership(teamId: string, userId: string): Promise<Empty>;
3875
4241
  }
3876
4242
 
3877
4243
  declare class Communications extends ConduitModule<typeof CommunicationsDefinition> {
@@ -4030,40 +4396,27 @@ declare class Communications extends ConduitModule<typeof CommunicationsDefiniti
4030
4396
 
4031
4397
  declare function sleep(ms: number): Promise<unknown>;
4032
4398
 
4033
- declare class RedisManager {
4034
- redisConnection: RedisOptions | {
4035
- nodes: {
4036
- host: string;
4037
- port: number;
4038
- }[];
4039
- options: ClusterOptions;
4040
- };
4041
- constructor(redisDetails?: RedisOptions | {
4042
- nodes: {
4043
- host: string;
4044
- port: number;
4045
- }[];
4046
- options: ClusterOptions;
4047
- });
4048
- getClient(options?: RedisOptions | {
4049
- nodes: {
4050
- host: string;
4051
- port: number;
4052
- }[];
4053
- options: ClusterOptions;
4054
- }): Redis | Cluster;
4055
- }
4056
-
4057
4399
  declare class EventBus {
4058
4400
  private _clientSubscriber;
4059
4401
  private _clientPublisher;
4060
- private _subscribedChannels;
4061
- private _subscribers;
4402
+ /** channelName -> subscriberId -> callback */
4403
+ private _channelCallbacks;
4404
+ /** subscriberId -> channelName */
4405
+ private _subscriberChannels;
4406
+ /** channels with a successful Redis SUBSCRIBE */
4407
+ private _redisSubscribedChannels;
4408
+ private _subscribeInFlight;
4062
4409
  private _signature;
4410
+ private _anonymousSubscriberSeq;
4411
+ private _shuttingDown;
4063
4412
  constructor(redisManager: RedisManager);
4413
+ quit(): void;
4064
4414
  unsubscribe(subscriberId: string): void;
4065
4415
  subscribe(channelName: string, callback: (message: string) => void, subscriberId?: string): void;
4416
+ subscribeAck(channelName: string, callback: (message: string) => void, subscriberId?: string): Promise<void>;
4066
4417
  publish(channelName: string, message: string): void;
4418
+ private removeChannelCallbacks;
4419
+ private dispatch;
4067
4420
  }
4068
4421
 
4069
4422
  declare class StateManager {
@@ -4089,6 +4442,42 @@ declare class StateManager {
4089
4442
  setKey(keyName: string, value: any, expiry?: number): Promise<"OK">;
4090
4443
  clearKey(keyName: string): Promise<number>;
4091
4444
  getKey(keyName: string): Promise<string | null>;
4445
+ /**
4446
+ * Deletes keyName and resolves true when it holds value. A mismatch is counted in
4447
+ * attemptsKey (expiring with keyName), and the maxAttempts-th mismatch deletes keyName.
4448
+ * Both keys must share a hash tag for Redis Cluster.
4449
+ */
4450
+ consumeKeyIfMatches(keyName: string, attemptsKey: string, value: string, maxAttempts: number): Promise<boolean>;
4451
+ incr(keyName: string): Promise<number>;
4452
+ }
4453
+
4454
+ declare const SESSION_REGISTRY_PREFIX = "auth_session_";
4455
+ interface SessionRegistryData {
4456
+ user: string;
4457
+ clientId: string;
4458
+ realm?: string | null;
4459
+ }
4460
+ /**
4461
+ * Redis registry of live sessions, one `auth_session_<sid>` key per session (the prefix is
4462
+ * part of the key itself, so the layout is identical on standalone Redis and Cluster).
4463
+ *
4464
+ * Every operation is bounded by a 500 ms timeout and rejects with
4465
+ * `Error('Session registry unavailable')` when Redis fails or is unreachable, so callers
4466
+ * can fail closed.
4467
+ */
4468
+ declare class SessionRegistry {
4469
+ private readonly client;
4470
+ constructor(redisManager: Pick<RedisManager, 'getClient'>);
4471
+ private key;
4472
+ private run;
4473
+ private static ttl;
4474
+ register(sid: string, data: SessionRegistryData, ttlMs: number): Promise<void>;
4475
+ /** Extends the session's lifetime. Does nothing for an unknown session. */
4476
+ touch(sid: string, ttlMs: number): Promise<void>;
4477
+ exists(sid: string): Promise<boolean>;
4478
+ revoke(sid: string): Promise<void>;
4479
+ /** Attempts every sid; throws an Error listing the sids that could not be revoked. */
4480
+ revokeMany(sids: string[]): Promise<void>;
4092
4481
  }
4093
4482
 
4094
4483
  declare enum PlatformTypesEnum {
@@ -4115,6 +4504,8 @@ declare class ConduitGrpcSdk {
4115
4504
  private _dynamicModules;
4116
4505
  private _eventBus?;
4117
4506
  private _stateManager?;
4507
+ private _userCache?;
4508
+ private _sessionRegistry?;
4118
4509
  private lastSearch;
4119
4510
  private readonly urlRemap?;
4120
4511
  private readonly _serviceHealthStatusGetter;
@@ -4140,6 +4531,10 @@ declare class ConduitGrpcSdk {
4140
4531
  };
4141
4532
  get bus(): EventBus | null;
4142
4533
  get state(): StateManager | null;
4534
+ /** Redis-backed user cache. Throws when Redis is not initialized. */
4535
+ get userCache(): UserCache;
4536
+ /** Redis-backed session registry. Throws when Redis is not initialized. */
4537
+ get sessionRegistry(): SessionRegistry;
4143
4538
  get core(): Core;
4144
4539
  get config(): Config;
4145
4540
  get admin(): Admin;
@@ -4195,4 +4590,4 @@ declare class ConduitGrpcSdk {
4195
4590
  private _initialize;
4196
4591
  }
4197
4592
 
4198
- export { Admin, AdminDefinition, AdminRouterDefinition, AllowedResourcesRequest, AllowedResourcesResponse, AnonymousUserCreateRequest, type Array$1 as Array, type ArrayConduitModel, Attachment, Authentication, AuthenticationDefinition, Authorization, AuthorizationDefinition, type AuthzOptions, type AwaitPeerOptions, BackfillMutationResponse, BackfillRun, type BackfillRunRecord, type BasicConduitModelField, type BodyParams, CancelBackfillRequest, Chat, ChatDefinition, ClientRouterDefinition, ColumnExistenceRequest, ColumnExistenceResponse, Communications, CommunicationsDefinition, type ConduitArrayValidation, ConduitAuthorizedResource, ConduitError, ConduitGrpcSdk, type ConduitMiddlewareOptions, type ConduitModel, type ConduitModelField, type ConduitModelFieldEnum, type ConduitModelFieldJSON, type ConduitModelFieldRelation, type ConduitModelFieldVector, ConduitModelOptionsPermModifyType, ConduitModule, ConduitModuleDefinition, type ConduitNumberValidation, type ConduitQueryParam, type ConduitQueryParams, type ConduitReturn, type ConduitReturnField, type ConduitReturnModel, type ConduitRoute, ConduitRouteActions, type ConduitRouteObject, type ConduitRouteOptions, type ConduitRouteParameters, ConduitRouteReturnDefinition, ConduitSchema, type ConduitSchemaExtension, type ConduitSchemaOptions, type ConduitSocketOptions, type ConduitSocketParamTypes, type ConduitStringValidation, type ConduitUrlParam, type ConduitUrlParams, type ConduitValidationRules, Config, ConfigDefinition, type Context, Cookie, CookieOptions, type Cookies, Core, CoreDefinition, type CountDocumentsOptions, CreateFileByUrlRequest, CreateFileRequest, CreateRelationsRequest, CreateRoomRequest, CreateSchemaRequest, CreateTeamRequest, CreateViewRequest, CreateViewRequest_RawQuery, DatabaseProvider, DatabaseProviderDefinition, Decision, DeleteAllRelationsRequest, DeleteCommunicationTemplateRequest, DeleteCommunicationTemplateResponse, DeleteConfigRequest, DeleteEmbeddingConfigRequest, DeleteEmbeddingConfigResponse, DeleteFileResponse, DeleteResourceRequest, DeleteRoomRequest, DeleteVectorIndexRequest, DeleteViewRequest, type Document$1 as Document, DropCollectionRequest, DropCollectionResponse, EditMessageRequest, Email, EmbeddingConfig, type EmbeddingConfigInput, type EmbeddingConfigRecord, EmbeddingsProvider, EmbeddingsProviderDefinition, type EmbeddingsStatus, type EventsProtoDescription, ExportResourcesRequest, ExportResourcesResponse, FileByUrlResponse, FileResponse, type FindManyOptions, type FindOneOptions, FindOneRequest, FindRelationRequest, FindRelationResponse, FindRequest, FindRequest_SortEntry, GetBackfillRequest, GetCapabilitiesRequest, GetCapabilitiesResponse, GetCommunicationTemplateRequest, GetCommunicationTemplateResponse, GetConfigRequest, GetConfigResponse, GetConfigsRequest, GetConfigsResponse, GetDatabaseTypeResponse, GetEmailStatusRequest, GetEmailStatusResponse, GetExportableResourcesRequest, GetExportableResourcesResponse, GetFileDataResponse, GetFileRequest, GetFileUrlRequest, GetFileUrlResponse, GetMessageStatusRequest, GetMessageStatusResponse, GetNotificationTokensRequest, GetNotificationTokensResponse, GetRedisDetailsResponse, GetRoomResponse, GetSchemaRequest, GetSchemasRequest, GetSchemasResponse, GetStatusRequest, GetStatusResponse, GetTeamRequest, type GrpcCallback, GrpcError, type GrpcRequest, type GrpcResponse, type Headers$1 as Headers, HealthCheckRequest, HealthCheckResponse, HealthCheckResponse_ServingStatus, HealthCheckStatus, HealthDefinition, type IConduitLogger, type IConduitMetrics, ImportResourcesRequest, ImportResourcesResponse, type Indexable, InvitationDeleteRequest, InvitationDeleteResponse, InviteUserToTeamRequest, InviteUserToTeamResponse, ListBackfillsRequest, ListBackfillsResponse, ListCommunicationTemplatesRequest, ListCommunicationTemplatesResponse, MetricType, MigrateRequest, type ModelOptionsIndexes, ModifyTeamMembersRequest, ModuleByNameRequest, ModuleByNameResponse, type ModuleErrorDefinition, ModuleExistsRequest, ModuleExistsResponse, ModuleHealthRequest, ModuleListResponse, ModuleListResponse_ModuleResponse, type MongoIndexOptions, MongoIndexType, type Params, type ParsedRouterRequest, type ParsedSocketRequest, PatchAppRouteMiddlewaresRequest, PatchRouteMiddlewaresRequest, type PeerWatchBatchOptions, type PeerWatchEdge, type PeerWatchOptions, type PeerWatchSpec, PermissionCheck, PermissionRequest, PlatformTypesEnum, type PopulateAuthzOptions, type PostgresIndexOptions, PostgresIndexType, PushNotifications, type Query, type QueryParams, QueryRequest, QueryResponse, type QueueCounts, type RateLimitOptions, type RawMongoQuery, type RawQuery, RawQueryRequest, RawQueryRequest_RawQuery, RawQueryRequest_RawQuery_MongoQuery, RawQueryRequest_RawQuery_SQLQuery, type RawSQLQuery, RegisterAdminRouteRequest, RegisterAdminRouteRequest_ConduitRouteOptions, RegisterAdminRouteRequest_ConduitRouteReturnDefinition, RegisterAdminRouteRequest_ErrorDefinition, RegisterAdminRouteRequest_PathDefinition, RegisterCommunicationTemplateRequest, RegisterCommunicationTemplateRequest_CommunicationTemplate, RegisterCommunicationTemplateRequest_CommunicationTemplate_EmailTemplate, RegisterCommunicationTemplateRequest_CommunicationTemplate_PushTemplate, RegisterCommunicationTemplateRequest_CommunicationTemplate_SmsTemplate, RegisterCommunicationTemplateResponse, RegisterConduitRouteRequest, RegisterConduitRouteRequest_ConduitRouteOptions, RegisterConduitRouteRequest_ConduitRouteReturnDefinition, RegisterConduitRouteRequest_ErrorDefinition, RegisterConduitRouteRequest_PathDefinition, RegisterModuleRequest, RegisterModuleResponse, RegisterModulesConfigRequest, RegisterTemplateRequest, RegisterTemplateResponse, Relation, Request, ResendEmailRequest, ResendEmailResponse, Resource, ResourceAccessListRequest, ResourceAccessListResponse, ResourceModificationAcknowledgement, ResourceModificationAcknowledgement_Status, Resource_Permission, Resource_Relation, Response, ResumeBackfillRequest, Room, type Route, Router, RouterDefinition, SMS, SQLDataType, Schema, SchemaExtension, type SchemaFieldIndex, SemanticSearchHit, type SemanticSearchInput, SemanticSearchRequest, SemanticSearchResponse, SendCommunicationRequest, SendCommunicationRequest_SendCommunicationParams, SendCommunicationResponse, SendEmailRequest, SendEmailRequest_SendEmailParams, SendEmailResponse, SendManyNotificationsRequest, type SendMessageInput, SendMessageRequest, SendNotificationRequest, SendNotificationResponse, SendNotificationToManyDevicesRequest, SendSmsRequest, SendSmsResponse, SendToMultipleChannelsRequest, SendToMultipleChannelsRequest_SendCommunicationParams, SendToMultipleChannelsResponse, SendToMultipleChannelsResponse_ChannelResult, SendVerificationCodeRequest, SendVerificationCodeResponse, SendWithFallbackRequest, SendWithFallbackRequest_FallbackStep, SendWithFallbackRequest_SendCommunicationParams, SendWithFallbackResponse, SendWithFallbackResponse_ChannelResult, SetConfigRequest, SetConfigResponse, SetNotificationTokenRequest, SetNotificationTokenResponse, SocketData, type SocketProtoDescription, SocketRequest, SocketResponse, type StartBackfillInput, StartBackfillRequest, StartBackfillResponse, Storage, StorageDefinition, TYPE, Team, TeamDeleteRequest, TeamDeleteResponse, type UnparsedRouterResponse, type UnparsedSocketResponse, type UntypedArray, UpdateCommunicationTemplateRequest, UpdateConfigRequest, UpdateConfigResponse, UpdateFileByUrlRequest, UpdateFileRequest, UpdateManyRequest, UpdateRequest, UpdateTeamRequest, UpdateTemplateRequest, UpsertConfigRequest, UpsertConfigResponse, type UrlParams, UserChangePass, UserCreateByUsernameRequest, UserCreateRequest, UserCreateResponse, UserDeleteRequest, UserDeleteResponse, UserLoginRequest, UserLoginResponse, UserModifyStatusRequest, UserModifyStatusResponse, ValidateAccessTokenRequest, ValidateAccessTokenResponse, ValidateAccessTokenResponse_Status, type VectorCapabilities, VectorCapabilitiesRequest, VectorCapabilitiesResponse, VectorIndex, type VectorIndexDefinition, VectorIndexListRequest, VectorIndexListResponse, VectorIndexMethod, VectorIndexRequest, VectorIndexStatus, type VectorSearchInput, type VectorSearchProvider, VectorSearchRequest, type VectorSearchResult, VectorSimilarity, VerifyRequest, VerifyResponse, type allowedTypes, checkModuleHealth, defaultVectorIndexMethod, healthCheckResponse_ServingStatusFromJSON, healthCheckResponse_ServingStatusToJSON, resourceModificationAcknowledgement_StatusFromJSON, resourceModificationAcknowledgement_StatusToJSON, validateAccessTokenResponse_StatusFromJSON, validateAccessTokenResponse_StatusToJSON, vectorIndexMethodsEquivalent };
4593
+ export { type AccessTokenClaims, Admin, AdminDefinition, AdminRouterDefinition, AllowedResourcesRequest, AllowedResourcesResponse, AnonymousUserCreateRequest, type Array$1 as Array, type ArrayConduitModel, Attachment, Authentication, AuthenticationDefinition, Authorization, AuthorizationDefinition, type AuthzOptions, type AwaitPeerOptions, BackfillMutationResponse, BackfillRun, type BackfillRunRecord, type BasicConduitModelField, type BodyParams, CancelBackfillRequest, Chat, ChatDefinition, ClientRouterDefinition, ColumnExistenceRequest, ColumnExistenceResponse, Communications, CommunicationsDefinition, CompatibleIndexType, type ConduitArrayValidation, ConduitAuthorizedResource, ConduitError, ConduitGrpcSdk, type ConduitMiddlewareOptions, type ConduitModel, type ConduitModelField, type ConduitModelFieldEnum, type ConduitModelFieldJSON, type ConduitModelFieldRelation, type ConduitModelFieldVector, ConduitModelOptionsPermModifyType, ConduitModule, ConduitModuleDefinition, type ConduitNumberValidation, type ConduitQueryParam, type ConduitQueryParams, type ConduitReturn, type ConduitReturnField, type ConduitReturnModel, type ConduitRoute, ConduitRouteActions, type ConduitRouteObject, type ConduitRouteOptions, type ConduitRouteParameters, ConduitRouteReturnDefinition, ConduitSchema, type ConduitSchemaExtension, type ConduitSchemaOptions, type ConduitSocketOptions, type ConduitSocketParamTypes, type ConduitStringValidation, type ConduitUrlParam, type ConduitUrlParams, type ConduitValidationRules, Config, ConfigDefinition, type Context, Cookie, CookieOptions, type Cookies, Core, CoreDefinition, type CountDocumentsOptions, CreateFileByUrlRequest, CreateFileRequest, CreateRelationsRequest, CreateRoomRequest, CreateSchemaRequest, CreateTeamRequest, CreateViewRequest, CreateViewRequest_RawQuery, DatabaseProvider, DatabaseProviderDefinition, Decision, DeleteAllRelationsRequest, DeleteCommunicationTemplateRequest, DeleteCommunicationTemplateResponse, DeleteConfigRequest, DeleteEmbeddingConfigRequest, DeleteEmbeddingConfigResponse, DeleteFileResponse, DeleteMessageRequest, DeleteResourceRequest, DeleteRoomRequest, DeleteVectorIndexRequest, DeleteViewRequest, type Document$1 as Document, DropCollectionRequest, DropCollectionResponse, EditMessageRequest, Email, EmbeddingConfig, type EmbeddingConfigInput, type EmbeddingConfigRecord, EmbeddingsProvider, EmbeddingsProviderDefinition, type EmbeddingsStatus, type EventsProtoDescription, ExportResourcesRequest, ExportResourcesResponse, FileByUrlResponse, FileResponse, type FindManyOptions, type FindOneOptions, FindOneRequest, FindRelationRequest, FindRelationResponse, FindRequest, FindRequest_SortEntry, GetBackfillRequest, GetCapabilitiesRequest, GetCapabilitiesResponse, GetCommunicationTemplateRequest, GetCommunicationTemplateResponse, GetConfigRequest, GetConfigResponse, GetConfigsRequest, GetConfigsResponse, GetDatabaseTypeResponse, GetEmailStatusRequest, GetEmailStatusResponse, GetExportableResourcesRequest, GetExportableResourcesResponse, GetFileDataResponse, GetFileRequest, GetFileUrlRequest, GetFileUrlResponse, GetMessageStatusRequest, GetMessageStatusResponse, GetNotificationTokensRequest, GetNotificationTokensResponse, GetRealmSettingsRequest, GetRedisDetailsResponse, GetRoomResponse, GetSchemaRequest, GetSchemasRequest, GetSchemasResponse, GetStatusRequest, GetStatusResponse, GetTeamRequest, GetUserRequest, GetUserResponse, type GrpcCallback, GrpcError, type GrpcRequest, type GrpcResponse, type Headers$1 as Headers, HealthCheckRequest, HealthCheckResponse, HealthCheckResponse_ServingStatus, HealthCheckStatus, HealthDefinition, type IConduitLogger, type IConduitMetrics, ImportResourcesRequest, ImportResourcesResponse, type IndexType, type Indexable, InvitationDeleteRequest, InvitationDeleteResponse, InviteUserToTeamRequest, InviteUserToTeamResponse, ListBackfillsRequest, ListBackfillsResponse, ListCommunicationTemplatesRequest, ListCommunicationTemplatesResponse, MetricType, MigrateRequest, type ModelOptionsIndexTypes, type ModelOptionsIndexes, ModifyTeamMembersRequest, ModuleByNameRequest, ModuleByNameResponse, type ModuleErrorDefinition, ModuleExistsRequest, ModuleExistsResponse, ModuleHealthRequest, ModuleListResponse, ModuleListResponse_ModuleResponse, type MongoIndexOptions, MongoIndexType, type Params, type ParsedRouterRequest, type ParsedSocketRequest, PatchAppRouteMiddlewaresRequest, PatchRouteMiddlewaresRequest, type PeerWatchBatchOptions, type PeerWatchEdge, type PeerWatchOptions, type PeerWatchSpec, PermissionCheck, PermissionRequest, PlatformTypesEnum, type PopulateAuthzOptions, type PostgresIndexOptions, PostgresIndexType, PushNotifications, type Query, type QueryParams, QueryRequest, QueryResponse, type QueueCounts, type RateLimitOptions, type RawMongoQuery, type RawQuery, RawQueryRequest, RawQueryRequest_RawQuery, RawQueryRequest_RawQuery_MongoQuery, RawQueryRequest_RawQuery_SQLQuery, type RawSQLQuery, RealmMembershipRequest, RealmResponse, RegisterAdminRouteRequest, RegisterAdminRouteRequest_ConduitRouteOptions, RegisterAdminRouteRequest_ConduitRouteReturnDefinition, RegisterAdminRouteRequest_ErrorDefinition, RegisterAdminRouteRequest_PathDefinition, RegisterCommunicationTemplateRequest, RegisterCommunicationTemplateRequest_CommunicationTemplate, RegisterCommunicationTemplateRequest_CommunicationTemplate_EmailTemplate, RegisterCommunicationTemplateRequest_CommunicationTemplate_PushTemplate, RegisterCommunicationTemplateRequest_CommunicationTemplate_SmsTemplate, RegisterCommunicationTemplateResponse, RegisterConduitRouteRequest, RegisterConduitRouteRequest_ConduitRouteOptions, RegisterConduitRouteRequest_ConduitRouteReturnDefinition, RegisterConduitRouteRequest_ErrorDefinition, RegisterConduitRouteRequest_PathDefinition, RegisterModuleRequest, RegisterModuleResponse, RegisterModulesConfigRequest, RegisterTemplateRequest, RegisterTemplateResponse, Relation, Request, ResendEmailRequest, ResendEmailResponse, Resource, ResourceAccessListRequest, ResourceAccessListResponse, ResourceModificationAcknowledgement, ResourceModificationAcknowledgement_Status, Resource_Permission, Resource_Relation, Response, ResumeBackfillRequest, Room, type Route, Router, RouterDefinition, SESSION_REGISTRY_PREFIX, SMS, SQLDataType, Schema, SchemaExtension, type SchemaFieldIndex, SemanticSearchHit, type SemanticSearchInput, SemanticSearchRequest, SemanticSearchResponse, SendCommunicationRequest, SendCommunicationRequest_SendCommunicationParams, SendCommunicationResponse, SendEmailRequest, SendEmailRequest_SendEmailParams, SendEmailResponse, SendManyNotificationsRequest, type SendMessageInput, SendMessageRequest, SendNotificationRequest, SendNotificationResponse, SendNotificationToManyDevicesRequest, SendSmsRequest, SendSmsResponse, SendToMultipleChannelsRequest, SendToMultipleChannelsRequest_SendCommunicationParams, SendToMultipleChannelsResponse, SendToMultipleChannelsResponse_ChannelResult, SendVerificationCodeRequest, SendVerificationCodeResponse, SendWithFallbackRequest, SendWithFallbackRequest_FallbackStep, SendWithFallbackRequest_SendCommunicationParams, SendWithFallbackResponse, SendWithFallbackResponse_ChannelResult, SessionRegistry, type SessionRegistryData, SetConfigRequest, SetConfigResponse, SetNotificationTokenRequest, SetNotificationTokenResponse, SetTeamRealmRequest, SocketData, type SocketProtoDescription, SocketPushRequest, SocketRequest, SocketResponse, type StartBackfillInput, StartBackfillRequest, StartBackfillResponse, Storage, StorageDefinition, SubjectPermission, SubjectPermissionsRequest, SubjectPermissionsResponse, TYPE, Team, TeamDeleteRequest, TeamDeleteResponse, USER_CACHE_PREFIX, USER_CACHE_TTL_MS, type UnparsedRouterResponse, type UnparsedSocketResponse, UnsetTeamRealmRequest, UnsetTeamRealmResponse, type UntypedArray, UpdateCommunicationTemplateRequest, UpdateConfigRequest, UpdateConfigResponse, UpdateFileByUrlRequest, UpdateFileRequest, UpdateManyRequest, UpdateRequest, UpdateTeamRequest, UpdateTemplateRequest, UpsertConfigRequest, UpsertConfigResponse, type UrlParams, UserCache, UserChangeEmail, UserChangeEmailResponse, UserChangePass, UserCreateByUsernameRequest, UserCreateRequest, UserCreateResponse, UserDeleteRequest, UserDeleteResponse, UserLoginRequest, UserLoginResponse, UserModifyStatusRequest, UserModifyStatusResponse, ValidateAccessTokenRequest, ValidateAccessTokenResponse, ValidateAccessTokenResponse_Status, type VectorCapabilities, VectorCapabilitiesRequest, VectorCapabilitiesResponse, VectorIndex, type VectorIndexDefinition, VectorIndexListRequest, VectorIndexListResponse, VectorIndexMethod, VectorIndexRequest, VectorIndexStatus, type VectorSearchInput, type VectorSearchProvider, VectorSearchRequest, type VectorSearchResult, VectorSimilarity, VerifyRequest, VerifyResponse, type allowedTypes, checkModuleHealth, defaultVectorIndexMethod, healthCheckResponse_ServingStatusFromJSON, healthCheckResponse_ServingStatusToJSON, resourceModificationAcknowledgement_StatusFromJSON, resourceModificationAcknowledgement_StatusToJSON, validateAccessTokenResponse_StatusFromJSON, validateAccessTokenResponse_StatusToJSON, vectorIndexMethodsEquivalent };