@authhero/proxy 0.11.7 → 0.11.8
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 +601 -568
- package/dist/tsconfig.types.tsbuildinfo +1 -1
- package/package.json +2 -2
package/dist/proxy.mjs
CHANGED
|
@@ -4,30 +4,43 @@ import { Hono as t } from "hono";
|
|
|
4
4
|
var n = e.object({
|
|
5
5
|
created_at: e.string(),
|
|
6
6
|
updated_at: e.string()
|
|
7
|
-
}), r = e.
|
|
7
|
+
}), r = e.enum([
|
|
8
|
+
"local",
|
|
9
|
+
"shared",
|
|
10
|
+
"platform"
|
|
11
|
+
]), i = e.enum([
|
|
12
|
+
"none",
|
|
13
|
+
"secrets",
|
|
14
|
+
"fields"
|
|
15
|
+
]), a = {
|
|
16
|
+
scope: r.optional(),
|
|
17
|
+
override: i.optional(),
|
|
18
|
+
enforce: e.boolean().optional()
|
|
19
|
+
}, o = e.object({
|
|
8
20
|
id: e.string(),
|
|
9
21
|
version: e.string().optional()
|
|
10
|
-
}),
|
|
22
|
+
}), s = e.object({
|
|
11
23
|
name: e.string(),
|
|
12
24
|
version: e.string()
|
|
13
|
-
}),
|
|
25
|
+
}), c = e.object({
|
|
14
26
|
name: e.string(),
|
|
15
27
|
value: e.string().optional()
|
|
16
|
-
}),
|
|
28
|
+
}), l = e.object({
|
|
17
29
|
name: e.string().max(255),
|
|
18
30
|
code: e.string().max(1e5),
|
|
19
|
-
supported_triggers: e.array(
|
|
31
|
+
supported_triggers: e.array(o).optional(),
|
|
20
32
|
runtime: e.string().max(50).optional(),
|
|
21
|
-
dependencies: e.array(
|
|
22
|
-
secrets: e.array(
|
|
33
|
+
dependencies: e.array(s).optional(),
|
|
34
|
+
secrets: e.array(c).optional(),
|
|
23
35
|
is_system: e.boolean().optional(),
|
|
36
|
+
...a,
|
|
24
37
|
inherit: e.boolean().optional()
|
|
25
38
|
});
|
|
26
|
-
|
|
39
|
+
l.partial().extend({
|
|
27
40
|
status: e.enum(["draft", "built"]).optional(),
|
|
28
41
|
deployed_at: e.string().optional()
|
|
29
42
|
});
|
|
30
|
-
var
|
|
43
|
+
var u = l.extend({
|
|
31
44
|
id: e.string(),
|
|
32
45
|
tenant_id: e.string(),
|
|
33
46
|
status: e.enum(["draft", "built"]).default("built"),
|
|
@@ -36,25 +49,25 @@ var s = o.extend({
|
|
|
36
49
|
name: e.string(),
|
|
37
50
|
value: e.string().optional()
|
|
38
51
|
})).optional()
|
|
39
|
-
}).extend(n.shape),
|
|
40
|
-
|
|
41
|
-
var
|
|
52
|
+
}).extend(n.shape), d = e.object({ name: e.string() });
|
|
53
|
+
u.extend({ secrets: e.array(d).optional() });
|
|
54
|
+
var f = e.string(), p = e.enum([
|
|
42
55
|
"unspecified",
|
|
43
56
|
"pending",
|
|
44
57
|
"final",
|
|
45
58
|
"partial",
|
|
46
59
|
"canceled",
|
|
47
60
|
"suspended"
|
|
48
|
-
]),
|
|
61
|
+
]), m = e.object({
|
|
49
62
|
id: e.string(),
|
|
50
63
|
msg: e.string(),
|
|
51
64
|
url: e.string().optional()
|
|
52
|
-
}),
|
|
65
|
+
}), h = e.object({
|
|
53
66
|
action_name: e.string(),
|
|
54
|
-
error:
|
|
67
|
+
error: m.nullable(),
|
|
55
68
|
started_at: e.string(),
|
|
56
69
|
ended_at: e.string()
|
|
57
|
-
}),
|
|
70
|
+
}), g = e.object({
|
|
58
71
|
level: e.enum([
|
|
59
72
|
"log",
|
|
60
73
|
"info",
|
|
@@ -63,17 +76,17 @@ var l = e.string(), u = e.enum([
|
|
|
63
76
|
"debug"
|
|
64
77
|
]),
|
|
65
78
|
message: e.string()
|
|
66
|
-
}),
|
|
79
|
+
}), _ = e.array(e.object({
|
|
67
80
|
action_name: e.string(),
|
|
68
|
-
lines: e.array(
|
|
81
|
+
lines: e.array(g)
|
|
69
82
|
}));
|
|
70
83
|
e.object({
|
|
71
84
|
id: e.string(),
|
|
72
85
|
tenant_id: e.string(),
|
|
73
|
-
trigger_id:
|
|
74
|
-
status:
|
|
75
|
-
results: e.array(
|
|
76
|
-
logs:
|
|
86
|
+
trigger_id: f,
|
|
87
|
+
status: p,
|
|
88
|
+
results: e.array(h),
|
|
89
|
+
logs: _.optional(),
|
|
77
90
|
created_at: e.string(),
|
|
78
91
|
updated_at: e.string()
|
|
79
92
|
}).omit({
|
|
@@ -84,21 +97,21 @@ e.object({
|
|
|
84
97
|
action_id: e.string(),
|
|
85
98
|
code: e.string().max(1e5),
|
|
86
99
|
runtime: e.string().max(50).optional(),
|
|
87
|
-
dependencies: e.array(
|
|
88
|
-
secrets: e.array(
|
|
89
|
-
supported_triggers: e.array(
|
|
100
|
+
dependencies: e.array(s).optional(),
|
|
101
|
+
secrets: e.array(c).optional(),
|
|
102
|
+
supported_triggers: e.array(o).optional(),
|
|
90
103
|
deployed: e.boolean().default(!0)
|
|
91
104
|
}).extend({
|
|
92
105
|
id: e.string(),
|
|
93
106
|
tenant_id: e.string(),
|
|
94
107
|
number: e.number().int()
|
|
95
108
|
}).extend(n.shape);
|
|
96
|
-
var
|
|
109
|
+
var ee = e.enum([
|
|
97
110
|
"user_action",
|
|
98
111
|
"admin_action",
|
|
99
112
|
"system",
|
|
100
113
|
"api"
|
|
101
|
-
]),
|
|
114
|
+
]), v = e.object({
|
|
102
115
|
type: e.enum([
|
|
103
116
|
"user",
|
|
104
117
|
"admin",
|
|
@@ -112,7 +125,7 @@ var h = e.enum([
|
|
|
112
125
|
org_name: e.string().optional(),
|
|
113
126
|
scopes: e.array(e.string()).optional(),
|
|
114
127
|
client_id: e.string().optional()
|
|
115
|
-
}),
|
|
128
|
+
}), te = e.object({
|
|
116
129
|
type: e.string(),
|
|
117
130
|
id: e.string(),
|
|
118
131
|
before: e.record(e.string(), e.unknown()).optional(),
|
|
@@ -121,7 +134,18 @@ var h = e.enum([
|
|
|
121
134
|
old: e.unknown(),
|
|
122
135
|
new: e.unknown()
|
|
123
136
|
})).optional()
|
|
124
|
-
}),
|
|
137
|
+
}), ne = e.object({
|
|
138
|
+
user: e.object({
|
|
139
|
+
user_id: e.string(),
|
|
140
|
+
name: e.string().optional(),
|
|
141
|
+
email: e.string().optional()
|
|
142
|
+
}).optional(),
|
|
143
|
+
strategy: e.string(),
|
|
144
|
+
credentials: e.object({
|
|
145
|
+
jti: e.string().optional(),
|
|
146
|
+
scopes: e.array(e.string()).optional()
|
|
147
|
+
}).optional()
|
|
148
|
+
}), re = e.object({
|
|
125
149
|
method: e.string(),
|
|
126
150
|
path: e.string(),
|
|
127
151
|
query: e.record(e.string(), e.string()).optional(),
|
|
@@ -130,18 +154,19 @@ var h = e.enum([
|
|
|
130
154
|
user_agent: e.string().optional(),
|
|
131
155
|
correlation_id: e.string().optional(),
|
|
132
156
|
redirect_uri: e.string().optional(),
|
|
133
|
-
authorization_url: e.string().optional()
|
|
134
|
-
|
|
157
|
+
authorization_url: e.string().optional(),
|
|
158
|
+
auth: ne.optional()
|
|
159
|
+
}), ie = e.object({
|
|
135
160
|
status_code: e.number(),
|
|
136
161
|
body: e.unknown().optional()
|
|
137
|
-
}),
|
|
162
|
+
}), ae = e.object({
|
|
138
163
|
country_code: e.string(),
|
|
139
164
|
city_name: e.string(),
|
|
140
165
|
latitude: e.string(),
|
|
141
166
|
longitude: e.string(),
|
|
142
167
|
time_zone: e.string(),
|
|
143
168
|
continent_code: e.string()
|
|
144
|
-
}),
|
|
169
|
+
}), oe = e.object({
|
|
145
170
|
name: e.string(),
|
|
146
171
|
version: e.string(),
|
|
147
172
|
env: e.record(e.string(), e.string()).optional()
|
|
@@ -151,11 +176,11 @@ e.object({
|
|
|
151
176
|
event_type: e.string(),
|
|
152
177
|
log_type: e.string(),
|
|
153
178
|
description: e.string().optional(),
|
|
154
|
-
category:
|
|
155
|
-
actor:
|
|
156
|
-
target:
|
|
157
|
-
request:
|
|
158
|
-
response:
|
|
179
|
+
category: ee,
|
|
180
|
+
actor: v,
|
|
181
|
+
target: te,
|
|
182
|
+
request: re,
|
|
183
|
+
response: ie.optional(),
|
|
159
184
|
connection: e.string().optional(),
|
|
160
185
|
connection_id: e.string().optional(),
|
|
161
186
|
client_name: e.string().optional(),
|
|
@@ -163,8 +188,8 @@ e.object({
|
|
|
163
188
|
strategy_type: e.string().optional(),
|
|
164
189
|
audience: e.string().optional(),
|
|
165
190
|
scope: e.string().optional(),
|
|
166
|
-
location:
|
|
167
|
-
auth0_client:
|
|
191
|
+
location: ae.optional(),
|
|
192
|
+
auth0_client: oe.optional(),
|
|
168
193
|
hostname: e.string(),
|
|
169
194
|
is_mobile: e.boolean().optional(),
|
|
170
195
|
execution_id: e.string().optional(),
|
|
@@ -182,14 +207,14 @@ e.object({
|
|
|
182
207
|
"SEND_REQUEST",
|
|
183
208
|
"SEND_EMAIL"
|
|
184
209
|
]), e.enum(["VERIFY_EMAIL"]);
|
|
185
|
-
var
|
|
210
|
+
var se = e.object({
|
|
186
211
|
require_mx_record: e.boolean().optional(),
|
|
187
212
|
block_aliases: e.boolean().optional(),
|
|
188
213
|
block_free_emails: e.boolean().optional(),
|
|
189
214
|
block_disposable_emails: e.boolean().optional(),
|
|
190
215
|
blocklist: e.array(e.string()).optional(),
|
|
191
216
|
allowlist: e.array(e.string()).optional()
|
|
192
|
-
}),
|
|
217
|
+
}), ce = e.object({
|
|
193
218
|
id: e.string(),
|
|
194
219
|
alias: e.string().max(100).optional(),
|
|
195
220
|
type: e.literal("AUTH0"),
|
|
@@ -201,7 +226,7 @@ var re = e.object({
|
|
|
201
226
|
user_id: e.string(),
|
|
202
227
|
changes: e.record(e.string(), e.any())
|
|
203
228
|
})
|
|
204
|
-
}),
|
|
229
|
+
}), le = e.object({
|
|
205
230
|
id: e.string(),
|
|
206
231
|
alias: e.string().max(100).optional(),
|
|
207
232
|
type: e.literal("EMAIL"),
|
|
@@ -210,13 +235,13 @@ var re = e.object({
|
|
|
210
235
|
mask_output: e.boolean().optional(),
|
|
211
236
|
params: e.object({
|
|
212
237
|
email: e.string(),
|
|
213
|
-
rules:
|
|
238
|
+
rules: se.optional()
|
|
214
239
|
})
|
|
215
|
-
}),
|
|
240
|
+
}), ue = e.enum([
|
|
216
241
|
"change-email",
|
|
217
242
|
"account",
|
|
218
243
|
"custom"
|
|
219
|
-
]),
|
|
244
|
+
]), de = e.object({
|
|
220
245
|
id: e.string(),
|
|
221
246
|
alias: e.string().max(100).optional(),
|
|
222
247
|
type: e.literal("REDIRECT"),
|
|
@@ -224,17 +249,17 @@ var re = e.object({
|
|
|
224
249
|
allow_failure: e.boolean().optional(),
|
|
225
250
|
mask_output: e.boolean().optional(),
|
|
226
251
|
params: e.object({
|
|
227
|
-
target:
|
|
252
|
+
target: ue.openapi({ description: "The predefined target to redirect to, or 'custom' for a custom URL" }),
|
|
228
253
|
custom_url: e.string().optional().openapi({ description: "Custom URL to redirect to when target is 'custom'" })
|
|
229
254
|
})
|
|
230
|
-
}),
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
255
|
+
}), fe = e.union([
|
|
256
|
+
ce,
|
|
257
|
+
le,
|
|
258
|
+
de
|
|
234
259
|
]);
|
|
235
260
|
e.object({
|
|
236
261
|
name: e.string().min(1).max(150).openapi({ description: "The name of the flow" }),
|
|
237
|
-
actions: e.array(
|
|
262
|
+
actions: e.array(fe).optional().default([]).openapi({ description: "The list of actions to execute in sequence" })
|
|
238
263
|
}).extend(n.shape).extend({ id: e.string().openapi({
|
|
239
264
|
description: "Unique identifier for the flow",
|
|
240
265
|
example: "af_12tMpdJ3iek7svMyZkSh5M"
|
|
@@ -251,7 +276,7 @@ e.object({
|
|
|
251
276
|
total: e.number().optional(),
|
|
252
277
|
next: e.string().optional()
|
|
253
278
|
});
|
|
254
|
-
var
|
|
279
|
+
var pe = e.object({
|
|
255
280
|
email: e.string().optional(),
|
|
256
281
|
email_verified: e.boolean().optional(),
|
|
257
282
|
name: e.string().optional(),
|
|
@@ -260,7 +285,7 @@ var le = e.object({
|
|
|
260
285
|
phone_number: e.string().optional(),
|
|
261
286
|
phone_verified: e.boolean().optional(),
|
|
262
287
|
family_name: e.string().optional()
|
|
263
|
-
}).catchall(e.any()),
|
|
288
|
+
}).catchall(e.any()), me = e.object({
|
|
264
289
|
connection: e.string(),
|
|
265
290
|
user_id: e.string(),
|
|
266
291
|
provider: e.string(),
|
|
@@ -273,15 +298,15 @@ var le = e.object({
|
|
|
273
298
|
access_token: e.string().optional(),
|
|
274
299
|
access_token_secret: e.string().optional(),
|
|
275
300
|
refresh_token: e.string().optional(),
|
|
276
|
-
profileData:
|
|
277
|
-
}),
|
|
301
|
+
profileData: pe.optional()
|
|
302
|
+
}), he = e.object({
|
|
278
303
|
formatted: e.string().optional(),
|
|
279
304
|
street_address: e.string().optional(),
|
|
280
305
|
locality: e.string().optional(),
|
|
281
306
|
region: e.string().optional(),
|
|
282
307
|
postal_code: e.string().optional(),
|
|
283
308
|
country: e.string().optional()
|
|
284
|
-
}).optional(),
|
|
309
|
+
}).optional(), ge = e.object({
|
|
285
310
|
email: e.string().transform((e) => e.toLowerCase()).optional(),
|
|
286
311
|
username: e.string().refine((e) => !e.includes("@"), { message: "Usernames must not contain \"@\". Use the email field for email addresses." }).optional(),
|
|
287
312
|
phone_number: e.string().optional(),
|
|
@@ -304,9 +329,9 @@ var le = e.object({
|
|
|
304
329
|
gender: e.string().optional(),
|
|
305
330
|
birthdate: e.string().optional(),
|
|
306
331
|
zoneinfo: e.string().optional(),
|
|
307
|
-
address:
|
|
332
|
+
address: he
|
|
308
333
|
});
|
|
309
|
-
|
|
334
|
+
ge.extend({
|
|
310
335
|
email_verified: e.boolean().default(!1),
|
|
311
336
|
verify_email: e.boolean().optional(),
|
|
312
337
|
last_ip: e.string().optional(),
|
|
@@ -327,24 +352,24 @@ fe.extend({
|
|
|
327
352
|
is_social: e.boolean(),
|
|
328
353
|
email: e.string().optional(),
|
|
329
354
|
login_count: e.number().default(0),
|
|
330
|
-
identities: e.array(
|
|
331
|
-
}).omit({ registration_completed_at: !0 }),
|
|
355
|
+
identities: e.array(me).optional()
|
|
356
|
+
}).omit({ registration_completed_at: !0 }), ge.extend({
|
|
332
357
|
login_count: e.number(),
|
|
333
358
|
multifactor: e.array(e.string()).optional(),
|
|
334
359
|
last_ip: e.string().optional(),
|
|
335
360
|
last_login: e.string().optional(),
|
|
336
361
|
user_id: e.string()
|
|
337
362
|
}).catchall(e.any());
|
|
338
|
-
var
|
|
363
|
+
var _e = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", ve = (e = 21) => {
|
|
339
364
|
let t = "", n = crypto.getRandomValues(new Uint8Array(e |= 0));
|
|
340
|
-
for (; e--;) t +=
|
|
365
|
+
for (; e--;) t += _e[n[e] & 63];
|
|
341
366
|
return t;
|
|
342
|
-
},
|
|
367
|
+
}, ye = e.object({
|
|
343
368
|
client_id: e.string().optional().openapi({ description: "ID of this client. Generated server-side if omitted (Auth0 behavior)." }),
|
|
344
369
|
name: e.string().min(1).openapi({ description: "Name of this client (min length: 1 character, does not allow < or >)." }),
|
|
345
370
|
description: e.string().max(140).optional().openapi({ description: "Free text description of this client (max length: 140 characters)." }),
|
|
346
371
|
global: e.boolean().default(!1).openapi({ description: "Whether this is your global 'All Applications' client representing legacy tenant settings (true) or a regular client (false)." }),
|
|
347
|
-
client_secret: e.string().default(() =>
|
|
372
|
+
client_secret: e.string().default(() => ve()).optional().openapi({ description: "Client secret (which you must not make public)." }),
|
|
348
373
|
app_type: e.enum([
|
|
349
374
|
"native",
|
|
350
375
|
"spa",
|
|
@@ -462,8 +487,8 @@ var pe = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", me
|
|
|
462
487
|
e.object({
|
|
463
488
|
created_at: e.string(),
|
|
464
489
|
updated_at: e.string()
|
|
465
|
-
}).extend(
|
|
466
|
-
var
|
|
490
|
+
}).extend(ye.shape).extend({ client_id: e.string() });
|
|
491
|
+
var be = e.object({
|
|
467
492
|
client_id: e.string().min(1).openapi({ description: "ID of the client." }),
|
|
468
493
|
audience: e.string().min(1).openapi({ description: "The audience (API identifier) of this client grant." }),
|
|
469
494
|
scope: e.array(e.string()).optional().openapi({ description: "Scopes allowed for this client grant." }),
|
|
@@ -476,15 +501,15 @@ var ge = e.object({
|
|
|
476
501
|
is_system: e.boolean().optional().openapi({ description: "If enabled, this grant is a special grant created by Auth0. It cannot be modified or deleted directly." }),
|
|
477
502
|
subject_type: e.enum(["client", "user"]).optional().openapi({ description: "The type of application access the client grant allows. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement." }),
|
|
478
503
|
authorization_details_types: e.array(e.string()).optional().openapi({ description: "Types of authorization_details allowed for this client grant. Use of this field is subject to the applicable Free Trial terms in Okta's Master Subscription Agreement." })
|
|
479
|
-
}),
|
|
504
|
+
}), xe = e.object({ id: e.string().openapi({ description: "ID of the client grant." }) }).extend(be.shape).extend({
|
|
480
505
|
created_at: e.string().optional(),
|
|
481
506
|
updated_at: e.string().optional()
|
|
482
507
|
});
|
|
483
|
-
e.array(
|
|
484
|
-
var
|
|
508
|
+
e.array(xe);
|
|
509
|
+
var Se = e.enum(["iat", "rat"]), Ce = e.object({
|
|
485
510
|
id: e.string(),
|
|
486
511
|
token_hash: e.string(),
|
|
487
|
-
type:
|
|
512
|
+
type: Se,
|
|
488
513
|
client_id: e.string().optional(),
|
|
489
514
|
sub: e.string().optional(),
|
|
490
515
|
constraints: e.record(e.string(), e.unknown()).optional(),
|
|
@@ -495,23 +520,23 @@ e.object({
|
|
|
495
520
|
created_at: e.string(),
|
|
496
521
|
used_at: e.string().optional(),
|
|
497
522
|
revoked_at: e.string().optional()
|
|
498
|
-
}).extend(
|
|
523
|
+
}).extend(Ce.shape);
|
|
499
524
|
var y = e.object({
|
|
500
525
|
x: e.number(),
|
|
501
526
|
y: e.number()
|
|
502
|
-
}),
|
|
527
|
+
}), we = /* @__PURE__ */ function(e) {
|
|
503
528
|
return e.RICH_TEXT = "RICH_TEXT", e.NEXT_BUTTON = "NEXT_BUTTON", e.BACK_BUTTON = "BACK_BUTTON", e.SUBMIT_BUTTON = "SUBMIT_BUTTON", e.DIVIDER = "DIVIDER", e.TEXT = "TEXT", e.EMAIL = "EMAIL", e.PASSWORD = "PASSWORD", e.NUMBER = "NUMBER", e.PHONE = "PHONE", e.DATE = "DATE", e.CHECKBOX = "CHECKBOX", e.RADIO = "RADIO", e.SELECT = "SELECT", e.HIDDEN = "HIDDEN", e.LEGAL = "LEGAL", e;
|
|
504
|
-
}({}),
|
|
529
|
+
}({}), Te = /* @__PURE__ */ function(e) {
|
|
505
530
|
return e.BLOCK = "BLOCK", e.FIELD = "FIELD", e;
|
|
506
531
|
}({}), b = e.object({
|
|
507
532
|
id: e.string(),
|
|
508
|
-
category: e.nativeEnum(
|
|
509
|
-
type: e.nativeEnum(
|
|
510
|
-
}),
|
|
533
|
+
category: e.nativeEnum(Te),
|
|
534
|
+
type: e.nativeEnum(we)
|
|
535
|
+
}), Ee = b.extend({
|
|
511
536
|
category: e.literal("BLOCK"),
|
|
512
537
|
type: e.literal("RICH_TEXT"),
|
|
513
538
|
config: e.object({ content: e.string() }).passthrough()
|
|
514
|
-
}),
|
|
539
|
+
}), De = b.extend({
|
|
515
540
|
category: e.literal("BLOCK"),
|
|
516
541
|
type: e.union([
|
|
517
542
|
e.literal("NEXT_BUTTON"),
|
|
@@ -519,13 +544,13 @@ var y = e.object({
|
|
|
519
544
|
e.literal("SUBMIT_BUTTON")
|
|
520
545
|
]),
|
|
521
546
|
config: e.object({ text: e.string() }).passthrough()
|
|
522
|
-
}),
|
|
547
|
+
}), Oe = b.extend({
|
|
523
548
|
category: e.literal("FIELD"),
|
|
524
549
|
type: e.literal("LEGAL"),
|
|
525
550
|
required: e.boolean().optional(),
|
|
526
551
|
sensitive: e.boolean().optional(),
|
|
527
552
|
config: e.object({ text: e.string() }).passthrough()
|
|
528
|
-
}),
|
|
553
|
+
}), ke = b.extend({
|
|
529
554
|
category: e.literal("FIELD"),
|
|
530
555
|
type: e.union([
|
|
531
556
|
e.literal("TEXT"),
|
|
@@ -545,26 +570,26 @@ var y = e.object({
|
|
|
545
570
|
label: e.string().optional(),
|
|
546
571
|
placeholder: e.string().optional()
|
|
547
572
|
}).passthrough()
|
|
548
|
-
}),
|
|
573
|
+
}), Ae = e.object({
|
|
549
574
|
id: e.string(),
|
|
550
575
|
category: e.string(),
|
|
551
576
|
type: e.string()
|
|
552
|
-
}).passthrough(),
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
]),
|
|
577
|
+
}).passthrough(), je = e.union([
|
|
578
|
+
Ee,
|
|
579
|
+
De,
|
|
580
|
+
Oe,
|
|
581
|
+
ke,
|
|
582
|
+
Ae
|
|
583
|
+
]), Me = e.object({
|
|
559
584
|
id: e.string(),
|
|
560
585
|
type: e.literal("STEP"),
|
|
561
586
|
coordinates: y,
|
|
562
587
|
alias: e.string().optional(),
|
|
563
588
|
config: e.object({
|
|
564
|
-
components: e.array(
|
|
589
|
+
components: e.array(je),
|
|
565
590
|
next_node: e.string()
|
|
566
591
|
}).passthrough()
|
|
567
|
-
}),
|
|
592
|
+
}), Ne = e.object({
|
|
568
593
|
id: e.string(),
|
|
569
594
|
type: e.literal("FLOW"),
|
|
570
595
|
coordinates: y,
|
|
@@ -573,7 +598,7 @@ var y = e.object({
|
|
|
573
598
|
flow_id: e.string(),
|
|
574
599
|
next_node: e.string()
|
|
575
600
|
})
|
|
576
|
-
}),
|
|
601
|
+
}), Pe = e.object({
|
|
577
602
|
id: e.string(),
|
|
578
603
|
type: e.literal("ACTION"),
|
|
579
604
|
coordinates: y,
|
|
@@ -588,19 +613,19 @@ var y = e.object({
|
|
|
588
613
|
custom_url: e.string().optional().openapi({ description: "Custom URL when target is 'custom'" }),
|
|
589
614
|
next_node: e.string().openapi({ description: "The next node to navigate to after action (for non-redirect actions)" })
|
|
590
615
|
}).passthrough()
|
|
591
|
-
}),
|
|
616
|
+
}), Fe = e.object({
|
|
592
617
|
id: e.string(),
|
|
593
618
|
type: e.string(),
|
|
594
619
|
coordinates: y
|
|
595
|
-
}).passthrough(),
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
]),
|
|
620
|
+
}).passthrough(), Ie = e.union([
|
|
621
|
+
Me,
|
|
622
|
+
Ne,
|
|
623
|
+
Pe,
|
|
624
|
+
Fe
|
|
625
|
+
]), Le = e.object({
|
|
601
626
|
next_node: e.string(),
|
|
602
627
|
coordinates: y
|
|
603
|
-
}).passthrough(),
|
|
628
|
+
}).passthrough(), Re = e.object({
|
|
604
629
|
resume_flow: e.boolean().optional(),
|
|
605
630
|
coordinates: y
|
|
606
631
|
}).passthrough();
|
|
@@ -608,9 +633,9 @@ e.object({
|
|
|
608
633
|
id: e.string(),
|
|
609
634
|
name: e.string(),
|
|
610
635
|
languages: e.object({ primary: e.string() }).passthrough(),
|
|
611
|
-
nodes: e.array(
|
|
612
|
-
start:
|
|
613
|
-
ending:
|
|
636
|
+
nodes: e.array(Ie),
|
|
637
|
+
start: Le,
|
|
638
|
+
ending: Re,
|
|
614
639
|
created_at: e.string(),
|
|
615
640
|
updated_at: e.string(),
|
|
616
641
|
links: e.object({
|
|
@@ -622,24 +647,24 @@ e.object({
|
|
|
622
647
|
created_at: !0,
|
|
623
648
|
updated_at: !0
|
|
624
649
|
});
|
|
625
|
-
var
|
|
650
|
+
var ze = /* @__PURE__ */ function(e) {
|
|
626
651
|
return e.TOKEN = "token", e.ID_TOKEN = "id_token", e.TOKEN_ID_TOKEN = "id_token token", e.CODE = "code", e.CODE_ID_TOKEN = "code id_token", e.CODE_TOKEN = "code token", e.CODE_ID_TOKEN_TOKEN = "code id_token token", e;
|
|
627
|
-
}({}),
|
|
652
|
+
}({}), Be = /* @__PURE__ */ function(e) {
|
|
628
653
|
return e.QUERY = "query", e.FRAGMENT = "fragment", e.FORM_POST = "form_post", e.WEB_MESSAGE = "web_message", e.SAML_POST = "saml_post", e;
|
|
629
|
-
}({}),
|
|
654
|
+
}({}), Ve = /* @__PURE__ */ function(e) {
|
|
630
655
|
return e.S256 = "S256", e.Plain = "plain", e;
|
|
631
|
-
}({}),
|
|
656
|
+
}({}), x = e.union([e.null(), e.object({
|
|
632
657
|
essential: e.boolean().optional(),
|
|
633
658
|
value: e.unknown().optional(),
|
|
634
659
|
values: e.array(e.unknown()).optional()
|
|
635
|
-
})]).nullable(),
|
|
636
|
-
userinfo: e.record(e.string(),
|
|
637
|
-
id_token: e.record(e.string(),
|
|
638
|
-
}),
|
|
660
|
+
})]).nullable(), He = e.object({
|
|
661
|
+
userinfo: e.record(e.string(), x).optional(),
|
|
662
|
+
id_token: e.record(e.string(), x).optional()
|
|
663
|
+
}), Ue = e.object({
|
|
639
664
|
client_id: e.string(),
|
|
640
665
|
act_as: e.string().optional(),
|
|
641
|
-
response_type: e.nativeEnum(
|
|
642
|
-
response_mode: e.nativeEnum(
|
|
666
|
+
response_type: e.nativeEnum(ze).optional(),
|
|
667
|
+
response_mode: e.nativeEnum(Be).optional(),
|
|
643
668
|
redirect_uri: e.string().optional(),
|
|
644
669
|
audience: e.string().optional(),
|
|
645
670
|
organization: e.string().optional(),
|
|
@@ -647,16 +672,17 @@ var Fe = /* @__PURE__ */ function(e) {
|
|
|
647
672
|
nonce: e.string().optional(),
|
|
648
673
|
scope: e.string().optional(),
|
|
649
674
|
prompt: e.string().optional(),
|
|
650
|
-
code_challenge_method: e.nativeEnum(
|
|
675
|
+
code_challenge_method: e.nativeEnum(Ve).optional(),
|
|
651
676
|
code_challenge: e.string().optional(),
|
|
652
677
|
username: e.string().optional(),
|
|
653
678
|
ui_locales: e.string().optional(),
|
|
654
679
|
max_age: e.number().optional(),
|
|
655
680
|
acr_values: e.string().optional(),
|
|
656
|
-
claims:
|
|
681
|
+
claims: He.optional(),
|
|
657
682
|
vendor_id: e.string().optional()
|
|
658
683
|
});
|
|
659
684
|
e.object({
|
|
685
|
+
...a,
|
|
660
686
|
colors: e.object({
|
|
661
687
|
primary: e.string(),
|
|
662
688
|
page_background: e.union([e.string(), e.object({
|
|
@@ -676,7 +702,7 @@ e.object({
|
|
|
676
702
|
"auto"
|
|
677
703
|
]).optional()
|
|
678
704
|
});
|
|
679
|
-
var
|
|
705
|
+
var We = e.enum([
|
|
680
706
|
"password_reset",
|
|
681
707
|
"email_verification",
|
|
682
708
|
"otp",
|
|
@@ -691,7 +717,7 @@ e.object({
|
|
|
691
717
|
code_id: e.string().openapi({ description: "The code that will be used in for instance an email verification flow" }),
|
|
692
718
|
login_id: e.string().optional().openapi({ description: "The id of the login session that the code is connected to" }),
|
|
693
719
|
connection_id: e.string().optional().openapi({ description: "The connection that the code is connected to" }),
|
|
694
|
-
code_type:
|
|
720
|
+
code_type: We,
|
|
695
721
|
code_verifier: e.string().optional().openapi({ description: "The code verifier used in PKCE in outbound flows" }),
|
|
696
722
|
code_challenge: e.string().optional().openapi({ description: "The code challenge used in PKCE in outbound flows" }),
|
|
697
723
|
code_challenge_method: e.enum(["plain", "S256"]).optional().openapi({ description: "The code challenge method used in PKCE in outbound flows" }),
|
|
@@ -703,7 +729,7 @@ e.object({
|
|
|
703
729
|
used_at: e.string().optional(),
|
|
704
730
|
user_id: e.string().optional()
|
|
705
731
|
}).extend({ created_at: e.string() });
|
|
706
|
-
var
|
|
732
|
+
var Ge = e.object({
|
|
707
733
|
kid: e.string().optional(),
|
|
708
734
|
team_id: e.string().optional(),
|
|
709
735
|
realms: e.string().optional(),
|
|
@@ -823,37 +849,38 @@ var He = e.object({
|
|
|
823
849
|
"never_on_login"
|
|
824
850
|
]).optional()
|
|
825
851
|
});
|
|
826
|
-
function
|
|
852
|
+
function S(e) {
|
|
827
853
|
if (e !== null) {
|
|
828
|
-
if (Array.isArray(e)) return e.filter((e) => e !== null).map(
|
|
854
|
+
if (Array.isArray(e)) return e.filter((e) => e !== null).map(S);
|
|
829
855
|
if (e && typeof e == "object") {
|
|
830
856
|
let t = {};
|
|
831
|
-
for (let [n, r] of Object.entries(e)) r !== null && (t[n] =
|
|
857
|
+
for (let [n, r] of Object.entries(e)) r !== null && (t[n] = S(r));
|
|
832
858
|
return t;
|
|
833
859
|
}
|
|
834
860
|
return e;
|
|
835
861
|
}
|
|
836
862
|
}
|
|
837
|
-
var
|
|
863
|
+
var Ke = e.object({
|
|
838
864
|
id: e.string().optional(),
|
|
839
865
|
name: e.string(),
|
|
840
866
|
display_name: e.string().optional(),
|
|
841
867
|
strategy: e.string(),
|
|
842
|
-
options: e.preprocess((e) => e === null ? {} :
|
|
868
|
+
options: e.preprocess((e) => e === null ? {} : S(e), Ge).default({}),
|
|
843
869
|
enabled_clients: e.array(e.string()).default([]).optional(),
|
|
844
|
-
response_type: e.nativeEnum(
|
|
845
|
-
response_mode: e.nativeEnum(
|
|
870
|
+
response_type: e.nativeEnum(ze).optional(),
|
|
871
|
+
response_mode: e.nativeEnum(Be).optional(),
|
|
846
872
|
is_domain_connection: e.boolean().optional(),
|
|
847
873
|
show_as_button: e.boolean().optional(),
|
|
848
874
|
metadata: e.record(e.string(), e.any()).optional(),
|
|
849
|
-
is_system: e.boolean().optional()
|
|
875
|
+
is_system: e.boolean().optional(),
|
|
876
|
+
...a
|
|
850
877
|
});
|
|
851
878
|
e.object({
|
|
852
879
|
id: e.string(),
|
|
853
880
|
created_at: e.string().transform((e) => e === null ? "" : e),
|
|
854
881
|
updated_at: e.string().transform((e) => e === null ? "" : e)
|
|
855
|
-
}).extend(
|
|
856
|
-
var
|
|
882
|
+
}).extend(Ke.shape);
|
|
883
|
+
var qe = e.object({
|
|
857
884
|
domain: e.string(),
|
|
858
885
|
custom_domain_id: e.string().optional(),
|
|
859
886
|
type: e.enum(["auth0_managed_certs", "self_managed_certs"]),
|
|
@@ -867,7 +894,7 @@ var We = e.object({
|
|
|
867
894
|
"null"
|
|
868
895
|
]).optional(),
|
|
869
896
|
domain_metadata: e.record(e.string(), e.string().max(255)).optional()
|
|
870
|
-
}),
|
|
897
|
+
}), Je = e.discriminatedUnion("name", [e.object({
|
|
871
898
|
name: e.literal("txt"),
|
|
872
899
|
record: e.string(),
|
|
873
900
|
domain: e.string()
|
|
@@ -875,7 +902,7 @@ var We = e.object({
|
|
|
875
902
|
name: e.literal("http"),
|
|
876
903
|
http_body: e.string(),
|
|
877
904
|
http_url: e.string()
|
|
878
|
-
})]),
|
|
905
|
+
})]), Ye = qe.extend({
|
|
879
906
|
custom_domain_id: e.string(),
|
|
880
907
|
primary: e.boolean(),
|
|
881
908
|
status: e.enum([
|
|
@@ -885,28 +912,28 @@ var We = e.object({
|
|
|
885
912
|
"ready"
|
|
886
913
|
]),
|
|
887
914
|
origin_domain_name: e.string().optional(),
|
|
888
|
-
verification: e.object({ methods: e.array(
|
|
915
|
+
verification: e.object({ methods: e.array(Je) }).optional(),
|
|
889
916
|
tls_policy: e.string().optional()
|
|
890
917
|
});
|
|
891
|
-
|
|
918
|
+
qe.pick({
|
|
892
919
|
tls_policy: !0,
|
|
893
920
|
custom_client_ip_header: !0,
|
|
894
921
|
domain_metadata: !0
|
|
895
|
-
}).strict(),
|
|
922
|
+
}).strict(), Ye.extend({ tenant_id: e.string() }), e.object({
|
|
896
923
|
certificate: e.string().regex(/^-----BEGIN CERTIFICATE-----[\s\S]+-----END CERTIFICATE-----\s*$/, "must be PEM-encoded; include the full certificate chain in leaf-first order"),
|
|
897
924
|
private_key: e.string().regex(/-----BEGIN (RSA |EC |ENCRYPTED )?PRIVATE KEY-----[\s\S]+-----END \1PRIVATE KEY-----\s*$/, "must be a PEM-encoded private key")
|
|
898
925
|
});
|
|
899
|
-
var
|
|
926
|
+
var C = e.object({
|
|
900
927
|
id: e.string(),
|
|
901
928
|
order: e.number().optional(),
|
|
902
929
|
visible: e.boolean().optional().default(!0)
|
|
903
|
-
}),
|
|
930
|
+
}), w = C.extend({ category: e.literal("BLOCK").optional() }), Xe = w.extend({
|
|
904
931
|
type: e.literal("DIVIDER"),
|
|
905
932
|
config: e.object({ text: e.string().optional() }).optional()
|
|
906
|
-
}),
|
|
933
|
+
}), Ze = w.extend({
|
|
907
934
|
type: e.literal("HTML"),
|
|
908
935
|
config: e.object({ content: e.string().optional() }).optional()
|
|
909
|
-
}),
|
|
936
|
+
}), Qe = w.extend({
|
|
910
937
|
type: e.literal("IMAGE"),
|
|
911
938
|
config: e.object({
|
|
912
939
|
src: e.string().optional(),
|
|
@@ -914,47 +941,47 @@ var S = e.object({
|
|
|
914
941
|
width: e.number().optional(),
|
|
915
942
|
height: e.number().optional()
|
|
916
943
|
}).optional()
|
|
917
|
-
}),
|
|
944
|
+
}), $e = w.extend({
|
|
918
945
|
type: e.literal("JUMP_BUTTON"),
|
|
919
946
|
config: e.object({
|
|
920
947
|
text: e.string().optional(),
|
|
921
948
|
target_step: e.string().optional()
|
|
922
949
|
})
|
|
923
|
-
}),
|
|
950
|
+
}), et = w.extend({
|
|
924
951
|
type: e.literal("RESEND_BUTTON"),
|
|
925
952
|
config: e.object({
|
|
926
953
|
text: e.string().optional(),
|
|
927
954
|
resend_action: e.string().optional()
|
|
928
955
|
})
|
|
929
|
-
}),
|
|
956
|
+
}), tt = w.extend({
|
|
930
957
|
type: e.literal("NEXT_BUTTON"),
|
|
931
958
|
config: e.object({
|
|
932
959
|
text: e.string().optional(),
|
|
933
960
|
variant: e.enum(["primary", "secondary"]).optional(),
|
|
934
961
|
skip_validation: e.boolean().optional()
|
|
935
962
|
})
|
|
936
|
-
}),
|
|
963
|
+
}), nt = w.extend({
|
|
937
964
|
type: e.literal("PREVIOUS_BUTTON"),
|
|
938
965
|
config: e.object({ text: e.string().optional() })
|
|
939
|
-
}),
|
|
966
|
+
}), rt = w.extend({
|
|
940
967
|
type: e.literal("RICH_TEXT"),
|
|
941
968
|
config: e.object({ content: e.string().optional() }).optional()
|
|
942
|
-
}),
|
|
969
|
+
}), T = C.extend({
|
|
943
970
|
category: e.literal("WIDGET").optional(),
|
|
944
971
|
label: e.string().min(1).optional(),
|
|
945
972
|
hint: e.string().min(1).max(500).optional(),
|
|
946
973
|
required: e.boolean().optional(),
|
|
947
974
|
sensitive: e.boolean().optional()
|
|
948
|
-
}),
|
|
975
|
+
}), it = T.extend({
|
|
949
976
|
type: e.literal("AUTH0_VERIFIABLE_CREDENTIALS"),
|
|
950
977
|
config: e.object({ credential_type: e.string().optional() })
|
|
951
|
-
}),
|
|
978
|
+
}), at = T.extend({
|
|
952
979
|
type: e.literal("GMAPS_ADDRESS"),
|
|
953
980
|
config: e.object({ api_key: e.string().optional() })
|
|
954
|
-
}),
|
|
981
|
+
}), ot = T.extend({
|
|
955
982
|
type: e.literal("RECAPTCHA"),
|
|
956
983
|
config: e.object({ site_key: e.string().optional() })
|
|
957
|
-
}),
|
|
984
|
+
}), E = C.extend({
|
|
958
985
|
category: e.literal("FIELD").optional(),
|
|
959
986
|
label: e.string().min(1).optional(),
|
|
960
987
|
hint: e.string().min(1).max(500).optional(),
|
|
@@ -970,10 +997,10 @@ var S = e.object({
|
|
|
970
997
|
})).optional(),
|
|
971
998
|
required: e.boolean().optional(),
|
|
972
999
|
sensitive: e.boolean().optional()
|
|
973
|
-
}),
|
|
1000
|
+
}), st = E.extend({
|
|
974
1001
|
type: e.literal("BOOLEAN"),
|
|
975
1002
|
config: e.object({ default_value: e.boolean().optional() }).optional()
|
|
976
|
-
}),
|
|
1003
|
+
}), ct = E.extend({
|
|
977
1004
|
type: e.literal("CARDS"),
|
|
978
1005
|
config: e.object({
|
|
979
1006
|
options: e.array(e.object({
|
|
@@ -984,7 +1011,7 @@ var S = e.object({
|
|
|
984
1011
|
})).optional(),
|
|
985
1012
|
multi_select: e.boolean().optional()
|
|
986
1013
|
}).optional()
|
|
987
|
-
}),
|
|
1014
|
+
}), lt = E.extend({
|
|
988
1015
|
type: e.literal("CHOICE"),
|
|
989
1016
|
config: e.object({
|
|
990
1017
|
options: e.array(e.object({
|
|
@@ -995,7 +1022,7 @@ var S = e.object({
|
|
|
995
1022
|
multiple: e.boolean().optional(),
|
|
996
1023
|
default_value: e.union([e.string(), e.array(e.string())]).optional()
|
|
997
1024
|
}).optional()
|
|
998
|
-
}),
|
|
1025
|
+
}), ut = E.extend({
|
|
999
1026
|
type: e.literal("CODE"),
|
|
1000
1027
|
config: e.object({
|
|
1001
1028
|
length: e.number().int().positive().max(100).optional(),
|
|
@@ -1012,7 +1039,7 @@ var S = e.object({
|
|
|
1012
1039
|
message: "default_value is longer than the configured length",
|
|
1013
1040
|
path: ["default_value"]
|
|
1014
1041
|
}).optional()
|
|
1015
|
-
}),
|
|
1042
|
+
}), dt = E.extend({
|
|
1016
1043
|
type: e.literal("CUSTOM"),
|
|
1017
1044
|
config: e.object({
|
|
1018
1045
|
component: e.string().optional(),
|
|
@@ -1020,7 +1047,7 @@ var S = e.object({
|
|
|
1020
1047
|
schema: e.record(e.string(), e.any()).optional(),
|
|
1021
1048
|
code: e.string().optional()
|
|
1022
1049
|
})
|
|
1023
|
-
}),
|
|
1050
|
+
}), ft = E.extend({
|
|
1024
1051
|
type: e.literal("DATE"),
|
|
1025
1052
|
config: e.object({
|
|
1026
1053
|
format: e.string().optional(),
|
|
@@ -1028,7 +1055,7 @@ var S = e.object({
|
|
|
1028
1055
|
max: e.string().optional(),
|
|
1029
1056
|
default_value: e.string().optional()
|
|
1030
1057
|
}).optional()
|
|
1031
|
-
}),
|
|
1058
|
+
}), pt = E.extend({
|
|
1032
1059
|
type: e.literal("DROPDOWN"),
|
|
1033
1060
|
config: e.object({
|
|
1034
1061
|
options: e.array(e.object({
|
|
@@ -1040,7 +1067,7 @@ var S = e.object({
|
|
|
1040
1067
|
multiple: e.boolean().optional(),
|
|
1041
1068
|
default_value: e.union([e.string(), e.array(e.string())]).optional()
|
|
1042
1069
|
}).optional()
|
|
1043
|
-
}),
|
|
1070
|
+
}), mt = E.extend({
|
|
1044
1071
|
type: e.literal("EMAIL"),
|
|
1045
1072
|
config: e.object({
|
|
1046
1073
|
placeholder: e.string().optional(),
|
|
@@ -1048,20 +1075,20 @@ var S = e.object({
|
|
|
1048
1075
|
last_used: e.boolean().optional(),
|
|
1049
1076
|
last_used_label: e.string().optional()
|
|
1050
1077
|
}).optional()
|
|
1051
|
-
}),
|
|
1078
|
+
}), ht = E.extend({
|
|
1052
1079
|
type: e.literal("FILE"),
|
|
1053
1080
|
config: e.object({
|
|
1054
1081
|
accept: e.string().optional(),
|
|
1055
1082
|
max_size: e.number().optional(),
|
|
1056
1083
|
multiple: e.boolean().optional()
|
|
1057
1084
|
}).optional()
|
|
1058
|
-
}),
|
|
1085
|
+
}), gt = E.extend({
|
|
1059
1086
|
type: e.literal("LEGAL"),
|
|
1060
1087
|
config: e.object({
|
|
1061
1088
|
text: e.string(),
|
|
1062
1089
|
html: e.boolean().optional()
|
|
1063
1090
|
}).optional()
|
|
1064
|
-
}),
|
|
1091
|
+
}), _t = E.extend({
|
|
1065
1092
|
type: e.literal("NUMBER"),
|
|
1066
1093
|
config: e.object({
|
|
1067
1094
|
placeholder: e.string().optional(),
|
|
@@ -1070,7 +1097,7 @@ var S = e.object({
|
|
|
1070
1097
|
step: e.number().optional(),
|
|
1071
1098
|
default_value: e.string().optional()
|
|
1072
1099
|
}).optional()
|
|
1073
|
-
}),
|
|
1100
|
+
}), vt = E.extend({
|
|
1074
1101
|
type: e.literal("PASSWORD"),
|
|
1075
1102
|
config: e.object({
|
|
1076
1103
|
placeholder: e.string().optional(),
|
|
@@ -1079,13 +1106,13 @@ var S = e.object({
|
|
|
1079
1106
|
forgot_password_link: e.string().optional(),
|
|
1080
1107
|
default_value: e.string().optional()
|
|
1081
1108
|
}).optional()
|
|
1082
|
-
}),
|
|
1109
|
+
}), yt = E.extend({
|
|
1083
1110
|
type: e.literal("PAYMENT"),
|
|
1084
1111
|
config: e.object({
|
|
1085
1112
|
provider: e.string().optional(),
|
|
1086
1113
|
currency: e.string().optional()
|
|
1087
1114
|
}).optional()
|
|
1088
|
-
}),
|
|
1115
|
+
}), bt = E.extend({
|
|
1089
1116
|
type: e.literal("SOCIAL"),
|
|
1090
1117
|
config: e.object({
|
|
1091
1118
|
providers: e.array(e.string()).optional(),
|
|
@@ -1100,7 +1127,7 @@ var S = e.object({
|
|
|
1100
1127
|
last_used_label: e.string().optional()
|
|
1101
1128
|
})).optional()
|
|
1102
1129
|
}).optional()
|
|
1103
|
-
}),
|
|
1130
|
+
}), xt = E.extend({
|
|
1104
1131
|
type: e.literal("TEL"),
|
|
1105
1132
|
config: e.object({
|
|
1106
1133
|
placeholder: e.string().optional(),
|
|
@@ -1108,7 +1135,7 @@ var S = e.object({
|
|
|
1108
1135
|
default_value: e.string().optional(),
|
|
1109
1136
|
allow_email: e.boolean().optional()
|
|
1110
1137
|
}).optional()
|
|
1111
|
-
}),
|
|
1138
|
+
}), St = E.extend({
|
|
1112
1139
|
type: e.literal("TEXT"),
|
|
1113
1140
|
config: e.object({
|
|
1114
1141
|
placeholder: e.string().optional(),
|
|
@@ -1118,40 +1145,37 @@ var S = e.object({
|
|
|
1118
1145
|
last_used: e.boolean().optional(),
|
|
1119
1146
|
last_used_label: e.string().optional()
|
|
1120
1147
|
}).optional()
|
|
1121
|
-
}),
|
|
1148
|
+
}), Ct = E.extend({
|
|
1122
1149
|
type: e.literal("COUNTRY"),
|
|
1123
1150
|
config: e.object({
|
|
1124
1151
|
placeholder: e.string().optional(),
|
|
1125
1152
|
default_value: e.string().optional()
|
|
1126
1153
|
}).optional()
|
|
1127
|
-
}),
|
|
1154
|
+
}), wt = E.extend({
|
|
1128
1155
|
type: e.literal("URL"),
|
|
1129
1156
|
config: e.object({
|
|
1130
1157
|
placeholder: e.string().optional(),
|
|
1131
1158
|
default_value: e.string().optional()
|
|
1132
1159
|
}).optional()
|
|
1133
|
-
}),
|
|
1134
|
-
qe,
|
|
1135
|
-
Je,
|
|
1136
|
-
Ye,
|
|
1160
|
+
}), Tt = e.discriminatedUnion("type", [
|
|
1137
1161
|
Xe,
|
|
1138
1162
|
Ze,
|
|
1139
1163
|
Qe,
|
|
1140
1164
|
$e,
|
|
1141
|
-
et
|
|
1142
|
-
]), Ct = e.discriminatedUnion("type", [
|
|
1165
|
+
et,
|
|
1143
1166
|
tt,
|
|
1144
1167
|
nt,
|
|
1145
1168
|
rt
|
|
1146
|
-
]),
|
|
1169
|
+
]), Et = e.discriminatedUnion("type", [
|
|
1147
1170
|
it,
|
|
1148
1171
|
at,
|
|
1149
|
-
ot
|
|
1172
|
+
ot
|
|
1173
|
+
]), Dt = e.discriminatedUnion("type", [
|
|
1150
1174
|
st,
|
|
1151
|
-
bt,
|
|
1152
1175
|
ct,
|
|
1153
1176
|
lt,
|
|
1154
1177
|
ut,
|
|
1178
|
+
Ct,
|
|
1155
1179
|
dt,
|
|
1156
1180
|
ft,
|
|
1157
1181
|
pt,
|
|
@@ -1161,11 +1185,14 @@ var S = e.object({
|
|
|
1161
1185
|
_t,
|
|
1162
1186
|
vt,
|
|
1163
1187
|
yt,
|
|
1164
|
-
|
|
1165
|
-
|
|
1188
|
+
bt,
|
|
1189
|
+
xt,
|
|
1166
1190
|
St,
|
|
1167
|
-
Ct,
|
|
1168
1191
|
wt
|
|
1192
|
+
]), Ot = e.union([
|
|
1193
|
+
Tt,
|
|
1194
|
+
Et,
|
|
1195
|
+
Dt
|
|
1169
1196
|
]);
|
|
1170
1197
|
new Set([
|
|
1171
1198
|
"BOOLEAN",
|
|
@@ -1192,22 +1219,22 @@ new Set([
|
|
|
1192
1219
|
visible: e.boolean().optional().default(!0),
|
|
1193
1220
|
customizations: e.record(e.string(), e.any()).optional()
|
|
1194
1221
|
});
|
|
1195
|
-
var
|
|
1222
|
+
var D = e.object({
|
|
1196
1223
|
x: e.number(),
|
|
1197
1224
|
y: e.number()
|
|
1198
|
-
}),
|
|
1225
|
+
}), kt = e.object({
|
|
1199
1226
|
id: e.string(),
|
|
1200
1227
|
type: e.literal("FLOW"),
|
|
1201
|
-
coordinates:
|
|
1228
|
+
coordinates: D,
|
|
1202
1229
|
alias: e.string().min(1).max(150).optional(),
|
|
1203
1230
|
config: e.object({
|
|
1204
1231
|
flow_id: e.string().max(30),
|
|
1205
1232
|
next_node: e.string().optional()
|
|
1206
1233
|
})
|
|
1207
|
-
}),
|
|
1234
|
+
}), At = e.object({
|
|
1208
1235
|
id: e.string(),
|
|
1209
1236
|
type: e.literal("ROUTER"),
|
|
1210
|
-
coordinates:
|
|
1237
|
+
coordinates: D,
|
|
1211
1238
|
alias: e.string().min(1).max(150),
|
|
1212
1239
|
config: e.object({
|
|
1213
1240
|
rules: e.array(e.object({
|
|
@@ -1218,20 +1245,20 @@ var E = e.object({
|
|
|
1218
1245
|
})),
|
|
1219
1246
|
fallback: e.string()
|
|
1220
1247
|
})
|
|
1221
|
-
}),
|
|
1248
|
+
}), jt = e.object({
|
|
1222
1249
|
id: e.string(),
|
|
1223
1250
|
type: e.literal("STEP"),
|
|
1224
|
-
coordinates:
|
|
1251
|
+
coordinates: D,
|
|
1225
1252
|
alias: e.string().min(1).max(150).optional(),
|
|
1226
1253
|
config: e.object({
|
|
1227
|
-
components: e.array(
|
|
1254
|
+
components: e.array(Ot),
|
|
1228
1255
|
next_node: e.string().optional()
|
|
1229
1256
|
})
|
|
1230
|
-
}),
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
]),
|
|
1257
|
+
}), Mt = e.discriminatedUnion("type", [
|
|
1258
|
+
kt,
|
|
1259
|
+
At,
|
|
1260
|
+
jt
|
|
1261
|
+
]), Nt = e.object({
|
|
1235
1262
|
name: e.string().openapi({ description: "The name of the form" }),
|
|
1236
1263
|
messages: e.object({
|
|
1237
1264
|
errors: e.record(e.string(), e.any()).optional(),
|
|
@@ -1242,14 +1269,14 @@ var E = e.object({
|
|
|
1242
1269
|
default: e.string().optional()
|
|
1243
1270
|
}).optional(),
|
|
1244
1271
|
translations: e.record(e.string(), e.any()).optional(),
|
|
1245
|
-
nodes: e.array(
|
|
1272
|
+
nodes: e.array(Mt).optional(),
|
|
1246
1273
|
start: e.object({
|
|
1247
1274
|
hidden_fields: e.array(e.object({
|
|
1248
1275
|
key: e.string(),
|
|
1249
1276
|
value: e.string()
|
|
1250
1277
|
})).optional(),
|
|
1251
1278
|
next_node: e.string().optional(),
|
|
1252
|
-
coordinates:
|
|
1279
|
+
coordinates: D.optional()
|
|
1253
1280
|
}).optional(),
|
|
1254
1281
|
ending: e.object({
|
|
1255
1282
|
redirection: e.object({
|
|
@@ -1257,7 +1284,7 @@ var E = e.object({
|
|
|
1257
1284
|
target: e.string().optional()
|
|
1258
1285
|
}).optional(),
|
|
1259
1286
|
after_submit: e.object({ flow_id: e.string().optional() }).optional(),
|
|
1260
|
-
coordinates:
|
|
1287
|
+
coordinates: D.optional(),
|
|
1261
1288
|
resume_flow: e.boolean().optional()
|
|
1262
1289
|
}).optional(),
|
|
1263
1290
|
style: e.object({ css: e.string().optional() }).optional(),
|
|
@@ -1266,8 +1293,8 @@ var E = e.object({
|
|
|
1266
1293
|
sdk_src: e.string().optional()
|
|
1267
1294
|
}).optional()
|
|
1268
1295
|
}).openapi({ description: "Schema for flow-based forms (matches Auth0 Forms structure)" });
|
|
1269
|
-
n.extend(
|
|
1270
|
-
var
|
|
1296
|
+
n.extend(Nt.shape).extend({ id: e.string() });
|
|
1297
|
+
var Pt = e.object({
|
|
1271
1298
|
id: e.number().optional(),
|
|
1272
1299
|
text: e.string(),
|
|
1273
1300
|
type: e.enum([
|
|
@@ -1276,12 +1303,12 @@ var jt = e.object({
|
|
|
1276
1303
|
"success",
|
|
1277
1304
|
"warning"
|
|
1278
1305
|
])
|
|
1279
|
-
}),
|
|
1306
|
+
}), Ft = e.object({
|
|
1280
1307
|
id: e.string().optional(),
|
|
1281
1308
|
text: e.string(),
|
|
1282
1309
|
href: e.string(),
|
|
1283
1310
|
linkText: e.string().optional()
|
|
1284
|
-
}),
|
|
1311
|
+
}), It = e.object({
|
|
1285
1312
|
"form-content-start": e.string().optional(),
|
|
1286
1313
|
"form-content-end": e.string().optional(),
|
|
1287
1314
|
"form-footer-start": e.string().optional(),
|
|
@@ -1295,13 +1322,13 @@ e.object({
|
|
|
1295
1322
|
method: e.enum(["POST", "GET"]),
|
|
1296
1323
|
title: e.string().optional(),
|
|
1297
1324
|
description: e.string().optional(),
|
|
1298
|
-
components: e.array(
|
|
1299
|
-
messages: e.array(
|
|
1300
|
-
links: e.array(
|
|
1301
|
-
partials:
|
|
1325
|
+
components: e.array(Ot),
|
|
1326
|
+
messages: e.array(Pt).optional(),
|
|
1327
|
+
links: e.array(Ft).optional(),
|
|
1328
|
+
partials: It.optional(),
|
|
1302
1329
|
footer: e.string().optional()
|
|
1303
1330
|
});
|
|
1304
|
-
var
|
|
1331
|
+
var O = e.enum([
|
|
1305
1332
|
"pre-user-registration",
|
|
1306
1333
|
"post-user-registration",
|
|
1307
1334
|
"post-user-login",
|
|
@@ -1309,95 +1336,96 @@ var D = e.enum([
|
|
|
1309
1336
|
"validate-registration-username",
|
|
1310
1337
|
"pre-user-deletion",
|
|
1311
1338
|
"post-user-deletion"
|
|
1312
|
-
]),
|
|
1339
|
+
]), k = e.enum(["post-user-login"]), A = e.enum([
|
|
1313
1340
|
"post-user-login",
|
|
1314
1341
|
"post-user-registration",
|
|
1315
1342
|
"post-user-update",
|
|
1316
1343
|
"credentials-exchange"
|
|
1317
|
-
]),
|
|
1344
|
+
]), j = e.enum([
|
|
1318
1345
|
"post-user-login",
|
|
1319
1346
|
"credentials-exchange",
|
|
1320
1347
|
"pre-user-registration",
|
|
1321
1348
|
"post-user-registration"
|
|
1322
|
-
]),
|
|
1323
|
-
|
|
1324
|
-
var
|
|
1349
|
+
]), M = e.enum(["post-user-login"]);
|
|
1350
|
+
O.options, k.options, A.options, j.options, M.options;
|
|
1351
|
+
var Lt = e.enum(["impersonate"]), Rt = e.enum([
|
|
1325
1352
|
"ensure-username",
|
|
1326
1353
|
"set-preferred-username",
|
|
1327
1354
|
"account-linking"
|
|
1328
|
-
]),
|
|
1355
|
+
]), N = {
|
|
1329
1356
|
enabled: e.boolean().default(!1),
|
|
1330
1357
|
synchronous: e.boolean().default(!1),
|
|
1331
1358
|
priority: e.number().optional(),
|
|
1332
1359
|
hook_id: e.string().optional(),
|
|
1333
|
-
metadata: e.record(e.string(), e.unknown()).optional()
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
url: e.string()
|
|
1338
|
-
}), Lt = e.object({
|
|
1339
|
-
...M,
|
|
1360
|
+
metadata: e.record(e.string(), e.unknown()).optional(),
|
|
1361
|
+
...a
|
|
1362
|
+
}, zt = e.object({
|
|
1363
|
+
...N,
|
|
1340
1364
|
trigger_id: O,
|
|
1341
|
-
|
|
1342
|
-
}),
|
|
1343
|
-
...
|
|
1365
|
+
url: e.string()
|
|
1366
|
+
}), Bt = e.object({
|
|
1367
|
+
...N,
|
|
1344
1368
|
trigger_id: k,
|
|
1345
|
-
|
|
1346
|
-
}),
|
|
1347
|
-
...
|
|
1369
|
+
form_id: e.string()
|
|
1370
|
+
}), Vt = e.object({
|
|
1371
|
+
...N,
|
|
1348
1372
|
trigger_id: A,
|
|
1349
|
-
|
|
1350
|
-
}),
|
|
1351
|
-
...
|
|
1373
|
+
template_id: Rt
|
|
1374
|
+
}), Ht = e.object({
|
|
1375
|
+
...N,
|
|
1352
1376
|
trigger_id: j,
|
|
1353
|
-
|
|
1377
|
+
code_id: e.string()
|
|
1378
|
+
}), Ut = e.object({
|
|
1379
|
+
...N,
|
|
1380
|
+
trigger_id: M,
|
|
1381
|
+
page_id: Lt,
|
|
1354
1382
|
permission_required: e.string().optional()
|
|
1355
1383
|
});
|
|
1356
1384
|
e.union([
|
|
1357
|
-
It,
|
|
1358
|
-
Lt,
|
|
1359
|
-
Rt,
|
|
1360
1385
|
zt,
|
|
1361
|
-
Bt
|
|
1386
|
+
Bt,
|
|
1387
|
+
Vt,
|
|
1388
|
+
Ht,
|
|
1389
|
+
Ut
|
|
1362
1390
|
]);
|
|
1363
|
-
var
|
|
1364
|
-
...
|
|
1365
|
-
trigger_id:
|
|
1391
|
+
var Wt = e.object({
|
|
1392
|
+
...N,
|
|
1393
|
+
trigger_id: O
|
|
1366
1394
|
}).extend(n.shape).extend({
|
|
1367
1395
|
hook_id: e.string(),
|
|
1368
1396
|
url: e.string()
|
|
1369
|
-
}),
|
|
1370
|
-
...
|
|
1371
|
-
trigger_id:
|
|
1397
|
+
}), Gt = e.object({
|
|
1398
|
+
...N,
|
|
1399
|
+
trigger_id: k
|
|
1372
1400
|
}).extend(n.shape).extend({
|
|
1373
1401
|
hook_id: e.string(),
|
|
1374
1402
|
form_id: e.string()
|
|
1375
|
-
}),
|
|
1376
|
-
...
|
|
1377
|
-
trigger_id:
|
|
1403
|
+
}), Kt = e.object({
|
|
1404
|
+
...N,
|
|
1405
|
+
trigger_id: A
|
|
1378
1406
|
}).extend(n.shape).extend({
|
|
1379
1407
|
hook_id: e.string(),
|
|
1380
|
-
template_id:
|
|
1381
|
-
}),
|
|
1382
|
-
...
|
|
1383
|
-
trigger_id:
|
|
1408
|
+
template_id: Rt
|
|
1409
|
+
}), qt = e.object({
|
|
1410
|
+
...N,
|
|
1411
|
+
trigger_id: j
|
|
1384
1412
|
}).extend(n.shape).extend({
|
|
1385
1413
|
hook_id: e.string(),
|
|
1386
1414
|
code_id: e.string()
|
|
1387
|
-
}),
|
|
1388
|
-
...
|
|
1389
|
-
trigger_id:
|
|
1415
|
+
}), Jt = e.object({
|
|
1416
|
+
...N,
|
|
1417
|
+
trigger_id: M
|
|
1390
1418
|
}).extend(n.shape).extend({
|
|
1391
1419
|
hook_id: e.string(),
|
|
1392
|
-
page_id:
|
|
1420
|
+
page_id: Lt,
|
|
1393
1421
|
permission_required: e.string().optional()
|
|
1394
1422
|
});
|
|
1395
1423
|
e.union([
|
|
1396
|
-
Vt,
|
|
1397
|
-
Ht,
|
|
1398
|
-
Ut,
|
|
1399
1424
|
Wt,
|
|
1400
|
-
Gt
|
|
1425
|
+
Gt,
|
|
1426
|
+
Kt,
|
|
1427
|
+
qt,
|
|
1428
|
+
Jt
|
|
1401
1429
|
]), e.object({
|
|
1402
1430
|
code: e.string().max(1e5),
|
|
1403
1431
|
secrets: e.record(e.string(), e.string()).optional()
|
|
@@ -1405,11 +1433,11 @@ e.union([
|
|
|
1405
1433
|
id: e.string(),
|
|
1406
1434
|
tenant_id: e.string()
|
|
1407
1435
|
}).extend(n.shape);
|
|
1408
|
-
var
|
|
1436
|
+
var Yt = e.object({ name: e.string().optional() }), Xt = e.object({ email: e.string().optional() }), Zt = e.object({
|
|
1409
1437
|
id: e.string().optional(),
|
|
1410
1438
|
organization_id: e.string().max(50),
|
|
1411
|
-
inviter:
|
|
1412
|
-
invitee:
|
|
1439
|
+
inviter: Yt,
|
|
1440
|
+
invitee: Xt,
|
|
1413
1441
|
invitation_url: e.string().url(),
|
|
1414
1442
|
client_id: e.string(),
|
|
1415
1443
|
connection_id: e.string().optional(),
|
|
@@ -1425,8 +1453,8 @@ e.object({
|
|
|
1425
1453
|
created_at: e.string().datetime(),
|
|
1426
1454
|
expires_at: e.string().datetime(),
|
|
1427
1455
|
ticket_id: e.string().optional()
|
|
1428
|
-
}).extend(
|
|
1429
|
-
var
|
|
1456
|
+
}).extend(Zt.omit({ id: !0 }).shape);
|
|
1457
|
+
var Qt = e.object({
|
|
1430
1458
|
alg: e.enum([
|
|
1431
1459
|
"RS256",
|
|
1432
1460
|
"RS384",
|
|
@@ -1468,7 +1496,7 @@ var Yt = e.object({
|
|
|
1468
1496
|
path: [r],
|
|
1469
1497
|
message: `EC JWK is missing required member '${r}'`
|
|
1470
1498
|
});
|
|
1471
|
-
}),
|
|
1499
|
+
}), $t = e.object({ keys: e.array(Qt) });
|
|
1472
1500
|
e.object({
|
|
1473
1501
|
issuer: e.string(),
|
|
1474
1502
|
authorization_endpoint: e.string(),
|
|
@@ -1496,35 +1524,35 @@ e.object({
|
|
|
1496
1524
|
backchannel_logout_supported: e.boolean().optional(),
|
|
1497
1525
|
backchannel_logout_session_supported: e.boolean().optional()
|
|
1498
1526
|
});
|
|
1499
|
-
var
|
|
1527
|
+
var en = /* @__PURE__ */ function(e) {
|
|
1500
1528
|
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;
|
|
1501
|
-
}({}),
|
|
1529
|
+
}({}), tn = e.nativeEnum(en), nn = e.object({
|
|
1502
1530
|
strategy: e.string(),
|
|
1503
1531
|
strategy_type: e.string()
|
|
1504
1532
|
});
|
|
1505
1533
|
e.object({
|
|
1506
1534
|
csrf_token: e.string(),
|
|
1507
1535
|
auth0Client: e.string().optional(),
|
|
1508
|
-
authParams:
|
|
1536
|
+
authParams: Ue,
|
|
1509
1537
|
expires_at: e.string(),
|
|
1510
1538
|
deleted_at: e.string().optional(),
|
|
1511
1539
|
ip: e.string().optional(),
|
|
1512
1540
|
useragent: e.string().optional(),
|
|
1513
1541
|
session_id: e.string().optional(),
|
|
1514
1542
|
authorization_url: e.string().optional(),
|
|
1515
|
-
state:
|
|
1543
|
+
state: tn.optional().default("pending"),
|
|
1516
1544
|
state_data: e.string().optional(),
|
|
1517
1545
|
failure_reason: e.string().optional(),
|
|
1518
1546
|
user_id: e.string().optional(),
|
|
1519
1547
|
auth_connection: e.string().optional(),
|
|
1520
|
-
auth_strategy:
|
|
1548
|
+
auth_strategy: nn.optional(),
|
|
1521
1549
|
authenticated_at: e.string().optional()
|
|
1522
1550
|
}).openapi({ description: "This represents a login sesion" }).extend({
|
|
1523
1551
|
id: e.string().openapi({ description: "This is is used as the state in the universal login" }),
|
|
1524
1552
|
created_at: e.string(),
|
|
1525
1553
|
updated_at: e.string()
|
|
1526
1554
|
});
|
|
1527
|
-
var
|
|
1555
|
+
var P = {
|
|
1528
1556
|
ACLS_SUMMARY: "acls_summary",
|
|
1529
1557
|
ACTIONS_EXECUTION_FAILED: "actions_execution_failed",
|
|
1530
1558
|
API_LIMIT: "api_limit",
|
|
@@ -1537,6 +1565,7 @@ var N = {
|
|
|
1537
1565
|
CODE_LINK_SENT: "cls",
|
|
1538
1566
|
CODE_SENT: "cs",
|
|
1539
1567
|
DEPRECATION_NOTICE: "depnote",
|
|
1568
|
+
CONFIG_INHERITANCE_DIFF: "cfgdiff",
|
|
1540
1569
|
FAILED_LOGIN: "f",
|
|
1541
1570
|
FAILED_BY_CONNECTOR: "fc",
|
|
1542
1571
|
FAILED_CHANGE_EMAIL: "fce",
|
|
@@ -1684,17 +1713,17 @@ var N = {
|
|
|
1684
1713
|
WARNING_DURING_LOGIN: "w",
|
|
1685
1714
|
WARNING_SENDING_NOTIFICATION: "wn",
|
|
1686
1715
|
WARNING_USER_MANAGEMENT: "wum"
|
|
1687
|
-
},
|
|
1688
|
-
|
|
1716
|
+
}, rn = e.string().refine((e) => Object.values(P).includes(e), { message: "Invalid log type" });
|
|
1717
|
+
P.ACLS_SUMMARY, P.ACTIONS_EXECUTION_FAILED, P.API_LIMIT, P.API_LIMIT_WARNING, P.APPI, P.CIBA_EXCHANGE_FAILED, P.CIBA_EXCHANGE_SUCCEEDED, P.CIBA_START_FAILED, P.CIBA_START_SUCCEEDED, P.CODE_LINK_SENT, P.CODE_SENT, P.DEPRECATION_NOTICE, P.CONFIG_INHERITANCE_DIFF, P.FAILED_LOGIN, P.FAILED_BY_CONNECTOR, P.FAILED_CHANGE_EMAIL, P.FAILED_BY_CORS, P.FAILED_CROSS_ORIGIN_AUTHENTICATION, P.FAILED_CHANGE_PASSWORD, P.FAILED_POST_CHANGE_PASSWORD_HOOK, P.FAILED_CHANGE_PHONE_NUMBER, P.FAILED_CHANGE_PASSWORD_REQUEST, P.FAILED_CONNECTOR_PROVISIONING, P.FAILED_CHANGE_USERNAME, P.FAILED_DELEGATION, P.FAILED_DEVICE_ACTIVATION, P.FAILED_DEVICE_AUTHORIZATION_REQUEST, P.USER_CANCELED_DEVICE_CONFIRMATION, P.FAILED_USER_DELETION, P.FAILED_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS, P.FAILED_EXCHANGE_CUSTOM_TOKEN, P.FAILED_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN, P.FAILED_FEDERATED_LOGOUT, P.FAILED_EXCHANGE_NATIVE_SOCIAL_LOGIN, P.FAILED_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_ROTATING_REFRESH_TOKEN, P.FAILED_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN, P.FAILED_HOOK, P.FAILED_IMPERSONATION, P.FAILED_INVITE_ACCEPT, P.FAILED_LOGOUT, P.FLOWS_EXECUTION_COMPLETED, P.FLOWS_EXECUTION_FAILED, P.FAILED_SENDING_NOTIFICATION, P.FORMS_SUBMISSION_FAILED, P.FORMS_SUBMISSION_SUCCEEDED, P.FAILED_LOGIN_INCORRECT_PASSWORD, P.FAILED_PUSHED_AUTHORIZATION_REQUEST, P.FAILED_POST_USER_REGISTRATION_HOOK, P.FAILED_SIGNUP, P.FAILED_SILENT_AUTH, P.FAILED_LOGIN_INVALID_EMAIL_USERNAME, P.FAILED_USERS_IMPORT, P.FAILED_VERIFICATION_EMAIL, P.FAILED_VERIFICATION_EMAIL_REQUEST, P.EMAIL_VERIFICATION_CONFIRMED, P.EMAIL_VERIFICATION_FAILED, P.MFA_AUTH_FAILED, P.MFA_AUTH_REJECTED, P.MFA_AUTH_SUCCESS, P.MFA_ENROLLMENT_COMPLETE, P.TOO_MANY_MFA_FAILURES, P.MFA_RECOVERY_FAILED, P.MFA_RECOVERY_RATE_LIMIT_EXCEED, P.MFA_RECOVERY_SUCCESS, P.MFA_EMAIL_SENT, P.EMAIL_VERIFICATION_SENT, P.EMAIL_VERIFICATION_SEND_FAILURE, P.PUSH_NOTIFICATION_SENT, P.ERROR_SENDING_MFA_PUSH_NOTIFICATION, P.MFA_SMS_SENT, P.ERROR_SENDING_MFA_SMS, P.MFA_VOICE_CALL_SUCCESS, P.MFA_VOICE_CALL_FAILED, P.SECOND_FACTOR_STARTED, P.MFA_ENROLL_STARTED, P.MFA_ENROLLMENT_FAILED, P.GUARDIAN_TENANT_UPDATE, P.UNENROLL_DEVICE_ACCOUNT, P.UPDATE_DEVICE_ACCOUNT, P.WEBAUTHN_CHALLENGE_FAILED, P.WEBAUTHN_ENROLLMENT_FAILED, P.FAILED_KMS_API_OPERATION, P.SUCCESS_KMS_API_OPERATION, P.KMS_KEY_STATE_CHANGED, P.TOO_MANY_CALLS_TO_DELEGATION, P.BLOCKED_IP_ADDRESS, P.BLOCKED_ACCOUNT_IP, P.BLOCKED_ACCOUNT_EMAIL, P.INFORMATION, P.MFA_REQUIRED, P.MANAGEMENT_API_READ_OPERATION, P.FAILED_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT, P.SUCCESSFUL_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT, P.FAILED_OIDC_BACKCHANNEL_LOGOUT, P.SUCCESSFUL_OIDC_BACKCHANNEL_LOGOUT, P.ORGANIZATION_MEMBER_ADDED, P.PASSKEY_CHALLENGE_FAILED, P.PASSKEY_CHALLENGE_STARTED, P.PRE_LOGIN_ASSESSMENT, P.BREACHED_PASSWORD, P.BREACHED_PASSWORD_ON_RESET, P.SUCCESS_RESOURCE_CLEANUP, P.RICH_CONSENTS_ACCESS_ERROR, P.SUCCESS_LOGIN, P.SUCCESS_API_OPERATION, P.FAILED_API_OPERATION, P.SUCCESS_CHANGE_EMAIL, P.SUCCESS_CROSS_ORIGIN_AUTHENTICATION, P.SUCCESS_CHANGE_PASSWORD, P.SUCCESS_CHANGE_PHONE_NUMBER, P.SUCCESS_CHANGE_PASSWORD_REQUEST, P.SUCCESS_CHANGE_USERNAME, P.SUCCESS_CREDENTIAL_VALIDATION, P.SUCCESS_DELEGATION, P.SUCCESS_USER_DELETION, P.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS, P.SUCCESS_EXCHANGE_CUSTOM_TOKEN, P.SUCCESS_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_NATIVE_SOCIAL_LOGIN, P.SUCCESS_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSKEY_OOB_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSKEY_OTP_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSKEY_MFA_RECOVERY_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN, P.SUCCESS_IMPERSONATION, P.SUCCESSFULLY_ACCEPTED_USER_INVITE, P.BREACHED_PASSWORD_ON_SIGNUP, P.SUCCESS_LOGOUT, P.SUCCESS_HOOK, P.SUCCESS_PASSWORD_MIGRATION, P.SUCCESS_REVOCATION, P.SUCCESS_SIGNUP, P.FAILED_SS_SSO_OPERATION, P.INFORMATION_FROM_SS_SSO_OPERATION, P.SUCCESS_SS_SSO_OPERATION, P.SUCCESS_SILENT_AUTH, P.SUCCESSFUL_SCIM_OPERATION, P.SUCCESSFULLY_IMPORTED_USERS, P.SUCCESS_VERIFICATION_EMAIL, P.SUCCESS_VERIFICATION_EMAIL_REQUEST, P.MAX_AMOUNT_OF_AUTHENTICATORS, P.USER_LOGIN_BLOCK_RELEASED, P.FAILED_UNIVERSAL_LOGOUT, P.SUCCESSFUL_UNIVERSAL_LOGOUT, P.WARNING_DURING_LOGIN, P.WARNING_SENDING_NOTIFICATION, P.WARNING_USER_MANAGEMENT, (() => {
|
|
1689
1718
|
let e = {};
|
|
1690
|
-
for (let [t, n] of Object.entries(
|
|
1719
|
+
for (let [t, n] of Object.entries(P)) t.startsWith("SUCCESS_") || t.startsWith("SUCCESSFUL_") || t.startsWith("SUCCESSFULLY_") || t.endsWith("_SUCCEEDED") || t.endsWith("_COMPLETED") ? e[n] = "success" : t.startsWith("FAILED_") || t.startsWith("ERROR_") || t.startsWith("BREACHED_") || t.startsWith("BLOCKED_") || t === "MFA_AUTH_FAILED" || t === "MFA_AUTH_REJECTED" || t === "MFA_RECOVERY_FAILED" || t === "MFA_ENROLLMENT_FAILED" || t === "EMAIL_VERIFICATION_FAILED" || t === "WEBAUTHN_CHALLENGE_FAILED" || t === "WEBAUTHN_ENROLLMENT_FAILED" || t === "PASSKEY_CHALLENGE_FAILED" || t === "FLOWS_EXECUTION_FAILED" || t === "FORMS_SUBMISSION_FAILED" || t === "CIBA_EXCHANGE_FAILED" || t === "CIBA_START_FAILED" || t === "ACTIONS_EXECUTION_FAILED" || t === "RICH_CONSENTS_ACCESS_ERROR" || t === "USER_CANCELED_DEVICE_CONFIRMATION" || t === "TOO_MANY_MFA_FAILURES" || t === "MFA_RECOVERY_RATE_LIMIT_EXCEED" || t === "API_LIMIT" || t === "MAX_AMOUNT_OF_AUTHENTICATORS" ? e[n] = "failure" : t.startsWith("WARNING_") || t === "API_LIMIT_WARNING" || t === "DEPRECATION_NOTICE" || t === "PRE_LOGIN_ASSESSMENT" ? e[n] = "warning" : t === "CODE_SENT" || t === "CODE_LINK_SENT" || t === "MFA_EMAIL_SENT" || t === "MFA_SMS_SENT" || t === "EMAIL_VERIFICATION_SENT" || t === "PUSH_NOTIFICATION_SENT" ? e[n] = "code_sent" : t === "INFORMATION" || t === "INFORMATION_FROM_SS_SSO_OPERATION" || t === "MANAGEMENT_API_READ_OPERATION" || t === "APPI" || t === "CONFIG_INHERITANCE_DIFF" || t === "ACLS_SUMMARY" || t === "ORGANIZATION_MEMBER_ADDED" ? e[n] = "info" : e[n] = "other";
|
|
1691
1720
|
return e;
|
|
1692
1721
|
})();
|
|
1693
|
-
var
|
|
1722
|
+
var an = e.object({
|
|
1694
1723
|
name: e.string(),
|
|
1695
1724
|
version: e.string(),
|
|
1696
1725
|
env: e.object({ node: e.string().optional() }).optional()
|
|
1697
|
-
}),
|
|
1726
|
+
}), on = e.object({
|
|
1698
1727
|
country_code: e.string().length(2),
|
|
1699
1728
|
city_name: e.string(),
|
|
1700
1729
|
latitude: e.string(),
|
|
@@ -1703,7 +1732,7 @@ var tn = e.object({
|
|
|
1703
1732
|
continent_code: e.string()
|
|
1704
1733
|
});
|
|
1705
1734
|
e.object({
|
|
1706
|
-
type:
|
|
1735
|
+
type: rn,
|
|
1707
1736
|
date: e.string(),
|
|
1708
1737
|
description: e.string().optional(),
|
|
1709
1738
|
ip: e.string().optional(),
|
|
@@ -1721,63 +1750,63 @@ e.object({
|
|
|
1721
1750
|
strategy: e.string().optional(),
|
|
1722
1751
|
strategy_type: e.string().optional(),
|
|
1723
1752
|
hostname: e.string().optional(),
|
|
1724
|
-
auth0_client:
|
|
1753
|
+
auth0_client: an.optional(),
|
|
1725
1754
|
log_id: e.string().optional(),
|
|
1726
|
-
location_info:
|
|
1755
|
+
location_info: on.optional()
|
|
1727
1756
|
}).extend({ log_id: e.string() });
|
|
1728
|
-
var
|
|
1757
|
+
var sn = e.enum([
|
|
1729
1758
|
"http",
|
|
1730
1759
|
"eventbridge",
|
|
1731
1760
|
"eventgrid",
|
|
1732
1761
|
"splunk",
|
|
1733
1762
|
"datadog",
|
|
1734
1763
|
"sumo"
|
|
1735
|
-
]),
|
|
1764
|
+
]), cn = e.enum([
|
|
1736
1765
|
"active",
|
|
1737
1766
|
"paused",
|
|
1738
1767
|
"suspended"
|
|
1739
|
-
]),
|
|
1768
|
+
]), ln = e.object({
|
|
1740
1769
|
type: e.string(),
|
|
1741
1770
|
name: e.string()
|
|
1742
1771
|
});
|
|
1743
1772
|
e.object({
|
|
1744
1773
|
name: e.string(),
|
|
1745
|
-
type:
|
|
1746
|
-
status:
|
|
1774
|
+
type: sn,
|
|
1775
|
+
status: cn.optional(),
|
|
1747
1776
|
sink: e.record(e.string(), e.unknown()),
|
|
1748
|
-
filters: e.array(
|
|
1777
|
+
filters: e.array(ln).optional(),
|
|
1749
1778
|
isPriority: e.boolean().optional()
|
|
1750
1779
|
}).extend({
|
|
1751
1780
|
id: e.string(),
|
|
1752
|
-
status:
|
|
1781
|
+
status: cn,
|
|
1753
1782
|
created_at: e.string().optional(),
|
|
1754
1783
|
updated_at: e.string().optional()
|
|
1755
1784
|
});
|
|
1756
|
-
var
|
|
1785
|
+
var un = e.enum([
|
|
1757
1786
|
"auth0",
|
|
1758
1787
|
"cognito",
|
|
1759
1788
|
"okta",
|
|
1760
1789
|
"oidc"
|
|
1761
|
-
]),
|
|
1790
|
+
]), dn = e.object({
|
|
1762
1791
|
domain: e.string(),
|
|
1763
1792
|
client_id: e.string(),
|
|
1764
1793
|
client_secret: e.string(),
|
|
1765
1794
|
audience: e.string().optional(),
|
|
1766
1795
|
scope: e.string().optional()
|
|
1767
|
-
}),
|
|
1796
|
+
}), fn = e.object({
|
|
1768
1797
|
id: e.string().optional(),
|
|
1769
1798
|
name: e.string(),
|
|
1770
|
-
provider:
|
|
1799
|
+
provider: un,
|
|
1771
1800
|
connection: e.string(),
|
|
1772
1801
|
enabled: e.boolean().default(!0),
|
|
1773
|
-
credentials:
|
|
1802
|
+
credentials: dn
|
|
1774
1803
|
});
|
|
1775
1804
|
e.object({
|
|
1776
1805
|
id: e.string(),
|
|
1777
1806
|
created_at: e.string(),
|
|
1778
1807
|
updated_at: e.string()
|
|
1779
|
-
}).extend(
|
|
1780
|
-
var
|
|
1808
|
+
}).extend(fn.shape);
|
|
1809
|
+
var pn = e.object({
|
|
1781
1810
|
enabled: e.boolean().optional(),
|
|
1782
1811
|
shields: e.array(e.string()).optional(),
|
|
1783
1812
|
admin_notification_frequency: e.array(e.string()).optional(),
|
|
@@ -1786,13 +1815,13 @@ var un = e.object({
|
|
|
1786
1815
|
"pre-user-registration": e.object({ shields: e.array(e.string()).optional() }).optional(),
|
|
1787
1816
|
"pre-change-password": e.object({ shields: e.array(e.string()).optional() }).optional()
|
|
1788
1817
|
}).optional()
|
|
1789
|
-
}),
|
|
1818
|
+
}), mn = e.object({
|
|
1790
1819
|
enabled: e.boolean().optional(),
|
|
1791
1820
|
shields: e.array(e.string()).optional(),
|
|
1792
1821
|
allowlist: e.array(e.string()).optional(),
|
|
1793
1822
|
mode: e.string().optional(),
|
|
1794
1823
|
max_attempts: e.number().optional()
|
|
1795
|
-
}),
|
|
1824
|
+
}), hn = e.object({
|
|
1796
1825
|
enabled: e.boolean().optional(),
|
|
1797
1826
|
shields: e.array(e.string()).optional(),
|
|
1798
1827
|
allowlist: e.array(e.string()).optional(),
|
|
@@ -1806,10 +1835,10 @@ var un = e.object({
|
|
|
1806
1835
|
rate: e.number().optional()
|
|
1807
1836
|
}).optional()
|
|
1808
1837
|
}).optional()
|
|
1809
|
-
}),
|
|
1810
|
-
breached_password_detection:
|
|
1811
|
-
brute_force_protection:
|
|
1812
|
-
suspicious_ip_throttling:
|
|
1838
|
+
}), gn = e.object({
|
|
1839
|
+
breached_password_detection: pn.optional(),
|
|
1840
|
+
brute_force_protection: mn.optional(),
|
|
1841
|
+
suspicious_ip_throttling: hn.optional()
|
|
1813
1842
|
});
|
|
1814
1843
|
e.object({
|
|
1815
1844
|
id: e.string().optional(),
|
|
@@ -1822,14 +1851,14 @@ e.object({
|
|
|
1822
1851
|
created_at: e.string(),
|
|
1823
1852
|
updated_at: e.string()
|
|
1824
1853
|
});
|
|
1825
|
-
var
|
|
1854
|
+
var _n = e.object({
|
|
1826
1855
|
initial_user_agent: e.string().describe("First user agent of the device from which this user logged in"),
|
|
1827
1856
|
initial_ip: e.string().describe("First IP address associated with this session"),
|
|
1828
1857
|
initial_asn: e.string().describe("First autonomous system number associated with this session"),
|
|
1829
1858
|
last_user_agent: e.string().describe("Last user agent of the device from which this user logged in"),
|
|
1830
1859
|
last_ip: e.string().describe("Last IP address from which this user logged in"),
|
|
1831
1860
|
last_asn: e.string().describe("Last autonomous system number from which this user logged in")
|
|
1832
|
-
}),
|
|
1861
|
+
}), vn = e.object({
|
|
1833
1862
|
id: e.string(),
|
|
1834
1863
|
revoked_at: e.string().optional(),
|
|
1835
1864
|
used_at: e.string().optional(),
|
|
@@ -1837,7 +1866,7 @@ var mn = e.object({
|
|
|
1837
1866
|
expires_at: e.string().optional(),
|
|
1838
1867
|
login_session_id: e.string(),
|
|
1839
1868
|
idle_expires_at: e.string().optional(),
|
|
1840
|
-
device:
|
|
1869
|
+
device: _n.describe("Metadata related to the device used in the session"),
|
|
1841
1870
|
clients: e.array(e.string()).describe("List of client details for the session")
|
|
1842
1871
|
});
|
|
1843
1872
|
e.object({
|
|
@@ -1845,7 +1874,7 @@ e.object({
|
|
|
1845
1874
|
updated_at: e.string(),
|
|
1846
1875
|
authenticated_at: e.string(),
|
|
1847
1876
|
last_interaction_at: e.string()
|
|
1848
|
-
}).extend(
|
|
1877
|
+
}).extend(vn.shape), e.object({
|
|
1849
1878
|
kid: e.string().openapi({ description: "The key id of the signing key" }),
|
|
1850
1879
|
tenant_id: e.string().optional().openapi({ description: "The tenant the key belongs to. Omitted means the key is shared / control-plane scoped." }),
|
|
1851
1880
|
cert: e.string().openapi({ description: "The public certificate of the signing key" }),
|
|
@@ -1862,8 +1891,9 @@ e.object({
|
|
|
1862
1891
|
connection: e.string().optional().openapi({ description: "The connection identifier associated with the key" }),
|
|
1863
1892
|
type: e.enum(["jwt_signing", "saml_encryption"]).openapi({ description: "The type of the signing key" })
|
|
1864
1893
|
});
|
|
1865
|
-
var
|
|
1894
|
+
var yn = e.object({
|
|
1866
1895
|
id: e.string().optional(),
|
|
1896
|
+
parent_tenant_id: e.string().nullish(),
|
|
1867
1897
|
audience: e.string().optional(),
|
|
1868
1898
|
friendly_name: e.string(),
|
|
1869
1899
|
picture_url: e.string().optional(),
|
|
@@ -1980,7 +2010,7 @@ var gn = e.object({
|
|
|
1980
2010
|
"shared_planetscale"
|
|
1981
2011
|
]).optional(),
|
|
1982
2012
|
d1_database_id: e.string().max(64).optional(),
|
|
1983
|
-
attack_protection:
|
|
2013
|
+
attack_protection: gn.optional(),
|
|
1984
2014
|
mfa: e.object({
|
|
1985
2015
|
policy: e.enum(["never", "always"]).default("never").optional(),
|
|
1986
2016
|
factors: e.object({
|
|
@@ -2011,29 +2041,29 @@ var gn = e.object({
|
|
|
2011
2041
|
e.object({
|
|
2012
2042
|
created_at: e.string().nullable().transform((e) => e ?? ""),
|
|
2013
2043
|
updated_at: e.string().nullable().transform((e) => e ?? "")
|
|
2014
|
-
}).extend(
|
|
2044
|
+
}).extend(yn.shape).extend({
|
|
2015
2045
|
id: e.string(),
|
|
2016
2046
|
is_control_plane: e.boolean().optional()
|
|
2017
2047
|
});
|
|
2018
|
-
var
|
|
2048
|
+
var bn = e.enum([
|
|
2019
2049
|
"provision",
|
|
2020
2050
|
"seed",
|
|
2021
2051
|
"upgrade",
|
|
2022
2052
|
"backup",
|
|
2023
2053
|
"deprovision",
|
|
2024
2054
|
"users_import"
|
|
2025
|
-
]),
|
|
2055
|
+
]), xn = e.enum([
|
|
2026
2056
|
"pending",
|
|
2027
2057
|
"running",
|
|
2028
2058
|
"succeeded",
|
|
2029
2059
|
"failed",
|
|
2030
2060
|
"cancelled"
|
|
2031
|
-
]),
|
|
2061
|
+
]), Sn = e.string().max(64);
|
|
2032
2062
|
e.object({
|
|
2033
2063
|
tenant_id: e.string().max(255).nullable().default(null),
|
|
2034
2064
|
rollout_id: e.string().max(255).nullable().optional(),
|
|
2035
|
-
kind:
|
|
2036
|
-
engine:
|
|
2065
|
+
kind: bn,
|
|
2066
|
+
engine: Sn,
|
|
2037
2067
|
engine_instance_id: e.string().max(100).nullable().optional(),
|
|
2038
2068
|
target_worker_version: e.string().max(255).nullable().optional(),
|
|
2039
2069
|
target_database_version: e.string().max(255).nullable().optional(),
|
|
@@ -2041,7 +2071,7 @@ e.object({
|
|
|
2041
2071
|
input: e.record(e.string(), e.unknown()).nullable().optional()
|
|
2042
2072
|
}).extend({
|
|
2043
2073
|
id: e.string(),
|
|
2044
|
-
status:
|
|
2074
|
+
status: xn,
|
|
2045
2075
|
current_step: e.string().max(255).nullable().optional(),
|
|
2046
2076
|
error: e.string().nullable().optional(),
|
|
2047
2077
|
result: e.record(e.string(), e.unknown()).nullable().optional(),
|
|
@@ -2062,7 +2092,7 @@ e.object({
|
|
|
2062
2092
|
claim_expires_at: !0,
|
|
2063
2093
|
finished_at: !0
|
|
2064
2094
|
}).partial();
|
|
2065
|
-
var
|
|
2095
|
+
var Cn = e.enum([
|
|
2066
2096
|
"started",
|
|
2067
2097
|
"succeeded",
|
|
2068
2098
|
"failed",
|
|
@@ -2073,14 +2103,14 @@ var bn = e.enum([
|
|
|
2073
2103
|
e.object({
|
|
2074
2104
|
operation_id: e.string().max(255),
|
|
2075
2105
|
step: e.string().max(255),
|
|
2076
|
-
outcome:
|
|
2106
|
+
outcome: Cn,
|
|
2077
2107
|
detail: e.record(e.string(), e.unknown()).nullable().optional(),
|
|
2078
2108
|
attempt: e.number().int().min(1).default(1)
|
|
2079
2109
|
}).extend({
|
|
2080
2110
|
id: e.string(),
|
|
2081
2111
|
created_at: e.string()
|
|
2082
2112
|
});
|
|
2083
|
-
var
|
|
2113
|
+
var F = e.enum([
|
|
2084
2114
|
"pending",
|
|
2085
2115
|
"inserted",
|
|
2086
2116
|
"updated",
|
|
@@ -2091,28 +2121,28 @@ e.object({
|
|
|
2091
2121
|
operation_id: e.string().max(255),
|
|
2092
2122
|
seq: e.number().int().min(0),
|
|
2093
2123
|
payload: e.record(e.string(), e.unknown()),
|
|
2094
|
-
status:
|
|
2124
|
+
status: F.default("pending"),
|
|
2095
2125
|
error_code: e.string().max(64).nullable().optional(),
|
|
2096
2126
|
error_message: e.string().nullable().optional(),
|
|
2097
2127
|
error_path: e.string().max(255).nullable().optional(),
|
|
2098
2128
|
entity_id: e.string().max(255).nullable().optional()
|
|
2099
2129
|
}).extend({
|
|
2100
|
-
status:
|
|
2130
|
+
status: F,
|
|
2101
2131
|
created_at: e.string(),
|
|
2102
2132
|
updated_at: e.string()
|
|
2103
2133
|
}), e.object({
|
|
2104
2134
|
seq: e.number().int().min(0),
|
|
2105
|
-
status:
|
|
2135
|
+
status: F,
|
|
2106
2136
|
error_code: e.string().max(64).nullable().optional(),
|
|
2107
2137
|
error_message: e.string().nullable().optional(),
|
|
2108
2138
|
error_path: e.string().max(255).nullable().optional(),
|
|
2109
2139
|
entity_id: e.string().max(255).nullable().optional()
|
|
2110
2140
|
});
|
|
2111
|
-
var
|
|
2141
|
+
var wn = e.enum([
|
|
2112
2142
|
"upgrade",
|
|
2113
2143
|
"reseed",
|
|
2114
2144
|
"backup"
|
|
2115
|
-
]),
|
|
2145
|
+
]), Tn = e.enum([
|
|
2116
2146
|
"pending",
|
|
2117
2147
|
"canary",
|
|
2118
2148
|
"rolling",
|
|
@@ -2121,7 +2151,7 @@ var xn = e.enum([
|
|
|
2121
2151
|
"failed"
|
|
2122
2152
|
]);
|
|
2123
2153
|
e.object({
|
|
2124
|
-
kind:
|
|
2154
|
+
kind: wn,
|
|
2125
2155
|
target_worker_version: e.string().max(255).nullable().optional(),
|
|
2126
2156
|
target_database_version: e.string().max(255).nullable().optional(),
|
|
2127
2157
|
wave_size: e.number().int().min(1).default(10),
|
|
@@ -2130,7 +2160,7 @@ e.object({
|
|
|
2130
2160
|
initiated_by: e.string().max(255).nullable().optional()
|
|
2131
2161
|
}).extend({
|
|
2132
2162
|
id: e.string(),
|
|
2133
|
-
status:
|
|
2163
|
+
status: Tn,
|
|
2134
2164
|
created_at: e.string(),
|
|
2135
2165
|
updated_at: e.string(),
|
|
2136
2166
|
finished_at: e.string().nullable().optional()
|
|
@@ -2152,7 +2182,7 @@ e.object({
|
|
|
2152
2182
|
code: e.string(),
|
|
2153
2183
|
state: e.string().optional()
|
|
2154
2184
|
});
|
|
2155
|
-
var
|
|
2185
|
+
var En = e.object({
|
|
2156
2186
|
button_border_radius: e.number(),
|
|
2157
2187
|
button_border_weight: e.number(),
|
|
2158
2188
|
buttons_style: e.enum([
|
|
@@ -2170,7 +2200,7 @@ var Cn = e.object({
|
|
|
2170
2200
|
show_widget_shadow: e.boolean(),
|
|
2171
2201
|
widget_border_weight: e.number(),
|
|
2172
2202
|
widget_corner_radius: e.number()
|
|
2173
|
-
}),
|
|
2203
|
+
}), Dn = e.object({
|
|
2174
2204
|
base_focus_color: e.string(),
|
|
2175
2205
|
base_hover_color: e.string(),
|
|
2176
2206
|
body_text: e.string(),
|
|
@@ -2194,20 +2224,20 @@ var Cn = e.object({
|
|
|
2194
2224
|
success: e.string(),
|
|
2195
2225
|
widget_background: e.string(),
|
|
2196
2226
|
widget_border: e.string()
|
|
2197
|
-
}),
|
|
2227
|
+
}), I = e.object({
|
|
2198
2228
|
bold: e.boolean(),
|
|
2199
2229
|
size: e.number()
|
|
2200
|
-
}),
|
|
2201
|
-
body_text:
|
|
2202
|
-
buttons_text:
|
|
2230
|
+
}), On = e.object({
|
|
2231
|
+
body_text: I,
|
|
2232
|
+
buttons_text: I,
|
|
2203
2233
|
font_url: e.string(),
|
|
2204
|
-
input_labels:
|
|
2205
|
-
links:
|
|
2234
|
+
input_labels: I,
|
|
2235
|
+
links: I,
|
|
2206
2236
|
links_style: e.enum(["normal", "underlined"]),
|
|
2207
2237
|
reference_text_size: e.number(),
|
|
2208
|
-
subtitle:
|
|
2209
|
-
title:
|
|
2210
|
-
}),
|
|
2238
|
+
subtitle: I,
|
|
2239
|
+
title: I
|
|
2240
|
+
}), kn = e.object({
|
|
2211
2241
|
background_color: e.string(),
|
|
2212
2242
|
background_image_url: e.string(),
|
|
2213
2243
|
page_layout: e.enum([
|
|
@@ -2220,7 +2250,7 @@ var Cn = e.object({
|
|
|
2220
2250
|
"chip",
|
|
2221
2251
|
"none"
|
|
2222
2252
|
]).optional()
|
|
2223
|
-
}),
|
|
2253
|
+
}), An = e.object({
|
|
2224
2254
|
header_text_alignment: e.enum([
|
|
2225
2255
|
"center",
|
|
2226
2256
|
"left",
|
|
@@ -2237,43 +2267,44 @@ var Cn = e.object({
|
|
|
2237
2267
|
social_buttons_layout: e.enum(["bottom", "top"])
|
|
2238
2268
|
});
|
|
2239
2269
|
e.object({
|
|
2240
|
-
borders:
|
|
2241
|
-
colors:
|
|
2270
|
+
borders: En,
|
|
2271
|
+
colors: Dn,
|
|
2242
2272
|
displayName: e.string(),
|
|
2243
|
-
fonts:
|
|
2244
|
-
page_background:
|
|
2245
|
-
widget:
|
|
2273
|
+
fonts: On,
|
|
2274
|
+
page_background: kn,
|
|
2275
|
+
widget: An
|
|
2246
2276
|
}).extend({ themeId: e.string() }), e.object({
|
|
2277
|
+
...a,
|
|
2247
2278
|
universal_login_experience: e.enum(["new", "classic"]).default("new"),
|
|
2248
2279
|
identifier_first: e.boolean().default(!0),
|
|
2249
2280
|
password_first: e.boolean().default(!1),
|
|
2250
2281
|
show_last_used_connection: e.boolean().default(!1),
|
|
2251
2282
|
webauthn_platform_first_factor: e.boolean()
|
|
2252
2283
|
});
|
|
2253
|
-
var
|
|
2284
|
+
var jn = e.object({
|
|
2254
2285
|
hosts: e.array(e.string()).optional(),
|
|
2255
2286
|
methods: e.array(e.string()).optional(),
|
|
2256
2287
|
path: e.string().default("/*"),
|
|
2257
2288
|
headers: e.record(e.string(), e.string()).optional(),
|
|
2258
2289
|
query: e.record(e.string(), e.string()).optional()
|
|
2259
|
-
}),
|
|
2290
|
+
}), Mn = e.object({
|
|
2260
2291
|
type: e.string(),
|
|
2261
2292
|
options: e.record(e.string(), e.unknown()).default({})
|
|
2262
|
-
}),
|
|
2293
|
+
}), L = e.object({
|
|
2263
2294
|
id: e.string().optional(),
|
|
2264
2295
|
custom_domain_id: e.string(),
|
|
2265
2296
|
priority: e.number().int().default(100),
|
|
2266
|
-
match:
|
|
2267
|
-
handlers: e.array(
|
|
2268
|
-
}),
|
|
2297
|
+
match: jn,
|
|
2298
|
+
handlers: e.array(Mn).min(1)
|
|
2299
|
+
}), Nn = L.extend({
|
|
2269
2300
|
id: e.string(),
|
|
2270
2301
|
tenant_id: e.string(),
|
|
2271
2302
|
created_at: e.string(),
|
|
2272
2303
|
updated_at: e.string()
|
|
2273
|
-
}),
|
|
2304
|
+
}), Pn = L.partial().omit({
|
|
2274
2305
|
id: !0,
|
|
2275
2306
|
custom_domain_id: !0
|
|
2276
|
-
}),
|
|
2307
|
+
}), Fn = "custom_authentication", In = [
|
|
2277
2308
|
"urn:ietf:params:oauth:",
|
|
2278
2309
|
"urn:auth0",
|
|
2279
2310
|
"urn:okta",
|
|
@@ -2281,56 +2312,56 @@ var On = e.object({
|
|
|
2281
2312
|
"https://auth0.com",
|
|
2282
2313
|
"http://okta.com",
|
|
2283
2314
|
"https://okta.com"
|
|
2284
|
-
],
|
|
2315
|
+
], Ln = e.string().min(1).max(200).refine((e) => e.startsWith("https://") || e.startsWith("urn:"), { message: "subject_token_type must be a URI starting with https:// or urn:" }).refine((e) => !In.some((t) => e.toLowerCase().startsWith(t)), { message: "subject_token_type uses a reserved namespace" }), Rn = e.enum([
|
|
2285
2316
|
"RS256",
|
|
2286
2317
|
"RS384",
|
|
2287
2318
|
"RS512",
|
|
2288
2319
|
"ES256",
|
|
2289
2320
|
"ES384",
|
|
2290
2321
|
"ES512"
|
|
2291
|
-
]),
|
|
2322
|
+
]), zn = e.discriminatedUnion("type", [e.object({
|
|
2292
2323
|
type: e.literal("connection"),
|
|
2293
2324
|
connection: e.string().min(1),
|
|
2294
2325
|
create_if_not_exists: e.boolean().default(!0),
|
|
2295
2326
|
trust_email_verified: e.boolean().default(!1)
|
|
2296
|
-
}), e.object({ type: e.literal("user_id") })]),
|
|
2327
|
+
}), e.object({ type: e.literal("user_id") })]), Bn = e.object({
|
|
2297
2328
|
issuer: e.string().min(1).max(2048),
|
|
2298
|
-
jwks:
|
|
2329
|
+
jwks: $t.optional(),
|
|
2299
2330
|
jwks_uri: e.string().url().optional(),
|
|
2300
2331
|
audience: e.array(e.string().min(1)).min(1).optional(),
|
|
2301
|
-
algorithms: e.array(
|
|
2332
|
+
algorithms: e.array(Rn).min(1).optional(),
|
|
2302
2333
|
max_lifetime_seconds: e.number().int().min(1).max(3600).default(300),
|
|
2303
2334
|
require_jti: e.boolean().default(!0),
|
|
2304
|
-
user_mapping:
|
|
2335
|
+
user_mapping: zn
|
|
2305
2336
|
});
|
|
2306
2337
|
e.object({
|
|
2307
2338
|
name: e.string().min(1).max(255),
|
|
2308
|
-
subject_token_type:
|
|
2339
|
+
subject_token_type: Ln,
|
|
2309
2340
|
action_id: e.string().min(1).optional(),
|
|
2310
|
-
type: e.literal(
|
|
2311
|
-
jwt_verification:
|
|
2341
|
+
type: e.literal(Fn),
|
|
2342
|
+
jwt_verification: Bn.optional()
|
|
2312
2343
|
}).extend({
|
|
2313
2344
|
id: e.string(),
|
|
2314
2345
|
created_at: e.string(),
|
|
2315
2346
|
updated_at: e.string()
|
|
2316
2347
|
}), e.object({
|
|
2317
2348
|
name: e.string().min(1).max(255).optional(),
|
|
2318
|
-
subject_token_type:
|
|
2319
|
-
jwt_verification:
|
|
2349
|
+
subject_token_type: Ln.optional(),
|
|
2350
|
+
jwt_verification: Bn.optional()
|
|
2320
2351
|
});
|
|
2321
|
-
var
|
|
2352
|
+
var Vn = e.object({
|
|
2322
2353
|
scim: e.string(),
|
|
2323
2354
|
auth0: e.string()
|
|
2324
|
-
}),
|
|
2355
|
+
}), Hn = e.object({
|
|
2325
2356
|
connection_id: e.string(),
|
|
2326
2357
|
user_id_attribute: e.string().default("externalId"),
|
|
2327
|
-
mapping: e.array(
|
|
2358
|
+
mapping: e.array(Vn).default([])
|
|
2328
2359
|
});
|
|
2329
2360
|
e.object({
|
|
2330
2361
|
created_at: e.string(),
|
|
2331
2362
|
updated_at: e.string()
|
|
2332
|
-
}).extend(
|
|
2333
|
-
var
|
|
2363
|
+
}).extend(Hn.shape);
|
|
2364
|
+
var Un = e.object({
|
|
2334
2365
|
token_id: e.string(),
|
|
2335
2366
|
connection_id: e.string(),
|
|
2336
2367
|
token_hash: e.string(),
|
|
@@ -2340,20 +2371,21 @@ var Bn = e.object({
|
|
|
2340
2371
|
e.object({
|
|
2341
2372
|
created_at: e.string(),
|
|
2342
2373
|
last_used_at: e.string().optional()
|
|
2343
|
-
}).extend(
|
|
2344
|
-
var
|
|
2374
|
+
}).extend(Un.shape);
|
|
2375
|
+
var Wn = e.object({
|
|
2345
2376
|
connection_id: e.string(),
|
|
2346
2377
|
external_id: e.string(),
|
|
2347
2378
|
user_id: e.string()
|
|
2348
2379
|
});
|
|
2349
|
-
e.object({ created_at: e.string() }).extend(
|
|
2380
|
+
e.object({ created_at: e.string() }).extend(Wn.shape), e.object({
|
|
2381
|
+
...a,
|
|
2350
2382
|
name: e.string(),
|
|
2351
2383
|
enabled: e.boolean().optional().default(!0),
|
|
2352
2384
|
default_from_address: e.string().optional(),
|
|
2353
2385
|
credentials: e.record(e.string(), e.unknown()),
|
|
2354
2386
|
settings: e.object({}).optional()
|
|
2355
2387
|
});
|
|
2356
|
-
var
|
|
2388
|
+
var Gn = e.enum([
|
|
2357
2389
|
"verify_email",
|
|
2358
2390
|
"verify_email_by_code",
|
|
2359
2391
|
"reset_email",
|
|
@@ -2368,7 +2400,7 @@ var Hn = e.enum([
|
|
|
2368
2400
|
"user_invitation"
|
|
2369
2401
|
]);
|
|
2370
2402
|
e.object({
|
|
2371
|
-
template:
|
|
2403
|
+
template: Gn,
|
|
2372
2404
|
body: e.string(),
|
|
2373
2405
|
from: e.string(),
|
|
2374
2406
|
subject: e.string(),
|
|
@@ -2383,13 +2415,13 @@ e.object({
|
|
|
2383
2415
|
session_id: e.string().optional(),
|
|
2384
2416
|
organization: e.string().optional(),
|
|
2385
2417
|
auth_connection: e.string().optional(),
|
|
2386
|
-
auth_strategy:
|
|
2418
|
+
auth_strategy: nn.optional(),
|
|
2387
2419
|
user_id: e.string(),
|
|
2388
2420
|
client_id: e.string(),
|
|
2389
2421
|
expires_at: e.string().optional(),
|
|
2390
2422
|
idle_expires_at: e.string().optional(),
|
|
2391
2423
|
last_exchanged_at: e.string().optional(),
|
|
2392
|
-
device:
|
|
2424
|
+
device: _n,
|
|
2393
2425
|
resource_servers: e.array(e.object({
|
|
2394
2426
|
audience: e.string(),
|
|
2395
2427
|
scopes: e.string()
|
|
@@ -2410,10 +2442,10 @@ e.object({
|
|
|
2410
2442
|
name: e.string(),
|
|
2411
2443
|
options: e.object({})
|
|
2412
2444
|
});
|
|
2413
|
-
var
|
|
2445
|
+
var Kn = e.object({
|
|
2414
2446
|
value: e.string(),
|
|
2415
2447
|
description: e.string().optional()
|
|
2416
|
-
}),
|
|
2448
|
+
}), qn = e.object({
|
|
2417
2449
|
token_dialect: e.enum(["access_token", "access_token_authz"]).optional(),
|
|
2418
2450
|
enforce_policies: e.boolean().optional(),
|
|
2419
2451
|
allow_skipping_userinfo: e.boolean().optional(),
|
|
@@ -2421,11 +2453,11 @@ var Un = e.object({
|
|
|
2421
2453
|
persist_client_authorization: e.boolean().optional(),
|
|
2422
2454
|
enable_introspection_endpoint: e.boolean().optional(),
|
|
2423
2455
|
mtls: e.object({ bound_access_tokens: e.boolean().optional() }).optional()
|
|
2424
|
-
}),
|
|
2456
|
+
}), Jn = e.object({
|
|
2425
2457
|
id: e.string().optional(),
|
|
2426
2458
|
name: e.string(),
|
|
2427
2459
|
identifier: e.string(),
|
|
2428
|
-
scopes: e.array(
|
|
2460
|
+
scopes: e.array(Kn).optional(),
|
|
2429
2461
|
signing_alg: e.string().optional(),
|
|
2430
2462
|
signing_secret: e.string().optional(),
|
|
2431
2463
|
token_lifetime: e.number().default(86400),
|
|
@@ -2433,20 +2465,21 @@ var Un = e.object({
|
|
|
2433
2465
|
skip_consent_for_verifiable_first_party_clients: e.boolean().optional(),
|
|
2434
2466
|
allow_offline_access: e.boolean().optional(),
|
|
2435
2467
|
verificationKey: e.string().optional(),
|
|
2436
|
-
options:
|
|
2468
|
+
options: qn.optional(),
|
|
2437
2469
|
is_system: e.boolean().optional(),
|
|
2470
|
+
...a,
|
|
2438
2471
|
metadata: e.record(e.string(), e.any()).optional()
|
|
2439
2472
|
}).extend({
|
|
2440
2473
|
created_at: e.string().optional(),
|
|
2441
2474
|
updated_at: e.string().optional()
|
|
2442
2475
|
});
|
|
2443
|
-
e.array(
|
|
2444
|
-
var
|
|
2476
|
+
e.array(Jn);
|
|
2477
|
+
var Yn = e.object({
|
|
2445
2478
|
role_id: e.string(),
|
|
2446
2479
|
resource_server_identifier: e.string(),
|
|
2447
2480
|
permission_name: e.string()
|
|
2448
2481
|
}).extend({ created_at: e.string() });
|
|
2449
|
-
e.array(
|
|
2482
|
+
e.array(Yn), e.object({
|
|
2450
2483
|
user_id: e.string().openapi({ description: "The id of the user that granted the consent" }),
|
|
2451
2484
|
clientID: e.string().openapi({ description: "The id of the client the grant was issued to" }),
|
|
2452
2485
|
audience: e.string().optional().openapi({ description: "The audience the grant applies to" }),
|
|
@@ -2459,7 +2492,7 @@ e.array(Kn), e.object({
|
|
|
2459
2492
|
failed_logins: e.array(e.string()).optional(),
|
|
2460
2493
|
last_password_reset: e.string().optional()
|
|
2461
2494
|
});
|
|
2462
|
-
var
|
|
2495
|
+
var Xn = e.object({
|
|
2463
2496
|
user_id: e.string(),
|
|
2464
2497
|
resource_server_identifier: e.string(),
|
|
2465
2498
|
permission_name: e.string(),
|
|
@@ -2468,8 +2501,8 @@ var qn = e.object({
|
|
|
2468
2501
|
tenant_id: e.string(),
|
|
2469
2502
|
created_at: e.string().optional()
|
|
2470
2503
|
});
|
|
2471
|
-
e.array(
|
|
2472
|
-
var
|
|
2504
|
+
e.array(Xn);
|
|
2505
|
+
var Zn = e.object({
|
|
2473
2506
|
user_id: e.string(),
|
|
2474
2507
|
resource_server_identifier: e.string(),
|
|
2475
2508
|
resource_server_name: e.string(),
|
|
@@ -2478,8 +2511,8 @@ var Jn = e.object({
|
|
|
2478
2511
|
created_at: e.string().optional(),
|
|
2479
2512
|
organization_id: e.string().optional()
|
|
2480
2513
|
});
|
|
2481
|
-
e.array(
|
|
2482
|
-
var
|
|
2514
|
+
e.array(Zn);
|
|
2515
|
+
var Qn = e.object({
|
|
2483
2516
|
user_id: e.string(),
|
|
2484
2517
|
role_id: e.string(),
|
|
2485
2518
|
organization_id: e.string().optional()
|
|
@@ -2487,8 +2520,8 @@ var Yn = e.object({
|
|
|
2487
2520
|
tenant_id: e.string(),
|
|
2488
2521
|
created_at: e.string().optional()
|
|
2489
2522
|
});
|
|
2490
|
-
e.array(
|
|
2491
|
-
var
|
|
2523
|
+
e.array(Qn);
|
|
2524
|
+
var $n = e.object({
|
|
2492
2525
|
id: e.string().optional().openapi({ description: "The unique identifier of the role. If not provided, one will be generated." }),
|
|
2493
2526
|
name: e.string().min(1).max(50).openapi({ description: "The name of the role. Cannot include '<' or '>'" }),
|
|
2494
2527
|
description: e.string().max(255).optional().openapi({ description: "The description of the role" }),
|
|
@@ -2499,19 +2532,19 @@ var Xn = e.object({
|
|
|
2499
2532
|
created_at: e.string().optional(),
|
|
2500
2533
|
updated_at: e.string().optional()
|
|
2501
2534
|
});
|
|
2502
|
-
e.array(
|
|
2503
|
-
var
|
|
2535
|
+
e.array($n);
|
|
2536
|
+
var er = e.object({
|
|
2504
2537
|
logo_url: e.string().optional().openapi({ description: "URL of the organization's logo" }),
|
|
2505
2538
|
colors: e.object({
|
|
2506
2539
|
primary: e.string().optional().openapi({ description: "Primary color in hex format (e.g., #FF0000)" }),
|
|
2507
2540
|
page_background: e.string().optional().openapi({ description: "Page background color in hex format (e.g., #FFFFFF)" })
|
|
2508
2541
|
}).optional()
|
|
2509
|
-
}).optional(),
|
|
2542
|
+
}).optional(), tr = e.object({
|
|
2510
2543
|
connection_id: e.string().openapi({ description: "ID of the connection" }),
|
|
2511
2544
|
assign_membership_on_login: e.boolean().default(!1).openapi({ description: "Whether to assign membership to the organization on login" }),
|
|
2512
2545
|
show_as_button: e.boolean().default(!0).openapi({ description: "Whether to show this connection as a button in the login screen" }),
|
|
2513
2546
|
is_signup_enabled: e.boolean().default(!0).openapi({ description: "Whether signup is enabled for this connection" })
|
|
2514
|
-
}),
|
|
2547
|
+
}), nr = e.object({ client_credentials: e.object({
|
|
2515
2548
|
enforce: e.boolean().default(!1).openapi({ description: "Whether to enforce token quota limits" }),
|
|
2516
2549
|
per_day: e.number().min(0).default(0).openapi({ description: "Maximum tokens per day (0 = unlimited)" }),
|
|
2517
2550
|
per_hour: e.number().min(0).default(0).openapi({ description: "Maximum tokens per hour (0 = unlimited)" })
|
|
@@ -2520,15 +2553,15 @@ e.object({
|
|
|
2520
2553
|
id: e.string().optional(),
|
|
2521
2554
|
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." }),
|
|
2522
2555
|
display_name: e.string().optional().openapi({ description: "The display name of the organization" }),
|
|
2523
|
-
branding:
|
|
2556
|
+
branding: er,
|
|
2524
2557
|
metadata: e.record(e.string(), e.any()).default({}).optional().openapi({ description: "Custom metadata for the organization" }),
|
|
2525
|
-
enabled_connections: e.array(
|
|
2526
|
-
token_quota:
|
|
2558
|
+
enabled_connections: e.array(tr).default([]).optional().openapi({ description: "List of enabled connections for the organization" }),
|
|
2559
|
+
token_quota: nr
|
|
2527
2560
|
}).extend(n.shape).extend({
|
|
2528
2561
|
id: e.string(),
|
|
2529
2562
|
name: e.string().min(1).openapi({ description: "The name of the organization" })
|
|
2530
2563
|
});
|
|
2531
|
-
var
|
|
2564
|
+
var rr = e.object({
|
|
2532
2565
|
connection_id: e.string().openapi({ description: "ID of the tenant-level connection to enable for the org." }),
|
|
2533
2566
|
assign_membership_on_login: e.boolean().optional().default(!1),
|
|
2534
2567
|
show_as_button: e.boolean().optional().default(!0),
|
|
@@ -2541,7 +2574,7 @@ var er = e.object({
|
|
|
2541
2574
|
created_at: e.string().optional(),
|
|
2542
2575
|
updated_at: e.string().optional()
|
|
2543
2576
|
});
|
|
2544
|
-
e.array(
|
|
2577
|
+
e.array(rr), e.object({
|
|
2545
2578
|
user_id: e.string().openapi({ description: "ID of the user" }),
|
|
2546
2579
|
organization_id: e.string().openapi({ description: "ID of the organization" })
|
|
2547
2580
|
}).extend(n.shape).extend({ id: e.string() }), e.object({
|
|
@@ -2680,7 +2713,7 @@ e.array(er), e.object({
|
|
|
2680
2713
|
"passwordless",
|
|
2681
2714
|
"enterprise"
|
|
2682
2715
|
]);
|
|
2683
|
-
var
|
|
2716
|
+
var ir = e.object({
|
|
2684
2717
|
cohort: e.string(),
|
|
2685
2718
|
sessions: e.number(),
|
|
2686
2719
|
active: e.array(e.number())
|
|
@@ -2689,9 +2722,9 @@ e.object({
|
|
|
2689
2722
|
interval: e.literal("week"),
|
|
2690
2723
|
from: e.string(),
|
|
2691
2724
|
to: e.string(),
|
|
2692
|
-
cohorts: e.array(
|
|
2725
|
+
cohorts: e.array(ir)
|
|
2693
2726
|
});
|
|
2694
|
-
var
|
|
2727
|
+
var ar = e.object({
|
|
2695
2728
|
cohort: e.string(),
|
|
2696
2729
|
tokens: e.number(),
|
|
2697
2730
|
active: e.array(e.number())
|
|
@@ -2700,24 +2733,24 @@ e.object({
|
|
|
2700
2733
|
interval: e.literal("week"),
|
|
2701
2734
|
from: e.string(),
|
|
2702
2735
|
to: e.string(),
|
|
2703
|
-
cohorts: e.array(
|
|
2736
|
+
cohorts: e.array(ar)
|
|
2704
2737
|
});
|
|
2705
|
-
var
|
|
2738
|
+
var or = e.object({
|
|
2706
2739
|
name: e.string(),
|
|
2707
2740
|
type: e.string()
|
|
2708
|
-
}),
|
|
2741
|
+
}), sr = e.object({
|
|
2709
2742
|
elapsed: e.number(),
|
|
2710
2743
|
rows_read: e.number().optional(),
|
|
2711
2744
|
bytes_read: e.number().optional()
|
|
2712
2745
|
});
|
|
2713
2746
|
e.object({
|
|
2714
|
-
meta: e.array(
|
|
2747
|
+
meta: e.array(or),
|
|
2715
2748
|
data: e.array(e.record(e.string(), e.any())),
|
|
2716
2749
|
rows: e.number(),
|
|
2717
2750
|
rows_before_limit_at_least: e.number().optional(),
|
|
2718
|
-
statistics:
|
|
2751
|
+
statistics: sr.optional()
|
|
2719
2752
|
});
|
|
2720
|
-
var
|
|
2753
|
+
var cr = 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(".")), lr = e.record(e.string(), e.record(e.string(), e.string())).openapi({
|
|
2721
2754
|
type: "object",
|
|
2722
2755
|
additionalProperties: {
|
|
2723
2756
|
type: "object",
|
|
@@ -2725,23 +2758,23 @@ var ar = e.enum(/* @__PURE__ */ "login.login-id.login-password.signup.signup-id.
|
|
|
2725
2758
|
}
|
|
2726
2759
|
});
|
|
2727
2760
|
e.object({
|
|
2728
|
-
prompt:
|
|
2761
|
+
prompt: cr,
|
|
2729
2762
|
language: e.string(),
|
|
2730
|
-
custom_text:
|
|
2763
|
+
custom_text: lr
|
|
2731
2764
|
});
|
|
2732
|
-
var
|
|
2765
|
+
var ur = e.object({
|
|
2733
2766
|
"form-content-start": e.string().optional(),
|
|
2734
2767
|
"form-content-end": e.string().optional(),
|
|
2735
2768
|
"form-footer-start": e.string().optional(),
|
|
2736
2769
|
"form-footer-end": e.string().optional(),
|
|
2737
2770
|
"secondary-actions-start": e.string().optional(),
|
|
2738
2771
|
"secondary-actions-end": e.string().optional()
|
|
2739
|
-
}).strict(),
|
|
2772
|
+
}).strict(), dr = e.record(e.string(), ur);
|
|
2740
2773
|
e.object({
|
|
2741
2774
|
prompt: e.string(),
|
|
2742
|
-
partials:
|
|
2775
|
+
partials: dr
|
|
2743
2776
|
});
|
|
2744
|
-
var
|
|
2777
|
+
var fr = e.enum([
|
|
2745
2778
|
"phone",
|
|
2746
2779
|
"totp",
|
|
2747
2780
|
"email",
|
|
@@ -2749,9 +2782,9 @@ var lr = e.enum([
|
|
|
2749
2782
|
"webauthn-roaming",
|
|
2750
2783
|
"webauthn-platform",
|
|
2751
2784
|
"passkey"
|
|
2752
|
-
]),
|
|
2785
|
+
]), pr = e.object({
|
|
2753
2786
|
user_id: e.string(),
|
|
2754
|
-
type:
|
|
2787
|
+
type: fr,
|
|
2755
2788
|
phone_number: e.string().optional(),
|
|
2756
2789
|
totp_secret: e.string().optional(),
|
|
2757
2790
|
credential_id: e.string().optional(),
|
|
@@ -2785,7 +2818,7 @@ function R(t, n) {
|
|
|
2785
2818
|
path: ["public_key"]
|
|
2786
2819
|
}));
|
|
2787
2820
|
}
|
|
2788
|
-
|
|
2821
|
+
pr.superRefine(R), pr.extend({
|
|
2789
2822
|
id: e.string(),
|
|
2790
2823
|
created_at: e.string(),
|
|
2791
2824
|
updated_at: e.string()
|
|
@@ -2794,7 +2827,7 @@ L.superRefine(R), L.extend({
|
|
|
2794
2827
|
created_at: e.string().datetime({ offset: !0 }).optional(),
|
|
2795
2828
|
updated_at: e.string().datetime({ offset: !0 }).optional()
|
|
2796
2829
|
});
|
|
2797
|
-
var
|
|
2830
|
+
var mr = "x-authhero-preserve-location", z = class extends Error {
|
|
2798
2831
|
ms;
|
|
2799
2832
|
constructor(e, t) {
|
|
2800
2833
|
super(`${t ?? "Operation"} timed out after ${e}ms`), this.name = "TimeoutError", this.ms = e;
|
|
@@ -2807,7 +2840,7 @@ function V(e, t) {
|
|
|
2807
2840
|
let n = new AbortController(), r = setTimeout(() => n.abort(), e);
|
|
2808
2841
|
return t(n.signal).finally(() => clearTimeout(r));
|
|
2809
2842
|
}
|
|
2810
|
-
function
|
|
2843
|
+
function hr(e) {
|
|
2811
2844
|
let t = e.filter((e) => e !== void 0);
|
|
2812
2845
|
if (t.length <= 1) return t[0];
|
|
2813
2846
|
if (typeof AbortSignal.any == "function") return AbortSignal.any(t);
|
|
@@ -2821,7 +2854,7 @@ function dr(e) {
|
|
|
2821
2854
|
return n.signal;
|
|
2822
2855
|
}
|
|
2823
2856
|
function H(e, t, n, r) {
|
|
2824
|
-
let i = new AbortController(), a =
|
|
2857
|
+
let i = new AbortController(), a = hr([n, i.signal]) ?? i.signal, o, s = new Promise((n, r) => {
|
|
2825
2858
|
o = setTimeout(() => {
|
|
2826
2859
|
let n = new z(e, t);
|
|
2827
2860
|
i.abort(n), r(n);
|
|
@@ -2839,12 +2872,12 @@ function U(e, t, n) {
|
|
|
2839
2872
|
}
|
|
2840
2873
|
//#endregion
|
|
2841
2874
|
//#region src/data-plane/cache.ts
|
|
2842
|
-
var
|
|
2875
|
+
var gr = 1e4, _r = 8e3;
|
|
2843
2876
|
function W(e, t, n) {
|
|
2844
2877
|
let r = typeof t == "number" ? {
|
|
2845
2878
|
freshTtlMs: t,
|
|
2846
2879
|
maxEntries: n
|
|
2847
|
-
} : t, i = r.freshTtlMs, a = r.staleTtlMs ?? 0, o = r.staleIfErrorTtlMs ?? 0, s = r.negativeTtlMs ?? i, c = r.maxEntries ??
|
|
2880
|
+
} : t, i = r.freshTtlMs, a = r.staleTtlMs ?? 0, o = r.staleIfErrorTtlMs ?? 0, s = r.negativeTtlMs ?? i, c = r.maxEntries ?? gr, l = r.waitUntil, u = r.upstreamTimeoutMs ?? _r, d = u > 0 ? u : 1e4, f = /* @__PURE__ */ new Map();
|
|
2848
2881
|
function p(e) {
|
|
2849
2882
|
for (let [t, n] of f) n.stale_if_error_until <= e && n.stale_until <= e && f.delete(t);
|
|
2850
2883
|
for (; f.size >= c;) {
|
|
@@ -2899,7 +2932,7 @@ function W(e, t, n) {
|
|
|
2899
2932
|
}
|
|
2900
2933
|
//#endregion
|
|
2901
2934
|
//#region src/data-plane/registry.ts
|
|
2902
|
-
var
|
|
2935
|
+
var vr = class {
|
|
2903
2936
|
definitions = /* @__PURE__ */ new Map();
|
|
2904
2937
|
bindings;
|
|
2905
2938
|
constructor(e = {}) {
|
|
@@ -2924,33 +2957,33 @@ function G(e) {
|
|
|
2924
2957
|
}
|
|
2925
2958
|
//#endregion
|
|
2926
2959
|
//#region src/data-plane/handlers/util.ts
|
|
2927
|
-
var
|
|
2928
|
-
function
|
|
2929
|
-
e.set(
|
|
2960
|
+
var yr = "__authhero_proxy_request__", br = "__authhero_proxy_tenant_id__", xr = "__authhero_proxy_custom_domain_id__", Sr = "__authhero_proxy_domain__", Cr = "x-authhero-proxy-mutability-probe";
|
|
2961
|
+
function wr(e, t) {
|
|
2962
|
+
e.set(yr, t);
|
|
2930
2963
|
}
|
|
2931
2964
|
function K(e) {
|
|
2932
|
-
return e.get(
|
|
2965
|
+
return e.get(yr) ?? e.req.raw;
|
|
2933
2966
|
}
|
|
2934
|
-
function
|
|
2935
|
-
e.set(
|
|
2967
|
+
function Tr(e, t) {
|
|
2968
|
+
e.set(br, t.tenant_id), e.set(xr, t.custom_domain_id), e.set(Sr, t.domain);
|
|
2936
2969
|
}
|
|
2937
|
-
function
|
|
2938
|
-
return e.get(
|
|
2970
|
+
function Er(e) {
|
|
2971
|
+
return e.get(br);
|
|
2939
2972
|
}
|
|
2940
|
-
function
|
|
2941
|
-
return e.get(
|
|
2973
|
+
function Dr(e) {
|
|
2974
|
+
return e.get(xr);
|
|
2942
2975
|
}
|
|
2943
|
-
function
|
|
2944
|
-
return e.get(
|
|
2976
|
+
function Or(e) {
|
|
2977
|
+
return e.get(Sr);
|
|
2945
2978
|
}
|
|
2946
|
-
function
|
|
2979
|
+
function kr(e, t) {
|
|
2947
2980
|
let n = K(e), r = new Headers(n.headers);
|
|
2948
|
-
t(r),
|
|
2981
|
+
t(r), wr(e, new Request(n, { headers: r }));
|
|
2949
2982
|
}
|
|
2950
2983
|
function q(e) {
|
|
2951
2984
|
let t = e.res;
|
|
2952
2985
|
try {
|
|
2953
|
-
t.headers.append(
|
|
2986
|
+
t.headers.append(Cr, "1"), t.headers.delete(Cr);
|
|
2954
2987
|
return;
|
|
2955
2988
|
} catch {
|
|
2956
2989
|
e.res = new Response(t.body, {
|
|
@@ -2962,7 +2995,7 @@ function q(e) {
|
|
|
2962
2995
|
}
|
|
2963
2996
|
//#endregion
|
|
2964
2997
|
//#region src/data-plane/handlers/cors.ts
|
|
2965
|
-
var
|
|
2998
|
+
var Ar = e.object({
|
|
2966
2999
|
origins: e.array(e.string()).optional(),
|
|
2967
3000
|
allow_credentials: e.boolean().optional(),
|
|
2968
3001
|
allow_headers: e.array(e.string()).optional(),
|
|
@@ -2970,44 +3003,44 @@ var Er = e.object({
|
|
|
2970
3003
|
expose_headers: e.array(e.string()).optional(),
|
|
2971
3004
|
max_age: e.number().int().optional()
|
|
2972
3005
|
}).refine((e) => !(e.allow_credentials && e.origins?.includes("*")), { message: "Cannot use wildcard origin (*) with allow_credentials" });
|
|
2973
|
-
function
|
|
3006
|
+
function jr(e, t) {
|
|
2974
3007
|
let n = new Headers(), r = e.origins ?? ["*"], i = r.includes("*");
|
|
2975
3008
|
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;
|
|
2976
3009
|
}
|
|
2977
|
-
var
|
|
3010
|
+
var Mr = G({
|
|
2978
3011
|
type: "cors",
|
|
2979
|
-
optionsSchema:
|
|
3012
|
+
optionsSchema: Ar,
|
|
2980
3013
|
build(e) {
|
|
2981
3014
|
return async (t, n) => {
|
|
2982
3015
|
let r = t.req.header("origin") ?? null;
|
|
2983
3016
|
if (t.req.method === "OPTIONS" && r !== null && t.req.header("access-control-request-method") !== void 0) {
|
|
2984
|
-
let t =
|
|
3017
|
+
let t = jr(e, r);
|
|
2985
3018
|
return new Response(null, {
|
|
2986
3019
|
status: 204,
|
|
2987
3020
|
headers: t
|
|
2988
3021
|
});
|
|
2989
3022
|
}
|
|
2990
3023
|
await n();
|
|
2991
|
-
let i =
|
|
3024
|
+
let i = jr(e, r);
|
|
2992
3025
|
q(t), i.forEach((e, n) => {
|
|
2993
3026
|
n.toLowerCase() === "vary" ? t.res.headers.append(n, e) : t.res.headers.set(n, e);
|
|
2994
3027
|
});
|
|
2995
3028
|
};
|
|
2996
3029
|
}
|
|
2997
|
-
}),
|
|
3030
|
+
}), Nr = e.object({
|
|
2998
3031
|
username: e.string(),
|
|
2999
3032
|
password: e.string(),
|
|
3000
3033
|
realm: e.string().optional()
|
|
3001
3034
|
});
|
|
3002
|
-
function
|
|
3035
|
+
function Pr(e, t) {
|
|
3003
3036
|
let n = `${e}:${t}`;
|
|
3004
3037
|
return typeof btoa == "function" ? btoa(n) : Buffer.from(n, "utf-8").toString("base64");
|
|
3005
3038
|
}
|
|
3006
|
-
var
|
|
3039
|
+
var Fr = G({
|
|
3007
3040
|
type: "basic_auth",
|
|
3008
|
-
optionsSchema:
|
|
3041
|
+
optionsSchema: Nr,
|
|
3009
3042
|
build(e) {
|
|
3010
|
-
let t =
|
|
3043
|
+
let t = Pr(e.username, e.password), n = (e.realm ?? "Restricted").replace(/["\\\r\n]/g, "");
|
|
3011
3044
|
return async (e, r) => {
|
|
3012
3045
|
let i = e.req.header("authorization");
|
|
3013
3046
|
if (i) {
|
|
@@ -3023,7 +3056,7 @@ var jr = G({
|
|
|
3023
3056
|
});
|
|
3024
3057
|
};
|
|
3025
3058
|
}
|
|
3026
|
-
}),
|
|
3059
|
+
}), Ir = G({
|
|
3027
3060
|
type: "headers",
|
|
3028
3061
|
optionsSchema: e.object({
|
|
3029
3062
|
request: e.record(e.string(), e.string()).optional(),
|
|
@@ -3033,12 +3066,12 @@ var jr = G({
|
|
|
3033
3066
|
}),
|
|
3034
3067
|
build(e) {
|
|
3035
3068
|
return async (t, n) => {
|
|
3036
|
-
if ((e.request || e.remove_request) &&
|
|
3069
|
+
if ((e.request || e.remove_request) && kr(t, (t) => {
|
|
3037
3070
|
if (e.remove_request?.forEach((e) => t.delete(e)), e.request) for (let [n, r] of Object.entries(e.request)) t.set(n, r);
|
|
3038
3071
|
}), await n(), (e.response || e.remove_response) && (q(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);
|
|
3039
3072
|
};
|
|
3040
3073
|
}
|
|
3041
|
-
}),
|
|
3074
|
+
}), Lr = G({
|
|
3042
3075
|
type: "cache",
|
|
3043
3076
|
optionsSchema: e.object({ ttl_seconds: e.number().int().positive() }),
|
|
3044
3077
|
build(e) {
|
|
@@ -3049,7 +3082,7 @@ var jr = G({
|
|
|
3049
3082
|
}
|
|
3050
3083
|
};
|
|
3051
3084
|
}
|
|
3052
|
-
}),
|
|
3085
|
+
}), Rr = [
|
|
3053
3086
|
"173.245.48.0/20",
|
|
3054
3087
|
"103.21.244.0/22",
|
|
3055
3088
|
"103.22.200.0/22",
|
|
@@ -3073,7 +3106,7 @@ var jr = G({
|
|
|
3073
3106
|
"2a06:98c0::/29",
|
|
3074
3107
|
"2c0f:f248::/32"
|
|
3075
3108
|
];
|
|
3076
|
-
function
|
|
3109
|
+
function zr(e) {
|
|
3077
3110
|
let t = e.split(".");
|
|
3078
3111
|
if (t.length !== 4) return null;
|
|
3079
3112
|
let n = [];
|
|
@@ -3085,14 +3118,14 @@ function Fr(e) {
|
|
|
3085
3118
|
}
|
|
3086
3119
|
return n;
|
|
3087
3120
|
}
|
|
3088
|
-
function
|
|
3121
|
+
function Br(e) {
|
|
3089
3122
|
if (e === "") return [];
|
|
3090
3123
|
let t = e.split(":"), n = [];
|
|
3091
3124
|
for (let e = 0; e < t.length; e++) {
|
|
3092
3125
|
let r = t[e];
|
|
3093
3126
|
if (r.includes(".")) {
|
|
3094
3127
|
if (e !== t.length - 1) return null;
|
|
3095
|
-
let i =
|
|
3128
|
+
let i = zr(r);
|
|
3096
3129
|
if (!i) return null;
|
|
3097
3130
|
n.push(i[0] << 8 | i[1], i[2] << 8 | i[3]);
|
|
3098
3131
|
continue;
|
|
@@ -3102,14 +3135,14 @@ function Ir(e) {
|
|
|
3102
3135
|
}
|
|
3103
3136
|
return n;
|
|
3104
3137
|
}
|
|
3105
|
-
function
|
|
3138
|
+
function Vr(e) {
|
|
3106
3139
|
let t = e.split("::");
|
|
3107
3140
|
if (t.length > 2) return null;
|
|
3108
|
-
let n =
|
|
3141
|
+
let n = Br(t[0] ?? "");
|
|
3109
3142
|
if (!n) return null;
|
|
3110
3143
|
let r;
|
|
3111
3144
|
if (t.length === 2) {
|
|
3112
|
-
let e =
|
|
3145
|
+
let e = Br(t[1] ?? "");
|
|
3113
3146
|
if (!e) return null;
|
|
3114
3147
|
let i = 8 - n.length - e.length;
|
|
3115
3148
|
if (i < 1) return null;
|
|
@@ -3124,25 +3157,25 @@ function Lr(e) {
|
|
|
3124
3157
|
for (let e of r) i.push(e >> 8 & 255, e & 255);
|
|
3125
3158
|
return i;
|
|
3126
3159
|
}
|
|
3127
|
-
function
|
|
3160
|
+
function Hr(e) {
|
|
3128
3161
|
let t = e.trim();
|
|
3129
3162
|
t.startsWith("[") && t.endsWith("]") && (t = t.slice(1, -1));
|
|
3130
3163
|
let n = t.indexOf("%");
|
|
3131
3164
|
if (n !== -1 && (t = t.slice(0, n)), t === "") return null;
|
|
3132
|
-
if (!t.includes(":")) return
|
|
3133
|
-
let r =
|
|
3165
|
+
if (!t.includes(":")) return zr(t);
|
|
3166
|
+
let r = Vr(t);
|
|
3134
3167
|
return r ? r.slice(0, 10).every((e) => e === 0) && r[10] === 255 && r[11] === 255 ? r.slice(12) : r : null;
|
|
3135
3168
|
}
|
|
3136
|
-
function
|
|
3137
|
-
let [t, n] = e.split("/"), r =
|
|
3169
|
+
function Ur(e) {
|
|
3170
|
+
let [t, n] = e.split("/"), r = Hr(t ?? ""), i = Number(n);
|
|
3138
3171
|
if (!r || !Number.isInteger(i)) throw Error(`Invalid Cloudflare CIDR: ${e}`);
|
|
3139
3172
|
return {
|
|
3140
3173
|
bytes: r,
|
|
3141
3174
|
prefixBits: i
|
|
3142
3175
|
};
|
|
3143
3176
|
}
|
|
3144
|
-
var
|
|
3145
|
-
function
|
|
3177
|
+
var Wr = Rr.map(Ur);
|
|
3178
|
+
function Gr(e, t) {
|
|
3146
3179
|
if (e.length !== t.bytes.length) return !1;
|
|
3147
3180
|
let n = t.prefixBits >> 3;
|
|
3148
3181
|
for (let r = 0; r < n; r++) if (e[r] !== t.bytes[r]) return !1;
|
|
@@ -3151,11 +3184,11 @@ function Br(e, t) {
|
|
|
3151
3184
|
let i = 255 << 8 - r & 255;
|
|
3152
3185
|
return (e[n] & i) === (t.bytes[n] & i);
|
|
3153
3186
|
}
|
|
3154
|
-
function
|
|
3155
|
-
let t =
|
|
3156
|
-
return t ?
|
|
3187
|
+
function Kr(e) {
|
|
3188
|
+
let t = Hr(e);
|
|
3189
|
+
return t ? Wr.some((e) => Gr(t, e)) : !1;
|
|
3157
3190
|
}
|
|
3158
|
-
var
|
|
3191
|
+
var qr = G({
|
|
3159
3192
|
type: "forwarded_headers",
|
|
3160
3193
|
optionsSchema: e.object({
|
|
3161
3194
|
client_ip_header: e.string().default("cf-connecting-ip"),
|
|
@@ -3166,46 +3199,46 @@ var Hr = G({
|
|
|
3166
3199
|
build(e) {
|
|
3167
3200
|
return async (t, n) => {
|
|
3168
3201
|
let r = new URL(t.req.url);
|
|
3169
|
-
|
|
3202
|
+
kr(t, (n) => {
|
|
3170
3203
|
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);
|
|
3171
|
-
let i = n.get(e.client_ip_header), a = i && e.skip_cloudflare_client_ip &&
|
|
3204
|
+
let i = n.get(e.client_ip_header), a = i && e.skip_cloudflare_client_ip && Kr(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;
|
|
3172
3205
|
n.set("x-forwarded-for", l), e.set_x_real_ip && n.set("x-real-ip", s);
|
|
3173
3206
|
}), await n();
|
|
3174
3207
|
};
|
|
3175
3208
|
}
|
|
3176
|
-
}),
|
|
3177
|
-
function
|
|
3209
|
+
}), Jr = e.object({ upstream_host: e.string().optional() });
|
|
3210
|
+
function Yr(e) {
|
|
3178
3211
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
3179
3212
|
}
|
|
3180
|
-
function
|
|
3213
|
+
function Xr(e) {
|
|
3181
3214
|
if (typeof e.getSetCookie == "function") return e.getSetCookie();
|
|
3182
3215
|
let t = [];
|
|
3183
3216
|
return e.forEach((e, n) => {
|
|
3184
3217
|
n.toLowerCase() === "set-cookie" && t.push(e);
|
|
3185
3218
|
}), t;
|
|
3186
3219
|
}
|
|
3187
|
-
var
|
|
3220
|
+
var Zr = G({
|
|
3188
3221
|
type: "rewrite_cookies",
|
|
3189
|
-
optionsSchema:
|
|
3222
|
+
optionsSchema: Jr,
|
|
3190
3223
|
build(e) {
|
|
3191
3224
|
return async (t, n) => {
|
|
3192
3225
|
await n();
|
|
3193
3226
|
let r = new URL(t.req.url).hostname, i = e.upstream_host ?? t.get("__proxy_upstream_host__");
|
|
3194
3227
|
if (!i) return;
|
|
3195
|
-
let a =
|
|
3228
|
+
let a = Xr(t.res.headers);
|
|
3196
3229
|
if (a.length === 0) return;
|
|
3197
|
-
let o =
|
|
3230
|
+
let o = Yr(i), s = RegExp(`(?:^|;\\s*)Domain=\\.?${o}(?=;|$)`, "i");
|
|
3198
3231
|
q(t), t.res.headers.delete("set-cookie");
|
|
3199
3232
|
for (let e of a) t.res.headers.append("set-cookie", e.replace(s, `Domain=${r}`));
|
|
3200
3233
|
};
|
|
3201
3234
|
}
|
|
3202
|
-
}),
|
|
3235
|
+
}), Qr = G({
|
|
3203
3236
|
type: "rewrite_location",
|
|
3204
3237
|
optionsSchema: e.object({ upstream_origin: e.string().optional() }),
|
|
3205
3238
|
build(e) {
|
|
3206
3239
|
return async (t, n) => {
|
|
3207
3240
|
if (await n(), t.res.headers.has("x-authhero-preserve-location")) {
|
|
3208
|
-
q(t), t.res.headers.delete(
|
|
3241
|
+
q(t), t.res.headers.delete(mr);
|
|
3209
3242
|
return;
|
|
3210
3243
|
}
|
|
3211
3244
|
let r = t.res.status;
|
|
@@ -3225,7 +3258,7 @@ var Kr = G({
|
|
|
3225
3258
|
q(t), t.res.headers.set("location", c);
|
|
3226
3259
|
};
|
|
3227
3260
|
}
|
|
3228
|
-
}),
|
|
3261
|
+
}), $r = new Set([
|
|
3229
3262
|
"connection",
|
|
3230
3263
|
"keep-alive",
|
|
3231
3264
|
"proxy-authenticate",
|
|
@@ -3234,25 +3267,25 @@ var Kr = G({
|
|
|
3234
3267
|
"trailers",
|
|
3235
3268
|
"transfer-encoding",
|
|
3236
3269
|
"upgrade"
|
|
3237
|
-
]),
|
|
3270
|
+
]), ei = 3e4, ti = e.object({
|
|
3238
3271
|
upstream_url: e.string(),
|
|
3239
3272
|
preserve_host: e.boolean().default(!1),
|
|
3240
3273
|
timeout_ms: e.number().int().positive().optional()
|
|
3241
3274
|
});
|
|
3242
|
-
function
|
|
3275
|
+
function ni(e, t) {
|
|
3243
3276
|
return e === "" || e === "/" ? t : `${e.endsWith("/") ? e.slice(0, -1) : e}${t.startsWith("/") ? t : `/${t}`}`;
|
|
3244
3277
|
}
|
|
3245
|
-
function
|
|
3278
|
+
function ri(e) {
|
|
3246
3279
|
return e !== "GET" && e !== "HEAD";
|
|
3247
3280
|
}
|
|
3248
|
-
var
|
|
3249
|
-
function
|
|
3281
|
+
var ii = 128 * 1024;
|
|
3282
|
+
function ai(e) {
|
|
3250
3283
|
let t = e.headers.get("content-length");
|
|
3251
3284
|
if (t === null) return null;
|
|
3252
3285
|
let n = Number(t);
|
|
3253
3286
|
return Number.isInteger(n) && n >= 0 ? n : null;
|
|
3254
3287
|
}
|
|
3255
|
-
async function
|
|
3288
|
+
async function oi(e, t) {
|
|
3256
3289
|
let n = e.getReader(), r = !1, i = setTimeout(() => {
|
|
3257
3290
|
r = !0, n.cancel().catch(() => {});
|
|
3258
3291
|
}, t), a = [], o = 0;
|
|
@@ -3270,7 +3303,7 @@ async function ti(e, t) {
|
|
|
3270
3303
|
for (let e of a) s.set(e, c), c += e.byteLength;
|
|
3271
3304
|
return s.buffer;
|
|
3272
3305
|
}
|
|
3273
|
-
function
|
|
3306
|
+
function si(e) {
|
|
3274
3307
|
return B(e) ? new Response("Request body timeout", {
|
|
3275
3308
|
status: 408,
|
|
3276
3309
|
headers: { "x-authhero-proxy-error": "request_body_timeout" }
|
|
@@ -3279,20 +3312,20 @@ function ni(e) {
|
|
|
3279
3312
|
headers: { "x-authhero-proxy-error": "request_body_failed" }
|
|
3280
3313
|
});
|
|
3281
3314
|
}
|
|
3282
|
-
async function
|
|
3283
|
-
if (!
|
|
3284
|
-
let r =
|
|
3285
|
-
if (r === null || r >
|
|
3286
|
-
let i = await
|
|
3315
|
+
async function ci(e, t, n) {
|
|
3316
|
+
if (!ri(e.method) || !e.body) return;
|
|
3317
|
+
let r = ai(e);
|
|
3318
|
+
if (r === null || r > ii) return e.body;
|
|
3319
|
+
let i = await oi(e.body, n);
|
|
3287
3320
|
return t.set("content-length", String(i.byteLength)), i;
|
|
3288
3321
|
}
|
|
3289
|
-
async function
|
|
3322
|
+
async function li(e, t, n) {
|
|
3290
3323
|
let r = new URL(t.url), i = new URL(e.upstream_url);
|
|
3291
|
-
i.pathname =
|
|
3324
|
+
i.pathname = ni(i.pathname, r.pathname), i.search = r.search;
|
|
3292
3325
|
let a = new Headers(t.headers);
|
|
3293
|
-
for (let e of
|
|
3326
|
+
for (let e of $r) a.delete(e);
|
|
3294
3327
|
e.preserve_host || a.set("host", i.host), a.has("x-forwarded-host") || a.set("x-forwarded-host", r.host), a.has("x-forwarded-proto") || a.set("x-forwarded-proto", r.protocol.replace(":", ""));
|
|
3295
|
-
let o = await
|
|
3328
|
+
let o = await ci(t, a, n), s = {
|
|
3296
3329
|
method: t.method,
|
|
3297
3330
|
headers: a,
|
|
3298
3331
|
body: o,
|
|
@@ -3303,17 +3336,17 @@ async function ii(e, t, n) {
|
|
|
3303
3336
|
init: s
|
|
3304
3337
|
};
|
|
3305
3338
|
}
|
|
3306
|
-
var
|
|
3339
|
+
var ui = G({
|
|
3307
3340
|
type: "http",
|
|
3308
|
-
optionsSchema:
|
|
3341
|
+
optionsSchema: ti,
|
|
3309
3342
|
build(e) {
|
|
3310
|
-
let t = e.timeout_ms ??
|
|
3343
|
+
let t = e.timeout_ms ?? ei;
|
|
3311
3344
|
return async (n) => {
|
|
3312
3345
|
let r = K(n), i;
|
|
3313
3346
|
try {
|
|
3314
|
-
i = await
|
|
3347
|
+
i = await li(e, r, t);
|
|
3315
3348
|
} catch (e) {
|
|
3316
|
-
return
|
|
3349
|
+
return si(e);
|
|
3317
3350
|
}
|
|
3318
3351
|
let { target: a, init: o } = i;
|
|
3319
3352
|
n.set("__proxy_upstream_host__", a.hostname), n.set("__proxy_upstream_origin__", `${a.protocol}//${a.host}`);
|
|
@@ -3327,31 +3360,31 @@ var ai = G({
|
|
|
3327
3360
|
}
|
|
3328
3361
|
};
|
|
3329
3362
|
}
|
|
3330
|
-
}),
|
|
3363
|
+
}), di = 3e4, fi = e.object({
|
|
3331
3364
|
binding: e.string(),
|
|
3332
3365
|
upstream_url: e.string().optional(),
|
|
3333
3366
|
preserve_host: e.boolean().default(!0),
|
|
3334
3367
|
timeout_ms: e.number().int().positive().optional()
|
|
3335
3368
|
});
|
|
3336
|
-
function
|
|
3369
|
+
function pi(e) {
|
|
3337
3370
|
return typeof e == "object" && !!e && typeof e.fetch == "function";
|
|
3338
3371
|
}
|
|
3339
|
-
var
|
|
3372
|
+
var mi = G({
|
|
3340
3373
|
type: "service_binding",
|
|
3341
|
-
optionsSchema:
|
|
3374
|
+
optionsSchema: fi,
|
|
3342
3375
|
build(e, t) {
|
|
3343
3376
|
let n = t.bindings[e.binding];
|
|
3344
|
-
if (!
|
|
3345
|
-
let r = e.upstream_url ?? `https://${e.binding}.binding.invalid/`, i = e.timeout_ms ??
|
|
3377
|
+
if (!pi(n)) throw Error(`Service binding "${e.binding}" is not configured or is not a Fetcher`);
|
|
3378
|
+
let r = e.upstream_url ?? `https://${e.binding}.binding.invalid/`, i = e.timeout_ms ?? di;
|
|
3346
3379
|
return async (t) => {
|
|
3347
3380
|
let a = K(t), o;
|
|
3348
3381
|
try {
|
|
3349
|
-
o = await
|
|
3382
|
+
o = await li({
|
|
3350
3383
|
upstream_url: r,
|
|
3351
3384
|
preserve_host: e.preserve_host
|
|
3352
3385
|
}, a, i);
|
|
3353
3386
|
} catch (e) {
|
|
3354
|
-
return
|
|
3387
|
+
return si(e);
|
|
3355
3388
|
}
|
|
3356
3389
|
let { target: s, init: c } = o;
|
|
3357
3390
|
t.set("__proxy_upstream_host__", s.hostname), t.set("__proxy_upstream_origin__", `${s.protocol}//${s.host}`);
|
|
@@ -3365,35 +3398,35 @@ var li = G({
|
|
|
3365
3398
|
}
|
|
3366
3399
|
};
|
|
3367
3400
|
}
|
|
3368
|
-
}),
|
|
3401
|
+
}), hi = 3e4, gi = e.object({
|
|
3369
3402
|
binding: e.string(),
|
|
3370
3403
|
script_name: e.string(),
|
|
3371
3404
|
cpu_ms: e.number().int().positive().optional(),
|
|
3372
3405
|
subrequests: e.number().int().positive().optional(),
|
|
3373
3406
|
timeout_ms: e.number().int().positive().optional()
|
|
3374
3407
|
});
|
|
3375
|
-
function
|
|
3408
|
+
function _i(e) {
|
|
3376
3409
|
return typeof e == "object" && !!e && typeof e.get == "function";
|
|
3377
3410
|
}
|
|
3378
|
-
var
|
|
3379
|
-
function
|
|
3380
|
-
return
|
|
3411
|
+
var J = /\{(tenant_id|custom_domain_id|domain|host)\}/g;
|
|
3412
|
+
function vi(e) {
|
|
3413
|
+
return J.lastIndex = 0, J.test(e);
|
|
3381
3414
|
}
|
|
3382
|
-
var
|
|
3415
|
+
var yi = G({
|
|
3383
3416
|
type: "dispatch_namespace",
|
|
3384
|
-
optionsSchema:
|
|
3417
|
+
optionsSchema: gi,
|
|
3385
3418
|
build(e, t) {
|
|
3386
3419
|
let n = t.bindings[e.binding];
|
|
3387
|
-
if (!
|
|
3388
|
-
let r =
|
|
3420
|
+
if (!_i(n)) throw Error(`Dispatch namespace binding "${e.binding}" is not configured or does not expose .get()`);
|
|
3421
|
+
let r = vi(e.script_name), i = e.timeout_ms ?? hi, a = e.cpu_ms || e.subrequests ? { limits: {
|
|
3389
3422
|
...e.cpu_ms ? { cpuMs: e.cpu_ms } : {},
|
|
3390
3423
|
...e.subrequests ? { subrequests: e.subrequests } : {}
|
|
3391
3424
|
} } : void 0;
|
|
3392
3425
|
return async (t) => {
|
|
3393
3426
|
let o = e.script_name;
|
|
3394
3427
|
if (r) {
|
|
3395
|
-
let n =
|
|
3396
|
-
if (o = o.replace(
|
|
3428
|
+
let n = Er(t), r = Dr(t), i = Or(t), a = t.req.header("host") ?? t.req.header("x-forwarded-host") ?? "";
|
|
3429
|
+
if (o = o.replace(J, (e, t) => {
|
|
3397
3430
|
switch (t) {
|
|
3398
3431
|
case "tenant_id": return n ?? "";
|
|
3399
3432
|
case "custom_domain_id": return r ?? "";
|
|
@@ -3415,7 +3448,7 @@ var mi = G({
|
|
|
3415
3448
|
}
|
|
3416
3449
|
};
|
|
3417
3450
|
}
|
|
3418
|
-
}),
|
|
3451
|
+
}), bi = G({
|
|
3419
3452
|
type: "redirect",
|
|
3420
3453
|
optionsSchema: e.object({
|
|
3421
3454
|
upstream_url: e.string().refine((e) => {
|
|
@@ -3444,7 +3477,7 @@ var mi = G({
|
|
|
3444
3477
|
});
|
|
3445
3478
|
};
|
|
3446
3479
|
}
|
|
3447
|
-
}),
|
|
3480
|
+
}), xi = G({
|
|
3448
3481
|
type: "static",
|
|
3449
3482
|
optionsSchema: e.object({
|
|
3450
3483
|
status: e.number().int().default(200),
|
|
@@ -3464,15 +3497,15 @@ var mi = G({
|
|
|
3464
3497
|
});
|
|
3465
3498
|
//#endregion
|
|
3466
3499
|
//#region src/data-plane/handlers/index.ts
|
|
3467
|
-
function
|
|
3468
|
-
e.add(
|
|
3500
|
+
function Si(e) {
|
|
3501
|
+
e.add(Mr).add(Fr).add(Ir).add(Lr).add(qr).add(Zr).add(Qr).add(ui).add(mi).add(yi).add(bi).add(xi);
|
|
3469
3502
|
}
|
|
3470
3503
|
//#endregion
|
|
3471
3504
|
//#region src/data-plane/matcher.ts
|
|
3472
|
-
function
|
|
3505
|
+
function Ci(e) {
|
|
3473
3506
|
return [...e].sort((e, t) => e.priority === t.priority ? e.created_at.localeCompare(t.created_at) : e.priority - t.priority);
|
|
3474
3507
|
}
|
|
3475
|
-
function
|
|
3508
|
+
function wi(e, t) {
|
|
3476
3509
|
let n = e.toLowerCase(), r = t.toLowerCase();
|
|
3477
3510
|
if (n === r) return !0;
|
|
3478
3511
|
if (n.startsWith("*.")) {
|
|
@@ -3481,13 +3514,13 @@ function yi(e, t) {
|
|
|
3481
3514
|
}
|
|
3482
3515
|
return !1;
|
|
3483
3516
|
}
|
|
3484
|
-
function
|
|
3485
|
-
return !e || e.length === 0 ? !0 : e.some((e) =>
|
|
3517
|
+
function Ti(e, t) {
|
|
3518
|
+
return !e || e.length === 0 ? !0 : e.some((e) => wi(e, t));
|
|
3486
3519
|
}
|
|
3487
|
-
function
|
|
3520
|
+
function Ei(e) {
|
|
3488
3521
|
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;
|
|
3489
3522
|
return async (e, i) => {
|
|
3490
|
-
if (r && !
|
|
3523
|
+
if (r && !Ti(r, e.req.header("host") ?? "")) return new Response("No matching route", { status: 404 });
|
|
3491
3524
|
for (let [n, r] of t) {
|
|
3492
3525
|
let t = e.req.header(n);
|
|
3493
3526
|
if (t === void 0 || !r.test(t)) return new Response("No matching route", { status: 404 });
|
|
@@ -3504,17 +3537,17 @@ function xi(e) {
|
|
|
3504
3537
|
}
|
|
3505
3538
|
//#endregion
|
|
3506
3539
|
//#region src/data-plane/compile.ts
|
|
3507
|
-
var
|
|
3508
|
-
function
|
|
3540
|
+
var Di = "forwarded_headers";
|
|
3541
|
+
function Oi(e) {
|
|
3509
3542
|
return e.some((e) => e.type === "forwarded_headers") ? [...e] : [{
|
|
3510
|
-
type:
|
|
3543
|
+
type: Di,
|
|
3511
3544
|
options: {}
|
|
3512
3545
|
}, ...e];
|
|
3513
3546
|
}
|
|
3514
|
-
function
|
|
3515
|
-
return e.has("forwarded_headers") ?
|
|
3547
|
+
function Y(e, t) {
|
|
3548
|
+
return e.has("forwarded_headers") ? Oi(t) : [...t];
|
|
3516
3549
|
}
|
|
3517
|
-
var
|
|
3550
|
+
var X = [
|
|
3518
3551
|
"GET",
|
|
3519
3552
|
"POST",
|
|
3520
3553
|
"PUT",
|
|
@@ -3526,34 +3559,34 @@ var wi = [
|
|
|
3526
3559
|
function Z(e, n, r, i) {
|
|
3527
3560
|
let a = new t();
|
|
3528
3561
|
r && a.use("*", async (e, t) => {
|
|
3529
|
-
|
|
3562
|
+
Tr(e, r), await t();
|
|
3530
3563
|
});
|
|
3531
|
-
let o =
|
|
3564
|
+
let o = Ci(e);
|
|
3532
3565
|
for (let e of o) {
|
|
3533
3566
|
let t = [];
|
|
3534
|
-
t.push(
|
|
3535
|
-
for (let r of
|
|
3536
|
-
let r = e.match.methods?.length ? e.match.methods.map((e) => e.toUpperCase()) :
|
|
3567
|
+
t.push(Ei(e.match));
|
|
3568
|
+
for (let r of Y(n, e.handlers)) t.push(n.build(r.type, r.options));
|
|
3569
|
+
let r = e.match.methods?.length ? e.match.methods.map((e) => e.toUpperCase()) : X, i = e.match.path || "/*";
|
|
3537
3570
|
a.on(r, [i], ...t);
|
|
3538
3571
|
}
|
|
3539
|
-
return i && i.length > 0 ? a.on(
|
|
3572
|
+
return i && i.length > 0 ? a.on(X, ["*"], ...i) : a.all("*", (e) => e.text("No matching route", 404)), a.onError((e, t) => {
|
|
3540
3573
|
let n = B(e);
|
|
3541
3574
|
return t.text(n ? "Upstream timeout" : "Bad gateway", n ? 504 : 502, { "x-authhero-proxy-error": n ? "handler_timeout" : "handler_failed" });
|
|
3542
3575
|
}), a;
|
|
3543
3576
|
}
|
|
3544
3577
|
//#endregion
|
|
3545
3578
|
//#region src/data-plane/router.ts
|
|
3546
|
-
var
|
|
3547
|
-
function
|
|
3579
|
+
var ki = 1e4;
|
|
3580
|
+
function Ai(e) {
|
|
3548
3581
|
return e.resolver ? e.resolver : e.cache ? W(e.data, e.cache) : W(e.data, e.cacheTtlMs ?? 3e4);
|
|
3549
3582
|
}
|
|
3550
|
-
function
|
|
3583
|
+
function ji(e) {
|
|
3551
3584
|
if (e.registry) return e.registry;
|
|
3552
|
-
let t = new
|
|
3553
|
-
return
|
|
3585
|
+
let t = new vr(e.bindings ?? {});
|
|
3586
|
+
return Si(t), t;
|
|
3554
3587
|
}
|
|
3555
3588
|
function Q(e) {
|
|
3556
|
-
let t =
|
|
3589
|
+
let t = Ai(e), n = ji(e), r = /* @__PURE__ */ new WeakMap(), i = e.resolveHostTimeoutMs ?? ki, a = e.defaultHandlers && e.defaultHandlers.length > 0 ? Y(n, e.defaultHandlers).map((e) => n.build(e.type, e.options)) : void 0, o = a ? Z([], n, void 0, a) : void 0;
|
|
3557
3590
|
return async (e) => {
|
|
3558
3591
|
let s = e.req.header("host") ?? e.req.header("x-forwarded-host");
|
|
3559
3592
|
if (!s) return e.text("Missing host", 400);
|
|
@@ -3571,13 +3604,13 @@ function Q(e) {
|
|
|
3571
3604
|
}
|
|
3572
3605
|
};
|
|
3573
3606
|
}
|
|
3574
|
-
function
|
|
3607
|
+
function Mi(e) {
|
|
3575
3608
|
let n = new t();
|
|
3576
3609
|
return n.all("*", Q(e)), n;
|
|
3577
3610
|
}
|
|
3578
3611
|
//#endregion
|
|
3579
3612
|
//#region src/app.ts
|
|
3580
|
-
function
|
|
3613
|
+
function Ni(e) {
|
|
3581
3614
|
let n = new t();
|
|
3582
3615
|
return n.all("*", Q({
|
|
3583
3616
|
data: e.data,
|
|
@@ -3595,17 +3628,17 @@ function ki(e) {
|
|
|
3595
3628
|
}
|
|
3596
3629
|
//#endregion
|
|
3597
3630
|
//#region src/data-plane/cache-api-cache.ts
|
|
3598
|
-
var
|
|
3599
|
-
function
|
|
3631
|
+
var Pi = 1e3, Fi = 1e3;
|
|
3632
|
+
function Ii(e, t) {
|
|
3600
3633
|
return new Request(`https://proxy-cache.internal/${encodeURIComponent(e)}/hosts/${encodeURIComponent(t.toLowerCase())}`, { method: "GET" });
|
|
3601
3634
|
}
|
|
3602
|
-
function
|
|
3635
|
+
function Li() {
|
|
3603
3636
|
return globalThis.caches?.default;
|
|
3604
3637
|
}
|
|
3605
|
-
function
|
|
3606
|
-
let t = e.cache ??
|
|
3638
|
+
function Ri(e) {
|
|
3639
|
+
let t = e.cache ?? Li();
|
|
3607
3640
|
if (!t) return e.upstream;
|
|
3608
|
-
let n = t, r = e.namespace ?? "authhero-proxy", i = e.cacheTtlSeconds ?? 60, a = e.negativeCacheTtlSeconds ?? 10, o = e.waitUntil, s = e.cacheReadTimeoutMs ??
|
|
3641
|
+
let n = t, r = e.namespace ?? "authhero-proxy", i = e.cacheTtlSeconds ?? 60, a = e.negativeCacheTtlSeconds ?? 10, o = e.waitUntil, s = e.cacheReadTimeoutMs ?? Pi, c = e.cacheWriteTimeoutMs ?? Fi;
|
|
3609
3642
|
async function l(e) {
|
|
3610
3643
|
try {
|
|
3611
3644
|
return await U(Promise.resolve(n.match(e)), s, "cache.match");
|
|
@@ -3614,7 +3647,7 @@ function Pi(e) {
|
|
|
3614
3647
|
}
|
|
3615
3648
|
}
|
|
3616
3649
|
return { async resolveHost(t, s) {
|
|
3617
|
-
let u =
|
|
3650
|
+
let u = Ii(r, t), d = await l(u);
|
|
3618
3651
|
if (d) try {
|
|
3619
3652
|
return (await d.json()).value;
|
|
3620
3653
|
} catch {}
|
|
@@ -3625,14 +3658,14 @@ function Pi(e) {
|
|
|
3625
3658
|
return o ? o(h) : await h, f;
|
|
3626
3659
|
} };
|
|
3627
3660
|
}
|
|
3628
|
-
function
|
|
3629
|
-
return
|
|
3661
|
+
function zi(e, t) {
|
|
3662
|
+
return Ii(e, t);
|
|
3630
3663
|
}
|
|
3631
3664
|
//#endregion
|
|
3632
3665
|
//#region src/data-plane/cache-adapter-cache.ts
|
|
3633
|
-
var
|
|
3634
|
-
function
|
|
3635
|
-
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 =
|
|
3666
|
+
var Bi = 1e3, Vi = 1e3, Hi = 5e3;
|
|
3667
|
+
function Ui(e) {
|
|
3668
|
+
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 = Bi, cacheWriteTimeoutMs: u = Vi, upstreamTimeoutMs: d = Hi } = e, f = d > 0 ? d : 1e4, p = /* @__PURE__ */ new Map();
|
|
3636
3669
|
function m(e) {
|
|
3637
3670
|
return `${s}:${e.toLowerCase()}`;
|
|
3638
3671
|
}
|
|
@@ -3689,7 +3722,7 @@ function zi(e) {
|
|
|
3689
3722
|
}
|
|
3690
3723
|
} };
|
|
3691
3724
|
}
|
|
3692
|
-
function
|
|
3725
|
+
function Wi(e, t) {
|
|
3693
3726
|
return `${e}:${t.toLowerCase()}`;
|
|
3694
3727
|
}
|
|
3695
3728
|
//#endregion
|
|
@@ -3697,7 +3730,7 @@ function Bi(e, t) {
|
|
|
3697
3730
|
function $() {
|
|
3698
3731
|
throw Error("Static proxy adapter is read-only; configure routes at init time");
|
|
3699
3732
|
}
|
|
3700
|
-
function
|
|
3733
|
+
function Gi(e, t, n, r, i, a) {
|
|
3701
3734
|
return {
|
|
3702
3735
|
id: e.id ?? `${n}:${t}`,
|
|
3703
3736
|
tenant_id: r,
|
|
@@ -3712,10 +3745,10 @@ function Vi(e, t, n, r, i, a) {
|
|
|
3712
3745
|
updated_at: e.updated_at ?? a
|
|
3713
3746
|
};
|
|
3714
3747
|
}
|
|
3715
|
-
function
|
|
3748
|
+
function Ki(e) {
|
|
3716
3749
|
let t = (/* @__PURE__ */ new Date()).toISOString(), n = e.defaultTenantId ?? "static", r = /* @__PURE__ */ new Map();
|
|
3717
3750
|
for (let [i, a] of Object.entries(e.hosts)) {
|
|
3718
|
-
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) =>
|
|
3751
|
+
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) => Gi(n, r, e, s, c, t)).sort((e, t) => e.priority - t.priority);
|
|
3719
3752
|
r.set(e, {
|
|
3720
3753
|
tenant_id: s,
|
|
3721
3754
|
custom_domain_id: c,
|
|
@@ -3759,7 +3792,7 @@ function Hi(e) {
|
|
|
3759
3792
|
}
|
|
3760
3793
|
};
|
|
3761
3794
|
}
|
|
3762
|
-
function
|
|
3795
|
+
function qi(e, t = {}) {
|
|
3763
3796
|
return {
|
|
3764
3797
|
priority: t.priority,
|
|
3765
3798
|
match: { path: t.path ?? "/*" },
|
|
@@ -3774,10 +3807,10 @@ function Ui(e, t = {}) {
|
|
|
3774
3807
|
}
|
|
3775
3808
|
//#endregion
|
|
3776
3809
|
//#region src/constants.ts
|
|
3777
|
-
var
|
|
3810
|
+
var Ji = "proxy:resolve_host";
|
|
3778
3811
|
//#endregion
|
|
3779
3812
|
//#region src/http-adapter/index.ts
|
|
3780
|
-
function
|
|
3813
|
+
function Yi() {
|
|
3781
3814
|
let e = () => {
|
|
3782
3815
|
throw Error("HTTP proxy adapter does not expose write access to proxy_routes; mutate via the control-plane management API");
|
|
3783
3816
|
};
|
|
@@ -3799,10 +3832,10 @@ function Gi() {
|
|
|
3799
3832
|
}
|
|
3800
3833
|
};
|
|
3801
3834
|
}
|
|
3802
|
-
function
|
|
3835
|
+
function Xi(e) {
|
|
3803
3836
|
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;
|
|
3804
3837
|
function c(e, t) {
|
|
3805
|
-
let n = new AbortController(), r =
|
|
3838
|
+
let n = new AbortController(), r = hr([e, n.signal]) ?? n.signal, i, a = new Promise((e, t) => {
|
|
3806
3839
|
i = setTimeout(() => {
|
|
3807
3840
|
n.abort(), t(new z(s, "control plane"));
|
|
3808
3841
|
}, s);
|
|
@@ -3836,7 +3869,7 @@ function Ki(e) {
|
|
|
3836
3869
|
return l && l.expires_at > Date.now() ? l.value : u(e);
|
|
3837
3870
|
}
|
|
3838
3871
|
return {
|
|
3839
|
-
proxyRoutes:
|
|
3872
|
+
proxyRoutes: Yi(),
|
|
3840
3873
|
async resolveHost(e, i) {
|
|
3841
3874
|
let a = i?.signal, o = await d(a), s = `${n}${r}${encodeURIComponent(e.toLowerCase())}`;
|
|
3842
3875
|
return c(a, async (e) => {
|
|
@@ -3853,7 +3886,7 @@ function Ki(e) {
|
|
|
3853
3886
|
}
|
|
3854
3887
|
//#endregion
|
|
3855
3888
|
//#region src/http-adapter/service-binding-fetch.ts
|
|
3856
|
-
function
|
|
3889
|
+
function Zi(e) {
|
|
3857
3890
|
return (t, n) => {
|
|
3858
3891
|
let r = t instanceof Request && n === void 0 ? t : new Request(t, n);
|
|
3859
3892
|
return e.fetch(r);
|
|
@@ -3861,11 +3894,11 @@ function qi(e) {
|
|
|
3861
3894
|
}
|
|
3862
3895
|
//#endregion
|
|
3863
3896
|
//#region src/kv-adapter/index.ts
|
|
3864
|
-
var
|
|
3865
|
-
function
|
|
3897
|
+
var Qi = "authhero-proxy-host:";
|
|
3898
|
+
function $i(e, t) {
|
|
3866
3899
|
return `${e}${t.toLowerCase()}`;
|
|
3867
3900
|
}
|
|
3868
|
-
function
|
|
3901
|
+
function ea() {
|
|
3869
3902
|
let e = () => {
|
|
3870
3903
|
throw Error("KV proxy adapter does not expose write access to proxy_routes; mutate via the control-plane management API");
|
|
3871
3904
|
};
|
|
@@ -3887,15 +3920,15 @@ function Xi() {
|
|
|
3887
3920
|
}
|
|
3888
3921
|
};
|
|
3889
3922
|
}
|
|
3890
|
-
function
|
|
3891
|
-
let { kv: t, keyPrefix: n =
|
|
3923
|
+
function ta(e) {
|
|
3924
|
+
let { kv: t, keyPrefix: n = Qi, timeoutMs: r } = e;
|
|
3892
3925
|
return {
|
|
3893
|
-
proxyRoutes:
|
|
3926
|
+
proxyRoutes: ea(),
|
|
3894
3927
|
async resolveHost(e) {
|
|
3895
|
-
let i =
|
|
3928
|
+
let i = $i(n, e), a = t.get(i, "json");
|
|
3896
3929
|
return (r && r > 0 ? await U(a, r, "kv.get") : await a) ?? null;
|
|
3897
3930
|
}
|
|
3898
3931
|
};
|
|
3899
3932
|
}
|
|
3900
3933
|
//#endregion
|
|
3901
|
-
export {
|
|
3934
|
+
export { Qi as DEFAULT_KV_HOST_KEY_PREFIX, Di as FORWARDED_HEADERS_HANDLER_TYPE, vr as HandlerRegistry, Ji as PROXY_RESOLVE_HOST_SCOPE, Fr as basicAuthHandler, Wi as buildCacheAdapterKey, zi as buildCacheApiKey, $i as buildKvHostKey, Ei as buildMatchFilter, Lr as cacheHandler, Z as compileHostApp, Mr as corsHandler, Ui as createCacheAdapterHostCache, Ri as createCacheApiHostCache, Xi as createHttpProxyAdapter, W as createInMemoryHostCache, ta as createKvProxyAdapter, Ni as createProxyApp, Q as createProxyDataPlaneHandler, Mi as createProxyDataPlaneRouter, Zi as createServiceBindingFetch, Ki as createStaticProxyAdapter, G as defineHandler, yi as dispatchNamespaceHandler, qr as forwardedHeadersHandler, Mn as handlerConfigSchema, Ir as headersHandler, ui as httpHandler, qi as httpRoute, Kr as isCloudflareIp, jn as matchSchema, Ti as matchesAnyHost, wi as matchesHost, L as proxyRouteInsertSchema, Nn as proxyRouteSchema, Pn as proxyRouteUpdateSchema, bi as redirectHandler, Si as registerBuiltinHandlers, Zr as rewriteCookiesHandler, Qr as rewriteLocationHandler, mi as serviceBindingHandler, Ci as sortRoutes, xi as staticHandler, Oi as withForwardedHeaders, Y as withForwardedHeadersFor };
|