@authhero/proxy 0.11.12 → 0.11.13
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 +652 -639
- 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",
|
|
@@ -1369,86 +1369,86 @@ var D = e.enum([
|
|
|
1369
1369
|
"post-user-update",
|
|
1370
1370
|
"pre-user-deletion",
|
|
1371
1371
|
"post-user-deletion"
|
|
1372
|
-
]),
|
|
1373
|
-
|
|
1374
|
-
var
|
|
1372
|
+
]), M = e.enum(["post-user-login"]);
|
|
1373
|
+
O.options, k.options, A.options, j.options, M.options;
|
|
1374
|
+
var Lt = e.enum(["impersonate"]), Rt = e.enum([
|
|
1375
1375
|
"ensure-username",
|
|
1376
1376
|
"set-preferred-username",
|
|
1377
1377
|
"account-linking"
|
|
1378
|
-
]),
|
|
1378
|
+
]), N = {
|
|
1379
1379
|
enabled: e.boolean().default(!1),
|
|
1380
1380
|
synchronous: e.boolean().default(!1),
|
|
1381
1381
|
priority: e.number().optional(),
|
|
1382
1382
|
hook_id: e.string().optional(),
|
|
1383
1383
|
metadata: e.record(e.string(), e.unknown()).optional(),
|
|
1384
1384
|
...a
|
|
1385
|
-
},
|
|
1386
|
-
...
|
|
1387
|
-
trigger_id: D,
|
|
1388
|
-
url: e.string()
|
|
1389
|
-
}), Vt = e.object({
|
|
1390
|
-
...M,
|
|
1385
|
+
}, zt = e.object({
|
|
1386
|
+
...N,
|
|
1391
1387
|
trigger_id: O,
|
|
1392
|
-
|
|
1393
|
-
}),
|
|
1394
|
-
...
|
|
1388
|
+
url: e.string()
|
|
1389
|
+
}), Bt = e.object({
|
|
1390
|
+
...N,
|
|
1395
1391
|
trigger_id: k,
|
|
1396
|
-
|
|
1397
|
-
}),
|
|
1398
|
-
...
|
|
1392
|
+
form_id: e.string()
|
|
1393
|
+
}), Vt = e.object({
|
|
1394
|
+
...N,
|
|
1399
1395
|
trigger_id: A,
|
|
1400
|
-
|
|
1401
|
-
}),
|
|
1402
|
-
...
|
|
1396
|
+
template_id: Rt
|
|
1397
|
+
}), Ht = e.object({
|
|
1398
|
+
...N,
|
|
1403
1399
|
trigger_id: j,
|
|
1404
|
-
|
|
1400
|
+
code_id: e.string()
|
|
1401
|
+
}), Ut = e.object({
|
|
1402
|
+
...N,
|
|
1403
|
+
trigger_id: M,
|
|
1404
|
+
page_id: Lt,
|
|
1405
1405
|
permission_required: e.string().optional()
|
|
1406
1406
|
});
|
|
1407
1407
|
e.union([
|
|
1408
|
+
zt,
|
|
1408
1409
|
Bt,
|
|
1409
1410
|
Vt,
|
|
1410
1411
|
Ht,
|
|
1411
|
-
Ut
|
|
1412
|
-
Wt
|
|
1412
|
+
Ut
|
|
1413
1413
|
]);
|
|
1414
|
-
var
|
|
1415
|
-
...
|
|
1416
|
-
trigger_id:
|
|
1414
|
+
var Wt = e.object({
|
|
1415
|
+
...N,
|
|
1416
|
+
trigger_id: O
|
|
1417
1417
|
}).extend(n.shape).extend({
|
|
1418
1418
|
hook_id: e.string(),
|
|
1419
1419
|
url: e.string()
|
|
1420
|
-
}),
|
|
1421
|
-
...
|
|
1422
|
-
trigger_id:
|
|
1420
|
+
}), Gt = e.object({
|
|
1421
|
+
...N,
|
|
1422
|
+
trigger_id: k
|
|
1423
1423
|
}).extend(n.shape).extend({
|
|
1424
1424
|
hook_id: e.string(),
|
|
1425
1425
|
form_id: e.string()
|
|
1426
|
-
}),
|
|
1427
|
-
...
|
|
1428
|
-
trigger_id:
|
|
1426
|
+
}), Kt = e.object({
|
|
1427
|
+
...N,
|
|
1428
|
+
trigger_id: A
|
|
1429
1429
|
}).extend(n.shape).extend({
|
|
1430
1430
|
hook_id: e.string(),
|
|
1431
|
-
template_id:
|
|
1432
|
-
}),
|
|
1433
|
-
...
|
|
1434
|
-
trigger_id:
|
|
1431
|
+
template_id: Rt
|
|
1432
|
+
}), qt = e.object({
|
|
1433
|
+
...N,
|
|
1434
|
+
trigger_id: j
|
|
1435
1435
|
}).extend(n.shape).extend({
|
|
1436
1436
|
hook_id: e.string(),
|
|
1437
1437
|
code_id: e.string()
|
|
1438
|
-
}),
|
|
1439
|
-
...
|
|
1440
|
-
trigger_id:
|
|
1438
|
+
}), Jt = e.object({
|
|
1439
|
+
...N,
|
|
1440
|
+
trigger_id: M
|
|
1441
1441
|
}).extend(n.shape).extend({
|
|
1442
1442
|
hook_id: e.string(),
|
|
1443
|
-
page_id:
|
|
1443
|
+
page_id: Lt,
|
|
1444
1444
|
permission_required: e.string().optional()
|
|
1445
1445
|
});
|
|
1446
1446
|
e.union([
|
|
1447
|
+
Wt,
|
|
1447
1448
|
Gt,
|
|
1448
1449
|
Kt,
|
|
1449
1450
|
qt,
|
|
1450
|
-
Jt
|
|
1451
|
-
Yt
|
|
1451
|
+
Jt
|
|
1452
1452
|
]), e.object({
|
|
1453
1453
|
code: e.string().max(1e5),
|
|
1454
1454
|
secrets: e.record(e.string(), e.string()).optional()
|
|
@@ -1456,11 +1456,11 @@ e.union([
|
|
|
1456
1456
|
id: e.string(),
|
|
1457
1457
|
tenant_id: e.string()
|
|
1458
1458
|
}).extend(n.shape);
|
|
1459
|
-
var
|
|
1459
|
+
var Yt = e.object({ name: e.string().optional() }), Xt = e.object({ email: e.string().optional() }), Zt = e.object({
|
|
1460
1460
|
id: e.string().optional(),
|
|
1461
1461
|
organization_id: e.string().max(50),
|
|
1462
|
-
inviter:
|
|
1463
|
-
invitee:
|
|
1462
|
+
inviter: Yt,
|
|
1463
|
+
invitee: Xt,
|
|
1464
1464
|
invitation_url: e.string().url(),
|
|
1465
1465
|
client_id: e.string(),
|
|
1466
1466
|
connection_id: e.string().optional(),
|
|
@@ -1476,8 +1476,8 @@ e.object({
|
|
|
1476
1476
|
created_at: e.string().datetime(),
|
|
1477
1477
|
expires_at: e.string().datetime(),
|
|
1478
1478
|
ticket_id: e.string().optional()
|
|
1479
|
-
}).extend(
|
|
1480
|
-
var
|
|
1479
|
+
}).extend(Zt.omit({ id: !0 }).shape);
|
|
1480
|
+
var Qt = e.object({
|
|
1481
1481
|
alg: e.enum([
|
|
1482
1482
|
"RS256",
|
|
1483
1483
|
"RS384",
|
|
@@ -1519,7 +1519,7 @@ var $t = e.object({
|
|
|
1519
1519
|
path: [r],
|
|
1520
1520
|
message: `EC JWK is missing required member '${r}'`
|
|
1521
1521
|
});
|
|
1522
|
-
}),
|
|
1522
|
+
}), $t = e.object({ keys: e.array(Qt) });
|
|
1523
1523
|
e.object({
|
|
1524
1524
|
issuer: e.string(),
|
|
1525
1525
|
authorization_endpoint: e.string(),
|
|
@@ -1548,35 +1548,35 @@ e.object({
|
|
|
1548
1548
|
backchannel_logout_supported: e.boolean().optional(),
|
|
1549
1549
|
backchannel_logout_session_supported: e.boolean().optional()
|
|
1550
1550
|
});
|
|
1551
|
-
var
|
|
1551
|
+
var en = /* @__PURE__ */ function(e) {
|
|
1552
1552
|
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
|
-
}({}),
|
|
1553
|
+
}({}), tn = e.nativeEnum(en), nn = e.object({
|
|
1554
1554
|
strategy: e.string(),
|
|
1555
1555
|
strategy_type: e.string()
|
|
1556
1556
|
});
|
|
1557
1557
|
e.object({
|
|
1558
1558
|
csrf_token: e.string(),
|
|
1559
1559
|
auth0Client: e.string().optional(),
|
|
1560
|
-
authParams:
|
|
1560
|
+
authParams: Ue,
|
|
1561
1561
|
expires_at: e.string(),
|
|
1562
1562
|
deleted_at: e.string().optional(),
|
|
1563
1563
|
ip: e.string().optional(),
|
|
1564
1564
|
useragent: e.string().optional(),
|
|
1565
1565
|
session_id: e.string().optional(),
|
|
1566
1566
|
authorization_url: e.string().optional(),
|
|
1567
|
-
state:
|
|
1567
|
+
state: tn.optional().default("pending"),
|
|
1568
1568
|
state_data: e.string().optional(),
|
|
1569
1569
|
failure_reason: e.string().optional(),
|
|
1570
1570
|
user_id: e.string().optional(),
|
|
1571
1571
|
auth_connection: e.string().optional(),
|
|
1572
|
-
auth_strategy:
|
|
1572
|
+
auth_strategy: nn.optional(),
|
|
1573
1573
|
authenticated_at: e.string().optional()
|
|
1574
1574
|
}).openapi({ description: "This represents a login sesion" }).extend({
|
|
1575
1575
|
id: e.string().openapi({ description: "This is is used as the state in the universal login" }),
|
|
1576
1576
|
created_at: e.string(),
|
|
1577
1577
|
updated_at: e.string()
|
|
1578
1578
|
});
|
|
1579
|
-
var
|
|
1579
|
+
var P = {
|
|
1580
1580
|
ACLS_SUMMARY: "acls_summary",
|
|
1581
1581
|
ACTIONS_EXECUTION_FAILED: "actions_execution_failed",
|
|
1582
1582
|
API_LIMIT: "api_limit",
|
|
@@ -1738,17 +1738,17 @@ var N = {
|
|
|
1738
1738
|
WARNING_DURING_LOGIN: "w",
|
|
1739
1739
|
WARNING_SENDING_NOTIFICATION: "wn",
|
|
1740
1740
|
WARNING_USER_MANAGEMENT: "wum"
|
|
1741
|
-
},
|
|
1742
|
-
|
|
1741
|
+
}, rn = e.string().refine((e) => Object.values(P).includes(e), { message: "Invalid log type" });
|
|
1742
|
+
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
1743
|
let e = {};
|
|
1744
|
-
for (let [t, n] of Object.entries(
|
|
1744
|
+
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
1745
|
return e;
|
|
1746
1746
|
})();
|
|
1747
|
-
var
|
|
1747
|
+
var an = e.object({
|
|
1748
1748
|
name: e.string(),
|
|
1749
1749
|
version: e.string(),
|
|
1750
1750
|
env: e.object({ node: e.string().optional() }).optional()
|
|
1751
|
-
}),
|
|
1751
|
+
}), on = e.object({
|
|
1752
1752
|
country_code: e.string().length(2),
|
|
1753
1753
|
city_name: e.string(),
|
|
1754
1754
|
latitude: e.string(),
|
|
@@ -1757,7 +1757,7 @@ var on = e.object({
|
|
|
1757
1757
|
continent_code: e.string()
|
|
1758
1758
|
});
|
|
1759
1759
|
e.object({
|
|
1760
|
-
type:
|
|
1760
|
+
type: rn,
|
|
1761
1761
|
date: e.string(),
|
|
1762
1762
|
description: e.string().optional(),
|
|
1763
1763
|
ip: e.string().optional(),
|
|
@@ -1775,63 +1775,63 @@ e.object({
|
|
|
1775
1775
|
strategy: e.string().optional(),
|
|
1776
1776
|
strategy_type: e.string().optional(),
|
|
1777
1777
|
hostname: e.string().optional(),
|
|
1778
|
-
auth0_client:
|
|
1778
|
+
auth0_client: an.optional(),
|
|
1779
1779
|
log_id: e.string().optional(),
|
|
1780
|
-
location_info:
|
|
1780
|
+
location_info: on.optional()
|
|
1781
1781
|
}).extend({ log_id: e.string() });
|
|
1782
|
-
var
|
|
1782
|
+
var sn = e.enum([
|
|
1783
1783
|
"http",
|
|
1784
1784
|
"eventbridge",
|
|
1785
1785
|
"eventgrid",
|
|
1786
1786
|
"splunk",
|
|
1787
1787
|
"datadog",
|
|
1788
1788
|
"sumo"
|
|
1789
|
-
]),
|
|
1789
|
+
]), cn = e.enum([
|
|
1790
1790
|
"active",
|
|
1791
1791
|
"paused",
|
|
1792
1792
|
"suspended"
|
|
1793
|
-
]),
|
|
1793
|
+
]), ln = e.object({
|
|
1794
1794
|
type: e.string(),
|
|
1795
1795
|
name: e.string()
|
|
1796
1796
|
});
|
|
1797
1797
|
e.object({
|
|
1798
1798
|
name: e.string(),
|
|
1799
|
-
type:
|
|
1800
|
-
status:
|
|
1799
|
+
type: sn,
|
|
1800
|
+
status: cn.optional(),
|
|
1801
1801
|
sink: e.record(e.string(), e.unknown()),
|
|
1802
|
-
filters: e.array(
|
|
1802
|
+
filters: e.array(ln).optional(),
|
|
1803
1803
|
isPriority: e.boolean().optional()
|
|
1804
1804
|
}).extend({
|
|
1805
1805
|
id: e.string(),
|
|
1806
|
-
status:
|
|
1806
|
+
status: cn,
|
|
1807
1807
|
created_at: e.string().optional(),
|
|
1808
1808
|
updated_at: e.string().optional()
|
|
1809
1809
|
});
|
|
1810
|
-
var
|
|
1810
|
+
var un = e.enum([
|
|
1811
1811
|
"auth0",
|
|
1812
1812
|
"cognito",
|
|
1813
1813
|
"okta",
|
|
1814
1814
|
"oidc"
|
|
1815
|
-
]),
|
|
1815
|
+
]), dn = e.object({
|
|
1816
1816
|
domain: e.string(),
|
|
1817
1817
|
client_id: e.string(),
|
|
1818
1818
|
client_secret: e.string(),
|
|
1819
1819
|
audience: e.string().optional(),
|
|
1820
1820
|
scope: e.string().optional()
|
|
1821
|
-
}),
|
|
1821
|
+
}), fn = e.object({
|
|
1822
1822
|
id: e.string().optional(),
|
|
1823
1823
|
name: e.string(),
|
|
1824
|
-
provider:
|
|
1824
|
+
provider: un,
|
|
1825
1825
|
connection: e.string(),
|
|
1826
1826
|
enabled: e.boolean().default(!0),
|
|
1827
|
-
credentials:
|
|
1827
|
+
credentials: dn
|
|
1828
1828
|
});
|
|
1829
1829
|
e.object({
|
|
1830
1830
|
id: e.string(),
|
|
1831
1831
|
created_at: e.string(),
|
|
1832
1832
|
updated_at: e.string()
|
|
1833
|
-
}).extend(
|
|
1834
|
-
var
|
|
1833
|
+
}).extend(fn.shape);
|
|
1834
|
+
var pn = e.object({
|
|
1835
1835
|
enabled: e.boolean().optional(),
|
|
1836
1836
|
shields: e.array(e.string()).optional(),
|
|
1837
1837
|
admin_notification_frequency: e.array(e.string()).optional(),
|
|
@@ -1840,13 +1840,13 @@ var mn = e.object({
|
|
|
1840
1840
|
"pre-user-registration": e.object({ shields: e.array(e.string()).optional() }).optional(),
|
|
1841
1841
|
"pre-change-password": e.object({ shields: e.array(e.string()).optional() }).optional()
|
|
1842
1842
|
}).optional()
|
|
1843
|
-
}),
|
|
1843
|
+
}), mn = e.object({
|
|
1844
1844
|
enabled: e.boolean().optional(),
|
|
1845
1845
|
shields: e.array(e.string()).optional(),
|
|
1846
1846
|
allowlist: e.array(e.string()).optional(),
|
|
1847
1847
|
mode: e.string().optional(),
|
|
1848
1848
|
max_attempts: e.number().optional()
|
|
1849
|
-
}),
|
|
1849
|
+
}), hn = e.object({
|
|
1850
1850
|
enabled: e.boolean().optional(),
|
|
1851
1851
|
shields: e.array(e.string()).optional(),
|
|
1852
1852
|
allowlist: e.array(e.string()).optional(),
|
|
@@ -1860,10 +1860,10 @@ var mn = e.object({
|
|
|
1860
1860
|
rate: e.number().optional()
|
|
1861
1861
|
}).optional()
|
|
1862
1862
|
}).optional()
|
|
1863
|
-
}),
|
|
1864
|
-
breached_password_detection:
|
|
1865
|
-
brute_force_protection:
|
|
1866
|
-
suspicious_ip_throttling:
|
|
1863
|
+
}), gn = e.object({
|
|
1864
|
+
breached_password_detection: pn.optional(),
|
|
1865
|
+
brute_force_protection: mn.optional(),
|
|
1866
|
+
suspicious_ip_throttling: hn.optional()
|
|
1867
1867
|
});
|
|
1868
1868
|
e.object({
|
|
1869
1869
|
id: e.string().optional(),
|
|
@@ -1876,14 +1876,18 @@ e.object({
|
|
|
1876
1876
|
created_at: e.string(),
|
|
1877
1877
|
updated_at: e.string()
|
|
1878
1878
|
});
|
|
1879
|
-
var
|
|
1879
|
+
var _n = e.object({
|
|
1880
1880
|
initial_user_agent: e.string().describe("First user agent of the device from which this user logged in"),
|
|
1881
1881
|
initial_ip: e.string().describe("First IP address associated with this session"),
|
|
1882
1882
|
initial_asn: e.string().describe("First autonomous system number associated with this session"),
|
|
1883
1883
|
last_user_agent: e.string().describe("Last user agent of the device from which this user logged in"),
|
|
1884
1884
|
last_ip: e.string().describe("Last IP address from which this user logged in"),
|
|
1885
1885
|
last_asn: e.string().describe("Last autonomous system number from which this user logged in")
|
|
1886
|
-
}),
|
|
1886
|
+
}), vn = e.object({
|
|
1887
|
+
name: e.string().describe("Authentication method name, e.g. \"mfa\" for a completed second factor"),
|
|
1888
|
+
timestamp: e.string().describe("When the method was completed (ISO 8601)"),
|
|
1889
|
+
type: e.string().optional().describe("For \"mfa\": the authentication method type used, e.g. \"totp\", \"phone\", \"passkey\"")
|
|
1890
|
+
}), yn = e.object({ methods: e.array(vn) }), bn = e.object({
|
|
1887
1891
|
id: e.string(),
|
|
1888
1892
|
revoked_at: e.string().optional(),
|
|
1889
1893
|
used_at: e.string().optional(),
|
|
@@ -1891,15 +1895,16 @@ var vn = e.object({
|
|
|
1891
1895
|
expires_at: e.string().optional(),
|
|
1892
1896
|
login_session_id: e.string(),
|
|
1893
1897
|
idle_expires_at: e.string().optional(),
|
|
1894
|
-
device:
|
|
1895
|
-
clients: e.array(e.string()).describe("List of client details for the session")
|
|
1898
|
+
device: _n.describe("Metadata related to the device used in the session"),
|
|
1899
|
+
clients: e.array(e.string()).describe("List of client details for the session"),
|
|
1900
|
+
authentication: yn.optional().describe("Authentication methods completed in this session (currently MFA only)")
|
|
1896
1901
|
});
|
|
1897
1902
|
e.object({
|
|
1898
1903
|
created_at: e.string(),
|
|
1899
1904
|
updated_at: e.string(),
|
|
1900
1905
|
authenticated_at: e.string(),
|
|
1901
1906
|
last_interaction_at: e.string()
|
|
1902
|
-
}).extend(
|
|
1907
|
+
}).extend(bn.shape), e.object({
|
|
1903
1908
|
kid: e.string().openapi({ description: "The key id of the signing key" }),
|
|
1904
1909
|
tenant_id: e.string().optional().openapi({ description: "The tenant the key belongs to. Omitted means the key is shared / control-plane scoped." }),
|
|
1905
1910
|
cert: e.string().openapi({ description: "The public certificate of the signing key" }),
|
|
@@ -1916,7 +1921,93 @@ e.object({
|
|
|
1916
1921
|
connection: e.string().optional().openapi({ description: "The connection identifier associated with the key" }),
|
|
1917
1922
|
type: e.enum(["jwt_signing", "saml_encryption"]).openapi({ description: "The type of the signing key" })
|
|
1918
1923
|
});
|
|
1919
|
-
var
|
|
1924
|
+
var F = e.enum([
|
|
1925
|
+
"never",
|
|
1926
|
+
"always",
|
|
1927
|
+
"all-applications",
|
|
1928
|
+
"confidence-score"
|
|
1929
|
+
]);
|
|
1930
|
+
e.object({
|
|
1931
|
+
idle_session_lifetime: e.number().default(72),
|
|
1932
|
+
session_lifetime: e.number().default(168),
|
|
1933
|
+
session_cookie: e.object({ mode: e.enum(["persistent", "non-persistent"]).optional() }).optional(),
|
|
1934
|
+
enable_client_connections: e.boolean().optional(),
|
|
1935
|
+
default_redirection_uri: e.string().optional(),
|
|
1936
|
+
enabled_locales: e.array(e.string()).optional(),
|
|
1937
|
+
default_directory: e.string().optional(),
|
|
1938
|
+
error_page: e.object({
|
|
1939
|
+
html: e.string().optional(),
|
|
1940
|
+
show_log_link: e.boolean().optional(),
|
|
1941
|
+
url: e.string().optional()
|
|
1942
|
+
}).optional(),
|
|
1943
|
+
flags: e.object({
|
|
1944
|
+
allow_legacy_delegation_grant_types: e.boolean().optional(),
|
|
1945
|
+
allow_legacy_ro_grant_types: e.boolean().optional(),
|
|
1946
|
+
allow_legacy_tokeninfo_endpoint: e.boolean().optional(),
|
|
1947
|
+
disable_clickjack_protection_headers: e.boolean().optional(),
|
|
1948
|
+
enable_apis_section: e.boolean().optional(),
|
|
1949
|
+
enable_client_connections: e.boolean().optional(),
|
|
1950
|
+
enable_custom_domain_in_emails: e.boolean().optional(),
|
|
1951
|
+
enable_dynamic_client_registration: e.boolean().optional(),
|
|
1952
|
+
enable_idtoken_api2: e.boolean().optional(),
|
|
1953
|
+
enable_legacy_logs_search_v2: e.boolean().optional(),
|
|
1954
|
+
enable_legacy_profile: e.boolean().optional(),
|
|
1955
|
+
enable_pipeline2: e.boolean().optional(),
|
|
1956
|
+
enable_public_signup_user_exists_error: e.boolean().optional(),
|
|
1957
|
+
use_scope_descriptions_for_consent: e.boolean().optional(),
|
|
1958
|
+
disable_management_api_sms_obfuscation: e.boolean().optional(),
|
|
1959
|
+
enable_adfs_waad_email_verification: e.boolean().optional(),
|
|
1960
|
+
revoke_refresh_token_grant: e.boolean().optional(),
|
|
1961
|
+
dashboard_log_streams_next: e.boolean().optional(),
|
|
1962
|
+
dashboard_insights_view: e.boolean().optional(),
|
|
1963
|
+
disable_fields_map_fix: e.boolean().optional(),
|
|
1964
|
+
mfa_show_factor_list_on_enrollment: e.boolean().optional()
|
|
1965
|
+
}).optional(),
|
|
1966
|
+
friendly_name: e.string().optional(),
|
|
1967
|
+
picture_url: e.string().optional(),
|
|
1968
|
+
support_email: e.string().optional(),
|
|
1969
|
+
support_url: e.string().optional(),
|
|
1970
|
+
sandbox_version: e.string().optional(),
|
|
1971
|
+
sandbox_versions_available: e.array(e.string()).optional(),
|
|
1972
|
+
change_password: e.object({
|
|
1973
|
+
enabled: e.boolean(),
|
|
1974
|
+
html: e.string()
|
|
1975
|
+
}).optional(),
|
|
1976
|
+
guardian_mfa_page: e.object({
|
|
1977
|
+
enabled: e.boolean(),
|
|
1978
|
+
html: e.string()
|
|
1979
|
+
}).optional(),
|
|
1980
|
+
default_audience: e.string().optional(),
|
|
1981
|
+
default_organization: e.string().optional(),
|
|
1982
|
+
sessions: e.object({ oidc_logout_prompt_enabled: e.boolean().optional() }).optional(),
|
|
1983
|
+
mfa: e.object({
|
|
1984
|
+
policy: F.default("never").optional(),
|
|
1985
|
+
factors: e.object({
|
|
1986
|
+
sms: e.boolean().default(!1),
|
|
1987
|
+
otp: e.boolean().default(!1),
|
|
1988
|
+
email: e.boolean().default(!1),
|
|
1989
|
+
push_notification: e.boolean().default(!1),
|
|
1990
|
+
webauthn_roaming: e.boolean().default(!1),
|
|
1991
|
+
webauthn_platform: e.boolean().default(!1),
|
|
1992
|
+
recovery_code: e.boolean().default(!1),
|
|
1993
|
+
duo: e.boolean().default(!1)
|
|
1994
|
+
}).optional(),
|
|
1995
|
+
sms_provider: e.object({ provider: e.enum([
|
|
1996
|
+
"twilio",
|
|
1997
|
+
"vonage",
|
|
1998
|
+
"aws_sns",
|
|
1999
|
+
"phone_message_hook"
|
|
2000
|
+
]).optional() }).optional(),
|
|
2001
|
+
twilio: e.object({
|
|
2002
|
+
sid: e.string().optional(),
|
|
2003
|
+
auth_token: e.string().optional(),
|
|
2004
|
+
from: e.string().optional(),
|
|
2005
|
+
messaging_service_sid: e.string().optional()
|
|
2006
|
+
}).optional(),
|
|
2007
|
+
phone_message: e.object({ message: e.string().optional() }).optional()
|
|
2008
|
+
}).optional()
|
|
2009
|
+
});
|
|
2010
|
+
var I = e.object({
|
|
1920
2011
|
id: e.string().optional(),
|
|
1921
2012
|
parent_tenant_id: e.string().nullish(),
|
|
1922
2013
|
config_sync: e.enum([
|
|
@@ -2042,9 +2133,9 @@ var P = e.object({
|
|
|
2042
2133
|
"shared_planetscale"
|
|
2043
2134
|
]).optional(),
|
|
2044
2135
|
d1_database_id: e.string().max(64).optional(),
|
|
2045
|
-
attack_protection:
|
|
2136
|
+
attack_protection: gn.optional(),
|
|
2046
2137
|
mfa: e.object({
|
|
2047
|
-
policy:
|
|
2138
|
+
policy: F.default("never").optional(),
|
|
2048
2139
|
factors: e.object({
|
|
2049
2140
|
sms: e.boolean().default(!1),
|
|
2050
2141
|
otp: e.boolean().default(!1),
|
|
@@ -2073,14 +2164,14 @@ var P = e.object({
|
|
|
2073
2164
|
e.object({
|
|
2074
2165
|
created_at: e.string().nullable().transform((e) => e ?? ""),
|
|
2075
2166
|
updated_at: e.string().nullable().transform((e) => e ?? "")
|
|
2076
|
-
}).extend(
|
|
2167
|
+
}).extend(I.shape).extend({
|
|
2077
2168
|
id: e.string(),
|
|
2078
2169
|
is_control_plane: e.boolean().optional(),
|
|
2079
2170
|
has_children: e.boolean().optional()
|
|
2080
2171
|
});
|
|
2081
|
-
var
|
|
2082
|
-
...
|
|
2083
|
-
policy:
|
|
2172
|
+
var xn = I.shape.mfa.unwrap().shape, Sn = e.object({
|
|
2173
|
+
...xn,
|
|
2174
|
+
policy: F.optional(),
|
|
2084
2175
|
factors: e.object({
|
|
2085
2176
|
sms: e.boolean().optional(),
|
|
2086
2177
|
otp: e.boolean().optional(),
|
|
@@ -2092,16 +2183,16 @@ var bn = P.shape.mfa.unwrap().shape, xn = e.object({
|
|
|
2092
2183
|
duo: e.boolean().optional()
|
|
2093
2184
|
}).optional()
|
|
2094
2185
|
});
|
|
2095
|
-
e.object(
|
|
2186
|
+
e.object(I.shape).extend({
|
|
2096
2187
|
deployment_type: e.enum(["shared", "wfp"]),
|
|
2097
2188
|
provisioning_state: e.enum([
|
|
2098
2189
|
"pending",
|
|
2099
2190
|
"ready",
|
|
2100
2191
|
"failed"
|
|
2101
2192
|
]),
|
|
2102
|
-
mfa:
|
|
2193
|
+
mfa: Sn
|
|
2103
2194
|
}).partial();
|
|
2104
|
-
var
|
|
2195
|
+
var Cn = e.enum([
|
|
2105
2196
|
"provision",
|
|
2106
2197
|
"seed",
|
|
2107
2198
|
"upgrade",
|
|
@@ -2111,18 +2202,18 @@ var Sn = e.enum([
|
|
|
2111
2202
|
"sync-defaults",
|
|
2112
2203
|
"detach",
|
|
2113
2204
|
"tenant-members-request"
|
|
2114
|
-
]),
|
|
2205
|
+
]), wn = e.enum([
|
|
2115
2206
|
"pending",
|
|
2116
2207
|
"running",
|
|
2117
2208
|
"succeeded",
|
|
2118
2209
|
"failed",
|
|
2119
2210
|
"cancelled"
|
|
2120
|
-
]),
|
|
2211
|
+
]), Tn = e.string().max(64);
|
|
2121
2212
|
e.object({
|
|
2122
2213
|
tenant_id: e.string().max(255).nullable().default(null),
|
|
2123
2214
|
rollout_id: e.string().max(255).nullable().optional(),
|
|
2124
|
-
kind:
|
|
2125
|
-
engine:
|
|
2215
|
+
kind: Cn,
|
|
2216
|
+
engine: Tn,
|
|
2126
2217
|
engine_instance_id: e.string().max(100).nullable().optional(),
|
|
2127
2218
|
target_worker_version: e.string().max(255).nullable().optional(),
|
|
2128
2219
|
target_database_version: e.string().max(255).nullable().optional(),
|
|
@@ -2130,7 +2221,7 @@ e.object({
|
|
|
2130
2221
|
input: e.record(e.string(), e.unknown()).nullable().optional()
|
|
2131
2222
|
}).extend({
|
|
2132
2223
|
id: e.string(),
|
|
2133
|
-
status:
|
|
2224
|
+
status: wn,
|
|
2134
2225
|
current_step: e.string().max(255).nullable().optional(),
|
|
2135
2226
|
error: e.string().nullable().optional(),
|
|
2136
2227
|
result: e.record(e.string(), e.unknown()).nullable().optional(),
|
|
@@ -2151,7 +2242,7 @@ e.object({
|
|
|
2151
2242
|
claim_expires_at: !0,
|
|
2152
2243
|
finished_at: !0
|
|
2153
2244
|
}).partial();
|
|
2154
|
-
var
|
|
2245
|
+
var En = e.enum([
|
|
2155
2246
|
"started",
|
|
2156
2247
|
"succeeded",
|
|
2157
2248
|
"failed",
|
|
@@ -2162,14 +2253,14 @@ var Tn = e.enum([
|
|
|
2162
2253
|
e.object({
|
|
2163
2254
|
operation_id: e.string().max(255),
|
|
2164
2255
|
step: e.string().max(255),
|
|
2165
|
-
outcome:
|
|
2256
|
+
outcome: En,
|
|
2166
2257
|
detail: e.record(e.string(), e.unknown()).nullable().optional(),
|
|
2167
2258
|
attempt: e.number().int().min(1).default(1)
|
|
2168
2259
|
}).extend({
|
|
2169
2260
|
id: e.string(),
|
|
2170
2261
|
created_at: e.string()
|
|
2171
2262
|
});
|
|
2172
|
-
var
|
|
2263
|
+
var L = e.enum([
|
|
2173
2264
|
"pending",
|
|
2174
2265
|
"inserted",
|
|
2175
2266
|
"updated",
|
|
@@ -2180,29 +2271,29 @@ e.object({
|
|
|
2180
2271
|
operation_id: e.string().max(255),
|
|
2181
2272
|
seq: e.number().int().min(0),
|
|
2182
2273
|
payload: e.record(e.string(), e.unknown()),
|
|
2183
|
-
status:
|
|
2274
|
+
status: L.default("pending"),
|
|
2184
2275
|
error_code: e.string().max(64).nullable().optional(),
|
|
2185
2276
|
error_message: e.string().nullable().optional(),
|
|
2186
2277
|
error_path: e.string().max(255).nullable().optional(),
|
|
2187
2278
|
entity_id: e.string().max(255).nullable().optional()
|
|
2188
2279
|
}).extend({
|
|
2189
|
-
status:
|
|
2280
|
+
status: L,
|
|
2190
2281
|
created_at: e.string(),
|
|
2191
2282
|
updated_at: e.string()
|
|
2192
2283
|
}), e.object({
|
|
2193
2284
|
seq: e.number().int().min(0),
|
|
2194
|
-
status:
|
|
2285
|
+
status: L,
|
|
2195
2286
|
error_code: e.string().max(64).nullable().optional(),
|
|
2196
2287
|
error_message: e.string().nullable().optional(),
|
|
2197
2288
|
error_path: e.string().max(255).nullable().optional(),
|
|
2198
2289
|
entity_id: e.string().max(255).nullable().optional()
|
|
2199
2290
|
});
|
|
2200
|
-
var
|
|
2291
|
+
var Dn = e.enum([
|
|
2201
2292
|
"upgrade",
|
|
2202
2293
|
"reseed",
|
|
2203
2294
|
"backup",
|
|
2204
2295
|
"config-sync"
|
|
2205
|
-
]),
|
|
2296
|
+
]), On = e.enum([
|
|
2206
2297
|
"pending",
|
|
2207
2298
|
"canary",
|
|
2208
2299
|
"rolling",
|
|
@@ -2211,7 +2302,7 @@ var En = e.enum([
|
|
|
2211
2302
|
"failed"
|
|
2212
2303
|
]);
|
|
2213
2304
|
e.object({
|
|
2214
|
-
kind:
|
|
2305
|
+
kind: Dn,
|
|
2215
2306
|
target_worker_version: e.string().max(255).nullable().optional(),
|
|
2216
2307
|
target_database_version: e.string().max(255).nullable().optional(),
|
|
2217
2308
|
wave_size: e.number().int().min(1).default(10),
|
|
@@ -2221,7 +2312,7 @@ e.object({
|
|
|
2221
2312
|
config: e.record(e.string(), e.unknown()).nullable().optional()
|
|
2222
2313
|
}).extend({
|
|
2223
2314
|
id: e.string(),
|
|
2224
|
-
status:
|
|
2315
|
+
status: On,
|
|
2225
2316
|
created_at: e.string(),
|
|
2226
2317
|
updated_at: e.string(),
|
|
2227
2318
|
finished_at: e.string().nullable().optional(),
|
|
@@ -2235,26 +2326,26 @@ e.object({
|
|
|
2235
2326
|
paused_reason: !0,
|
|
2236
2327
|
finished_at: !0
|
|
2237
2328
|
}).partial();
|
|
2238
|
-
var
|
|
2329
|
+
var kn = e.enum([
|
|
2239
2330
|
"invite",
|
|
2240
2331
|
"add_members",
|
|
2241
2332
|
"remove_members",
|
|
2242
2333
|
"assign_roles",
|
|
2243
2334
|
"remove_roles",
|
|
2244
2335
|
"revoke_invitation"
|
|
2245
|
-
]),
|
|
2336
|
+
]), An = e.enum([
|
|
2246
2337
|
"pending",
|
|
2247
2338
|
"succeeded",
|
|
2248
2339
|
"failed"
|
|
2249
2340
|
]);
|
|
2250
2341
|
e.object({
|
|
2251
|
-
kind:
|
|
2342
|
+
kind: kn,
|
|
2252
2343
|
requested_by: e.string().min(1).max(255),
|
|
2253
2344
|
payload: e.record(e.string(), e.unknown())
|
|
2254
2345
|
}).extend({
|
|
2255
2346
|
id: e.string(),
|
|
2256
2347
|
tenant_id: e.string(),
|
|
2257
|
-
status:
|
|
2348
|
+
status: An,
|
|
2258
2349
|
result: e.record(e.string(), e.unknown()).nullable().optional(),
|
|
2259
2350
|
error: e.string().nullable().optional(),
|
|
2260
2351
|
notified_at: e.string().nullable().optional(),
|
|
@@ -2262,7 +2353,7 @@ e.object({
|
|
|
2262
2353
|
updated_at: e.string(),
|
|
2263
2354
|
finished_at: e.string().nullable().optional()
|
|
2264
2355
|
}), e.object({
|
|
2265
|
-
status:
|
|
2356
|
+
status: An.optional(),
|
|
2266
2357
|
result: e.record(e.string(), e.unknown()).nullable().optional(),
|
|
2267
2358
|
error: e.string().nullable().optional(),
|
|
2268
2359
|
notified_at: e.string().nullable().optional(),
|
|
@@ -2279,7 +2370,7 @@ e.object({
|
|
|
2279
2370
|
code: e.string(),
|
|
2280
2371
|
state: e.string().optional()
|
|
2281
2372
|
});
|
|
2282
|
-
var
|
|
2373
|
+
var jn = e.object({
|
|
2283
2374
|
button_border_radius: e.number(),
|
|
2284
2375
|
button_border_weight: e.number(),
|
|
2285
2376
|
buttons_style: e.enum([
|
|
@@ -2297,7 +2388,7 @@ var An = e.object({
|
|
|
2297
2388
|
show_widget_shadow: e.boolean(),
|
|
2298
2389
|
widget_border_weight: e.number(),
|
|
2299
2390
|
widget_corner_radius: e.number()
|
|
2300
|
-
}),
|
|
2391
|
+
}), Mn = e.object({
|
|
2301
2392
|
base_focus_color: e.string(),
|
|
2302
2393
|
base_hover_color: e.string(),
|
|
2303
2394
|
body_text: e.string(),
|
|
@@ -2321,20 +2412,20 @@ var An = e.object({
|
|
|
2321
2412
|
success: e.string(),
|
|
2322
2413
|
widget_background: e.string(),
|
|
2323
2414
|
widget_border: e.string()
|
|
2324
|
-
}),
|
|
2415
|
+
}), R = e.object({
|
|
2325
2416
|
bold: e.boolean(),
|
|
2326
2417
|
size: e.number()
|
|
2327
|
-
}),
|
|
2328
|
-
body_text:
|
|
2329
|
-
buttons_text:
|
|
2418
|
+
}), Nn = e.object({
|
|
2419
|
+
body_text: R,
|
|
2420
|
+
buttons_text: R,
|
|
2330
2421
|
font_url: e.string(),
|
|
2331
|
-
input_labels:
|
|
2332
|
-
links:
|
|
2422
|
+
input_labels: R,
|
|
2423
|
+
links: R,
|
|
2333
2424
|
links_style: e.enum(["normal", "underlined"]),
|
|
2334
2425
|
reference_text_size: e.number(),
|
|
2335
|
-
subtitle:
|
|
2336
|
-
title:
|
|
2337
|
-
}),
|
|
2426
|
+
subtitle: R,
|
|
2427
|
+
title: R
|
|
2428
|
+
}), Pn = e.object({
|
|
2338
2429
|
background_color: e.string(),
|
|
2339
2430
|
background_image_url: e.string(),
|
|
2340
2431
|
page_layout: e.enum([
|
|
@@ -2347,7 +2438,7 @@ var An = e.object({
|
|
|
2347
2438
|
"chip",
|
|
2348
2439
|
"none"
|
|
2349
2440
|
]).optional()
|
|
2350
|
-
}),
|
|
2441
|
+
}), Fn = e.object({
|
|
2351
2442
|
header_text_alignment: e.enum([
|
|
2352
2443
|
"center",
|
|
2353
2444
|
"left",
|
|
@@ -2364,12 +2455,12 @@ var An = e.object({
|
|
|
2364
2455
|
social_buttons_layout: e.enum(["bottom", "top"])
|
|
2365
2456
|
});
|
|
2366
2457
|
e.object({
|
|
2367
|
-
borders:
|
|
2368
|
-
colors:
|
|
2458
|
+
borders: jn,
|
|
2459
|
+
colors: Mn,
|
|
2369
2460
|
displayName: e.string(),
|
|
2370
|
-
fonts:
|
|
2371
|
-
page_background:
|
|
2372
|
-
widget:
|
|
2461
|
+
fonts: Nn,
|
|
2462
|
+
page_background: Pn,
|
|
2463
|
+
widget: Fn
|
|
2373
2464
|
}).extend({ themeId: e.string() }), e.object({
|
|
2374
2465
|
...a,
|
|
2375
2466
|
universal_login_experience: e.enum(["new", "classic"]).default("new"),
|
|
@@ -2378,30 +2469,30 @@ e.object({
|
|
|
2378
2469
|
show_last_used_connection: e.boolean().default(!1),
|
|
2379
2470
|
webauthn_platform_first_factor: e.boolean()
|
|
2380
2471
|
});
|
|
2381
|
-
var
|
|
2472
|
+
var In = e.object({
|
|
2382
2473
|
hosts: e.array(e.string()).optional(),
|
|
2383
2474
|
methods: e.array(e.string()).optional(),
|
|
2384
2475
|
path: e.string().default("/*"),
|
|
2385
2476
|
headers: e.record(e.string(), e.string()).optional(),
|
|
2386
2477
|
query: e.record(e.string(), e.string()).optional()
|
|
2387
|
-
}),
|
|
2478
|
+
}), Ln = e.object({
|
|
2388
2479
|
type: e.string(),
|
|
2389
2480
|
options: e.record(e.string(), e.unknown()).default({})
|
|
2390
|
-
}),
|
|
2481
|
+
}), z = e.object({
|
|
2391
2482
|
id: e.string().optional(),
|
|
2392
2483
|
custom_domain_id: e.string(),
|
|
2393
2484
|
priority: e.number().int().default(100),
|
|
2394
|
-
match:
|
|
2395
|
-
handlers: e.array(
|
|
2396
|
-
}),
|
|
2485
|
+
match: In,
|
|
2486
|
+
handlers: e.array(Ln).min(1)
|
|
2487
|
+
}), Rn = z.extend({
|
|
2397
2488
|
id: e.string(),
|
|
2398
2489
|
tenant_id: e.string(),
|
|
2399
2490
|
created_at: e.string(),
|
|
2400
2491
|
updated_at: e.string()
|
|
2401
|
-
}),
|
|
2492
|
+
}), zn = z.partial().omit({
|
|
2402
2493
|
id: !0,
|
|
2403
2494
|
custom_domain_id: !0
|
|
2404
|
-
}),
|
|
2495
|
+
}), Bn = "custom_authentication", Vn = [
|
|
2405
2496
|
"urn:ietf:params:oauth:",
|
|
2406
2497
|
"urn:auth0",
|
|
2407
2498
|
"urn:okta",
|
|
@@ -2409,56 +2500,56 @@ var Fn = e.object({
|
|
|
2409
2500
|
"https://auth0.com",
|
|
2410
2501
|
"http://okta.com",
|
|
2411
2502
|
"https://okta.com"
|
|
2412
|
-
],
|
|
2503
|
+
], 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
2504
|
"RS256",
|
|
2414
2505
|
"RS384",
|
|
2415
2506
|
"RS512",
|
|
2416
2507
|
"ES256",
|
|
2417
2508
|
"ES384",
|
|
2418
2509
|
"ES512"
|
|
2419
|
-
]),
|
|
2510
|
+
]), Wn = e.discriminatedUnion("type", [e.object({
|
|
2420
2511
|
type: e.literal("connection"),
|
|
2421
2512
|
connection: e.string().min(1),
|
|
2422
2513
|
create_if_not_exists: e.boolean().default(!0),
|
|
2423
2514
|
trust_email_verified: e.boolean().default(!1)
|
|
2424
|
-
}), e.object({ type: e.literal("user_id") })]),
|
|
2515
|
+
}), e.object({ type: e.literal("user_id") })]), Gn = e.object({
|
|
2425
2516
|
issuer: e.string().min(1).max(2048),
|
|
2426
|
-
jwks:
|
|
2517
|
+
jwks: $t.optional(),
|
|
2427
2518
|
jwks_uri: e.string().url().optional(),
|
|
2428
2519
|
audience: e.array(e.string().min(1)).min(1).optional(),
|
|
2429
|
-
algorithms: e.array(
|
|
2520
|
+
algorithms: e.array(Un).min(1).optional(),
|
|
2430
2521
|
max_lifetime_seconds: e.number().int().min(1).max(3600).default(300),
|
|
2431
2522
|
require_jti: e.boolean().default(!0),
|
|
2432
|
-
user_mapping:
|
|
2523
|
+
user_mapping: Wn
|
|
2433
2524
|
});
|
|
2434
2525
|
e.object({
|
|
2435
2526
|
name: e.string().min(1).max(255),
|
|
2436
|
-
subject_token_type:
|
|
2527
|
+
subject_token_type: Hn,
|
|
2437
2528
|
action_id: e.string().min(1).optional(),
|
|
2438
|
-
type: e.literal(
|
|
2439
|
-
jwt_verification:
|
|
2529
|
+
type: e.literal(Bn),
|
|
2530
|
+
jwt_verification: Gn.optional()
|
|
2440
2531
|
}).extend({
|
|
2441
2532
|
id: e.string(),
|
|
2442
2533
|
created_at: e.string(),
|
|
2443
2534
|
updated_at: e.string()
|
|
2444
2535
|
}), e.object({
|
|
2445
2536
|
name: e.string().min(1).max(255).optional(),
|
|
2446
|
-
subject_token_type:
|
|
2447
|
-
jwt_verification:
|
|
2537
|
+
subject_token_type: Hn.optional(),
|
|
2538
|
+
jwt_verification: Gn.optional()
|
|
2448
2539
|
});
|
|
2449
|
-
var
|
|
2540
|
+
var Kn = e.object({
|
|
2450
2541
|
scim: e.string(),
|
|
2451
2542
|
auth0: e.string()
|
|
2452
|
-
}),
|
|
2543
|
+
}), qn = e.object({
|
|
2453
2544
|
connection_id: e.string(),
|
|
2454
2545
|
user_id_attribute: e.string().default("externalId"),
|
|
2455
|
-
mapping: e.array(
|
|
2546
|
+
mapping: e.array(Kn).default([])
|
|
2456
2547
|
});
|
|
2457
2548
|
e.object({
|
|
2458
2549
|
created_at: e.string(),
|
|
2459
2550
|
updated_at: e.string()
|
|
2460
|
-
}).extend(
|
|
2461
|
-
var
|
|
2551
|
+
}).extend(qn.shape);
|
|
2552
|
+
var Jn = e.object({
|
|
2462
2553
|
token_id: e.string(),
|
|
2463
2554
|
connection_id: e.string(),
|
|
2464
2555
|
token_hash: e.string(),
|
|
@@ -2468,13 +2559,13 @@ var qn = e.object({
|
|
|
2468
2559
|
e.object({
|
|
2469
2560
|
created_at: e.string(),
|
|
2470
2561
|
last_used_at: e.string().optional()
|
|
2471
|
-
}).extend(
|
|
2472
|
-
var
|
|
2562
|
+
}).extend(Jn.shape);
|
|
2563
|
+
var Yn = e.object({
|
|
2473
2564
|
connection_id: e.string(),
|
|
2474
2565
|
external_id: e.string(),
|
|
2475
2566
|
user_id: e.string()
|
|
2476
2567
|
});
|
|
2477
|
-
e.object({ created_at: e.string() }).extend(
|
|
2568
|
+
e.object({ created_at: e.string() }).extend(Yn.shape), e.object({
|
|
2478
2569
|
...a,
|
|
2479
2570
|
name: e.string(),
|
|
2480
2571
|
enabled: e.boolean().optional().default(!0),
|
|
@@ -2482,7 +2573,7 @@ e.object({ created_at: e.string() }).extend(Jn.shape), e.object({
|
|
|
2482
2573
|
credentials: e.record(e.string(), e.unknown()),
|
|
2483
2574
|
settings: e.object({}).optional()
|
|
2484
2575
|
});
|
|
2485
|
-
var
|
|
2576
|
+
var Xn = e.enum([
|
|
2486
2577
|
"verify_email",
|
|
2487
2578
|
"verify_email_by_code",
|
|
2488
2579
|
"reset_email",
|
|
@@ -2497,7 +2588,7 @@ var Yn = e.enum([
|
|
|
2497
2588
|
"user_invitation"
|
|
2498
2589
|
]);
|
|
2499
2590
|
e.object({
|
|
2500
|
-
template:
|
|
2591
|
+
template: Xn,
|
|
2501
2592
|
body: e.string(),
|
|
2502
2593
|
from: e.string(),
|
|
2503
2594
|
subject: e.string(),
|
|
@@ -2512,13 +2603,13 @@ e.object({
|
|
|
2512
2603
|
session_id: e.string().optional(),
|
|
2513
2604
|
organization: e.string().optional(),
|
|
2514
2605
|
auth_connection: e.string().optional(),
|
|
2515
|
-
auth_strategy:
|
|
2606
|
+
auth_strategy: nn.optional(),
|
|
2516
2607
|
user_id: e.string(),
|
|
2517
2608
|
client_id: e.string(),
|
|
2518
2609
|
expires_at: e.string().optional(),
|
|
2519
2610
|
idle_expires_at: e.string().optional(),
|
|
2520
2611
|
last_exchanged_at: e.string().optional(),
|
|
2521
|
-
device:
|
|
2612
|
+
device: _n,
|
|
2522
2613
|
resource_servers: e.array(e.object({
|
|
2523
2614
|
audience: e.string(),
|
|
2524
2615
|
scopes: e.string()
|
|
@@ -2539,10 +2630,10 @@ e.object({
|
|
|
2539
2630
|
name: e.string(),
|
|
2540
2631
|
options: e.object({})
|
|
2541
2632
|
});
|
|
2542
|
-
var
|
|
2633
|
+
var Zn = e.object({
|
|
2543
2634
|
value: e.string(),
|
|
2544
2635
|
description: e.string().optional()
|
|
2545
|
-
}),
|
|
2636
|
+
}), Qn = e.object({
|
|
2546
2637
|
token_dialect: e.enum(["access_token", "access_token_authz"]).optional(),
|
|
2547
2638
|
enforce_policies: e.boolean().optional(),
|
|
2548
2639
|
allow_skipping_userinfo: e.boolean().optional(),
|
|
@@ -2550,11 +2641,11 @@ var Xn = e.object({
|
|
|
2550
2641
|
persist_client_authorization: e.boolean().optional(),
|
|
2551
2642
|
enable_introspection_endpoint: e.boolean().optional(),
|
|
2552
2643
|
mtls: e.object({ bound_access_tokens: e.boolean().optional() }).optional()
|
|
2553
|
-
}),
|
|
2644
|
+
}), $n = e.object({
|
|
2554
2645
|
id: e.string().optional(),
|
|
2555
2646
|
name: e.string(),
|
|
2556
2647
|
identifier: e.string(),
|
|
2557
|
-
scopes: e.array(
|
|
2648
|
+
scopes: e.array(Zn).optional(),
|
|
2558
2649
|
signing_alg: e.string().optional(),
|
|
2559
2650
|
signing_secret: e.string().optional(),
|
|
2560
2651
|
token_lifetime: e.number().default(86400),
|
|
@@ -2562,7 +2653,7 @@ var Xn = e.object({
|
|
|
2562
2653
|
skip_consent_for_verifiable_first_party_clients: e.boolean().optional(),
|
|
2563
2654
|
allow_offline_access: e.boolean().optional(),
|
|
2564
2655
|
verificationKey: e.string().optional(),
|
|
2565
|
-
options:
|
|
2656
|
+
options: Qn.optional(),
|
|
2566
2657
|
is_system: e.boolean().optional(),
|
|
2567
2658
|
...a,
|
|
2568
2659
|
metadata: e.record(e.string(), e.any()).optional()
|
|
@@ -2570,13 +2661,13 @@ var Xn = e.object({
|
|
|
2570
2661
|
created_at: e.string().optional(),
|
|
2571
2662
|
updated_at: e.string().optional()
|
|
2572
2663
|
});
|
|
2573
|
-
e.array(
|
|
2574
|
-
var
|
|
2664
|
+
e.array($n);
|
|
2665
|
+
var er = e.object({
|
|
2575
2666
|
role_id: e.string(),
|
|
2576
2667
|
resource_server_identifier: e.string(),
|
|
2577
2668
|
permission_name: e.string()
|
|
2578
2669
|
}).extend({ created_at: e.string() });
|
|
2579
|
-
e.array(
|
|
2670
|
+
e.array(er), e.object({
|
|
2580
2671
|
user_id: e.string().openapi({ description: "The id of the user that granted the consent" }),
|
|
2581
2672
|
clientID: e.string().openapi({ description: "The id of the client the grant was issued to" }),
|
|
2582
2673
|
audience: e.string().optional().openapi({ description: "The audience the grant applies to" }),
|
|
@@ -2589,7 +2680,7 @@ e.array($n), e.object({
|
|
|
2589
2680
|
failed_logins: e.array(e.string()).optional(),
|
|
2590
2681
|
last_password_reset: e.string().optional()
|
|
2591
2682
|
});
|
|
2592
|
-
var
|
|
2683
|
+
var tr = e.object({
|
|
2593
2684
|
user_id: e.string(),
|
|
2594
2685
|
resource_server_identifier: e.string(),
|
|
2595
2686
|
permission_name: e.string(),
|
|
@@ -2598,8 +2689,8 @@ var er = e.object({
|
|
|
2598
2689
|
tenant_id: e.string(),
|
|
2599
2690
|
created_at: e.string().optional()
|
|
2600
2691
|
});
|
|
2601
|
-
e.array(
|
|
2602
|
-
var
|
|
2692
|
+
e.array(tr);
|
|
2693
|
+
var nr = e.object({
|
|
2603
2694
|
user_id: e.string(),
|
|
2604
2695
|
resource_server_identifier: e.string(),
|
|
2605
2696
|
resource_server_name: e.string(),
|
|
@@ -2608,8 +2699,8 @@ var tr = e.object({
|
|
|
2608
2699
|
created_at: e.string().optional(),
|
|
2609
2700
|
organization_id: e.string().optional()
|
|
2610
2701
|
});
|
|
2611
|
-
e.array(
|
|
2612
|
-
var
|
|
2702
|
+
e.array(nr);
|
|
2703
|
+
var rr = e.object({
|
|
2613
2704
|
user_id: e.string(),
|
|
2614
2705
|
role_id: e.string(),
|
|
2615
2706
|
organization_id: e.string().optional()
|
|
@@ -2617,8 +2708,8 @@ var nr = e.object({
|
|
|
2617
2708
|
tenant_id: e.string(),
|
|
2618
2709
|
created_at: e.string().optional()
|
|
2619
2710
|
});
|
|
2620
|
-
e.array(
|
|
2621
|
-
var
|
|
2711
|
+
e.array(rr);
|
|
2712
|
+
var ir = e.object({
|
|
2622
2713
|
id: e.string().optional().openapi({ description: "The unique identifier of the role. If not provided, one will be generated." }),
|
|
2623
2714
|
name: e.string().min(1).max(50).openapi({ description: "The name of the role. Cannot include '<' or '>'" }),
|
|
2624
2715
|
description: e.string().max(255).optional().openapi({ description: "The description of the role" }),
|
|
@@ -2629,19 +2720,19 @@ var rr = e.object({
|
|
|
2629
2720
|
created_at: e.string().optional(),
|
|
2630
2721
|
updated_at: e.string().optional()
|
|
2631
2722
|
});
|
|
2632
|
-
e.array(
|
|
2633
|
-
var
|
|
2723
|
+
e.array(ir);
|
|
2724
|
+
var ar = e.object({
|
|
2634
2725
|
logo_url: e.string().optional().openapi({ description: "URL of the organization's logo" }),
|
|
2635
2726
|
colors: e.object({
|
|
2636
2727
|
primary: e.string().optional().openapi({ description: "Primary color in hex format (e.g., #FF0000)" }),
|
|
2637
2728
|
page_background: e.string().optional().openapi({ description: "Page background color in hex format (e.g., #FFFFFF)" })
|
|
2638
2729
|
}).optional()
|
|
2639
|
-
}).optional(),
|
|
2730
|
+
}).optional(), or = e.object({
|
|
2640
2731
|
connection_id: e.string().openapi({ description: "ID of the connection" }),
|
|
2641
2732
|
assign_membership_on_login: e.boolean().default(!1).openapi({ description: "Whether to assign membership to the organization on login" }),
|
|
2642
2733
|
show_as_button: e.boolean().default(!0).openapi({ description: "Whether to show this connection as a button in the login screen" }),
|
|
2643
2734
|
is_signup_enabled: e.boolean().default(!0).openapi({ description: "Whether signup is enabled for this connection" })
|
|
2644
|
-
}),
|
|
2735
|
+
}), sr = e.object({ client_credentials: e.object({
|
|
2645
2736
|
enforce: e.boolean().default(!1).openapi({ description: "Whether to enforce token quota limits" }),
|
|
2646
2737
|
per_day: e.number().min(0).default(0).openapi({ description: "Maximum tokens per day (0 = unlimited)" }),
|
|
2647
2738
|
per_hour: e.number().min(0).default(0).openapi({ description: "Maximum tokens per hour (0 = unlimited)" })
|
|
@@ -2650,15 +2741,15 @@ e.object({
|
|
|
2650
2741
|
id: e.string().optional(),
|
|
2651
2742
|
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
2743
|
display_name: e.string().optional().openapi({ description: "The display name of the organization" }),
|
|
2653
|
-
branding:
|
|
2744
|
+
branding: ar,
|
|
2654
2745
|
metadata: e.record(e.string(), e.any()).default({}).optional().openapi({ description: "Custom metadata for the organization" }),
|
|
2655
|
-
enabled_connections: e.array(
|
|
2656
|
-
token_quota:
|
|
2746
|
+
enabled_connections: e.array(or).default([]).optional().openapi({ description: "List of enabled connections for the organization" }),
|
|
2747
|
+
token_quota: sr
|
|
2657
2748
|
}).extend(n.shape).extend({
|
|
2658
2749
|
id: e.string(),
|
|
2659
2750
|
name: e.string().min(1).openapi({ description: "The name of the organization" })
|
|
2660
2751
|
});
|
|
2661
|
-
var
|
|
2752
|
+
var cr = e.object({
|
|
2662
2753
|
connection_id: e.string().openapi({ description: "ID of the tenant-level connection to enable for the org." }),
|
|
2663
2754
|
assign_membership_on_login: e.boolean().optional().default(!1),
|
|
2664
2755
|
show_as_button: e.boolean().optional().default(!0),
|
|
@@ -2671,89 +2762,10 @@ var sr = e.object({
|
|
|
2671
2762
|
created_at: e.string().optional(),
|
|
2672
2763
|
updated_at: e.string().optional()
|
|
2673
2764
|
});
|
|
2674
|
-
e.array(
|
|
2765
|
+
e.array(cr), e.object({
|
|
2675
2766
|
user_id: e.string().openapi({ description: "ID of the user" }),
|
|
2676
2767
|
organization_id: e.string().openapi({ description: "ID of the organization" })
|
|
2677
2768
|
}).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
2769
|
date: e.string().openapi({
|
|
2758
2770
|
description: "Date these events occurred in ISO 8601 format",
|
|
2759
2771
|
example: "2025-12-19"
|
|
@@ -2810,7 +2822,7 @@ e.array(sr), e.object({
|
|
|
2810
2822
|
"passwordless",
|
|
2811
2823
|
"enterprise"
|
|
2812
2824
|
]);
|
|
2813
|
-
var
|
|
2825
|
+
var lr = e.object({
|
|
2814
2826
|
cohort: e.string(),
|
|
2815
2827
|
sessions: e.number(),
|
|
2816
2828
|
active: e.array(e.number())
|
|
@@ -2819,9 +2831,9 @@ e.object({
|
|
|
2819
2831
|
interval: e.literal("week"),
|
|
2820
2832
|
from: e.string(),
|
|
2821
2833
|
to: e.string(),
|
|
2822
|
-
cohorts: e.array(
|
|
2834
|
+
cohorts: e.array(lr)
|
|
2823
2835
|
});
|
|
2824
|
-
var
|
|
2836
|
+
var ur = e.object({
|
|
2825
2837
|
cohort: e.string(),
|
|
2826
2838
|
tokens: e.number(),
|
|
2827
2839
|
active: e.array(e.number())
|
|
@@ -2830,24 +2842,24 @@ e.object({
|
|
|
2830
2842
|
interval: e.literal("week"),
|
|
2831
2843
|
from: e.string(),
|
|
2832
2844
|
to: e.string(),
|
|
2833
|
-
cohorts: e.array(
|
|
2845
|
+
cohorts: e.array(ur)
|
|
2834
2846
|
});
|
|
2835
|
-
var
|
|
2847
|
+
var dr = e.object({
|
|
2836
2848
|
name: e.string(),
|
|
2837
2849
|
type: e.string()
|
|
2838
|
-
}),
|
|
2850
|
+
}), fr = e.object({
|
|
2839
2851
|
elapsed: e.number(),
|
|
2840
2852
|
rows_read: e.number().optional(),
|
|
2841
2853
|
bytes_read: e.number().optional()
|
|
2842
2854
|
});
|
|
2843
2855
|
e.object({
|
|
2844
|
-
meta: e.array(
|
|
2856
|
+
meta: e.array(dr),
|
|
2845
2857
|
data: e.array(e.record(e.string(), e.any())),
|
|
2846
2858
|
rows: e.number(),
|
|
2847
2859
|
rows_before_limit_at_least: e.number().optional(),
|
|
2848
|
-
statistics:
|
|
2860
|
+
statistics: fr.optional()
|
|
2849
2861
|
});
|
|
2850
|
-
var
|
|
2862
|
+
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
2863
|
type: "object",
|
|
2852
2864
|
additionalProperties: {
|
|
2853
2865
|
type: "object",
|
|
@@ -2855,23 +2867,23 @@ var fr = e.enum(/* @__PURE__ */ "login.login-id.login-password.signup.signup-id.
|
|
|
2855
2867
|
}
|
|
2856
2868
|
});
|
|
2857
2869
|
e.object({
|
|
2858
|
-
prompt:
|
|
2870
|
+
prompt: pr,
|
|
2859
2871
|
language: e.string(),
|
|
2860
|
-
custom_text:
|
|
2872
|
+
custom_text: mr
|
|
2861
2873
|
});
|
|
2862
|
-
var
|
|
2874
|
+
var hr = e.object({
|
|
2863
2875
|
"form-content-start": e.string().optional(),
|
|
2864
2876
|
"form-content-end": e.string().optional(),
|
|
2865
2877
|
"form-footer-start": e.string().optional(),
|
|
2866
2878
|
"form-footer-end": e.string().optional(),
|
|
2867
2879
|
"secondary-actions-start": e.string().optional(),
|
|
2868
2880
|
"secondary-actions-end": e.string().optional()
|
|
2869
|
-
}).strict(),
|
|
2881
|
+
}).strict(), gr = e.record(e.string(), hr);
|
|
2870
2882
|
e.object({
|
|
2871
2883
|
prompt: e.string(),
|
|
2872
|
-
partials:
|
|
2884
|
+
partials: gr
|
|
2873
2885
|
});
|
|
2874
|
-
var
|
|
2886
|
+
var _r = e.enum([
|
|
2875
2887
|
"phone",
|
|
2876
2888
|
"totp",
|
|
2877
2889
|
"email",
|
|
@@ -2879,11 +2891,12 @@ var gr = e.enum([
|
|
|
2879
2891
|
"webauthn-roaming",
|
|
2880
2892
|
"webauthn-platform",
|
|
2881
2893
|
"passkey"
|
|
2882
|
-
]),
|
|
2894
|
+
]), vr = e.object({
|
|
2883
2895
|
user_id: e.string(),
|
|
2884
|
-
type:
|
|
2896
|
+
type: _r,
|
|
2885
2897
|
phone_number: e.string().optional(),
|
|
2886
2898
|
totp_secret: e.string().optional(),
|
|
2899
|
+
totp_last_step: e.number().int().nonnegative().optional(),
|
|
2887
2900
|
credential_id: e.string().optional(),
|
|
2888
2901
|
public_key: e.string().optional(),
|
|
2889
2902
|
sign_count: e.number().int().nonnegative().optional(),
|
|
@@ -2892,7 +2905,7 @@ var gr = e.enum([
|
|
|
2892
2905
|
friendly_name: e.string().optional(),
|
|
2893
2906
|
confirmed: e.boolean().default(!1)
|
|
2894
2907
|
});
|
|
2895
|
-
function
|
|
2908
|
+
function yr(t, n) {
|
|
2896
2909
|
t.type === "phone" && !t.phone_number && n.addIssue({
|
|
2897
2910
|
code: e.ZodIssueCode.custom,
|
|
2898
2911
|
message: "phone_number is required when type is 'phone'",
|
|
@@ -2915,29 +2928,29 @@ function _r(t, n) {
|
|
|
2915
2928
|
path: ["public_key"]
|
|
2916
2929
|
}));
|
|
2917
2930
|
}
|
|
2918
|
-
|
|
2931
|
+
vr.superRefine(yr), vr.extend({
|
|
2919
2932
|
id: e.string(),
|
|
2920
2933
|
created_at: e.string(),
|
|
2921
2934
|
updated_at: e.string()
|
|
2922
|
-
}).superRefine(
|
|
2935
|
+
}).superRefine(yr), e.object({
|
|
2923
2936
|
id: e.string().optional(),
|
|
2924
2937
|
created_at: e.string().datetime({ offset: !0 }).optional(),
|
|
2925
2938
|
updated_at: e.string().datetime({ offset: !0 }).optional()
|
|
2926
2939
|
});
|
|
2927
|
-
var
|
|
2940
|
+
var br = "x-authhero-preserve-location", B = class extends Error {
|
|
2928
2941
|
ms;
|
|
2929
2942
|
constructor(e, t) {
|
|
2930
2943
|
super(`${t ?? "Operation"} timed out after ${e}ms`), this.name = "TimeoutError", this.ms = e;
|
|
2931
2944
|
}
|
|
2932
2945
|
};
|
|
2933
|
-
function
|
|
2934
|
-
return e instanceof
|
|
2946
|
+
function V(e) {
|
|
2947
|
+
return e instanceof B ? !0 : e instanceof Error ? e.name === "AbortError" || e.name === "TimeoutError" : !1;
|
|
2935
2948
|
}
|
|
2936
|
-
function
|
|
2949
|
+
function H(e, t) {
|
|
2937
2950
|
let n = new AbortController(), r = setTimeout(() => n.abort(), e);
|
|
2938
2951
|
return t(n.signal).finally(() => clearTimeout(r));
|
|
2939
2952
|
}
|
|
2940
|
-
function
|
|
2953
|
+
function xr(e) {
|
|
2941
2954
|
let t = e.filter((e) => e !== void 0);
|
|
2942
2955
|
if (t.length <= 1) return t[0];
|
|
2943
2956
|
if (typeof AbortSignal.any == "function") return AbortSignal.any(t);
|
|
@@ -2950,18 +2963,18 @@ function yr(e) {
|
|
|
2950
2963
|
for (let e of t) e.addEventListener("abort", i);
|
|
2951
2964
|
return n.signal;
|
|
2952
2965
|
}
|
|
2953
|
-
function
|
|
2954
|
-
let i = new AbortController(), a =
|
|
2966
|
+
function U(e, t, n, r) {
|
|
2967
|
+
let i = new AbortController(), a = xr([n, i.signal]) ?? i.signal, o, s = new Promise((n, r) => {
|
|
2955
2968
|
o = setTimeout(() => {
|
|
2956
|
-
let n = new
|
|
2969
|
+
let n = new B(e, t);
|
|
2957
2970
|
i.abort(n), r(n);
|
|
2958
2971
|
}, e);
|
|
2959
2972
|
});
|
|
2960
2973
|
return Promise.race([Promise.resolve().then(() => r(a)), s]).finally(() => clearTimeout(o));
|
|
2961
2974
|
}
|
|
2962
|
-
function
|
|
2975
|
+
function W(e, t, n) {
|
|
2963
2976
|
let r, i = new Promise((e, i) => {
|
|
2964
|
-
r = setTimeout(() => i(new
|
|
2977
|
+
r = setTimeout(() => i(new B(t, n)), t);
|
|
2965
2978
|
});
|
|
2966
2979
|
return Promise.race([e, i]).finally(() => {
|
|
2967
2980
|
r && clearTimeout(r);
|
|
@@ -2969,12 +2982,12 @@ function U(e, t, n) {
|
|
|
2969
2982
|
}
|
|
2970
2983
|
//#endregion
|
|
2971
2984
|
//#region src/data-plane/cache.ts
|
|
2972
|
-
var
|
|
2973
|
-
function
|
|
2985
|
+
var Sr = 1e4, Cr = 8e3;
|
|
2986
|
+
function G(e, t, n) {
|
|
2974
2987
|
let r = typeof t == "number" ? {
|
|
2975
2988
|
freshTtlMs: t,
|
|
2976
2989
|
maxEntries: n
|
|
2977
|
-
} : t, i = r.freshTtlMs, a = r.staleTtlMs ?? 0, o = r.staleIfErrorTtlMs ?? 0, s = r.negativeTtlMs ?? i, c = r.maxEntries ??
|
|
2990
|
+
} : 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
2991
|
function p(e) {
|
|
2979
2992
|
for (let [t, n] of f) n.stale_if_error_until <= e && n.stale_until <= e && f.delete(t);
|
|
2980
2993
|
for (; f.size >= c;) {
|
|
@@ -2996,7 +3009,7 @@ function W(e, t, n) {
|
|
|
2996
3009
|
return e.refresh_started_at === void 0 ? !1 : t - e.refresh_started_at < d ? !0 : (e.refresh_started_at = void 0, !1);
|
|
2997
3010
|
}
|
|
2998
3011
|
function g(t, n) {
|
|
2999
|
-
return u > 0 ?
|
|
3012
|
+
return u > 0 ? U(u, "resolveHost", n, (n) => e.resolveHost(t, { signal: n })) : e.resolveHost(t, { signal: n });
|
|
3000
3013
|
}
|
|
3001
3014
|
async function _(e, t) {
|
|
3002
3015
|
let n = f.get(e);
|
|
@@ -3029,7 +3042,7 @@ function W(e, t, n) {
|
|
|
3029
3042
|
}
|
|
3030
3043
|
//#endregion
|
|
3031
3044
|
//#region src/data-plane/registry.ts
|
|
3032
|
-
var
|
|
3045
|
+
var wr = class {
|
|
3033
3046
|
definitions = /* @__PURE__ */ new Map();
|
|
3034
3047
|
bindings;
|
|
3035
3048
|
constructor(e = {}) {
|
|
@@ -3049,38 +3062,38 @@ var Sr = class {
|
|
|
3049
3062
|
return n.build(r.data, { bindings: this.bindings });
|
|
3050
3063
|
}
|
|
3051
3064
|
};
|
|
3052
|
-
function
|
|
3065
|
+
function K(e) {
|
|
3053
3066
|
return e;
|
|
3054
3067
|
}
|
|
3055
3068
|
//#endregion
|
|
3056
3069
|
//#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);
|
|
3070
|
+
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";
|
|
3071
|
+
function Ar(e, t) {
|
|
3072
|
+
e.set(Tr, t);
|
|
3066
3073
|
}
|
|
3067
|
-
function
|
|
3068
|
-
return e.get(
|
|
3074
|
+
function q(e) {
|
|
3075
|
+
return e.get(Tr) ?? e.req.raw;
|
|
3069
3076
|
}
|
|
3070
|
-
function jr(e) {
|
|
3071
|
-
|
|
3077
|
+
function jr(e, t) {
|
|
3078
|
+
e.set(Er, t.tenant_id), e.set(Dr, t.custom_domain_id), e.set(Or, t.domain);
|
|
3072
3079
|
}
|
|
3073
3080
|
function Mr(e) {
|
|
3074
3081
|
return e.get(Er);
|
|
3075
3082
|
}
|
|
3076
|
-
function Nr(e
|
|
3077
|
-
|
|
3078
|
-
t(r), Or(e, new Request(n, { headers: r }));
|
|
3083
|
+
function Nr(e) {
|
|
3084
|
+
return e.get(Dr);
|
|
3079
3085
|
}
|
|
3080
|
-
function
|
|
3086
|
+
function Pr(e) {
|
|
3087
|
+
return e.get(Or);
|
|
3088
|
+
}
|
|
3089
|
+
function Fr(e, t) {
|
|
3090
|
+
let n = q(e), r = new Headers(n.headers);
|
|
3091
|
+
t(r), Ar(e, new Request(n, { headers: r }));
|
|
3092
|
+
}
|
|
3093
|
+
function J(e) {
|
|
3081
3094
|
let t = e.res;
|
|
3082
3095
|
try {
|
|
3083
|
-
t.headers.append(
|
|
3096
|
+
t.headers.append(kr, "1"), t.headers.delete(kr);
|
|
3084
3097
|
return;
|
|
3085
3098
|
} catch {
|
|
3086
3099
|
e.res = new Response(t.body, {
|
|
@@ -3092,7 +3105,7 @@ function q(e) {
|
|
|
3092
3105
|
}
|
|
3093
3106
|
//#endregion
|
|
3094
3107
|
//#region src/data-plane/handlers/cors.ts
|
|
3095
|
-
var
|
|
3108
|
+
var Ir = e.object({
|
|
3096
3109
|
origins: e.array(e.string()).optional(),
|
|
3097
3110
|
allow_credentials: e.boolean().optional(),
|
|
3098
3111
|
allow_headers: e.array(e.string()).optional(),
|
|
@@ -3100,44 +3113,44 @@ var Pr = e.object({
|
|
|
3100
3113
|
expose_headers: e.array(e.string()).optional(),
|
|
3101
3114
|
max_age: e.number().int().optional()
|
|
3102
3115
|
}).refine((e) => !(e.allow_credentials && e.origins?.includes("*")), { message: "Cannot use wildcard origin (*) with allow_credentials" });
|
|
3103
|
-
function
|
|
3116
|
+
function Lr(e, t) {
|
|
3104
3117
|
let n = new Headers(), r = e.origins ?? ["*"], i = r.includes("*");
|
|
3105
3118
|
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
3119
|
}
|
|
3107
|
-
var
|
|
3120
|
+
var Rr = K({
|
|
3108
3121
|
type: "cors",
|
|
3109
|
-
optionsSchema:
|
|
3122
|
+
optionsSchema: Ir,
|
|
3110
3123
|
build(e) {
|
|
3111
3124
|
return async (t, n) => {
|
|
3112
3125
|
let r = t.req.header("origin") ?? null;
|
|
3113
3126
|
if (t.req.method === "OPTIONS" && r !== null && t.req.header("access-control-request-method") !== void 0) {
|
|
3114
|
-
let t =
|
|
3127
|
+
let t = Lr(e, r);
|
|
3115
3128
|
return new Response(null, {
|
|
3116
3129
|
status: 204,
|
|
3117
3130
|
headers: t
|
|
3118
3131
|
});
|
|
3119
3132
|
}
|
|
3120
3133
|
await n();
|
|
3121
|
-
let i =
|
|
3122
|
-
|
|
3134
|
+
let i = Lr(e, r);
|
|
3135
|
+
J(t), i.forEach((e, n) => {
|
|
3123
3136
|
n.toLowerCase() === "vary" ? t.res.headers.append(n, e) : t.res.headers.set(n, e);
|
|
3124
3137
|
});
|
|
3125
3138
|
};
|
|
3126
3139
|
}
|
|
3127
|
-
}),
|
|
3140
|
+
}), zr = e.object({
|
|
3128
3141
|
username: e.string(),
|
|
3129
3142
|
password: e.string(),
|
|
3130
3143
|
realm: e.string().optional()
|
|
3131
3144
|
});
|
|
3132
|
-
function
|
|
3145
|
+
function Br(e, t) {
|
|
3133
3146
|
let n = `${e}:${t}`;
|
|
3134
3147
|
return typeof btoa == "function" ? btoa(n) : Buffer.from(n, "utf-8").toString("base64");
|
|
3135
3148
|
}
|
|
3136
|
-
var
|
|
3149
|
+
var Vr = K({
|
|
3137
3150
|
type: "basic_auth",
|
|
3138
|
-
optionsSchema:
|
|
3151
|
+
optionsSchema: zr,
|
|
3139
3152
|
build(e) {
|
|
3140
|
-
let t =
|
|
3153
|
+
let t = Br(e.username, e.password), n = (e.realm ?? "Restricted").replace(/["\\\r\n]/g, "");
|
|
3141
3154
|
return async (e, r) => {
|
|
3142
3155
|
let i = e.req.header("authorization");
|
|
3143
3156
|
if (i) {
|
|
@@ -3153,7 +3166,7 @@ var zr = G({
|
|
|
3153
3166
|
});
|
|
3154
3167
|
};
|
|
3155
3168
|
}
|
|
3156
|
-
}),
|
|
3169
|
+
}), Hr = K({
|
|
3157
3170
|
type: "headers",
|
|
3158
3171
|
optionsSchema: e.object({
|
|
3159
3172
|
request: e.record(e.string(), e.string()).optional(),
|
|
@@ -3163,23 +3176,23 @@ var zr = G({
|
|
|
3163
3176
|
}),
|
|
3164
3177
|
build(e) {
|
|
3165
3178
|
return async (t, n) => {
|
|
3166
|
-
if ((e.request || e.remove_request) &&
|
|
3179
|
+
if ((e.request || e.remove_request) && Fr(t, (t) => {
|
|
3167
3180
|
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) && (
|
|
3181
|
+
}), 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
3182
|
};
|
|
3170
3183
|
}
|
|
3171
|
-
}),
|
|
3184
|
+
}), Ur = K({
|
|
3172
3185
|
type: "cache",
|
|
3173
3186
|
optionsSchema: e.object({ ttl_seconds: e.number().int().positive() }),
|
|
3174
3187
|
build(e) {
|
|
3175
3188
|
return async (t, n) => {
|
|
3176
3189
|
if (await n(), !t.res.headers.has("Cache-Control")) {
|
|
3177
3190
|
let n = t.res.headers.has("set-cookie") ? "private" : "public";
|
|
3178
|
-
|
|
3191
|
+
J(t), t.res.headers.set("Cache-Control", `${n}, max-age=${e.ttl_seconds}`);
|
|
3179
3192
|
}
|
|
3180
3193
|
};
|
|
3181
3194
|
}
|
|
3182
|
-
}),
|
|
3195
|
+
}), Wr = [
|
|
3183
3196
|
"173.245.48.0/20",
|
|
3184
3197
|
"103.21.244.0/22",
|
|
3185
3198
|
"103.22.200.0/22",
|
|
@@ -3203,7 +3216,7 @@ var zr = G({
|
|
|
3203
3216
|
"2a06:98c0::/29",
|
|
3204
3217
|
"2c0f:f248::/32"
|
|
3205
3218
|
];
|
|
3206
|
-
function
|
|
3219
|
+
function Gr(e) {
|
|
3207
3220
|
let t = e.split(".");
|
|
3208
3221
|
if (t.length !== 4) return null;
|
|
3209
3222
|
let n = [];
|
|
@@ -3215,14 +3228,14 @@ function Ur(e) {
|
|
|
3215
3228
|
}
|
|
3216
3229
|
return n;
|
|
3217
3230
|
}
|
|
3218
|
-
function
|
|
3231
|
+
function Kr(e) {
|
|
3219
3232
|
if (e === "") return [];
|
|
3220
3233
|
let t = e.split(":"), n = [];
|
|
3221
3234
|
for (let e = 0; e < t.length; e++) {
|
|
3222
3235
|
let r = t[e];
|
|
3223
3236
|
if (r.includes(".")) {
|
|
3224
3237
|
if (e !== t.length - 1) return null;
|
|
3225
|
-
let i =
|
|
3238
|
+
let i = Gr(r);
|
|
3226
3239
|
if (!i) return null;
|
|
3227
3240
|
n.push(i[0] << 8 | i[1], i[2] << 8 | i[3]);
|
|
3228
3241
|
continue;
|
|
@@ -3232,14 +3245,14 @@ function Wr(e) {
|
|
|
3232
3245
|
}
|
|
3233
3246
|
return n;
|
|
3234
3247
|
}
|
|
3235
|
-
function
|
|
3248
|
+
function qr(e) {
|
|
3236
3249
|
let t = e.split("::");
|
|
3237
3250
|
if (t.length > 2) return null;
|
|
3238
|
-
let n =
|
|
3251
|
+
let n = Kr(t[0] ?? "");
|
|
3239
3252
|
if (!n) return null;
|
|
3240
3253
|
let r;
|
|
3241
3254
|
if (t.length === 2) {
|
|
3242
|
-
let e =
|
|
3255
|
+
let e = Kr(t[1] ?? "");
|
|
3243
3256
|
if (!e) return null;
|
|
3244
3257
|
let i = 8 - n.length - e.length;
|
|
3245
3258
|
if (i < 1) return null;
|
|
@@ -3254,25 +3267,25 @@ function Gr(e) {
|
|
|
3254
3267
|
for (let e of r) i.push(e >> 8 & 255, e & 255);
|
|
3255
3268
|
return i;
|
|
3256
3269
|
}
|
|
3257
|
-
function
|
|
3270
|
+
function Jr(e) {
|
|
3258
3271
|
let t = e.trim();
|
|
3259
3272
|
t.startsWith("[") && t.endsWith("]") && (t = t.slice(1, -1));
|
|
3260
3273
|
let n = t.indexOf("%");
|
|
3261
3274
|
if (n !== -1 && (t = t.slice(0, n)), t === "") return null;
|
|
3262
|
-
if (!t.includes(":")) return
|
|
3263
|
-
let r =
|
|
3275
|
+
if (!t.includes(":")) return Gr(t);
|
|
3276
|
+
let r = qr(t);
|
|
3264
3277
|
return r ? r.slice(0, 10).every((e) => e === 0) && r[10] === 255 && r[11] === 255 ? r.slice(12) : r : null;
|
|
3265
3278
|
}
|
|
3266
|
-
function
|
|
3267
|
-
let [t, n] = e.split("/"), r =
|
|
3279
|
+
function Yr(e) {
|
|
3280
|
+
let [t, n] = e.split("/"), r = Jr(t ?? ""), i = Number(n);
|
|
3268
3281
|
if (!r || !Number.isInteger(i)) throw Error(`Invalid Cloudflare CIDR: ${e}`);
|
|
3269
3282
|
return {
|
|
3270
3283
|
bytes: r,
|
|
3271
3284
|
prefixBits: i
|
|
3272
3285
|
};
|
|
3273
3286
|
}
|
|
3274
|
-
var
|
|
3275
|
-
function
|
|
3287
|
+
var Xr = Wr.map(Yr);
|
|
3288
|
+
function Zr(e, t) {
|
|
3276
3289
|
if (e.length !== t.bytes.length) return !1;
|
|
3277
3290
|
let n = t.prefixBits >> 3;
|
|
3278
3291
|
for (let r = 0; r < n; r++) if (e[r] !== t.bytes[r]) return !1;
|
|
@@ -3281,11 +3294,11 @@ function Yr(e, t) {
|
|
|
3281
3294
|
let i = 255 << 8 - r & 255;
|
|
3282
3295
|
return (e[n] & i) === (t.bytes[n] & i);
|
|
3283
3296
|
}
|
|
3284
|
-
function
|
|
3285
|
-
let t =
|
|
3286
|
-
return t ?
|
|
3297
|
+
function Qr(e) {
|
|
3298
|
+
let t = Jr(e);
|
|
3299
|
+
return t ? Xr.some((e) => Zr(t, e)) : !1;
|
|
3287
3300
|
}
|
|
3288
|
-
var
|
|
3301
|
+
var $r = K({
|
|
3289
3302
|
type: "forwarded_headers",
|
|
3290
3303
|
optionsSchema: e.object({
|
|
3291
3304
|
client_ip_header: e.string().default("cf-connecting-ip"),
|
|
@@ -3296,46 +3309,46 @@ var Zr = G({
|
|
|
3296
3309
|
build(e) {
|
|
3297
3310
|
return async (t, n) => {
|
|
3298
3311
|
let r = new URL(t.req.url);
|
|
3299
|
-
|
|
3312
|
+
Fr(t, (n) => {
|
|
3300
3313
|
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 &&
|
|
3314
|
+
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
3315
|
n.set("x-forwarded-for", l), e.set_x_real_ip && n.set("x-real-ip", s);
|
|
3303
3316
|
}), await n();
|
|
3304
3317
|
};
|
|
3305
3318
|
}
|
|
3306
|
-
}),
|
|
3307
|
-
function
|
|
3319
|
+
}), ei = e.object({ upstream_host: e.string().optional() });
|
|
3320
|
+
function ti(e) {
|
|
3308
3321
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
3309
3322
|
}
|
|
3310
|
-
function
|
|
3323
|
+
function ni(e) {
|
|
3311
3324
|
if (typeof e.getSetCookie == "function") return e.getSetCookie();
|
|
3312
3325
|
let t = [];
|
|
3313
3326
|
return e.forEach((e, n) => {
|
|
3314
3327
|
n.toLowerCase() === "set-cookie" && t.push(e);
|
|
3315
3328
|
}), t;
|
|
3316
3329
|
}
|
|
3317
|
-
var
|
|
3330
|
+
var ri = K({
|
|
3318
3331
|
type: "rewrite_cookies",
|
|
3319
|
-
optionsSchema:
|
|
3332
|
+
optionsSchema: ei,
|
|
3320
3333
|
build(e) {
|
|
3321
3334
|
return async (t, n) => {
|
|
3322
3335
|
await n();
|
|
3323
3336
|
let r = new URL(t.req.url).hostname, i = e.upstream_host ?? t.get("__proxy_upstream_host__");
|
|
3324
3337
|
if (!i) return;
|
|
3325
|
-
let a =
|
|
3338
|
+
let a = ni(t.res.headers);
|
|
3326
3339
|
if (a.length === 0) return;
|
|
3327
|
-
let o =
|
|
3328
|
-
|
|
3340
|
+
let o = ti(i), s = RegExp(`(?:^|;\\s*)Domain=\\.?${o}(?=;|$)`, "i");
|
|
3341
|
+
J(t), t.res.headers.delete("set-cookie");
|
|
3329
3342
|
for (let e of a) t.res.headers.append("set-cookie", e.replace(s, `Domain=${r}`));
|
|
3330
3343
|
};
|
|
3331
3344
|
}
|
|
3332
|
-
}),
|
|
3345
|
+
}), ii = K({
|
|
3333
3346
|
type: "rewrite_location",
|
|
3334
3347
|
optionsSchema: e.object({ upstream_origin: e.string().optional() }),
|
|
3335
3348
|
build(e) {
|
|
3336
3349
|
return async (t, n) => {
|
|
3337
3350
|
if (await n(), t.res.headers.has("x-authhero-preserve-location")) {
|
|
3338
|
-
|
|
3351
|
+
J(t), t.res.headers.delete(br);
|
|
3339
3352
|
return;
|
|
3340
3353
|
}
|
|
3341
3354
|
let r = t.res.status;
|
|
@@ -3352,10 +3365,10 @@ var ti = G({
|
|
|
3352
3365
|
}
|
|
3353
3366
|
if (o.origin !== a) return;
|
|
3354
3367
|
let s = new URL(t.req.url), c = `${`${s.protocol}//${s.host}`}${o.pathname}${o.search}${o.hash}`;
|
|
3355
|
-
|
|
3368
|
+
J(t), t.res.headers.set("location", c);
|
|
3356
3369
|
};
|
|
3357
3370
|
}
|
|
3358
|
-
}),
|
|
3371
|
+
}), ai = new Set([
|
|
3359
3372
|
"connection",
|
|
3360
3373
|
"keep-alive",
|
|
3361
3374
|
"proxy-authenticate",
|
|
@@ -3364,32 +3377,32 @@ var ti = G({
|
|
|
3364
3377
|
"trailers",
|
|
3365
3378
|
"transfer-encoding",
|
|
3366
3379
|
"upgrade"
|
|
3367
|
-
]),
|
|
3380
|
+
]), oi = 3e4, si = e.object({
|
|
3368
3381
|
upstream_url: e.string(),
|
|
3369
3382
|
preserve_host: e.boolean().default(!1),
|
|
3370
3383
|
timeout_ms: e.number().int().positive().optional()
|
|
3371
3384
|
});
|
|
3372
|
-
function
|
|
3385
|
+
function ci(e, t) {
|
|
3373
3386
|
return e === "" || e === "/" ? t : `${e.endsWith("/") ? e.slice(0, -1) : e}${t.startsWith("/") ? t : `/${t}`}`;
|
|
3374
3387
|
}
|
|
3375
|
-
function
|
|
3388
|
+
function li(e) {
|
|
3376
3389
|
return e !== "GET" && e !== "HEAD";
|
|
3377
3390
|
}
|
|
3378
|
-
var
|
|
3379
|
-
function
|
|
3391
|
+
var ui = 128 * 1024;
|
|
3392
|
+
function di(e) {
|
|
3380
3393
|
let t = e.headers.get("content-length");
|
|
3381
3394
|
if (t === null) return null;
|
|
3382
3395
|
let n = Number(t);
|
|
3383
3396
|
return Number.isInteger(n) && n >= 0 ? n : null;
|
|
3384
3397
|
}
|
|
3385
|
-
async function
|
|
3398
|
+
async function fi(e, t) {
|
|
3386
3399
|
let n = e.getReader(), r = !1, i = setTimeout(() => {
|
|
3387
3400
|
r = !0, n.cancel().catch(() => {});
|
|
3388
3401
|
}, t), a = [], o = 0;
|
|
3389
3402
|
try {
|
|
3390
3403
|
for (;;) {
|
|
3391
3404
|
let { done: e, value: i } = await n.read();
|
|
3392
|
-
if (r) throw new
|
|
3405
|
+
if (r) throw new B(t, "Request body read");
|
|
3393
3406
|
if (e) break;
|
|
3394
3407
|
a.push(i), o += i.byteLength;
|
|
3395
3408
|
}
|
|
@@ -3400,8 +3413,8 @@ async function ui(e, t) {
|
|
|
3400
3413
|
for (let e of a) s.set(e, c), c += e.byteLength;
|
|
3401
3414
|
return s.buffer;
|
|
3402
3415
|
}
|
|
3403
|
-
function
|
|
3404
|
-
return
|
|
3416
|
+
function pi(e) {
|
|
3417
|
+
return V(e) ? new Response("Request body timeout", {
|
|
3405
3418
|
status: 408,
|
|
3406
3419
|
headers: { "x-authhero-proxy-error": "request_body_timeout" }
|
|
3407
3420
|
}) : new Response("Bad request", {
|
|
@@ -3409,20 +3422,20 @@ function di(e) {
|
|
|
3409
3422
|
headers: { "x-authhero-proxy-error": "request_body_failed" }
|
|
3410
3423
|
});
|
|
3411
3424
|
}
|
|
3412
|
-
async function
|
|
3413
|
-
if (!
|
|
3414
|
-
let r =
|
|
3415
|
-
if (r === null || r >
|
|
3416
|
-
let i = await
|
|
3425
|
+
async function mi(e, t, n) {
|
|
3426
|
+
if (!li(e.method) || !e.body) return;
|
|
3427
|
+
let r = di(e);
|
|
3428
|
+
if (r === null || r > ui) return e.body;
|
|
3429
|
+
let i = await fi(e.body, n);
|
|
3417
3430
|
return t.set("content-length", String(i.byteLength)), i;
|
|
3418
3431
|
}
|
|
3419
|
-
async function
|
|
3432
|
+
async function hi(e, t, n) {
|
|
3420
3433
|
let r = new URL(t.url), i = new URL(e.upstream_url);
|
|
3421
|
-
i.pathname =
|
|
3434
|
+
i.pathname = ci(i.pathname, r.pathname), i.search = r.search;
|
|
3422
3435
|
let a = new Headers(t.headers);
|
|
3423
|
-
for (let e of
|
|
3436
|
+
for (let e of ai) a.delete(e);
|
|
3424
3437
|
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
|
|
3438
|
+
let o = await mi(t, a, n), s = {
|
|
3426
3439
|
method: t.method,
|
|
3427
3440
|
headers: a,
|
|
3428
3441
|
body: o,
|
|
@@ -3433,97 +3446,97 @@ async function pi(e, t, n) {
|
|
|
3433
3446
|
init: s
|
|
3434
3447
|
};
|
|
3435
3448
|
}
|
|
3436
|
-
var
|
|
3449
|
+
var gi = K({
|
|
3437
3450
|
type: "http",
|
|
3438
|
-
optionsSchema:
|
|
3451
|
+
optionsSchema: si,
|
|
3439
3452
|
build(e) {
|
|
3440
|
-
let t = e.timeout_ms ??
|
|
3453
|
+
let t = e.timeout_ms ?? oi;
|
|
3441
3454
|
return async (n) => {
|
|
3442
|
-
let r =
|
|
3455
|
+
let r = q(n), i;
|
|
3443
3456
|
try {
|
|
3444
|
-
i = await
|
|
3457
|
+
i = await hi(e, r, t);
|
|
3445
3458
|
} catch (e) {
|
|
3446
|
-
return
|
|
3459
|
+
return pi(e);
|
|
3447
3460
|
}
|
|
3448
3461
|
let { target: a, init: o } = i;
|
|
3449
3462
|
n.set("__proxy_upstream_host__", a.hostname), n.set("__proxy_upstream_origin__", `${a.protocol}//${a.host}`);
|
|
3450
3463
|
try {
|
|
3451
|
-
return await
|
|
3464
|
+
return await H(t, (e) => fetch(a.toString(), {
|
|
3452
3465
|
...o,
|
|
3453
3466
|
signal: e
|
|
3454
3467
|
}));
|
|
3455
3468
|
} catch (e) {
|
|
3456
|
-
return
|
|
3469
|
+
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
3470
|
}
|
|
3458
3471
|
};
|
|
3459
3472
|
}
|
|
3460
|
-
}),
|
|
3473
|
+
}), _i = 3e4, vi = e.object({
|
|
3461
3474
|
binding: e.string(),
|
|
3462
3475
|
upstream_url: e.string().optional(),
|
|
3463
3476
|
preserve_host: e.boolean().default(!0),
|
|
3464
3477
|
timeout_ms: e.number().int().positive().optional()
|
|
3465
3478
|
});
|
|
3466
|
-
function
|
|
3479
|
+
function yi(e) {
|
|
3467
3480
|
return typeof e == "object" && !!e && typeof e.fetch == "function";
|
|
3468
3481
|
}
|
|
3469
|
-
var
|
|
3482
|
+
var bi = K({
|
|
3470
3483
|
type: "service_binding",
|
|
3471
|
-
optionsSchema:
|
|
3484
|
+
optionsSchema: vi,
|
|
3472
3485
|
build(e, t) {
|
|
3473
3486
|
let n = t.bindings[e.binding];
|
|
3474
|
-
if (!
|
|
3475
|
-
let r = e.upstream_url ?? `https://${e.binding}.binding.invalid/`, i = e.timeout_ms ??
|
|
3487
|
+
if (!yi(n)) throw Error(`Service binding "${e.binding}" is not configured or is not a Fetcher`);
|
|
3488
|
+
let r = e.upstream_url ?? `https://${e.binding}.binding.invalid/`, i = e.timeout_ms ?? _i;
|
|
3476
3489
|
return async (t) => {
|
|
3477
|
-
let a =
|
|
3490
|
+
let a = q(t), o;
|
|
3478
3491
|
try {
|
|
3479
|
-
o = await
|
|
3492
|
+
o = await hi({
|
|
3480
3493
|
upstream_url: r,
|
|
3481
3494
|
preserve_host: e.preserve_host
|
|
3482
3495
|
}, a, i);
|
|
3483
3496
|
} catch (e) {
|
|
3484
|
-
return
|
|
3497
|
+
return pi(e);
|
|
3485
3498
|
}
|
|
3486
3499
|
let { target: s, init: c } = o;
|
|
3487
3500
|
t.set("__proxy_upstream_host__", s.hostname), t.set("__proxy_upstream_origin__", `${s.protocol}//${s.host}`);
|
|
3488
3501
|
try {
|
|
3489
|
-
return await
|
|
3502
|
+
return await H(i, async (e) => n.fetch(new Request(s.toString(), {
|
|
3490
3503
|
...c,
|
|
3491
3504
|
signal: e
|
|
3492
3505
|
})));
|
|
3493
3506
|
} catch (e) {
|
|
3494
|
-
return
|
|
3507
|
+
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
3508
|
}
|
|
3496
3509
|
};
|
|
3497
3510
|
}
|
|
3498
|
-
}),
|
|
3511
|
+
}), xi = 3e4, Si = e.object({
|
|
3499
3512
|
binding: e.string(),
|
|
3500
3513
|
script_name: e.string(),
|
|
3501
3514
|
cpu_ms: e.number().int().positive().optional(),
|
|
3502
3515
|
subrequests: e.number().int().positive().optional(),
|
|
3503
3516
|
timeout_ms: e.number().int().positive().optional()
|
|
3504
3517
|
});
|
|
3505
|
-
function
|
|
3518
|
+
function Ci(e) {
|
|
3506
3519
|
return typeof e == "object" && !!e && typeof e.get == "function";
|
|
3507
3520
|
}
|
|
3508
|
-
var
|
|
3509
|
-
function
|
|
3510
|
-
return
|
|
3521
|
+
var Y = /\{(tenant_id|custom_domain_id|domain|host)\}/g;
|
|
3522
|
+
function wi(e) {
|
|
3523
|
+
return Y.lastIndex = 0, Y.test(e);
|
|
3511
3524
|
}
|
|
3512
|
-
var
|
|
3525
|
+
var Ti = K({
|
|
3513
3526
|
type: "dispatch_namespace",
|
|
3514
|
-
optionsSchema:
|
|
3527
|
+
optionsSchema: Si,
|
|
3515
3528
|
build(e, t) {
|
|
3516
3529
|
let n = t.bindings[e.binding];
|
|
3517
|
-
if (!
|
|
3518
|
-
let r =
|
|
3530
|
+
if (!Ci(n)) throw Error(`Dispatch namespace binding "${e.binding}" is not configured or does not expose .get()`);
|
|
3531
|
+
let r = wi(e.script_name), i = e.timeout_ms ?? xi, a = e.cpu_ms || e.subrequests ? { limits: {
|
|
3519
3532
|
...e.cpu_ms ? { cpuMs: e.cpu_ms } : {},
|
|
3520
3533
|
...e.subrequests ? { subrequests: e.subrequests } : {}
|
|
3521
3534
|
} } : void 0;
|
|
3522
3535
|
return async (t) => {
|
|
3523
3536
|
let o = e.script_name;
|
|
3524
3537
|
if (r) {
|
|
3525
|
-
let n =
|
|
3526
|
-
if (o = o.replace(
|
|
3538
|
+
let n = Mr(t), r = Nr(t), i = Pr(t), a = t.req.header("host") ?? t.req.header("x-forwarded-host") ?? "";
|
|
3539
|
+
if (o = o.replace(Y, (e, t) => {
|
|
3527
3540
|
switch (t) {
|
|
3528
3541
|
case "tenant_id": return n ?? "";
|
|
3529
3542
|
case "custom_domain_id": return r ?? "";
|
|
@@ -3533,19 +3546,19 @@ var Ci = G({
|
|
|
3533
3546
|
}
|
|
3534
3547
|
}), o.includes("{") || o === "") return t.text(`dispatch_namespace: could not resolve script name from template "${e.script_name}"`, 500);
|
|
3535
3548
|
}
|
|
3536
|
-
let s =
|
|
3549
|
+
let s = q(t);
|
|
3537
3550
|
try {
|
|
3538
3551
|
let e = n.get(o, void 0, a);
|
|
3539
|
-
return await
|
|
3552
|
+
return await H(i, async (t) => {
|
|
3540
3553
|
let n = new Request(s, { signal: t });
|
|
3541
3554
|
return e.fetch(n);
|
|
3542
3555
|
});
|
|
3543
3556
|
} catch (e) {
|
|
3544
|
-
return
|
|
3557
|
+
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
3558
|
}
|
|
3546
3559
|
};
|
|
3547
3560
|
}
|
|
3548
|
-
}),
|
|
3561
|
+
}), Ei = K({
|
|
3549
3562
|
type: "redirect",
|
|
3550
3563
|
optionsSchema: e.object({
|
|
3551
3564
|
upstream_url: e.string().refine((e) => {
|
|
@@ -3574,7 +3587,7 @@ var Ci = G({
|
|
|
3574
3587
|
});
|
|
3575
3588
|
};
|
|
3576
3589
|
}
|
|
3577
|
-
}),
|
|
3590
|
+
}), Di = K({
|
|
3578
3591
|
type: "static",
|
|
3579
3592
|
optionsSchema: e.object({
|
|
3580
3593
|
status: e.number().int().default(200),
|
|
@@ -3594,15 +3607,15 @@ var Ci = G({
|
|
|
3594
3607
|
});
|
|
3595
3608
|
//#endregion
|
|
3596
3609
|
//#region src/data-plane/handlers/index.ts
|
|
3597
|
-
function
|
|
3598
|
-
e.add(
|
|
3610
|
+
function Oi(e) {
|
|
3611
|
+
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
3612
|
}
|
|
3600
3613
|
//#endregion
|
|
3601
3614
|
//#region src/data-plane/matcher.ts
|
|
3602
|
-
function
|
|
3615
|
+
function ki(e) {
|
|
3603
3616
|
return [...e].sort((e, t) => e.priority === t.priority ? e.created_at.localeCompare(t.created_at) : e.priority - t.priority);
|
|
3604
3617
|
}
|
|
3605
|
-
function
|
|
3618
|
+
function Ai(e, t) {
|
|
3606
3619
|
let n = e.toLowerCase(), r = t.toLowerCase();
|
|
3607
3620
|
if (n === r) return !0;
|
|
3608
3621
|
if (n.startsWith("*.")) {
|
|
@@ -3611,13 +3624,13 @@ function Y(e, t) {
|
|
|
3611
3624
|
}
|
|
3612
3625
|
return !1;
|
|
3613
3626
|
}
|
|
3614
|
-
function
|
|
3615
|
-
return !e || e.length === 0 ? !0 : e.some((e) =>
|
|
3627
|
+
function ji(e, t) {
|
|
3628
|
+
return !e || e.length === 0 ? !0 : e.some((e) => Ai(e, t));
|
|
3616
3629
|
}
|
|
3617
|
-
function
|
|
3630
|
+
function Mi(e) {
|
|
3618
3631
|
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
3632
|
return async (e, i) => {
|
|
3620
|
-
if (r && !
|
|
3633
|
+
if (r && !ji(r, e.req.header("host") ?? "")) return new Response("No matching route", { status: 404 });
|
|
3621
3634
|
for (let [n, r] of t) {
|
|
3622
3635
|
let t = e.req.header(n);
|
|
3623
3636
|
if (t === void 0 || !r.test(t)) return new Response("No matching route", { status: 404 });
|
|
@@ -3634,17 +3647,17 @@ function ki(e) {
|
|
|
3634
3647
|
}
|
|
3635
3648
|
//#endregion
|
|
3636
3649
|
//#region src/data-plane/compile.ts
|
|
3637
|
-
var
|
|
3638
|
-
function
|
|
3650
|
+
var Ni = "forwarded_headers";
|
|
3651
|
+
function Pi(e) {
|
|
3639
3652
|
return e.some((e) => e.type === "forwarded_headers") ? [...e] : [{
|
|
3640
|
-
type:
|
|
3653
|
+
type: Ni,
|
|
3641
3654
|
options: {}
|
|
3642
3655
|
}, ...e];
|
|
3643
3656
|
}
|
|
3644
3657
|
function X(e, t) {
|
|
3645
|
-
return e.has("forwarded_headers") ?
|
|
3658
|
+
return e.has("forwarded_headers") ? Pi(t) : [...t];
|
|
3646
3659
|
}
|
|
3647
|
-
var
|
|
3660
|
+
var Fi = [
|
|
3648
3661
|
"GET",
|
|
3649
3662
|
"POST",
|
|
3650
3663
|
"PUT",
|
|
@@ -3656,39 +3669,39 @@ var Mi = [
|
|
|
3656
3669
|
function Z(e, n, r, i) {
|
|
3657
3670
|
let a = new t();
|
|
3658
3671
|
r && a.use("*", async (e, t) => {
|
|
3659
|
-
|
|
3672
|
+
jr(e, r), await t();
|
|
3660
3673
|
});
|
|
3661
|
-
let o =
|
|
3674
|
+
let o = ki(e);
|
|
3662
3675
|
for (let e of o) {
|
|
3663
3676
|
let t = [];
|
|
3664
|
-
t.push(
|
|
3677
|
+
t.push(Mi(e.match));
|
|
3665
3678
|
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()) :
|
|
3679
|
+
let r = e.match.methods?.length ? e.match.methods.map((e) => e.toUpperCase()) : Fi, i = e.match.path || "/*";
|
|
3667
3680
|
a.on(r, [i], ...t);
|
|
3668
3681
|
}
|
|
3669
|
-
return i && i.length > 0 ? a.on(
|
|
3670
|
-
let n =
|
|
3682
|
+
return i && i.length > 0 ? a.on(Fi, ["*"], ...i) : a.all("*", (e) => e.text("No matching route", 404)), a.onError((e, t) => {
|
|
3683
|
+
let n = V(e);
|
|
3671
3684
|
return t.text(n ? "Upstream timeout" : "Bad gateway", n ? 504 : 502, { "x-authhero-proxy-error": n ? "handler_timeout" : "handler_failed" });
|
|
3672
3685
|
}), a;
|
|
3673
3686
|
}
|
|
3674
3687
|
//#endregion
|
|
3675
3688
|
//#region src/data-plane/router.ts
|
|
3676
|
-
var
|
|
3677
|
-
function
|
|
3678
|
-
return e.resolver ? e.resolver : e.cache ?
|
|
3689
|
+
var Ii = 1e4;
|
|
3690
|
+
function Li(e) {
|
|
3691
|
+
return e.resolver ? e.resolver : e.cache ? G(e.data, e.cache) : G(e.data, e.cacheTtlMs ?? 3e4);
|
|
3679
3692
|
}
|
|
3680
|
-
function
|
|
3693
|
+
function Ri(e) {
|
|
3681
3694
|
if (e.registry) return e.registry;
|
|
3682
|
-
let t = new
|
|
3683
|
-
return
|
|
3695
|
+
let t = new wr(e.bindings ?? {});
|
|
3696
|
+
return Oi(t), t;
|
|
3684
3697
|
}
|
|
3685
3698
|
function Q(e) {
|
|
3686
|
-
let t =
|
|
3699
|
+
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
3700
|
return async (e) => {
|
|
3688
3701
|
let s = e.req.header("host") ?? e.req.header("x-forwarded-host");
|
|
3689
3702
|
if (!s) return e.text("Missing host", 400);
|
|
3690
3703
|
try {
|
|
3691
|
-
let c = await
|
|
3704
|
+
let c = await U(i, "resolveHost", void 0, (e) => t.resolveHost(s, { signal: e }));
|
|
3692
3705
|
if (!c) return o ? await o.fetch(e.req.raw) : e.text("Unknown host", 404);
|
|
3693
3706
|
let l = r.get(c);
|
|
3694
3707
|
return l || (l = Z(c.routes, n, {
|
|
@@ -3697,17 +3710,17 @@ function Q(e) {
|
|
|
3697
3710
|
domain: c.domain
|
|
3698
3711
|
}, a), r.set(c, l)), await l.fetch(e.req.raw);
|
|
3699
3712
|
} catch (t) {
|
|
3700
|
-
return o ? await o.fetch(e.req.raw) :
|
|
3713
|
+
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
3714
|
}
|
|
3702
3715
|
};
|
|
3703
3716
|
}
|
|
3704
|
-
function
|
|
3717
|
+
function zi(e) {
|
|
3705
3718
|
let n = new t();
|
|
3706
3719
|
return n.all("*", Q(e)), n;
|
|
3707
3720
|
}
|
|
3708
3721
|
//#endregion
|
|
3709
3722
|
//#region src/app.ts
|
|
3710
|
-
function
|
|
3723
|
+
function Bi(e) {
|
|
3711
3724
|
let n = new t();
|
|
3712
3725
|
return n.all("*", Q({
|
|
3713
3726
|
data: e.data,
|
|
@@ -3719,62 +3732,62 @@ function Li(e) {
|
|
|
3719
3732
|
resolveHostTimeoutMs: e.resolveHostTimeoutMs,
|
|
3720
3733
|
defaultHandlers: e.defaultHandlers
|
|
3721
3734
|
})), n.onError((e, t) => {
|
|
3722
|
-
let n =
|
|
3735
|
+
let n = V(e);
|
|
3723
3736
|
return t.text(n ? "Proxy timeout" : "Bad gateway", n ? 504 : 502, { "x-authhero-proxy-error": n ? "proxy_timeout" : "proxy_error" });
|
|
3724
3737
|
}), n;
|
|
3725
3738
|
}
|
|
3726
3739
|
//#endregion
|
|
3727
3740
|
//#region src/data-plane/cache-api-cache.ts
|
|
3728
|
-
var
|
|
3729
|
-
function
|
|
3741
|
+
var Vi = 1e3, Hi = 1e3;
|
|
3742
|
+
function Ui(e, t) {
|
|
3730
3743
|
return new Request(`https://proxy-cache.internal/${encodeURIComponent(e)}/hosts/${encodeURIComponent(t.toLowerCase())}`, { method: "GET" });
|
|
3731
3744
|
}
|
|
3732
|
-
function
|
|
3745
|
+
function Wi() {
|
|
3733
3746
|
return globalThis.caches?.default;
|
|
3734
3747
|
}
|
|
3735
|
-
function
|
|
3736
|
-
let t = e.cache ??
|
|
3748
|
+
function Gi(e) {
|
|
3749
|
+
let t = e.cache ?? Wi();
|
|
3737
3750
|
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 ??
|
|
3751
|
+
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
3752
|
async function l(e) {
|
|
3740
3753
|
try {
|
|
3741
|
-
return await
|
|
3754
|
+
return await W(Promise.resolve(n.match(e)), s, "cache.match");
|
|
3742
3755
|
} catch {
|
|
3743
3756
|
return;
|
|
3744
3757
|
}
|
|
3745
3758
|
}
|
|
3746
3759
|
return { async resolveHost(t, s) {
|
|
3747
|
-
let u =
|
|
3760
|
+
let u = Ui(r, t), d = await l(u);
|
|
3748
3761
|
if (d) try {
|
|
3749
3762
|
return (await d.json()).value;
|
|
3750
3763
|
} catch {}
|
|
3751
3764
|
let f = await e.upstream.resolveHost(t, s), p = f === null ? a : i, m = new Response(JSON.stringify({ value: f }), { headers: {
|
|
3752
3765
|
"content-type": "application/json",
|
|
3753
3766
|
"cache-control": `public, max-age=${p}`
|
|
3754
|
-
} }), h =
|
|
3767
|
+
} }), h = W(Promise.resolve(n.put(u, m)), c, "cache.put").catch(() => void 0);
|
|
3755
3768
|
return o ? o(h) : await h, f;
|
|
3756
3769
|
} };
|
|
3757
3770
|
}
|
|
3758
|
-
function
|
|
3759
|
-
return
|
|
3771
|
+
function Ki(e, t) {
|
|
3772
|
+
return Ui(e, t);
|
|
3760
3773
|
}
|
|
3761
3774
|
//#endregion
|
|
3762
3775
|
//#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 =
|
|
3776
|
+
var qi = 1e3, Ji = 1e3, Yi = 5e3;
|
|
3777
|
+
function Xi(e) {
|
|
3778
|
+
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
3779
|
function m(e) {
|
|
3767
3780
|
return `${s}:${e.toLowerCase()}`;
|
|
3768
3781
|
}
|
|
3769
3782
|
async function h(e) {
|
|
3770
3783
|
try {
|
|
3771
|
-
return await
|
|
3784
|
+
return await W(n.get(e), l, "cache.get") ?? null;
|
|
3772
3785
|
} catch {
|
|
3773
3786
|
return null;
|
|
3774
3787
|
}
|
|
3775
3788
|
}
|
|
3776
3789
|
function g(e, t, r) {
|
|
3777
|
-
let i =
|
|
3790
|
+
let i = W(Promise.resolve().then(() => n.set(e, t, r)), u, "cache.set").catch(() => void 0);
|
|
3778
3791
|
return c ? (c(i), Promise.resolve()) : i;
|
|
3779
3792
|
}
|
|
3780
3793
|
function _(e, t) {
|
|
@@ -3782,7 +3795,7 @@ function qi(e) {
|
|
|
3782
3795
|
return n === void 0 ? !1 : t - n < f ? !0 : (p.delete(e), !1);
|
|
3783
3796
|
}
|
|
3784
3797
|
function ee(e, n) {
|
|
3785
|
-
return d > 0 ?
|
|
3798
|
+
return d > 0 ? U(d, "resolveHost", n, (n) => t.resolveHost(e, { signal: n })) : t.resolveHost(e, { signal: n });
|
|
3786
3799
|
}
|
|
3787
3800
|
async function v(e, t) {
|
|
3788
3801
|
return p.set(e, Date.now()), (async () => {
|
|
@@ -3819,7 +3832,7 @@ function qi(e) {
|
|
|
3819
3832
|
}
|
|
3820
3833
|
} };
|
|
3821
3834
|
}
|
|
3822
|
-
function
|
|
3835
|
+
function Zi(e, t) {
|
|
3823
3836
|
return `${e}:${t.toLowerCase()}`;
|
|
3824
3837
|
}
|
|
3825
3838
|
//#endregion
|
|
@@ -3827,7 +3840,7 @@ function Ji(e, t) {
|
|
|
3827
3840
|
function $() {
|
|
3828
3841
|
throw Error("Static proxy adapter is read-only; configure routes at init time");
|
|
3829
3842
|
}
|
|
3830
|
-
function
|
|
3843
|
+
function Qi(e, t, n, r, i, a) {
|
|
3831
3844
|
return {
|
|
3832
3845
|
id: e.id ?? `${n}:${t}`,
|
|
3833
3846
|
tenant_id: r,
|
|
@@ -3842,10 +3855,10 @@ function Yi(e, t, n, r, i, a) {
|
|
|
3842
3855
|
updated_at: e.updated_at ?? a
|
|
3843
3856
|
};
|
|
3844
3857
|
}
|
|
3845
|
-
function
|
|
3858
|
+
function $i(e) {
|
|
3846
3859
|
let t = (/* @__PURE__ */ new Date()).toISOString(), n = e.defaultTenantId ?? "static", r = /* @__PURE__ */ new Map();
|
|
3847
3860
|
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) =>
|
|
3861
|
+
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
3862
|
r.set(e, {
|
|
3850
3863
|
tenant_id: s,
|
|
3851
3864
|
custom_domain_id: c,
|
|
@@ -3889,7 +3902,7 @@ function Xi(e) {
|
|
|
3889
3902
|
}
|
|
3890
3903
|
};
|
|
3891
3904
|
}
|
|
3892
|
-
function
|
|
3905
|
+
function ea(e, t = {}) {
|
|
3893
3906
|
return {
|
|
3894
3907
|
priority: t.priority,
|
|
3895
3908
|
match: { path: t.path ?? "/*" },
|
|
@@ -3904,10 +3917,10 @@ function Zi(e, t = {}) {
|
|
|
3904
3917
|
}
|
|
3905
3918
|
//#endregion
|
|
3906
3919
|
//#region src/constants.ts
|
|
3907
|
-
var
|
|
3920
|
+
var ta = "proxy:resolve_host";
|
|
3908
3921
|
//#endregion
|
|
3909
3922
|
//#region src/http-adapter/index.ts
|
|
3910
|
-
function
|
|
3923
|
+
function na() {
|
|
3911
3924
|
let e = () => {
|
|
3912
3925
|
throw Error("HTTP proxy adapter does not expose write access to proxy_routes; mutate via the control-plane management API");
|
|
3913
3926
|
};
|
|
@@ -3929,12 +3942,12 @@ function $i() {
|
|
|
3929
3942
|
}
|
|
3930
3943
|
};
|
|
3931
3944
|
}
|
|
3932
|
-
function
|
|
3945
|
+
function ra(e) {
|
|
3933
3946
|
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
3947
|
function c(e, t) {
|
|
3935
|
-
let n = new AbortController(), r =
|
|
3948
|
+
let n = new AbortController(), r = xr([e, n.signal]) ?? n.signal, i, a = new Promise((e, t) => {
|
|
3936
3949
|
i = setTimeout(() => {
|
|
3937
|
-
n.abort(), t(new
|
|
3950
|
+
n.abort(), t(new B(s, "control plane"));
|
|
3938
3951
|
}, s);
|
|
3939
3952
|
});
|
|
3940
3953
|
return Promise.race([t(r), a]).finally(() => clearTimeout(i));
|
|
@@ -3966,7 +3979,7 @@ function ea(e) {
|
|
|
3966
3979
|
return l && l.expires_at > Date.now() ? l.value : u(e);
|
|
3967
3980
|
}
|
|
3968
3981
|
return {
|
|
3969
|
-
proxyRoutes:
|
|
3982
|
+
proxyRoutes: na(),
|
|
3970
3983
|
async resolveHost(e, i) {
|
|
3971
3984
|
let a = i?.signal, o = await d(a), s = `${n}${r}${encodeURIComponent(e.toLowerCase())}`;
|
|
3972
3985
|
return c(a, async (e) => {
|
|
@@ -3983,7 +3996,7 @@ function ea(e) {
|
|
|
3983
3996
|
}
|
|
3984
3997
|
//#endregion
|
|
3985
3998
|
//#region src/http-adapter/service-binding-fetch.ts
|
|
3986
|
-
function
|
|
3999
|
+
function ia(e) {
|
|
3987
4000
|
return (t, n) => {
|
|
3988
4001
|
let r = t instanceof Request && n === void 0 ? t : new Request(t, n);
|
|
3989
4002
|
return e.fetch(r);
|
|
@@ -3991,11 +4004,11 @@ function ta(e) {
|
|
|
3991
4004
|
}
|
|
3992
4005
|
//#endregion
|
|
3993
4006
|
//#region src/kv-adapter/index.ts
|
|
3994
|
-
var
|
|
3995
|
-
function
|
|
4007
|
+
var aa = "authhero-proxy-host:";
|
|
4008
|
+
function oa(e, t) {
|
|
3996
4009
|
return `${e}${t.toLowerCase()}`;
|
|
3997
4010
|
}
|
|
3998
|
-
function
|
|
4011
|
+
function sa() {
|
|
3999
4012
|
let e = () => {
|
|
4000
4013
|
throw Error("KV proxy adapter does not expose write access to proxy_routes; mutate via the control-plane management API");
|
|
4001
4014
|
};
|
|
@@ -4017,15 +4030,15 @@ function ia() {
|
|
|
4017
4030
|
}
|
|
4018
4031
|
};
|
|
4019
4032
|
}
|
|
4020
|
-
function
|
|
4021
|
-
let { kv: t, keyPrefix: n =
|
|
4033
|
+
function ca(e) {
|
|
4034
|
+
let { kv: t, keyPrefix: n = aa, timeoutMs: r } = e;
|
|
4022
4035
|
return {
|
|
4023
|
-
proxyRoutes:
|
|
4036
|
+
proxyRoutes: sa(),
|
|
4024
4037
|
async resolveHost(e) {
|
|
4025
|
-
let i =
|
|
4026
|
-
return (r && r > 0 ? await
|
|
4038
|
+
let i = oa(n, e), a = t.get(i, "json");
|
|
4039
|
+
return (r && r > 0 ? await W(a, r, "kv.get") : await a) ?? null;
|
|
4027
4040
|
}
|
|
4028
4041
|
};
|
|
4029
4042
|
}
|
|
4030
4043
|
//#endregion
|
|
4031
|
-
export {
|
|
4044
|
+
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 };
|