@authhero/proxy 0.10.10 → 0.10.12

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
- ]), C = e.union([
1152
- Ct,
1153
- wt,
1154
- Tt
1151
+ xt,
1152
+ St,
1153
+ wt
1154
+ ]), Ot = e.union([
1155
+ Tt,
1156
+ Et,
1157
+ Dt
1155
1158
  ]);
1156
1159
  new Set([
1157
1160
  "BOOLEAN",
@@ -1178,22 +1181,22 @@ new Set([
1178
1181
  visible: e.boolean().optional().default(!0),
1179
1182
  customizations: e.record(e.string(), e.any()).optional()
1180
1183
  });
1181
- var w = e.object({
1184
+ var C = e.object({
1182
1185
  x: e.number(),
1183
1186
  y: e.number()
1184
- }), Et = e.object({
1187
+ }), kt = e.object({
1185
1188
  id: e.string(),
1186
1189
  type: e.literal("FLOW"),
1187
- coordinates: w,
1190
+ coordinates: C,
1188
1191
  alias: e.string().min(1).max(150).optional(),
1189
1192
  config: e.object({
1190
1193
  flow_id: e.string().max(30),
1191
1194
  next_node: e.string().optional()
1192
1195
  })
1193
- }), Dt = e.object({
1196
+ }), At = e.object({
1194
1197
  id: e.string(),
1195
1198
  type: e.literal("ROUTER"),
1196
- coordinates: w,
1199
+ coordinates: C,
1197
1200
  alias: e.string().min(1).max(150),
1198
1201
  config: e.object({
1199
1202
  rules: e.array(e.object({
@@ -1204,20 +1207,20 @@ var w = e.object({
1204
1207
  })),
1205
1208
  fallback: e.string()
1206
1209
  })
1207
- }), Ot = e.object({
1210
+ }), jt = e.object({
1208
1211
  id: e.string(),
1209
1212
  type: e.literal("STEP"),
1210
- coordinates: w,
1213
+ coordinates: C,
1211
1214
  alias: e.string().min(1).max(150).optional(),
1212
1215
  config: e.object({
1213
- components: e.array(C),
1216
+ components: e.array(Ot),
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
+ }), Mt = e.discriminatedUnion("type", [
1220
+ kt,
1221
+ At,
1222
+ jt
1223
+ ]), Nt = 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,14 +1231,14 @@ 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(Mt).optional(),
1232
1235
  start: e.object({
1233
1236
  hidden_fields: e.array(e.object({
1234
1237
  key: e.string(),
1235
1238
  value: e.string()
1236
1239
  })).optional(),
1237
1240
  next_node: e.string().optional(),
1238
- coordinates: w.optional()
1241
+ coordinates: C.optional()
1239
1242
  }).optional(),
1240
1243
  ending: e.object({
1241
1244
  redirection: e.object({
@@ -1243,7 +1246,7 @@ var w = e.object({
1243
1246
  target: e.string().optional()
1244
1247
  }).optional(),
1245
1248
  after_submit: e.object({ flow_id: e.string().optional() }).optional(),
1246
- coordinates: w.optional(),
1249
+ coordinates: C.optional(),
1247
1250
  resume_flow: e.boolean().optional()
1248
1251
  }).optional(),
1249
1252
  style: e.object({ css: e.string().optional() }).optional(),
@@ -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(Nt.shape).extend({ id: e.string() });
1259
+ var Pt = 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
+ }), Ft = e.object({
1266
1269
  id: e.string().optional(),
1267
1270
  text: e.string(),
1268
1271
  href: e.string(),
@@ -1274,12 +1277,12 @@ e.object({
1274
1277
  method: e.enum(["POST", "GET"]),
1275
1278
  title: e.string().optional(),
1276
1279
  description: e.string().optional(),
1277
- components: e.array(C),
1278
- messages: e.array(jt).optional(),
1279
- links: e.array(Mt).optional(),
1280
+ components: e.array(Ot),
1281
+ messages: e.array(Pt).optional(),
1282
+ links: e.array(Ft).optional(),
1280
1283
  footer: e.string().optional()
1281
1284
  });
1282
- var T = e.enum([
1285
+ var w = e.enum([
1283
1286
  "pre-user-registration",
1284
1287
  "post-user-registration",
1285
1288
  "post-user-login",
@@ -1287,19 +1290,19 @@ var T = e.enum([
1287
1290
  "validate-registration-username",
1288
1291
  "pre-user-deletion",
1289
1292
  "post-user-deletion"
1290
- ]), E = e.enum(["post-user-login"]), D = e.enum([
1293
+ ]), T = e.enum(["post-user-login"]), E = e.enum([
1291
1294
  "post-user-login",
1292
1295
  "post-user-registration",
1293
1296
  "post-user-update",
1294
1297
  "credentials-exchange"
1295
- ]), O = e.enum([
1298
+ ]), D = e.enum([
1296
1299
  "post-user-login",
1297
1300
  "credentials-exchange",
1298
1301
  "pre-user-registration",
1299
1302
  "post-user-registration"
1300
- ]), k = e.enum(["post-user-login"]);
1301
- T.options, E.options, D.options, O.options, k.options;
1302
- var A = e.enum(["impersonate"]), Nt = e.enum([
1303
+ ]), O = e.enum(["post-user-login"]);
1304
+ w.options, T.options, E.options, D.options, O.options;
1305
+ var k = e.enum(["impersonate"]), A = e.enum([
1303
1306
  "ensure-username",
1304
1307
  "set-preferred-username",
1305
1308
  "account-linking"
@@ -1309,73 +1312,73 @@ 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
- trigger_id: T,
1317
+ trigger_id: w,
1315
1318
  url: e.string()
1316
- }), Ft = e.object({
1319
+ }), Lt = e.object({
1317
1320
  ...j,
1318
- trigger_id: E,
1321
+ trigger_id: T,
1319
1322
  form_id: e.string()
1320
- }), It = e.object({
1323
+ }), Rt = e.object({
1321
1324
  ...j,
1322
- trigger_id: D,
1323
- template_id: Nt
1324
- }), Lt = e.object({
1325
+ trigger_id: E,
1326
+ template_id: A
1327
+ }), zt = e.object({
1325
1328
  ...j,
1326
- trigger_id: O,
1329
+ trigger_id: D,
1327
1330
  code_id: e.string()
1328
- }), Rt = e.object({
1331
+ }), Bt = e.object({
1329
1332
  ...j,
1330
- trigger_id: k,
1331
- page_id: A,
1333
+ trigger_id: O,
1334
+ page_id: k,
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
- trigger_id: T
1346
+ trigger_id: w
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
- trigger_id: E
1352
+ trigger_id: T
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
- trigger_id: D
1358
+ trigger_id: E
1356
1359
  }).extend(n.shape).extend({
1357
1360
  hook_id: e.string(),
1358
- template_id: Nt
1359
- }), Ht = e.object({
1361
+ template_id: A
1362
+ }), Wt = e.object({
1360
1363
  ...j,
1361
- trigger_id: O
1364
+ trigger_id: D
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
- trigger_id: k
1370
+ trigger_id: O
1368
1371
  }).extend(n.shape).extend({
1369
1372
  hook_id: e.string(),
1370
- page_id: A,
1373
+ page_id: k,
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,37 +1991,42 @@ 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
- "deprovision"
2001
- ]), hn = e.enum([
2003
+ "deprovision",
2004
+ "users_import"
2005
+ ]), _n = e.enum([
2002
2006
  "pending",
2003
2007
  "running",
2004
2008
  "succeeded",
2005
2009
  "failed",
2006
2010
  "cancelled"
2007
- ]), gn = e.enum(["inline", "cloudflare-workflows"]);
2011
+ ]), vn = e.string().max(64);
2008
2012
  e.object({
2009
2013
  tenant_id: e.string().max(255).nullable().default(null),
2010
2014
  rollout_id: e.string().max(255).nullable().optional(),
2011
- kind: mn,
2012
- engine: gn,
2015
+ kind: gn,
2016
+ engine: vn,
2013
2017
  engine_instance_id: e.string().max(100).nullable().optional(),
2014
2018
  target_worker_version: e.string().max(255).nullable().optional(),
2015
2019
  target_database_version: e.string().max(255).nullable().optional(),
2016
- initiated_by: e.string().max(255).nullable().optional()
2020
+ initiated_by: e.string().max(255).nullable().optional(),
2021
+ input: e.record(e.string(), e.unknown()).nullable().optional()
2017
2022
  }).extend({
2018
2023
  id: e.string(),
2019
- status: hn,
2024
+ status: _n,
2020
2025
  current_step: e.string().max(255).nullable().optional(),
2021
2026
  error: e.string().nullable().optional(),
2027
+ result: e.record(e.string(), e.unknown()).nullable().optional(),
2028
+ claimed_by: e.string().max(255).nullable().optional(),
2029
+ claim_expires_at: e.string().nullable().optional(),
2022
2030
  created_at: e.string(),
2023
2031
  updated_at: e.string(),
2024
2032
  finished_at: e.string().nullable().optional()
@@ -2029,9 +2037,12 @@ e.object({
2029
2037
  target_worker_version: !0,
2030
2038
  target_database_version: !0,
2031
2039
  error: !0,
2040
+ result: !0,
2041
+ claimed_by: !0,
2042
+ claim_expires_at: !0,
2032
2043
  finished_at: !0
2033
2044
  }).partial();
2034
- var _n = e.enum([
2045
+ var yn = e.enum([
2035
2046
  "started",
2036
2047
  "succeeded",
2037
2048
  "failed",
@@ -2042,18 +2053,46 @@ var _n = e.enum([
2042
2053
  e.object({
2043
2054
  operation_id: e.string().max(255),
2044
2055
  step: e.string().max(255),
2045
- outcome: _n,
2056
+ outcome: yn,
2046
2057
  detail: e.record(e.string(), e.unknown()).nullable().optional(),
2047
2058
  attempt: e.number().int().min(1).default(1)
2048
2059
  }).extend({
2049
2060
  id: e.string(),
2050
2061
  created_at: e.string()
2051
2062
  });
2052
- var vn = e.enum([
2063
+ var N = e.enum([
2064
+ "pending",
2065
+ "inserted",
2066
+ "updated",
2067
+ "failed",
2068
+ "skipped"
2069
+ ]);
2070
+ e.object({
2071
+ operation_id: e.string().max(255),
2072
+ seq: e.number().int().min(0),
2073
+ payload: e.record(e.string(), e.unknown()),
2074
+ status: N.default("pending"),
2075
+ error_code: e.string().max(64).nullable().optional(),
2076
+ error_message: e.string().nullable().optional(),
2077
+ error_path: e.string().max(255).nullable().optional(),
2078
+ entity_id: e.string().max(255).nullable().optional()
2079
+ }).extend({
2080
+ status: N,
2081
+ created_at: e.string(),
2082
+ updated_at: e.string()
2083
+ }), e.object({
2084
+ seq: e.number().int().min(0),
2085
+ status: N,
2086
+ error_code: e.string().max(64).nullable().optional(),
2087
+ error_message: e.string().nullable().optional(),
2088
+ error_path: e.string().max(255).nullable().optional(),
2089
+ entity_id: e.string().max(255).nullable().optional()
2090
+ });
2091
+ var bn = e.enum([
2053
2092
  "upgrade",
2054
2093
  "reseed",
2055
2094
  "backup"
2056
- ]), yn = e.enum([
2095
+ ]), xn = e.enum([
2057
2096
  "pending",
2058
2097
  "canary",
2059
2098
  "rolling",
@@ -2062,7 +2101,7 @@ var vn = e.enum([
2062
2101
  "failed"
2063
2102
  ]);
2064
2103
  e.object({
2065
- kind: vn,
2104
+ kind: bn,
2066
2105
  target_worker_version: e.string().max(255).nullable().optional(),
2067
2106
  target_database_version: e.string().max(255).nullable().optional(),
2068
2107
  wave_size: e.number().int().min(1).default(10),
@@ -2071,7 +2110,7 @@ e.object({
2071
2110
  initiated_by: e.string().max(255).nullable().optional()
2072
2111
  }).extend({
2073
2112
  id: e.string(),
2074
- status: yn,
2113
+ status: xn,
2075
2114
  created_at: e.string(),
2076
2115
  updated_at: e.string(),
2077
2116
  finished_at: e.string().nullable().optional()
@@ -2093,7 +2132,7 @@ e.object({
2093
2132
  code: e.string(),
2094
2133
  state: e.string().optional()
2095
2134
  });
2096
- var bn = e.object({
2135
+ var Sn = e.object({
2097
2136
  button_border_radius: e.number(),
2098
2137
  button_border_weight: e.number(),
2099
2138
  buttons_style: e.enum([
@@ -2111,7 +2150,7 @@ var bn = e.object({
2111
2150
  show_widget_shadow: e.boolean(),
2112
2151
  widget_border_weight: e.number(),
2113
2152
  widget_corner_radius: e.number()
2114
- }), xn = e.object({
2153
+ }), Cn = e.object({
2115
2154
  base_focus_color: e.string(),
2116
2155
  base_hover_color: e.string(),
2117
2156
  body_text: e.string(),
@@ -2135,20 +2174,20 @@ var bn = e.object({
2135
2174
  success: e.string(),
2136
2175
  widget_background: e.string(),
2137
2176
  widget_border: e.string()
2138
- }), N = e.object({
2177
+ }), P = e.object({
2139
2178
  bold: e.boolean(),
2140
2179
  size: e.number()
2141
- }), Sn = e.object({
2142
- body_text: N,
2143
- buttons_text: N,
2180
+ }), wn = e.object({
2181
+ body_text: P,
2182
+ buttons_text: P,
2144
2183
  font_url: e.string(),
2145
- input_labels: N,
2146
- links: N,
2184
+ input_labels: P,
2185
+ links: P,
2147
2186
  links_style: e.enum(["normal", "underlined"]),
2148
2187
  reference_text_size: e.number(),
2149
- subtitle: N,
2150
- title: N
2151
- }), Cn = e.object({
2188
+ subtitle: P,
2189
+ title: P
2190
+ }), Tn = e.object({
2152
2191
  background_color: e.string(),
2153
2192
  background_image_url: e.string(),
2154
2193
  page_layout: e.enum([
@@ -2161,7 +2200,7 @@ var bn = e.object({
2161
2200
  "chip",
2162
2201
  "none"
2163
2202
  ]).optional()
2164
- }), wn = e.object({
2203
+ }), En = e.object({
2165
2204
  header_text_alignment: e.enum([
2166
2205
  "center",
2167
2206
  "left",
@@ -2178,12 +2217,12 @@ var bn = e.object({
2178
2217
  social_buttons_layout: e.enum(["bottom", "top"])
2179
2218
  });
2180
2219
  e.object({
2181
- borders: bn,
2182
- colors: xn,
2220
+ borders: Sn,
2221
+ colors: Cn,
2183
2222
  displayName: e.string(),
2184
- fonts: Sn,
2185
- page_background: Cn,
2186
- widget: wn
2223
+ fonts: wn,
2224
+ page_background: Tn,
2225
+ widget: En
2187
2226
  }).extend({ themeId: e.string() }), e.object({
2188
2227
  universal_login_experience: e.enum(["new", "classic"]).default("new"),
2189
2228
  identifier_first: e.boolean().default(!0),
@@ -2191,42 +2230,42 @@ e.object({
2191
2230
  show_last_used_connection: e.boolean().default(!1),
2192
2231
  webauthn_platform_first_factor: e.boolean()
2193
2232
  });
2194
- var Tn = e.object({
2233
+ var Dn = e.object({
2195
2234
  hosts: e.array(e.string()).optional(),
2196
2235
  methods: e.array(e.string()).optional(),
2197
2236
  path: e.string().default("/*"),
2198
2237
  headers: e.record(e.string(), e.string()).optional(),
2199
2238
  query: e.record(e.string(), e.string()).optional()
2200
- }), En = e.object({
2239
+ }), On = e.object({
2201
2240
  type: e.string(),
2202
2241
  options: e.record(e.string(), e.unknown()).default({})
2203
- }), P = e.object({
2242
+ }), F = e.object({
2204
2243
  id: e.string().optional(),
2205
2244
  custom_domain_id: e.string(),
2206
2245
  priority: e.number().int().default(100),
2207
- match: Tn,
2208
- handlers: e.array(En).min(1)
2209
- }), Dn = P.extend({
2246
+ match: Dn,
2247
+ handlers: e.array(On).min(1)
2248
+ }), kn = F.extend({
2210
2249
  id: e.string(),
2211
2250
  tenant_id: e.string(),
2212
2251
  created_at: e.string(),
2213
2252
  updated_at: e.string()
2214
- }), On = P.partial().omit({
2253
+ }), An = F.partial().omit({
2215
2254
  id: !0,
2216
2255
  custom_domain_id: !0
2217
- }), kn = e.object({
2256
+ }), jn = e.object({
2218
2257
  scim: e.string(),
2219
2258
  auth0: e.string()
2220
- }), An = e.object({
2259
+ }), Mn = e.object({
2221
2260
  connection_id: e.string(),
2222
2261
  user_id_attribute: e.string().default("externalId"),
2223
- mapping: e.array(kn).default([])
2262
+ mapping: e.array(jn).default([])
2224
2263
  });
2225
2264
  e.object({
2226
2265
  created_at: e.string(),
2227
2266
  updated_at: e.string()
2228
- }).extend(An.shape);
2229
- var jn = e.object({
2267
+ }).extend(Mn.shape);
2268
+ var Nn = e.object({
2230
2269
  token_id: e.string(),
2231
2270
  connection_id: e.string(),
2232
2271
  token_hash: e.string(),
@@ -2236,20 +2275,20 @@ var jn = e.object({
2236
2275
  e.object({
2237
2276
  created_at: e.string(),
2238
2277
  last_used_at: e.string().optional()
2239
- }).extend(jn.shape);
2240
- var Mn = e.object({
2278
+ }).extend(Nn.shape);
2279
+ var Pn = e.object({
2241
2280
  connection_id: e.string(),
2242
2281
  external_id: e.string(),
2243
2282
  user_id: e.string()
2244
2283
  });
2245
- e.object({ created_at: e.string() }).extend(Mn.shape), e.object({
2284
+ e.object({ created_at: e.string() }).extend(Pn.shape), e.object({
2246
2285
  name: e.string(),
2247
2286
  enabled: e.boolean().optional().default(!0),
2248
2287
  default_from_address: e.string().optional(),
2249
2288
  credentials: e.record(e.string(), e.unknown()),
2250
2289
  settings: e.object({}).optional()
2251
2290
  });
2252
- var Nn = e.enum([
2291
+ var Fn = e.enum([
2253
2292
  "verify_email",
2254
2293
  "verify_email_by_code",
2255
2294
  "reset_email",
@@ -2264,7 +2303,7 @@ var Nn = e.enum([
2264
2303
  "user_invitation"
2265
2304
  ]);
2266
2305
  e.object({
2267
- template: Nn,
2306
+ template: Fn,
2268
2307
  body: e.string(),
2269
2308
  from: e.string(),
2270
2309
  subject: e.string(),
@@ -2279,13 +2318,13 @@ e.object({
2279
2318
  session_id: e.string().optional(),
2280
2319
  organization: e.string().optional(),
2281
2320
  auth_connection: e.string().optional(),
2282
- auth_strategy: Xt.optional(),
2321
+ auth_strategy: Qt.optional(),
2283
2322
  user_id: e.string(),
2284
2323
  client_id: e.string(),
2285
2324
  expires_at: e.string().optional(),
2286
2325
  idle_expires_at: e.string().optional(),
2287
2326
  last_exchanged_at: e.string().optional(),
2288
- device: dn,
2327
+ device: pn,
2289
2328
  resource_servers: e.array(e.object({
2290
2329
  audience: e.string(),
2291
2330
  scopes: e.string()
@@ -2306,10 +2345,10 @@ e.object({
2306
2345
  name: e.string(),
2307
2346
  options: e.object({})
2308
2347
  });
2309
- var Pn = e.object({
2348
+ var In = e.object({
2310
2349
  value: e.string(),
2311
2350
  description: e.string().optional()
2312
- }), Fn = e.object({
2351
+ }), Ln = e.object({
2313
2352
  token_dialect: e.enum(["access_token", "access_token_authz"]).optional(),
2314
2353
  enforce_policies: e.boolean().optional(),
2315
2354
  allow_skipping_userinfo: e.boolean().optional(),
@@ -2317,11 +2356,11 @@ var Pn = e.object({
2317
2356
  persist_client_authorization: e.boolean().optional(),
2318
2357
  enable_introspection_endpoint: e.boolean().optional(),
2319
2358
  mtls: e.object({ bound_access_tokens: e.boolean().optional() }).optional()
2320
- }), In = e.object({
2359
+ }), Rn = e.object({
2321
2360
  id: e.string().optional(),
2322
2361
  name: e.string(),
2323
2362
  identifier: e.string(),
2324
- scopes: e.array(Pn).optional(),
2363
+ scopes: e.array(In).optional(),
2325
2364
  signing_alg: e.string().optional(),
2326
2365
  signing_secret: e.string().optional(),
2327
2366
  token_lifetime: e.number().default(86400),
@@ -2329,20 +2368,20 @@ var Pn = e.object({
2329
2368
  skip_consent_for_verifiable_first_party_clients: e.boolean().optional(),
2330
2369
  allow_offline_access: e.boolean().optional(),
2331
2370
  verificationKey: e.string().optional(),
2332
- options: Fn.optional(),
2371
+ options: Ln.optional(),
2333
2372
  is_system: e.boolean().optional(),
2334
2373
  metadata: e.record(e.string(), e.any()).optional()
2335
2374
  }).extend({
2336
2375
  created_at: e.string().optional(),
2337
2376
  updated_at: e.string().optional()
2338
2377
  });
2339
- e.array(In);
2340
- var Ln = e.object({
2378
+ e.array(Rn);
2379
+ var zn = e.object({
2341
2380
  role_id: e.string(),
2342
2381
  resource_server_identifier: e.string(),
2343
2382
  permission_name: e.string()
2344
2383
  }).extend({ created_at: e.string() });
2345
- e.array(Ln), e.object({
2384
+ e.array(zn), e.object({
2346
2385
  user_id: e.string().openapi({ description: "The id of the user that granted the consent" }),
2347
2386
  clientID: e.string().openapi({ description: "The id of the client the grant was issued to" }),
2348
2387
  audience: e.string().optional().openapi({ description: "The audience the grant applies to" }),
@@ -2355,7 +2394,7 @@ e.array(Ln), e.object({
2355
2394
  failed_logins: e.array(e.string()).optional(),
2356
2395
  last_password_reset: e.string().optional()
2357
2396
  });
2358
- var Rn = e.object({
2397
+ var Bn = e.object({
2359
2398
  user_id: e.string(),
2360
2399
  resource_server_identifier: e.string(),
2361
2400
  permission_name: e.string(),
@@ -2364,8 +2403,8 @@ var Rn = e.object({
2364
2403
  tenant_id: e.string(),
2365
2404
  created_at: e.string().optional()
2366
2405
  });
2367
- e.array(Rn);
2368
- var zn = e.object({
2406
+ e.array(Bn);
2407
+ var Vn = e.object({
2369
2408
  user_id: e.string(),
2370
2409
  resource_server_identifier: e.string(),
2371
2410
  resource_server_name: e.string(),
@@ -2374,8 +2413,8 @@ var zn = e.object({
2374
2413
  created_at: e.string().optional(),
2375
2414
  organization_id: e.string().optional()
2376
2415
  });
2377
- e.array(zn);
2378
- var Bn = e.object({
2416
+ e.array(Vn);
2417
+ var Hn = e.object({
2379
2418
  user_id: e.string(),
2380
2419
  role_id: e.string(),
2381
2420
  organization_id: e.string().optional()
@@ -2383,8 +2422,8 @@ var Bn = e.object({
2383
2422
  tenant_id: e.string(),
2384
2423
  created_at: e.string().optional()
2385
2424
  });
2386
- e.array(Bn);
2387
- var Vn = e.object({
2425
+ e.array(Hn);
2426
+ var Un = e.object({
2388
2427
  id: e.string().optional().openapi({ description: "The unique identifier of the role. If not provided, one will be generated." }),
2389
2428
  name: e.string().min(1).max(50).openapi({ description: "The name of the role. Cannot include '<' or '>'" }),
2390
2429
  description: e.string().max(255).optional().openapi({ description: "The description of the role" }),
@@ -2395,19 +2434,19 @@ var Vn = e.object({
2395
2434
  created_at: e.string().optional(),
2396
2435
  updated_at: e.string().optional()
2397
2436
  });
2398
- e.array(Vn);
2399
- var Hn = e.object({
2437
+ e.array(Un);
2438
+ var Wn = e.object({
2400
2439
  logo_url: e.string().optional().openapi({ description: "URL of the organization's logo" }),
2401
2440
  colors: e.object({
2402
2441
  primary: e.string().optional().openapi({ description: "Primary color in hex format (e.g., #FF0000)" }),
2403
2442
  page_background: e.string().optional().openapi({ description: "Page background color in hex format (e.g., #FFFFFF)" })
2404
2443
  }).optional()
2405
- }).optional(), Un = e.object({
2444
+ }).optional(), Gn = e.object({
2406
2445
  connection_id: e.string().openapi({ description: "ID of the connection" }),
2407
2446
  assign_membership_on_login: e.boolean().default(!1).openapi({ description: "Whether to assign membership to the organization on login" }),
2408
2447
  show_as_button: e.boolean().default(!0).openapi({ description: "Whether to show this connection as a button in the login screen" }),
2409
2448
  is_signup_enabled: e.boolean().default(!0).openapi({ description: "Whether signup is enabled for this connection" })
2410
- }), Wn = e.object({ client_credentials: e.object({
2449
+ }), Kn = e.object({ client_credentials: e.object({
2411
2450
  enforce: e.boolean().default(!1).openapi({ description: "Whether to enforce token quota limits" }),
2412
2451
  per_day: e.number().min(0).default(0).openapi({ description: "Maximum tokens per day (0 = unlimited)" }),
2413
2452
  per_hour: e.number().min(0).default(0).openapi({ description: "Maximum tokens per hour (0 = unlimited)" })
@@ -2416,15 +2455,15 @@ e.object({
2416
2455
  id: e.string().optional(),
2417
2456
  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
2457
  display_name: e.string().optional().openapi({ description: "The display name of the organization" }),
2419
- branding: Hn,
2458
+ branding: Wn,
2420
2459
  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
2460
+ enabled_connections: e.array(Gn).default([]).optional().openapi({ description: "List of enabled connections for the organization" }),
2461
+ token_quota: Kn
2423
2462
  }).extend(n.shape).extend({
2424
2463
  id: e.string(),
2425
2464
  name: e.string().min(1).openapi({ description: "The name of the organization" })
2426
2465
  });
2427
- var Gn = e.object({
2466
+ var qn = e.object({
2428
2467
  connection_id: e.string().openapi({ description: "ID of the tenant-level connection to enable for the org." }),
2429
2468
  assign_membership_on_login: e.boolean().optional().default(!1),
2430
2469
  show_as_button: e.boolean().optional().default(!0),
@@ -2437,7 +2476,7 @@ var Gn = e.object({
2437
2476
  created_at: e.string().optional(),
2438
2477
  updated_at: e.string().optional()
2439
2478
  });
2440
- e.array(Gn), e.object({
2479
+ e.array(qn), e.object({
2441
2480
  user_id: e.string().openapi({ description: "ID of the user" }),
2442
2481
  organization_id: e.string().openapi({ description: "ID of the organization" })
2443
2482
  }).extend(n.shape).extend({ id: e.string() }), e.object({
@@ -2576,7 +2615,7 @@ e.array(Gn), e.object({
2576
2615
  "passwordless",
2577
2616
  "enterprise"
2578
2617
  ]);
2579
- var Kn = e.object({
2618
+ var Jn = e.object({
2580
2619
  cohort: e.string(),
2581
2620
  sessions: e.number(),
2582
2621
  active: e.array(e.number())
@@ -2585,9 +2624,9 @@ e.object({
2585
2624
  interval: e.literal("week"),
2586
2625
  from: e.string(),
2587
2626
  to: e.string(),
2588
- cohorts: e.array(Kn)
2627
+ cohorts: e.array(Jn)
2589
2628
  });
2590
- var qn = e.object({
2629
+ var Yn = e.object({
2591
2630
  cohort: e.string(),
2592
2631
  tokens: e.number(),
2593
2632
  active: e.array(e.number())
@@ -2596,24 +2635,24 @@ e.object({
2596
2635
  interval: e.literal("week"),
2597
2636
  from: e.string(),
2598
2637
  to: e.string(),
2599
- cohorts: e.array(qn)
2638
+ cohorts: e.array(Yn)
2600
2639
  });
2601
- var Jn = e.object({
2640
+ var Xn = e.object({
2602
2641
  name: e.string(),
2603
2642
  type: e.string()
2604
- }), Yn = e.object({
2643
+ }), Zn = e.object({
2605
2644
  elapsed: e.number(),
2606
2645
  rows_read: e.number().optional(),
2607
2646
  bytes_read: e.number().optional()
2608
2647
  });
2609
2648
  e.object({
2610
- meta: e.array(Jn),
2649
+ meta: e.array(Xn),
2611
2650
  data: e.array(e.record(e.string(), e.any())),
2612
2651
  rows: e.number(),
2613
2652
  rows_before_limit_at_least: e.number().optional(),
2614
- statistics: Yn.optional()
2653
+ statistics: Zn.optional()
2615
2654
  });
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({
2655
+ 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
2656
  type: "object",
2618
2657
  additionalProperties: {
2619
2658
  type: "object",
@@ -2621,11 +2660,11 @@ var Xn = e.enum(/* @__PURE__ */ "login.login-id.login-password.signup.signup-id.
2621
2660
  }
2622
2661
  });
2623
2662
  e.object({
2624
- prompt: Xn,
2663
+ prompt: Qn,
2625
2664
  language: e.string(),
2626
- custom_text: Zn
2665
+ custom_text: $n
2627
2666
  });
2628
- var Qn = e.enum([
2667
+ var er = e.enum([
2629
2668
  "phone",
2630
2669
  "totp",
2631
2670
  "email",
@@ -2633,9 +2672,9 @@ var Qn = e.enum([
2633
2672
  "webauthn-roaming",
2634
2673
  "webauthn-platform",
2635
2674
  "passkey"
2636
- ]), $n = e.object({
2675
+ ]), tr = e.object({
2637
2676
  user_id: e.string(),
2638
- type: Qn,
2677
+ type: er,
2639
2678
  phone_number: e.string().optional(),
2640
2679
  totp_secret: e.string().optional(),
2641
2680
  credential_id: e.string().optional(),
@@ -2646,7 +2685,7 @@ var Qn = e.enum([
2646
2685
  friendly_name: e.string().optional(),
2647
2686
  confirmed: e.boolean().default(!1)
2648
2687
  });
2649
- function F(t, n) {
2688
+ function I(t, n) {
2650
2689
  t.type === "phone" && !t.phone_number && n.addIssue({
2651
2690
  code: e.ZodIssueCode.custom,
2652
2691
  message: "phone_number is required when type is 'phone'",
@@ -2669,23 +2708,21 @@ function F(t, n) {
2669
2708
  path: ["public_key"]
2670
2709
  }));
2671
2710
  }
2672
- $n.superRefine(F), $n.extend({
2711
+ tr.superRefine(I), tr.extend({
2673
2712
  id: e.string(),
2674
2713
  created_at: e.string(),
2675
2714
  updated_at: e.string()
2676
- }).superRefine(F), e.object({
2715
+ }).superRefine(I), e.object({
2677
2716
  id: e.string().optional(),
2678
2717
  created_at: e.string().datetime({ offset: !0 }).optional(),
2679
2718
  updated_at: e.string().datetime({ offset: !0 }).optional()
2680
2719
  });
2681
- //#endregion
2682
- //#region src/data-plane/cache.ts
2683
- var er = 1e4;
2684
- function I(e, t, n) {
2720
+ var nr = "x-authhero-preserve-location", rr = 1e4;
2721
+ function L(e, t, n) {
2685
2722
  let r = typeof t == "number" ? {
2686
2723
  freshTtlMs: t,
2687
2724
  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();
2725
+ } : 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
2726
  function d(e) {
2690
2727
  for (let [t, n] of u) n.stale_if_error_until <= e && n.stale_until <= e && !n.refreshing && u.delete(t);
2691
2728
  for (; u.size >= c;) {
@@ -2742,7 +2779,7 @@ function I(e, t, n) {
2742
2779
  }
2743
2780
  //#endregion
2744
2781
  //#region src/data-plane/registry.ts
2745
- var L = class {
2782
+ var R = class {
2746
2783
  definitions = /* @__PURE__ */ new Map();
2747
2784
  bindings;
2748
2785
  constructor(e = {}) {
@@ -2762,38 +2799,38 @@ var L = class {
2762
2799
  return n.build(r.data, { bindings: this.bindings });
2763
2800
  }
2764
2801
  };
2765
- function R(e) {
2802
+ function z(e) {
2766
2803
  return e;
2767
2804
  }
2768
2805
  //#endregion
2769
2806
  //#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) {
2772
- e.set(z, t);
2807
+ var B = "__authhero_proxy_request__", V = "__authhero_proxy_tenant_id__", H = "__authhero_proxy_custom_domain_id__", ir = "__authhero_proxy_domain__", ar = "x-authhero-proxy-mutability-probe";
2808
+ function or(e, t) {
2809
+ e.set(B, t);
2773
2810
  }
2774
2811
  function U(e) {
2775
- return e.get(z) ?? e.req.raw;
2776
- }
2777
- function rr(e, t) {
2778
- e.set(B, t.tenant_id), e.set(V, t.custom_domain_id), e.set(H, t.domain);
2812
+ return e.get(B) ?? e.req.raw;
2779
2813
  }
2780
- function ir(e) {
2781
- return e.get(B);
2814
+ function sr(e, t) {
2815
+ e.set(V, t.tenant_id), e.set(H, t.custom_domain_id), e.set(ir, t.domain);
2782
2816
  }
2783
- function ar(e) {
2817
+ function cr(e) {
2784
2818
  return e.get(V);
2785
2819
  }
2786
- function or(e) {
2820
+ function lr(e) {
2787
2821
  return e.get(H);
2788
2822
  }
2789
- function sr(e, t) {
2823
+ function ur(e) {
2824
+ return e.get(ir);
2825
+ }
2826
+ function dr(e, t) {
2790
2827
  let n = U(e), r = new Headers(n.headers);
2791
- t(r), nr(e, new Request(n, { headers: r }));
2828
+ t(r), or(e, new Request(n, { headers: r }));
2792
2829
  }
2793
2830
  function W(e) {
2794
2831
  let t = e.res;
2795
2832
  try {
2796
- t.headers.append(tr, "1"), t.headers.delete(tr);
2833
+ t.headers.append(ar, "1"), t.headers.delete(ar);
2797
2834
  return;
2798
2835
  } catch {
2799
2836
  e.res = new Response(t.body, {
@@ -2805,7 +2842,7 @@ function W(e) {
2805
2842
  }
2806
2843
  //#endregion
2807
2844
  //#region src/data-plane/handlers/cors.ts
2808
- var cr = e.object({
2845
+ var fr = e.object({
2809
2846
  origins: e.array(e.string()).optional(),
2810
2847
  allow_credentials: e.boolean().optional(),
2811
2848
  allow_headers: e.array(e.string()).optional(),
@@ -2813,44 +2850,44 @@ var cr = e.object({
2813
2850
  expose_headers: e.array(e.string()).optional(),
2814
2851
  max_age: e.number().int().optional()
2815
2852
  }).refine((e) => !(e.allow_credentials && e.origins?.includes("*")), { message: "Cannot use wildcard origin (*) with allow_credentials" });
2816
- function lr(e, t) {
2853
+ function pr(e, t) {
2817
2854
  let n = new Headers(), r = e.origins ?? ["*"], i = r.includes("*");
2818
2855
  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
2856
  }
2820
- var ur = R({
2857
+ var mr = z({
2821
2858
  type: "cors",
2822
- optionsSchema: cr,
2859
+ optionsSchema: fr,
2823
2860
  build(e) {
2824
2861
  return async (t, n) => {
2825
2862
  let r = t.req.header("origin") ?? null;
2826
2863
  if (t.req.method === "OPTIONS" && r !== null && t.req.header("access-control-request-method") !== void 0) {
2827
- let t = lr(e, r);
2864
+ let t = pr(e, r);
2828
2865
  return new Response(null, {
2829
2866
  status: 204,
2830
2867
  headers: t
2831
2868
  });
2832
2869
  }
2833
2870
  await n();
2834
- let i = lr(e, r);
2871
+ let i = pr(e, r);
2835
2872
  W(t), i.forEach((e, n) => {
2836
2873
  n.toLowerCase() === "vary" ? t.res.headers.append(n, e) : t.res.headers.set(n, e);
2837
2874
  });
2838
2875
  };
2839
2876
  }
2840
- }), dr = e.object({
2877
+ }), hr = e.object({
2841
2878
  username: e.string(),
2842
2879
  password: e.string(),
2843
2880
  realm: e.string().optional()
2844
2881
  });
2845
- function fr(e, t) {
2882
+ function gr(e, t) {
2846
2883
  let n = `${e}:${t}`;
2847
2884
  return typeof btoa == "function" ? btoa(n) : Buffer.from(n, "utf-8").toString("base64");
2848
2885
  }
2849
- var pr = R({
2886
+ var _r = z({
2850
2887
  type: "basic_auth",
2851
- optionsSchema: dr,
2888
+ optionsSchema: hr,
2852
2889
  build(e) {
2853
- let t = fr(e.username, e.password), n = (e.realm ?? "Restricted").replace(/["\\\r\n]/g, "");
2890
+ let t = gr(e.username, e.password), n = (e.realm ?? "Restricted").replace(/["\\\r\n]/g, "");
2854
2891
  return async (e, r) => {
2855
2892
  let i = e.req.header("authorization");
2856
2893
  if (i) {
@@ -2866,7 +2903,7 @@ var pr = R({
2866
2903
  });
2867
2904
  };
2868
2905
  }
2869
- }), mr = R({
2906
+ }), vr = z({
2870
2907
  type: "headers",
2871
2908
  optionsSchema: e.object({
2872
2909
  request: e.record(e.string(), e.string()).optional(),
@@ -2876,12 +2913,12 @@ var pr = R({
2876
2913
  }),
2877
2914
  build(e) {
2878
2915
  return async (t, n) => {
2879
- if ((e.request || e.remove_request) && sr(t, (t) => {
2916
+ if ((e.request || e.remove_request) && dr(t, (t) => {
2880
2917
  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
2918
  }), 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
2919
  };
2883
2920
  }
2884
- }), hr = R({
2921
+ }), yr = z({
2885
2922
  type: "cache",
2886
2923
  optionsSchema: e.object({ ttl_seconds: e.number().int().positive() }),
2887
2924
  build(e) {
@@ -2892,7 +2929,7 @@ var pr = R({
2892
2929
  }
2893
2930
  };
2894
2931
  }
2895
- }), gr = [
2932
+ }), br = [
2896
2933
  "173.245.48.0/20",
2897
2934
  "103.21.244.0/22",
2898
2935
  "103.22.200.0/22",
@@ -2916,7 +2953,7 @@ var pr = R({
2916
2953
  "2a06:98c0::/29",
2917
2954
  "2c0f:f248::/32"
2918
2955
  ];
2919
- function _r(e) {
2956
+ function xr(e) {
2920
2957
  let t = e.split(".");
2921
2958
  if (t.length !== 4) return null;
2922
2959
  let n = [];
@@ -2928,14 +2965,14 @@ function _r(e) {
2928
2965
  }
2929
2966
  return n;
2930
2967
  }
2931
- function vr(e) {
2968
+ function Sr(e) {
2932
2969
  if (e === "") return [];
2933
2970
  let t = e.split(":"), n = [];
2934
2971
  for (let e = 0; e < t.length; e++) {
2935
2972
  let r = t[e];
2936
2973
  if (r.includes(".")) {
2937
2974
  if (e !== t.length - 1) return null;
2938
- let i = _r(r);
2975
+ let i = xr(r);
2939
2976
  if (!i) return null;
2940
2977
  n.push(i[0] << 8 | i[1], i[2] << 8 | i[3]);
2941
2978
  continue;
@@ -2945,14 +2982,14 @@ function vr(e) {
2945
2982
  }
2946
2983
  return n;
2947
2984
  }
2948
- function yr(e) {
2985
+ function Cr(e) {
2949
2986
  let t = e.split("::");
2950
2987
  if (t.length > 2) return null;
2951
- let n = vr(t[0] ?? "");
2988
+ let n = Sr(t[0] ?? "");
2952
2989
  if (!n) return null;
2953
2990
  let r;
2954
2991
  if (t.length === 2) {
2955
- let e = vr(t[1] ?? "");
2992
+ let e = Sr(t[1] ?? "");
2956
2993
  if (!e) return null;
2957
2994
  let i = 8 - n.length - e.length;
2958
2995
  if (i < 1) return null;
@@ -2967,25 +3004,25 @@ function yr(e) {
2967
3004
  for (let e of r) i.push(e >> 8 & 255, e & 255);
2968
3005
  return i;
2969
3006
  }
2970
- function br(e) {
3007
+ function wr(e) {
2971
3008
  let t = e.trim();
2972
3009
  t.startsWith("[") && t.endsWith("]") && (t = t.slice(1, -1));
2973
3010
  let n = t.indexOf("%");
2974
3011
  if (n !== -1 && (t = t.slice(0, n)), t === "") return null;
2975
- if (!t.includes(":")) return _r(t);
2976
- let r = yr(t);
3012
+ if (!t.includes(":")) return xr(t);
3013
+ let r = Cr(t);
2977
3014
  return r ? r.slice(0, 10).every((e) => e === 0) && r[10] === 255 && r[11] === 255 ? r.slice(12) : r : null;
2978
3015
  }
2979
- function xr(e) {
2980
- let [t, n] = e.split("/"), r = br(t ?? ""), i = Number(n);
3016
+ function Tr(e) {
3017
+ let [t, n] = e.split("/"), r = wr(t ?? ""), i = Number(n);
2981
3018
  if (!r || !Number.isInteger(i)) throw Error(`Invalid Cloudflare CIDR: ${e}`);
2982
3019
  return {
2983
3020
  bytes: r,
2984
3021
  prefixBits: i
2985
3022
  };
2986
3023
  }
2987
- var Sr = gr.map(xr);
2988
- function Cr(e, t) {
3024
+ var Er = br.map(Tr);
3025
+ function Dr(e, t) {
2989
3026
  if (e.length !== t.bytes.length) return !1;
2990
3027
  let n = t.prefixBits >> 3;
2991
3028
  for (let r = 0; r < n; r++) if (e[r] !== t.bytes[r]) return !1;
@@ -2994,11 +3031,11 @@ function Cr(e, t) {
2994
3031
  let i = 255 << 8 - r & 255;
2995
3032
  return (e[n] & i) === (t.bytes[n] & i);
2996
3033
  }
2997
- function wr(e) {
2998
- let t = br(e);
2999
- return t ? Sr.some((e) => Cr(t, e)) : !1;
3034
+ function Or(e) {
3035
+ let t = wr(e);
3036
+ return t ? Er.some((e) => Dr(t, e)) : !1;
3000
3037
  }
3001
- var Tr = R({
3038
+ var kr = z({
3002
3039
  type: "forwarded_headers",
3003
3040
  optionsSchema: e.object({
3004
3041
  client_ip_header: e.string().default("cf-connecting-ip"),
@@ -3009,45 +3046,48 @@ var Tr = R({
3009
3046
  build(e) {
3010
3047
  return async (t, n) => {
3011
3048
  let r = new URL(t.req.url);
3012
- sr(t, (n) => {
3049
+ dr(t, (n) => {
3013
3050
  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;
3051
+ let i = n.get(e.client_ip_header), a = i && e.skip_cloudflare_client_ip && Or(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
3052
  n.set("x-forwarded-for", l), e.set_x_real_ip && n.set("x-real-ip", s);
3016
3053
  }), await n();
3017
3054
  };
3018
3055
  }
3019
- }), Er = e.object({ upstream_host: e.string().optional() });
3020
- function Dr(e) {
3056
+ }), Ar = e.object({ upstream_host: e.string().optional() });
3057
+ function jr(e) {
3021
3058
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
3022
3059
  }
3023
- function Or(e) {
3060
+ function Mr(e) {
3024
3061
  if (typeof e.getSetCookie == "function") return e.getSetCookie();
3025
3062
  let t = [];
3026
3063
  return e.forEach((e, n) => {
3027
3064
  n.toLowerCase() === "set-cookie" && t.push(e);
3028
3065
  }), t;
3029
3066
  }
3030
- var kr = R({
3067
+ var Nr = z({
3031
3068
  type: "rewrite_cookies",
3032
- optionsSchema: Er,
3069
+ optionsSchema: Ar,
3033
3070
  build(e) {
3034
3071
  return async (t, n) => {
3035
3072
  await n();
3036
3073
  let r = new URL(t.req.url).hostname, i = e.upstream_host ?? t.get("__proxy_upstream_host__");
3037
3074
  if (!i) return;
3038
- let a = Or(t.res.headers);
3075
+ let a = Mr(t.res.headers);
3039
3076
  if (a.length === 0) return;
3040
- let o = Dr(i), s = RegExp(`(?:^|;\\s*)Domain=\\.?${o}(?=;|$)`, "i");
3077
+ let o = jr(i), s = RegExp(`(?:^|;\\s*)Domain=\\.?${o}(?=;|$)`, "i");
3041
3078
  W(t), t.res.headers.delete("set-cookie");
3042
3079
  for (let e of a) t.res.headers.append("set-cookie", e.replace(s, `Domain=${r}`));
3043
3080
  };
3044
3081
  }
3045
- }), Ar = R({
3082
+ }), Pr = z({
3046
3083
  type: "rewrite_location",
3047
3084
  optionsSchema: e.object({ upstream_origin: e.string().optional() }),
3048
3085
  build(e) {
3049
3086
  return async (t, n) => {
3050
- await n();
3087
+ if (await n(), t.res.headers.has("x-authhero-preserve-location")) {
3088
+ W(t), t.res.headers.delete(nr);
3089
+ return;
3090
+ }
3051
3091
  let r = t.res.status;
3052
3092
  if (r < 300 || r >= 400) return;
3053
3093
  let i = t.res.headers.get("location");
@@ -3065,14 +3105,14 @@ var kr = R({
3065
3105
  W(t), t.res.headers.set("location", c);
3066
3106
  };
3067
3107
  }
3068
- }), jr = class extends Error {
3108
+ }), Fr = class extends Error {
3069
3109
  ms;
3070
3110
  constructor(e, t) {
3071
3111
  super(`${t ?? "Operation"} timed out after ${e}ms`), this.name = "TimeoutError", this.ms = e;
3072
3112
  }
3073
3113
  };
3074
3114
  function G(e) {
3075
- return e instanceof jr ? !0 : e instanceof Error ? e.name === "AbortError" || e.name === "TimeoutError" : !1;
3115
+ return e instanceof Fr ? !0 : e instanceof Error ? e.name === "AbortError" || e.name === "TimeoutError" : !1;
3076
3116
  }
3077
3117
  function K(e, t) {
3078
3118
  let n = new AbortController(), r = setTimeout(() => n.abort(), e);
@@ -3080,7 +3120,7 @@ function K(e, t) {
3080
3120
  }
3081
3121
  function q(e, t, n) {
3082
3122
  let r, i = new Promise((e, i) => {
3083
- r = setTimeout(() => i(new jr(t, n)), t);
3123
+ r = setTimeout(() => i(new Fr(t, n)), t);
3084
3124
  });
3085
3125
  return Promise.race([e, i]).finally(() => {
3086
3126
  r && clearTimeout(r);
@@ -3088,7 +3128,7 @@ function q(e, t, n) {
3088
3128
  }
3089
3129
  //#endregion
3090
3130
  //#region src/data-plane/handlers/http.ts
3091
- var Mr = new Set([
3131
+ var Ir = new Set([
3092
3132
  "connection",
3093
3133
  "keep-alive",
3094
3134
  "proxy-authenticate",
@@ -3097,24 +3137,24 @@ var Mr = new Set([
3097
3137
  "trailers",
3098
3138
  "transfer-encoding",
3099
3139
  "upgrade"
3100
- ]), Nr = 3e4, Pr = e.object({
3140
+ ]), Lr = 3e4, Rr = e.object({
3101
3141
  upstream_url: e.string(),
3102
3142
  preserve_host: e.boolean().default(!1),
3103
3143
  timeout_ms: e.number().int().positive().optional()
3104
3144
  });
3105
- function Fr(e, t) {
3145
+ function zr(e, t) {
3106
3146
  return e === "" || e === "/" ? t : `${e.endsWith("/") ? e.slice(0, -1) : e}${t.startsWith("/") ? t : `/${t}`}`;
3107
3147
  }
3108
- function Ir(e) {
3148
+ function Br(e) {
3109
3149
  return e !== "GET" && e !== "HEAD";
3110
3150
  }
3111
- function Lr(e, t) {
3151
+ function Vr(e, t) {
3112
3152
  let n = new URL(t.url), r = new URL(e.upstream_url);
3113
- r.pathname = Fr(r.pathname, n.pathname), r.search = n.search;
3153
+ r.pathname = zr(r.pathname, n.pathname), r.search = n.search;
3114
3154
  let i = new Headers(t.headers);
3115
- for (let e of Mr) i.delete(e);
3155
+ for (let e of Ir) i.delete(e);
3116
3156
  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 = {
3157
+ let a = Br(t.method) ? t.body : void 0, o = {
3118
3158
  method: t.method,
3119
3159
  headers: i,
3120
3160
  body: a,
@@ -3125,13 +3165,13 @@ function Lr(e, t) {
3125
3165
  init: o
3126
3166
  };
3127
3167
  }
3128
- var Rr = R({
3168
+ var Hr = z({
3129
3169
  type: "http",
3130
- optionsSchema: Pr,
3170
+ optionsSchema: Rr,
3131
3171
  build(e) {
3132
- let t = e.timeout_ms ?? Nr;
3172
+ let t = e.timeout_ms ?? Lr;
3133
3173
  return async (n) => {
3134
- let { target: r, init: i } = Lr(e, U(n));
3174
+ let { target: r, init: i } = Vr(e, U(n));
3135
3175
  n.set("__proxy_upstream_host__", r.hostname), n.set("__proxy_upstream_origin__", `${r.protocol}//${r.host}`);
3136
3176
  try {
3137
3177
  return await K(t, (e) => fetch(r.toString(), {
@@ -3143,24 +3183,24 @@ var Rr = R({
3143
3183
  }
3144
3184
  };
3145
3185
  }
3146
- }), zr = 3e4, Br = e.object({
3186
+ }), Ur = 3e4, Wr = e.object({
3147
3187
  binding: e.string(),
3148
3188
  upstream_url: e.string().optional(),
3149
3189
  preserve_host: e.boolean().default(!0),
3150
3190
  timeout_ms: e.number().int().positive().optional()
3151
3191
  });
3152
- function Vr(e) {
3192
+ function Gr(e) {
3153
3193
  return typeof e == "object" && !!e && typeof e.fetch == "function";
3154
3194
  }
3155
- var Hr = R({
3195
+ var Kr = z({
3156
3196
  type: "service_binding",
3157
- optionsSchema: Br,
3197
+ optionsSchema: Wr,
3158
3198
  build(e, t) {
3159
3199
  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;
3200
+ if (!Gr(n)) throw Error(`Service binding "${e.binding}" is not configured or is not a Fetcher`);
3201
+ let r = e.upstream_url ?? `https://${e.binding}.binding.invalid/`, i = e.timeout_ms ?? Ur;
3162
3202
  return async (t) => {
3163
- let a = U(t), { target: o, init: s } = Lr({
3203
+ let a = U(t), { target: o, init: s } = Vr({
3164
3204
  upstream_url: r,
3165
3205
  preserve_host: e.preserve_host
3166
3206
  }, a);
@@ -3175,34 +3215,34 @@ var Hr = R({
3175
3215
  }
3176
3216
  };
3177
3217
  }
3178
- }), Ur = 3e4, Wr = e.object({
3218
+ }), qr = 3e4, Jr = e.object({
3179
3219
  binding: e.string(),
3180
3220
  script_name: e.string(),
3181
3221
  cpu_ms: e.number().int().positive().optional(),
3182
3222
  subrequests: e.number().int().positive().optional(),
3183
3223
  timeout_ms: e.number().int().positive().optional()
3184
3224
  });
3185
- function Gr(e) {
3225
+ function Yr(e) {
3186
3226
  return typeof e == "object" && !!e && typeof e.get == "function";
3187
3227
  }
3188
3228
  var J = /\{(tenant_id|custom_domain_id|domain|host)\}/g;
3189
- function Kr(e) {
3229
+ function Xr(e) {
3190
3230
  return J.lastIndex = 0, J.test(e);
3191
3231
  }
3192
- var qr = R({
3232
+ var Zr = z({
3193
3233
  type: "dispatch_namespace",
3194
- optionsSchema: Wr,
3234
+ optionsSchema: Jr,
3195
3235
  build(e, t) {
3196
3236
  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: {
3237
+ if (!Yr(n)) throw Error(`Dispatch namespace binding "${e.binding}" is not configured or does not expose .get()`);
3238
+ let r = Xr(e.script_name), i = e.timeout_ms ?? qr, a = e.cpu_ms || e.subrequests ? { limits: {
3199
3239
  ...e.cpu_ms ? { cpuMs: e.cpu_ms } : {},
3200
3240
  ...e.subrequests ? { subrequests: e.subrequests } : {}
3201
3241
  } } : void 0;
3202
3242
  return async (t) => {
3203
3243
  let o = e.script_name;
3204
3244
  if (r) {
3205
- let n = ir(t), r = ar(t), i = or(t), a = t.req.header("host") ?? t.req.header("x-forwarded-host") ?? "";
3245
+ let n = cr(t), r = lr(t), i = ur(t), a = t.req.header("host") ?? t.req.header("x-forwarded-host") ?? "";
3206
3246
  if (o = o.replace(J, (e, t) => {
3207
3247
  switch (t) {
3208
3248
  case "tenant_id": return n ?? "";
@@ -3225,7 +3265,7 @@ var qr = R({
3225
3265
  }
3226
3266
  };
3227
3267
  }
3228
- }), Jr = R({
3268
+ }), Qr = z({
3229
3269
  type: "redirect",
3230
3270
  optionsSchema: e.object({
3231
3271
  upstream_url: e.string().refine((e) => {
@@ -3254,7 +3294,7 @@ var qr = R({
3254
3294
  });
3255
3295
  };
3256
3296
  }
3257
- }), Yr = R({
3297
+ }), $r = z({
3258
3298
  type: "static",
3259
3299
  optionsSchema: e.object({
3260
3300
  status: e.number().int().default(200),
@@ -3274,15 +3314,15 @@ var qr = R({
3274
3314
  });
3275
3315
  //#endregion
3276
3316
  //#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);
3317
+ function ei(e) {
3318
+ e.add(mr).add(_r).add(vr).add(yr).add(kr).add(Nr).add(Pr).add(Hr).add(Kr).add(Zr).add(Qr).add($r);
3279
3319
  }
3280
3320
  //#endregion
3281
3321
  //#region src/data-plane/matcher.ts
3282
- function Zr(e) {
3322
+ function ti(e) {
3283
3323
  return [...e].sort((e, t) => e.priority === t.priority ? e.created_at.localeCompare(t.created_at) : e.priority - t.priority);
3284
3324
  }
3285
- function Qr(e, t) {
3325
+ function ni(e, t) {
3286
3326
  let n = e.toLowerCase(), r = t.toLowerCase();
3287
3327
  if (n === r) return !0;
3288
3328
  if (n.startsWith("*.")) {
@@ -3291,13 +3331,13 @@ function Qr(e, t) {
3291
3331
  }
3292
3332
  return !1;
3293
3333
  }
3294
- function $r(e, t) {
3295
- return !e || e.length === 0 ? !0 : e.some((e) => Qr(e, t));
3334
+ function ri(e, t) {
3335
+ return !e || e.length === 0 ? !0 : e.some((e) => ni(e, t));
3296
3336
  }
3297
- function ei(e) {
3337
+ function ii(e) {
3298
3338
  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
3339
  return async (e, i) => {
3300
- if (r && !$r(r, e.req.header("host") ?? "")) return new Response("No matching route", { status: 404 });
3340
+ if (r && !ri(r, e.req.header("host") ?? "")) return new Response("No matching route", { status: 404 });
3301
3341
  for (let [n, r] of t) {
3302
3342
  let t = e.req.header(n);
3303
3343
  if (t === void 0 || !r.test(t)) return new Response("No matching route", { status: 404 });
@@ -3314,17 +3354,17 @@ function ei(e) {
3314
3354
  }
3315
3355
  //#endregion
3316
3356
  //#region src/data-plane/compile.ts
3317
- var ti = "forwarded_headers";
3318
- function Y(e) {
3357
+ var Y = "forwarded_headers";
3358
+ function ai(e) {
3319
3359
  return e.some((e) => e.type === "forwarded_headers") ? [...e] : [{
3320
- type: ti,
3360
+ type: Y,
3321
3361
  options: {}
3322
3362
  }, ...e];
3323
3363
  }
3324
3364
  function X(e, t) {
3325
- return e.has("forwarded_headers") ? Y(t) : [...t];
3365
+ return e.has("forwarded_headers") ? ai(t) : [...t];
3326
3366
  }
3327
- var ni = [
3367
+ var oi = [
3328
3368
  "GET",
3329
3369
  "POST",
3330
3370
  "PUT",
@@ -3336,34 +3376,34 @@ var ni = [
3336
3376
  function Z(e, n, r, i) {
3337
3377
  let a = new t();
3338
3378
  r && a.use("*", async (e, t) => {
3339
- rr(e, r), await t();
3379
+ sr(e, r), await t();
3340
3380
  });
3341
- let o = Zr(e);
3381
+ let o = ti(e);
3342
3382
  for (let e of o) {
3343
3383
  let t = [];
3344
- t.push(ei(e.match));
3384
+ t.push(ii(e.match));
3345
3385
  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 || "/*";
3386
+ let r = e.match.methods?.length ? e.match.methods.map((e) => e.toUpperCase()) : oi, i = e.match.path || "/*";
3347
3387
  a.on(r, [i], ...t);
3348
3388
  }
3349
- return i && i.length > 0 ? a.on(ni, ["*"], ...i) : a.all("*", (e) => e.text("No matching route", 404)), a.onError((e, t) => {
3389
+ return i && i.length > 0 ? a.on(oi, ["*"], ...i) : a.all("*", (e) => e.text("No matching route", 404)), a.onError((e, t) => {
3350
3390
  let n = G(e);
3351
3391
  return t.text(n ? "Upstream timeout" : "Bad gateway", n ? 504 : 502, { "x-authhero-proxy-error": n ? "handler_timeout" : "handler_failed" });
3352
3392
  }), a;
3353
3393
  }
3354
3394
  //#endregion
3355
3395
  //#region src/data-plane/router.ts
3356
- var ri = 1e4;
3357
- function ii(e) {
3358
- return e.resolver ? e.resolver : e.cache ? I(e.data, e.cache) : I(e.data, e.cacheTtlMs ?? 3e4);
3396
+ var si = 1e4;
3397
+ function ci(e) {
3398
+ return e.resolver ? e.resolver : e.cache ? L(e.data, e.cache) : L(e.data, e.cacheTtlMs ?? 3e4);
3359
3399
  }
3360
- function ai(e) {
3400
+ function li(e) {
3361
3401
  if (e.registry) return e.registry;
3362
- let t = new L(e.bindings ?? {});
3363
- return Xr(t), t;
3402
+ let t = new R(e.bindings ?? {});
3403
+ return ei(t), t;
3364
3404
  }
3365
3405
  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;
3406
+ let t = ci(e), n = li(e), r = /* @__PURE__ */ new WeakMap(), i = e.resolveHostTimeoutMs ?? si, 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
3407
  return async (e) => {
3368
3408
  let s = e.req.header("host") ?? e.req.header("x-forwarded-host");
3369
3409
  if (!s) return e.text("Missing host", 400);
@@ -3381,13 +3421,13 @@ function Q(e) {
3381
3421
  }
3382
3422
  };
3383
3423
  }
3384
- function oi(e) {
3424
+ function ui(e) {
3385
3425
  let n = new t();
3386
3426
  return n.all("*", Q(e)), n;
3387
3427
  }
3388
3428
  //#endregion
3389
3429
  //#region src/app.ts
3390
- function si(e) {
3430
+ function di(e) {
3391
3431
  let n = new t();
3392
3432
  return n.all("*", Q({
3393
3433
  data: e.data,
@@ -3405,17 +3445,17 @@ function si(e) {
3405
3445
  }
3406
3446
  //#endregion
3407
3447
  //#region src/data-plane/cache-api-cache.ts
3408
- var ci = 1e3, li = 1e3;
3409
- function ui(e, t) {
3448
+ var fi = 1e3, pi = 1e3;
3449
+ function mi(e, t) {
3410
3450
  return new Request(`https://proxy-cache.internal/${encodeURIComponent(e)}/hosts/${encodeURIComponent(t.toLowerCase())}`, { method: "GET" });
3411
3451
  }
3412
- function di() {
3452
+ function hi() {
3413
3453
  return globalThis.caches?.default;
3414
3454
  }
3415
- function fi(e) {
3416
- let t = e.cache ?? di();
3455
+ function gi(e) {
3456
+ let t = e.cache ?? hi();
3417
3457
  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;
3458
+ let n = t, r = e.namespace ?? "authhero-proxy", i = e.cacheTtlSeconds ?? 60, a = e.negativeCacheTtlSeconds ?? 10, o = e.waitUntil, s = e.cacheReadTimeoutMs ?? fi, c = e.cacheWriteTimeoutMs ?? pi;
3419
3459
  async function l(e) {
3420
3460
  try {
3421
3461
  return await q(Promise.resolve(n.match(e)), s, "cache.match");
@@ -3424,7 +3464,7 @@ function fi(e) {
3424
3464
  }
3425
3465
  }
3426
3466
  return { async resolveHost(t) {
3427
- let s = ui(r, t), u = await l(s);
3467
+ let s = mi(r, t), u = await l(s);
3428
3468
  if (u) try {
3429
3469
  return (await u.json()).value;
3430
3470
  } catch {}
@@ -3435,14 +3475,14 @@ function fi(e) {
3435
3475
  return o ? o(m) : await m, d;
3436
3476
  } };
3437
3477
  }
3438
- function pi(e, t) {
3439
- return ui(e, t);
3478
+ function _i(e, t) {
3479
+ return mi(e, t);
3440
3480
  }
3441
3481
  //#endregion
3442
3482
  //#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();
3483
+ var vi = 1e3, yi = 1e3;
3484
+ function bi(e) {
3485
+ 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 = vi, cacheWriteTimeoutMs: u = yi } = e, d = /* @__PURE__ */ new Map();
3446
3486
  function f(e) {
3447
3487
  return `${s}:${e.toLowerCase()}`;
3448
3488
  }
@@ -3495,7 +3535,7 @@ function gi(e) {
3495
3535
  }
3496
3536
  } };
3497
3537
  }
3498
- function _i(e, t) {
3538
+ function xi(e, t) {
3499
3539
  return `${e}:${t.toLowerCase()}`;
3500
3540
  }
3501
3541
  //#endregion
@@ -3503,7 +3543,7 @@ function _i(e, t) {
3503
3543
  function $() {
3504
3544
  throw Error("Static proxy adapter is read-only; configure routes at init time");
3505
3545
  }
3506
- function vi(e, t, n, r, i, a) {
3546
+ function Si(e, t, n, r, i, a) {
3507
3547
  return {
3508
3548
  id: e.id ?? `${n}:${t}`,
3509
3549
  tenant_id: r,
@@ -3518,10 +3558,10 @@ function vi(e, t, n, r, i, a) {
3518
3558
  updated_at: e.updated_at ?? a
3519
3559
  };
3520
3560
  }
3521
- function yi(e) {
3561
+ function Ci(e) {
3522
3562
  let t = (/* @__PURE__ */ new Date()).toISOString(), n = e.defaultTenantId ?? "static", r = /* @__PURE__ */ new Map();
3523
3563
  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);
3564
+ 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) => Si(n, r, e, s, c, t)).sort((e, t) => e.priority - t.priority);
3525
3565
  r.set(e, {
3526
3566
  tenant_id: s,
3527
3567
  custom_domain_id: c,
@@ -3565,7 +3605,7 @@ function yi(e) {
3565
3605
  }
3566
3606
  };
3567
3607
  }
3568
- function bi(e, t = {}) {
3608
+ function wi(e, t = {}) {
3569
3609
  return {
3570
3610
  priority: t.priority,
3571
3611
  match: { path: t.path ?? "/*" },
@@ -3580,10 +3620,10 @@ function bi(e, t = {}) {
3580
3620
  }
3581
3621
  //#endregion
3582
3622
  //#region src/constants.ts
3583
- var xi = "proxy:resolve_host";
3623
+ var Ti = "proxy:resolve_host";
3584
3624
  //#endregion
3585
3625
  //#region src/http-adapter/index.ts
3586
- function Si() {
3626
+ function Ei() {
3587
3627
  let e = () => {
3588
3628
  throw Error("HTTP proxy adapter does not expose write access to proxy_routes; mutate via the control-plane management API");
3589
3629
  };
@@ -3605,7 +3645,7 @@ function Si() {
3605
3645
  }
3606
3646
  };
3607
3647
  }
3608
- function Ci(e) {
3648
+ function Di(e) {
3609
3649
  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
3650
  function c(e) {
3611
3651
  let t = new AbortController(), n = setTimeout(() => t.abort(), s);
@@ -3638,7 +3678,7 @@ function Ci(e) {
3638
3678
  }), u);
3639
3679
  }
3640
3680
  return {
3641
- proxyRoutes: Si(),
3681
+ proxyRoutes: Ei(),
3642
3682
  async resolveHost(e) {
3643
3683
  let i = await f(), a = `${n}${r}${encodeURIComponent(e.toLowerCase())}`, o = await c((e) => t(a, {
3644
3684
  headers: { authorization: `Bearer ${i}` },
@@ -3652,7 +3692,7 @@ function Ci(e) {
3652
3692
  }
3653
3693
  //#endregion
3654
3694
  //#region src/http-adapter/service-binding-fetch.ts
3655
- function wi(e) {
3695
+ function Oi(e) {
3656
3696
  return (t, n) => {
3657
3697
  let r = t instanceof Request && n === void 0 ? t : new Request(t, n);
3658
3698
  return e.fetch(r);
@@ -3660,11 +3700,11 @@ function wi(e) {
3660
3700
  }
3661
3701
  //#endregion
3662
3702
  //#region src/kv-adapter/index.ts
3663
- var Ti = "authhero-proxy-host:";
3664
- function Ei(e, t) {
3703
+ var ki = "authhero-proxy-host:";
3704
+ function Ai(e, t) {
3665
3705
  return `${e}${t.toLowerCase()}`;
3666
3706
  }
3667
- function Di() {
3707
+ function ji() {
3668
3708
  let e = () => {
3669
3709
  throw Error("KV proxy adapter does not expose write access to proxy_routes; mutate via the control-plane management API");
3670
3710
  };
@@ -3686,15 +3726,15 @@ function Di() {
3686
3726
  }
3687
3727
  };
3688
3728
  }
3689
- function Oi(e) {
3690
- let { kv: t, keyPrefix: n = Ti, timeoutMs: r } = e;
3729
+ function Mi(e) {
3730
+ let { kv: t, keyPrefix: n = ki, timeoutMs: r } = e;
3691
3731
  return {
3692
- proxyRoutes: Di(),
3732
+ proxyRoutes: ji(),
3693
3733
  async resolveHost(e) {
3694
- let i = Ei(n, e), a = t.get(i, "json");
3734
+ let i = Ai(n, e), a = t.get(i, "json");
3695
3735
  return (r && r > 0 ? await q(a, r, "kv.get") : await a) ?? null;
3696
3736
  }
3697
3737
  };
3698
3738
  }
3699
3739
  //#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 };
3740
+ export { ki as DEFAULT_KV_HOST_KEY_PREFIX, Y as FORWARDED_HEADERS_HANDLER_TYPE, R as HandlerRegistry, Ti as PROXY_RESOLVE_HOST_SCOPE, _r as basicAuthHandler, xi as buildCacheAdapterKey, _i as buildCacheApiKey, Ai as buildKvHostKey, ii as buildMatchFilter, yr as cacheHandler, Z as compileHostApp, mr as corsHandler, bi as createCacheAdapterHostCache, gi as createCacheApiHostCache, Di as createHttpProxyAdapter, L as createInMemoryHostCache, Mi as createKvProxyAdapter, di as createProxyApp, Q as createProxyDataPlaneHandler, ui as createProxyDataPlaneRouter, Oi as createServiceBindingFetch, Ci as createStaticProxyAdapter, z as defineHandler, Zr as dispatchNamespaceHandler, kr as forwardedHeadersHandler, On as handlerConfigSchema, vr as headersHandler, Hr as httpHandler, wi as httpRoute, Or as isCloudflareIp, Dn as matchSchema, ri as matchesAnyHost, ni as matchesHost, F as proxyRouteInsertSchema, kn as proxyRouteSchema, An as proxyRouteUpdateSchema, Qr as redirectHandler, ei as registerBuiltinHandlers, Nr as rewriteCookiesHandler, Pr as rewriteLocationHandler, Kr as serviceBindingHandler, ti as sortRoutes, $r as staticHandler, ai as withForwardedHeaders, X as withForwardedHeadersFor };