@authhero/kysely-adapter 10.52.0 → 10.54.0
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/kysely-adapter.cjs +8 -8
- package/dist/kysely-adapter.d.ts +221 -28
- package/dist/kysely-adapter.mjs +2210 -2039
- package/package.json +3 -3
package/dist/kysely-adapter.d.ts
CHANGED
|
@@ -4238,6 +4238,135 @@ declare const hookSchema: z.ZodUnion<[
|
|
|
4238
4238
|
}>
|
|
4239
4239
|
]>;
|
|
4240
4240
|
export type Hook = z.infer<typeof hookSchema>;
|
|
4241
|
+
declare const inviteInsertSchema: z.ZodObject<{
|
|
4242
|
+
organization_id: z.ZodString;
|
|
4243
|
+
inviter: z.ZodObject<{
|
|
4244
|
+
name: z.ZodOptional<z.ZodString>;
|
|
4245
|
+
}, "strip", z.ZodTypeAny, {
|
|
4246
|
+
name?: string | undefined;
|
|
4247
|
+
}, {
|
|
4248
|
+
name?: string | undefined;
|
|
4249
|
+
}>;
|
|
4250
|
+
invitee: z.ZodObject<{
|
|
4251
|
+
email: z.ZodOptional<z.ZodString>;
|
|
4252
|
+
}, "strip", z.ZodTypeAny, {
|
|
4253
|
+
email?: string | undefined;
|
|
4254
|
+
}, {
|
|
4255
|
+
email?: string | undefined;
|
|
4256
|
+
}>;
|
|
4257
|
+
invitation_url: z.ZodString;
|
|
4258
|
+
client_id: z.ZodString;
|
|
4259
|
+
connection_id: z.ZodOptional<z.ZodString>;
|
|
4260
|
+
app_metadata: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
4261
|
+
user_metadata: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
4262
|
+
ttl_sec: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
4263
|
+
roles: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
|
|
4264
|
+
send_invitation_email: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
4265
|
+
}, "strip", z.ZodTypeAny, {
|
|
4266
|
+
client_id: string;
|
|
4267
|
+
organization_id: string;
|
|
4268
|
+
inviter: {
|
|
4269
|
+
name?: string | undefined;
|
|
4270
|
+
};
|
|
4271
|
+
invitee: {
|
|
4272
|
+
email?: string | undefined;
|
|
4273
|
+
};
|
|
4274
|
+
invitation_url: string;
|
|
4275
|
+
app_metadata?: Record<string, any> | undefined;
|
|
4276
|
+
user_metadata?: Record<string, any> | undefined;
|
|
4277
|
+
connection_id?: string | undefined;
|
|
4278
|
+
ttl_sec?: number | undefined;
|
|
4279
|
+
roles?: string[] | undefined;
|
|
4280
|
+
send_invitation_email?: boolean | undefined;
|
|
4281
|
+
}, {
|
|
4282
|
+
client_id: string;
|
|
4283
|
+
organization_id: string;
|
|
4284
|
+
inviter: {
|
|
4285
|
+
name?: string | undefined;
|
|
4286
|
+
};
|
|
4287
|
+
invitee: {
|
|
4288
|
+
email?: string | undefined;
|
|
4289
|
+
};
|
|
4290
|
+
invitation_url: string;
|
|
4291
|
+
app_metadata?: Record<string, any> | undefined;
|
|
4292
|
+
user_metadata?: Record<string, any> | undefined;
|
|
4293
|
+
connection_id?: string | undefined;
|
|
4294
|
+
ttl_sec?: number | undefined;
|
|
4295
|
+
roles?: string[] | undefined;
|
|
4296
|
+
send_invitation_email?: boolean | undefined;
|
|
4297
|
+
}>;
|
|
4298
|
+
export type InviteInsert = z.infer<typeof inviteInsertSchema>;
|
|
4299
|
+
declare const inviteSchema: z.ZodObject<{
|
|
4300
|
+
id: z.ZodString;
|
|
4301
|
+
created_at: z.ZodString;
|
|
4302
|
+
expires_at: z.ZodString;
|
|
4303
|
+
ticket_id: z.ZodOptional<z.ZodString>;
|
|
4304
|
+
} & {
|
|
4305
|
+
organization_id: z.ZodString;
|
|
4306
|
+
inviter: z.ZodObject<{
|
|
4307
|
+
name: z.ZodOptional<z.ZodString>;
|
|
4308
|
+
}, "strip", z.ZodTypeAny, {
|
|
4309
|
+
name?: string | undefined;
|
|
4310
|
+
}, {
|
|
4311
|
+
name?: string | undefined;
|
|
4312
|
+
}>;
|
|
4313
|
+
invitee: z.ZodObject<{
|
|
4314
|
+
email: z.ZodOptional<z.ZodString>;
|
|
4315
|
+
}, "strip", z.ZodTypeAny, {
|
|
4316
|
+
email?: string | undefined;
|
|
4317
|
+
}, {
|
|
4318
|
+
email?: string | undefined;
|
|
4319
|
+
}>;
|
|
4320
|
+
invitation_url: z.ZodString;
|
|
4321
|
+
client_id: z.ZodString;
|
|
4322
|
+
connection_id: z.ZodOptional<z.ZodString>;
|
|
4323
|
+
app_metadata: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
4324
|
+
user_metadata: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
4325
|
+
ttl_sec: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
4326
|
+
roles: z.ZodOptional<z.ZodDefault<z.ZodArray<z.ZodString, "many">>>;
|
|
4327
|
+
send_invitation_email: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
4328
|
+
}, "strip", z.ZodTypeAny, {
|
|
4329
|
+
created_at: string;
|
|
4330
|
+
client_id: string;
|
|
4331
|
+
id: string;
|
|
4332
|
+
expires_at: string;
|
|
4333
|
+
organization_id: string;
|
|
4334
|
+
inviter: {
|
|
4335
|
+
name?: string | undefined;
|
|
4336
|
+
};
|
|
4337
|
+
invitee: {
|
|
4338
|
+
email?: string | undefined;
|
|
4339
|
+
};
|
|
4340
|
+
invitation_url: string;
|
|
4341
|
+
app_metadata?: Record<string, any> | undefined;
|
|
4342
|
+
user_metadata?: Record<string, any> | undefined;
|
|
4343
|
+
connection_id?: string | undefined;
|
|
4344
|
+
ttl_sec?: number | undefined;
|
|
4345
|
+
roles?: string[] | undefined;
|
|
4346
|
+
send_invitation_email?: boolean | undefined;
|
|
4347
|
+
ticket_id?: string | undefined;
|
|
4348
|
+
}, {
|
|
4349
|
+
created_at: string;
|
|
4350
|
+
client_id: string;
|
|
4351
|
+
id: string;
|
|
4352
|
+
expires_at: string;
|
|
4353
|
+
organization_id: string;
|
|
4354
|
+
inviter: {
|
|
4355
|
+
name?: string | undefined;
|
|
4356
|
+
};
|
|
4357
|
+
invitee: {
|
|
4358
|
+
email?: string | undefined;
|
|
4359
|
+
};
|
|
4360
|
+
invitation_url: string;
|
|
4361
|
+
app_metadata?: Record<string, any> | undefined;
|
|
4362
|
+
user_metadata?: Record<string, any> | undefined;
|
|
4363
|
+
connection_id?: string | undefined;
|
|
4364
|
+
ttl_sec?: number | undefined;
|
|
4365
|
+
roles?: string[] | undefined;
|
|
4366
|
+
send_invitation_email?: boolean | undefined;
|
|
4367
|
+
ticket_id?: string | undefined;
|
|
4368
|
+
}>;
|
|
4369
|
+
export type Invite = z.infer<typeof inviteSchema>;
|
|
4241
4370
|
export interface ListParams {
|
|
4242
4371
|
page?: number;
|
|
4243
4372
|
per_page?: number;
|
|
@@ -7488,6 +7617,16 @@ export interface UserOrganizationsAdapter {
|
|
|
7488
7617
|
} & Totals>;
|
|
7489
7618
|
update(tenantId: string, id: string, params: Partial<UserOrganizationInsert>): Promise<boolean>;
|
|
7490
7619
|
}
|
|
7620
|
+
export interface ListInvitesResponse extends Totals {
|
|
7621
|
+
invites: Invite[];
|
|
7622
|
+
}
|
|
7623
|
+
export interface InvitesAdapter {
|
|
7624
|
+
create(tenant_id: string, params: InviteInsert): Promise<Invite>;
|
|
7625
|
+
get(tenant_id: string, id: string): Promise<Invite | null>;
|
|
7626
|
+
remove(tenant_id: string, id: string): Promise<boolean>;
|
|
7627
|
+
list(tenant_id: string, params?: ListParams): Promise<ListInvitesResponse>;
|
|
7628
|
+
update(tenant_id: string, id: string, params: Partial<InviteInsert>): Promise<boolean>;
|
|
7629
|
+
}
|
|
7491
7630
|
export interface DataAdapters {
|
|
7492
7631
|
branding: BrandingAdapter;
|
|
7493
7632
|
cache?: CacheAdapter;
|
|
@@ -7500,6 +7639,7 @@ export interface DataAdapters {
|
|
|
7500
7639
|
emailProviders: EmailProvidersAdapter;
|
|
7501
7640
|
forms: FormsAdapter;
|
|
7502
7641
|
hooks: HooksAdapter;
|
|
7642
|
+
invites: InvitesAdapter;
|
|
7503
7643
|
keys: KeysAdapter;
|
|
7504
7644
|
loginSessions: LoginSessionsAdapter;
|
|
7505
7645
|
logs: LogsDataAdapter;
|
|
@@ -8216,28 +8356,28 @@ declare const sqlTenantSchema: z.ZodObject<{
|
|
|
8216
8356
|
idle_session_lifetime: z.ZodOptional<z.ZodNumber>;
|
|
8217
8357
|
ephemeral_session_lifetime: z.ZodOptional<z.ZodNumber>;
|
|
8218
8358
|
idle_ephemeral_session_lifetime: z.ZodOptional<z.ZodNumber>;
|
|
8219
|
-
session_cookie: z.
|
|
8220
|
-
allowed_logout_urls: z.
|
|
8359
|
+
session_cookie: z.ZodOptional<z.ZodString>;
|
|
8360
|
+
allowed_logout_urls: z.ZodOptional<z.ZodString>;
|
|
8221
8361
|
default_redirection_uri: z.ZodOptional<z.ZodString>;
|
|
8222
|
-
enabled_locales: z.
|
|
8362
|
+
enabled_locales: z.ZodOptional<z.ZodString>;
|
|
8223
8363
|
default_directory: z.ZodOptional<z.ZodString>;
|
|
8224
|
-
error_page: z.
|
|
8225
|
-
flags: z.
|
|
8364
|
+
error_page: z.ZodOptional<z.ZodString>;
|
|
8365
|
+
flags: z.ZodOptional<z.ZodString>;
|
|
8226
8366
|
sandbox_version: z.ZodOptional<z.ZodString>;
|
|
8227
8367
|
legacy_sandbox_version: z.ZodOptional<z.ZodString>;
|
|
8228
|
-
sandbox_versions_available: z.
|
|
8229
|
-
change_password: z.
|
|
8230
|
-
guardian_mfa_page: z.
|
|
8231
|
-
device_flow: z.
|
|
8232
|
-
default_token_quota: z.
|
|
8368
|
+
sandbox_versions_available: z.ZodOptional<z.ZodString>;
|
|
8369
|
+
change_password: z.ZodOptional<z.ZodString>;
|
|
8370
|
+
guardian_mfa_page: z.ZodOptional<z.ZodString>;
|
|
8371
|
+
device_flow: z.ZodOptional<z.ZodString>;
|
|
8372
|
+
default_token_quota: z.ZodOptional<z.ZodString>;
|
|
8233
8373
|
default_audience: z.ZodOptional<z.ZodString>;
|
|
8234
8374
|
default_organization: z.ZodOptional<z.ZodString>;
|
|
8235
|
-
sessions: z.
|
|
8236
|
-
oidc_logout: z.
|
|
8375
|
+
sessions: z.ZodOptional<z.ZodString>;
|
|
8376
|
+
oidc_logout: z.ZodOptional<z.ZodString>;
|
|
8237
8377
|
allow_organization_name_in_authentication_api: z.ZodOptional<z.ZodNumber>;
|
|
8238
8378
|
customize_mfa_in_postlogin_action: z.ZodOptional<z.ZodNumber>;
|
|
8239
|
-
acr_values_supported: z.
|
|
8240
|
-
mtls: z.
|
|
8379
|
+
acr_values_supported: z.ZodOptional<z.ZodString>;
|
|
8380
|
+
mtls: z.ZodOptional<z.ZodString>;
|
|
8241
8381
|
pushed_authorization_requests_supported: z.ZodOptional<z.ZodNumber>;
|
|
8242
8382
|
authorization_response_iss_parameter_supported: z.ZodOptional<z.ZodNumber>;
|
|
8243
8383
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -8248,20 +8388,6 @@ declare const sqlTenantSchema: z.ZodObject<{
|
|
|
8248
8388
|
sender_email: string;
|
|
8249
8389
|
sender_name: string;
|
|
8250
8390
|
friendly_name: string;
|
|
8251
|
-
session_cookie: string;
|
|
8252
|
-
allowed_logout_urls: string;
|
|
8253
|
-
enabled_locales: string;
|
|
8254
|
-
error_page: string;
|
|
8255
|
-
flags: string;
|
|
8256
|
-
sandbox_versions_available: string;
|
|
8257
|
-
change_password: string;
|
|
8258
|
-
guardian_mfa_page: string;
|
|
8259
|
-
device_flow: string;
|
|
8260
|
-
default_token_quota: string;
|
|
8261
|
-
sessions: string;
|
|
8262
|
-
oidc_logout: string;
|
|
8263
|
-
acr_values_supported: string;
|
|
8264
|
-
mtls: string;
|
|
8265
8391
|
support_url?: string | undefined;
|
|
8266
8392
|
picture_url?: string | undefined;
|
|
8267
8393
|
support_email?: string | undefined;
|
|
@@ -8269,14 +8395,28 @@ declare const sqlTenantSchema: z.ZodObject<{
|
|
|
8269
8395
|
idle_session_lifetime?: number | undefined;
|
|
8270
8396
|
ephemeral_session_lifetime?: number | undefined;
|
|
8271
8397
|
idle_ephemeral_session_lifetime?: number | undefined;
|
|
8398
|
+
session_cookie?: string | undefined;
|
|
8399
|
+
allowed_logout_urls?: string | undefined;
|
|
8272
8400
|
default_redirection_uri?: string | undefined;
|
|
8401
|
+
enabled_locales?: string | undefined;
|
|
8273
8402
|
default_directory?: string | undefined;
|
|
8403
|
+
error_page?: string | undefined;
|
|
8404
|
+
flags?: string | undefined;
|
|
8274
8405
|
sandbox_version?: string | undefined;
|
|
8275
8406
|
legacy_sandbox_version?: string | undefined;
|
|
8407
|
+
sandbox_versions_available?: string | undefined;
|
|
8408
|
+
change_password?: string | undefined;
|
|
8409
|
+
guardian_mfa_page?: string | undefined;
|
|
8410
|
+
device_flow?: string | undefined;
|
|
8411
|
+
default_token_quota?: string | undefined;
|
|
8276
8412
|
default_audience?: string | undefined;
|
|
8277
8413
|
default_organization?: string | undefined;
|
|
8414
|
+
sessions?: string | undefined;
|
|
8415
|
+
oidc_logout?: string | undefined;
|
|
8278
8416
|
allow_organization_name_in_authentication_api?: number | undefined;
|
|
8279
8417
|
customize_mfa_in_postlogin_action?: number | undefined;
|
|
8418
|
+
acr_values_supported?: string | undefined;
|
|
8419
|
+
mtls?: string | undefined;
|
|
8280
8420
|
pushed_authorization_requests_supported?: number | undefined;
|
|
8281
8421
|
authorization_response_iss_parameter_supported?: number | undefined;
|
|
8282
8422
|
}, {
|
|
@@ -8475,6 +8615,58 @@ declare const sqlUserOrganizationSchema: z.ZodObject<{
|
|
|
8475
8615
|
id: string;
|
|
8476
8616
|
organization_id: string;
|
|
8477
8617
|
}>;
|
|
8618
|
+
declare const sqlInviteSchema: z.ZodObject<{
|
|
8619
|
+
id: z.ZodString;
|
|
8620
|
+
tenant_id: z.ZodString;
|
|
8621
|
+
organization_id: z.ZodString;
|
|
8622
|
+
inviter: z.ZodString;
|
|
8623
|
+
invitee: z.ZodString;
|
|
8624
|
+
client_id: z.ZodString;
|
|
8625
|
+
connection_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
8626
|
+
invitation_url: z.ZodString;
|
|
8627
|
+
created_at: z.ZodString;
|
|
8628
|
+
expires_at: z.ZodString;
|
|
8629
|
+
app_metadata: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
8630
|
+
user_metadata: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
8631
|
+
roles: z.ZodDefault<z.ZodOptional<z.ZodString>>;
|
|
8632
|
+
ticket_id: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
8633
|
+
ttl_sec: z.ZodOptional<z.ZodNumber>;
|
|
8634
|
+
send_invitation_email: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
8635
|
+
}, "strip", z.ZodTypeAny, {
|
|
8636
|
+
tenant_id: string;
|
|
8637
|
+
app_metadata: string;
|
|
8638
|
+
user_metadata: string;
|
|
8639
|
+
created_at: string;
|
|
8640
|
+
id: string;
|
|
8641
|
+
expires_at: string;
|
|
8642
|
+
client_id: string;
|
|
8643
|
+
organization_id: string;
|
|
8644
|
+
inviter: string;
|
|
8645
|
+
invitee: string;
|
|
8646
|
+
invitation_url: string;
|
|
8647
|
+
roles: string;
|
|
8648
|
+
send_invitation_email: number;
|
|
8649
|
+
connection_id?: string | null | undefined;
|
|
8650
|
+
ticket_id?: string | null | undefined;
|
|
8651
|
+
ttl_sec?: number | undefined;
|
|
8652
|
+
}, {
|
|
8653
|
+
tenant_id: string;
|
|
8654
|
+
created_at: string;
|
|
8655
|
+
id: string;
|
|
8656
|
+
expires_at: string;
|
|
8657
|
+
client_id: string;
|
|
8658
|
+
organization_id: string;
|
|
8659
|
+
inviter: string;
|
|
8660
|
+
invitee: string;
|
|
8661
|
+
invitation_url: string;
|
|
8662
|
+
app_metadata?: string | undefined;
|
|
8663
|
+
user_metadata?: string | undefined;
|
|
8664
|
+
connection_id?: string | null | undefined;
|
|
8665
|
+
roles?: string | undefined;
|
|
8666
|
+
ticket_id?: string | null | undefined;
|
|
8667
|
+
ttl_sec?: number | undefined;
|
|
8668
|
+
send_invitation_email?: number | undefined;
|
|
8669
|
+
}>;
|
|
8478
8670
|
declare const sqlClientSchema: z.ZodObject<{
|
|
8479
8671
|
tenant_id: z.ZodString;
|
|
8480
8672
|
global: z.ZodNumber;
|
|
@@ -8703,6 +8895,7 @@ export interface Database {
|
|
|
8703
8895
|
roles: z.infer<typeof sqlRoleSchema>;
|
|
8704
8896
|
organizations: z.infer<typeof sqlOrganizationSchema>;
|
|
8705
8897
|
user_organizations: z.infer<typeof sqlUserOrganizationSchema>;
|
|
8898
|
+
invites: z.infer<typeof sqlInviteSchema>;
|
|
8706
8899
|
}
|
|
8707
8900
|
export declare function migrateToLatest(db: Kysely<Database>, debug?: boolean): Promise<void>;
|
|
8708
8901
|
export declare function migrateDown(db: Kysely<Database>): Promise<void>;
|