@authhero/proxy 0.10.10 → 0.10.11

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
@@ -26,7 +26,8 @@ var n = e.object({
26
26
  o.partial().extend({
27
27
  status: e.enum(["draft", "built"]).optional(),
28
28
  deployed_at: e.string().optional()
29
- }), o.extend({
29
+ });
30
+ var s = o.extend({
30
31
  id: e.string(),
31
32
  tenant_id: e.string(),
32
33
  status: e.enum(["draft", "built"]).default("built"),
@@ -35,24 +36,25 @@ o.partial().extend({
35
36
  name: e.string(),
36
37
  value: e.string().optional()
37
38
  })).optional()
38
- }).extend(n.shape);
39
- var s = e.string(), c = e.enum([
39
+ }).extend(n.shape), c = e.object({ name: e.string() });
40
+ s.extend({ secrets: e.array(c).optional() });
41
+ var l = e.string(), u = e.enum([
40
42
  "unspecified",
41
43
  "pending",
42
44
  "final",
43
45
  "partial",
44
46
  "canceled",
45
47
  "suspended"
46
- ]), l = e.object({
48
+ ]), d = e.object({
47
49
  id: e.string(),
48
50
  msg: e.string(),
49
51
  url: e.string().optional()
50
- }), u = e.object({
52
+ }), f = e.object({
51
53
  action_name: e.string(),
52
- error: l.nullable(),
54
+ error: d.nullable(),
53
55
  started_at: e.string(),
54
56
  ended_at: e.string()
55
- }), d = e.object({
57
+ }), p = e.object({
56
58
  level: e.enum([
57
59
  "log",
58
60
  "info",
@@ -61,17 +63,17 @@ var s = e.string(), c = e.enum([
61
63
  "debug"
62
64
  ]),
63
65
  message: e.string()
64
- }), f = e.array(e.object({
66
+ }), m = e.array(e.object({
65
67
  action_name: e.string(),
66
- lines: e.array(d)
68
+ lines: e.array(p)
67
69
  }));
68
70
  e.object({
69
71
  id: e.string(),
70
72
  tenant_id: e.string(),
71
- trigger_id: s,
72
- status: c,
73
- results: e.array(u),
74
- logs: f.optional(),
73
+ trigger_id: l,
74
+ status: u,
75
+ results: e.array(f),
76
+ logs: m.optional(),
75
77
  created_at: e.string(),
76
78
  updated_at: e.string()
77
79
  }).omit({
@@ -91,12 +93,12 @@ e.object({
91
93
  tenant_id: e.string(),
92
94
  number: e.number().int()
93
95
  }).extend(n.shape);
94
- var p = e.enum([
96
+ var h = e.enum([
95
97
  "user_action",
96
98
  "admin_action",
97
99
  "system",
98
100
  "api"
99
- ]), m = e.object({
101
+ ]), ee = e.object({
100
102
  type: e.enum([
101
103
  "user",
102
104
  "admin",
@@ -110,7 +112,7 @@ var p = e.enum([
110
112
  org_name: e.string().optional(),
111
113
  scopes: e.array(e.string()).optional(),
112
114
  client_id: e.string().optional()
113
- }), h = e.object({
115
+ }), te = e.object({
114
116
  type: e.string(),
115
117
  id: e.string(),
116
118
  before: e.record(e.string(), e.unknown()).optional(),
@@ -119,7 +121,7 @@ var p = e.enum([
119
121
  old: e.unknown(),
120
122
  new: e.unknown()
121
123
  })).optional()
122
- }), ee = e.object({
124
+ }), ne = e.object({
123
125
  method: e.string(),
124
126
  path: e.string(),
125
127
  query: e.record(e.string(), e.string()).optional(),
@@ -128,17 +130,17 @@ var p = e.enum([
128
130
  user_agent: e.string().optional(),
129
131
  correlation_id: e.string().optional(),
130
132
  redirect_uri: e.string().optional()
131
- }), te = e.object({
133
+ }), re = e.object({
132
134
  status_code: e.number(),
133
135
  body: e.unknown().optional()
134
- }), ne = e.object({
136
+ }), ie = e.object({
135
137
  country_code: e.string(),
136
138
  city_name: e.string(),
137
139
  latitude: e.string(),
138
140
  longitude: e.string(),
139
141
  time_zone: e.string(),
140
142
  continent_code: e.string()
141
- }), re = e.object({
143
+ }), ae = e.object({
142
144
  name: e.string(),
143
145
  version: e.string(),
144
146
  env: e.record(e.string(), e.string()).optional()
@@ -148,11 +150,11 @@ e.object({
148
150
  event_type: e.string(),
149
151
  log_type: e.string(),
150
152
  description: e.string().optional(),
151
- category: p,
152
- actor: m,
153
- target: h,
154
- request: ee,
155
- response: te.optional(),
153
+ category: h,
154
+ actor: ee,
155
+ target: te,
156
+ request: ne,
157
+ response: re.optional(),
156
158
  connection: e.string().optional(),
157
159
  connection_id: e.string().optional(),
158
160
  client_name: e.string().optional(),
@@ -160,8 +162,8 @@ e.object({
160
162
  strategy_type: e.string().optional(),
161
163
  audience: e.string().optional(),
162
164
  scope: e.string().optional(),
163
- location: ne.optional(),
164
- auth0_client: re.optional(),
165
+ location: ie.optional(),
166
+ auth0_client: ae.optional(),
165
167
  hostname: e.string(),
166
168
  is_mobile: e.boolean().optional(),
167
169
  timestamp: e.string()
@@ -176,14 +178,14 @@ e.object({
176
178
  "SEND_REQUEST",
177
179
  "SEND_EMAIL"
178
180
  ]), e.enum(["VERIFY_EMAIL"]);
179
- var ie = e.object({
181
+ var oe = e.object({
180
182
  require_mx_record: e.boolean().optional(),
181
183
  block_aliases: e.boolean().optional(),
182
184
  block_free_emails: e.boolean().optional(),
183
185
  block_disposable_emails: e.boolean().optional(),
184
186
  blocklist: e.array(e.string()).optional(),
185
187
  allowlist: e.array(e.string()).optional()
186
- }), ae = e.object({
188
+ }), se = e.object({
187
189
  id: e.string(),
188
190
  alias: e.string().max(100).optional(),
189
191
  type: e.literal("AUTH0"),
@@ -195,7 +197,7 @@ var ie = e.object({
195
197
  user_id: e.string(),
196
198
  changes: e.record(e.string(), e.any())
197
199
  })
198
- }), oe = e.object({
200
+ }), ce = e.object({
199
201
  id: e.string(),
200
202
  alias: e.string().max(100).optional(),
201
203
  type: e.literal("EMAIL"),
@@ -204,13 +206,13 @@ var ie = e.object({
204
206
  mask_output: e.boolean().optional(),
205
207
  params: e.object({
206
208
  email: e.string(),
207
- rules: ie.optional()
209
+ rules: oe.optional()
208
210
  })
209
- }), se = e.enum([
211
+ }), le = e.enum([
210
212
  "change-email",
211
213
  "account",
212
214
  "custom"
213
- ]), ce = e.object({
215
+ ]), ue = e.object({
214
216
  id: e.string(),
215
217
  alias: e.string().max(100).optional(),
216
218
  type: e.literal("REDIRECT"),
@@ -218,17 +220,17 @@ var ie = e.object({
218
220
  allow_failure: e.boolean().optional(),
219
221
  mask_output: e.boolean().optional(),
220
222
  params: e.object({
221
- target: se.openapi({ description: "The predefined target to redirect to, or 'custom' for a custom URL" }),
223
+ target: le.openapi({ description: "The predefined target to redirect to, or 'custom' for a custom URL" }),
222
224
  custom_url: e.string().optional().openapi({ description: "Custom URL to redirect to when target is 'custom'" })
223
225
  })
224
- }), le = e.union([
225
- ae,
226
- oe,
227
- ce
226
+ }), de = e.union([
227
+ se,
228
+ ce,
229
+ ue
228
230
  ]);
229
231
  e.object({
230
232
  name: e.string().min(1).max(150).openapi({ description: "The name of the flow" }),
231
- actions: e.array(le).optional().default([]).openapi({ description: "The list of actions to execute in sequence" })
233
+ actions: e.array(de).optional().default([]).openapi({ description: "The list of actions to execute in sequence" })
232
234
  }).extend(n.shape).extend({ id: e.string().openapi({
233
235
  description: "Unique identifier for the flow",
234
236
  example: "af_12tMpdJ3iek7svMyZkSh5M"
@@ -245,7 +247,7 @@ e.object({
245
247
  total: e.number().optional(),
246
248
  next: e.string().optional()
247
249
  });
248
- var ue = e.object({
250
+ var fe = e.object({
249
251
  email: e.string().optional(),
250
252
  email_verified: e.boolean().optional(),
251
253
  name: e.string().optional(),
@@ -254,7 +256,7 @@ var ue = e.object({
254
256
  phone_number: e.string().optional(),
255
257
  phone_verified: e.boolean().optional(),
256
258
  family_name: e.string().optional()
257
- }).catchall(e.any()), de = e.object({
259
+ }).catchall(e.any()), pe = e.object({
258
260
  connection: e.string(),
259
261
  user_id: e.string(),
260
262
  provider: e.string(),
@@ -267,15 +269,15 @@ var ue = e.object({
267
269
  access_token: e.string().optional(),
268
270
  access_token_secret: e.string().optional(),
269
271
  refresh_token: e.string().optional(),
270
- profileData: ue.optional()
271
- }), fe = e.object({
272
+ profileData: fe.optional()
273
+ }), me = e.object({
272
274
  formatted: e.string().optional(),
273
275
  street_address: e.string().optional(),
274
276
  locality: e.string().optional(),
275
277
  region: e.string().optional(),
276
278
  postal_code: e.string().optional(),
277
279
  country: e.string().optional()
278
- }).optional(), pe = e.object({
280
+ }).optional(), he = e.object({
279
281
  email: e.string().transform((e) => e.toLowerCase()).optional(),
280
282
  username: e.string().refine((e) => !e.includes("@"), { message: "Usernames must not contain \"@\". Use the email field for email addresses." }).optional(),
281
283
  phone_number: e.string().optional(),
@@ -298,9 +300,9 @@ var ue = e.object({
298
300
  gender: e.string().optional(),
299
301
  birthdate: e.string().optional(),
300
302
  zoneinfo: e.string().optional(),
301
- address: fe
303
+ address: me
302
304
  });
303
- pe.extend({
305
+ he.extend({
304
306
  email_verified: e.boolean().default(!1),
305
307
  verify_email: e.boolean().optional(),
306
308
  last_ip: e.string().optional(),
@@ -321,24 +323,24 @@ pe.extend({
321
323
  is_social: e.boolean(),
322
324
  email: e.string().optional(),
323
325
  login_count: e.number().default(0),
324
- identities: e.array(de).optional()
325
- }).omit({ registration_completed_at: !0 }), pe.extend({
326
+ identities: e.array(pe).optional()
327
+ }).omit({ registration_completed_at: !0 }), he.extend({
326
328
  login_count: e.number(),
327
329
  multifactor: e.array(e.string()).optional(),
328
330
  last_ip: e.string().optional(),
329
331
  last_login: e.string().optional(),
330
332
  user_id: e.string()
331
333
  }).catchall(e.any());
332
- var me = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", he = (e = 21) => {
334
+ var ge = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", _e = (e = 21) => {
333
335
  let t = "", n = crypto.getRandomValues(new Uint8Array(e |= 0));
334
- for (; e--;) t += me[n[e] & 63];
336
+ for (; e--;) t += ge[n[e] & 63];
335
337
  return t;
336
- }, ge = e.object({
338
+ }, ve = e.object({
337
339
  client_id: e.string().optional().openapi({ description: "ID of this client. Generated server-side if omitted (Auth0 behavior)." }),
338
340
  name: e.string().min(1).openapi({ description: "Name of this client (min length: 1 character, does not allow < or >)." }),
339
341
  description: e.string().max(140).optional().openapi({ description: "Free text description of this client (max length: 140 characters)." }),
340
342
  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)." }),
343
+ client_secret: e.string().default(() => _e()).optional().openapi({ description: "Client secret (which you must not make public)." }),
342
344
  app_type: e.enum([
343
345
  "native",
344
346
  "spa",
@@ -455,8 +457,8 @@ var me = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", he
455
457
  e.object({
456
458
  created_at: e.string(),
457
459
  updated_at: e.string()
458
- }).extend(ge.shape).extend({ client_id: e.string() });
459
- var _e = e.object({
460
+ }).extend(ve.shape).extend({ client_id: e.string() });
461
+ var ye = e.object({
460
462
  client_id: e.string().min(1).openapi({ description: "ID of the client." }),
461
463
  audience: e.string().min(1).openapi({ description: "The audience (API identifier) of this client grant." }),
462
464
  scope: e.array(e.string()).optional().openapi({ description: "Scopes allowed for this client grant." }),
@@ -469,15 +471,15 @@ var _e = e.object({
469
471
  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
472
  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
473
  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({
474
+ }), be = e.object({ id: e.string().openapi({ description: "ID of the client grant." }) }).extend(ye.shape).extend({
473
475
  created_at: e.string().optional(),
474
476
  updated_at: e.string().optional()
475
477
  });
476
- e.array(ve);
477
- var ye = e.enum(["iat", "rat"]), be = e.object({
478
+ e.array(be);
479
+ var xe = e.enum(["iat", "rat"]), Se = e.object({
478
480
  id: e.string(),
479
481
  token_hash: e.string(),
480
- type: ye,
482
+ type: xe,
481
483
  client_id: e.string().optional(),
482
484
  sub: e.string().optional(),
483
485
  constraints: e.record(e.string(), e.unknown()).optional(),
@@ -488,23 +490,23 @@ e.object({
488
490
  created_at: e.string(),
489
491
  used_at: e.string().optional(),
490
492
  revoked_at: e.string().optional()
491
- }).extend(be.shape);
493
+ }).extend(Se.shape);
492
494
  var g = e.object({
493
495
  x: e.number(),
494
496
  y: e.number()
495
- }), xe = /* @__PURE__ */ function(e) {
497
+ }), Ce = /* @__PURE__ */ function(e) {
496
498
  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) {
499
+ }({}), we = /* @__PURE__ */ function(e) {
498
500
  return e.BLOCK = "BLOCK", e.FIELD = "FIELD", e;
499
501
  }({}), _ = e.object({
500
502
  id: e.string(),
501
- category: e.nativeEnum(Se),
502
- type: e.nativeEnum(xe)
503
- }), Ce = _.extend({
503
+ category: e.nativeEnum(we),
504
+ type: e.nativeEnum(Ce)
505
+ }), Te = _.extend({
504
506
  category: e.literal("BLOCK"),
505
507
  type: e.literal("RICH_TEXT"),
506
508
  config: e.object({ content: e.string() }).passthrough()
507
- }), we = _.extend({
509
+ }), Ee = _.extend({
508
510
  category: e.literal("BLOCK"),
509
511
  type: e.union([
510
512
  e.literal("NEXT_BUTTON"),
@@ -512,13 +514,13 @@ var g = e.object({
512
514
  e.literal("SUBMIT_BUTTON")
513
515
  ]),
514
516
  config: e.object({ text: e.string() }).passthrough()
515
- }), Te = _.extend({
517
+ }), De = _.extend({
516
518
  category: e.literal("FIELD"),
517
519
  type: e.literal("LEGAL"),
518
520
  required: e.boolean().optional(),
519
521
  sensitive: e.boolean().optional(),
520
522
  config: e.object({ text: e.string() }).passthrough()
521
- }), Ee = _.extend({
523
+ }), Oe = _.extend({
522
524
  category: e.literal("FIELD"),
523
525
  type: e.union([
524
526
  e.literal("TEXT"),
@@ -538,26 +540,26 @@ var g = e.object({
538
540
  label: e.string().optional(),
539
541
  placeholder: e.string().optional()
540
542
  }).passthrough()
541
- }), De = e.object({
543
+ }), ke = e.object({
542
544
  id: e.string(),
543
545
  category: e.string(),
544
546
  type: e.string()
545
- }).passthrough(), Oe = e.union([
546
- Ce,
547
- we,
547
+ }).passthrough(), Ae = e.union([
548
548
  Te,
549
549
  Ee,
550
- De
551
- ]), ke = e.object({
550
+ De,
551
+ Oe,
552
+ ke
553
+ ]), je = e.object({
552
554
  id: e.string(),
553
555
  type: e.literal("STEP"),
554
556
  coordinates: g,
555
557
  alias: e.string().optional(),
556
558
  config: e.object({
557
- components: e.array(Oe),
559
+ components: e.array(Ae),
558
560
  next_node: e.string()
559
561
  }).passthrough()
560
- }), Ae = e.object({
562
+ }), Me = e.object({
561
563
  id: e.string(),
562
564
  type: e.literal("FLOW"),
563
565
  coordinates: g,
@@ -566,7 +568,7 @@ var g = e.object({
566
568
  flow_id: e.string(),
567
569
  next_node: e.string()
568
570
  })
569
- }), je = e.object({
571
+ }), Ne = e.object({
570
572
  id: e.string(),
571
573
  type: e.literal("ACTION"),
572
574
  coordinates: g,
@@ -581,19 +583,19 @@ var g = e.object({
581
583
  custom_url: e.string().optional().openapi({ description: "Custom URL when target is 'custom'" }),
582
584
  next_node: e.string().openapi({ description: "The next node to navigate to after action (for non-redirect actions)" })
583
585
  }).passthrough()
584
- }), Me = e.object({
586
+ }), Pe = e.object({
585
587
  id: e.string(),
586
588
  type: e.string(),
587
589
  coordinates: g
588
- }).passthrough(), Ne = e.union([
589
- ke,
590
- Ae,
590
+ }).passthrough(), Fe = e.union([
591
591
  je,
592
- Me
593
- ]), Pe = e.object({
592
+ Me,
593
+ Ne,
594
+ Pe
595
+ ]), Ie = e.object({
594
596
  next_node: e.string(),
595
597
  coordinates: g
596
- }).passthrough(), Fe = e.object({
598
+ }).passthrough(), Le = e.object({
597
599
  resume_flow: e.boolean().optional(),
598
600
  coordinates: g
599
601
  }).passthrough();
@@ -601,9 +603,9 @@ e.object({
601
603
  id: e.string(),
602
604
  name: e.string(),
603
605
  languages: e.object({ primary: e.string() }).passthrough(),
604
- nodes: e.array(Ne),
605
- start: Pe,
606
- ending: Fe,
606
+ nodes: e.array(Fe),
607
+ start: Ie,
608
+ ending: Le,
607
609
  created_at: e.string(),
608
610
  updated_at: e.string(),
609
611
  links: e.object({
@@ -615,24 +617,24 @@ e.object({
615
617
  created_at: !0,
616
618
  updated_at: !0
617
619
  });
618
- var Ie = /* @__PURE__ */ function(e) {
620
+ var Re = /* @__PURE__ */ function(e) {
619
621
  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) {
622
+ }({}), ze = /* @__PURE__ */ function(e) {
621
623
  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) {
624
+ }({}), Be = /* @__PURE__ */ function(e) {
623
625
  return e.S256 = "S256", e.Plain = "plain", e;
624
- }({}), ze = e.union([e.null(), e.object({
626
+ }({}), Ve = e.union([e.null(), e.object({
625
627
  essential: e.boolean().optional(),
626
628
  value: e.unknown().optional(),
627
629
  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({
630
+ })]).nullable(), He = e.object({
631
+ userinfo: e.record(e.string(), Ve).optional(),
632
+ id_token: e.record(e.string(), Ve).optional()
633
+ }), Ue = e.object({
632
634
  client_id: e.string(),
633
635
  act_as: e.string().optional(),
634
- response_type: e.nativeEnum(Ie).optional(),
635
- response_mode: e.nativeEnum(Le).optional(),
636
+ response_type: e.nativeEnum(Re).optional(),
637
+ response_mode: e.nativeEnum(ze).optional(),
636
638
  redirect_uri: e.string().optional(),
637
639
  audience: e.string().optional(),
638
640
  organization: e.string().optional(),
@@ -640,13 +642,13 @@ var Ie = /* @__PURE__ */ function(e) {
640
642
  nonce: e.string().optional(),
641
643
  scope: e.string().optional(),
642
644
  prompt: e.string().optional(),
643
- code_challenge_method: e.nativeEnum(Re).optional(),
645
+ code_challenge_method: e.nativeEnum(Be).optional(),
644
646
  code_challenge: e.string().optional(),
645
647
  username: e.string().optional(),
646
648
  ui_locales: e.string().optional(),
647
649
  max_age: e.number().optional(),
648
650
  acr_values: e.string().optional(),
649
- claims: Be.optional(),
651
+ claims: He.optional(),
650
652
  vendor_id: e.string().optional()
651
653
  });
652
654
  e.object({
@@ -669,20 +671,21 @@ e.object({
669
671
  "auto"
670
672
  ]).optional()
671
673
  });
672
- var He = e.enum([
674
+ var We = e.enum([
673
675
  "password_reset",
674
676
  "email_verification",
675
677
  "otp",
676
678
  "mfa_otp",
677
679
  "authorization_code",
678
680
  "oauth2_state",
679
- "ticket"
681
+ "ticket",
682
+ "client_assertion_jti"
680
683
  ]);
681
684
  e.object({
682
685
  code_id: e.string().openapi({ description: "The code that will be used in for instance an email verification flow" }),
683
- login_id: e.string().openapi({ description: "The id of the login session that the code is connected to" }),
686
+ login_id: e.string().optional().openapi({ description: "The id of the login session that the code is connected to" }),
684
687
  connection_id: e.string().optional().openapi({ description: "The connection that the code is connected to" }),
685
- code_type: He,
688
+ code_type: We,
686
689
  code_verifier: e.string().optional().openapi({ description: "The code verifier used in PKCE in outbound flows" }),
687
690
  code_challenge: e.string().optional().openapi({ description: "The code challenge used in PKCE in outbound flows" }),
688
691
  code_challenge_method: e.enum(["plain", "S256"]).optional().openapi({ description: "The code challenge method used in PKCE in outbound flows" }),
@@ -694,7 +697,7 @@ e.object({
694
697
  used_at: e.string().optional(),
695
698
  user_id: e.string().optional()
696
699
  }).extend({ created_at: e.string() });
697
- var Ue = e.object({
700
+ var Ge = e.object({
698
701
  kid: e.string().optional(),
699
702
  team_id: e.string().optional(),
700
703
  realms: e.string().optional(),
@@ -825,15 +828,15 @@ function v(e) {
825
828
  return e;
826
829
  }
827
830
  }
828
- var We = e.object({
831
+ var Ke = e.object({
829
832
  id: e.string().optional(),
830
833
  name: e.string(),
831
834
  display_name: e.string().optional(),
832
835
  strategy: e.string(),
833
- options: e.preprocess((e) => e === null ? {} : v(e), Ue).default({}),
836
+ options: e.preprocess((e) => e === null ? {} : v(e), Ge).default({}),
834
837
  enabled_clients: e.array(e.string()).default([]).optional(),
835
- response_type: e.nativeEnum(Ie).optional(),
836
- response_mode: e.nativeEnum(Le).optional(),
838
+ response_type: e.nativeEnum(Re).optional(),
839
+ response_mode: e.nativeEnum(ze).optional(),
837
840
  is_domain_connection: e.boolean().optional(),
838
841
  show_as_button: e.boolean().optional(),
839
842
  metadata: e.record(e.string(), e.any()).optional(),
@@ -843,8 +846,8 @@ e.object({
843
846
  id: e.string(),
844
847
  created_at: e.string().transform((e) => e === null ? "" : e),
845
848
  updated_at: e.string().transform((e) => e === null ? "" : e)
846
- }).extend(We.shape);
847
- var Ge = e.object({
849
+ }).extend(Ke.shape);
850
+ var qe = e.object({
848
851
  domain: e.string(),
849
852
  custom_domain_id: e.string().optional(),
850
853
  type: e.enum(["auth0_managed_certs", "self_managed_certs"]),
@@ -858,7 +861,7 @@ var Ge = e.object({
858
861
  "null"
859
862
  ]).optional(),
860
863
  domain_metadata: e.record(e.string(), e.string().max(255)).optional()
861
- }), Ke = e.discriminatedUnion("name", [e.object({
864
+ }), Je = e.discriminatedUnion("name", [e.object({
862
865
  name: e.literal("txt"),
863
866
  record: e.string(),
864
867
  domain: e.string()
@@ -866,7 +869,7 @@ var Ge = e.object({
866
869
  name: e.literal("http"),
867
870
  http_body: e.string(),
868
871
  http_url: e.string()
869
- })]), qe = Ge.extend({
872
+ })]), Ye = qe.extend({
870
873
  custom_domain_id: e.string(),
871
874
  primary: e.boolean(),
872
875
  status: e.enum([
@@ -876,14 +879,14 @@ var Ge = e.object({
876
879
  "ready"
877
880
  ]),
878
881
  origin_domain_name: e.string().optional(),
879
- verification: e.object({ methods: e.array(Ke) }).optional(),
882
+ verification: e.object({ methods: e.array(Je) }).optional(),
880
883
  tls_policy: e.string().optional()
881
884
  });
882
- Ge.pick({
885
+ qe.pick({
883
886
  tls_policy: !0,
884
887
  custom_client_ip_header: !0,
885
888
  domain_metadata: !0
886
- }).strict(), qe.extend({ tenant_id: e.string() }), e.object({
889
+ }).strict(), Ye.extend({ tenant_id: e.string() }), e.object({
887
890
  certificate: e.string().regex(/^-----BEGIN CERTIFICATE-----[\s\S]+-----END CERTIFICATE-----\s*$/, "must be PEM-encoded; include the full certificate chain in leaf-first order"),
888
891
  private_key: e.string().regex(/-----BEGIN (RSA |EC |ENCRYPTED )?PRIVATE KEY-----[\s\S]+-----END \1PRIVATE KEY-----\s*$/, "must be a PEM-encoded private key")
889
892
  });
@@ -891,13 +894,13 @@ var y = e.object({
891
894
  id: e.string(),
892
895
  order: e.number().optional(),
893
896
  visible: e.boolean().optional().default(!0)
894
- }), b = y.extend({ category: e.literal("BLOCK").optional() }), Je = b.extend({
897
+ }), b = y.extend({ category: e.literal("BLOCK").optional() }), Xe = b.extend({
895
898
  type: e.literal("DIVIDER"),
896
899
  config: e.object({ text: e.string().optional() }).optional()
897
- }), Ye = b.extend({
900
+ }), Ze = b.extend({
898
901
  type: e.literal("HTML"),
899
902
  config: e.object({ content: e.string().optional() }).optional()
900
- }), Xe = b.extend({
903
+ }), Qe = b.extend({
901
904
  type: e.literal("IMAGE"),
902
905
  config: e.object({
903
906
  src: e.string().optional(),
@@ -905,25 +908,25 @@ var y = e.object({
905
908
  width: e.number().optional(),
906
909
  height: e.number().optional()
907
910
  }).optional()
908
- }), Ze = b.extend({
911
+ }), $e = b.extend({
909
912
  type: e.literal("JUMP_BUTTON"),
910
913
  config: e.object({
911
914
  text: e.string().optional(),
912
915
  target_step: e.string().optional()
913
916
  })
914
- }), Qe = b.extend({
917
+ }), et = b.extend({
915
918
  type: e.literal("RESEND_BUTTON"),
916
919
  config: e.object({
917
920
  text: e.string().optional(),
918
921
  resend_action: e.string().optional()
919
922
  })
920
- }), $e = b.extend({
923
+ }), tt = b.extend({
921
924
  type: e.literal("NEXT_BUTTON"),
922
925
  config: e.object({ text: e.string().optional() })
923
- }), et = b.extend({
926
+ }), nt = b.extend({
924
927
  type: e.literal("PREVIOUS_BUTTON"),
925
928
  config: e.object({ text: e.string().optional() })
926
- }), tt = b.extend({
929
+ }), rt = b.extend({
927
930
  type: e.literal("RICH_TEXT"),
928
931
  config: e.object({ content: e.string().optional() }).optional()
929
932
  }), x = y.extend({
@@ -932,13 +935,13 @@ var y = e.object({
932
935
  hint: e.string().min(1).max(500).optional(),
933
936
  required: e.boolean().optional(),
934
937
  sensitive: e.boolean().optional()
935
- }), nt = x.extend({
938
+ }), it = x.extend({
936
939
  type: e.literal("AUTH0_VERIFIABLE_CREDENTIALS"),
937
940
  config: e.object({ credential_type: e.string().optional() })
938
- }), rt = x.extend({
941
+ }), at = x.extend({
939
942
  type: e.literal("GMAPS_ADDRESS"),
940
943
  config: e.object({ api_key: e.string().optional() })
941
- }), it = x.extend({
944
+ }), ot = x.extend({
942
945
  type: e.literal("RECAPTCHA"),
943
946
  config: e.object({ site_key: e.string().optional() })
944
947
  }), S = y.extend({
@@ -957,10 +960,10 @@ var y = e.object({
957
960
  })).optional(),
958
961
  required: e.boolean().optional(),
959
962
  sensitive: e.boolean().optional()
960
- }), at = S.extend({
963
+ }), st = S.extend({
961
964
  type: e.literal("BOOLEAN"),
962
965
  config: e.object({ default_value: e.boolean().optional() }).optional()
963
- }), ot = S.extend({
966
+ }), ct = S.extend({
964
967
  type: e.literal("CARDS"),
965
968
  config: e.object({
966
969
  options: e.array(e.object({
@@ -971,7 +974,7 @@ var y = e.object({
971
974
  })).optional(),
972
975
  multi_select: e.boolean().optional()
973
976
  }).optional()
974
- }), st = S.extend({
977
+ }), lt = S.extend({
975
978
  type: e.literal("CHOICE"),
976
979
  config: e.object({
977
980
  options: e.array(e.object({
@@ -982,7 +985,7 @@ var y = e.object({
982
985
  multiple: e.boolean().optional(),
983
986
  default_value: e.union([e.string(), e.array(e.string())]).optional()
984
987
  }).optional()
985
- }), ct = S.extend({
988
+ }), ut = S.extend({
986
989
  type: e.literal("CODE"),
987
990
  config: e.object({
988
991
  length: e.number().int().positive().max(100).optional(),
@@ -999,7 +1002,7 @@ var y = e.object({
999
1002
  message: "default_value is longer than the configured length",
1000
1003
  path: ["default_value"]
1001
1004
  }).optional()
1002
- }), lt = S.extend({
1005
+ }), dt = S.extend({
1003
1006
  type: e.literal("CUSTOM"),
1004
1007
  config: e.object({
1005
1008
  component: e.string().optional(),
@@ -1007,7 +1010,7 @@ var y = e.object({
1007
1010
  schema: e.record(e.string(), e.any()).optional(),
1008
1011
  code: e.string().optional()
1009
1012
  })
1010
- }), ut = S.extend({
1013
+ }), ft = S.extend({
1011
1014
  type: e.literal("DATE"),
1012
1015
  config: e.object({
1013
1016
  format: e.string().optional(),
@@ -1015,7 +1018,7 @@ var y = e.object({
1015
1018
  max: e.string().optional(),
1016
1019
  default_value: e.string().optional()
1017
1020
  }).optional()
1018
- }), dt = S.extend({
1021
+ }), pt = S.extend({
1019
1022
  type: e.literal("DROPDOWN"),
1020
1023
  config: e.object({
1021
1024
  options: e.array(e.object({
@@ -1027,7 +1030,7 @@ var y = e.object({
1027
1030
  multiple: e.boolean().optional(),
1028
1031
  default_value: e.union([e.string(), e.array(e.string())]).optional()
1029
1032
  }).optional()
1030
- }), ft = S.extend({
1033
+ }), mt = S.extend({
1031
1034
  type: e.literal("EMAIL"),
1032
1035
  config: e.object({
1033
1036
  placeholder: e.string().optional(),
@@ -1035,20 +1038,20 @@ var y = e.object({
1035
1038
  last_used: e.boolean().optional(),
1036
1039
  last_used_label: e.string().optional()
1037
1040
  }).optional()
1038
- }), pt = S.extend({
1041
+ }), ht = S.extend({
1039
1042
  type: e.literal("FILE"),
1040
1043
  config: e.object({
1041
1044
  accept: e.string().optional(),
1042
1045
  max_size: e.number().optional(),
1043
1046
  multiple: e.boolean().optional()
1044
1047
  }).optional()
1045
- }), mt = S.extend({
1048
+ }), gt = S.extend({
1046
1049
  type: e.literal("LEGAL"),
1047
1050
  config: e.object({
1048
1051
  text: e.string(),
1049
1052
  html: e.boolean().optional()
1050
1053
  }).optional()
1051
- }), ht = S.extend({
1054
+ }), _t = S.extend({
1052
1055
  type: e.literal("NUMBER"),
1053
1056
  config: e.object({
1054
1057
  placeholder: e.string().optional(),
@@ -1057,7 +1060,7 @@ var y = e.object({
1057
1060
  step: e.number().optional(),
1058
1061
  default_value: e.string().optional()
1059
1062
  }).optional()
1060
- }), gt = S.extend({
1063
+ }), vt = S.extend({
1061
1064
  type: e.literal("PASSWORD"),
1062
1065
  config: e.object({
1063
1066
  placeholder: e.string().optional(),
@@ -1066,13 +1069,13 @@ var y = e.object({
1066
1069
  forgot_password_link: e.string().optional(),
1067
1070
  default_value: e.string().optional()
1068
1071
  }).optional()
1069
- }), _t = S.extend({
1072
+ }), yt = S.extend({
1070
1073
  type: e.literal("PAYMENT"),
1071
1074
  config: e.object({
1072
1075
  provider: e.string().optional(),
1073
1076
  currency: e.string().optional()
1074
1077
  }).optional()
1075
- }), vt = S.extend({
1078
+ }), bt = S.extend({
1076
1079
  type: e.literal("SOCIAL"),
1077
1080
  config: e.object({
1078
1081
  providers: e.array(e.string()).optional(),
@@ -1086,7 +1089,7 @@ var y = e.object({
1086
1089
  last_used_label: e.string().optional()
1087
1090
  })).optional()
1088
1091
  }).optional()
1089
- }), yt = S.extend({
1092
+ }), xt = S.extend({
1090
1093
  type: e.literal("TEL"),
1091
1094
  config: e.object({
1092
1095
  placeholder: e.string().optional(),
@@ -1094,7 +1097,7 @@ var y = e.object({
1094
1097
  default_value: e.string().optional(),
1095
1098
  allow_email: e.boolean().optional()
1096
1099
  }).optional()
1097
- }), bt = S.extend({
1100
+ }), St = S.extend({
1098
1101
  type: e.literal("TEXT"),
1099
1102
  config: e.object({
1100
1103
  placeholder: e.string().optional(),
@@ -1104,39 +1107,37 @@ var y = e.object({
1104
1107
  last_used: e.boolean().optional(),
1105
1108
  last_used_label: e.string().optional()
1106
1109
  }).optional()
1107
- }), xt = S.extend({
1110
+ }), Ct = S.extend({
1108
1111
  type: e.literal("COUNTRY"),
1109
1112
  config: e.object({
1110
1113
  placeholder: e.string().optional(),
1111
1114
  default_value: e.string().optional()
1112
1115
  }).optional()
1113
- }), St = S.extend({
1116
+ }), wt = S.extend({
1114
1117
  type: e.literal("URL"),
1115
1118
  config: e.object({
1116
1119
  placeholder: e.string().optional(),
1117
1120
  default_value: e.string().optional()
1118
1121
  }).optional()
1119
- }), Ct = e.discriminatedUnion("type", [
1120
- Je,
1121
- Ye,
1122
+ }), Tt = e.discriminatedUnion("type", [
1122
1123
  Xe,
1123
1124
  Ze,
1124
1125
  Qe,
1125
1126
  $e,
1126
1127
  et,
1127
- tt
1128
- ]), wt = e.discriminatedUnion("type", [
1128
+ tt,
1129
1129
  nt,
1130
- rt,
1131
- it
1132
- ]), Tt = e.discriminatedUnion("type", [
1130
+ rt
1131
+ ]), Et = e.discriminatedUnion("type", [
1132
+ it,
1133
1133
  at,
1134
- ot,
1134
+ ot
1135
+ ]), Dt = e.discriminatedUnion("type", [
1135
1136
  st,
1136
1137
  ct,
1137
- xt,
1138
1138
  lt,
1139
1139
  ut,
1140
+ Ct,
1140
1141
  dt,
1141
1142
  ft,
1142
1143
  pt,
@@ -1147,11 +1148,13 @@ var y = e.object({
1147
1148
  vt,
1148
1149
  yt,
1149
1150
  bt,
1150
- St
1151
+ xt,
1152
+ St,
1153
+ wt
1151
1154
  ]), C = e.union([
1152
- Ct,
1153
- wt,
1154
- Tt
1155
+ Tt,
1156
+ Et,
1157
+ Dt
1155
1158
  ]);
1156
1159
  new Set([
1157
1160
  "BOOLEAN",
@@ -1181,7 +1184,7 @@ new Set([
1181
1184
  var w = e.object({
1182
1185
  x: e.number(),
1183
1186
  y: e.number()
1184
- }), Et = e.object({
1187
+ }), Ot = e.object({
1185
1188
  id: e.string(),
1186
1189
  type: e.literal("FLOW"),
1187
1190
  coordinates: w,
@@ -1190,7 +1193,7 @@ var w = e.object({
1190
1193
  flow_id: e.string().max(30),
1191
1194
  next_node: e.string().optional()
1192
1195
  })
1193
- }), Dt = e.object({
1196
+ }), kt = e.object({
1194
1197
  id: e.string(),
1195
1198
  type: e.literal("ROUTER"),
1196
1199
  coordinates: w,
@@ -1204,7 +1207,7 @@ var w = e.object({
1204
1207
  })),
1205
1208
  fallback: e.string()
1206
1209
  })
1207
- }), Ot = e.object({
1210
+ }), At = e.object({
1208
1211
  id: e.string(),
1209
1212
  type: e.literal("STEP"),
1210
1213
  coordinates: w,
@@ -1213,11 +1216,11 @@ var w = e.object({
1213
1216
  components: e.array(C),
1214
1217
  next_node: e.string().optional()
1215
1218
  })
1216
- }), kt = e.discriminatedUnion("type", [
1217
- Et,
1218
- Dt,
1219
- Ot
1220
- ]), At = e.object({
1219
+ }), jt = e.discriminatedUnion("type", [
1220
+ Ot,
1221
+ kt,
1222
+ At
1223
+ ]), Mt = e.object({
1221
1224
  name: e.string().openapi({ description: "The name of the form" }),
1222
1225
  messages: e.object({
1223
1226
  errors: e.record(e.string(), e.any()).optional(),
@@ -1228,7 +1231,7 @@ var w = e.object({
1228
1231
  default: e.string().optional()
1229
1232
  }).optional(),
1230
1233
  translations: e.record(e.string(), e.any()).optional(),
1231
- nodes: e.array(kt).optional(),
1234
+ nodes: e.array(jt).optional(),
1232
1235
  start: e.object({
1233
1236
  hidden_fields: e.array(e.object({
1234
1237
  key: e.string(),
@@ -1252,8 +1255,8 @@ var w = e.object({
1252
1255
  sdk_src: e.string().optional()
1253
1256
  }).optional()
1254
1257
  }).openapi({ description: "Schema for flow-based forms (matches Auth0 Forms structure)" });
1255
- n.extend(At.shape).extend({ id: e.string() });
1256
- var jt = e.object({
1258
+ n.extend(Mt.shape).extend({ id: e.string() });
1259
+ var Nt = e.object({
1257
1260
  id: e.number().optional(),
1258
1261
  text: e.string(),
1259
1262
  type: e.enum([
@@ -1262,7 +1265,7 @@ var jt = e.object({
1262
1265
  "success",
1263
1266
  "warning"
1264
1267
  ])
1265
- }), Mt = e.object({
1268
+ }), Pt = e.object({
1266
1269
  id: e.string().optional(),
1267
1270
  text: e.string(),
1268
1271
  href: e.string(),
@@ -1275,8 +1278,8 @@ e.object({
1275
1278
  title: e.string().optional(),
1276
1279
  description: e.string().optional(),
1277
1280
  components: e.array(C),
1278
- messages: e.array(jt).optional(),
1279
- links: e.array(Mt).optional(),
1281
+ messages: e.array(Nt).optional(),
1282
+ links: e.array(Pt).optional(),
1280
1283
  footer: e.string().optional()
1281
1284
  });
1282
1285
  var T = e.enum([
@@ -1299,7 +1302,7 @@ var T = e.enum([
1299
1302
  "post-user-registration"
1300
1303
  ]), k = e.enum(["post-user-login"]);
1301
1304
  T.options, E.options, D.options, O.options, k.options;
1302
- var A = e.enum(["impersonate"]), Nt = e.enum([
1305
+ var A = e.enum(["impersonate"]), Ft = e.enum([
1303
1306
  "ensure-username",
1304
1307
  "set-preferred-username",
1305
1308
  "account-linking"
@@ -1309,60 +1312,60 @@ var A = e.enum(["impersonate"]), Nt = e.enum([
1309
1312
  priority: e.number().optional(),
1310
1313
  hook_id: e.string().optional(),
1311
1314
  metadata: e.record(e.string(), e.unknown()).optional()
1312
- }, Pt = e.object({
1315
+ }, It = e.object({
1313
1316
  ...j,
1314
1317
  trigger_id: T,
1315
1318
  url: e.string()
1316
- }), Ft = e.object({
1319
+ }), Lt = e.object({
1317
1320
  ...j,
1318
1321
  trigger_id: E,
1319
1322
  form_id: e.string()
1320
- }), It = e.object({
1323
+ }), Rt = e.object({
1321
1324
  ...j,
1322
1325
  trigger_id: D,
1323
- template_id: Nt
1324
- }), Lt = e.object({
1326
+ template_id: Ft
1327
+ }), zt = e.object({
1325
1328
  ...j,
1326
1329
  trigger_id: O,
1327
1330
  code_id: e.string()
1328
- }), Rt = e.object({
1331
+ }), Bt = e.object({
1329
1332
  ...j,
1330
1333
  trigger_id: k,
1331
1334
  page_id: A,
1332
1335
  permission_required: e.string().optional()
1333
1336
  });
1334
1337
  e.union([
1335
- Pt,
1336
- Ft,
1337
1338
  It,
1338
1339
  Lt,
1339
- Rt
1340
+ Rt,
1341
+ zt,
1342
+ Bt
1340
1343
  ]);
1341
- var zt = e.object({
1344
+ var Vt = e.object({
1342
1345
  ...j,
1343
1346
  trigger_id: T
1344
1347
  }).extend(n.shape).extend({
1345
1348
  hook_id: e.string(),
1346
1349
  url: e.string()
1347
- }), Bt = e.object({
1350
+ }), Ht = e.object({
1348
1351
  ...j,
1349
1352
  trigger_id: E
1350
1353
  }).extend(n.shape).extend({
1351
1354
  hook_id: e.string(),
1352
1355
  form_id: e.string()
1353
- }), Vt = e.object({
1356
+ }), Ut = e.object({
1354
1357
  ...j,
1355
1358
  trigger_id: D
1356
1359
  }).extend(n.shape).extend({
1357
1360
  hook_id: e.string(),
1358
- template_id: Nt
1359
- }), Ht = e.object({
1361
+ template_id: Ft
1362
+ }), Wt = e.object({
1360
1363
  ...j,
1361
1364
  trigger_id: O
1362
1365
  }).extend(n.shape).extend({
1363
1366
  hook_id: e.string(),
1364
1367
  code_id: e.string()
1365
- }), Ut = e.object({
1368
+ }), Gt = e.object({
1366
1369
  ...j,
1367
1370
  trigger_id: k
1368
1371
  }).extend(n.shape).extend({
@@ -1371,11 +1374,11 @@ var zt = e.object({
1371
1374
  permission_required: e.string().optional()
1372
1375
  });
1373
1376
  e.union([
1374
- zt,
1375
- Bt,
1376
1377
  Vt,
1377
1378
  Ht,
1378
- Ut
1379
+ Ut,
1380
+ Wt,
1381
+ Gt
1379
1382
  ]), e.object({
1380
1383
  code: e.string().max(1e5),
1381
1384
  secrets: e.record(e.string(), e.string()).optional()
@@ -1383,11 +1386,11 @@ e.union([
1383
1386
  id: e.string(),
1384
1387
  tenant_id: e.string()
1385
1388
  }).extend(n.shape);
1386
- var Wt = e.object({ name: e.string().optional() }), Gt = e.object({ email: e.string().optional() }), Kt = e.object({
1389
+ var Kt = e.object({ name: e.string().optional() }), qt = e.object({ email: e.string().optional() }), Jt = e.object({
1387
1390
  id: e.string().optional(),
1388
1391
  organization_id: e.string().max(50),
1389
- inviter: Wt,
1390
- invitee: Gt,
1392
+ inviter: Kt,
1393
+ invitee: qt,
1391
1394
  invitation_url: e.string().url(),
1392
1395
  client_id: e.string(),
1393
1396
  connection_id: e.string().optional(),
@@ -1403,8 +1406,8 @@ e.object({
1403
1406
  created_at: e.string().datetime(),
1404
1407
  expires_at: e.string().datetime(),
1405
1408
  ticket_id: e.string().optional()
1406
- }).extend(Kt.omit({ id: !0 }).shape);
1407
- var qt = e.object({
1409
+ }).extend(Jt.omit({ id: !0 }).shape);
1410
+ var Yt = e.object({
1408
1411
  alg: e.enum([
1409
1412
  "RS256",
1410
1413
  "RS384",
@@ -1446,7 +1449,7 @@ var qt = e.object({
1446
1449
  message: `EC JWK is missing required member '${r}'`
1447
1450
  });
1448
1451
  });
1449
- e.object({ keys: e.array(qt) }), e.object({
1452
+ e.object({ keys: e.array(Yt) }), e.object({
1450
1453
  issuer: e.string(),
1451
1454
  authorization_endpoint: e.string(),
1452
1455
  token_endpoint: e.string(),
@@ -1473,28 +1476,28 @@ e.object({ keys: e.array(qt) }), e.object({
1473
1476
  backchannel_logout_supported: e.boolean().optional(),
1474
1477
  backchannel_logout_session_supported: e.boolean().optional()
1475
1478
  });
1476
- var Jt = /* @__PURE__ */ function(e) {
1479
+ var Xt = /* @__PURE__ */ function(e) {
1477
1480
  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;
1478
- }({}), Yt = e.nativeEnum(Jt), Xt = e.object({
1481
+ }({}), Zt = e.nativeEnum(Xt), Qt = e.object({
1479
1482
  strategy: e.string(),
1480
1483
  strategy_type: e.string()
1481
1484
  });
1482
1485
  e.object({
1483
1486
  csrf_token: e.string(),
1484
1487
  auth0Client: e.string().optional(),
1485
- authParams: Ve,
1488
+ authParams: Ue,
1486
1489
  expires_at: e.string(),
1487
1490
  deleted_at: e.string().optional(),
1488
1491
  ip: e.string().optional(),
1489
1492
  useragent: e.string().optional(),
1490
1493
  session_id: e.string().optional(),
1491
1494
  authorization_url: e.string().optional(),
1492
- state: Yt.optional().default("pending"),
1495
+ state: Zt.optional().default("pending"),
1493
1496
  state_data: e.string().optional(),
1494
1497
  failure_reason: e.string().optional(),
1495
1498
  user_id: e.string().optional(),
1496
1499
  auth_connection: e.string().optional(),
1497
- auth_strategy: Xt.optional(),
1500
+ auth_strategy: Qt.optional(),
1498
1501
  authenticated_at: e.string().optional()
1499
1502
  }).openapi({ description: "This represents a login sesion" }).extend({
1500
1503
  id: e.string().openapi({ description: "This is is used as the state in the universal login" }),
@@ -1661,17 +1664,17 @@ var M = {
1661
1664
  WARNING_DURING_LOGIN: "w",
1662
1665
  WARNING_SENDING_NOTIFICATION: "wn",
1663
1666
  WARNING_USER_MANAGEMENT: "wum"
1664
- }, Zt = e.string().refine((e) => Object.values(M).includes(e), { message: "Invalid log type" });
1667
+ }, $t = e.string().refine((e) => Object.values(M).includes(e), { message: "Invalid log type" });
1665
1668
  M.ACLS_SUMMARY, M.ACTIONS_EXECUTION_FAILED, M.API_LIMIT, M.API_LIMIT_WARNING, M.APPI, M.CIBA_EXCHANGE_FAILED, M.CIBA_EXCHANGE_SUCCEEDED, M.CIBA_START_FAILED, M.CIBA_START_SUCCEEDED, M.CODE_LINK_SENT, M.CODE_SENT, M.DEPRECATION_NOTICE, M.FAILED_LOGIN, M.FAILED_BY_CONNECTOR, M.FAILED_CHANGE_EMAIL, M.FAILED_BY_CORS, M.FAILED_CROSS_ORIGIN_AUTHENTICATION, M.FAILED_CHANGE_PASSWORD, M.FAILED_POST_CHANGE_PASSWORD_HOOK, M.FAILED_CHANGE_PHONE_NUMBER, M.FAILED_CHANGE_PASSWORD_REQUEST, M.FAILED_CONNECTOR_PROVISIONING, M.FAILED_CHANGE_USERNAME, M.FAILED_DELEGATION, M.FAILED_DEVICE_ACTIVATION, M.FAILED_DEVICE_AUTHORIZATION_REQUEST, M.USER_CANCELED_DEVICE_CONFIRMATION, M.FAILED_USER_DELETION, M.FAILED_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN, M.FAILED_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS, M.FAILED_EXCHANGE_CUSTOM_TOKEN, M.FAILED_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN, M.FAILED_FEDERATED_LOGOUT, M.FAILED_EXCHANGE_NATIVE_SOCIAL_LOGIN, M.FAILED_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN, M.FAILED_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN, M.FAILED_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN, M.FAILED_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN, M.FAILED_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN, M.FAILED_EXCHANGE_ROTATING_REFRESH_TOKEN, M.FAILED_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN, M.FAILED_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN, M.FAILED_HOOK, M.FAILED_IMPERSONATION, M.FAILED_INVITE_ACCEPT, M.FAILED_LOGOUT, M.FLOWS_EXECUTION_COMPLETED, M.FLOWS_EXECUTION_FAILED, M.FAILED_SENDING_NOTIFICATION, M.FORMS_SUBMISSION_FAILED, M.FORMS_SUBMISSION_SUCCEEDED, M.FAILED_LOGIN_INCORRECT_PASSWORD, M.FAILED_PUSHED_AUTHORIZATION_REQUEST, M.FAILED_POST_USER_REGISTRATION_HOOK, M.FAILED_SIGNUP, M.FAILED_SILENT_AUTH, M.FAILED_LOGIN_INVALID_EMAIL_USERNAME, M.FAILED_USERS_IMPORT, M.FAILED_VERIFICATION_EMAIL, M.FAILED_VERIFICATION_EMAIL_REQUEST, M.EMAIL_VERIFICATION_CONFIRMED, M.EMAIL_VERIFICATION_FAILED, M.MFA_AUTH_FAILED, M.MFA_AUTH_REJECTED, M.MFA_AUTH_SUCCESS, M.MFA_ENROLLMENT_COMPLETE, M.TOO_MANY_MFA_FAILURES, M.MFA_RECOVERY_FAILED, M.MFA_RECOVERY_RATE_LIMIT_EXCEED, M.MFA_RECOVERY_SUCCESS, M.MFA_EMAIL_SENT, M.EMAIL_VERIFICATION_SENT, M.EMAIL_VERIFICATION_SEND_FAILURE, M.PUSH_NOTIFICATION_SENT, M.ERROR_SENDING_MFA_PUSH_NOTIFICATION, M.MFA_SMS_SENT, M.ERROR_SENDING_MFA_SMS, M.MFA_VOICE_CALL_SUCCESS, M.MFA_VOICE_CALL_FAILED, M.SECOND_FACTOR_STARTED, M.MFA_ENROLL_STARTED, M.MFA_ENROLLMENT_FAILED, M.GUARDIAN_TENANT_UPDATE, M.UNENROLL_DEVICE_ACCOUNT, M.UPDATE_DEVICE_ACCOUNT, M.WEBAUTHN_CHALLENGE_FAILED, M.WEBAUTHN_ENROLLMENT_FAILED, M.FAILED_KMS_API_OPERATION, M.SUCCESS_KMS_API_OPERATION, M.KMS_KEY_STATE_CHANGED, M.TOO_MANY_CALLS_TO_DELEGATION, M.BLOCKED_IP_ADDRESS, M.BLOCKED_ACCOUNT_IP, M.BLOCKED_ACCOUNT_EMAIL, M.INFORMATION, M.MFA_REQUIRED, M.MANAGEMENT_API_READ_OPERATION, M.FAILED_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT, M.SUCCESSFUL_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT, M.FAILED_OIDC_BACKCHANNEL_LOGOUT, M.SUCCESSFUL_OIDC_BACKCHANNEL_LOGOUT, M.ORGANIZATION_MEMBER_ADDED, M.PASSKEY_CHALLENGE_FAILED, M.PASSKEY_CHALLENGE_STARTED, M.PRE_LOGIN_ASSESSMENT, M.BREACHED_PASSWORD, M.BREACHED_PASSWORD_ON_RESET, M.SUCCESS_RESOURCE_CLEANUP, M.RICH_CONSENTS_ACCESS_ERROR, M.SUCCESS_LOGIN, M.SUCCESS_API_OPERATION, M.FAILED_API_OPERATION, M.SUCCESS_CHANGE_EMAIL, M.SUCCESS_CROSS_ORIGIN_AUTHENTICATION, M.SUCCESS_CHANGE_PASSWORD, M.SUCCESS_CHANGE_PHONE_NUMBER, M.SUCCESS_CHANGE_PASSWORD_REQUEST, M.SUCCESS_CHANGE_USERNAME, M.SUCCESS_CREDENTIAL_VALIDATION, M.SUCCESS_DELEGATION, M.SUCCESS_USER_DELETION, M.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN, M.SUCCESS_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS, M.SUCCESS_EXCHANGE_CUSTOM_TOKEN, M.SUCCESS_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN, M.SUCCESS_EXCHANGE_NATIVE_SOCIAL_LOGIN, M.SUCCESS_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN, M.SUCCESS_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN, M.SUCCESS_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN, M.SUCCESS_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN, M.SUCCESS_EXCHANGE_PASSKEY_OOB_FOR_ACCESS_TOKEN, M.SUCCESS_EXCHANGE_PASSKEY_OTP_FOR_ACCESS_TOKEN, M.SUCCESS_EXCHANGE_PASSKEY_MFA_RECOVERY_FOR_ACCESS_TOKEN, M.SUCCESS_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN, M.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN, M.SUCCESS_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN, M.SUCCESS_IMPERSONATION, M.SUCCESSFULLY_ACCEPTED_USER_INVITE, M.BREACHED_PASSWORD_ON_SIGNUP, M.SUCCESS_LOGOUT, M.SUCCESS_HOOK, M.SUCCESS_PASSWORD_MIGRATION, M.SUCCESS_REVOCATION, M.SUCCESS_SIGNUP, M.FAILED_SS_SSO_OPERATION, M.INFORMATION_FROM_SS_SSO_OPERATION, M.SUCCESS_SS_SSO_OPERATION, M.SUCCESS_SILENT_AUTH, M.SUCCESSFUL_SCIM_OPERATION, M.SUCCESSFULLY_IMPORTED_USERS, M.SUCCESS_VERIFICATION_EMAIL, M.SUCCESS_VERIFICATION_EMAIL_REQUEST, M.MAX_AMOUNT_OF_AUTHENTICATORS, M.USER_LOGIN_BLOCK_RELEASED, M.FAILED_UNIVERSAL_LOGOUT, M.SUCCESSFUL_UNIVERSAL_LOGOUT, M.WARNING_DURING_LOGIN, M.WARNING_SENDING_NOTIFICATION, M.WARNING_USER_MANAGEMENT, (() => {
1666
1669
  let e = {};
1667
1670
  for (let [t, n] of Object.entries(M)) 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";
1668
1671
  return e;
1669
1672
  })();
1670
- var Qt = e.object({
1673
+ var en = e.object({
1671
1674
  name: e.string(),
1672
1675
  version: e.string(),
1673
1676
  env: e.object({ node: e.string().optional() }).optional()
1674
- }), $t = e.object({
1677
+ }), tn = e.object({
1675
1678
  country_code: e.string().length(2),
1676
1679
  city_name: e.string(),
1677
1680
  latitude: e.string(),
@@ -1680,7 +1683,7 @@ var Qt = e.object({
1680
1683
  continent_code: e.string()
1681
1684
  });
1682
1685
  e.object({
1683
- type: Zt,
1686
+ type: $t,
1684
1687
  date: e.string(),
1685
1688
  description: e.string().optional(),
1686
1689
  ip: e.string().optional(),
@@ -1698,63 +1701,63 @@ e.object({
1698
1701
  strategy: e.string().optional(),
1699
1702
  strategy_type: e.string().optional(),
1700
1703
  hostname: e.string().optional(),
1701
- auth0_client: Qt.optional(),
1704
+ auth0_client: en.optional(),
1702
1705
  log_id: e.string().optional(),
1703
- location_info: $t.optional()
1706
+ location_info: tn.optional()
1704
1707
  }).extend({ log_id: e.string() });
1705
- var en = e.enum([
1708
+ var nn = e.enum([
1706
1709
  "http",
1707
1710
  "eventbridge",
1708
1711
  "eventgrid",
1709
1712
  "splunk",
1710
1713
  "datadog",
1711
1714
  "sumo"
1712
- ]), tn = e.enum([
1715
+ ]), rn = e.enum([
1713
1716
  "active",
1714
1717
  "paused",
1715
1718
  "suspended"
1716
- ]), nn = e.object({
1719
+ ]), an = e.object({
1717
1720
  type: e.string(),
1718
1721
  name: e.string()
1719
1722
  });
1720
1723
  e.object({
1721
1724
  name: e.string(),
1722
- type: en,
1723
- status: tn.optional(),
1725
+ type: nn,
1726
+ status: rn.optional(),
1724
1727
  sink: e.record(e.string(), e.unknown()),
1725
- filters: e.array(nn).optional(),
1728
+ filters: e.array(an).optional(),
1726
1729
  isPriority: e.boolean().optional()
1727
1730
  }).extend({
1728
1731
  id: e.string(),
1729
- status: tn,
1732
+ status: rn,
1730
1733
  created_at: e.string().optional(),
1731
1734
  updated_at: e.string().optional()
1732
1735
  });
1733
- var rn = e.enum([
1736
+ var on = e.enum([
1734
1737
  "auth0",
1735
1738
  "cognito",
1736
1739
  "okta",
1737
1740
  "oidc"
1738
- ]), an = e.object({
1741
+ ]), sn = e.object({
1739
1742
  domain: e.string(),
1740
1743
  client_id: e.string(),
1741
1744
  client_secret: e.string(),
1742
1745
  audience: e.string().optional(),
1743
1746
  scope: e.string().optional()
1744
- }), on = e.object({
1747
+ }), cn = e.object({
1745
1748
  id: e.string().optional(),
1746
1749
  name: e.string(),
1747
- provider: rn,
1750
+ provider: on,
1748
1751
  connection: e.string(),
1749
1752
  enabled: e.boolean().default(!0),
1750
- credentials: an
1753
+ credentials: sn
1751
1754
  });
1752
1755
  e.object({
1753
1756
  id: e.string(),
1754
1757
  created_at: e.string(),
1755
1758
  updated_at: e.string()
1756
- }).extend(on.shape);
1757
- var sn = e.object({
1759
+ }).extend(cn.shape);
1760
+ var ln = e.object({
1758
1761
  enabled: e.boolean().optional(),
1759
1762
  shields: e.array(e.string()).optional(),
1760
1763
  admin_notification_frequency: e.array(e.string()).optional(),
@@ -1763,13 +1766,13 @@ var sn = e.object({
1763
1766
  "pre-user-registration": e.object({ shields: e.array(e.string()).optional() }).optional(),
1764
1767
  "pre-change-password": e.object({ shields: e.array(e.string()).optional() }).optional()
1765
1768
  }).optional()
1766
- }), cn = e.object({
1769
+ }), un = e.object({
1767
1770
  enabled: e.boolean().optional(),
1768
1771
  shields: e.array(e.string()).optional(),
1769
1772
  allowlist: e.array(e.string()).optional(),
1770
1773
  mode: e.string().optional(),
1771
1774
  max_attempts: e.number().optional()
1772
- }), ln = e.object({
1775
+ }), dn = e.object({
1773
1776
  enabled: e.boolean().optional(),
1774
1777
  shields: e.array(e.string()).optional(),
1775
1778
  allowlist: e.array(e.string()).optional(),
@@ -1783,10 +1786,10 @@ var sn = e.object({
1783
1786
  rate: e.number().optional()
1784
1787
  }).optional()
1785
1788
  }).optional()
1786
- }), un = e.object({
1787
- breached_password_detection: sn.optional(),
1788
- brute_force_protection: cn.optional(),
1789
- suspicious_ip_throttling: ln.optional()
1789
+ }), fn = e.object({
1790
+ breached_password_detection: ln.optional(),
1791
+ brute_force_protection: un.optional(),
1792
+ suspicious_ip_throttling: dn.optional()
1790
1793
  });
1791
1794
  e.object({
1792
1795
  id: e.string().optional(),
@@ -1799,14 +1802,14 @@ e.object({
1799
1802
  created_at: e.string(),
1800
1803
  updated_at: e.string()
1801
1804
  });
1802
- var dn = e.object({
1805
+ var pn = e.object({
1803
1806
  initial_user_agent: e.string().describe("First user agent of the device from which this user logged in"),
1804
1807
  initial_ip: e.string().describe("First IP address associated with this session"),
1805
1808
  initial_asn: e.string().describe("First autonomous system number associated with this session"),
1806
1809
  last_user_agent: e.string().describe("Last user agent of the device from which this user logged in"),
1807
1810
  last_ip: e.string().describe("Last IP address from which this user logged in"),
1808
1811
  last_asn: e.string().describe("Last autonomous system number from which this user logged in")
1809
- }), fn = e.object({
1812
+ }), mn = e.object({
1810
1813
  id: e.string(),
1811
1814
  revoked_at: e.string().optional(),
1812
1815
  used_at: e.string().optional(),
@@ -1814,7 +1817,7 @@ var dn = e.object({
1814
1817
  expires_at: e.string().optional(),
1815
1818
  login_session_id: e.string(),
1816
1819
  idle_expires_at: e.string().optional(),
1817
- device: dn.describe("Metadata related to the device used in the session"),
1820
+ device: pn.describe("Metadata related to the device used in the session"),
1818
1821
  clients: e.array(e.string()).describe("List of client details for the session")
1819
1822
  });
1820
1823
  e.object({
@@ -1822,7 +1825,7 @@ e.object({
1822
1825
  updated_at: e.string(),
1823
1826
  authenticated_at: e.string(),
1824
1827
  last_interaction_at: e.string()
1825
- }).extend(fn.shape), e.object({
1828
+ }).extend(mn.shape), e.object({
1826
1829
  kid: e.string().openapi({ description: "The key id of the signing key" }),
1827
1830
  tenant_id: e.string().optional().openapi({ description: "The tenant the key belongs to. Omitted means the key is shared / control-plane scoped." }),
1828
1831
  cert: e.string().openapi({ description: "The public certificate of the signing key" }),
@@ -1839,7 +1842,7 @@ e.object({
1839
1842
  connection: e.string().optional().openapi({ description: "The connection identifier associated with the key" }),
1840
1843
  type: e.enum(["jwt_signing", "saml_encryption"]).openapi({ description: "The type of the signing key" })
1841
1844
  });
1842
- var pn = e.object({
1845
+ var hn = e.object({
1843
1846
  id: e.string().optional(),
1844
1847
  audience: e.string().optional(),
1845
1848
  friendly_name: e.string(),
@@ -1957,7 +1960,7 @@ var pn = e.object({
1957
1960
  "shared_planetscale"
1958
1961
  ]).optional(),
1959
1962
  d1_database_id: e.string().max(64).optional(),
1960
- attack_protection: un.optional(),
1963
+ attack_protection: fn.optional(),
1961
1964
  mfa: e.object({
1962
1965
  policy: e.enum(["never", "always"]).default("never").optional(),
1963
1966
  factors: e.object({
@@ -1988,35 +1991,35 @@ var pn = e.object({
1988
1991
  e.object({
1989
1992
  created_at: e.string().nullable().transform((e) => e ?? ""),
1990
1993
  updated_at: e.string().nullable().transform((e) => e ?? "")
1991
- }).extend(pn.shape).extend({
1994
+ }).extend(hn.shape).extend({
1992
1995
  id: e.string(),
1993
1996
  is_control_plane: e.boolean().optional()
1994
1997
  });
1995
- var mn = e.enum([
1998
+ var gn = e.enum([
1996
1999
  "provision",
1997
2000
  "seed",
1998
2001
  "upgrade",
1999
2002
  "backup",
2000
2003
  "deprovision"
2001
- ]), hn = e.enum([
2004
+ ]), _n = e.enum([
2002
2005
  "pending",
2003
2006
  "running",
2004
2007
  "succeeded",
2005
2008
  "failed",
2006
2009
  "cancelled"
2007
- ]), gn = e.enum(["inline", "cloudflare-workflows"]);
2010
+ ]), vn = e.enum(["inline", "cloudflare-workflows"]);
2008
2011
  e.object({
2009
2012
  tenant_id: e.string().max(255).nullable().default(null),
2010
2013
  rollout_id: e.string().max(255).nullable().optional(),
2011
- kind: mn,
2012
- engine: gn,
2014
+ kind: gn,
2015
+ engine: vn,
2013
2016
  engine_instance_id: e.string().max(100).nullable().optional(),
2014
2017
  target_worker_version: e.string().max(255).nullable().optional(),
2015
2018
  target_database_version: e.string().max(255).nullable().optional(),
2016
2019
  initiated_by: e.string().max(255).nullable().optional()
2017
2020
  }).extend({
2018
2021
  id: e.string(),
2019
- status: hn,
2022
+ status: _n,
2020
2023
  current_step: e.string().max(255).nullable().optional(),
2021
2024
  error: e.string().nullable().optional(),
2022
2025
  created_at: e.string(),
@@ -2031,7 +2034,7 @@ e.object({
2031
2034
  error: !0,
2032
2035
  finished_at: !0
2033
2036
  }).partial();
2034
- var _n = e.enum([
2037
+ var yn = e.enum([
2035
2038
  "started",
2036
2039
  "succeeded",
2037
2040
  "failed",
@@ -2042,18 +2045,18 @@ var _n = e.enum([
2042
2045
  e.object({
2043
2046
  operation_id: e.string().max(255),
2044
2047
  step: e.string().max(255),
2045
- outcome: _n,
2048
+ outcome: yn,
2046
2049
  detail: e.record(e.string(), e.unknown()).nullable().optional(),
2047
2050
  attempt: e.number().int().min(1).default(1)
2048
2051
  }).extend({
2049
2052
  id: e.string(),
2050
2053
  created_at: e.string()
2051
2054
  });
2052
- var vn = e.enum([
2055
+ var bn = e.enum([
2053
2056
  "upgrade",
2054
2057
  "reseed",
2055
2058
  "backup"
2056
- ]), yn = e.enum([
2059
+ ]), xn = e.enum([
2057
2060
  "pending",
2058
2061
  "canary",
2059
2062
  "rolling",
@@ -2062,7 +2065,7 @@ var vn = e.enum([
2062
2065
  "failed"
2063
2066
  ]);
2064
2067
  e.object({
2065
- kind: vn,
2068
+ kind: bn,
2066
2069
  target_worker_version: e.string().max(255).nullable().optional(),
2067
2070
  target_database_version: e.string().max(255).nullable().optional(),
2068
2071
  wave_size: e.number().int().min(1).default(10),
@@ -2071,7 +2074,7 @@ e.object({
2071
2074
  initiated_by: e.string().max(255).nullable().optional()
2072
2075
  }).extend({
2073
2076
  id: e.string(),
2074
- status: yn,
2077
+ status: xn,
2075
2078
  created_at: e.string(),
2076
2079
  updated_at: e.string(),
2077
2080
  finished_at: e.string().nullable().optional()
@@ -2093,7 +2096,7 @@ e.object({
2093
2096
  code: e.string(),
2094
2097
  state: e.string().optional()
2095
2098
  });
2096
- var bn = e.object({
2099
+ var Sn = e.object({
2097
2100
  button_border_radius: e.number(),
2098
2101
  button_border_weight: e.number(),
2099
2102
  buttons_style: e.enum([
@@ -2111,7 +2114,7 @@ var bn = e.object({
2111
2114
  show_widget_shadow: e.boolean(),
2112
2115
  widget_border_weight: e.number(),
2113
2116
  widget_corner_radius: e.number()
2114
- }), xn = e.object({
2117
+ }), Cn = e.object({
2115
2118
  base_focus_color: e.string(),
2116
2119
  base_hover_color: e.string(),
2117
2120
  body_text: e.string(),
@@ -2138,7 +2141,7 @@ var bn = e.object({
2138
2141
  }), N = e.object({
2139
2142
  bold: e.boolean(),
2140
2143
  size: e.number()
2141
- }), Sn = e.object({
2144
+ }), wn = e.object({
2142
2145
  body_text: N,
2143
2146
  buttons_text: N,
2144
2147
  font_url: e.string(),
@@ -2148,7 +2151,7 @@ var bn = e.object({
2148
2151
  reference_text_size: e.number(),
2149
2152
  subtitle: N,
2150
2153
  title: N
2151
- }), Cn = e.object({
2154
+ }), Tn = e.object({
2152
2155
  background_color: e.string(),
2153
2156
  background_image_url: e.string(),
2154
2157
  page_layout: e.enum([
@@ -2161,7 +2164,7 @@ var bn = e.object({
2161
2164
  "chip",
2162
2165
  "none"
2163
2166
  ]).optional()
2164
- }), wn = e.object({
2167
+ }), En = e.object({
2165
2168
  header_text_alignment: e.enum([
2166
2169
  "center",
2167
2170
  "left",
@@ -2178,12 +2181,12 @@ var bn = e.object({
2178
2181
  social_buttons_layout: e.enum(["bottom", "top"])
2179
2182
  });
2180
2183
  e.object({
2181
- borders: bn,
2182
- colors: xn,
2184
+ borders: Sn,
2185
+ colors: Cn,
2183
2186
  displayName: e.string(),
2184
- fonts: Sn,
2185
- page_background: Cn,
2186
- widget: wn
2187
+ fonts: wn,
2188
+ page_background: Tn,
2189
+ widget: En
2187
2190
  }).extend({ themeId: e.string() }), e.object({
2188
2191
  universal_login_experience: e.enum(["new", "classic"]).default("new"),
2189
2192
  identifier_first: e.boolean().default(!0),
@@ -2191,42 +2194,42 @@ e.object({
2191
2194
  show_last_used_connection: e.boolean().default(!1),
2192
2195
  webauthn_platform_first_factor: e.boolean()
2193
2196
  });
2194
- var Tn = e.object({
2197
+ var Dn = e.object({
2195
2198
  hosts: e.array(e.string()).optional(),
2196
2199
  methods: e.array(e.string()).optional(),
2197
2200
  path: e.string().default("/*"),
2198
2201
  headers: e.record(e.string(), e.string()).optional(),
2199
2202
  query: e.record(e.string(), e.string()).optional()
2200
- }), En = e.object({
2203
+ }), On = e.object({
2201
2204
  type: e.string(),
2202
2205
  options: e.record(e.string(), e.unknown()).default({})
2203
2206
  }), P = e.object({
2204
2207
  id: e.string().optional(),
2205
2208
  custom_domain_id: e.string(),
2206
2209
  priority: e.number().int().default(100),
2207
- match: Tn,
2208
- handlers: e.array(En).min(1)
2209
- }), Dn = P.extend({
2210
+ match: Dn,
2211
+ handlers: e.array(On).min(1)
2212
+ }), kn = P.extend({
2210
2213
  id: e.string(),
2211
2214
  tenant_id: e.string(),
2212
2215
  created_at: e.string(),
2213
2216
  updated_at: e.string()
2214
- }), On = P.partial().omit({
2217
+ }), An = P.partial().omit({
2215
2218
  id: !0,
2216
2219
  custom_domain_id: !0
2217
- }), kn = e.object({
2220
+ }), jn = e.object({
2218
2221
  scim: e.string(),
2219
2222
  auth0: e.string()
2220
- }), An = e.object({
2223
+ }), Mn = e.object({
2221
2224
  connection_id: e.string(),
2222
2225
  user_id_attribute: e.string().default("externalId"),
2223
- mapping: e.array(kn).default([])
2226
+ mapping: e.array(jn).default([])
2224
2227
  });
2225
2228
  e.object({
2226
2229
  created_at: e.string(),
2227
2230
  updated_at: e.string()
2228
- }).extend(An.shape);
2229
- var jn = e.object({
2231
+ }).extend(Mn.shape);
2232
+ var Nn = e.object({
2230
2233
  token_id: e.string(),
2231
2234
  connection_id: e.string(),
2232
2235
  token_hash: e.string(),
@@ -2236,20 +2239,20 @@ var jn = e.object({
2236
2239
  e.object({
2237
2240
  created_at: e.string(),
2238
2241
  last_used_at: e.string().optional()
2239
- }).extend(jn.shape);
2240
- var Mn = e.object({
2242
+ }).extend(Nn.shape);
2243
+ var Pn = e.object({
2241
2244
  connection_id: e.string(),
2242
2245
  external_id: e.string(),
2243
2246
  user_id: e.string()
2244
2247
  });
2245
- e.object({ created_at: e.string() }).extend(Mn.shape), e.object({
2248
+ e.object({ created_at: e.string() }).extend(Pn.shape), e.object({
2246
2249
  name: e.string(),
2247
2250
  enabled: e.boolean().optional().default(!0),
2248
2251
  default_from_address: e.string().optional(),
2249
2252
  credentials: e.record(e.string(), e.unknown()),
2250
2253
  settings: e.object({}).optional()
2251
2254
  });
2252
- var Nn = e.enum([
2255
+ var Fn = e.enum([
2253
2256
  "verify_email",
2254
2257
  "verify_email_by_code",
2255
2258
  "reset_email",
@@ -2264,7 +2267,7 @@ var Nn = e.enum([
2264
2267
  "user_invitation"
2265
2268
  ]);
2266
2269
  e.object({
2267
- template: Nn,
2270
+ template: Fn,
2268
2271
  body: e.string(),
2269
2272
  from: e.string(),
2270
2273
  subject: e.string(),
@@ -2279,13 +2282,13 @@ e.object({
2279
2282
  session_id: e.string().optional(),
2280
2283
  organization: e.string().optional(),
2281
2284
  auth_connection: e.string().optional(),
2282
- auth_strategy: Xt.optional(),
2285
+ auth_strategy: Qt.optional(),
2283
2286
  user_id: e.string(),
2284
2287
  client_id: e.string(),
2285
2288
  expires_at: e.string().optional(),
2286
2289
  idle_expires_at: e.string().optional(),
2287
2290
  last_exchanged_at: e.string().optional(),
2288
- device: dn,
2291
+ device: pn,
2289
2292
  resource_servers: e.array(e.object({
2290
2293
  audience: e.string(),
2291
2294
  scopes: e.string()
@@ -2306,10 +2309,10 @@ e.object({
2306
2309
  name: e.string(),
2307
2310
  options: e.object({})
2308
2311
  });
2309
- var Pn = e.object({
2312
+ var In = e.object({
2310
2313
  value: e.string(),
2311
2314
  description: e.string().optional()
2312
- }), Fn = e.object({
2315
+ }), Ln = e.object({
2313
2316
  token_dialect: e.enum(["access_token", "access_token_authz"]).optional(),
2314
2317
  enforce_policies: e.boolean().optional(),
2315
2318
  allow_skipping_userinfo: e.boolean().optional(),
@@ -2317,11 +2320,11 @@ var Pn = e.object({
2317
2320
  persist_client_authorization: e.boolean().optional(),
2318
2321
  enable_introspection_endpoint: e.boolean().optional(),
2319
2322
  mtls: e.object({ bound_access_tokens: e.boolean().optional() }).optional()
2320
- }), In = e.object({
2323
+ }), Rn = e.object({
2321
2324
  id: e.string().optional(),
2322
2325
  name: e.string(),
2323
2326
  identifier: e.string(),
2324
- scopes: e.array(Pn).optional(),
2327
+ scopes: e.array(In).optional(),
2325
2328
  signing_alg: e.string().optional(),
2326
2329
  signing_secret: e.string().optional(),
2327
2330
  token_lifetime: e.number().default(86400),
@@ -2329,20 +2332,20 @@ var Pn = e.object({
2329
2332
  skip_consent_for_verifiable_first_party_clients: e.boolean().optional(),
2330
2333
  allow_offline_access: e.boolean().optional(),
2331
2334
  verificationKey: e.string().optional(),
2332
- options: Fn.optional(),
2335
+ options: Ln.optional(),
2333
2336
  is_system: e.boolean().optional(),
2334
2337
  metadata: e.record(e.string(), e.any()).optional()
2335
2338
  }).extend({
2336
2339
  created_at: e.string().optional(),
2337
2340
  updated_at: e.string().optional()
2338
2341
  });
2339
- e.array(In);
2340
- var Ln = e.object({
2342
+ e.array(Rn);
2343
+ var zn = e.object({
2341
2344
  role_id: e.string(),
2342
2345
  resource_server_identifier: e.string(),
2343
2346
  permission_name: e.string()
2344
2347
  }).extend({ created_at: e.string() });
2345
- e.array(Ln), e.object({
2348
+ e.array(zn), e.object({
2346
2349
  user_id: e.string().openapi({ description: "The id of the user that granted the consent" }),
2347
2350
  clientID: e.string().openapi({ description: "The id of the client the grant was issued to" }),
2348
2351
  audience: e.string().optional().openapi({ description: "The audience the grant applies to" }),
@@ -2355,7 +2358,7 @@ e.array(Ln), e.object({
2355
2358
  failed_logins: e.array(e.string()).optional(),
2356
2359
  last_password_reset: e.string().optional()
2357
2360
  });
2358
- var Rn = e.object({
2361
+ var Bn = e.object({
2359
2362
  user_id: e.string(),
2360
2363
  resource_server_identifier: e.string(),
2361
2364
  permission_name: e.string(),
@@ -2364,8 +2367,8 @@ var Rn = e.object({
2364
2367
  tenant_id: e.string(),
2365
2368
  created_at: e.string().optional()
2366
2369
  });
2367
- e.array(Rn);
2368
- var zn = e.object({
2370
+ e.array(Bn);
2371
+ var Vn = e.object({
2369
2372
  user_id: e.string(),
2370
2373
  resource_server_identifier: e.string(),
2371
2374
  resource_server_name: e.string(),
@@ -2374,8 +2377,8 @@ var zn = e.object({
2374
2377
  created_at: e.string().optional(),
2375
2378
  organization_id: e.string().optional()
2376
2379
  });
2377
- e.array(zn);
2378
- var Bn = e.object({
2380
+ e.array(Vn);
2381
+ var Hn = e.object({
2379
2382
  user_id: e.string(),
2380
2383
  role_id: e.string(),
2381
2384
  organization_id: e.string().optional()
@@ -2383,8 +2386,8 @@ var Bn = e.object({
2383
2386
  tenant_id: e.string(),
2384
2387
  created_at: e.string().optional()
2385
2388
  });
2386
- e.array(Bn);
2387
- var Vn = e.object({
2389
+ e.array(Hn);
2390
+ var Un = e.object({
2388
2391
  id: e.string().optional().openapi({ description: "The unique identifier of the role. If not provided, one will be generated." }),
2389
2392
  name: e.string().min(1).max(50).openapi({ description: "The name of the role. Cannot include '<' or '>'" }),
2390
2393
  description: e.string().max(255).optional().openapi({ description: "The description of the role" }),
@@ -2395,19 +2398,19 @@ var Vn = e.object({
2395
2398
  created_at: e.string().optional(),
2396
2399
  updated_at: e.string().optional()
2397
2400
  });
2398
- e.array(Vn);
2399
- var Hn = e.object({
2401
+ e.array(Un);
2402
+ var Wn = e.object({
2400
2403
  logo_url: e.string().optional().openapi({ description: "URL of the organization's logo" }),
2401
2404
  colors: e.object({
2402
2405
  primary: e.string().optional().openapi({ description: "Primary color in hex format (e.g., #FF0000)" }),
2403
2406
  page_background: e.string().optional().openapi({ description: "Page background color in hex format (e.g., #FFFFFF)" })
2404
2407
  }).optional()
2405
- }).optional(), Un = e.object({
2408
+ }).optional(), Gn = e.object({
2406
2409
  connection_id: e.string().openapi({ description: "ID of the connection" }),
2407
2410
  assign_membership_on_login: e.boolean().default(!1).openapi({ description: "Whether to assign membership to the organization on login" }),
2408
2411
  show_as_button: e.boolean().default(!0).openapi({ description: "Whether to show this connection as a button in the login screen" }),
2409
2412
  is_signup_enabled: e.boolean().default(!0).openapi({ description: "Whether signup is enabled for this connection" })
2410
- }), Wn = e.object({ client_credentials: e.object({
2413
+ }), Kn = e.object({ client_credentials: e.object({
2411
2414
  enforce: e.boolean().default(!1).openapi({ description: "Whether to enforce token quota limits" }),
2412
2415
  per_day: e.number().min(0).default(0).openapi({ description: "Maximum tokens per day (0 = unlimited)" }),
2413
2416
  per_hour: e.number().min(0).default(0).openapi({ description: "Maximum tokens per hour (0 = unlimited)" })
@@ -2416,15 +2419,15 @@ e.object({
2416
2419
  id: e.string().optional(),
2417
2420
  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." }),
2418
2421
  display_name: e.string().optional().openapi({ description: "The display name of the organization" }),
2419
- branding: Hn,
2422
+ branding: Wn,
2420
2423
  metadata: e.record(e.string(), e.any()).default({}).optional().openapi({ description: "Custom metadata for the organization" }),
2421
- enabled_connections: e.array(Un).default([]).optional().openapi({ description: "List of enabled connections for the organization" }),
2422
- token_quota: Wn
2424
+ enabled_connections: e.array(Gn).default([]).optional().openapi({ description: "List of enabled connections for the organization" }),
2425
+ token_quota: Kn
2423
2426
  }).extend(n.shape).extend({
2424
2427
  id: e.string(),
2425
2428
  name: e.string().min(1).openapi({ description: "The name of the organization" })
2426
2429
  });
2427
- var Gn = e.object({
2430
+ var qn = e.object({
2428
2431
  connection_id: e.string().openapi({ description: "ID of the tenant-level connection to enable for the org." }),
2429
2432
  assign_membership_on_login: e.boolean().optional().default(!1),
2430
2433
  show_as_button: e.boolean().optional().default(!0),
@@ -2437,7 +2440,7 @@ var Gn = e.object({
2437
2440
  created_at: e.string().optional(),
2438
2441
  updated_at: e.string().optional()
2439
2442
  });
2440
- e.array(Gn), e.object({
2443
+ e.array(qn), e.object({
2441
2444
  user_id: e.string().openapi({ description: "ID of the user" }),
2442
2445
  organization_id: e.string().openapi({ description: "ID of the organization" })
2443
2446
  }).extend(n.shape).extend({ id: e.string() }), e.object({
@@ -2576,7 +2579,7 @@ e.array(Gn), e.object({
2576
2579
  "passwordless",
2577
2580
  "enterprise"
2578
2581
  ]);
2579
- var Kn = e.object({
2582
+ var Jn = e.object({
2580
2583
  cohort: e.string(),
2581
2584
  sessions: e.number(),
2582
2585
  active: e.array(e.number())
@@ -2585,9 +2588,9 @@ e.object({
2585
2588
  interval: e.literal("week"),
2586
2589
  from: e.string(),
2587
2590
  to: e.string(),
2588
- cohorts: e.array(Kn)
2591
+ cohorts: e.array(Jn)
2589
2592
  });
2590
- var qn = e.object({
2593
+ var Yn = e.object({
2591
2594
  cohort: e.string(),
2592
2595
  tokens: e.number(),
2593
2596
  active: e.array(e.number())
@@ -2596,24 +2599,24 @@ e.object({
2596
2599
  interval: e.literal("week"),
2597
2600
  from: e.string(),
2598
2601
  to: e.string(),
2599
- cohorts: e.array(qn)
2602
+ cohorts: e.array(Yn)
2600
2603
  });
2601
- var Jn = e.object({
2604
+ var Xn = e.object({
2602
2605
  name: e.string(),
2603
2606
  type: e.string()
2604
- }), Yn = e.object({
2607
+ }), Zn = e.object({
2605
2608
  elapsed: e.number(),
2606
2609
  rows_read: e.number().optional(),
2607
2610
  bytes_read: e.number().optional()
2608
2611
  });
2609
2612
  e.object({
2610
- meta: e.array(Jn),
2613
+ meta: e.array(Xn),
2611
2614
  data: e.array(e.record(e.string(), e.any())),
2612
2615
  rows: e.number(),
2613
2616
  rows_before_limit_at_least: e.number().optional(),
2614
- statistics: Yn.optional()
2617
+ statistics: Zn.optional()
2615
2618
  });
2616
- 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({
2619
+ var Qn = 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(".")), $n = e.record(e.string(), e.record(e.string(), e.string())).openapi({
2617
2620
  type: "object",
2618
2621
  additionalProperties: {
2619
2622
  type: "object",
@@ -2621,11 +2624,11 @@ var Xn = e.enum(/* @__PURE__ */ "login.login-id.login-password.signup.signup-id.
2621
2624
  }
2622
2625
  });
2623
2626
  e.object({
2624
- prompt: Xn,
2627
+ prompt: Qn,
2625
2628
  language: e.string(),
2626
- custom_text: Zn
2629
+ custom_text: $n
2627
2630
  });
2628
- var Qn = e.enum([
2631
+ var er = e.enum([
2629
2632
  "phone",
2630
2633
  "totp",
2631
2634
  "email",
@@ -2633,9 +2636,9 @@ var Qn = e.enum([
2633
2636
  "webauthn-roaming",
2634
2637
  "webauthn-platform",
2635
2638
  "passkey"
2636
- ]), $n = e.object({
2639
+ ]), tr = e.object({
2637
2640
  user_id: e.string(),
2638
- type: Qn,
2641
+ type: er,
2639
2642
  phone_number: e.string().optional(),
2640
2643
  totp_secret: e.string().optional(),
2641
2644
  credential_id: e.string().optional(),
@@ -2669,7 +2672,7 @@ function F(t, n) {
2669
2672
  path: ["public_key"]
2670
2673
  }));
2671
2674
  }
2672
- $n.superRefine(F), $n.extend({
2675
+ tr.superRefine(F), tr.extend({
2673
2676
  id: e.string(),
2674
2677
  created_at: e.string(),
2675
2678
  updated_at: e.string()
@@ -2678,14 +2681,12 @@ $n.superRefine(F), $n.extend({
2678
2681
  created_at: e.string().datetime({ offset: !0 }).optional(),
2679
2682
  updated_at: e.string().datetime({ offset: !0 }).optional()
2680
2683
  });
2681
- //#endregion
2682
- //#region src/data-plane/cache.ts
2683
- var er = 1e4;
2684
+ var nr = "x-authhero-preserve-location", rr = 1e4;
2684
2685
  function I(e, t, n) {
2685
2686
  let r = typeof t == "number" ? {
2686
2687
  freshTtlMs: t,
2687
2688
  maxEntries: n
2688
- } : t, i = r.freshTtlMs, a = r.staleTtlMs ?? 0, o = r.staleIfErrorTtlMs ?? 0, s = r.negativeTtlMs ?? i, c = r.maxEntries ?? er, l = r.waitUntil, u = /* @__PURE__ */ new Map();
2689
+ } : t, i = r.freshTtlMs, a = r.staleTtlMs ?? 0, o = r.staleIfErrorTtlMs ?? 0, s = r.negativeTtlMs ?? i, c = r.maxEntries ?? rr, l = r.waitUntil, u = /* @__PURE__ */ new Map();
2689
2690
  function d(e) {
2690
2691
  for (let [t, n] of u) n.stale_if_error_until <= e && n.stale_until <= e && !n.refreshing && u.delete(t);
2691
2692
  for (; u.size >= c;) {
@@ -2767,33 +2768,33 @@ function R(e) {
2767
2768
  }
2768
2769
  //#endregion
2769
2770
  //#region src/data-plane/handlers/util.ts
2770
- var z = "__authhero_proxy_request__", B = "__authhero_proxy_tenant_id__", V = "__authhero_proxy_custom_domain_id__", H = "__authhero_proxy_domain__", tr = "x-authhero-proxy-mutability-probe";
2771
- function nr(e, t) {
2771
+ var z = "__authhero_proxy_request__", B = "__authhero_proxy_tenant_id__", V = "__authhero_proxy_custom_domain_id__", H = "__authhero_proxy_domain__", ir = "x-authhero-proxy-mutability-probe";
2772
+ function ar(e, t) {
2772
2773
  e.set(z, t);
2773
2774
  }
2774
2775
  function U(e) {
2775
2776
  return e.get(z) ?? e.req.raw;
2776
2777
  }
2777
- function rr(e, t) {
2778
+ function or(e, t) {
2778
2779
  e.set(B, t.tenant_id), e.set(V, t.custom_domain_id), e.set(H, t.domain);
2779
2780
  }
2780
- function ir(e) {
2781
+ function sr(e) {
2781
2782
  return e.get(B);
2782
2783
  }
2783
- function ar(e) {
2784
+ function cr(e) {
2784
2785
  return e.get(V);
2785
2786
  }
2786
- function or(e) {
2787
+ function lr(e) {
2787
2788
  return e.get(H);
2788
2789
  }
2789
- function sr(e, t) {
2790
+ function ur(e, t) {
2790
2791
  let n = U(e), r = new Headers(n.headers);
2791
- t(r), nr(e, new Request(n, { headers: r }));
2792
+ t(r), ar(e, new Request(n, { headers: r }));
2792
2793
  }
2793
2794
  function W(e) {
2794
2795
  let t = e.res;
2795
2796
  try {
2796
- t.headers.append(tr, "1"), t.headers.delete(tr);
2797
+ t.headers.append(ir, "1"), t.headers.delete(ir);
2797
2798
  return;
2798
2799
  } catch {
2799
2800
  e.res = new Response(t.body, {
@@ -2805,7 +2806,7 @@ function W(e) {
2805
2806
  }
2806
2807
  //#endregion
2807
2808
  //#region src/data-plane/handlers/cors.ts
2808
- var cr = e.object({
2809
+ var dr = e.object({
2809
2810
  origins: e.array(e.string()).optional(),
2810
2811
  allow_credentials: e.boolean().optional(),
2811
2812
  allow_headers: e.array(e.string()).optional(),
@@ -2813,44 +2814,44 @@ var cr = e.object({
2813
2814
  expose_headers: e.array(e.string()).optional(),
2814
2815
  max_age: e.number().int().optional()
2815
2816
  }).refine((e) => !(e.allow_credentials && e.origins?.includes("*")), { message: "Cannot use wildcard origin (*) with allow_credentials" });
2816
- function lr(e, t) {
2817
+ function fr(e, t) {
2817
2818
  let n = new Headers(), r = e.origins ?? ["*"], i = r.includes("*");
2818
2819
  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;
2819
2820
  }
2820
- var ur = R({
2821
+ var pr = R({
2821
2822
  type: "cors",
2822
- optionsSchema: cr,
2823
+ optionsSchema: dr,
2823
2824
  build(e) {
2824
2825
  return async (t, n) => {
2825
2826
  let r = t.req.header("origin") ?? null;
2826
2827
  if (t.req.method === "OPTIONS" && r !== null && t.req.header("access-control-request-method") !== void 0) {
2827
- let t = lr(e, r);
2828
+ let t = fr(e, r);
2828
2829
  return new Response(null, {
2829
2830
  status: 204,
2830
2831
  headers: t
2831
2832
  });
2832
2833
  }
2833
2834
  await n();
2834
- let i = lr(e, r);
2835
+ let i = fr(e, r);
2835
2836
  W(t), i.forEach((e, n) => {
2836
2837
  n.toLowerCase() === "vary" ? t.res.headers.append(n, e) : t.res.headers.set(n, e);
2837
2838
  });
2838
2839
  };
2839
2840
  }
2840
- }), dr = e.object({
2841
+ }), mr = e.object({
2841
2842
  username: e.string(),
2842
2843
  password: e.string(),
2843
2844
  realm: e.string().optional()
2844
2845
  });
2845
- function fr(e, t) {
2846
+ function hr(e, t) {
2846
2847
  let n = `${e}:${t}`;
2847
2848
  return typeof btoa == "function" ? btoa(n) : Buffer.from(n, "utf-8").toString("base64");
2848
2849
  }
2849
- var pr = R({
2850
+ var gr = R({
2850
2851
  type: "basic_auth",
2851
- optionsSchema: dr,
2852
+ optionsSchema: mr,
2852
2853
  build(e) {
2853
- let t = fr(e.username, e.password), n = (e.realm ?? "Restricted").replace(/["\\\r\n]/g, "");
2854
+ let t = hr(e.username, e.password), n = (e.realm ?? "Restricted").replace(/["\\\r\n]/g, "");
2854
2855
  return async (e, r) => {
2855
2856
  let i = e.req.header("authorization");
2856
2857
  if (i) {
@@ -2866,7 +2867,7 @@ var pr = R({
2866
2867
  });
2867
2868
  };
2868
2869
  }
2869
- }), mr = R({
2870
+ }), _r = R({
2870
2871
  type: "headers",
2871
2872
  optionsSchema: e.object({
2872
2873
  request: e.record(e.string(), e.string()).optional(),
@@ -2876,12 +2877,12 @@ var pr = R({
2876
2877
  }),
2877
2878
  build(e) {
2878
2879
  return async (t, n) => {
2879
- if ((e.request || e.remove_request) && sr(t, (t) => {
2880
+ if ((e.request || e.remove_request) && ur(t, (t) => {
2880
2881
  if (e.remove_request?.forEach((e) => t.delete(e)), e.request) for (let [n, r] of Object.entries(e.request)) t.set(n, r);
2881
2882
  }), await n(), (e.response || e.remove_response) && (W(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);
2882
2883
  };
2883
2884
  }
2884
- }), hr = R({
2885
+ }), vr = R({
2885
2886
  type: "cache",
2886
2887
  optionsSchema: e.object({ ttl_seconds: e.number().int().positive() }),
2887
2888
  build(e) {
@@ -2892,7 +2893,7 @@ var pr = R({
2892
2893
  }
2893
2894
  };
2894
2895
  }
2895
- }), gr = [
2896
+ }), yr = [
2896
2897
  "173.245.48.0/20",
2897
2898
  "103.21.244.0/22",
2898
2899
  "103.22.200.0/22",
@@ -2916,7 +2917,7 @@ var pr = R({
2916
2917
  "2a06:98c0::/29",
2917
2918
  "2c0f:f248::/32"
2918
2919
  ];
2919
- function _r(e) {
2920
+ function br(e) {
2920
2921
  let t = e.split(".");
2921
2922
  if (t.length !== 4) return null;
2922
2923
  let n = [];
@@ -2928,14 +2929,14 @@ function _r(e) {
2928
2929
  }
2929
2930
  return n;
2930
2931
  }
2931
- function vr(e) {
2932
+ function xr(e) {
2932
2933
  if (e === "") return [];
2933
2934
  let t = e.split(":"), n = [];
2934
2935
  for (let e = 0; e < t.length; e++) {
2935
2936
  let r = t[e];
2936
2937
  if (r.includes(".")) {
2937
2938
  if (e !== t.length - 1) return null;
2938
- let i = _r(r);
2939
+ let i = br(r);
2939
2940
  if (!i) return null;
2940
2941
  n.push(i[0] << 8 | i[1], i[2] << 8 | i[3]);
2941
2942
  continue;
@@ -2945,14 +2946,14 @@ function vr(e) {
2945
2946
  }
2946
2947
  return n;
2947
2948
  }
2948
- function yr(e) {
2949
+ function Sr(e) {
2949
2950
  let t = e.split("::");
2950
2951
  if (t.length > 2) return null;
2951
- let n = vr(t[0] ?? "");
2952
+ let n = xr(t[0] ?? "");
2952
2953
  if (!n) return null;
2953
2954
  let r;
2954
2955
  if (t.length === 2) {
2955
- let e = vr(t[1] ?? "");
2956
+ let e = xr(t[1] ?? "");
2956
2957
  if (!e) return null;
2957
2958
  let i = 8 - n.length - e.length;
2958
2959
  if (i < 1) return null;
@@ -2967,25 +2968,25 @@ function yr(e) {
2967
2968
  for (let e of r) i.push(e >> 8 & 255, e & 255);
2968
2969
  return i;
2969
2970
  }
2970
- function br(e) {
2971
+ function Cr(e) {
2971
2972
  let t = e.trim();
2972
2973
  t.startsWith("[") && t.endsWith("]") && (t = t.slice(1, -1));
2973
2974
  let n = t.indexOf("%");
2974
2975
  if (n !== -1 && (t = t.slice(0, n)), t === "") return null;
2975
- if (!t.includes(":")) return _r(t);
2976
- let r = yr(t);
2976
+ if (!t.includes(":")) return br(t);
2977
+ let r = Sr(t);
2977
2978
  return r ? r.slice(0, 10).every((e) => e === 0) && r[10] === 255 && r[11] === 255 ? r.slice(12) : r : null;
2978
2979
  }
2979
- function xr(e) {
2980
- let [t, n] = e.split("/"), r = br(t ?? ""), i = Number(n);
2980
+ function wr(e) {
2981
+ let [t, n] = e.split("/"), r = Cr(t ?? ""), i = Number(n);
2981
2982
  if (!r || !Number.isInteger(i)) throw Error(`Invalid Cloudflare CIDR: ${e}`);
2982
2983
  return {
2983
2984
  bytes: r,
2984
2985
  prefixBits: i
2985
2986
  };
2986
2987
  }
2987
- var Sr = gr.map(xr);
2988
- function Cr(e, t) {
2988
+ var Tr = yr.map(wr);
2989
+ function Er(e, t) {
2989
2990
  if (e.length !== t.bytes.length) return !1;
2990
2991
  let n = t.prefixBits >> 3;
2991
2992
  for (let r = 0; r < n; r++) if (e[r] !== t.bytes[r]) return !1;
@@ -2994,11 +2995,11 @@ function Cr(e, t) {
2994
2995
  let i = 255 << 8 - r & 255;
2995
2996
  return (e[n] & i) === (t.bytes[n] & i);
2996
2997
  }
2997
- function wr(e) {
2998
- let t = br(e);
2999
- return t ? Sr.some((e) => Cr(t, e)) : !1;
2998
+ function Dr(e) {
2999
+ let t = Cr(e);
3000
+ return t ? Tr.some((e) => Er(t, e)) : !1;
3000
3001
  }
3001
- var Tr = R({
3002
+ var Or = R({
3002
3003
  type: "forwarded_headers",
3003
3004
  optionsSchema: e.object({
3004
3005
  client_ip_header: e.string().default("cf-connecting-ip"),
@@ -3009,45 +3010,48 @@ var Tr = R({
3009
3010
  build(e) {
3010
3011
  return async (t, n) => {
3011
3012
  let r = new URL(t.req.url);
3012
- sr(t, (n) => {
3013
+ ur(t, (n) => {
3013
3014
  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);
3014
- let i = n.get(e.client_ip_header), a = i && e.skip_cloudflare_client_ip && wr(i) ? null : i, o = (n.get("x-forwarded-for") ?? "").split(",").map((e) => e.trim()).filter(Boolean), s = a ?? o[o.length - 1] ?? "127.0.0.1", c = o.length === 0 || o[o.length - 1] !== s, l = o.length ? c ? `${o.join(", ")}, ${s}` : o.join(", ") : s;
3015
+ let i = n.get(e.client_ip_header), a = i && e.skip_cloudflare_client_ip && Dr(i) ? null : i, o = (n.get("x-forwarded-for") ?? "").split(",").map((e) => e.trim()).filter(Boolean), s = a ?? o[o.length - 1] ?? "127.0.0.1", c = o.length === 0 || o[o.length - 1] !== s, l = o.length ? c ? `${o.join(", ")}, ${s}` : o.join(", ") : s;
3015
3016
  n.set("x-forwarded-for", l), e.set_x_real_ip && n.set("x-real-ip", s);
3016
3017
  }), await n();
3017
3018
  };
3018
3019
  }
3019
- }), Er = e.object({ upstream_host: e.string().optional() });
3020
- function Dr(e) {
3020
+ }), kr = e.object({ upstream_host: e.string().optional() });
3021
+ function Ar(e) {
3021
3022
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
3022
3023
  }
3023
- function Or(e) {
3024
+ function jr(e) {
3024
3025
  if (typeof e.getSetCookie == "function") return e.getSetCookie();
3025
3026
  let t = [];
3026
3027
  return e.forEach((e, n) => {
3027
3028
  n.toLowerCase() === "set-cookie" && t.push(e);
3028
3029
  }), t;
3029
3030
  }
3030
- var kr = R({
3031
+ var Mr = R({
3031
3032
  type: "rewrite_cookies",
3032
- optionsSchema: Er,
3033
+ optionsSchema: kr,
3033
3034
  build(e) {
3034
3035
  return async (t, n) => {
3035
3036
  await n();
3036
3037
  let r = new URL(t.req.url).hostname, i = e.upstream_host ?? t.get("__proxy_upstream_host__");
3037
3038
  if (!i) return;
3038
- let a = Or(t.res.headers);
3039
+ let a = jr(t.res.headers);
3039
3040
  if (a.length === 0) return;
3040
- let o = Dr(i), s = RegExp(`(?:^|;\\s*)Domain=\\.?${o}(?=;|$)`, "i");
3041
+ let o = Ar(i), s = RegExp(`(?:^|;\\s*)Domain=\\.?${o}(?=;|$)`, "i");
3041
3042
  W(t), t.res.headers.delete("set-cookie");
3042
3043
  for (let e of a) t.res.headers.append("set-cookie", e.replace(s, `Domain=${r}`));
3043
3044
  };
3044
3045
  }
3045
- }), Ar = R({
3046
+ }), Nr = R({
3046
3047
  type: "rewrite_location",
3047
3048
  optionsSchema: e.object({ upstream_origin: e.string().optional() }),
3048
3049
  build(e) {
3049
3050
  return async (t, n) => {
3050
- await n();
3051
+ if (await n(), t.res.headers.has("x-authhero-preserve-location")) {
3052
+ W(t), t.res.headers.delete(nr);
3053
+ return;
3054
+ }
3051
3055
  let r = t.res.status;
3052
3056
  if (r < 300 || r >= 400) return;
3053
3057
  let i = t.res.headers.get("location");
@@ -3065,14 +3069,14 @@ var kr = R({
3065
3069
  W(t), t.res.headers.set("location", c);
3066
3070
  };
3067
3071
  }
3068
- }), jr = class extends Error {
3072
+ }), Pr = class extends Error {
3069
3073
  ms;
3070
3074
  constructor(e, t) {
3071
3075
  super(`${t ?? "Operation"} timed out after ${e}ms`), this.name = "TimeoutError", this.ms = e;
3072
3076
  }
3073
3077
  };
3074
3078
  function G(e) {
3075
- return e instanceof jr ? !0 : e instanceof Error ? e.name === "AbortError" || e.name === "TimeoutError" : !1;
3079
+ return e instanceof Pr ? !0 : e instanceof Error ? e.name === "AbortError" || e.name === "TimeoutError" : !1;
3076
3080
  }
3077
3081
  function K(e, t) {
3078
3082
  let n = new AbortController(), r = setTimeout(() => n.abort(), e);
@@ -3080,7 +3084,7 @@ function K(e, t) {
3080
3084
  }
3081
3085
  function q(e, t, n) {
3082
3086
  let r, i = new Promise((e, i) => {
3083
- r = setTimeout(() => i(new jr(t, n)), t);
3087
+ r = setTimeout(() => i(new Pr(t, n)), t);
3084
3088
  });
3085
3089
  return Promise.race([e, i]).finally(() => {
3086
3090
  r && clearTimeout(r);
@@ -3088,7 +3092,7 @@ function q(e, t, n) {
3088
3092
  }
3089
3093
  //#endregion
3090
3094
  //#region src/data-plane/handlers/http.ts
3091
- var Mr = new Set([
3095
+ var Fr = new Set([
3092
3096
  "connection",
3093
3097
  "keep-alive",
3094
3098
  "proxy-authenticate",
@@ -3097,24 +3101,24 @@ var Mr = new Set([
3097
3101
  "trailers",
3098
3102
  "transfer-encoding",
3099
3103
  "upgrade"
3100
- ]), Nr = 3e4, Pr = e.object({
3104
+ ]), Ir = 3e4, Lr = e.object({
3101
3105
  upstream_url: e.string(),
3102
3106
  preserve_host: e.boolean().default(!1),
3103
3107
  timeout_ms: e.number().int().positive().optional()
3104
3108
  });
3105
- function Fr(e, t) {
3109
+ function Rr(e, t) {
3106
3110
  return e === "" || e === "/" ? t : `${e.endsWith("/") ? e.slice(0, -1) : e}${t.startsWith("/") ? t : `/${t}`}`;
3107
3111
  }
3108
- function Ir(e) {
3112
+ function zr(e) {
3109
3113
  return e !== "GET" && e !== "HEAD";
3110
3114
  }
3111
- function Lr(e, t) {
3115
+ function Br(e, t) {
3112
3116
  let n = new URL(t.url), r = new URL(e.upstream_url);
3113
- r.pathname = Fr(r.pathname, n.pathname), r.search = n.search;
3117
+ r.pathname = Rr(r.pathname, n.pathname), r.search = n.search;
3114
3118
  let i = new Headers(t.headers);
3115
- for (let e of Mr) i.delete(e);
3119
+ for (let e of Fr) i.delete(e);
3116
3120
  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(":", ""));
3117
- let a = Ir(t.method) ? t.body : void 0, o = {
3121
+ let a = zr(t.method) ? t.body : void 0, o = {
3118
3122
  method: t.method,
3119
3123
  headers: i,
3120
3124
  body: a,
@@ -3125,13 +3129,13 @@ function Lr(e, t) {
3125
3129
  init: o
3126
3130
  };
3127
3131
  }
3128
- var Rr = R({
3132
+ var Vr = R({
3129
3133
  type: "http",
3130
- optionsSchema: Pr,
3134
+ optionsSchema: Lr,
3131
3135
  build(e) {
3132
- let t = e.timeout_ms ?? Nr;
3136
+ let t = e.timeout_ms ?? Ir;
3133
3137
  return async (n) => {
3134
- let { target: r, init: i } = Lr(e, U(n));
3138
+ let { target: r, init: i } = Br(e, U(n));
3135
3139
  n.set("__proxy_upstream_host__", r.hostname), n.set("__proxy_upstream_origin__", `${r.protocol}//${r.host}`);
3136
3140
  try {
3137
3141
  return await K(t, (e) => fetch(r.toString(), {
@@ -3143,24 +3147,24 @@ var Rr = R({
3143
3147
  }
3144
3148
  };
3145
3149
  }
3146
- }), zr = 3e4, Br = e.object({
3150
+ }), Hr = 3e4, Ur = e.object({
3147
3151
  binding: e.string(),
3148
3152
  upstream_url: e.string().optional(),
3149
3153
  preserve_host: e.boolean().default(!0),
3150
3154
  timeout_ms: e.number().int().positive().optional()
3151
3155
  });
3152
- function Vr(e) {
3156
+ function Wr(e) {
3153
3157
  return typeof e == "object" && !!e && typeof e.fetch == "function";
3154
3158
  }
3155
- var Hr = R({
3159
+ var Gr = R({
3156
3160
  type: "service_binding",
3157
- optionsSchema: Br,
3161
+ optionsSchema: Ur,
3158
3162
  build(e, t) {
3159
3163
  let n = t.bindings[e.binding];
3160
- if (!Vr(n)) throw Error(`Service binding "${e.binding}" is not configured or is not a Fetcher`);
3161
- let r = e.upstream_url ?? `https://${e.binding}.binding.invalid/`, i = e.timeout_ms ?? zr;
3164
+ if (!Wr(n)) throw Error(`Service binding "${e.binding}" is not configured or is not a Fetcher`);
3165
+ let r = e.upstream_url ?? `https://${e.binding}.binding.invalid/`, i = e.timeout_ms ?? Hr;
3162
3166
  return async (t) => {
3163
- let a = U(t), { target: o, init: s } = Lr({
3167
+ let a = U(t), { target: o, init: s } = Br({
3164
3168
  upstream_url: r,
3165
3169
  preserve_host: e.preserve_host
3166
3170
  }, a);
@@ -3175,34 +3179,34 @@ var Hr = R({
3175
3179
  }
3176
3180
  };
3177
3181
  }
3178
- }), Ur = 3e4, Wr = e.object({
3182
+ }), Kr = 3e4, qr = e.object({
3179
3183
  binding: e.string(),
3180
3184
  script_name: e.string(),
3181
3185
  cpu_ms: e.number().int().positive().optional(),
3182
3186
  subrequests: e.number().int().positive().optional(),
3183
3187
  timeout_ms: e.number().int().positive().optional()
3184
3188
  });
3185
- function Gr(e) {
3189
+ function Jr(e) {
3186
3190
  return typeof e == "object" && !!e && typeof e.get == "function";
3187
3191
  }
3188
3192
  var J = /\{(tenant_id|custom_domain_id|domain|host)\}/g;
3189
- function Kr(e) {
3193
+ function Yr(e) {
3190
3194
  return J.lastIndex = 0, J.test(e);
3191
3195
  }
3192
- var qr = R({
3196
+ var Xr = R({
3193
3197
  type: "dispatch_namespace",
3194
- optionsSchema: Wr,
3198
+ optionsSchema: qr,
3195
3199
  build(e, t) {
3196
3200
  let n = t.bindings[e.binding];
3197
- if (!Gr(n)) throw Error(`Dispatch namespace binding "${e.binding}" is not configured or does not expose .get()`);
3198
- let r = Kr(e.script_name), i = e.timeout_ms ?? Ur, a = e.cpu_ms || e.subrequests ? { limits: {
3201
+ if (!Jr(n)) throw Error(`Dispatch namespace binding "${e.binding}" is not configured or does not expose .get()`);
3202
+ let r = Yr(e.script_name), i = e.timeout_ms ?? Kr, a = e.cpu_ms || e.subrequests ? { limits: {
3199
3203
  ...e.cpu_ms ? { cpuMs: e.cpu_ms } : {},
3200
3204
  ...e.subrequests ? { subrequests: e.subrequests } : {}
3201
3205
  } } : void 0;
3202
3206
  return async (t) => {
3203
3207
  let o = e.script_name;
3204
3208
  if (r) {
3205
- let n = ir(t), r = ar(t), i = or(t), a = t.req.header("host") ?? t.req.header("x-forwarded-host") ?? "";
3209
+ let n = sr(t), r = cr(t), i = lr(t), a = t.req.header("host") ?? t.req.header("x-forwarded-host") ?? "";
3206
3210
  if (o = o.replace(J, (e, t) => {
3207
3211
  switch (t) {
3208
3212
  case "tenant_id": return n ?? "";
@@ -3225,7 +3229,7 @@ var qr = R({
3225
3229
  }
3226
3230
  };
3227
3231
  }
3228
- }), Jr = R({
3232
+ }), Zr = R({
3229
3233
  type: "redirect",
3230
3234
  optionsSchema: e.object({
3231
3235
  upstream_url: e.string().refine((e) => {
@@ -3254,7 +3258,7 @@ var qr = R({
3254
3258
  });
3255
3259
  };
3256
3260
  }
3257
- }), Yr = R({
3261
+ }), Qr = R({
3258
3262
  type: "static",
3259
3263
  optionsSchema: e.object({
3260
3264
  status: e.number().int().default(200),
@@ -3274,15 +3278,15 @@ var qr = R({
3274
3278
  });
3275
3279
  //#endregion
3276
3280
  //#region src/data-plane/handlers/index.ts
3277
- function Xr(e) {
3278
- e.add(ur).add(pr).add(mr).add(hr).add(Tr).add(kr).add(Ar).add(Rr).add(Hr).add(qr).add(Jr).add(Yr);
3281
+ function $r(e) {
3282
+ e.add(pr).add(gr).add(_r).add(vr).add(Or).add(Mr).add(Nr).add(Vr).add(Gr).add(Xr).add(Zr).add(Qr);
3279
3283
  }
3280
3284
  //#endregion
3281
3285
  //#region src/data-plane/matcher.ts
3282
- function Zr(e) {
3286
+ function ei(e) {
3283
3287
  return [...e].sort((e, t) => e.priority === t.priority ? e.created_at.localeCompare(t.created_at) : e.priority - t.priority);
3284
3288
  }
3285
- function Qr(e, t) {
3289
+ function ti(e, t) {
3286
3290
  let n = e.toLowerCase(), r = t.toLowerCase();
3287
3291
  if (n === r) return !0;
3288
3292
  if (n.startsWith("*.")) {
@@ -3291,13 +3295,13 @@ function Qr(e, t) {
3291
3295
  }
3292
3296
  return !1;
3293
3297
  }
3294
- function $r(e, t) {
3295
- return !e || e.length === 0 ? !0 : e.some((e) => Qr(e, t));
3298
+ function ni(e, t) {
3299
+ return !e || e.length === 0 ? !0 : e.some((e) => ti(e, t));
3296
3300
  }
3297
- function ei(e) {
3301
+ function ri(e) {
3298
3302
  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;
3299
3303
  return async (e, i) => {
3300
- if (r && !$r(r, e.req.header("host") ?? "")) return new Response("No matching route", { status: 404 });
3304
+ if (r && !ni(r, e.req.header("host") ?? "")) return new Response("No matching route", { status: 404 });
3301
3305
  for (let [n, r] of t) {
3302
3306
  let t = e.req.header(n);
3303
3307
  if (t === void 0 || !r.test(t)) return new Response("No matching route", { status: 404 });
@@ -3314,17 +3318,17 @@ function ei(e) {
3314
3318
  }
3315
3319
  //#endregion
3316
3320
  //#region src/data-plane/compile.ts
3317
- var ti = "forwarded_headers";
3321
+ var ii = "forwarded_headers";
3318
3322
  function Y(e) {
3319
3323
  return e.some((e) => e.type === "forwarded_headers") ? [...e] : [{
3320
- type: ti,
3324
+ type: ii,
3321
3325
  options: {}
3322
3326
  }, ...e];
3323
3327
  }
3324
3328
  function X(e, t) {
3325
3329
  return e.has("forwarded_headers") ? Y(t) : [...t];
3326
3330
  }
3327
- var ni = [
3331
+ var ai = [
3328
3332
  "GET",
3329
3333
  "POST",
3330
3334
  "PUT",
@@ -3336,34 +3340,34 @@ var ni = [
3336
3340
  function Z(e, n, r, i) {
3337
3341
  let a = new t();
3338
3342
  r && a.use("*", async (e, t) => {
3339
- rr(e, r), await t();
3343
+ or(e, r), await t();
3340
3344
  });
3341
- let o = Zr(e);
3345
+ let o = ei(e);
3342
3346
  for (let e of o) {
3343
3347
  let t = [];
3344
- t.push(ei(e.match));
3348
+ t.push(ri(e.match));
3345
3349
  for (let r of X(n, e.handlers)) t.push(n.build(r.type, r.options));
3346
- let r = e.match.methods?.length ? e.match.methods.map((e) => e.toUpperCase()) : ni, i = e.match.path || "/*";
3350
+ let r = e.match.methods?.length ? e.match.methods.map((e) => e.toUpperCase()) : ai, i = e.match.path || "/*";
3347
3351
  a.on(r, [i], ...t);
3348
3352
  }
3349
- return i && i.length > 0 ? a.on(ni, ["*"], ...i) : a.all("*", (e) => e.text("No matching route", 404)), a.onError((e, t) => {
3353
+ return i && i.length > 0 ? a.on(ai, ["*"], ...i) : a.all("*", (e) => e.text("No matching route", 404)), a.onError((e, t) => {
3350
3354
  let n = G(e);
3351
3355
  return t.text(n ? "Upstream timeout" : "Bad gateway", n ? 504 : 502, { "x-authhero-proxy-error": n ? "handler_timeout" : "handler_failed" });
3352
3356
  }), a;
3353
3357
  }
3354
3358
  //#endregion
3355
3359
  //#region src/data-plane/router.ts
3356
- var ri = 1e4;
3357
- function ii(e) {
3360
+ var oi = 1e4;
3361
+ function si(e) {
3358
3362
  return e.resolver ? e.resolver : e.cache ? I(e.data, e.cache) : I(e.data, e.cacheTtlMs ?? 3e4);
3359
3363
  }
3360
- function ai(e) {
3364
+ function ci(e) {
3361
3365
  if (e.registry) return e.registry;
3362
3366
  let t = new L(e.bindings ?? {});
3363
- return Xr(t), t;
3367
+ return $r(t), t;
3364
3368
  }
3365
3369
  function Q(e) {
3366
- let t = ii(e), n = ai(e), r = /* @__PURE__ */ new WeakMap(), i = e.resolveHostTimeoutMs ?? ri, a = e.defaultHandlers && e.defaultHandlers.length > 0 ? X(n, e.defaultHandlers).map((e) => n.build(e.type, e.options)) : void 0, o = a ? Z([], n, void 0, a) : void 0;
3370
+ let t = si(e), n = ci(e), r = /* @__PURE__ */ new WeakMap(), i = e.resolveHostTimeoutMs ?? oi, a = e.defaultHandlers && e.defaultHandlers.length > 0 ? X(n, e.defaultHandlers).map((e) => n.build(e.type, e.options)) : void 0, o = a ? Z([], n, void 0, a) : void 0;
3367
3371
  return async (e) => {
3368
3372
  let s = e.req.header("host") ?? e.req.header("x-forwarded-host");
3369
3373
  if (!s) return e.text("Missing host", 400);
@@ -3381,13 +3385,13 @@ function Q(e) {
3381
3385
  }
3382
3386
  };
3383
3387
  }
3384
- function oi(e) {
3388
+ function li(e) {
3385
3389
  let n = new t();
3386
3390
  return n.all("*", Q(e)), n;
3387
3391
  }
3388
3392
  //#endregion
3389
3393
  //#region src/app.ts
3390
- function si(e) {
3394
+ function ui(e) {
3391
3395
  let n = new t();
3392
3396
  return n.all("*", Q({
3393
3397
  data: e.data,
@@ -3405,17 +3409,17 @@ function si(e) {
3405
3409
  }
3406
3410
  //#endregion
3407
3411
  //#region src/data-plane/cache-api-cache.ts
3408
- var ci = 1e3, li = 1e3;
3409
- function ui(e, t) {
3412
+ var di = 1e3, fi = 1e3;
3413
+ function pi(e, t) {
3410
3414
  return new Request(`https://proxy-cache.internal/${encodeURIComponent(e)}/hosts/${encodeURIComponent(t.toLowerCase())}`, { method: "GET" });
3411
3415
  }
3412
- function di() {
3416
+ function mi() {
3413
3417
  return globalThis.caches?.default;
3414
3418
  }
3415
- function fi(e) {
3416
- let t = e.cache ?? di();
3419
+ function hi(e) {
3420
+ let t = e.cache ?? mi();
3417
3421
  if (!t) return e.upstream;
3418
- let n = t, r = e.namespace ?? "authhero-proxy", i = e.cacheTtlSeconds ?? 60, a = e.negativeCacheTtlSeconds ?? 10, o = e.waitUntil, s = e.cacheReadTimeoutMs ?? ci, c = e.cacheWriteTimeoutMs ?? li;
3422
+ let n = t, r = e.namespace ?? "authhero-proxy", i = e.cacheTtlSeconds ?? 60, a = e.negativeCacheTtlSeconds ?? 10, o = e.waitUntil, s = e.cacheReadTimeoutMs ?? di, c = e.cacheWriteTimeoutMs ?? fi;
3419
3423
  async function l(e) {
3420
3424
  try {
3421
3425
  return await q(Promise.resolve(n.match(e)), s, "cache.match");
@@ -3424,7 +3428,7 @@ function fi(e) {
3424
3428
  }
3425
3429
  }
3426
3430
  return { async resolveHost(t) {
3427
- let s = ui(r, t), u = await l(s);
3431
+ let s = pi(r, t), u = await l(s);
3428
3432
  if (u) try {
3429
3433
  return (await u.json()).value;
3430
3434
  } catch {}
@@ -3435,14 +3439,14 @@ function fi(e) {
3435
3439
  return o ? o(m) : await m, d;
3436
3440
  } };
3437
3441
  }
3438
- function pi(e, t) {
3439
- return ui(e, t);
3442
+ function gi(e, t) {
3443
+ return pi(e, t);
3440
3444
  }
3441
3445
  //#endregion
3442
3446
  //#region src/data-plane/cache-adapter-cache.ts
3443
- var mi = 1e3, hi = 1e3;
3444
- function gi(e) {
3445
- 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 = mi, cacheWriteTimeoutMs: u = hi } = e, d = /* @__PURE__ */ new Map();
3447
+ var _i = 1e3, vi = 1e3;
3448
+ function yi(e) {
3449
+ 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 = _i, cacheWriteTimeoutMs: u = vi } = e, d = /* @__PURE__ */ new Map();
3446
3450
  function f(e) {
3447
3451
  return `${s}:${e.toLowerCase()}`;
3448
3452
  }
@@ -3495,7 +3499,7 @@ function gi(e) {
3495
3499
  }
3496
3500
  } };
3497
3501
  }
3498
- function _i(e, t) {
3502
+ function bi(e, t) {
3499
3503
  return `${e}:${t.toLowerCase()}`;
3500
3504
  }
3501
3505
  //#endregion
@@ -3503,7 +3507,7 @@ function _i(e, t) {
3503
3507
  function $() {
3504
3508
  throw Error("Static proxy adapter is read-only; configure routes at init time");
3505
3509
  }
3506
- function vi(e, t, n, r, i, a) {
3510
+ function xi(e, t, n, r, i, a) {
3507
3511
  return {
3508
3512
  id: e.id ?? `${n}:${t}`,
3509
3513
  tenant_id: r,
@@ -3518,10 +3522,10 @@ function vi(e, t, n, r, i, a) {
3518
3522
  updated_at: e.updated_at ?? a
3519
3523
  };
3520
3524
  }
3521
- function yi(e) {
3525
+ function Si(e) {
3522
3526
  let t = (/* @__PURE__ */ new Date()).toISOString(), n = e.defaultTenantId ?? "static", r = /* @__PURE__ */ new Map();
3523
3527
  for (let [i, a] of Object.entries(e.hosts)) {
3524
- 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) => vi(n, r, e, s, c, t)).sort((e, t) => e.priority - t.priority);
3528
+ 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) => xi(n, r, e, s, c, t)).sort((e, t) => e.priority - t.priority);
3525
3529
  r.set(e, {
3526
3530
  tenant_id: s,
3527
3531
  custom_domain_id: c,
@@ -3565,7 +3569,7 @@ function yi(e) {
3565
3569
  }
3566
3570
  };
3567
3571
  }
3568
- function bi(e, t = {}) {
3572
+ function Ci(e, t = {}) {
3569
3573
  return {
3570
3574
  priority: t.priority,
3571
3575
  match: { path: t.path ?? "/*" },
@@ -3580,10 +3584,10 @@ function bi(e, t = {}) {
3580
3584
  }
3581
3585
  //#endregion
3582
3586
  //#region src/constants.ts
3583
- var xi = "proxy:resolve_host";
3587
+ var wi = "proxy:resolve_host";
3584
3588
  //#endregion
3585
3589
  //#region src/http-adapter/index.ts
3586
- function Si() {
3590
+ function Ti() {
3587
3591
  let e = () => {
3588
3592
  throw Error("HTTP proxy adapter does not expose write access to proxy_routes; mutate via the control-plane management API");
3589
3593
  };
@@ -3605,7 +3609,7 @@ function Si() {
3605
3609
  }
3606
3610
  };
3607
3611
  }
3608
- function Ci(e) {
3612
+ function Ei(e) {
3609
3613
  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;
3610
3614
  function c(e) {
3611
3615
  let t = new AbortController(), n = setTimeout(() => t.abort(), s);
@@ -3638,7 +3642,7 @@ function Ci(e) {
3638
3642
  }), u);
3639
3643
  }
3640
3644
  return {
3641
- proxyRoutes: Si(),
3645
+ proxyRoutes: Ti(),
3642
3646
  async resolveHost(e) {
3643
3647
  let i = await f(), a = `${n}${r}${encodeURIComponent(e.toLowerCase())}`, o = await c((e) => t(a, {
3644
3648
  headers: { authorization: `Bearer ${i}` },
@@ -3652,7 +3656,7 @@ function Ci(e) {
3652
3656
  }
3653
3657
  //#endregion
3654
3658
  //#region src/http-adapter/service-binding-fetch.ts
3655
- function wi(e) {
3659
+ function Di(e) {
3656
3660
  return (t, n) => {
3657
3661
  let r = t instanceof Request && n === void 0 ? t : new Request(t, n);
3658
3662
  return e.fetch(r);
@@ -3660,11 +3664,11 @@ function wi(e) {
3660
3664
  }
3661
3665
  //#endregion
3662
3666
  //#region src/kv-adapter/index.ts
3663
- var Ti = "authhero-proxy-host:";
3664
- function Ei(e, t) {
3667
+ var Oi = "authhero-proxy-host:";
3668
+ function ki(e, t) {
3665
3669
  return `${e}${t.toLowerCase()}`;
3666
3670
  }
3667
- function Di() {
3671
+ function Ai() {
3668
3672
  let e = () => {
3669
3673
  throw Error("KV proxy adapter does not expose write access to proxy_routes; mutate via the control-plane management API");
3670
3674
  };
@@ -3686,15 +3690,15 @@ function Di() {
3686
3690
  }
3687
3691
  };
3688
3692
  }
3689
- function Oi(e) {
3690
- let { kv: t, keyPrefix: n = Ti, timeoutMs: r } = e;
3693
+ function ji(e) {
3694
+ let { kv: t, keyPrefix: n = Oi, timeoutMs: r } = e;
3691
3695
  return {
3692
- proxyRoutes: Di(),
3696
+ proxyRoutes: Ai(),
3693
3697
  async resolveHost(e) {
3694
- let i = Ei(n, e), a = t.get(i, "json");
3698
+ let i = ki(n, e), a = t.get(i, "json");
3695
3699
  return (r && r > 0 ? await q(a, r, "kv.get") : await a) ?? null;
3696
3700
  }
3697
3701
  };
3698
3702
  }
3699
3703
  //#endregion
3700
- export { Ti as DEFAULT_KV_HOST_KEY_PREFIX, ti as FORWARDED_HEADERS_HANDLER_TYPE, L as HandlerRegistry, xi as PROXY_RESOLVE_HOST_SCOPE, pr as basicAuthHandler, _i as buildCacheAdapterKey, pi as buildCacheApiKey, Ei as buildKvHostKey, ei as buildMatchFilter, hr as cacheHandler, Z as compileHostApp, ur as corsHandler, gi as createCacheAdapterHostCache, fi as createCacheApiHostCache, Ci as createHttpProxyAdapter, I as createInMemoryHostCache, Oi as createKvProxyAdapter, si as createProxyApp, Q as createProxyDataPlaneHandler, oi as createProxyDataPlaneRouter, wi as createServiceBindingFetch, yi as createStaticProxyAdapter, R as defineHandler, qr as dispatchNamespaceHandler, Tr as forwardedHeadersHandler, En as handlerConfigSchema, mr as headersHandler, Rr as httpHandler, bi as httpRoute, wr as isCloudflareIp, Tn as matchSchema, $r as matchesAnyHost, Qr as matchesHost, P as proxyRouteInsertSchema, Dn as proxyRouteSchema, On as proxyRouteUpdateSchema, Jr as redirectHandler, Xr as registerBuiltinHandlers, kr as rewriteCookiesHandler, Ar as rewriteLocationHandler, Hr as serviceBindingHandler, Zr as sortRoutes, Yr as staticHandler, Y as withForwardedHeaders, X as withForwardedHeadersFor };
3704
+ export { Oi as DEFAULT_KV_HOST_KEY_PREFIX, ii as FORWARDED_HEADERS_HANDLER_TYPE, L as HandlerRegistry, wi as PROXY_RESOLVE_HOST_SCOPE, gr as basicAuthHandler, bi as buildCacheAdapterKey, gi as buildCacheApiKey, ki as buildKvHostKey, ri as buildMatchFilter, vr as cacheHandler, Z as compileHostApp, pr as corsHandler, yi as createCacheAdapterHostCache, hi as createCacheApiHostCache, Ei as createHttpProxyAdapter, I as createInMemoryHostCache, ji as createKvProxyAdapter, ui as createProxyApp, Q as createProxyDataPlaneHandler, li as createProxyDataPlaneRouter, Di as createServiceBindingFetch, Si as createStaticProxyAdapter, R as defineHandler, Xr as dispatchNamespaceHandler, Or as forwardedHeadersHandler, On as handlerConfigSchema, _r as headersHandler, Vr as httpHandler, Ci as httpRoute, Dr as isCloudflareIp, Dn as matchSchema, ni as matchesAnyHost, ti as matchesHost, P as proxyRouteInsertSchema, kn as proxyRouteSchema, An as proxyRouteUpdateSchema, Zr as redirectHandler, $r as registerBuiltinHandlers, Mr as rewriteCookiesHandler, Nr as rewriteLocationHandler, Gr as serviceBindingHandler, ei as sortRoutes, Qr as staticHandler, Y as withForwardedHeaders, X as withForwardedHeadersFor };