@authhero/proxy 0.10.2 → 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,7 +1023,7 @@ 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(),
@@ -1031,20 +1031,20 @@ var b = e.object({
1031
1031
  last_used: e.boolean().optional(),
1032
1032
  last_used_label: e.string().optional()
1033
1033
  }).optional()
1034
- }), ft = C.extend({
1034
+ }), dt = w.extend({
1035
1035
  type: e.literal("FILE"),
1036
1036
  config: e.object({
1037
1037
  accept: e.string().optional(),
1038
1038
  max_size: e.number().optional(),
1039
1039
  multiple: e.boolean().optional()
1040
1040
  }).optional()
1041
- }), pt = C.extend({
1041
+ }), ft = w.extend({
1042
1042
  type: e.literal("LEGAL"),
1043
1043
  config: e.object({
1044
1044
  text: e.string(),
1045
1045
  html: e.boolean().optional()
1046
1046
  }).optional()
1047
- }), mt = C.extend({
1047
+ }), pt = w.extend({
1048
1048
  type: e.literal("NUMBER"),
1049
1049
  config: e.object({
1050
1050
  placeholder: e.string().optional(),
@@ -1053,7 +1053,7 @@ var b = e.object({
1053
1053
  step: e.number().optional(),
1054
1054
  default_value: e.string().optional()
1055
1055
  }).optional()
1056
- }), ht = C.extend({
1056
+ }), mt = w.extend({
1057
1057
  type: e.literal("PASSWORD"),
1058
1058
  config: e.object({
1059
1059
  placeholder: e.string().optional(),
@@ -1062,13 +1062,13 @@ var b = e.object({
1062
1062
  forgot_password_link: e.string().optional(),
1063
1063
  default_value: e.string().optional()
1064
1064
  }).optional()
1065
- }), gt = C.extend({
1065
+ }), ht = w.extend({
1066
1066
  type: e.literal("PAYMENT"),
1067
1067
  config: e.object({
1068
1068
  provider: e.string().optional(),
1069
1069
  currency: e.string().optional()
1070
1070
  }).optional()
1071
- }), _t = C.extend({
1071
+ }), gt = w.extend({
1072
1072
  type: e.literal("SOCIAL"),
1073
1073
  config: e.object({
1074
1074
  providers: e.array(e.string()).optional(),
@@ -1082,7 +1082,7 @@ var b = e.object({
1082
1082
  last_used_label: e.string().optional()
1083
1083
  })).optional()
1084
1084
  }).optional()
1085
- }), vt = C.extend({
1085
+ }), _t = w.extend({
1086
1086
  type: e.literal("TEL"),
1087
1087
  config: e.object({
1088
1088
  placeholder: e.string().optional(),
@@ -1090,7 +1090,7 @@ var b = e.object({
1090
1090
  default_value: e.string().optional(),
1091
1091
  allow_email: e.boolean().optional()
1092
1092
  }).optional()
1093
- }), yt = C.extend({
1093
+ }), vt = w.extend({
1094
1094
  type: e.literal("TEXT"),
1095
1095
  config: e.object({
1096
1096
  placeholder: e.string().optional(),
@@ -1100,37 +1100,38 @@ var b = e.object({
1100
1100
  last_used: e.boolean().optional(),
1101
1101
  last_used_label: e.string().optional()
1102
1102
  }).optional()
1103
- }), bt = C.extend({
1103
+ }), yt = w.extend({
1104
1104
  type: e.literal("COUNTRY"),
1105
1105
  config: e.object({
1106
1106
  placeholder: e.string().optional(),
1107
1107
  default_value: e.string().optional()
1108
1108
  }).optional()
1109
- }), xt = C.extend({
1109
+ }), bt = w.extend({
1110
1110
  type: e.literal("URL"),
1111
1111
  config: e.object({
1112
1112
  placeholder: e.string().optional(),
1113
1113
  default_value: e.string().optional()
1114
1114
  }).optional()
1115
- }), St = e.discriminatedUnion("type", [
1115
+ }), xt = e.discriminatedUnion("type", [
1116
+ Ke,
1116
1117
  qe,
1117
1118
  Je,
1118
1119
  Ye,
1119
1120
  Xe,
1120
1121
  Ze,
1121
1122
  Qe,
1122
- $e,
1123
- et
1124
- ]), Ct = e.discriminatedUnion("type", [
1123
+ $e
1124
+ ]), St = e.discriminatedUnion("type", [
1125
+ et,
1125
1126
  tt,
1126
- nt,
1127
- rt
1128
- ]), wt = e.discriminatedUnion("type", [
1127
+ nt
1128
+ ]), Ct = e.discriminatedUnion("type", [
1129
+ rt,
1129
1130
  it,
1130
1131
  at,
1131
1132
  ot,
1133
+ yt,
1132
1134
  st,
1133
- bt,
1134
1135
  ct,
1135
1136
  lt,
1136
1137
  ut,
@@ -1142,12 +1143,11 @@ var b = e.object({
1142
1143
  gt,
1143
1144
  _t,
1144
1145
  vt,
1145
- yt,
1146
- xt
1147
- ]), w = e.union([
1146
+ bt
1147
+ ]), T = e.union([
1148
+ xt,
1148
1149
  St,
1149
- Ct,
1150
- wt
1150
+ Ct
1151
1151
  ]);
1152
1152
  new Set([
1153
1153
  "BOOLEAN",
@@ -1174,22 +1174,22 @@ new Set([
1174
1174
  visible: e.boolean().optional().default(!0),
1175
1175
  customizations: e.record(e.string(), e.any()).optional()
1176
1176
  });
1177
- var T = e.object({
1177
+ var E = e.object({
1178
1178
  x: e.number(),
1179
1179
  y: e.number()
1180
- }), Tt = e.object({
1180
+ }), wt = e.object({
1181
1181
  id: e.string(),
1182
1182
  type: e.literal("FLOW"),
1183
- coordinates: T,
1183
+ coordinates: E,
1184
1184
  alias: e.string().min(1).max(150).optional(),
1185
1185
  config: e.object({
1186
1186
  flow_id: e.string().max(30),
1187
1187
  next_node: e.string().optional()
1188
1188
  })
1189
- }), Et = e.object({
1189
+ }), Tt = e.object({
1190
1190
  id: e.string(),
1191
1191
  type: e.literal("ROUTER"),
1192
- coordinates: T,
1192
+ coordinates: E,
1193
1193
  alias: e.string().min(1).max(150),
1194
1194
  config: e.object({
1195
1195
  rules: e.array(e.object({
@@ -1200,20 +1200,20 @@ var T = e.object({
1200
1200
  })),
1201
1201
  fallback: e.string()
1202
1202
  })
1203
- }), Dt = e.object({
1203
+ }), Et = e.object({
1204
1204
  id: e.string(),
1205
1205
  type: e.literal("STEP"),
1206
- coordinates: T,
1206
+ coordinates: E,
1207
1207
  alias: e.string().min(1).max(150).optional(),
1208
1208
  config: e.object({
1209
- components: e.array(w),
1209
+ components: e.array(T),
1210
1210
  next_node: e.string().optional()
1211
1211
  })
1212
- }), Ot = e.discriminatedUnion("type", [
1212
+ }), Dt = e.discriminatedUnion("type", [
1213
+ wt,
1213
1214
  Tt,
1214
- Et,
1215
- Dt
1216
- ]), kt = e.object({
1215
+ Et
1216
+ ]), Ot = e.object({
1217
1217
  name: e.string().openapi({ description: "The name of the form" }),
1218
1218
  messages: e.object({
1219
1219
  errors: e.record(e.string(), e.any()).optional(),
@@ -1224,14 +1224,14 @@ var T = e.object({
1224
1224
  default: e.string().optional()
1225
1225
  }).optional(),
1226
1226
  translations: e.record(e.string(), e.any()).optional(),
1227
- nodes: e.array(Ot).optional(),
1227
+ nodes: e.array(Dt).optional(),
1228
1228
  start: e.object({
1229
1229
  hidden_fields: e.array(e.object({
1230
1230
  key: e.string(),
1231
1231
  value: e.string()
1232
1232
  })).optional(),
1233
1233
  next_node: e.string().optional(),
1234
- coordinates: T.optional()
1234
+ coordinates: E.optional()
1235
1235
  }).optional(),
1236
1236
  ending: e.object({
1237
1237
  redirection: e.object({
@@ -1239,7 +1239,7 @@ var T = e.object({
1239
1239
  target: e.string().optional()
1240
1240
  }).optional(),
1241
1241
  after_submit: e.object({ flow_id: e.string().optional() }).optional(),
1242
- coordinates: T.optional(),
1242
+ coordinates: E.optional(),
1243
1243
  resume_flow: e.boolean().optional()
1244
1244
  }).optional(),
1245
1245
  style: e.object({ css: e.string().optional() }).optional(),
@@ -1248,8 +1248,8 @@ var T = e.object({
1248
1248
  sdk_src: e.string().optional()
1249
1249
  }).optional()
1250
1250
  }).openapi({ description: "Schema for flow-based forms (matches Auth0 Forms structure)" });
1251
- n.extend(kt.shape).extend({ id: e.string() });
1252
- var At = e.object({
1251
+ n.extend(Ot.shape).extend({ id: e.string() });
1252
+ var kt = e.object({
1253
1253
  id: e.number().optional(),
1254
1254
  text: e.string(),
1255
1255
  type: e.enum([
@@ -1258,7 +1258,7 @@ var At = e.object({
1258
1258
  "success",
1259
1259
  "warning"
1260
1260
  ])
1261
- }), jt = e.object({
1261
+ }), At = e.object({
1262
1262
  id: e.string().optional(),
1263
1263
  text: e.string(),
1264
1264
  href: e.string(),
@@ -1270,12 +1270,12 @@ e.object({
1270
1270
  method: e.enum(["POST", "GET"]),
1271
1271
  title: e.string().optional(),
1272
1272
  description: e.string().optional(),
1273
- components: e.array(w),
1274
- messages: e.array(At).optional(),
1275
- links: e.array(jt).optional(),
1273
+ components: e.array(T),
1274
+ messages: e.array(kt).optional(),
1275
+ links: e.array(At).optional(),
1276
1276
  footer: e.string().optional()
1277
1277
  });
1278
- var E = e.enum([
1278
+ var D = e.enum([
1279
1279
  "pre-user-registration",
1280
1280
  "post-user-registration",
1281
1281
  "post-user-login",
@@ -1283,7 +1283,7 @@ var E = e.enum([
1283
1283
  "validate-registration-username",
1284
1284
  "pre-user-deletion",
1285
1285
  "post-user-deletion"
1286
- ]), D = e.enum([
1286
+ ]), jt = e.enum([
1287
1287
  "pre-user-registration",
1288
1288
  "post-user-registration",
1289
1289
  "post-user-login",
@@ -1300,7 +1300,7 @@ var E = e.enum([
1300
1300
  "credentials-exchange",
1301
1301
  "pre-user-registration",
1302
1302
  "post-user-registration"
1303
- ]), Pt = e.enum([
1303
+ ]), Pt = e.enum(["post-user-login"]), Ft = e.enum(["impersonate"]), It = e.enum([
1304
1304
  "ensure-username",
1305
1305
  "set-preferred-username",
1306
1306
  "account-linking"
@@ -1310,59 +1310,73 @@ var E = e.enum([
1310
1310
  priority: e.number().optional(),
1311
1311
  hook_id: e.string().optional(),
1312
1312
  metadata: e.record(e.string(), e.unknown()).optional()
1313
- }, Ft = e.object({
1313
+ }, Lt = e.object({
1314
1314
  ...O,
1315
- trigger_id: E,
1315
+ trigger_id: D,
1316
1316
  url: e.string()
1317
- }), It = e.object({
1317
+ }), Rt = e.object({
1318
1318
  ...O,
1319
- trigger_id: D,
1319
+ trigger_id: jt,
1320
1320
  form_id: e.string()
1321
- }), Lt = e.object({
1321
+ }), zt = e.object({
1322
1322
  ...O,
1323
1323
  trigger_id: Mt,
1324
- template_id: Pt
1325
- }), Rt = e.object({
1324
+ template_id: It
1325
+ }), Bt = e.object({
1326
1326
  ...O,
1327
1327
  trigger_id: Nt,
1328
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()
1329
1334
  });
1330
1335
  e.union([
1331
- Ft,
1332
- It,
1333
1336
  Lt,
1334
- Rt
1337
+ Rt,
1338
+ zt,
1339
+ Bt,
1340
+ Vt
1335
1341
  ]);
1336
- var zt = e.object({
1342
+ var Ht = e.object({
1337
1343
  ...O,
1338
- trigger_id: E
1344
+ trigger_id: D
1339
1345
  }).extend(n.shape).extend({
1340
1346
  hook_id: e.string(),
1341
1347
  url: e.string()
1342
- }), Bt = e.object({
1348
+ }), Ut = e.object({
1343
1349
  ...O,
1344
- trigger_id: D
1350
+ trigger_id: jt
1345
1351
  }).extend(n.shape).extend({
1346
1352
  hook_id: e.string(),
1347
1353
  form_id: e.string()
1348
- }), Vt = e.object({
1354
+ }), Wt = e.object({
1349
1355
  ...O,
1350
1356
  trigger_id: Mt
1351
1357
  }).extend(n.shape).extend({
1352
1358
  hook_id: e.string(),
1353
- template_id: Pt
1354
- }), Ht = e.object({
1359
+ template_id: It
1360
+ }), Gt = e.object({
1355
1361
  ...O,
1356
1362
  trigger_id: Nt
1357
1363
  }).extend(n.shape).extend({
1358
1364
  hook_id: e.string(),
1359
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()
1360
1373
  });
1361
1374
  e.union([
1362
- zt,
1363
- Bt,
1364
- Vt,
1365
- Ht
1375
+ Ht,
1376
+ Ut,
1377
+ Wt,
1378
+ Gt,
1379
+ Kt
1366
1380
  ]), e.object({
1367
1381
  code: e.string().max(1e5),
1368
1382
  secrets: e.record(e.string(), e.string()).optional()
@@ -1370,11 +1384,11 @@ e.union([
1370
1384
  id: e.string(),
1371
1385
  tenant_id: e.string()
1372
1386
  }).extend(n.shape);
1373
- 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({
1374
1388
  id: e.string().optional(),
1375
1389
  organization_id: e.string().max(50),
1376
- inviter: Ut,
1377
- invitee: Wt,
1390
+ inviter: qt,
1391
+ invitee: Jt,
1378
1392
  invitation_url: e.string().url(),
1379
1393
  client_id: e.string(),
1380
1394
  connection_id: e.string().optional(),
@@ -1390,8 +1404,8 @@ e.object({
1390
1404
  created_at: e.string().datetime(),
1391
1405
  expires_at: e.string().datetime(),
1392
1406
  ticket_id: e.string().optional()
1393
- }).extend(Gt.omit({ id: !0 }).shape);
1394
- var Kt = e.object({
1407
+ }).extend(Yt.omit({ id: !0 }).shape);
1408
+ var Xt = e.object({
1395
1409
  alg: e.enum([
1396
1410
  "RS256",
1397
1411
  "RS384",
@@ -1433,7 +1447,7 @@ var Kt = e.object({
1433
1447
  message: `EC JWK is missing required member '${r}'`
1434
1448
  });
1435
1449
  });
1436
- e.object({ keys: e.array(Kt) }), e.object({
1450
+ e.object({ keys: e.array(Xt) }), e.object({
1437
1451
  issuer: e.string(),
1438
1452
  authorization_endpoint: e.string(),
1439
1453
  token_endpoint: e.string(),
@@ -1460,28 +1474,28 @@ e.object({ keys: e.array(Kt) }), e.object({
1460
1474
  backchannel_logout_supported: e.boolean().optional(),
1461
1475
  backchannel_logout_session_supported: e.boolean().optional()
1462
1476
  });
1463
- var qt = /* @__PURE__ */ function(e) {
1477
+ var Zt = /* @__PURE__ */ function(e) {
1464
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;
1465
- }({}), Jt = e.nativeEnum(qt), Yt = e.object({
1479
+ }({}), Qt = e.nativeEnum(Zt), $t = e.object({
1466
1480
  strategy: e.string(),
1467
1481
  strategy_type: e.string()
1468
1482
  });
1469
1483
  e.object({
1470
1484
  csrf_token: e.string(),
1471
1485
  auth0Client: e.string().optional(),
1472
- authParams: Ve,
1486
+ authParams: Be,
1473
1487
  expires_at: e.string(),
1474
1488
  deleted_at: e.string().optional(),
1475
1489
  ip: e.string().optional(),
1476
1490
  useragent: e.string().optional(),
1477
1491
  session_id: e.string().optional(),
1478
1492
  authorization_url: e.string().optional(),
1479
- state: Jt.optional().default("pending"),
1493
+ state: Qt.optional().default("pending"),
1480
1494
  state_data: e.string().optional(),
1481
1495
  failure_reason: e.string().optional(),
1482
1496
  user_id: e.string().optional(),
1483
1497
  auth_connection: e.string().optional(),
1484
- auth_strategy: Yt.optional(),
1498
+ auth_strategy: $t.optional(),
1485
1499
  authenticated_at: e.string().optional()
1486
1500
  }).openapi({ description: "This represents a login sesion" }).extend({
1487
1501
  id: e.string().openapi({ description: "This is is used as the state in the universal login" }),
@@ -1648,17 +1662,17 @@ var k = {
1648
1662
  WARNING_DURING_LOGIN: "w",
1649
1663
  WARNING_SENDING_NOTIFICATION: "wn",
1650
1664
  WARNING_USER_MANAGEMENT: "wum"
1651
- }, 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" });
1652
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, (() => {
1653
1667
  let e = {};
1654
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";
1655
1669
  return e;
1656
1670
  })();
1657
- var Zt = e.object({
1671
+ var tn = e.object({
1658
1672
  name: e.string(),
1659
1673
  version: e.string(),
1660
1674
  env: e.object({ node: e.string().optional() }).optional()
1661
- }), Qt = e.object({
1675
+ }), nn = e.object({
1662
1676
  country_code: e.string().length(2),
1663
1677
  city_name: e.string(),
1664
1678
  latitude: e.string(),
@@ -1667,7 +1681,7 @@ var Zt = e.object({
1667
1681
  continent_code: e.string()
1668
1682
  });
1669
1683
  e.object({
1670
- type: Xt,
1684
+ type: en,
1671
1685
  date: e.string(),
1672
1686
  description: e.string().optional(),
1673
1687
  ip: e.string().optional(),
@@ -1685,63 +1699,63 @@ e.object({
1685
1699
  strategy: e.string().optional(),
1686
1700
  strategy_type: e.string().optional(),
1687
1701
  hostname: e.string().optional(),
1688
- auth0_client: Zt.optional(),
1702
+ auth0_client: tn.optional(),
1689
1703
  log_id: e.string().optional(),
1690
- location_info: Qt.optional()
1704
+ location_info: nn.optional()
1691
1705
  }).extend({ log_id: e.string() });
1692
- var $t = e.enum([
1706
+ var rn = e.enum([
1693
1707
  "http",
1694
1708
  "eventbridge",
1695
1709
  "eventgrid",
1696
1710
  "splunk",
1697
1711
  "datadog",
1698
1712
  "sumo"
1699
- ]), en = e.enum([
1713
+ ]), an = e.enum([
1700
1714
  "active",
1701
1715
  "paused",
1702
1716
  "suspended"
1703
- ]), tn = e.object({
1717
+ ]), on = e.object({
1704
1718
  type: e.string(),
1705
1719
  name: e.string()
1706
1720
  });
1707
1721
  e.object({
1708
1722
  name: e.string(),
1709
- type: $t,
1710
- status: en.optional(),
1723
+ type: rn,
1724
+ status: an.optional(),
1711
1725
  sink: e.record(e.string(), e.unknown()),
1712
- filters: e.array(tn).optional(),
1726
+ filters: e.array(on).optional(),
1713
1727
  isPriority: e.boolean().optional()
1714
1728
  }).extend({
1715
1729
  id: e.string(),
1716
- status: en,
1730
+ status: an,
1717
1731
  created_at: e.string().optional(),
1718
1732
  updated_at: e.string().optional()
1719
1733
  });
1720
- var nn = e.enum([
1734
+ var sn = e.enum([
1721
1735
  "auth0",
1722
1736
  "cognito",
1723
1737
  "okta",
1724
1738
  "oidc"
1725
- ]), rn = e.object({
1739
+ ]), cn = e.object({
1726
1740
  domain: e.string(),
1727
1741
  client_id: e.string(),
1728
1742
  client_secret: e.string(),
1729
1743
  audience: e.string().optional(),
1730
1744
  scope: e.string().optional()
1731
- }), an = e.object({
1745
+ }), ln = e.object({
1732
1746
  id: e.string().optional(),
1733
1747
  name: e.string(),
1734
- provider: nn,
1748
+ provider: sn,
1735
1749
  connection: e.string(),
1736
1750
  enabled: e.boolean().default(!0),
1737
- credentials: rn
1751
+ credentials: cn
1738
1752
  });
1739
1753
  e.object({
1740
1754
  id: e.string(),
1741
1755
  created_at: e.string(),
1742
1756
  updated_at: e.string()
1743
- }).extend(an.shape);
1744
- var on = e.object({
1757
+ }).extend(ln.shape);
1758
+ var un = e.object({
1745
1759
  enabled: e.boolean().optional(),
1746
1760
  shields: e.array(e.string()).optional(),
1747
1761
  admin_notification_frequency: e.array(e.string()).optional(),
@@ -1750,13 +1764,13 @@ var on = e.object({
1750
1764
  "pre-user-registration": e.object({ shields: e.array(e.string()).optional() }).optional(),
1751
1765
  "pre-change-password": e.object({ shields: e.array(e.string()).optional() }).optional()
1752
1766
  }).optional()
1753
- }), sn = e.object({
1767
+ }), dn = e.object({
1754
1768
  enabled: e.boolean().optional(),
1755
1769
  shields: e.array(e.string()).optional(),
1756
1770
  allowlist: e.array(e.string()).optional(),
1757
1771
  mode: e.string().optional(),
1758
1772
  max_attempts: e.number().optional()
1759
- }), cn = e.object({
1773
+ }), fn = e.object({
1760
1774
  enabled: e.boolean().optional(),
1761
1775
  shields: e.array(e.string()).optional(),
1762
1776
  allowlist: e.array(e.string()).optional(),
@@ -1770,10 +1784,10 @@ var on = e.object({
1770
1784
  rate: e.number().optional()
1771
1785
  }).optional()
1772
1786
  }).optional()
1773
- }), ln = e.object({
1774
- breached_password_detection: on.optional(),
1775
- brute_force_protection: sn.optional(),
1776
- 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()
1777
1791
  });
1778
1792
  e.object({
1779
1793
  id: e.string().optional(),
@@ -1786,14 +1800,14 @@ e.object({
1786
1800
  created_at: e.string(),
1787
1801
  updated_at: e.string()
1788
1802
  });
1789
- var un = e.object({
1803
+ var mn = e.object({
1790
1804
  initial_user_agent: e.string().describe("First user agent of the device from which this user logged in"),
1791
1805
  initial_ip: e.string().describe("First IP address associated with this session"),
1792
1806
  initial_asn: e.string().describe("First autonomous system number associated with this session"),
1793
1807
  last_user_agent: e.string().describe("Last user agent of the device from which this user logged in"),
1794
1808
  last_ip: e.string().describe("Last IP address from which this user logged in"),
1795
1809
  last_asn: e.string().describe("Last autonomous system number from which this user logged in")
1796
- }), dn = e.object({
1810
+ }), hn = e.object({
1797
1811
  id: e.string(),
1798
1812
  revoked_at: e.string().optional(),
1799
1813
  used_at: e.string().optional(),
@@ -1801,7 +1815,7 @@ var un = e.object({
1801
1815
  expires_at: e.string().optional(),
1802
1816
  login_session_id: e.string(),
1803
1817
  idle_expires_at: e.string().optional(),
1804
- 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"),
1805
1819
  clients: e.array(e.string()).describe("List of client details for the session")
1806
1820
  });
1807
1821
  e.object({
@@ -1809,7 +1823,7 @@ e.object({
1809
1823
  updated_at: e.string(),
1810
1824
  authenticated_at: e.string(),
1811
1825
  last_interaction_at: e.string()
1812
- }).extend(dn.shape), e.object({
1826
+ }).extend(hn.shape), e.object({
1813
1827
  kid: e.string().openapi({ description: "The key id of the signing key" }),
1814
1828
  tenant_id: e.string().optional().openapi({ description: "The tenant the key belongs to. Omitted means the key is shared / control-plane scoped." }),
1815
1829
  cert: e.string().openapi({ description: "The public certificate of the signing key" }),
@@ -1826,7 +1840,7 @@ e.object({
1826
1840
  connection: e.string().optional().openapi({ description: "The connection identifier associated with the key" }),
1827
1841
  type: e.enum(["jwt_signing", "saml_encryption"]).openapi({ description: "The type of the signing key" })
1828
1842
  });
1829
- var fn = e.object({
1843
+ var gn = e.object({
1830
1844
  id: e.string().optional(),
1831
1845
  audience: e.string().optional(),
1832
1846
  friendly_name: e.string(),
@@ -1944,7 +1958,7 @@ var fn = e.object({
1944
1958
  "shared_planetscale"
1945
1959
  ]).optional(),
1946
1960
  d1_database_id: e.string().max(64).optional(),
1947
- attack_protection: ln.optional(),
1961
+ attack_protection: pn.optional(),
1948
1962
  mfa: e.object({
1949
1963
  policy: e.enum(["never", "always"]).default("never").optional(),
1950
1964
  factors: e.object({
@@ -1975,35 +1989,35 @@ var fn = e.object({
1975
1989
  e.object({
1976
1990
  created_at: e.string().nullable().transform((e) => e ?? ""),
1977
1991
  updated_at: e.string().nullable().transform((e) => e ?? "")
1978
- }).extend(fn.shape).extend({
1992
+ }).extend(gn.shape).extend({
1979
1993
  id: e.string(),
1980
1994
  is_control_plane: e.boolean().optional()
1981
1995
  });
1982
- var pn = e.enum([
1996
+ var _n = e.enum([
1983
1997
  "provision",
1984
1998
  "seed",
1985
1999
  "upgrade",
1986
2000
  "backup",
1987
2001
  "deprovision"
1988
- ]), mn = e.enum([
2002
+ ]), vn = e.enum([
1989
2003
  "pending",
1990
2004
  "running",
1991
2005
  "succeeded",
1992
2006
  "failed",
1993
2007
  "cancelled"
1994
- ]), hn = e.enum(["inline", "cloudflare-workflows"]);
2008
+ ]), yn = e.enum(["inline", "cloudflare-workflows"]);
1995
2009
  e.object({
1996
2010
  tenant_id: e.string().max(255).nullable().default(null),
1997
2011
  rollout_id: e.string().max(255).nullable().optional(),
1998
- kind: pn,
1999
- engine: hn,
2012
+ kind: _n,
2013
+ engine: yn,
2000
2014
  engine_instance_id: e.string().max(100).nullable().optional(),
2001
2015
  target_worker_version: e.string().max(255).nullable().optional(),
2002
2016
  target_database_version: e.string().max(255).nullable().optional(),
2003
2017
  initiated_by: e.string().max(255).nullable().optional()
2004
2018
  }).extend({
2005
2019
  id: e.string(),
2006
- status: mn,
2020
+ status: vn,
2007
2021
  current_step: e.string().max(255).nullable().optional(),
2008
2022
  error: e.string().nullable().optional(),
2009
2023
  created_at: e.string(),
@@ -2018,7 +2032,7 @@ e.object({
2018
2032
  error: !0,
2019
2033
  finished_at: !0
2020
2034
  }).partial();
2021
- var gn = e.enum([
2035
+ var bn = e.enum([
2022
2036
  "started",
2023
2037
  "succeeded",
2024
2038
  "failed",
@@ -2029,18 +2043,18 @@ var gn = e.enum([
2029
2043
  e.object({
2030
2044
  operation_id: e.string().max(255),
2031
2045
  step: e.string().max(255),
2032
- outcome: gn,
2046
+ outcome: bn,
2033
2047
  detail: e.record(e.string(), e.unknown()).nullable().optional(),
2034
2048
  attempt: e.number().int().min(1).default(1)
2035
2049
  }).extend({
2036
2050
  id: e.string(),
2037
2051
  created_at: e.string()
2038
2052
  });
2039
- var _n = e.enum([
2053
+ var xn = e.enum([
2040
2054
  "upgrade",
2041
2055
  "reseed",
2042
2056
  "backup"
2043
- ]), vn = e.enum([
2057
+ ]), Sn = e.enum([
2044
2058
  "pending",
2045
2059
  "canary",
2046
2060
  "rolling",
@@ -2049,7 +2063,7 @@ var _n = e.enum([
2049
2063
  "failed"
2050
2064
  ]);
2051
2065
  e.object({
2052
- kind: _n,
2066
+ kind: xn,
2053
2067
  target_worker_version: e.string().max(255).nullable().optional(),
2054
2068
  target_database_version: e.string().max(255).nullable().optional(),
2055
2069
  wave_size: e.number().int().min(1).default(10),
@@ -2058,7 +2072,7 @@ e.object({
2058
2072
  initiated_by: e.string().max(255).nullable().optional()
2059
2073
  }).extend({
2060
2074
  id: e.string(),
2061
- status: vn,
2075
+ status: Sn,
2062
2076
  created_at: e.string(),
2063
2077
  updated_at: e.string(),
2064
2078
  finished_at: e.string().nullable().optional()
@@ -2080,7 +2094,7 @@ e.object({
2080
2094
  code: e.string(),
2081
2095
  state: e.string().optional()
2082
2096
  });
2083
- var yn = e.object({
2097
+ var Cn = e.object({
2084
2098
  button_border_radius: e.number(),
2085
2099
  button_border_weight: e.number(),
2086
2100
  buttons_style: e.enum([
@@ -2098,7 +2112,7 @@ var yn = e.object({
2098
2112
  show_widget_shadow: e.boolean(),
2099
2113
  widget_border_weight: e.number(),
2100
2114
  widget_corner_radius: e.number()
2101
- }), bn = e.object({
2115
+ }), wn = e.object({
2102
2116
  base_focus_color: e.string(),
2103
2117
  base_hover_color: e.string(),
2104
2118
  body_text: e.string(),
@@ -2125,7 +2139,7 @@ var yn = e.object({
2125
2139
  }), A = e.object({
2126
2140
  bold: e.boolean(),
2127
2141
  size: e.number()
2128
- }), xn = e.object({
2142
+ }), Tn = e.object({
2129
2143
  body_text: A,
2130
2144
  buttons_text: A,
2131
2145
  font_url: e.string(),
@@ -2135,7 +2149,7 @@ var yn = e.object({
2135
2149
  reference_text_size: e.number(),
2136
2150
  subtitle: A,
2137
2151
  title: A
2138
- }), Sn = e.object({
2152
+ }), En = e.object({
2139
2153
  background_color: e.string(),
2140
2154
  background_image_url: e.string(),
2141
2155
  page_layout: e.enum([
@@ -2148,7 +2162,7 @@ var yn = e.object({
2148
2162
  "chip",
2149
2163
  "none"
2150
2164
  ]).optional()
2151
- }), Cn = e.object({
2165
+ }), Dn = e.object({
2152
2166
  header_text_alignment: e.enum([
2153
2167
  "center",
2154
2168
  "left",
@@ -2165,12 +2179,12 @@ var yn = e.object({
2165
2179
  social_buttons_layout: e.enum(["bottom", "top"])
2166
2180
  });
2167
2181
  e.object({
2168
- borders: yn,
2169
- colors: bn,
2182
+ borders: Cn,
2183
+ colors: wn,
2170
2184
  displayName: e.string(),
2171
- fonts: xn,
2172
- page_background: Sn,
2173
- widget: Cn
2185
+ fonts: Tn,
2186
+ page_background: En,
2187
+ widget: Dn
2174
2188
  }).extend({ themeId: e.string() }), e.object({
2175
2189
  universal_login_experience: e.enum(["new", "classic"]).default("new"),
2176
2190
  identifier_first: e.boolean().default(!0),
@@ -2178,42 +2192,42 @@ e.object({
2178
2192
  show_last_used_connection: e.boolean().default(!1),
2179
2193
  webauthn_platform_first_factor: e.boolean()
2180
2194
  });
2181
- var wn = e.object({
2195
+ var j = e.object({
2182
2196
  hosts: e.array(e.string()).optional(),
2183
2197
  methods: e.array(e.string()).optional(),
2184
2198
  path: e.string().default("/*"),
2185
2199
  headers: e.record(e.string(), e.string()).optional(),
2186
2200
  query: e.record(e.string(), e.string()).optional()
2187
- }), j = e.object({
2201
+ }), M = e.object({
2188
2202
  type: e.string(),
2189
2203
  options: e.record(e.string(), e.unknown()).default({})
2190
- }), M = e.object({
2204
+ }), N = e.object({
2191
2205
  id: e.string().optional(),
2192
2206
  custom_domain_id: e.string(),
2193
2207
  priority: e.number().int().default(100),
2194
- match: wn,
2195
- handlers: e.array(j).min(1)
2196
- }), Tn = M.extend({
2208
+ match: j,
2209
+ handlers: e.array(M).min(1)
2210
+ }), On = N.extend({
2197
2211
  id: e.string(),
2198
2212
  tenant_id: e.string(),
2199
2213
  created_at: e.string(),
2200
2214
  updated_at: e.string()
2201
- }), En = M.partial().omit({
2215
+ }), kn = N.partial().omit({
2202
2216
  id: !0,
2203
2217
  custom_domain_id: !0
2204
- }), Dn = e.object({
2218
+ }), An = e.object({
2205
2219
  scim: e.string(),
2206
2220
  auth0: e.string()
2207
- }), On = e.object({
2221
+ }), jn = e.object({
2208
2222
  connection_id: e.string(),
2209
2223
  user_id_attribute: e.string().default("externalId"),
2210
- mapping: e.array(Dn).default([])
2224
+ mapping: e.array(An).default([])
2211
2225
  });
2212
2226
  e.object({
2213
2227
  created_at: e.string(),
2214
2228
  updated_at: e.string()
2215
- }).extend(On.shape);
2216
- var kn = e.object({
2229
+ }).extend(jn.shape);
2230
+ var Mn = e.object({
2217
2231
  token_id: e.string(),
2218
2232
  connection_id: e.string(),
2219
2233
  token_hash: e.string(),
@@ -2223,20 +2237,20 @@ var kn = e.object({
2223
2237
  e.object({
2224
2238
  created_at: e.string(),
2225
2239
  last_used_at: e.string().optional()
2226
- }).extend(kn.shape);
2227
- var An = e.object({
2240
+ }).extend(Mn.shape);
2241
+ var Nn = e.object({
2228
2242
  connection_id: e.string(),
2229
2243
  external_id: e.string(),
2230
2244
  user_id: e.string()
2231
2245
  });
2232
- e.object({ created_at: e.string() }).extend(An.shape), e.object({
2246
+ e.object({ created_at: e.string() }).extend(Nn.shape), e.object({
2233
2247
  name: e.string(),
2234
2248
  enabled: e.boolean().optional().default(!0),
2235
2249
  default_from_address: e.string().optional(),
2236
2250
  credentials: e.record(e.string(), e.unknown()),
2237
2251
  settings: e.object({}).optional()
2238
2252
  });
2239
- var jn = e.enum([
2253
+ var Pn = e.enum([
2240
2254
  "verify_email",
2241
2255
  "verify_email_by_code",
2242
2256
  "reset_email",
@@ -2251,7 +2265,7 @@ var jn = e.enum([
2251
2265
  "user_invitation"
2252
2266
  ]);
2253
2267
  e.object({
2254
- template: jn,
2268
+ template: Pn,
2255
2269
  body: e.string(),
2256
2270
  from: e.string(),
2257
2271
  subject: e.string(),
@@ -2268,7 +2282,7 @@ e.object({
2268
2282
  expires_at: e.string().optional(),
2269
2283
  idle_expires_at: e.string().optional(),
2270
2284
  last_exchanged_at: e.string().optional(),
2271
- device: un,
2285
+ device: mn,
2272
2286
  resource_servers: e.array(e.object({
2273
2287
  audience: e.string(),
2274
2288
  scopes: e.string()
@@ -2289,10 +2303,10 @@ e.object({
2289
2303
  name: e.string(),
2290
2304
  options: e.object({})
2291
2305
  });
2292
- var Mn = e.object({
2306
+ var Fn = e.object({
2293
2307
  value: e.string(),
2294
2308
  description: e.string().optional()
2295
- }), Nn = e.object({
2309
+ }), In = e.object({
2296
2310
  token_dialect: e.enum(["access_token", "access_token_authz"]).optional(),
2297
2311
  enforce_policies: e.boolean().optional(),
2298
2312
  allow_skipping_userinfo: e.boolean().optional(),
@@ -2300,11 +2314,11 @@ var Mn = e.object({
2300
2314
  persist_client_authorization: e.boolean().optional(),
2301
2315
  enable_introspection_endpoint: e.boolean().optional(),
2302
2316
  mtls: e.object({ bound_access_tokens: e.boolean().optional() }).optional()
2303
- }), Pn = e.object({
2317
+ }), Ln = e.object({
2304
2318
  id: e.string().optional(),
2305
2319
  name: e.string(),
2306
2320
  identifier: e.string(),
2307
- scopes: e.array(Mn).optional(),
2321
+ scopes: e.array(Fn).optional(),
2308
2322
  signing_alg: e.string().optional(),
2309
2323
  signing_secret: e.string().optional(),
2310
2324
  token_lifetime: e.number().default(86400),
@@ -2312,20 +2326,20 @@ var Mn = e.object({
2312
2326
  skip_consent_for_verifiable_first_party_clients: e.boolean().optional(),
2313
2327
  allow_offline_access: e.boolean().optional(),
2314
2328
  verificationKey: e.string().optional(),
2315
- options: Nn.optional(),
2329
+ options: In.optional(),
2316
2330
  is_system: e.boolean().optional(),
2317
2331
  metadata: e.record(e.string(), e.any()).optional()
2318
2332
  }).extend({
2319
2333
  created_at: e.string().optional(),
2320
2334
  updated_at: e.string().optional()
2321
2335
  });
2322
- e.array(Pn);
2323
- var Fn = e.object({
2336
+ e.array(Ln);
2337
+ var Rn = e.object({
2324
2338
  role_id: e.string(),
2325
2339
  resource_server_identifier: e.string(),
2326
2340
  permission_name: e.string()
2327
2341
  }).extend({ created_at: e.string() });
2328
- e.array(Fn), e.object({
2342
+ e.array(Rn), e.object({
2329
2343
  user_id: e.string().openapi({ description: "The id of the user that granted the consent" }),
2330
2344
  clientID: e.string().openapi({ description: "The id of the client the grant was issued to" }),
2331
2345
  audience: e.string().optional().openapi({ description: "The audience the grant applies to" }),
@@ -2338,7 +2352,7 @@ e.array(Fn), e.object({
2338
2352
  failed_logins: e.array(e.string()).optional(),
2339
2353
  last_password_reset: e.string().optional()
2340
2354
  });
2341
- var In = e.object({
2355
+ var zn = e.object({
2342
2356
  user_id: e.string(),
2343
2357
  resource_server_identifier: e.string(),
2344
2358
  permission_name: e.string(),
@@ -2347,8 +2361,8 @@ var In = e.object({
2347
2361
  tenant_id: e.string(),
2348
2362
  created_at: e.string().optional()
2349
2363
  });
2350
- e.array(In);
2351
- var Ln = e.object({
2364
+ e.array(zn);
2365
+ var Bn = e.object({
2352
2366
  user_id: e.string(),
2353
2367
  resource_server_identifier: e.string(),
2354
2368
  resource_server_name: e.string(),
@@ -2357,8 +2371,8 @@ var Ln = e.object({
2357
2371
  created_at: e.string().optional(),
2358
2372
  organization_id: e.string().optional()
2359
2373
  });
2360
- e.array(Ln);
2361
- var Rn = e.object({
2374
+ e.array(Bn);
2375
+ var Vn = e.object({
2362
2376
  user_id: e.string(),
2363
2377
  role_id: e.string(),
2364
2378
  organization_id: e.string().optional()
@@ -2366,8 +2380,8 @@ var Rn = e.object({
2366
2380
  tenant_id: e.string(),
2367
2381
  created_at: e.string().optional()
2368
2382
  });
2369
- e.array(Rn);
2370
- var zn = e.object({
2383
+ e.array(Vn);
2384
+ var Hn = e.object({
2371
2385
  id: e.string().optional().openapi({ description: "The unique identifier of the role. If not provided, one will be generated." }),
2372
2386
  name: e.string().min(1).max(50).openapi({ description: "The name of the role. Cannot include '<' or '>'" }),
2373
2387
  description: e.string().max(255).optional().openapi({ description: "The description of the role" }),
@@ -2378,19 +2392,19 @@ var zn = e.object({
2378
2392
  created_at: e.string().optional(),
2379
2393
  updated_at: e.string().optional()
2380
2394
  });
2381
- e.array(zn);
2382
- var Bn = e.object({
2395
+ e.array(Hn);
2396
+ var Un = e.object({
2383
2397
  logo_url: e.string().optional().openapi({ description: "URL of the organization's logo" }),
2384
2398
  colors: e.object({
2385
2399
  primary: e.string().optional().openapi({ description: "Primary color in hex format (e.g., #FF0000)" }),
2386
2400
  page_background: e.string().optional().openapi({ description: "Page background color in hex format (e.g., #FFFFFF)" })
2387
2401
  }).optional()
2388
- }).optional(), Vn = e.object({
2402
+ }).optional(), Wn = e.object({
2389
2403
  connection_id: e.string().openapi({ description: "ID of the connection" }),
2390
2404
  assign_membership_on_login: e.boolean().default(!1).openapi({ description: "Whether to assign membership to the organization on login" }),
2391
2405
  show_as_button: e.boolean().default(!0).openapi({ description: "Whether to show this connection as a button in the login screen" }),
2392
2406
  is_signup_enabled: e.boolean().default(!0).openapi({ description: "Whether signup is enabled for this connection" })
2393
- }), Hn = e.object({ client_credentials: e.object({
2407
+ }), Gn = e.object({ client_credentials: e.object({
2394
2408
  enforce: e.boolean().default(!1).openapi({ description: "Whether to enforce token quota limits" }),
2395
2409
  per_day: e.number().min(0).default(0).openapi({ description: "Maximum tokens per day (0 = unlimited)" }),
2396
2410
  per_hour: e.number().min(0).default(0).openapi({ description: "Maximum tokens per hour (0 = unlimited)" })
@@ -2399,15 +2413,15 @@ e.object({
2399
2413
  id: e.string().optional(),
2400
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." }),
2401
2415
  display_name: e.string().optional().openapi({ description: "The display name of the organization" }),
2402
- branding: Bn,
2416
+ branding: Un,
2403
2417
  metadata: e.record(e.string(), e.any()).default({}).optional().openapi({ description: "Custom metadata for the organization" }),
2404
- enabled_connections: e.array(Vn).default([]).optional().openapi({ description: "List of enabled connections for the organization" }),
2405
- token_quota: Hn
2418
+ enabled_connections: e.array(Wn).default([]).optional().openapi({ description: "List of enabled connections for the organization" }),
2419
+ token_quota: Gn
2406
2420
  }).extend(n.shape).extend({
2407
2421
  id: e.string(),
2408
2422
  name: e.string().min(1).openapi({ description: "The name of the organization" })
2409
2423
  });
2410
- var Un = e.object({
2424
+ var Kn = e.object({
2411
2425
  connection_id: e.string().openapi({ description: "ID of the tenant-level connection to enable for the org." }),
2412
2426
  assign_membership_on_login: e.boolean().optional().default(!1),
2413
2427
  show_as_button: e.boolean().optional().default(!0),
@@ -2420,7 +2434,7 @@ var Un = e.object({
2420
2434
  created_at: e.string().optional(),
2421
2435
  updated_at: e.string().optional()
2422
2436
  });
2423
- e.array(Un), e.object({
2437
+ e.array(Kn), e.object({
2424
2438
  user_id: e.string().openapi({ description: "ID of the user" }),
2425
2439
  organization_id: e.string().openapi({ description: "ID of the organization" })
2426
2440
  }).extend(n.shape).extend({ id: e.string() }), e.object({
@@ -2559,22 +2573,33 @@ e.array(Un), e.object({
2559
2573
  "passwordless",
2560
2574
  "enterprise"
2561
2575
  ]);
2562
- 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({
2563
2588
  name: e.string(),
2564
2589
  type: e.string()
2565
- }), Gn = e.object({
2590
+ }), Yn = e.object({
2566
2591
  elapsed: e.number(),
2567
2592
  rows_read: e.number().optional(),
2568
2593
  bytes_read: e.number().optional()
2569
2594
  });
2570
2595
  e.object({
2571
- meta: e.array(Wn),
2596
+ meta: e.array(Jn),
2572
2597
  data: e.array(e.record(e.string(), e.any())),
2573
2598
  rows: e.number(),
2574
2599
  rows_before_limit_at_least: e.number().optional(),
2575
- statistics: Gn.optional()
2600
+ statistics: Yn.optional()
2576
2601
  });
2577
- 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({
2578
2603
  type: "object",
2579
2604
  additionalProperties: {
2580
2605
  type: "object",
@@ -2582,11 +2607,11 @@ var Kn = e.enum(/* @__PURE__ */ "login.login-id.login-password.signup.signup-id.
2582
2607
  }
2583
2608
  });
2584
2609
  e.object({
2585
- prompt: Kn,
2610
+ prompt: Xn,
2586
2611
  language: e.string(),
2587
- custom_text: qn
2612
+ custom_text: Zn
2588
2613
  });
2589
- var Jn = e.enum([
2614
+ var Qn = e.enum([
2590
2615
  "phone",
2591
2616
  "totp",
2592
2617
  "email",
@@ -2594,9 +2619,9 @@ var Jn = e.enum([
2594
2619
  "webauthn-roaming",
2595
2620
  "webauthn-platform",
2596
2621
  "passkey"
2597
- ]), N = e.object({
2622
+ ]), P = e.object({
2598
2623
  user_id: e.string(),
2599
- type: Jn,
2624
+ type: Qn,
2600
2625
  phone_number: e.string().optional(),
2601
2626
  totp_secret: e.string().optional(),
2602
2627
  credential_id: e.string().optional(),
@@ -2607,7 +2632,7 @@ var Jn = e.enum([
2607
2632
  friendly_name: e.string().optional(),
2608
2633
  confirmed: e.boolean().default(!1)
2609
2634
  });
2610
- function P(t, n) {
2635
+ function F(t, n) {
2611
2636
  t.type === "phone" && !t.phone_number && n.addIssue({
2612
2637
  code: e.ZodIssueCode.custom,
2613
2638
  message: "phone_number is required when type is 'phone'",
@@ -2630,23 +2655,23 @@ function P(t, n) {
2630
2655
  path: ["public_key"]
2631
2656
  }));
2632
2657
  }
2633
- N.superRefine(P), N.extend({
2658
+ P.superRefine(F), P.extend({
2634
2659
  id: e.string(),
2635
2660
  created_at: e.string(),
2636
2661
  updated_at: e.string()
2637
- }).superRefine(P), e.object({
2662
+ }).superRefine(F), e.object({
2638
2663
  id: e.string().optional(),
2639
2664
  created_at: e.string().datetime({ offset: !0 }).optional(),
2640
2665
  updated_at: e.string().datetime({ offset: !0 }).optional()
2641
2666
  });
2642
2667
  //#endregion
2643
2668
  //#region src/data-plane/cache.ts
2644
- var Yn = 1e4;
2645
- function F(e, t, n) {
2669
+ var $n = 1e4;
2670
+ function I(e, t, n) {
2646
2671
  let r = typeof t == "number" ? {
2647
2672
  freshTtlMs: t,
2648
2673
  maxEntries: n
2649
- } : 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();
2650
2675
  function d(e) {
2651
2676
  for (let [t, n] of u) n.stale_if_error_until <= e && n.stale_until <= e && !n.refreshing && u.delete(t);
2652
2677
  for (; u.size >= c;) {
@@ -2703,7 +2728,7 @@ function F(e, t, n) {
2703
2728
  }
2704
2729
  //#endregion
2705
2730
  //#region src/data-plane/registry.ts
2706
- var I = class {
2731
+ var L = class {
2707
2732
  definitions = /* @__PURE__ */ new Map();
2708
2733
  bindings;
2709
2734
  constructor(e = {}) {
@@ -2723,38 +2748,38 @@ var I = class {
2723
2748
  return n.build(r.data, { bindings: this.bindings });
2724
2749
  }
2725
2750
  };
2726
- function L(e) {
2751
+ function R(e) {
2727
2752
  return e;
2728
2753
  }
2729
2754
  //#endregion
2730
2755
  //#region src/data-plane/handlers/util.ts
2731
- 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";
2732
- function Xn(e, t) {
2733
- e.set(R, t);
2734
- }
2735
- function U(e) {
2736
- 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);
2737
2759
  }
2738
- function Zn(e, t) {
2739
- 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;
2740
2762
  }
2741
- function Qn(e) {
2742
- 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);
2743
2765
  }
2744
- function $n(e) {
2766
+ function nr(e) {
2745
2767
  return e.get(B);
2746
2768
  }
2747
- function er(e) {
2769
+ function rr(e) {
2748
2770
  return e.get(V);
2749
2771
  }
2750
- function W(e, t) {
2751
- let n = U(e), r = new Headers(n.headers);
2752
- 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 }));
2753
2778
  }
2754
2779
  function G(e) {
2755
2780
  let t = e.res;
2756
2781
  try {
2757
- t.headers.append(H, "1"), t.headers.delete(H);
2782
+ t.headers.append(U, "1"), t.headers.delete(U);
2758
2783
  return;
2759
2784
  } catch {
2760
2785
  e.res = new Response(t.body, {
@@ -2766,7 +2791,7 @@ function G(e) {
2766
2791
  }
2767
2792
  //#endregion
2768
2793
  //#region src/data-plane/handlers/cors.ts
2769
- var tr = e.object({
2794
+ var or = e.object({
2770
2795
  origins: e.array(e.string()).optional(),
2771
2796
  allow_credentials: e.boolean().optional(),
2772
2797
  allow_headers: e.array(e.string()).optional(),
@@ -2774,44 +2799,44 @@ var tr = e.object({
2774
2799
  expose_headers: e.array(e.string()).optional(),
2775
2800
  max_age: e.number().int().optional()
2776
2801
  }).refine((e) => !(e.allow_credentials && e.origins?.includes("*")), { message: "Cannot use wildcard origin (*) with allow_credentials" });
2777
- function nr(e, t) {
2802
+ function sr(e, t) {
2778
2803
  let n = new Headers(), r = e.origins ?? ["*"], i = r.includes("*");
2779
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;
2780
2805
  }
2781
- var rr = L({
2806
+ var cr = R({
2782
2807
  type: "cors",
2783
- optionsSchema: tr,
2808
+ optionsSchema: or,
2784
2809
  build(e) {
2785
2810
  return async (t, n) => {
2786
2811
  let r = t.req.header("origin") ?? null;
2787
2812
  if (t.req.method === "OPTIONS" && r !== null && t.req.header("access-control-request-method") !== void 0) {
2788
- let t = nr(e, r);
2813
+ let t = sr(e, r);
2789
2814
  return new Response(null, {
2790
2815
  status: 204,
2791
2816
  headers: t
2792
2817
  });
2793
2818
  }
2794
2819
  await n();
2795
- let i = nr(e, r);
2820
+ let i = sr(e, r);
2796
2821
  G(t), i.forEach((e, n) => {
2797
2822
  n.toLowerCase() === "vary" ? t.res.headers.append(n, e) : t.res.headers.set(n, e);
2798
2823
  });
2799
2824
  };
2800
2825
  }
2801
- }), ir = e.object({
2826
+ }), lr = e.object({
2802
2827
  username: e.string(),
2803
2828
  password: e.string(),
2804
2829
  realm: e.string().optional()
2805
2830
  });
2806
- function ar(e, t) {
2831
+ function ur(e, t) {
2807
2832
  let n = `${e}:${t}`;
2808
2833
  return typeof btoa == "function" ? btoa(n) : Buffer.from(n, "utf-8").toString("base64");
2809
2834
  }
2810
- var or = L({
2835
+ var dr = R({
2811
2836
  type: "basic_auth",
2812
- optionsSchema: ir,
2837
+ optionsSchema: lr,
2813
2838
  build(e) {
2814
- 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, "");
2815
2840
  return async (e, r) => {
2816
2841
  let i = e.req.header("authorization");
2817
2842
  if (i) {
@@ -2827,7 +2852,7 @@ var or = L({
2827
2852
  });
2828
2853
  };
2829
2854
  }
2830
- }), sr = L({
2855
+ }), fr = R({
2831
2856
  type: "headers",
2832
2857
  optionsSchema: e.object({
2833
2858
  request: e.record(e.string(), e.string()).optional(),
@@ -2837,12 +2862,12 @@ var or = L({
2837
2862
  }),
2838
2863
  build(e) {
2839
2864
  return async (t, n) => {
2840
- if ((e.request || e.remove_request) && W(t, (t) => {
2865
+ if ((e.request || e.remove_request) && ar(t, (t) => {
2841
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);
2842
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);
2843
2868
  };
2844
2869
  }
2845
- }), cr = L({
2870
+ }), pr = R({
2846
2871
  type: "cache",
2847
2872
  optionsSchema: e.object({ ttl_seconds: e.number().int().positive() }),
2848
2873
  build(e) {
@@ -2853,7 +2878,7 @@ var or = L({
2853
2878
  }
2854
2879
  };
2855
2880
  }
2856
- }), lr = L({
2881
+ }), mr = R({
2857
2882
  type: "forwarded_headers",
2858
2883
  optionsSchema: e.object({
2859
2884
  client_ip_header: e.string().default("cf-connecting-ip"),
@@ -2863,40 +2888,40 @@ var or = L({
2863
2888
  build(e) {
2864
2889
  return async (t, n) => {
2865
2890
  let r = new URL(t.req.url);
2866
- W(t, (n) => {
2891
+ ar(t, (n) => {
2867
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);
2868
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;
2869
2894
  n.set("x-forwarded-for", c), e.set_x_real_ip && n.set("x-real-ip", o);
2870
2895
  }), await n();
2871
2896
  };
2872
2897
  }
2873
- }), ur = e.object({ upstream_host: e.string().optional() });
2874
- function dr(e) {
2898
+ }), hr = e.object({ upstream_host: e.string().optional() });
2899
+ function gr(e) {
2875
2900
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
2876
2901
  }
2877
- function fr(e) {
2902
+ function _r(e) {
2878
2903
  if (typeof e.getSetCookie == "function") return e.getSetCookie();
2879
2904
  let t = [];
2880
2905
  return e.forEach((e, n) => {
2881
2906
  n.toLowerCase() === "set-cookie" && t.push(e);
2882
2907
  }), t;
2883
2908
  }
2884
- var pr = L({
2909
+ var vr = R({
2885
2910
  type: "rewrite_cookies",
2886
- optionsSchema: ur,
2911
+ optionsSchema: hr,
2887
2912
  build(e) {
2888
2913
  return async (t, n) => {
2889
2914
  await n();
2890
2915
  let r = new URL(t.req.url).hostname, i = e.upstream_host ?? t.get("__proxy_upstream_host__");
2891
2916
  if (!i) return;
2892
- let a = fr(t.res.headers);
2917
+ let a = _r(t.res.headers);
2893
2918
  if (a.length === 0) return;
2894
- let o = dr(i), s = RegExp(`(?:^|;\\s*)Domain=\\.?${o}(?=;|$)`, "i");
2919
+ let o = gr(i), s = RegExp(`(?:^|;\\s*)Domain=\\.?${o}(?=;|$)`, "i");
2895
2920
  G(t), t.res.headers.delete("set-cookie");
2896
2921
  for (let e of a) t.res.headers.append("set-cookie", e.replace(s, `Domain=${r}`));
2897
2922
  };
2898
2923
  }
2899
- }), mr = L({
2924
+ }), yr = R({
2900
2925
  type: "rewrite_location",
2901
2926
  optionsSchema: e.object({ upstream_origin: e.string().optional() }),
2902
2927
  build(e) {
@@ -2919,14 +2944,14 @@ var pr = L({
2919
2944
  G(t), t.res.headers.set("location", c);
2920
2945
  };
2921
2946
  }
2922
- }), hr = class extends Error {
2947
+ }), br = class extends Error {
2923
2948
  ms;
2924
2949
  constructor(e, t) {
2925
2950
  super(`${t ?? "Operation"} timed out after ${e}ms`), this.name = "TimeoutError", this.ms = e;
2926
2951
  }
2927
2952
  };
2928
2953
  function K(e) {
2929
- 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;
2930
2955
  }
2931
2956
  function q(e, t) {
2932
2957
  let n = new AbortController(), r = setTimeout(() => n.abort(), e);
@@ -2934,7 +2959,7 @@ function q(e, t) {
2934
2959
  }
2935
2960
  function J(e, t, n) {
2936
2961
  let r, i = new Promise((e, i) => {
2937
- r = setTimeout(() => i(new hr(t, n)), t);
2962
+ r = setTimeout(() => i(new br(t, n)), t);
2938
2963
  });
2939
2964
  return Promise.race([e, i]).finally(() => {
2940
2965
  r && clearTimeout(r);
@@ -2942,7 +2967,7 @@ function J(e, t, n) {
2942
2967
  }
2943
2968
  //#endregion
2944
2969
  //#region src/data-plane/handlers/http.ts
2945
- var gr = new Set([
2970
+ var xr = new Set([
2946
2971
  "connection",
2947
2972
  "keep-alive",
2948
2973
  "proxy-authenticate",
@@ -2951,24 +2976,24 @@ var gr = new Set([
2951
2976
  "trailers",
2952
2977
  "transfer-encoding",
2953
2978
  "upgrade"
2954
- ]), _r = 3e4, vr = e.object({
2979
+ ]), Sr = 3e4, Cr = e.object({
2955
2980
  upstream_url: e.string(),
2956
2981
  preserve_host: e.boolean().default(!1),
2957
2982
  timeout_ms: e.number().int().positive().optional()
2958
2983
  });
2959
- function yr(e, t) {
2984
+ function wr(e, t) {
2960
2985
  return e === "" || e === "/" ? t : `${e.endsWith("/") ? e.slice(0, -1) : e}${t.startsWith("/") ? t : `/${t}`}`;
2961
2986
  }
2962
- function br(e) {
2987
+ function Tr(e) {
2963
2988
  return e !== "GET" && e !== "HEAD";
2964
2989
  }
2965
- function xr(e, t) {
2990
+ function Er(e, t) {
2966
2991
  let n = new URL(t.url), r = new URL(e.upstream_url);
2967
- r.pathname = yr(r.pathname, n.pathname), r.search = n.search;
2992
+ r.pathname = wr(r.pathname, n.pathname), r.search = n.search;
2968
2993
  let i = new Headers(t.headers);
2969
- for (let e of gr) i.delete(e);
2994
+ for (let e of xr) i.delete(e);
2970
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(":", ""));
2971
- let a = br(t.method) ? t.body : void 0, o = {
2996
+ let a = Tr(t.method) ? t.body : void 0, o = {
2972
2997
  method: t.method,
2973
2998
  headers: i,
2974
2999
  body: a,
@@ -2979,13 +3004,13 @@ function xr(e, t) {
2979
3004
  init: o
2980
3005
  };
2981
3006
  }
2982
- var Sr = L({
3007
+ var Dr = R({
2983
3008
  type: "http",
2984
- optionsSchema: vr,
3009
+ optionsSchema: Cr,
2985
3010
  build(e) {
2986
- let t = e.timeout_ms ?? _r;
3011
+ let t = e.timeout_ms ?? Sr;
2987
3012
  return async (n) => {
2988
- let { target: r, init: i } = xr(e, U(n));
3013
+ let { target: r, init: i } = Er(e, W(n));
2989
3014
  n.set("__proxy_upstream_host__", r.hostname), n.set("__proxy_upstream_origin__", `${r.protocol}//${r.host}`);
2990
3015
  try {
2991
3016
  return await q(t, (e) => fetch(r.toString(), {
@@ -2997,24 +3022,24 @@ var Sr = L({
2997
3022
  }
2998
3023
  };
2999
3024
  }
3000
- }), Cr = 3e4, wr = e.object({
3025
+ }), Or = 3e4, kr = e.object({
3001
3026
  binding: e.string(),
3002
3027
  upstream_url: e.string().optional(),
3003
3028
  preserve_host: e.boolean().default(!0),
3004
3029
  timeout_ms: e.number().int().positive().optional()
3005
3030
  });
3006
- function Tr(e) {
3031
+ function Ar(e) {
3007
3032
  return typeof e == "object" && !!e && typeof e.fetch == "function";
3008
3033
  }
3009
- var Er = L({
3034
+ var jr = R({
3010
3035
  type: "service_binding",
3011
- optionsSchema: wr,
3036
+ optionsSchema: kr,
3012
3037
  build(e, t) {
3013
3038
  let n = t.bindings[e.binding];
3014
- if (!Tr(n)) throw Error(`Service binding "${e.binding}" is not configured or is not a Fetcher`);
3015
- 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;
3016
3041
  return async (t) => {
3017
- let a = U(t), { target: o, init: s } = xr({
3042
+ let a = W(t), { target: o, init: s } = Er({
3018
3043
  upstream_url: r,
3019
3044
  preserve_host: e.preserve_host
3020
3045
  }, a);
@@ -3029,34 +3054,34 @@ var Er = L({
3029
3054
  }
3030
3055
  };
3031
3056
  }
3032
- }), Dr = 3e4, Or = e.object({
3057
+ }), Mr = 3e4, Nr = e.object({
3033
3058
  binding: e.string(),
3034
3059
  script_name: e.string(),
3035
3060
  cpu_ms: e.number().int().positive().optional(),
3036
3061
  subrequests: e.number().int().positive().optional(),
3037
3062
  timeout_ms: e.number().int().positive().optional()
3038
3063
  });
3039
- function kr(e) {
3064
+ function Pr(e) {
3040
3065
  return typeof e == "object" && !!e && typeof e.get == "function";
3041
3066
  }
3042
3067
  var Y = /\{(tenant_id|custom_domain_id|domain|host)\}/g;
3043
- function Ar(e) {
3068
+ function Fr(e) {
3044
3069
  return Y.lastIndex = 0, Y.test(e);
3045
3070
  }
3046
- var jr = L({
3071
+ var Ir = R({
3047
3072
  type: "dispatch_namespace",
3048
- optionsSchema: Or,
3073
+ optionsSchema: Nr,
3049
3074
  build(e, t) {
3050
3075
  let n = t.bindings[e.binding];
3051
- if (!kr(n)) throw Error(`Dispatch namespace binding "${e.binding}" is not configured or does not expose .get()`);
3052
- 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: {
3053
3078
  ...e.cpu_ms ? { cpuMs: e.cpu_ms } : {},
3054
3079
  ...e.subrequests ? { subrequests: e.subrequests } : {}
3055
3080
  } } : void 0;
3056
3081
  return async (t) => {
3057
3082
  let o = e.script_name;
3058
3083
  if (r) {
3059
- 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") ?? "";
3060
3085
  if (o = o.replace(Y, (e, t) => {
3061
3086
  switch (t) {
3062
3087
  case "tenant_id": return n ?? "";
@@ -3067,7 +3092,7 @@ var jr = L({
3067
3092
  }
3068
3093
  }), o.includes("{") || o === "") return t.text(`dispatch_namespace: could not resolve script name from template "${e.script_name}"`, 500);
3069
3094
  }
3070
- let s = U(t);
3095
+ let s = W(t);
3071
3096
  try {
3072
3097
  let e = n.get(o, void 0, a);
3073
3098
  return await q(i, async (t) => {
@@ -3079,7 +3104,7 @@ var jr = L({
3079
3104
  }
3080
3105
  };
3081
3106
  }
3082
- }), Mr = L({
3107
+ }), Lr = R({
3083
3108
  type: "redirect",
3084
3109
  optionsSchema: e.object({
3085
3110
  upstream_url: e.string().refine((e) => {
@@ -3108,7 +3133,7 @@ var jr = L({
3108
3133
  });
3109
3134
  };
3110
3135
  }
3111
- }), X = L({
3136
+ }), Rr = R({
3112
3137
  type: "static",
3113
3138
  optionsSchema: e.object({
3114
3139
  status: e.number().int().default(200),
@@ -3128,15 +3153,15 @@ var jr = L({
3128
3153
  });
3129
3154
  //#endregion
3130
3155
  //#region src/data-plane/handlers/index.ts
3131
- function Nr(e) {
3132
- 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);
3133
3158
  }
3134
3159
  //#endregion
3135
3160
  //#region src/data-plane/matcher.ts
3136
- function Pr(e) {
3161
+ function Br(e) {
3137
3162
  return [...e].sort((e, t) => e.priority === t.priority ? e.created_at.localeCompare(t.created_at) : e.priority - t.priority);
3138
3163
  }
3139
- function Fr(e, t) {
3164
+ function Vr(e, t) {
3140
3165
  let n = e.toLowerCase(), r = t.toLowerCase();
3141
3166
  if (n === r) return !0;
3142
3167
  if (n.startsWith("*.")) {
@@ -3145,13 +3170,13 @@ function Fr(e, t) {
3145
3170
  }
3146
3171
  return !1;
3147
3172
  }
3148
- function Ir(e, t) {
3149
- 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));
3150
3175
  }
3151
- function Lr(e) {
3176
+ function X(e) {
3152
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;
3153
3178
  return async (e, i) => {
3154
- 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 });
3155
3180
  for (let [n, r] of t) {
3156
3181
  let t = e.req.header(n);
3157
3182
  if (t === void 0 || !r.test(t)) return new Response("No matching route", { status: 404 });
@@ -3168,7 +3193,7 @@ function Lr(e) {
3168
3193
  }
3169
3194
  //#endregion
3170
3195
  //#region src/data-plane/compile.ts
3171
- var Rr = [
3196
+ var Ur = [
3172
3197
  "GET",
3173
3198
  "POST",
3174
3199
  "PUT",
@@ -3180,34 +3205,34 @@ var Rr = [
3180
3205
  function Z(e, n, r, i) {
3181
3206
  let a = new t();
3182
3207
  r && a.use("*", async (e, t) => {
3183
- Zn(e, r), await t();
3208
+ tr(e, r), await t();
3184
3209
  });
3185
- let o = Pr(e);
3210
+ let o = Br(e);
3186
3211
  for (let e of o) {
3187
3212
  let t = [];
3188
- t.push(Lr(e.match));
3213
+ t.push(X(e.match));
3189
3214
  for (let r of e.handlers) t.push(n.build(r.type, r.options));
3190
- 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 || "/*";
3191
3216
  a.on(r, [i], ...t);
3192
3217
  }
3193
- 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) => {
3194
3219
  let n = K(e);
3195
3220
  return t.text(n ? "Upstream timeout" : "Bad gateway", n ? 504 : 502, { "x-authhero-proxy-error": n ? "handler_timeout" : "handler_failed" });
3196
3221
  }), a;
3197
3222
  }
3198
3223
  //#endregion
3199
3224
  //#region src/data-plane/router.ts
3200
- var zr = 1e4;
3201
- function Br(e) {
3202
- 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);
3203
3228
  }
3204
- function Vr(e) {
3229
+ function Kr(e) {
3205
3230
  if (e.registry) return e.registry;
3206
- let t = new I(e.bindings ?? {});
3207
- return Nr(t), t;
3231
+ let t = new L(e.bindings ?? {});
3232
+ return zr(t), t;
3208
3233
  }
3209
3234
  function Q(e) {
3210
- 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;
3211
3236
  return async (e) => {
3212
3237
  let s = e.req.header("host") ?? e.req.header("x-forwarded-host");
3213
3238
  if (!s) return e.text("Missing host", 400);
@@ -3225,13 +3250,13 @@ function Q(e) {
3225
3250
  }
3226
3251
  };
3227
3252
  }
3228
- function Hr(e) {
3253
+ function qr(e) {
3229
3254
  let n = new t();
3230
3255
  return n.all("*", Q(e)), n;
3231
3256
  }
3232
3257
  //#endregion
3233
3258
  //#region src/app.ts
3234
- function Ur(e) {
3259
+ function Jr(e) {
3235
3260
  let n = new t();
3236
3261
  return n.all("*", Q({
3237
3262
  data: e.data,
@@ -3249,17 +3274,17 @@ function Ur(e) {
3249
3274
  }
3250
3275
  //#endregion
3251
3276
  //#region src/data-plane/cache-api-cache.ts
3252
- var Wr = 1e3, Gr = 1e3;
3253
- function Kr(e, t) {
3277
+ var Yr = 1e3, Xr = 1e3;
3278
+ function Zr(e, t) {
3254
3279
  return new Request(`https://proxy-cache.internal/${encodeURIComponent(e)}/hosts/${encodeURIComponent(t.toLowerCase())}`, { method: "GET" });
3255
3280
  }
3256
- function qr() {
3281
+ function Qr() {
3257
3282
  return globalThis.caches?.default;
3258
3283
  }
3259
- function Jr(e) {
3260
- let t = e.cache ?? qr();
3284
+ function $r(e) {
3285
+ let t = e.cache ?? Qr();
3261
3286
  if (!t) return e.upstream;
3262
- 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;
3263
3288
  async function l(e) {
3264
3289
  try {
3265
3290
  return await J(Promise.resolve(n.match(e)), s, "cache.match");
@@ -3268,7 +3293,7 @@ function Jr(e) {
3268
3293
  }
3269
3294
  }
3270
3295
  return { async resolveHost(t) {
3271
- let s = Kr(r, t), u = await l(s);
3296
+ let s = Zr(r, t), u = await l(s);
3272
3297
  if (u) try {
3273
3298
  return (await u.json()).value;
3274
3299
  } catch {}
@@ -3279,14 +3304,14 @@ function Jr(e) {
3279
3304
  return o ? o(m) : await m, d;
3280
3305
  } };
3281
3306
  }
3282
- function Yr(e, t) {
3283
- return Kr(e, t);
3307
+ function ei(e, t) {
3308
+ return Zr(e, t);
3284
3309
  }
3285
3310
  //#endregion
3286
3311
  //#region src/data-plane/cache-adapter-cache.ts
3287
- var Xr = 1e3, Zr = 1e3;
3288
- function Qr(e) {
3289
- 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();
3290
3315
  function f(e) {
3291
3316
  return `${s}:${e.toLowerCase()}`;
3292
3317
  }
@@ -3339,7 +3364,7 @@ function Qr(e) {
3339
3364
  }
3340
3365
  } };
3341
3366
  }
3342
- function $r(e, t) {
3367
+ function ii(e, t) {
3343
3368
  return `${e}:${t.toLowerCase()}`;
3344
3369
  }
3345
3370
  //#endregion
@@ -3347,7 +3372,7 @@ function $r(e, t) {
3347
3372
  function $() {
3348
3373
  throw Error("Static proxy adapter is read-only; configure routes at init time");
3349
3374
  }
3350
- function ei(e, t, n, r, i, a) {
3375
+ function ai(e, t, n, r, i, a) {
3351
3376
  return {
3352
3377
  id: e.id ?? `${n}:${t}`,
3353
3378
  tenant_id: r,
@@ -3362,10 +3387,10 @@ function ei(e, t, n, r, i, a) {
3362
3387
  updated_at: e.updated_at ?? a
3363
3388
  };
3364
3389
  }
3365
- function ti(e) {
3390
+ function oi(e) {
3366
3391
  let t = (/* @__PURE__ */ new Date()).toISOString(), n = e.defaultTenantId ?? "static", r = /* @__PURE__ */ new Map();
3367
3392
  for (let [i, a] of Object.entries(e.hosts)) {
3368
- 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);
3369
3394
  r.set(e, {
3370
3395
  tenant_id: s,
3371
3396
  custom_domain_id: c,
@@ -3409,7 +3434,7 @@ function ti(e) {
3409
3434
  }
3410
3435
  };
3411
3436
  }
3412
- function ni(e, t = {}) {
3437
+ function si(e, t = {}) {
3413
3438
  return {
3414
3439
  priority: t.priority,
3415
3440
  match: { path: t.path ?? "/*" },
@@ -3424,10 +3449,10 @@ function ni(e, t = {}) {
3424
3449
  }
3425
3450
  //#endregion
3426
3451
  //#region src/constants.ts
3427
- var ri = "proxy:resolve_host";
3452
+ var ci = "proxy:resolve_host";
3428
3453
  //#endregion
3429
3454
  //#region src/http-adapter/index.ts
3430
- function ii() {
3455
+ function li() {
3431
3456
  let e = () => {
3432
3457
  throw Error("HTTP proxy adapter does not expose write access to proxy_routes; mutate via the control-plane management API");
3433
3458
  };
@@ -3449,7 +3474,7 @@ function ii() {
3449
3474
  }
3450
3475
  };
3451
3476
  }
3452
- function ai(e) {
3477
+ function ui(e) {
3453
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;
3454
3479
  function c(e) {
3455
3480
  let t = new AbortController(), n = setTimeout(() => t.abort(), s);
@@ -3482,7 +3507,7 @@ function ai(e) {
3482
3507
  }), u);
3483
3508
  }
3484
3509
  return {
3485
- proxyRoutes: ii(),
3510
+ proxyRoutes: li(),
3486
3511
  async resolveHost(e) {
3487
3512
  let i = await f(), a = `${n}${r}${encodeURIComponent(e.toLowerCase())}`, o = await c((e) => t(a, {
3488
3513
  headers: { authorization: `Bearer ${i}` },
@@ -3496,7 +3521,7 @@ function ai(e) {
3496
3521
  }
3497
3522
  //#endregion
3498
3523
  //#region src/http-adapter/service-binding-fetch.ts
3499
- function oi(e) {
3524
+ function di(e) {
3500
3525
  return (t, n) => {
3501
3526
  let r = t instanceof Request && n === void 0 ? t : new Request(t, n);
3502
3527
  return e.fetch(r);
@@ -3504,11 +3529,11 @@ function oi(e) {
3504
3529
  }
3505
3530
  //#endregion
3506
3531
  //#region src/kv-adapter/index.ts
3507
- var si = "authhero-proxy-host:";
3508
- function ci(e, t) {
3532
+ var fi = "authhero-proxy-host:";
3533
+ function pi(e, t) {
3509
3534
  return `${e}${t.toLowerCase()}`;
3510
3535
  }
3511
- function li() {
3536
+ function mi() {
3512
3537
  let e = () => {
3513
3538
  throw Error("KV proxy adapter does not expose write access to proxy_routes; mutate via the control-plane management API");
3514
3539
  };
@@ -3530,15 +3555,15 @@ function li() {
3530
3555
  }
3531
3556
  };
3532
3557
  }
3533
- function ui(e) {
3534
- let { kv: t, keyPrefix: n = si, timeoutMs: r } = e;
3558
+ function hi(e) {
3559
+ let { kv: t, keyPrefix: n = fi, timeoutMs: r } = e;
3535
3560
  return {
3536
- proxyRoutes: li(),
3561
+ proxyRoutes: mi(),
3537
3562
  async resolveHost(e) {
3538
- let i = ci(n, e), a = t.get(i, "json");
3563
+ let i = pi(n, e), a = t.get(i, "json");
3539
3564
  return (r && r > 0 ? await J(a, r, "kv.get") : await a) ?? null;
3540
3565
  }
3541
3566
  };
3542
3567
  }
3543
3568
  //#endregion
3544
- 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 };