@authhero/proxy 0.11.12 → 0.11.14
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.cjs +1 -1
- package/dist/proxy.mjs +654 -640
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/proxy.mjs
CHANGED
|
@@ -306,7 +306,7 @@ var pe = e.object({
|
|
|
306
306
|
region: e.string().optional(),
|
|
307
307
|
postal_code: e.string().optional(),
|
|
308
308
|
country: e.string().optional()
|
|
309
|
-
}).optional(),
|
|
309
|
+
}).optional(), y = e.object({
|
|
310
310
|
email: e.string().transform((e) => e.toLowerCase()).optional(),
|
|
311
311
|
username: e.string().refine((e) => !e.includes("@"), { message: "Usernames must not contain \"@\". Use the email field for email addresses." }).optional(),
|
|
312
312
|
phone_number: e.string().optional(),
|
|
@@ -331,7 +331,7 @@ var pe = e.object({
|
|
|
331
331
|
zoneinfo: e.string().optional(),
|
|
332
332
|
address: he
|
|
333
333
|
});
|
|
334
|
-
|
|
334
|
+
y.extend({
|
|
335
335
|
email_verified: e.boolean().default(!1),
|
|
336
336
|
verify_email: e.boolean().optional(),
|
|
337
337
|
last_ip: e.string().optional(),
|
|
@@ -353,23 +353,23 @@ ge.extend({
|
|
|
353
353
|
email: e.string().optional(),
|
|
354
354
|
login_count: e.number().default(0),
|
|
355
355
|
identities: e.array(me).optional()
|
|
356
|
-
}).omit({ registration_completed_at: !0 }),
|
|
356
|
+
}).omit({ registration_completed_at: !0 }), y.extend({
|
|
357
357
|
login_count: e.number(),
|
|
358
358
|
multifactor: e.array(e.string()).optional(),
|
|
359
359
|
last_ip: e.string().optional(),
|
|
360
360
|
last_login: e.string().optional(),
|
|
361
361
|
user_id: e.string()
|
|
362
362
|
}).catchall(e.any());
|
|
363
|
-
var
|
|
363
|
+
var ge = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", _e = (e = 21) => {
|
|
364
364
|
let t = "", n = crypto.getRandomValues(new Uint8Array(e |= 0));
|
|
365
|
-
for (; e--;) t +=
|
|
365
|
+
for (; e--;) t += ge[n[e] & 63];
|
|
366
366
|
return t;
|
|
367
|
-
},
|
|
367
|
+
}, ve = e.object({
|
|
368
368
|
client_id: e.string().optional().openapi({ description: "ID of this client. Generated server-side if omitted (Auth0 behavior)." }),
|
|
369
369
|
name: e.string().min(1).openapi({ description: "Name of this client (min length: 1 character, does not allow < or >)." }),
|
|
370
370
|
description: e.string().max(140).optional().openapi({ description: "Free text description of this client (max length: 140 characters)." }),
|
|
371
371
|
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)." }),
|
|
372
|
-
client_secret: e.string().default(() =>
|
|
372
|
+
client_secret: e.string().default(() => _e()).optional().openapi({ description: "Client secret (which you must not make public)." }),
|
|
373
373
|
app_type: e.enum([
|
|
374
374
|
"native",
|
|
375
375
|
"spa",
|
|
@@ -487,8 +487,8 @@ var _e = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", ve
|
|
|
487
487
|
e.object({
|
|
488
488
|
created_at: e.string(),
|
|
489
489
|
updated_at: e.string()
|
|
490
|
-
}).extend(
|
|
491
|
-
var
|
|
490
|
+
}).extend(ve.shape).extend({ client_id: e.string() });
|
|
491
|
+
var ye = e.object({
|
|
492
492
|
client_id: e.string().min(1).openapi({ description: "ID of the client." }),
|
|
493
493
|
audience: e.string().min(1).openapi({ description: "The audience (API identifier) of this client grant." }),
|
|
494
494
|
scope: e.array(e.string()).optional().openapi({ description: "Scopes allowed for this client grant." }),
|
|
@@ -501,15 +501,15 @@ var be = e.object({
|
|
|
501
501
|
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." }),
|
|
502
502
|
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." }),
|
|
503
503
|
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." })
|
|
504
|
-
}),
|
|
504
|
+
}), be = e.object({ id: e.string().openapi({ description: "ID of the client grant." }) }).extend(ye.shape).extend({
|
|
505
505
|
created_at: e.string().optional(),
|
|
506
506
|
updated_at: e.string().optional()
|
|
507
507
|
});
|
|
508
|
-
e.array(
|
|
509
|
-
var
|
|
508
|
+
e.array(be);
|
|
509
|
+
var xe = e.enum(["iat", "rat"]), Se = e.object({
|
|
510
510
|
id: e.string(),
|
|
511
511
|
token_hash: e.string(),
|
|
512
|
-
type:
|
|
512
|
+
type: xe,
|
|
513
513
|
client_id: e.string().optional(),
|
|
514
514
|
sub: e.string().optional(),
|
|
515
515
|
constraints: e.record(e.string(), e.unknown()).optional(),
|
|
@@ -520,23 +520,23 @@ e.object({
|
|
|
520
520
|
created_at: e.string(),
|
|
521
521
|
used_at: e.string().optional(),
|
|
522
522
|
revoked_at: e.string().optional()
|
|
523
|
-
}).extend(
|
|
524
|
-
var
|
|
523
|
+
}).extend(Se.shape);
|
|
524
|
+
var b = e.object({
|
|
525
525
|
x: e.number(),
|
|
526
526
|
y: e.number()
|
|
527
|
-
}),
|
|
527
|
+
}), Ce = /* @__PURE__ */ function(e) {
|
|
528
528
|
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;
|
|
529
|
-
}({}),
|
|
529
|
+
}({}), we = /* @__PURE__ */ function(e) {
|
|
530
530
|
return e.BLOCK = "BLOCK", e.FIELD = "FIELD", e;
|
|
531
|
-
}({}),
|
|
531
|
+
}({}), x = e.object({
|
|
532
532
|
id: e.string(),
|
|
533
|
-
category: e.nativeEnum(
|
|
534
|
-
type: e.nativeEnum(
|
|
535
|
-
}),
|
|
533
|
+
category: e.nativeEnum(we),
|
|
534
|
+
type: e.nativeEnum(Ce)
|
|
535
|
+
}), Te = x.extend({
|
|
536
536
|
category: e.literal("BLOCK"),
|
|
537
537
|
type: e.literal("RICH_TEXT"),
|
|
538
538
|
config: e.object({ content: e.string() }).passthrough()
|
|
539
|
-
}),
|
|
539
|
+
}), Ee = x.extend({
|
|
540
540
|
category: e.literal("BLOCK"),
|
|
541
541
|
type: e.union([
|
|
542
542
|
e.literal("NEXT_BUTTON"),
|
|
@@ -544,13 +544,13 @@ var y = e.object({
|
|
|
544
544
|
e.literal("SUBMIT_BUTTON")
|
|
545
545
|
]),
|
|
546
546
|
config: e.object({ text: e.string() }).passthrough()
|
|
547
|
-
}),
|
|
547
|
+
}), De = x.extend({
|
|
548
548
|
category: e.literal("FIELD"),
|
|
549
549
|
type: e.literal("LEGAL"),
|
|
550
550
|
required: e.boolean().optional(),
|
|
551
551
|
sensitive: e.boolean().optional(),
|
|
552
552
|
config: e.object({ text: e.string() }).passthrough()
|
|
553
|
-
}),
|
|
553
|
+
}), Oe = x.extend({
|
|
554
554
|
category: e.literal("FIELD"),
|
|
555
555
|
type: e.union([
|
|
556
556
|
e.literal("TEXT"),
|
|
@@ -570,38 +570,38 @@ var y = e.object({
|
|
|
570
570
|
label: e.string().optional(),
|
|
571
571
|
placeholder: e.string().optional()
|
|
572
572
|
}).passthrough()
|
|
573
|
-
}),
|
|
573
|
+
}), ke = e.object({
|
|
574
574
|
id: e.string(),
|
|
575
575
|
category: e.string(),
|
|
576
576
|
type: e.string()
|
|
577
|
-
}).passthrough(),
|
|
577
|
+
}).passthrough(), Ae = e.union([
|
|
578
|
+
Te,
|
|
578
579
|
Ee,
|
|
579
580
|
De,
|
|
580
581
|
Oe,
|
|
581
|
-
ke
|
|
582
|
-
|
|
583
|
-
]), Me = e.object({
|
|
582
|
+
ke
|
|
583
|
+
]), je = e.object({
|
|
584
584
|
id: e.string(),
|
|
585
585
|
type: e.literal("STEP"),
|
|
586
|
-
coordinates:
|
|
586
|
+
coordinates: b,
|
|
587
587
|
alias: e.string().optional(),
|
|
588
588
|
config: e.object({
|
|
589
|
-
components: e.array(
|
|
589
|
+
components: e.array(Ae),
|
|
590
590
|
next_node: e.string()
|
|
591
591
|
}).passthrough()
|
|
592
|
-
}),
|
|
592
|
+
}), Me = e.object({
|
|
593
593
|
id: e.string(),
|
|
594
594
|
type: e.literal("FLOW"),
|
|
595
|
-
coordinates:
|
|
595
|
+
coordinates: b,
|
|
596
596
|
alias: e.string().optional(),
|
|
597
597
|
config: e.object({
|
|
598
598
|
flow_id: e.string(),
|
|
599
599
|
next_node: e.string()
|
|
600
600
|
})
|
|
601
|
-
}),
|
|
601
|
+
}), Ne = e.object({
|
|
602
602
|
id: e.string(),
|
|
603
603
|
type: e.literal("ACTION"),
|
|
604
|
-
coordinates:
|
|
604
|
+
coordinates: b,
|
|
605
605
|
alias: e.string().optional(),
|
|
606
606
|
config: e.object({
|
|
607
607
|
action_type: e.enum(["REDIRECT"]).openapi({ description: "The type of action to perform" }),
|
|
@@ -613,29 +613,29 @@ var y = e.object({
|
|
|
613
613
|
custom_url: e.string().optional().openapi({ description: "Custom URL when target is 'custom'" }),
|
|
614
614
|
next_node: e.string().openapi({ description: "The next node to navigate to after action (for non-redirect actions)" })
|
|
615
615
|
}).passthrough()
|
|
616
|
-
}),
|
|
616
|
+
}), Pe = e.object({
|
|
617
617
|
id: e.string(),
|
|
618
618
|
type: e.string(),
|
|
619
|
-
coordinates:
|
|
620
|
-
}).passthrough(),
|
|
619
|
+
coordinates: b
|
|
620
|
+
}).passthrough(), Fe = e.union([
|
|
621
|
+
je,
|
|
621
622
|
Me,
|
|
622
623
|
Ne,
|
|
623
|
-
Pe
|
|
624
|
-
|
|
625
|
-
]), Le = e.object({
|
|
624
|
+
Pe
|
|
625
|
+
]), Ie = e.object({
|
|
626
626
|
next_node: e.string(),
|
|
627
|
-
coordinates:
|
|
628
|
-
}).passthrough(),
|
|
627
|
+
coordinates: b
|
|
628
|
+
}).passthrough(), Le = e.object({
|
|
629
629
|
resume_flow: e.boolean().optional(),
|
|
630
|
-
coordinates:
|
|
630
|
+
coordinates: b
|
|
631
631
|
}).passthrough();
|
|
632
632
|
e.object({
|
|
633
633
|
id: e.string(),
|
|
634
634
|
name: e.string(),
|
|
635
635
|
languages: e.object({ primary: e.string() }).passthrough(),
|
|
636
|
-
nodes: e.array(
|
|
637
|
-
start:
|
|
638
|
-
ending:
|
|
636
|
+
nodes: e.array(Fe),
|
|
637
|
+
start: Ie,
|
|
638
|
+
ending: Le,
|
|
639
639
|
created_at: e.string(),
|
|
640
640
|
updated_at: e.string(),
|
|
641
641
|
links: e.object({
|
|
@@ -647,24 +647,24 @@ e.object({
|
|
|
647
647
|
created_at: !0,
|
|
648
648
|
updated_at: !0
|
|
649
649
|
});
|
|
650
|
-
var
|
|
650
|
+
var Re = /* @__PURE__ */ function(e) {
|
|
651
651
|
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;
|
|
652
|
-
}({}),
|
|
652
|
+
}({}), ze = /* @__PURE__ */ function(e) {
|
|
653
653
|
return e.QUERY = "query", e.FRAGMENT = "fragment", e.FORM_POST = "form_post", e.WEB_MESSAGE = "web_message", e.SAML_POST = "saml_post", e;
|
|
654
|
-
}({}),
|
|
654
|
+
}({}), Be = /* @__PURE__ */ function(e) {
|
|
655
655
|
return e.S256 = "S256", e.Plain = "plain", e;
|
|
656
|
-
}({}),
|
|
656
|
+
}({}), Ve = e.union([e.null(), e.object({
|
|
657
657
|
essential: e.boolean().optional(),
|
|
658
658
|
value: e.unknown().optional(),
|
|
659
659
|
values: e.array(e.unknown()).optional()
|
|
660
|
-
})]).nullable(),
|
|
661
|
-
userinfo: e.record(e.string(),
|
|
662
|
-
id_token: e.record(e.string(),
|
|
663
|
-
}),
|
|
660
|
+
})]).nullable(), He = e.object({
|
|
661
|
+
userinfo: e.record(e.string(), Ve).optional(),
|
|
662
|
+
id_token: e.record(e.string(), Ve).optional()
|
|
663
|
+
}), Ue = e.object({
|
|
664
664
|
client_id: e.string(),
|
|
665
665
|
act_as: e.string().optional(),
|
|
666
|
-
response_type: e.nativeEnum(
|
|
667
|
-
response_mode: e.nativeEnum(
|
|
666
|
+
response_type: e.nativeEnum(Re).optional(),
|
|
667
|
+
response_mode: e.nativeEnum(ze).optional(),
|
|
668
668
|
redirect_uri: e.string().optional(),
|
|
669
669
|
audience: e.string().optional(),
|
|
670
670
|
organization: e.string().optional(),
|
|
@@ -672,13 +672,13 @@ var ze = /* @__PURE__ */ function(e) {
|
|
|
672
672
|
nonce: e.string().optional(),
|
|
673
673
|
scope: e.string().optional(),
|
|
674
674
|
prompt: e.string().optional(),
|
|
675
|
-
code_challenge_method: e.nativeEnum(
|
|
675
|
+
code_challenge_method: e.nativeEnum(Be).optional(),
|
|
676
676
|
code_challenge: e.string().optional(),
|
|
677
677
|
username: e.string().optional(),
|
|
678
678
|
ui_locales: e.string().optional(),
|
|
679
679
|
max_age: e.number().optional(),
|
|
680
680
|
acr_values: e.string().optional(),
|
|
681
|
-
claims:
|
|
681
|
+
claims: He.optional(),
|
|
682
682
|
vendor_id: e.string().optional()
|
|
683
683
|
});
|
|
684
684
|
e.object({
|
|
@@ -702,7 +702,7 @@ e.object({
|
|
|
702
702
|
"auto"
|
|
703
703
|
]).optional()
|
|
704
704
|
});
|
|
705
|
-
var
|
|
705
|
+
var We = e.enum([
|
|
706
706
|
"password_reset",
|
|
707
707
|
"email_verification",
|
|
708
708
|
"otp",
|
|
@@ -717,7 +717,7 @@ e.object({
|
|
|
717
717
|
code_id: e.string().openapi({ description: "The code that will be used in for instance an email verification flow" }),
|
|
718
718
|
login_id: e.string().optional().openapi({ description: "The id of the login session that the code is connected to" }),
|
|
719
719
|
connection_id: e.string().optional().openapi({ description: "The connection that the code is connected to" }),
|
|
720
|
-
code_type:
|
|
720
|
+
code_type: We,
|
|
721
721
|
code_verifier: e.string().optional().openapi({ description: "The code verifier used in PKCE in outbound flows" }),
|
|
722
722
|
code_challenge: e.string().optional().openapi({ description: "The code challenge used in PKCE in outbound flows" }),
|
|
723
723
|
code_challenge_method: e.enum(["plain", "S256"]).optional().openapi({ description: "The code challenge method used in PKCE in outbound flows" }),
|
|
@@ -747,7 +747,7 @@ e.object({
|
|
|
747
747
|
interval: e.number().int().positive(),
|
|
748
748
|
version: e.number().int().nonnegative()
|
|
749
749
|
});
|
|
750
|
-
var
|
|
750
|
+
var Ge = e.object({
|
|
751
751
|
kid: e.string().optional(),
|
|
752
752
|
team_id: e.string().optional(),
|
|
753
753
|
realms: e.string().optional(),
|
|
@@ -867,26 +867,26 @@ var Ke = e.object({
|
|
|
867
867
|
"never_on_login"
|
|
868
868
|
]).optional()
|
|
869
869
|
});
|
|
870
|
-
function
|
|
870
|
+
function S(e) {
|
|
871
871
|
if (e !== null) {
|
|
872
|
-
if (Array.isArray(e)) return e.filter((e) => e !== null).map(
|
|
872
|
+
if (Array.isArray(e)) return e.filter((e) => e !== null).map(S);
|
|
873
873
|
if (e && typeof e == "object") {
|
|
874
874
|
let t = {};
|
|
875
|
-
for (let [n, r] of Object.entries(e)) r !== null && (t[n] =
|
|
875
|
+
for (let [n, r] of Object.entries(e)) r !== null && (t[n] = S(r));
|
|
876
876
|
return t;
|
|
877
877
|
}
|
|
878
878
|
return e;
|
|
879
879
|
}
|
|
880
880
|
}
|
|
881
|
-
var
|
|
881
|
+
var Ke = e.object({
|
|
882
882
|
id: e.string().optional(),
|
|
883
883
|
name: e.string(),
|
|
884
884
|
display_name: e.string().optional(),
|
|
885
885
|
strategy: e.string(),
|
|
886
|
-
options: e.preprocess((e) => e === null ? {} :
|
|
886
|
+
options: e.preprocess((e) => e === null ? {} : S(e), Ge).default({}),
|
|
887
887
|
enabled_clients: e.array(e.string()).default([]).optional(),
|
|
888
|
-
response_type: e.nativeEnum(
|
|
889
|
-
response_mode: e.nativeEnum(
|
|
888
|
+
response_type: e.nativeEnum(Re).optional(),
|
|
889
|
+
response_mode: e.nativeEnum(ze).optional(),
|
|
890
890
|
is_domain_connection: e.boolean().optional(),
|
|
891
891
|
show_as_button: e.boolean().optional(),
|
|
892
892
|
metadata: e.record(e.string(), e.any()).optional(),
|
|
@@ -897,8 +897,8 @@ e.object({
|
|
|
897
897
|
id: e.string(),
|
|
898
898
|
created_at: e.string().transform((e) => e === null ? "" : e),
|
|
899
899
|
updated_at: e.string().transform((e) => e === null ? "" : e)
|
|
900
|
-
}).extend(
|
|
901
|
-
var
|
|
900
|
+
}).extend(Ke.shape);
|
|
901
|
+
var qe = e.object({
|
|
902
902
|
domain: e.string(),
|
|
903
903
|
custom_domain_id: e.string().optional(),
|
|
904
904
|
type: e.enum(["auth0_managed_certs", "self_managed_certs"]),
|
|
@@ -912,7 +912,7 @@ var Je = e.object({
|
|
|
912
912
|
"null"
|
|
913
913
|
]).optional(),
|
|
914
914
|
domain_metadata: e.record(e.string(), e.string().max(255)).optional()
|
|
915
|
-
}),
|
|
915
|
+
}), Je = e.discriminatedUnion("name", [e.object({
|
|
916
916
|
name: e.literal("txt"),
|
|
917
917
|
record: e.string(),
|
|
918
918
|
domain: e.string()
|
|
@@ -920,7 +920,7 @@ var Je = e.object({
|
|
|
920
920
|
name: e.literal("http"),
|
|
921
921
|
http_body: e.string(),
|
|
922
922
|
http_url: e.string()
|
|
923
|
-
})]),
|
|
923
|
+
})]), Ye = qe.extend({
|
|
924
924
|
custom_domain_id: e.string(),
|
|
925
925
|
primary: e.boolean(),
|
|
926
926
|
status: e.enum([
|
|
@@ -930,28 +930,28 @@ var Je = e.object({
|
|
|
930
930
|
"ready"
|
|
931
931
|
]),
|
|
932
932
|
origin_domain_name: e.string().optional(),
|
|
933
|
-
verification: e.object({ methods: e.array(
|
|
933
|
+
verification: e.object({ methods: e.array(Je) }).optional(),
|
|
934
934
|
tls_policy: e.string().optional()
|
|
935
935
|
});
|
|
936
|
-
|
|
936
|
+
qe.pick({
|
|
937
937
|
tls_policy: !0,
|
|
938
938
|
custom_client_ip_header: !0,
|
|
939
939
|
domain_metadata: !0
|
|
940
|
-
}).strict(),
|
|
940
|
+
}).strict(), Ye.extend({ tenant_id: e.string() }), e.object({
|
|
941
941
|
certificate: e.string().regex(/^-----BEGIN CERTIFICATE-----[\s\S]+-----END CERTIFICATE-----\s*$/, "must be PEM-encoded; include the full certificate chain in leaf-first order"),
|
|
942
942
|
private_key: e.string().regex(/-----BEGIN (RSA |EC |ENCRYPTED )?PRIVATE KEY-----[\s\S]+-----END \1PRIVATE KEY-----\s*$/, "must be a PEM-encoded private key")
|
|
943
943
|
});
|
|
944
|
-
var
|
|
944
|
+
var C = e.object({
|
|
945
945
|
id: e.string(),
|
|
946
946
|
order: e.number().optional(),
|
|
947
947
|
visible: e.boolean().optional().default(!0)
|
|
948
|
-
}),
|
|
948
|
+
}), w = C.extend({ category: e.literal("BLOCK").optional() }), Xe = w.extend({
|
|
949
949
|
type: e.literal("DIVIDER"),
|
|
950
950
|
config: e.object({ text: e.string().optional() }).optional()
|
|
951
|
-
}),
|
|
951
|
+
}), Ze = w.extend({
|
|
952
952
|
type: e.literal("HTML"),
|
|
953
953
|
config: e.object({ content: e.string().optional() }).optional()
|
|
954
|
-
}),
|
|
954
|
+
}), Qe = w.extend({
|
|
955
955
|
type: e.literal("IMAGE"),
|
|
956
956
|
config: e.object({
|
|
957
957
|
src: e.string().optional(),
|
|
@@ -959,47 +959,47 @@ var S = e.object({
|
|
|
959
959
|
width: e.number().optional(),
|
|
960
960
|
height: e.number().optional()
|
|
961
961
|
}).optional()
|
|
962
|
-
}),
|
|
962
|
+
}), $e = w.extend({
|
|
963
963
|
type: e.literal("JUMP_BUTTON"),
|
|
964
964
|
config: e.object({
|
|
965
965
|
text: e.string().optional(),
|
|
966
966
|
target_step: e.string().optional()
|
|
967
967
|
})
|
|
968
|
-
}),
|
|
968
|
+
}), et = w.extend({
|
|
969
969
|
type: e.literal("RESEND_BUTTON"),
|
|
970
970
|
config: e.object({
|
|
971
971
|
text: e.string().optional(),
|
|
972
972
|
resend_action: e.string().optional()
|
|
973
973
|
})
|
|
974
|
-
}),
|
|
974
|
+
}), tt = w.extend({
|
|
975
975
|
type: e.literal("NEXT_BUTTON"),
|
|
976
976
|
config: e.object({
|
|
977
977
|
text: e.string().optional(),
|
|
978
978
|
variant: e.enum(["primary", "secondary"]).optional(),
|
|
979
979
|
skip_validation: e.boolean().optional()
|
|
980
980
|
})
|
|
981
|
-
}),
|
|
981
|
+
}), nt = w.extend({
|
|
982
982
|
type: e.literal("PREVIOUS_BUTTON"),
|
|
983
983
|
config: e.object({ text: e.string().optional() })
|
|
984
|
-
}),
|
|
984
|
+
}), rt = w.extend({
|
|
985
985
|
type: e.literal("RICH_TEXT"),
|
|
986
986
|
config: e.object({ content: e.string().optional() }).optional()
|
|
987
|
-
}),
|
|
987
|
+
}), T = C.extend({
|
|
988
988
|
category: e.literal("WIDGET").optional(),
|
|
989
989
|
label: e.string().min(1).optional(),
|
|
990
990
|
hint: e.string().min(1).max(500).optional(),
|
|
991
991
|
required: e.boolean().optional(),
|
|
992
992
|
sensitive: e.boolean().optional()
|
|
993
|
-
}),
|
|
993
|
+
}), it = T.extend({
|
|
994
994
|
type: e.literal("AUTH0_VERIFIABLE_CREDENTIALS"),
|
|
995
995
|
config: e.object({ credential_type: e.string().optional() })
|
|
996
|
-
}),
|
|
996
|
+
}), at = T.extend({
|
|
997
997
|
type: e.literal("GMAPS_ADDRESS"),
|
|
998
998
|
config: e.object({ api_key: e.string().optional() })
|
|
999
|
-
}),
|
|
999
|
+
}), ot = T.extend({
|
|
1000
1000
|
type: e.literal("RECAPTCHA"),
|
|
1001
1001
|
config: e.object({ site_key: e.string().optional() })
|
|
1002
|
-
}),
|
|
1002
|
+
}), E = C.extend({
|
|
1003
1003
|
category: e.literal("FIELD").optional(),
|
|
1004
1004
|
label: e.string().min(1).optional(),
|
|
1005
1005
|
hint: e.string().min(1).max(500).optional(),
|
|
@@ -1015,10 +1015,10 @@ var S = e.object({
|
|
|
1015
1015
|
})).optional(),
|
|
1016
1016
|
required: e.boolean().optional(),
|
|
1017
1017
|
sensitive: e.boolean().optional()
|
|
1018
|
-
}),
|
|
1018
|
+
}), st = E.extend({
|
|
1019
1019
|
type: e.literal("BOOLEAN"),
|
|
1020
1020
|
config: e.object({ default_value: e.boolean().optional() }).optional()
|
|
1021
|
-
}),
|
|
1021
|
+
}), ct = E.extend({
|
|
1022
1022
|
type: e.literal("CARDS"),
|
|
1023
1023
|
config: e.object({
|
|
1024
1024
|
options: e.array(e.object({
|
|
@@ -1029,7 +1029,7 @@ var S = e.object({
|
|
|
1029
1029
|
})).optional(),
|
|
1030
1030
|
multi_select: e.boolean().optional()
|
|
1031
1031
|
}).optional()
|
|
1032
|
-
}),
|
|
1032
|
+
}), lt = E.extend({
|
|
1033
1033
|
type: e.literal("CHOICE"),
|
|
1034
1034
|
config: e.object({
|
|
1035
1035
|
options: e.array(e.object({
|
|
@@ -1040,7 +1040,7 @@ var S = e.object({
|
|
|
1040
1040
|
multiple: e.boolean().optional(),
|
|
1041
1041
|
default_value: e.union([e.string(), e.array(e.string())]).optional()
|
|
1042
1042
|
}).optional()
|
|
1043
|
-
}),
|
|
1043
|
+
}), ut = E.extend({
|
|
1044
1044
|
type: e.literal("CODE"),
|
|
1045
1045
|
config: e.object({
|
|
1046
1046
|
length: e.number().int().positive().max(100).optional(),
|
|
@@ -1057,7 +1057,7 @@ var S = e.object({
|
|
|
1057
1057
|
message: "default_value is longer than the configured length",
|
|
1058
1058
|
path: ["default_value"]
|
|
1059
1059
|
}).optional()
|
|
1060
|
-
}),
|
|
1060
|
+
}), dt = E.extend({
|
|
1061
1061
|
type: e.literal("CUSTOM"),
|
|
1062
1062
|
config: e.object({
|
|
1063
1063
|
component: e.string().optional(),
|
|
@@ -1065,7 +1065,7 @@ var S = e.object({
|
|
|
1065
1065
|
schema: e.record(e.string(), e.any()).optional(),
|
|
1066
1066
|
code: e.string().optional()
|
|
1067
1067
|
})
|
|
1068
|
-
}),
|
|
1068
|
+
}), ft = E.extend({
|
|
1069
1069
|
type: e.literal("DATE"),
|
|
1070
1070
|
config: e.object({
|
|
1071
1071
|
format: e.string().optional(),
|
|
@@ -1073,7 +1073,7 @@ var S = e.object({
|
|
|
1073
1073
|
max: e.string().optional(),
|
|
1074
1074
|
default_value: e.string().optional()
|
|
1075
1075
|
}).optional()
|
|
1076
|
-
}),
|
|
1076
|
+
}), pt = E.extend({
|
|
1077
1077
|
type: e.literal("DROPDOWN"),
|
|
1078
1078
|
config: e.object({
|
|
1079
1079
|
options: e.array(e.object({
|
|
@@ -1085,7 +1085,7 @@ var S = e.object({
|
|
|
1085
1085
|
multiple: e.boolean().optional(),
|
|
1086
1086
|
default_value: e.union([e.string(), e.array(e.string())]).optional()
|
|
1087
1087
|
}).optional()
|
|
1088
|
-
}),
|
|
1088
|
+
}), mt = E.extend({
|
|
1089
1089
|
type: e.literal("EMAIL"),
|
|
1090
1090
|
config: e.object({
|
|
1091
1091
|
placeholder: e.string().optional(),
|
|
@@ -1093,20 +1093,20 @@ var S = e.object({
|
|
|
1093
1093
|
last_used: e.boolean().optional(),
|
|
1094
1094
|
last_used_label: e.string().optional()
|
|
1095
1095
|
}).optional()
|
|
1096
|
-
}),
|
|
1096
|
+
}), ht = E.extend({
|
|
1097
1097
|
type: e.literal("FILE"),
|
|
1098
1098
|
config: e.object({
|
|
1099
1099
|
accept: e.string().optional(),
|
|
1100
1100
|
max_size: e.number().optional(),
|
|
1101
1101
|
multiple: e.boolean().optional()
|
|
1102
1102
|
}).optional()
|
|
1103
|
-
}),
|
|
1103
|
+
}), gt = E.extend({
|
|
1104
1104
|
type: e.literal("LEGAL"),
|
|
1105
1105
|
config: e.object({
|
|
1106
1106
|
text: e.string(),
|
|
1107
1107
|
html: e.boolean().optional()
|
|
1108
1108
|
}).optional()
|
|
1109
|
-
}),
|
|
1109
|
+
}), _t = E.extend({
|
|
1110
1110
|
type: e.literal("NUMBER"),
|
|
1111
1111
|
config: e.object({
|
|
1112
1112
|
placeholder: e.string().optional(),
|
|
@@ -1115,7 +1115,7 @@ var S = e.object({
|
|
|
1115
1115
|
step: e.number().optional(),
|
|
1116
1116
|
default_value: e.string().optional()
|
|
1117
1117
|
}).optional()
|
|
1118
|
-
}),
|
|
1118
|
+
}), vt = E.extend({
|
|
1119
1119
|
type: e.literal("PASSWORD"),
|
|
1120
1120
|
config: e.object({
|
|
1121
1121
|
placeholder: e.string().optional(),
|
|
@@ -1124,13 +1124,13 @@ var S = e.object({
|
|
|
1124
1124
|
forgot_password_link: e.string().optional(),
|
|
1125
1125
|
default_value: e.string().optional()
|
|
1126
1126
|
}).optional()
|
|
1127
|
-
}),
|
|
1127
|
+
}), yt = E.extend({
|
|
1128
1128
|
type: e.literal("PAYMENT"),
|
|
1129
1129
|
config: e.object({
|
|
1130
1130
|
provider: e.string().optional(),
|
|
1131
1131
|
currency: e.string().optional()
|
|
1132
1132
|
}).optional()
|
|
1133
|
-
}),
|
|
1133
|
+
}), bt = E.extend({
|
|
1134
1134
|
type: e.literal("SOCIAL"),
|
|
1135
1135
|
config: e.object({
|
|
1136
1136
|
providers: e.array(e.string()).optional(),
|
|
@@ -1145,7 +1145,7 @@ var S = e.object({
|
|
|
1145
1145
|
last_used_label: e.string().optional()
|
|
1146
1146
|
})).optional()
|
|
1147
1147
|
}).optional()
|
|
1148
|
-
}),
|
|
1148
|
+
}), xt = E.extend({
|
|
1149
1149
|
type: e.literal("TEL"),
|
|
1150
1150
|
config: e.object({
|
|
1151
1151
|
placeholder: e.string().optional(),
|
|
@@ -1153,7 +1153,7 @@ var S = e.object({
|
|
|
1153
1153
|
default_value: e.string().optional(),
|
|
1154
1154
|
allow_email: e.boolean().optional()
|
|
1155
1155
|
}).optional()
|
|
1156
|
-
}),
|
|
1156
|
+
}), St = E.extend({
|
|
1157
1157
|
type: e.literal("TEXT"),
|
|
1158
1158
|
config: e.object({
|
|
1159
1159
|
placeholder: e.string().optional(),
|
|
@@ -1163,37 +1163,38 @@ var S = e.object({
|
|
|
1163
1163
|
last_used: e.boolean().optional(),
|
|
1164
1164
|
last_used_label: e.string().optional()
|
|
1165
1165
|
}).optional()
|
|
1166
|
-
}),
|
|
1166
|
+
}), Ct = E.extend({
|
|
1167
1167
|
type: e.literal("COUNTRY"),
|
|
1168
1168
|
config: e.object({
|
|
1169
1169
|
placeholder: e.string().optional(),
|
|
1170
1170
|
default_value: e.string().optional()
|
|
1171
1171
|
}).optional()
|
|
1172
|
-
}),
|
|
1172
|
+
}), wt = E.extend({
|
|
1173
1173
|
type: e.literal("URL"),
|
|
1174
1174
|
config: e.object({
|
|
1175
1175
|
placeholder: e.string().optional(),
|
|
1176
1176
|
default_value: e.string().optional()
|
|
1177
1177
|
}).optional()
|
|
1178
|
-
}),
|
|
1178
|
+
}), Tt = e.discriminatedUnion("type", [
|
|
1179
|
+
Xe,
|
|
1179
1180
|
Ze,
|
|
1180
1181
|
Qe,
|
|
1181
1182
|
$e,
|
|
1182
1183
|
et,
|
|
1183
1184
|
tt,
|
|
1184
1185
|
nt,
|
|
1185
|
-
rt
|
|
1186
|
-
|
|
1187
|
-
|
|
1186
|
+
rt
|
|
1187
|
+
]), Et = e.discriminatedUnion("type", [
|
|
1188
|
+
it,
|
|
1188
1189
|
at,
|
|
1189
|
-
ot
|
|
1190
|
-
|
|
1191
|
-
|
|
1190
|
+
ot
|
|
1191
|
+
]), Dt = e.discriminatedUnion("type", [
|
|
1192
|
+
st,
|
|
1192
1193
|
ct,
|
|
1193
1194
|
lt,
|
|
1194
1195
|
ut,
|
|
1196
|
+
Ct,
|
|
1195
1197
|
dt,
|
|
1196
|
-
wt,
|
|
1197
1198
|
ft,
|
|
1198
1199
|
pt,
|
|
1199
1200
|
mt,
|
|
@@ -1205,12 +1206,11 @@ var S = e.object({
|
|
|
1205
1206
|
bt,
|
|
1206
1207
|
xt,
|
|
1207
1208
|
St,
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1209
|
+
wt
|
|
1210
|
+
]), Ot = e.union([
|
|
1211
|
+
Tt,
|
|
1211
1212
|
Et,
|
|
1212
|
-
Dt
|
|
1213
|
-
Ot
|
|
1213
|
+
Dt
|
|
1214
1214
|
]);
|
|
1215
1215
|
new Set([
|
|
1216
1216
|
"BOOLEAN",
|
|
@@ -1237,22 +1237,22 @@ new Set([
|
|
|
1237
1237
|
visible: e.boolean().optional().default(!0),
|
|
1238
1238
|
customizations: e.record(e.string(), e.any()).optional()
|
|
1239
1239
|
});
|
|
1240
|
-
var
|
|
1240
|
+
var D = e.object({
|
|
1241
1241
|
x: e.number(),
|
|
1242
1242
|
y: e.number()
|
|
1243
|
-
}),
|
|
1243
|
+
}), kt = e.object({
|
|
1244
1244
|
id: e.string(),
|
|
1245
1245
|
type: e.literal("FLOW"),
|
|
1246
|
-
coordinates:
|
|
1246
|
+
coordinates: D,
|
|
1247
1247
|
alias: e.string().min(1).max(150).optional(),
|
|
1248
1248
|
config: e.object({
|
|
1249
1249
|
flow_id: e.string().max(30),
|
|
1250
1250
|
next_node: e.string().optional()
|
|
1251
1251
|
})
|
|
1252
|
-
}),
|
|
1252
|
+
}), At = e.object({
|
|
1253
1253
|
id: e.string(),
|
|
1254
1254
|
type: e.literal("ROUTER"),
|
|
1255
|
-
coordinates:
|
|
1255
|
+
coordinates: D,
|
|
1256
1256
|
alias: e.string().min(1).max(150),
|
|
1257
1257
|
config: e.object({
|
|
1258
1258
|
rules: e.array(e.object({
|
|
@@ -1263,20 +1263,20 @@ var E = e.object({
|
|
|
1263
1263
|
})),
|
|
1264
1264
|
fallback: e.string()
|
|
1265
1265
|
})
|
|
1266
|
-
}),
|
|
1266
|
+
}), jt = e.object({
|
|
1267
1267
|
id: e.string(),
|
|
1268
1268
|
type: e.literal("STEP"),
|
|
1269
|
-
coordinates:
|
|
1269
|
+
coordinates: D,
|
|
1270
1270
|
alias: e.string().min(1).max(150).optional(),
|
|
1271
1271
|
config: e.object({
|
|
1272
|
-
components: e.array(
|
|
1272
|
+
components: e.array(Ot),
|
|
1273
1273
|
next_node: e.string().optional()
|
|
1274
1274
|
})
|
|
1275
|
-
}),
|
|
1275
|
+
}), Mt = e.discriminatedUnion("type", [
|
|
1276
|
+
kt,
|
|
1276
1277
|
At,
|
|
1277
|
-
jt
|
|
1278
|
-
|
|
1279
|
-
]), Pt = e.object({
|
|
1278
|
+
jt
|
|
1279
|
+
]), Nt = e.object({
|
|
1280
1280
|
name: e.string().openapi({ description: "The name of the form" }),
|
|
1281
1281
|
messages: e.object({
|
|
1282
1282
|
errors: e.record(e.string(), e.any()).optional(),
|
|
@@ -1287,14 +1287,14 @@ var E = e.object({
|
|
|
1287
1287
|
default: e.string().optional()
|
|
1288
1288
|
}).optional(),
|
|
1289
1289
|
translations: e.record(e.string(), e.any()).optional(),
|
|
1290
|
-
nodes: e.array(
|
|
1290
|
+
nodes: e.array(Mt).optional(),
|
|
1291
1291
|
start: e.object({
|
|
1292
1292
|
hidden_fields: e.array(e.object({
|
|
1293
1293
|
key: e.string(),
|
|
1294
1294
|
value: e.string()
|
|
1295
1295
|
})).optional(),
|
|
1296
1296
|
next_node: e.string().optional(),
|
|
1297
|
-
coordinates:
|
|
1297
|
+
coordinates: D.optional()
|
|
1298
1298
|
}).optional(),
|
|
1299
1299
|
ending: e.object({
|
|
1300
1300
|
redirection: e.object({
|
|
@@ -1302,7 +1302,7 @@ var E = e.object({
|
|
|
1302
1302
|
target: e.string().optional()
|
|
1303
1303
|
}).optional(),
|
|
1304
1304
|
after_submit: e.object({ flow_id: e.string().optional() }).optional(),
|
|
1305
|
-
coordinates:
|
|
1305
|
+
coordinates: D.optional(),
|
|
1306
1306
|
resume_flow: e.boolean().optional()
|
|
1307
1307
|
}).optional(),
|
|
1308
1308
|
style: e.object({ css: e.string().optional() }).optional(),
|
|
@@ -1311,8 +1311,8 @@ var E = e.object({
|
|
|
1311
1311
|
sdk_src: e.string().optional()
|
|
1312
1312
|
}).optional()
|
|
1313
1313
|
}).openapi({ description: "Schema for flow-based forms (matches Auth0 Forms structure)" });
|
|
1314
|
-
n.extend(
|
|
1315
|
-
var
|
|
1314
|
+
n.extend(Nt.shape).extend({ id: e.string() });
|
|
1315
|
+
var Pt = e.object({
|
|
1316
1316
|
id: e.number().optional(),
|
|
1317
1317
|
text: e.string(),
|
|
1318
1318
|
type: e.enum([
|
|
@@ -1321,12 +1321,12 @@ var Ft = e.object({
|
|
|
1321
1321
|
"success",
|
|
1322
1322
|
"warning"
|
|
1323
1323
|
])
|
|
1324
|
-
}),
|
|
1324
|
+
}), Ft = e.object({
|
|
1325
1325
|
id: e.string().optional(),
|
|
1326
1326
|
text: e.string(),
|
|
1327
1327
|
href: e.string(),
|
|
1328
1328
|
linkText: e.string().optional()
|
|
1329
|
-
}),
|
|
1329
|
+
}), It = e.object({
|
|
1330
1330
|
"form-content-start": e.string().optional(),
|
|
1331
1331
|
"form-content-end": e.string().optional(),
|
|
1332
1332
|
"form-footer-start": e.string().optional(),
|
|
@@ -1340,13 +1340,13 @@ e.object({
|
|
|
1340
1340
|
method: e.enum(["POST", "GET"]),
|
|
1341
1341
|
title: e.string().optional(),
|
|
1342
1342
|
description: e.string().optional(),
|
|
1343
|
-
components: e.array(
|
|
1344
|
-
messages: e.array(
|
|
1345
|
-
links: e.array(
|
|
1346
|
-
partials:
|
|
1343
|
+
components: e.array(Ot),
|
|
1344
|
+
messages: e.array(Pt).optional(),
|
|
1345
|
+
links: e.array(Ft).optional(),
|
|
1346
|
+
partials: It.optional(),
|
|
1347
1347
|
footer: e.string().optional()
|
|
1348
1348
|
});
|
|
1349
|
-
var
|
|
1349
|
+
var O = e.enum([
|
|
1350
1350
|
"pre-user-registration",
|
|
1351
1351
|
"post-user-registration",
|
|
1352
1352
|
"post-user-login",
|
|
@@ -1354,12 +1354,12 @@ var D = e.enum([
|
|
|
1354
1354
|
"validate-registration-username",
|
|
1355
1355
|
"pre-user-deletion",
|
|
1356
1356
|
"post-user-deletion"
|
|
1357
|
-
]),
|
|
1357
|
+
]), k = e.enum(["post-user-login"]), A = e.enum([
|
|
1358
1358
|
"post-user-login",
|
|
1359
1359
|
"post-user-registration",
|
|
1360
1360
|
"post-user-update",
|
|
1361
1361
|
"credentials-exchange"
|
|
1362
|
-
]),
|
|
1362
|
+
]), j = e.enum([
|
|
1363
1363
|
"validate-registration-username",
|
|
1364
1364
|
"post-user-login",
|
|
1365
1365
|
"credentials-exchange",
|
|
@@ -1368,87 +1368,88 @@ var D = e.enum([
|
|
|
1368
1368
|
"pre-user-update",
|
|
1369
1369
|
"post-user-update",
|
|
1370
1370
|
"pre-user-deletion",
|
|
1371
|
-
"post-user-deletion"
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1371
|
+
"post-user-deletion",
|
|
1372
|
+
"pre-account-action"
|
|
1373
|
+
]), M = e.enum(["post-user-login"]);
|
|
1374
|
+
O.options, k.options, A.options, j.options, M.options;
|
|
1375
|
+
var Lt = e.enum(["impersonate"]), Rt = e.enum([
|
|
1375
1376
|
"ensure-username",
|
|
1376
1377
|
"set-preferred-username",
|
|
1377
1378
|
"account-linking"
|
|
1378
|
-
]),
|
|
1379
|
+
]), N = {
|
|
1379
1380
|
enabled: e.boolean().default(!1),
|
|
1380
1381
|
synchronous: e.boolean().default(!1),
|
|
1381
1382
|
priority: e.number().optional(),
|
|
1382
1383
|
hook_id: e.string().optional(),
|
|
1383
1384
|
metadata: e.record(e.string(), e.unknown()).optional(),
|
|
1384
1385
|
...a
|
|
1385
|
-
},
|
|
1386
|
-
...
|
|
1387
|
-
trigger_id: D,
|
|
1388
|
-
url: e.string()
|
|
1389
|
-
}), Vt = e.object({
|
|
1390
|
-
...M,
|
|
1386
|
+
}, zt = e.object({
|
|
1387
|
+
...N,
|
|
1391
1388
|
trigger_id: O,
|
|
1392
|
-
|
|
1393
|
-
}),
|
|
1394
|
-
...
|
|
1389
|
+
url: e.string()
|
|
1390
|
+
}), Bt = e.object({
|
|
1391
|
+
...N,
|
|
1395
1392
|
trigger_id: k,
|
|
1396
|
-
|
|
1397
|
-
}),
|
|
1398
|
-
...
|
|
1393
|
+
form_id: e.string()
|
|
1394
|
+
}), Vt = e.object({
|
|
1395
|
+
...N,
|
|
1399
1396
|
trigger_id: A,
|
|
1400
|
-
|
|
1401
|
-
}),
|
|
1402
|
-
...
|
|
1397
|
+
template_id: Rt
|
|
1398
|
+
}), Ht = e.object({
|
|
1399
|
+
...N,
|
|
1403
1400
|
trigger_id: j,
|
|
1404
|
-
|
|
1401
|
+
code_id: e.string()
|
|
1402
|
+
}), Ut = e.object({
|
|
1403
|
+
...N,
|
|
1404
|
+
trigger_id: M,
|
|
1405
|
+
page_id: Lt,
|
|
1405
1406
|
permission_required: e.string().optional()
|
|
1406
1407
|
});
|
|
1407
1408
|
e.union([
|
|
1409
|
+
zt,
|
|
1408
1410
|
Bt,
|
|
1409
1411
|
Vt,
|
|
1410
1412
|
Ht,
|
|
1411
|
-
Ut
|
|
1412
|
-
Wt
|
|
1413
|
+
Ut
|
|
1413
1414
|
]);
|
|
1414
|
-
var
|
|
1415
|
-
...
|
|
1416
|
-
trigger_id:
|
|
1415
|
+
var Wt = e.object({
|
|
1416
|
+
...N,
|
|
1417
|
+
trigger_id: O
|
|
1417
1418
|
}).extend(n.shape).extend({
|
|
1418
1419
|
hook_id: e.string(),
|
|
1419
1420
|
url: e.string()
|
|
1420
|
-
}),
|
|
1421
|
-
...
|
|
1422
|
-
trigger_id:
|
|
1421
|
+
}), Gt = e.object({
|
|
1422
|
+
...N,
|
|
1423
|
+
trigger_id: k
|
|
1423
1424
|
}).extend(n.shape).extend({
|
|
1424
1425
|
hook_id: e.string(),
|
|
1425
1426
|
form_id: e.string()
|
|
1426
|
-
}),
|
|
1427
|
-
...
|
|
1428
|
-
trigger_id:
|
|
1427
|
+
}), Kt = e.object({
|
|
1428
|
+
...N,
|
|
1429
|
+
trigger_id: A
|
|
1429
1430
|
}).extend(n.shape).extend({
|
|
1430
1431
|
hook_id: e.string(),
|
|
1431
|
-
template_id:
|
|
1432
|
-
}),
|
|
1433
|
-
...
|
|
1434
|
-
trigger_id:
|
|
1432
|
+
template_id: Rt
|
|
1433
|
+
}), qt = e.object({
|
|
1434
|
+
...N,
|
|
1435
|
+
trigger_id: j
|
|
1435
1436
|
}).extend(n.shape).extend({
|
|
1436
1437
|
hook_id: e.string(),
|
|
1437
1438
|
code_id: e.string()
|
|
1438
|
-
}),
|
|
1439
|
-
...
|
|
1440
|
-
trigger_id:
|
|
1439
|
+
}), Jt = e.object({
|
|
1440
|
+
...N,
|
|
1441
|
+
trigger_id: M
|
|
1441
1442
|
}).extend(n.shape).extend({
|
|
1442
1443
|
hook_id: e.string(),
|
|
1443
|
-
page_id:
|
|
1444
|
+
page_id: Lt,
|
|
1444
1445
|
permission_required: e.string().optional()
|
|
1445
1446
|
});
|
|
1446
1447
|
e.union([
|
|
1448
|
+
Wt,
|
|
1447
1449
|
Gt,
|
|
1448
1450
|
Kt,
|
|
1449
1451
|
qt,
|
|
1450
|
-
Jt
|
|
1451
|
-
Yt
|
|
1452
|
+
Jt
|
|
1452
1453
|
]), e.object({
|
|
1453
1454
|
code: e.string().max(1e5),
|
|
1454
1455
|
secrets: e.record(e.string(), e.string()).optional()
|
|
@@ -1456,11 +1457,11 @@ e.union([
|
|
|
1456
1457
|
id: e.string(),
|
|
1457
1458
|
tenant_id: e.string()
|
|
1458
1459
|
}).extend(n.shape);
|
|
1459
|
-
var
|
|
1460
|
+
var Yt = e.object({ name: e.string().optional() }), Xt = e.object({ email: e.string().optional() }), Zt = e.object({
|
|
1460
1461
|
id: e.string().optional(),
|
|
1461
1462
|
organization_id: e.string().max(50),
|
|
1462
|
-
inviter:
|
|
1463
|
-
invitee:
|
|
1463
|
+
inviter: Yt,
|
|
1464
|
+
invitee: Xt,
|
|
1464
1465
|
invitation_url: e.string().url(),
|
|
1465
1466
|
client_id: e.string(),
|
|
1466
1467
|
connection_id: e.string().optional(),
|
|
@@ -1476,8 +1477,8 @@ e.object({
|
|
|
1476
1477
|
created_at: e.string().datetime(),
|
|
1477
1478
|
expires_at: e.string().datetime(),
|
|
1478
1479
|
ticket_id: e.string().optional()
|
|
1479
|
-
}).extend(
|
|
1480
|
-
var
|
|
1480
|
+
}).extend(Zt.omit({ id: !0 }).shape);
|
|
1481
|
+
var Qt = e.object({
|
|
1481
1482
|
alg: e.enum([
|
|
1482
1483
|
"RS256",
|
|
1483
1484
|
"RS384",
|
|
@@ -1519,7 +1520,7 @@ var $t = e.object({
|
|
|
1519
1520
|
path: [r],
|
|
1520
1521
|
message: `EC JWK is missing required member '${r}'`
|
|
1521
1522
|
});
|
|
1522
|
-
}),
|
|
1523
|
+
}), $t = e.object({ keys: e.array(Qt) });
|
|
1523
1524
|
e.object({
|
|
1524
1525
|
issuer: e.string(),
|
|
1525
1526
|
authorization_endpoint: e.string(),
|
|
@@ -1548,35 +1549,35 @@ e.object({
|
|
|
1548
1549
|
backchannel_logout_supported: e.boolean().optional(),
|
|
1549
1550
|
backchannel_logout_session_supported: e.boolean().optional()
|
|
1550
1551
|
});
|
|
1551
|
-
var
|
|
1552
|
+
var en = /* @__PURE__ */ function(e) {
|
|
1552
1553
|
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;
|
|
1553
|
-
}({}),
|
|
1554
|
+
}({}), tn = e.nativeEnum(en), nn = e.object({
|
|
1554
1555
|
strategy: e.string(),
|
|
1555
1556
|
strategy_type: e.string()
|
|
1556
1557
|
});
|
|
1557
1558
|
e.object({
|
|
1558
1559
|
csrf_token: e.string(),
|
|
1559
1560
|
auth0Client: e.string().optional(),
|
|
1560
|
-
authParams:
|
|
1561
|
+
authParams: Ue,
|
|
1561
1562
|
expires_at: e.string(),
|
|
1562
1563
|
deleted_at: e.string().optional(),
|
|
1563
1564
|
ip: e.string().optional(),
|
|
1564
1565
|
useragent: e.string().optional(),
|
|
1565
1566
|
session_id: e.string().optional(),
|
|
1566
1567
|
authorization_url: e.string().optional(),
|
|
1567
|
-
state:
|
|
1568
|
+
state: tn.optional().default("pending"),
|
|
1568
1569
|
state_data: e.string().optional(),
|
|
1569
1570
|
failure_reason: e.string().optional(),
|
|
1570
1571
|
user_id: e.string().optional(),
|
|
1571
1572
|
auth_connection: e.string().optional(),
|
|
1572
|
-
auth_strategy:
|
|
1573
|
+
auth_strategy: nn.optional(),
|
|
1573
1574
|
authenticated_at: e.string().optional()
|
|
1574
1575
|
}).openapi({ description: "This represents a login sesion" }).extend({
|
|
1575
1576
|
id: e.string().openapi({ description: "This is is used as the state in the universal login" }),
|
|
1576
1577
|
created_at: e.string(),
|
|
1577
1578
|
updated_at: e.string()
|
|
1578
1579
|
});
|
|
1579
|
-
var
|
|
1580
|
+
var P = {
|
|
1580
1581
|
ACLS_SUMMARY: "acls_summary",
|
|
1581
1582
|
ACTIONS_EXECUTION_FAILED: "actions_execution_failed",
|
|
1582
1583
|
API_LIMIT: "api_limit",
|
|
@@ -1738,17 +1739,17 @@ var N = {
|
|
|
1738
1739
|
WARNING_DURING_LOGIN: "w",
|
|
1739
1740
|
WARNING_SENDING_NOTIFICATION: "wn",
|
|
1740
1741
|
WARNING_USER_MANAGEMENT: "wum"
|
|
1741
|
-
},
|
|
1742
|
-
|
|
1742
|
+
}, rn = e.string().refine((e) => Object.values(P).includes(e), { message: "Invalid log type" });
|
|
1743
|
+
P.ACLS_SUMMARY, P.ACTIONS_EXECUTION_FAILED, P.API_LIMIT, P.API_LIMIT_WARNING, P.APPI, P.CIBA_EXCHANGE_FAILED, P.CIBA_EXCHANGE_SUCCEEDED, P.CIBA_START_FAILED, P.CIBA_START_SUCCEEDED, P.CODE_LINK_SENT, P.CODE_SENT, P.DEPRECATION_NOTICE, P.CONFIG_INHERITANCE_DIFF, P.CONFIG_DRIFT, P.FAILED_LOGIN, P.FAILED_BY_CONNECTOR, P.FAILED_CHANGE_EMAIL, P.FAILED_BY_CORS, P.FAILED_CROSS_ORIGIN_AUTHENTICATION, P.FAILED_CHANGE_PASSWORD, P.FAILED_POST_CHANGE_PASSWORD_HOOK, P.FAILED_CHANGE_PHONE_NUMBER, P.FAILED_CHANGE_PASSWORD_REQUEST, P.FAILED_CONNECTOR_PROVISIONING, P.FAILED_CHANGE_USERNAME, P.FAILED_DELEGATION, P.FAILED_DEVICE_ACTIVATION, P.FAILED_DEVICE_AUTHORIZATION_REQUEST, P.USER_CANCELED_DEVICE_CONFIRMATION, P.FAILED_USER_DELETION, P.FAILED_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS, P.FAILED_EXCHANGE_CUSTOM_TOKEN, P.FAILED_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN, P.FAILED_FEDERATED_LOGOUT, P.FAILED_EXCHANGE_NATIVE_SOCIAL_LOGIN, P.FAILED_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_ROTATING_REFRESH_TOKEN, P.FAILED_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN, P.FAILED_HOOK, P.FAILED_IMPERSONATION, P.FAILED_INVITE_ACCEPT, P.FAILED_LOGOUT, P.FLOWS_EXECUTION_COMPLETED, P.FLOWS_EXECUTION_FAILED, P.FAILED_SENDING_NOTIFICATION, P.FORMS_SUBMISSION_FAILED, P.FORMS_SUBMISSION_SUCCEEDED, P.FAILED_LOGIN_INCORRECT_PASSWORD, P.FAILED_PUSHED_AUTHORIZATION_REQUEST, P.FAILED_POST_USER_REGISTRATION_HOOK, P.FAILED_SIGNUP, P.FAILED_SILENT_AUTH, P.FAILED_LOGIN_INVALID_EMAIL_USERNAME, P.FAILED_USERS_IMPORT, P.FAILED_VERIFICATION_EMAIL, P.FAILED_VERIFICATION_EMAIL_REQUEST, P.EMAIL_VERIFICATION_CONFIRMED, P.EMAIL_VERIFICATION_FAILED, P.MFA_AUTH_FAILED, P.MFA_AUTH_REJECTED, P.MFA_AUTH_SUCCESS, P.MFA_ENROLLMENT_COMPLETE, P.TOO_MANY_MFA_FAILURES, P.MFA_RECOVERY_FAILED, P.MFA_RECOVERY_RATE_LIMIT_EXCEED, P.MFA_RECOVERY_SUCCESS, P.MFA_EMAIL_SENT, P.EMAIL_VERIFICATION_SENT, P.EMAIL_VERIFICATION_SEND_FAILURE, P.PUSH_NOTIFICATION_SENT, P.ERROR_SENDING_MFA_PUSH_NOTIFICATION, P.MFA_SMS_SENT, P.ERROR_SENDING_MFA_SMS, P.MFA_VOICE_CALL_SUCCESS, P.MFA_VOICE_CALL_FAILED, P.SECOND_FACTOR_STARTED, P.MFA_ENROLL_STARTED, P.MFA_ENROLLMENT_FAILED, P.GUARDIAN_TENANT_UPDATE, P.UNENROLL_DEVICE_ACCOUNT, P.UPDATE_DEVICE_ACCOUNT, P.WEBAUTHN_CHALLENGE_FAILED, P.WEBAUTHN_ENROLLMENT_FAILED, P.FAILED_KMS_API_OPERATION, P.SUCCESS_KMS_API_OPERATION, P.KMS_KEY_STATE_CHANGED, P.TOO_MANY_CALLS_TO_DELEGATION, P.BLOCKED_IP_ADDRESS, P.BLOCKED_ACCOUNT_IP, P.BLOCKED_ACCOUNT_EMAIL, P.INFORMATION, P.MFA_REQUIRED, P.MANAGEMENT_API_READ_OPERATION, P.FAILED_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT, P.SUCCESSFUL_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT, P.FAILED_OIDC_BACKCHANNEL_LOGOUT, P.SUCCESSFUL_OIDC_BACKCHANNEL_LOGOUT, P.ORGANIZATION_MEMBER_ADDED, P.PASSKEY_CHALLENGE_FAILED, P.PASSKEY_CHALLENGE_STARTED, P.PRE_LOGIN_ASSESSMENT, P.BREACHED_PASSWORD, P.BREACHED_PASSWORD_ON_RESET, P.SUCCESS_RESOURCE_CLEANUP, P.RICH_CONSENTS_ACCESS_ERROR, P.SUCCESS_LOGIN, P.SUCCESS_API_OPERATION, P.FAILED_API_OPERATION, P.SUCCESS_CHANGE_EMAIL, P.SUCCESS_CROSS_ORIGIN_AUTHENTICATION, P.SUCCESS_CHANGE_PASSWORD, P.SUCCESS_CHANGE_PHONE_NUMBER, P.SUCCESS_CHANGE_PASSWORD_REQUEST, P.SUCCESS_CHANGE_USERNAME, P.SUCCESS_CREDENTIAL_VALIDATION, P.SUCCESS_DELEGATION, P.SUCCESS_USER_DELETION, P.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS, P.SUCCESS_EXCHANGE_CUSTOM_TOKEN, P.SUCCESS_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_NATIVE_SOCIAL_LOGIN, P.SUCCESS_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSKEY_OOB_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSKEY_OTP_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSKEY_MFA_RECOVERY_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN, P.SUCCESS_IMPERSONATION, P.SUCCESSFULLY_ACCEPTED_USER_INVITE, P.BREACHED_PASSWORD_ON_SIGNUP, P.SUCCESS_LOGOUT, P.SUCCESS_HOOK, P.SUCCESS_PASSWORD_MIGRATION, P.SUCCESS_REVOCATION, P.SUCCESS_SIGNUP, P.FAILED_SS_SSO_OPERATION, P.INFORMATION_FROM_SS_SSO_OPERATION, P.SUCCESS_SS_SSO_OPERATION, P.SUCCESS_SILENT_AUTH, P.SUCCESSFUL_SCIM_OPERATION, P.SUCCESSFULLY_IMPORTED_USERS, P.SUCCESS_VERIFICATION_EMAIL, P.SUCCESS_VERIFICATION_EMAIL_REQUEST, P.MAX_AMOUNT_OF_AUTHENTICATORS, P.USER_LOGIN_BLOCK_RELEASED, P.FAILED_UNIVERSAL_LOGOUT, P.SUCCESSFUL_UNIVERSAL_LOGOUT, P.WARNING_DURING_LOGIN, P.WARNING_SENDING_NOTIFICATION, P.WARNING_USER_MANAGEMENT, (() => {
|
|
1743
1744
|
let e = {};
|
|
1744
|
-
for (let [t, n] of Object.entries(
|
|
1745
|
+
for (let [t, n] of Object.entries(P)) 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 === "CONFIG_INHERITANCE_DIFF" || t === "CONFIG_DRIFT" || t === "ACLS_SUMMARY" || t === "ORGANIZATION_MEMBER_ADDED" ? e[n] = "info" : e[n] = "other";
|
|
1745
1746
|
return e;
|
|
1746
1747
|
})();
|
|
1747
|
-
var
|
|
1748
|
+
var an = e.object({
|
|
1748
1749
|
name: e.string(),
|
|
1749
1750
|
version: e.string(),
|
|
1750
1751
|
env: e.object({ node: e.string().optional() }).optional()
|
|
1751
|
-
}),
|
|
1752
|
+
}), on = e.object({
|
|
1752
1753
|
country_code: e.string().length(2),
|
|
1753
1754
|
city_name: e.string(),
|
|
1754
1755
|
latitude: e.string(),
|
|
@@ -1757,7 +1758,7 @@ var on = e.object({
|
|
|
1757
1758
|
continent_code: e.string()
|
|
1758
1759
|
});
|
|
1759
1760
|
e.object({
|
|
1760
|
-
type:
|
|
1761
|
+
type: rn,
|
|
1761
1762
|
date: e.string(),
|
|
1762
1763
|
description: e.string().optional(),
|
|
1763
1764
|
ip: e.string().optional(),
|
|
@@ -1775,63 +1776,63 @@ e.object({
|
|
|
1775
1776
|
strategy: e.string().optional(),
|
|
1776
1777
|
strategy_type: e.string().optional(),
|
|
1777
1778
|
hostname: e.string().optional(),
|
|
1778
|
-
auth0_client:
|
|
1779
|
+
auth0_client: an.optional(),
|
|
1779
1780
|
log_id: e.string().optional(),
|
|
1780
|
-
location_info:
|
|
1781
|
+
location_info: on.optional()
|
|
1781
1782
|
}).extend({ log_id: e.string() });
|
|
1782
|
-
var
|
|
1783
|
+
var sn = e.enum([
|
|
1783
1784
|
"http",
|
|
1784
1785
|
"eventbridge",
|
|
1785
1786
|
"eventgrid",
|
|
1786
1787
|
"splunk",
|
|
1787
1788
|
"datadog",
|
|
1788
1789
|
"sumo"
|
|
1789
|
-
]),
|
|
1790
|
+
]), cn = e.enum([
|
|
1790
1791
|
"active",
|
|
1791
1792
|
"paused",
|
|
1792
1793
|
"suspended"
|
|
1793
|
-
]),
|
|
1794
|
+
]), ln = e.object({
|
|
1794
1795
|
type: e.string(),
|
|
1795
1796
|
name: e.string()
|
|
1796
1797
|
});
|
|
1797
1798
|
e.object({
|
|
1798
1799
|
name: e.string(),
|
|
1799
|
-
type:
|
|
1800
|
-
status:
|
|
1800
|
+
type: sn,
|
|
1801
|
+
status: cn.optional(),
|
|
1801
1802
|
sink: e.record(e.string(), e.unknown()),
|
|
1802
|
-
filters: e.array(
|
|
1803
|
+
filters: e.array(ln).optional(),
|
|
1803
1804
|
isPriority: e.boolean().optional()
|
|
1804
1805
|
}).extend({
|
|
1805
1806
|
id: e.string(),
|
|
1806
|
-
status:
|
|
1807
|
+
status: cn,
|
|
1807
1808
|
created_at: e.string().optional(),
|
|
1808
1809
|
updated_at: e.string().optional()
|
|
1809
1810
|
});
|
|
1810
|
-
var
|
|
1811
|
+
var un = e.enum([
|
|
1811
1812
|
"auth0",
|
|
1812
1813
|
"cognito",
|
|
1813
1814
|
"okta",
|
|
1814
1815
|
"oidc"
|
|
1815
|
-
]),
|
|
1816
|
+
]), dn = e.object({
|
|
1816
1817
|
domain: e.string(),
|
|
1817
1818
|
client_id: e.string(),
|
|
1818
1819
|
client_secret: e.string(),
|
|
1819
1820
|
audience: e.string().optional(),
|
|
1820
1821
|
scope: e.string().optional()
|
|
1821
|
-
}),
|
|
1822
|
+
}), fn = e.object({
|
|
1822
1823
|
id: e.string().optional(),
|
|
1823
1824
|
name: e.string(),
|
|
1824
|
-
provider:
|
|
1825
|
+
provider: un,
|
|
1825
1826
|
connection: e.string(),
|
|
1826
1827
|
enabled: e.boolean().default(!0),
|
|
1827
|
-
credentials:
|
|
1828
|
+
credentials: dn
|
|
1828
1829
|
});
|
|
1829
1830
|
e.object({
|
|
1830
1831
|
id: e.string(),
|
|
1831
1832
|
created_at: e.string(),
|
|
1832
1833
|
updated_at: e.string()
|
|
1833
|
-
}).extend(
|
|
1834
|
-
var
|
|
1834
|
+
}).extend(fn.shape);
|
|
1835
|
+
var pn = e.object({
|
|
1835
1836
|
enabled: e.boolean().optional(),
|
|
1836
1837
|
shields: e.array(e.string()).optional(),
|
|
1837
1838
|
admin_notification_frequency: e.array(e.string()).optional(),
|
|
@@ -1840,13 +1841,13 @@ var mn = e.object({
|
|
|
1840
1841
|
"pre-user-registration": e.object({ shields: e.array(e.string()).optional() }).optional(),
|
|
1841
1842
|
"pre-change-password": e.object({ shields: e.array(e.string()).optional() }).optional()
|
|
1842
1843
|
}).optional()
|
|
1843
|
-
}),
|
|
1844
|
+
}), mn = e.object({
|
|
1844
1845
|
enabled: e.boolean().optional(),
|
|
1845
1846
|
shields: e.array(e.string()).optional(),
|
|
1846
1847
|
allowlist: e.array(e.string()).optional(),
|
|
1847
1848
|
mode: e.string().optional(),
|
|
1848
1849
|
max_attempts: e.number().optional()
|
|
1849
|
-
}),
|
|
1850
|
+
}), hn = e.object({
|
|
1850
1851
|
enabled: e.boolean().optional(),
|
|
1851
1852
|
shields: e.array(e.string()).optional(),
|
|
1852
1853
|
allowlist: e.array(e.string()).optional(),
|
|
@@ -1860,10 +1861,10 @@ var mn = e.object({
|
|
|
1860
1861
|
rate: e.number().optional()
|
|
1861
1862
|
}).optional()
|
|
1862
1863
|
}).optional()
|
|
1863
|
-
}),
|
|
1864
|
-
breached_password_detection:
|
|
1865
|
-
brute_force_protection:
|
|
1866
|
-
suspicious_ip_throttling:
|
|
1864
|
+
}), gn = e.object({
|
|
1865
|
+
breached_password_detection: pn.optional(),
|
|
1866
|
+
brute_force_protection: mn.optional(),
|
|
1867
|
+
suspicious_ip_throttling: hn.optional()
|
|
1867
1868
|
});
|
|
1868
1869
|
e.object({
|
|
1869
1870
|
id: e.string().optional(),
|
|
@@ -1876,14 +1877,18 @@ e.object({
|
|
|
1876
1877
|
created_at: e.string(),
|
|
1877
1878
|
updated_at: e.string()
|
|
1878
1879
|
});
|
|
1879
|
-
var
|
|
1880
|
+
var _n = e.object({
|
|
1880
1881
|
initial_user_agent: e.string().describe("First user agent of the device from which this user logged in"),
|
|
1881
1882
|
initial_ip: e.string().describe("First IP address associated with this session"),
|
|
1882
1883
|
initial_asn: e.string().describe("First autonomous system number associated with this session"),
|
|
1883
1884
|
last_user_agent: e.string().describe("Last user agent of the device from which this user logged in"),
|
|
1884
1885
|
last_ip: e.string().describe("Last IP address from which this user logged in"),
|
|
1885
1886
|
last_asn: e.string().describe("Last autonomous system number from which this user logged in")
|
|
1886
|
-
}),
|
|
1887
|
+
}), vn = e.object({
|
|
1888
|
+
name: e.string().describe("Authentication method name, e.g. \"mfa\" for a completed second factor"),
|
|
1889
|
+
timestamp: e.string().describe("When the method was completed (ISO 8601)"),
|
|
1890
|
+
type: e.string().optional().describe("For \"mfa\": the authentication method type used, e.g. \"totp\", \"phone\", \"passkey\"")
|
|
1891
|
+
}), yn = e.object({ methods: e.array(vn) }), bn = e.object({
|
|
1887
1892
|
id: e.string(),
|
|
1888
1893
|
revoked_at: e.string().optional(),
|
|
1889
1894
|
used_at: e.string().optional(),
|
|
@@ -1891,15 +1896,16 @@ var vn = e.object({
|
|
|
1891
1896
|
expires_at: e.string().optional(),
|
|
1892
1897
|
login_session_id: e.string(),
|
|
1893
1898
|
idle_expires_at: e.string().optional(),
|
|
1894
|
-
device:
|
|
1895
|
-
clients: e.array(e.string()).describe("List of client details for the session")
|
|
1899
|
+
device: _n.describe("Metadata related to the device used in the session"),
|
|
1900
|
+
clients: e.array(e.string()).describe("List of client details for the session"),
|
|
1901
|
+
authentication: yn.optional().describe("Authentication methods completed in this session (currently MFA only)")
|
|
1896
1902
|
});
|
|
1897
1903
|
e.object({
|
|
1898
1904
|
created_at: e.string(),
|
|
1899
1905
|
updated_at: e.string(),
|
|
1900
1906
|
authenticated_at: e.string(),
|
|
1901
1907
|
last_interaction_at: e.string()
|
|
1902
|
-
}).extend(
|
|
1908
|
+
}).extend(bn.shape), e.object({
|
|
1903
1909
|
kid: e.string().openapi({ description: "The key id of the signing key" }),
|
|
1904
1910
|
tenant_id: e.string().optional().openapi({ description: "The tenant the key belongs to. Omitted means the key is shared / control-plane scoped." }),
|
|
1905
1911
|
cert: e.string().openapi({ description: "The public certificate of the signing key" }),
|
|
@@ -1916,7 +1922,93 @@ e.object({
|
|
|
1916
1922
|
connection: e.string().optional().openapi({ description: "The connection identifier associated with the key" }),
|
|
1917
1923
|
type: e.enum(["jwt_signing", "saml_encryption"]).openapi({ description: "The type of the signing key" })
|
|
1918
1924
|
});
|
|
1919
|
-
var
|
|
1925
|
+
var F = e.enum([
|
|
1926
|
+
"never",
|
|
1927
|
+
"always",
|
|
1928
|
+
"all-applications",
|
|
1929
|
+
"confidence-score"
|
|
1930
|
+
]);
|
|
1931
|
+
e.object({
|
|
1932
|
+
idle_session_lifetime: e.number().default(72),
|
|
1933
|
+
session_lifetime: e.number().default(168),
|
|
1934
|
+
session_cookie: e.object({ mode: e.enum(["persistent", "non-persistent"]).optional() }).optional(),
|
|
1935
|
+
enable_client_connections: e.boolean().optional(),
|
|
1936
|
+
default_redirection_uri: e.string().optional(),
|
|
1937
|
+
enabled_locales: e.array(e.string()).optional(),
|
|
1938
|
+
default_directory: e.string().optional(),
|
|
1939
|
+
error_page: e.object({
|
|
1940
|
+
html: e.string().optional(),
|
|
1941
|
+
show_log_link: e.boolean().optional(),
|
|
1942
|
+
url: e.string().optional()
|
|
1943
|
+
}).optional(),
|
|
1944
|
+
flags: e.object({
|
|
1945
|
+
allow_legacy_delegation_grant_types: e.boolean().optional(),
|
|
1946
|
+
allow_legacy_ro_grant_types: e.boolean().optional(),
|
|
1947
|
+
allow_legacy_tokeninfo_endpoint: e.boolean().optional(),
|
|
1948
|
+
disable_clickjack_protection_headers: e.boolean().optional(),
|
|
1949
|
+
enable_apis_section: e.boolean().optional(),
|
|
1950
|
+
enable_client_connections: e.boolean().optional(),
|
|
1951
|
+
enable_custom_domain_in_emails: e.boolean().optional(),
|
|
1952
|
+
enable_dynamic_client_registration: e.boolean().optional(),
|
|
1953
|
+
enable_idtoken_api2: e.boolean().optional(),
|
|
1954
|
+
enable_legacy_logs_search_v2: e.boolean().optional(),
|
|
1955
|
+
enable_legacy_profile: e.boolean().optional(),
|
|
1956
|
+
enable_pipeline2: e.boolean().optional(),
|
|
1957
|
+
enable_public_signup_user_exists_error: e.boolean().optional(),
|
|
1958
|
+
use_scope_descriptions_for_consent: e.boolean().optional(),
|
|
1959
|
+
disable_management_api_sms_obfuscation: e.boolean().optional(),
|
|
1960
|
+
enable_adfs_waad_email_verification: e.boolean().optional(),
|
|
1961
|
+
revoke_refresh_token_grant: e.boolean().optional(),
|
|
1962
|
+
dashboard_log_streams_next: e.boolean().optional(),
|
|
1963
|
+
dashboard_insights_view: e.boolean().optional(),
|
|
1964
|
+
disable_fields_map_fix: e.boolean().optional(),
|
|
1965
|
+
mfa_show_factor_list_on_enrollment: e.boolean().optional()
|
|
1966
|
+
}).optional(),
|
|
1967
|
+
friendly_name: e.string().optional(),
|
|
1968
|
+
picture_url: e.string().optional(),
|
|
1969
|
+
support_email: e.string().optional(),
|
|
1970
|
+
support_url: e.string().optional(),
|
|
1971
|
+
sandbox_version: e.string().optional(),
|
|
1972
|
+
sandbox_versions_available: e.array(e.string()).optional(),
|
|
1973
|
+
change_password: e.object({
|
|
1974
|
+
enabled: e.boolean(),
|
|
1975
|
+
html: e.string()
|
|
1976
|
+
}).optional(),
|
|
1977
|
+
guardian_mfa_page: e.object({
|
|
1978
|
+
enabled: e.boolean(),
|
|
1979
|
+
html: e.string()
|
|
1980
|
+
}).optional(),
|
|
1981
|
+
default_audience: e.string().optional(),
|
|
1982
|
+
default_organization: e.string().optional(),
|
|
1983
|
+
sessions: e.object({ oidc_logout_prompt_enabled: e.boolean().optional() }).optional(),
|
|
1984
|
+
mfa: e.object({
|
|
1985
|
+
policy: F.default("never").optional(),
|
|
1986
|
+
factors: e.object({
|
|
1987
|
+
sms: e.boolean().default(!1),
|
|
1988
|
+
otp: e.boolean().default(!1),
|
|
1989
|
+
email: e.boolean().default(!1),
|
|
1990
|
+
push_notification: e.boolean().default(!1),
|
|
1991
|
+
webauthn_roaming: e.boolean().default(!1),
|
|
1992
|
+
webauthn_platform: e.boolean().default(!1),
|
|
1993
|
+
recovery_code: e.boolean().default(!1),
|
|
1994
|
+
duo: e.boolean().default(!1)
|
|
1995
|
+
}).optional(),
|
|
1996
|
+
sms_provider: e.object({ provider: e.enum([
|
|
1997
|
+
"twilio",
|
|
1998
|
+
"vonage",
|
|
1999
|
+
"aws_sns",
|
|
2000
|
+
"phone_message_hook"
|
|
2001
|
+
]).optional() }).optional(),
|
|
2002
|
+
twilio: e.object({
|
|
2003
|
+
sid: e.string().optional(),
|
|
2004
|
+
auth_token: e.string().optional(),
|
|
2005
|
+
from: e.string().optional(),
|
|
2006
|
+
messaging_service_sid: e.string().optional()
|
|
2007
|
+
}).optional(),
|
|
2008
|
+
phone_message: e.object({ message: e.string().optional() }).optional()
|
|
2009
|
+
}).optional()
|
|
2010
|
+
});
|
|
2011
|
+
var I = e.object({
|
|
1920
2012
|
id: e.string().optional(),
|
|
1921
2013
|
parent_tenant_id: e.string().nullish(),
|
|
1922
2014
|
config_sync: e.enum([
|
|
@@ -2042,9 +2134,9 @@ var P = e.object({
|
|
|
2042
2134
|
"shared_planetscale"
|
|
2043
2135
|
]).optional(),
|
|
2044
2136
|
d1_database_id: e.string().max(64).optional(),
|
|
2045
|
-
attack_protection:
|
|
2137
|
+
attack_protection: gn.optional(),
|
|
2046
2138
|
mfa: e.object({
|
|
2047
|
-
policy:
|
|
2139
|
+
policy: F.default("never").optional(),
|
|
2048
2140
|
factors: e.object({
|
|
2049
2141
|
sms: e.boolean().default(!1),
|
|
2050
2142
|
otp: e.boolean().default(!1),
|
|
@@ -2073,14 +2165,14 @@ var P = e.object({
|
|
|
2073
2165
|
e.object({
|
|
2074
2166
|
created_at: e.string().nullable().transform((e) => e ?? ""),
|
|
2075
2167
|
updated_at: e.string().nullable().transform((e) => e ?? "")
|
|
2076
|
-
}).extend(
|
|
2168
|
+
}).extend(I.shape).extend({
|
|
2077
2169
|
id: e.string(),
|
|
2078
2170
|
is_control_plane: e.boolean().optional(),
|
|
2079
2171
|
has_children: e.boolean().optional()
|
|
2080
2172
|
});
|
|
2081
|
-
var
|
|
2082
|
-
...
|
|
2083
|
-
policy:
|
|
2173
|
+
var xn = I.shape.mfa.unwrap().shape, Sn = e.object({
|
|
2174
|
+
...xn,
|
|
2175
|
+
policy: F.optional(),
|
|
2084
2176
|
factors: e.object({
|
|
2085
2177
|
sms: e.boolean().optional(),
|
|
2086
2178
|
otp: e.boolean().optional(),
|
|
@@ -2092,16 +2184,16 @@ var bn = P.shape.mfa.unwrap().shape, xn = e.object({
|
|
|
2092
2184
|
duo: e.boolean().optional()
|
|
2093
2185
|
}).optional()
|
|
2094
2186
|
});
|
|
2095
|
-
e.object(
|
|
2187
|
+
e.object(I.shape).extend({
|
|
2096
2188
|
deployment_type: e.enum(["shared", "wfp"]),
|
|
2097
2189
|
provisioning_state: e.enum([
|
|
2098
2190
|
"pending",
|
|
2099
2191
|
"ready",
|
|
2100
2192
|
"failed"
|
|
2101
2193
|
]),
|
|
2102
|
-
mfa:
|
|
2194
|
+
mfa: Sn
|
|
2103
2195
|
}).partial();
|
|
2104
|
-
var
|
|
2196
|
+
var Cn = e.enum([
|
|
2105
2197
|
"provision",
|
|
2106
2198
|
"seed",
|
|
2107
2199
|
"upgrade",
|
|
@@ -2111,18 +2203,18 @@ var Sn = e.enum([
|
|
|
2111
2203
|
"sync-defaults",
|
|
2112
2204
|
"detach",
|
|
2113
2205
|
"tenant-members-request"
|
|
2114
|
-
]),
|
|
2206
|
+
]), wn = e.enum([
|
|
2115
2207
|
"pending",
|
|
2116
2208
|
"running",
|
|
2117
2209
|
"succeeded",
|
|
2118
2210
|
"failed",
|
|
2119
2211
|
"cancelled"
|
|
2120
|
-
]),
|
|
2212
|
+
]), Tn = e.string().max(64);
|
|
2121
2213
|
e.object({
|
|
2122
2214
|
tenant_id: e.string().max(255).nullable().default(null),
|
|
2123
2215
|
rollout_id: e.string().max(255).nullable().optional(),
|
|
2124
|
-
kind:
|
|
2125
|
-
engine:
|
|
2216
|
+
kind: Cn,
|
|
2217
|
+
engine: Tn,
|
|
2126
2218
|
engine_instance_id: e.string().max(100).nullable().optional(),
|
|
2127
2219
|
target_worker_version: e.string().max(255).nullable().optional(),
|
|
2128
2220
|
target_database_version: e.string().max(255).nullable().optional(),
|
|
@@ -2130,7 +2222,7 @@ e.object({
|
|
|
2130
2222
|
input: e.record(e.string(), e.unknown()).nullable().optional()
|
|
2131
2223
|
}).extend({
|
|
2132
2224
|
id: e.string(),
|
|
2133
|
-
status:
|
|
2225
|
+
status: wn,
|
|
2134
2226
|
current_step: e.string().max(255).nullable().optional(),
|
|
2135
2227
|
error: e.string().nullable().optional(),
|
|
2136
2228
|
result: e.record(e.string(), e.unknown()).nullable().optional(),
|
|
@@ -2151,7 +2243,7 @@ e.object({
|
|
|
2151
2243
|
claim_expires_at: !0,
|
|
2152
2244
|
finished_at: !0
|
|
2153
2245
|
}).partial();
|
|
2154
|
-
var
|
|
2246
|
+
var En = e.enum([
|
|
2155
2247
|
"started",
|
|
2156
2248
|
"succeeded",
|
|
2157
2249
|
"failed",
|
|
@@ -2162,14 +2254,14 @@ var Tn = e.enum([
|
|
|
2162
2254
|
e.object({
|
|
2163
2255
|
operation_id: e.string().max(255),
|
|
2164
2256
|
step: e.string().max(255),
|
|
2165
|
-
outcome:
|
|
2257
|
+
outcome: En,
|
|
2166
2258
|
detail: e.record(e.string(), e.unknown()).nullable().optional(),
|
|
2167
2259
|
attempt: e.number().int().min(1).default(1)
|
|
2168
2260
|
}).extend({
|
|
2169
2261
|
id: e.string(),
|
|
2170
2262
|
created_at: e.string()
|
|
2171
2263
|
});
|
|
2172
|
-
var
|
|
2264
|
+
var L = e.enum([
|
|
2173
2265
|
"pending",
|
|
2174
2266
|
"inserted",
|
|
2175
2267
|
"updated",
|
|
@@ -2180,29 +2272,29 @@ e.object({
|
|
|
2180
2272
|
operation_id: e.string().max(255),
|
|
2181
2273
|
seq: e.number().int().min(0),
|
|
2182
2274
|
payload: e.record(e.string(), e.unknown()),
|
|
2183
|
-
status:
|
|
2275
|
+
status: L.default("pending"),
|
|
2184
2276
|
error_code: e.string().max(64).nullable().optional(),
|
|
2185
2277
|
error_message: e.string().nullable().optional(),
|
|
2186
2278
|
error_path: e.string().max(255).nullable().optional(),
|
|
2187
2279
|
entity_id: e.string().max(255).nullable().optional()
|
|
2188
2280
|
}).extend({
|
|
2189
|
-
status:
|
|
2281
|
+
status: L,
|
|
2190
2282
|
created_at: e.string(),
|
|
2191
2283
|
updated_at: e.string()
|
|
2192
2284
|
}), e.object({
|
|
2193
2285
|
seq: e.number().int().min(0),
|
|
2194
|
-
status:
|
|
2286
|
+
status: L,
|
|
2195
2287
|
error_code: e.string().max(64).nullable().optional(),
|
|
2196
2288
|
error_message: e.string().nullable().optional(),
|
|
2197
2289
|
error_path: e.string().max(255).nullable().optional(),
|
|
2198
2290
|
entity_id: e.string().max(255).nullable().optional()
|
|
2199
2291
|
});
|
|
2200
|
-
var
|
|
2292
|
+
var Dn = e.enum([
|
|
2201
2293
|
"upgrade",
|
|
2202
2294
|
"reseed",
|
|
2203
2295
|
"backup",
|
|
2204
2296
|
"config-sync"
|
|
2205
|
-
]),
|
|
2297
|
+
]), On = e.enum([
|
|
2206
2298
|
"pending",
|
|
2207
2299
|
"canary",
|
|
2208
2300
|
"rolling",
|
|
@@ -2211,7 +2303,7 @@ var En = e.enum([
|
|
|
2211
2303
|
"failed"
|
|
2212
2304
|
]);
|
|
2213
2305
|
e.object({
|
|
2214
|
-
kind:
|
|
2306
|
+
kind: Dn,
|
|
2215
2307
|
target_worker_version: e.string().max(255).nullable().optional(),
|
|
2216
2308
|
target_database_version: e.string().max(255).nullable().optional(),
|
|
2217
2309
|
wave_size: e.number().int().min(1).default(10),
|
|
@@ -2221,7 +2313,7 @@ e.object({
|
|
|
2221
2313
|
config: e.record(e.string(), e.unknown()).nullable().optional()
|
|
2222
2314
|
}).extend({
|
|
2223
2315
|
id: e.string(),
|
|
2224
|
-
status:
|
|
2316
|
+
status: On,
|
|
2225
2317
|
created_at: e.string(),
|
|
2226
2318
|
updated_at: e.string(),
|
|
2227
2319
|
finished_at: e.string().nullable().optional(),
|
|
@@ -2235,26 +2327,26 @@ e.object({
|
|
|
2235
2327
|
paused_reason: !0,
|
|
2236
2328
|
finished_at: !0
|
|
2237
2329
|
}).partial();
|
|
2238
|
-
var
|
|
2330
|
+
var kn = e.enum([
|
|
2239
2331
|
"invite",
|
|
2240
2332
|
"add_members",
|
|
2241
2333
|
"remove_members",
|
|
2242
2334
|
"assign_roles",
|
|
2243
2335
|
"remove_roles",
|
|
2244
2336
|
"revoke_invitation"
|
|
2245
|
-
]),
|
|
2337
|
+
]), An = e.enum([
|
|
2246
2338
|
"pending",
|
|
2247
2339
|
"succeeded",
|
|
2248
2340
|
"failed"
|
|
2249
2341
|
]);
|
|
2250
2342
|
e.object({
|
|
2251
|
-
kind:
|
|
2343
|
+
kind: kn,
|
|
2252
2344
|
requested_by: e.string().min(1).max(255),
|
|
2253
2345
|
payload: e.record(e.string(), e.unknown())
|
|
2254
2346
|
}).extend({
|
|
2255
2347
|
id: e.string(),
|
|
2256
2348
|
tenant_id: e.string(),
|
|
2257
|
-
status:
|
|
2349
|
+
status: An,
|
|
2258
2350
|
result: e.record(e.string(), e.unknown()).nullable().optional(),
|
|
2259
2351
|
error: e.string().nullable().optional(),
|
|
2260
2352
|
notified_at: e.string().nullable().optional(),
|
|
@@ -2262,7 +2354,7 @@ e.object({
|
|
|
2262
2354
|
updated_at: e.string(),
|
|
2263
2355
|
finished_at: e.string().nullable().optional()
|
|
2264
2356
|
}), e.object({
|
|
2265
|
-
status:
|
|
2357
|
+
status: An.optional(),
|
|
2266
2358
|
result: e.record(e.string(), e.unknown()).nullable().optional(),
|
|
2267
2359
|
error: e.string().nullable().optional(),
|
|
2268
2360
|
notified_at: e.string().nullable().optional(),
|
|
@@ -2279,7 +2371,7 @@ e.object({
|
|
|
2279
2371
|
code: e.string(),
|
|
2280
2372
|
state: e.string().optional()
|
|
2281
2373
|
});
|
|
2282
|
-
var
|
|
2374
|
+
var jn = e.object({
|
|
2283
2375
|
button_border_radius: e.number(),
|
|
2284
2376
|
button_border_weight: e.number(),
|
|
2285
2377
|
buttons_style: e.enum([
|
|
@@ -2297,7 +2389,7 @@ var An = e.object({
|
|
|
2297
2389
|
show_widget_shadow: e.boolean(),
|
|
2298
2390
|
widget_border_weight: e.number(),
|
|
2299
2391
|
widget_corner_radius: e.number()
|
|
2300
|
-
}),
|
|
2392
|
+
}), Mn = e.object({
|
|
2301
2393
|
base_focus_color: e.string(),
|
|
2302
2394
|
base_hover_color: e.string(),
|
|
2303
2395
|
body_text: e.string(),
|
|
@@ -2321,20 +2413,20 @@ var An = e.object({
|
|
|
2321
2413
|
success: e.string(),
|
|
2322
2414
|
widget_background: e.string(),
|
|
2323
2415
|
widget_border: e.string()
|
|
2324
|
-
}),
|
|
2416
|
+
}), R = e.object({
|
|
2325
2417
|
bold: e.boolean(),
|
|
2326
2418
|
size: e.number()
|
|
2327
|
-
}),
|
|
2328
|
-
body_text:
|
|
2329
|
-
buttons_text:
|
|
2419
|
+
}), Nn = e.object({
|
|
2420
|
+
body_text: R,
|
|
2421
|
+
buttons_text: R,
|
|
2330
2422
|
font_url: e.string(),
|
|
2331
|
-
input_labels:
|
|
2332
|
-
links:
|
|
2423
|
+
input_labels: R,
|
|
2424
|
+
links: R,
|
|
2333
2425
|
links_style: e.enum(["normal", "underlined"]),
|
|
2334
2426
|
reference_text_size: e.number(),
|
|
2335
|
-
subtitle:
|
|
2336
|
-
title:
|
|
2337
|
-
}),
|
|
2427
|
+
subtitle: R,
|
|
2428
|
+
title: R
|
|
2429
|
+
}), Pn = e.object({
|
|
2338
2430
|
background_color: e.string(),
|
|
2339
2431
|
background_image_url: e.string(),
|
|
2340
2432
|
page_layout: e.enum([
|
|
@@ -2347,7 +2439,7 @@ var An = e.object({
|
|
|
2347
2439
|
"chip",
|
|
2348
2440
|
"none"
|
|
2349
2441
|
]).optional()
|
|
2350
|
-
}),
|
|
2442
|
+
}), Fn = e.object({
|
|
2351
2443
|
header_text_alignment: e.enum([
|
|
2352
2444
|
"center",
|
|
2353
2445
|
"left",
|
|
@@ -2364,12 +2456,12 @@ var An = e.object({
|
|
|
2364
2456
|
social_buttons_layout: e.enum(["bottom", "top"])
|
|
2365
2457
|
});
|
|
2366
2458
|
e.object({
|
|
2367
|
-
borders:
|
|
2368
|
-
colors:
|
|
2459
|
+
borders: jn,
|
|
2460
|
+
colors: Mn,
|
|
2369
2461
|
displayName: e.string(),
|
|
2370
|
-
fonts:
|
|
2371
|
-
page_background:
|
|
2372
|
-
widget:
|
|
2462
|
+
fonts: Nn,
|
|
2463
|
+
page_background: Pn,
|
|
2464
|
+
widget: Fn
|
|
2373
2465
|
}).extend({ themeId: e.string() }), e.object({
|
|
2374
2466
|
...a,
|
|
2375
2467
|
universal_login_experience: e.enum(["new", "classic"]).default("new"),
|
|
@@ -2378,30 +2470,30 @@ e.object({
|
|
|
2378
2470
|
show_last_used_connection: e.boolean().default(!1),
|
|
2379
2471
|
webauthn_platform_first_factor: e.boolean()
|
|
2380
2472
|
});
|
|
2381
|
-
var
|
|
2473
|
+
var In = e.object({
|
|
2382
2474
|
hosts: e.array(e.string()).optional(),
|
|
2383
2475
|
methods: e.array(e.string()).optional(),
|
|
2384
2476
|
path: e.string().default("/*"),
|
|
2385
2477
|
headers: e.record(e.string(), e.string()).optional(),
|
|
2386
2478
|
query: e.record(e.string(), e.string()).optional()
|
|
2387
|
-
}),
|
|
2479
|
+
}), Ln = e.object({
|
|
2388
2480
|
type: e.string(),
|
|
2389
2481
|
options: e.record(e.string(), e.unknown()).default({})
|
|
2390
|
-
}),
|
|
2482
|
+
}), z = e.object({
|
|
2391
2483
|
id: e.string().optional(),
|
|
2392
2484
|
custom_domain_id: e.string(),
|
|
2393
2485
|
priority: e.number().int().default(100),
|
|
2394
|
-
match:
|
|
2395
|
-
handlers: e.array(
|
|
2396
|
-
}),
|
|
2486
|
+
match: In,
|
|
2487
|
+
handlers: e.array(Ln).min(1)
|
|
2488
|
+
}), Rn = z.extend({
|
|
2397
2489
|
id: e.string(),
|
|
2398
2490
|
tenant_id: e.string(),
|
|
2399
2491
|
created_at: e.string(),
|
|
2400
2492
|
updated_at: e.string()
|
|
2401
|
-
}),
|
|
2493
|
+
}), zn = z.partial().omit({
|
|
2402
2494
|
id: !0,
|
|
2403
2495
|
custom_domain_id: !0
|
|
2404
|
-
}),
|
|
2496
|
+
}), Bn = "custom_authentication", Vn = [
|
|
2405
2497
|
"urn:ietf:params:oauth:",
|
|
2406
2498
|
"urn:auth0",
|
|
2407
2499
|
"urn:okta",
|
|
@@ -2409,56 +2501,56 @@ var Fn = e.object({
|
|
|
2409
2501
|
"https://auth0.com",
|
|
2410
2502
|
"http://okta.com",
|
|
2411
2503
|
"https://okta.com"
|
|
2412
|
-
],
|
|
2504
|
+
], Hn = e.string().min(1).max(200).refine((e) => e.startsWith("https://") || e.startsWith("urn:"), { message: "subject_token_type must be a URI starting with https:// or urn:" }).refine((e) => !Vn.some((t) => e.toLowerCase().startsWith(t)), { message: "subject_token_type uses a reserved namespace" }), Un = e.enum([
|
|
2413
2505
|
"RS256",
|
|
2414
2506
|
"RS384",
|
|
2415
2507
|
"RS512",
|
|
2416
2508
|
"ES256",
|
|
2417
2509
|
"ES384",
|
|
2418
2510
|
"ES512"
|
|
2419
|
-
]),
|
|
2511
|
+
]), Wn = e.discriminatedUnion("type", [e.object({
|
|
2420
2512
|
type: e.literal("connection"),
|
|
2421
2513
|
connection: e.string().min(1),
|
|
2422
2514
|
create_if_not_exists: e.boolean().default(!0),
|
|
2423
2515
|
trust_email_verified: e.boolean().default(!1)
|
|
2424
|
-
}), e.object({ type: e.literal("user_id") })]),
|
|
2516
|
+
}), e.object({ type: e.literal("user_id") })]), Gn = e.object({
|
|
2425
2517
|
issuer: e.string().min(1).max(2048),
|
|
2426
|
-
jwks:
|
|
2518
|
+
jwks: $t.optional(),
|
|
2427
2519
|
jwks_uri: e.string().url().optional(),
|
|
2428
2520
|
audience: e.array(e.string().min(1)).min(1).optional(),
|
|
2429
|
-
algorithms: e.array(
|
|
2521
|
+
algorithms: e.array(Un).min(1).optional(),
|
|
2430
2522
|
max_lifetime_seconds: e.number().int().min(1).max(3600).default(300),
|
|
2431
2523
|
require_jti: e.boolean().default(!0),
|
|
2432
|
-
user_mapping:
|
|
2524
|
+
user_mapping: Wn
|
|
2433
2525
|
});
|
|
2434
2526
|
e.object({
|
|
2435
2527
|
name: e.string().min(1).max(255),
|
|
2436
|
-
subject_token_type:
|
|
2528
|
+
subject_token_type: Hn,
|
|
2437
2529
|
action_id: e.string().min(1).optional(),
|
|
2438
|
-
type: e.literal(
|
|
2439
|
-
jwt_verification:
|
|
2530
|
+
type: e.literal(Bn),
|
|
2531
|
+
jwt_verification: Gn.optional()
|
|
2440
2532
|
}).extend({
|
|
2441
2533
|
id: e.string(),
|
|
2442
2534
|
created_at: e.string(),
|
|
2443
2535
|
updated_at: e.string()
|
|
2444
2536
|
}), e.object({
|
|
2445
2537
|
name: e.string().min(1).max(255).optional(),
|
|
2446
|
-
subject_token_type:
|
|
2447
|
-
jwt_verification:
|
|
2538
|
+
subject_token_type: Hn.optional(),
|
|
2539
|
+
jwt_verification: Gn.optional()
|
|
2448
2540
|
});
|
|
2449
|
-
var
|
|
2541
|
+
var Kn = e.object({
|
|
2450
2542
|
scim: e.string(),
|
|
2451
2543
|
auth0: e.string()
|
|
2452
|
-
}),
|
|
2544
|
+
}), qn = e.object({
|
|
2453
2545
|
connection_id: e.string(),
|
|
2454
2546
|
user_id_attribute: e.string().default("externalId"),
|
|
2455
|
-
mapping: e.array(
|
|
2547
|
+
mapping: e.array(Kn).default([])
|
|
2456
2548
|
});
|
|
2457
2549
|
e.object({
|
|
2458
2550
|
created_at: e.string(),
|
|
2459
2551
|
updated_at: e.string()
|
|
2460
|
-
}).extend(
|
|
2461
|
-
var
|
|
2552
|
+
}).extend(qn.shape);
|
|
2553
|
+
var Jn = e.object({
|
|
2462
2554
|
token_id: e.string(),
|
|
2463
2555
|
connection_id: e.string(),
|
|
2464
2556
|
token_hash: e.string(),
|
|
@@ -2468,13 +2560,13 @@ var qn = e.object({
|
|
|
2468
2560
|
e.object({
|
|
2469
2561
|
created_at: e.string(),
|
|
2470
2562
|
last_used_at: e.string().optional()
|
|
2471
|
-
}).extend(
|
|
2472
|
-
var
|
|
2563
|
+
}).extend(Jn.shape);
|
|
2564
|
+
var Yn = e.object({
|
|
2473
2565
|
connection_id: e.string(),
|
|
2474
2566
|
external_id: e.string(),
|
|
2475
2567
|
user_id: e.string()
|
|
2476
2568
|
});
|
|
2477
|
-
e.object({ created_at: e.string() }).extend(
|
|
2569
|
+
e.object({ created_at: e.string() }).extend(Yn.shape), e.object({
|
|
2478
2570
|
...a,
|
|
2479
2571
|
name: e.string(),
|
|
2480
2572
|
enabled: e.boolean().optional().default(!0),
|
|
@@ -2482,7 +2574,7 @@ e.object({ created_at: e.string() }).extend(Jn.shape), e.object({
|
|
|
2482
2574
|
credentials: e.record(e.string(), e.unknown()),
|
|
2483
2575
|
settings: e.object({}).optional()
|
|
2484
2576
|
});
|
|
2485
|
-
var
|
|
2577
|
+
var Xn = e.enum([
|
|
2486
2578
|
"verify_email",
|
|
2487
2579
|
"verify_email_by_code",
|
|
2488
2580
|
"reset_email",
|
|
@@ -2497,7 +2589,7 @@ var Yn = e.enum([
|
|
|
2497
2589
|
"user_invitation"
|
|
2498
2590
|
]);
|
|
2499
2591
|
e.object({
|
|
2500
|
-
template:
|
|
2592
|
+
template: Xn,
|
|
2501
2593
|
body: e.string(),
|
|
2502
2594
|
from: e.string(),
|
|
2503
2595
|
subject: e.string(),
|
|
@@ -2512,13 +2604,13 @@ e.object({
|
|
|
2512
2604
|
session_id: e.string().optional(),
|
|
2513
2605
|
organization: e.string().optional(),
|
|
2514
2606
|
auth_connection: e.string().optional(),
|
|
2515
|
-
auth_strategy:
|
|
2607
|
+
auth_strategy: nn.optional(),
|
|
2516
2608
|
user_id: e.string(),
|
|
2517
2609
|
client_id: e.string(),
|
|
2518
2610
|
expires_at: e.string().optional(),
|
|
2519
2611
|
idle_expires_at: e.string().optional(),
|
|
2520
2612
|
last_exchanged_at: e.string().optional(),
|
|
2521
|
-
device:
|
|
2613
|
+
device: _n,
|
|
2522
2614
|
resource_servers: e.array(e.object({
|
|
2523
2615
|
audience: e.string(),
|
|
2524
2616
|
scopes: e.string()
|
|
@@ -2539,10 +2631,10 @@ e.object({
|
|
|
2539
2631
|
name: e.string(),
|
|
2540
2632
|
options: e.object({})
|
|
2541
2633
|
});
|
|
2542
|
-
var
|
|
2634
|
+
var Zn = e.object({
|
|
2543
2635
|
value: e.string(),
|
|
2544
2636
|
description: e.string().optional()
|
|
2545
|
-
}),
|
|
2637
|
+
}), Qn = e.object({
|
|
2546
2638
|
token_dialect: e.enum(["access_token", "access_token_authz"]).optional(),
|
|
2547
2639
|
enforce_policies: e.boolean().optional(),
|
|
2548
2640
|
allow_skipping_userinfo: e.boolean().optional(),
|
|
@@ -2550,11 +2642,11 @@ var Xn = e.object({
|
|
|
2550
2642
|
persist_client_authorization: e.boolean().optional(),
|
|
2551
2643
|
enable_introspection_endpoint: e.boolean().optional(),
|
|
2552
2644
|
mtls: e.object({ bound_access_tokens: e.boolean().optional() }).optional()
|
|
2553
|
-
}),
|
|
2645
|
+
}), $n = e.object({
|
|
2554
2646
|
id: e.string().optional(),
|
|
2555
2647
|
name: e.string(),
|
|
2556
2648
|
identifier: e.string(),
|
|
2557
|
-
scopes: e.array(
|
|
2649
|
+
scopes: e.array(Zn).optional(),
|
|
2558
2650
|
signing_alg: e.string().optional(),
|
|
2559
2651
|
signing_secret: e.string().optional(),
|
|
2560
2652
|
token_lifetime: e.number().default(86400),
|
|
@@ -2562,7 +2654,7 @@ var Xn = e.object({
|
|
|
2562
2654
|
skip_consent_for_verifiable_first_party_clients: e.boolean().optional(),
|
|
2563
2655
|
allow_offline_access: e.boolean().optional(),
|
|
2564
2656
|
verificationKey: e.string().optional(),
|
|
2565
|
-
options:
|
|
2657
|
+
options: Qn.optional(),
|
|
2566
2658
|
is_system: e.boolean().optional(),
|
|
2567
2659
|
...a,
|
|
2568
2660
|
metadata: e.record(e.string(), e.any()).optional()
|
|
@@ -2570,13 +2662,13 @@ var Xn = e.object({
|
|
|
2570
2662
|
created_at: e.string().optional(),
|
|
2571
2663
|
updated_at: e.string().optional()
|
|
2572
2664
|
});
|
|
2573
|
-
e.array(
|
|
2574
|
-
var
|
|
2665
|
+
e.array($n);
|
|
2666
|
+
var er = e.object({
|
|
2575
2667
|
role_id: e.string(),
|
|
2576
2668
|
resource_server_identifier: e.string(),
|
|
2577
2669
|
permission_name: e.string()
|
|
2578
2670
|
}).extend({ created_at: e.string() });
|
|
2579
|
-
e.array(
|
|
2671
|
+
e.array(er), e.object({
|
|
2580
2672
|
user_id: e.string().openapi({ description: "The id of the user that granted the consent" }),
|
|
2581
2673
|
clientID: e.string().openapi({ description: "The id of the client the grant was issued to" }),
|
|
2582
2674
|
audience: e.string().optional().openapi({ description: "The audience the grant applies to" }),
|
|
@@ -2589,7 +2681,7 @@ e.array($n), e.object({
|
|
|
2589
2681
|
failed_logins: e.array(e.string()).optional(),
|
|
2590
2682
|
last_password_reset: e.string().optional()
|
|
2591
2683
|
});
|
|
2592
|
-
var
|
|
2684
|
+
var tr = e.object({
|
|
2593
2685
|
user_id: e.string(),
|
|
2594
2686
|
resource_server_identifier: e.string(),
|
|
2595
2687
|
permission_name: e.string(),
|
|
@@ -2598,8 +2690,8 @@ var er = e.object({
|
|
|
2598
2690
|
tenant_id: e.string(),
|
|
2599
2691
|
created_at: e.string().optional()
|
|
2600
2692
|
});
|
|
2601
|
-
e.array(
|
|
2602
|
-
var
|
|
2693
|
+
e.array(tr);
|
|
2694
|
+
var nr = e.object({
|
|
2603
2695
|
user_id: e.string(),
|
|
2604
2696
|
resource_server_identifier: e.string(),
|
|
2605
2697
|
resource_server_name: e.string(),
|
|
@@ -2608,8 +2700,8 @@ var tr = e.object({
|
|
|
2608
2700
|
created_at: e.string().optional(),
|
|
2609
2701
|
organization_id: e.string().optional()
|
|
2610
2702
|
});
|
|
2611
|
-
e.array(
|
|
2612
|
-
var
|
|
2703
|
+
e.array(nr);
|
|
2704
|
+
var rr = e.object({
|
|
2613
2705
|
user_id: e.string(),
|
|
2614
2706
|
role_id: e.string(),
|
|
2615
2707
|
organization_id: e.string().optional()
|
|
@@ -2617,8 +2709,8 @@ var nr = e.object({
|
|
|
2617
2709
|
tenant_id: e.string(),
|
|
2618
2710
|
created_at: e.string().optional()
|
|
2619
2711
|
});
|
|
2620
|
-
e.array(
|
|
2621
|
-
var
|
|
2712
|
+
e.array(rr);
|
|
2713
|
+
var ir = e.object({
|
|
2622
2714
|
id: e.string().optional().openapi({ description: "The unique identifier of the role. If not provided, one will be generated." }),
|
|
2623
2715
|
name: e.string().min(1).max(50).openapi({ description: "The name of the role. Cannot include '<' or '>'" }),
|
|
2624
2716
|
description: e.string().max(255).optional().openapi({ description: "The description of the role" }),
|
|
@@ -2629,19 +2721,19 @@ var rr = e.object({
|
|
|
2629
2721
|
created_at: e.string().optional(),
|
|
2630
2722
|
updated_at: e.string().optional()
|
|
2631
2723
|
});
|
|
2632
|
-
e.array(
|
|
2633
|
-
var
|
|
2724
|
+
e.array(ir);
|
|
2725
|
+
var ar = e.object({
|
|
2634
2726
|
logo_url: e.string().optional().openapi({ description: "URL of the organization's logo" }),
|
|
2635
2727
|
colors: e.object({
|
|
2636
2728
|
primary: e.string().optional().openapi({ description: "Primary color in hex format (e.g., #FF0000)" }),
|
|
2637
2729
|
page_background: e.string().optional().openapi({ description: "Page background color in hex format (e.g., #FFFFFF)" })
|
|
2638
2730
|
}).optional()
|
|
2639
|
-
}).optional(),
|
|
2731
|
+
}).optional(), or = e.object({
|
|
2640
2732
|
connection_id: e.string().openapi({ description: "ID of the connection" }),
|
|
2641
2733
|
assign_membership_on_login: e.boolean().default(!1).openapi({ description: "Whether to assign membership to the organization on login" }),
|
|
2642
2734
|
show_as_button: e.boolean().default(!0).openapi({ description: "Whether to show this connection as a button in the login screen" }),
|
|
2643
2735
|
is_signup_enabled: e.boolean().default(!0).openapi({ description: "Whether signup is enabled for this connection" })
|
|
2644
|
-
}),
|
|
2736
|
+
}), sr = e.object({ client_credentials: e.object({
|
|
2645
2737
|
enforce: e.boolean().default(!1).openapi({ description: "Whether to enforce token quota limits" }),
|
|
2646
2738
|
per_day: e.number().min(0).default(0).openapi({ description: "Maximum tokens per day (0 = unlimited)" }),
|
|
2647
2739
|
per_hour: e.number().min(0).default(0).openapi({ description: "Maximum tokens per hour (0 = unlimited)" })
|
|
@@ -2650,15 +2742,15 @@ e.object({
|
|
|
2650
2742
|
id: e.string().optional(),
|
|
2651
2743
|
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." }),
|
|
2652
2744
|
display_name: e.string().optional().openapi({ description: "The display name of the organization" }),
|
|
2653
|
-
branding:
|
|
2745
|
+
branding: ar,
|
|
2654
2746
|
metadata: e.record(e.string(), e.any()).default({}).optional().openapi({ description: "Custom metadata for the organization" }),
|
|
2655
|
-
enabled_connections: e.array(
|
|
2656
|
-
token_quota:
|
|
2747
|
+
enabled_connections: e.array(or).default([]).optional().openapi({ description: "List of enabled connections for the organization" }),
|
|
2748
|
+
token_quota: sr
|
|
2657
2749
|
}).extend(n.shape).extend({
|
|
2658
2750
|
id: e.string(),
|
|
2659
2751
|
name: e.string().min(1).openapi({ description: "The name of the organization" })
|
|
2660
2752
|
});
|
|
2661
|
-
var
|
|
2753
|
+
var cr = e.object({
|
|
2662
2754
|
connection_id: e.string().openapi({ description: "ID of the tenant-level connection to enable for the org." }),
|
|
2663
2755
|
assign_membership_on_login: e.boolean().optional().default(!1),
|
|
2664
2756
|
show_as_button: e.boolean().optional().default(!0),
|
|
@@ -2671,89 +2763,10 @@ var sr = e.object({
|
|
|
2671
2763
|
created_at: e.string().optional(),
|
|
2672
2764
|
updated_at: e.string().optional()
|
|
2673
2765
|
});
|
|
2674
|
-
e.array(
|
|
2766
|
+
e.array(cr), e.object({
|
|
2675
2767
|
user_id: e.string().openapi({ description: "ID of the user" }),
|
|
2676
2768
|
organization_id: e.string().openapi({ description: "ID of the organization" })
|
|
2677
2769
|
}).extend(n.shape).extend({ id: e.string() }), e.object({
|
|
2678
|
-
idle_session_lifetime: e.number().default(72),
|
|
2679
|
-
session_lifetime: e.number().default(168),
|
|
2680
|
-
session_cookie: e.object({ mode: e.enum(["persistent", "non-persistent"]).optional() }).optional(),
|
|
2681
|
-
enable_client_connections: e.boolean().optional(),
|
|
2682
|
-
default_redirection_uri: e.string().optional(),
|
|
2683
|
-
enabled_locales: e.array(e.string()).optional(),
|
|
2684
|
-
default_directory: e.string().optional(),
|
|
2685
|
-
error_page: e.object({
|
|
2686
|
-
html: e.string().optional(),
|
|
2687
|
-
show_log_link: e.boolean().optional(),
|
|
2688
|
-
url: e.string().optional()
|
|
2689
|
-
}).optional(),
|
|
2690
|
-
flags: e.object({
|
|
2691
|
-
allow_legacy_delegation_grant_types: e.boolean().optional(),
|
|
2692
|
-
allow_legacy_ro_grant_types: e.boolean().optional(),
|
|
2693
|
-
allow_legacy_tokeninfo_endpoint: e.boolean().optional(),
|
|
2694
|
-
disable_clickjack_protection_headers: e.boolean().optional(),
|
|
2695
|
-
enable_apis_section: e.boolean().optional(),
|
|
2696
|
-
enable_client_connections: e.boolean().optional(),
|
|
2697
|
-
enable_custom_domain_in_emails: e.boolean().optional(),
|
|
2698
|
-
enable_dynamic_client_registration: e.boolean().optional(),
|
|
2699
|
-
enable_idtoken_api2: e.boolean().optional(),
|
|
2700
|
-
enable_legacy_logs_search_v2: e.boolean().optional(),
|
|
2701
|
-
enable_legacy_profile: e.boolean().optional(),
|
|
2702
|
-
enable_pipeline2: e.boolean().optional(),
|
|
2703
|
-
enable_public_signup_user_exists_error: e.boolean().optional(),
|
|
2704
|
-
use_scope_descriptions_for_consent: e.boolean().optional(),
|
|
2705
|
-
disable_management_api_sms_obfuscation: e.boolean().optional(),
|
|
2706
|
-
enable_adfs_waad_email_verification: e.boolean().optional(),
|
|
2707
|
-
revoke_refresh_token_grant: e.boolean().optional(),
|
|
2708
|
-
dashboard_log_streams_next: e.boolean().optional(),
|
|
2709
|
-
dashboard_insights_view: e.boolean().optional(),
|
|
2710
|
-
disable_fields_map_fix: e.boolean().optional(),
|
|
2711
|
-
mfa_show_factor_list_on_enrollment: e.boolean().optional()
|
|
2712
|
-
}).optional(),
|
|
2713
|
-
friendly_name: e.string().optional(),
|
|
2714
|
-
picture_url: e.string().optional(),
|
|
2715
|
-
support_email: e.string().optional(),
|
|
2716
|
-
support_url: e.string().optional(),
|
|
2717
|
-
sandbox_version: e.string().optional(),
|
|
2718
|
-
sandbox_versions_available: e.array(e.string()).optional(),
|
|
2719
|
-
change_password: e.object({
|
|
2720
|
-
enabled: e.boolean(),
|
|
2721
|
-
html: e.string()
|
|
2722
|
-
}).optional(),
|
|
2723
|
-
guardian_mfa_page: e.object({
|
|
2724
|
-
enabled: e.boolean(),
|
|
2725
|
-
html: e.string()
|
|
2726
|
-
}).optional(),
|
|
2727
|
-
default_audience: e.string().optional(),
|
|
2728
|
-
default_organization: e.string().optional(),
|
|
2729
|
-
sessions: e.object({ oidc_logout_prompt_enabled: e.boolean().optional() }).optional(),
|
|
2730
|
-
mfa: e.object({
|
|
2731
|
-
policy: e.enum(["never", "always"]).default("never").optional(),
|
|
2732
|
-
factors: e.object({
|
|
2733
|
-
sms: e.boolean().default(!1),
|
|
2734
|
-
otp: e.boolean().default(!1),
|
|
2735
|
-
email: e.boolean().default(!1),
|
|
2736
|
-
push_notification: e.boolean().default(!1),
|
|
2737
|
-
webauthn_roaming: e.boolean().default(!1),
|
|
2738
|
-
webauthn_platform: e.boolean().default(!1),
|
|
2739
|
-
recovery_code: e.boolean().default(!1),
|
|
2740
|
-
duo: e.boolean().default(!1)
|
|
2741
|
-
}).optional(),
|
|
2742
|
-
sms_provider: e.object({ provider: e.enum([
|
|
2743
|
-
"twilio",
|
|
2744
|
-
"vonage",
|
|
2745
|
-
"aws_sns",
|
|
2746
|
-
"phone_message_hook"
|
|
2747
|
-
]).optional() }).optional(),
|
|
2748
|
-
twilio: e.object({
|
|
2749
|
-
sid: e.string().optional(),
|
|
2750
|
-
auth_token: e.string().optional(),
|
|
2751
|
-
from: e.string().optional(),
|
|
2752
|
-
messaging_service_sid: e.string().optional()
|
|
2753
|
-
}).optional(),
|
|
2754
|
-
phone_message: e.object({ message: e.string().optional() }).optional()
|
|
2755
|
-
}).optional()
|
|
2756
|
-
}), e.object({
|
|
2757
2770
|
date: e.string().openapi({
|
|
2758
2771
|
description: "Date these events occurred in ISO 8601 format",
|
|
2759
2772
|
example: "2025-12-19"
|
|
@@ -2810,7 +2823,7 @@ e.array(sr), e.object({
|
|
|
2810
2823
|
"passwordless",
|
|
2811
2824
|
"enterprise"
|
|
2812
2825
|
]);
|
|
2813
|
-
var
|
|
2826
|
+
var lr = e.object({
|
|
2814
2827
|
cohort: e.string(),
|
|
2815
2828
|
sessions: e.number(),
|
|
2816
2829
|
active: e.array(e.number())
|
|
@@ -2819,9 +2832,9 @@ e.object({
|
|
|
2819
2832
|
interval: e.literal("week"),
|
|
2820
2833
|
from: e.string(),
|
|
2821
2834
|
to: e.string(),
|
|
2822
|
-
cohorts: e.array(
|
|
2835
|
+
cohorts: e.array(lr)
|
|
2823
2836
|
});
|
|
2824
|
-
var
|
|
2837
|
+
var ur = e.object({
|
|
2825
2838
|
cohort: e.string(),
|
|
2826
2839
|
tokens: e.number(),
|
|
2827
2840
|
active: e.array(e.number())
|
|
@@ -2830,24 +2843,24 @@ e.object({
|
|
|
2830
2843
|
interval: e.literal("week"),
|
|
2831
2844
|
from: e.string(),
|
|
2832
2845
|
to: e.string(),
|
|
2833
|
-
cohorts: e.array(
|
|
2846
|
+
cohorts: e.array(ur)
|
|
2834
2847
|
});
|
|
2835
|
-
var
|
|
2848
|
+
var dr = e.object({
|
|
2836
2849
|
name: e.string(),
|
|
2837
2850
|
type: e.string()
|
|
2838
|
-
}),
|
|
2851
|
+
}), fr = e.object({
|
|
2839
2852
|
elapsed: e.number(),
|
|
2840
2853
|
rows_read: e.number().optional(),
|
|
2841
2854
|
bytes_read: e.number().optional()
|
|
2842
2855
|
});
|
|
2843
2856
|
e.object({
|
|
2844
|
-
meta: e.array(
|
|
2857
|
+
meta: e.array(dr),
|
|
2845
2858
|
data: e.array(e.record(e.string(), e.any())),
|
|
2846
2859
|
rows: e.number(),
|
|
2847
2860
|
rows_before_limit_at_least: e.number().optional(),
|
|
2848
|
-
statistics:
|
|
2861
|
+
statistics: fr.optional()
|
|
2849
2862
|
});
|
|
2850
|
-
var
|
|
2863
|
+
var pr = 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(".")), mr = e.record(e.string(), e.record(e.string(), e.string())).openapi({
|
|
2851
2864
|
type: "object",
|
|
2852
2865
|
additionalProperties: {
|
|
2853
2866
|
type: "object",
|
|
@@ -2855,23 +2868,23 @@ var fr = e.enum(/* @__PURE__ */ "login.login-id.login-password.signup.signup-id.
|
|
|
2855
2868
|
}
|
|
2856
2869
|
});
|
|
2857
2870
|
e.object({
|
|
2858
|
-
prompt:
|
|
2871
|
+
prompt: pr,
|
|
2859
2872
|
language: e.string(),
|
|
2860
|
-
custom_text:
|
|
2873
|
+
custom_text: mr
|
|
2861
2874
|
});
|
|
2862
|
-
var
|
|
2875
|
+
var hr = e.object({
|
|
2863
2876
|
"form-content-start": e.string().optional(),
|
|
2864
2877
|
"form-content-end": e.string().optional(),
|
|
2865
2878
|
"form-footer-start": e.string().optional(),
|
|
2866
2879
|
"form-footer-end": e.string().optional(),
|
|
2867
2880
|
"secondary-actions-start": e.string().optional(),
|
|
2868
2881
|
"secondary-actions-end": e.string().optional()
|
|
2869
|
-
}).strict(),
|
|
2882
|
+
}).strict(), gr = e.record(e.string(), hr);
|
|
2870
2883
|
e.object({
|
|
2871
2884
|
prompt: e.string(),
|
|
2872
|
-
partials:
|
|
2885
|
+
partials: gr
|
|
2873
2886
|
});
|
|
2874
|
-
var
|
|
2887
|
+
var _r = e.enum([
|
|
2875
2888
|
"phone",
|
|
2876
2889
|
"totp",
|
|
2877
2890
|
"email",
|
|
@@ -2879,11 +2892,12 @@ var gr = e.enum([
|
|
|
2879
2892
|
"webauthn-roaming",
|
|
2880
2893
|
"webauthn-platform",
|
|
2881
2894
|
"passkey"
|
|
2882
|
-
]),
|
|
2895
|
+
]), vr = e.object({
|
|
2883
2896
|
user_id: e.string(),
|
|
2884
|
-
type:
|
|
2897
|
+
type: _r,
|
|
2885
2898
|
phone_number: e.string().optional(),
|
|
2886
2899
|
totp_secret: e.string().optional(),
|
|
2900
|
+
totp_last_step: e.number().int().nonnegative().optional(),
|
|
2887
2901
|
credential_id: e.string().optional(),
|
|
2888
2902
|
public_key: e.string().optional(),
|
|
2889
2903
|
sign_count: e.number().int().nonnegative().optional(),
|
|
@@ -2892,7 +2906,7 @@ var gr = e.enum([
|
|
|
2892
2906
|
friendly_name: e.string().optional(),
|
|
2893
2907
|
confirmed: e.boolean().default(!1)
|
|
2894
2908
|
});
|
|
2895
|
-
function
|
|
2909
|
+
function yr(t, n) {
|
|
2896
2910
|
t.type === "phone" && !t.phone_number && n.addIssue({
|
|
2897
2911
|
code: e.ZodIssueCode.custom,
|
|
2898
2912
|
message: "phone_number is required when type is 'phone'",
|
|
@@ -2915,29 +2929,29 @@ function _r(t, n) {
|
|
|
2915
2929
|
path: ["public_key"]
|
|
2916
2930
|
}));
|
|
2917
2931
|
}
|
|
2918
|
-
|
|
2932
|
+
vr.superRefine(yr), vr.extend({
|
|
2919
2933
|
id: e.string(),
|
|
2920
2934
|
created_at: e.string(),
|
|
2921
2935
|
updated_at: e.string()
|
|
2922
|
-
}).superRefine(
|
|
2936
|
+
}).superRefine(yr), e.object({
|
|
2923
2937
|
id: e.string().optional(),
|
|
2924
2938
|
created_at: e.string().datetime({ offset: !0 }).optional(),
|
|
2925
2939
|
updated_at: e.string().datetime({ offset: !0 }).optional()
|
|
2926
2940
|
});
|
|
2927
|
-
var
|
|
2941
|
+
var br = "x-authhero-preserve-location", B = class extends Error {
|
|
2928
2942
|
ms;
|
|
2929
2943
|
constructor(e, t) {
|
|
2930
2944
|
super(`${t ?? "Operation"} timed out after ${e}ms`), this.name = "TimeoutError", this.ms = e;
|
|
2931
2945
|
}
|
|
2932
2946
|
};
|
|
2933
|
-
function
|
|
2934
|
-
return e instanceof
|
|
2947
|
+
function V(e) {
|
|
2948
|
+
return e instanceof B ? !0 : e instanceof Error ? e.name === "AbortError" || e.name === "TimeoutError" : !1;
|
|
2935
2949
|
}
|
|
2936
|
-
function
|
|
2950
|
+
function H(e, t) {
|
|
2937
2951
|
let n = new AbortController(), r = setTimeout(() => n.abort(), e);
|
|
2938
2952
|
return t(n.signal).finally(() => clearTimeout(r));
|
|
2939
2953
|
}
|
|
2940
|
-
function
|
|
2954
|
+
function xr(e) {
|
|
2941
2955
|
let t = e.filter((e) => e !== void 0);
|
|
2942
2956
|
if (t.length <= 1) return t[0];
|
|
2943
2957
|
if (typeof AbortSignal.any == "function") return AbortSignal.any(t);
|
|
@@ -2950,18 +2964,18 @@ function yr(e) {
|
|
|
2950
2964
|
for (let e of t) e.addEventListener("abort", i);
|
|
2951
2965
|
return n.signal;
|
|
2952
2966
|
}
|
|
2953
|
-
function
|
|
2954
|
-
let i = new AbortController(), a =
|
|
2967
|
+
function U(e, t, n, r) {
|
|
2968
|
+
let i = new AbortController(), a = xr([n, i.signal]) ?? i.signal, o, s = new Promise((n, r) => {
|
|
2955
2969
|
o = setTimeout(() => {
|
|
2956
|
-
let n = new
|
|
2970
|
+
let n = new B(e, t);
|
|
2957
2971
|
i.abort(n), r(n);
|
|
2958
2972
|
}, e);
|
|
2959
2973
|
});
|
|
2960
2974
|
return Promise.race([Promise.resolve().then(() => r(a)), s]).finally(() => clearTimeout(o));
|
|
2961
2975
|
}
|
|
2962
|
-
function
|
|
2976
|
+
function W(e, t, n) {
|
|
2963
2977
|
let r, i = new Promise((e, i) => {
|
|
2964
|
-
r = setTimeout(() => i(new
|
|
2978
|
+
r = setTimeout(() => i(new B(t, n)), t);
|
|
2965
2979
|
});
|
|
2966
2980
|
return Promise.race([e, i]).finally(() => {
|
|
2967
2981
|
r && clearTimeout(r);
|
|
@@ -2969,12 +2983,12 @@ function U(e, t, n) {
|
|
|
2969
2983
|
}
|
|
2970
2984
|
//#endregion
|
|
2971
2985
|
//#region src/data-plane/cache.ts
|
|
2972
|
-
var
|
|
2973
|
-
function
|
|
2986
|
+
var Sr = 1e4, Cr = 8e3;
|
|
2987
|
+
function G(e, t, n) {
|
|
2974
2988
|
let r = typeof t == "number" ? {
|
|
2975
2989
|
freshTtlMs: t,
|
|
2976
2990
|
maxEntries: n
|
|
2977
|
-
} : t, i = r.freshTtlMs, a = r.staleTtlMs ?? 0, o = r.staleIfErrorTtlMs ?? 0, s = r.negativeTtlMs ?? i, c = r.maxEntries ??
|
|
2991
|
+
} : t, i = r.freshTtlMs, a = r.staleTtlMs ?? 0, o = r.staleIfErrorTtlMs ?? 0, s = r.negativeTtlMs ?? i, c = r.maxEntries ?? Sr, l = r.waitUntil, u = r.upstreamTimeoutMs ?? Cr, d = u > 0 ? u : 1e4, f = /* @__PURE__ */ new Map();
|
|
2978
2992
|
function p(e) {
|
|
2979
2993
|
for (let [t, n] of f) n.stale_if_error_until <= e && n.stale_until <= e && f.delete(t);
|
|
2980
2994
|
for (; f.size >= c;) {
|
|
@@ -2996,7 +3010,7 @@ function W(e, t, n) {
|
|
|
2996
3010
|
return e.refresh_started_at === void 0 ? !1 : t - e.refresh_started_at < d ? !0 : (e.refresh_started_at = void 0, !1);
|
|
2997
3011
|
}
|
|
2998
3012
|
function g(t, n) {
|
|
2999
|
-
return u > 0 ?
|
|
3013
|
+
return u > 0 ? U(u, "resolveHost", n, (n) => e.resolveHost(t, { signal: n })) : e.resolveHost(t, { signal: n });
|
|
3000
3014
|
}
|
|
3001
3015
|
async function _(e, t) {
|
|
3002
3016
|
let n = f.get(e);
|
|
@@ -3029,7 +3043,7 @@ function W(e, t, n) {
|
|
|
3029
3043
|
}
|
|
3030
3044
|
//#endregion
|
|
3031
3045
|
//#region src/data-plane/registry.ts
|
|
3032
|
-
var
|
|
3046
|
+
var wr = class {
|
|
3033
3047
|
definitions = /* @__PURE__ */ new Map();
|
|
3034
3048
|
bindings;
|
|
3035
3049
|
constructor(e = {}) {
|
|
@@ -3049,38 +3063,38 @@ var Sr = class {
|
|
|
3049
3063
|
return n.build(r.data, { bindings: this.bindings });
|
|
3050
3064
|
}
|
|
3051
3065
|
};
|
|
3052
|
-
function
|
|
3066
|
+
function K(e) {
|
|
3053
3067
|
return e;
|
|
3054
3068
|
}
|
|
3055
3069
|
//#endregion
|
|
3056
3070
|
//#region src/data-plane/handlers/util.ts
|
|
3057
|
-
var
|
|
3058
|
-
function
|
|
3059
|
-
e.set(
|
|
3060
|
-
}
|
|
3061
|
-
function K(e) {
|
|
3062
|
-
return e.get(Cr) ?? e.req.raw;
|
|
3063
|
-
}
|
|
3064
|
-
function kr(e, t) {
|
|
3065
|
-
e.set(wr, t.tenant_id), e.set(Tr, t.custom_domain_id), e.set(Er, t.domain);
|
|
3071
|
+
var Tr = "__authhero_proxy_request__", Er = "__authhero_proxy_tenant_id__", Dr = "__authhero_proxy_custom_domain_id__", Or = "__authhero_proxy_domain__", kr = "x-authhero-proxy-mutability-probe";
|
|
3072
|
+
function Ar(e, t) {
|
|
3073
|
+
e.set(Tr, t);
|
|
3066
3074
|
}
|
|
3067
|
-
function
|
|
3068
|
-
return e.get(
|
|
3075
|
+
function q(e) {
|
|
3076
|
+
return e.get(Tr) ?? e.req.raw;
|
|
3069
3077
|
}
|
|
3070
|
-
function jr(e) {
|
|
3071
|
-
|
|
3078
|
+
function jr(e, t) {
|
|
3079
|
+
e.set(Er, t.tenant_id), e.set(Dr, t.custom_domain_id), e.set(Or, t.domain);
|
|
3072
3080
|
}
|
|
3073
3081
|
function Mr(e) {
|
|
3074
3082
|
return e.get(Er);
|
|
3075
3083
|
}
|
|
3076
|
-
function Nr(e
|
|
3077
|
-
|
|
3078
|
-
t(r), Or(e, new Request(n, { headers: r }));
|
|
3084
|
+
function Nr(e) {
|
|
3085
|
+
return e.get(Dr);
|
|
3079
3086
|
}
|
|
3080
|
-
function
|
|
3087
|
+
function Pr(e) {
|
|
3088
|
+
return e.get(Or);
|
|
3089
|
+
}
|
|
3090
|
+
function Fr(e, t) {
|
|
3091
|
+
let n = q(e), r = new Headers(n.headers);
|
|
3092
|
+
t(r), Ar(e, new Request(n, { headers: r }));
|
|
3093
|
+
}
|
|
3094
|
+
function J(e) {
|
|
3081
3095
|
let t = e.res;
|
|
3082
3096
|
try {
|
|
3083
|
-
t.headers.append(
|
|
3097
|
+
t.headers.append(kr, "1"), t.headers.delete(kr);
|
|
3084
3098
|
return;
|
|
3085
3099
|
} catch {
|
|
3086
3100
|
e.res = new Response(t.body, {
|
|
@@ -3092,7 +3106,7 @@ function q(e) {
|
|
|
3092
3106
|
}
|
|
3093
3107
|
//#endregion
|
|
3094
3108
|
//#region src/data-plane/handlers/cors.ts
|
|
3095
|
-
var
|
|
3109
|
+
var Ir = e.object({
|
|
3096
3110
|
origins: e.array(e.string()).optional(),
|
|
3097
3111
|
allow_credentials: e.boolean().optional(),
|
|
3098
3112
|
allow_headers: e.array(e.string()).optional(),
|
|
@@ -3100,44 +3114,44 @@ var Pr = e.object({
|
|
|
3100
3114
|
expose_headers: e.array(e.string()).optional(),
|
|
3101
3115
|
max_age: e.number().int().optional()
|
|
3102
3116
|
}).refine((e) => !(e.allow_credentials && e.origins?.includes("*")), { message: "Cannot use wildcard origin (*) with allow_credentials" });
|
|
3103
|
-
function
|
|
3117
|
+
function Lr(e, t) {
|
|
3104
3118
|
let n = new Headers(), r = e.origins ?? ["*"], i = r.includes("*");
|
|
3105
3119
|
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;
|
|
3106
3120
|
}
|
|
3107
|
-
var
|
|
3121
|
+
var Rr = K({
|
|
3108
3122
|
type: "cors",
|
|
3109
|
-
optionsSchema:
|
|
3123
|
+
optionsSchema: Ir,
|
|
3110
3124
|
build(e) {
|
|
3111
3125
|
return async (t, n) => {
|
|
3112
3126
|
let r = t.req.header("origin") ?? null;
|
|
3113
3127
|
if (t.req.method === "OPTIONS" && r !== null && t.req.header("access-control-request-method") !== void 0) {
|
|
3114
|
-
let t =
|
|
3128
|
+
let t = Lr(e, r);
|
|
3115
3129
|
return new Response(null, {
|
|
3116
3130
|
status: 204,
|
|
3117
3131
|
headers: t
|
|
3118
3132
|
});
|
|
3119
3133
|
}
|
|
3120
3134
|
await n();
|
|
3121
|
-
let i =
|
|
3122
|
-
|
|
3135
|
+
let i = Lr(e, r);
|
|
3136
|
+
J(t), i.forEach((e, n) => {
|
|
3123
3137
|
n.toLowerCase() === "vary" ? t.res.headers.append(n, e) : t.res.headers.set(n, e);
|
|
3124
3138
|
});
|
|
3125
3139
|
};
|
|
3126
3140
|
}
|
|
3127
|
-
}),
|
|
3141
|
+
}), zr = e.object({
|
|
3128
3142
|
username: e.string(),
|
|
3129
3143
|
password: e.string(),
|
|
3130
3144
|
realm: e.string().optional()
|
|
3131
3145
|
});
|
|
3132
|
-
function
|
|
3146
|
+
function Br(e, t) {
|
|
3133
3147
|
let n = `${e}:${t}`;
|
|
3134
3148
|
return typeof btoa == "function" ? btoa(n) : Buffer.from(n, "utf-8").toString("base64");
|
|
3135
3149
|
}
|
|
3136
|
-
var
|
|
3150
|
+
var Vr = K({
|
|
3137
3151
|
type: "basic_auth",
|
|
3138
|
-
optionsSchema:
|
|
3152
|
+
optionsSchema: zr,
|
|
3139
3153
|
build(e) {
|
|
3140
|
-
let t =
|
|
3154
|
+
let t = Br(e.username, e.password), n = (e.realm ?? "Restricted").replace(/["\\\r\n]/g, "");
|
|
3141
3155
|
return async (e, r) => {
|
|
3142
3156
|
let i = e.req.header("authorization");
|
|
3143
3157
|
if (i) {
|
|
@@ -3153,7 +3167,7 @@ var zr = G({
|
|
|
3153
3167
|
});
|
|
3154
3168
|
};
|
|
3155
3169
|
}
|
|
3156
|
-
}),
|
|
3170
|
+
}), Hr = K({
|
|
3157
3171
|
type: "headers",
|
|
3158
3172
|
optionsSchema: e.object({
|
|
3159
3173
|
request: e.record(e.string(), e.string()).optional(),
|
|
@@ -3163,23 +3177,23 @@ var zr = G({
|
|
|
3163
3177
|
}),
|
|
3164
3178
|
build(e) {
|
|
3165
3179
|
return async (t, n) => {
|
|
3166
|
-
if ((e.request || e.remove_request) &&
|
|
3180
|
+
if ((e.request || e.remove_request) && Fr(t, (t) => {
|
|
3167
3181
|
if (e.remove_request?.forEach((e) => t.delete(e)), e.request) for (let [n, r] of Object.entries(e.request)) t.set(n, r);
|
|
3168
|
-
}), await n(), (e.response || e.remove_response) && (
|
|
3182
|
+
}), await n(), (e.response || e.remove_response) && (J(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);
|
|
3169
3183
|
};
|
|
3170
3184
|
}
|
|
3171
|
-
}),
|
|
3185
|
+
}), Ur = K({
|
|
3172
3186
|
type: "cache",
|
|
3173
3187
|
optionsSchema: e.object({ ttl_seconds: e.number().int().positive() }),
|
|
3174
3188
|
build(e) {
|
|
3175
3189
|
return async (t, n) => {
|
|
3176
3190
|
if (await n(), !t.res.headers.has("Cache-Control")) {
|
|
3177
3191
|
let n = t.res.headers.has("set-cookie") ? "private" : "public";
|
|
3178
|
-
|
|
3192
|
+
J(t), t.res.headers.set("Cache-Control", `${n}, max-age=${e.ttl_seconds}`);
|
|
3179
3193
|
}
|
|
3180
3194
|
};
|
|
3181
3195
|
}
|
|
3182
|
-
}),
|
|
3196
|
+
}), Wr = [
|
|
3183
3197
|
"173.245.48.0/20",
|
|
3184
3198
|
"103.21.244.0/22",
|
|
3185
3199
|
"103.22.200.0/22",
|
|
@@ -3203,7 +3217,7 @@ var zr = G({
|
|
|
3203
3217
|
"2a06:98c0::/29",
|
|
3204
3218
|
"2c0f:f248::/32"
|
|
3205
3219
|
];
|
|
3206
|
-
function
|
|
3220
|
+
function Gr(e) {
|
|
3207
3221
|
let t = e.split(".");
|
|
3208
3222
|
if (t.length !== 4) return null;
|
|
3209
3223
|
let n = [];
|
|
@@ -3215,14 +3229,14 @@ function Ur(e) {
|
|
|
3215
3229
|
}
|
|
3216
3230
|
return n;
|
|
3217
3231
|
}
|
|
3218
|
-
function
|
|
3232
|
+
function Kr(e) {
|
|
3219
3233
|
if (e === "") return [];
|
|
3220
3234
|
let t = e.split(":"), n = [];
|
|
3221
3235
|
for (let e = 0; e < t.length; e++) {
|
|
3222
3236
|
let r = t[e];
|
|
3223
3237
|
if (r.includes(".")) {
|
|
3224
3238
|
if (e !== t.length - 1) return null;
|
|
3225
|
-
let i =
|
|
3239
|
+
let i = Gr(r);
|
|
3226
3240
|
if (!i) return null;
|
|
3227
3241
|
n.push(i[0] << 8 | i[1], i[2] << 8 | i[3]);
|
|
3228
3242
|
continue;
|
|
@@ -3232,14 +3246,14 @@ function Wr(e) {
|
|
|
3232
3246
|
}
|
|
3233
3247
|
return n;
|
|
3234
3248
|
}
|
|
3235
|
-
function
|
|
3249
|
+
function qr(e) {
|
|
3236
3250
|
let t = e.split("::");
|
|
3237
3251
|
if (t.length > 2) return null;
|
|
3238
|
-
let n =
|
|
3252
|
+
let n = Kr(t[0] ?? "");
|
|
3239
3253
|
if (!n) return null;
|
|
3240
3254
|
let r;
|
|
3241
3255
|
if (t.length === 2) {
|
|
3242
|
-
let e =
|
|
3256
|
+
let e = Kr(t[1] ?? "");
|
|
3243
3257
|
if (!e) return null;
|
|
3244
3258
|
let i = 8 - n.length - e.length;
|
|
3245
3259
|
if (i < 1) return null;
|
|
@@ -3254,25 +3268,25 @@ function Gr(e) {
|
|
|
3254
3268
|
for (let e of r) i.push(e >> 8 & 255, e & 255);
|
|
3255
3269
|
return i;
|
|
3256
3270
|
}
|
|
3257
|
-
function
|
|
3271
|
+
function Jr(e) {
|
|
3258
3272
|
let t = e.trim();
|
|
3259
3273
|
t.startsWith("[") && t.endsWith("]") && (t = t.slice(1, -1));
|
|
3260
3274
|
let n = t.indexOf("%");
|
|
3261
3275
|
if (n !== -1 && (t = t.slice(0, n)), t === "") return null;
|
|
3262
|
-
if (!t.includes(":")) return
|
|
3263
|
-
let r =
|
|
3276
|
+
if (!t.includes(":")) return Gr(t);
|
|
3277
|
+
let r = qr(t);
|
|
3264
3278
|
return r ? r.slice(0, 10).every((e) => e === 0) && r[10] === 255 && r[11] === 255 ? r.slice(12) : r : null;
|
|
3265
3279
|
}
|
|
3266
|
-
function
|
|
3267
|
-
let [t, n] = e.split("/"), r =
|
|
3280
|
+
function Yr(e) {
|
|
3281
|
+
let [t, n] = e.split("/"), r = Jr(t ?? ""), i = Number(n);
|
|
3268
3282
|
if (!r || !Number.isInteger(i)) throw Error(`Invalid Cloudflare CIDR: ${e}`);
|
|
3269
3283
|
return {
|
|
3270
3284
|
bytes: r,
|
|
3271
3285
|
prefixBits: i
|
|
3272
3286
|
};
|
|
3273
3287
|
}
|
|
3274
|
-
var
|
|
3275
|
-
function
|
|
3288
|
+
var Xr = Wr.map(Yr);
|
|
3289
|
+
function Zr(e, t) {
|
|
3276
3290
|
if (e.length !== t.bytes.length) return !1;
|
|
3277
3291
|
let n = t.prefixBits >> 3;
|
|
3278
3292
|
for (let r = 0; r < n; r++) if (e[r] !== t.bytes[r]) return !1;
|
|
@@ -3281,11 +3295,11 @@ function Yr(e, t) {
|
|
|
3281
3295
|
let i = 255 << 8 - r & 255;
|
|
3282
3296
|
return (e[n] & i) === (t.bytes[n] & i);
|
|
3283
3297
|
}
|
|
3284
|
-
function
|
|
3285
|
-
let t =
|
|
3286
|
-
return t ?
|
|
3298
|
+
function Qr(e) {
|
|
3299
|
+
let t = Jr(e);
|
|
3300
|
+
return t ? Xr.some((e) => Zr(t, e)) : !1;
|
|
3287
3301
|
}
|
|
3288
|
-
var
|
|
3302
|
+
var $r = K({
|
|
3289
3303
|
type: "forwarded_headers",
|
|
3290
3304
|
optionsSchema: e.object({
|
|
3291
3305
|
client_ip_header: e.string().default("cf-connecting-ip"),
|
|
@@ -3296,46 +3310,46 @@ var Zr = G({
|
|
|
3296
3310
|
build(e) {
|
|
3297
3311
|
return async (t, n) => {
|
|
3298
3312
|
let r = new URL(t.req.url);
|
|
3299
|
-
|
|
3313
|
+
Fr(t, (n) => {
|
|
3300
3314
|
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);
|
|
3301
|
-
let i = n.get(e.client_ip_header), a = i && e.skip_cloudflare_client_ip &&
|
|
3315
|
+
let i = n.get(e.client_ip_header), a = i && e.skip_cloudflare_client_ip && Qr(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;
|
|
3302
3316
|
n.set("x-forwarded-for", l), e.set_x_real_ip && n.set("x-real-ip", s);
|
|
3303
3317
|
}), await n();
|
|
3304
3318
|
};
|
|
3305
3319
|
}
|
|
3306
|
-
}),
|
|
3307
|
-
function
|
|
3320
|
+
}), ei = e.object({ upstream_host: e.string().optional() });
|
|
3321
|
+
function ti(e) {
|
|
3308
3322
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
3309
3323
|
}
|
|
3310
|
-
function
|
|
3324
|
+
function ni(e) {
|
|
3311
3325
|
if (typeof e.getSetCookie == "function") return e.getSetCookie();
|
|
3312
3326
|
let t = [];
|
|
3313
3327
|
return e.forEach((e, n) => {
|
|
3314
3328
|
n.toLowerCase() === "set-cookie" && t.push(e);
|
|
3315
3329
|
}), t;
|
|
3316
3330
|
}
|
|
3317
|
-
var
|
|
3331
|
+
var ri = K({
|
|
3318
3332
|
type: "rewrite_cookies",
|
|
3319
|
-
optionsSchema:
|
|
3333
|
+
optionsSchema: ei,
|
|
3320
3334
|
build(e) {
|
|
3321
3335
|
return async (t, n) => {
|
|
3322
3336
|
await n();
|
|
3323
3337
|
let r = new URL(t.req.url).hostname, i = e.upstream_host ?? t.get("__proxy_upstream_host__");
|
|
3324
3338
|
if (!i) return;
|
|
3325
|
-
let a =
|
|
3339
|
+
let a = ni(t.res.headers);
|
|
3326
3340
|
if (a.length === 0) return;
|
|
3327
|
-
let o =
|
|
3328
|
-
|
|
3341
|
+
let o = ti(i), s = RegExp(`(?:^|;\\s*)Domain=\\.?${o}(?=;|$)`, "i");
|
|
3342
|
+
J(t), t.res.headers.delete("set-cookie");
|
|
3329
3343
|
for (let e of a) t.res.headers.append("set-cookie", e.replace(s, `Domain=${r}`));
|
|
3330
3344
|
};
|
|
3331
3345
|
}
|
|
3332
|
-
}),
|
|
3346
|
+
}), ii = K({
|
|
3333
3347
|
type: "rewrite_location",
|
|
3334
3348
|
optionsSchema: e.object({ upstream_origin: e.string().optional() }),
|
|
3335
3349
|
build(e) {
|
|
3336
3350
|
return async (t, n) => {
|
|
3337
3351
|
if (await n(), t.res.headers.has("x-authhero-preserve-location")) {
|
|
3338
|
-
|
|
3352
|
+
J(t), t.res.headers.delete(br);
|
|
3339
3353
|
return;
|
|
3340
3354
|
}
|
|
3341
3355
|
let r = t.res.status;
|
|
@@ -3352,10 +3366,10 @@ var ti = G({
|
|
|
3352
3366
|
}
|
|
3353
3367
|
if (o.origin !== a) return;
|
|
3354
3368
|
let s = new URL(t.req.url), c = `${`${s.protocol}//${s.host}`}${o.pathname}${o.search}${o.hash}`;
|
|
3355
|
-
|
|
3369
|
+
J(t), t.res.headers.set("location", c);
|
|
3356
3370
|
};
|
|
3357
3371
|
}
|
|
3358
|
-
}),
|
|
3372
|
+
}), ai = new Set([
|
|
3359
3373
|
"connection",
|
|
3360
3374
|
"keep-alive",
|
|
3361
3375
|
"proxy-authenticate",
|
|
@@ -3364,32 +3378,32 @@ var ti = G({
|
|
|
3364
3378
|
"trailers",
|
|
3365
3379
|
"transfer-encoding",
|
|
3366
3380
|
"upgrade"
|
|
3367
|
-
]),
|
|
3381
|
+
]), oi = 3e4, si = e.object({
|
|
3368
3382
|
upstream_url: e.string(),
|
|
3369
3383
|
preserve_host: e.boolean().default(!1),
|
|
3370
3384
|
timeout_ms: e.number().int().positive().optional()
|
|
3371
3385
|
});
|
|
3372
|
-
function
|
|
3386
|
+
function ci(e, t) {
|
|
3373
3387
|
return e === "" || e === "/" ? t : `${e.endsWith("/") ? e.slice(0, -1) : e}${t.startsWith("/") ? t : `/${t}`}`;
|
|
3374
3388
|
}
|
|
3375
|
-
function
|
|
3389
|
+
function li(e) {
|
|
3376
3390
|
return e !== "GET" && e !== "HEAD";
|
|
3377
3391
|
}
|
|
3378
|
-
var
|
|
3379
|
-
function
|
|
3392
|
+
var ui = 128 * 1024;
|
|
3393
|
+
function di(e) {
|
|
3380
3394
|
let t = e.headers.get("content-length");
|
|
3381
3395
|
if (t === null) return null;
|
|
3382
3396
|
let n = Number(t);
|
|
3383
3397
|
return Number.isInteger(n) && n >= 0 ? n : null;
|
|
3384
3398
|
}
|
|
3385
|
-
async function
|
|
3399
|
+
async function fi(e, t) {
|
|
3386
3400
|
let n = e.getReader(), r = !1, i = setTimeout(() => {
|
|
3387
3401
|
r = !0, n.cancel().catch(() => {});
|
|
3388
3402
|
}, t), a = [], o = 0;
|
|
3389
3403
|
try {
|
|
3390
3404
|
for (;;) {
|
|
3391
3405
|
let { done: e, value: i } = await n.read();
|
|
3392
|
-
if (r) throw new
|
|
3406
|
+
if (r) throw new B(t, "Request body read");
|
|
3393
3407
|
if (e) break;
|
|
3394
3408
|
a.push(i), o += i.byteLength;
|
|
3395
3409
|
}
|
|
@@ -3400,8 +3414,8 @@ async function ui(e, t) {
|
|
|
3400
3414
|
for (let e of a) s.set(e, c), c += e.byteLength;
|
|
3401
3415
|
return s.buffer;
|
|
3402
3416
|
}
|
|
3403
|
-
function
|
|
3404
|
-
return
|
|
3417
|
+
function pi(e) {
|
|
3418
|
+
return V(e) ? new Response("Request body timeout", {
|
|
3405
3419
|
status: 408,
|
|
3406
3420
|
headers: { "x-authhero-proxy-error": "request_body_timeout" }
|
|
3407
3421
|
}) : new Response("Bad request", {
|
|
@@ -3409,20 +3423,20 @@ function di(e) {
|
|
|
3409
3423
|
headers: { "x-authhero-proxy-error": "request_body_failed" }
|
|
3410
3424
|
});
|
|
3411
3425
|
}
|
|
3412
|
-
async function
|
|
3413
|
-
if (!
|
|
3414
|
-
let r =
|
|
3415
|
-
if (r === null || r >
|
|
3416
|
-
let i = await
|
|
3426
|
+
async function mi(e, t, n) {
|
|
3427
|
+
if (!li(e.method) || !e.body) return;
|
|
3428
|
+
let r = di(e);
|
|
3429
|
+
if (r === null || r > ui) return e.body;
|
|
3430
|
+
let i = await fi(e.body, n);
|
|
3417
3431
|
return t.set("content-length", String(i.byteLength)), i;
|
|
3418
3432
|
}
|
|
3419
|
-
async function
|
|
3433
|
+
async function hi(e, t, n) {
|
|
3420
3434
|
let r = new URL(t.url), i = new URL(e.upstream_url);
|
|
3421
|
-
i.pathname =
|
|
3435
|
+
i.pathname = ci(i.pathname, r.pathname), i.search = r.search;
|
|
3422
3436
|
let a = new Headers(t.headers);
|
|
3423
|
-
for (let e of
|
|
3437
|
+
for (let e of ai) a.delete(e);
|
|
3424
3438
|
e.preserve_host || a.set("host", i.host), a.has("x-forwarded-host") || a.set("x-forwarded-host", r.host), a.has("x-forwarded-proto") || a.set("x-forwarded-proto", r.protocol.replace(":", ""));
|
|
3425
|
-
let o = await
|
|
3439
|
+
let o = await mi(t, a, n), s = {
|
|
3426
3440
|
method: t.method,
|
|
3427
3441
|
headers: a,
|
|
3428
3442
|
body: o,
|
|
@@ -3433,97 +3447,97 @@ async function pi(e, t, n) {
|
|
|
3433
3447
|
init: s
|
|
3434
3448
|
};
|
|
3435
3449
|
}
|
|
3436
|
-
var
|
|
3450
|
+
var gi = K({
|
|
3437
3451
|
type: "http",
|
|
3438
|
-
optionsSchema:
|
|
3452
|
+
optionsSchema: si,
|
|
3439
3453
|
build(e) {
|
|
3440
|
-
let t = e.timeout_ms ??
|
|
3454
|
+
let t = e.timeout_ms ?? oi;
|
|
3441
3455
|
return async (n) => {
|
|
3442
|
-
let r =
|
|
3456
|
+
let r = q(n), i;
|
|
3443
3457
|
try {
|
|
3444
|
-
i = await
|
|
3458
|
+
i = await hi(e, r, t);
|
|
3445
3459
|
} catch (e) {
|
|
3446
|
-
return
|
|
3460
|
+
return pi(e);
|
|
3447
3461
|
}
|
|
3448
3462
|
let { target: a, init: o } = i;
|
|
3449
3463
|
n.set("__proxy_upstream_host__", a.hostname), n.set("__proxy_upstream_origin__", `${a.protocol}//${a.host}`);
|
|
3450
3464
|
try {
|
|
3451
|
-
return await
|
|
3465
|
+
return await H(t, (e) => fetch(a.toString(), {
|
|
3452
3466
|
...o,
|
|
3453
3467
|
signal: e
|
|
3454
3468
|
}));
|
|
3455
3469
|
} catch (e) {
|
|
3456
|
-
return
|
|
3470
|
+
return V(e) ? n.text("Upstream timeout", 504, { "x-authhero-proxy-error": "http_timeout" }) : n.text("Bad gateway", 502, { "x-authhero-proxy-error": "http_failed" });
|
|
3457
3471
|
}
|
|
3458
3472
|
};
|
|
3459
3473
|
}
|
|
3460
|
-
}),
|
|
3474
|
+
}), _i = 3e4, vi = e.object({
|
|
3461
3475
|
binding: e.string(),
|
|
3462
3476
|
upstream_url: e.string().optional(),
|
|
3463
3477
|
preserve_host: e.boolean().default(!0),
|
|
3464
3478
|
timeout_ms: e.number().int().positive().optional()
|
|
3465
3479
|
});
|
|
3466
|
-
function
|
|
3480
|
+
function yi(e) {
|
|
3467
3481
|
return typeof e == "object" && !!e && typeof e.fetch == "function";
|
|
3468
3482
|
}
|
|
3469
|
-
var
|
|
3483
|
+
var bi = K({
|
|
3470
3484
|
type: "service_binding",
|
|
3471
|
-
optionsSchema:
|
|
3485
|
+
optionsSchema: vi,
|
|
3472
3486
|
build(e, t) {
|
|
3473
3487
|
let n = t.bindings[e.binding];
|
|
3474
|
-
if (!
|
|
3475
|
-
let r = e.upstream_url ?? `https://${e.binding}.binding.invalid/`, i = e.timeout_ms ??
|
|
3488
|
+
if (!yi(n)) throw Error(`Service binding "${e.binding}" is not configured or is not a Fetcher`);
|
|
3489
|
+
let r = e.upstream_url ?? `https://${e.binding}.binding.invalid/`, i = e.timeout_ms ?? _i;
|
|
3476
3490
|
return async (t) => {
|
|
3477
|
-
let a =
|
|
3491
|
+
let a = q(t), o;
|
|
3478
3492
|
try {
|
|
3479
|
-
o = await
|
|
3493
|
+
o = await hi({
|
|
3480
3494
|
upstream_url: r,
|
|
3481
3495
|
preserve_host: e.preserve_host
|
|
3482
3496
|
}, a, i);
|
|
3483
3497
|
} catch (e) {
|
|
3484
|
-
return
|
|
3498
|
+
return pi(e);
|
|
3485
3499
|
}
|
|
3486
3500
|
let { target: s, init: c } = o;
|
|
3487
3501
|
t.set("__proxy_upstream_host__", s.hostname), t.set("__proxy_upstream_origin__", `${s.protocol}//${s.host}`);
|
|
3488
3502
|
try {
|
|
3489
|
-
return await
|
|
3503
|
+
return await H(i, async (e) => n.fetch(new Request(s.toString(), {
|
|
3490
3504
|
...c,
|
|
3491
3505
|
signal: e
|
|
3492
3506
|
})));
|
|
3493
3507
|
} catch (e) {
|
|
3494
|
-
return
|
|
3508
|
+
return V(e) ? t.text(`service_binding timed out after ${i}ms`, 504, { "x-authhero-proxy-error": "service_binding_timeout" }) : t.text("Bad gateway", 502, { "x-authhero-proxy-error": "service_binding_failed" });
|
|
3495
3509
|
}
|
|
3496
3510
|
};
|
|
3497
3511
|
}
|
|
3498
|
-
}),
|
|
3512
|
+
}), xi = 3e4, Si = e.object({
|
|
3499
3513
|
binding: e.string(),
|
|
3500
3514
|
script_name: e.string(),
|
|
3501
3515
|
cpu_ms: e.number().int().positive().optional(),
|
|
3502
3516
|
subrequests: e.number().int().positive().optional(),
|
|
3503
3517
|
timeout_ms: e.number().int().positive().optional()
|
|
3504
3518
|
});
|
|
3505
|
-
function
|
|
3519
|
+
function Ci(e) {
|
|
3506
3520
|
return typeof e == "object" && !!e && typeof e.get == "function";
|
|
3507
3521
|
}
|
|
3508
|
-
var
|
|
3509
|
-
function
|
|
3510
|
-
return
|
|
3522
|
+
var Y = /\{(tenant_id|custom_domain_id|domain|host)\}/g;
|
|
3523
|
+
function wi(e) {
|
|
3524
|
+
return Y.lastIndex = 0, Y.test(e);
|
|
3511
3525
|
}
|
|
3512
|
-
var
|
|
3526
|
+
var Ti = K({
|
|
3513
3527
|
type: "dispatch_namespace",
|
|
3514
|
-
optionsSchema:
|
|
3528
|
+
optionsSchema: Si,
|
|
3515
3529
|
build(e, t) {
|
|
3516
3530
|
let n = t.bindings[e.binding];
|
|
3517
|
-
if (!
|
|
3518
|
-
let r =
|
|
3531
|
+
if (!Ci(n)) throw Error(`Dispatch namespace binding "${e.binding}" is not configured or does not expose .get()`);
|
|
3532
|
+
let r = wi(e.script_name), i = e.timeout_ms ?? xi, a = e.cpu_ms || e.subrequests ? { limits: {
|
|
3519
3533
|
...e.cpu_ms ? { cpuMs: e.cpu_ms } : {},
|
|
3520
3534
|
...e.subrequests ? { subrequests: e.subrequests } : {}
|
|
3521
3535
|
} } : void 0;
|
|
3522
3536
|
return async (t) => {
|
|
3523
3537
|
let o = e.script_name;
|
|
3524
3538
|
if (r) {
|
|
3525
|
-
let n =
|
|
3526
|
-
if (o = o.replace(
|
|
3539
|
+
let n = Mr(t), r = Nr(t), i = Pr(t), a = t.req.header("host") ?? t.req.header("x-forwarded-host") ?? "";
|
|
3540
|
+
if (o = o.replace(Y, (e, t) => {
|
|
3527
3541
|
switch (t) {
|
|
3528
3542
|
case "tenant_id": return n ?? "";
|
|
3529
3543
|
case "custom_domain_id": return r ?? "";
|
|
@@ -3533,19 +3547,19 @@ var Ci = G({
|
|
|
3533
3547
|
}
|
|
3534
3548
|
}), o.includes("{") || o === "") return t.text(`dispatch_namespace: could not resolve script name from template "${e.script_name}"`, 500);
|
|
3535
3549
|
}
|
|
3536
|
-
let s =
|
|
3550
|
+
let s = q(t);
|
|
3537
3551
|
try {
|
|
3538
3552
|
let e = n.get(o, void 0, a);
|
|
3539
|
-
return await
|
|
3553
|
+
return await H(i, async (t) => {
|
|
3540
3554
|
let n = new Request(s, { signal: t });
|
|
3541
3555
|
return e.fetch(n);
|
|
3542
3556
|
});
|
|
3543
3557
|
} catch (e) {
|
|
3544
|
-
return
|
|
3558
|
+
return V(e) ? t.text(`dispatch_namespace timed out after ${i}ms`, 504, { "x-authhero-proxy-error": "dispatch_namespace_timeout" }) : t.text("Bad gateway", 502, { "x-authhero-proxy-error": "dispatch_namespace_failed" });
|
|
3545
3559
|
}
|
|
3546
3560
|
};
|
|
3547
3561
|
}
|
|
3548
|
-
}),
|
|
3562
|
+
}), Ei = K({
|
|
3549
3563
|
type: "redirect",
|
|
3550
3564
|
optionsSchema: e.object({
|
|
3551
3565
|
upstream_url: e.string().refine((e) => {
|
|
@@ -3574,7 +3588,7 @@ var Ci = G({
|
|
|
3574
3588
|
});
|
|
3575
3589
|
};
|
|
3576
3590
|
}
|
|
3577
|
-
}),
|
|
3591
|
+
}), Di = K({
|
|
3578
3592
|
type: "static",
|
|
3579
3593
|
optionsSchema: e.object({
|
|
3580
3594
|
status: e.number().int().default(200),
|
|
@@ -3594,15 +3608,15 @@ var Ci = G({
|
|
|
3594
3608
|
});
|
|
3595
3609
|
//#endregion
|
|
3596
3610
|
//#region src/data-plane/handlers/index.ts
|
|
3597
|
-
function
|
|
3598
|
-
e.add(
|
|
3611
|
+
function Oi(e) {
|
|
3612
|
+
e.add(Rr).add(Vr).add(Hr).add(Ur).add($r).add(ri).add(ii).add(gi).add(bi).add(Ti).add(Ei).add(Di);
|
|
3599
3613
|
}
|
|
3600
3614
|
//#endregion
|
|
3601
3615
|
//#region src/data-plane/matcher.ts
|
|
3602
|
-
function
|
|
3616
|
+
function ki(e) {
|
|
3603
3617
|
return [...e].sort((e, t) => e.priority === t.priority ? e.created_at.localeCompare(t.created_at) : e.priority - t.priority);
|
|
3604
3618
|
}
|
|
3605
|
-
function
|
|
3619
|
+
function Ai(e, t) {
|
|
3606
3620
|
let n = e.toLowerCase(), r = t.toLowerCase();
|
|
3607
3621
|
if (n === r) return !0;
|
|
3608
3622
|
if (n.startsWith("*.")) {
|
|
@@ -3611,13 +3625,13 @@ function Y(e, t) {
|
|
|
3611
3625
|
}
|
|
3612
3626
|
return !1;
|
|
3613
3627
|
}
|
|
3614
|
-
function
|
|
3615
|
-
return !e || e.length === 0 ? !0 : e.some((e) =>
|
|
3628
|
+
function ji(e, t) {
|
|
3629
|
+
return !e || e.length === 0 ? !0 : e.some((e) => Ai(e, t));
|
|
3616
3630
|
}
|
|
3617
|
-
function
|
|
3631
|
+
function Mi(e) {
|
|
3618
3632
|
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;
|
|
3619
3633
|
return async (e, i) => {
|
|
3620
|
-
if (r && !
|
|
3634
|
+
if (r && !ji(r, e.req.header("host") ?? "")) return new Response("No matching route", { status: 404 });
|
|
3621
3635
|
for (let [n, r] of t) {
|
|
3622
3636
|
let t = e.req.header(n);
|
|
3623
3637
|
if (t === void 0 || !r.test(t)) return new Response("No matching route", { status: 404 });
|
|
@@ -3634,17 +3648,17 @@ function ki(e) {
|
|
|
3634
3648
|
}
|
|
3635
3649
|
//#endregion
|
|
3636
3650
|
//#region src/data-plane/compile.ts
|
|
3637
|
-
var
|
|
3638
|
-
function
|
|
3651
|
+
var Ni = "forwarded_headers";
|
|
3652
|
+
function Pi(e) {
|
|
3639
3653
|
return e.some((e) => e.type === "forwarded_headers") ? [...e] : [{
|
|
3640
|
-
type:
|
|
3654
|
+
type: Ni,
|
|
3641
3655
|
options: {}
|
|
3642
3656
|
}, ...e];
|
|
3643
3657
|
}
|
|
3644
3658
|
function X(e, t) {
|
|
3645
|
-
return e.has("forwarded_headers") ?
|
|
3659
|
+
return e.has("forwarded_headers") ? Pi(t) : [...t];
|
|
3646
3660
|
}
|
|
3647
|
-
var
|
|
3661
|
+
var Fi = [
|
|
3648
3662
|
"GET",
|
|
3649
3663
|
"POST",
|
|
3650
3664
|
"PUT",
|
|
@@ -3656,39 +3670,39 @@ var Mi = [
|
|
|
3656
3670
|
function Z(e, n, r, i) {
|
|
3657
3671
|
let a = new t();
|
|
3658
3672
|
r && a.use("*", async (e, t) => {
|
|
3659
|
-
|
|
3673
|
+
jr(e, r), await t();
|
|
3660
3674
|
});
|
|
3661
|
-
let o =
|
|
3675
|
+
let o = ki(e);
|
|
3662
3676
|
for (let e of o) {
|
|
3663
3677
|
let t = [];
|
|
3664
|
-
t.push(
|
|
3678
|
+
t.push(Mi(e.match));
|
|
3665
3679
|
for (let r of X(n, e.handlers)) t.push(n.build(r.type, r.options));
|
|
3666
|
-
let r = e.match.methods?.length ? e.match.methods.map((e) => e.toUpperCase()) :
|
|
3680
|
+
let r = e.match.methods?.length ? e.match.methods.map((e) => e.toUpperCase()) : Fi, i = e.match.path || "/*";
|
|
3667
3681
|
a.on(r, [i], ...t);
|
|
3668
3682
|
}
|
|
3669
|
-
return i && i.length > 0 ? a.on(
|
|
3670
|
-
let n =
|
|
3683
|
+
return i && i.length > 0 ? a.on(Fi, ["*"], ...i) : a.all("*", (e) => e.text("No matching route", 404)), a.onError((e, t) => {
|
|
3684
|
+
let n = V(e);
|
|
3671
3685
|
return t.text(n ? "Upstream timeout" : "Bad gateway", n ? 504 : 502, { "x-authhero-proxy-error": n ? "handler_timeout" : "handler_failed" });
|
|
3672
3686
|
}), a;
|
|
3673
3687
|
}
|
|
3674
3688
|
//#endregion
|
|
3675
3689
|
//#region src/data-plane/router.ts
|
|
3676
|
-
var
|
|
3677
|
-
function
|
|
3678
|
-
return e.resolver ? e.resolver : e.cache ?
|
|
3690
|
+
var Ii = 1e4;
|
|
3691
|
+
function Li(e) {
|
|
3692
|
+
return e.resolver ? e.resolver : e.cache ? G(e.data, e.cache) : G(e.data, e.cacheTtlMs ?? 3e4);
|
|
3679
3693
|
}
|
|
3680
|
-
function
|
|
3694
|
+
function Ri(e) {
|
|
3681
3695
|
if (e.registry) return e.registry;
|
|
3682
|
-
let t = new
|
|
3683
|
-
return
|
|
3696
|
+
let t = new wr(e.bindings ?? {});
|
|
3697
|
+
return Oi(t), t;
|
|
3684
3698
|
}
|
|
3685
3699
|
function Q(e) {
|
|
3686
|
-
let t =
|
|
3700
|
+
let t = Li(e), n = Ri(e), r = /* @__PURE__ */ new WeakMap(), i = e.resolveHostTimeoutMs ?? Ii, 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;
|
|
3687
3701
|
return async (e) => {
|
|
3688
3702
|
let s = e.req.header("host") ?? e.req.header("x-forwarded-host");
|
|
3689
3703
|
if (!s) return e.text("Missing host", 400);
|
|
3690
3704
|
try {
|
|
3691
|
-
let c = await
|
|
3705
|
+
let c = await U(i, "resolveHost", void 0, (e) => t.resolveHost(s, { signal: e }));
|
|
3692
3706
|
if (!c) return o ? await o.fetch(e.req.raw) : e.text("Unknown host", 404);
|
|
3693
3707
|
let l = r.get(c);
|
|
3694
3708
|
return l || (l = Z(c.routes, n, {
|
|
@@ -3697,17 +3711,17 @@ function Q(e) {
|
|
|
3697
3711
|
domain: c.domain
|
|
3698
3712
|
}, a), r.set(c, l)), await l.fetch(e.req.raw);
|
|
3699
3713
|
} catch (t) {
|
|
3700
|
-
return o ? await o.fetch(e.req.raw) :
|
|
3714
|
+
return o ? await o.fetch(e.req.raw) : V(t) ? e.text(`Resolve host timed out after ${i}ms`, 504, { "x-authhero-proxy-error": "resolve_host_timeout" }) : e.text("Bad gateway", 502, { "x-authhero-proxy-error": "data_plane_error" });
|
|
3701
3715
|
}
|
|
3702
3716
|
};
|
|
3703
3717
|
}
|
|
3704
|
-
function
|
|
3718
|
+
function zi(e) {
|
|
3705
3719
|
let n = new t();
|
|
3706
3720
|
return n.all("*", Q(e)), n;
|
|
3707
3721
|
}
|
|
3708
3722
|
//#endregion
|
|
3709
3723
|
//#region src/app.ts
|
|
3710
|
-
function
|
|
3724
|
+
function Bi(e) {
|
|
3711
3725
|
let n = new t();
|
|
3712
3726
|
return n.all("*", Q({
|
|
3713
3727
|
data: e.data,
|
|
@@ -3719,62 +3733,62 @@ function Li(e) {
|
|
|
3719
3733
|
resolveHostTimeoutMs: e.resolveHostTimeoutMs,
|
|
3720
3734
|
defaultHandlers: e.defaultHandlers
|
|
3721
3735
|
})), n.onError((e, t) => {
|
|
3722
|
-
let n =
|
|
3736
|
+
let n = V(e);
|
|
3723
3737
|
return t.text(n ? "Proxy timeout" : "Bad gateway", n ? 504 : 502, { "x-authhero-proxy-error": n ? "proxy_timeout" : "proxy_error" });
|
|
3724
3738
|
}), n;
|
|
3725
3739
|
}
|
|
3726
3740
|
//#endregion
|
|
3727
3741
|
//#region src/data-plane/cache-api-cache.ts
|
|
3728
|
-
var
|
|
3729
|
-
function
|
|
3742
|
+
var Vi = 1e3, Hi = 1e3;
|
|
3743
|
+
function Ui(e, t) {
|
|
3730
3744
|
return new Request(`https://proxy-cache.internal/${encodeURIComponent(e)}/hosts/${encodeURIComponent(t.toLowerCase())}`, { method: "GET" });
|
|
3731
3745
|
}
|
|
3732
|
-
function
|
|
3746
|
+
function Wi() {
|
|
3733
3747
|
return globalThis.caches?.default;
|
|
3734
3748
|
}
|
|
3735
|
-
function
|
|
3736
|
-
let t = e.cache ??
|
|
3749
|
+
function Gi(e) {
|
|
3750
|
+
let t = e.cache ?? Wi();
|
|
3737
3751
|
if (!t) return e.upstream;
|
|
3738
|
-
let n = t, r = e.namespace ?? "authhero-proxy", i = e.cacheTtlSeconds ?? 60, a = e.negativeCacheTtlSeconds ?? 10, o = e.waitUntil, s = e.cacheReadTimeoutMs ??
|
|
3752
|
+
let n = t, r = e.namespace ?? "authhero-proxy", i = e.cacheTtlSeconds ?? 60, a = e.negativeCacheTtlSeconds ?? 10, o = e.waitUntil, s = e.cacheReadTimeoutMs ?? Vi, c = e.cacheWriteTimeoutMs ?? Hi;
|
|
3739
3753
|
async function l(e) {
|
|
3740
3754
|
try {
|
|
3741
|
-
return await
|
|
3755
|
+
return await W(Promise.resolve(n.match(e)), s, "cache.match");
|
|
3742
3756
|
} catch {
|
|
3743
3757
|
return;
|
|
3744
3758
|
}
|
|
3745
3759
|
}
|
|
3746
3760
|
return { async resolveHost(t, s) {
|
|
3747
|
-
let u =
|
|
3761
|
+
let u = Ui(r, t), d = await l(u);
|
|
3748
3762
|
if (d) try {
|
|
3749
3763
|
return (await d.json()).value;
|
|
3750
3764
|
} catch {}
|
|
3751
3765
|
let f = await e.upstream.resolveHost(t, s), p = f === null ? a : i, m = new Response(JSON.stringify({ value: f }), { headers: {
|
|
3752
3766
|
"content-type": "application/json",
|
|
3753
3767
|
"cache-control": `public, max-age=${p}`
|
|
3754
|
-
} }), h =
|
|
3768
|
+
} }), h = W(Promise.resolve(n.put(u, m)), c, "cache.put").catch(() => void 0);
|
|
3755
3769
|
return o ? o(h) : await h, f;
|
|
3756
3770
|
} };
|
|
3757
3771
|
}
|
|
3758
|
-
function
|
|
3759
|
-
return
|
|
3772
|
+
function Ki(e, t) {
|
|
3773
|
+
return Ui(e, t);
|
|
3760
3774
|
}
|
|
3761
3775
|
//#endregion
|
|
3762
3776
|
//#region src/data-plane/cache-adapter-cache.ts
|
|
3763
|
-
var
|
|
3764
|
-
function
|
|
3765
|
-
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 =
|
|
3777
|
+
var qi = 1e3, Ji = 1e3, Yi = 5e3;
|
|
3778
|
+
function Xi(e) {
|
|
3779
|
+
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 = qi, cacheWriteTimeoutMs: u = Ji, upstreamTimeoutMs: d = Yi } = e, f = d > 0 ? d : 1e4, p = /* @__PURE__ */ new Map();
|
|
3766
3780
|
function m(e) {
|
|
3767
3781
|
return `${s}:${e.toLowerCase()}`;
|
|
3768
3782
|
}
|
|
3769
3783
|
async function h(e) {
|
|
3770
3784
|
try {
|
|
3771
|
-
return await
|
|
3785
|
+
return await W(n.get(e), l, "cache.get") ?? null;
|
|
3772
3786
|
} catch {
|
|
3773
3787
|
return null;
|
|
3774
3788
|
}
|
|
3775
3789
|
}
|
|
3776
3790
|
function g(e, t, r) {
|
|
3777
|
-
let i =
|
|
3791
|
+
let i = W(Promise.resolve().then(() => n.set(e, t, r)), u, "cache.set").catch(() => void 0);
|
|
3778
3792
|
return c ? (c(i), Promise.resolve()) : i;
|
|
3779
3793
|
}
|
|
3780
3794
|
function _(e, t) {
|
|
@@ -3782,7 +3796,7 @@ function qi(e) {
|
|
|
3782
3796
|
return n === void 0 ? !1 : t - n < f ? !0 : (p.delete(e), !1);
|
|
3783
3797
|
}
|
|
3784
3798
|
function ee(e, n) {
|
|
3785
|
-
return d > 0 ?
|
|
3799
|
+
return d > 0 ? U(d, "resolveHost", n, (n) => t.resolveHost(e, { signal: n })) : t.resolveHost(e, { signal: n });
|
|
3786
3800
|
}
|
|
3787
3801
|
async function v(e, t) {
|
|
3788
3802
|
return p.set(e, Date.now()), (async () => {
|
|
@@ -3819,7 +3833,7 @@ function qi(e) {
|
|
|
3819
3833
|
}
|
|
3820
3834
|
} };
|
|
3821
3835
|
}
|
|
3822
|
-
function
|
|
3836
|
+
function Zi(e, t) {
|
|
3823
3837
|
return `${e}:${t.toLowerCase()}`;
|
|
3824
3838
|
}
|
|
3825
3839
|
//#endregion
|
|
@@ -3827,7 +3841,7 @@ function Ji(e, t) {
|
|
|
3827
3841
|
function $() {
|
|
3828
3842
|
throw Error("Static proxy adapter is read-only; configure routes at init time");
|
|
3829
3843
|
}
|
|
3830
|
-
function
|
|
3844
|
+
function Qi(e, t, n, r, i, a) {
|
|
3831
3845
|
return {
|
|
3832
3846
|
id: e.id ?? `${n}:${t}`,
|
|
3833
3847
|
tenant_id: r,
|
|
@@ -3842,10 +3856,10 @@ function Yi(e, t, n, r, i, a) {
|
|
|
3842
3856
|
updated_at: e.updated_at ?? a
|
|
3843
3857
|
};
|
|
3844
3858
|
}
|
|
3845
|
-
function
|
|
3859
|
+
function $i(e) {
|
|
3846
3860
|
let t = (/* @__PURE__ */ new Date()).toISOString(), n = e.defaultTenantId ?? "static", r = /* @__PURE__ */ new Map();
|
|
3847
3861
|
for (let [i, a] of Object.entries(e.hosts)) {
|
|
3848
|
-
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) =>
|
|
3862
|
+
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) => Qi(n, r, e, s, c, t)).sort((e, t) => e.priority - t.priority);
|
|
3849
3863
|
r.set(e, {
|
|
3850
3864
|
tenant_id: s,
|
|
3851
3865
|
custom_domain_id: c,
|
|
@@ -3889,7 +3903,7 @@ function Xi(e) {
|
|
|
3889
3903
|
}
|
|
3890
3904
|
};
|
|
3891
3905
|
}
|
|
3892
|
-
function
|
|
3906
|
+
function ea(e, t = {}) {
|
|
3893
3907
|
return {
|
|
3894
3908
|
priority: t.priority,
|
|
3895
3909
|
match: { path: t.path ?? "/*" },
|
|
@@ -3904,10 +3918,10 @@ function Zi(e, t = {}) {
|
|
|
3904
3918
|
}
|
|
3905
3919
|
//#endregion
|
|
3906
3920
|
//#region src/constants.ts
|
|
3907
|
-
var
|
|
3921
|
+
var ta = "proxy:resolve_host";
|
|
3908
3922
|
//#endregion
|
|
3909
3923
|
//#region src/http-adapter/index.ts
|
|
3910
|
-
function
|
|
3924
|
+
function na() {
|
|
3911
3925
|
let e = () => {
|
|
3912
3926
|
throw Error("HTTP proxy adapter does not expose write access to proxy_routes; mutate via the control-plane management API");
|
|
3913
3927
|
};
|
|
@@ -3929,12 +3943,12 @@ function $i() {
|
|
|
3929
3943
|
}
|
|
3930
3944
|
};
|
|
3931
3945
|
}
|
|
3932
|
-
function
|
|
3946
|
+
function ra(e) {
|
|
3933
3947
|
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;
|
|
3934
3948
|
function c(e, t) {
|
|
3935
|
-
let n = new AbortController(), r =
|
|
3949
|
+
let n = new AbortController(), r = xr([e, n.signal]) ?? n.signal, i, a = new Promise((e, t) => {
|
|
3936
3950
|
i = setTimeout(() => {
|
|
3937
|
-
n.abort(), t(new
|
|
3951
|
+
n.abort(), t(new B(s, "control plane"));
|
|
3938
3952
|
}, s);
|
|
3939
3953
|
});
|
|
3940
3954
|
return Promise.race([t(r), a]).finally(() => clearTimeout(i));
|
|
@@ -3966,7 +3980,7 @@ function ea(e) {
|
|
|
3966
3980
|
return l && l.expires_at > Date.now() ? l.value : u(e);
|
|
3967
3981
|
}
|
|
3968
3982
|
return {
|
|
3969
|
-
proxyRoutes:
|
|
3983
|
+
proxyRoutes: na(),
|
|
3970
3984
|
async resolveHost(e, i) {
|
|
3971
3985
|
let a = i?.signal, o = await d(a), s = `${n}${r}${encodeURIComponent(e.toLowerCase())}`;
|
|
3972
3986
|
return c(a, async (e) => {
|
|
@@ -3983,7 +3997,7 @@ function ea(e) {
|
|
|
3983
3997
|
}
|
|
3984
3998
|
//#endregion
|
|
3985
3999
|
//#region src/http-adapter/service-binding-fetch.ts
|
|
3986
|
-
function
|
|
4000
|
+
function ia(e) {
|
|
3987
4001
|
return (t, n) => {
|
|
3988
4002
|
let r = t instanceof Request && n === void 0 ? t : new Request(t, n);
|
|
3989
4003
|
return e.fetch(r);
|
|
@@ -3991,11 +4005,11 @@ function ta(e) {
|
|
|
3991
4005
|
}
|
|
3992
4006
|
//#endregion
|
|
3993
4007
|
//#region src/kv-adapter/index.ts
|
|
3994
|
-
var
|
|
3995
|
-
function
|
|
4008
|
+
var aa = "authhero-proxy-host:";
|
|
4009
|
+
function oa(e, t) {
|
|
3996
4010
|
return `${e}${t.toLowerCase()}`;
|
|
3997
4011
|
}
|
|
3998
|
-
function
|
|
4012
|
+
function sa() {
|
|
3999
4013
|
let e = () => {
|
|
4000
4014
|
throw Error("KV proxy adapter does not expose write access to proxy_routes; mutate via the control-plane management API");
|
|
4001
4015
|
};
|
|
@@ -4017,15 +4031,15 @@ function ia() {
|
|
|
4017
4031
|
}
|
|
4018
4032
|
};
|
|
4019
4033
|
}
|
|
4020
|
-
function
|
|
4021
|
-
let { kv: t, keyPrefix: n =
|
|
4034
|
+
function ca(e) {
|
|
4035
|
+
let { kv: t, keyPrefix: n = aa, timeoutMs: r } = e;
|
|
4022
4036
|
return {
|
|
4023
|
-
proxyRoutes:
|
|
4037
|
+
proxyRoutes: sa(),
|
|
4024
4038
|
async resolveHost(e) {
|
|
4025
|
-
let i =
|
|
4026
|
-
return (r && r > 0 ? await
|
|
4039
|
+
let i = oa(n, e), a = t.get(i, "json");
|
|
4040
|
+
return (r && r > 0 ? await W(a, r, "kv.get") : await a) ?? null;
|
|
4027
4041
|
}
|
|
4028
4042
|
};
|
|
4029
4043
|
}
|
|
4030
4044
|
//#endregion
|
|
4031
|
-
export {
|
|
4045
|
+
export { aa as DEFAULT_KV_HOST_KEY_PREFIX, Ni as FORWARDED_HEADERS_HANDLER_TYPE, wr as HandlerRegistry, ta as PROXY_RESOLVE_HOST_SCOPE, Vr as basicAuthHandler, Zi as buildCacheAdapterKey, Ki as buildCacheApiKey, oa as buildKvHostKey, Mi as buildMatchFilter, Ur as cacheHandler, Z as compileHostApp, Rr as corsHandler, Xi as createCacheAdapterHostCache, Gi as createCacheApiHostCache, ra as createHttpProxyAdapter, G as createInMemoryHostCache, ca as createKvProxyAdapter, Bi as createProxyApp, Q as createProxyDataPlaneHandler, zi as createProxyDataPlaneRouter, ia as createServiceBindingFetch, $i as createStaticProxyAdapter, K as defineHandler, Ti as dispatchNamespaceHandler, $r as forwardedHeadersHandler, Ln as handlerConfigSchema, Hr as headersHandler, gi as httpHandler, ea as httpRoute, Qr as isCloudflareIp, In as matchSchema, ji as matchesAnyHost, Ai as matchesHost, z as proxyRouteInsertSchema, Rn as proxyRouteSchema, zn as proxyRouteUpdateSchema, Ei as redirectHandler, Oi as registerBuiltinHandlers, ri as rewriteCookiesHandler, ii as rewriteLocationHandler, bi as serviceBindingHandler, ki as sortRoutes, Di as staticHandler, Pi as withForwardedHeaders, X as withForwardedHeadersFor };
|