@authhero/saml 0.4.2 → 0.4.4

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/core.mjs CHANGED
@@ -316,11 +316,11 @@ var t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
316
316
  }
317
317
  n += e[t];
318
318
  }
319
- return r === "" ? {
319
+ return r === "" && {
320
320
  value: n,
321
321
  index: t,
322
322
  tagClosed: i
323
- } : !1;
323
+ };
324
324
  }
325
325
  var l = /* @__PURE__ */ RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?", "g");
326
326
  function d(e, n) {
@@ -1002,7 +1002,7 @@ var t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
1002
1002
  function D(e, t, r) {
1003
1003
  if (t && typeof e == "string") {
1004
1004
  let t = e.trim();
1005
- return t === "true" ? !0 : t === "false" ? !1 : a(e, r);
1005
+ return t === "true" || t !== "false" && a(e, r);
1006
1006
  } else if (n.isExist(e)) return e;
1007
1007
  else return "";
1008
1008
  }
@@ -1080,76 +1080,78 @@ var t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
1080
1080
  }
1081
1081
  };
1082
1082
  })), b = /* @__PURE__ */ t(((e, t) => {
1083
- var n = "\n";
1084
- function r(e, t) {
1085
- let r = "";
1086
- return t.format && t.indentBy.length > 0 && (r = n), i(e, t, "", r);
1083
+ function n(e, t) {
1084
+ let n = "";
1085
+ return t.format && t.indentBy.length > 0 && (n = "\n"), r(e, t, "", n);
1087
1086
  }
1088
- function i(e, t, n, r) {
1087
+ function r(e, t, n, c) {
1089
1088
  let l = "", u = !1;
1090
1089
  if (!Array.isArray(e)) {
1091
1090
  if (e != null) {
1092
1091
  let n = e.toString();
1093
- return n = c(n, t), n;
1092
+ return n = s(n, t), n;
1094
1093
  }
1095
1094
  return "";
1096
1095
  }
1097
1096
  for (let d = 0; d < e.length; d++) {
1098
- let f = e[d], p = a(f);
1097
+ let f = e[d], p = i(f);
1099
1098
  if (p === void 0) continue;
1100
1099
  let m = "";
1101
1100
  if (m = n.length === 0 ? p : `${n}.${p}`, p === t.textNodeName) {
1102
1101
  let e = f[p];
1103
- s(m, t) || (e = t.tagValueProcessor(p, e), e = c(e, t)), u && (l += r), l += e, u = !1;
1102
+ o(m, t) || (e = t.tagValueProcessor(p, e), e = s(e, t)), u && (l += c), l += e, u = !1;
1104
1103
  continue;
1105
1104
  } else if (p === t.cdataPropName) {
1106
- u && (l += r), l += `<![CDATA[${f[p][0][t.textNodeName]}]]>`, u = !1;
1105
+ u && (l += c);
1106
+ let e = String(f[p][0][t.textNodeName]).replace(/\]\]>/g, "]]]]><![CDATA[>");
1107
+ l += `<![CDATA[${e}]]>`, u = !1;
1107
1108
  continue;
1108
1109
  } else if (p === t.commentPropName) {
1109
- l += r + `<!--${f[p][0][t.textNodeName]}-->`, u = !0;
1110
+ let e = String(f[p][0][t.textNodeName]).replace(/--/g, "- -").replace(/-$/, "- ");
1111
+ l += c + `<!--${e}-->`, u = !0;
1110
1112
  continue;
1111
1113
  } else if (p[0] === "?") {
1112
- let e = o(f[":@"], t), n = p === "?xml" ? "" : r, i = f[p][0][t.textNodeName];
1113
- i = i.length === 0 ? "" : " " + i, l += n + `<${p}${i}${e}?>`, u = !0;
1114
+ let e = a(f[":@"], t), n = p === "?xml" ? "" : c, r = f[p][0][t.textNodeName];
1115
+ r = r.length === 0 ? "" : " " + r, l += n + `<${p}${r}${e}?>`, u = !0;
1114
1116
  continue;
1115
1117
  }
1116
- let h = r;
1118
+ let h = c;
1117
1119
  h !== "" && (h += t.indentBy);
1118
- let g = r + `<${p}${o(f[":@"], t)}`, _ = i(f[p], t, m, h);
1119
- t.unpairedTags.indexOf(p) === -1 ? (!_ || _.length === 0) && t.suppressEmptyNode ? l += g + "/>" : _ && _.endsWith(">") ? l += g + `>${_}${r}</${p}>` : (l += g + ">", _ && r !== "" && (_.includes("/>") || _.includes("</")) ? l += r + t.indentBy + _ + r : l += _, l += `</${p}>`) : t.suppressUnpairedNode ? l += g + ">" : l += g + "/>", u = !0;
1120
+ let g = c + `<${p}${a(f[":@"], t)}`, _ = r(f[p], t, m, h);
1121
+ t.unpairedTags.indexOf(p) === -1 ? (!_ || _.length === 0) && t.suppressEmptyNode ? l += g + "/>" : _ && _.endsWith(">") ? l += g + `>${_}${c}</${p}>` : (l += g + ">", _ && c !== "" && (_.includes("/>") || _.includes("</")) ? l += c + t.indentBy + _ + c : l += _, l += `</${p}>`) : t.suppressUnpairedNode ? l += g + ">" : l += g + "/>", u = !0;
1120
1122
  }
1121
1123
  return l;
1122
1124
  }
1123
- function a(e) {
1125
+ function i(e) {
1124
1126
  let t = Object.keys(e);
1125
1127
  for (let n = 0; n < t.length; n++) {
1126
1128
  let r = t[n];
1127
1129
  if (Object.prototype.hasOwnProperty.call(e, r) && r !== ":@") return r;
1128
1130
  }
1129
1131
  }
1130
- function o(e, t) {
1132
+ function a(e, t) {
1131
1133
  let n = "";
1132
1134
  if (e && !t.ignoreAttributes) for (let r in e) {
1133
1135
  if (!Object.prototype.hasOwnProperty.call(e, r)) continue;
1134
1136
  let i = t.attributeValueProcessor(r, e[r]);
1135
- i = c(i, t), i === !0 && t.suppressBooleanAttributes ? n += ` ${r.substr(t.attributeNamePrefix.length)}` : n += ` ${r.substr(t.attributeNamePrefix.length)}="${i}"`;
1137
+ i = s(i, t), i === !0 && t.suppressBooleanAttributes ? n += ` ${r.substr(t.attributeNamePrefix.length)}` : n += ` ${r.substr(t.attributeNamePrefix.length)}="${i}"`;
1136
1138
  }
1137
1139
  return n;
1138
1140
  }
1139
- function s(e, t) {
1141
+ function o(e, t) {
1140
1142
  e = e.substr(0, e.length - t.textNodeName.length - 1);
1141
1143
  let n = e.substr(e.lastIndexOf(".") + 1);
1142
1144
  for (let r in t.stopNodes) if (t.stopNodes[r] === e || t.stopNodes[r] === "*." + n) return !0;
1143
1145
  return !1;
1144
1146
  }
1145
- function c(e, t) {
1147
+ function s(e, t) {
1146
1148
  if (e && e.length > 0 && t.processEntities) for (let n = 0; n < t.entities.length; n++) {
1147
1149
  let r = t.entities[n];
1148
1150
  e = e.replace(r.regex, r.val);
1149
1151
  }
1150
1152
  return e;
1151
1153
  }
1152
- t.exports = r;
1154
+ t.exports = n;
1153
1155
  })), x = /* @__PURE__ */ t(((e, t) => {
1154
1156
  var n = b(), r = g(), i = {
1155
1157
  attributeNamePrefix: "@_",
@@ -1252,16 +1254,24 @@ var t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
1252
1254
  if (e === "") return t[0] === "?" ? this.indentate(r) + "<" + t + n + "?" + this.tagEndChar : this.indentate(r) + "<" + t + n + this.closeTag(t) + this.tagEndChar;
1253
1255
  {
1254
1256
  let i = "</" + t + this.tagEndChar, a = "";
1255
- return t[0] === "?" && (a = "?", i = ""), (n || n === "") && e.indexOf("<") === -1 ? this.indentate(r) + "<" + t + n + a + ">" + e + i : this.options.commentPropName !== !1 && t === this.options.commentPropName && a.length === 0 ? this.indentate(r) + `<!--${e}-->` + this.newLine : this.indentate(r) + "<" + t + n + a + this.tagEndChar + e + this.indentate(r) + i;
1257
+ if (t[0] === "?" && (a = "?", i = ""), (n || n === "") && e.indexOf("<") === -1) return this.indentate(r) + "<" + t + n + a + ">" + e + i;
1258
+ if (this.options.commentPropName !== !1 && t === this.options.commentPropName && a.length === 0) {
1259
+ let t = String(e).replace(/--/g, "- -").replace(/-$/, "- ");
1260
+ return this.indentate(r) + `<!--${t}-->` + this.newLine;
1261
+ } else return this.indentate(r) + "<" + t + n + a + this.tagEndChar + e + this.indentate(r) + i;
1256
1262
  }
1257
1263
  }, a.prototype.closeTag = function(e) {
1258
1264
  let t = "";
1259
1265
  return this.options.unpairedTags.indexOf(e) === -1 ? t = this.options.suppressEmptyNode ? "/" : `></${e}` : this.options.suppressUnpairedNode || (t = "/"), t;
1260
1266
  }, a.prototype.buildTextValNode = function(e, t, n, r) {
1261
- if (this.options.cdataPropName !== !1 && t === this.options.cdataPropName) return this.indentate(r) + `<![CDATA[${e}]]>` + this.newLine;
1262
- if (this.options.commentPropName !== !1 && t === this.options.commentPropName) return this.indentate(r) + `<!--${e}-->` + this.newLine;
1263
- if (t[0] === "?") return this.indentate(r) + "<" + t + n + "?" + this.tagEndChar;
1264
- {
1267
+ if (this.options.cdataPropName !== !1 && t === this.options.cdataPropName) {
1268
+ let t = String(e).replace(/\]\]>/g, "]]]]><![CDATA[>");
1269
+ return this.indentate(r) + `<![CDATA[${t}]]>` + this.newLine;
1270
+ } else if (this.options.commentPropName !== !1 && t === this.options.commentPropName) {
1271
+ let t = String(e).replace(/--/g, "- -").replace(/-$/, "- ");
1272
+ return this.indentate(r) + `<!--${t}-->` + this.newLine;
1273
+ } else if (t[0] === "?") return this.indentate(r) + "<" + t + n + "?" + this.tagEndChar;
1274
+ else {
1265
1275
  let i = this.options.tagValueProcessor(t, e);
1266
1276
  return i = this.replaceEntitiesValue(i), i === "" ? this.indentate(r) + "<" + t + n + this.closeTag(t) + this.tagEndChar : this.indentate(r) + "<" + t + n + ">" + i + "</" + t + this.tagEndChar;
1267
1277
  }
@@ -1286,144 +1296,2629 @@ var t = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t
1286
1296
  XMLValidator: n,
1287
1297
  XMLBuilder: x()
1288
1298
  };
1289
- })))(), C = class {
1290
- alphabet;
1291
- padding;
1292
- decodeMap = /* @__PURE__ */ new Map();
1293
- constructor(e, t) {
1294
- if (e.length !== 32) throw Error("Invalid alphabet");
1295
- if (this.alphabet = e, this.padding = t?.padding ?? "=", this.alphabet.includes(this.padding) || this.padding.length !== 1) throw Error("Invalid padding");
1296
- for (let t = 0; t < e.length; t++) this.decodeMap.set(e[t], t);
1297
- }
1298
- encode(e, t) {
1299
- let n = "", r = 0, i = 0;
1300
- for (let t = 0; t < e.length; t++) for (r = r << 8 | e[t], i += 8; i >= 5;) i -= 5, n += this.alphabet[r >> i & 31];
1301
- if (i > 0 && (n += this.alphabet[r << 5 - i & 31]), t?.includePadding ?? !0) {
1302
- let e = (8 - n.length % 8) % 8;
1303
- for (let t = 0; t < e; t++) n += "=";
1304
- }
1305
- return n;
1306
- }
1307
- decode(e, t) {
1308
- let n = t?.strict ?? !0, r = Math.ceil(e.length / 8), i = [];
1309
- for (let t = 0; t < r; t++) {
1310
- let a = 0, o = [];
1311
- for (let i = 0; i < 8; i++) {
1312
- let s = e[t * 8 + i];
1313
- if (s === "=") {
1314
- if (t + 1 !== r) throw Error(`Invalid character: ${s}`);
1315
- a += 1;
1316
- continue;
1317
- }
1318
- if (s === void 0) {
1319
- if (n) throw Error("Invalid data");
1320
- a += 1;
1321
- continue;
1322
- }
1323
- let c = this.decodeMap.get(s) ?? null;
1324
- if (c === null) throw Error(`Invalid character: ${s}`);
1325
- o.push(c);
1326
- }
1327
- if (a === 8 || a === 7 || a === 5 || a === 2) throw Error("Invalid padding");
1328
- let s = (o[0] << 3) + (o[1] >> 2);
1329
- if (i.push(s), a < 6) {
1330
- let e = ((o[1] & 3) << 6) + (o[2] << 1) + (o[3] >> 4);
1331
- i.push(e);
1332
- }
1333
- if (a < 4) {
1334
- let e = ((o[3] & 255) << 4) + (o[4] >> 1);
1335
- i.push(e);
1336
- }
1337
- if (a < 3) {
1338
- let e = ((o[4] & 1) << 7) + (o[5] << 2) + (o[6] >> 3);
1339
- i.push(e);
1340
- }
1341
- if (a < 1) {
1342
- let e = ((o[6] & 7) << 5) + o[7];
1343
- i.push(e);
1344
- }
1345
- }
1346
- return Uint8Array.from(i);
1347
- }
1348
- };
1349
- new C("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"), new C("0123456789ABCDEFGHIJKLMNOPQRSTUV");
1350
- //#endregion
1351
- //#region ../../node_modules/.pnpm/oslo@1.2.1/node_modules/oslo/dist/encoding/base64.js
1352
- var w = class {
1353
- alphabet;
1354
- padding;
1355
- decodeMap = /* @__PURE__ */ new Map();
1356
- constructor(e, t) {
1357
- if (e.length !== 64) throw Error("Invalid alphabet");
1358
- if (this.alphabet = e, this.padding = t?.padding ?? "=", this.alphabet.includes(this.padding) || this.padding.length !== 1) throw Error("Invalid padding");
1359
- for (let t = 0; t < e.length; t++) this.decodeMap.set(e[t], t);
1360
- }
1361
- encode(e, t) {
1362
- let n = "", r = 0, i = 0;
1363
- for (let t = 0; t < e.length; t++) for (r = r << 8 | e[t], i += 8; i >= 6;) i += -6, n += this.alphabet[r >> i & 63];
1364
- if (i > 0 && (n += this.alphabet[r << 6 - i & 63]), t?.includePadding ?? !0) {
1365
- let e = (4 - n.length % 4) % 4;
1366
- for (let t = 0; t < e; t++) n += "=";
1299
+ })))(), C = e.object({
1300
+ created_at: e.string(),
1301
+ updated_at: e.string()
1302
+ }), w = e.object({
1303
+ id: e.string(),
1304
+ version: e.string().optional()
1305
+ }), T = e.object({
1306
+ name: e.string(),
1307
+ version: e.string()
1308
+ }), E = e.object({
1309
+ name: e.string(),
1310
+ value: e.string().optional()
1311
+ }), D = e.object({
1312
+ name: e.string().max(255),
1313
+ code: e.string().max(1e5),
1314
+ supported_triggers: e.array(w).optional(),
1315
+ runtime: e.string().max(50).optional(),
1316
+ dependencies: e.array(T).optional(),
1317
+ secrets: e.array(E).optional(),
1318
+ is_system: e.boolean().optional(),
1319
+ inherit: e.boolean().optional()
1320
+ });
1321
+ D.partial().extend({
1322
+ status: e.enum(["draft", "built"]).optional(),
1323
+ deployed_at: e.string().optional()
1324
+ }), D.extend({
1325
+ id: e.string(),
1326
+ tenant_id: e.string(),
1327
+ status: e.enum(["draft", "built"]).default("built"),
1328
+ deployed_at: e.string().optional(),
1329
+ secrets: e.array(e.object({
1330
+ name: e.string(),
1331
+ value: e.string().optional()
1332
+ })).optional()
1333
+ }).extend(C.shape);
1334
+ var O = e.string(), k = e.enum([
1335
+ "unspecified",
1336
+ "pending",
1337
+ "final",
1338
+ "partial",
1339
+ "canceled",
1340
+ "suspended"
1341
+ ]), ee = e.object({
1342
+ id: e.string(),
1343
+ msg: e.string(),
1344
+ url: e.string().optional()
1345
+ }), te = e.object({
1346
+ action_name: e.string(),
1347
+ error: ee.nullable(),
1348
+ started_at: e.string(),
1349
+ ended_at: e.string()
1350
+ }), ne = e.object({
1351
+ level: e.enum([
1352
+ "log",
1353
+ "info",
1354
+ "warn",
1355
+ "error",
1356
+ "debug"
1357
+ ]),
1358
+ message: e.string()
1359
+ }), re = e.array(e.object({
1360
+ action_name: e.string(),
1361
+ lines: e.array(ne)
1362
+ }));
1363
+ e.object({
1364
+ id: e.string(),
1365
+ tenant_id: e.string(),
1366
+ trigger_id: O,
1367
+ status: k,
1368
+ results: e.array(te),
1369
+ logs: re.optional(),
1370
+ created_at: e.string(),
1371
+ updated_at: e.string()
1372
+ }).omit({
1373
+ tenant_id: !0,
1374
+ created_at: !0,
1375
+ updated_at: !0
1376
+ }), e.object({
1377
+ action_id: e.string(),
1378
+ code: e.string().max(1e5),
1379
+ runtime: e.string().max(50).optional(),
1380
+ dependencies: e.array(T).optional(),
1381
+ secrets: e.array(E).optional(),
1382
+ supported_triggers: e.array(w).optional(),
1383
+ deployed: e.boolean().default(!0)
1384
+ }).extend({
1385
+ id: e.string(),
1386
+ tenant_id: e.string(),
1387
+ number: e.number().int()
1388
+ }).extend(C.shape);
1389
+ var ie = e.enum([
1390
+ "user_action",
1391
+ "admin_action",
1392
+ "system",
1393
+ "api"
1394
+ ]), ae = e.object({
1395
+ type: e.enum([
1396
+ "user",
1397
+ "admin",
1398
+ "system",
1399
+ "api_key",
1400
+ "client_credentials"
1401
+ ]),
1402
+ id: e.string().optional(),
1403
+ email: e.string().optional(),
1404
+ org_id: e.string().optional(),
1405
+ org_name: e.string().optional(),
1406
+ scopes: e.array(e.string()).optional(),
1407
+ client_id: e.string().optional()
1408
+ }), oe = e.object({
1409
+ type: e.string(),
1410
+ id: e.string(),
1411
+ before: e.record(e.string(), e.unknown()).optional(),
1412
+ after: e.record(e.string(), e.unknown()).optional(),
1413
+ diff: e.record(e.string(), e.object({
1414
+ old: e.unknown(),
1415
+ new: e.unknown()
1416
+ })).optional()
1417
+ }), se = e.object({
1418
+ method: e.string(),
1419
+ path: e.string(),
1420
+ query: e.record(e.string(), e.string()).optional(),
1421
+ body: e.unknown().optional(),
1422
+ ip: e.string(),
1423
+ user_agent: e.string().optional(),
1424
+ correlation_id: e.string().optional()
1425
+ }), ce = e.object({
1426
+ status_code: e.number(),
1427
+ body: e.unknown().optional()
1428
+ }), le = e.object({
1429
+ country_code: e.string(),
1430
+ city_name: e.string(),
1431
+ latitude: e.string(),
1432
+ longitude: e.string(),
1433
+ time_zone: e.string(),
1434
+ continent_code: e.string()
1435
+ }), ue = e.object({
1436
+ name: e.string(),
1437
+ version: e.string(),
1438
+ env: e.record(e.string(), e.string()).optional()
1439
+ });
1440
+ e.object({
1441
+ tenant_id: e.string(),
1442
+ event_type: e.string(),
1443
+ log_type: e.string(),
1444
+ description: e.string().optional(),
1445
+ category: ie,
1446
+ actor: ae,
1447
+ target: oe,
1448
+ request: se,
1449
+ response: ce.optional(),
1450
+ connection: e.string().optional(),
1451
+ connection_id: e.string().optional(),
1452
+ client_name: e.string().optional(),
1453
+ strategy: e.string().optional(),
1454
+ strategy_type: e.string().optional(),
1455
+ audience: e.string().optional(),
1456
+ scope: e.string().optional(),
1457
+ location: le.optional(),
1458
+ auth0_client: ue.optional(),
1459
+ hostname: e.string(),
1460
+ is_mobile: e.boolean().optional(),
1461
+ timestamp: e.string()
1462
+ }).extend({ id: e.string() }), e.enum([
1463
+ "AUTH0",
1464
+ "EMAIL",
1465
+ "REDIRECT"
1466
+ ]), e.enum([
1467
+ "CREATE_USER",
1468
+ "GET_USER",
1469
+ "UPDATE_USER",
1470
+ "SEND_REQUEST",
1471
+ "SEND_EMAIL"
1472
+ ]), e.enum(["VERIFY_EMAIL"]);
1473
+ var de = e.object({
1474
+ require_mx_record: e.boolean().optional(),
1475
+ block_aliases: e.boolean().optional(),
1476
+ block_free_emails: e.boolean().optional(),
1477
+ block_disposable_emails: e.boolean().optional(),
1478
+ blocklist: e.array(e.string()).optional(),
1479
+ allowlist: e.array(e.string()).optional()
1480
+ }), fe = e.object({
1481
+ id: e.string(),
1482
+ alias: e.string().max(100).optional(),
1483
+ type: e.literal("AUTH0"),
1484
+ action: e.literal("UPDATE_USER"),
1485
+ allow_failure: e.boolean().optional(),
1486
+ mask_output: e.boolean().optional(),
1487
+ params: e.object({
1488
+ connection_id: e.string().optional(),
1489
+ user_id: e.string(),
1490
+ changes: e.record(e.string(), e.any())
1491
+ })
1492
+ }), pe = e.object({
1493
+ id: e.string(),
1494
+ alias: e.string().max(100).optional(),
1495
+ type: e.literal("EMAIL"),
1496
+ action: e.literal("VERIFY_EMAIL"),
1497
+ allow_failure: e.boolean().optional(),
1498
+ mask_output: e.boolean().optional(),
1499
+ params: e.object({
1500
+ email: e.string(),
1501
+ rules: de.optional()
1502
+ })
1503
+ }), me = e.enum([
1504
+ "change-email",
1505
+ "account",
1506
+ "custom"
1507
+ ]), he = e.object({
1508
+ id: e.string(),
1509
+ alias: e.string().max(100).optional(),
1510
+ type: e.literal("REDIRECT"),
1511
+ action: e.literal("REDIRECT_USER"),
1512
+ allow_failure: e.boolean().optional(),
1513
+ mask_output: e.boolean().optional(),
1514
+ params: e.object({
1515
+ target: me.openapi({ description: "The predefined target to redirect to, or 'custom' for a custom URL" }),
1516
+ custom_url: e.string().optional().openapi({ description: "Custom URL to redirect to when target is 'custom'" })
1517
+ })
1518
+ }), ge = e.union([
1519
+ fe,
1520
+ pe,
1521
+ he
1522
+ ]);
1523
+ e.object({
1524
+ name: e.string().min(1).max(150).openapi({ description: "The name of the flow" }),
1525
+ actions: e.array(ge).optional().default([]).openapi({ description: "The list of actions to execute in sequence" })
1526
+ }).extend(C.shape).extend({ id: e.string().openapi({
1527
+ description: "Unique identifier for the flow",
1528
+ example: "af_12tMpdJ3iek7svMyZkSh5M"
1529
+ }) }), e.object({
1530
+ page: e.string().min(0).optional().default("0").transform((e) => parseInt(e, 10)).openapi({ description: "The page number where 0 is the first page" }),
1531
+ per_page: e.string().min(1).optional().default("10").transform((e) => parseInt(e, 10)).openapi({ description: "The number of items per page" }),
1532
+ include_totals: e.string().optional().default("false").transform((e) => e === "true").openapi({ description: "If the total number of items should be included in the response" }),
1533
+ sort: e.string().regex(/^.+:(-1|1)$/).optional().openapi({ description: "A property that should have the format 'string:-1' or 'string:1'" }),
1534
+ q: e.string().optional().openapi({ description: "A lucene query string used to filter the results" })
1535
+ }), e.object({
1536
+ start: e.number(),
1537
+ limit: e.number(),
1538
+ length: e.number(),
1539
+ total: e.number().optional(),
1540
+ next: e.string().optional()
1541
+ });
1542
+ var _e = e.object({
1543
+ email: e.string().optional(),
1544
+ email_verified: e.boolean().optional(),
1545
+ name: e.string().optional(),
1546
+ username: e.string().optional(),
1547
+ given_name: e.string().optional(),
1548
+ phone_number: e.string().optional(),
1549
+ phone_verified: e.boolean().optional(),
1550
+ family_name: e.string().optional()
1551
+ }).catchall(e.any()), ve = e.object({
1552
+ connection: e.string(),
1553
+ user_id: e.string(),
1554
+ provider: e.string(),
1555
+ isSocial: e.boolean(),
1556
+ email: e.string().optional(),
1557
+ email_verified: e.boolean().optional(),
1558
+ phone_number: e.string().optional(),
1559
+ phone_verified: e.boolean().optional(),
1560
+ username: e.string().optional(),
1561
+ access_token: e.string().optional(),
1562
+ access_token_secret: e.string().optional(),
1563
+ refresh_token: e.string().optional(),
1564
+ profileData: _e.optional()
1565
+ }), ye = e.object({
1566
+ formatted: e.string().optional(),
1567
+ street_address: e.string().optional(),
1568
+ locality: e.string().optional(),
1569
+ region: e.string().optional(),
1570
+ postal_code: e.string().optional(),
1571
+ country: e.string().optional()
1572
+ }).optional(), A = e.object({
1573
+ email: e.string().transform((e) => e.toLowerCase()).optional(),
1574
+ username: e.string().refine((e) => !e.includes("@"), { message: "Usernames must not contain \"@\". Use the email field for email addresses." }).optional(),
1575
+ phone_number: e.string().optional(),
1576
+ phone_verified: e.boolean().optional(),
1577
+ given_name: e.string().optional(),
1578
+ family_name: e.string().optional(),
1579
+ nickname: e.string().optional(),
1580
+ name: e.string().optional(),
1581
+ picture: e.string().optional(),
1582
+ locale: e.string().optional(),
1583
+ linked_to: e.string().optional(),
1584
+ profileData: e.string().optional(),
1585
+ user_id: e.string().optional(),
1586
+ app_metadata: e.any().default({}).optional(),
1587
+ user_metadata: e.any().default({}).optional(),
1588
+ middle_name: e.string().optional(),
1589
+ preferred_username: e.string().optional(),
1590
+ profile: e.string().optional(),
1591
+ website: e.string().optional(),
1592
+ gender: e.string().optional(),
1593
+ birthdate: e.string().optional(),
1594
+ zoneinfo: e.string().optional(),
1595
+ address: ye
1596
+ });
1597
+ A.extend({
1598
+ email_verified: e.boolean().default(!1),
1599
+ verify_email: e.boolean().optional(),
1600
+ last_ip: e.string().optional(),
1601
+ last_login: e.string().optional(),
1602
+ user_id: e.string().optional(),
1603
+ provider: e.string().optional(),
1604
+ connection: e.string(),
1605
+ is_social: e.boolean().optional(),
1606
+ registration_completed_at: e.string().optional(),
1607
+ password: e.object({
1608
+ hash: e.string(),
1609
+ algorithm: e.string()
1610
+ }).optional()
1611
+ }).omit({ password: !0 }).extend(C.shape).extend({
1612
+ user_id: e.string(),
1613
+ provider: e.string(),
1614
+ is_social: e.boolean(),
1615
+ email: e.string().optional(),
1616
+ login_count: e.number().default(0),
1617
+ identities: e.array(ve).optional()
1618
+ }).omit({ registration_completed_at: !0 }), A.extend({
1619
+ login_count: e.number(),
1620
+ multifactor: e.array(e.string()).optional(),
1621
+ last_ip: e.string().optional(),
1622
+ last_login: e.string().optional(),
1623
+ user_id: e.string()
1624
+ }).catchall(e.any());
1625
+ var be = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", xe = (e = 21) => {
1626
+ let t = "", n = crypto.getRandomValues(new Uint8Array(e |= 0));
1627
+ for (; e--;) t += be[n[e] & 63];
1628
+ return t;
1629
+ }, Se = e.object({
1630
+ client_id: e.string().optional().openapi({ description: "ID of this client. Generated server-side if omitted (Auth0 behavior)." }),
1631
+ name: e.string().min(1).openapi({ description: "Name of this client (min length: 1 character, does not allow < or >)." }),
1632
+ description: e.string().max(140).optional().openapi({ description: "Free text description of this client (max length: 140 characters)." }),
1633
+ 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)." }),
1634
+ client_secret: e.string().default(() => xe()).optional().openapi({ description: "Client secret (which you must not make public)." }),
1635
+ app_type: e.enum([
1636
+ "native",
1637
+ "spa",
1638
+ "regular_web",
1639
+ "non_interactive",
1640
+ "resource_server",
1641
+ "express_configuration",
1642
+ "rms",
1643
+ "box",
1644
+ "cloudbees",
1645
+ "concur",
1646
+ "dropbox",
1647
+ "mscrm",
1648
+ "echosign",
1649
+ "egnyte",
1650
+ "newrelic",
1651
+ "office365",
1652
+ "salesforce",
1653
+ "sentry",
1654
+ "sharepoint",
1655
+ "slack",
1656
+ "springcm",
1657
+ "zendesk",
1658
+ "zoom",
1659
+ "sso_integration",
1660
+ "oag"
1661
+ ]).default("regular_web").optional().openapi({ description: "The type of application this client represents" }),
1662
+ logo_uri: e.string().url().optional().openapi({ description: "URL of the logo to display for this client. Recommended size is 150x150 pixels." }),
1663
+ is_first_party: e.boolean().default(!0).openapi({ description: "Whether this client is a first party client (true) or not (false). First-party clients skip the consent screen; third-party clients require explicit user consent for non-basic scopes." }),
1664
+ oidc_conformant: e.boolean().default(!0).openapi({ description: "Whether this client conforms to strict OIDC specifications (true) or uses legacy features (false)." }),
1665
+ auth0_conformant: e.boolean().default(!0).openapi({ description: "Whether this client follows Auth0-compatible behavior (true) or strict OIDC behavior (false). When true, profile/email claims are included in the ID token when scopes are requested. When false, these claims are only available from the userinfo endpoint (strict OIDC 5.4 compliance)." }),
1666
+ callbacks: e.array(e.string()).default([]).optional().openapi({ description: "Comma-separated list of URLs whitelisted for Auth0 to use as a callback to the client after authentication." }),
1667
+ allowed_origins: e.array(e.string()).default([]).optional().openapi({ description: "Comma-separated list of URLs allowed to make requests from JavaScript to Auth0 API (typically used with CORS). By default, all your callback URLs will be allowed. This field allows you to enter other origins if necessary. You can also use wildcards at the subdomain level (e.g., https://*.contoso.com). Query strings and hash information are not taken into account when validating these URLs." }),
1668
+ web_origins: e.array(e.string()).default([]).optional().openapi({ description: "Comma-separated list of allowed origins for use with Cross-Origin Authentication, Device Flow, and web message response mode." }),
1669
+ client_aliases: e.array(e.string()).default([]).optional().openapi({ description: "List of audiences/realms for SAML protocol. Used by the wsfed addon." }),
1670
+ allowed_clients: e.array(e.string()).default([]).optional().openapi({ description: "List of allow clients and API ids that are allowed to make delegation requests. Empty means all all your clients are allowed." }),
1671
+ connections: e.array(e.string()).default([]).optional().openapi({ description: "List of connection IDs enabled for this client. The order determines the display order on the login page." }),
1672
+ allowed_logout_urls: e.array(e.string()).default([]).optional().openapi({ description: "Comma-separated list of URLs that are valid to redirect to after logout from Auth0. Wildcards are allowed for subdomains." }),
1673
+ session_transfer: e.record(e.string(), e.any()).default({}).optional().openapi({ description: "Native to Web SSO Configuration" }),
1674
+ oidc_logout: e.object({
1675
+ backchannel_logout_urls: e.array(e.string()).optional().openapi({ description: "URLs that receive a signed OIDC Back-Channel Logout 1.0 logout token when a session this client participated in ends." }),
1676
+ backchannel_logout_initiators: e.object({
1677
+ mode: e.enum(["all", "custom"]).optional().openapi({ description: "Whether all session-end events initiate a backchannel logout (all) or only the selected_initiators (custom)." }),
1678
+ selected_initiators: e.array(e.string()).optional().openapi({ description: "Logout initiators that trigger a backchannel logout when mode is custom (e.g. rp-logout, idp-logout, password-changed)." })
1679
+ }).passthrough().optional().openapi({ description: "Controls which session-end events initiate backchannel logout notifications. Stored for Auth0 compatibility; not yet enforced — all initiators currently notify." })
1680
+ }).passthrough().default({}).optional().openapi({ description: "Configuration for OIDC backchannel logout" }),
1681
+ grant_types: e.array(e.string()).default([]).optional().openapi({ description: "List of grant types supported for this application. Can include authorization_code, implicit, refresh_token, client_credentials, password, http://auth0.com/oauth/grant-type/password-realm, http://auth0.com/oauth/grant-type/mfa-oob, http://auth0.com/oauth/grant-type/mfa-otp, http://auth0.com/oauth/grant-type/mfa-recovery-code, urn:openid:params:grant-type:ciba, and urn:ietf:params:oauth:grant-type:device_code." }),
1682
+ jwt_configuration: e.record(e.string(), e.any()).default({}).optional().openapi({ description: "Configuration related to JWTs for the client." }),
1683
+ signing_keys: e.array(e.record(e.string(), e.any())).default([]).optional().openapi({ description: "Signing certificates associated with this client." }),
1684
+ encryption_key: e.record(e.string(), e.any()).default({}).optional().openapi({ description: "Encryption used for WsFed responses with this client." }),
1685
+ sso: e.boolean().default(!1).openapi({ description: "Applies only to SSO clients and determines whether Auth0 will handle Single Sign On (true) or whether the Identity Provider will (false)." }),
1686
+ sso_disabled: e.boolean().default(!1).openapi({ description: "Whether Single Sign On is disabled for this client. When true, existing SSO sessions will not be reused and users must authenticate every time." }),
1687
+ cross_origin_authentication: e.boolean().default(!1).openapi({ description: "Whether this client can be used to make cross-origin authentication requests (true) or it is not allowed to make such requests (false)." }),
1688
+ cross_origin_loc: e.string().url().optional().openapi({ description: "URL of the location in your site where the cross origin verification takes place for the cross-origin auth flow when performing Auth in your own domain instead of Auth0 hosted login page." }),
1689
+ custom_login_page_on: e.boolean().default(!1).openapi({ description: "Whether a custom login page is to be used (true) or the default provided login page (false)." }),
1690
+ custom_login_page: e.string().optional().openapi({ description: "The content (HTML, CSS, JS) of the custom login page." }),
1691
+ custom_login_page_preview: e.string().optional().openapi({ description: "The content (HTML, CSS, JS) of the custom login page. (Used on Previews)" }),
1692
+ form_template: e.string().optional().openapi({ description: "HTML form template to be used for WS-Federation." }),
1693
+ addons: e.record(e.string(), e.any()).default({}).optional().openapi({ description: "Addons enabled for this client and their associated configurations." }),
1694
+ token_endpoint_auth_method: e.enum([
1695
+ "none",
1696
+ "client_secret_post",
1697
+ "client_secret_basic",
1698
+ "client_secret_jwt",
1699
+ "private_key_jwt"
1700
+ ]).default("client_secret_basic").optional().openapi({ description: "Defines the requested authentication method for the token endpoint. `none` (public client), `client_secret_post` / `client_secret_basic` (HTTP POST / Basic), `client_secret_jwt` (RFC 7523 HMAC assertion using client_secret), or `private_key_jwt` (RFC 7523 asymmetric assertion verified against the client's `jwks` / `jwks_uri`)." }),
1701
+ client_metadata: e.record(e.string(), e.string().max(255)).default({}).optional().openapi({ description: "Metadata associated with the client, in the form of an object with string values (max 255 chars). Maximum of 10 metadata properties allowed. Field names (max 255 chars) are alphanumeric and may only include the following special characters: :,-+=_*?\"/()<>@ [Tab][Space]" }),
1702
+ hide_sign_up_disabled_error: e.boolean().default(!1).optional().openapi({ description: "Enumeration-safe variant of the connection-level `disable_signup` flag. When a signup is blocked by the password connection and this is true, the identifier screen does not reveal that an email is unknown — it advances to the OTP/password challenge as if the account existed and fails at credential check. Mitigates email enumeration at the cost of UX: users without an account see a generic credential failure instead of an explicit signup-disabled message." }),
1703
+ mobile: e.record(e.string(), e.any()).default({}).optional().openapi({ description: "Additional configuration for native mobile apps." }),
1704
+ initiate_login_uri: e.string().url().optional().openapi({ description: "Initiate login uri, must be https" }),
1705
+ native_social_login: e.record(e.string(), e.any()).default({}).optional(),
1706
+ refresh_token: e.object({
1707
+ rotation_type: e.enum(["rotating", "non-rotating"]).optional().openapi({ description: "Whether refresh tokens for this client are rotated on every exchange (Auth0 'rotating' behavior) or kept stable (legacy non-rotating). Defaults to 'non-rotating' when unset." }),
1708
+ leeway: e.number().int().min(0).max(600).optional().openapi({ description: "Seconds after a parent token's first rotation during which presenting it again still mints a fresh sibling child instead of triggering reuse-detection. Defaults to 30s when unset." }),
1709
+ expiration_type: e.enum(["expiring", "non-expiring"]).optional().openapi({ description: "Auth0-compatible: whether refresh tokens expire." }),
1710
+ token_lifetime: e.number().int().min(0).optional().openapi({ description: "Auth0-compatible: refresh-token absolute lifetime in seconds." }),
1711
+ infinite_token_lifetime: e.boolean().optional().openapi({ description: "Auth0-compatible: when true, refresh tokens have no absolute expiry." }),
1712
+ idle_token_lifetime: e.number().int().min(0).optional().openapi({ description: "Auth0-compatible: refresh-token idle (sliding) lifetime in seconds." }),
1713
+ infinite_idle_token_lifetime: e.boolean().optional().openapi({ description: "Auth0-compatible: when true, refresh tokens have no idle expiry." })
1714
+ }).default({}).optional().openapi({ description: "Refresh token configuration" }),
1715
+ default_organization: e.record(e.string(), e.any()).default({}).optional().openapi({ description: "Defines the default Organization ID and flows" }),
1716
+ organization_usage: e.enum([
1717
+ "deny",
1718
+ "allow",
1719
+ "require"
1720
+ ]).default("deny").optional().openapi({ description: "Defines how to proceed during an authentication transaction with regards an organization. Can be deny (default), allow or require." }),
1721
+ organization_require_behavior: e.enum([
1722
+ "no_prompt",
1723
+ "pre_login_prompt",
1724
+ "post_login_prompt"
1725
+ ]).default("no_prompt").optional().openapi({ description: "Defines how to proceed during an authentication transaction when client.organization_usage: 'require'. Can be no_prompt (default), pre_login_prompt or post_login_prompt. post_login_prompt requires oidc_conformant: true." }),
1726
+ client_authentication_methods: e.record(e.string(), e.any()).default({}).optional().openapi({ description: "Defines client authentication methods." }),
1727
+ require_pushed_authorization_requests: e.boolean().default(!1).openapi({ description: "Makes the use of Pushed Authorization Requests mandatory for this client" }),
1728
+ require_proof_of_possession: e.boolean().default(!1).openapi({ description: "Makes the use of Proof-of-Possession mandatory for this client" }),
1729
+ signed_request_object: e.record(e.string(), e.any()).default({}).optional().openapi({ description: "JWT-secured Authorization Requests (JAR) settings." }),
1730
+ compliance_level: e.enum([
1731
+ "none",
1732
+ "fapi1_adv_pkj_par",
1733
+ "fapi1_adv_mtls_par",
1734
+ "fapi2_sp_pkj_mtls",
1735
+ "fapi2_sp_mtls_mtls"
1736
+ ]).optional().openapi({ description: "Defines the compliance level for this client, which may restrict it's capabilities" }),
1737
+ par_request_expiry: e.number().optional().openapi({ description: "Specifies how long, in seconds, a Pushed Authorization Request URI remains valid" }),
1738
+ token_quota: e.record(e.string(), e.any()).default({}).optional(),
1739
+ owner_user_id: e.string().optional().openapi({ description: "User ID of the consenting user when this client was created via IAT-gated Dynamic Client Registration. NULL for clients created via the Management API or open DCR." }),
1740
+ registration_type: e.enum([
1741
+ "manual",
1742
+ "open_dcr",
1743
+ "iat_dcr"
1744
+ ]).optional().openapi({ description: "Provenance of this client. `manual` = Management API; `open_dcr` = RFC 7591 without IAT; `iat_dcr` = RFC 7591 with an Initial Access Token." }),
1745
+ registration_metadata: e.record(e.string(), e.any()).default({}).optional().openapi({ description: "Arbitrary metadata captured at Dynamic Client Registration time that isn't a first-class client field (e.g. integration_type, domain). Also stores `iat_constraints` for clients created via IAT so RFC 7592 PUT can enforce field immutability." }),
1746
+ user_linking_mode: e.enum(["builtin", "off"]).optional().openapi({ description: "Per-client override for the built-in email-based user-linking path. `builtin` runs the legacy in-process linking at user creation/email update. `off` disables the legacy path; linking only happens if the tenant has enabled the `account-linking` template hook. When unset, the service-level `userLinkingMode` default applies." })
1747
+ });
1748
+ e.object({
1749
+ created_at: e.string(),
1750
+ updated_at: e.string()
1751
+ }).extend(Se.shape).extend({ client_id: e.string() });
1752
+ var Ce = e.object({
1753
+ client_id: e.string().min(1).openapi({ description: "ID of the client." }),
1754
+ audience: e.string().min(1).openapi({ description: "The audience (API identifier) of this client grant." }),
1755
+ scope: e.array(e.string()).optional().openapi({ description: "Scopes allowed for this client grant." }),
1756
+ organization_usage: e.enum([
1757
+ "deny",
1758
+ "allow",
1759
+ "require"
1760
+ ]).optional().openapi({ description: "Defines whether organizations can be used with client credentials exchanges for this grant." }),
1761
+ allow_any_organization: e.boolean().optional().openapi({ description: "If enabled, any organization can be used with this grant. If disabled (default), the grant must be explicitly assigned to the desired organizations." }),
1762
+ 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." }),
1763
+ 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." }),
1764
+ 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." })
1765
+ }), we = e.object({ id: e.string().openapi({ description: "ID of the client grant." }) }).extend(Ce.shape).extend({
1766
+ created_at: e.string().optional(),
1767
+ updated_at: e.string().optional()
1768
+ });
1769
+ e.array(we);
1770
+ var Te = e.enum(["iat", "rat"]), Ee = e.object({
1771
+ id: e.string(),
1772
+ token_hash: e.string(),
1773
+ type: Te,
1774
+ client_id: e.string().optional(),
1775
+ sub: e.string().optional(),
1776
+ constraints: e.record(e.string(), e.unknown()).optional(),
1777
+ single_use: e.boolean().default(!1),
1778
+ expires_at: e.string().optional()
1779
+ });
1780
+ e.object({
1781
+ created_at: e.string(),
1782
+ used_at: e.string().optional(),
1783
+ revoked_at: e.string().optional()
1784
+ }).extend(Ee.shape);
1785
+ var j = e.object({
1786
+ x: e.number(),
1787
+ y: e.number()
1788
+ }), De = /* @__PURE__ */ function(e) {
1789
+ 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;
1790
+ }({}), Oe = /* @__PURE__ */ function(e) {
1791
+ return e.BLOCK = "BLOCK", e.FIELD = "FIELD", e;
1792
+ }({}), M = e.object({
1793
+ id: e.string(),
1794
+ category: e.nativeEnum(Oe),
1795
+ type: e.nativeEnum(De)
1796
+ }), ke = M.extend({
1797
+ category: e.literal("BLOCK"),
1798
+ type: e.literal("RICH_TEXT"),
1799
+ config: e.object({ content: e.string() }).passthrough()
1800
+ }), Ae = M.extend({
1801
+ category: e.literal("BLOCK"),
1802
+ type: e.union([
1803
+ e.literal("NEXT_BUTTON"),
1804
+ e.literal("BACK_BUTTON"),
1805
+ e.literal("SUBMIT_BUTTON")
1806
+ ]),
1807
+ config: e.object({ text: e.string() }).passthrough()
1808
+ }), je = M.extend({
1809
+ category: e.literal("FIELD"),
1810
+ type: e.literal("LEGAL"),
1811
+ required: e.boolean().optional(),
1812
+ sensitive: e.boolean().optional(),
1813
+ config: e.object({ text: e.string() }).passthrough()
1814
+ }), Me = M.extend({
1815
+ category: e.literal("FIELD"),
1816
+ type: e.union([
1817
+ e.literal("TEXT"),
1818
+ e.literal("EMAIL"),
1819
+ e.literal("PASSWORD"),
1820
+ e.literal("NUMBER"),
1821
+ e.literal("PHONE"),
1822
+ e.literal("DATE"),
1823
+ e.literal("CHECKBOX"),
1824
+ e.literal("RADIO"),
1825
+ e.literal("SELECT"),
1826
+ e.literal("HIDDEN")
1827
+ ]),
1828
+ required: e.boolean().optional(),
1829
+ sensitive: e.boolean().optional(),
1830
+ config: e.object({
1831
+ label: e.string().optional(),
1832
+ placeholder: e.string().optional()
1833
+ }).passthrough()
1834
+ }), Ne = e.object({
1835
+ id: e.string(),
1836
+ category: e.string(),
1837
+ type: e.string()
1838
+ }).passthrough(), Pe = e.union([
1839
+ ke,
1840
+ Ae,
1841
+ je,
1842
+ Me,
1843
+ Ne
1844
+ ]), Fe = e.object({
1845
+ id: e.string(),
1846
+ type: e.literal("STEP"),
1847
+ coordinates: j,
1848
+ alias: e.string().optional(),
1849
+ config: e.object({
1850
+ components: e.array(Pe),
1851
+ next_node: e.string()
1852
+ }).passthrough()
1853
+ }), Ie = e.object({
1854
+ id: e.string(),
1855
+ type: e.literal("FLOW"),
1856
+ coordinates: j,
1857
+ alias: e.string().optional(),
1858
+ config: e.object({
1859
+ flow_id: e.string(),
1860
+ next_node: e.string()
1861
+ })
1862
+ }), Le = e.object({
1863
+ id: e.string(),
1864
+ type: e.literal("ACTION"),
1865
+ coordinates: j,
1866
+ alias: e.string().optional(),
1867
+ config: e.object({
1868
+ action_type: e.enum(["REDIRECT"]).openapi({ description: "The type of action to perform" }),
1869
+ target: e.enum([
1870
+ "change-email",
1871
+ "account",
1872
+ "custom"
1873
+ ]).openapi({ description: "The predefined target to redirect to" }),
1874
+ custom_url: e.string().optional().openapi({ description: "Custom URL when target is 'custom'" }),
1875
+ next_node: e.string().openapi({ description: "The next node to navigate to after action (for non-redirect actions)" })
1876
+ }).passthrough()
1877
+ }), Re = e.object({
1878
+ id: e.string(),
1879
+ type: e.string(),
1880
+ coordinates: j
1881
+ }).passthrough(), ze = e.union([
1882
+ Fe,
1883
+ Ie,
1884
+ Le,
1885
+ Re
1886
+ ]), Be = e.object({
1887
+ next_node: e.string(),
1888
+ coordinates: j
1889
+ }).passthrough(), Ve = e.object({
1890
+ resume_flow: e.boolean().optional(),
1891
+ coordinates: j
1892
+ }).passthrough();
1893
+ e.object({
1894
+ id: e.string(),
1895
+ name: e.string(),
1896
+ languages: e.object({ primary: e.string() }).passthrough(),
1897
+ nodes: e.array(ze),
1898
+ start: Be,
1899
+ ending: Ve,
1900
+ created_at: e.string(),
1901
+ updated_at: e.string(),
1902
+ links: e.object({
1903
+ sdkSrc: e.string().optional(),
1904
+ sdk_src: e.string().optional()
1905
+ }).passthrough()
1906
+ }).passthrough().omit({
1907
+ id: !0,
1908
+ created_at: !0,
1909
+ updated_at: !0
1910
+ });
1911
+ var He = /* @__PURE__ */ function(e) {
1912
+ 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;
1913
+ }({}), Ue = /* @__PURE__ */ function(e) {
1914
+ return e.QUERY = "query", e.FRAGMENT = "fragment", e.FORM_POST = "form_post", e.WEB_MESSAGE = "web_message", e.SAML_POST = "saml_post", e;
1915
+ }({}), We = /* @__PURE__ */ function(e) {
1916
+ return e.S256 = "S256", e.Plain = "plain", e;
1917
+ }({}), N = e.union([e.null(), e.object({
1918
+ essential: e.boolean().optional(),
1919
+ value: e.unknown().optional(),
1920
+ values: e.array(e.unknown()).optional()
1921
+ })]).nullable(), Ge = e.object({
1922
+ userinfo: e.record(e.string(), N).optional(),
1923
+ id_token: e.record(e.string(), N).optional()
1924
+ }), Ke = e.object({
1925
+ client_id: e.string(),
1926
+ act_as: e.string().optional(),
1927
+ response_type: e.nativeEnum(He).optional(),
1928
+ response_mode: e.nativeEnum(Ue).optional(),
1929
+ redirect_uri: e.string().optional(),
1930
+ audience: e.string().optional(),
1931
+ organization: e.string().optional(),
1932
+ state: e.string().optional(),
1933
+ nonce: e.string().optional(),
1934
+ scope: e.string().optional(),
1935
+ prompt: e.string().optional(),
1936
+ code_challenge_method: e.nativeEnum(We).optional(),
1937
+ code_challenge: e.string().optional(),
1938
+ username: e.string().optional(),
1939
+ ui_locales: e.string().optional(),
1940
+ max_age: e.number().optional(),
1941
+ acr_values: e.string().optional(),
1942
+ claims: Ge.optional(),
1943
+ vendor_id: e.string().optional()
1944
+ });
1945
+ e.object({
1946
+ colors: e.object({
1947
+ primary: e.string(),
1948
+ page_background: e.union([e.string(), e.object({
1949
+ type: e.string().optional(),
1950
+ start: e.string().optional(),
1951
+ end: e.string().optional(),
1952
+ angle_deg: e.number().optional()
1953
+ })]).optional()
1954
+ }).optional(),
1955
+ logo_url: e.string().optional(),
1956
+ favicon_url: e.string().optional(),
1957
+ powered_by_logo_url: e.string().optional(),
1958
+ font: e.object({ url: e.string() }).optional(),
1959
+ dark_mode: e.enum([
1960
+ "dark",
1961
+ "light",
1962
+ "auto"
1963
+ ]).optional()
1964
+ });
1965
+ var qe = e.enum([
1966
+ "password_reset",
1967
+ "email_verification",
1968
+ "otp",
1969
+ "mfa_otp",
1970
+ "authorization_code",
1971
+ "oauth2_state",
1972
+ "ticket"
1973
+ ]);
1974
+ e.object({
1975
+ code_id: e.string().openapi({ description: "The code that will be used in for instance an email verification flow" }),
1976
+ login_id: e.string().openapi({ description: "The id of the login session that the code is connected to" }),
1977
+ connection_id: e.string().optional().openapi({ description: "The connection that the code is connected to" }),
1978
+ code_type: qe,
1979
+ code_verifier: e.string().optional().openapi({ description: "The code verifier used in PKCE in outbound flows" }),
1980
+ code_challenge: e.string().optional().openapi({ description: "The code challenge used in PKCE in outbound flows" }),
1981
+ code_challenge_method: e.enum(["plain", "S256"]).optional().openapi({ description: "The code challenge method used in PKCE in outbound flows" }),
1982
+ redirect_uri: e.string().optional().openapi({ description: "The redirect URI associated with the code" }),
1983
+ otp: e.string().optional().openapi({ description: "The one-time password value for OTP-based flows" }),
1984
+ nonce: e.string().optional().openapi({ description: "The nonce value used for security in OIDC flows" }),
1985
+ state: e.string().optional().openapi({ description: "The state parameter used for CSRF protection in OAuth flows" }),
1986
+ expires_at: e.string(),
1987
+ used_at: e.string().optional(),
1988
+ user_id: e.string().optional()
1989
+ }).extend({ created_at: e.string() });
1990
+ var Je = e.object({
1991
+ kid: e.string().optional(),
1992
+ team_id: e.string().optional(),
1993
+ realms: e.string().optional(),
1994
+ authentication_method: e.string().optional(),
1995
+ client_id: e.string().optional(),
1996
+ client_secret: e.string().optional(),
1997
+ app_secret: e.string().optional(),
1998
+ scope: e.string().optional(),
1999
+ authorization_endpoint: e.string().optional(),
2000
+ token_endpoint: e.string().optional(),
2001
+ userinfo_endpoint: e.string().optional(),
2002
+ jwks_uri: e.string().optional(),
2003
+ discovery_url: e.string().optional(),
2004
+ issuer: e.string().optional(),
2005
+ token_endpoint_auth_method: e.enum(["client_secret_basic", "client_secret_post"]).optional(),
2006
+ provider: e.string().optional(),
2007
+ from: e.string().optional(),
2008
+ twilio_sid: e.string().optional(),
2009
+ twilio_token: e.string().optional(),
2010
+ icon_url: e.string().optional(),
2011
+ domain_aliases: e.array(e.string()).optional(),
2012
+ callback_url: e.string().url().optional(),
2013
+ passwordPolicy: e.enum([
2014
+ "none",
2015
+ "low",
2016
+ "fair",
2017
+ "good",
2018
+ "excellent"
2019
+ ]).optional(),
2020
+ password_complexity_options: e.object({ min_length: e.number().optional() }).optional(),
2021
+ password_history: e.object({
2022
+ enable: e.boolean().optional(),
2023
+ size: e.number().optional()
2024
+ }).optional(),
2025
+ password_no_personal_info: e.object({ enable: e.boolean().optional() }).optional(),
2026
+ password_dictionary: e.object({
2027
+ enable: e.boolean().optional(),
2028
+ dictionary: e.array(e.string()).optional()
2029
+ }).optional(),
2030
+ disable_signup: e.boolean().optional(),
2031
+ brute_force_protection: e.boolean().optional(),
2032
+ import_mode: e.boolean().optional(),
2033
+ configuration: e.object({
2034
+ token_endpoint: e.string().optional(),
2035
+ userinfo_endpoint: e.string().optional(),
2036
+ client_id: e.string().optional(),
2037
+ client_secret: e.string().optional(),
2038
+ realm: e.string().optional()
2039
+ }).optional(),
2040
+ attributes: e.object({
2041
+ email: e.object({
2042
+ identifier: e.object({ active: e.boolean().optional() }).optional(),
2043
+ signup: e.object({
2044
+ status: e.enum([
2045
+ "required",
2046
+ "optional",
2047
+ "disabled"
2048
+ ]).optional(),
2049
+ verification: e.object({ active: e.boolean().optional() }).optional()
2050
+ }).optional(),
2051
+ validation: e.object({ allowed: e.boolean().optional() }).optional(),
2052
+ unique: e.boolean().optional(),
2053
+ profile_required: e.boolean().optional(),
2054
+ verification_method: e.enum(["link", "code"]).optional()
2055
+ }).optional(),
2056
+ username: e.object({
2057
+ identifier: e.object({ active: e.boolean().optional() }).optional(),
2058
+ signup: e.object({ status: e.enum([
2059
+ "required",
2060
+ "optional",
2061
+ "disabled"
2062
+ ]).optional() }).optional(),
2063
+ validation: e.object({
2064
+ max_length: e.number().optional(),
2065
+ min_length: e.number().optional(),
2066
+ allowed_types: e.object({
2067
+ email: e.boolean().optional(),
2068
+ phone_number: e.boolean().optional()
2069
+ }).optional()
2070
+ }).optional(),
2071
+ profile_required: e.boolean().optional()
2072
+ }).optional(),
2073
+ phone_number: e.object({
2074
+ identifier: e.object({ active: e.boolean().optional() }).optional(),
2075
+ signup: e.object({ status: e.enum([
2076
+ "required",
2077
+ "optional",
2078
+ "disabled"
2079
+ ]).optional() }).optional()
2080
+ }).optional()
2081
+ }).optional(),
2082
+ authentication_methods: e.object({
2083
+ password: e.object({ enabled: e.boolean().optional() }).optional(),
2084
+ passkey: e.object({ enabled: e.boolean().optional() }).optional()
2085
+ }).optional(),
2086
+ passkey_options: e.object({
2087
+ challenge_ui: e.enum([
2088
+ "both",
2089
+ "autofill",
2090
+ "button"
2091
+ ]).optional(),
2092
+ local_enrollment_enabled: e.boolean().optional(),
2093
+ progressive_enrollment_enabled: e.boolean().optional()
2094
+ }).optional(),
2095
+ requires_username: e.boolean().optional(),
2096
+ validation: e.object({ username: e.object({
2097
+ min: e.number().optional(),
2098
+ max: e.number().optional()
2099
+ }).optional() }).optional(),
2100
+ set_user_root_attributes: e.enum([
2101
+ "on_each_login",
2102
+ "on_first_login",
2103
+ "never_on_login"
2104
+ ]).optional()
2105
+ });
2106
+ function P(e) {
2107
+ if (e !== null) {
2108
+ if (Array.isArray(e)) return e.filter((e) => e !== null).map(P);
2109
+ if (e && typeof e == "object") {
2110
+ let t = {};
2111
+ for (let [n, r] of Object.entries(e)) r !== null && (t[n] = P(r));
2112
+ return t;
1367
2113
  }
1368
- return n;
2114
+ return e;
1369
2115
  }
1370
- decode(e, t) {
1371
- let n = t?.strict ?? !0, r = Math.ceil(e.length / 4), i = [];
1372
- for (let t = 0; t < r; t++) {
1373
- let a = 0, o = 0;
1374
- for (let i = 0; i < 4; i++) {
1375
- let s = e[t * 4 + i];
1376
- if (s === "=") {
1377
- if (t + 1 !== r) throw Error(`Invalid character: ${s}`);
1378
- a += 1;
1379
- continue;
1380
- }
1381
- if (s === void 0) {
1382
- if (n) throw Error("Invalid data");
1383
- a += 1;
1384
- continue;
1385
- }
1386
- let c = this.decodeMap.get(s) ?? null;
1387
- if (c === null) throw Error(`Invalid character: ${s}`);
1388
- o += c << 6 * (3 - i);
2116
+ }
2117
+ var Ye = e.object({
2118
+ id: e.string().optional(),
2119
+ name: e.string(),
2120
+ display_name: e.string().optional(),
2121
+ strategy: e.string(),
2122
+ options: e.preprocess((e) => e === null ? {} : P(e), Je).default({}),
2123
+ enabled_clients: e.array(e.string()).default([]).optional(),
2124
+ response_type: e.custom().optional(),
2125
+ response_mode: e.custom().optional(),
2126
+ is_domain_connection: e.boolean().optional(),
2127
+ show_as_button: e.boolean().optional(),
2128
+ metadata: e.record(e.string(), e.any()).optional(),
2129
+ is_system: e.boolean().optional()
2130
+ });
2131
+ e.object({
2132
+ id: e.string(),
2133
+ created_at: e.string().transform((e) => e === null ? "" : e),
2134
+ updated_at: e.string().transform((e) => e === null ? "" : e)
2135
+ }).extend(Ye.shape);
2136
+ var F = e.object({
2137
+ domain: e.string(),
2138
+ custom_domain_id: e.string().optional(),
2139
+ type: e.enum(["auth0_managed_certs", "self_managed_certs"]),
2140
+ verification_method: e.enum(["txt"]).optional(),
2141
+ tls_policy: e.enum(["recommended"]).optional(),
2142
+ custom_client_ip_header: e.enum([
2143
+ "true-client-ip",
2144
+ "cf-connecting-ip",
2145
+ "x-forwarded-for",
2146
+ "x-azure-clientip",
2147
+ "null"
2148
+ ]).optional(),
2149
+ domain_metadata: e.record(e.string(), e.string().max(255)).optional()
2150
+ }), Xe = e.discriminatedUnion("name", [e.object({
2151
+ name: e.literal("txt"),
2152
+ record: e.string(),
2153
+ domain: e.string()
2154
+ }), e.object({
2155
+ name: e.literal("http"),
2156
+ http_body: e.string(),
2157
+ http_url: e.string()
2158
+ })]), Ze = F.extend({
2159
+ custom_domain_id: e.string(),
2160
+ primary: e.boolean(),
2161
+ status: e.enum([
2162
+ "disabled",
2163
+ "pending",
2164
+ "pending_verification",
2165
+ "ready"
2166
+ ]),
2167
+ origin_domain_name: e.string().optional(),
2168
+ verification: e.object({ methods: e.array(Xe) }).optional(),
2169
+ tls_policy: e.string().optional()
2170
+ });
2171
+ F.pick({
2172
+ tls_policy: !0,
2173
+ custom_client_ip_header: !0,
2174
+ domain_metadata: !0
2175
+ }).strict(), Ze.extend({ tenant_id: e.string() }), e.object({
2176
+ certificate: e.string().regex(/^-----BEGIN CERTIFICATE-----[\s\S]+-----END CERTIFICATE-----\s*$/, "must be PEM-encoded; include the full certificate chain in leaf-first order"),
2177
+ private_key: e.string().regex(/-----BEGIN (RSA |EC |ENCRYPTED )?PRIVATE KEY-----[\s\S]+-----END \1PRIVATE KEY-----\s*$/, "must be a PEM-encoded private key")
2178
+ });
2179
+ var I = e.object({
2180
+ id: e.string(),
2181
+ order: e.number().optional(),
2182
+ visible: e.boolean().optional().default(!0)
2183
+ }), L = I.extend({ category: e.literal("BLOCK").optional() }), Qe = L.extend({
2184
+ type: e.literal("DIVIDER"),
2185
+ config: e.object({ text: e.string().optional() }).optional()
2186
+ }), $e = L.extend({
2187
+ type: e.literal("HTML"),
2188
+ config: e.object({ content: e.string().optional() }).optional()
2189
+ }), et = L.extend({
2190
+ type: e.literal("IMAGE"),
2191
+ config: e.object({
2192
+ src: e.string().optional(),
2193
+ alt: e.string().optional(),
2194
+ width: e.number().optional(),
2195
+ height: e.number().optional()
2196
+ }).optional()
2197
+ }), tt = L.extend({
2198
+ type: e.literal("JUMP_BUTTON"),
2199
+ config: e.object({
2200
+ text: e.string().optional(),
2201
+ target_step: e.string().optional()
2202
+ })
2203
+ }), nt = L.extend({
2204
+ type: e.literal("RESEND_BUTTON"),
2205
+ config: e.object({
2206
+ text: e.string().optional(),
2207
+ resend_action: e.string().optional()
2208
+ })
2209
+ }), rt = L.extend({
2210
+ type: e.literal("NEXT_BUTTON"),
2211
+ config: e.object({ text: e.string().optional() })
2212
+ }), it = L.extend({
2213
+ type: e.literal("PREVIOUS_BUTTON"),
2214
+ config: e.object({ text: e.string().optional() })
2215
+ }), at = L.extend({
2216
+ type: e.literal("RICH_TEXT"),
2217
+ config: e.object({ content: e.string().optional() }).optional()
2218
+ }), R = I.extend({
2219
+ category: e.literal("WIDGET").optional(),
2220
+ label: e.string().min(1).optional(),
2221
+ hint: e.string().min(1).max(500).optional(),
2222
+ required: e.boolean().optional(),
2223
+ sensitive: e.boolean().optional()
2224
+ }), ot = R.extend({
2225
+ type: e.literal("AUTH0_VERIFIABLE_CREDENTIALS"),
2226
+ config: e.object({ credential_type: e.string().optional() })
2227
+ }), st = R.extend({
2228
+ type: e.literal("GMAPS_ADDRESS"),
2229
+ config: e.object({ api_key: e.string().optional() })
2230
+ }), ct = R.extend({
2231
+ type: e.literal("RECAPTCHA"),
2232
+ config: e.object({ site_key: e.string().optional() })
2233
+ }), z = I.extend({
2234
+ category: e.literal("FIELD").optional(),
2235
+ label: e.string().min(1).optional(),
2236
+ hint: e.string().min(1).max(500).optional(),
2237
+ messages: e.array(e.object({
2238
+ id: e.number().optional(),
2239
+ text: e.string(),
2240
+ type: e.enum([
2241
+ "info",
2242
+ "error",
2243
+ "success",
2244
+ "warning"
2245
+ ])
2246
+ })).optional(),
2247
+ required: e.boolean().optional(),
2248
+ sensitive: e.boolean().optional()
2249
+ }), lt = z.extend({
2250
+ type: e.literal("BOOLEAN"),
2251
+ config: e.object({ default_value: e.boolean().optional() }).optional()
2252
+ }), ut = z.extend({
2253
+ type: e.literal("CARDS"),
2254
+ config: e.object({
2255
+ options: e.array(e.object({
2256
+ value: e.string(),
2257
+ label: e.string(),
2258
+ description: e.string().optional(),
2259
+ image: e.string().optional()
2260
+ })).optional(),
2261
+ multi_select: e.boolean().optional()
2262
+ }).optional()
2263
+ }), dt = z.extend({
2264
+ type: e.literal("CHOICE"),
2265
+ config: e.object({
2266
+ options: e.array(e.object({
2267
+ value: e.string(),
2268
+ label: e.string()
2269
+ })).optional(),
2270
+ display: e.enum(["radio", "checkbox"]).optional(),
2271
+ multiple: e.boolean().optional(),
2272
+ default_value: e.union([e.string(), e.array(e.string())]).optional()
2273
+ }).optional()
2274
+ }), ft = z.extend({
2275
+ type: e.literal("CODE"),
2276
+ config: e.object({
2277
+ length: e.number().int().positive().max(100).optional(),
2278
+ mode: e.enum(["numeric", "alphanumeric"]).optional(),
2279
+ auto_submit: e.boolean().optional(),
2280
+ group_size: e.number().int().min(0).max(100).optional(),
2281
+ separator: e.string().optional(),
2282
+ placeholder: e.string().optional(),
2283
+ default_value: e.string().optional()
2284
+ }).refine((e) => e.group_size === void 0 || e.length === void 0 || e.group_size <= e.length, {
2285
+ message: "group_size cannot exceed length",
2286
+ path: ["group_size"]
2287
+ }).refine((e) => e.default_value === void 0 || e.length === void 0 || e.default_value.length <= e.length, {
2288
+ message: "default_value is longer than the configured length",
2289
+ path: ["default_value"]
2290
+ }).optional()
2291
+ }), pt = z.extend({
2292
+ type: e.literal("CUSTOM"),
2293
+ config: e.object({
2294
+ component: e.string().optional(),
2295
+ props: e.record(e.string(), e.any()).optional(),
2296
+ schema: e.record(e.string(), e.any()).optional(),
2297
+ code: e.string().optional()
2298
+ })
2299
+ }), mt = z.extend({
2300
+ type: e.literal("DATE"),
2301
+ config: e.object({
2302
+ format: e.string().optional(),
2303
+ min: e.string().optional(),
2304
+ max: e.string().optional(),
2305
+ default_value: e.string().optional()
2306
+ }).optional()
2307
+ }), ht = z.extend({
2308
+ type: e.literal("DROPDOWN"),
2309
+ config: e.object({
2310
+ options: e.array(e.object({
2311
+ value: e.string(),
2312
+ label: e.string()
2313
+ })).optional(),
2314
+ placeholder: e.string().optional(),
2315
+ searchable: e.boolean().optional(),
2316
+ multiple: e.boolean().optional(),
2317
+ default_value: e.union([e.string(), e.array(e.string())]).optional()
2318
+ }).optional()
2319
+ }), gt = z.extend({
2320
+ type: e.literal("EMAIL"),
2321
+ config: e.object({
2322
+ placeholder: e.string().optional(),
2323
+ default_value: e.string().optional()
2324
+ }).optional()
2325
+ }), _t = z.extend({
2326
+ type: e.literal("FILE"),
2327
+ config: e.object({
2328
+ accept: e.string().optional(),
2329
+ max_size: e.number().optional(),
2330
+ multiple: e.boolean().optional()
2331
+ }).optional()
2332
+ }), vt = z.extend({
2333
+ type: e.literal("LEGAL"),
2334
+ config: e.object({
2335
+ text: e.string(),
2336
+ html: e.boolean().optional()
2337
+ }).optional()
2338
+ }), yt = z.extend({
2339
+ type: e.literal("NUMBER"),
2340
+ config: e.object({
2341
+ placeholder: e.string().optional(),
2342
+ min: e.number().optional(),
2343
+ max: e.number().optional(),
2344
+ step: e.number().optional(),
2345
+ default_value: e.string().optional()
2346
+ }).optional()
2347
+ }), bt = z.extend({
2348
+ type: e.literal("PASSWORD"),
2349
+ config: e.object({
2350
+ placeholder: e.string().optional(),
2351
+ min_length: e.number().optional(),
2352
+ show_toggle: e.boolean().optional(),
2353
+ forgot_password_link: e.string().optional(),
2354
+ default_value: e.string().optional()
2355
+ }).optional()
2356
+ }), xt = z.extend({
2357
+ type: e.literal("PAYMENT"),
2358
+ config: e.object({
2359
+ provider: e.string().optional(),
2360
+ currency: e.string().optional()
2361
+ }).optional()
2362
+ }), St = z.extend({
2363
+ type: e.literal("SOCIAL"),
2364
+ config: e.object({
2365
+ providers: e.array(e.string()).optional(),
2366
+ provider_details: e.array(e.object({
2367
+ name: e.string(),
2368
+ strategy: e.string().optional(),
2369
+ display_name: e.string().optional(),
2370
+ icon_url: e.string().optional(),
2371
+ href: e.string().optional()
2372
+ })).optional()
2373
+ }).optional()
2374
+ }), Ct = z.extend({
2375
+ type: e.literal("TEL"),
2376
+ config: e.object({
2377
+ placeholder: e.string().optional(),
2378
+ default_country: e.string().optional(),
2379
+ default_value: e.string().optional(),
2380
+ allow_email: e.boolean().optional()
2381
+ }).optional()
2382
+ }), wt = z.extend({
2383
+ type: e.literal("TEXT"),
2384
+ config: e.object({
2385
+ placeholder: e.string().optional(),
2386
+ multiline: e.boolean().optional(),
2387
+ max_length: e.number().optional(),
2388
+ default_value: e.string().optional()
2389
+ }).optional()
2390
+ }), Tt = z.extend({
2391
+ type: e.literal("COUNTRY"),
2392
+ config: e.object({
2393
+ placeholder: e.string().optional(),
2394
+ default_value: e.string().optional()
2395
+ }).optional()
2396
+ }), Et = z.extend({
2397
+ type: e.literal("URL"),
2398
+ config: e.object({
2399
+ placeholder: e.string().optional(),
2400
+ default_value: e.string().optional()
2401
+ }).optional()
2402
+ }), Dt = e.discriminatedUnion("type", [
2403
+ Qe,
2404
+ $e,
2405
+ et,
2406
+ tt,
2407
+ nt,
2408
+ rt,
2409
+ it,
2410
+ at
2411
+ ]), Ot = e.discriminatedUnion("type", [
2412
+ ot,
2413
+ st,
2414
+ ct
2415
+ ]), kt = e.discriminatedUnion("type", [
2416
+ lt,
2417
+ ut,
2418
+ dt,
2419
+ ft,
2420
+ Tt,
2421
+ pt,
2422
+ mt,
2423
+ ht,
2424
+ gt,
2425
+ _t,
2426
+ vt,
2427
+ yt,
2428
+ bt,
2429
+ xt,
2430
+ St,
2431
+ Ct,
2432
+ wt,
2433
+ Et
2434
+ ]), B = e.union([
2435
+ Dt,
2436
+ Ot,
2437
+ kt
2438
+ ]);
2439
+ e.object({
2440
+ id: e.string(),
2441
+ type: e.literal("submit"),
2442
+ label: e.string(),
2443
+ className: e.string().optional(),
2444
+ disabled: e.boolean().optional().default(!1),
2445
+ order: e.number().optional(),
2446
+ visible: e.boolean().optional().default(!0),
2447
+ customizations: e.record(e.string(), e.any()).optional()
2448
+ });
2449
+ var V = e.object({
2450
+ x: e.number(),
2451
+ y: e.number()
2452
+ }), At = e.object({
2453
+ id: e.string(),
2454
+ type: e.literal("FLOW"),
2455
+ coordinates: V,
2456
+ alias: e.string().min(1).max(150).optional(),
2457
+ config: e.object({
2458
+ flow_id: e.string().max(30),
2459
+ next_node: e.string().optional()
2460
+ })
2461
+ }), jt = e.object({
2462
+ id: e.string(),
2463
+ type: e.literal("ROUTER"),
2464
+ coordinates: V,
2465
+ alias: e.string().min(1).max(150),
2466
+ config: e.object({
2467
+ rules: e.array(e.object({
2468
+ id: e.string(),
2469
+ alias: e.string().min(1).max(150).optional(),
2470
+ condition: e.any(),
2471
+ next_node: e.string()
2472
+ })),
2473
+ fallback: e.string()
2474
+ })
2475
+ }), Mt = e.object({
2476
+ id: e.string(),
2477
+ type: e.literal("STEP"),
2478
+ coordinates: V,
2479
+ alias: e.string().min(1).max(150).optional(),
2480
+ config: e.object({
2481
+ components: e.array(B),
2482
+ next_node: e.string().optional()
2483
+ })
2484
+ }), Nt = e.discriminatedUnion("type", [
2485
+ At,
2486
+ jt,
2487
+ Mt
2488
+ ]), Pt = e.object({
2489
+ name: e.string().openapi({ description: "The name of the form" }),
2490
+ messages: e.object({
2491
+ errors: e.record(e.string(), e.any()).optional(),
2492
+ custom: e.record(e.string(), e.any()).optional()
2493
+ }).optional(),
2494
+ languages: e.object({
2495
+ primary: e.string().optional(),
2496
+ default: e.string().optional()
2497
+ }).optional(),
2498
+ translations: e.record(e.string(), e.any()).optional(),
2499
+ nodes: e.array(Nt).optional(),
2500
+ start: e.object({
2501
+ hidden_fields: e.array(e.object({
2502
+ key: e.string(),
2503
+ value: e.string()
2504
+ })).optional(),
2505
+ next_node: e.string().optional(),
2506
+ coordinates: V.optional()
2507
+ }).optional(),
2508
+ ending: e.object({
2509
+ redirection: e.object({
2510
+ delay: e.number().optional(),
2511
+ target: e.string().optional()
2512
+ }).optional(),
2513
+ after_submit: e.object({ flow_id: e.string().optional() }).optional(),
2514
+ coordinates: V.optional(),
2515
+ resume_flow: e.boolean().optional()
2516
+ }).optional(),
2517
+ style: e.object({ css: e.string().optional() }).optional(),
2518
+ links: e.object({
2519
+ sdkSrc: e.string().optional(),
2520
+ sdk_src: e.string().optional()
2521
+ }).optional()
2522
+ }).openapi({ description: "Schema for flow-based forms (matches Auth0 Forms structure)" });
2523
+ C.extend(Pt.shape).extend({ id: e.string() });
2524
+ var Ft = e.object({
2525
+ id: e.number().optional(),
2526
+ text: e.string(),
2527
+ type: e.enum([
2528
+ "info",
2529
+ "error",
2530
+ "success",
2531
+ "warning"
2532
+ ])
2533
+ }), It = e.object({
2534
+ id: e.string().optional(),
2535
+ text: e.string(),
2536
+ href: e.string(),
2537
+ linkText: e.string().optional()
2538
+ });
2539
+ e.object({
2540
+ name: e.string().optional(),
2541
+ action: e.string(),
2542
+ method: e.enum(["POST", "GET"]),
2543
+ title: e.string().optional(),
2544
+ description: e.string().optional(),
2545
+ components: e.array(B),
2546
+ messages: e.array(Ft).optional(),
2547
+ links: e.array(It).optional(),
2548
+ footer: e.string().optional()
2549
+ });
2550
+ var H = e.enum([
2551
+ "pre-user-registration",
2552
+ "post-user-registration",
2553
+ "post-user-login",
2554
+ "post-user-update",
2555
+ "validate-registration-username",
2556
+ "pre-user-deletion",
2557
+ "post-user-deletion"
2558
+ ]), U = e.enum([
2559
+ "pre-user-registration",
2560
+ "post-user-registration",
2561
+ "post-user-login",
2562
+ "validate-registration-username",
2563
+ "pre-user-deletion",
2564
+ "post-user-deletion"
2565
+ ]), W = e.enum([
2566
+ "post-user-login",
2567
+ "post-user-registration",
2568
+ "post-user-update",
2569
+ "credentials-exchange"
2570
+ ]), G = e.enum([
2571
+ "post-user-login",
2572
+ "credentials-exchange",
2573
+ "pre-user-registration",
2574
+ "post-user-registration"
2575
+ ]), K = e.enum([
2576
+ "ensure-username",
2577
+ "set-preferred-username",
2578
+ "account-linking"
2579
+ ]), q = {
2580
+ enabled: e.boolean().default(!1),
2581
+ synchronous: e.boolean().default(!1),
2582
+ priority: e.number().optional(),
2583
+ hook_id: e.string().optional(),
2584
+ metadata: e.record(e.string(), e.unknown()).optional()
2585
+ }, Lt = e.object({
2586
+ ...q,
2587
+ trigger_id: H,
2588
+ url: e.string()
2589
+ }), Rt = e.object({
2590
+ ...q,
2591
+ trigger_id: U,
2592
+ form_id: e.string()
2593
+ }), zt = e.object({
2594
+ ...q,
2595
+ trigger_id: W,
2596
+ template_id: K
2597
+ }), Bt = e.object({
2598
+ ...q,
2599
+ trigger_id: G,
2600
+ code_id: e.string()
2601
+ });
2602
+ e.union([
2603
+ Lt,
2604
+ Rt,
2605
+ zt,
2606
+ Bt
2607
+ ]);
2608
+ var Vt = e.object({
2609
+ ...q,
2610
+ trigger_id: H
2611
+ }).extend(C.shape).extend({
2612
+ hook_id: e.string(),
2613
+ url: e.string()
2614
+ }), Ht = e.object({
2615
+ ...q,
2616
+ trigger_id: U
2617
+ }).extend(C.shape).extend({
2618
+ hook_id: e.string(),
2619
+ form_id: e.string()
2620
+ }), Ut = e.object({
2621
+ ...q,
2622
+ trigger_id: W
2623
+ }).extend(C.shape).extend({
2624
+ hook_id: e.string(),
2625
+ template_id: K
2626
+ }), Wt = e.object({
2627
+ ...q,
2628
+ trigger_id: G
2629
+ }).extend(C.shape).extend({
2630
+ hook_id: e.string(),
2631
+ code_id: e.string()
2632
+ });
2633
+ e.union([
2634
+ Vt,
2635
+ Ht,
2636
+ Ut,
2637
+ Wt
2638
+ ]), e.object({
2639
+ code: e.string().max(1e5),
2640
+ secrets: e.record(e.string(), e.string()).optional()
2641
+ }).extend({
2642
+ id: e.string(),
2643
+ tenant_id: e.string()
2644
+ }).extend(C.shape);
2645
+ var Gt = e.object({ name: e.string().optional() }), Kt = e.object({ email: e.string().optional() }), qt = e.object({
2646
+ id: e.string().optional(),
2647
+ organization_id: e.string().max(50),
2648
+ inviter: Gt,
2649
+ invitee: Kt,
2650
+ invitation_url: e.string().url(),
2651
+ client_id: e.string(),
2652
+ connection_id: e.string().optional(),
2653
+ app_metadata: e.record(e.string(), e.any()).default({}).optional(),
2654
+ user_metadata: e.record(e.string(), e.any()).default({}).optional(),
2655
+ ttl_sec: e.number().int().max(2592e3).default(604800).optional(),
2656
+ roles: e.array(e.string()).default([]).optional(),
2657
+ send_invitation_email: e.boolean().default(!0).optional()
2658
+ });
2659
+ e.object({
2660
+ id: e.string(),
2661
+ organization_id: e.string().max(50),
2662
+ created_at: e.string().datetime(),
2663
+ expires_at: e.string().datetime(),
2664
+ ticket_id: e.string().optional()
2665
+ }).extend(qt.omit({ id: !0 }).shape);
2666
+ var Jt = e.object({
2667
+ alg: e.enum([
2668
+ "RS256",
2669
+ "RS384",
2670
+ "RS512",
2671
+ "ES256",
2672
+ "ES384",
2673
+ "ES512",
2674
+ "HS256",
2675
+ "HS384",
2676
+ "HS512"
2677
+ ]),
2678
+ kid: e.string().optional(),
2679
+ kty: e.enum([
2680
+ "RSA",
2681
+ "EC",
2682
+ "oct"
2683
+ ]),
2684
+ use: e.enum(["sig", "enc"]).optional(),
2685
+ n: e.string().optional(),
2686
+ e: e.string().optional(),
2687
+ crv: e.string().optional(),
2688
+ x: e.string().optional(),
2689
+ y: e.string().optional(),
2690
+ x5t: e.string().optional(),
2691
+ x5c: e.array(e.string()).optional()
2692
+ }).superRefine((t, n) => {
2693
+ if (t.kty === "RSA") for (let r of ["n", "e"]) t[r] || n.addIssue({
2694
+ code: e.ZodIssueCode.custom,
2695
+ path: [r],
2696
+ message: `RSA JWK is missing required member '${r}'`
2697
+ });
2698
+ else if (t.kty === "EC") for (let r of [
2699
+ "crv",
2700
+ "x",
2701
+ "y"
2702
+ ]) t[r] || n.addIssue({
2703
+ code: e.ZodIssueCode.custom,
2704
+ path: [r],
2705
+ message: `EC JWK is missing required member '${r}'`
2706
+ });
2707
+ });
2708
+ e.object({ keys: e.array(Jt) }), e.object({
2709
+ issuer: e.string(),
2710
+ authorization_endpoint: e.string(),
2711
+ token_endpoint: e.string(),
2712
+ userinfo_endpoint: e.string(),
2713
+ jwks_uri: e.string(),
2714
+ registration_endpoint: e.string().optional(),
2715
+ revocation_endpoint: e.string(),
2716
+ end_session_endpoint: e.string().optional(),
2717
+ scopes_supported: e.array(e.string()),
2718
+ response_types_supported: e.array(e.string()),
2719
+ grant_types_supported: e.array(e.string()).optional(),
2720
+ code_challenge_methods_supported: e.array(e.string()),
2721
+ response_modes_supported: e.array(e.string()),
2722
+ subject_types_supported: e.array(e.string()),
2723
+ id_token_signing_alg_values_supported: e.array(e.string()),
2724
+ token_endpoint_auth_methods_supported: e.array(e.string()),
2725
+ claims_supported: e.array(e.string()),
2726
+ request_uri_parameter_supported: e.boolean(),
2727
+ request_parameter_supported: e.boolean(),
2728
+ claims_parameter_supported: e.boolean().optional(),
2729
+ request_object_signing_alg_values_supported: e.array(e.string()).optional(),
2730
+ token_endpoint_auth_signing_alg_values_supported: e.array(e.string()),
2731
+ client_id_metadata_document_supported: e.boolean().optional(),
2732
+ backchannel_logout_supported: e.boolean().optional(),
2733
+ backchannel_logout_session_supported: e.boolean().optional()
2734
+ });
2735
+ var Yt = /* @__PURE__ */ function(e) {
2736
+ 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;
2737
+ }({}), Xt = e.nativeEnum(Yt), Zt = e.object({
2738
+ strategy: e.string(),
2739
+ strategy_type: e.string()
2740
+ });
2741
+ e.object({
2742
+ csrf_token: e.string(),
2743
+ auth0Client: e.string().optional(),
2744
+ authParams: Ke,
2745
+ expires_at: e.string(),
2746
+ deleted_at: e.string().optional(),
2747
+ ip: e.string().optional(),
2748
+ useragent: e.string().optional(),
2749
+ session_id: e.string().optional(),
2750
+ authorization_url: e.string().optional(),
2751
+ state: Xt.optional().default("pending"),
2752
+ state_data: e.string().optional(),
2753
+ failure_reason: e.string().optional(),
2754
+ user_id: e.string().optional(),
2755
+ auth_connection: e.string().optional(),
2756
+ auth_strategy: Zt.optional(),
2757
+ authenticated_at: e.string().optional()
2758
+ }).openapi({ description: "This represents a login sesion" }).extend({
2759
+ id: e.string().openapi({ description: "This is is used as the state in the universal login" }),
2760
+ created_at: e.string(),
2761
+ updated_at: e.string()
2762
+ });
2763
+ var J = {
2764
+ ACLS_SUMMARY: "acls_summary",
2765
+ ACTIONS_EXECUTION_FAILED: "actions_execution_failed",
2766
+ API_LIMIT: "api_limit",
2767
+ API_LIMIT_WARNING: "api_limit_warning",
2768
+ APPI: "appi",
2769
+ CIBA_EXCHANGE_FAILED: "ciba_exchange_failed",
2770
+ CIBA_EXCHANGE_SUCCEEDED: "ciba_exchange_succeeded",
2771
+ CIBA_START_FAILED: "ciba_start_failed",
2772
+ CIBA_START_SUCCEEDED: "ciba_start_succeeded",
2773
+ CODE_LINK_SENT: "cls",
2774
+ CODE_SENT: "cs",
2775
+ DEPRECATION_NOTICE: "depnote",
2776
+ FAILED_LOGIN: "f",
2777
+ FAILED_BY_CONNECTOR: "fc",
2778
+ FAILED_CHANGE_EMAIL: "fce",
2779
+ FAILED_BY_CORS: "fco",
2780
+ FAILED_CROSS_ORIGIN_AUTHENTICATION: "fcoa",
2781
+ FAILED_CHANGE_PASSWORD: "fcp",
2782
+ FAILED_POST_CHANGE_PASSWORD_HOOK: "fcph",
2783
+ FAILED_CHANGE_PHONE_NUMBER: "fcpn",
2784
+ FAILED_CHANGE_PASSWORD_REQUEST: "fcpr",
2785
+ FAILED_CONNECTOR_PROVISIONING: "fcpro",
2786
+ FAILED_CHANGE_USERNAME: "fcu",
2787
+ FAILED_DELEGATION: "fd",
2788
+ FAILED_DEVICE_ACTIVATION: "fdeac",
2789
+ FAILED_DEVICE_AUTHORIZATION_REQUEST: "fdeaz",
2790
+ USER_CANCELED_DEVICE_CONFIRMATION: "fdecc",
2791
+ FAILED_USER_DELETION: "fdu",
2792
+ FAILED_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN: "feacft",
2793
+ FAILED_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS: "feccft",
2794
+ FAILED_EXCHANGE_CUSTOM_TOKEN: "fecte",
2795
+ FAILED_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN: "fede",
2796
+ FAILED_FEDERATED_LOGOUT: "federated_logout_failed",
2797
+ FAILED_EXCHANGE_NATIVE_SOCIAL_LOGIN: "fens",
2798
+ FAILED_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN: "feoobft",
2799
+ FAILED_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN: "feotpft",
2800
+ FAILED_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN: "fepft",
2801
+ FAILED_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN: "fepotpft",
2802
+ FAILED_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN: "fercft",
2803
+ FAILED_EXCHANGE_ROTATING_REFRESH_TOKEN: "ferrt",
2804
+ FAILED_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN: "fertft",
2805
+ FAILED_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN: "festft",
2806
+ FAILED_HOOK: "fh",
2807
+ FAILED_IMPERSONATION: "fimp",
2808
+ FAILED_INVITE_ACCEPT: "fi",
2809
+ FAILED_LOGOUT: "flo",
2810
+ FLOWS_EXECUTION_COMPLETED: "flows_execution_completed",
2811
+ FLOWS_EXECUTION_FAILED: "flows_execution_failed",
2812
+ FAILED_SENDING_NOTIFICATION: "fn",
2813
+ FORMS_SUBMISSION_FAILED: "forms_submission_failed",
2814
+ FORMS_SUBMISSION_SUCCEEDED: "forms_submission_succeeded",
2815
+ FAILED_LOGIN_INCORRECT_PASSWORD: "fp",
2816
+ FAILED_PUSHED_AUTHORIZATION_REQUEST: "fpar",
2817
+ FAILED_POST_USER_REGISTRATION_HOOK: "fpurh",
2818
+ FAILED_SIGNUP: "fs",
2819
+ FAILED_SILENT_AUTH: "fsa",
2820
+ FAILED_LOGIN_INVALID_EMAIL_USERNAME: "fu",
2821
+ FAILED_USERS_IMPORT: "fui",
2822
+ FAILED_VERIFICATION_EMAIL: "fv",
2823
+ FAILED_VERIFICATION_EMAIL_REQUEST: "fvr",
2824
+ EMAIL_VERIFICATION_CONFIRMED: "gd_auth_email_verification",
2825
+ EMAIL_VERIFICATION_FAILED: "gd_auth_fail_email_verification",
2826
+ MFA_AUTH_FAILED: "gd_auth_failed",
2827
+ MFA_AUTH_REJECTED: "gd_auth_rejected",
2828
+ MFA_AUTH_SUCCESS: "gd_auth_succeed",
2829
+ MFA_ENROLLMENT_COMPLETE: "gd_enrollment_complete",
2830
+ TOO_MANY_MFA_FAILURES: "gd_otp_rate_limit_exceed",
2831
+ MFA_RECOVERY_FAILED: "gd_recovery_failed",
2832
+ MFA_RECOVERY_RATE_LIMIT_EXCEED: "gd_recovery_rate_limit_exceed",
2833
+ MFA_RECOVERY_SUCCESS: "gd_recovery_succeed",
2834
+ MFA_EMAIL_SENT: "gd_send_email",
2835
+ EMAIL_VERIFICATION_SENT: "gd_send_email_verification",
2836
+ EMAIL_VERIFICATION_SEND_FAILURE: "gd_send_email_verification_failure",
2837
+ PUSH_NOTIFICATION_SENT: "gd_send_pn",
2838
+ ERROR_SENDING_MFA_PUSH_NOTIFICATION: "gd_send_pn_failure",
2839
+ MFA_SMS_SENT: "gd_send_sms",
2840
+ ERROR_SENDING_MFA_SMS: "gd_send_sms_failure",
2841
+ MFA_VOICE_CALL_SUCCESS: "gd_send_voice",
2842
+ MFA_VOICE_CALL_FAILED: "gd_send_voice_failure",
2843
+ SECOND_FACTOR_STARTED: "gd_start_auth",
2844
+ MFA_ENROLL_STARTED: "gd_start_enroll",
2845
+ MFA_ENROLLMENT_FAILED: "gd_start_enroll_failed",
2846
+ GUARDIAN_TENANT_UPDATE: "gd_tenant_update",
2847
+ UNENROLL_DEVICE_ACCOUNT: "gd_unenroll",
2848
+ UPDATE_DEVICE_ACCOUNT: "gd_update_device_account",
2849
+ WEBAUTHN_CHALLENGE_FAILED: "gd_webauthn_challenge_failed",
2850
+ WEBAUTHN_ENROLLMENT_FAILED: "gd_webauthn_enrollment_failed",
2851
+ FAILED_KMS_API_OPERATION: "kms_key_management_failure",
2852
+ SUCCESS_KMS_API_OPERATION: "kms_key_management_success",
2853
+ KMS_KEY_STATE_CHANGED: "kms_key_state_changed",
2854
+ TOO_MANY_CALLS_TO_DELEGATION: "limit_delegation",
2855
+ BLOCKED_IP_ADDRESS: "limit_mu",
2856
+ BLOCKED_ACCOUNT_IP: "limit_sul",
2857
+ BLOCKED_ACCOUNT_EMAIL: "limit_wc",
2858
+ INFORMATION: "i",
2859
+ MFA_REQUIRED: "mfar",
2860
+ MANAGEMENT_API_READ_OPERATION: "mgmt_api_read",
2861
+ FAILED_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT: "my_account_authentication_method_failed",
2862
+ SUCCESSFUL_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT: "my_account_authentication_method_succeeded",
2863
+ FAILED_OIDC_BACKCHANNEL_LOGOUT: "oidc_backchannel_logout_failed",
2864
+ SUCCESSFUL_OIDC_BACKCHANNEL_LOGOUT: "oidc_backchannel_logout_succeeded",
2865
+ ORGANIZATION_MEMBER_ADDED: "organization_member_added",
2866
+ PASSKEY_CHALLENGE_FAILED: "passkey_challenge_failed",
2867
+ PASSKEY_CHALLENGE_STARTED: "passkey_challenge_started",
2868
+ PRE_LOGIN_ASSESSMENT: "pla",
2869
+ BREACHED_PASSWORD: "pwd_leak",
2870
+ BREACHED_PASSWORD_ON_RESET: "reset_pwd_leak",
2871
+ SUCCESS_RESOURCE_CLEANUP: "resource_cleanup",
2872
+ RICH_CONSENTS_ACCESS_ERROR: "rich_consents_access_error",
2873
+ SUCCESS_LOGIN: "s",
2874
+ SUCCESS_API_OPERATION: "sapi",
2875
+ FAILED_API_OPERATION: "fapi",
2876
+ SUCCESS_CHANGE_EMAIL: "sce",
2877
+ SUCCESS_CROSS_ORIGIN_AUTHENTICATION: "scoa",
2878
+ SUCCESS_CHANGE_PASSWORD: "scp",
2879
+ SUCCESS_CHANGE_PHONE_NUMBER: "scpn",
2880
+ SUCCESS_CHANGE_PASSWORD_REQUEST: "scpr",
2881
+ SUCCESS_CHANGE_USERNAME: "scu",
2882
+ SUCCESS_CREDENTIAL_VALIDATION: "scv",
2883
+ SUCCESS_DELEGATION: "sd",
2884
+ SUCCESS_USER_DELETION: "sdu",
2885
+ SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN: "seacft",
2886
+ SUCCESS_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS: "seccft",
2887
+ SUCCESS_EXCHANGE_CUSTOM_TOKEN: "secte",
2888
+ SUCCESS_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN: "sede",
2889
+ SUCCESS_EXCHANGE_NATIVE_SOCIAL_LOGIN: "sens",
2890
+ SUCCESS_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN: "seoobft",
2891
+ SUCCESS_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN: "seotpft",
2892
+ SUCCESS_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN: "sepotpft",
2893
+ SUCCESS_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN: "sepft",
2894
+ SUCCESS_EXCHANGE_PASSKEY_OOB_FOR_ACCESS_TOKEN: "sepkoobft",
2895
+ SUCCESS_EXCHANGE_PASSKEY_OTP_FOR_ACCESS_TOKEN: "sepkotpft",
2896
+ SUCCESS_EXCHANGE_PASSKEY_MFA_RECOVERY_FOR_ACCESS_TOKEN: "sepkrcft",
2897
+ SUCCESS_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN: "sercft",
2898
+ SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN: "sertft",
2899
+ SUCCESS_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN: "sestft",
2900
+ SUCCESS_IMPERSONATION: "simp",
2901
+ SUCCESSFULLY_ACCEPTED_USER_INVITE: "si",
2902
+ BREACHED_PASSWORD_ON_SIGNUP: "signup_pwd_leak",
2903
+ SUCCESS_LOGOUT: "slo",
2904
+ SUCCESS_HOOK: "sh",
2905
+ SUCCESS_PASSWORD_MIGRATION: "spm",
2906
+ SUCCESS_REVOCATION: "srrt",
2907
+ SUCCESS_SIGNUP: "ss",
2908
+ FAILED_SS_SSO_OPERATION: "ss_sso_failure",
2909
+ INFORMATION_FROM_SS_SSO_OPERATION: "ss_sso_info",
2910
+ SUCCESS_SS_SSO_OPERATION: "ss_sso_success",
2911
+ SUCCESS_SILENT_AUTH: "ssa",
2912
+ SUCCESSFUL_SCIM_OPERATION: "sscim",
2913
+ SUCCESSFULLY_IMPORTED_USERS: "sui",
2914
+ SUCCESS_VERIFICATION_EMAIL: "sv",
2915
+ SUCCESS_VERIFICATION_EMAIL_REQUEST: "svr",
2916
+ MAX_AMOUNT_OF_AUTHENTICATORS: "too_many_records",
2917
+ USER_LOGIN_BLOCK_RELEASED: "ublkdu",
2918
+ FAILED_UNIVERSAL_LOGOUT: "universal_logout_failed",
2919
+ SUCCESSFUL_UNIVERSAL_LOGOUT: "universal_logout_succeeded",
2920
+ WARNING_DURING_LOGIN: "w",
2921
+ WARNING_SENDING_NOTIFICATION: "wn",
2922
+ WARNING_USER_MANAGEMENT: "wum"
2923
+ }, Qt = e.string().refine((e) => Object.values(J).includes(e), { message: "Invalid log type" });
2924
+ J.ACLS_SUMMARY, J.ACTIONS_EXECUTION_FAILED, J.API_LIMIT, J.API_LIMIT_WARNING, J.APPI, J.CIBA_EXCHANGE_FAILED, J.CIBA_EXCHANGE_SUCCEEDED, J.CIBA_START_FAILED, J.CIBA_START_SUCCEEDED, J.CODE_LINK_SENT, J.CODE_SENT, J.DEPRECATION_NOTICE, J.FAILED_LOGIN, J.FAILED_BY_CONNECTOR, J.FAILED_CHANGE_EMAIL, J.FAILED_BY_CORS, J.FAILED_CROSS_ORIGIN_AUTHENTICATION, J.FAILED_CHANGE_PASSWORD, J.FAILED_POST_CHANGE_PASSWORD_HOOK, J.FAILED_CHANGE_PHONE_NUMBER, J.FAILED_CHANGE_PASSWORD_REQUEST, J.FAILED_CONNECTOR_PROVISIONING, J.FAILED_CHANGE_USERNAME, J.FAILED_DELEGATION, J.FAILED_DEVICE_ACTIVATION, J.FAILED_DEVICE_AUTHORIZATION_REQUEST, J.USER_CANCELED_DEVICE_CONFIRMATION, J.FAILED_USER_DELETION, J.FAILED_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN, J.FAILED_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS, J.FAILED_EXCHANGE_CUSTOM_TOKEN, J.FAILED_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN, J.FAILED_FEDERATED_LOGOUT, J.FAILED_EXCHANGE_NATIVE_SOCIAL_LOGIN, J.FAILED_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN, J.FAILED_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN, J.FAILED_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN, J.FAILED_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN, J.FAILED_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN, J.FAILED_EXCHANGE_ROTATING_REFRESH_TOKEN, J.FAILED_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN, J.FAILED_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN, J.FAILED_HOOK, J.FAILED_IMPERSONATION, J.FAILED_INVITE_ACCEPT, J.FAILED_LOGOUT, J.FLOWS_EXECUTION_COMPLETED, J.FLOWS_EXECUTION_FAILED, J.FAILED_SENDING_NOTIFICATION, J.FORMS_SUBMISSION_FAILED, J.FORMS_SUBMISSION_SUCCEEDED, J.FAILED_LOGIN_INCORRECT_PASSWORD, J.FAILED_PUSHED_AUTHORIZATION_REQUEST, J.FAILED_POST_USER_REGISTRATION_HOOK, J.FAILED_SIGNUP, J.FAILED_SILENT_AUTH, J.FAILED_LOGIN_INVALID_EMAIL_USERNAME, J.FAILED_USERS_IMPORT, J.FAILED_VERIFICATION_EMAIL, J.FAILED_VERIFICATION_EMAIL_REQUEST, J.EMAIL_VERIFICATION_CONFIRMED, J.EMAIL_VERIFICATION_FAILED, J.MFA_AUTH_FAILED, J.MFA_AUTH_REJECTED, J.MFA_AUTH_SUCCESS, J.MFA_ENROLLMENT_COMPLETE, J.TOO_MANY_MFA_FAILURES, J.MFA_RECOVERY_FAILED, J.MFA_RECOVERY_RATE_LIMIT_EXCEED, J.MFA_RECOVERY_SUCCESS, J.MFA_EMAIL_SENT, J.EMAIL_VERIFICATION_SENT, J.EMAIL_VERIFICATION_SEND_FAILURE, J.PUSH_NOTIFICATION_SENT, J.ERROR_SENDING_MFA_PUSH_NOTIFICATION, J.MFA_SMS_SENT, J.ERROR_SENDING_MFA_SMS, J.MFA_VOICE_CALL_SUCCESS, J.MFA_VOICE_CALL_FAILED, J.SECOND_FACTOR_STARTED, J.MFA_ENROLL_STARTED, J.MFA_ENROLLMENT_FAILED, J.GUARDIAN_TENANT_UPDATE, J.UNENROLL_DEVICE_ACCOUNT, J.UPDATE_DEVICE_ACCOUNT, J.WEBAUTHN_CHALLENGE_FAILED, J.WEBAUTHN_ENROLLMENT_FAILED, J.FAILED_KMS_API_OPERATION, J.SUCCESS_KMS_API_OPERATION, J.KMS_KEY_STATE_CHANGED, J.TOO_MANY_CALLS_TO_DELEGATION, J.BLOCKED_IP_ADDRESS, J.BLOCKED_ACCOUNT_IP, J.BLOCKED_ACCOUNT_EMAIL, J.INFORMATION, J.MFA_REQUIRED, J.MANAGEMENT_API_READ_OPERATION, J.FAILED_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT, J.SUCCESSFUL_AUTHENTICATION_METHOD_OPERATION_MY_ACCOUNT, J.FAILED_OIDC_BACKCHANNEL_LOGOUT, J.SUCCESSFUL_OIDC_BACKCHANNEL_LOGOUT, J.ORGANIZATION_MEMBER_ADDED, J.PASSKEY_CHALLENGE_FAILED, J.PASSKEY_CHALLENGE_STARTED, J.PRE_LOGIN_ASSESSMENT, J.BREACHED_PASSWORD, J.BREACHED_PASSWORD_ON_RESET, J.SUCCESS_RESOURCE_CLEANUP, J.RICH_CONSENTS_ACCESS_ERROR, J.SUCCESS_LOGIN, J.SUCCESS_API_OPERATION, J.FAILED_API_OPERATION, J.SUCCESS_CHANGE_EMAIL, J.SUCCESS_CROSS_ORIGIN_AUTHENTICATION, J.SUCCESS_CHANGE_PASSWORD, J.SUCCESS_CHANGE_PHONE_NUMBER, J.SUCCESS_CHANGE_PASSWORD_REQUEST, J.SUCCESS_CHANGE_USERNAME, J.SUCCESS_CREDENTIAL_VALIDATION, J.SUCCESS_DELEGATION, J.SUCCESS_USER_DELETION, J.SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN, J.SUCCESS_EXCHANGE_ACCESS_TOKEN_FOR_CLIENT_CREDENTIALS, J.SUCCESS_EXCHANGE_CUSTOM_TOKEN, J.SUCCESS_EXCHANGE_DEVICE_CODE_FOR_ACCESS_TOKEN, J.SUCCESS_EXCHANGE_NATIVE_SOCIAL_LOGIN, J.SUCCESS_EXCHANGE_PASSWORD_OOB_FOR_ACCESS_TOKEN, J.SUCCESS_EXCHANGE_PASSWORD_OTP_FOR_ACCESS_TOKEN, J.SUCCESS_EXCHANGE_PASSWORDLESS_OTP_FOR_ACCESS_TOKEN, J.SUCCESS_EXCHANGE_PASSWORD_FOR_ACCESS_TOKEN, J.SUCCESS_EXCHANGE_PASSKEY_OOB_FOR_ACCESS_TOKEN, J.SUCCESS_EXCHANGE_PASSKEY_OTP_FOR_ACCESS_TOKEN, J.SUCCESS_EXCHANGE_PASSKEY_MFA_RECOVERY_FOR_ACCESS_TOKEN, J.SUCCESS_EXCHANGE_PASSWORD_MFA_RECOVERY_FOR_ACCESS_TOKEN, J.SUCCESS_EXCHANGE_REFRESH_TOKEN_FOR_ACCESS_TOKEN, J.SUCCESS_EXCHANGE_SUBJECT_TOKEN_FOR_ACCESS_TOKEN, J.SUCCESS_IMPERSONATION, J.SUCCESSFULLY_ACCEPTED_USER_INVITE, J.BREACHED_PASSWORD_ON_SIGNUP, J.SUCCESS_LOGOUT, J.SUCCESS_HOOK, J.SUCCESS_PASSWORD_MIGRATION, J.SUCCESS_REVOCATION, J.SUCCESS_SIGNUP, J.FAILED_SS_SSO_OPERATION, J.INFORMATION_FROM_SS_SSO_OPERATION, J.SUCCESS_SS_SSO_OPERATION, J.SUCCESS_SILENT_AUTH, J.SUCCESSFUL_SCIM_OPERATION, J.SUCCESSFULLY_IMPORTED_USERS, J.SUCCESS_VERIFICATION_EMAIL, J.SUCCESS_VERIFICATION_EMAIL_REQUEST, J.MAX_AMOUNT_OF_AUTHENTICATORS, J.USER_LOGIN_BLOCK_RELEASED, J.FAILED_UNIVERSAL_LOGOUT, J.SUCCESSFUL_UNIVERSAL_LOGOUT, J.WARNING_DURING_LOGIN, J.WARNING_SENDING_NOTIFICATION, J.WARNING_USER_MANAGEMENT, (() => {
2925
+ let e = {};
2926
+ for (let [t, n] of Object.entries(J)) t.startsWith("SUCCESS_") || t.startsWith("SUCCESSFUL_") || t.startsWith("SUCCESSFULLY_") || t.endsWith("_SUCCEEDED") || t.endsWith("_COMPLETED") ? e[n] = "success" : t.startsWith("FAILED_") || t.startsWith("ERROR_") || t.startsWith("BREACHED_") || t.startsWith("BLOCKED_") || t === "MFA_AUTH_FAILED" || t === "MFA_AUTH_REJECTED" || t === "MFA_RECOVERY_FAILED" || t === "MFA_ENROLLMENT_FAILED" || t === "EMAIL_VERIFICATION_FAILED" || t === "WEBAUTHN_CHALLENGE_FAILED" || t === "WEBAUTHN_ENROLLMENT_FAILED" || t === "PASSKEY_CHALLENGE_FAILED" || t === "FLOWS_EXECUTION_FAILED" || t === "FORMS_SUBMISSION_FAILED" || t === "CIBA_EXCHANGE_FAILED" || t === "CIBA_START_FAILED" || t === "ACTIONS_EXECUTION_FAILED" || t === "RICH_CONSENTS_ACCESS_ERROR" || t === "USER_CANCELED_DEVICE_CONFIRMATION" || t === "TOO_MANY_MFA_FAILURES" || t === "MFA_RECOVERY_RATE_LIMIT_EXCEED" || t === "API_LIMIT" || t === "MAX_AMOUNT_OF_AUTHENTICATORS" ? e[n] = "failure" : t.startsWith("WARNING_") || t === "API_LIMIT_WARNING" || t === "DEPRECATION_NOTICE" || t === "PRE_LOGIN_ASSESSMENT" ? e[n] = "warning" : t === "CODE_SENT" || t === "CODE_LINK_SENT" || t === "MFA_EMAIL_SENT" || t === "MFA_SMS_SENT" || t === "EMAIL_VERIFICATION_SENT" || t === "PUSH_NOTIFICATION_SENT" ? e[n] = "code_sent" : t === "INFORMATION" || t === "INFORMATION_FROM_SS_SSO_OPERATION" || t === "MANAGEMENT_API_READ_OPERATION" || t === "APPI" || t === "ACLS_SUMMARY" || t === "ORGANIZATION_MEMBER_ADDED" ? e[n] = "info" : e[n] = "other";
2927
+ return e;
2928
+ })();
2929
+ var $t = e.object({
2930
+ name: e.string(),
2931
+ version: e.string(),
2932
+ env: e.object({ node: e.string().optional() }).optional()
2933
+ }), en = e.object({
2934
+ country_code: e.string().length(2),
2935
+ city_name: e.string(),
2936
+ latitude: e.string(),
2937
+ longitude: e.string(),
2938
+ time_zone: e.string(),
2939
+ continent_code: e.string()
2940
+ });
2941
+ e.object({
2942
+ type: Qt,
2943
+ date: e.string(),
2944
+ description: e.string().optional(),
2945
+ ip: e.string().optional(),
2946
+ user_agent: e.string().optional(),
2947
+ details: e.any().optional(),
2948
+ isMobile: e.boolean(),
2949
+ user_id: e.string().optional(),
2950
+ user_name: e.string().optional(),
2951
+ connection: e.string().optional(),
2952
+ connection_id: e.string().optional(),
2953
+ client_id: e.string().optional(),
2954
+ client_name: e.string().optional(),
2955
+ audience: e.string().optional(),
2956
+ scope: e.string().optional(),
2957
+ strategy: e.string().optional(),
2958
+ strategy_type: e.string().optional(),
2959
+ hostname: e.string().optional(),
2960
+ auth0_client: $t.optional(),
2961
+ log_id: e.string().optional(),
2962
+ location_info: en.optional()
2963
+ }).extend({ log_id: e.string() });
2964
+ var tn = e.enum([
2965
+ "http",
2966
+ "eventbridge",
2967
+ "eventgrid",
2968
+ "splunk",
2969
+ "datadog",
2970
+ "sumo"
2971
+ ]), Y = e.enum([
2972
+ "active",
2973
+ "paused",
2974
+ "suspended"
2975
+ ]), nn = e.object({
2976
+ type: e.string(),
2977
+ name: e.string()
2978
+ });
2979
+ e.object({
2980
+ name: e.string(),
2981
+ type: tn,
2982
+ status: Y.optional(),
2983
+ sink: e.record(e.string(), e.unknown()),
2984
+ filters: e.array(nn).optional(),
2985
+ isPriority: e.boolean().optional()
2986
+ }).extend({
2987
+ id: e.string(),
2988
+ status: Y,
2989
+ created_at: e.string().optional(),
2990
+ updated_at: e.string().optional()
2991
+ });
2992
+ var rn = e.enum([
2993
+ "auth0",
2994
+ "cognito",
2995
+ "okta",
2996
+ "oidc"
2997
+ ]), an = e.object({
2998
+ domain: e.string(),
2999
+ client_id: e.string(),
3000
+ client_secret: e.string(),
3001
+ audience: e.string().optional(),
3002
+ scope: e.string().optional()
3003
+ }), on = e.object({
3004
+ id: e.string().optional(),
3005
+ name: e.string(),
3006
+ provider: rn,
3007
+ connection: e.string(),
3008
+ enabled: e.boolean().default(!0),
3009
+ credentials: an
3010
+ });
3011
+ e.object({
3012
+ id: e.string(),
3013
+ created_at: e.string(),
3014
+ updated_at: e.string()
3015
+ }).extend(on.shape);
3016
+ var sn = e.object({
3017
+ enabled: e.boolean().optional(),
3018
+ shields: e.array(e.string()).optional(),
3019
+ admin_notification_frequency: e.array(e.string()).optional(),
3020
+ method: e.string().optional(),
3021
+ stage: e.object({
3022
+ "pre-user-registration": e.object({ shields: e.array(e.string()).optional() }).optional(),
3023
+ "pre-change-password": e.object({ shields: e.array(e.string()).optional() }).optional()
3024
+ }).optional()
3025
+ }), cn = e.object({
3026
+ enabled: e.boolean().optional(),
3027
+ shields: e.array(e.string()).optional(),
3028
+ allowlist: e.array(e.string()).optional(),
3029
+ mode: e.string().optional(),
3030
+ max_attempts: e.number().optional()
3031
+ }), ln = e.object({
3032
+ enabled: e.boolean().optional(),
3033
+ shields: e.array(e.string()).optional(),
3034
+ allowlist: e.array(e.string()).optional(),
3035
+ stage: e.object({
3036
+ "pre-login": e.object({
3037
+ max_attempts: e.number().optional(),
3038
+ rate: e.number().optional()
3039
+ }).optional(),
3040
+ "pre-user-registration": e.object({
3041
+ max_attempts: e.number().optional(),
3042
+ rate: e.number().optional()
3043
+ }).optional()
3044
+ }).optional()
3045
+ }), un = e.object({
3046
+ breached_password_detection: sn.optional(),
3047
+ brute_force_protection: cn.optional(),
3048
+ suspicious_ip_throttling: ln.optional()
3049
+ });
3050
+ e.object({
3051
+ id: e.string().optional(),
3052
+ user_id: e.string(),
3053
+ password: e.string(),
3054
+ algorithm: e.enum(["bcrypt", "argon2id"]).default("argon2id"),
3055
+ is_current: e.boolean().default(!0)
3056
+ }).extend({
3057
+ id: e.string(),
3058
+ created_at: e.string(),
3059
+ updated_at: e.string()
3060
+ });
3061
+ var X = e.object({
3062
+ initial_user_agent: e.string().describe("First user agent of the device from which this user logged in"),
3063
+ initial_ip: e.string().describe("First IP address associated with this session"),
3064
+ initial_asn: e.string().describe("First autonomous system number associated with this session"),
3065
+ last_user_agent: e.string().describe("Last user agent of the device from which this user logged in"),
3066
+ last_ip: e.string().describe("Last IP address from which this user logged in"),
3067
+ last_asn: e.string().describe("Last autonomous system number from which this user logged in")
3068
+ }), dn = e.object({
3069
+ id: e.string(),
3070
+ revoked_at: e.string().optional(),
3071
+ used_at: e.string().optional(),
3072
+ user_id: e.string().describe("The user ID associated with the session"),
3073
+ expires_at: e.string().optional(),
3074
+ login_session_id: e.string(),
3075
+ idle_expires_at: e.string().optional(),
3076
+ device: X.describe("Metadata related to the device used in the session"),
3077
+ clients: e.array(e.string()).describe("List of client details for the session")
3078
+ });
3079
+ e.object({
3080
+ created_at: e.string(),
3081
+ updated_at: e.string(),
3082
+ authenticated_at: e.string(),
3083
+ last_interaction_at: e.string()
3084
+ }).extend(dn.shape), e.object({
3085
+ kid: e.string().openapi({ description: "The key id of the signing key" }),
3086
+ tenant_id: e.string().optional().openapi({ description: "The tenant the key belongs to. Omitted means the key is shared / control-plane scoped." }),
3087
+ cert: e.string().openapi({ description: "The public certificate of the signing key" }),
3088
+ fingerprint: e.string().openapi({ description: "The cert fingerprint" }),
3089
+ thumbprint: e.string().openapi({ description: "The cert thumbprint" }),
3090
+ pkcs7: e.string().optional().openapi({ description: "The private key in pkcs7 format" }),
3091
+ current: e.boolean().optional().openapi({ description: "True if the key is the current key" }),
3092
+ next: e.boolean().optional().openapi({ description: "True if the key is the next key" }),
3093
+ previous: e.boolean().optional().openapi({ description: "True if the key is the previous key" }),
3094
+ current_since: e.string().optional().openapi({ description: "The date and time when the key became the current key" }),
3095
+ current_until: e.string().optional().openapi({ description: "The date and time when the current key was rotated" }),
3096
+ revoked: e.boolean().optional().openapi({ description: "True if the key is revoked" }),
3097
+ revoked_at: e.string().optional().openapi({ description: "The date and time when the key was revoked" }),
3098
+ connection: e.string().optional().openapi({ description: "The connection identifier associated with the key" }),
3099
+ type: e.enum(["jwt_signing", "saml_encryption"]).openapi({ description: "The type of the signing key" })
3100
+ });
3101
+ var fn = e.object({
3102
+ id: e.string().optional(),
3103
+ audience: e.string().optional(),
3104
+ friendly_name: e.string(),
3105
+ picture_url: e.string().optional(),
3106
+ support_email: e.string().optional(),
3107
+ support_url: e.string().optional(),
3108
+ sender_email: e.string().email().optional(),
3109
+ sender_name: e.string().optional(),
3110
+ session_lifetime: e.number().optional(),
3111
+ idle_session_lifetime: e.number().optional(),
3112
+ ephemeral_session_lifetime: e.number().optional(),
3113
+ idle_ephemeral_session_lifetime: e.number().optional(),
3114
+ session_cookie: e.object({ mode: e.enum(["persistent", "non-persistent"]).optional() }).optional(),
3115
+ allowed_logout_urls: e.array(e.string()).optional(),
3116
+ default_redirection_uri: e.string().optional(),
3117
+ default_client_id: e.string().optional(),
3118
+ enabled_locales: e.array(e.string()).optional(),
3119
+ default_directory: e.string().optional(),
3120
+ error_page: e.object({
3121
+ html: e.string().optional(),
3122
+ show_log_link: e.boolean().optional(),
3123
+ url: e.string().optional()
3124
+ }).nullish(),
3125
+ flags: e.object({
3126
+ allow_changing_enable_sso: e.boolean().optional(),
3127
+ allow_legacy_delegation_grant_types: e.boolean().optional(),
3128
+ allow_legacy_ro_grant_types: e.boolean().optional(),
3129
+ allow_legacy_tokeninfo_endpoint: e.boolean().optional(),
3130
+ change_pwd_flow_v1: e.boolean().optional(),
3131
+ client_id_metadata_document_registration: e.boolean().optional(),
3132
+ custom_domains_provisioning: e.boolean().optional(),
3133
+ dashboard_insights_view: e.boolean().optional(),
3134
+ dashboard_log_streams_next: e.boolean().optional(),
3135
+ disable_clickjack_protection_headers: e.boolean().optional(),
3136
+ disable_fields_map_fix: e.boolean().optional(),
3137
+ disable_impersonation: e.boolean().optional(),
3138
+ disable_management_api_sms_obfuscation: e.boolean().optional(),
3139
+ enable_adfs_waad_email_verification: e.boolean().optional(),
3140
+ enable_apis_section: e.boolean().optional(),
3141
+ enable_client_connections: e.boolean().optional(),
3142
+ enable_custom_domain_in_emails: e.boolean().optional(),
3143
+ enable_dynamic_client_registration: e.boolean().optional(),
3144
+ dcr_require_initial_access_token: e.boolean().optional(),
3145
+ dcr_allowed_grant_types: e.array(e.string()).optional(),
3146
+ allow_http_return_to: e.array(e.string().refine((e) => {
3147
+ try {
3148
+ let t = new URL(e);
3149
+ return t.protocol === "http:" && (t.pathname === "" || t.pathname === "/") && !t.search && !t.hash && e === t.origin;
3150
+ } catch {
3151
+ return !1;
1389
3152
  }
1390
- i.push(o >> 16 & 255), a < 2 && i.push(o >> 8 & 255), a < 1 && i.push(o & 255);
1391
- }
1392
- return Uint8Array.from(i);
3153
+ }, { message: "must be a fully-qualified http origin (scheme + host + port, no path)" })).optional(),
3154
+ enable_idtoken_api2: e.boolean().optional(),
3155
+ enable_legacy_logs_search_v2: e.boolean().optional(),
3156
+ enable_legacy_profile: e.boolean().optional(),
3157
+ enable_pipeline2: e.boolean().optional(),
3158
+ enable_public_signup_user_exists_error: e.boolean().optional(),
3159
+ enable_sso: e.boolean().optional(),
3160
+ enforce_client_authentication_on_passwordless_start: e.boolean().optional(),
3161
+ genai_trial: e.boolean().optional(),
3162
+ improved_signup_bot_detection_in_classic: e.boolean().optional(),
3163
+ mfa_show_factor_list_on_enrollment: e.boolean().optional(),
3164
+ no_disclose_enterprise_connections: e.boolean().optional(),
3165
+ remove_alg_from_jwks: e.boolean().optional(),
3166
+ revoke_refresh_token_grant: e.boolean().optional(),
3167
+ trust_azure_adfs_email_verified_connection_property: e.boolean().optional(),
3168
+ use_scope_descriptions_for_consent: e.boolean().optional(),
3169
+ inherit_global_permissions_in_organizations: e.boolean().optional(),
3170
+ restrict_undefined_scopes: e.boolean().optional()
3171
+ }).optional(),
3172
+ sandbox_version: e.string().optional(),
3173
+ legacy_sandbox_version: e.string().optional(),
3174
+ sandbox_versions_available: e.array(e.string()).optional(),
3175
+ change_password: e.object({
3176
+ enabled: e.boolean().optional(),
3177
+ html: e.string().optional()
3178
+ }).optional(),
3179
+ guardian_mfa_page: e.object({
3180
+ enabled: e.boolean().optional(),
3181
+ html: e.string().optional()
3182
+ }).optional(),
3183
+ device_flow: e.object({
3184
+ charset: e.enum(["base20", "digits"]).optional(),
3185
+ mask: e.string().max(20).optional()
3186
+ }).optional(),
3187
+ default_token_quota: e.object({
3188
+ clients: e.object({ client_credentials: e.record(e.string(), e.any()).optional() }).optional(),
3189
+ organizations: e.object({ client_credentials: e.record(e.string(), e.any()).optional() }).optional()
3190
+ }).nullish(),
3191
+ default_audience: e.string().optional(),
3192
+ default_organization: e.string().optional(),
3193
+ sessions: e.object({ oidc_logout_prompt_enabled: e.boolean().optional() }).optional(),
3194
+ oidc_logout: e.object({ rp_logout_end_session_endpoint_discovery: e.boolean().optional() }).optional(),
3195
+ allow_organization_name_in_authentication_api: e.boolean().optional(),
3196
+ customize_mfa_in_postlogin_action: e.boolean().optional(),
3197
+ acr_values_supported: e.array(e.string()).optional(),
3198
+ mtls: e.object({ enable_endpoint_aliases: e.boolean().optional() }).nullish(),
3199
+ pushed_authorization_requests_supported: e.boolean().optional(),
3200
+ authorization_response_iss_parameter_supported: e.boolean().optional(),
3201
+ deployment_type: e.enum(["shared", "wfp"]).default("shared").optional(),
3202
+ provisioning_state: e.enum([
3203
+ "pending",
3204
+ "ready",
3205
+ "failed"
3206
+ ]).default("ready").optional(),
3207
+ provisioning_error: e.string().max(2048).optional(),
3208
+ provisioning_state_changed_at: e.string().optional(),
3209
+ bundle_configuration: e.string().max(64).optional(),
3210
+ worker_version: e.string().max(64).optional(),
3211
+ database_version: e.string().max(64).optional(),
3212
+ worker_script_name: e.string().max(255).optional(),
3213
+ storage_kind: e.enum([
3214
+ "own_d1",
3215
+ "existing_d1",
3216
+ "shared_planetscale"
3217
+ ]).optional(),
3218
+ d1_database_id: e.string().max(64).optional(),
3219
+ attack_protection: un.optional(),
3220
+ mfa: e.object({
3221
+ policy: e.enum(["never", "always"]).default("never").optional(),
3222
+ factors: e.object({
3223
+ sms: e.boolean().default(!1),
3224
+ otp: e.boolean().default(!1),
3225
+ email: e.boolean().default(!1),
3226
+ push_notification: e.boolean().default(!1),
3227
+ webauthn_roaming: e.boolean().default(!1),
3228
+ webauthn_platform: e.boolean().default(!1),
3229
+ recovery_code: e.boolean().default(!1),
3230
+ duo: e.boolean().default(!1)
3231
+ }).optional(),
3232
+ sms_provider: e.object({ provider: e.enum([
3233
+ "twilio",
3234
+ "vonage",
3235
+ "aws_sns",
3236
+ "phone_message_hook"
3237
+ ]).optional() }).optional(),
3238
+ twilio: e.object({
3239
+ sid: e.string().optional(),
3240
+ auth_token: e.string().optional(),
3241
+ from: e.string().optional(),
3242
+ messaging_service_sid: e.string().optional()
3243
+ }).optional(),
3244
+ phone_message: e.object({ message: e.string().optional() }).optional()
3245
+ }).optional()
3246
+ });
3247
+ e.object({
3248
+ created_at: e.string().nullable().transform((e) => e ?? ""),
3249
+ updated_at: e.string().nullable().transform((e) => e ?? "")
3250
+ }).extend(fn.shape).extend({
3251
+ id: e.string(),
3252
+ is_control_plane: e.boolean().optional()
3253
+ });
3254
+ var pn = e.enum([
3255
+ "provision",
3256
+ "seed",
3257
+ "upgrade",
3258
+ "backup",
3259
+ "deprovision"
3260
+ ]), mn = e.enum([
3261
+ "pending",
3262
+ "running",
3263
+ "succeeded",
3264
+ "failed",
3265
+ "cancelled"
3266
+ ]), hn = e.enum(["inline", "cloudflare-workflows"]);
3267
+ e.object({
3268
+ tenant_id: e.string().max(255).nullable().default(null),
3269
+ rollout_id: e.string().max(255).nullable().optional(),
3270
+ kind: pn,
3271
+ engine: hn,
3272
+ engine_instance_id: e.string().max(100).nullable().optional(),
3273
+ target_worker_version: e.string().max(255).nullable().optional(),
3274
+ target_database_version: e.string().max(255).nullable().optional(),
3275
+ initiated_by: e.string().max(255).nullable().optional()
3276
+ }).extend({
3277
+ id: e.string(),
3278
+ status: mn,
3279
+ current_step: e.string().max(255).nullable().optional(),
3280
+ error: e.string().nullable().optional(),
3281
+ created_at: e.string(),
3282
+ updated_at: e.string(),
3283
+ finished_at: e.string().nullable().optional()
3284
+ }).pick({
3285
+ status: !0,
3286
+ current_step: !0,
3287
+ engine_instance_id: !0,
3288
+ target_worker_version: !0,
3289
+ target_database_version: !0,
3290
+ error: !0,
3291
+ finished_at: !0
3292
+ }).partial();
3293
+ var gn = e.enum([
3294
+ "started",
3295
+ "succeeded",
3296
+ "failed",
3297
+ "retried",
3298
+ "skipped",
3299
+ "reconciled"
3300
+ ]);
3301
+ e.object({
3302
+ operation_id: e.string().max(255),
3303
+ step: e.string().max(255),
3304
+ outcome: gn,
3305
+ detail: e.record(e.string(), e.unknown()).nullable().optional(),
3306
+ attempt: e.number().int().min(1).default(1)
3307
+ }).extend({
3308
+ id: e.string(),
3309
+ created_at: e.string()
3310
+ });
3311
+ var _n = e.enum([
3312
+ "upgrade",
3313
+ "reseed",
3314
+ "backup"
3315
+ ]), vn = e.enum([
3316
+ "pending",
3317
+ "canary",
3318
+ "rolling",
3319
+ "paused",
3320
+ "done",
3321
+ "failed"
3322
+ ]);
3323
+ e.object({
3324
+ kind: _n,
3325
+ target_worker_version: e.string().max(255).nullable().optional(),
3326
+ target_database_version: e.string().max(255).nullable().optional(),
3327
+ wave_size: e.number().int().min(1).default(10),
3328
+ canary_tenant_ids: e.array(e.string()).nullable().optional(),
3329
+ filter: e.record(e.string(), e.unknown()).nullable().optional(),
3330
+ initiated_by: e.string().max(255).nullable().optional()
3331
+ }).extend({
3332
+ id: e.string(),
3333
+ status: vn,
3334
+ created_at: e.string(),
3335
+ updated_at: e.string(),
3336
+ finished_at: e.string().nullable().optional()
3337
+ }).pick({
3338
+ status: !0,
3339
+ wave_size: !0,
3340
+ canary_tenant_ids: !0,
3341
+ filter: !0,
3342
+ finished_at: !0
3343
+ }).partial(), e.object({
3344
+ access_token: e.string(),
3345
+ id_token: e.string().optional(),
3346
+ scope: e.string().optional(),
3347
+ state: e.string().optional(),
3348
+ refresh_token: e.string().optional(),
3349
+ token_type: e.string(),
3350
+ expires_in: e.number()
3351
+ }), e.object({
3352
+ code: e.string(),
3353
+ state: e.string().optional()
3354
+ });
3355
+ var yn = e.object({
3356
+ button_border_radius: e.number(),
3357
+ button_border_weight: e.number(),
3358
+ buttons_style: e.enum([
3359
+ "pill",
3360
+ "rounded",
3361
+ "sharp"
3362
+ ]),
3363
+ input_border_radius: e.number(),
3364
+ input_border_weight: e.number(),
3365
+ inputs_style: e.enum([
3366
+ "pill",
3367
+ "rounded",
3368
+ "sharp"
3369
+ ]),
3370
+ show_widget_shadow: e.boolean(),
3371
+ widget_border_weight: e.number(),
3372
+ widget_corner_radius: e.number()
3373
+ }), bn = e.object({
3374
+ base_focus_color: e.string(),
3375
+ base_hover_color: e.string(),
3376
+ body_text: e.string(),
3377
+ captcha_widget_theme: e.enum([
3378
+ "auto",
3379
+ "dark",
3380
+ "light"
3381
+ ]),
3382
+ error: e.string(),
3383
+ header: e.string(),
3384
+ icons: e.string(),
3385
+ input_background: e.string(),
3386
+ input_border: e.string(),
3387
+ input_filled_text: e.string(),
3388
+ input_labels_placeholders: e.string(),
3389
+ links_focused_components: e.string(),
3390
+ primary_button: e.string(),
3391
+ primary_button_label: e.string(),
3392
+ secondary_button_border: e.string(),
3393
+ secondary_button_label: e.string(),
3394
+ success: e.string(),
3395
+ widget_background: e.string(),
3396
+ widget_border: e.string()
3397
+ }), Z = e.object({
3398
+ bold: e.boolean(),
3399
+ size: e.number()
3400
+ }), xn = e.object({
3401
+ body_text: Z,
3402
+ buttons_text: Z,
3403
+ font_url: e.string(),
3404
+ input_labels: Z,
3405
+ links: Z,
3406
+ links_style: e.enum(["normal", "underlined"]),
3407
+ reference_text_size: e.number(),
3408
+ subtitle: Z,
3409
+ title: Z
3410
+ }), Sn = e.object({
3411
+ background_color: e.string(),
3412
+ background_image_url: e.string(),
3413
+ page_layout: e.enum([
3414
+ "center",
3415
+ "left",
3416
+ "right"
3417
+ ]),
3418
+ logo_placement: e.enum([
3419
+ "widget",
3420
+ "chip",
3421
+ "none"
3422
+ ]).optional()
3423
+ }), Cn = e.object({
3424
+ header_text_alignment: e.enum([
3425
+ "center",
3426
+ "left",
3427
+ "right"
3428
+ ]),
3429
+ logo_height: e.number(),
3430
+ logo_position: e.enum([
3431
+ "center",
3432
+ "left",
3433
+ "none",
3434
+ "right"
3435
+ ]),
3436
+ logo_url: e.string(),
3437
+ social_buttons_layout: e.enum(["bottom", "top"])
3438
+ });
3439
+ e.object({
3440
+ borders: yn,
3441
+ colors: bn,
3442
+ displayName: e.string(),
3443
+ fonts: xn,
3444
+ page_background: Sn,
3445
+ widget: Cn
3446
+ }).extend({ themeId: e.string() }), e.object({
3447
+ universal_login_experience: e.enum(["new", "classic"]).default("new"),
3448
+ identifier_first: e.boolean().default(!0),
3449
+ password_first: e.boolean().default(!1),
3450
+ webauthn_platform_first_factor: e.boolean()
3451
+ });
3452
+ var wn = e.object({
3453
+ hosts: e.array(e.string()).optional(),
3454
+ methods: e.array(e.string()).optional(),
3455
+ path: e.string().default("/*"),
3456
+ headers: e.record(e.string(), e.string()).optional(),
3457
+ query: e.record(e.string(), e.string()).optional()
3458
+ }), Tn = e.object({
3459
+ type: e.string(),
3460
+ options: e.record(e.string(), e.unknown()).default({})
3461
+ }), Q = e.object({
3462
+ id: e.string().optional(),
3463
+ custom_domain_id: e.string(),
3464
+ priority: e.number().int().default(100),
3465
+ match: wn,
3466
+ handlers: e.array(Tn).min(1)
3467
+ });
3468
+ Q.extend({
3469
+ id: e.string(),
3470
+ tenant_id: e.string(),
3471
+ created_at: e.string(),
3472
+ updated_at: e.string()
3473
+ }), Q.partial().omit({
3474
+ id: !0,
3475
+ custom_domain_id: !0
3476
+ }), e.object({
3477
+ name: e.string(),
3478
+ enabled: e.boolean().optional().default(!0),
3479
+ default_from_address: e.string().optional(),
3480
+ credentials: e.record(e.string(), e.unknown()),
3481
+ settings: e.object({}).optional()
3482
+ });
3483
+ var En = e.enum([
3484
+ "verify_email",
3485
+ "verify_email_by_code",
3486
+ "reset_email",
3487
+ "reset_email_by_code",
3488
+ "welcome_email",
3489
+ "blocked_account",
3490
+ "stolen_credentials",
3491
+ "enrollment_email",
3492
+ "mfa_oob_code",
3493
+ "change_password",
3494
+ "password_reset",
3495
+ "user_invitation"
3496
+ ]);
3497
+ e.object({
3498
+ template: En,
3499
+ body: e.string(),
3500
+ from: e.string(),
3501
+ subject: e.string(),
3502
+ syntax: e.literal("liquid").default("liquid"),
3503
+ resultUrl: e.string().optional(),
3504
+ urlLifetimeInSeconds: e.number().int().nonnegative().optional(),
3505
+ includeEmailInRedirect: e.boolean().default(!1),
3506
+ enabled: e.boolean().default(!0)
3507
+ }), e.object({
3508
+ id: e.string(),
3509
+ login_id: e.string(),
3510
+ user_id: e.string(),
3511
+ client_id: e.string(),
3512
+ expires_at: e.string().optional(),
3513
+ idle_expires_at: e.string().optional(),
3514
+ last_exchanged_at: e.string().optional(),
3515
+ device: X,
3516
+ resource_servers: e.array(e.object({
3517
+ audience: e.string(),
3518
+ scopes: e.string()
3519
+ })),
3520
+ rotating: e.boolean(),
3521
+ token_lookup: e.string().optional(),
3522
+ token_hash: e.string().optional(),
3523
+ family_id: e.string().optional(),
3524
+ rotated_to: e.string().optional(),
3525
+ rotated_at: e.string().optional()
3526
+ }).extend({
3527
+ created_at: e.string(),
3528
+ revoked_at: e.string().optional()
3529
+ }), e.object({
3530
+ to: e.string(),
3531
+ message: e.string()
3532
+ }), e.object({
3533
+ name: e.string(),
3534
+ options: e.object({})
3535
+ });
3536
+ var Dn = e.object({
3537
+ value: e.string(),
3538
+ description: e.string().optional()
3539
+ }), On = e.object({
3540
+ token_dialect: e.enum(["access_token", "access_token_authz"]).optional(),
3541
+ enforce_policies: e.boolean().optional(),
3542
+ allow_skipping_userinfo: e.boolean().optional(),
3543
+ skip_userinfo: e.boolean().optional(),
3544
+ persist_client_authorization: e.boolean().optional(),
3545
+ enable_introspection_endpoint: e.boolean().optional(),
3546
+ mtls: e.object({ bound_access_tokens: e.boolean().optional() }).optional()
3547
+ }), kn = e.object({
3548
+ id: e.string().optional(),
3549
+ name: e.string(),
3550
+ identifier: e.string(),
3551
+ scopes: e.array(Dn).optional(),
3552
+ signing_alg: e.string().optional(),
3553
+ signing_secret: e.string().optional(),
3554
+ token_lifetime: e.number().default(86400),
3555
+ token_lifetime_for_web: e.number().default(7200),
3556
+ skip_consent_for_verifiable_first_party_clients: e.boolean().optional(),
3557
+ allow_offline_access: e.boolean().optional(),
3558
+ verificationKey: e.string().optional(),
3559
+ options: On.optional(),
3560
+ is_system: e.boolean().optional(),
3561
+ metadata: e.record(e.string(), e.any()).optional()
3562
+ }).extend({
3563
+ created_at: e.string().optional(),
3564
+ updated_at: e.string().optional()
3565
+ });
3566
+ e.array(kn);
3567
+ var An = e.object({
3568
+ role_id: e.string(),
3569
+ resource_server_identifier: e.string(),
3570
+ permission_name: e.string()
3571
+ }).extend({ created_at: e.string() });
3572
+ e.array(An), e.object({
3573
+ user_id: e.string().openapi({ description: "The id of the user that granted the consent" }),
3574
+ clientID: e.string().openapi({ description: "The id of the client the grant was issued to" }),
3575
+ audience: e.string().optional().openapi({ description: "The audience the grant applies to" }),
3576
+ scope: e.array(e.string()).default([]).openapi({ description: "The list of OAuth scopes the user has consented to" })
3577
+ }).extend({ id: e.string() }), e.object({
3578
+ user_id: e.string(),
3579
+ last_login: e.string().optional(),
3580
+ last_ip: e.string().optional(),
3581
+ login_count: e.number().default(0),
3582
+ failed_logins: e.array(e.string()).optional(),
3583
+ last_password_reset: e.string().optional()
3584
+ });
3585
+ var jn = e.object({
3586
+ user_id: e.string(),
3587
+ resource_server_identifier: e.string(),
3588
+ permission_name: e.string(),
3589
+ organization_id: e.string().optional()
3590
+ }).extend({
3591
+ tenant_id: e.string(),
3592
+ created_at: e.string().optional()
3593
+ });
3594
+ e.array(jn);
3595
+ var Mn = e.object({
3596
+ user_id: e.string(),
3597
+ resource_server_identifier: e.string(),
3598
+ resource_server_name: e.string(),
3599
+ permission_name: e.string(),
3600
+ description: e.string().nullable().optional(),
3601
+ created_at: e.string().optional(),
3602
+ organization_id: e.string().optional()
3603
+ });
3604
+ e.array(Mn);
3605
+ var Nn = e.object({
3606
+ user_id: e.string(),
3607
+ role_id: e.string(),
3608
+ organization_id: e.string().optional()
3609
+ }).extend({
3610
+ tenant_id: e.string(),
3611
+ created_at: e.string().optional()
3612
+ });
3613
+ e.array(Nn);
3614
+ var Pn = e.object({
3615
+ id: e.string().optional().openapi({ description: "The unique identifier of the role. If not provided, one will be generated." }),
3616
+ name: e.string().min(1).max(50).openapi({ description: "The name of the role. Cannot include '<' or '>'" }),
3617
+ description: e.string().max(255).optional().openapi({ description: "The description of the role" }),
3618
+ is_system: e.boolean().optional(),
3619
+ metadata: e.record(e.string(), e.any()).optional().openapi({ description: "Metadata associated with the role. Can be used to control sync behavior in multi-tenancy scenarios." })
3620
+ }).extend({
3621
+ id: e.string().openapi({ description: "The unique identifier of the role" }),
3622
+ created_at: e.string().optional(),
3623
+ updated_at: e.string().optional()
3624
+ });
3625
+ e.array(Pn);
3626
+ var Fn = e.object({
3627
+ logo_url: e.string().optional().openapi({ description: "URL of the organization's logo" }),
3628
+ colors: e.object({
3629
+ primary: e.string().optional().openapi({ description: "Primary color in hex format (e.g., #FF0000)" }),
3630
+ page_background: e.string().optional().openapi({ description: "Page background color in hex format (e.g., #FFFFFF)" })
3631
+ }).optional()
3632
+ }).optional(), In = e.object({
3633
+ connection_id: e.string().openapi({ description: "ID of the connection" }),
3634
+ assign_membership_on_login: e.boolean().default(!1).openapi({ description: "Whether to assign membership to the organization on login" }),
3635
+ show_as_button: e.boolean().default(!0).openapi({ description: "Whether to show this connection as a button in the login screen" }),
3636
+ is_signup_enabled: e.boolean().default(!0).openapi({ description: "Whether signup is enabled for this connection" })
3637
+ }), Ln = e.object({ client_credentials: e.object({
3638
+ enforce: e.boolean().default(!1).openapi({ description: "Whether to enforce token quota limits" }),
3639
+ per_day: e.number().min(0).default(0).openapi({ description: "Maximum tokens per day (0 = unlimited)" }),
3640
+ per_hour: e.number().min(0).default(0).openapi({ description: "Maximum tokens per hour (0 = unlimited)" })
3641
+ }).optional() }).optional();
3642
+ e.object({
3643
+ id: e.string().optional(),
3644
+ 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." }),
3645
+ display_name: e.string().optional().openapi({ description: "The display name of the organization" }),
3646
+ branding: Fn,
3647
+ metadata: e.record(e.string(), e.any()).default({}).optional().openapi({ description: "Custom metadata for the organization" }),
3648
+ enabled_connections: e.array(In).default([]).optional().openapi({ description: "List of enabled connections for the organization" }),
3649
+ token_quota: Ln
3650
+ }).extend(C.shape).extend({
3651
+ id: e.string(),
3652
+ name: e.string().min(1).openapi({ description: "The name of the organization" })
3653
+ });
3654
+ var Rn = e.object({
3655
+ connection_id: e.string().openapi({ description: "ID of the tenant-level connection to enable for the org." }),
3656
+ assign_membership_on_login: e.boolean().optional().default(!1),
3657
+ show_as_button: e.boolean().optional().default(!0),
3658
+ is_signup_enabled: e.boolean().optional().default(!0)
3659
+ }).extend({
3660
+ connection: e.object({
3661
+ name: e.string().optional(),
3662
+ strategy: e.string().optional()
3663
+ }).optional(),
3664
+ created_at: e.string().optional(),
3665
+ updated_at: e.string().optional()
3666
+ });
3667
+ e.array(Rn), e.object({
3668
+ user_id: e.string().openapi({ description: "ID of the user" }),
3669
+ organization_id: e.string().openapi({ description: "ID of the organization" })
3670
+ }).extend(C.shape).extend({ id: e.string() }), e.object({
3671
+ idle_session_lifetime: e.number().default(72),
3672
+ session_lifetime: e.number().default(168),
3673
+ session_cookie: e.object({ mode: e.enum(["persistent", "non-persistent"]).optional() }).optional(),
3674
+ enable_client_connections: e.boolean().optional(),
3675
+ default_redirection_uri: e.string().optional(),
3676
+ enabled_locales: e.array(e.string()).optional(),
3677
+ default_directory: e.string().optional(),
3678
+ error_page: e.object({
3679
+ html: e.string().optional(),
3680
+ show_log_link: e.boolean().optional(),
3681
+ url: e.string().optional()
3682
+ }).optional(),
3683
+ flags: e.object({
3684
+ allow_legacy_delegation_grant_types: e.boolean().optional(),
3685
+ allow_legacy_ro_grant_types: e.boolean().optional(),
3686
+ allow_legacy_tokeninfo_endpoint: e.boolean().optional(),
3687
+ disable_clickjack_protection_headers: e.boolean().optional(),
3688
+ enable_apis_section: e.boolean().optional(),
3689
+ enable_client_connections: e.boolean().optional(),
3690
+ enable_custom_domain_in_emails: e.boolean().optional(),
3691
+ enable_dynamic_client_registration: e.boolean().optional(),
3692
+ enable_idtoken_api2: e.boolean().optional(),
3693
+ enable_legacy_logs_search_v2: e.boolean().optional(),
3694
+ enable_legacy_profile: e.boolean().optional(),
3695
+ enable_pipeline2: e.boolean().optional(),
3696
+ enable_public_signup_user_exists_error: e.boolean().optional(),
3697
+ use_scope_descriptions_for_consent: e.boolean().optional(),
3698
+ disable_management_api_sms_obfuscation: e.boolean().optional(),
3699
+ enable_adfs_waad_email_verification: e.boolean().optional(),
3700
+ revoke_refresh_token_grant: e.boolean().optional(),
3701
+ dashboard_log_streams_next: e.boolean().optional(),
3702
+ dashboard_insights_view: e.boolean().optional(),
3703
+ disable_fields_map_fix: e.boolean().optional(),
3704
+ mfa_show_factor_list_on_enrollment: e.boolean().optional()
3705
+ }).optional(),
3706
+ friendly_name: e.string().optional(),
3707
+ picture_url: e.string().optional(),
3708
+ support_email: e.string().optional(),
3709
+ support_url: e.string().optional(),
3710
+ sandbox_version: e.string().optional(),
3711
+ sandbox_versions_available: e.array(e.string()).optional(),
3712
+ change_password: e.object({
3713
+ enabled: e.boolean(),
3714
+ html: e.string()
3715
+ }).optional(),
3716
+ guardian_mfa_page: e.object({
3717
+ enabled: e.boolean(),
3718
+ html: e.string()
3719
+ }).optional(),
3720
+ default_audience: e.string().optional(),
3721
+ default_organization: e.string().optional(),
3722
+ sessions: e.object({ oidc_logout_prompt_enabled: e.boolean().optional() }).optional(),
3723
+ mfa: e.object({
3724
+ policy: e.enum(["never", "always"]).default("never").optional(),
3725
+ factors: e.object({
3726
+ sms: e.boolean().default(!1),
3727
+ otp: e.boolean().default(!1),
3728
+ email: e.boolean().default(!1),
3729
+ push_notification: e.boolean().default(!1),
3730
+ webauthn_roaming: e.boolean().default(!1),
3731
+ webauthn_platform: e.boolean().default(!1),
3732
+ recovery_code: e.boolean().default(!1),
3733
+ duo: e.boolean().default(!1)
3734
+ }).optional(),
3735
+ sms_provider: e.object({ provider: e.enum([
3736
+ "twilio",
3737
+ "vonage",
3738
+ "aws_sns",
3739
+ "phone_message_hook"
3740
+ ]).optional() }).optional(),
3741
+ twilio: e.object({
3742
+ sid: e.string().optional(),
3743
+ auth_token: e.string().optional(),
3744
+ from: e.string().optional(),
3745
+ messaging_service_sid: e.string().optional()
3746
+ }).optional(),
3747
+ phone_message: e.object({ message: e.string().optional() }).optional()
3748
+ }).optional()
3749
+ }), e.object({
3750
+ date: e.string().openapi({
3751
+ description: "Date these events occurred in ISO 8601 format",
3752
+ example: "2025-12-19"
3753
+ }),
3754
+ logins: e.number().openapi({
3755
+ description: "Number of logins on this date",
3756
+ example: 150
3757
+ }),
3758
+ signups: e.number().openapi({
3759
+ description: "Number of signups on this date",
3760
+ example: 25
3761
+ }),
3762
+ leaked_passwords: e.number().openapi({
3763
+ description: "Number of breached-password detections on this date (subscription required)",
3764
+ example: 0
3765
+ }),
3766
+ updated_at: e.string().openapi({
3767
+ description: "Date and time this stats entry was last updated in ISO 8601 format",
3768
+ example: "2025-12-19T10:30:00.000Z"
3769
+ }),
3770
+ created_at: e.string().openapi({
3771
+ description: "Approximate date and time the first event occurred in ISO 8601 format",
3772
+ example: "2025-12-19T00:00:00.000Z"
3773
+ })
3774
+ }), e.number().openapi({
3775
+ description: "Number of active users in the last 30 days",
3776
+ example: 1234
3777
+ }), e.enum([
3778
+ "active-users",
3779
+ "logins",
3780
+ "signups",
3781
+ "refresh-tokens",
3782
+ "sessions",
3783
+ "logouts",
3784
+ "password-changes",
3785
+ "password-migrations",
3786
+ "mfa",
3787
+ "email-verifications",
3788
+ "codes-sent"
3789
+ ]), e.enum([
3790
+ "hour",
3791
+ "day",
3792
+ "week",
3793
+ "month"
3794
+ ]), e.enum([
3795
+ "time",
3796
+ "connection",
3797
+ "client_id",
3798
+ "user_type",
3799
+ "event"
3800
+ ]), e.enum([
3801
+ "password",
3802
+ "social",
3803
+ "passwordless",
3804
+ "enterprise"
3805
+ ]);
3806
+ var zn = e.object({
3807
+ name: e.string(),
3808
+ type: e.string()
3809
+ }), Bn = e.object({
3810
+ elapsed: e.number(),
3811
+ rows_read: e.number().optional(),
3812
+ bytes_read: e.number().optional()
3813
+ });
3814
+ e.object({
3815
+ meta: e.array(zn),
3816
+ data: e.array(e.record(e.string(), e.any())),
3817
+ rows: e.number(),
3818
+ rows_before_limit_at_least: e.number().optional(),
3819
+ statistics: Bn.optional()
3820
+ });
3821
+ var Vn = 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(".")), Hn = e.record(e.string(), e.record(e.string(), e.string())).openapi({
3822
+ type: "object",
3823
+ additionalProperties: {
3824
+ type: "object",
3825
+ additionalProperties: { type: "string" }
1393
3826
  }
1394
- }, T = new w("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/");
1395
- new w("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_");
3827
+ });
3828
+ e.object({
3829
+ prompt: Vn,
3830
+ language: e.string(),
3831
+ custom_text: Hn
3832
+ });
3833
+ var Un = e.enum([
3834
+ "phone",
3835
+ "totp",
3836
+ "email",
3837
+ "push",
3838
+ "webauthn-roaming",
3839
+ "webauthn-platform",
3840
+ "passkey"
3841
+ ]), $ = e.object({
3842
+ user_id: e.string(),
3843
+ type: Un,
3844
+ phone_number: e.string().optional(),
3845
+ totp_secret: e.string().optional(),
3846
+ credential_id: e.string().optional(),
3847
+ public_key: e.string().optional(),
3848
+ sign_count: e.number().int().nonnegative().optional(),
3849
+ credential_backed_up: e.boolean().optional(),
3850
+ transports: e.array(e.string()).optional(),
3851
+ friendly_name: e.string().optional(),
3852
+ confirmed: e.boolean().default(!1)
3853
+ });
3854
+ function Wn(t, n) {
3855
+ t.type === "phone" && !t.phone_number && n.addIssue({
3856
+ code: e.ZodIssueCode.custom,
3857
+ message: "phone_number is required when type is 'phone'",
3858
+ path: ["phone_number"]
3859
+ }), t.type === "totp" && !t.totp_secret && n.addIssue({
3860
+ code: e.ZodIssueCode.custom,
3861
+ message: "totp_secret is required when type is 'totp'",
3862
+ path: ["totp_secret"]
3863
+ }), [
3864
+ "webauthn-roaming",
3865
+ "webauthn-platform",
3866
+ "passkey"
3867
+ ].includes(t.type) && (t.credential_id || n.addIssue({
3868
+ code: e.ZodIssueCode.custom,
3869
+ message: `credential_id is required when type is '${t.type}'`,
3870
+ path: ["credential_id"]
3871
+ }), t.public_key || n.addIssue({
3872
+ code: e.ZodIssueCode.custom,
3873
+ message: `public_key is required when type is '${t.type}'`,
3874
+ path: ["public_key"]
3875
+ }));
3876
+ }
3877
+ $.superRefine(Wn), $.extend({
3878
+ id: e.string(),
3879
+ created_at: e.string(),
3880
+ updated_at: e.string()
3881
+ }).superRefine(Wn), e.object({
3882
+ id: e.string().optional(),
3883
+ created_at: e.string().datetime({ offset: !0 }).optional(),
3884
+ updated_at: e.string().datetime({ offset: !0 }).optional()
3885
+ });
3886
+ function Gn(e) {
3887
+ let t = atob(e), n = new Uint8Array(t.length);
3888
+ for (let e = 0; e < t.length; e++) n[e] = t.charCodeAt(e);
3889
+ return n;
3890
+ }
1396
3891
  //#endregion
1397
- //#region ../../node_modules/.pnpm/nanoid@5.1.11/node_modules/nanoid/url-alphabet/index.js
1398
- var E = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", D = (e = 21) => {
3892
+ //#region ../../node_modules/.pnpm/nanoid@5.1.16/node_modules/nanoid/url-alphabet/index.js
3893
+ var Kn = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", qn = (e = 21) => {
1399
3894
  let t = "", n = crypto.getRandomValues(new Uint8Array(e |= 0));
1400
- for (; e--;) t += E[n[e] & 63];
3895
+ for (; e--;) t += Kn[n[e] & 63];
1401
3896
  return t;
1402
3897
  };
1403
3898
  //#endregion
1404
3899
  //#region src/helpers.ts
1405
- async function O(e) {
3900
+ async function Jn(e) {
1406
3901
  let t = new DecompressionStream("deflate-raw"), n = new Uint8Array(e), r = new Blob([n]).stream().pipeThrough(t);
1407
3902
  return new Uint8Array(await new Response(r).arrayBuffer());
1408
3903
  }
1409
- async function k(e) {
1410
- let t = await T.decode(e.replace(/ /g, "+"));
3904
+ async function Yn(e) {
3905
+ let t = Gn(e.replace(/ /g, "+"));
1411
3906
  try {
1412
- let e = await O(t);
3907
+ let e = await Jn(t);
1413
3908
  return new TextDecoder().decode(e);
1414
3909
  } catch (e) {
1415
3910
  return console.warn("Decompression failed, assuming data is not compressed:", e), new TextDecoder().decode(t);
1416
3911
  }
1417
3912
  }
1418
- async function A(e) {
1419
- let t = await k(e), n = new S.XMLParser({
3913
+ async function Xn(e) {
3914
+ let t = await Yn(e), n = new S.XMLParser({
1420
3915
  attributeNamePrefix: "@_",
1421
3916
  alwaysCreateTextNode: !0,
1422
3917
  ignoreAttributes: !1
1423
3918
  }).parse(t);
1424
3919
  return i.parse(n);
1425
3920
  }
1426
- function j(e) {
3921
+ function Zn(e) {
1427
3922
  let t = e.certificates.map((e) => ({
1428
3923
  "@_use": "signing",
1429
3924
  KeyInfo: {
@@ -1497,8 +3992,8 @@ function j(e) {
1497
3992
  attributeNamePrefix: "@_"
1498
3993
  }).build(n);
1499
3994
  }
1500
- async function M(e, t) {
1501
- let n = e.notBefore || (/* @__PURE__ */ new Date()).toISOString(), r = e.notAfter || new Date(new Date(n).getTime() + 600 * 1e3).toISOString(), i = e.issueInstant || n, a = e.sessionNotOnOrAfter || r, o = e.responseId || `_${D()}`, s = e.assertionId || `_${D()}`, c = [{
3995
+ async function Qn(e, t) {
3996
+ let n = e.notBefore || (/* @__PURE__ */ new Date()).toISOString(), r = e.notAfter || new Date(new Date(n).getTime() + 600 * 1e3).toISOString(), i = e.issueInstant || n, a = e.sessionNotOnOrAfter || r, o = e.responseId || `_${qn()}`, s = e.assertionId || `_${qn()}`, c = [{
1502
3997
  "samlp:Response": [
1503
3998
  { "saml:Issuer": [{ "#text": e.issuer }] },
1504
3999
  { "samlp:Status": [{
@@ -1679,7 +4174,7 @@ async function M(e, t) {
1679
4174
  }
1680
4175
  //#endregion
1681
4176
  //#region src/signers/http.ts
1682
- var N = class {
4177
+ var $n = class {
1683
4178
  signUrl;
1684
4179
  constructor(e) {
1685
4180
  this.signUrl = e;
@@ -1699,4 +4194,4 @@ var N = class {
1699
4194
  }
1700
4195
  };
1701
4196
  //#endregion
1702
- export { N as HttpSamlSigner, j as createSamlMetadata, M as createSamlResponse, c as dsSignatureSchema, k as inflateDecompress, O as inflateRaw, A as parseSamlRequestQuery, r as samlIssuerSchema, a as samlMetadataResponseSchema, i as samlRequestSchema, l as samlResponseJsonSchema };
4197
+ export { $n as HttpSamlSigner, Zn as createSamlMetadata, Qn as createSamlResponse, c as dsSignatureSchema, Yn as inflateDecompress, Jn as inflateRaw, Xn as parseSamlRequestQuery, r as samlIssuerSchema, a as samlMetadataResponseSchema, i as samlRequestSchema, l as samlResponseJsonSchema };