authhero 4.105.0 → 4.106.1

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.
@@ -3101,6 +3101,10 @@ export declare const clientInsertSchema: z.ZodObject<{
3101
3101
  "iat_dcr"
3102
3102
  ]>>;
3103
3103
  registration_metadata: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
3104
+ user_linking_mode: z.ZodOptional<z.ZodEnum<[
3105
+ "builtin",
3106
+ "off"
3107
+ ]>>;
3104
3108
  }, "strip", z.ZodTypeAny, {
3105
3109
  name: string;
3106
3110
  client_id: string;
@@ -3153,6 +3157,7 @@ export declare const clientInsertSchema: z.ZodObject<{
3153
3157
  owner_user_id?: string | undefined;
3154
3158
  registration_type?: "manual" | "open_dcr" | "iat_dcr" | undefined;
3155
3159
  registration_metadata?: Record<string, any> | undefined;
3160
+ user_linking_mode?: "builtin" | "off" | undefined;
3156
3161
  }, {
3157
3162
  name: string;
3158
3163
  client_id: string;
@@ -3205,6 +3210,7 @@ export declare const clientInsertSchema: z.ZodObject<{
3205
3210
  owner_user_id?: string | undefined;
3206
3211
  registration_type?: "manual" | "open_dcr" | "iat_dcr" | undefined;
3207
3212
  registration_metadata?: Record<string, any> | undefined;
3213
+ user_linking_mode?: "builtin" | "off" | undefined;
3208
3214
  }>;
3209
3215
  export type ClientInsert = z.input<typeof clientInsertSchema>;
3210
3216
  export declare const clientSchema: z.ZodObject<{
@@ -3307,6 +3313,10 @@ export declare const clientSchema: z.ZodObject<{
3307
3313
  "iat_dcr"
3308
3314
  ]>>;
3309
3315
  registration_metadata: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
3316
+ user_linking_mode: z.ZodOptional<z.ZodEnum<[
3317
+ "builtin",
3318
+ "off"
3319
+ ]>>;
3310
3320
  created_at: z.ZodString;
3311
3321
  updated_at: z.ZodString;
3312
3322
  }, "strip", z.ZodTypeAny, {
@@ -3363,6 +3373,7 @@ export declare const clientSchema: z.ZodObject<{
3363
3373
  owner_user_id?: string | undefined;
3364
3374
  registration_type?: "manual" | "open_dcr" | "iat_dcr" | undefined;
3365
3375
  registration_metadata?: Record<string, any> | undefined;
3376
+ user_linking_mode?: "builtin" | "off" | undefined;
3366
3377
  }, {
3367
3378
  created_at: string;
3368
3379
  updated_at: string;
@@ -3417,6 +3428,7 @@ export declare const clientSchema: z.ZodObject<{
3417
3428
  owner_user_id?: string | undefined;
3418
3429
  registration_type?: "manual" | "open_dcr" | "iat_dcr" | undefined;
3419
3430
  registration_metadata?: Record<string, any> | undefined;
3431
+ user_linking_mode?: "builtin" | "off" | undefined;
3420
3432
  }>;
3421
3433
  export type Client = z.infer<typeof clientSchema>;
3422
3434
  export declare const clientGrantInsertSchema: z.ZodObject<{
@@ -42344,17 +42356,20 @@ export declare function isWidgetComponent(component: FormNodeComponent): compone
42344
42356
  export declare function isFieldComponent(component: FormNodeComponent): component is FieldComponent$1;
42345
42357
  export declare const hookTemplateId: z.ZodEnum<[
42346
42358
  "ensure-username",
42347
- "set-preferred-username"
42359
+ "set-preferred-username",
42360
+ "account-linking"
42348
42361
  ]>;
42349
42362
  export type HookTemplateId = z.infer<typeof hookTemplateId>;
42350
42363
  /**
42351
42364
  * Registry of available hook templates.
42352
- * Maps template IDs to their metadata and allowed triggers.
42365
+ * Maps template IDs to their metadata and allowed triggers. Some templates
42366
+ * (e.g. `account-linking`) can bind to more than one trigger; in that case
42367
+ * `trigger_ids` lists every trigger the template supports.
42353
42368
  */
42354
42369
  export declare const hookTemplates: Record<HookTemplateId, {
42355
42370
  name: string;
42356
42371
  description: string;
42357
- trigger_id: string;
42372
+ trigger_ids: string[];
42358
42373
  }>;
42359
42374
  export declare const hookInsertSchema: z.ZodUnion<[
42360
42375
  z.ZodObject<{
@@ -42362,6 +42377,7 @@ export declare const hookInsertSchema: z.ZodUnion<[
42362
42377
  "pre-user-registration",
42363
42378
  "post-user-registration",
42364
42379
  "post-user-login",
42380
+ "post-user-update",
42365
42381
  "validate-registration-username",
42366
42382
  "pre-user-deletion",
42367
42383
  "post-user-deletion"
@@ -42374,13 +42390,13 @@ export declare const hookInsertSchema: z.ZodUnion<[
42374
42390
  }, "strip", z.ZodTypeAny, {
42375
42391
  url: string;
42376
42392
  enabled: boolean;
42377
- trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
42393
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
42378
42394
  synchronous: boolean;
42379
42395
  priority?: number | undefined;
42380
42396
  hook_id?: string | undefined;
42381
42397
  }, {
42382
42398
  url: string;
42383
- trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
42399
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
42384
42400
  enabled?: boolean | undefined;
42385
42401
  synchronous?: boolean | undefined;
42386
42402
  priority?: number | undefined;
@@ -42418,11 +42434,14 @@ export declare const hookInsertSchema: z.ZodUnion<[
42418
42434
  z.ZodObject<{
42419
42435
  trigger_id: z.ZodEnum<[
42420
42436
  "post-user-login",
42437
+ "post-user-registration",
42438
+ "post-user-update",
42421
42439
  "credentials-exchange"
42422
42440
  ]>;
42423
42441
  template_id: z.ZodEnum<[
42424
42442
  "ensure-username",
42425
- "set-preferred-username"
42443
+ "set-preferred-username",
42444
+ "account-linking"
42426
42445
  ]>;
42427
42446
  enabled: z.ZodDefault<z.ZodBoolean>;
42428
42447
  synchronous: z.ZodDefault<z.ZodBoolean>;
@@ -42430,14 +42449,14 @@ export declare const hookInsertSchema: z.ZodUnion<[
42430
42449
  hook_id: z.ZodOptional<z.ZodString>;
42431
42450
  }, "strip", z.ZodTypeAny, {
42432
42451
  enabled: boolean;
42433
- trigger_id: "post-user-login" | "credentials-exchange";
42452
+ trigger_id: "post-user-registration" | "post-user-login" | "post-user-update" | "credentials-exchange";
42434
42453
  synchronous: boolean;
42435
- template_id: "ensure-username" | "set-preferred-username";
42454
+ template_id: "ensure-username" | "set-preferred-username" | "account-linking";
42436
42455
  priority?: number | undefined;
42437
42456
  hook_id?: string | undefined;
42438
42457
  }, {
42439
- trigger_id: "post-user-login" | "credentials-exchange";
42440
- template_id: "ensure-username" | "set-preferred-username";
42458
+ trigger_id: "post-user-registration" | "post-user-login" | "post-user-update" | "credentials-exchange";
42459
+ template_id: "ensure-username" | "set-preferred-username" | "account-linking";
42441
42460
  enabled?: boolean | undefined;
42442
42461
  synchronous?: boolean | undefined;
42443
42462
  priority?: number | undefined;
@@ -42482,6 +42501,7 @@ export declare const hookSchema: z.ZodUnion<[
42482
42501
  "pre-user-registration",
42483
42502
  "post-user-registration",
42484
42503
  "post-user-login",
42504
+ "post-user-update",
42485
42505
  "validate-registration-username",
42486
42506
  "pre-user-deletion",
42487
42507
  "post-user-deletion"
@@ -42494,7 +42514,7 @@ export declare const hookSchema: z.ZodUnion<[
42494
42514
  updated_at: string;
42495
42515
  url: string;
42496
42516
  enabled: boolean;
42497
- trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
42517
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
42498
42518
  synchronous: boolean;
42499
42519
  hook_id: string;
42500
42520
  priority?: number | undefined;
@@ -42502,7 +42522,7 @@ export declare const hookSchema: z.ZodUnion<[
42502
42522
  created_at: string;
42503
42523
  updated_at: string;
42504
42524
  url: string;
42505
- trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
42525
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
42506
42526
  hook_id: string;
42507
42527
  enabled?: boolean | undefined;
42508
42528
  synchronous?: boolean | undefined;
@@ -42547,12 +42567,15 @@ export declare const hookSchema: z.ZodUnion<[
42547
42567
  hook_id: z.ZodString;
42548
42568
  template_id: z.ZodEnum<[
42549
42569
  "ensure-username",
42550
- "set-preferred-username"
42570
+ "set-preferred-username",
42571
+ "account-linking"
42551
42572
  ]>;
42552
42573
  created_at: z.ZodString;
42553
42574
  updated_at: z.ZodString;
42554
42575
  trigger_id: z.ZodEnum<[
42555
42576
  "post-user-login",
42577
+ "post-user-registration",
42578
+ "post-user-update",
42556
42579
  "credentials-exchange"
42557
42580
  ]>;
42558
42581
  enabled: z.ZodDefault<z.ZodBoolean>;
@@ -42562,17 +42585,17 @@ export declare const hookSchema: z.ZodUnion<[
42562
42585
  created_at: string;
42563
42586
  updated_at: string;
42564
42587
  enabled: boolean;
42565
- trigger_id: "post-user-login" | "credentials-exchange";
42588
+ trigger_id: "post-user-registration" | "post-user-login" | "post-user-update" | "credentials-exchange";
42566
42589
  synchronous: boolean;
42567
42590
  hook_id: string;
42568
- template_id: "ensure-username" | "set-preferred-username";
42591
+ template_id: "ensure-username" | "set-preferred-username" | "account-linking";
42569
42592
  priority?: number | undefined;
42570
42593
  }, {
42571
42594
  created_at: string;
42572
42595
  updated_at: string;
42573
- trigger_id: "post-user-login" | "credentials-exchange";
42596
+ trigger_id: "post-user-registration" | "post-user-login" | "post-user-update" | "credentials-exchange";
42574
42597
  hook_id: string;
42575
- template_id: "ensure-username" | "set-preferred-username";
42598
+ template_id: "ensure-username" | "set-preferred-username" | "account-linking";
42576
42599
  enabled?: boolean | undefined;
42577
42600
  synchronous?: boolean | undefined;
42578
42601
  priority?: number | undefined;
@@ -44257,7 +44280,6 @@ export declare const tenantInsertSchema: z.ZodObject<{
44257
44280
  enable_dynamic_client_registration: z.ZodOptional<z.ZodBoolean>;
44258
44281
  dcr_require_initial_access_token: z.ZodOptional<z.ZodBoolean>;
44259
44282
  dcr_allowed_grant_types: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
44260
- dcr_allowed_integration_types: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
44261
44283
  allow_http_return_to: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
44262
44284
  enable_idtoken_api2: z.ZodOptional<z.ZodBoolean>;
44263
44285
  enable_legacy_logs_search_v2: z.ZodOptional<z.ZodBoolean>;
@@ -44295,7 +44317,6 @@ export declare const tenantInsertSchema: z.ZodObject<{
44295
44317
  enable_dynamic_client_registration?: boolean | undefined;
44296
44318
  dcr_require_initial_access_token?: boolean | undefined;
44297
44319
  dcr_allowed_grant_types?: string[] | undefined;
44298
- dcr_allowed_integration_types?: string[] | undefined;
44299
44320
  allow_http_return_to?: string[] | undefined;
44300
44321
  enable_idtoken_api2?: boolean | undefined;
44301
44322
  enable_legacy_logs_search_v2?: boolean | undefined;
@@ -44333,7 +44354,6 @@ export declare const tenantInsertSchema: z.ZodObject<{
44333
44354
  enable_dynamic_client_registration?: boolean | undefined;
44334
44355
  dcr_require_initial_access_token?: boolean | undefined;
44335
44356
  dcr_allowed_grant_types?: string[] | undefined;
44336
- dcr_allowed_integration_types?: string[] | undefined;
44337
44357
  allow_http_return_to?: string[] | undefined;
44338
44358
  enable_idtoken_api2?: boolean | undefined;
44339
44359
  enable_legacy_logs_search_v2?: boolean | undefined;
@@ -44612,7 +44632,6 @@ export declare const tenantInsertSchema: z.ZodObject<{
44612
44632
  enable_dynamic_client_registration?: boolean | undefined;
44613
44633
  dcr_require_initial_access_token?: boolean | undefined;
44614
44634
  dcr_allowed_grant_types?: string[] | undefined;
44615
- dcr_allowed_integration_types?: string[] | undefined;
44616
44635
  allow_http_return_to?: string[] | undefined;
44617
44636
  enable_idtoken_api2?: boolean | undefined;
44618
44637
  enable_legacy_logs_search_v2?: boolean | undefined;
@@ -44740,7 +44759,6 @@ export declare const tenantInsertSchema: z.ZodObject<{
44740
44759
  enable_dynamic_client_registration?: boolean | undefined;
44741
44760
  dcr_require_initial_access_token?: boolean | undefined;
44742
44761
  dcr_allowed_grant_types?: string[] | undefined;
44743
- dcr_allowed_integration_types?: string[] | undefined;
44744
44762
  allow_http_return_to?: string[] | undefined;
44745
44763
  enable_idtoken_api2?: boolean | undefined;
44746
44764
  enable_legacy_logs_search_v2?: boolean | undefined;
@@ -44880,7 +44898,6 @@ export declare const tenantSchema: z.ZodObject<{
44880
44898
  enable_dynamic_client_registration: z.ZodOptional<z.ZodBoolean>;
44881
44899
  dcr_require_initial_access_token: z.ZodOptional<z.ZodBoolean>;
44882
44900
  dcr_allowed_grant_types: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
44883
- dcr_allowed_integration_types: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
44884
44901
  allow_http_return_to: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
44885
44902
  enable_idtoken_api2: z.ZodOptional<z.ZodBoolean>;
44886
44903
  enable_legacy_logs_search_v2: z.ZodOptional<z.ZodBoolean>;
@@ -44918,7 +44935,6 @@ export declare const tenantSchema: z.ZodObject<{
44918
44935
  enable_dynamic_client_registration?: boolean | undefined;
44919
44936
  dcr_require_initial_access_token?: boolean | undefined;
44920
44937
  dcr_allowed_grant_types?: string[] | undefined;
44921
- dcr_allowed_integration_types?: string[] | undefined;
44922
44938
  allow_http_return_to?: string[] | undefined;
44923
44939
  enable_idtoken_api2?: boolean | undefined;
44924
44940
  enable_legacy_logs_search_v2?: boolean | undefined;
@@ -44956,7 +44972,6 @@ export declare const tenantSchema: z.ZodObject<{
44956
44972
  enable_dynamic_client_registration?: boolean | undefined;
44957
44973
  dcr_require_initial_access_token?: boolean | undefined;
44958
44974
  dcr_allowed_grant_types?: string[] | undefined;
44959
- dcr_allowed_integration_types?: string[] | undefined;
44960
44975
  allow_http_return_to?: string[] | undefined;
44961
44976
  enable_idtoken_api2?: boolean | undefined;
44962
44977
  enable_legacy_logs_search_v2?: boolean | undefined;
@@ -45239,7 +45254,6 @@ export declare const tenantSchema: z.ZodObject<{
45239
45254
  enable_dynamic_client_registration?: boolean | undefined;
45240
45255
  dcr_require_initial_access_token?: boolean | undefined;
45241
45256
  dcr_allowed_grant_types?: string[] | undefined;
45242
- dcr_allowed_integration_types?: string[] | undefined;
45243
45257
  allow_http_return_to?: string[] | undefined;
45244
45258
  enable_idtoken_api2?: boolean | undefined;
45245
45259
  enable_legacy_logs_search_v2?: boolean | undefined;
@@ -45369,7 +45383,6 @@ export declare const tenantSchema: z.ZodObject<{
45369
45383
  enable_dynamic_client_registration?: boolean | undefined;
45370
45384
  dcr_require_initial_access_token?: boolean | undefined;
45371
45385
  dcr_allowed_grant_types?: string[] | undefined;
45372
- dcr_allowed_integration_types?: string[] | undefined;
45373
45386
  allow_http_return_to?: string[] | undefined;
45374
45387
  enable_idtoken_api2?: boolean | undefined;
45375
45388
  enable_legacy_logs_search_v2?: boolean | undefined;
@@ -49675,7 +49688,6 @@ declare const enrichedClientSchema: z.ZodObject<{
49675
49688
  enable_dynamic_client_registration: z.ZodOptional<z.ZodBoolean>;
49676
49689
  dcr_require_initial_access_token: z.ZodOptional<z.ZodBoolean>;
49677
49690
  dcr_allowed_grant_types: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
49678
- dcr_allowed_integration_types: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
49679
49691
  allow_http_return_to: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>;
49680
49692
  enable_idtoken_api2: z.ZodOptional<z.ZodBoolean>;
49681
49693
  enable_legacy_logs_search_v2: z.ZodOptional<z.ZodBoolean>;
@@ -49713,7 +49725,6 @@ declare const enrichedClientSchema: z.ZodObject<{
49713
49725
  enable_dynamic_client_registration?: boolean | undefined;
49714
49726
  dcr_require_initial_access_token?: boolean | undefined;
49715
49727
  dcr_allowed_grant_types?: string[] | undefined;
49716
- dcr_allowed_integration_types?: string[] | undefined;
49717
49728
  allow_http_return_to?: string[] | undefined;
49718
49729
  enable_idtoken_api2?: boolean | undefined;
49719
49730
  enable_legacy_logs_search_v2?: boolean | undefined;
@@ -49751,7 +49762,6 @@ declare const enrichedClientSchema: z.ZodObject<{
49751
49762
  enable_dynamic_client_registration?: boolean | undefined;
49752
49763
  dcr_require_initial_access_token?: boolean | undefined;
49753
49764
  dcr_allowed_grant_types?: string[] | undefined;
49754
- dcr_allowed_integration_types?: string[] | undefined;
49755
49765
  allow_http_return_to?: string[] | undefined;
49756
49766
  enable_idtoken_api2?: boolean | undefined;
49757
49767
  enable_legacy_logs_search_v2?: boolean | undefined;
@@ -50034,7 +50044,6 @@ declare const enrichedClientSchema: z.ZodObject<{
50034
50044
  enable_dynamic_client_registration?: boolean | undefined;
50035
50045
  dcr_require_initial_access_token?: boolean | undefined;
50036
50046
  dcr_allowed_grant_types?: string[] | undefined;
50037
- dcr_allowed_integration_types?: string[] | undefined;
50038
50047
  allow_http_return_to?: string[] | undefined;
50039
50048
  enable_idtoken_api2?: boolean | undefined;
50040
50049
  enable_legacy_logs_search_v2?: boolean | undefined;
@@ -50164,7 +50173,6 @@ declare const enrichedClientSchema: z.ZodObject<{
50164
50173
  enable_dynamic_client_registration?: boolean | undefined;
50165
50174
  dcr_require_initial_access_token?: boolean | undefined;
50166
50175
  dcr_allowed_grant_types?: string[] | undefined;
50167
- dcr_allowed_integration_types?: string[] | undefined;
50168
50176
  allow_http_return_to?: string[] | undefined;
50169
50177
  enable_idtoken_api2?: boolean | undefined;
50170
50178
  enable_legacy_logs_search_v2?: boolean | undefined;
@@ -51221,6 +51229,10 @@ declare const enrichedClientSchema: z.ZodObject<{
51221
51229
  "iat_dcr"
51222
51230
  ]>>;
51223
51231
  registration_metadata: z.ZodOptional<z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodAny>>>;
51232
+ user_linking_mode: z.ZodOptional<z.ZodEnum<[
51233
+ "builtin",
51234
+ "off"
51235
+ ]>>;
51224
51236
  created_at: z.ZodString;
51225
51237
  updated_at: z.ZodString;
51226
51238
  }, "strip", z.ZodTypeAny, {
@@ -51276,7 +51288,6 @@ declare const enrichedClientSchema: z.ZodObject<{
51276
51288
  enable_dynamic_client_registration?: boolean | undefined;
51277
51289
  dcr_require_initial_access_token?: boolean | undefined;
51278
51290
  dcr_allowed_grant_types?: string[] | undefined;
51279
- dcr_allowed_integration_types?: string[] | undefined;
51280
51291
  allow_http_return_to?: string[] | undefined;
51281
51292
  enable_idtoken_api2?: boolean | undefined;
51282
51293
  enable_legacy_logs_search_v2?: boolean | undefined;
@@ -51526,6 +51537,7 @@ declare const enrichedClientSchema: z.ZodObject<{
51526
51537
  owner_user_id?: string | undefined;
51527
51538
  registration_type?: "manual" | "open_dcr" | "iat_dcr" | undefined;
51528
51539
  registration_metadata?: Record<string, any> | undefined;
51540
+ user_linking_mode?: "builtin" | "off" | undefined;
51529
51541
  }, {
51530
51542
  name: string;
51531
51543
  tenant: {
@@ -51579,7 +51591,6 @@ declare const enrichedClientSchema: z.ZodObject<{
51579
51591
  enable_dynamic_client_registration?: boolean | undefined;
51580
51592
  dcr_require_initial_access_token?: boolean | undefined;
51581
51593
  dcr_allowed_grant_types?: string[] | undefined;
51582
- dcr_allowed_integration_types?: string[] | undefined;
51583
51594
  allow_http_return_to?: string[] | undefined;
51584
51595
  enable_idtoken_api2?: boolean | undefined;
51585
51596
  enable_legacy_logs_search_v2?: boolean | undefined;
@@ -51829,6 +51840,7 @@ declare const enrichedClientSchema: z.ZodObject<{
51829
51840
  owner_user_id?: string | undefined;
51830
51841
  registration_type?: "manual" | "open_dcr" | "iat_dcr" | undefined;
51831
51842
  registration_metadata?: Record<string, any> | undefined;
51843
+ user_linking_mode?: "builtin" | "off" | undefined;
51832
51844
  }>;
51833
51845
  export type EnrichedClient = z.infer<typeof enrichedClientSchema>;
51834
51846
  /** Context passed to entity hooks */
@@ -52174,6 +52186,26 @@ export interface OutboxConfig {
52174
52186
  /** Max delivery retries before giving up on an event (default: 5) */
52175
52187
  maxRetries?: number;
52176
52188
  }
52189
+ /**
52190
+ * Mode for the built-in email-based user linking path.
52191
+ *
52192
+ * - `"builtin"` — `commitUserHook` runs the email→primary lookup at user
52193
+ * creation and email update, linking by verified email match. Default
52194
+ * for backwards compatibility.
52195
+ * - `"off"` — built-in lookup is skipped. Linking only happens if the
52196
+ * tenant has enabled the `account-linking` template hook for the
52197
+ * relevant trigger (`post-user-registration`, `post-user-update`, or
52198
+ * `post-user-login`).
52199
+ *
52200
+ * The template hook is controlled independently via the management API,
52201
+ * so a tenant on `"builtin"` mode can still enable the template at
52202
+ * `post-user-login` to catch legacy unlinked accounts. Running both at
52203
+ * the same trigger is harmless but redundant — the template no-ops once
52204
+ * the built-in has set `linked_to`.
52205
+ *
52206
+ * A per-client `user_linking_mode` overrides this service-level default.
52207
+ */
52208
+ export type UserLinkingMode = "builtin" | "off";
52177
52209
  export interface AuthHeroConfig {
52178
52210
  dataAdapter: DataAdapters;
52179
52211
  /**
@@ -52360,6 +52392,16 @@ export interface AuthHeroConfig {
52360
52392
  * by a background relay to the logs table (and other destinations).
52361
52393
  */
52362
52394
  outbox?: OutboxConfig;
52395
+ /**
52396
+ * Default mode for the built-in email-based user-linking path.
52397
+ *
52398
+ * Controls whether `linkUsersHook` performs an automatic primary-user
52399
+ * lookup by verified email at user creation and email update. A per-client
52400
+ * `user_linking_mode` setting overrides this default.
52401
+ *
52402
+ * @default "builtin"
52403
+ */
52404
+ userLinkingMode?: UserLinkingMode;
52363
52405
  }
52364
52406
  export type UserInfo = {
52365
52407
  sub: string;
@@ -52419,6 +52461,7 @@ export type Bindings = {
52419
52461
  codeExecutor?: CodeExecutor;
52420
52462
  webhookInvoker?: WebhookInvoker;
52421
52463
  outbox?: OutboxConfig;
52464
+ userLinkingMode?: UserLinkingMode;
52422
52465
  };
52423
52466
  export interface CreateX509CertificateParams {
52424
52467
  name: string;
@@ -53246,7 +53289,14 @@ export interface AccountLinkingOptions {
53246
53289
  */
53247
53290
  requireVerifiedEmail?: boolean;
53248
53291
  }
53249
- declare function accountLinking(options?: AccountLinkingOptions): OnExecutePostLogin;
53292
+ /**
53293
+ * Trigger-agnostic event handler used by all `account-linking` template
53294
+ * dispatch sites. It accepts the same shape as `OnExecutePostLogin` but
53295
+ * ignores the trigger-specific `api` object, which lets the same function
53296
+ * back `post-user-login`, `post-user-registration`, and `post-user-update`.
53297
+ */
53298
+ export type AccountLinkingHandler = (event: HookEvent) => Promise<void>;
53299
+ declare function accountLinking(options?: AccountLinkingOptions): OnExecutePostLogin & AccountLinkingHandler;
53250
53300
  /**
53251
53301
  * Local code executor using `new Function()`.
53252
53302
  * Suitable for local development only — no isolation or sandboxing.
@@ -60831,7 +60881,7 @@ export declare function init(config: AuthHeroConfig): {
60831
60881
  updated_at: string;
60832
60882
  url: string;
60833
60883
  enabled: boolean;
60834
- trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
60884
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
60835
60885
  synchronous: boolean;
60836
60886
  hook_id: string;
60837
60887
  priority?: number | undefined | undefined;
@@ -60848,10 +60898,10 @@ export declare function init(config: AuthHeroConfig): {
60848
60898
  created_at: string;
60849
60899
  updated_at: string;
60850
60900
  enabled: boolean;
60851
- trigger_id: "post-user-login" | "credentials-exchange";
60901
+ trigger_id: "post-user-registration" | "post-user-login" | "post-user-update" | "credentials-exchange";
60852
60902
  synchronous: boolean;
60853
60903
  hook_id: string;
60854
- template_id: "ensure-username" | "set-preferred-username";
60904
+ template_id: "ensure-username" | "set-preferred-username" | "account-linking";
60855
60905
  priority?: number | undefined | undefined;
60856
60906
  } | {
60857
60907
  created_at: string;
@@ -60871,7 +60921,7 @@ export declare function init(config: AuthHeroConfig): {
60871
60921
  updated_at: string;
60872
60922
  url: string;
60873
60923
  enabled: boolean;
60874
- trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
60924
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
60875
60925
  synchronous: boolean;
60876
60926
  hook_id: string;
60877
60927
  priority?: number | undefined | undefined;
@@ -60888,10 +60938,10 @@ export declare function init(config: AuthHeroConfig): {
60888
60938
  created_at: string;
60889
60939
  updated_at: string;
60890
60940
  enabled: boolean;
60891
- trigger_id: "post-user-login" | "credentials-exchange";
60941
+ trigger_id: "post-user-registration" | "post-user-login" | "post-user-update" | "credentials-exchange";
60892
60942
  synchronous: boolean;
60893
60943
  hook_id: string;
60894
- template_id: "ensure-username" | "set-preferred-username";
60944
+ template_id: "ensure-username" | "set-preferred-username" | "account-linking";
60895
60945
  priority?: number | undefined | undefined;
60896
60946
  } | {
60897
60947
  created_at: string;
@@ -60919,7 +60969,7 @@ export declare function init(config: AuthHeroConfig): {
60919
60969
  } & {
60920
60970
  json: {
60921
60971
  url: string;
60922
- trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
60972
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
60923
60973
  enabled?: boolean | undefined;
60924
60974
  synchronous?: boolean | undefined;
60925
60975
  priority?: number | undefined;
@@ -60932,8 +60982,8 @@ export declare function init(config: AuthHeroConfig): {
60932
60982
  priority?: number | undefined;
60933
60983
  hook_id?: string | undefined;
60934
60984
  } | {
60935
- trigger_id: "post-user-login" | "credentials-exchange";
60936
- template_id: "ensure-username" | "set-preferred-username";
60985
+ trigger_id: "post-user-registration" | "post-user-login" | "post-user-update" | "credentials-exchange";
60986
+ template_id: "ensure-username" | "set-preferred-username" | "account-linking";
60937
60987
  enabled?: boolean | undefined;
60938
60988
  synchronous?: boolean | undefined;
60939
60989
  priority?: number | undefined;
@@ -60952,7 +61002,7 @@ export declare function init(config: AuthHeroConfig): {
60952
61002
  updated_at: string;
60953
61003
  url: string;
60954
61004
  enabled: boolean;
60955
- trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
61005
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
60956
61006
  synchronous: boolean;
60957
61007
  hook_id: string;
60958
61008
  priority?: number | undefined | undefined;
@@ -60969,10 +61019,10 @@ export declare function init(config: AuthHeroConfig): {
60969
61019
  created_at: string;
60970
61020
  updated_at: string;
60971
61021
  enabled: boolean;
60972
- trigger_id: "post-user-login" | "credentials-exchange";
61022
+ trigger_id: "post-user-registration" | "post-user-login" | "post-user-update" | "credentials-exchange";
60973
61023
  synchronous: boolean;
60974
61024
  hook_id: string;
60975
- template_id: "ensure-username" | "set-preferred-username";
61025
+ template_id: "ensure-username" | "set-preferred-username" | "account-linking";
60976
61026
  priority?: number | undefined | undefined;
60977
61027
  } | {
60978
61028
  created_at: string;
@@ -61022,7 +61072,7 @@ export declare function init(config: AuthHeroConfig): {
61022
61072
  updated_at: string;
61023
61073
  url: string;
61024
61074
  enabled: boolean;
61025
- trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
61075
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
61026
61076
  synchronous: boolean;
61027
61077
  hook_id: string;
61028
61078
  priority?: number | undefined | undefined;
@@ -61039,10 +61089,10 @@ export declare function init(config: AuthHeroConfig): {
61039
61089
  created_at: string;
61040
61090
  updated_at: string;
61041
61091
  enabled: boolean;
61042
- trigger_id: "post-user-login" | "credentials-exchange";
61092
+ trigger_id: "post-user-registration" | "post-user-login" | "post-user-update" | "credentials-exchange";
61043
61093
  synchronous: boolean;
61044
61094
  hook_id: string;
61045
- template_id: "ensure-username" | "set-preferred-username";
61095
+ template_id: "ensure-username" | "set-preferred-username" | "account-linking";
61046
61096
  priority?: number | undefined | undefined;
61047
61097
  } | {
61048
61098
  created_at: string;
@@ -61088,7 +61138,7 @@ export declare function init(config: AuthHeroConfig): {
61088
61138
  updated_at: string;
61089
61139
  url: string;
61090
61140
  enabled: boolean;
61091
- trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
61141
+ trigger_id: "pre-user-registration" | "post-user-registration" | "post-user-login" | "post-user-update" | "validate-registration-username" | "pre-user-deletion" | "post-user-deletion";
61092
61142
  synchronous: boolean;
61093
61143
  hook_id: string;
61094
61144
  priority?: number | undefined | undefined;
@@ -61105,10 +61155,10 @@ export declare function init(config: AuthHeroConfig): {
61105
61155
  created_at: string;
61106
61156
  updated_at: string;
61107
61157
  enabled: boolean;
61108
- trigger_id: "post-user-login" | "credentials-exchange";
61158
+ trigger_id: "post-user-registration" | "post-user-login" | "post-user-update" | "credentials-exchange";
61109
61159
  synchronous: boolean;
61110
61160
  hook_id: string;
61111
- template_id: "ensure-username" | "set-preferred-username";
61161
+ template_id: "ensure-username" | "set-preferred-username" | "account-linking";
61112
61162
  priority?: number | undefined | undefined;
61113
61163
  } | {
61114
61164
  created_at: string;
@@ -61738,6 +61788,7 @@ export declare function init(config: AuthHeroConfig): {
61738
61788
  registration_metadata?: {
61739
61789
  [x: string]: any;
61740
61790
  } | undefined;
61791
+ user_linking_mode?: "builtin" | "off" | undefined | undefined;
61741
61792
  }[] | {
61742
61793
  length: number;
61743
61794
  start: number;
@@ -61826,6 +61877,7 @@ export declare function init(config: AuthHeroConfig): {
61826
61877
  registration_metadata?: {
61827
61878
  [x: string]: any;
61828
61879
  } | undefined;
61880
+ user_linking_mode?: "builtin" | "off" | undefined | undefined;
61829
61881
  }[];
61830
61882
  total?: number | undefined;
61831
61883
  };
@@ -61929,6 +61981,7 @@ export declare function init(config: AuthHeroConfig): {
61929
61981
  registration_metadata?: {
61930
61982
  [x: string]: any;
61931
61983
  } | undefined;
61984
+ user_linking_mode?: "builtin" | "off" | undefined | undefined;
61932
61985
  };
61933
61986
  outputFormat: "json";
61934
61987
  status: 200;
@@ -62015,6 +62068,7 @@ export declare function init(config: AuthHeroConfig): {
62015
62068
  owner_user_id?: string | undefined;
62016
62069
  registration_type?: "manual" | "open_dcr" | "iat_dcr" | undefined;
62017
62070
  registration_metadata?: Record<string, any> | undefined;
62071
+ user_linking_mode?: "builtin" | "off" | undefined;
62018
62072
  };
62019
62073
  };
62020
62074
  output: {
@@ -62101,6 +62155,7 @@ export declare function init(config: AuthHeroConfig): {
62101
62155
  registration_metadata?: {
62102
62156
  [x: string]: any;
62103
62157
  } | undefined;
62158
+ user_linking_mode?: "builtin" | "off" | undefined | undefined;
62104
62159
  };
62105
62160
  outputFormat: "json";
62106
62161
  status: 200;
@@ -62166,6 +62221,7 @@ export declare function init(config: AuthHeroConfig): {
62166
62221
  owner_user_id?: string | undefined;
62167
62222
  registration_type?: "manual" | "open_dcr" | "iat_dcr" | undefined;
62168
62223
  registration_metadata?: Record<string, any> | undefined;
62224
+ user_linking_mode?: "builtin" | "off" | undefined;
62169
62225
  };
62170
62226
  };
62171
62227
  output: {
@@ -62252,6 +62308,7 @@ export declare function init(config: AuthHeroConfig): {
62252
62308
  registration_metadata?: {
62253
62309
  [x: string]: any;
62254
62310
  } | undefined;
62311
+ user_linking_mode?: "builtin" | "off" | undefined;
62255
62312
  };
62256
62313
  outputFormat: "json";
62257
62314
  status: 201;
@@ -65079,9 +65136,9 @@ export declare function init(config: AuthHeroConfig): {
65079
65136
  query: {
65080
65137
  domain: string;
65081
65138
  state: string;
65082
- integration_type: string;
65083
65139
  return_to: string;
65084
65140
  scope?: string | undefined;
65141
+ integration_type?: string | undefined;
65085
65142
  };
65086
65143
  };
65087
65144
  output: {};
@@ -65092,9 +65149,9 @@ export declare function init(config: AuthHeroConfig): {
65092
65149
  query: {
65093
65150
  domain: string;
65094
65151
  state: string;
65095
- integration_type: string;
65096
65152
  return_to: string;
65097
65153
  scope?: string | undefined;
65154
+ integration_type?: string | undefined;
65098
65155
  };
65099
65156
  };
65100
65157
  output: {};
@@ -65105,9 +65162,9 @@ export declare function init(config: AuthHeroConfig): {
65105
65162
  query: {
65106
65163
  domain: string;
65107
65164
  state: string;
65108
- integration_type: string;
65109
65165
  return_to: string;
65110
65166
  scope?: string | undefined;
65167
+ integration_type?: string | undefined;
65111
65168
  };
65112
65169
  };
65113
65170
  output: {};