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