@authhero/proxy 0.11.7 → 0.11.9
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 +615 -572
- 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,8 @@ var N = {
|
|
|
1537
1565
|
CODE_LINK_SENT: "cls",
|
|
1538
1566
|
CODE_SENT: "cs",
|
|
1539
1567
|
DEPRECATION_NOTICE: "depnote",
|
|
1568
|
+
CONFIG_INHERITANCE_DIFF: "cfgdiff",
|
|
1569
|
+
CONFIG_DRIFT: "cfgdrift",
|
|
1540
1570
|
FAILED_LOGIN: "f",
|
|
1541
1571
|
FAILED_BY_CONNECTOR: "fc",
|
|
1542
1572
|
FAILED_CHANGE_EMAIL: "fce",
|
|
@@ -1684,17 +1714,17 @@ var N = {
|
|
|
1684
1714
|
WARNING_DURING_LOGIN: "w",
|
|
1685
1715
|
WARNING_SENDING_NOTIFICATION: "wn",
|
|
1686
1716
|
WARNING_USER_MANAGEMENT: "wum"
|
|
1687
|
-
},
|
|
1688
|
-
|
|
1717
|
+
}, rn = e.string().refine((e) => Object.values(P).includes(e), { message: "Invalid log type" });
|
|
1718
|
+
P.ACLS_SUMMARY, P.ACTIONS_EXECUTION_FAILED, P.API_LIMIT, P.API_LIMIT_WARNING, P.APPI, P.CIBA_EXCHANGE_FAILED, P.CIBA_EXCHANGE_SUCCEEDED, P.CIBA_START_FAILED, P.CIBA_START_SUCCEEDED, P.CODE_LINK_SENT, P.CODE_SENT, P.DEPRECATION_NOTICE, P.CONFIG_INHERITANCE_DIFF, P.CONFIG_DRIFT, P.FAILED_LOGIN, P.FAILED_BY_CONNECTOR, P.FAILED_CHANGE_EMAIL, P.FAILED_BY_CORS, P.FAILED_CROSS_ORIGIN_AUTHENTICATION, P.FAILED_CHANGE_PASSWORD, P.FAILED_POST_CHANGE_PASSWORD_HOOK, P.FAILED_CHANGE_PHONE_NUMBER, P.FAILED_CHANGE_PASSWORD_REQUEST, P.FAILED_CONNECTOR_PROVISIONING, P.FAILED_CHANGE_USERNAME, P.FAILED_DELEGATION, P.FAILED_DEVICE_ACTIVATION, P.FAILED_DEVICE_AUTHORIZATION_REQUEST, P.USER_CANCELED_DEVICE_CONFIRMATION, P.FAILED_USER_DELETION, P.FAILED_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS, P.FAILED_EXCHANGE_CUSTOM_TOKEN, P.FAILED_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN, P.FAILED_FEDERATED_LOGOUT, P.FAILED_EXCHANGE_NATIVE_SOCIAL_LOGIN, P.FAILED_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_ROTATING_REFRESH_TOKEN, P.FAILED_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN, P.FAILED_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN, P.FAILED_HOOK, P.FAILED_IMPERSONATION, P.FAILED_INVITE_ACCEPT, P.FAILED_LOGOUT, P.FLOWS_EXECUTION_COMPLETED, P.FLOWS_EXECUTION_FAILED, P.FAILED_SENDING_NOTIFICATION, P.FORMS_SUBMISSION_FAILED, P.FORMS_SUBMISSION_SUCCEEDED, P.FAILED_LOGIN_INCORRECT_PASSWORD, P.FAILED_PUSHED_AUTHORIZATION_REQUEST, P.FAILED_POST_USER_REGISTRATION_HOOK, P.FAILED_SIGNUP, P.FAILED_SILENT_AUTH, P.FAILED_LOGIN_INVALID_EMAIL_USERNAME, P.FAILED_USERS_IMPORT, P.FAILED_VERIFICATION_EMAIL, P.FAILED_VERIFICATION_EMAIL_REQUEST, P.EMAIL_VERIFICATION_CONFIRMED, P.EMAIL_VERIFICATION_FAILED, P.MFA_AUTH_FAILED, P.MFA_AUTH_REJECTED, P.MFA_AUTH_SUCCESS, P.MFA_ENROLLMENT_COMPLETE, P.TOO_MANY_MFA_FAILURES, P.MFA_RECOVERY_FAILED, P.MFA_RECOVERY_RATE_LIMIT_EXCEED, P.MFA_RECOVERY_SUCCESS, P.MFA_EMAIL_SENT, P.EMAIL_VERIFICATION_SENT, P.EMAIL_VERIFICATION_SEND_FAILURE, P.PUSH_NOTIFICATION_SENT, P.ERROR_SENDING_MFA_PUSH_NOTIFICATION, P.MFA_SMS_SENT, P.ERROR_SENDING_MFA_SMS, P.MFA_VOICE_CALL_SUCCESS, P.MFA_VOICE_CALL_FAILED, P.SECOND_FACTOR_STARTED, P.MFA_ENROLL_STARTED, P.MFA_ENROLLMENT_FAILED, P.GUARDIAN_TENANT_UPDATE, P.UNENROLL_DEVICE_ACCOUNT, P.UPDATE_DEVICE_ACCOUNT, P.WEBAUTHN_CHALLENGE_FAILED, P.WEBAUTHN_ENROLLMENT_FAILED, P.FAILED_KMS_API_OPERATION, P.SUCCESS_KMS_API_OPERATION, P.KMS_KEY_STATE_CHANGED, P.TOO_MANY_CALLS_TO_DELEGATION, P.BLOCKED_IP_ADDRESS, P.BLOCKED_ACCOUNT_IP, P.BLOCKED_ACCOUNT_EMAIL, P.INFORMATION, P.MFA_REQUIRED, P.MANAGEMENT_API_READ_OPERATION, P.FAILED_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT, P.SUCCESSFUL_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT, P.FAILED_OIDC_BACKCHANNEL_LOGOUT, P.SUCCESSFUL_OIDC_BACKCHANNEL_LOGOUT, P.ORGANIZATION_MEMBER_ADDED, P.PASSKEY_CHALLENGE_FAILED, P.PASSKEY_CHALLENGE_STARTED, P.PRE_LOGIN_ASSESSMENT, P.BREACHED_PASSWORD, P.BREACHED_PASSWORD_ON_RESET, P.SUCCESS_RESOURCE_CLEANUP, P.RICH_CONSENTS_ACCESS_ERROR, P.SUCCESS_LOGIN, P.SUCCESS_API_OPERATION, P.FAILED_API_OPERATION, P.SUCCESS_CHANGE_EMAIL, P.SUCCESS_CROSS_ORIGIN_AUTHENTICATION, P.SUCCESS_CHANGE_PASSWORD, P.SUCCESS_CHANGE_PHONE_NUMBER, P.SUCCESS_CHANGE_PASSWORD_REQUEST, P.SUCCESS_CHANGE_USERNAME, P.SUCCESS_CREDENTIAL_VALIDATION, P.SUCCESS_DELEGATION, P.SUCCESS_USER_DELETION, P.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS, P.SUCCESS_EXCHANGE_CUSTOM_TOKEN, P.SUCCESS_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_NATIVE_SOCIAL_LOGIN, P.SUCCESS_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSKEY_OOB_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSKEY_OTP_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSKEY_MFA_RECOVERY_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN, P.SUCCESS_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN, P.SUCCESS_IMPERSONATION, P.SUCCESSFULLY_ACCEPTED_USER_INVITE, P.BREACHED_PASSWORD_ON_SIGNUP, P.SUCCESS_LOGOUT, P.SUCCESS_HOOK, P.SUCCESS_PASSWORD_MIGRATION, P.SUCCESS_REVOCATION, P.SUCCESS_SIGNUP, P.FAILED_SS_SSO_OPERATION, P.INFORMATION_FROM_SS_SSO_OPERATION, P.SUCCESS_SS_SSO_OPERATION, P.SUCCESS_SILENT_AUTH, P.SUCCESSFUL_SCIM_OPERATION, P.SUCCESSFULLY_IMPORTED_USERS, P.SUCCESS_VERIFICATION_EMAIL, P.SUCCESS_VERIFICATION_EMAIL_REQUEST, P.MAX_AMOUNT_OF_AUTHENTICATORS, P.USER_LOGIN_BLOCK_RELEASED, P.FAILED_UNIVERSAL_LOGOUT, P.SUCCESSFUL_UNIVERSAL_LOGOUT, P.WARNING_DURING_LOGIN, P.WARNING_SENDING_NOTIFICATION, P.WARNING_USER_MANAGEMENT, (() => {
|
|
1689
1719
|
let e = {};
|
|
1690
|
-
for (let [t, n] of Object.entries(
|
|
1720
|
+
for (let [t, n] of Object.entries(P)) t.startsWith("SUCCESS_") || t.startsWith("SUCCESSFUL_") || t.startsWith("SUCCESSFULLY_") || t.endsWith("_SUCCEEDED") || t.endsWith("_COMPLETED") ? e[n] = "success" : t.startsWith("FAILED_") || t.startsWith("ERROR_") || t.startsWith("BREACHED_") || t.startsWith("BLOCKED_") || t === "MFA_AUTH_FAILED" || t === "MFA_AUTH_REJECTED" || t === "MFA_RECOVERY_FAILED" || t === "MFA_ENROLLMENT_FAILED" || t === "EMAIL_VERIFICATION_FAILED" || t === "WEBAUTHN_CHALLENGE_FAILED" || t === "WEBAUTHN_ENROLLMENT_FAILED" || t === "PASSKEY_CHALLENGE_FAILED" || t === "FLOWS_EXECUTION_FAILED" || t === "FORMS_SUBMISSION_FAILED" || t === "CIBA_EXCHANGE_FAILED" || t === "CIBA_START_FAILED" || t === "ACTIONS_EXECUTION_FAILED" || t === "RICH_CONSENTS_ACCESS_ERROR" || t === "USER_CANCELED_DEVICE_CONFIRMATION" || t === "TOO_MANY_MFA_FAILURES" || t === "MFA_RECOVERY_RATE_LIMIT_EXCEED" || t === "API_LIMIT" || t === "MAX_AMOUNT_OF_AUTHENTICATORS" ? e[n] = "failure" : t.startsWith("WARNING_") || t === "API_LIMIT_WARNING" || t === "DEPRECATION_NOTICE" || t === "PRE_LOGIN_ASSESSMENT" ? e[n] = "warning" : t === "CODE_SENT" || t === "CODE_LINK_SENT" || t === "MFA_EMAIL_SENT" || t === "MFA_SMS_SENT" || t === "EMAIL_VERIFICATION_SENT" || t === "PUSH_NOTIFICATION_SENT" ? e[n] = "code_sent" : t === "INFORMATION" || t === "INFORMATION_FROM_SS_SSO_OPERATION" || t === "MANAGEMENT_API_READ_OPERATION" || t === "APPI" || t === "CONFIG_INHERITANCE_DIFF" || t === "CONFIG_DRIFT" || t === "ACLS_SUMMARY" || t === "ORGANIZATION_MEMBER_ADDED" ? e[n] = "info" : e[n] = "other";
|
|
1691
1721
|
return e;
|
|
1692
1722
|
})();
|
|
1693
|
-
var
|
|
1723
|
+
var an = e.object({
|
|
1694
1724
|
name: e.string(),
|
|
1695
1725
|
version: e.string(),
|
|
1696
1726
|
env: e.object({ node: e.string().optional() }).optional()
|
|
1697
|
-
}),
|
|
1727
|
+
}), on = e.object({
|
|
1698
1728
|
country_code: e.string().length(2),
|
|
1699
1729
|
city_name: e.string(),
|
|
1700
1730
|
latitude: e.string(),
|
|
@@ -1703,7 +1733,7 @@ var tn = e.object({
|
|
|
1703
1733
|
continent_code: e.string()
|
|
1704
1734
|
});
|
|
1705
1735
|
e.object({
|
|
1706
|
-
type:
|
|
1736
|
+
type: rn,
|
|
1707
1737
|
date: e.string(),
|
|
1708
1738
|
description: e.string().optional(),
|
|
1709
1739
|
ip: e.string().optional(),
|
|
@@ -1721,63 +1751,63 @@ e.object({
|
|
|
1721
1751
|
strategy: e.string().optional(),
|
|
1722
1752
|
strategy_type: e.string().optional(),
|
|
1723
1753
|
hostname: e.string().optional(),
|
|
1724
|
-
auth0_client:
|
|
1754
|
+
auth0_client: an.optional(),
|
|
1725
1755
|
log_id: e.string().optional(),
|
|
1726
|
-
location_info:
|
|
1756
|
+
location_info: on.optional()
|
|
1727
1757
|
}).extend({ log_id: e.string() });
|
|
1728
|
-
var
|
|
1758
|
+
var sn = e.enum([
|
|
1729
1759
|
"http",
|
|
1730
1760
|
"eventbridge",
|
|
1731
1761
|
"eventgrid",
|
|
1732
1762
|
"splunk",
|
|
1733
1763
|
"datadog",
|
|
1734
1764
|
"sumo"
|
|
1735
|
-
]),
|
|
1765
|
+
]), cn = e.enum([
|
|
1736
1766
|
"active",
|
|
1737
1767
|
"paused",
|
|
1738
1768
|
"suspended"
|
|
1739
|
-
]),
|
|
1769
|
+
]), ln = e.object({
|
|
1740
1770
|
type: e.string(),
|
|
1741
1771
|
name: e.string()
|
|
1742
1772
|
});
|
|
1743
1773
|
e.object({
|
|
1744
1774
|
name: e.string(),
|
|
1745
|
-
type:
|
|
1746
|
-
status:
|
|
1775
|
+
type: sn,
|
|
1776
|
+
status: cn.optional(),
|
|
1747
1777
|
sink: e.record(e.string(), e.unknown()),
|
|
1748
|
-
filters: e.array(
|
|
1778
|
+
filters: e.array(ln).optional(),
|
|
1749
1779
|
isPriority: e.boolean().optional()
|
|
1750
1780
|
}).extend({
|
|
1751
1781
|
id: e.string(),
|
|
1752
|
-
status:
|
|
1782
|
+
status: cn,
|
|
1753
1783
|
created_at: e.string().optional(),
|
|
1754
1784
|
updated_at: e.string().optional()
|
|
1755
1785
|
});
|
|
1756
|
-
var
|
|
1786
|
+
var un = e.enum([
|
|
1757
1787
|
"auth0",
|
|
1758
1788
|
"cognito",
|
|
1759
1789
|
"okta",
|
|
1760
1790
|
"oidc"
|
|
1761
|
-
]),
|
|
1791
|
+
]), dn = e.object({
|
|
1762
1792
|
domain: e.string(),
|
|
1763
1793
|
client_id: e.string(),
|
|
1764
1794
|
client_secret: e.string(),
|
|
1765
1795
|
audience: e.string().optional(),
|
|
1766
1796
|
scope: e.string().optional()
|
|
1767
|
-
}),
|
|
1797
|
+
}), fn = e.object({
|
|
1768
1798
|
id: e.string().optional(),
|
|
1769
1799
|
name: e.string(),
|
|
1770
|
-
provider:
|
|
1800
|
+
provider: un,
|
|
1771
1801
|
connection: e.string(),
|
|
1772
1802
|
enabled: e.boolean().default(!0),
|
|
1773
|
-
credentials:
|
|
1803
|
+
credentials: dn
|
|
1774
1804
|
});
|
|
1775
1805
|
e.object({
|
|
1776
1806
|
id: e.string(),
|
|
1777
1807
|
created_at: e.string(),
|
|
1778
1808
|
updated_at: e.string()
|
|
1779
|
-
}).extend(
|
|
1780
|
-
var
|
|
1809
|
+
}).extend(fn.shape);
|
|
1810
|
+
var pn = e.object({
|
|
1781
1811
|
enabled: e.boolean().optional(),
|
|
1782
1812
|
shields: e.array(e.string()).optional(),
|
|
1783
1813
|
admin_notification_frequency: e.array(e.string()).optional(),
|
|
@@ -1786,13 +1816,13 @@ var un = e.object({
|
|
|
1786
1816
|
"pre-user-registration": e.object({ shields: e.array(e.string()).optional() }).optional(),
|
|
1787
1817
|
"pre-change-password": e.object({ shields: e.array(e.string()).optional() }).optional()
|
|
1788
1818
|
}).optional()
|
|
1789
|
-
}),
|
|
1819
|
+
}), mn = e.object({
|
|
1790
1820
|
enabled: e.boolean().optional(),
|
|
1791
1821
|
shields: e.array(e.string()).optional(),
|
|
1792
1822
|
allowlist: e.array(e.string()).optional(),
|
|
1793
1823
|
mode: e.string().optional(),
|
|
1794
1824
|
max_attempts: e.number().optional()
|
|
1795
|
-
}),
|
|
1825
|
+
}), hn = e.object({
|
|
1796
1826
|
enabled: e.boolean().optional(),
|
|
1797
1827
|
shields: e.array(e.string()).optional(),
|
|
1798
1828
|
allowlist: e.array(e.string()).optional(),
|
|
@@ -1806,10 +1836,10 @@ var un = e.object({
|
|
|
1806
1836
|
rate: e.number().optional()
|
|
1807
1837
|
}).optional()
|
|
1808
1838
|
}).optional()
|
|
1809
|
-
}),
|
|
1810
|
-
breached_password_detection:
|
|
1811
|
-
brute_force_protection:
|
|
1812
|
-
suspicious_ip_throttling:
|
|
1839
|
+
}), gn = e.object({
|
|
1840
|
+
breached_password_detection: pn.optional(),
|
|
1841
|
+
brute_force_protection: mn.optional(),
|
|
1842
|
+
suspicious_ip_throttling: hn.optional()
|
|
1813
1843
|
});
|
|
1814
1844
|
e.object({
|
|
1815
1845
|
id: e.string().optional(),
|
|
@@ -1822,14 +1852,14 @@ e.object({
|
|
|
1822
1852
|
created_at: e.string(),
|
|
1823
1853
|
updated_at: e.string()
|
|
1824
1854
|
});
|
|
1825
|
-
var
|
|
1855
|
+
var _n = e.object({
|
|
1826
1856
|
initial_user_agent: e.string().describe("First user agent of the device from which this user logged in"),
|
|
1827
1857
|
initial_ip: e.string().describe("First IP address associated with this session"),
|
|
1828
1858
|
initial_asn: e.string().describe("First autonomous system number associated with this session"),
|
|
1829
1859
|
last_user_agent: e.string().describe("Last user agent of the device from which this user logged in"),
|
|
1830
1860
|
last_ip: e.string().describe("Last IP address from which this user logged in"),
|
|
1831
1861
|
last_asn: e.string().describe("Last autonomous system number from which this user logged in")
|
|
1832
|
-
}),
|
|
1862
|
+
}), vn = e.object({
|
|
1833
1863
|
id: e.string(),
|
|
1834
1864
|
revoked_at: e.string().optional(),
|
|
1835
1865
|
used_at: e.string().optional(),
|
|
@@ -1837,7 +1867,7 @@ var mn = e.object({
|
|
|
1837
1867
|
expires_at: e.string().optional(),
|
|
1838
1868
|
login_session_id: e.string(),
|
|
1839
1869
|
idle_expires_at: e.string().optional(),
|
|
1840
|
-
device:
|
|
1870
|
+
device: _n.describe("Metadata related to the device used in the session"),
|
|
1841
1871
|
clients: e.array(e.string()).describe("List of client details for the session")
|
|
1842
1872
|
});
|
|
1843
1873
|
e.object({
|
|
@@ -1845,7 +1875,7 @@ e.object({
|
|
|
1845
1875
|
updated_at: e.string(),
|
|
1846
1876
|
authenticated_at: e.string(),
|
|
1847
1877
|
last_interaction_at: e.string()
|
|
1848
|
-
}).extend(
|
|
1878
|
+
}).extend(vn.shape), e.object({
|
|
1849
1879
|
kid: e.string().openapi({ description: "The key id of the signing key" }),
|
|
1850
1880
|
tenant_id: e.string().optional().openapi({ description: "The tenant the key belongs to. Omitted means the key is shared / control-plane scoped." }),
|
|
1851
1881
|
cert: e.string().openapi({ description: "The public certificate of the signing key" }),
|
|
@@ -1862,8 +1892,12 @@ e.object({
|
|
|
1862
1892
|
connection: e.string().optional().openapi({ description: "The connection identifier associated with the key" }),
|
|
1863
1893
|
type: e.enum(["jwt_signing", "saml_encryption"]).openapi({ description: "The type of the signing key" })
|
|
1864
1894
|
});
|
|
1865
|
-
var
|
|
1895
|
+
var yn = e.object({
|
|
1866
1896
|
id: e.string().optional(),
|
|
1897
|
+
parent_tenant_id: e.string().nullish(),
|
|
1898
|
+
config_sync: e.enum(["inherit-on-read", "synced"]).nullish(),
|
|
1899
|
+
config_sync_hash: e.string().nullish(),
|
|
1900
|
+
config_synced_at: e.string().nullish(),
|
|
1867
1901
|
audience: e.string().optional(),
|
|
1868
1902
|
friendly_name: e.string(),
|
|
1869
1903
|
picture_url: e.string().optional(),
|
|
@@ -1980,7 +2014,7 @@ var gn = e.object({
|
|
|
1980
2014
|
"shared_planetscale"
|
|
1981
2015
|
]).optional(),
|
|
1982
2016
|
d1_database_id: e.string().max(64).optional(),
|
|
1983
|
-
attack_protection:
|
|
2017
|
+
attack_protection: gn.optional(),
|
|
1984
2018
|
mfa: e.object({
|
|
1985
2019
|
policy: e.enum(["never", "always"]).default("never").optional(),
|
|
1986
2020
|
factors: e.object({
|
|
@@ -2011,29 +2045,30 @@ var gn = e.object({
|
|
|
2011
2045
|
e.object({
|
|
2012
2046
|
created_at: e.string().nullable().transform((e) => e ?? ""),
|
|
2013
2047
|
updated_at: e.string().nullable().transform((e) => e ?? "")
|
|
2014
|
-
}).extend(
|
|
2048
|
+
}).extend(yn.shape).extend({
|
|
2015
2049
|
id: e.string(),
|
|
2016
2050
|
is_control_plane: e.boolean().optional()
|
|
2017
2051
|
});
|
|
2018
|
-
var
|
|
2052
|
+
var bn = e.enum([
|
|
2019
2053
|
"provision",
|
|
2020
2054
|
"seed",
|
|
2021
2055
|
"upgrade",
|
|
2022
2056
|
"backup",
|
|
2023
2057
|
"deprovision",
|
|
2024
|
-
"users_import"
|
|
2025
|
-
|
|
2058
|
+
"users_import",
|
|
2059
|
+
"sync-defaults"
|
|
2060
|
+
]), xn = e.enum([
|
|
2026
2061
|
"pending",
|
|
2027
2062
|
"running",
|
|
2028
2063
|
"succeeded",
|
|
2029
2064
|
"failed",
|
|
2030
2065
|
"cancelled"
|
|
2031
|
-
]),
|
|
2066
|
+
]), Sn = e.string().max(64);
|
|
2032
2067
|
e.object({
|
|
2033
2068
|
tenant_id: e.string().max(255).nullable().default(null),
|
|
2034
2069
|
rollout_id: e.string().max(255).nullable().optional(),
|
|
2035
|
-
kind:
|
|
2036
|
-
engine:
|
|
2070
|
+
kind: bn,
|
|
2071
|
+
engine: Sn,
|
|
2037
2072
|
engine_instance_id: e.string().max(100).nullable().optional(),
|
|
2038
2073
|
target_worker_version: e.string().max(255).nullable().optional(),
|
|
2039
2074
|
target_database_version: e.string().max(255).nullable().optional(),
|
|
@@ -2041,7 +2076,7 @@ e.object({
|
|
|
2041
2076
|
input: e.record(e.string(), e.unknown()).nullable().optional()
|
|
2042
2077
|
}).extend({
|
|
2043
2078
|
id: e.string(),
|
|
2044
|
-
status:
|
|
2079
|
+
status: xn,
|
|
2045
2080
|
current_step: e.string().max(255).nullable().optional(),
|
|
2046
2081
|
error: e.string().nullable().optional(),
|
|
2047
2082
|
result: e.record(e.string(), e.unknown()).nullable().optional(),
|
|
@@ -2062,7 +2097,7 @@ e.object({
|
|
|
2062
2097
|
claim_expires_at: !0,
|
|
2063
2098
|
finished_at: !0
|
|
2064
2099
|
}).partial();
|
|
2065
|
-
var
|
|
2100
|
+
var Cn = e.enum([
|
|
2066
2101
|
"started",
|
|
2067
2102
|
"succeeded",
|
|
2068
2103
|
"failed",
|
|
@@ -2073,14 +2108,14 @@ var bn = e.enum([
|
|
|
2073
2108
|
e.object({
|
|
2074
2109
|
operation_id: e.string().max(255),
|
|
2075
2110
|
step: e.string().max(255),
|
|
2076
|
-
outcome:
|
|
2111
|
+
outcome: Cn,
|
|
2077
2112
|
detail: e.record(e.string(), e.unknown()).nullable().optional(),
|
|
2078
2113
|
attempt: e.number().int().min(1).default(1)
|
|
2079
2114
|
}).extend({
|
|
2080
2115
|
id: e.string(),
|
|
2081
2116
|
created_at: e.string()
|
|
2082
2117
|
});
|
|
2083
|
-
var
|
|
2118
|
+
var F = e.enum([
|
|
2084
2119
|
"pending",
|
|
2085
2120
|
"inserted",
|
|
2086
2121
|
"updated",
|
|
@@ -2091,28 +2126,29 @@ e.object({
|
|
|
2091
2126
|
operation_id: e.string().max(255),
|
|
2092
2127
|
seq: e.number().int().min(0),
|
|
2093
2128
|
payload: e.record(e.string(), e.unknown()),
|
|
2094
|
-
status:
|
|
2129
|
+
status: F.default("pending"),
|
|
2095
2130
|
error_code: e.string().max(64).nullable().optional(),
|
|
2096
2131
|
error_message: e.string().nullable().optional(),
|
|
2097
2132
|
error_path: e.string().max(255).nullable().optional(),
|
|
2098
2133
|
entity_id: e.string().max(255).nullable().optional()
|
|
2099
2134
|
}).extend({
|
|
2100
|
-
status:
|
|
2135
|
+
status: F,
|
|
2101
2136
|
created_at: e.string(),
|
|
2102
2137
|
updated_at: e.string()
|
|
2103
2138
|
}), e.object({
|
|
2104
2139
|
seq: e.number().int().min(0),
|
|
2105
|
-
status:
|
|
2140
|
+
status: F,
|
|
2106
2141
|
error_code: e.string().max(64).nullable().optional(),
|
|
2107
2142
|
error_message: e.string().nullable().optional(),
|
|
2108
2143
|
error_path: e.string().max(255).nullable().optional(),
|
|
2109
2144
|
entity_id: e.string().max(255).nullable().optional()
|
|
2110
2145
|
});
|
|
2111
|
-
var
|
|
2146
|
+
var wn = e.enum([
|
|
2112
2147
|
"upgrade",
|
|
2113
2148
|
"reseed",
|
|
2114
|
-
"backup"
|
|
2115
|
-
|
|
2149
|
+
"backup",
|
|
2150
|
+
"config-sync"
|
|
2151
|
+
]), Tn = e.enum([
|
|
2116
2152
|
"pending",
|
|
2117
2153
|
"canary",
|
|
2118
2154
|
"rolling",
|
|
@@ -2121,24 +2157,28 @@ var xn = e.enum([
|
|
|
2121
2157
|
"failed"
|
|
2122
2158
|
]);
|
|
2123
2159
|
e.object({
|
|
2124
|
-
kind:
|
|
2160
|
+
kind: wn,
|
|
2125
2161
|
target_worker_version: e.string().max(255).nullable().optional(),
|
|
2126
2162
|
target_database_version: e.string().max(255).nullable().optional(),
|
|
2127
2163
|
wave_size: e.number().int().min(1).default(10),
|
|
2128
2164
|
canary_tenant_ids: e.array(e.string()).nullable().optional(),
|
|
2129
2165
|
filter: e.record(e.string(), e.unknown()).nullable().optional(),
|
|
2130
|
-
initiated_by: e.string().max(255).nullable().optional()
|
|
2166
|
+
initiated_by: e.string().max(255).nullable().optional(),
|
|
2167
|
+
config: e.record(e.string(), e.unknown()).nullable().optional()
|
|
2131
2168
|
}).extend({
|
|
2132
2169
|
id: e.string(),
|
|
2133
|
-
status:
|
|
2170
|
+
status: Tn,
|
|
2134
2171
|
created_at: e.string(),
|
|
2135
2172
|
updated_at: e.string(),
|
|
2136
|
-
finished_at: e.string().nullable().optional()
|
|
2173
|
+
finished_at: e.string().nullable().optional(),
|
|
2174
|
+
paused_reason: e.string().nullable().optional()
|
|
2137
2175
|
}).pick({
|
|
2138
2176
|
status: !0,
|
|
2139
2177
|
wave_size: !0,
|
|
2140
2178
|
canary_tenant_ids: !0,
|
|
2141
2179
|
filter: !0,
|
|
2180
|
+
config: !0,
|
|
2181
|
+
paused_reason: !0,
|
|
2142
2182
|
finished_at: !0
|
|
2143
2183
|
}).partial(), e.object({
|
|
2144
2184
|
access_token: e.string(),
|
|
@@ -2152,7 +2192,7 @@ e.object({
|
|
|
2152
2192
|
code: e.string(),
|
|
2153
2193
|
state: e.string().optional()
|
|
2154
2194
|
});
|
|
2155
|
-
var
|
|
2195
|
+
var En = e.object({
|
|
2156
2196
|
button_border_radius: e.number(),
|
|
2157
2197
|
button_border_weight: e.number(),
|
|
2158
2198
|
buttons_style: e.enum([
|
|
@@ -2170,7 +2210,7 @@ var Cn = e.object({
|
|
|
2170
2210
|
show_widget_shadow: e.boolean(),
|
|
2171
2211
|
widget_border_weight: e.number(),
|
|
2172
2212
|
widget_corner_radius: e.number()
|
|
2173
|
-
}),
|
|
2213
|
+
}), Dn = e.object({
|
|
2174
2214
|
base_focus_color: e.string(),
|
|
2175
2215
|
base_hover_color: e.string(),
|
|
2176
2216
|
body_text: e.string(),
|
|
@@ -2194,20 +2234,20 @@ var Cn = e.object({
|
|
|
2194
2234
|
success: e.string(),
|
|
2195
2235
|
widget_background: e.string(),
|
|
2196
2236
|
widget_border: e.string()
|
|
2197
|
-
}),
|
|
2237
|
+
}), I = e.object({
|
|
2198
2238
|
bold: e.boolean(),
|
|
2199
2239
|
size: e.number()
|
|
2200
|
-
}),
|
|
2201
|
-
body_text:
|
|
2202
|
-
buttons_text:
|
|
2240
|
+
}), On = e.object({
|
|
2241
|
+
body_text: I,
|
|
2242
|
+
buttons_text: I,
|
|
2203
2243
|
font_url: e.string(),
|
|
2204
|
-
input_labels:
|
|
2205
|
-
links:
|
|
2244
|
+
input_labels: I,
|
|
2245
|
+
links: I,
|
|
2206
2246
|
links_style: e.enum(["normal", "underlined"]),
|
|
2207
2247
|
reference_text_size: e.number(),
|
|
2208
|
-
subtitle:
|
|
2209
|
-
title:
|
|
2210
|
-
}),
|
|
2248
|
+
subtitle: I,
|
|
2249
|
+
title: I
|
|
2250
|
+
}), kn = e.object({
|
|
2211
2251
|
background_color: e.string(),
|
|
2212
2252
|
background_image_url: e.string(),
|
|
2213
2253
|
page_layout: e.enum([
|
|
@@ -2220,7 +2260,7 @@ var Cn = e.object({
|
|
|
2220
2260
|
"chip",
|
|
2221
2261
|
"none"
|
|
2222
2262
|
]).optional()
|
|
2223
|
-
}),
|
|
2263
|
+
}), An = e.object({
|
|
2224
2264
|
header_text_alignment: e.enum([
|
|
2225
2265
|
"center",
|
|
2226
2266
|
"left",
|
|
@@ -2237,43 +2277,44 @@ var Cn = e.object({
|
|
|
2237
2277
|
social_buttons_layout: e.enum(["bottom", "top"])
|
|
2238
2278
|
});
|
|
2239
2279
|
e.object({
|
|
2240
|
-
borders:
|
|
2241
|
-
colors:
|
|
2280
|
+
borders: En,
|
|
2281
|
+
colors: Dn,
|
|
2242
2282
|
displayName: e.string(),
|
|
2243
|
-
fonts:
|
|
2244
|
-
page_background:
|
|
2245
|
-
widget:
|
|
2283
|
+
fonts: On,
|
|
2284
|
+
page_background: kn,
|
|
2285
|
+
widget: An
|
|
2246
2286
|
}).extend({ themeId: e.string() }), e.object({
|
|
2287
|
+
...a,
|
|
2247
2288
|
universal_login_experience: e.enum(["new", "classic"]).default("new"),
|
|
2248
2289
|
identifier_first: e.boolean().default(!0),
|
|
2249
2290
|
password_first: e.boolean().default(!1),
|
|
2250
2291
|
show_last_used_connection: e.boolean().default(!1),
|
|
2251
2292
|
webauthn_platform_first_factor: e.boolean()
|
|
2252
2293
|
});
|
|
2253
|
-
var
|
|
2294
|
+
var jn = e.object({
|
|
2254
2295
|
hosts: e.array(e.string()).optional(),
|
|
2255
2296
|
methods: e.array(e.string()).optional(),
|
|
2256
2297
|
path: e.string().default("/*"),
|
|
2257
2298
|
headers: e.record(e.string(), e.string()).optional(),
|
|
2258
2299
|
query: e.record(e.string(), e.string()).optional()
|
|
2259
|
-
}),
|
|
2300
|
+
}), Mn = e.object({
|
|
2260
2301
|
type: e.string(),
|
|
2261
2302
|
options: e.record(e.string(), e.unknown()).default({})
|
|
2262
|
-
}),
|
|
2303
|
+
}), L = e.object({
|
|
2263
2304
|
id: e.string().optional(),
|
|
2264
2305
|
custom_domain_id: e.string(),
|
|
2265
2306
|
priority: e.number().int().default(100),
|
|
2266
|
-
match:
|
|
2267
|
-
handlers: e.array(
|
|
2268
|
-
}),
|
|
2307
|
+
match: jn,
|
|
2308
|
+
handlers: e.array(Mn).min(1)
|
|
2309
|
+
}), Nn = L.extend({
|
|
2269
2310
|
id: e.string(),
|
|
2270
2311
|
tenant_id: e.string(),
|
|
2271
2312
|
created_at: e.string(),
|
|
2272
2313
|
updated_at: e.string()
|
|
2273
|
-
}),
|
|
2314
|
+
}), Pn = L.partial().omit({
|
|
2274
2315
|
id: !0,
|
|
2275
2316
|
custom_domain_id: !0
|
|
2276
|
-
}),
|
|
2317
|
+
}), Fn = "custom_authentication", In = [
|
|
2277
2318
|
"urn:ietf:params:oauth:",
|
|
2278
2319
|
"urn:auth0",
|
|
2279
2320
|
"urn:okta",
|
|
@@ -2281,56 +2322,56 @@ var On = e.object({
|
|
|
2281
2322
|
"https://auth0.com",
|
|
2282
2323
|
"http://okta.com",
|
|
2283
2324
|
"https://okta.com"
|
|
2284
|
-
],
|
|
2325
|
+
], 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
2326
|
"RS256",
|
|
2286
2327
|
"RS384",
|
|
2287
2328
|
"RS512",
|
|
2288
2329
|
"ES256",
|
|
2289
2330
|
"ES384",
|
|
2290
2331
|
"ES512"
|
|
2291
|
-
]),
|
|
2332
|
+
]), zn = e.discriminatedUnion("type", [e.object({
|
|
2292
2333
|
type: e.literal("connection"),
|
|
2293
2334
|
connection: e.string().min(1),
|
|
2294
2335
|
create_if_not_exists: e.boolean().default(!0),
|
|
2295
2336
|
trust_email_verified: e.boolean().default(!1)
|
|
2296
|
-
}), e.object({ type: e.literal("user_id") })]),
|
|
2337
|
+
}), e.object({ type: e.literal("user_id") })]), Bn = e.object({
|
|
2297
2338
|
issuer: e.string().min(1).max(2048),
|
|
2298
|
-
jwks:
|
|
2339
|
+
jwks: $t.optional(),
|
|
2299
2340
|
jwks_uri: e.string().url().optional(),
|
|
2300
2341
|
audience: e.array(e.string().min(1)).min(1).optional(),
|
|
2301
|
-
algorithms: e.array(
|
|
2342
|
+
algorithms: e.array(Rn).min(1).optional(),
|
|
2302
2343
|
max_lifetime_seconds: e.number().int().min(1).max(3600).default(300),
|
|
2303
2344
|
require_jti: e.boolean().default(!0),
|
|
2304
|
-
user_mapping:
|
|
2345
|
+
user_mapping: zn
|
|
2305
2346
|
});
|
|
2306
2347
|
e.object({
|
|
2307
2348
|
name: e.string().min(1).max(255),
|
|
2308
|
-
subject_token_type:
|
|
2349
|
+
subject_token_type: Ln,
|
|
2309
2350
|
action_id: e.string().min(1).optional(),
|
|
2310
|
-
type: e.literal(
|
|
2311
|
-
jwt_verification:
|
|
2351
|
+
type: e.literal(Fn),
|
|
2352
|
+
jwt_verification: Bn.optional()
|
|
2312
2353
|
}).extend({
|
|
2313
2354
|
id: e.string(),
|
|
2314
2355
|
created_at: e.string(),
|
|
2315
2356
|
updated_at: e.string()
|
|
2316
2357
|
}), e.object({
|
|
2317
2358
|
name: e.string().min(1).max(255).optional(),
|
|
2318
|
-
subject_token_type:
|
|
2319
|
-
jwt_verification:
|
|
2359
|
+
subject_token_type: Ln.optional(),
|
|
2360
|
+
jwt_verification: Bn.optional()
|
|
2320
2361
|
});
|
|
2321
|
-
var
|
|
2362
|
+
var Vn = e.object({
|
|
2322
2363
|
scim: e.string(),
|
|
2323
2364
|
auth0: e.string()
|
|
2324
|
-
}),
|
|
2365
|
+
}), Hn = e.object({
|
|
2325
2366
|
connection_id: e.string(),
|
|
2326
2367
|
user_id_attribute: e.string().default("externalId"),
|
|
2327
|
-
mapping: e.array(
|
|
2368
|
+
mapping: e.array(Vn).default([])
|
|
2328
2369
|
});
|
|
2329
2370
|
e.object({
|
|
2330
2371
|
created_at: e.string(),
|
|
2331
2372
|
updated_at: e.string()
|
|
2332
|
-
}).extend(
|
|
2333
|
-
var
|
|
2373
|
+
}).extend(Hn.shape);
|
|
2374
|
+
var Un = e.object({
|
|
2334
2375
|
token_id: e.string(),
|
|
2335
2376
|
connection_id: e.string(),
|
|
2336
2377
|
token_hash: e.string(),
|
|
@@ -2340,20 +2381,21 @@ var Bn = e.object({
|
|
|
2340
2381
|
e.object({
|
|
2341
2382
|
created_at: e.string(),
|
|
2342
2383
|
last_used_at: e.string().optional()
|
|
2343
|
-
}).extend(
|
|
2344
|
-
var
|
|
2384
|
+
}).extend(Un.shape);
|
|
2385
|
+
var Wn = e.object({
|
|
2345
2386
|
connection_id: e.string(),
|
|
2346
2387
|
external_id: e.string(),
|
|
2347
2388
|
user_id: e.string()
|
|
2348
2389
|
});
|
|
2349
|
-
e.object({ created_at: e.string() }).extend(
|
|
2390
|
+
e.object({ created_at: e.string() }).extend(Wn.shape), e.object({
|
|
2391
|
+
...a,
|
|
2350
2392
|
name: e.string(),
|
|
2351
2393
|
enabled: e.boolean().optional().default(!0),
|
|
2352
2394
|
default_from_address: e.string().optional(),
|
|
2353
2395
|
credentials: e.record(e.string(), e.unknown()),
|
|
2354
2396
|
settings: e.object({}).optional()
|
|
2355
2397
|
});
|
|
2356
|
-
var
|
|
2398
|
+
var Gn = e.enum([
|
|
2357
2399
|
"verify_email",
|
|
2358
2400
|
"verify_email_by_code",
|
|
2359
2401
|
"reset_email",
|
|
@@ -2368,7 +2410,7 @@ var Hn = e.enum([
|
|
|
2368
2410
|
"user_invitation"
|
|
2369
2411
|
]);
|
|
2370
2412
|
e.object({
|
|
2371
|
-
template:
|
|
2413
|
+
template: Gn,
|
|
2372
2414
|
body: e.string(),
|
|
2373
2415
|
from: e.string(),
|
|
2374
2416
|
subject: e.string(),
|
|
@@ -2383,13 +2425,13 @@ e.object({
|
|
|
2383
2425
|
session_id: e.string().optional(),
|
|
2384
2426
|
organization: e.string().optional(),
|
|
2385
2427
|
auth_connection: e.string().optional(),
|
|
2386
|
-
auth_strategy:
|
|
2428
|
+
auth_strategy: nn.optional(),
|
|
2387
2429
|
user_id: e.string(),
|
|
2388
2430
|
client_id: e.string(),
|
|
2389
2431
|
expires_at: e.string().optional(),
|
|
2390
2432
|
idle_expires_at: e.string().optional(),
|
|
2391
2433
|
last_exchanged_at: e.string().optional(),
|
|
2392
|
-
device:
|
|
2434
|
+
device: _n,
|
|
2393
2435
|
resource_servers: e.array(e.object({
|
|
2394
2436
|
audience: e.string(),
|
|
2395
2437
|
scopes: e.string()
|
|
@@ -2410,10 +2452,10 @@ e.object({
|
|
|
2410
2452
|
name: e.string(),
|
|
2411
2453
|
options: e.object({})
|
|
2412
2454
|
});
|
|
2413
|
-
var
|
|
2455
|
+
var Kn = e.object({
|
|
2414
2456
|
value: e.string(),
|
|
2415
2457
|
description: e.string().optional()
|
|
2416
|
-
}),
|
|
2458
|
+
}), qn = e.object({
|
|
2417
2459
|
token_dialect: e.enum(["access_token", "access_token_authz"]).optional(),
|
|
2418
2460
|
enforce_policies: e.boolean().optional(),
|
|
2419
2461
|
allow_skipping_userinfo: e.boolean().optional(),
|
|
@@ -2421,11 +2463,11 @@ var Un = e.object({
|
|
|
2421
2463
|
persist_client_authorization: e.boolean().optional(),
|
|
2422
2464
|
enable_introspection_endpoint: e.boolean().optional(),
|
|
2423
2465
|
mtls: e.object({ bound_access_tokens: e.boolean().optional() }).optional()
|
|
2424
|
-
}),
|
|
2466
|
+
}), Jn = e.object({
|
|
2425
2467
|
id: e.string().optional(),
|
|
2426
2468
|
name: e.string(),
|
|
2427
2469
|
identifier: e.string(),
|
|
2428
|
-
scopes: e.array(
|
|
2470
|
+
scopes: e.array(Kn).optional(),
|
|
2429
2471
|
signing_alg: e.string().optional(),
|
|
2430
2472
|
signing_secret: e.string().optional(),
|
|
2431
2473
|
token_lifetime: e.number().default(86400),
|
|
@@ -2433,20 +2475,21 @@ var Un = e.object({
|
|
|
2433
2475
|
skip_consent_for_verifiable_first_party_clients: e.boolean().optional(),
|
|
2434
2476
|
allow_offline_access: e.boolean().optional(),
|
|
2435
2477
|
verificationKey: e.string().optional(),
|
|
2436
|
-
options:
|
|
2478
|
+
options: qn.optional(),
|
|
2437
2479
|
is_system: e.boolean().optional(),
|
|
2480
|
+
...a,
|
|
2438
2481
|
metadata: e.record(e.string(), e.any()).optional()
|
|
2439
2482
|
}).extend({
|
|
2440
2483
|
created_at: e.string().optional(),
|
|
2441
2484
|
updated_at: e.string().optional()
|
|
2442
2485
|
});
|
|
2443
|
-
e.array(
|
|
2444
|
-
var
|
|
2486
|
+
e.array(Jn);
|
|
2487
|
+
var Yn = e.object({
|
|
2445
2488
|
role_id: e.string(),
|
|
2446
2489
|
resource_server_identifier: e.string(),
|
|
2447
2490
|
permission_name: e.string()
|
|
2448
2491
|
}).extend({ created_at: e.string() });
|
|
2449
|
-
e.array(
|
|
2492
|
+
e.array(Yn), e.object({
|
|
2450
2493
|
user_id: e.string().openapi({ description: "The id of the user that granted the consent" }),
|
|
2451
2494
|
clientID: e.string().openapi({ description: "The id of the client the grant was issued to" }),
|
|
2452
2495
|
audience: e.string().optional().openapi({ description: "The audience the grant applies to" }),
|
|
@@ -2459,7 +2502,7 @@ e.array(Kn), e.object({
|
|
|
2459
2502
|
failed_logins: e.array(e.string()).optional(),
|
|
2460
2503
|
last_password_reset: e.string().optional()
|
|
2461
2504
|
});
|
|
2462
|
-
var
|
|
2505
|
+
var Xn = e.object({
|
|
2463
2506
|
user_id: e.string(),
|
|
2464
2507
|
resource_server_identifier: e.string(),
|
|
2465
2508
|
permission_name: e.string(),
|
|
@@ -2468,8 +2511,8 @@ var qn = e.object({
|
|
|
2468
2511
|
tenant_id: e.string(),
|
|
2469
2512
|
created_at: e.string().optional()
|
|
2470
2513
|
});
|
|
2471
|
-
e.array(
|
|
2472
|
-
var
|
|
2514
|
+
e.array(Xn);
|
|
2515
|
+
var Zn = e.object({
|
|
2473
2516
|
user_id: e.string(),
|
|
2474
2517
|
resource_server_identifier: e.string(),
|
|
2475
2518
|
resource_server_name: e.string(),
|
|
@@ -2478,8 +2521,8 @@ var Jn = e.object({
|
|
|
2478
2521
|
created_at: e.string().optional(),
|
|
2479
2522
|
organization_id: e.string().optional()
|
|
2480
2523
|
});
|
|
2481
|
-
e.array(
|
|
2482
|
-
var
|
|
2524
|
+
e.array(Zn);
|
|
2525
|
+
var Qn = e.object({
|
|
2483
2526
|
user_id: e.string(),
|
|
2484
2527
|
role_id: e.string(),
|
|
2485
2528
|
organization_id: e.string().optional()
|
|
@@ -2487,8 +2530,8 @@ var Yn = e.object({
|
|
|
2487
2530
|
tenant_id: e.string(),
|
|
2488
2531
|
created_at: e.string().optional()
|
|
2489
2532
|
});
|
|
2490
|
-
e.array(
|
|
2491
|
-
var
|
|
2533
|
+
e.array(Qn);
|
|
2534
|
+
var $n = e.object({
|
|
2492
2535
|
id: e.string().optional().openapi({ description: "The unique identifier of the role. If not provided, one will be generated." }),
|
|
2493
2536
|
name: e.string().min(1).max(50).openapi({ description: "The name of the role. Cannot include '<' or '>'" }),
|
|
2494
2537
|
description: e.string().max(255).optional().openapi({ description: "The description of the role" }),
|
|
@@ -2499,19 +2542,19 @@ var Xn = e.object({
|
|
|
2499
2542
|
created_at: e.string().optional(),
|
|
2500
2543
|
updated_at: e.string().optional()
|
|
2501
2544
|
});
|
|
2502
|
-
e.array(
|
|
2503
|
-
var
|
|
2545
|
+
e.array($n);
|
|
2546
|
+
var er = e.object({
|
|
2504
2547
|
logo_url: e.string().optional().openapi({ description: "URL of the organization's logo" }),
|
|
2505
2548
|
colors: e.object({
|
|
2506
2549
|
primary: e.string().optional().openapi({ description: "Primary color in hex format (e.g., #FF0000)" }),
|
|
2507
2550
|
page_background: e.string().optional().openapi({ description: "Page background color in hex format (e.g., #FFFFFF)" })
|
|
2508
2551
|
}).optional()
|
|
2509
|
-
}).optional(),
|
|
2552
|
+
}).optional(), tr = e.object({
|
|
2510
2553
|
connection_id: e.string().openapi({ description: "ID of the connection" }),
|
|
2511
2554
|
assign_membership_on_login: e.boolean().default(!1).openapi({ description: "Whether to assign membership to the organization on login" }),
|
|
2512
2555
|
show_as_button: e.boolean().default(!0).openapi({ description: "Whether to show this connection as a button in the login screen" }),
|
|
2513
2556
|
is_signup_enabled: e.boolean().default(!0).openapi({ description: "Whether signup is enabled for this connection" })
|
|
2514
|
-
}),
|
|
2557
|
+
}), nr = e.object({ client_credentials: e.object({
|
|
2515
2558
|
enforce: e.boolean().default(!1).openapi({ description: "Whether to enforce token quota limits" }),
|
|
2516
2559
|
per_day: e.number().min(0).default(0).openapi({ description: "Maximum tokens per day (0 = unlimited)" }),
|
|
2517
2560
|
per_hour: e.number().min(0).default(0).openapi({ description: "Maximum tokens per hour (0 = unlimited)" })
|
|
@@ -2520,15 +2563,15 @@ e.object({
|
|
|
2520
2563
|
id: e.string().optional(),
|
|
2521
2564
|
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
2565
|
display_name: e.string().optional().openapi({ description: "The display name of the organization" }),
|
|
2523
|
-
branding:
|
|
2566
|
+
branding: er,
|
|
2524
2567
|
metadata: e.record(e.string(), e.any()).default({}).optional().openapi({ description: "Custom metadata for the organization" }),
|
|
2525
|
-
enabled_connections: e.array(
|
|
2526
|
-
token_quota:
|
|
2568
|
+
enabled_connections: e.array(tr).default([]).optional().openapi({ description: "List of enabled connections for the organization" }),
|
|
2569
|
+
token_quota: nr
|
|
2527
2570
|
}).extend(n.shape).extend({
|
|
2528
2571
|
id: e.string(),
|
|
2529
2572
|
name: e.string().min(1).openapi({ description: "The name of the organization" })
|
|
2530
2573
|
});
|
|
2531
|
-
var
|
|
2574
|
+
var rr = e.object({
|
|
2532
2575
|
connection_id: e.string().openapi({ description: "ID of the tenant-level connection to enable for the org." }),
|
|
2533
2576
|
assign_membership_on_login: e.boolean().optional().default(!1),
|
|
2534
2577
|
show_as_button: e.boolean().optional().default(!0),
|
|
@@ -2541,7 +2584,7 @@ var er = e.object({
|
|
|
2541
2584
|
created_at: e.string().optional(),
|
|
2542
2585
|
updated_at: e.string().optional()
|
|
2543
2586
|
});
|
|
2544
|
-
e.array(
|
|
2587
|
+
e.array(rr), e.object({
|
|
2545
2588
|
user_id: e.string().openapi({ description: "ID of the user" }),
|
|
2546
2589
|
organization_id: e.string().openapi({ description: "ID of the organization" })
|
|
2547
2590
|
}).extend(n.shape).extend({ id: e.string() }), e.object({
|
|
@@ -2680,7 +2723,7 @@ e.array(er), e.object({
|
|
|
2680
2723
|
"passwordless",
|
|
2681
2724
|
"enterprise"
|
|
2682
2725
|
]);
|
|
2683
|
-
var
|
|
2726
|
+
var ir = e.object({
|
|
2684
2727
|
cohort: e.string(),
|
|
2685
2728
|
sessions: e.number(),
|
|
2686
2729
|
active: e.array(e.number())
|
|
@@ -2689,9 +2732,9 @@ e.object({
|
|
|
2689
2732
|
interval: e.literal("week"),
|
|
2690
2733
|
from: e.string(),
|
|
2691
2734
|
to: e.string(),
|
|
2692
|
-
cohorts: e.array(
|
|
2735
|
+
cohorts: e.array(ir)
|
|
2693
2736
|
});
|
|
2694
|
-
var
|
|
2737
|
+
var ar = e.object({
|
|
2695
2738
|
cohort: e.string(),
|
|
2696
2739
|
tokens: e.number(),
|
|
2697
2740
|
active: e.array(e.number())
|
|
@@ -2700,24 +2743,24 @@ e.object({
|
|
|
2700
2743
|
interval: e.literal("week"),
|
|
2701
2744
|
from: e.string(),
|
|
2702
2745
|
to: e.string(),
|
|
2703
|
-
cohorts: e.array(
|
|
2746
|
+
cohorts: e.array(ar)
|
|
2704
2747
|
});
|
|
2705
|
-
var
|
|
2748
|
+
var or = e.object({
|
|
2706
2749
|
name: e.string(),
|
|
2707
2750
|
type: e.string()
|
|
2708
|
-
}),
|
|
2751
|
+
}), sr = e.object({
|
|
2709
2752
|
elapsed: e.number(),
|
|
2710
2753
|
rows_read: e.number().optional(),
|
|
2711
2754
|
bytes_read: e.number().optional()
|
|
2712
2755
|
});
|
|
2713
2756
|
e.object({
|
|
2714
|
-
meta: e.array(
|
|
2757
|
+
meta: e.array(or),
|
|
2715
2758
|
data: e.array(e.record(e.string(), e.any())),
|
|
2716
2759
|
rows: e.number(),
|
|
2717
2760
|
rows_before_limit_at_least: e.number().optional(),
|
|
2718
|
-
statistics:
|
|
2761
|
+
statistics: sr.optional()
|
|
2719
2762
|
});
|
|
2720
|
-
var
|
|
2763
|
+
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
2764
|
type: "object",
|
|
2722
2765
|
additionalProperties: {
|
|
2723
2766
|
type: "object",
|
|
@@ -2725,23 +2768,23 @@ var ar = e.enum(/* @__PURE__ */ "login.login-id.login-password.signup.signup-id.
|
|
|
2725
2768
|
}
|
|
2726
2769
|
});
|
|
2727
2770
|
e.object({
|
|
2728
|
-
prompt:
|
|
2771
|
+
prompt: cr,
|
|
2729
2772
|
language: e.string(),
|
|
2730
|
-
custom_text:
|
|
2773
|
+
custom_text: lr
|
|
2731
2774
|
});
|
|
2732
|
-
var
|
|
2775
|
+
var ur = e.object({
|
|
2733
2776
|
"form-content-start": e.string().optional(),
|
|
2734
2777
|
"form-content-end": e.string().optional(),
|
|
2735
2778
|
"form-footer-start": e.string().optional(),
|
|
2736
2779
|
"form-footer-end": e.string().optional(),
|
|
2737
2780
|
"secondary-actions-start": e.string().optional(),
|
|
2738
2781
|
"secondary-actions-end": e.string().optional()
|
|
2739
|
-
}).strict(),
|
|
2782
|
+
}).strict(), dr = e.record(e.string(), ur);
|
|
2740
2783
|
e.object({
|
|
2741
2784
|
prompt: e.string(),
|
|
2742
|
-
partials:
|
|
2785
|
+
partials: dr
|
|
2743
2786
|
});
|
|
2744
|
-
var
|
|
2787
|
+
var fr = e.enum([
|
|
2745
2788
|
"phone",
|
|
2746
2789
|
"totp",
|
|
2747
2790
|
"email",
|
|
@@ -2749,9 +2792,9 @@ var lr = e.enum([
|
|
|
2749
2792
|
"webauthn-roaming",
|
|
2750
2793
|
"webauthn-platform",
|
|
2751
2794
|
"passkey"
|
|
2752
|
-
]),
|
|
2795
|
+
]), pr = e.object({
|
|
2753
2796
|
user_id: e.string(),
|
|
2754
|
-
type:
|
|
2797
|
+
type: fr,
|
|
2755
2798
|
phone_number: e.string().optional(),
|
|
2756
2799
|
totp_secret: e.string().optional(),
|
|
2757
2800
|
credential_id: e.string().optional(),
|
|
@@ -2785,7 +2828,7 @@ function R(t, n) {
|
|
|
2785
2828
|
path: ["public_key"]
|
|
2786
2829
|
}));
|
|
2787
2830
|
}
|
|
2788
|
-
|
|
2831
|
+
pr.superRefine(R), pr.extend({
|
|
2789
2832
|
id: e.string(),
|
|
2790
2833
|
created_at: e.string(),
|
|
2791
2834
|
updated_at: e.string()
|
|
@@ -2794,7 +2837,7 @@ L.superRefine(R), L.extend({
|
|
|
2794
2837
|
created_at: e.string().datetime({ offset: !0 }).optional(),
|
|
2795
2838
|
updated_at: e.string().datetime({ offset: !0 }).optional()
|
|
2796
2839
|
});
|
|
2797
|
-
var
|
|
2840
|
+
var mr = "x-authhero-preserve-location", z = class extends Error {
|
|
2798
2841
|
ms;
|
|
2799
2842
|
constructor(e, t) {
|
|
2800
2843
|
super(`${t ?? "Operation"} timed out after ${e}ms`), this.name = "TimeoutError", this.ms = e;
|
|
@@ -2807,7 +2850,7 @@ function V(e, t) {
|
|
|
2807
2850
|
let n = new AbortController(), r = setTimeout(() => n.abort(), e);
|
|
2808
2851
|
return t(n.signal).finally(() => clearTimeout(r));
|
|
2809
2852
|
}
|
|
2810
|
-
function
|
|
2853
|
+
function hr(e) {
|
|
2811
2854
|
let t = e.filter((e) => e !== void 0);
|
|
2812
2855
|
if (t.length <= 1) return t[0];
|
|
2813
2856
|
if (typeof AbortSignal.any == "function") return AbortSignal.any(t);
|
|
@@ -2821,7 +2864,7 @@ function dr(e) {
|
|
|
2821
2864
|
return n.signal;
|
|
2822
2865
|
}
|
|
2823
2866
|
function H(e, t, n, r) {
|
|
2824
|
-
let i = new AbortController(), a =
|
|
2867
|
+
let i = new AbortController(), a = hr([n, i.signal]) ?? i.signal, o, s = new Promise((n, r) => {
|
|
2825
2868
|
o = setTimeout(() => {
|
|
2826
2869
|
let n = new z(e, t);
|
|
2827
2870
|
i.abort(n), r(n);
|
|
@@ -2839,12 +2882,12 @@ function U(e, t, n) {
|
|
|
2839
2882
|
}
|
|
2840
2883
|
//#endregion
|
|
2841
2884
|
//#region src/data-plane/cache.ts
|
|
2842
|
-
var
|
|
2885
|
+
var gr = 1e4, _r = 8e3;
|
|
2843
2886
|
function W(e, t, n) {
|
|
2844
2887
|
let r = typeof t == "number" ? {
|
|
2845
2888
|
freshTtlMs: t,
|
|
2846
2889
|
maxEntries: n
|
|
2847
|
-
} : t, i = r.freshTtlMs, a = r.staleTtlMs ?? 0, o = r.staleIfErrorTtlMs ?? 0, s = r.negativeTtlMs ?? i, c = r.maxEntries ??
|
|
2890
|
+
} : 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
2891
|
function p(e) {
|
|
2849
2892
|
for (let [t, n] of f) n.stale_if_error_until <= e && n.stale_until <= e && f.delete(t);
|
|
2850
2893
|
for (; f.size >= c;) {
|
|
@@ -2899,7 +2942,7 @@ function W(e, t, n) {
|
|
|
2899
2942
|
}
|
|
2900
2943
|
//#endregion
|
|
2901
2944
|
//#region src/data-plane/registry.ts
|
|
2902
|
-
var
|
|
2945
|
+
var vr = class {
|
|
2903
2946
|
definitions = /* @__PURE__ */ new Map();
|
|
2904
2947
|
bindings;
|
|
2905
2948
|
constructor(e = {}) {
|
|
@@ -2924,33 +2967,33 @@ function G(e) {
|
|
|
2924
2967
|
}
|
|
2925
2968
|
//#endregion
|
|
2926
2969
|
//#region src/data-plane/handlers/util.ts
|
|
2927
|
-
var
|
|
2928
|
-
function
|
|
2929
|
-
e.set(
|
|
2970
|
+
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";
|
|
2971
|
+
function wr(e, t) {
|
|
2972
|
+
e.set(yr, t);
|
|
2930
2973
|
}
|
|
2931
2974
|
function K(e) {
|
|
2932
|
-
return e.get(
|
|
2975
|
+
return e.get(yr) ?? e.req.raw;
|
|
2933
2976
|
}
|
|
2934
|
-
function
|
|
2935
|
-
e.set(
|
|
2977
|
+
function Tr(e, t) {
|
|
2978
|
+
e.set(br, t.tenant_id), e.set(xr, t.custom_domain_id), e.set(Sr, t.domain);
|
|
2936
2979
|
}
|
|
2937
|
-
function
|
|
2938
|
-
return e.get(
|
|
2980
|
+
function Er(e) {
|
|
2981
|
+
return e.get(br);
|
|
2939
2982
|
}
|
|
2940
|
-
function
|
|
2941
|
-
return e.get(
|
|
2983
|
+
function Dr(e) {
|
|
2984
|
+
return e.get(xr);
|
|
2942
2985
|
}
|
|
2943
|
-
function
|
|
2944
|
-
return e.get(
|
|
2986
|
+
function Or(e) {
|
|
2987
|
+
return e.get(Sr);
|
|
2945
2988
|
}
|
|
2946
|
-
function
|
|
2989
|
+
function kr(e, t) {
|
|
2947
2990
|
let n = K(e), r = new Headers(n.headers);
|
|
2948
|
-
t(r),
|
|
2991
|
+
t(r), wr(e, new Request(n, { headers: r }));
|
|
2949
2992
|
}
|
|
2950
2993
|
function q(e) {
|
|
2951
2994
|
let t = e.res;
|
|
2952
2995
|
try {
|
|
2953
|
-
t.headers.append(
|
|
2996
|
+
t.headers.append(Cr, "1"), t.headers.delete(Cr);
|
|
2954
2997
|
return;
|
|
2955
2998
|
} catch {
|
|
2956
2999
|
e.res = new Response(t.body, {
|
|
@@ -2962,7 +3005,7 @@ function q(e) {
|
|
|
2962
3005
|
}
|
|
2963
3006
|
//#endregion
|
|
2964
3007
|
//#region src/data-plane/handlers/cors.ts
|
|
2965
|
-
var
|
|
3008
|
+
var Ar = e.object({
|
|
2966
3009
|
origins: e.array(e.string()).optional(),
|
|
2967
3010
|
allow_credentials: e.boolean().optional(),
|
|
2968
3011
|
allow_headers: e.array(e.string()).optional(),
|
|
@@ -2970,44 +3013,44 @@ var Er = e.object({
|
|
|
2970
3013
|
expose_headers: e.array(e.string()).optional(),
|
|
2971
3014
|
max_age: e.number().int().optional()
|
|
2972
3015
|
}).refine((e) => !(e.allow_credentials && e.origins?.includes("*")), { message: "Cannot use wildcard origin (*) with allow_credentials" });
|
|
2973
|
-
function
|
|
3016
|
+
function jr(e, t) {
|
|
2974
3017
|
let n = new Headers(), r = e.origins ?? ["*"], i = r.includes("*");
|
|
2975
3018
|
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
3019
|
}
|
|
2977
|
-
var
|
|
3020
|
+
var Mr = G({
|
|
2978
3021
|
type: "cors",
|
|
2979
|
-
optionsSchema:
|
|
3022
|
+
optionsSchema: Ar,
|
|
2980
3023
|
build(e) {
|
|
2981
3024
|
return async (t, n) => {
|
|
2982
3025
|
let r = t.req.header("origin") ?? null;
|
|
2983
3026
|
if (t.req.method === "OPTIONS" && r !== null && t.req.header("access-control-request-method") !== void 0) {
|
|
2984
|
-
let t =
|
|
3027
|
+
let t = jr(e, r);
|
|
2985
3028
|
return new Response(null, {
|
|
2986
3029
|
status: 204,
|
|
2987
3030
|
headers: t
|
|
2988
3031
|
});
|
|
2989
3032
|
}
|
|
2990
3033
|
await n();
|
|
2991
|
-
let i =
|
|
3034
|
+
let i = jr(e, r);
|
|
2992
3035
|
q(t), i.forEach((e, n) => {
|
|
2993
3036
|
n.toLowerCase() === "vary" ? t.res.headers.append(n, e) : t.res.headers.set(n, e);
|
|
2994
3037
|
});
|
|
2995
3038
|
};
|
|
2996
3039
|
}
|
|
2997
|
-
}),
|
|
3040
|
+
}), Nr = e.object({
|
|
2998
3041
|
username: e.string(),
|
|
2999
3042
|
password: e.string(),
|
|
3000
3043
|
realm: e.string().optional()
|
|
3001
3044
|
});
|
|
3002
|
-
function
|
|
3045
|
+
function Pr(e, t) {
|
|
3003
3046
|
let n = `${e}:${t}`;
|
|
3004
3047
|
return typeof btoa == "function" ? btoa(n) : Buffer.from(n, "utf-8").toString("base64");
|
|
3005
3048
|
}
|
|
3006
|
-
var
|
|
3049
|
+
var Fr = G({
|
|
3007
3050
|
type: "basic_auth",
|
|
3008
|
-
optionsSchema:
|
|
3051
|
+
optionsSchema: Nr,
|
|
3009
3052
|
build(e) {
|
|
3010
|
-
let t =
|
|
3053
|
+
let t = Pr(e.username, e.password), n = (e.realm ?? "Restricted").replace(/["\\\r\n]/g, "");
|
|
3011
3054
|
return async (e, r) => {
|
|
3012
3055
|
let i = e.req.header("authorization");
|
|
3013
3056
|
if (i) {
|
|
@@ -3023,7 +3066,7 @@ var jr = G({
|
|
|
3023
3066
|
});
|
|
3024
3067
|
};
|
|
3025
3068
|
}
|
|
3026
|
-
}),
|
|
3069
|
+
}), Ir = G({
|
|
3027
3070
|
type: "headers",
|
|
3028
3071
|
optionsSchema: e.object({
|
|
3029
3072
|
request: e.record(e.string(), e.string()).optional(),
|
|
@@ -3033,12 +3076,12 @@ var jr = G({
|
|
|
3033
3076
|
}),
|
|
3034
3077
|
build(e) {
|
|
3035
3078
|
return async (t, n) => {
|
|
3036
|
-
if ((e.request || e.remove_request) &&
|
|
3079
|
+
if ((e.request || e.remove_request) && kr(t, (t) => {
|
|
3037
3080
|
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
3081
|
}), 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
3082
|
};
|
|
3040
3083
|
}
|
|
3041
|
-
}),
|
|
3084
|
+
}), Lr = G({
|
|
3042
3085
|
type: "cache",
|
|
3043
3086
|
optionsSchema: e.object({ ttl_seconds: e.number().int().positive() }),
|
|
3044
3087
|
build(e) {
|
|
@@ -3049,7 +3092,7 @@ var jr = G({
|
|
|
3049
3092
|
}
|
|
3050
3093
|
};
|
|
3051
3094
|
}
|
|
3052
|
-
}),
|
|
3095
|
+
}), Rr = [
|
|
3053
3096
|
"173.245.48.0/20",
|
|
3054
3097
|
"103.21.244.0/22",
|
|
3055
3098
|
"103.22.200.0/22",
|
|
@@ -3073,7 +3116,7 @@ var jr = G({
|
|
|
3073
3116
|
"2a06:98c0::/29",
|
|
3074
3117
|
"2c0f:f248::/32"
|
|
3075
3118
|
];
|
|
3076
|
-
function
|
|
3119
|
+
function zr(e) {
|
|
3077
3120
|
let t = e.split(".");
|
|
3078
3121
|
if (t.length !== 4) return null;
|
|
3079
3122
|
let n = [];
|
|
@@ -3085,14 +3128,14 @@ function Fr(e) {
|
|
|
3085
3128
|
}
|
|
3086
3129
|
return n;
|
|
3087
3130
|
}
|
|
3088
|
-
function
|
|
3131
|
+
function Br(e) {
|
|
3089
3132
|
if (e === "") return [];
|
|
3090
3133
|
let t = e.split(":"), n = [];
|
|
3091
3134
|
for (let e = 0; e < t.length; e++) {
|
|
3092
3135
|
let r = t[e];
|
|
3093
3136
|
if (r.includes(".")) {
|
|
3094
3137
|
if (e !== t.length - 1) return null;
|
|
3095
|
-
let i =
|
|
3138
|
+
let i = zr(r);
|
|
3096
3139
|
if (!i) return null;
|
|
3097
3140
|
n.push(i[0] << 8 | i[1], i[2] << 8 | i[3]);
|
|
3098
3141
|
continue;
|
|
@@ -3102,14 +3145,14 @@ function Ir(e) {
|
|
|
3102
3145
|
}
|
|
3103
3146
|
return n;
|
|
3104
3147
|
}
|
|
3105
|
-
function
|
|
3148
|
+
function Vr(e) {
|
|
3106
3149
|
let t = e.split("::");
|
|
3107
3150
|
if (t.length > 2) return null;
|
|
3108
|
-
let n =
|
|
3151
|
+
let n = Br(t[0] ?? "");
|
|
3109
3152
|
if (!n) return null;
|
|
3110
3153
|
let r;
|
|
3111
3154
|
if (t.length === 2) {
|
|
3112
|
-
let e =
|
|
3155
|
+
let e = Br(t[1] ?? "");
|
|
3113
3156
|
if (!e) return null;
|
|
3114
3157
|
let i = 8 - n.length - e.length;
|
|
3115
3158
|
if (i < 1) return null;
|
|
@@ -3124,25 +3167,25 @@ function Lr(e) {
|
|
|
3124
3167
|
for (let e of r) i.push(e >> 8 & 255, e & 255);
|
|
3125
3168
|
return i;
|
|
3126
3169
|
}
|
|
3127
|
-
function
|
|
3170
|
+
function Hr(e) {
|
|
3128
3171
|
let t = e.trim();
|
|
3129
3172
|
t.startsWith("[") && t.endsWith("]") && (t = t.slice(1, -1));
|
|
3130
3173
|
let n = t.indexOf("%");
|
|
3131
3174
|
if (n !== -1 && (t = t.slice(0, n)), t === "") return null;
|
|
3132
|
-
if (!t.includes(":")) return
|
|
3133
|
-
let r =
|
|
3175
|
+
if (!t.includes(":")) return zr(t);
|
|
3176
|
+
let r = Vr(t);
|
|
3134
3177
|
return r ? r.slice(0, 10).every((e) => e === 0) && r[10] === 255 && r[11] === 255 ? r.slice(12) : r : null;
|
|
3135
3178
|
}
|
|
3136
|
-
function
|
|
3137
|
-
let [t, n] = e.split("/"), r =
|
|
3179
|
+
function Ur(e) {
|
|
3180
|
+
let [t, n] = e.split("/"), r = Hr(t ?? ""), i = Number(n);
|
|
3138
3181
|
if (!r || !Number.isInteger(i)) throw Error(`Invalid Cloudflare CIDR: ${e}`);
|
|
3139
3182
|
return {
|
|
3140
3183
|
bytes: r,
|
|
3141
3184
|
prefixBits: i
|
|
3142
3185
|
};
|
|
3143
3186
|
}
|
|
3144
|
-
var
|
|
3145
|
-
function
|
|
3187
|
+
var Wr = Rr.map(Ur);
|
|
3188
|
+
function Gr(e, t) {
|
|
3146
3189
|
if (e.length !== t.bytes.length) return !1;
|
|
3147
3190
|
let n = t.prefixBits >> 3;
|
|
3148
3191
|
for (let r = 0; r < n; r++) if (e[r] !== t.bytes[r]) return !1;
|
|
@@ -3151,11 +3194,11 @@ function Br(e, t) {
|
|
|
3151
3194
|
let i = 255 << 8 - r & 255;
|
|
3152
3195
|
return (e[n] & i) === (t.bytes[n] & i);
|
|
3153
3196
|
}
|
|
3154
|
-
function
|
|
3155
|
-
let t =
|
|
3156
|
-
return t ?
|
|
3197
|
+
function Kr(e) {
|
|
3198
|
+
let t = Hr(e);
|
|
3199
|
+
return t ? Wr.some((e) => Gr(t, e)) : !1;
|
|
3157
3200
|
}
|
|
3158
|
-
var
|
|
3201
|
+
var qr = G({
|
|
3159
3202
|
type: "forwarded_headers",
|
|
3160
3203
|
optionsSchema: e.object({
|
|
3161
3204
|
client_ip_header: e.string().default("cf-connecting-ip"),
|
|
@@ -3166,46 +3209,46 @@ var Hr = G({
|
|
|
3166
3209
|
build(e) {
|
|
3167
3210
|
return async (t, n) => {
|
|
3168
3211
|
let r = new URL(t.req.url);
|
|
3169
|
-
|
|
3212
|
+
kr(t, (n) => {
|
|
3170
3213
|
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 &&
|
|
3214
|
+
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
3215
|
n.set("x-forwarded-for", l), e.set_x_real_ip && n.set("x-real-ip", s);
|
|
3173
3216
|
}), await n();
|
|
3174
3217
|
};
|
|
3175
3218
|
}
|
|
3176
|
-
}),
|
|
3177
|
-
function
|
|
3219
|
+
}), Jr = e.object({ upstream_host: e.string().optional() });
|
|
3220
|
+
function Yr(e) {
|
|
3178
3221
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
3179
3222
|
}
|
|
3180
|
-
function
|
|
3223
|
+
function Xr(e) {
|
|
3181
3224
|
if (typeof e.getSetCookie == "function") return e.getSetCookie();
|
|
3182
3225
|
let t = [];
|
|
3183
3226
|
return e.forEach((e, n) => {
|
|
3184
3227
|
n.toLowerCase() === "set-cookie" && t.push(e);
|
|
3185
3228
|
}), t;
|
|
3186
3229
|
}
|
|
3187
|
-
var
|
|
3230
|
+
var Zr = G({
|
|
3188
3231
|
type: "rewrite_cookies",
|
|
3189
|
-
optionsSchema:
|
|
3232
|
+
optionsSchema: Jr,
|
|
3190
3233
|
build(e) {
|
|
3191
3234
|
return async (t, n) => {
|
|
3192
3235
|
await n();
|
|
3193
3236
|
let r = new URL(t.req.url).hostname, i = e.upstream_host ?? t.get("__proxy_upstream_host__");
|
|
3194
3237
|
if (!i) return;
|
|
3195
|
-
let a =
|
|
3238
|
+
let a = Xr(t.res.headers);
|
|
3196
3239
|
if (a.length === 0) return;
|
|
3197
|
-
let o =
|
|
3240
|
+
let o = Yr(i), s = RegExp(`(?:^|;\\s*)Domain=\\.?${o}(?=;|$)`, "i");
|
|
3198
3241
|
q(t), t.res.headers.delete("set-cookie");
|
|
3199
3242
|
for (let e of a) t.res.headers.append("set-cookie", e.replace(s, `Domain=${r}`));
|
|
3200
3243
|
};
|
|
3201
3244
|
}
|
|
3202
|
-
}),
|
|
3245
|
+
}), Qr = G({
|
|
3203
3246
|
type: "rewrite_location",
|
|
3204
3247
|
optionsSchema: e.object({ upstream_origin: e.string().optional() }),
|
|
3205
3248
|
build(e) {
|
|
3206
3249
|
return async (t, n) => {
|
|
3207
3250
|
if (await n(), t.res.headers.has("x-authhero-preserve-location")) {
|
|
3208
|
-
q(t), t.res.headers.delete(
|
|
3251
|
+
q(t), t.res.headers.delete(mr);
|
|
3209
3252
|
return;
|
|
3210
3253
|
}
|
|
3211
3254
|
let r = t.res.status;
|
|
@@ -3225,7 +3268,7 @@ var Kr = G({
|
|
|
3225
3268
|
q(t), t.res.headers.set("location", c);
|
|
3226
3269
|
};
|
|
3227
3270
|
}
|
|
3228
|
-
}),
|
|
3271
|
+
}), $r = new Set([
|
|
3229
3272
|
"connection",
|
|
3230
3273
|
"keep-alive",
|
|
3231
3274
|
"proxy-authenticate",
|
|
@@ -3234,25 +3277,25 @@ var Kr = G({
|
|
|
3234
3277
|
"trailers",
|
|
3235
3278
|
"transfer-encoding",
|
|
3236
3279
|
"upgrade"
|
|
3237
|
-
]),
|
|
3280
|
+
]), ei = 3e4, ti = e.object({
|
|
3238
3281
|
upstream_url: e.string(),
|
|
3239
3282
|
preserve_host: e.boolean().default(!1),
|
|
3240
3283
|
timeout_ms: e.number().int().positive().optional()
|
|
3241
3284
|
});
|
|
3242
|
-
function
|
|
3285
|
+
function ni(e, t) {
|
|
3243
3286
|
return e === "" || e === "/" ? t : `${e.endsWith("/") ? e.slice(0, -1) : e}${t.startsWith("/") ? t : `/${t}`}`;
|
|
3244
3287
|
}
|
|
3245
|
-
function
|
|
3288
|
+
function ri(e) {
|
|
3246
3289
|
return e !== "GET" && e !== "HEAD";
|
|
3247
3290
|
}
|
|
3248
|
-
var
|
|
3249
|
-
function
|
|
3291
|
+
var ii = 128 * 1024;
|
|
3292
|
+
function ai(e) {
|
|
3250
3293
|
let t = e.headers.get("content-length");
|
|
3251
3294
|
if (t === null) return null;
|
|
3252
3295
|
let n = Number(t);
|
|
3253
3296
|
return Number.isInteger(n) && n >= 0 ? n : null;
|
|
3254
3297
|
}
|
|
3255
|
-
async function
|
|
3298
|
+
async function oi(e, t) {
|
|
3256
3299
|
let n = e.getReader(), r = !1, i = setTimeout(() => {
|
|
3257
3300
|
r = !0, n.cancel().catch(() => {});
|
|
3258
3301
|
}, t), a = [], o = 0;
|
|
@@ -3270,7 +3313,7 @@ async function ti(e, t) {
|
|
|
3270
3313
|
for (let e of a) s.set(e, c), c += e.byteLength;
|
|
3271
3314
|
return s.buffer;
|
|
3272
3315
|
}
|
|
3273
|
-
function
|
|
3316
|
+
function si(e) {
|
|
3274
3317
|
return B(e) ? new Response("Request body timeout", {
|
|
3275
3318
|
status: 408,
|
|
3276
3319
|
headers: { "x-authhero-proxy-error": "request_body_timeout" }
|
|
@@ -3279,20 +3322,20 @@ function ni(e) {
|
|
|
3279
3322
|
headers: { "x-authhero-proxy-error": "request_body_failed" }
|
|
3280
3323
|
});
|
|
3281
3324
|
}
|
|
3282
|
-
async function
|
|
3283
|
-
if (!
|
|
3284
|
-
let r =
|
|
3285
|
-
if (r === null || r >
|
|
3286
|
-
let i = await
|
|
3325
|
+
async function ci(e, t, n) {
|
|
3326
|
+
if (!ri(e.method) || !e.body) return;
|
|
3327
|
+
let r = ai(e);
|
|
3328
|
+
if (r === null || r > ii) return e.body;
|
|
3329
|
+
let i = await oi(e.body, n);
|
|
3287
3330
|
return t.set("content-length", String(i.byteLength)), i;
|
|
3288
3331
|
}
|
|
3289
|
-
async function
|
|
3332
|
+
async function li(e, t, n) {
|
|
3290
3333
|
let r = new URL(t.url), i = new URL(e.upstream_url);
|
|
3291
|
-
i.pathname =
|
|
3334
|
+
i.pathname = ni(i.pathname, r.pathname), i.search = r.search;
|
|
3292
3335
|
let a = new Headers(t.headers);
|
|
3293
|
-
for (let e of
|
|
3336
|
+
for (let e of $r) a.delete(e);
|
|
3294
3337
|
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
|
|
3338
|
+
let o = await ci(t, a, n), s = {
|
|
3296
3339
|
method: t.method,
|
|
3297
3340
|
headers: a,
|
|
3298
3341
|
body: o,
|
|
@@ -3303,17 +3346,17 @@ async function ii(e, t, n) {
|
|
|
3303
3346
|
init: s
|
|
3304
3347
|
};
|
|
3305
3348
|
}
|
|
3306
|
-
var
|
|
3349
|
+
var ui = G({
|
|
3307
3350
|
type: "http",
|
|
3308
|
-
optionsSchema:
|
|
3351
|
+
optionsSchema: ti,
|
|
3309
3352
|
build(e) {
|
|
3310
|
-
let t = e.timeout_ms ??
|
|
3353
|
+
let t = e.timeout_ms ?? ei;
|
|
3311
3354
|
return async (n) => {
|
|
3312
3355
|
let r = K(n), i;
|
|
3313
3356
|
try {
|
|
3314
|
-
i = await
|
|
3357
|
+
i = await li(e, r, t);
|
|
3315
3358
|
} catch (e) {
|
|
3316
|
-
return
|
|
3359
|
+
return si(e);
|
|
3317
3360
|
}
|
|
3318
3361
|
let { target: a, init: o } = i;
|
|
3319
3362
|
n.set("__proxy_upstream_host__", a.hostname), n.set("__proxy_upstream_origin__", `${a.protocol}//${a.host}`);
|
|
@@ -3327,31 +3370,31 @@ var ai = G({
|
|
|
3327
3370
|
}
|
|
3328
3371
|
};
|
|
3329
3372
|
}
|
|
3330
|
-
}),
|
|
3373
|
+
}), di = 3e4, fi = e.object({
|
|
3331
3374
|
binding: e.string(),
|
|
3332
3375
|
upstream_url: e.string().optional(),
|
|
3333
3376
|
preserve_host: e.boolean().default(!0),
|
|
3334
3377
|
timeout_ms: e.number().int().positive().optional()
|
|
3335
3378
|
});
|
|
3336
|
-
function
|
|
3379
|
+
function pi(e) {
|
|
3337
3380
|
return typeof e == "object" && !!e && typeof e.fetch == "function";
|
|
3338
3381
|
}
|
|
3339
|
-
var
|
|
3382
|
+
var mi = G({
|
|
3340
3383
|
type: "service_binding",
|
|
3341
|
-
optionsSchema:
|
|
3384
|
+
optionsSchema: fi,
|
|
3342
3385
|
build(e, t) {
|
|
3343
3386
|
let n = t.bindings[e.binding];
|
|
3344
|
-
if (!
|
|
3345
|
-
let r = e.upstream_url ?? `https://${e.binding}.binding.invalid/`, i = e.timeout_ms ??
|
|
3387
|
+
if (!pi(n)) throw Error(`Service binding "${e.binding}" is not configured or is not a Fetcher`);
|
|
3388
|
+
let r = e.upstream_url ?? `https://${e.binding}.binding.invalid/`, i = e.timeout_ms ?? di;
|
|
3346
3389
|
return async (t) => {
|
|
3347
3390
|
let a = K(t), o;
|
|
3348
3391
|
try {
|
|
3349
|
-
o = await
|
|
3392
|
+
o = await li({
|
|
3350
3393
|
upstream_url: r,
|
|
3351
3394
|
preserve_host: e.preserve_host
|
|
3352
3395
|
}, a, i);
|
|
3353
3396
|
} catch (e) {
|
|
3354
|
-
return
|
|
3397
|
+
return si(e);
|
|
3355
3398
|
}
|
|
3356
3399
|
let { target: s, init: c } = o;
|
|
3357
3400
|
t.set("__proxy_upstream_host__", s.hostname), t.set("__proxy_upstream_origin__", `${s.protocol}//${s.host}`);
|
|
@@ -3365,35 +3408,35 @@ var li = G({
|
|
|
3365
3408
|
}
|
|
3366
3409
|
};
|
|
3367
3410
|
}
|
|
3368
|
-
}),
|
|
3411
|
+
}), hi = 3e4, gi = e.object({
|
|
3369
3412
|
binding: e.string(),
|
|
3370
3413
|
script_name: e.string(),
|
|
3371
3414
|
cpu_ms: e.number().int().positive().optional(),
|
|
3372
3415
|
subrequests: e.number().int().positive().optional(),
|
|
3373
3416
|
timeout_ms: e.number().int().positive().optional()
|
|
3374
3417
|
});
|
|
3375
|
-
function
|
|
3418
|
+
function _i(e) {
|
|
3376
3419
|
return typeof e == "object" && !!e && typeof e.get == "function";
|
|
3377
3420
|
}
|
|
3378
|
-
var
|
|
3379
|
-
function
|
|
3380
|
-
return
|
|
3421
|
+
var J = /\{(tenant_id|custom_domain_id|domain|host)\}/g;
|
|
3422
|
+
function vi(e) {
|
|
3423
|
+
return J.lastIndex = 0, J.test(e);
|
|
3381
3424
|
}
|
|
3382
|
-
var
|
|
3425
|
+
var yi = G({
|
|
3383
3426
|
type: "dispatch_namespace",
|
|
3384
|
-
optionsSchema:
|
|
3427
|
+
optionsSchema: gi,
|
|
3385
3428
|
build(e, t) {
|
|
3386
3429
|
let n = t.bindings[e.binding];
|
|
3387
|
-
if (!
|
|
3388
|
-
let r =
|
|
3430
|
+
if (!_i(n)) throw Error(`Dispatch namespace binding "${e.binding}" is not configured or does not expose .get()`);
|
|
3431
|
+
let r = vi(e.script_name), i = e.timeout_ms ?? hi, a = e.cpu_ms || e.subrequests ? { limits: {
|
|
3389
3432
|
...e.cpu_ms ? { cpuMs: e.cpu_ms } : {},
|
|
3390
3433
|
...e.subrequests ? { subrequests: e.subrequests } : {}
|
|
3391
3434
|
} } : void 0;
|
|
3392
3435
|
return async (t) => {
|
|
3393
3436
|
let o = e.script_name;
|
|
3394
3437
|
if (r) {
|
|
3395
|
-
let n =
|
|
3396
|
-
if (o = o.replace(
|
|
3438
|
+
let n = Er(t), r = Dr(t), i = Or(t), a = t.req.header("host") ?? t.req.header("x-forwarded-host") ?? "";
|
|
3439
|
+
if (o = o.replace(J, (e, t) => {
|
|
3397
3440
|
switch (t) {
|
|
3398
3441
|
case "tenant_id": return n ?? "";
|
|
3399
3442
|
case "custom_domain_id": return r ?? "";
|
|
@@ -3415,7 +3458,7 @@ var mi = G({
|
|
|
3415
3458
|
}
|
|
3416
3459
|
};
|
|
3417
3460
|
}
|
|
3418
|
-
}),
|
|
3461
|
+
}), bi = G({
|
|
3419
3462
|
type: "redirect",
|
|
3420
3463
|
optionsSchema: e.object({
|
|
3421
3464
|
upstream_url: e.string().refine((e) => {
|
|
@@ -3444,7 +3487,7 @@ var mi = G({
|
|
|
3444
3487
|
});
|
|
3445
3488
|
};
|
|
3446
3489
|
}
|
|
3447
|
-
}),
|
|
3490
|
+
}), xi = G({
|
|
3448
3491
|
type: "static",
|
|
3449
3492
|
optionsSchema: e.object({
|
|
3450
3493
|
status: e.number().int().default(200),
|
|
@@ -3464,15 +3507,15 @@ var mi = G({
|
|
|
3464
3507
|
});
|
|
3465
3508
|
//#endregion
|
|
3466
3509
|
//#region src/data-plane/handlers/index.ts
|
|
3467
|
-
function
|
|
3468
|
-
e.add(
|
|
3510
|
+
function Si(e) {
|
|
3511
|
+
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
3512
|
}
|
|
3470
3513
|
//#endregion
|
|
3471
3514
|
//#region src/data-plane/matcher.ts
|
|
3472
|
-
function
|
|
3515
|
+
function Ci(e) {
|
|
3473
3516
|
return [...e].sort((e, t) => e.priority === t.priority ? e.created_at.localeCompare(t.created_at) : e.priority - t.priority);
|
|
3474
3517
|
}
|
|
3475
|
-
function
|
|
3518
|
+
function wi(e, t) {
|
|
3476
3519
|
let n = e.toLowerCase(), r = t.toLowerCase();
|
|
3477
3520
|
if (n === r) return !0;
|
|
3478
3521
|
if (n.startsWith("*.")) {
|
|
@@ -3481,13 +3524,13 @@ function yi(e, t) {
|
|
|
3481
3524
|
}
|
|
3482
3525
|
return !1;
|
|
3483
3526
|
}
|
|
3484
|
-
function
|
|
3485
|
-
return !e || e.length === 0 ? !0 : e.some((e) =>
|
|
3527
|
+
function Ti(e, t) {
|
|
3528
|
+
return !e || e.length === 0 ? !0 : e.some((e) => wi(e, t));
|
|
3486
3529
|
}
|
|
3487
|
-
function
|
|
3530
|
+
function Ei(e) {
|
|
3488
3531
|
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
3532
|
return async (e, i) => {
|
|
3490
|
-
if (r && !
|
|
3533
|
+
if (r && !Ti(r, e.req.header("host") ?? "")) return new Response("No matching route", { status: 404 });
|
|
3491
3534
|
for (let [n, r] of t) {
|
|
3492
3535
|
let t = e.req.header(n);
|
|
3493
3536
|
if (t === void 0 || !r.test(t)) return new Response("No matching route", { status: 404 });
|
|
@@ -3504,17 +3547,17 @@ function xi(e) {
|
|
|
3504
3547
|
}
|
|
3505
3548
|
//#endregion
|
|
3506
3549
|
//#region src/data-plane/compile.ts
|
|
3507
|
-
var
|
|
3508
|
-
function
|
|
3550
|
+
var Di = "forwarded_headers";
|
|
3551
|
+
function Oi(e) {
|
|
3509
3552
|
return e.some((e) => e.type === "forwarded_headers") ? [...e] : [{
|
|
3510
|
-
type:
|
|
3553
|
+
type: Di,
|
|
3511
3554
|
options: {}
|
|
3512
3555
|
}, ...e];
|
|
3513
3556
|
}
|
|
3514
|
-
function
|
|
3515
|
-
return e.has("forwarded_headers") ?
|
|
3557
|
+
function Y(e, t) {
|
|
3558
|
+
return e.has("forwarded_headers") ? Oi(t) : [...t];
|
|
3516
3559
|
}
|
|
3517
|
-
var
|
|
3560
|
+
var X = [
|
|
3518
3561
|
"GET",
|
|
3519
3562
|
"POST",
|
|
3520
3563
|
"PUT",
|
|
@@ -3526,34 +3569,34 @@ var wi = [
|
|
|
3526
3569
|
function Z(e, n, r, i) {
|
|
3527
3570
|
let a = new t();
|
|
3528
3571
|
r && a.use("*", async (e, t) => {
|
|
3529
|
-
|
|
3572
|
+
Tr(e, r), await t();
|
|
3530
3573
|
});
|
|
3531
|
-
let o =
|
|
3574
|
+
let o = Ci(e);
|
|
3532
3575
|
for (let e of o) {
|
|
3533
3576
|
let t = [];
|
|
3534
|
-
t.push(
|
|
3535
|
-
for (let r of
|
|
3536
|
-
let r = e.match.methods?.length ? e.match.methods.map((e) => e.toUpperCase()) :
|
|
3577
|
+
t.push(Ei(e.match));
|
|
3578
|
+
for (let r of Y(n, e.handlers)) t.push(n.build(r.type, r.options));
|
|
3579
|
+
let r = e.match.methods?.length ? e.match.methods.map((e) => e.toUpperCase()) : X, i = e.match.path || "/*";
|
|
3537
3580
|
a.on(r, [i], ...t);
|
|
3538
3581
|
}
|
|
3539
|
-
return i && i.length > 0 ? a.on(
|
|
3582
|
+
return i && i.length > 0 ? a.on(X, ["*"], ...i) : a.all("*", (e) => e.text("No matching route", 404)), a.onError((e, t) => {
|
|
3540
3583
|
let n = B(e);
|
|
3541
3584
|
return t.text(n ? "Upstream timeout" : "Bad gateway", n ? 504 : 502, { "x-authhero-proxy-error": n ? "handler_timeout" : "handler_failed" });
|
|
3542
3585
|
}), a;
|
|
3543
3586
|
}
|
|
3544
3587
|
//#endregion
|
|
3545
3588
|
//#region src/data-plane/router.ts
|
|
3546
|
-
var
|
|
3547
|
-
function
|
|
3589
|
+
var ki = 1e4;
|
|
3590
|
+
function Ai(e) {
|
|
3548
3591
|
return e.resolver ? e.resolver : e.cache ? W(e.data, e.cache) : W(e.data, e.cacheTtlMs ?? 3e4);
|
|
3549
3592
|
}
|
|
3550
|
-
function
|
|
3593
|
+
function ji(e) {
|
|
3551
3594
|
if (e.registry) return e.registry;
|
|
3552
|
-
let t = new
|
|
3553
|
-
return
|
|
3595
|
+
let t = new vr(e.bindings ?? {});
|
|
3596
|
+
return Si(t), t;
|
|
3554
3597
|
}
|
|
3555
3598
|
function Q(e) {
|
|
3556
|
-
let t =
|
|
3599
|
+
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
3600
|
return async (e) => {
|
|
3558
3601
|
let s = e.req.header("host") ?? e.req.header("x-forwarded-host");
|
|
3559
3602
|
if (!s) return e.text("Missing host", 400);
|
|
@@ -3571,13 +3614,13 @@ function Q(e) {
|
|
|
3571
3614
|
}
|
|
3572
3615
|
};
|
|
3573
3616
|
}
|
|
3574
|
-
function
|
|
3617
|
+
function Mi(e) {
|
|
3575
3618
|
let n = new t();
|
|
3576
3619
|
return n.all("*", Q(e)), n;
|
|
3577
3620
|
}
|
|
3578
3621
|
//#endregion
|
|
3579
3622
|
//#region src/app.ts
|
|
3580
|
-
function
|
|
3623
|
+
function Ni(e) {
|
|
3581
3624
|
let n = new t();
|
|
3582
3625
|
return n.all("*", Q({
|
|
3583
3626
|
data: e.data,
|
|
@@ -3595,17 +3638,17 @@ function ki(e) {
|
|
|
3595
3638
|
}
|
|
3596
3639
|
//#endregion
|
|
3597
3640
|
//#region src/data-plane/cache-api-cache.ts
|
|
3598
|
-
var
|
|
3599
|
-
function
|
|
3641
|
+
var Pi = 1e3, Fi = 1e3;
|
|
3642
|
+
function Ii(e, t) {
|
|
3600
3643
|
return new Request(`https://proxy-cache.internal/${encodeURIComponent(e)}/hosts/${encodeURIComponent(t.toLowerCase())}`, { method: "GET" });
|
|
3601
3644
|
}
|
|
3602
|
-
function
|
|
3645
|
+
function Li() {
|
|
3603
3646
|
return globalThis.caches?.default;
|
|
3604
3647
|
}
|
|
3605
|
-
function
|
|
3606
|
-
let t = e.cache ??
|
|
3648
|
+
function Ri(e) {
|
|
3649
|
+
let t = e.cache ?? Li();
|
|
3607
3650
|
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 ??
|
|
3651
|
+
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
3652
|
async function l(e) {
|
|
3610
3653
|
try {
|
|
3611
3654
|
return await U(Promise.resolve(n.match(e)), s, "cache.match");
|
|
@@ -3614,7 +3657,7 @@ function Pi(e) {
|
|
|
3614
3657
|
}
|
|
3615
3658
|
}
|
|
3616
3659
|
return { async resolveHost(t, s) {
|
|
3617
|
-
let u =
|
|
3660
|
+
let u = Ii(r, t), d = await l(u);
|
|
3618
3661
|
if (d) try {
|
|
3619
3662
|
return (await d.json()).value;
|
|
3620
3663
|
} catch {}
|
|
@@ -3625,14 +3668,14 @@ function Pi(e) {
|
|
|
3625
3668
|
return o ? o(h) : await h, f;
|
|
3626
3669
|
} };
|
|
3627
3670
|
}
|
|
3628
|
-
function
|
|
3629
|
-
return
|
|
3671
|
+
function zi(e, t) {
|
|
3672
|
+
return Ii(e, t);
|
|
3630
3673
|
}
|
|
3631
3674
|
//#endregion
|
|
3632
3675
|
//#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 =
|
|
3676
|
+
var Bi = 1e3, Vi = 1e3, Hi = 5e3;
|
|
3677
|
+
function Ui(e) {
|
|
3678
|
+
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
3679
|
function m(e) {
|
|
3637
3680
|
return `${s}:${e.toLowerCase()}`;
|
|
3638
3681
|
}
|
|
@@ -3689,7 +3732,7 @@ function zi(e) {
|
|
|
3689
3732
|
}
|
|
3690
3733
|
} };
|
|
3691
3734
|
}
|
|
3692
|
-
function
|
|
3735
|
+
function Wi(e, t) {
|
|
3693
3736
|
return `${e}:${t.toLowerCase()}`;
|
|
3694
3737
|
}
|
|
3695
3738
|
//#endregion
|
|
@@ -3697,7 +3740,7 @@ function Bi(e, t) {
|
|
|
3697
3740
|
function $() {
|
|
3698
3741
|
throw Error("Static proxy adapter is read-only; configure routes at init time");
|
|
3699
3742
|
}
|
|
3700
|
-
function
|
|
3743
|
+
function Gi(e, t, n, r, i, a) {
|
|
3701
3744
|
return {
|
|
3702
3745
|
id: e.id ?? `${n}:${t}`,
|
|
3703
3746
|
tenant_id: r,
|
|
@@ -3712,10 +3755,10 @@ function Vi(e, t, n, r, i, a) {
|
|
|
3712
3755
|
updated_at: e.updated_at ?? a
|
|
3713
3756
|
};
|
|
3714
3757
|
}
|
|
3715
|
-
function
|
|
3758
|
+
function Ki(e) {
|
|
3716
3759
|
let t = (/* @__PURE__ */ new Date()).toISOString(), n = e.defaultTenantId ?? "static", r = /* @__PURE__ */ new Map();
|
|
3717
3760
|
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) =>
|
|
3761
|
+
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
3762
|
r.set(e, {
|
|
3720
3763
|
tenant_id: s,
|
|
3721
3764
|
custom_domain_id: c,
|
|
@@ -3759,7 +3802,7 @@ function Hi(e) {
|
|
|
3759
3802
|
}
|
|
3760
3803
|
};
|
|
3761
3804
|
}
|
|
3762
|
-
function
|
|
3805
|
+
function qi(e, t = {}) {
|
|
3763
3806
|
return {
|
|
3764
3807
|
priority: t.priority,
|
|
3765
3808
|
match: { path: t.path ?? "/*" },
|
|
@@ -3774,10 +3817,10 @@ function Ui(e, t = {}) {
|
|
|
3774
3817
|
}
|
|
3775
3818
|
//#endregion
|
|
3776
3819
|
//#region src/constants.ts
|
|
3777
|
-
var
|
|
3820
|
+
var Ji = "proxy:resolve_host";
|
|
3778
3821
|
//#endregion
|
|
3779
3822
|
//#region src/http-adapter/index.ts
|
|
3780
|
-
function
|
|
3823
|
+
function Yi() {
|
|
3781
3824
|
let e = () => {
|
|
3782
3825
|
throw Error("HTTP proxy adapter does not expose write access to proxy_routes; mutate via the control-plane management API");
|
|
3783
3826
|
};
|
|
@@ -3799,10 +3842,10 @@ function Gi() {
|
|
|
3799
3842
|
}
|
|
3800
3843
|
};
|
|
3801
3844
|
}
|
|
3802
|
-
function
|
|
3845
|
+
function Xi(e) {
|
|
3803
3846
|
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
3847
|
function c(e, t) {
|
|
3805
|
-
let n = new AbortController(), r =
|
|
3848
|
+
let n = new AbortController(), r = hr([e, n.signal]) ?? n.signal, i, a = new Promise((e, t) => {
|
|
3806
3849
|
i = setTimeout(() => {
|
|
3807
3850
|
n.abort(), t(new z(s, "control plane"));
|
|
3808
3851
|
}, s);
|
|
@@ -3836,7 +3879,7 @@ function Ki(e) {
|
|
|
3836
3879
|
return l && l.expires_at > Date.now() ? l.value : u(e);
|
|
3837
3880
|
}
|
|
3838
3881
|
return {
|
|
3839
|
-
proxyRoutes:
|
|
3882
|
+
proxyRoutes: Yi(),
|
|
3840
3883
|
async resolveHost(e, i) {
|
|
3841
3884
|
let a = i?.signal, o = await d(a), s = `${n}${r}${encodeURIComponent(e.toLowerCase())}`;
|
|
3842
3885
|
return c(a, async (e) => {
|
|
@@ -3853,7 +3896,7 @@ function Ki(e) {
|
|
|
3853
3896
|
}
|
|
3854
3897
|
//#endregion
|
|
3855
3898
|
//#region src/http-adapter/service-binding-fetch.ts
|
|
3856
|
-
function
|
|
3899
|
+
function Zi(e) {
|
|
3857
3900
|
return (t, n) => {
|
|
3858
3901
|
let r = t instanceof Request && n === void 0 ? t : new Request(t, n);
|
|
3859
3902
|
return e.fetch(r);
|
|
@@ -3861,11 +3904,11 @@ function qi(e) {
|
|
|
3861
3904
|
}
|
|
3862
3905
|
//#endregion
|
|
3863
3906
|
//#region src/kv-adapter/index.ts
|
|
3864
|
-
var
|
|
3865
|
-
function
|
|
3907
|
+
var Qi = "authhero-proxy-host:";
|
|
3908
|
+
function $i(e, t) {
|
|
3866
3909
|
return `${e}${t.toLowerCase()}`;
|
|
3867
3910
|
}
|
|
3868
|
-
function
|
|
3911
|
+
function ea() {
|
|
3869
3912
|
let e = () => {
|
|
3870
3913
|
throw Error("KV proxy adapter does not expose write access to proxy_routes; mutate via the control-plane management API");
|
|
3871
3914
|
};
|
|
@@ -3887,15 +3930,15 @@ function Xi() {
|
|
|
3887
3930
|
}
|
|
3888
3931
|
};
|
|
3889
3932
|
}
|
|
3890
|
-
function
|
|
3891
|
-
let { kv: t, keyPrefix: n =
|
|
3933
|
+
function ta(e) {
|
|
3934
|
+
let { kv: t, keyPrefix: n = Qi, timeoutMs: r } = e;
|
|
3892
3935
|
return {
|
|
3893
|
-
proxyRoutes:
|
|
3936
|
+
proxyRoutes: ea(),
|
|
3894
3937
|
async resolveHost(e) {
|
|
3895
|
-
let i =
|
|
3938
|
+
let i = $i(n, e), a = t.get(i, "json");
|
|
3896
3939
|
return (r && r > 0 ? await U(a, r, "kv.get") : await a) ?? null;
|
|
3897
3940
|
}
|
|
3898
3941
|
};
|
|
3899
3942
|
}
|
|
3900
3943
|
//#endregion
|
|
3901
|
-
export {
|
|
3944
|
+
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 };
|