@authhero/proxy 0.10.1 → 0.10.3

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/proxy.mjs CHANGED
@@ -275,7 +275,7 @@ var ue = e.object({
275
275
  region: e.string().optional(),
276
276
  postal_code: e.string().optional(),
277
277
  country: e.string().optional()
278
- }).optional(), pe = e.object({
278
+ }).optional(), g = e.object({
279
279
  email: e.string().transform((e) => e.toLowerCase()).optional(),
280
280
  username: e.string().refine((e) => !e.includes("@"), { message: "Usernames must not contain \"@\". Use the email field for email addresses." }).optional(),
281
281
  phone_number: e.string().optional(),
@@ -300,7 +300,7 @@ var ue = e.object({
300
300
  zoneinfo: e.string().optional(),
301
301
  address: fe
302
302
  });
303
- pe.extend({
303
+ g.extend({
304
304
  email_verified: e.boolean().default(!1),
305
305
  verify_email: e.boolean().optional(),
306
306
  last_ip: e.string().optional(),
@@ -322,23 +322,23 @@ pe.extend({
322
322
  email: e.string().optional(),
323
323
  login_count: e.number().default(0),
324
324
  identities: e.array(de).optional()
325
- }).omit({ registration_completed_at: !0 }), pe.extend({
325
+ }).omit({ registration_completed_at: !0 }), g.extend({
326
326
  login_count: e.number(),
327
327
  multifactor: e.array(e.string()).optional(),
328
328
  last_ip: e.string().optional(),
329
329
  last_login: e.string().optional(),
330
330
  user_id: e.string()
331
331
  }).catchall(e.any());
332
- var me = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", he = (e = 21) => {
332
+ var pe = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", me = (e = 21) => {
333
333
  let t = "", n = crypto.getRandomValues(new Uint8Array(e |= 0));
334
- for (; e--;) t += me[n[e] & 63];
334
+ for (; e--;) t += pe[n[e] & 63];
335
335
  return t;
336
- }, ge = e.object({
336
+ }, he = e.object({
337
337
  client_id: e.string().optional().openapi({ description: "ID of this client. Generated server-side if omitted (Auth0 behavior)." }),
338
338
  name: e.string().min(1).openapi({ description: "Name of this client (min length: 1 character, does not allow < or >)." }),
339
339
  description: e.string().max(140).optional().openapi({ description: "Free text description of this client (max length: 140 characters)." }),
340
340
  global: e.boolean().default(!1).openapi({ description: "Whether this is your global 'All Applications' client representing legacy tenant settings (true) or a regular client (false)." }),
341
- client_secret: e.string().default(() => he()).optional().openapi({ description: "Client secret (which you must not make public)." }),
341
+ client_secret: e.string().default(() => me()).optional().openapi({ description: "Client secret (which you must not make public)." }),
342
342
  app_type: e.enum([
343
343
  "native",
344
344
  "spa",
@@ -455,8 +455,8 @@ var me = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", he
455
455
  e.object({
456
456
  created_at: e.string(),
457
457
  updated_at: e.string()
458
- }).extend(ge.shape).extend({ client_id: e.string() });
459
- var _e = e.object({
458
+ }).extend(he.shape).extend({ client_id: e.string() });
459
+ var ge = e.object({
460
460
  client_id: e.string().min(1).openapi({ description: "ID of the client." }),
461
461
  audience: e.string().min(1).openapi({ description: "The audience (API identifier) of this client grant." }),
462
462
  scope: e.array(e.string()).optional().openapi({ description: "Scopes allowed for this client grant." }),
@@ -469,15 +469,15 @@ var _e = e.object({
469
469
  is_system: e.boolean().optional().openapi({ description: "If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly." }),
470
470
  subject_type: e.enum(["client", "user"]).optional().openapi({ description: "The type of application access the client grant allows. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement." }),
471
471
  authorization_details_types: e.array(e.string()).optional().openapi({ description: "Types of authorization_details allowed for this client grant. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement." })
472
- }), ve = e.object({ id: e.string().openapi({ description: "ID of the client grant." }) }).extend(_e.shape).extend({
472
+ }), _e = e.object({ id: e.string().openapi({ description: "ID of the client grant." }) }).extend(ge.shape).extend({
473
473
  created_at: e.string().optional(),
474
474
  updated_at: e.string().optional()
475
475
  });
476
- e.array(ve);
477
- var ye = e.enum(["iat", "rat"]), be = e.object({
476
+ e.array(_e);
477
+ var ve = e.enum(["iat", "rat"]), ye = e.object({
478
478
  id: e.string(),
479
479
  token_hash: e.string(),
480
- type: ye,
480
+ type: ve,
481
481
  client_id: e.string().optional(),
482
482
  sub: e.string().optional(),
483
483
  constraints: e.record(e.string(), e.unknown()).optional(),
@@ -488,23 +488,23 @@ e.object({
488
488
  created_at: e.string(),
489
489
  used_at: e.string().optional(),
490
490
  revoked_at: e.string().optional()
491
- }).extend(be.shape);
492
- var g = e.object({
491
+ }).extend(ye.shape);
492
+ var _ = e.object({
493
493
  x: e.number(),
494
494
  y: e.number()
495
- }), xe = /* @__PURE__ */ function(e) {
495
+ }), be = /* @__PURE__ */ function(e) {
496
496
  return e.RICH_TEXT = "RICH_TEXT", e.NEXT_BUTTON = "NEXT_BUTTON", e.BACK_BUTTON = "BACK_BUTTON", e.SUBMIT_BUTTON = "SUBMIT_BUTTON", e.DIVIDER = "DIVIDER", e.TEXT = "TEXT", e.EMAIL = "EMAIL", e.PASSWORD = "PASSWORD", e.NUMBER = "NUMBER", e.PHONE = "PHONE", e.DATE = "DATE", e.CHECKBOX = "CHECKBOX", e.RADIO = "RADIO", e.SELECT = "SELECT", e.HIDDEN = "HIDDEN", e.LEGAL = "LEGAL", e;
497
- }({}), Se = /* @__PURE__ */ function(e) {
497
+ }({}), xe = /* @__PURE__ */ function(e) {
498
498
  return e.BLOCK = "BLOCK", e.FIELD = "FIELD", e;
499
- }({}), _ = e.object({
499
+ }({}), v = e.object({
500
500
  id: e.string(),
501
- category: e.nativeEnum(Se),
502
- type: e.nativeEnum(xe)
503
- }), Ce = _.extend({
501
+ category: e.nativeEnum(xe),
502
+ type: e.nativeEnum(be)
503
+ }), Se = v.extend({
504
504
  category: e.literal("BLOCK"),
505
505
  type: e.literal("RICH_TEXT"),
506
506
  config: e.object({ content: e.string() }).passthrough()
507
- }), we = _.extend({
507
+ }), Ce = v.extend({
508
508
  category: e.literal("BLOCK"),
509
509
  type: e.union([
510
510
  e.literal("NEXT_BUTTON"),
@@ -512,13 +512,13 @@ var g = e.object({
512
512
  e.literal("SUBMIT_BUTTON")
513
513
  ]),
514
514
  config: e.object({ text: e.string() }).passthrough()
515
- }), Te = _.extend({
515
+ }), we = v.extend({
516
516
  category: e.literal("FIELD"),
517
517
  type: e.literal("LEGAL"),
518
518
  required: e.boolean().optional(),
519
519
  sensitive: e.boolean().optional(),
520
520
  config: e.object({ text: e.string() }).passthrough()
521
- }), Ee = _.extend({
521
+ }), Te = v.extend({
522
522
  category: e.literal("FIELD"),
523
523
  type: e.union([
524
524
  e.literal("TEXT"),
@@ -538,38 +538,38 @@ var g = e.object({
538
538
  label: e.string().optional(),
539
539
  placeholder: e.string().optional()
540
540
  }).passthrough()
541
- }), De = e.object({
541
+ }), Ee = e.object({
542
542
  id: e.string(),
543
543
  category: e.string(),
544
544
  type: e.string()
545
- }).passthrough(), Oe = e.union([
545
+ }).passthrough(), De = e.union([
546
+ Se,
546
547
  Ce,
547
548
  we,
548
549
  Te,
549
- Ee,
550
- De
551
- ]), ke = e.object({
550
+ Ee
551
+ ]), Oe = e.object({
552
552
  id: e.string(),
553
553
  type: e.literal("STEP"),
554
- coordinates: g,
554
+ coordinates: _,
555
555
  alias: e.string().optional(),
556
556
  config: e.object({
557
- components: e.array(Oe),
557
+ components: e.array(De),
558
558
  next_node: e.string()
559
559
  }).passthrough()
560
- }), Ae = e.object({
560
+ }), ke = e.object({
561
561
  id: e.string(),
562
562
  type: e.literal("FLOW"),
563
- coordinates: g,
563
+ coordinates: _,
564
564
  alias: e.string().optional(),
565
565
  config: e.object({
566
566
  flow_id: e.string(),
567
567
  next_node: e.string()
568
568
  })
569
- }), je = e.object({
569
+ }), Ae = e.object({
570
570
  id: e.string(),
571
571
  type: e.literal("ACTION"),
572
- coordinates: g,
572
+ coordinates: _,
573
573
  alias: e.string().optional(),
574
574
  config: e.object({
575
575
  action_type: e.enum(["REDIRECT"]).openapi({ description: "The type of action to perform" }),
@@ -581,29 +581,29 @@ var g = e.object({
581
581
  custom_url: e.string().optional().openapi({ description: "Custom URL when target is 'custom'" }),
582
582
  next_node: e.string().openapi({ description: "The next node to navigate to after action (for non-redirect actions)" })
583
583
  }).passthrough()
584
- }), Me = e.object({
584
+ }), je = e.object({
585
585
  id: e.string(),
586
586
  type: e.string(),
587
- coordinates: g
588
- }).passthrough(), Ne = e.union([
587
+ coordinates: _
588
+ }).passthrough(), Me = e.union([
589
+ Oe,
589
590
  ke,
590
591
  Ae,
591
- je,
592
- Me
593
- ]), Pe = e.object({
592
+ je
593
+ ]), Ne = e.object({
594
594
  next_node: e.string(),
595
- coordinates: g
596
- }).passthrough(), Fe = e.object({
595
+ coordinates: _
596
+ }).passthrough(), Pe = e.object({
597
597
  resume_flow: e.boolean().optional(),
598
- coordinates: g
598
+ coordinates: _
599
599
  }).passthrough();
600
600
  e.object({
601
601
  id: e.string(),
602
602
  name: e.string(),
603
603
  languages: e.object({ primary: e.string() }).passthrough(),
604
- nodes: e.array(Ne),
605
- start: Pe,
606
- ending: Fe,
604
+ nodes: e.array(Me),
605
+ start: Ne,
606
+ ending: Pe,
607
607
  created_at: e.string(),
608
608
  updated_at: e.string(),
609
609
  links: e.object({
@@ -615,24 +615,24 @@ e.object({
615
615
  created_at: !0,
616
616
  updated_at: !0
617
617
  });
618
- var Ie = /* @__PURE__ */ function(e) {
618
+ var Fe = /* @__PURE__ */ function(e) {
619
619
  return e.TOKEN = "token", e.ID_TOKEN = "id_token", e.TOKEN_ID_TOKEN = "id_token token", e.CODE = "code", e.CODE_ID_TOKEN = "code id_token", e.CODE_TOKEN = "code token", e.CODE_ID_TOKEN_TOKEN = "code id_token token", e;
620
- }({}), Le = /* @__PURE__ */ function(e) {
620
+ }({}), Ie = /* @__PURE__ */ function(e) {
621
621
  return e.QUERY = "query", e.FRAGMENT = "fragment", e.FORM_POST = "form_post", e.WEB_MESSAGE = "web_message", e.SAML_POST = "saml_post", e;
622
- }({}), Re = /* @__PURE__ */ function(e) {
622
+ }({}), Le = /* @__PURE__ */ function(e) {
623
623
  return e.S256 = "S256", e.Plain = "plain", e;
624
- }({}), ze = e.union([e.null(), e.object({
624
+ }({}), Re = e.union([e.null(), e.object({
625
625
  essential: e.boolean().optional(),
626
626
  value: e.unknown().optional(),
627
627
  values: e.array(e.unknown()).optional()
628
- })]).nullable(), Be = e.object({
629
- userinfo: e.record(e.string(), ze).optional(),
630
- id_token: e.record(e.string(), ze).optional()
631
- }), Ve = e.object({
628
+ })]).nullable(), ze = e.object({
629
+ userinfo: e.record(e.string(), Re).optional(),
630
+ id_token: e.record(e.string(), Re).optional()
631
+ }), Be = e.object({
632
632
  client_id: e.string(),
633
633
  act_as: e.string().optional(),
634
- response_type: e.nativeEnum(Ie).optional(),
635
- response_mode: e.nativeEnum(Le).optional(),
634
+ response_type: e.nativeEnum(Fe).optional(),
635
+ response_mode: e.nativeEnum(Ie).optional(),
636
636
  redirect_uri: e.string().optional(),
637
637
  audience: e.string().optional(),
638
638
  organization: e.string().optional(),
@@ -640,13 +640,13 @@ var Ie = /* @__PURE__ */ function(e) {
640
640
  nonce: e.string().optional(),
641
641
  scope: e.string().optional(),
642
642
  prompt: e.string().optional(),
643
- code_challenge_method: e.nativeEnum(Re).optional(),
643
+ code_challenge_method: e.nativeEnum(Le).optional(),
644
644
  code_challenge: e.string().optional(),
645
645
  username: e.string().optional(),
646
646
  ui_locales: e.string().optional(),
647
647
  max_age: e.number().optional(),
648
648
  acr_values: e.string().optional(),
649
- claims: Be.optional(),
649
+ claims: ze.optional(),
650
650
  vendor_id: e.string().optional()
651
651
  });
652
652
  e.object({
@@ -669,7 +669,7 @@ e.object({
669
669
  "auto"
670
670
  ]).optional()
671
671
  });
672
- var He = e.enum([
672
+ var Ve = e.enum([
673
673
  "password_reset",
674
674
  "email_verification",
675
675
  "otp",
@@ -682,7 +682,7 @@ e.object({
682
682
  code_id: e.string().openapi({ description: "The code that will be used in for instance an email verification flow" }),
683
683
  login_id: e.string().openapi({ description: "The id of the login session that the code is connected to" }),
684
684
  connection_id: e.string().optional().openapi({ description: "The connection that the code is connected to" }),
685
- code_type: He,
685
+ code_type: Ve,
686
686
  code_verifier: e.string().optional().openapi({ description: "The code verifier used in PKCE in outbound flows" }),
687
687
  code_challenge: e.string().optional().openapi({ description: "The code challenge used in PKCE in outbound flows" }),
688
688
  code_challenge_method: e.enum(["plain", "S256"]).optional().openapi({ description: "The code challenge method used in PKCE in outbound flows" }),
@@ -694,7 +694,7 @@ e.object({
694
694
  used_at: e.string().optional(),
695
695
  user_id: e.string().optional()
696
696
  }).extend({ created_at: e.string() });
697
- var Ue = e.object({
697
+ var He = e.object({
698
698
  kid: e.string().optional(),
699
699
  team_id: e.string().optional(),
700
700
  realms: e.string().optional(),
@@ -810,26 +810,26 @@ var Ue = e.object({
810
810
  "never_on_login"
811
811
  ]).optional()
812
812
  });
813
- function v(e) {
813
+ function y(e) {
814
814
  if (e !== null) {
815
- if (Array.isArray(e)) return e.filter((e) => e !== null).map(v);
815
+ if (Array.isArray(e)) return e.filter((e) => e !== null).map(y);
816
816
  if (e && typeof e == "object") {
817
817
  let t = {};
818
- for (let [n, r] of Object.entries(e)) r !== null && (t[n] = v(r));
818
+ for (let [n, r] of Object.entries(e)) r !== null && (t[n] = y(r));
819
819
  return t;
820
820
  }
821
821
  return e;
822
822
  }
823
823
  }
824
- var We = e.object({
824
+ var Ue = e.object({
825
825
  id: e.string().optional(),
826
826
  name: e.string(),
827
827
  display_name: e.string().optional(),
828
828
  strategy: e.string(),
829
- options: e.preprocess((e) => e === null ? {} : v(e), Ue).default({}),
829
+ options: e.preprocess((e) => e === null ? {} : y(e), He).default({}),
830
830
  enabled_clients: e.array(e.string()).default([]).optional(),
831
- response_type: e.nativeEnum(Ie).optional(),
832
- response_mode: e.nativeEnum(Le).optional(),
831
+ response_type: e.nativeEnum(Fe).optional(),
832
+ response_mode: e.nativeEnum(Ie).optional(),
833
833
  is_domain_connection: e.boolean().optional(),
834
834
  show_as_button: e.boolean().optional(),
835
835
  metadata: e.record(e.string(), e.any()).optional(),
@@ -839,8 +839,8 @@ e.object({
839
839
  id: e.string(),
840
840
  created_at: e.string().transform((e) => e === null ? "" : e),
841
841
  updated_at: e.string().transform((e) => e === null ? "" : e)
842
- }).extend(We.shape);
843
- var y = e.object({
842
+ }).extend(Ue.shape);
843
+ var b = e.object({
844
844
  domain: e.string(),
845
845
  custom_domain_id: e.string().optional(),
846
846
  type: e.enum(["auth0_managed_certs", "self_managed_certs"]),
@@ -854,7 +854,7 @@ var y = e.object({
854
854
  "null"
855
855
  ]).optional(),
856
856
  domain_metadata: e.record(e.string(), e.string().max(255)).optional()
857
- }), Ge = e.discriminatedUnion("name", [e.object({
857
+ }), We = e.discriminatedUnion("name", [e.object({
858
858
  name: e.literal("txt"),
859
859
  record: e.string(),
860
860
  domain: e.string()
@@ -862,7 +862,7 @@ var y = e.object({
862
862
  name: e.literal("http"),
863
863
  http_body: e.string(),
864
864
  http_url: e.string()
865
- })]), Ke = y.extend({
865
+ })]), Ge = b.extend({
866
866
  custom_domain_id: e.string(),
867
867
  primary: e.boolean(),
868
868
  status: e.enum([
@@ -872,28 +872,28 @@ var y = e.object({
872
872
  "ready"
873
873
  ]),
874
874
  origin_domain_name: e.string().optional(),
875
- verification: e.object({ methods: e.array(Ge) }).optional(),
875
+ verification: e.object({ methods: e.array(We) }).optional(),
876
876
  tls_policy: e.string().optional()
877
877
  });
878
- y.pick({
878
+ b.pick({
879
879
  tls_policy: !0,
880
880
  custom_client_ip_header: !0,
881
881
  domain_metadata: !0
882
- }).strict(), Ke.extend({ tenant_id: e.string() }), e.object({
882
+ }).strict(), Ge.extend({ tenant_id: e.string() }), e.object({
883
883
  certificate: e.string().regex(/^-----BEGIN CERTIFICATE-----[\s\S]+-----END CERTIFICATE-----\s*$/, "must be PEM-encoded; include the full certificate chain in leaf-first order"),
884
884
  private_key: e.string().regex(/-----BEGIN (RSA |EC |ENCRYPTED )?PRIVATE KEY-----[\s\S]+-----END \1PRIVATE KEY-----\s*$/, "must be a PEM-encoded private key")
885
885
  });
886
- var b = e.object({
886
+ var x = e.object({
887
887
  id: e.string(),
888
888
  order: e.number().optional(),
889
889
  visible: e.boolean().optional().default(!0)
890
- }), x = b.extend({ category: e.literal("BLOCK").optional() }), qe = x.extend({
890
+ }), S = x.extend({ category: e.literal("BLOCK").optional() }), Ke = S.extend({
891
891
  type: e.literal("DIVIDER"),
892
892
  config: e.object({ text: e.string().optional() }).optional()
893
- }), Je = x.extend({
893
+ }), qe = S.extend({
894
894
  type: e.literal("HTML"),
895
895
  config: e.object({ content: e.string().optional() }).optional()
896
- }), Ye = x.extend({
896
+ }), Je = S.extend({
897
897
  type: e.literal("IMAGE"),
898
898
  config: e.object({
899
899
  src: e.string().optional(),
@@ -901,43 +901,43 @@ var b = e.object({
901
901
  width: e.number().optional(),
902
902
  height: e.number().optional()
903
903
  }).optional()
904
- }), Xe = x.extend({
904
+ }), Ye = S.extend({
905
905
  type: e.literal("JUMP_BUTTON"),
906
906
  config: e.object({
907
907
  text: e.string().optional(),
908
908
  target_step: e.string().optional()
909
909
  })
910
- }), Ze = x.extend({
910
+ }), Xe = S.extend({
911
911
  type: e.literal("RESEND_BUTTON"),
912
912
  config: e.object({
913
913
  text: e.string().optional(),
914
914
  resend_action: e.string().optional()
915
915
  })
916
- }), Qe = x.extend({
916
+ }), Ze = S.extend({
917
917
  type: e.literal("NEXT_BUTTON"),
918
918
  config: e.object({ text: e.string().optional() })
919
- }), $e = x.extend({
919
+ }), Qe = S.extend({
920
920
  type: e.literal("PREVIOUS_BUTTON"),
921
921
  config: e.object({ text: e.string().optional() })
922
- }), et = x.extend({
922
+ }), $e = S.extend({
923
923
  type: e.literal("RICH_TEXT"),
924
924
  config: e.object({ content: e.string().optional() }).optional()
925
- }), S = b.extend({
925
+ }), C = x.extend({
926
926
  category: e.literal("WIDGET").optional(),
927
927
  label: e.string().min(1).optional(),
928
928
  hint: e.string().min(1).max(500).optional(),
929
929
  required: e.boolean().optional(),
930
930
  sensitive: e.boolean().optional()
931
- }), tt = S.extend({
931
+ }), et = C.extend({
932
932
  type: e.literal("AUTH0_VERIFIABLE_CREDENTIALS"),
933
933
  config: e.object({ credential_type: e.string().optional() })
934
- }), nt = S.extend({
934
+ }), tt = C.extend({
935
935
  type: e.literal("GMAPS_ADDRESS"),
936
936
  config: e.object({ api_key: e.string().optional() })
937
- }), rt = S.extend({
937
+ }), nt = C.extend({
938
938
  type: e.literal("RECAPTCHA"),
939
939
  config: e.object({ site_key: e.string().optional() })
940
- }), C = b.extend({
940
+ }), w = x.extend({
941
941
  category: e.literal("FIELD").optional(),
942
942
  label: e.string().min(1).optional(),
943
943
  hint: e.string().min(1).max(500).optional(),
@@ -953,10 +953,10 @@ var b = e.object({
953
953
  })).optional(),
954
954
  required: e.boolean().optional(),
955
955
  sensitive: e.boolean().optional()
956
- }), it = C.extend({
956
+ }), rt = w.extend({
957
957
  type: e.literal("BOOLEAN"),
958
958
  config: e.object({ default_value: e.boolean().optional() }).optional()
959
- }), at = C.extend({
959
+ }), it = w.extend({
960
960
  type: e.literal("CARDS"),
961
961
  config: e.object({
962
962
  options: e.array(e.object({
@@ -967,7 +967,7 @@ var b = e.object({
967
967
  })).optional(),
968
968
  multi_select: e.boolean().optional()
969
969
  }).optional()
970
- }), ot = C.extend({
970
+ }), at = w.extend({
971
971
  type: e.literal("CHOICE"),
972
972
  config: e.object({
973
973
  options: e.array(e.object({
@@ -978,7 +978,7 @@ var b = e.object({
978
978
  multiple: e.boolean().optional(),
979
979
  default_value: e.union([e.string(), e.array(e.string())]).optional()
980
980
  }).optional()
981
- }), st = C.extend({
981
+ }), ot = w.extend({
982
982
  type: e.literal("CODE"),
983
983
  config: e.object({
984
984
  length: e.number().int().positive().max(100).optional(),
@@ -995,7 +995,7 @@ var b = e.object({
995
995
  message: "default_value is longer than the configured length",
996
996
  path: ["default_value"]
997
997
  }).optional()
998
- }), ct = C.extend({
998
+ }), st = w.extend({
999
999
  type: e.literal("CUSTOM"),
1000
1000
  config: e.object({
1001
1001
  component: e.string().optional(),
@@ -1003,7 +1003,7 @@ var b = e.object({
1003
1003
  schema: e.record(e.string(), e.any()).optional(),
1004
1004
  code: e.string().optional()
1005
1005
  })
1006
- }), lt = C.extend({
1006
+ }), ct = w.extend({
1007
1007
  type: e.literal("DATE"),
1008
1008
  config: e.object({
1009
1009
  format: e.string().optional(),
@@ -1011,7 +1011,7 @@ var b = e.object({
1011
1011
  max: e.string().optional(),
1012
1012
  default_value: e.string().optional()
1013
1013
  }).optional()
1014
- }), ut = C.extend({
1014
+ }), lt = w.extend({
1015
1015
  type: e.literal("DROPDOWN"),
1016
1016
  config: e.object({
1017
1017
  options: e.array(e.object({
@@ -1023,26 +1023,28 @@ var b = e.object({
1023
1023
  multiple: e.boolean().optional(),
1024
1024
  default_value: e.union([e.string(), e.array(e.string())]).optional()
1025
1025
  }).optional()
1026
- }), dt = C.extend({
1026
+ }), ut = w.extend({
1027
1027
  type: e.literal("EMAIL"),
1028
1028
  config: e.object({
1029
1029
  placeholder: e.string().optional(),
1030
- default_value: e.string().optional()
1030
+ default_value: e.string().optional(),
1031
+ last_used: e.boolean().optional(),
1032
+ last_used_label: e.string().optional()
1031
1033
  }).optional()
1032
- }), ft = C.extend({
1034
+ }), dt = w.extend({
1033
1035
  type: e.literal("FILE"),
1034
1036
  config: e.object({
1035
1037
  accept: e.string().optional(),
1036
1038
  max_size: e.number().optional(),
1037
1039
  multiple: e.boolean().optional()
1038
1040
  }).optional()
1039
- }), pt = C.extend({
1041
+ }), ft = w.extend({
1040
1042
  type: e.literal("LEGAL"),
1041
1043
  config: e.object({
1042
1044
  text: e.string(),
1043
1045
  html: e.boolean().optional()
1044
1046
  }).optional()
1045
- }), mt = C.extend({
1047
+ }), pt = w.extend({
1046
1048
  type: e.literal("NUMBER"),
1047
1049
  config: e.object({
1048
1050
  placeholder: e.string().optional(),
@@ -1051,7 +1053,7 @@ var b = e.object({
1051
1053
  step: e.number().optional(),
1052
1054
  default_value: e.string().optional()
1053
1055
  }).optional()
1054
- }), ht = C.extend({
1056
+ }), mt = w.extend({
1055
1057
  type: e.literal("PASSWORD"),
1056
1058
  config: e.object({
1057
1059
  placeholder: e.string().optional(),
@@ -1060,13 +1062,13 @@ var b = e.object({
1060
1062
  forgot_password_link: e.string().optional(),
1061
1063
  default_value: e.string().optional()
1062
1064
  }).optional()
1063
- }), gt = C.extend({
1065
+ }), ht = w.extend({
1064
1066
  type: e.literal("PAYMENT"),
1065
1067
  config: e.object({
1066
1068
  provider: e.string().optional(),
1067
1069
  currency: e.string().optional()
1068
1070
  }).optional()
1069
- }), _t = C.extend({
1071
+ }), gt = w.extend({
1070
1072
  type: e.literal("SOCIAL"),
1071
1073
  config: e.object({
1072
1074
  providers: e.array(e.string()).optional(),
@@ -1080,7 +1082,7 @@ var b = e.object({
1080
1082
  last_used_label: e.string().optional()
1081
1083
  })).optional()
1082
1084
  }).optional()
1083
- }), vt = C.extend({
1085
+ }), _t = w.extend({
1084
1086
  type: e.literal("TEL"),
1085
1087
  config: e.object({
1086
1088
  placeholder: e.string().optional(),
@@ -1088,45 +1090,48 @@ var b = e.object({
1088
1090
  default_value: e.string().optional(),
1089
1091
  allow_email: e.boolean().optional()
1090
1092
  }).optional()
1091
- }), yt = C.extend({
1093
+ }), vt = w.extend({
1092
1094
  type: e.literal("TEXT"),
1093
1095
  config: e.object({
1094
1096
  placeholder: e.string().optional(),
1095
1097
  multiline: e.boolean().optional(),
1096
1098
  max_length: e.number().optional(),
1097
- default_value: e.string().optional()
1099
+ default_value: e.string().optional(),
1100
+ last_used: e.boolean().optional(),
1101
+ last_used_label: e.string().optional()
1098
1102
  }).optional()
1099
- }), bt = C.extend({
1103
+ }), yt = w.extend({
1100
1104
  type: e.literal("COUNTRY"),
1101
1105
  config: e.object({
1102
1106
  placeholder: e.string().optional(),
1103
1107
  default_value: e.string().optional()
1104
1108
  }).optional()
1105
- }), xt = C.extend({
1109
+ }), bt = w.extend({
1106
1110
  type: e.literal("URL"),
1107
1111
  config: e.object({
1108
1112
  placeholder: e.string().optional(),
1109
1113
  default_value: e.string().optional()
1110
1114
  }).optional()
1111
- }), St = e.discriminatedUnion("type", [
1115
+ }), xt = e.discriminatedUnion("type", [
1116
+ Ke,
1112
1117
  qe,
1113
1118
  Je,
1114
1119
  Ye,
1115
1120
  Xe,
1116
1121
  Ze,
1117
1122
  Qe,
1118
- $e,
1119
- et
1120
- ]), Ct = e.discriminatedUnion("type", [
1123
+ $e
1124
+ ]), St = e.discriminatedUnion("type", [
1125
+ et,
1121
1126
  tt,
1122
- nt,
1123
- rt
1124
- ]), wt = e.discriminatedUnion("type", [
1127
+ nt
1128
+ ]), Ct = e.discriminatedUnion("type", [
1129
+ rt,
1125
1130
  it,
1126
1131
  at,
1127
1132
  ot,
1133
+ yt,
1128
1134
  st,
1129
- bt,
1130
1135
  ct,
1131
1136
  lt,
1132
1137
  ut,
@@ -1138,12 +1143,11 @@ var b = e.object({
1138
1143
  gt,
1139
1144
  _t,
1140
1145
  vt,
1141
- yt,
1142
- xt
1143
- ]), w = e.union([
1146
+ bt
1147
+ ]), T = e.union([
1148
+ xt,
1144
1149
  St,
1145
- Ct,
1146
- wt
1150
+ Ct
1147
1151
  ]);
1148
1152
  new Set([
1149
1153
  "BOOLEAN",
@@ -1170,22 +1174,22 @@ new Set([
1170
1174
  visible: e.boolean().optional().default(!0),
1171
1175
  customizations: e.record(e.string(), e.any()).optional()
1172
1176
  });
1173
- var T = e.object({
1177
+ var E = e.object({
1174
1178
  x: e.number(),
1175
1179
  y: e.number()
1176
- }), Tt = e.object({
1180
+ }), wt = e.object({
1177
1181
  id: e.string(),
1178
1182
  type: e.literal("FLOW"),
1179
- coordinates: T,
1183
+ coordinates: E,
1180
1184
  alias: e.string().min(1).max(150).optional(),
1181
1185
  config: e.object({
1182
1186
  flow_id: e.string().max(30),
1183
1187
  next_node: e.string().optional()
1184
1188
  })
1185
- }), Et = e.object({
1189
+ }), Tt = e.object({
1186
1190
  id: e.string(),
1187
1191
  type: e.literal("ROUTER"),
1188
- coordinates: T,
1192
+ coordinates: E,
1189
1193
  alias: e.string().min(1).max(150),
1190
1194
  config: e.object({
1191
1195
  rules: e.array(e.object({
@@ -1196,20 +1200,20 @@ var T = e.object({
1196
1200
  })),
1197
1201
  fallback: e.string()
1198
1202
  })
1199
- }), Dt = e.object({
1203
+ }), Et = e.object({
1200
1204
  id: e.string(),
1201
1205
  type: e.literal("STEP"),
1202
- coordinates: T,
1206
+ coordinates: E,
1203
1207
  alias: e.string().min(1).max(150).optional(),
1204
1208
  config: e.object({
1205
- components: e.array(w),
1209
+ components: e.array(T),
1206
1210
  next_node: e.string().optional()
1207
1211
  })
1208
- }), Ot = e.discriminatedUnion("type", [
1212
+ }), Dt = e.discriminatedUnion("type", [
1213
+ wt,
1209
1214
  Tt,
1210
- Et,
1211
- Dt
1212
- ]), kt = e.object({
1215
+ Et
1216
+ ]), Ot = e.object({
1213
1217
  name: e.string().openapi({ description: "The name of the form" }),
1214
1218
  messages: e.object({
1215
1219
  errors: e.record(e.string(), e.any()).optional(),
@@ -1220,14 +1224,14 @@ var T = e.object({
1220
1224
  default: e.string().optional()
1221
1225
  }).optional(),
1222
1226
  translations: e.record(e.string(), e.any()).optional(),
1223
- nodes: e.array(Ot).optional(),
1227
+ nodes: e.array(Dt).optional(),
1224
1228
  start: e.object({
1225
1229
  hidden_fields: e.array(e.object({
1226
1230
  key: e.string(),
1227
1231
  value: e.string()
1228
1232
  })).optional(),
1229
1233
  next_node: e.string().optional(),
1230
- coordinates: T.optional()
1234
+ coordinates: E.optional()
1231
1235
  }).optional(),
1232
1236
  ending: e.object({
1233
1237
  redirection: e.object({
@@ -1235,7 +1239,7 @@ var T = e.object({
1235
1239
  target: e.string().optional()
1236
1240
  }).optional(),
1237
1241
  after_submit: e.object({ flow_id: e.string().optional() }).optional(),
1238
- coordinates: T.optional(),
1242
+ coordinates: E.optional(),
1239
1243
  resume_flow: e.boolean().optional()
1240
1244
  }).optional(),
1241
1245
  style: e.object({ css: e.string().optional() }).optional(),
@@ -1244,8 +1248,8 @@ var T = e.object({
1244
1248
  sdk_src: e.string().optional()
1245
1249
  }).optional()
1246
1250
  }).openapi({ description: "Schema for flow-based forms (matches Auth0 Forms structure)" });
1247
- n.extend(kt.shape).extend({ id: e.string() });
1248
- var At = e.object({
1251
+ n.extend(Ot.shape).extend({ id: e.string() });
1252
+ var kt = e.object({
1249
1253
  id: e.number().optional(),
1250
1254
  text: e.string(),
1251
1255
  type: e.enum([
@@ -1254,7 +1258,7 @@ var At = e.object({
1254
1258
  "success",
1255
1259
  "warning"
1256
1260
  ])
1257
- }), jt = e.object({
1261
+ }), At = e.object({
1258
1262
  id: e.string().optional(),
1259
1263
  text: e.string(),
1260
1264
  href: e.string(),
@@ -1266,12 +1270,12 @@ e.object({
1266
1270
  method: e.enum(["POST", "GET"]),
1267
1271
  title: e.string().optional(),
1268
1272
  description: e.string().optional(),
1269
- components: e.array(w),
1270
- messages: e.array(At).optional(),
1271
- links: e.array(jt).optional(),
1273
+ components: e.array(T),
1274
+ messages: e.array(kt).optional(),
1275
+ links: e.array(At).optional(),
1272
1276
  footer: e.string().optional()
1273
1277
  });
1274
- var E = e.enum([
1278
+ var D = e.enum([
1275
1279
  "pre-user-registration",
1276
1280
  "post-user-registration",
1277
1281
  "post-user-login",
@@ -1279,7 +1283,7 @@ var E = e.enum([
1279
1283
  "validate-registration-username",
1280
1284
  "pre-user-deletion",
1281
1285
  "post-user-deletion"
1282
- ]), D = e.enum([
1286
+ ]), jt = e.enum([
1283
1287
  "pre-user-registration",
1284
1288
  "post-user-registration",
1285
1289
  "post-user-login",
@@ -1296,7 +1300,7 @@ var E = e.enum([
1296
1300
  "credentials-exchange",
1297
1301
  "pre-user-registration",
1298
1302
  "post-user-registration"
1299
- ]), Pt = e.enum([
1303
+ ]), Pt = e.enum(["post-user-login"]), Ft = e.enum(["impersonate"]), It = e.enum([
1300
1304
  "ensure-username",
1301
1305
  "set-preferred-username",
1302
1306
  "account-linking"
@@ -1306,59 +1310,73 @@ var E = e.enum([
1306
1310
  priority: e.number().optional(),
1307
1311
  hook_id: e.string().optional(),
1308
1312
  metadata: e.record(e.string(), e.unknown()).optional()
1309
- }, Ft = e.object({
1313
+ }, Lt = e.object({
1310
1314
  ...O,
1311
- trigger_id: E,
1315
+ trigger_id: D,
1312
1316
  url: e.string()
1313
- }), It = e.object({
1317
+ }), Rt = e.object({
1314
1318
  ...O,
1315
- trigger_id: D,
1319
+ trigger_id: jt,
1316
1320
  form_id: e.string()
1317
- }), Lt = e.object({
1321
+ }), zt = e.object({
1318
1322
  ...O,
1319
1323
  trigger_id: Mt,
1320
- template_id: Pt
1321
- }), Rt = e.object({
1324
+ template_id: It
1325
+ }), Bt = e.object({
1322
1326
  ...O,
1323
1327
  trigger_id: Nt,
1324
1328
  code_id: e.string()
1329
+ }), Vt = e.object({
1330
+ ...O,
1331
+ trigger_id: Pt,
1332
+ page_id: Ft,
1333
+ permission_required: e.string().optional()
1325
1334
  });
1326
1335
  e.union([
1327
- Ft,
1328
- It,
1329
1336
  Lt,
1330
- Rt
1337
+ Rt,
1338
+ zt,
1339
+ Bt,
1340
+ Vt
1331
1341
  ]);
1332
- var zt = e.object({
1342
+ var Ht = e.object({
1333
1343
  ...O,
1334
- trigger_id: E
1344
+ trigger_id: D
1335
1345
  }).extend(n.shape).extend({
1336
1346
  hook_id: e.string(),
1337
1347
  url: e.string()
1338
- }), Bt = e.object({
1348
+ }), Ut = e.object({
1339
1349
  ...O,
1340
- trigger_id: D
1350
+ trigger_id: jt
1341
1351
  }).extend(n.shape).extend({
1342
1352
  hook_id: e.string(),
1343
1353
  form_id: e.string()
1344
- }), Vt = e.object({
1354
+ }), Wt = e.object({
1345
1355
  ...O,
1346
1356
  trigger_id: Mt
1347
1357
  }).extend(n.shape).extend({
1348
1358
  hook_id: e.string(),
1349
- template_id: Pt
1350
- }), Ht = e.object({
1359
+ template_id: It
1360
+ }), Gt = e.object({
1351
1361
  ...O,
1352
1362
  trigger_id: Nt
1353
1363
  }).extend(n.shape).extend({
1354
1364
  hook_id: e.string(),
1355
1365
  code_id: e.string()
1366
+ }), Kt = e.object({
1367
+ ...O,
1368
+ trigger_id: Pt
1369
+ }).extend(n.shape).extend({
1370
+ hook_id: e.string(),
1371
+ page_id: Ft,
1372
+ permission_required: e.string().optional()
1356
1373
  });
1357
1374
  e.union([
1358
- zt,
1359
- Bt,
1360
- Vt,
1361
- Ht
1375
+ Ht,
1376
+ Ut,
1377
+ Wt,
1378
+ Gt,
1379
+ Kt
1362
1380
  ]), e.object({
1363
1381
  code: e.string().max(1e5),
1364
1382
  secrets: e.record(e.string(), e.string()).optional()
@@ -1366,11 +1384,11 @@ e.union([
1366
1384
  id: e.string(),
1367
1385
  tenant_id: e.string()
1368
1386
  }).extend(n.shape);
1369
- var Ut = e.object({ name: e.string().optional() }), Wt = e.object({ email: e.string().optional() }), Gt = e.object({
1387
+ var qt = e.object({ name: e.string().optional() }), Jt = e.object({ email: e.string().optional() }), Yt = e.object({
1370
1388
  id: e.string().optional(),
1371
1389
  organization_id: e.string().max(50),
1372
- inviter: Ut,
1373
- invitee: Wt,
1390
+ inviter: qt,
1391
+ invitee: Jt,
1374
1392
  invitation_url: e.string().url(),
1375
1393
  client_id: e.string(),
1376
1394
  connection_id: e.string().optional(),
@@ -1386,8 +1404,8 @@ e.object({
1386
1404
  created_at: e.string().datetime(),
1387
1405
  expires_at: e.string().datetime(),
1388
1406
  ticket_id: e.string().optional()
1389
- }).extend(Gt.omit({ id: !0 }).shape);
1390
- var Kt = e.object({
1407
+ }).extend(Yt.omit({ id: !0 }).shape);
1408
+ var Xt = e.object({
1391
1409
  alg: e.enum([
1392
1410
  "RS256",
1393
1411
  "RS384",
@@ -1429,7 +1447,7 @@ var Kt = e.object({
1429
1447
  message: `EC JWK is missing required member '${r}'`
1430
1448
  });
1431
1449
  });
1432
- e.object({ keys: e.array(Kt) }), e.object({
1450
+ e.object({ keys: e.array(Xt) }), e.object({
1433
1451
  issuer: e.string(),
1434
1452
  authorization_endpoint: e.string(),
1435
1453
  token_endpoint: e.string(),
@@ -1456,28 +1474,28 @@ e.object({ keys: e.array(Kt) }), e.object({
1456
1474
  backchannel_logout_supported: e.boolean().optional(),
1457
1475
  backchannel_logout_session_supported: e.boolean().optional()
1458
1476
  });
1459
- var qt = /* @__PURE__ */ function(e) {
1477
+ var Zt = /* @__PURE__ */ function(e) {
1460
1478
  return e.PENDING = "pending", e.AUTHENTICATED = "authenticated", e.AWAITING_EMAIL_VERIFICATION = "awaiting_email_verification", e.AWAITING_MFA = "awaiting_mfa", e.AWAITING_HOOK = "awaiting_hook", e.AWAITING_CONTINUATION = "awaiting_continuation", e.AWAITING_CONSENT = "awaiting_consent", e.COMPLETED = "completed", e.FAILED = "failed", e.EXPIRED = "expired", e;
1461
- }({}), Jt = e.nativeEnum(qt), Yt = e.object({
1479
+ }({}), Qt = e.nativeEnum(Zt), $t = e.object({
1462
1480
  strategy: e.string(),
1463
1481
  strategy_type: e.string()
1464
1482
  });
1465
1483
  e.object({
1466
1484
  csrf_token: e.string(),
1467
1485
  auth0Client: e.string().optional(),
1468
- authParams: Ve,
1486
+ authParams: Be,
1469
1487
  expires_at: e.string(),
1470
1488
  deleted_at: e.string().optional(),
1471
1489
  ip: e.string().optional(),
1472
1490
  useragent: e.string().optional(),
1473
1491
  session_id: e.string().optional(),
1474
1492
  authorization_url: e.string().optional(),
1475
- state: Jt.optional().default("pending"),
1493
+ state: Qt.optional().default("pending"),
1476
1494
  state_data: e.string().optional(),
1477
1495
  failure_reason: e.string().optional(),
1478
1496
  user_id: e.string().optional(),
1479
1497
  auth_connection: e.string().optional(),
1480
- auth_strategy: Yt.optional(),
1498
+ auth_strategy: $t.optional(),
1481
1499
  authenticated_at: e.string().optional()
1482
1500
  }).openapi({ description: "This represents a login sesion" }).extend({
1483
1501
  id: e.string().openapi({ description: "This is is used as the state in the universal login" }),
@@ -1644,17 +1662,17 @@ var k = {
1644
1662
  WARNING_DURING_LOGIN: "w",
1645
1663
  WARNING_SENDING_NOTIFICATION: "wn",
1646
1664
  WARNING_USER_MANAGEMENT: "wum"
1647
- }, Xt = e.string().refine((e) => Object.values(k).includes(e), { message: "Invalid log type" });
1665
+ }, en = e.string().refine((e) => Object.values(k).includes(e), { message: "Invalid log type" });
1648
1666
  k.ACLS_SUMMARY, k.ACTIONS_EXECUTION_FAILED, k.API_LIMIT, k.API_LIMIT_WARNING, k.APPI, k.CIBA_EXCHANGE_FAILED, k.CIBA_EXCHANGE_SUCCEEDED, k.CIBA_START_FAILED, k.CIBA_START_SUCCEEDED, k.CODE_LINK_SENT, k.CODE_SENT, k.DEPRECATION_NOTICE, k.FAILED_LOGIN, k.FAILED_BY_CONNECTOR, k.FAILED_CHANGE_EMAIL, k.FAILED_BY_CORS, k.FAILED_CROSS_ORIGIN_AUTHENTICATION, k.FAILED_CHANGE_PASSWORD, k.FAILED_POST_CHANGE_PASSWORD_HOOK, k.FAILED_CHANGE_PHONE_NUMBER, k.FAILED_CHANGE_PASSWORD_REQUEST, k.FAILED_CONNECTOR_PROVISIONING, k.FAILED_CHANGE_USERNAME, k.FAILED_DELEGATION, k.FAILED_DEVICE_ACTIVATION, k.FAILED_DEVICE_AUTHORIZATION_REQUEST, k.USER_CANCELED_DEVICE_CONFIRMATION, k.FAILED_USER_DELETION, k.FAILED_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN, k.FAILED_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS, k.FAILED_EXCHANGE_CUSTOM_TOKEN, k.FAILED_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN, k.FAILED_FEDERATED_LOGOUT, k.FAILED_EXCHANGE_NATIVE_SOCIAL_LOGIN, k.FAILED_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN, k.FAILED_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN, k.FAILED_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN, k.FAILED_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN, k.FAILED_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN, k.FAILED_EXCHANGE_ROTATING_REFRESH_TOKEN, k.FAILED_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN, k.FAILED_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN, k.FAILED_HOOK, k.FAILED_IMPERSONATION, k.FAILED_INVITE_ACCEPT, k.FAILED_LOGOUT, k.FLOWS_EXECUTION_COMPLETED, k.FLOWS_EXECUTION_FAILED, k.FAILED_SENDING_NOTIFICATION, k.FORMS_SUBMISSION_FAILED, k.FORMS_SUBMISSION_SUCCEEDED, k.FAILED_LOGIN_INCORRECT_PASSWORD, k.FAILED_PUSHED_AUTHORIZATION_REQUEST, k.FAILED_POST_USER_REGISTRATION_HOOK, k.FAILED_SIGNUP, k.FAILED_SILENT_AUTH, k.FAILED_LOGIN_INVALID_EMAIL_USERNAME, k.FAILED_USERS_IMPORT, k.FAILED_VERIFICATION_EMAIL, k.FAILED_VERIFICATION_EMAIL_REQUEST, k.EMAIL_VERIFICATION_CONFIRMED, k.EMAIL_VERIFICATION_FAILED, k.MFA_AUTH_FAILED, k.MFA_AUTH_REJECTED, k.MFA_AUTH_SUCCESS, k.MFA_ENROLLMENT_COMPLETE, k.TOO_MANY_MFA_FAILURES, k.MFA_RECOVERY_FAILED, k.MFA_RECOVERY_RATE_LIMIT_EXCEED, k.MFA_RECOVERY_SUCCESS, k.MFA_EMAIL_SENT, k.EMAIL_VERIFICATION_SENT, k.EMAIL_VERIFICATION_SEND_FAILURE, k.PUSH_NOTIFICATION_SENT, k.ERROR_SENDING_MFA_PUSH_NOTIFICATION, k.MFA_SMS_SENT, k.ERROR_SENDING_MFA_SMS, k.MFA_VOICE_CALL_SUCCESS, k.MFA_VOICE_CALL_FAILED, k.SECOND_FACTOR_STARTED, k.MFA_ENROLL_STARTED, k.MFA_ENROLLMENT_FAILED, k.GUARDIAN_TENANT_UPDATE, k.UNENROLL_DEVICE_ACCOUNT, k.UPDATE_DEVICE_ACCOUNT, k.WEBAUTHN_CHALLENGE_FAILED, k.WEBAUTHN_ENROLLMENT_FAILED, k.FAILED_KMS_API_OPERATION, k.SUCCESS_KMS_API_OPERATION, k.KMS_KEY_STATE_CHANGED, k.TOO_MANY_CALLS_TO_DELEGATION, k.BLOCKED_IP_ADDRESS, k.BLOCKED_ACCOUNT_IP, k.BLOCKED_ACCOUNT_EMAIL, k.INFORMATION, k.MFA_REQUIRED, k.MANAGEMENT_API_READ_OPERATION, k.FAILED_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT, k.SUCCESSFUL_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT, k.FAILED_OIDC_BACKCHANNEL_LOGOUT, k.SUCCESSFUL_OIDC_BACKCHANNEL_LOGOUT, k.ORGANIZATION_MEMBER_ADDED, k.PASSKEY_CHALLENGE_FAILED, k.PASSKEY_CHALLENGE_STARTED, k.PRE_LOGIN_ASSESSMENT, k.BREACHED_PASSWORD, k.BREACHED_PASSWORD_ON_RESET, k.SUCCESS_RESOURCE_CLEANUP, k.RICH_CONSENTS_ACCESS_ERROR, k.SUCCESS_LOGIN, k.SUCCESS_API_OPERATION, k.FAILED_API_OPERATION, k.SUCCESS_CHANGE_EMAIL, k.SUCCESS_CROSS_ORIGIN_AUTHENTICATION, k.SUCCESS_CHANGE_PASSWORD, k.SUCCESS_CHANGE_PHONE_NUMBER, k.SUCCESS_CHANGE_PASSWORD_REQUEST, k.SUCCESS_CHANGE_USERNAME, k.SUCCESS_CREDENTIAL_VALIDATION, k.SUCCESS_DELEGATION, k.SUCCESS_USER_DELETION, k.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN, k.SUCCESS_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS, k.SUCCESS_EXCHANGE_CUSTOM_TOKEN, k.SUCCESS_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN, k.SUCCESS_EXCHANGE_NATIVE_SOCIAL_LOGIN, k.SUCCESS_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN, k.SUCCESS_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN, k.SUCCESS_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN, k.SUCCESS_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN, k.SUCCESS_EXCHANGE_PASSKEY_OOB_FOR_ACCESS_TOKEN, k.SUCCESS_EXCHANGE_PASSKEY_OTP_FOR_ACCESS_TOKEN, k.SUCCESS_EXCHANGE_PASSKEY_MFA_RECOVERY_FOR_ACCESS_TOKEN, k.SUCCESS_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN, k.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN, k.SUCCESS_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN, k.SUCCESS_IMPERSONATION, k.SUCCESSFULLY_ACCEPTED_USER_INVITE, k.BREACHED_PASSWORD_ON_SIGNUP, k.SUCCESS_LOGOUT, k.SUCCESS_HOOK, k.SUCCESS_PASSWORD_MIGRATION, k.SUCCESS_REVOCATION, k.SUCCESS_SIGNUP, k.FAILED_SS_SSO_OPERATION, k.INFORMATION_FROM_SS_SSO_OPERATION, k.SUCCESS_SS_SSO_OPERATION, k.SUCCESS_SILENT_AUTH, k.SUCCESSFUL_SCIM_OPERATION, k.SUCCESSFULLY_IMPORTED_USERS, k.SUCCESS_VERIFICATION_EMAIL, k.SUCCESS_VERIFICATION_EMAIL_REQUEST, k.MAX_AMOUNT_OF_AUTHENTICATORS, k.USER_LOGIN_BLOCK_RELEASED, k.FAILED_UNIVERSAL_LOGOUT, k.SUCCESSFUL_UNIVERSAL_LOGOUT, k.WARNING_DURING_LOGIN, k.WARNING_SENDING_NOTIFICATION, k.WARNING_USER_MANAGEMENT, (() => {
1649
1667
  let e = {};
1650
1668
  for (let [t, n] of Object.entries(k)) t.startsWith("SUCCESS_") || t.startsWith("SUCCESSFUL_") || t.startsWith("SUCCESSFULLY_") || t.endsWith("_SUCCEEDED") || t.endsWith("_COMPLETED") ? e[n] = "success" : t.startsWith("FAILED_") || t.startsWith("ERROR_") || t.startsWith("BREACHED_") || t.startsWith("BLOCKED_") || t === "MFA_AUTH_FAILED" || t === "MFA_AUTH_REJECTED" || t === "MFA_RECOVERY_FAILED" || t === "MFA_ENROLLMENT_FAILED" || t === "EMAIL_VERIFICATION_FAILED" || t === "WEBAUTHN_CHALLENGE_FAILED" || t === "WEBAUTHN_ENROLLMENT_FAILED" || t === "PASSKEY_CHALLENGE_FAILED" || t === "FLOWS_EXECUTION_FAILED" || t === "FORMS_SUBMISSION_FAILED" || t === "CIBA_EXCHANGE_FAILED" || t === "CIBA_START_FAILED" || t === "ACTIONS_EXECUTION_FAILED" || t === "RICH_CONSENTS_ACCESS_ERROR" || t === "USER_CANCELED_DEVICE_CONFIRMATION" || t === "TOO_MANY_MFA_FAILURES" || t === "MFA_RECOVERY_RATE_LIMIT_EXCEED" || t === "API_LIMIT" || t === "MAX_AMOUNT_OF_AUTHENTICATORS" ? e[n] = "failure" : t.startsWith("WARNING_") || t === "API_LIMIT_WARNING" || t === "DEPRECATION_NOTICE" || t === "PRE_LOGIN_ASSESSMENT" ? e[n] = "warning" : t === "CODE_SENT" || t === "CODE_LINK_SENT" || t === "MFA_EMAIL_SENT" || t === "MFA_SMS_SENT" || t === "EMAIL_VERIFICATION_SENT" || t === "PUSH_NOTIFICATION_SENT" ? e[n] = "code_sent" : t === "INFORMATION" || t === "INFORMATION_FROM_SS_SSO_OPERATION" || t === "MANAGEMENT_API_READ_OPERATION" || t === "APPI" || t === "ACLS_SUMMARY" || t === "ORGANIZATION_MEMBER_ADDED" ? e[n] = "info" : e[n] = "other";
1651
1669
  return e;
1652
1670
  })();
1653
- var Zt = e.object({
1671
+ var tn = e.object({
1654
1672
  name: e.string(),
1655
1673
  version: e.string(),
1656
1674
  env: e.object({ node: e.string().optional() }).optional()
1657
- }), Qt = e.object({
1675
+ }), nn = e.object({
1658
1676
  country_code: e.string().length(2),
1659
1677
  city_name: e.string(),
1660
1678
  latitude: e.string(),
@@ -1663,7 +1681,7 @@ var Zt = e.object({
1663
1681
  continent_code: e.string()
1664
1682
  });
1665
1683
  e.object({
1666
- type: Xt,
1684
+ type: en,
1667
1685
  date: e.string(),
1668
1686
  description: e.string().optional(),
1669
1687
  ip: e.string().optional(),
@@ -1681,63 +1699,63 @@ e.object({
1681
1699
  strategy: e.string().optional(),
1682
1700
  strategy_type: e.string().optional(),
1683
1701
  hostname: e.string().optional(),
1684
- auth0_client: Zt.optional(),
1702
+ auth0_client: tn.optional(),
1685
1703
  log_id: e.string().optional(),
1686
- location_info: Qt.optional()
1704
+ location_info: nn.optional()
1687
1705
  }).extend({ log_id: e.string() });
1688
- var $t = e.enum([
1706
+ var rn = e.enum([
1689
1707
  "http",
1690
1708
  "eventbridge",
1691
1709
  "eventgrid",
1692
1710
  "splunk",
1693
1711
  "datadog",
1694
1712
  "sumo"
1695
- ]), en = e.enum([
1713
+ ]), an = e.enum([
1696
1714
  "active",
1697
1715
  "paused",
1698
1716
  "suspended"
1699
- ]), tn = e.object({
1717
+ ]), on = e.object({
1700
1718
  type: e.string(),
1701
1719
  name: e.string()
1702
1720
  });
1703
1721
  e.object({
1704
1722
  name: e.string(),
1705
- type: $t,
1706
- status: en.optional(),
1723
+ type: rn,
1724
+ status: an.optional(),
1707
1725
  sink: e.record(e.string(), e.unknown()),
1708
- filters: e.array(tn).optional(),
1726
+ filters: e.array(on).optional(),
1709
1727
  isPriority: e.boolean().optional()
1710
1728
  }).extend({
1711
1729
  id: e.string(),
1712
- status: en,
1730
+ status: an,
1713
1731
  created_at: e.string().optional(),
1714
1732
  updated_at: e.string().optional()
1715
1733
  });
1716
- var nn = e.enum([
1734
+ var sn = e.enum([
1717
1735
  "auth0",
1718
1736
  "cognito",
1719
1737
  "okta",
1720
1738
  "oidc"
1721
- ]), rn = e.object({
1739
+ ]), cn = e.object({
1722
1740
  domain: e.string(),
1723
1741
  client_id: e.string(),
1724
1742
  client_secret: e.string(),
1725
1743
  audience: e.string().optional(),
1726
1744
  scope: e.string().optional()
1727
- }), an = e.object({
1745
+ }), ln = e.object({
1728
1746
  id: e.string().optional(),
1729
1747
  name: e.string(),
1730
- provider: nn,
1748
+ provider: sn,
1731
1749
  connection: e.string(),
1732
1750
  enabled: e.boolean().default(!0),
1733
- credentials: rn
1751
+ credentials: cn
1734
1752
  });
1735
1753
  e.object({
1736
1754
  id: e.string(),
1737
1755
  created_at: e.string(),
1738
1756
  updated_at: e.string()
1739
- }).extend(an.shape);
1740
- var on = e.object({
1757
+ }).extend(ln.shape);
1758
+ var un = e.object({
1741
1759
  enabled: e.boolean().optional(),
1742
1760
  shields: e.array(e.string()).optional(),
1743
1761
  admin_notification_frequency: e.array(e.string()).optional(),
@@ -1746,13 +1764,13 @@ var on = e.object({
1746
1764
  "pre-user-registration": e.object({ shields: e.array(e.string()).optional() }).optional(),
1747
1765
  "pre-change-password": e.object({ shields: e.array(e.string()).optional() }).optional()
1748
1766
  }).optional()
1749
- }), sn = e.object({
1767
+ }), dn = e.object({
1750
1768
  enabled: e.boolean().optional(),
1751
1769
  shields: e.array(e.string()).optional(),
1752
1770
  allowlist: e.array(e.string()).optional(),
1753
1771
  mode: e.string().optional(),
1754
1772
  max_attempts: e.number().optional()
1755
- }), cn = e.object({
1773
+ }), fn = e.object({
1756
1774
  enabled: e.boolean().optional(),
1757
1775
  shields: e.array(e.string()).optional(),
1758
1776
  allowlist: e.array(e.string()).optional(),
@@ -1766,10 +1784,10 @@ var on = e.object({
1766
1784
  rate: e.number().optional()
1767
1785
  }).optional()
1768
1786
  }).optional()
1769
- }), ln = e.object({
1770
- breached_password_detection: on.optional(),
1771
- brute_force_protection: sn.optional(),
1772
- suspicious_ip_throttling: cn.optional()
1787
+ }), pn = e.object({
1788
+ breached_password_detection: un.optional(),
1789
+ brute_force_protection: dn.optional(),
1790
+ suspicious_ip_throttling: fn.optional()
1773
1791
  });
1774
1792
  e.object({
1775
1793
  id: e.string().optional(),
@@ -1782,14 +1800,14 @@ e.object({
1782
1800
  created_at: e.string(),
1783
1801
  updated_at: e.string()
1784
1802
  });
1785
- var un = e.object({
1803
+ var mn = e.object({
1786
1804
  initial_user_agent: e.string().describe("First user agent of the device from which this user logged in"),
1787
1805
  initial_ip: e.string().describe("First IP address associated with this session"),
1788
1806
  initial_asn: e.string().describe("First autonomous system number associated with this session"),
1789
1807
  last_user_agent: e.string().describe("Last user agent of the device from which this user logged in"),
1790
1808
  last_ip: e.string().describe("Last IP address from which this user logged in"),
1791
1809
  last_asn: e.string().describe("Last autonomous system number from which this user logged in")
1792
- }), dn = e.object({
1810
+ }), hn = e.object({
1793
1811
  id: e.string(),
1794
1812
  revoked_at: e.string().optional(),
1795
1813
  used_at: e.string().optional(),
@@ -1797,7 +1815,7 @@ var un = e.object({
1797
1815
  expires_at: e.string().optional(),
1798
1816
  login_session_id: e.string(),
1799
1817
  idle_expires_at: e.string().optional(),
1800
- device: un.describe("Metadata related to the device used in the session"),
1818
+ device: mn.describe("Metadata related to the device used in the session"),
1801
1819
  clients: e.array(e.string()).describe("List of client details for the session")
1802
1820
  });
1803
1821
  e.object({
@@ -1805,7 +1823,7 @@ e.object({
1805
1823
  updated_at: e.string(),
1806
1824
  authenticated_at: e.string(),
1807
1825
  last_interaction_at: e.string()
1808
- }).extend(dn.shape), e.object({
1826
+ }).extend(hn.shape), e.object({
1809
1827
  kid: e.string().openapi({ description: "The key id of the signing key" }),
1810
1828
  tenant_id: e.string().optional().openapi({ description: "The tenant the key belongs to. Omitted means the key is shared / control-plane scoped." }),
1811
1829
  cert: e.string().openapi({ description: "The public certificate of the signing key" }),
@@ -1822,7 +1840,7 @@ e.object({
1822
1840
  connection: e.string().optional().openapi({ description: "The connection identifier associated with the key" }),
1823
1841
  type: e.enum(["jwt_signing", "saml_encryption"]).openapi({ description: "The type of the signing key" })
1824
1842
  });
1825
- var fn = e.object({
1843
+ var gn = e.object({
1826
1844
  id: e.string().optional(),
1827
1845
  audience: e.string().optional(),
1828
1846
  friendly_name: e.string(),
@@ -1940,7 +1958,7 @@ var fn = e.object({
1940
1958
  "shared_planetscale"
1941
1959
  ]).optional(),
1942
1960
  d1_database_id: e.string().max(64).optional(),
1943
- attack_protection: ln.optional(),
1961
+ attack_protection: pn.optional(),
1944
1962
  mfa: e.object({
1945
1963
  policy: e.enum(["never", "always"]).default("never").optional(),
1946
1964
  factors: e.object({
@@ -1971,35 +1989,35 @@ var fn = e.object({
1971
1989
  e.object({
1972
1990
  created_at: e.string().nullable().transform((e) => e ?? ""),
1973
1991
  updated_at: e.string().nullable().transform((e) => e ?? "")
1974
- }).extend(fn.shape).extend({
1992
+ }).extend(gn.shape).extend({
1975
1993
  id: e.string(),
1976
1994
  is_control_plane: e.boolean().optional()
1977
1995
  });
1978
- var pn = e.enum([
1996
+ var _n = e.enum([
1979
1997
  "provision",
1980
1998
  "seed",
1981
1999
  "upgrade",
1982
2000
  "backup",
1983
2001
  "deprovision"
1984
- ]), mn = e.enum([
2002
+ ]), vn = e.enum([
1985
2003
  "pending",
1986
2004
  "running",
1987
2005
  "succeeded",
1988
2006
  "failed",
1989
2007
  "cancelled"
1990
- ]), hn = e.enum(["inline", "cloudflare-workflows"]);
2008
+ ]), yn = e.enum(["inline", "cloudflare-workflows"]);
1991
2009
  e.object({
1992
2010
  tenant_id: e.string().max(255).nullable().default(null),
1993
2011
  rollout_id: e.string().max(255).nullable().optional(),
1994
- kind: pn,
1995
- engine: hn,
2012
+ kind: _n,
2013
+ engine: yn,
1996
2014
  engine_instance_id: e.string().max(100).nullable().optional(),
1997
2015
  target_worker_version: e.string().max(255).nullable().optional(),
1998
2016
  target_database_version: e.string().max(255).nullable().optional(),
1999
2017
  initiated_by: e.string().max(255).nullable().optional()
2000
2018
  }).extend({
2001
2019
  id: e.string(),
2002
- status: mn,
2020
+ status: vn,
2003
2021
  current_step: e.string().max(255).nullable().optional(),
2004
2022
  error: e.string().nullable().optional(),
2005
2023
  created_at: e.string(),
@@ -2014,7 +2032,7 @@ e.object({
2014
2032
  error: !0,
2015
2033
  finished_at: !0
2016
2034
  }).partial();
2017
- var gn = e.enum([
2035
+ var bn = e.enum([
2018
2036
  "started",
2019
2037
  "succeeded",
2020
2038
  "failed",
@@ -2025,18 +2043,18 @@ var gn = e.enum([
2025
2043
  e.object({
2026
2044
  operation_id: e.string().max(255),
2027
2045
  step: e.string().max(255),
2028
- outcome: gn,
2046
+ outcome: bn,
2029
2047
  detail: e.record(e.string(), e.unknown()).nullable().optional(),
2030
2048
  attempt: e.number().int().min(1).default(1)
2031
2049
  }).extend({
2032
2050
  id: e.string(),
2033
2051
  created_at: e.string()
2034
2052
  });
2035
- var _n = e.enum([
2053
+ var xn = e.enum([
2036
2054
  "upgrade",
2037
2055
  "reseed",
2038
2056
  "backup"
2039
- ]), vn = e.enum([
2057
+ ]), Sn = e.enum([
2040
2058
  "pending",
2041
2059
  "canary",
2042
2060
  "rolling",
@@ -2045,7 +2063,7 @@ var _n = e.enum([
2045
2063
  "failed"
2046
2064
  ]);
2047
2065
  e.object({
2048
- kind: _n,
2066
+ kind: xn,
2049
2067
  target_worker_version: e.string().max(255).nullable().optional(),
2050
2068
  target_database_version: e.string().max(255).nullable().optional(),
2051
2069
  wave_size: e.number().int().min(1).default(10),
@@ -2054,7 +2072,7 @@ e.object({
2054
2072
  initiated_by: e.string().max(255).nullable().optional()
2055
2073
  }).extend({
2056
2074
  id: e.string(),
2057
- status: vn,
2075
+ status: Sn,
2058
2076
  created_at: e.string(),
2059
2077
  updated_at: e.string(),
2060
2078
  finished_at: e.string().nullable().optional()
@@ -2076,7 +2094,7 @@ e.object({
2076
2094
  code: e.string(),
2077
2095
  state: e.string().optional()
2078
2096
  });
2079
- var yn = e.object({
2097
+ var Cn = e.object({
2080
2098
  button_border_radius: e.number(),
2081
2099
  button_border_weight: e.number(),
2082
2100
  buttons_style: e.enum([
@@ -2094,7 +2112,7 @@ var yn = e.object({
2094
2112
  show_widget_shadow: e.boolean(),
2095
2113
  widget_border_weight: e.number(),
2096
2114
  widget_corner_radius: e.number()
2097
- }), bn = e.object({
2115
+ }), wn = e.object({
2098
2116
  base_focus_color: e.string(),
2099
2117
  base_hover_color: e.string(),
2100
2118
  body_text: e.string(),
@@ -2121,7 +2139,7 @@ var yn = e.object({
2121
2139
  }), A = e.object({
2122
2140
  bold: e.boolean(),
2123
2141
  size: e.number()
2124
- }), xn = e.object({
2142
+ }), Tn = e.object({
2125
2143
  body_text: A,
2126
2144
  buttons_text: A,
2127
2145
  font_url: e.string(),
@@ -2131,7 +2149,7 @@ var yn = e.object({
2131
2149
  reference_text_size: e.number(),
2132
2150
  subtitle: A,
2133
2151
  title: A
2134
- }), Sn = e.object({
2152
+ }), En = e.object({
2135
2153
  background_color: e.string(),
2136
2154
  background_image_url: e.string(),
2137
2155
  page_layout: e.enum([
@@ -2144,7 +2162,7 @@ var yn = e.object({
2144
2162
  "chip",
2145
2163
  "none"
2146
2164
  ]).optional()
2147
- }), Cn = e.object({
2165
+ }), Dn = e.object({
2148
2166
  header_text_alignment: e.enum([
2149
2167
  "center",
2150
2168
  "left",
@@ -2161,12 +2179,12 @@ var yn = e.object({
2161
2179
  social_buttons_layout: e.enum(["bottom", "top"])
2162
2180
  });
2163
2181
  e.object({
2164
- borders: yn,
2165
- colors: bn,
2182
+ borders: Cn,
2183
+ colors: wn,
2166
2184
  displayName: e.string(),
2167
- fonts: xn,
2168
- page_background: Sn,
2169
- widget: Cn
2185
+ fonts: Tn,
2186
+ page_background: En,
2187
+ widget: Dn
2170
2188
  }).extend({ themeId: e.string() }), e.object({
2171
2189
  universal_login_experience: e.enum(["new", "classic"]).default("new"),
2172
2190
  identifier_first: e.boolean().default(!0),
@@ -2174,42 +2192,42 @@ e.object({
2174
2192
  show_last_used_connection: e.boolean().default(!1),
2175
2193
  webauthn_platform_first_factor: e.boolean()
2176
2194
  });
2177
- var wn = e.object({
2195
+ var j = e.object({
2178
2196
  hosts: e.array(e.string()).optional(),
2179
2197
  methods: e.array(e.string()).optional(),
2180
2198
  path: e.string().default("/*"),
2181
2199
  headers: e.record(e.string(), e.string()).optional(),
2182
2200
  query: e.record(e.string(), e.string()).optional()
2183
- }), j = e.object({
2201
+ }), M = e.object({
2184
2202
  type: e.string(),
2185
2203
  options: e.record(e.string(), e.unknown()).default({})
2186
- }), M = e.object({
2204
+ }), N = e.object({
2187
2205
  id: e.string().optional(),
2188
2206
  custom_domain_id: e.string(),
2189
2207
  priority: e.number().int().default(100),
2190
- match: wn,
2191
- handlers: e.array(j).min(1)
2192
- }), Tn = M.extend({
2208
+ match: j,
2209
+ handlers: e.array(M).min(1)
2210
+ }), On = N.extend({
2193
2211
  id: e.string(),
2194
2212
  tenant_id: e.string(),
2195
2213
  created_at: e.string(),
2196
2214
  updated_at: e.string()
2197
- }), En = M.partial().omit({
2215
+ }), kn = N.partial().omit({
2198
2216
  id: !0,
2199
2217
  custom_domain_id: !0
2200
- }), Dn = e.object({
2218
+ }), An = e.object({
2201
2219
  scim: e.string(),
2202
2220
  auth0: e.string()
2203
- }), On = e.object({
2221
+ }), jn = e.object({
2204
2222
  connection_id: e.string(),
2205
2223
  user_id_attribute: e.string().default("externalId"),
2206
- mapping: e.array(Dn).default([])
2224
+ mapping: e.array(An).default([])
2207
2225
  });
2208
2226
  e.object({
2209
2227
  created_at: e.string(),
2210
2228
  updated_at: e.string()
2211
- }).extend(On.shape);
2212
- var kn = e.object({
2229
+ }).extend(jn.shape);
2230
+ var Mn = e.object({
2213
2231
  token_id: e.string(),
2214
2232
  connection_id: e.string(),
2215
2233
  token_hash: e.string(),
@@ -2219,20 +2237,20 @@ var kn = e.object({
2219
2237
  e.object({
2220
2238
  created_at: e.string(),
2221
2239
  last_used_at: e.string().optional()
2222
- }).extend(kn.shape);
2223
- var An = e.object({
2240
+ }).extend(Mn.shape);
2241
+ var Nn = e.object({
2224
2242
  connection_id: e.string(),
2225
2243
  external_id: e.string(),
2226
2244
  user_id: e.string()
2227
2245
  });
2228
- e.object({ created_at: e.string() }).extend(An.shape), e.object({
2246
+ e.object({ created_at: e.string() }).extend(Nn.shape), e.object({
2229
2247
  name: e.string(),
2230
2248
  enabled: e.boolean().optional().default(!0),
2231
2249
  default_from_address: e.string().optional(),
2232
2250
  credentials: e.record(e.string(), e.unknown()),
2233
2251
  settings: e.object({}).optional()
2234
2252
  });
2235
- var jn = e.enum([
2253
+ var Pn = e.enum([
2236
2254
  "verify_email",
2237
2255
  "verify_email_by_code",
2238
2256
  "reset_email",
@@ -2247,7 +2265,7 @@ var jn = e.enum([
2247
2265
  "user_invitation"
2248
2266
  ]);
2249
2267
  e.object({
2250
- template: jn,
2268
+ template: Pn,
2251
2269
  body: e.string(),
2252
2270
  from: e.string(),
2253
2271
  subject: e.string(),
@@ -2264,7 +2282,7 @@ e.object({
2264
2282
  expires_at: e.string().optional(),
2265
2283
  idle_expires_at: e.string().optional(),
2266
2284
  last_exchanged_at: e.string().optional(),
2267
- device: un,
2285
+ device: mn,
2268
2286
  resource_servers: e.array(e.object({
2269
2287
  audience: e.string(),
2270
2288
  scopes: e.string()
@@ -2285,10 +2303,10 @@ e.object({
2285
2303
  name: e.string(),
2286
2304
  options: e.object({})
2287
2305
  });
2288
- var Mn = e.object({
2306
+ var Fn = e.object({
2289
2307
  value: e.string(),
2290
2308
  description: e.string().optional()
2291
- }), Nn = e.object({
2309
+ }), In = e.object({
2292
2310
  token_dialect: e.enum(["access_token", "access_token_authz"]).optional(),
2293
2311
  enforce_policies: e.boolean().optional(),
2294
2312
  allow_skipping_userinfo: e.boolean().optional(),
@@ -2296,11 +2314,11 @@ var Mn = e.object({
2296
2314
  persist_client_authorization: e.boolean().optional(),
2297
2315
  enable_introspection_endpoint: e.boolean().optional(),
2298
2316
  mtls: e.object({ bound_access_tokens: e.boolean().optional() }).optional()
2299
- }), Pn = e.object({
2317
+ }), Ln = e.object({
2300
2318
  id: e.string().optional(),
2301
2319
  name: e.string(),
2302
2320
  identifier: e.string(),
2303
- scopes: e.array(Mn).optional(),
2321
+ scopes: e.array(Fn).optional(),
2304
2322
  signing_alg: e.string().optional(),
2305
2323
  signing_secret: e.string().optional(),
2306
2324
  token_lifetime: e.number().default(86400),
@@ -2308,20 +2326,20 @@ var Mn = e.object({
2308
2326
  skip_consent_for_verifiable_first_party_clients: e.boolean().optional(),
2309
2327
  allow_offline_access: e.boolean().optional(),
2310
2328
  verificationKey: e.string().optional(),
2311
- options: Nn.optional(),
2329
+ options: In.optional(),
2312
2330
  is_system: e.boolean().optional(),
2313
2331
  metadata: e.record(e.string(), e.any()).optional()
2314
2332
  }).extend({
2315
2333
  created_at: e.string().optional(),
2316
2334
  updated_at: e.string().optional()
2317
2335
  });
2318
- e.array(Pn);
2319
- var Fn = e.object({
2336
+ e.array(Ln);
2337
+ var Rn = e.object({
2320
2338
  role_id: e.string(),
2321
2339
  resource_server_identifier: e.string(),
2322
2340
  permission_name: e.string()
2323
2341
  }).extend({ created_at: e.string() });
2324
- e.array(Fn), e.object({
2342
+ e.array(Rn), e.object({
2325
2343
  user_id: e.string().openapi({ description: "The id of the user that granted the consent" }),
2326
2344
  clientID: e.string().openapi({ description: "The id of the client the grant was issued to" }),
2327
2345
  audience: e.string().optional().openapi({ description: "The audience the grant applies to" }),
@@ -2334,7 +2352,7 @@ e.array(Fn), e.object({
2334
2352
  failed_logins: e.array(e.string()).optional(),
2335
2353
  last_password_reset: e.string().optional()
2336
2354
  });
2337
- var In = e.object({
2355
+ var zn = e.object({
2338
2356
  user_id: e.string(),
2339
2357
  resource_server_identifier: e.string(),
2340
2358
  permission_name: e.string(),
@@ -2343,8 +2361,8 @@ var In = e.object({
2343
2361
  tenant_id: e.string(),
2344
2362
  created_at: e.string().optional()
2345
2363
  });
2346
- e.array(In);
2347
- var Ln = e.object({
2364
+ e.array(zn);
2365
+ var Bn = e.object({
2348
2366
  user_id: e.string(),
2349
2367
  resource_server_identifier: e.string(),
2350
2368
  resource_server_name: e.string(),
@@ -2353,8 +2371,8 @@ var Ln = e.object({
2353
2371
  created_at: e.string().optional(),
2354
2372
  organization_id: e.string().optional()
2355
2373
  });
2356
- e.array(Ln);
2357
- var Rn = e.object({
2374
+ e.array(Bn);
2375
+ var Vn = e.object({
2358
2376
  user_id: e.string(),
2359
2377
  role_id: e.string(),
2360
2378
  organization_id: e.string().optional()
@@ -2362,8 +2380,8 @@ var Rn = e.object({
2362
2380
  tenant_id: e.string(),
2363
2381
  created_at: e.string().optional()
2364
2382
  });
2365
- e.array(Rn);
2366
- var zn = e.object({
2383
+ e.array(Vn);
2384
+ var Hn = e.object({
2367
2385
  id: e.string().optional().openapi({ description: "The unique identifier of the role. If not provided, one will be generated." }),
2368
2386
  name: e.string().min(1).max(50).openapi({ description: "The name of the role. Cannot include '<' or '>'" }),
2369
2387
  description: e.string().max(255).optional().openapi({ description: "The description of the role" }),
@@ -2374,19 +2392,19 @@ var zn = e.object({
2374
2392
  created_at: e.string().optional(),
2375
2393
  updated_at: e.string().optional()
2376
2394
  });
2377
- e.array(zn);
2378
- var Bn = e.object({
2395
+ e.array(Hn);
2396
+ var Un = e.object({
2379
2397
  logo_url: e.string().optional().openapi({ description: "URL of the organization's logo" }),
2380
2398
  colors: e.object({
2381
2399
  primary: e.string().optional().openapi({ description: "Primary color in hex format (e.g., #FF0000)" }),
2382
2400
  page_background: e.string().optional().openapi({ description: "Page background color in hex format (e.g., #FFFFFF)" })
2383
2401
  }).optional()
2384
- }).optional(), Vn = e.object({
2402
+ }).optional(), Wn = e.object({
2385
2403
  connection_id: e.string().openapi({ description: "ID of the connection" }),
2386
2404
  assign_membership_on_login: e.boolean().default(!1).openapi({ description: "Whether to assign membership to the organization on login" }),
2387
2405
  show_as_button: e.boolean().default(!0).openapi({ description: "Whether to show this connection as a button in the login screen" }),
2388
2406
  is_signup_enabled: e.boolean().default(!0).openapi({ description: "Whether signup is enabled for this connection" })
2389
- }), Hn = e.object({ client_credentials: e.object({
2407
+ }), Gn = e.object({ client_credentials: e.object({
2390
2408
  enforce: e.boolean().default(!1).openapi({ description: "Whether to enforce token quota limits" }),
2391
2409
  per_day: e.number().min(0).default(0).openapi({ description: "Maximum tokens per day (0 = unlimited)" }),
2392
2410
  per_hour: e.number().min(0).default(0).openapi({ description: "Maximum tokens per hour (0 = unlimited)" })
@@ -2395,15 +2413,15 @@ e.object({
2395
2413
  id: e.string().optional(),
2396
2414
  name: e.string().min(1).regex(/^[a-z0-9_-]+$/, { message: "Organization name must be lowercase and can only contain letters, numbers, hyphens, and underscores" }).openapi({ description: "The name of the organization. Must be lowercase and can only contain letters, numbers, hyphens, and underscores." }),
2397
2415
  display_name: e.string().optional().openapi({ description: "The display name of the organization" }),
2398
- branding: Bn,
2416
+ branding: Un,
2399
2417
  metadata: e.record(e.string(), e.any()).default({}).optional().openapi({ description: "Custom metadata for the organization" }),
2400
- enabled_connections: e.array(Vn).default([]).optional().openapi({ description: "List of enabled connections for the organization" }),
2401
- token_quota: Hn
2418
+ enabled_connections: e.array(Wn).default([]).optional().openapi({ description: "List of enabled connections for the organization" }),
2419
+ token_quota: Gn
2402
2420
  }).extend(n.shape).extend({
2403
2421
  id: e.string(),
2404
2422
  name: e.string().min(1).openapi({ description: "The name of the organization" })
2405
2423
  });
2406
- var Un = e.object({
2424
+ var Kn = e.object({
2407
2425
  connection_id: e.string().openapi({ description: "ID of the tenant-level connection to enable for the org." }),
2408
2426
  assign_membership_on_login: e.boolean().optional().default(!1),
2409
2427
  show_as_button: e.boolean().optional().default(!0),
@@ -2416,7 +2434,7 @@ var Un = e.object({
2416
2434
  created_at: e.string().optional(),
2417
2435
  updated_at: e.string().optional()
2418
2436
  });
2419
- e.array(Un), e.object({
2437
+ e.array(Kn), e.object({
2420
2438
  user_id: e.string().openapi({ description: "ID of the user" }),
2421
2439
  organization_id: e.string().openapi({ description: "ID of the organization" })
2422
2440
  }).extend(n.shape).extend({ id: e.string() }), e.object({
@@ -2555,22 +2573,33 @@ e.array(Un), e.object({
2555
2573
  "passwordless",
2556
2574
  "enterprise"
2557
2575
  ]);
2558
- var Wn = e.object({
2576
+ var qn = e.object({
2577
+ cohort: e.string(),
2578
+ sessions: e.number(),
2579
+ active: e.array(e.number())
2580
+ });
2581
+ e.object({
2582
+ interval: e.literal("week"),
2583
+ from: e.string(),
2584
+ to: e.string(),
2585
+ cohorts: e.array(qn)
2586
+ });
2587
+ var Jn = e.object({
2559
2588
  name: e.string(),
2560
2589
  type: e.string()
2561
- }), Gn = e.object({
2590
+ }), Yn = e.object({
2562
2591
  elapsed: e.number(),
2563
2592
  rows_read: e.number().optional(),
2564
2593
  bytes_read: e.number().optional()
2565
2594
  });
2566
2595
  e.object({
2567
- meta: e.array(Wn),
2596
+ meta: e.array(Jn),
2568
2597
  data: e.array(e.record(e.string(), e.any())),
2569
2598
  rows: e.number(),
2570
2599
  rows_before_limit_at_least: e.number().optional(),
2571
- statistics: Gn.optional()
2600
+ statistics: Yn.optional()
2572
2601
  });
2573
- var Kn = e.enum(/* @__PURE__ */ "login.login-id.login-password.signup.signup-id.signup-password.reset-password.consent.mfa.mfa-push.mfa-otp.mfa-voice.mfa-phone.mfa-webauthn.mfa-email.mfa-recovery-code.status.device-flow.email-verification.email-otp-challenge.organizations.invitation.common.passkeys.captcha.custom-form.login-passwordless.mfa-login-options".split(".")), qn = e.record(e.string(), e.record(e.string(), e.string())).openapi({
2602
+ var Xn = e.enum(/* @__PURE__ */ "login.login-id.login-password.signup.signup-id.signup-password.reset-password.consent.mfa.mfa-push.mfa-otp.mfa-voice.mfa-phone.mfa-webauthn.mfa-email.mfa-recovery-code.status.device-flow.email-verification.email-otp-challenge.organizations.invitation.common.passkeys.captcha.custom-form.login-passwordless.mfa-login-options".split(".")), Zn = e.record(e.string(), e.record(e.string(), e.string())).openapi({
2574
2603
  type: "object",
2575
2604
  additionalProperties: {
2576
2605
  type: "object",
@@ -2578,11 +2607,11 @@ var Kn = e.enum(/* @__PURE__ */ "login.login-id.login-password.signup.signup-id.
2578
2607
  }
2579
2608
  });
2580
2609
  e.object({
2581
- prompt: Kn,
2610
+ prompt: Xn,
2582
2611
  language: e.string(),
2583
- custom_text: qn
2612
+ custom_text: Zn
2584
2613
  });
2585
- var Jn = e.enum([
2614
+ var Qn = e.enum([
2586
2615
  "phone",
2587
2616
  "totp",
2588
2617
  "email",
@@ -2590,9 +2619,9 @@ var Jn = e.enum([
2590
2619
  "webauthn-roaming",
2591
2620
  "webauthn-platform",
2592
2621
  "passkey"
2593
- ]), N = e.object({
2622
+ ]), P = e.object({
2594
2623
  user_id: e.string(),
2595
- type: Jn,
2624
+ type: Qn,
2596
2625
  phone_number: e.string().optional(),
2597
2626
  totp_secret: e.string().optional(),
2598
2627
  credential_id: e.string().optional(),
@@ -2603,7 +2632,7 @@ var Jn = e.enum([
2603
2632
  friendly_name: e.string().optional(),
2604
2633
  confirmed: e.boolean().default(!1)
2605
2634
  });
2606
- function P(t, n) {
2635
+ function F(t, n) {
2607
2636
  t.type === "phone" && !t.phone_number && n.addIssue({
2608
2637
  code: e.ZodIssueCode.custom,
2609
2638
  message: "phone_number is required when type is 'phone'",
@@ -2626,23 +2655,23 @@ function P(t, n) {
2626
2655
  path: ["public_key"]
2627
2656
  }));
2628
2657
  }
2629
- N.superRefine(P), N.extend({
2658
+ P.superRefine(F), P.extend({
2630
2659
  id: e.string(),
2631
2660
  created_at: e.string(),
2632
2661
  updated_at: e.string()
2633
- }).superRefine(P), e.object({
2662
+ }).superRefine(F), e.object({
2634
2663
  id: e.string().optional(),
2635
2664
  created_at: e.string().datetime({ offset: !0 }).optional(),
2636
2665
  updated_at: e.string().datetime({ offset: !0 }).optional()
2637
2666
  });
2638
2667
  //#endregion
2639
2668
  //#region src/data-plane/cache.ts
2640
- var Yn = 1e4;
2641
- function F(e, t, n) {
2669
+ var $n = 1e4;
2670
+ function I(e, t, n) {
2642
2671
  let r = typeof t == "number" ? {
2643
2672
  freshTtlMs: t,
2644
2673
  maxEntries: n
2645
- } : t, i = r.freshTtlMs, a = r.staleTtlMs ?? 0, o = r.staleIfErrorTtlMs ?? 0, s = r.negativeTtlMs ?? i, c = r.maxEntries ?? Yn, l = r.waitUntil, u = /* @__PURE__ */ new Map();
2674
+ } : t, i = r.freshTtlMs, a = r.staleTtlMs ?? 0, o = r.staleIfErrorTtlMs ?? 0, s = r.negativeTtlMs ?? i, c = r.maxEntries ?? $n, l = r.waitUntil, u = /* @__PURE__ */ new Map();
2646
2675
  function d(e) {
2647
2676
  for (let [t, n] of u) n.stale_if_error_until <= e && n.stale_until <= e && !n.refreshing && u.delete(t);
2648
2677
  for (; u.size >= c;) {
@@ -2699,7 +2728,7 @@ function F(e, t, n) {
2699
2728
  }
2700
2729
  //#endregion
2701
2730
  //#region src/data-plane/registry.ts
2702
- var I = class {
2731
+ var L = class {
2703
2732
  definitions = /* @__PURE__ */ new Map();
2704
2733
  bindings;
2705
2734
  constructor(e = {}) {
@@ -2719,38 +2748,38 @@ var I = class {
2719
2748
  return n.build(r.data, { bindings: this.bindings });
2720
2749
  }
2721
2750
  };
2722
- function L(e) {
2751
+ function R(e) {
2723
2752
  return e;
2724
2753
  }
2725
2754
  //#endregion
2726
2755
  //#region src/data-plane/handlers/util.ts
2727
- var R = "__authhero_proxy_request__", z = "__authhero_proxy_tenant_id__", B = "__authhero_proxy_custom_domain_id__", V = "__authhero_proxy_domain__", H = "x-authhero-proxy-mutability-probe";
2728
- function Xn(e, t) {
2729
- e.set(R, t);
2730
- }
2731
- function U(e) {
2732
- return e.get(R) ?? e.req.raw;
2756
+ var z = "__authhero_proxy_request__", B = "__authhero_proxy_tenant_id__", V = "__authhero_proxy_custom_domain_id__", H = "__authhero_proxy_domain__", U = "x-authhero-proxy-mutability-probe";
2757
+ function er(e, t) {
2758
+ e.set(z, t);
2733
2759
  }
2734
- function Zn(e, t) {
2735
- e.set(z, t.tenant_id), e.set(B, t.custom_domain_id), e.set(V, t.domain);
2760
+ function W(e) {
2761
+ return e.get(z) ?? e.req.raw;
2736
2762
  }
2737
- function Qn(e) {
2738
- return e.get(z);
2763
+ function tr(e, t) {
2764
+ e.set(B, t.tenant_id), e.set(V, t.custom_domain_id), e.set(H, t.domain);
2739
2765
  }
2740
- function $n(e) {
2766
+ function nr(e) {
2741
2767
  return e.get(B);
2742
2768
  }
2743
- function er(e) {
2769
+ function rr(e) {
2744
2770
  return e.get(V);
2745
2771
  }
2746
- function W(e, t) {
2747
- let n = U(e), r = new Headers(n.headers);
2748
- t(r), Xn(e, new Request(n, { headers: r }));
2772
+ function ir(e) {
2773
+ return e.get(H);
2774
+ }
2775
+ function ar(e, t) {
2776
+ let n = W(e), r = new Headers(n.headers);
2777
+ t(r), er(e, new Request(n, { headers: r }));
2749
2778
  }
2750
2779
  function G(e) {
2751
2780
  let t = e.res;
2752
2781
  try {
2753
- t.headers.append(H, "1"), t.headers.delete(H);
2782
+ t.headers.append(U, "1"), t.headers.delete(U);
2754
2783
  return;
2755
2784
  } catch {
2756
2785
  e.res = new Response(t.body, {
@@ -2762,7 +2791,7 @@ function G(e) {
2762
2791
  }
2763
2792
  //#endregion
2764
2793
  //#region src/data-plane/handlers/cors.ts
2765
- var tr = e.object({
2794
+ var or = e.object({
2766
2795
  origins: e.array(e.string()).optional(),
2767
2796
  allow_credentials: e.boolean().optional(),
2768
2797
  allow_headers: e.array(e.string()).optional(),
@@ -2770,44 +2799,44 @@ var tr = e.object({
2770
2799
  expose_headers: e.array(e.string()).optional(),
2771
2800
  max_age: e.number().int().optional()
2772
2801
  }).refine((e) => !(e.allow_credentials && e.origins?.includes("*")), { message: "Cannot use wildcard origin (*) with allow_credentials" });
2773
- function nr(e, t) {
2802
+ function sr(e, t) {
2774
2803
  let n = new Headers(), r = e.origins ?? ["*"], i = r.includes("*");
2775
2804
  return i && !e.allow_credentials ? n.set("Access-Control-Allow-Origin", "*") : t && (i || r.includes(t)) && (n.set("Access-Control-Allow-Origin", t), n.append("Vary", "Origin")), e.allow_credentials && n.set("Access-Control-Allow-Credentials", "true"), e.allow_methods?.length && n.set("Access-Control-Allow-Methods", e.allow_methods.join(", ")), e.allow_headers?.length && n.set("Access-Control-Allow-Headers", e.allow_headers.join(", ")), e.expose_headers?.length && n.set("Access-Control-Expose-Headers", e.expose_headers.join(", ")), e.max_age !== void 0 && n.set("Access-Control-Max-Age", String(e.max_age)), n;
2776
2805
  }
2777
- var rr = L({
2806
+ var cr = R({
2778
2807
  type: "cors",
2779
- optionsSchema: tr,
2808
+ optionsSchema: or,
2780
2809
  build(e) {
2781
2810
  return async (t, n) => {
2782
2811
  let r = t.req.header("origin") ?? null;
2783
2812
  if (t.req.method === "OPTIONS" && r !== null && t.req.header("access-control-request-method") !== void 0) {
2784
- let t = nr(e, r);
2813
+ let t = sr(e, r);
2785
2814
  return new Response(null, {
2786
2815
  status: 204,
2787
2816
  headers: t
2788
2817
  });
2789
2818
  }
2790
2819
  await n();
2791
- let i = nr(e, r);
2820
+ let i = sr(e, r);
2792
2821
  G(t), i.forEach((e, n) => {
2793
2822
  n.toLowerCase() === "vary" ? t.res.headers.append(n, e) : t.res.headers.set(n, e);
2794
2823
  });
2795
2824
  };
2796
2825
  }
2797
- }), ir = e.object({
2826
+ }), lr = e.object({
2798
2827
  username: e.string(),
2799
2828
  password: e.string(),
2800
2829
  realm: e.string().optional()
2801
2830
  });
2802
- function ar(e, t) {
2831
+ function ur(e, t) {
2803
2832
  let n = `${e}:${t}`;
2804
2833
  return typeof btoa == "function" ? btoa(n) : Buffer.from(n, "utf-8").toString("base64");
2805
2834
  }
2806
- var or = L({
2835
+ var dr = R({
2807
2836
  type: "basic_auth",
2808
- optionsSchema: ir,
2837
+ optionsSchema: lr,
2809
2838
  build(e) {
2810
- let t = ar(e.username, e.password), n = (e.realm ?? "Restricted").replace(/["\\\r\n]/g, "");
2839
+ let t = ur(e.username, e.password), n = (e.realm ?? "Restricted").replace(/["\\\r\n]/g, "");
2811
2840
  return async (e, r) => {
2812
2841
  let i = e.req.header("authorization");
2813
2842
  if (i) {
@@ -2823,7 +2852,7 @@ var or = L({
2823
2852
  });
2824
2853
  };
2825
2854
  }
2826
- }), sr = L({
2855
+ }), fr = R({
2827
2856
  type: "headers",
2828
2857
  optionsSchema: e.object({
2829
2858
  request: e.record(e.string(), e.string()).optional(),
@@ -2833,12 +2862,12 @@ var or = L({
2833
2862
  }),
2834
2863
  build(e) {
2835
2864
  return async (t, n) => {
2836
- if ((e.request || e.remove_request) && W(t, (t) => {
2865
+ if ((e.request || e.remove_request) && ar(t, (t) => {
2837
2866
  if (e.remove_request?.forEach((e) => t.delete(e)), e.request) for (let [n, r] of Object.entries(e.request)) t.set(n, r);
2838
2867
  }), await n(), (e.response || e.remove_response) && (G(t), e.remove_response?.forEach((e) => t.res.headers.delete(e)), e.response)) for (let [n, r] of Object.entries(e.response)) t.res.headers.set(n, r);
2839
2868
  };
2840
2869
  }
2841
- }), cr = L({
2870
+ }), pr = R({
2842
2871
  type: "cache",
2843
2872
  optionsSchema: e.object({ ttl_seconds: e.number().int().positive() }),
2844
2873
  build(e) {
@@ -2849,7 +2878,7 @@ var or = L({
2849
2878
  }
2850
2879
  };
2851
2880
  }
2852
- }), lr = L({
2881
+ }), mr = R({
2853
2882
  type: "forwarded_headers",
2854
2883
  optionsSchema: e.object({
2855
2884
  client_ip_header: e.string().default("cf-connecting-ip"),
@@ -2859,40 +2888,40 @@ var or = L({
2859
2888
  build(e) {
2860
2889
  return async (t, n) => {
2861
2890
  let r = new URL(t.req.url);
2862
- W(t, (n) => {
2891
+ ar(t, (n) => {
2863
2892
  n.set("x-forwarded-host", r.host), n.set("x-forwarded-proto", r.protocol.replace(":", "")), e.set_x_original_url && n.set("x-original-url", t.req.url);
2864
2893
  let i = n.get(e.client_ip_header), a = (n.get("x-forwarded-for") ?? "").split(",").map((e) => e.trim()).filter(Boolean), o = i ?? a[a.length - 1] ?? "127.0.0.1", s = a.length === 0 || a[a.length - 1] !== o, c = a.length ? s ? `${a.join(", ")}, ${o}` : a.join(", ") : o;
2865
2894
  n.set("x-forwarded-for", c), e.set_x_real_ip && n.set("x-real-ip", o);
2866
2895
  }), await n();
2867
2896
  };
2868
2897
  }
2869
- }), ur = e.object({ upstream_host: e.string().optional() });
2870
- function dr(e) {
2898
+ }), hr = e.object({ upstream_host: e.string().optional() });
2899
+ function gr(e) {
2871
2900
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2872
2901
  }
2873
- function fr(e) {
2902
+ function _r(e) {
2874
2903
  if (typeof e.getSetCookie == "function") return e.getSetCookie();
2875
2904
  let t = [];
2876
2905
  return e.forEach((e, n) => {
2877
2906
  n.toLowerCase() === "set-cookie" && t.push(e);
2878
2907
  }), t;
2879
2908
  }
2880
- var pr = L({
2909
+ var vr = R({
2881
2910
  type: "rewrite_cookies",
2882
- optionsSchema: ur,
2911
+ optionsSchema: hr,
2883
2912
  build(e) {
2884
2913
  return async (t, n) => {
2885
2914
  await n();
2886
2915
  let r = new URL(t.req.url).hostname, i = e.upstream_host ?? t.get("__proxy_upstream_host__");
2887
2916
  if (!i) return;
2888
- let a = fr(t.res.headers);
2917
+ let a = _r(t.res.headers);
2889
2918
  if (a.length === 0) return;
2890
- let o = dr(i), s = RegExp(`(?:^|;\\s*)Domain=\\.?${o}(?=;|$)`, "i");
2919
+ let o = gr(i), s = RegExp(`(?:^|;\\s*)Domain=\\.?${o}(?=;|$)`, "i");
2891
2920
  G(t), t.res.headers.delete("set-cookie");
2892
2921
  for (let e of a) t.res.headers.append("set-cookie", e.replace(s, `Domain=${r}`));
2893
2922
  };
2894
2923
  }
2895
- }), mr = L({
2924
+ }), yr = R({
2896
2925
  type: "rewrite_location",
2897
2926
  optionsSchema: e.object({ upstream_origin: e.string().optional() }),
2898
2927
  build(e) {
@@ -2915,14 +2944,14 @@ var pr = L({
2915
2944
  G(t), t.res.headers.set("location", c);
2916
2945
  };
2917
2946
  }
2918
- }), hr = class extends Error {
2947
+ }), br = class extends Error {
2919
2948
  ms;
2920
2949
  constructor(e, t) {
2921
2950
  super(`${t ?? "Operation"} timed out after ${e}ms`), this.name = "TimeoutError", this.ms = e;
2922
2951
  }
2923
2952
  };
2924
2953
  function K(e) {
2925
- return e instanceof hr ? !0 : e instanceof Error ? e.name === "AbortError" || e.name === "TimeoutError" : !1;
2954
+ return e instanceof br ? !0 : e instanceof Error ? e.name === "AbortError" || e.name === "TimeoutError" : !1;
2926
2955
  }
2927
2956
  function q(e, t) {
2928
2957
  let n = new AbortController(), r = setTimeout(() => n.abort(), e);
@@ -2930,7 +2959,7 @@ function q(e, t) {
2930
2959
  }
2931
2960
  function J(e, t, n) {
2932
2961
  let r, i = new Promise((e, i) => {
2933
- r = setTimeout(() => i(new hr(t, n)), t);
2962
+ r = setTimeout(() => i(new br(t, n)), t);
2934
2963
  });
2935
2964
  return Promise.race([e, i]).finally(() => {
2936
2965
  r && clearTimeout(r);
@@ -2938,7 +2967,7 @@ function J(e, t, n) {
2938
2967
  }
2939
2968
  //#endregion
2940
2969
  //#region src/data-plane/handlers/http.ts
2941
- var gr = new Set([
2970
+ var xr = new Set([
2942
2971
  "connection",
2943
2972
  "keep-alive",
2944
2973
  "proxy-authenticate",
@@ -2947,24 +2976,24 @@ var gr = new Set([
2947
2976
  "trailers",
2948
2977
  "transfer-encoding",
2949
2978
  "upgrade"
2950
- ]), _r = 3e4, vr = e.object({
2979
+ ]), Sr = 3e4, Cr = e.object({
2951
2980
  upstream_url: e.string(),
2952
2981
  preserve_host: e.boolean().default(!1),
2953
2982
  timeout_ms: e.number().int().positive().optional()
2954
2983
  });
2955
- function yr(e, t) {
2984
+ function wr(e, t) {
2956
2985
  return e === "" || e === "/" ? t : `${e.endsWith("/") ? e.slice(0, -1) : e}${t.startsWith("/") ? t : `/${t}`}`;
2957
2986
  }
2958
- function br(e) {
2987
+ function Tr(e) {
2959
2988
  return e !== "GET" && e !== "HEAD";
2960
2989
  }
2961
- function xr(e, t) {
2990
+ function Er(e, t) {
2962
2991
  let n = new URL(t.url), r = new URL(e.upstream_url);
2963
- r.pathname = yr(r.pathname, n.pathname), r.search = n.search;
2992
+ r.pathname = wr(r.pathname, n.pathname), r.search = n.search;
2964
2993
  let i = new Headers(t.headers);
2965
- for (let e of gr) i.delete(e);
2994
+ for (let e of xr) i.delete(e);
2966
2995
  e.preserve_host || i.set("host", r.host), i.has("x-forwarded-host") || i.set("x-forwarded-host", n.host), i.has("x-forwarded-proto") || i.set("x-forwarded-proto", n.protocol.replace(":", ""));
2967
- let a = br(t.method) ? t.body : void 0, o = {
2996
+ let a = Tr(t.method) ? t.body : void 0, o = {
2968
2997
  method: t.method,
2969
2998
  headers: i,
2970
2999
  body: a,
@@ -2975,13 +3004,13 @@ function xr(e, t) {
2975
3004
  init: o
2976
3005
  };
2977
3006
  }
2978
- var Sr = L({
3007
+ var Dr = R({
2979
3008
  type: "http",
2980
- optionsSchema: vr,
3009
+ optionsSchema: Cr,
2981
3010
  build(e) {
2982
- let t = e.timeout_ms ?? _r;
3011
+ let t = e.timeout_ms ?? Sr;
2983
3012
  return async (n) => {
2984
- let { target: r, init: i } = xr(e, U(n));
3013
+ let { target: r, init: i } = Er(e, W(n));
2985
3014
  n.set("__proxy_upstream_host__", r.hostname), n.set("__proxy_upstream_origin__", `${r.protocol}//${r.host}`);
2986
3015
  try {
2987
3016
  return await q(t, (e) => fetch(r.toString(), {
@@ -2993,24 +3022,24 @@ var Sr = L({
2993
3022
  }
2994
3023
  };
2995
3024
  }
2996
- }), Cr = 3e4, wr = e.object({
3025
+ }), Or = 3e4, kr = e.object({
2997
3026
  binding: e.string(),
2998
3027
  upstream_url: e.string().optional(),
2999
3028
  preserve_host: e.boolean().default(!0),
3000
3029
  timeout_ms: e.number().int().positive().optional()
3001
3030
  });
3002
- function Tr(e) {
3031
+ function Ar(e) {
3003
3032
  return typeof e == "object" && !!e && typeof e.fetch == "function";
3004
3033
  }
3005
- var Er = L({
3034
+ var jr = R({
3006
3035
  type: "service_binding",
3007
- optionsSchema: wr,
3036
+ optionsSchema: kr,
3008
3037
  build(e, t) {
3009
3038
  let n = t.bindings[e.binding];
3010
- if (!Tr(n)) throw Error(`Service binding "${e.binding}" is not configured or is not a Fetcher`);
3011
- let r = e.upstream_url ?? `https://${e.binding}.binding.invalid/`, i = e.timeout_ms ?? Cr;
3039
+ if (!Ar(n)) throw Error(`Service binding "${e.binding}" is not configured or is not a Fetcher`);
3040
+ let r = e.upstream_url ?? `https://${e.binding}.binding.invalid/`, i = e.timeout_ms ?? Or;
3012
3041
  return async (t) => {
3013
- let a = U(t), { target: o, init: s } = xr({
3042
+ let a = W(t), { target: o, init: s } = Er({
3014
3043
  upstream_url: r,
3015
3044
  preserve_host: e.preserve_host
3016
3045
  }, a);
@@ -3025,34 +3054,34 @@ var Er = L({
3025
3054
  }
3026
3055
  };
3027
3056
  }
3028
- }), Dr = 3e4, Or = e.object({
3057
+ }), Mr = 3e4, Nr = e.object({
3029
3058
  binding: e.string(),
3030
3059
  script_name: e.string(),
3031
3060
  cpu_ms: e.number().int().positive().optional(),
3032
3061
  subrequests: e.number().int().positive().optional(),
3033
3062
  timeout_ms: e.number().int().positive().optional()
3034
3063
  });
3035
- function kr(e) {
3064
+ function Pr(e) {
3036
3065
  return typeof e == "object" && !!e && typeof e.get == "function";
3037
3066
  }
3038
3067
  var Y = /\{(tenant_id|custom_domain_id|domain|host)\}/g;
3039
- function Ar(e) {
3068
+ function Fr(e) {
3040
3069
  return Y.lastIndex = 0, Y.test(e);
3041
3070
  }
3042
- var jr = L({
3071
+ var Ir = R({
3043
3072
  type: "dispatch_namespace",
3044
- optionsSchema: Or,
3073
+ optionsSchema: Nr,
3045
3074
  build(e, t) {
3046
3075
  let n = t.bindings[e.binding];
3047
- if (!kr(n)) throw Error(`Dispatch namespace binding "${e.binding}" is not configured or does not expose .get()`);
3048
- let r = Ar(e.script_name), i = e.timeout_ms ?? Dr, a = e.cpu_ms || e.subrequests ? { limits: {
3076
+ if (!Pr(n)) throw Error(`Dispatch namespace binding "${e.binding}" is not configured or does not expose .get()`);
3077
+ let r = Fr(e.script_name), i = e.timeout_ms ?? Mr, a = e.cpu_ms || e.subrequests ? { limits: {
3049
3078
  ...e.cpu_ms ? { cpuMs: e.cpu_ms } : {},
3050
3079
  ...e.subrequests ? { subrequests: e.subrequests } : {}
3051
3080
  } } : void 0;
3052
3081
  return async (t) => {
3053
3082
  let o = e.script_name;
3054
3083
  if (r) {
3055
- let n = Qn(t), r = $n(t), i = er(t), a = t.req.header("host") ?? t.req.header("x-forwarded-host") ?? "";
3084
+ let n = nr(t), r = rr(t), i = ir(t), a = t.req.header("host") ?? t.req.header("x-forwarded-host") ?? "";
3056
3085
  if (o = o.replace(Y, (e, t) => {
3057
3086
  switch (t) {
3058
3087
  case "tenant_id": return n ?? "";
@@ -3063,7 +3092,7 @@ var jr = L({
3063
3092
  }
3064
3093
  }), o.includes("{") || o === "") return t.text(`dispatch_namespace: could not resolve script name from template "${e.script_name}"`, 500);
3065
3094
  }
3066
- let s = U(t);
3095
+ let s = W(t);
3067
3096
  try {
3068
3097
  let e = n.get(o, void 0, a);
3069
3098
  return await q(i, async (t) => {
@@ -3075,7 +3104,7 @@ var jr = L({
3075
3104
  }
3076
3105
  };
3077
3106
  }
3078
- }), Mr = L({
3107
+ }), Lr = R({
3079
3108
  type: "redirect",
3080
3109
  optionsSchema: e.object({
3081
3110
  upstream_url: e.string().refine((e) => {
@@ -3104,7 +3133,7 @@ var jr = L({
3104
3133
  });
3105
3134
  };
3106
3135
  }
3107
- }), X = L({
3136
+ }), Rr = R({
3108
3137
  type: "static",
3109
3138
  optionsSchema: e.object({
3110
3139
  status: e.number().int().default(200),
@@ -3124,15 +3153,15 @@ var jr = L({
3124
3153
  });
3125
3154
  //#endregion
3126
3155
  //#region src/data-plane/handlers/index.ts
3127
- function Nr(e) {
3128
- e.add(rr).add(or).add(sr).add(cr).add(lr).add(pr).add(mr).add(Sr).add(Er).add(jr).add(Mr).add(X);
3156
+ function zr(e) {
3157
+ e.add(cr).add(dr).add(fr).add(pr).add(mr).add(vr).add(yr).add(Dr).add(jr).add(Ir).add(Lr).add(Rr);
3129
3158
  }
3130
3159
  //#endregion
3131
3160
  //#region src/data-plane/matcher.ts
3132
- function Pr(e) {
3161
+ function Br(e) {
3133
3162
  return [...e].sort((e, t) => e.priority === t.priority ? e.created_at.localeCompare(t.created_at) : e.priority - t.priority);
3134
3163
  }
3135
- function Fr(e, t) {
3164
+ function Vr(e, t) {
3136
3165
  let n = e.toLowerCase(), r = t.toLowerCase();
3137
3166
  if (n === r) return !0;
3138
3167
  if (n.startsWith("*.")) {
@@ -3141,13 +3170,13 @@ function Fr(e, t) {
3141
3170
  }
3142
3171
  return !1;
3143
3172
  }
3144
- function Ir(e, t) {
3145
- return !e || e.length === 0 ? !0 : e.some((e) => Fr(e, t));
3173
+ function Hr(e, t) {
3174
+ return !e || e.length === 0 ? !0 : e.some((e) => Vr(e, t));
3146
3175
  }
3147
- function Lr(e) {
3176
+ function X(e) {
3148
3177
  let t = (e.headers ? Object.entries(e.headers) : []).map(([e, t]) => [e.toLowerCase(), new RegExp(t)]), n = (e.query ? Object.entries(e.query) : []).map(([e, t]) => [e, new RegExp(t)]), r = e.hosts;
3149
3178
  return async (e, i) => {
3150
- if (r && !Ir(r, e.req.header("host") ?? "")) return new Response("No matching route", { status: 404 });
3179
+ if (r && !Hr(r, e.req.header("host") ?? "")) return new Response("No matching route", { status: 404 });
3151
3180
  for (let [n, r] of t) {
3152
3181
  let t = e.req.header(n);
3153
3182
  if (t === void 0 || !r.test(t)) return new Response("No matching route", { status: 404 });
@@ -3164,7 +3193,7 @@ function Lr(e) {
3164
3193
  }
3165
3194
  //#endregion
3166
3195
  //#region src/data-plane/compile.ts
3167
- var Rr = [
3196
+ var Ur = [
3168
3197
  "GET",
3169
3198
  "POST",
3170
3199
  "PUT",
@@ -3176,34 +3205,34 @@ var Rr = [
3176
3205
  function Z(e, n, r, i) {
3177
3206
  let a = new t();
3178
3207
  r && a.use("*", async (e, t) => {
3179
- Zn(e, r), await t();
3208
+ tr(e, r), await t();
3180
3209
  });
3181
- let o = Pr(e);
3210
+ let o = Br(e);
3182
3211
  for (let e of o) {
3183
3212
  let t = [];
3184
- t.push(Lr(e.match));
3213
+ t.push(X(e.match));
3185
3214
  for (let r of e.handlers) t.push(n.build(r.type, r.options));
3186
- let r = e.match.methods?.length ? e.match.methods.map((e) => e.toUpperCase()) : Rr, i = e.match.path || "/*";
3215
+ let r = e.match.methods?.length ? e.match.methods.map((e) => e.toUpperCase()) : Ur, i = e.match.path || "/*";
3187
3216
  a.on(r, [i], ...t);
3188
3217
  }
3189
- return i && i.length > 0 ? a.on(Rr, ["*"], ...i) : a.all("*", (e) => e.text("No matching route", 404)), a.onError((e, t) => {
3218
+ return i && i.length > 0 ? a.on(Ur, ["*"], ...i) : a.all("*", (e) => e.text("No matching route", 404)), a.onError((e, t) => {
3190
3219
  let n = K(e);
3191
3220
  return t.text(n ? "Upstream timeout" : "Bad gateway", n ? 504 : 502, { "x-authhero-proxy-error": n ? "handler_timeout" : "handler_failed" });
3192
3221
  }), a;
3193
3222
  }
3194
3223
  //#endregion
3195
3224
  //#region src/data-plane/router.ts
3196
- var zr = 1e4;
3197
- function Br(e) {
3198
- return e.resolver ? e.resolver : e.cache ? F(e.data, e.cache) : F(e.data, e.cacheTtlMs ?? 3e4);
3225
+ var Wr = 1e4;
3226
+ function Gr(e) {
3227
+ return e.resolver ? e.resolver : e.cache ? I(e.data, e.cache) : I(e.data, e.cacheTtlMs ?? 3e4);
3199
3228
  }
3200
- function Vr(e) {
3229
+ function Kr(e) {
3201
3230
  if (e.registry) return e.registry;
3202
- let t = new I(e.bindings ?? {});
3203
- return Nr(t), t;
3231
+ let t = new L(e.bindings ?? {});
3232
+ return zr(t), t;
3204
3233
  }
3205
3234
  function Q(e) {
3206
- let t = Br(e), n = Vr(e), r = /* @__PURE__ */ new WeakMap(), i = e.resolveHostTimeoutMs ?? zr, a = e.defaultHandlers && e.defaultHandlers.length > 0 ? e.defaultHandlers.map((e) => n.build(e.type, e.options)) : void 0, o = a ? Z([], n, void 0, a) : void 0;
3235
+ let t = Gr(e), n = Kr(e), r = /* @__PURE__ */ new WeakMap(), i = e.resolveHostTimeoutMs ?? Wr, a = e.defaultHandlers && e.defaultHandlers.length > 0 ? e.defaultHandlers.map((e) => n.build(e.type, e.options)) : void 0, o = a ? Z([], n, void 0, a) : void 0;
3207
3236
  return async (e) => {
3208
3237
  let s = e.req.header("host") ?? e.req.header("x-forwarded-host");
3209
3238
  if (!s) return e.text("Missing host", 400);
@@ -3221,13 +3250,13 @@ function Q(e) {
3221
3250
  }
3222
3251
  };
3223
3252
  }
3224
- function Hr(e) {
3253
+ function qr(e) {
3225
3254
  let n = new t();
3226
3255
  return n.all("*", Q(e)), n;
3227
3256
  }
3228
3257
  //#endregion
3229
3258
  //#region src/app.ts
3230
- function Ur(e) {
3259
+ function Jr(e) {
3231
3260
  let n = new t();
3232
3261
  return n.all("*", Q({
3233
3262
  data: e.data,
@@ -3245,17 +3274,17 @@ function Ur(e) {
3245
3274
  }
3246
3275
  //#endregion
3247
3276
  //#region src/data-plane/cache-api-cache.ts
3248
- var Wr = 1e3, Gr = 1e3;
3249
- function Kr(e, t) {
3277
+ var Yr = 1e3, Xr = 1e3;
3278
+ function Zr(e, t) {
3250
3279
  return new Request(`https://proxy-cache.internal/${encodeURIComponent(e)}/hosts/${encodeURIComponent(t.toLowerCase())}`, { method: "GET" });
3251
3280
  }
3252
- function qr() {
3281
+ function Qr() {
3253
3282
  return globalThis.caches?.default;
3254
3283
  }
3255
- function Jr(e) {
3256
- let t = e.cache ?? qr();
3284
+ function $r(e) {
3285
+ let t = e.cache ?? Qr();
3257
3286
  if (!t) return e.upstream;
3258
- let n = t, r = e.namespace ?? "authhero-proxy", i = e.cacheTtlSeconds ?? 60, a = e.negativeCacheTtlSeconds ?? 10, o = e.waitUntil, s = e.cacheReadTimeoutMs ?? Wr, c = e.cacheWriteTimeoutMs ?? Gr;
3287
+ let n = t, r = e.namespace ?? "authhero-proxy", i = e.cacheTtlSeconds ?? 60, a = e.negativeCacheTtlSeconds ?? 10, o = e.waitUntil, s = e.cacheReadTimeoutMs ?? Yr, c = e.cacheWriteTimeoutMs ?? Xr;
3259
3288
  async function l(e) {
3260
3289
  try {
3261
3290
  return await J(Promise.resolve(n.match(e)), s, "cache.match");
@@ -3264,7 +3293,7 @@ function Jr(e) {
3264
3293
  }
3265
3294
  }
3266
3295
  return { async resolveHost(t) {
3267
- let s = Kr(r, t), u = await l(s);
3296
+ let s = Zr(r, t), u = await l(s);
3268
3297
  if (u) try {
3269
3298
  return (await u.json()).value;
3270
3299
  } catch {}
@@ -3275,14 +3304,14 @@ function Jr(e) {
3275
3304
  return o ? o(m) : await m, d;
3276
3305
  } };
3277
3306
  }
3278
- function Yr(e, t) {
3279
- return Kr(e, t);
3307
+ function ei(e, t) {
3308
+ return Zr(e, t);
3280
3309
  }
3281
3310
  //#endregion
3282
3311
  //#region src/data-plane/cache-adapter-cache.ts
3283
- var Xr = 1e3, Zr = 1e3;
3284
- function Qr(e) {
3285
- let { upstream: t, cache: n, freshTtlMs: r, staleTtlMs: i = 0, staleIfErrorTtlMs: a = 0, negativeTtlMs: o = r, keyPrefix: s = "authhero-proxy-host", waitUntil: c, cacheReadTimeoutMs: l = Xr, cacheWriteTimeoutMs: u = Zr } = e, d = /* @__PURE__ */ new Map();
3312
+ var ti = 1e3, ni = 1e3;
3313
+ function ri(e) {
3314
+ let { upstream: t, cache: n, freshTtlMs: r, staleTtlMs: i = 0, staleIfErrorTtlMs: a = 0, negativeTtlMs: o = r, keyPrefix: s = "authhero-proxy-host", waitUntil: c, cacheReadTimeoutMs: l = ti, cacheWriteTimeoutMs: u = ni } = e, d = /* @__PURE__ */ new Map();
3286
3315
  function f(e) {
3287
3316
  return `${s}:${e.toLowerCase()}`;
3288
3317
  }
@@ -3335,7 +3364,7 @@ function Qr(e) {
3335
3364
  }
3336
3365
  } };
3337
3366
  }
3338
- function $r(e, t) {
3367
+ function ii(e, t) {
3339
3368
  return `${e}:${t.toLowerCase()}`;
3340
3369
  }
3341
3370
  //#endregion
@@ -3343,7 +3372,7 @@ function $r(e, t) {
3343
3372
  function $() {
3344
3373
  throw Error("Static proxy adapter is read-only; configure routes at init time");
3345
3374
  }
3346
- function ei(e, t, n, r, i, a) {
3375
+ function ai(e, t, n, r, i, a) {
3347
3376
  return {
3348
3377
  id: e.id ?? `${n}:${t}`,
3349
3378
  tenant_id: r,
@@ -3358,10 +3387,10 @@ function ei(e, t, n, r, i, a) {
3358
3387
  updated_at: e.updated_at ?? a
3359
3388
  };
3360
3389
  }
3361
- function ti(e) {
3390
+ function oi(e) {
3362
3391
  let t = (/* @__PURE__ */ new Date()).toISOString(), n = e.defaultTenantId ?? "static", r = /* @__PURE__ */ new Map();
3363
3392
  for (let [i, a] of Object.entries(e.hosts)) {
3364
- let e = i.toLowerCase(), o = Array.isArray(a) ? { routes: a } : a, s = o.tenant_id ?? n, c = o.custom_domain_id ?? e, l = o.routes.map((n, r) => ei(n, r, e, s, c, t)).sort((e, t) => e.priority - t.priority);
3393
+ let e = i.toLowerCase(), o = Array.isArray(a) ? { routes: a } : a, s = o.tenant_id ?? n, c = o.custom_domain_id ?? e, l = o.routes.map((n, r) => ai(n, r, e, s, c, t)).sort((e, t) => e.priority - t.priority);
3365
3394
  r.set(e, {
3366
3395
  tenant_id: s,
3367
3396
  custom_domain_id: c,
@@ -3405,7 +3434,7 @@ function ti(e) {
3405
3434
  }
3406
3435
  };
3407
3436
  }
3408
- function ni(e, t = {}) {
3437
+ function si(e, t = {}) {
3409
3438
  return {
3410
3439
  priority: t.priority,
3411
3440
  match: { path: t.path ?? "/*" },
@@ -3420,10 +3449,10 @@ function ni(e, t = {}) {
3420
3449
  }
3421
3450
  //#endregion
3422
3451
  //#region src/constants.ts
3423
- var ri = "proxy:resolve_host";
3452
+ var ci = "proxy:resolve_host";
3424
3453
  //#endregion
3425
3454
  //#region src/http-adapter/index.ts
3426
- function ii() {
3455
+ function li() {
3427
3456
  let e = () => {
3428
3457
  throw Error("HTTP proxy adapter does not expose write access to proxy_routes; mutate via the control-plane management API");
3429
3458
  };
@@ -3445,7 +3474,7 @@ function ii() {
3445
3474
  }
3446
3475
  };
3447
3476
  }
3448
- function ai(e) {
3477
+ function ui(e) {
3449
3478
  let t = e.fetch ?? fetch, n = e.baseUrl.replace(/\/+$/, ""), r = e.resolveHostPath ?? "/api/v2/proxy/control-plane/hosts/", i = e.audience ?? `${n}/api/v2/`, a = e.scope ?? "proxy:resolve_host", o = e.tokenRefreshSkewSeconds ?? 60, s = e.timeoutMs ?? 2500;
3450
3479
  function c(e) {
3451
3480
  let t = new AbortController(), n = setTimeout(() => t.abort(), s);
@@ -3478,7 +3507,7 @@ function ai(e) {
3478
3507
  }), u);
3479
3508
  }
3480
3509
  return {
3481
- proxyRoutes: ii(),
3510
+ proxyRoutes: li(),
3482
3511
  async resolveHost(e) {
3483
3512
  let i = await f(), a = `${n}${r}${encodeURIComponent(e.toLowerCase())}`, o = await c((e) => t(a, {
3484
3513
  headers: { authorization: `Bearer ${i}` },
@@ -3492,7 +3521,7 @@ function ai(e) {
3492
3521
  }
3493
3522
  //#endregion
3494
3523
  //#region src/http-adapter/service-binding-fetch.ts
3495
- function oi(e) {
3524
+ function di(e) {
3496
3525
  return (t, n) => {
3497
3526
  let r = t instanceof Request && n === void 0 ? t : new Request(t, n);
3498
3527
  return e.fetch(r);
@@ -3500,11 +3529,11 @@ function oi(e) {
3500
3529
  }
3501
3530
  //#endregion
3502
3531
  //#region src/kv-adapter/index.ts
3503
- var si = "authhero-proxy-host:";
3504
- function ci(e, t) {
3532
+ var fi = "authhero-proxy-host:";
3533
+ function pi(e, t) {
3505
3534
  return `${e}${t.toLowerCase()}`;
3506
3535
  }
3507
- function li() {
3536
+ function mi() {
3508
3537
  let e = () => {
3509
3538
  throw Error("KV proxy adapter does not expose write access to proxy_routes; mutate via the control-plane management API");
3510
3539
  };
@@ -3526,15 +3555,15 @@ function li() {
3526
3555
  }
3527
3556
  };
3528
3557
  }
3529
- function ui(e) {
3530
- let { kv: t, keyPrefix: n = si, timeoutMs: r } = e;
3558
+ function hi(e) {
3559
+ let { kv: t, keyPrefix: n = fi, timeoutMs: r } = e;
3531
3560
  return {
3532
- proxyRoutes: li(),
3561
+ proxyRoutes: mi(),
3533
3562
  async resolveHost(e) {
3534
- let i = ci(n, e), a = t.get(i, "json");
3563
+ let i = pi(n, e), a = t.get(i, "json");
3535
3564
  return (r && r > 0 ? await J(a, r, "kv.get") : await a) ?? null;
3536
3565
  }
3537
3566
  };
3538
3567
  }
3539
3568
  //#endregion
3540
- export { si as DEFAULT_KV_HOST_KEY_PREFIX, I as HandlerRegistry, ri as PROXY_RESOLVE_HOST_SCOPE, or as basicAuthHandler, $r as buildCacheAdapterKey, Yr as buildCacheApiKey, ci as buildKvHostKey, Lr as buildMatchFilter, cr as cacheHandler, Z as compileHostApp, rr as corsHandler, Qr as createCacheAdapterHostCache, Jr as createCacheApiHostCache, ai as createHttpProxyAdapter, F as createInMemoryHostCache, ui as createKvProxyAdapter, Ur as createProxyApp, Q as createProxyDataPlaneHandler, Hr as createProxyDataPlaneRouter, oi as createServiceBindingFetch, ti as createStaticProxyAdapter, L as defineHandler, jr as dispatchNamespaceHandler, lr as forwardedHeadersHandler, j as handlerConfigSchema, sr as headersHandler, Sr as httpHandler, ni as httpRoute, wn as matchSchema, Ir as matchesAnyHost, Fr as matchesHost, M as proxyRouteInsertSchema, Tn as proxyRouteSchema, En as proxyRouteUpdateSchema, Mr as redirectHandler, Nr as registerBuiltinHandlers, pr as rewriteCookiesHandler, mr as rewriteLocationHandler, Er as serviceBindingHandler, Pr as sortRoutes, X as staticHandler };
3569
+ export { fi as DEFAULT_KV_HOST_KEY_PREFIX, L as HandlerRegistry, ci as PROXY_RESOLVE_HOST_SCOPE, dr as basicAuthHandler, ii as buildCacheAdapterKey, ei as buildCacheApiKey, pi as buildKvHostKey, X as buildMatchFilter, pr as cacheHandler, Z as compileHostApp, cr as corsHandler, ri as createCacheAdapterHostCache, $r as createCacheApiHostCache, ui as createHttpProxyAdapter, I as createInMemoryHostCache, hi as createKvProxyAdapter, Jr as createProxyApp, Q as createProxyDataPlaneHandler, qr as createProxyDataPlaneRouter, di as createServiceBindingFetch, oi as createStaticProxyAdapter, R as defineHandler, Ir as dispatchNamespaceHandler, mr as forwardedHeadersHandler, M as handlerConfigSchema, fr as headersHandler, Dr as httpHandler, si as httpRoute, j as matchSchema, Hr as matchesAnyHost, Vr as matchesHost, N as proxyRouteInsertSchema, On as proxyRouteSchema, kn as proxyRouteUpdateSchema, Lr as redirectHandler, zr as registerBuiltinHandlers, vr as rewriteCookiesHandler, yr as rewriteLocationHandler, jr as serviceBindingHandler, Br as sortRoutes, Rr as staticHandler };