@learncard/network-brain-client 2.5.51 → 2.5.53
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/brain-client.cjs.development.cjs +1794 -1694
- package/dist/brain-client.cjs.development.cjs.map +2 -2
- package/dist/brain-client.cjs.production.min.cjs +17 -13
- package/dist/brain-client.cjs.production.min.cjs.map +3 -3
- package/dist/brain-client.esm.js +149 -83
- package/dist/brain-client.esm.js.map +3 -3
- package/dist/callbackLink.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +7 -6
package/dist/brain-client.esm.js
CHANGED
|
@@ -15736,9 +15736,8 @@ __name(date4, "date");
|
|
|
15736
15736
|
config(en_default());
|
|
15737
15737
|
|
|
15738
15738
|
// ../../../node_modules/js-base64/base64.mjs
|
|
15739
|
-
var version2 = "3.
|
|
15739
|
+
var version2 = "3.9.3";
|
|
15740
15740
|
var VERSION = version2;
|
|
15741
|
-
var _hasBuffer = typeof Buffer === "function";
|
|
15742
15741
|
var _TD = typeof TextDecoder === "function" ? new TextDecoder("utf-8", { ignoreBOM: true }) : void 0;
|
|
15743
15742
|
var _TE = typeof TextEncoder === "function" ? new TextEncoder() : void 0;
|
|
15744
15743
|
var b64ch = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
|
|
@@ -15764,8 +15763,8 @@ var btoaPolyfill = /* @__PURE__ */ __name((bin) => {
|
|
|
15764
15763
|
}
|
|
15765
15764
|
return pad ? asc.slice(0, pad - 3) + "===".substring(pad) : asc;
|
|
15766
15765
|
}, "btoaPolyfill");
|
|
15767
|
-
var _btoa = typeof btoa === "function" ? (bin) => btoa(bin) :
|
|
15768
|
-
var _fromUint8Array =
|
|
15766
|
+
var _btoa = typeof btoa === "function" ? (bin) => btoa(bin) : btoaPolyfill;
|
|
15767
|
+
var _fromUint8Array = typeof Uint8Array.prototype.toBase64 === "function" ? (u8a) => u8a.toBase64() : (u8a) => {
|
|
15769
15768
|
const maxargs = 4096;
|
|
15770
15769
|
let strs = [];
|
|
15771
15770
|
for (let i = 0, l = u8a.length; i < l; i += maxargs) {
|
|
@@ -15783,9 +15782,9 @@ var cb_utob = /* @__PURE__ */ __name((c) => {
|
|
|
15783
15782
|
return _fromCC(240 | cc >>> 18 & 7) + _fromCC(128 | cc >>> 12 & 63) + _fromCC(128 | cc >>> 6 & 63) + _fromCC(128 | cc & 63);
|
|
15784
15783
|
}
|
|
15785
15784
|
}, "cb_utob");
|
|
15786
|
-
var re_utob = /[\uD800-\uDBFF][\uDC00-\
|
|
15785
|
+
var re_utob = /[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\x00-\x7F]/g;
|
|
15787
15786
|
var utob = /* @__PURE__ */ __name((u) => u.replace(re_utob, cb_utob), "utob");
|
|
15788
|
-
var _encode2 =
|
|
15787
|
+
var _encode2 = _TE ? (s) => _fromUint8Array(_TE.encode(s)) : (s) => _btoa(utob(s));
|
|
15789
15788
|
var encode3 = /* @__PURE__ */ __name((src, urlsafe = false) => urlsafe ? _mkUriSafe(_encode2(src)) : _encode2(src), "encode");
|
|
15790
15789
|
var encodeURI = /* @__PURE__ */ __name((src) => encode3(src, true), "encodeURI");
|
|
15791
15790
|
var re_btou = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g;
|
|
@@ -15820,10 +15819,10 @@ var atobPolyfill = /* @__PURE__ */ __name((asc) => {
|
|
|
15820
15819
|
}
|
|
15821
15820
|
return binArray.join("");
|
|
15822
15821
|
}, "atobPolyfill");
|
|
15823
|
-
var _atob = typeof atob === "function" ? (asc) => atob(_tidyB64(asc)) :
|
|
15824
|
-
var _toUint8Array =
|
|
15822
|
+
var _atob = typeof atob === "function" ? (asc) => atob(_tidyB64(asc)) : atobPolyfill;
|
|
15823
|
+
var _toUint8Array = typeof Uint8Array.fromBase64 === "function" ? (a) => Uint8Array.fromBase64(a) : (a) => _U8Afrom(_atob(a).split("").map((c) => c.charCodeAt(0)));
|
|
15825
15824
|
var toUint8Array = /* @__PURE__ */ __name((a) => _toUint8Array(_unURI(a)), "toUint8Array");
|
|
15826
|
-
var _decode2 =
|
|
15825
|
+
var _decode2 = _TD ? (a) => _TD.decode(_toUint8Array(a)) : (a) => btou(_atob(a));
|
|
15827
15826
|
var _unURI = /* @__PURE__ */ __name((a) => _tidyB64(a.replace(/[-_]/g, (m0) => m0 == "-" ? "+" : "/")), "_unURI");
|
|
15828
15827
|
var decode3 = /* @__PURE__ */ __name((src) => _decode2(_unURI(src)), "decode");
|
|
15829
15828
|
var isValid = /* @__PURE__ */ __name((src) => {
|
|
@@ -16097,6 +16096,12 @@ var require_types_cjs_development = __commonJS({
|
|
|
16097
16096
|
LCNBoostClaimLinkSigningAuthorityValidator: /* @__PURE__ */ __name2(() => LCNBoostClaimLinkSigningAuthorityValidator, "LCNBoostClaimLinkSigningAuthorityValidator"),
|
|
16098
16097
|
LCNBoostStatus: /* @__PURE__ */ __name2(() => LCNBoostStatus, "LCNBoostStatus"),
|
|
16099
16098
|
LCNConnectionProfileValidator: /* @__PURE__ */ __name2(() => LCNConnectionProfileValidator, "LCNConnectionProfileValidator"),
|
|
16099
|
+
LCNConnectionPromptActionResultValidator: /* @__PURE__ */ __name2(() => LCNConnectionPromptActionResultValidator, "LCNConnectionPromptActionResultValidator"),
|
|
16100
|
+
LCNConnectionPromptActionStatusValidator: /* @__PURE__ */ __name2(() => LCNConnectionPromptActionStatusValidator, "LCNConnectionPromptActionStatusValidator"),
|
|
16101
|
+
LCNConnectionPromptMetadataValidator: /* @__PURE__ */ __name2(() => LCNConnectionPromptMetadataValidator, "LCNConnectionPromptMetadataValidator"),
|
|
16102
|
+
LCNConnectionPromptStatusValidator: /* @__PURE__ */ __name2(() => LCNConnectionPromptStatusValidator, "LCNConnectionPromptStatusValidator"),
|
|
16103
|
+
LCNConnectionPromptSurfaceValidator: /* @__PURE__ */ __name2(() => LCNConnectionPromptSurfaceValidator, "LCNConnectionPromptSurfaceValidator"),
|
|
16104
|
+
LCNConnectionPromptValidator: /* @__PURE__ */ __name2(() => LCNConnectionPromptValidator, "LCNConnectionPromptValidator"),
|
|
16100
16105
|
LCNDomainOrOriginValidator: /* @__PURE__ */ __name2(() => LCNDomainOrOriginValidator, "LCNDomainOrOriginValidator"),
|
|
16101
16106
|
LCNInboxContactMethodValidator: /* @__PURE__ */ __name2(() => LCNInboxContactMethodValidator, "LCNInboxContactMethodValidator"),
|
|
16102
16107
|
LCNInboxStatusEnumValidator: /* @__PURE__ */ __name2(() => LCNInboxStatusEnumValidator, "LCNInboxStatusEnumValidator"),
|
|
@@ -16108,6 +16113,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
16108
16113
|
LCNNotificationDataValidator: /* @__PURE__ */ __name2(() => LCNNotificationDataValidator, "LCNNotificationDataValidator"),
|
|
16109
16114
|
LCNNotificationInboxValidator: /* @__PURE__ */ __name2(() => LCNNotificationInboxValidator, "LCNNotificationInboxValidator"),
|
|
16110
16115
|
LCNNotificationMessageValidator: /* @__PURE__ */ __name2(() => LCNNotificationMessageValidator, "LCNNotificationMessageValidator"),
|
|
16116
|
+
LCNNotificationMetadataValidator: /* @__PURE__ */ __name2(() => LCNNotificationMetadataValidator, "LCNNotificationMetadataValidator"),
|
|
16111
16117
|
LCNNotificationTypeEnumValidator: /* @__PURE__ */ __name2(() => LCNNotificationTypeEnumValidator, "LCNNotificationTypeEnumValidator"),
|
|
16112
16118
|
LCNNotificationValidator: /* @__PURE__ */ __name2(() => LCNNotificationValidator, "LCNNotificationValidator"),
|
|
16113
16119
|
LCNProfileConnectionStatusEnum: /* @__PURE__ */ __name2(() => LCNProfileConnectionStatusEnum, "LCNProfileConnectionStatusEnum"),
|
|
@@ -31416,7 +31422,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31416
31422
|
var ZodFirstPartyTypeKind2;
|
|
31417
31423
|
/* @__PURE__ */ (function(ZodFirstPartyTypeKind22) {
|
|
31418
31424
|
})(ZodFirstPartyTypeKind2 || (ZodFirstPartyTypeKind2 = {}));
|
|
31419
|
-
var
|
|
31425
|
+
var z3 = {
|
|
31420
31426
|
...schemas_exports22,
|
|
31421
31427
|
...checks_exports22,
|
|
31422
31428
|
iso: iso_exports2
|
|
@@ -31532,7 +31538,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31532
31538
|
function convertBaseSchema2(schema, ctx) {
|
|
31533
31539
|
if (schema.not !== void 0) {
|
|
31534
31540
|
if (typeof schema.not === "object" && Object.keys(schema.not).length === 0) {
|
|
31535
|
-
return
|
|
31541
|
+
return z3.never();
|
|
31536
31542
|
}
|
|
31537
31543
|
throw new Error("not is not supported in Zod (except { not: {} } for never)");
|
|
31538
31544
|
}
|
|
@@ -31554,7 +31560,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31554
31560
|
return ctx.refs.get(refPath);
|
|
31555
31561
|
}
|
|
31556
31562
|
if (ctx.processing.has(refPath)) {
|
|
31557
|
-
return
|
|
31563
|
+
return z3.lazy(() => {
|
|
31558
31564
|
if (!ctx.refs.has(refPath)) {
|
|
31559
31565
|
throw new Error(`Circular reference not resolved: ${refPath}`);
|
|
31560
31566
|
}
|
|
@@ -31571,25 +31577,25 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31571
31577
|
if (schema.enum !== void 0) {
|
|
31572
31578
|
const enumValues = schema.enum;
|
|
31573
31579
|
if (ctx.version === "openapi-3.0" && schema.nullable === true && enumValues.length === 1 && enumValues[0] === null) {
|
|
31574
|
-
return
|
|
31580
|
+
return z3.null();
|
|
31575
31581
|
}
|
|
31576
31582
|
if (enumValues.length === 0) {
|
|
31577
|
-
return
|
|
31583
|
+
return z3.never();
|
|
31578
31584
|
}
|
|
31579
31585
|
if (enumValues.length === 1) {
|
|
31580
|
-
return
|
|
31586
|
+
return z3.literal(enumValues[0]);
|
|
31581
31587
|
}
|
|
31582
31588
|
if (enumValues.every((v) => typeof v === "string")) {
|
|
31583
|
-
return
|
|
31589
|
+
return z3.enum(enumValues);
|
|
31584
31590
|
}
|
|
31585
|
-
const literalSchemas = enumValues.map((v) =>
|
|
31591
|
+
const literalSchemas = enumValues.map((v) => z3.literal(v));
|
|
31586
31592
|
if (literalSchemas.length < 2) {
|
|
31587
31593
|
return literalSchemas[0];
|
|
31588
31594
|
}
|
|
31589
|
-
return
|
|
31595
|
+
return z3.union([literalSchemas[0], literalSchemas[1], ...literalSchemas.slice(2)]);
|
|
31590
31596
|
}
|
|
31591
31597
|
if (schema.const !== void 0) {
|
|
31592
|
-
return
|
|
31598
|
+
return z3.literal(schema.const);
|
|
31593
31599
|
}
|
|
31594
31600
|
const type = schema.type;
|
|
31595
31601
|
if (Array.isArray(type)) {
|
|
@@ -31598,68 +31604,68 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31598
31604
|
return convertBaseSchema2(typeSchema, ctx);
|
|
31599
31605
|
});
|
|
31600
31606
|
if (typeSchemas.length === 0) {
|
|
31601
|
-
return
|
|
31607
|
+
return z3.never();
|
|
31602
31608
|
}
|
|
31603
31609
|
if (typeSchemas.length === 1) {
|
|
31604
31610
|
return typeSchemas[0];
|
|
31605
31611
|
}
|
|
31606
|
-
return
|
|
31612
|
+
return z3.union(typeSchemas);
|
|
31607
31613
|
}
|
|
31608
31614
|
if (!type) {
|
|
31609
|
-
return
|
|
31615
|
+
return z3.any();
|
|
31610
31616
|
}
|
|
31611
31617
|
let zodSchema;
|
|
31612
31618
|
switch (type) {
|
|
31613
31619
|
case "string": {
|
|
31614
|
-
let stringSchema =
|
|
31620
|
+
let stringSchema = z3.string();
|
|
31615
31621
|
if (schema.format) {
|
|
31616
31622
|
const format = schema.format;
|
|
31617
31623
|
if (format === "email") {
|
|
31618
|
-
stringSchema = stringSchema.check(
|
|
31624
|
+
stringSchema = stringSchema.check(z3.email());
|
|
31619
31625
|
} else if (format === "uri" || format === "uri-reference") {
|
|
31620
|
-
stringSchema = stringSchema.check(
|
|
31626
|
+
stringSchema = stringSchema.check(z3.url());
|
|
31621
31627
|
} else if (format === "uuid" || format === "guid") {
|
|
31622
|
-
stringSchema = stringSchema.check(
|
|
31628
|
+
stringSchema = stringSchema.check(z3.uuid());
|
|
31623
31629
|
} else if (format === "date-time") {
|
|
31624
|
-
stringSchema = stringSchema.check(
|
|
31630
|
+
stringSchema = stringSchema.check(z3.iso.datetime());
|
|
31625
31631
|
} else if (format === "date") {
|
|
31626
|
-
stringSchema = stringSchema.check(
|
|
31632
|
+
stringSchema = stringSchema.check(z3.iso.date());
|
|
31627
31633
|
} else if (format === "time") {
|
|
31628
|
-
stringSchema = stringSchema.check(
|
|
31634
|
+
stringSchema = stringSchema.check(z3.iso.time());
|
|
31629
31635
|
} else if (format === "duration") {
|
|
31630
|
-
stringSchema = stringSchema.check(
|
|
31636
|
+
stringSchema = stringSchema.check(z3.iso.duration());
|
|
31631
31637
|
} else if (format === "ipv4") {
|
|
31632
|
-
stringSchema = stringSchema.check(
|
|
31638
|
+
stringSchema = stringSchema.check(z3.ipv4());
|
|
31633
31639
|
} else if (format === "ipv6") {
|
|
31634
|
-
stringSchema = stringSchema.check(
|
|
31640
|
+
stringSchema = stringSchema.check(z3.ipv6());
|
|
31635
31641
|
} else if (format === "mac") {
|
|
31636
|
-
stringSchema = stringSchema.check(
|
|
31642
|
+
stringSchema = stringSchema.check(z3.mac());
|
|
31637
31643
|
} else if (format === "cidr") {
|
|
31638
|
-
stringSchema = stringSchema.check(
|
|
31644
|
+
stringSchema = stringSchema.check(z3.cidrv4());
|
|
31639
31645
|
} else if (format === "cidr-v6") {
|
|
31640
|
-
stringSchema = stringSchema.check(
|
|
31646
|
+
stringSchema = stringSchema.check(z3.cidrv6());
|
|
31641
31647
|
} else if (format === "base64") {
|
|
31642
|
-
stringSchema = stringSchema.check(
|
|
31648
|
+
stringSchema = stringSchema.check(z3.base64());
|
|
31643
31649
|
} else if (format === "base64url") {
|
|
31644
|
-
stringSchema = stringSchema.check(
|
|
31650
|
+
stringSchema = stringSchema.check(z3.base64url());
|
|
31645
31651
|
} else if (format === "e164") {
|
|
31646
|
-
stringSchema = stringSchema.check(
|
|
31652
|
+
stringSchema = stringSchema.check(z3.e164());
|
|
31647
31653
|
} else if (format === "jwt") {
|
|
31648
|
-
stringSchema = stringSchema.check(
|
|
31654
|
+
stringSchema = stringSchema.check(z3.jwt());
|
|
31649
31655
|
} else if (format === "emoji") {
|
|
31650
|
-
stringSchema = stringSchema.check(
|
|
31656
|
+
stringSchema = stringSchema.check(z3.emoji());
|
|
31651
31657
|
} else if (format === "nanoid") {
|
|
31652
|
-
stringSchema = stringSchema.check(
|
|
31658
|
+
stringSchema = stringSchema.check(z3.nanoid());
|
|
31653
31659
|
} else if (format === "cuid") {
|
|
31654
|
-
stringSchema = stringSchema.check(
|
|
31660
|
+
stringSchema = stringSchema.check(z3.cuid());
|
|
31655
31661
|
} else if (format === "cuid2") {
|
|
31656
|
-
stringSchema = stringSchema.check(
|
|
31662
|
+
stringSchema = stringSchema.check(z3.cuid2());
|
|
31657
31663
|
} else if (format === "ulid") {
|
|
31658
|
-
stringSchema = stringSchema.check(
|
|
31664
|
+
stringSchema = stringSchema.check(z3.ulid());
|
|
31659
31665
|
} else if (format === "xid") {
|
|
31660
|
-
stringSchema = stringSchema.check(
|
|
31666
|
+
stringSchema = stringSchema.check(z3.xid());
|
|
31661
31667
|
} else if (format === "ksuid") {
|
|
31662
|
-
stringSchema = stringSchema.check(
|
|
31668
|
+
stringSchema = stringSchema.check(z3.ksuid());
|
|
31663
31669
|
}
|
|
31664
31670
|
}
|
|
31665
31671
|
if (typeof schema.minLength === "number") {
|
|
@@ -31676,7 +31682,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31676
31682
|
}
|
|
31677
31683
|
case "number":
|
|
31678
31684
|
case "integer": {
|
|
31679
|
-
let numberSchema = type === "integer" ?
|
|
31685
|
+
let numberSchema = type === "integer" ? z3.number().int() : z3.number();
|
|
31680
31686
|
if (typeof schema.minimum === "number") {
|
|
31681
31687
|
numberSchema = numberSchema.min(schema.minimum);
|
|
31682
31688
|
}
|
|
@@ -31700,11 +31706,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31700
31706
|
break;
|
|
31701
31707
|
}
|
|
31702
31708
|
case "boolean": {
|
|
31703
|
-
zodSchema =
|
|
31709
|
+
zodSchema = z3.boolean();
|
|
31704
31710
|
break;
|
|
31705
31711
|
}
|
|
31706
31712
|
case "null": {
|
|
31707
|
-
zodSchema =
|
|
31713
|
+
zodSchema = z3.null();
|
|
31708
31714
|
break;
|
|
31709
31715
|
}
|
|
31710
31716
|
case "object": {
|
|
@@ -31717,14 +31723,14 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31717
31723
|
}
|
|
31718
31724
|
if (schema.propertyNames) {
|
|
31719
31725
|
const keySchema = convertSchema2(schema.propertyNames, ctx);
|
|
31720
|
-
const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema2(schema.additionalProperties, ctx) :
|
|
31726
|
+
const valueSchema = schema.additionalProperties && typeof schema.additionalProperties === "object" ? convertSchema2(schema.additionalProperties, ctx) : z3.any();
|
|
31721
31727
|
if (Object.keys(shape).length === 0) {
|
|
31722
|
-
zodSchema =
|
|
31728
|
+
zodSchema = z3.record(keySchema, valueSchema);
|
|
31723
31729
|
break;
|
|
31724
31730
|
}
|
|
31725
|
-
const objectSchema2 =
|
|
31726
|
-
const recordSchema =
|
|
31727
|
-
zodSchema =
|
|
31731
|
+
const objectSchema2 = z3.object(shape).passthrough();
|
|
31732
|
+
const recordSchema = z3.looseRecord(keySchema, valueSchema);
|
|
31733
|
+
zodSchema = z3.intersection(objectSchema2, recordSchema);
|
|
31728
31734
|
break;
|
|
31729
31735
|
}
|
|
31730
31736
|
if (schema.patternProperties) {
|
|
@@ -31733,28 +31739,28 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31733
31739
|
const looseRecords = [];
|
|
31734
31740
|
for (const pattern of patternKeys) {
|
|
31735
31741
|
const patternValue = convertSchema2(patternProps[pattern], ctx);
|
|
31736
|
-
const keySchema =
|
|
31737
|
-
looseRecords.push(
|
|
31742
|
+
const keySchema = z3.string().regex(new RegExp(pattern));
|
|
31743
|
+
looseRecords.push(z3.looseRecord(keySchema, patternValue));
|
|
31738
31744
|
}
|
|
31739
31745
|
const schemasToIntersect = [];
|
|
31740
31746
|
if (Object.keys(shape).length > 0) {
|
|
31741
|
-
schemasToIntersect.push(
|
|
31747
|
+
schemasToIntersect.push(z3.object(shape).passthrough());
|
|
31742
31748
|
}
|
|
31743
31749
|
schemasToIntersect.push(...looseRecords);
|
|
31744
31750
|
if (schemasToIntersect.length === 0) {
|
|
31745
|
-
zodSchema =
|
|
31751
|
+
zodSchema = z3.object({}).passthrough();
|
|
31746
31752
|
} else if (schemasToIntersect.length === 1) {
|
|
31747
31753
|
zodSchema = schemasToIntersect[0];
|
|
31748
31754
|
} else {
|
|
31749
|
-
let result =
|
|
31755
|
+
let result = z3.intersection(schemasToIntersect[0], schemasToIntersect[1]);
|
|
31750
31756
|
for (let i = 2; i < schemasToIntersect.length; i++) {
|
|
31751
|
-
result =
|
|
31757
|
+
result = z3.intersection(result, schemasToIntersect[i]);
|
|
31752
31758
|
}
|
|
31753
31759
|
zodSchema = result;
|
|
31754
31760
|
}
|
|
31755
31761
|
break;
|
|
31756
31762
|
}
|
|
31757
|
-
const objectSchema =
|
|
31763
|
+
const objectSchema = z3.object(shape);
|
|
31758
31764
|
if (schema.additionalProperties === false) {
|
|
31759
31765
|
zodSchema = objectSchema.strict();
|
|
31760
31766
|
} else if (typeof schema.additionalProperties === "object") {
|
|
@@ -31771,33 +31777,33 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31771
31777
|
const tupleItems = prefixItems.map((item) => convertSchema2(item, ctx));
|
|
31772
31778
|
const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema2(items, ctx) : void 0;
|
|
31773
31779
|
if (rest) {
|
|
31774
|
-
zodSchema =
|
|
31780
|
+
zodSchema = z3.tuple(tupleItems).rest(rest);
|
|
31775
31781
|
} else {
|
|
31776
|
-
zodSchema =
|
|
31782
|
+
zodSchema = z3.tuple(tupleItems);
|
|
31777
31783
|
}
|
|
31778
31784
|
if (typeof schema.minItems === "number") {
|
|
31779
|
-
zodSchema = zodSchema.check(
|
|
31785
|
+
zodSchema = zodSchema.check(z3.minLength(schema.minItems));
|
|
31780
31786
|
}
|
|
31781
31787
|
if (typeof schema.maxItems === "number") {
|
|
31782
|
-
zodSchema = zodSchema.check(
|
|
31788
|
+
zodSchema = zodSchema.check(z3.maxLength(schema.maxItems));
|
|
31783
31789
|
}
|
|
31784
31790
|
} else if (Array.isArray(items)) {
|
|
31785
31791
|
const tupleItems = items.map((item) => convertSchema2(item, ctx));
|
|
31786
31792
|
const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema2(schema.additionalItems, ctx) : void 0;
|
|
31787
31793
|
if (rest) {
|
|
31788
|
-
zodSchema =
|
|
31794
|
+
zodSchema = z3.tuple(tupleItems).rest(rest);
|
|
31789
31795
|
} else {
|
|
31790
|
-
zodSchema =
|
|
31796
|
+
zodSchema = z3.tuple(tupleItems);
|
|
31791
31797
|
}
|
|
31792
31798
|
if (typeof schema.minItems === "number") {
|
|
31793
|
-
zodSchema = zodSchema.check(
|
|
31799
|
+
zodSchema = zodSchema.check(z3.minLength(schema.minItems));
|
|
31794
31800
|
}
|
|
31795
31801
|
if (typeof schema.maxItems === "number") {
|
|
31796
|
-
zodSchema = zodSchema.check(
|
|
31802
|
+
zodSchema = zodSchema.check(z3.maxLength(schema.maxItems));
|
|
31797
31803
|
}
|
|
31798
31804
|
} else if (items !== void 0) {
|
|
31799
31805
|
const element = convertSchema2(items, ctx);
|
|
31800
|
-
let arraySchema =
|
|
31806
|
+
let arraySchema = z3.array(element);
|
|
31801
31807
|
if (typeof schema.minItems === "number") {
|
|
31802
31808
|
arraySchema = arraySchema.min(schema.minItems);
|
|
31803
31809
|
}
|
|
@@ -31806,7 +31812,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31806
31812
|
}
|
|
31807
31813
|
zodSchema = arraySchema;
|
|
31808
31814
|
} else {
|
|
31809
|
-
zodSchema =
|
|
31815
|
+
zodSchema = z3.array(z3.any());
|
|
31810
31816
|
}
|
|
31811
31817
|
break;
|
|
31812
31818
|
}
|
|
@@ -31820,37 +31826,37 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31820
31826
|
__name22(convertBaseSchema2, "convertBaseSchema");
|
|
31821
31827
|
function convertSchema2(schema, ctx) {
|
|
31822
31828
|
if (typeof schema === "boolean") {
|
|
31823
|
-
return schema ?
|
|
31829
|
+
return schema ? z3.any() : z3.never();
|
|
31824
31830
|
}
|
|
31825
31831
|
let baseSchema = convertBaseSchema2(schema, ctx);
|
|
31826
31832
|
const hasExplicitType = schema.type || schema.enum !== void 0 || schema.const !== void 0;
|
|
31827
31833
|
if (schema.anyOf && Array.isArray(schema.anyOf)) {
|
|
31828
31834
|
const options = schema.anyOf.map((s) => convertSchema2(s, ctx));
|
|
31829
|
-
const anyOfUnion =
|
|
31830
|
-
baseSchema = hasExplicitType ?
|
|
31835
|
+
const anyOfUnion = z3.union(options);
|
|
31836
|
+
baseSchema = hasExplicitType ? z3.intersection(baseSchema, anyOfUnion) : anyOfUnion;
|
|
31831
31837
|
}
|
|
31832
31838
|
if (schema.oneOf && Array.isArray(schema.oneOf)) {
|
|
31833
31839
|
const options = schema.oneOf.map((s) => convertSchema2(s, ctx));
|
|
31834
|
-
const oneOfUnion =
|
|
31835
|
-
baseSchema = hasExplicitType ?
|
|
31840
|
+
const oneOfUnion = z3.xor(options);
|
|
31841
|
+
baseSchema = hasExplicitType ? z3.intersection(baseSchema, oneOfUnion) : oneOfUnion;
|
|
31836
31842
|
}
|
|
31837
31843
|
if (schema.allOf && Array.isArray(schema.allOf)) {
|
|
31838
31844
|
if (schema.allOf.length === 0) {
|
|
31839
|
-
baseSchema = hasExplicitType ? baseSchema :
|
|
31845
|
+
baseSchema = hasExplicitType ? baseSchema : z3.any();
|
|
31840
31846
|
} else {
|
|
31841
31847
|
let result = hasExplicitType ? baseSchema : convertSchema2(schema.allOf[0], ctx);
|
|
31842
31848
|
const startIdx = hasExplicitType ? 0 : 1;
|
|
31843
31849
|
for (let i = startIdx; i < schema.allOf.length; i++) {
|
|
31844
|
-
result =
|
|
31850
|
+
result = z3.intersection(result, convertSchema2(schema.allOf[i], ctx));
|
|
31845
31851
|
}
|
|
31846
31852
|
baseSchema = result;
|
|
31847
31853
|
}
|
|
31848
31854
|
}
|
|
31849
31855
|
if (schema.nullable === true && ctx.version === "openapi-3.0") {
|
|
31850
|
-
baseSchema =
|
|
31856
|
+
baseSchema = z3.nullable(baseSchema);
|
|
31851
31857
|
}
|
|
31852
31858
|
if (schema.readOnly === true) {
|
|
31853
|
-
baseSchema =
|
|
31859
|
+
baseSchema = z3.readonly(baseSchema);
|
|
31854
31860
|
}
|
|
31855
31861
|
if (schema.default !== void 0) {
|
|
31856
31862
|
baseSchema = baseSchema.default(schema.default);
|
|
@@ -31886,7 +31892,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
31886
31892
|
__name22(convertSchema2, "convertSchema");
|
|
31887
31893
|
function fromJSONSchema2(schema, params) {
|
|
31888
31894
|
if (typeof schema === "boolean") {
|
|
31889
|
-
return schema ?
|
|
31895
|
+
return schema ? z3.any() : z3.never();
|
|
31890
31896
|
}
|
|
31891
31897
|
let normalized;
|
|
31892
31898
|
try {
|
|
@@ -32584,6 +32590,31 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32584
32590
|
isServiceProfile: true,
|
|
32585
32591
|
display: true
|
|
32586
32592
|
});
|
|
32593
|
+
var LCNConnectionPromptStatusValidator = external_exports2.enum(["PENDING", "SKIPPED", "CONNECTED"]);
|
|
32594
|
+
var LCNConnectionPromptSurfaceValidator = external_exports2.enum(["POST_CLAIM", "NOTIFICATION"]);
|
|
32595
|
+
var LCNConnectionPromptActionStatusValidator = external_exports2.enum([
|
|
32596
|
+
"PENDING",
|
|
32597
|
+
"SKIPPED",
|
|
32598
|
+
"CONNECTED",
|
|
32599
|
+
"STALE"
|
|
32600
|
+
]);
|
|
32601
|
+
var LCNConnectionPromptValidator = external_exports2.object({
|
|
32602
|
+
promptId: external_exports2.string().uuid(),
|
|
32603
|
+
status: LCNConnectionPromptStatusValidator,
|
|
32604
|
+
surface: LCNConnectionPromptSurfaceValidator,
|
|
32605
|
+
triggerId: external_exports2.string(),
|
|
32606
|
+
triggeredAt: external_exports2.iso.datetime(),
|
|
32607
|
+
updatedAt: external_exports2.iso.datetime(),
|
|
32608
|
+
counterpart: LCNPublicProfileValidator
|
|
32609
|
+
});
|
|
32610
|
+
var LCNConnectionPromptActionResultValidator = external_exports2.object({
|
|
32611
|
+
promptId: external_exports2.string().uuid(),
|
|
32612
|
+
status: LCNConnectionPromptActionStatusValidator
|
|
32613
|
+
});
|
|
32614
|
+
var LCNConnectionPromptMetadataValidator = external_exports2.object({
|
|
32615
|
+
promptId: external_exports2.string().uuid(),
|
|
32616
|
+
counterpartProfileId: external_exports2.string()
|
|
32617
|
+
});
|
|
32587
32618
|
var LCNAuthedProfileValidator = LCNPublicProfileValidator.extend({
|
|
32588
32619
|
bio: LCNProfileValidator.shape.bio,
|
|
32589
32620
|
websiteLink: LCNProfileValidator.shape.websiteLink,
|
|
@@ -32592,7 +32623,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32592
32623
|
did: LCNProfileValidator.shape.did
|
|
32593
32624
|
});
|
|
32594
32625
|
var LCNConnectionProfileValidator = LCNAuthedProfileValidator.extend({
|
|
32595
|
-
email: LCNProfileValidator.shape.email
|
|
32626
|
+
email: LCNProfileValidator.shape.email,
|
|
32627
|
+
connectedAt: external_exports2.iso.datetime().optional().describe("When the viewer and this profile became connected.")
|
|
32596
32628
|
});
|
|
32597
32629
|
var LCNVisibleProfileValidator = external_exports2.union([
|
|
32598
32630
|
LCNConnectionProfileValidator.strict(),
|
|
@@ -33148,12 +33180,15 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33148
33180
|
}),
|
|
33149
33181
|
timestamp: external_exports2.iso.datetime().optional()
|
|
33150
33182
|
});
|
|
33183
|
+
var LCNNotificationMetadataValidator = external_exports2.object({
|
|
33184
|
+
connectionPrompt: LCNConnectionPromptMetadataValidator.optional()
|
|
33185
|
+
}).catchall(external_exports2.unknown());
|
|
33151
33186
|
var LCNNotificationDataValidator = external_exports2.object({
|
|
33152
33187
|
vcUris: external_exports2.array(external_exports2.string()).optional(),
|
|
33153
33188
|
vpUris: external_exports2.array(external_exports2.string()).optional(),
|
|
33154
33189
|
transaction: ConsentFlowTransactionValidator.optional(),
|
|
33155
33190
|
inbox: LCNNotificationInboxValidator.optional(),
|
|
33156
|
-
metadata:
|
|
33191
|
+
metadata: LCNNotificationMetadataValidator.optional()
|
|
33157
33192
|
}).loose();
|
|
33158
33193
|
var LCNNotificationValidator = external_exports2.object({
|
|
33159
33194
|
type: LCNNotificationTypeEnumValidator,
|
|
@@ -34305,6 +34340,37 @@ var ImageWithLoadingStateValdator = external_exports.object({
|
|
|
34305
34340
|
loading: external_exports.union([ImageResizingValidator, ImageUploadingValidator]).optional()
|
|
34306
34341
|
});
|
|
34307
34342
|
var import_types3 = __toESM(require_dist());
|
|
34343
|
+
var EnvironmentConfigurationError = class extends Error {
|
|
34344
|
+
static {
|
|
34345
|
+
__name(this, "EnvironmentConfigurationError");
|
|
34346
|
+
}
|
|
34347
|
+
static {
|
|
34348
|
+
__name2(this, "EnvironmentConfigurationError");
|
|
34349
|
+
}
|
|
34350
|
+
constructor(message) {
|
|
34351
|
+
super(message);
|
|
34352
|
+
this.name = "EnvironmentConfigurationError";
|
|
34353
|
+
}
|
|
34354
|
+
};
|
|
34355
|
+
var requiredEnvironmentString = external_exports.string().trim().min(1, "Required but missing");
|
|
34356
|
+
var optionalEnvironmentString = external_exports.preprocess(
|
|
34357
|
+
(value) => value === "" ? void 0 : value,
|
|
34358
|
+
requiredEnvironmentString.optional()
|
|
34359
|
+
);
|
|
34360
|
+
var optionalEnvironmentUrl = external_exports.preprocess(
|
|
34361
|
+
(value) => value === "" ? void 0 : value,
|
|
34362
|
+
external_exports.url("Expected a valid URL").optional()
|
|
34363
|
+
);
|
|
34364
|
+
var environmentBoolean = external_exports.enum(["true", "false", "1", "0"]).transform((value) => value === "true" || value === "1");
|
|
34365
|
+
var optionalEnvironmentBoolean = external_exports.preprocess(
|
|
34366
|
+
(value) => value === "" || value === void 0 ? void 0 : value,
|
|
34367
|
+
environmentBoolean.optional()
|
|
34368
|
+
);
|
|
34369
|
+
var environmentPort = external_exports.coerce.number().int().min(1).max(65535);
|
|
34370
|
+
var optionalEnvironmentPort = external_exports.preprocess(
|
|
34371
|
+
(value) => value === "" || value === void 0 ? void 0 : value,
|
|
34372
|
+
environmentPort.optional()
|
|
34373
|
+
);
|
|
34308
34374
|
var RegExpTransformer = {
|
|
34309
34375
|
serialize(object2) {
|
|
34310
34376
|
return JSON.stringify(object2, (_key, value) => {
|