@authhero/kysely-adapter 10.128.1 → 10.130.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.
@@ -353,6 +353,8 @@ declare const auditEventInsertSchema: z.ZodObject<{
353
353
  connection: z.ZodOptional<z.ZodString>;
354
354
  strategy: z.ZodOptional<z.ZodString>;
355
355
  strategy_type: z.ZodOptional<z.ZodString>;
356
+ audience: z.ZodOptional<z.ZodString>;
357
+ scope: z.ZodOptional<z.ZodString>;
356
358
  location: z.ZodOptional<z.ZodObject<{
357
359
  country_code: z.ZodString;
358
360
  city_name: z.ZodString;
@@ -434,6 +436,8 @@ declare const auditEventInsertSchema: z.ZodObject<{
434
436
  connection?: string | undefined;
435
437
  strategy?: string | undefined;
436
438
  strategy_type?: string | undefined;
439
+ audience?: string | undefined;
440
+ scope?: string | undefined;
437
441
  location?: {
438
442
  country_code: string;
439
443
  city_name: string;
@@ -491,6 +495,8 @@ declare const auditEventInsertSchema: z.ZodObject<{
491
495
  connection?: string | undefined;
492
496
  strategy?: string | undefined;
493
497
  strategy_type?: string | undefined;
498
+ audience?: string | undefined;
499
+ scope?: string | undefined;
494
500
  location?: {
495
501
  country_code: string;
496
502
  city_name: string;
@@ -621,6 +627,8 @@ declare const auditEventSchema: z.ZodObject<{
621
627
  connection: z.ZodOptional<z.ZodString>;
622
628
  strategy: z.ZodOptional<z.ZodString>;
623
629
  strategy_type: z.ZodOptional<z.ZodString>;
630
+ audience: z.ZodOptional<z.ZodString>;
631
+ scope: z.ZodOptional<z.ZodString>;
624
632
  location: z.ZodOptional<z.ZodObject<{
625
633
  country_code: z.ZodString;
626
634
  city_name: z.ZodString;
@@ -705,6 +713,8 @@ declare const auditEventSchema: z.ZodObject<{
705
713
  connection?: string | undefined;
706
714
  strategy?: string | undefined;
707
715
  strategy_type?: string | undefined;
716
+ audience?: string | undefined;
717
+ scope?: string | undefined;
708
718
  location?: {
709
719
  country_code: string;
710
720
  city_name: string;
@@ -763,6 +773,8 @@ declare const auditEventSchema: z.ZodObject<{
763
773
  connection?: string | undefined;
764
774
  strategy?: string | undefined;
765
775
  strategy_type?: string | undefined;
776
+ audience?: string | undefined;
777
+ scope?: string | undefined;
766
778
  location?: {
767
779
  country_code: string;
768
780
  city_name: string;
@@ -2180,8 +2192,8 @@ declare const clientGrantInsertSchema: z.ZodObject<{
2180
2192
  }, "strip", z.ZodTypeAny, {
2181
2193
  client_id: string;
2182
2194
  audience: string;
2183
- organization_usage?: "deny" | "allow" | "require" | undefined;
2184
2195
  scope?: string[] | undefined;
2196
+ organization_usage?: "deny" | "allow" | "require" | undefined;
2185
2197
  allow_any_organization?: boolean | undefined;
2186
2198
  is_system?: boolean | undefined;
2187
2199
  subject_type?: "user" | "client" | undefined;
@@ -2189,8 +2201,8 @@ declare const clientGrantInsertSchema: z.ZodObject<{
2189
2201
  }, {
2190
2202
  client_id: string;
2191
2203
  audience: string;
2192
- organization_usage?: "deny" | "allow" | "require" | undefined;
2193
2204
  scope?: string[] | undefined;
2205
+ organization_usage?: "deny" | "allow" | "require" | undefined;
2194
2206
  allow_any_organization?: boolean | undefined;
2195
2207
  is_system?: boolean | undefined;
2196
2208
  subject_type?: "user" | "client" | undefined;
@@ -2222,8 +2234,8 @@ declare const clientGrantSchema: z.ZodObject<{
2222
2234
  audience: string;
2223
2235
  created_at?: string | undefined;
2224
2236
  updated_at?: string | undefined;
2225
- organization_usage?: "deny" | "allow" | "require" | undefined;
2226
2237
  scope?: string[] | undefined;
2238
+ organization_usage?: "deny" | "allow" | "require" | undefined;
2227
2239
  allow_any_organization?: boolean | undefined;
2228
2240
  is_system?: boolean | undefined;
2229
2241
  subject_type?: "user" | "client" | undefined;
@@ -2234,8 +2246,8 @@ declare const clientGrantSchema: z.ZodObject<{
2234
2246
  audience: string;
2235
2247
  created_at?: string | undefined;
2236
2248
  updated_at?: string | undefined;
2237
- organization_usage?: "deny" | "allow" | "require" | undefined;
2238
2249
  scope?: string[] | undefined;
2250
+ organization_usage?: "deny" | "allow" | "require" | undefined;
2239
2251
  allow_any_organization?: boolean | undefined;
2240
2252
  is_system?: boolean | undefined;
2241
2253
  subject_type?: "user" | "client" | undefined;
@@ -2901,9 +2913,9 @@ declare const connectionInsertSchema: z.ZodObject<{
2901
2913
  } | undefined;
2902
2914
  } | undefined;
2903
2915
  client_id?: string | undefined;
2916
+ scope?: string | undefined;
2904
2917
  provider?: string | undefined;
2905
2918
  client_secret?: string | undefined;
2906
- scope?: string | undefined;
2907
2919
  kid?: string | undefined;
2908
2920
  team_id?: string | undefined;
2909
2921
  realms?: string | undefined;
@@ -3004,9 +3016,9 @@ declare const connectionInsertSchema: z.ZodObject<{
3004
3016
  } | undefined;
3005
3017
  } | undefined;
3006
3018
  client_id?: string | undefined;
3019
+ scope?: string | undefined;
3007
3020
  provider?: string | undefined;
3008
3021
  client_secret?: string | undefined;
3009
- scope?: string | undefined;
3010
3022
  kid?: string | undefined;
3011
3023
  team_id?: string | undefined;
3012
3024
  realms?: string | undefined;
@@ -3116,9 +3128,9 @@ declare const connectionInsertSchema: z.ZodObject<{
3116
3128
  } | undefined;
3117
3129
  } | undefined;
3118
3130
  client_id?: string | undefined;
3131
+ scope?: string | undefined;
3119
3132
  provider?: string | undefined;
3120
3133
  client_secret?: string | undefined;
3121
- scope?: string | undefined;
3122
3134
  kid?: string | undefined;
3123
3135
  team_id?: string | undefined;
3124
3136
  realms?: string | undefined;
@@ -3234,9 +3246,9 @@ declare const connectionInsertSchema: z.ZodObject<{
3234
3246
  } | undefined;
3235
3247
  } | undefined;
3236
3248
  client_id?: string | undefined;
3249
+ scope?: string | undefined;
3237
3250
  provider?: string | undefined;
3238
3251
  client_secret?: string | undefined;
3239
- scope?: string | undefined;
3240
3252
  kid?: string | undefined;
3241
3253
  team_id?: string | undefined;
3242
3254
  realms?: string | undefined;
@@ -3777,9 +3789,9 @@ declare const connectionSchema: z.ZodObject<{
3777
3789
  } | undefined;
3778
3790
  } | undefined;
3779
3791
  client_id?: string | undefined;
3792
+ scope?: string | undefined;
3780
3793
  provider?: string | undefined;
3781
3794
  client_secret?: string | undefined;
3782
- scope?: string | undefined;
3783
3795
  kid?: string | undefined;
3784
3796
  team_id?: string | undefined;
3785
3797
  realms?: string | undefined;
@@ -3880,9 +3892,9 @@ declare const connectionSchema: z.ZodObject<{
3880
3892
  } | undefined;
3881
3893
  } | undefined;
3882
3894
  client_id?: string | undefined;
3895
+ scope?: string | undefined;
3883
3896
  provider?: string | undefined;
3884
3897
  client_secret?: string | undefined;
3885
- scope?: string | undefined;
3886
3898
  kid?: string | undefined;
3887
3899
  team_id?: string | undefined;
3888
3900
  realms?: string | undefined;
@@ -3994,9 +4006,9 @@ declare const connectionSchema: z.ZodObject<{
3994
4006
  } | undefined;
3995
4007
  } | undefined;
3996
4008
  client_id?: string | undefined;
4009
+ scope?: string | undefined;
3997
4010
  provider?: string | undefined;
3998
4011
  client_secret?: string | undefined;
3999
- scope?: string | undefined;
4000
4012
  kid?: string | undefined;
4001
4013
  team_id?: string | undefined;
4002
4014
  realms?: string | undefined;
@@ -4114,9 +4126,9 @@ declare const connectionSchema: z.ZodObject<{
4114
4126
  } | undefined;
4115
4127
  } | undefined;
4116
4128
  client_id?: string | undefined;
4129
+ scope?: string | undefined;
4117
4130
  provider?: string | undefined;
4118
4131
  client_secret?: string | undefined;
4119
- scope?: string | undefined;
4120
4132
  kid?: string | undefined;
4121
4133
  team_id?: string | undefined;
4122
4134
  realms?: string | undefined;
@@ -15701,9 +15713,9 @@ declare const loginSessionInsertSchema: z.ZodObject<{
15701
15713
  vendor_id: z.ZodOptional<z.ZodString>;
15702
15714
  }, "strip", z.ZodTypeAny, {
15703
15715
  client_id: string;
15704
- username?: string | undefined;
15705
15716
  audience?: string | undefined;
15706
15717
  scope?: string | undefined;
15718
+ username?: string | undefined;
15707
15719
  act_as?: string | undefined;
15708
15720
  response_type?: AuthorizationResponseType | undefined;
15709
15721
  response_mode?: AuthorizationResponseMode | undefined;
@@ -15720,9 +15732,9 @@ declare const loginSessionInsertSchema: z.ZodObject<{
15720
15732
  vendor_id?: string | undefined;
15721
15733
  }, {
15722
15734
  client_id: string;
15723
- username?: string | undefined;
15724
15735
  audience?: string | undefined;
15725
15736
  scope?: string | undefined;
15737
+ username?: string | undefined;
15726
15738
  act_as?: string | undefined;
15727
15739
  response_type?: AuthorizationResponseType | undefined;
15728
15740
  response_mode?: AuthorizationResponseMode | undefined;
@@ -15766,9 +15778,9 @@ declare const loginSessionInsertSchema: z.ZodObject<{
15766
15778
  csrf_token: string;
15767
15779
  authParams: {
15768
15780
  client_id: string;
15769
- username?: string | undefined;
15770
15781
  audience?: string | undefined;
15771
15782
  scope?: string | undefined;
15783
+ username?: string | undefined;
15772
15784
  act_as?: string | undefined;
15773
15785
  response_type?: AuthorizationResponseType | undefined;
15774
15786
  response_mode?: AuthorizationResponseMode | undefined;
@@ -15804,9 +15816,9 @@ declare const loginSessionInsertSchema: z.ZodObject<{
15804
15816
  csrf_token: string;
15805
15817
  authParams: {
15806
15818
  client_id: string;
15807
- username?: string | undefined;
15808
15819
  audience?: string | undefined;
15809
15820
  scope?: string | undefined;
15821
+ username?: string | undefined;
15810
15822
  act_as?: string | undefined;
15811
15823
  response_type?: AuthorizationResponseType | undefined;
15812
15824
  response_mode?: AuthorizationResponseMode | undefined;
@@ -15867,9 +15879,9 @@ declare const loginSessionSchema: z.ZodObject<{
15867
15879
  vendor_id: z.ZodOptional<z.ZodString>;
15868
15880
  }, "strip", z.ZodTypeAny, {
15869
15881
  client_id: string;
15870
- username?: string | undefined;
15871
15882
  audience?: string | undefined;
15872
15883
  scope?: string | undefined;
15884
+ username?: string | undefined;
15873
15885
  act_as?: string | undefined;
15874
15886
  response_type?: AuthorizationResponseType | undefined;
15875
15887
  response_mode?: AuthorizationResponseMode | undefined;
@@ -15886,9 +15898,9 @@ declare const loginSessionSchema: z.ZodObject<{
15886
15898
  vendor_id?: string | undefined;
15887
15899
  }, {
15888
15900
  client_id: string;
15889
- username?: string | undefined;
15890
15901
  audience?: string | undefined;
15891
15902
  scope?: string | undefined;
15903
+ username?: string | undefined;
15892
15904
  act_as?: string | undefined;
15893
15905
  response_type?: AuthorizationResponseType | undefined;
15894
15906
  response_mode?: AuthorizationResponseMode | undefined;
@@ -15935,9 +15947,9 @@ declare const loginSessionSchema: z.ZodObject<{
15935
15947
  csrf_token: string;
15936
15948
  authParams: {
15937
15949
  client_id: string;
15938
- username?: string | undefined;
15939
15950
  audience?: string | undefined;
15940
15951
  scope?: string | undefined;
15952
+ username?: string | undefined;
15941
15953
  act_as?: string | undefined;
15942
15954
  response_type?: AuthorizationResponseType | undefined;
15943
15955
  response_mode?: AuthorizationResponseMode | undefined;
@@ -15976,9 +15988,9 @@ declare const loginSessionSchema: z.ZodObject<{
15976
15988
  csrf_token: string;
15977
15989
  authParams: {
15978
15990
  client_id: string;
15979
- username?: string | undefined;
15980
15991
  audience?: string | undefined;
15981
15992
  scope?: string | undefined;
15993
+ username?: string | undefined;
15982
15994
  act_as?: string | undefined;
15983
15995
  response_type?: AuthorizationResponseType | undefined;
15984
15996
  response_mode?: AuthorizationResponseMode | undefined;
@@ -16088,6 +16100,8 @@ declare const logInsertSchema: z.ZodObject<{
16088
16100
  connection?: string | undefined;
16089
16101
  strategy?: string | undefined;
16090
16102
  strategy_type?: string | undefined;
16103
+ audience?: string | undefined;
16104
+ scope?: string | undefined;
16091
16105
  auth0_client?: {
16092
16106
  version: string;
16093
16107
  name: string;
@@ -16098,8 +16112,6 @@ declare const logInsertSchema: z.ZodObject<{
16098
16112
  hostname?: string | undefined;
16099
16113
  connection_id?: string | undefined;
16100
16114
  user_id?: string | undefined;
16101
- audience?: string | undefined;
16102
- scope?: string | undefined;
16103
16115
  details?: any;
16104
16116
  user_name?: string | undefined;
16105
16117
  client_name?: string | undefined;
@@ -16123,6 +16135,8 @@ declare const logInsertSchema: z.ZodObject<{
16123
16135
  connection?: string | undefined;
16124
16136
  strategy?: string | undefined;
16125
16137
  strategy_type?: string | undefined;
16138
+ audience?: string | undefined;
16139
+ scope?: string | undefined;
16126
16140
  auth0_client?: {
16127
16141
  version: string;
16128
16142
  name: string;
@@ -16133,8 +16147,6 @@ declare const logInsertSchema: z.ZodObject<{
16133
16147
  hostname?: string | undefined;
16134
16148
  connection_id?: string | undefined;
16135
16149
  user_id?: string | undefined;
16136
- audience?: string | undefined;
16137
- scope?: string | undefined;
16138
16150
  details?: any;
16139
16151
  user_name?: string | undefined;
16140
16152
  client_name?: string | undefined;
@@ -16226,6 +16238,8 @@ declare const logSchema: z.ZodObject<{
16226
16238
  connection?: string | undefined;
16227
16239
  strategy?: string | undefined;
16228
16240
  strategy_type?: string | undefined;
16241
+ audience?: string | undefined;
16242
+ scope?: string | undefined;
16229
16243
  auth0_client?: {
16230
16244
  version: string;
16231
16245
  name: string;
@@ -16236,8 +16250,6 @@ declare const logSchema: z.ZodObject<{
16236
16250
  hostname?: string | undefined;
16237
16251
  connection_id?: string | undefined;
16238
16252
  user_id?: string | undefined;
16239
- audience?: string | undefined;
16240
- scope?: string | undefined;
16241
16253
  details?: any;
16242
16254
  user_name?: string | undefined;
16243
16255
  client_name?: string | undefined;
@@ -16261,6 +16273,8 @@ declare const logSchema: z.ZodObject<{
16261
16273
  connection?: string | undefined;
16262
16274
  strategy?: string | undefined;
16263
16275
  strategy_type?: string | undefined;
16276
+ audience?: string | undefined;
16277
+ scope?: string | undefined;
16264
16278
  auth0_client?: {
16265
16279
  version: string;
16266
16280
  name: string;
@@ -16271,8 +16285,6 @@ declare const logSchema: z.ZodObject<{
16271
16285
  hostname?: string | undefined;
16272
16286
  connection_id?: string | undefined;
16273
16287
  user_id?: string | undefined;
16274
- audience?: string | undefined;
16275
- scope?: string | undefined;
16276
16288
  details?: any;
16277
16289
  user_name?: string | undefined;
16278
16290
  client_name?: string | undefined;
@@ -18272,6 +18284,7 @@ declare const refreshTokenSchema: z.ZodObject<{
18272
18284
  }>, "many">;
18273
18285
  rotating: z.ZodBoolean;
18274
18286
  created_at: z.ZodString;
18287
+ revoked_at: z.ZodOptional<z.ZodString>;
18275
18288
  }, "strip", z.ZodTypeAny, {
18276
18289
  created_at: string;
18277
18290
  id: string;
@@ -18292,6 +18305,7 @@ declare const refreshTokenSchema: z.ZodObject<{
18292
18305
  }[];
18293
18306
  rotating: boolean;
18294
18307
  expires_at?: string | undefined;
18308
+ revoked_at?: string | undefined;
18295
18309
  idle_expires_at?: string | undefined;
18296
18310
  last_exchanged_at?: string | undefined;
18297
18311
  }, {
@@ -18314,6 +18328,7 @@ declare const refreshTokenSchema: z.ZodObject<{
18314
18328
  }[];
18315
18329
  rotating: boolean;
18316
18330
  expires_at?: string | undefined;
18331
+ revoked_at?: string | undefined;
18317
18332
  idle_expires_at?: string | undefined;
18318
18333
  last_exchanged_at?: string | undefined;
18319
18334
  }>;
@@ -19438,12 +19453,25 @@ export interface EmailProvidersAdapter {
19438
19453
  export interface ListRefreshTokenResponse extends Totals {
19439
19454
  refresh_tokens: RefreshToken[];
19440
19455
  }
19456
+ export interface UpdateRefreshTokenOptions {
19457
+ /**
19458
+ * When provided, the adapter also extends the parent login_session's
19459
+ * `expires_at` to `expires_at` (only if the current value is smaller).
19460
+ * The caller is expected to compute the new expiry so the adapter can
19461
+ * avoid a read-before-write and parallelise the two UPDATEs.
19462
+ */
19463
+ loginSessionBump?: {
19464
+ login_id: string;
19465
+ expires_at: string;
19466
+ };
19467
+ }
19441
19468
  export interface RefreshTokensAdapter {
19442
19469
  create: (tenant_id: string, refresh_token: RefreshTokenInsert) => Promise<RefreshToken>;
19443
19470
  get: (tenant_id: string, id: string) => Promise<RefreshToken | null>;
19444
19471
  list(tenant_id: string, params?: ListParams): Promise<ListRefreshTokenResponse>;
19445
- update: (tenant_id: string, id: string, refresh_token: Partial<RefreshToken>) => Promise<boolean>;
19472
+ update: (tenant_id: string, id: string, refresh_token: Partial<RefreshToken>, options?: UpdateRefreshTokenOptions) => Promise<boolean>;
19446
19473
  remove: (tenant_id: string, id: string) => Promise<boolean>;
19474
+ revokeByLoginSession: (tenant_id: string, login_session_id: string, revoked_at: string) => Promise<number>;
19447
19475
  }
19448
19476
  export interface ListFormsResponse extends Totals {
19449
19477
  forms: Form[];
@@ -20428,7 +20456,8 @@ declare const sqlRefreshTokensSchema: z.ZodObject<Omit<{
20428
20456
  }>, "many">;
20429
20457
  rotating: z.ZodBoolean;
20430
20458
  created_at: z.ZodString;
20431
- }, "created_at" | "expires_at" | "idle_expires_at" | "device" | "last_exchanged_at" | "resource_servers" | "rotating"> & {
20459
+ revoked_at: z.ZodOptional<z.ZodString>;
20460
+ }, "created_at" | "expires_at" | "revoked_at" | "idle_expires_at" | "device" | "last_exchanged_at" | "resource_servers" | "rotating"> & {
20432
20461
  tenant_id: z.ZodString;
20433
20462
  device: z.ZodString;
20434
20463
  resource_servers: z.ZodString;
@@ -20437,6 +20466,7 @@ declare const sqlRefreshTokensSchema: z.ZodObject<Omit<{
20437
20466
  expires_at_ts: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
20438
20467
  idle_expires_at_ts: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
20439
20468
  last_exchanged_at_ts: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
20469
+ revoked_at_ts: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
20440
20470
  }, "strip", z.ZodTypeAny, {
20441
20471
  tenant_id: string;
20442
20472
  user_id: string;
@@ -20449,6 +20479,7 @@ declare const sqlRefreshTokensSchema: z.ZodObject<Omit<{
20449
20479
  rotating: number;
20450
20480
  expires_at_ts?: number | null | undefined;
20451
20481
  idle_expires_at_ts?: number | null | undefined;
20482
+ revoked_at_ts?: number | null | undefined;
20452
20483
  last_exchanged_at_ts?: number | null | undefined;
20453
20484
  }, {
20454
20485
  tenant_id: string;
@@ -20462,6 +20493,7 @@ declare const sqlRefreshTokensSchema: z.ZodObject<Omit<{
20462
20493
  rotating: number;
20463
20494
  expires_at_ts?: number | null | undefined;
20464
20495
  idle_expires_at_ts?: number | null | undefined;
20496
+ revoked_at_ts?: number | null | undefined;
20465
20497
  last_exchanged_at_ts?: number | null | undefined;
20466
20498
  }>;
20467
20499
  declare const sqlCustomDomainSchema: z.ZodObject<{