@learncard/render-method-plugin 7.0.0 → 9.0.0
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/render-method-plugin.cjs.development.cjs +1742 -384
- package/dist/render-method-plugin.cjs.development.cjs.map +3 -3
- package/dist/render-method-plugin.cjs.production.min.cjs +54 -54
- package/dist/render-method-plugin.cjs.production.min.cjs.map +3 -3
- package/dist/render-method-plugin.esm.js +1742 -384
- package/dist/render-method-plugin.esm.js.map +3 -3
- package/package.json +8 -8
|
@@ -1332,10 +1332,10 @@ function $constructor(name, initializer3, params) {
|
|
|
1332
1332
|
let Definition = _Definition;
|
|
1333
1333
|
Object.defineProperty(Definition, "name", { value: name });
|
|
1334
1334
|
function _(def) {
|
|
1335
|
-
var
|
|
1335
|
+
var _a7;
|
|
1336
1336
|
const inst = params?.Parent ? new Definition() : this;
|
|
1337
1337
|
init(inst, def);
|
|
1338
|
-
(
|
|
1338
|
+
(_a7 = inst._zod).deferred ?? (_a7.deferred = []);
|
|
1339
1339
|
for (const fn of inst._zod.deferred) {
|
|
1340
1340
|
fn();
|
|
1341
1341
|
}
|
|
@@ -2001,8 +2001,8 @@ function explicitlyAborted(x, startIndex = 0) {
|
|
|
2001
2001
|
__name(explicitlyAborted, "explicitlyAborted");
|
|
2002
2002
|
function prefixIssues(path, issues) {
|
|
2003
2003
|
return issues.map((iss) => {
|
|
2004
|
-
var
|
|
2005
|
-
(
|
|
2004
|
+
var _a7;
|
|
2005
|
+
(_a7 = iss).path ?? (_a7.path = []);
|
|
2006
2006
|
iss.path.unshift(path);
|
|
2007
2007
|
return iss;
|
|
2008
2008
|
});
|
|
@@ -2205,7 +2205,7 @@ __name(formatError, "formatError");
|
|
|
2205
2205
|
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
2206
2206
|
const result = { errors: [] };
|
|
2207
2207
|
const processError = /* @__PURE__ */ __name((error52, path = []) => {
|
|
2208
|
-
var
|
|
2208
|
+
var _a7, _b;
|
|
2209
2209
|
for (const issue2 of error52.issues) {
|
|
2210
2210
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
2211
2211
|
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
@@ -2226,7 +2226,7 @@ function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
|
2226
2226
|
const terminal = i === fullpath.length - 1;
|
|
2227
2227
|
if (typeof el === "string") {
|
|
2228
2228
|
curr.properties ?? (curr.properties = {});
|
|
2229
|
-
(
|
|
2229
|
+
(_a7 = curr.properties)[el] ?? (_a7[el] = { errors: [] });
|
|
2230
2230
|
curr = curr.properties[el];
|
|
2231
2231
|
} else {
|
|
2232
2232
|
curr.items ?? (curr.items = []);
|
|
@@ -2531,10 +2531,10 @@ var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
|
2531
2531
|
|
|
2532
2532
|
// ../../../node_modules/zod/v4/core/checks.js
|
|
2533
2533
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
2534
|
-
var
|
|
2534
|
+
var _a7;
|
|
2535
2535
|
inst._zod ?? (inst._zod = {});
|
|
2536
2536
|
inst._zod.def = def;
|
|
2537
|
-
(
|
|
2537
|
+
(_a7 = inst._zod).onattach ?? (_a7.onattach = []);
|
|
2538
2538
|
});
|
|
2539
2539
|
var numericOriginMap = {
|
|
2540
2540
|
number: "number",
|
|
@@ -2600,8 +2600,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
|
|
|
2600
2600
|
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
2601
2601
|
$ZodCheck.init(inst, def);
|
|
2602
2602
|
inst._zod.onattach.push((inst2) => {
|
|
2603
|
-
var
|
|
2604
|
-
(
|
|
2603
|
+
var _a7;
|
|
2604
|
+
(_a7 = inst2._zod.bag).multipleOf ?? (_a7.multipleOf = def.value);
|
|
2605
2605
|
});
|
|
2606
2606
|
inst._zod.check = (payload) => {
|
|
2607
2607
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -2734,9 +2734,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
2734
2734
|
};
|
|
2735
2735
|
});
|
|
2736
2736
|
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
2737
|
-
var
|
|
2737
|
+
var _a7;
|
|
2738
2738
|
$ZodCheck.init(inst, def);
|
|
2739
|
-
(
|
|
2739
|
+
(_a7 = inst._zod.def).when ?? (_a7.when = (payload) => {
|
|
2740
2740
|
const val = payload.value;
|
|
2741
2741
|
return !nullish(val) && val.size !== void 0;
|
|
2742
2742
|
});
|
|
@@ -2762,9 +2762,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
2762
2762
|
};
|
|
2763
2763
|
});
|
|
2764
2764
|
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
2765
|
-
var
|
|
2765
|
+
var _a7;
|
|
2766
2766
|
$ZodCheck.init(inst, def);
|
|
2767
|
-
(
|
|
2767
|
+
(_a7 = inst._zod.def).when ?? (_a7.when = (payload) => {
|
|
2768
2768
|
const val = payload.value;
|
|
2769
2769
|
return !nullish(val) && val.size !== void 0;
|
|
2770
2770
|
});
|
|
@@ -2790,9 +2790,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
2790
2790
|
};
|
|
2791
2791
|
});
|
|
2792
2792
|
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
2793
|
-
var
|
|
2793
|
+
var _a7;
|
|
2794
2794
|
$ZodCheck.init(inst, def);
|
|
2795
|
-
(
|
|
2795
|
+
(_a7 = inst._zod.def).when ?? (_a7.when = (payload) => {
|
|
2796
2796
|
const val = payload.value;
|
|
2797
2797
|
return !nullish(val) && val.size !== void 0;
|
|
2798
2798
|
});
|
|
@@ -2820,9 +2820,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
|
|
|
2820
2820
|
};
|
|
2821
2821
|
});
|
|
2822
2822
|
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
2823
|
-
var
|
|
2823
|
+
var _a7;
|
|
2824
2824
|
$ZodCheck.init(inst, def);
|
|
2825
|
-
(
|
|
2825
|
+
(_a7 = inst._zod.def).when ?? (_a7.when = (payload) => {
|
|
2826
2826
|
const val = payload.value;
|
|
2827
2827
|
return !nullish(val) && val.length !== void 0;
|
|
2828
2828
|
});
|
|
@@ -2849,9 +2849,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
2849
2849
|
};
|
|
2850
2850
|
});
|
|
2851
2851
|
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
2852
|
-
var
|
|
2852
|
+
var _a7;
|
|
2853
2853
|
$ZodCheck.init(inst, def);
|
|
2854
|
-
(
|
|
2854
|
+
(_a7 = inst._zod.def).when ?? (_a7.when = (payload) => {
|
|
2855
2855
|
const val = payload.value;
|
|
2856
2856
|
return !nullish(val) && val.length !== void 0;
|
|
2857
2857
|
});
|
|
@@ -2878,9 +2878,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
2878
2878
|
};
|
|
2879
2879
|
});
|
|
2880
2880
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
2881
|
-
var
|
|
2881
|
+
var _a7;
|
|
2882
2882
|
$ZodCheck.init(inst, def);
|
|
2883
|
-
(
|
|
2883
|
+
(_a7 = inst._zod.def).when ?? (_a7.when = (payload) => {
|
|
2884
2884
|
const val = payload.value;
|
|
2885
2885
|
return !nullish(val) && val.length !== void 0;
|
|
2886
2886
|
});
|
|
@@ -2909,7 +2909,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
2909
2909
|
};
|
|
2910
2910
|
});
|
|
2911
2911
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
2912
|
-
var
|
|
2912
|
+
var _a7, _b;
|
|
2913
2913
|
$ZodCheck.init(inst, def);
|
|
2914
2914
|
inst._zod.onattach.push((inst2) => {
|
|
2915
2915
|
const bag = inst2._zod.bag;
|
|
@@ -2920,7 +2920,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
2920
2920
|
}
|
|
2921
2921
|
});
|
|
2922
2922
|
if (def.pattern)
|
|
2923
|
-
(
|
|
2923
|
+
(_a7 = inst._zod).check ?? (_a7.check = (payload) => {
|
|
2924
2924
|
def.pattern.lastIndex = 0;
|
|
2925
2925
|
if (def.pattern.test(payload.value))
|
|
2926
2926
|
return;
|
|
@@ -3125,7 +3125,7 @@ var version = {
|
|
|
3125
3125
|
|
|
3126
3126
|
// ../../../node_modules/zod/v4/core/schemas.js
|
|
3127
3127
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
3128
|
-
var
|
|
3128
|
+
var _a7;
|
|
3129
3129
|
inst ?? (inst = {});
|
|
3130
3130
|
inst._zod.def = def;
|
|
3131
3131
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -3140,7 +3140,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
3140
3140
|
}
|
|
3141
3141
|
}
|
|
3142
3142
|
if (checks.length === 0) {
|
|
3143
|
-
(
|
|
3143
|
+
(_a7 = inst._zod).deferred ?? (_a7.deferred = []);
|
|
3144
3144
|
inst._zod.deferred?.push(() => {
|
|
3145
3145
|
inst._zod.run = inst._zod.parse;
|
|
3146
3146
|
});
|
|
@@ -12531,7 +12531,7 @@ function initializeContext(params) {
|
|
|
12531
12531
|
}
|
|
12532
12532
|
__name(initializeContext, "initializeContext");
|
|
12533
12533
|
function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
12534
|
-
var
|
|
12534
|
+
var _a7;
|
|
12535
12535
|
const def = schema._zod.def;
|
|
12536
12536
|
const seen = ctx.seen.get(schema);
|
|
12537
12537
|
if (seen) {
|
|
@@ -12579,7 +12579,7 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
|
12579
12579
|
delete result.schema.default;
|
|
12580
12580
|
}
|
|
12581
12581
|
if (ctx.io === "input" && "_prefault" in result.schema)
|
|
12582
|
-
(
|
|
12582
|
+
(_a7 = result.schema).default ?? (_a7.default = result.schema._prefault);
|
|
12583
12583
|
delete result.schema._prefault;
|
|
12584
12584
|
const _result = ctx.seen.get(schema);
|
|
12585
12585
|
return _result.schema;
|
|
@@ -15928,7 +15928,7 @@ var __toESM = /* @__PURE__ */ __name((mod, isNodeMode, target) => (target = mod
|
|
|
15928
15928
|
var require_types_cjs_development = __commonJS({
|
|
15929
15929
|
"../learn-card-types/dist/types.cjs.development.cjs"(exports, module) {
|
|
15930
15930
|
"use strict";
|
|
15931
|
-
var
|
|
15931
|
+
var _a8, _b, _c, _d, _e, _f, _g;
|
|
15932
15932
|
var __defProp22 = Object.defineProperty;
|
|
15933
15933
|
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
15934
15934
|
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
@@ -15949,12 +15949,15 @@ var require_types_cjs_development = __commonJS({
|
|
|
15949
15949
|
var __toCommonJS = /* @__PURE__ */ __name2((mod) => __copyProps2(__defProp22({}, "__esModule", { value: true }), mod), "__toCommonJS");
|
|
15950
15950
|
var index_exports = {};
|
|
15951
15951
|
__export22(index_exports, {
|
|
15952
|
+
ACT_AS_HEADER: /* @__PURE__ */ __name2(() => ACT_AS_HEADER, "ACT_AS_HEADER"),
|
|
15952
15953
|
AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX: /* @__PURE__ */ __name2(() => AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX2, "AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX"),
|
|
15953
15954
|
AchievementCredentialValidator: /* @__PURE__ */ __name2(() => AchievementCredentialValidator2, "AchievementCredentialValidator"),
|
|
15954
15955
|
AchievementCriteriaValidator: /* @__PURE__ */ __name2(() => AchievementCriteriaValidator2, "AchievementCriteriaValidator"),
|
|
15955
15956
|
AchievementSubjectValidator: /* @__PURE__ */ __name2(() => AchievementSubjectValidator2, "AchievementSubjectValidator"),
|
|
15956
15957
|
AchievementTypeValidator: /* @__PURE__ */ __name2(() => AchievementTypeValidator2, "AchievementTypeValidator"),
|
|
15957
15958
|
AchievementValidator: /* @__PURE__ */ __name2(() => AchievementValidator2, "AchievementValidator"),
|
|
15959
|
+
AcknowledgeViewInputValidator: /* @__PURE__ */ __name2(() => AcknowledgeViewInputValidator2, "AcknowledgeViewInputValidator"),
|
|
15960
|
+
AcknowledgeViewOutputValidator: /* @__PURE__ */ __name2(() => AcknowledgeViewOutputValidator2, "AcknowledgeViewOutputValidator"),
|
|
15958
15961
|
AddTagInputValidator: /* @__PURE__ */ __name2(() => AddTagInputValidator2, "AddTagInputValidator"),
|
|
15959
15962
|
AddressValidator: /* @__PURE__ */ __name2(() => AddressValidator2, "AddressValidator"),
|
|
15960
15963
|
AgeRatingValidator: /* @__PURE__ */ __name2(() => AgeRatingValidator2, "AgeRatingValidator"),
|
|
@@ -16032,6 +16035,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
16032
16035
|
CreateContactMethodSessionValidator: /* @__PURE__ */ __name2(() => CreateContactMethodSessionValidator2, "CreateContactMethodSessionValidator"),
|
|
16033
16036
|
CreateManagedFrameworkBatchInputValidator: /* @__PURE__ */ __name2(() => CreateManagedFrameworkBatchInputValidator2, "CreateManagedFrameworkBatchInputValidator"),
|
|
16034
16037
|
CreateManagedFrameworkInputValidator: /* @__PURE__ */ __name2(() => CreateManagedFrameworkInputValidator2, "CreateManagedFrameworkInputValidator"),
|
|
16038
|
+
CreateShareLinkInputValidator: /* @__PURE__ */ __name2(() => CreateShareLinkInputValidator2, "CreateShareLinkInputValidator"),
|
|
16035
16039
|
CreateSkillInputValidator: /* @__PURE__ */ __name2(() => CreateSkillInputValidator2, "CreateSkillInputValidator"),
|
|
16036
16040
|
CreateSkillsBatchInputValidator: /* @__PURE__ */ __name2(() => CreateSkillsBatchInputValidator2, "CreateSkillsBatchInputValidator"),
|
|
16037
16041
|
CredentialActivityEventTypeValidator: /* @__PURE__ */ __name2(() => CredentialActivityEventTypeValidator2, "CredentialActivityEventTypeValidator"),
|
|
@@ -16063,10 +16067,14 @@ var require_types_cjs_development = __commonJS({
|
|
|
16063
16067
|
DeleteSkillInputValidator: /* @__PURE__ */ __name2(() => DeleteSkillInputValidator2, "DeleteSkillInputValidator"),
|
|
16064
16068
|
DidDocumentValidator: /* @__PURE__ */ __name2(() => DidDocumentValidator2, "DidDocumentValidator"),
|
|
16065
16069
|
EMPTY_IN_APP_MESSAGES_FLAG: /* @__PURE__ */ __name2(() => EMPTY_IN_APP_MESSAGES_FLAG, "EMPTY_IN_APP_MESSAGES_FLAG"),
|
|
16070
|
+
ESCROW_PIN_LOCKED_MESSAGE: /* @__PURE__ */ __name2(() => ESCROW_PIN_LOCKED_MESSAGE, "ESCROW_PIN_LOCKED_MESSAGE"),
|
|
16071
|
+
ESCROW_PIN_MISMATCH_PATTERN: /* @__PURE__ */ __name2(() => ESCROW_PIN_MISMATCH_PATTERN, "ESCROW_PIN_MISMATCH_PATTERN"),
|
|
16072
|
+
ESCROW_PIN_UNAVAILABLE_MESSAGE: /* @__PURE__ */ __name2(() => ESCROW_PIN_UNAVAILABLE_MESSAGE, "ESCROW_PIN_UNAVAILABLE_MESSAGE"),
|
|
16066
16073
|
EncryptedCredentialRecordValidator: /* @__PURE__ */ __name2(() => EncryptedCredentialRecordValidator2, "EncryptedCredentialRecordValidator"),
|
|
16067
16074
|
EncryptedRecordValidator: /* @__PURE__ */ __name2(() => EncryptedRecordValidator2, "EncryptedRecordValidator"),
|
|
16068
16075
|
EndorsementCredentialValidator: /* @__PURE__ */ __name2(() => EndorsementCredentialValidator2, "EndorsementCredentialValidator"),
|
|
16069
16076
|
EndorsementSubjectValidator: /* @__PURE__ */ __name2(() => EndorsementSubjectValidator2, "EndorsementSubjectValidator"),
|
|
16077
|
+
EscrowPinStatusValidator: /* @__PURE__ */ __name2(() => EscrowPinStatusValidator2, "EscrowPinStatusValidator"),
|
|
16070
16078
|
EvidenceValidator: /* @__PURE__ */ __name2(() => EvidenceValidator2, "EvidenceValidator"),
|
|
16071
16079
|
FlatAuthGrantValidator: /* @__PURE__ */ __name2(() => FlatAuthGrantValidator2, "FlatAuthGrantValidator"),
|
|
16072
16080
|
FrameworkWithSkillsValidator: /* @__PURE__ */ __name2(() => FrameworkWithSkillsValidator2, "FrameworkWithSkillsValidator"),
|
|
@@ -16088,10 +16096,18 @@ var require_types_cjs_development = __commonJS({
|
|
|
16088
16096
|
IdentifierTypeValidator: /* @__PURE__ */ __name2(() => IdentifierTypeValidator2, "IdentifierTypeValidator"),
|
|
16089
16097
|
IdentityObjectValidator: /* @__PURE__ */ __name2(() => IdentityObjectValidator2, "IdentityObjectValidator"),
|
|
16090
16098
|
ImageValidator: /* @__PURE__ */ __name2(() => ImageValidator2, "ImageValidator"),
|
|
16099
|
+
InboxBatchErrorReasonValidator: /* @__PURE__ */ __name2(() => InboxBatchErrorReasonValidator2, "InboxBatchErrorReasonValidator"),
|
|
16100
|
+
InboxBatchReceiptValidator: /* @__PURE__ */ __name2(() => InboxBatchReceiptValidator2, "InboxBatchReceiptValidator"),
|
|
16101
|
+
InboxBatchStatusValidator: /* @__PURE__ */ __name2(() => InboxBatchStatusValidator2, "InboxBatchStatusValidator"),
|
|
16091
16102
|
InboxCredentialQueryValidator: /* @__PURE__ */ __name2(() => InboxCredentialQueryValidator2, "InboxCredentialQueryValidator"),
|
|
16103
|
+
InboxCredentialRefreshReceiptValidator: /* @__PURE__ */ __name2(() => InboxCredentialRefreshReceiptValidator2, "InboxCredentialRefreshReceiptValidator"),
|
|
16092
16104
|
InboxCredentialValidator: /* @__PURE__ */ __name2(() => InboxCredentialValidator2, "InboxCredentialValidator"),
|
|
16093
16105
|
IncrementCounterEventValidator: /* @__PURE__ */ __name2(() => IncrementCounterEventValidator2, "IncrementCounterEventValidator"),
|
|
16094
16106
|
InstalledAppValidator: /* @__PURE__ */ __name2(() => InstalledAppValidator2, "InstalledAppValidator"),
|
|
16107
|
+
IssueInboxCredentialBatchItemResultValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialBatchItemResultValidator2, "IssueInboxCredentialBatchItemResultValidator"),
|
|
16108
|
+
IssueInboxCredentialBatchItemValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialBatchItemValidator2, "IssueInboxCredentialBatchItemValidator"),
|
|
16109
|
+
IssueInboxCredentialBatchResponseValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialBatchResponseValidator2, "IssueInboxCredentialBatchResponseValidator"),
|
|
16110
|
+
IssueInboxCredentialBatchValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialBatchValidator2, "IssueInboxCredentialBatchValidator"),
|
|
16095
16111
|
IssueInboxCredentialResponseValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialResponseValidator2, "IssueInboxCredentialResponseValidator"),
|
|
16096
16112
|
IssueInboxCredentialValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialValidator2, "IssueInboxCredentialValidator"),
|
|
16097
16113
|
IssueInboxSigningAuthorityValidator: /* @__PURE__ */ __name2(() => IssueInboxSigningAuthorityValidator2, "IssueInboxSigningAuthorityValidator"),
|
|
@@ -16140,6 +16156,15 @@ var require_types_cjs_development = __commonJS({
|
|
|
16140
16156
|
LaunchTypeValidator: /* @__PURE__ */ __name2(() => LaunchTypeValidator2, "LaunchTypeValidator"),
|
|
16141
16157
|
LearnCardRefreshAuthorizationValidator: /* @__PURE__ */ __name2(() => LearnCardRefreshAuthorizationValidator2, "LearnCardRefreshAuthorizationValidator"),
|
|
16142
16158
|
LinkProviderFrameworkInputValidator: /* @__PURE__ */ __name2(() => LinkProviderFrameworkInputValidator2, "LinkProviderFrameworkInputValidator"),
|
|
16159
|
+
ListShareLinksInputValidator: /* @__PURE__ */ __name2(() => ListShareLinksInputValidator2, "ListShareLinksInputValidator"),
|
|
16160
|
+
MAX_ENDORSEMENTS: /* @__PURE__ */ __name2(() => MAX_ENDORSEMENTS2, "MAX_ENDORSEMENTS"),
|
|
16161
|
+
MAX_SELECTED_CREDENTIALS: /* @__PURE__ */ __name2(() => MAX_SELECTED_CREDENTIALS2, "MAX_SELECTED_CREDENTIALS"),
|
|
16162
|
+
MAX_SHARE_CIPHERTEXT_BYTES: /* @__PURE__ */ __name2(() => MAX_SHARE_CIPHERTEXT_BYTES2, "MAX_SHARE_CIPHERTEXT_BYTES"),
|
|
16163
|
+
MAX_SHARE_LINK_REQUEST_BYTES: /* @__PURE__ */ __name2(() => MAX_SHARE_LINK_REQUEST_BYTES2, "MAX_SHARE_LINK_REQUEST_BYTES"),
|
|
16164
|
+
MAX_SHARE_RECOVERY_JWE_BYTES: /* @__PURE__ */ __name2(() => MAX_SHARE_RECOVERY_JWE_BYTES2, "MAX_SHARE_RECOVERY_JWE_BYTES"),
|
|
16165
|
+
MAX_SHARE_SOURCE_URI_CHARS: /* @__PURE__ */ __name2(() => MAX_SHARE_SOURCE_URI_CHARS2, "MAX_SHARE_SOURCE_URI_CHARS"),
|
|
16166
|
+
MAX_VP_MEMBERS: /* @__PURE__ */ __name2(() => MAX_VP_MEMBERS2, "MAX_VP_MEMBERS"),
|
|
16167
|
+
ManagedCredentialRefreshReceiptValidator: /* @__PURE__ */ __name2(() => ManagedCredentialRefreshReceiptValidator2, "ManagedCredentialRefreshReceiptValidator"),
|
|
16143
16168
|
ManagedCredentialRefreshServiceValidator: /* @__PURE__ */ __name2(() => ManagedCredentialRefreshServiceValidator2, "ManagedCredentialRefreshServiceValidator"),
|
|
16144
16169
|
PaginatedAppStoreListingsValidator: /* @__PURE__ */ __name2(() => PaginatedAppStoreListingsValidator2, "PaginatedAppStoreListingsValidator"),
|
|
16145
16170
|
PaginatedBoostRecipientsValidator: /* @__PURE__ */ __name2(() => PaginatedBoostRecipientsValidator2, "PaginatedBoostRecipientsValidator"),
|
|
@@ -16161,11 +16186,14 @@ var require_types_cjs_development = __commonJS({
|
|
|
16161
16186
|
PaginatedLCNProfileManagersValidator: /* @__PURE__ */ __name2(() => PaginatedLCNProfileManagersValidator2, "PaginatedLCNProfileManagersValidator"),
|
|
16162
16187
|
PaginatedLCNProfilesAndManagersValidator: /* @__PURE__ */ __name2(() => PaginatedLCNProfilesAndManagersValidator2, "PaginatedLCNProfilesAndManagersValidator"),
|
|
16163
16188
|
PaginatedLCNProfilesValidator: /* @__PURE__ */ __name2(() => PaginatedLCNProfilesValidator2, "PaginatedLCNProfilesValidator"),
|
|
16189
|
+
PaginatedShareLinksValidator: /* @__PURE__ */ __name2(() => PaginatedShareLinksValidator2, "PaginatedShareLinksValidator"),
|
|
16164
16190
|
PaginatedSkillFrameworksValidator: /* @__PURE__ */ __name2(() => PaginatedSkillFrameworksValidator2, "PaginatedSkillFrameworksValidator"),
|
|
16165
16191
|
PaginatedSkillTreeValidator: /* @__PURE__ */ __name2(() => PaginatedSkillTreeValidator2, "PaginatedSkillTreeValidator"),
|
|
16166
16192
|
PaginatedVisibleLCNProfilesValidator: /* @__PURE__ */ __name2(() => PaginatedVisibleLCNProfilesValidator2, "PaginatedVisibleLCNProfilesValidator"),
|
|
16167
16193
|
PaginationOptionsValidator: /* @__PURE__ */ __name2(() => PaginationOptionsValidator2, "PaginationOptionsValidator"),
|
|
16168
16194
|
PaginationResponseValidator: /* @__PURE__ */ __name2(() => PaginationResponseValidator2, "PaginationResponseValidator"),
|
|
16195
|
+
PrepareRefreshableSendInputValidator: /* @__PURE__ */ __name2(() => PrepareRefreshableSendInputValidator2, "PrepareRefreshableSendInputValidator"),
|
|
16196
|
+
PrepareRefreshableSendResultValidator: /* @__PURE__ */ __name2(() => PrepareRefreshableSendResultValidator2, "PrepareRefreshableSendResultValidator"),
|
|
16169
16197
|
ProfileValidator: /* @__PURE__ */ __name2(() => ProfileValidator2, "ProfileValidator"),
|
|
16170
16198
|
ProfileVisibilityEnum: /* @__PURE__ */ __name2(() => ProfileVisibilityEnum2, "ProfileVisibilityEnum"),
|
|
16171
16199
|
PromotionLevelValidator: /* @__PURE__ */ __name2(() => PromotionLevelValidator2, "PromotionLevelValidator"),
|
|
@@ -16183,14 +16211,24 @@ var require_types_cjs_development = __commonJS({
|
|
|
16183
16211
|
ReplaceSkillFrameworkSkillsInputValidator: /* @__PURE__ */ __name2(() => ReplaceSkillFrameworkSkillsInputValidator2, "ReplaceSkillFrameworkSkillsInputValidator"),
|
|
16184
16212
|
ReplaceSkillFrameworkSkillsResultValidator: /* @__PURE__ */ __name2(() => ReplaceSkillFrameworkSkillsResultValidator2, "ReplaceSkillFrameworkSkillsResultValidator"),
|
|
16185
16213
|
RequestLearnerContextEventValidator: /* @__PURE__ */ __name2(() => RequestLearnerContextEventValidator2, "RequestLearnerContextEventValidator"),
|
|
16214
|
+
ResolveShareLinkInputValidator: /* @__PURE__ */ __name2(() => ResolveShareLinkInputValidator2, "ResolveShareLinkInputValidator"),
|
|
16186
16215
|
ResultDescriptionValidator: /* @__PURE__ */ __name2(() => ResultDescriptionValidator2, "ResultDescriptionValidator"),
|
|
16187
16216
|
ResultStatusTypeValidator: /* @__PURE__ */ __name2(() => ResultStatusTypeValidator2, "ResultStatusTypeValidator"),
|
|
16188
16217
|
ResultTypeValidator: /* @__PURE__ */ __name2(() => ResultTypeValidator2, "ResultTypeValidator"),
|
|
16189
16218
|
ResultValidator: /* @__PURE__ */ __name2(() => ResultValidator2, "ResultValidator"),
|
|
16190
16219
|
RubricCriterionValidator: /* @__PURE__ */ __name2(() => RubricCriterionValidator2, "RubricCriterionValidator"),
|
|
16220
|
+
SHARE_AAD_PREFIX: /* @__PURE__ */ __name2(() => SHARE_AAD_PREFIX, "SHARE_AAD_PREFIX"),
|
|
16221
|
+
SHARE_CONTENT_KEY_BYTES: /* @__PURE__ */ __name2(() => SHARE_CONTENT_KEY_BYTES2, "SHARE_CONTENT_KEY_BYTES"),
|
|
16222
|
+
SHARE_IV_BYTES: /* @__PURE__ */ __name2(() => SHARE_IV_BYTES2, "SHARE_IV_BYTES"),
|
|
16223
|
+
SHARE_LINK_ID_BYTES: /* @__PURE__ */ __name2(() => SHARE_LINK_ID_BYTES2, "SHARE_LINK_ID_BYTES"),
|
|
16224
|
+
SHARE_LINK_PROTOCOL: /* @__PURE__ */ __name2(() => SHARE_LINK_PROTOCOL2, "SHARE_LINK_PROTOCOL"),
|
|
16225
|
+
SHARE_RECOVERY_PROTOCOL: /* @__PURE__ */ __name2(() => SHARE_RECOVERY_PROTOCOL2, "SHARE_RECOVERY_PROTOCOL"),
|
|
16226
|
+
SHARE_TAG_BYTES: /* @__PURE__ */ __name2(() => SHARE_TAG_BYTES2, "SHARE_TAG_BYTES"),
|
|
16227
|
+
SHARE_VIEW_RECEIPT_TTL_SECONDS: /* @__PURE__ */ __name2(() => SHARE_VIEW_RECEIPT_TTL_SECONDS2, "SHARE_VIEW_RECEIPT_TTL_SECONDS"),
|
|
16191
16228
|
SendAiSessionCredentialEventValidator: /* @__PURE__ */ __name2(() => SendAiSessionCredentialEventValidator2, "SendAiSessionCredentialEventValidator"),
|
|
16192
16229
|
SendBoostInputValidator: /* @__PURE__ */ __name2(() => SendBoostInputValidator2, "SendBoostInputValidator"),
|
|
16193
16230
|
SendBoostResponseValidator: /* @__PURE__ */ __name2(() => SendBoostResponseValidator2, "SendBoostResponseValidator"),
|
|
16231
|
+
SendBoostTemplateValidator: /* @__PURE__ */ __name2(() => SendBoostTemplateValidator2, "SendBoostTemplateValidator"),
|
|
16194
16232
|
SendBrandingOptionsValidator: /* @__PURE__ */ __name2(() => SendBrandingOptionsValidator2, "SendBrandingOptionsValidator"),
|
|
16195
16233
|
SendCredentialEventValidator: /* @__PURE__ */ __name2(() => SendCredentialEventValidator2, "SendCredentialEventValidator"),
|
|
16196
16234
|
SendInboxResponseValidator: /* @__PURE__ */ __name2(() => SendInboxResponseValidator2, "SendInboxResponseValidator"),
|
|
@@ -16201,6 +16239,32 @@ var require_types_cjs_development = __commonJS({
|
|
|
16201
16239
|
SentCredentialInfoValidator: /* @__PURE__ */ __name2(() => SentCredentialInfoValidator2, "SentCredentialInfoValidator"),
|
|
16202
16240
|
ServiceValidator: /* @__PURE__ */ __name2(() => ServiceValidator2, "ServiceValidator"),
|
|
16203
16241
|
SetPrimaryContactMethodValidator: /* @__PURE__ */ __name2(() => SetPrimaryContactMethodValidator2, "SetPrimaryContactMethodValidator"),
|
|
16242
|
+
ShareCiphertextValidator: /* @__PURE__ */ __name2(() => ShareCiphertextValidator2, "ShareCiphertextValidator"),
|
|
16243
|
+
ShareContentKeyValidator: /* @__PURE__ */ __name2(() => ShareContentKeyValidator2, "ShareContentKeyValidator"),
|
|
16244
|
+
ShareContentStateValidator: /* @__PURE__ */ __name2(() => ShareContentStateValidator2, "ShareContentStateValidator"),
|
|
16245
|
+
ShareEndorsementEntryValidator: /* @__PURE__ */ __name2(() => ShareEndorsementEntryValidator2, "ShareEndorsementEntryValidator"),
|
|
16246
|
+
ShareEnvelopeValidator: /* @__PURE__ */ __name2(() => ShareEnvelopeValidator2, "ShareEnvelopeValidator"),
|
|
16247
|
+
ShareIvValidator: /* @__PURE__ */ __name2(() => ShareIvValidator2, "ShareIvValidator"),
|
|
16248
|
+
ShareLinkIdInputValidator: /* @__PURE__ */ __name2(() => ShareLinkIdInputValidator2, "ShareLinkIdInputValidator"),
|
|
16249
|
+
ShareLinkIdValidator: /* @__PURE__ */ __name2(() => ShareLinkIdValidator2, "ShareLinkIdValidator"),
|
|
16250
|
+
ShareLinkOperationKeyInputValidator: /* @__PURE__ */ __name2(() => ShareLinkOperationKeyInputValidator2, "ShareLinkOperationKeyInputValidator"),
|
|
16251
|
+
ShareLinkOwnerCommitOutputValidator: /* @__PURE__ */ __name2(() => ShareLinkOwnerCommitOutputValidator2, "ShareLinkOwnerCommitOutputValidator"),
|
|
16252
|
+
ShareLinkOwnerContentOutputValidator: /* @__PURE__ */ __name2(() => ShareLinkOwnerContentOutputValidator2, "ShareLinkOwnerContentOutputValidator"),
|
|
16253
|
+
ShareLinkOwnerRecoveryOutputValidator: /* @__PURE__ */ __name2(() => ShareLinkOwnerRecoveryOutputValidator2, "ShareLinkOwnerRecoveryOutputValidator"),
|
|
16254
|
+
ShareLinkOwnerStatusOutputValidator: /* @__PURE__ */ __name2(() => ShareLinkOwnerStatusOutputValidator2, "ShareLinkOwnerStatusOutputValidator"),
|
|
16255
|
+
ShareLinkPublicContentViewValidator: /* @__PURE__ */ __name2(() => ShareLinkPublicContentViewValidator2, "ShareLinkPublicContentViewValidator"),
|
|
16256
|
+
ShareLinkPublicStateValidator: /* @__PURE__ */ __name2(() => ShareLinkPublicStateValidator2, "ShareLinkPublicStateValidator"),
|
|
16257
|
+
ShareLinkStatusValidator: /* @__PURE__ */ __name2(() => ShareLinkStatusValidator2, "ShareLinkStatusValidator"),
|
|
16258
|
+
ShareLinkValidator: /* @__PURE__ */ __name2(() => ShareLinkValidator2, "ShareLinkValidator"),
|
|
16259
|
+
ShareManifestPresentationValidator: /* @__PURE__ */ __name2(() => ShareManifestPresentationValidator2, "ShareManifestPresentationValidator"),
|
|
16260
|
+
ShareOwnerRecoveryValidator: /* @__PURE__ */ __name2(() => ShareOwnerRecoveryValidator2, "ShareOwnerRecoveryValidator"),
|
|
16261
|
+
SharePayloadValidator: /* @__PURE__ */ __name2(() => SharePayloadValidator2, "SharePayloadValidator"),
|
|
16262
|
+
SharePayloadValidatorShape: /* @__PURE__ */ __name2(() => SharePayloadValidatorShape2, "SharePayloadValidatorShape"),
|
|
16263
|
+
ShareRecoveryEndorsementValidator: /* @__PURE__ */ __name2(() => ShareRecoveryEndorsementValidator2, "ShareRecoveryEndorsementValidator"),
|
|
16264
|
+
ShareRecoveryPlaintextValidator: /* @__PURE__ */ __name2(() => ShareRecoveryPlaintextValidator2, "ShareRecoveryPlaintextValidator"),
|
|
16265
|
+
ShareRecoverySelectionValidator: /* @__PURE__ */ __name2(() => ShareRecoverySelectionValidator2, "ShareRecoverySelectionValidator"),
|
|
16266
|
+
ShareSelectionEntryValidator: /* @__PURE__ */ __name2(() => ShareSelectionEntryValidator2, "ShareSelectionEntryValidator"),
|
|
16267
|
+
ShareSharerValidator: /* @__PURE__ */ __name2(() => ShareSharerValidator2, "ShareSharerValidator"),
|
|
16204
16268
|
SkillDeletionStrategyValidator: /* @__PURE__ */ __name2(() => SkillDeletionStrategyValidator2, "SkillDeletionStrategyValidator"),
|
|
16205
16269
|
SkillFrameworkAdminInputValidator: /* @__PURE__ */ __name2(() => SkillFrameworkAdminInputValidator2, "SkillFrameworkAdminInputValidator"),
|
|
16206
16270
|
SkillFrameworkAdminsValidator: /* @__PURE__ */ __name2(() => SkillFrameworkAdminsValidator2, "SkillFrameworkAdminsValidator"),
|
|
@@ -16232,6 +16296,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
16232
16296
|
UnsignedVCValidator: /* @__PURE__ */ __name2(() => UnsignedVCValidator2, "UnsignedVCValidator"),
|
|
16233
16297
|
UnsignedVPValidator: /* @__PURE__ */ __name2(() => UnsignedVPValidator2, "UnsignedVPValidator"),
|
|
16234
16298
|
UpdateFrameworkInputValidator: /* @__PURE__ */ __name2(() => UpdateFrameworkInputValidator2, "UpdateFrameworkInputValidator"),
|
|
16299
|
+
UpdateShareLinkInputValidator: /* @__PURE__ */ __name2(() => UpdateShareLinkInputValidator2, "UpdateShareLinkInputValidator"),
|
|
16235
16300
|
UpdateSkillInputValidator: /* @__PURE__ */ __name2(() => UpdateSkillInputValidator2, "UpdateSkillInputValidator"),
|
|
16236
16301
|
VC2EvidenceValidator: /* @__PURE__ */ __name2(() => VC2EvidenceValidator2, "VC2EvidenceValidator"),
|
|
16237
16302
|
VCValidator: /* @__PURE__ */ __name2(() => VCValidator2, "VCValidator"),
|
|
@@ -16243,7 +16308,12 @@ var require_types_cjs_development = __commonJS({
|
|
|
16243
16308
|
VerificationStatusValidator: /* @__PURE__ */ __name2(() => VerificationStatusValidator2, "VerificationStatusValidator"),
|
|
16244
16309
|
appStoreActionValidator: /* @__PURE__ */ __name2(() => appStoreActionValidator2, "appStoreActionValidator"),
|
|
16245
16310
|
capgoUpdateActionValidator: /* @__PURE__ */ __name2(() => capgoUpdateActionValidator2, "capgoUpdateActionValidator"),
|
|
16311
|
+
classifyShareManifest: /* @__PURE__ */ __name2(() => classifyShareManifest2, "classifyShareManifest"),
|
|
16312
|
+
decodeBase64Url: /* @__PURE__ */ __name2(() => decodeBase64Url2, "decodeBase64Url"),
|
|
16313
|
+
decodedBase64UrlByteLength: /* @__PURE__ */ __name2(() => decodedBase64UrlByteLength, "decodedBase64UrlByteLength"),
|
|
16246
16314
|
dismissActionValidator: /* @__PURE__ */ __name2(() => dismissActionValidator2, "dismissActionValidator"),
|
|
16315
|
+
encodeBase64Url: /* @__PURE__ */ __name2(() => encodeBase64Url2, "encodeBase64Url"),
|
|
16316
|
+
escrowPinMismatchMessage: /* @__PURE__ */ __name2(() => escrowPinMismatchMessage, "escrowPinMismatchMessage"),
|
|
16247
16317
|
externalLinkActionValidator: /* @__PURE__ */ __name2(() => externalLinkActionValidator2, "externalLinkActionValidator"),
|
|
16248
16318
|
inAppMessageActionStyleValidator: /* @__PURE__ */ __name2(() => inAppMessageActionStyleValidator2, "inAppMessageActionStyleValidator"),
|
|
16249
16319
|
inAppMessageActionTargetValidator: /* @__PURE__ */ __name2(() => inAppMessageActionTargetValidator2, "inAppMessageActionTargetValidator"),
|
|
@@ -16258,10 +16328,12 @@ var require_types_cjs_development = __commonJS({
|
|
|
16258
16328
|
inAppMessageVersionSourceValidator: /* @__PURE__ */ __name2(() => inAppMessageVersionSourceValidator2, "inAppMessageVersionSourceValidator"),
|
|
16259
16329
|
inAppMessagesFlagValidator: /* @__PURE__ */ __name2(() => inAppMessagesFlagValidator2, "inAppMessagesFlagValidator"),
|
|
16260
16330
|
internalLinkActionValidator: /* @__PURE__ */ __name2(() => internalLinkActionValidator2, "internalLinkActionValidator"),
|
|
16331
|
+
isCanonicalBase64Url: /* @__PURE__ */ __name2(() => isCanonicalBase64Url2, "isCanonicalBase64Url"),
|
|
16261
16332
|
isStoredCredentialEnvelope: /* @__PURE__ */ __name2(() => isStoredCredentialEnvelope2, "isStoredCredentialEnvelope"),
|
|
16262
16333
|
parseInAppMessagesFlag: /* @__PURE__ */ __name2(() => parseInAppMessagesFlag, "parseInAppMessagesFlag"),
|
|
16263
16334
|
platformPredicateValidator: /* @__PURE__ */ __name2(() => platformPredicateValidator2, "platformPredicateValidator"),
|
|
16264
16335
|
rolePredicateValidator: /* @__PURE__ */ __name2(() => rolePredicateValidator2, "rolePredicateValidator"),
|
|
16336
|
+
utf8ByteLength: /* @__PURE__ */ __name2(() => utf8ByteLength2, "utf8ByteLength"),
|
|
16265
16337
|
versionPredicateValidator: /* @__PURE__ */ __name2(() => versionPredicateValidator2, "versionPredicateValidator")
|
|
16266
16338
|
});
|
|
16267
16339
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -16783,7 +16855,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
16783
16855
|
util: /* @__PURE__ */ __name2(() => util_exports2, "util"),
|
|
16784
16856
|
version: /* @__PURE__ */ __name2(() => version3, "version")
|
|
16785
16857
|
});
|
|
16786
|
-
var
|
|
16858
|
+
var _a7;
|
|
16787
16859
|
var NEVER2 = /* @__PURE__ */ Object.freeze({
|
|
16788
16860
|
status: "aborted"
|
|
16789
16861
|
});
|
|
@@ -16853,18 +16925,18 @@ var require_types_cjs_development = __commonJS({
|
|
|
16853
16925
|
__name2($constructor2, "$constructor");
|
|
16854
16926
|
__name22($constructor2, "$constructor");
|
|
16855
16927
|
var $brand2 = /* @__PURE__ */ Symbol("zod_brand");
|
|
16856
|
-
var $ZodAsyncError2 = (
|
|
16928
|
+
var $ZodAsyncError2 = (_a8 = class extends Error {
|
|
16857
16929
|
constructor() {
|
|
16858
16930
|
super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
|
|
16859
16931
|
}
|
|
16860
|
-
}, __name(
|
|
16932
|
+
}, __name(_a8, "$ZodAsyncError"), __name2(_a8, "$ZodAsyncError"), __name22(_a8, "$ZodAsyncError"), _a8);
|
|
16861
16933
|
var $ZodEncodeError2 = (_b = class extends Error {
|
|
16862
16934
|
constructor(name) {
|
|
16863
16935
|
super(`Encountered unidirectional transform during encode: ${name}`);
|
|
16864
16936
|
this.name = "ZodEncodeError";
|
|
16865
16937
|
}
|
|
16866
16938
|
}, __name(_b, "$ZodEncodeError"), __name2(_b, "$ZodEncodeError"), __name22(_b, "$ZodEncodeError"), _b);
|
|
16867
|
-
(
|
|
16939
|
+
(_a7 = globalThis).__zod_globalConfig ?? (_a7.__zod_globalConfig = {});
|
|
16868
16940
|
var globalConfig2 = globalThis.__zod_globalConfig;
|
|
16869
16941
|
function config2(newConfig) {
|
|
16870
16942
|
if (newConfig)
|
|
@@ -16910,7 +16982,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
16910
16982
|
getSizableOrigin: /* @__PURE__ */ __name2(() => getSizableOrigin2, "getSizableOrigin"),
|
|
16911
16983
|
hexToUint8Array: /* @__PURE__ */ __name2(() => hexToUint8Array2, "hexToUint8Array"),
|
|
16912
16984
|
isObject: /* @__PURE__ */ __name2(() => isObject2, "isObject"),
|
|
16913
|
-
isPlainObject: /* @__PURE__ */ __name2(() =>
|
|
16985
|
+
isPlainObject: /* @__PURE__ */ __name2(() => isPlainObject22, "isPlainObject"),
|
|
16914
16986
|
issue: /* @__PURE__ */ __name2(() => issue2, "issue"),
|
|
16915
16987
|
joinValues: /* @__PURE__ */ __name2(() => joinValues2, "joinValues"),
|
|
16916
16988
|
jsonStringifyReplacer: /* @__PURE__ */ __name2(() => jsonStringifyReplacer2, "jsonStringifyReplacer"),
|
|
@@ -17159,7 +17231,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
17159
17231
|
return false;
|
|
17160
17232
|
}
|
|
17161
17233
|
});
|
|
17162
|
-
function
|
|
17234
|
+
function isPlainObject22(o) {
|
|
17163
17235
|
if (isObject2(o) === false)
|
|
17164
17236
|
return false;
|
|
17165
17237
|
const ctor = o.constructor;
|
|
@@ -17175,11 +17247,11 @@ var require_types_cjs_development = __commonJS({
|
|
|
17175
17247
|
}
|
|
17176
17248
|
return true;
|
|
17177
17249
|
}
|
|
17178
|
-
__name(
|
|
17179
|
-
__name2(
|
|
17180
|
-
__name22(
|
|
17250
|
+
__name(isPlainObject22, "isPlainObject2");
|
|
17251
|
+
__name2(isPlainObject22, "isPlainObject");
|
|
17252
|
+
__name22(isPlainObject22, "isPlainObject");
|
|
17181
17253
|
function shallowClone2(o) {
|
|
17182
|
-
if (
|
|
17254
|
+
if (isPlainObject22(o))
|
|
17183
17255
|
return { ...o };
|
|
17184
17256
|
if (Array.isArray(o))
|
|
17185
17257
|
return [...o];
|
|
@@ -17413,7 +17485,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
17413
17485
|
__name2(omit2, "omit");
|
|
17414
17486
|
__name22(omit2, "omit");
|
|
17415
17487
|
function extend2(schema, shape) {
|
|
17416
|
-
if (!
|
|
17488
|
+
if (!isPlainObject22(shape)) {
|
|
17417
17489
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
17418
17490
|
}
|
|
17419
17491
|
const checks = schema._zod.def.checks;
|
|
@@ -17439,7 +17511,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
17439
17511
|
__name2(extend2, "extend");
|
|
17440
17512
|
__name22(extend2, "extend");
|
|
17441
17513
|
function safeExtend2(schema, shape) {
|
|
17442
|
-
if (!
|
|
17514
|
+
if (!isPlainObject22(shape)) {
|
|
17443
17515
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
17444
17516
|
}
|
|
17445
17517
|
const def = mergeDefs2(schema._zod.def, {
|
|
@@ -19895,7 +19967,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
19895
19967
|
if (a instanceof Date && b instanceof Date && +a === +b) {
|
|
19896
19968
|
return { valid: true, data: a };
|
|
19897
19969
|
}
|
|
19898
|
-
if (
|
|
19970
|
+
if (isPlainObject22(a) && isPlainObject22(b)) {
|
|
19899
19971
|
const bKeys = Object.keys(b);
|
|
19900
19972
|
const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
|
|
19901
19973
|
const newObj = { ...a, ...b };
|
|
@@ -20096,7 +20168,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
20096
20168
|
$ZodType2.init(inst, def);
|
|
20097
20169
|
inst._zod.parse = (payload, ctx) => {
|
|
20098
20170
|
const input = payload.value;
|
|
20099
|
-
if (!
|
|
20171
|
+
if (!isPlainObject22(input)) {
|
|
20100
20172
|
payload.issues.push({
|
|
20101
20173
|
expected: "record",
|
|
20102
20174
|
code: "invalid_type",
|
|
@@ -32508,6 +32580,204 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32508
32580
|
$or: BaseStringQuery2.array()
|
|
32509
32581
|
})
|
|
32510
32582
|
]);
|
|
32583
|
+
var LearnCardRefreshAuthorizationValidator2 = external_exports2.object({ type: external_exports2.literal("LearnCardDIDAuth") }).catchall(external_exports2.any());
|
|
32584
|
+
var ManagedCredentialRefreshServiceValidator2 = external_exports2.object({
|
|
32585
|
+
id: external_exports2.string().min(1),
|
|
32586
|
+
type: external_exports2.literal("LearnCardCredentialRefresh2026"),
|
|
32587
|
+
authorization: LearnCardRefreshAuthorizationValidator2.optional()
|
|
32588
|
+
}).catchall(external_exports2.any());
|
|
32589
|
+
var StandardCredentialRefreshServiceValidator2 = external_exports2.object({
|
|
32590
|
+
id: external_exports2.string().min(1),
|
|
32591
|
+
type: external_exports2.literal("1EdTechCredentialRefresh")
|
|
32592
|
+
}).catchall(external_exports2.any());
|
|
32593
|
+
var SupportedCredentialRefreshServiceValidator2 = external_exports2.union([
|
|
32594
|
+
ManagedCredentialRefreshServiceValidator2,
|
|
32595
|
+
StandardCredentialRefreshServiceValidator2
|
|
32596
|
+
]);
|
|
32597
|
+
var AllocateCredentialRefreshInputValidator2 = external_exports2.object({
|
|
32598
|
+
holder: external_exports2.object({
|
|
32599
|
+
profileId: external_exports2.string().optional(),
|
|
32600
|
+
did: external_exports2.string().min(1)
|
|
32601
|
+
}),
|
|
32602
|
+
credentialId: external_exports2.string().min(1)
|
|
32603
|
+
});
|
|
32604
|
+
var AllocateCredentialRefreshResultValidator2 = external_exports2.object({
|
|
32605
|
+
refreshId: external_exports2.string().min(1),
|
|
32606
|
+
refreshService: ManagedCredentialRefreshServiceValidator2.extend({
|
|
32607
|
+
authorization: LearnCardRefreshAuthorizationValidator2
|
|
32608
|
+
})
|
|
32609
|
+
});
|
|
32610
|
+
var ManagedCredentialRefreshReceiptValidator2 = external_exports2.object({
|
|
32611
|
+
refreshId: external_exports2.string().min(1),
|
|
32612
|
+
refreshService: ManagedCredentialRefreshServiceValidator2,
|
|
32613
|
+
credentialId: external_exports2.string().min(1),
|
|
32614
|
+
issuerDid: external_exports2.string().min(1),
|
|
32615
|
+
holderDid: external_exports2.string().min(1),
|
|
32616
|
+
credentialStatus: CredentialStatusValidator2.or(
|
|
32617
|
+
CredentialStatusValidator2.array()
|
|
32618
|
+
).optional()
|
|
32619
|
+
}).strip();
|
|
32620
|
+
var InboxCredentialRefreshReceiptValidator2 = ManagedCredentialRefreshReceiptValidator2.omit(
|
|
32621
|
+
{ holderDid: true }
|
|
32622
|
+
).extend({ holderDid: external_exports2.string().min(1).optional() });
|
|
32623
|
+
var CredentialRefreshSigningModeValidator2 = external_exports2.enum(["issuer-signed", "signing-authority"]);
|
|
32624
|
+
var PublishCredentialRefreshBaseFields2 = {
|
|
32625
|
+
refreshId: external_exports2.string().min(1),
|
|
32626
|
+
notifyHolder: external_exports2.boolean().optional(),
|
|
32627
|
+
updateSummary: external_exports2.string().optional(),
|
|
32628
|
+
idempotencyKey: external_exports2.string().optional()
|
|
32629
|
+
};
|
|
32630
|
+
var PublishIssuerSignedRefreshValidator2 = external_exports2.object({
|
|
32631
|
+
...PublishCredentialRefreshBaseFields2,
|
|
32632
|
+
mode: external_exports2.literal("issuer-signed"),
|
|
32633
|
+
signedCredential: VCValidator2
|
|
32634
|
+
});
|
|
32635
|
+
var PublishSigningAuthorityRefreshValidator2 = external_exports2.object({
|
|
32636
|
+
...PublishCredentialRefreshBaseFields2,
|
|
32637
|
+
mode: external_exports2.literal("signing-authority"),
|
|
32638
|
+
credential: UnsignedVCValidator2,
|
|
32639
|
+
signingAuthority: external_exports2.object({
|
|
32640
|
+
type: external_exports2.string().min(1)
|
|
32641
|
+
}).catchall(external_exports2.any())
|
|
32642
|
+
});
|
|
32643
|
+
var PublishCredentialRefreshInputValidator2 = external_exports2.object({
|
|
32644
|
+
...PublishCredentialRefreshBaseFields2,
|
|
32645
|
+
mode: CredentialRefreshSigningModeValidator2,
|
|
32646
|
+
signedCredential: VCValidator2.optional(),
|
|
32647
|
+
credential: UnsignedVCValidator2.optional(),
|
|
32648
|
+
signingAuthority: external_exports2.object({
|
|
32649
|
+
type: external_exports2.string().min(1)
|
|
32650
|
+
}).catchall(external_exports2.any()).optional()
|
|
32651
|
+
}).superRefine((input, ctx) => {
|
|
32652
|
+
if (input.mode === "issuer-signed" && !input.signedCredential) {
|
|
32653
|
+
ctx.addIssue({
|
|
32654
|
+
code: "custom",
|
|
32655
|
+
path: ["signedCredential"],
|
|
32656
|
+
message: "signedCredential is required for issuer-signed publication"
|
|
32657
|
+
});
|
|
32658
|
+
}
|
|
32659
|
+
if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
|
|
32660
|
+
ctx.addIssue({
|
|
32661
|
+
code: "custom",
|
|
32662
|
+
path: ["mode"],
|
|
32663
|
+
message: "issuer-signed publication cannot include signing-authority fields"
|
|
32664
|
+
});
|
|
32665
|
+
}
|
|
32666
|
+
if (input.mode === "signing-authority") {
|
|
32667
|
+
if (input.signedCredential !== void 0) {
|
|
32668
|
+
ctx.addIssue({
|
|
32669
|
+
code: "custom",
|
|
32670
|
+
path: ["signedCredential"],
|
|
32671
|
+
message: "signing-authority publication cannot include signedCredential"
|
|
32672
|
+
});
|
|
32673
|
+
}
|
|
32674
|
+
if (!input.credential) {
|
|
32675
|
+
ctx.addIssue({
|
|
32676
|
+
code: "custom",
|
|
32677
|
+
path: ["credential"],
|
|
32678
|
+
message: "credential is required for signing-authority publication"
|
|
32679
|
+
});
|
|
32680
|
+
}
|
|
32681
|
+
if (!input.signingAuthority) {
|
|
32682
|
+
ctx.addIssue({
|
|
32683
|
+
code: "custom",
|
|
32684
|
+
path: ["signingAuthority"],
|
|
32685
|
+
message: "signingAuthority is required for signing-authority publication"
|
|
32686
|
+
});
|
|
32687
|
+
}
|
|
32688
|
+
}
|
|
32689
|
+
});
|
|
32690
|
+
var PublishCredentialRefreshNotificationValidator2 = external_exports2.enum([
|
|
32691
|
+
"queued",
|
|
32692
|
+
"suppressed",
|
|
32693
|
+
"not-applicable",
|
|
32694
|
+
/** Publication succeeded, but the post-commit notification enqueue must be retried. */
|
|
32695
|
+
"delivery-failed"
|
|
32696
|
+
]);
|
|
32697
|
+
var PublishCredentialRefreshResultValidator2 = external_exports2.object({
|
|
32698
|
+
refreshId: external_exports2.string().min(1),
|
|
32699
|
+
version: external_exports2.number().int().positive(),
|
|
32700
|
+
publishedAt: external_exports2.string().min(1),
|
|
32701
|
+
notification: PublishCredentialRefreshNotificationValidator2
|
|
32702
|
+
});
|
|
32703
|
+
var CredentialRefreshVersionMetadataValidator2 = external_exports2.object({
|
|
32704
|
+
version: external_exports2.number().int().positive(),
|
|
32705
|
+
publishedAt: external_exports2.string().min(1),
|
|
32706
|
+
effectiveAt: external_exports2.string().optional(),
|
|
32707
|
+
etag: external_exports2.string().optional(),
|
|
32708
|
+
signingMode: CredentialRefreshSigningModeValidator2.optional(),
|
|
32709
|
+
updateSummary: external_exports2.string().optional()
|
|
32710
|
+
});
|
|
32711
|
+
var GetCredentialRefreshHistoryInputValidator2 = external_exports2.object({
|
|
32712
|
+
refreshId: external_exports2.string().min(1),
|
|
32713
|
+
cursor: external_exports2.string().optional(),
|
|
32714
|
+
limit: external_exports2.number().int().positive().optional()
|
|
32715
|
+
});
|
|
32716
|
+
var GetCredentialRefreshHistoryResultValidator2 = external_exports2.object({
|
|
32717
|
+
records: CredentialRefreshVersionMetadataValidator2.array(),
|
|
32718
|
+
hasMore: external_exports2.boolean(),
|
|
32719
|
+
cursor: external_exports2.string().optional()
|
|
32720
|
+
});
|
|
32721
|
+
var CredentialRefreshChallengeValidator2 = external_exports2.object({
|
|
32722
|
+
challenge: external_exports2.string().min(1),
|
|
32723
|
+
expiresAt: external_exports2.string().min(1),
|
|
32724
|
+
domain: external_exports2.string().optional(),
|
|
32725
|
+
scheme: external_exports2.literal("LearnCardDIDAuth").optional()
|
|
32726
|
+
});
|
|
32727
|
+
var PublicCredentialRefreshEnvelopeValidator2 = external_exports2.object({
|
|
32728
|
+
format: external_exports2.literal("vc"),
|
|
32729
|
+
credential: VCValidator2,
|
|
32730
|
+
etag: external_exports2.string().optional()
|
|
32731
|
+
});
|
|
32732
|
+
var JweCredentialRefreshEnvelopeValidator2 = external_exports2.object({
|
|
32733
|
+
format: external_exports2.literal("jwe"),
|
|
32734
|
+
jwe: JWEValidator2,
|
|
32735
|
+
etag: external_exports2.string().optional(),
|
|
32736
|
+
/** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
|
|
32737
|
+
version: external_exports2.number().int().positive().optional()
|
|
32738
|
+
});
|
|
32739
|
+
var CredentialRefreshResponseEnvelopeValidator2 = external_exports2.discriminatedUnion("format", [
|
|
32740
|
+
PublicCredentialRefreshEnvelopeValidator2,
|
|
32741
|
+
JweCredentialRefreshEnvelopeValidator2
|
|
32742
|
+
]);
|
|
32743
|
+
var CredentialRefreshFailureCodeValidator2 = external_exports2.enum([
|
|
32744
|
+
"UNAVAILABLE",
|
|
32745
|
+
"TIMEOUT",
|
|
32746
|
+
"UNSUPPORTED_SERVICE",
|
|
32747
|
+
"UNAUTHORIZED",
|
|
32748
|
+
"MALFORMED_RESPONSE",
|
|
32749
|
+
"INVALID_PROOF",
|
|
32750
|
+
"ISSUER_MISMATCH",
|
|
32751
|
+
"ID_MISMATCH",
|
|
32752
|
+
"ROLLBACK",
|
|
32753
|
+
"REVOKED",
|
|
32754
|
+
"UNSAFE_ENDPOINT"
|
|
32755
|
+
]);
|
|
32756
|
+
var CredentialRefreshUpdatedResultValidator2 = external_exports2.object({
|
|
32757
|
+
status: external_exports2.literal("updated"),
|
|
32758
|
+
credential: VCValidator2,
|
|
32759
|
+
etag: external_exports2.string().optional(),
|
|
32760
|
+
managedVersion: external_exports2.number().int().positive().optional()
|
|
32761
|
+
});
|
|
32762
|
+
var CredentialRefreshUnchangedResultValidator2 = external_exports2.object({
|
|
32763
|
+
status: external_exports2.literal("unchanged"),
|
|
32764
|
+
checkedAt: external_exports2.string().min(1),
|
|
32765
|
+
etag: external_exports2.string().optional()
|
|
32766
|
+
});
|
|
32767
|
+
var CredentialRefreshUnsupportedResultValidator2 = external_exports2.object({
|
|
32768
|
+
status: external_exports2.literal("unsupported")
|
|
32769
|
+
});
|
|
32770
|
+
var CredentialRefreshFailedResultValidator2 = external_exports2.object({
|
|
32771
|
+
status: external_exports2.literal("failed"),
|
|
32772
|
+
code: CredentialRefreshFailureCodeValidator2,
|
|
32773
|
+
retryable: external_exports2.boolean()
|
|
32774
|
+
});
|
|
32775
|
+
var CredentialRefreshResultValidator2 = external_exports2.discriminatedUnion("status", [
|
|
32776
|
+
CredentialRefreshUpdatedResultValidator2,
|
|
32777
|
+
CredentialRefreshUnchangedResultValidator2,
|
|
32778
|
+
CredentialRefreshUnsupportedResultValidator2,
|
|
32779
|
+
CredentialRefreshFailedResultValidator2
|
|
32780
|
+
]);
|
|
32511
32781
|
var LCNProfileDisplayValidator2 = external_exports2.object({
|
|
32512
32782
|
backgroundColor: external_exports2.string().optional(),
|
|
32513
32783
|
backgroundImage: external_exports2.string().optional(),
|
|
@@ -32843,7 +33113,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32843
33113
|
"Options for email/phone recipients (Universal Inbox)"
|
|
32844
33114
|
),
|
|
32845
33115
|
templateData: external_exports2.record(external_exports2.string(), external_exports2.unknown()).optional(),
|
|
32846
|
-
integrationId: external_exports2.string().optional().describe("Integration ID for activity tracking")
|
|
33116
|
+
integrationId: external_exports2.string().optional().describe("Integration ID for activity tracking"),
|
|
33117
|
+
refresh: external_exports2.boolean().optional().describe(
|
|
33118
|
+
"Request managed credential refresh for this send. Profile/DID recipients use immediate issuance; email/phone recipients use deferred Universal Inbox signing and bind the holder at claim."
|
|
33119
|
+
),
|
|
33120
|
+
idempotencyKey: external_exports2.string().min(1).max(200).optional().describe(
|
|
33121
|
+
"Caller-chosen key that makes a managed refresh send (refresh: true) safe to retry as a whole: retries with the same key reuse the same boost, refresh allocation and result. Reusing a key for a different request is rejected. With signedCredential, requires prior tRPC prepareRefreshableSend; direct REST callers omit the key and retry the exact signed credential and templateUri."
|
|
33122
|
+
)
|
|
32847
33123
|
}).refine((data) => data.templateUri || data.template || data.signedCredential, {
|
|
32848
33124
|
message: "Either templateUri, template, or signedCredential must be provided.",
|
|
32849
33125
|
path: ["templateUri"]
|
|
@@ -32858,8 +33134,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32858
33134
|
message: "guardianEmail must differ from recipient (self-approval not allowed)",
|
|
32859
33135
|
path: ["options", "guardianEmail"]
|
|
32860
33136
|
}
|
|
32861
|
-
)
|
|
33137
|
+
).refine((data) => !data.idempotencyKey || data.refresh === true, {
|
|
33138
|
+
message: "idempotencyKey is only supported with refresh: true.",
|
|
33139
|
+
path: ["idempotencyKey"]
|
|
33140
|
+
});
|
|
32862
33141
|
var SendInboxResponseValidator2 = external_exports2.object({
|
|
33142
|
+
refresh: InboxCredentialRefreshReceiptValidator2.optional(),
|
|
32863
33143
|
issuanceId: external_exports2.string(),
|
|
32864
33144
|
status: external_exports2.enum(["PENDING", "ISSUED", "EXPIRED", "DELIVERED", "CLAIMED"]),
|
|
32865
33145
|
claimUrl: external_exports2.string().url().optional().describe("Present when suppressDelivery=true"),
|
|
@@ -32874,8 +33154,34 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32874
33154
|
activityId: external_exports2.string().describe("Links to the activity lifecycle for this issuance"),
|
|
32875
33155
|
inbox: SendInboxResponseValidator2.optional().describe(
|
|
32876
33156
|
"Present when sent via email/phone (Universal Inbox)"
|
|
33157
|
+
),
|
|
33158
|
+
refresh: ManagedCredentialRefreshReceiptValidator2.optional().describe(
|
|
33159
|
+
"Present when managed refresh was requested: issuance metadata the issuer keeps to publish future updates"
|
|
32877
33160
|
)
|
|
32878
33161
|
});
|
|
33162
|
+
var PrepareRefreshableSendInputValidator2 = external_exports2.object({
|
|
33163
|
+
recipient: external_exports2.string(),
|
|
33164
|
+
templateUri: external_exports2.string().optional(),
|
|
33165
|
+
template: SendBoostTemplateValidator2.optional(),
|
|
33166
|
+
contractUri: external_exports2.string().optional(),
|
|
33167
|
+
templateData: external_exports2.record(external_exports2.string(), external_exports2.unknown()).optional(),
|
|
33168
|
+
integrationId: external_exports2.string().optional(),
|
|
33169
|
+
/** Credential ID to allocate for; generated server-side when omitted. */
|
|
33170
|
+
credentialId: external_exports2.string().min(1).optional(),
|
|
33171
|
+
idempotencyKey: external_exports2.string().min(1).max(200).optional()
|
|
33172
|
+
}).refine((data) => Boolean(data.templateUri) !== Boolean(data.template), {
|
|
33173
|
+
message: "Provide exactly one of templateUri or template."
|
|
33174
|
+
});
|
|
33175
|
+
var PrepareRefreshableSendResultValidator2 = external_exports2.object({
|
|
33176
|
+
boostUri: external_exports2.string(),
|
|
33177
|
+
credentialId: external_exports2.string(),
|
|
33178
|
+
refreshId: external_exports2.string(),
|
|
33179
|
+
refreshService: ManagedCredentialRefreshServiceValidator2,
|
|
33180
|
+
/** The DID to use as credentialSubject.id (recipient DID, or the profile's did:web). */
|
|
33181
|
+
holderDid: external_exports2.string(),
|
|
33182
|
+
/** Present when this idempotencyKey already completed: return it without signing. */
|
|
33183
|
+
completed: SendBoostResponseValidator2.optional()
|
|
33184
|
+
});
|
|
32879
33185
|
var SendInputValidator2 = external_exports2.discriminatedUnion("type", [SendBoostInputValidator2]);
|
|
32880
33186
|
var SendResponseValidator2 = external_exports2.discriminatedUnion("type", [SendBoostResponseValidator2]);
|
|
32881
33187
|
var ConsentFlowTermsStatusValidator2 = external_exports2.enum(["live", "stale", "withdrawn"]);
|
|
@@ -33194,6 +33500,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33194
33500
|
webhookUrl: external_exports2.string().optional()
|
|
33195
33501
|
});
|
|
33196
33502
|
var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX2 = "auth-grant:";
|
|
33503
|
+
var ACT_AS_HEADER = "X-LearnCard-Act-As";
|
|
33197
33504
|
var AuthGrantValidator2 = external_exports2.object({
|
|
33198
33505
|
id: external_exports2.string(),
|
|
33199
33506
|
name: external_exports2.string(),
|
|
@@ -33206,6 +33513,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33206
33513
|
}, "error")
|
|
33207
33514
|
}),
|
|
33208
33515
|
scope: external_exports2.string(),
|
|
33516
|
+
actAs: external_exports2.string().optional(),
|
|
33209
33517
|
createdAt: external_exports2.iso.datetime({ error: "createdAt must be a valid ISO 8601 datetime string" }),
|
|
33210
33518
|
expiresAt: external_exports2.iso.datetime({ error: "expiresAt must be a valid ISO 8601 datetime string" }).nullish().optional()
|
|
33211
33519
|
});
|
|
@@ -33277,6 +33585,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33277
33585
|
sessionJwt: external_exports2.string()
|
|
33278
33586
|
});
|
|
33279
33587
|
var InboxCredentialValidator2 = external_exports2.object({
|
|
33588
|
+
refresh: InboxCredentialRefreshReceiptValidator2.optional(),
|
|
33589
|
+
refreshId: external_exports2.string().optional(),
|
|
33280
33590
|
id: external_exports2.string(),
|
|
33281
33591
|
credential: external_exports2.string().optional(),
|
|
33282
33592
|
isSigned: external_exports2.boolean(),
|
|
@@ -33331,12 +33641,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33331
33641
|
templateUri: external_exports2.string().optional().describe(
|
|
33332
33642
|
"URI of a boost template to use for issuance. The boost credential will be resolved and used. Mutually exclusive with credential field."
|
|
33333
33643
|
),
|
|
33644
|
+
refresh: external_exports2.boolean().optional().describe(
|
|
33645
|
+
"Allocate managed refresh before signing. Requires unsigned content and a registered signing authority; binds the holder on claim."
|
|
33646
|
+
),
|
|
33647
|
+
idempotencyKey: external_exports2.string().min(1).max(200).optional(),
|
|
33334
33648
|
// === OPTIONAL FEATURES ===
|
|
33335
33649
|
// Add major, distinct features at the top level.
|
|
33336
33650
|
//consentRequest: ConsentRequestValidator.optional(),
|
|
33337
33651
|
// === PROCESS CONFIGURATION (Optional) ===
|
|
33338
33652
|
// HOW should this issuance be handled?
|
|
33339
33653
|
configuration: external_exports2.object({
|
|
33654
|
+
guardianEmail: external_exports2.string().email().optional().describe(
|
|
33655
|
+
"Require approval from this guardian before the recipient can claim. Must differ from the recipient email."
|
|
33656
|
+
),
|
|
33340
33657
|
signingAuthority: IssueInboxSigningAuthorityValidator2.optional().describe(
|
|
33341
33658
|
"The signing authority to use for the credential. If not provided, the users default signing authority will be used if the credential is not signed."
|
|
33342
33659
|
),
|
|
@@ -33390,17 +33707,130 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33390
33707
|
}).optional().describe(
|
|
33391
33708
|
"Configuration for the credential issuance. If not provided, the default configuration will be used."
|
|
33392
33709
|
)
|
|
33710
|
+
}).refine((data) => !data.idempotencyKey || data.refresh === true, {
|
|
33711
|
+
message: "idempotencyKey requires refresh: true."
|
|
33393
33712
|
}).refine((data) => data.credential || data.templateUri, {
|
|
33394
33713
|
message: "Either credential or templateUri must be provided.",
|
|
33395
33714
|
path: ["credential"]
|
|
33396
|
-
})
|
|
33715
|
+
}).refine(
|
|
33716
|
+
(data) => !data.configuration?.guardianEmail || data.recipient.type !== "email" || data.configuration.guardianEmail.toLowerCase() !== data.recipient.value.toLowerCase(),
|
|
33717
|
+
{
|
|
33718
|
+
message: "guardianEmail must differ from recipient (self-approval not allowed)",
|
|
33719
|
+
path: ["configuration", "guardianEmail"]
|
|
33720
|
+
}
|
|
33721
|
+
);
|
|
33397
33722
|
var IssueInboxCredentialResponseValidator2 = external_exports2.object({
|
|
33723
|
+
refresh: InboxCredentialRefreshReceiptValidator2.optional(),
|
|
33398
33724
|
issuanceId: external_exports2.string(),
|
|
33399
33725
|
status: LCNInboxStatusEnumValidator2,
|
|
33400
33726
|
recipient: ContactMethodQueryValidator2,
|
|
33401
33727
|
claimUrl: external_exports2.string().url().optional(),
|
|
33402
33728
|
recipientDid: external_exports2.string().optional()
|
|
33403
33729
|
});
|
|
33730
|
+
var InboxBatchConfigurationValidator2 = IssueInboxCredentialValidator2.shape.configuration.unwrap().extend({
|
|
33731
|
+
refresh: IssueInboxCredentialValidator2.shape.refresh.describe(
|
|
33732
|
+
"Enable managed refresh by default. An item configuration.refresh overrides this value, including false."
|
|
33733
|
+
),
|
|
33734
|
+
delivery: IssueInboxCredentialValidator2.shape.configuration.unwrap().shape.delivery.unwrap().extend({ suppress: external_exports2.boolean().optional() }).optional()
|
|
33735
|
+
});
|
|
33736
|
+
var InboxBatchItemConfigurationValidator2 = InboxBatchConfigurationValidator2.extend({
|
|
33737
|
+
guardianEmail: InboxBatchConfigurationValidator2.shape.guardianEmail.nullable().describe(
|
|
33738
|
+
"Require guardian approval, or set null to clear a batch-level guardianEmail for this item."
|
|
33739
|
+
)
|
|
33740
|
+
});
|
|
33741
|
+
var IssueInboxCredentialBatchItemValidator2 = external_exports2.object({
|
|
33742
|
+
...IssueInboxCredentialValidator2.shape,
|
|
33743
|
+
configuration: InboxBatchItemConfigurationValidator2.optional(),
|
|
33744
|
+
idempotencyKey: external_exports2.string().max(256).optional()
|
|
33745
|
+
}).refine((data) => data.credential || data.templateUri, {
|
|
33746
|
+
message: "Either credential or templateUri must be provided.",
|
|
33747
|
+
path: ["credential"]
|
|
33748
|
+
}).describe(
|
|
33749
|
+
"One issuance: provide credential or templateUri. Invalid input is rejected at submission with its item index."
|
|
33750
|
+
);
|
|
33751
|
+
var IssueInboxCredentialBatchValidator2 = external_exports2.object({
|
|
33752
|
+
requestId: external_exports2.string().min(1).max(256).optional(),
|
|
33753
|
+
items: external_exports2.array(IssueInboxCredentialBatchItemValidator2).min(1).max(100),
|
|
33754
|
+
configuration: InboxBatchConfigurationValidator2.optional()
|
|
33755
|
+
}).superRefine((batch, ctx) => {
|
|
33756
|
+
batch.items.forEach((item, index) => {
|
|
33757
|
+
const itemGuardian = item.configuration?.guardianEmail;
|
|
33758
|
+
const guardian = itemGuardian === null ? void 0 : itemGuardian ?? batch.configuration?.guardianEmail;
|
|
33759
|
+
if (guardian && item.recipient.type === "email" && guardian.toLowerCase() === item.recipient.value.toLowerCase()) {
|
|
33760
|
+
ctx.addIssue({
|
|
33761
|
+
code: "custom",
|
|
33762
|
+
path: ["items", index, "configuration", "guardianEmail"],
|
|
33763
|
+
message: "guardianEmail must differ from recipient (self-approval not allowed)"
|
|
33764
|
+
});
|
|
33765
|
+
}
|
|
33766
|
+
});
|
|
33767
|
+
});
|
|
33768
|
+
var InboxBatchErrorReasonValidator2 = external_exports2.enum([
|
|
33769
|
+
"DUPLICATE_KEY",
|
|
33770
|
+
"IDEMPOTENCY_MISMATCH",
|
|
33771
|
+
"IN_PROGRESS",
|
|
33772
|
+
"UNCONFIRMED"
|
|
33773
|
+
]);
|
|
33774
|
+
var IssueInboxCredentialBatchItemResultValidator2 = external_exports2.discriminatedUnion("success", [
|
|
33775
|
+
IssueInboxCredentialResponseValidator2.extend({
|
|
33776
|
+
success: external_exports2.literal(true),
|
|
33777
|
+
index: external_exports2.number().int().nonnegative(),
|
|
33778
|
+
deduplicated: external_exports2.boolean().optional(),
|
|
33779
|
+
guardianStatus: GuardianStatusValidator2.optional(),
|
|
33780
|
+
idempotencyKey: external_exports2.string().optional()
|
|
33781
|
+
}),
|
|
33782
|
+
external_exports2.object({
|
|
33783
|
+
success: external_exports2.literal(false),
|
|
33784
|
+
index: external_exports2.number().int().nonnegative(),
|
|
33785
|
+
idempotencyKey: external_exports2.string().optional(),
|
|
33786
|
+
recipient: ContactMethodQueryValidator2.optional(),
|
|
33787
|
+
error: external_exports2.object({
|
|
33788
|
+
code: external_exports2.string(),
|
|
33789
|
+
message: external_exports2.string(),
|
|
33790
|
+
reason: InboxBatchErrorReasonValidator2.optional()
|
|
33791
|
+
}),
|
|
33792
|
+
issuanceId: external_exports2.string().optional().describe(
|
|
33793
|
+
"Present when issuance completed but replay storage could not be confirmed. Reconcile this issuance; do not issue again with a new key."
|
|
33794
|
+
),
|
|
33795
|
+
claimUrl: external_exports2.string().url().optional().describe(
|
|
33796
|
+
"Claim URL of the completed issuance, if available, when replay storage could not be confirmed."
|
|
33797
|
+
)
|
|
33798
|
+
})
|
|
33799
|
+
]);
|
|
33800
|
+
var IssueInboxCredentialBatchResponseValidator2 = external_exports2.object({
|
|
33801
|
+
results: external_exports2.array(IssueInboxCredentialBatchItemResultValidator2),
|
|
33802
|
+
summary: external_exports2.object({
|
|
33803
|
+
total: external_exports2.number(),
|
|
33804
|
+
succeeded: external_exports2.number(),
|
|
33805
|
+
failed: external_exports2.number(),
|
|
33806
|
+
deduplicated: external_exports2.number()
|
|
33807
|
+
})
|
|
33808
|
+
});
|
|
33809
|
+
var InboxBatchReceiptValidator2 = external_exports2.object({
|
|
33810
|
+
batchId: external_exports2.string(),
|
|
33811
|
+
status: external_exports2.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
|
|
33812
|
+
createdAt: external_exports2.string()
|
|
33813
|
+
});
|
|
33814
|
+
var InboxBatchStatusValidator2 = external_exports2.object({
|
|
33815
|
+
batchId: external_exports2.string(),
|
|
33816
|
+
createdAt: external_exports2.string(),
|
|
33817
|
+
done: external_exports2.boolean().describe(
|
|
33818
|
+
"True when no queued or processing items remain, including unconfirmed outcomes."
|
|
33819
|
+
),
|
|
33820
|
+
status: external_exports2.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
|
|
33821
|
+
items: external_exports2.array(
|
|
33822
|
+
external_exports2.object({
|
|
33823
|
+
index: external_exports2.number().int().nonnegative(),
|
|
33824
|
+
state: external_exports2.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
|
|
33825
|
+
result: IssueInboxCredentialBatchItemResultValidator2.optional()
|
|
33826
|
+
})
|
|
33827
|
+
),
|
|
33828
|
+
summary: IssueInboxCredentialBatchResponseValidator2.shape.summary.extend({
|
|
33829
|
+
completed: external_exports2.number(),
|
|
33830
|
+
pending: external_exports2.number(),
|
|
33831
|
+
unconfirmed: external_exports2.number()
|
|
33832
|
+
})
|
|
33833
|
+
});
|
|
33404
33834
|
var CredentialNameRefValidator2 = external_exports2.object({ name: external_exports2.string() }).passthrough();
|
|
33405
33835
|
var ClaimInboxCredentialValidator2 = external_exports2.object({
|
|
33406
33836
|
credential: VCValidator2.or(VPValidator2).or(UnsignedVCValidator2).or(CredentialNameRefValidator2).describe("The credential to issue, or a { name } reference to resolve a boost template."),
|
|
@@ -33886,6 +34316,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33886
34316
|
eventType: CredentialActivityEventTypeValidator2,
|
|
33887
34317
|
timestamp: external_exports2.string(),
|
|
33888
34318
|
actorProfileId: external_exports2.string().optional(),
|
|
34319
|
+
onBehalfOf: external_exports2.string().optional(),
|
|
33889
34320
|
recipientType: CredentialActivityRecipientTypeValidator2,
|
|
33890
34321
|
recipientIdentifier: external_exports2.string(),
|
|
33891
34322
|
boostUri: external_exports2.string().optional(),
|
|
@@ -33926,6 +34357,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33926
34357
|
this.name = "AuthSessionError";
|
|
33927
34358
|
}
|
|
33928
34359
|
}, __name(_g, "AuthSessionError"), __name2(_g, "AuthSessionError"), __name22(_g, "AuthSessionError"), _g);
|
|
34360
|
+
var ESCROW_PIN_LOCKED_MESSAGE = "Too many incorrect PIN attempts. You can still recover by waiting.";
|
|
34361
|
+
var ESCROW_PIN_UNAVAILABLE_MESSAGE = "PIN recovery is not available for this account.";
|
|
34362
|
+
var ESCROW_PIN_MISMATCH_PATTERN = /^Incorrect PIN\. (\d+) attempts left\.$/;
|
|
34363
|
+
var escrowPinMismatchMessage = /* @__PURE__ */ __name22((attemptsRemaining) => `Incorrect PIN. ${attemptsRemaining} attempts left.`, "escrowPinMismatchMessage");
|
|
34364
|
+
var EscrowPinStatusValidator2 = external_exports2.object({
|
|
34365
|
+
state: external_exports2.enum(["none", "enabled", "locked", "stale"]),
|
|
34366
|
+
enabled: external_exports2.boolean(),
|
|
34367
|
+
attemptsRemaining: external_exports2.number().int().nonnegative(),
|
|
34368
|
+
salt: external_exports2.string().optional()
|
|
34369
|
+
});
|
|
33929
34370
|
var BITSTRING_STATUS_PURPOSES2 = ["revocation", "suspension"];
|
|
33930
34371
|
var DEFAULT_BITSTRING_STATUS_LIST_SIZE = 131072;
|
|
33931
34372
|
var BitstringStatusPurposeValidator2 = external_exports2.enum(BITSTRING_STATUS_PURPOSES2);
|
|
@@ -34040,191 +34481,458 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
34040
34481
|
const result = inAppMessagesFlagValidator2.safeParse(raw);
|
|
34041
34482
|
return result.success ? result.data : EMPTY_IN_APP_MESSAGES_FLAG;
|
|
34042
34483
|
}, "parseInAppMessagesFlag");
|
|
34043
|
-
var
|
|
34044
|
-
var
|
|
34045
|
-
|
|
34046
|
-
|
|
34047
|
-
|
|
34048
|
-
|
|
34049
|
-
var
|
|
34050
|
-
|
|
34051
|
-
|
|
34052
|
-
|
|
34053
|
-
var
|
|
34054
|
-
|
|
34055
|
-
|
|
34056
|
-
|
|
34057
|
-
var
|
|
34058
|
-
|
|
34059
|
-
|
|
34060
|
-
|
|
34061
|
-
|
|
34062
|
-
|
|
34063
|
-
|
|
34064
|
-
|
|
34065
|
-
|
|
34066
|
-
|
|
34067
|
-
|
|
34068
|
-
|
|
34069
|
-
|
|
34070
|
-
|
|
34071
|
-
|
|
34072
|
-
|
|
34073
|
-
|
|
34074
|
-
|
|
34075
|
-
|
|
34076
|
-
|
|
34077
|
-
|
|
34078
|
-
|
|
34079
|
-
|
|
34080
|
-
|
|
34081
|
-
|
|
34082
|
-
|
|
34083
|
-
|
|
34084
|
-
|
|
34085
|
-
|
|
34086
|
-
|
|
34087
|
-
|
|
34088
|
-
|
|
34089
|
-
|
|
34090
|
-
|
|
34091
|
-
|
|
34092
|
-
|
|
34093
|
-
|
|
34094
|
-
|
|
34095
|
-
|
|
34096
|
-
|
|
34097
|
-
}
|
|
34098
|
-
|
|
34099
|
-
|
|
34100
|
-
|
|
34101
|
-
|
|
34102
|
-
|
|
34103
|
-
|
|
34104
|
-
|
|
34484
|
+
var SHARE_LINK_ID_BYTES2 = 16;
|
|
34485
|
+
var SHARE_CONTENT_KEY_BYTES2 = 32;
|
|
34486
|
+
var SHARE_IV_BYTES2 = 12;
|
|
34487
|
+
var SHARE_TAG_BYTES2 = 16;
|
|
34488
|
+
var MAX_SHARE_CIPHERTEXT_BYTES2 = 512 * 1024;
|
|
34489
|
+
var MAX_SHARE_RECOVERY_JWE_BYTES2 = 64 * 1024;
|
|
34490
|
+
var MAX_SELECTED_CREDENTIALS2 = 50;
|
|
34491
|
+
var MAX_ENDORSEMENTS2 = 200;
|
|
34492
|
+
var MAX_VP_MEMBERS2 = MAX_SELECTED_CREDENTIALS2 + MAX_ENDORSEMENTS2;
|
|
34493
|
+
var MAX_SHARE_SOURCE_URI_CHARS2 = 2048;
|
|
34494
|
+
var MAX_SHARE_LINK_REQUEST_BYTES2 = 1024 * 1024;
|
|
34495
|
+
var SHARE_LINK_PROTOCOL2 = "lc-share/v1";
|
|
34496
|
+
var SHARE_RECOVERY_PROTOCOL2 = "lc-share-recovery/v1";
|
|
34497
|
+
var SHARE_AAD_PREFIX = "lc-share:v1";
|
|
34498
|
+
var BASE64URL_ALPHABET2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
|
34499
|
+
var BASE64URL_LOOKUP2 = (() => {
|
|
34500
|
+
const table = new Int16Array(128).fill(-1);
|
|
34501
|
+
for (let index = 0; index < BASE64URL_ALPHABET2.length; index += 1) {
|
|
34502
|
+
table[BASE64URL_ALPHABET2.charCodeAt(index)] = index;
|
|
34503
|
+
}
|
|
34504
|
+
return table;
|
|
34505
|
+
})();
|
|
34506
|
+
var encodeBase64Url2 = /* @__PURE__ */ __name22((bytes) => {
|
|
34507
|
+
let output = "";
|
|
34508
|
+
for (let index = 0; index < bytes.length; index += 3) {
|
|
34509
|
+
const first = bytes[index];
|
|
34510
|
+
const second = bytes[index + 1];
|
|
34511
|
+
const third = bytes[index + 2];
|
|
34512
|
+
output += BASE64URL_ALPHABET2[first >> 2];
|
|
34513
|
+
output += BASE64URL_ALPHABET2[(first & 3) << 4 | (second ?? 0) >> 4];
|
|
34514
|
+
if (second === void 0) break;
|
|
34515
|
+
output += BASE64URL_ALPHABET2[(second & 15) << 2 | (third ?? 0) >> 6];
|
|
34516
|
+
if (third === void 0) break;
|
|
34517
|
+
output += BASE64URL_ALPHABET2[third & 63];
|
|
34518
|
+
}
|
|
34519
|
+
return output;
|
|
34520
|
+
}, "encodeBase64Url");
|
|
34521
|
+
var decodeBase64Url2 = /* @__PURE__ */ __name22((value) => {
|
|
34522
|
+
if (typeof value !== "string") return null;
|
|
34523
|
+
const output = new Uint8Array(Math.floor(value.length * 6 / 8));
|
|
34524
|
+
let bits = 0;
|
|
34525
|
+
let bitCount = 0;
|
|
34526
|
+
let outputIndex = 0;
|
|
34527
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
34528
|
+
const code = value.charCodeAt(index);
|
|
34529
|
+
const digit = code < 128 ? BASE64URL_LOOKUP2[code] : -1;
|
|
34530
|
+
if (digit < 0) return null;
|
|
34531
|
+
bits = bits << 6 | digit;
|
|
34532
|
+
bitCount += 6;
|
|
34533
|
+
if (bitCount >= 8) {
|
|
34534
|
+
bitCount -= 8;
|
|
34535
|
+
output[outputIndex] = bits >> bitCount & 255;
|
|
34536
|
+
outputIndex += 1;
|
|
34537
|
+
}
|
|
34538
|
+
}
|
|
34539
|
+
return output;
|
|
34540
|
+
}, "decodeBase64Url");
|
|
34541
|
+
var isCanonicalBase64Url2 = /* @__PURE__ */ __name22((value, expectedBytes) => {
|
|
34542
|
+
if (typeof value !== "string") return false;
|
|
34543
|
+
if (expectedBytes !== void 0 && value.length !== Math.ceil(expectedBytes * 4 / 3))
|
|
34544
|
+
return false;
|
|
34545
|
+
const decoded = decodeBase64Url2(value);
|
|
34546
|
+
if (decoded === null) return false;
|
|
34547
|
+
if (expectedBytes !== void 0 && decoded.length !== expectedBytes) return false;
|
|
34548
|
+
return encodeBase64Url2(decoded) === value;
|
|
34549
|
+
}, "isCanonicalBase64Url");
|
|
34550
|
+
var decodedBase64UrlByteLength = /* @__PURE__ */ __name22((value) => decodeBase64Url2(value)?.length ?? null, "decodedBase64UrlByteLength");
|
|
34551
|
+
var utf8ByteLength2 = /* @__PURE__ */ __name22((value) => new TextEncoder().encode(value).length, "utf8ByteLength");
|
|
34552
|
+
var canonicalBase64Url2 = /* @__PURE__ */ __name22((bytes) => external_exports2.string().refine((value) => isCanonicalBase64Url2(value, bytes), {
|
|
34553
|
+
message: `must be canonical base64url for exactly ${bytes} bytes`
|
|
34554
|
+
}), "canonicalBase64Url");
|
|
34555
|
+
var ShareLinkIdValidator2 = canonicalBase64Url2(SHARE_LINK_ID_BYTES2);
|
|
34556
|
+
var ShareContentKeyValidator2 = canonicalBase64Url2(SHARE_CONTENT_KEY_BYTES2);
|
|
34557
|
+
var ShareIvValidator2 = canonicalBase64Url2(SHARE_IV_BYTES2);
|
|
34558
|
+
var ShareCiphertextValidator2 = external_exports2.string().refine(
|
|
34559
|
+
(value) => {
|
|
34560
|
+
if (value.length > Math.ceil(MAX_SHARE_CIPHERTEXT_BYTES2 * 4 / 3)) return false;
|
|
34561
|
+
const decoded = decodeBase64Url2(value);
|
|
34562
|
+
if (decoded === null) return false;
|
|
34563
|
+
if (encodeBase64Url2(decoded) !== value) return false;
|
|
34564
|
+
return decoded.length >= SHARE_TAG_BYTES2 && decoded.length <= MAX_SHARE_CIPHERTEXT_BYTES2;
|
|
34565
|
+
},
|
|
34566
|
+
{
|
|
34567
|
+
message: `must be canonical base64url decoding to ${SHARE_TAG_BYTES2}..${MAX_SHARE_CIPHERTEXT_BYTES2} bytes`
|
|
34105
34568
|
}
|
|
34106
|
-
|
|
34569
|
+
);
|
|
34570
|
+
var ShareEnvelopeValidator2 = external_exports2.object({
|
|
34571
|
+
v: external_exports2.literal(1),
|
|
34572
|
+
alg: external_exports2.literal("A256GCM"),
|
|
34573
|
+
iv: ShareIvValidator2,
|
|
34574
|
+
ct: ShareCiphertextValidator2
|
|
34575
|
+
}).strict();
|
|
34576
|
+
var safeVersion2 = external_exports2.number().int().min(1).max(2 ** 31 - 1);
|
|
34577
|
+
var safeCredentialIndex2 = external_exports2.number().int().min(0).max(MAX_VP_MEMBERS2 - 1);
|
|
34578
|
+
var ShareSelectionEntryValidator2 = external_exports2.object({ credentialIndex: safeCredentialIndex2 }).strict();
|
|
34579
|
+
var ShareEndorsementEntryValidator2 = external_exports2.object({ credentialIndex: safeCredentialIndex2, targetCredentialIndex: safeCredentialIndex2 }).strict();
|
|
34580
|
+
var ShareSharerValidator2 = external_exports2.object({
|
|
34581
|
+
profileId: external_exports2.string().min(1).max(128),
|
|
34582
|
+
displayName: external_exports2.string().min(1).max(120),
|
|
34583
|
+
avatar: external_exports2.string().max(2048).optional()
|
|
34584
|
+
}).strict();
|
|
34585
|
+
var presentationShape2 = VPValidator2.extend({
|
|
34586
|
+
verifiableCredential: VCValidator2.array().min(1).max(MAX_VP_MEMBERS2)
|
|
34587
|
+
});
|
|
34588
|
+
var hasBoundedPresentation2 = /* @__PURE__ */ __name22((value) => {
|
|
34589
|
+
let credentialCount = 0;
|
|
34590
|
+
const ancestors = /* @__PURE__ */ new Set();
|
|
34591
|
+
const visit = /* @__PURE__ */ __name22((node, depth) => {
|
|
34592
|
+
if (node === null || typeof node !== "object") return true;
|
|
34593
|
+
if (depth > 32 || ancestors.has(node)) return false;
|
|
34594
|
+
ancestors.add(node);
|
|
34595
|
+
try {
|
|
34596
|
+
for (const [key, child] of Object.entries(node)) {
|
|
34597
|
+
if (key === "verifiableCredential") {
|
|
34598
|
+
credentialCount += Array.isArray(child) ? child.length : 1;
|
|
34599
|
+
if (credentialCount > MAX_VP_MEMBERS2) return false;
|
|
34600
|
+
}
|
|
34601
|
+
if (!visit(child, depth + 1)) return false;
|
|
34602
|
+
}
|
|
34603
|
+
return true;
|
|
34604
|
+
} finally {
|
|
34605
|
+
ancestors.delete(node);
|
|
34606
|
+
}
|
|
34607
|
+
}, "visit");
|
|
34608
|
+
return visit(value, 0);
|
|
34609
|
+
}, "hasBoundedPresentation");
|
|
34610
|
+
var ShareManifestPresentationValidator2 = external_exports2.custom(
|
|
34611
|
+
(value) => hasBoundedPresentation2(value) && presentationShape2.safeParse(value).success,
|
|
34612
|
+
{ message: "invalid share presentation" }
|
|
34613
|
+
);
|
|
34614
|
+
var SharePayloadValidatorShape2 = external_exports2.object({
|
|
34615
|
+
protocol: external_exports2.literal(SHARE_LINK_PROTOCOL2),
|
|
34616
|
+
shareId: ShareLinkIdValidator2,
|
|
34617
|
+
contentVersion: safeVersion2,
|
|
34618
|
+
createdAt: external_exports2.iso.datetime(),
|
|
34619
|
+
sharer: ShareSharerValidator2,
|
|
34620
|
+
presentation: ShareManifestPresentationValidator2,
|
|
34621
|
+
selection: ShareSelectionEntryValidator2.array().min(1).max(MAX_SELECTED_CREDENTIALS2),
|
|
34622
|
+
endorsements: ShareEndorsementEntryValidator2.array().max(MAX_ENDORSEMENTS2).default([])
|
|
34623
|
+
}).strict();
|
|
34624
|
+
var classificationFailure2 = /* @__PURE__ */ __name22((code, message, path = []) => ({ ok: false, code, message, path }), "classificationFailure");
|
|
34625
|
+
var readSignedClaimId2 = /* @__PURE__ */ __name22((member) => {
|
|
34626
|
+
if (member === null || typeof member !== "object") return void 0;
|
|
34627
|
+
const record22 = member;
|
|
34628
|
+
const claim = record22.credentialSubject ?? record22.endorsement;
|
|
34629
|
+
if (claim === null || typeof claim !== "object") return void 0;
|
|
34630
|
+
const claimRecord = claim;
|
|
34631
|
+
const nested = claimRecord.endorsement;
|
|
34632
|
+
const nestedId = nested !== null && typeof nested === "object" ? nested.id : void 0;
|
|
34633
|
+
return claimRecord.id ?? nestedId;
|
|
34634
|
+
}, "readSignedClaimId");
|
|
34635
|
+
var classifyShareManifest2 = /* @__PURE__ */ __name22((payload) => {
|
|
34636
|
+
const members = payload.presentation?.verifiableCredential;
|
|
34637
|
+
if (!Array.isArray(members) || members.length === 0) {
|
|
34638
|
+
return classificationFailure2("NO_PRESENTATION_MEMBERS", "presentation has no credentials");
|
|
34639
|
+
}
|
|
34640
|
+
if (members.length > MAX_VP_MEMBERS2) {
|
|
34641
|
+
return classificationFailure2(
|
|
34642
|
+
"TOO_MANY_VP_MEMBERS",
|
|
34643
|
+
`presentation has ${members.length} members, over the ${MAX_VP_MEMBERS2} bound`
|
|
34644
|
+
);
|
|
34645
|
+
}
|
|
34646
|
+
const selection = payload.selection;
|
|
34647
|
+
const endorsements = payload.endorsements ?? [];
|
|
34648
|
+
if (!Array.isArray(selection) || selection.length < 1 || selection.length > MAX_SELECTED_CREDENTIALS2) {
|
|
34649
|
+
return classificationFailure2("BAD_SELECTION", "selection must contain 1..50 entries");
|
|
34650
|
+
}
|
|
34651
|
+
if (!Array.isArray(endorsements) || endorsements.length > MAX_ENDORSEMENTS2) {
|
|
34652
|
+
return classificationFailure2(
|
|
34653
|
+
"BAD_ENDORSEMENTS",
|
|
34654
|
+
"endorsements must contain at most 200 entries"
|
|
34655
|
+
);
|
|
34656
|
+
}
|
|
34657
|
+
const selectedIndices = [];
|
|
34658
|
+
const selected = /* @__PURE__ */ new Set();
|
|
34659
|
+
for (let index = 0; index < selection.length; index += 1) {
|
|
34660
|
+
const entry = selection[index];
|
|
34661
|
+
const credentialIndex = entry?.credentialIndex;
|
|
34662
|
+
if (!Number.isSafeInteger(credentialIndex) || credentialIndex < 0 || credentialIndex >= members.length) {
|
|
34663
|
+
return classificationFailure2(
|
|
34664
|
+
"SELECTION_INDEX_OUT_OF_BOUNDS",
|
|
34665
|
+
`selection[${index}].credentialIndex is out of bounds`,
|
|
34666
|
+
["selection", index, "credentialIndex"]
|
|
34667
|
+
);
|
|
34668
|
+
}
|
|
34669
|
+
if (selected.has(credentialIndex)) {
|
|
34670
|
+
return classificationFailure2(
|
|
34671
|
+
"SELECTION_INDEX_DUPLICATE",
|
|
34672
|
+
`selection[${index}].credentialIndex is duplicated`,
|
|
34673
|
+
["selection", index, "credentialIndex"]
|
|
34674
|
+
);
|
|
34675
|
+
}
|
|
34676
|
+
selected.add(credentialIndex);
|
|
34677
|
+
selectedIndices.push(credentialIndex);
|
|
34678
|
+
}
|
|
34679
|
+
const classified = new Set(selected);
|
|
34680
|
+
const endorsementIndices = [];
|
|
34681
|
+
for (let index = 0; index < endorsements.length; index += 1) {
|
|
34682
|
+
const entry = endorsements[index];
|
|
34683
|
+
const credentialIndex = entry?.credentialIndex;
|
|
34684
|
+
const targetIndex = entry?.targetCredentialIndex;
|
|
34685
|
+
if (!Number.isSafeInteger(credentialIndex) || credentialIndex < 0 || credentialIndex >= members.length) {
|
|
34686
|
+
return classificationFailure2(
|
|
34687
|
+
"ENDORSEMENT_INDEX_OUT_OF_BOUNDS",
|
|
34688
|
+
`endorsements[${index}].credentialIndex is out of bounds`,
|
|
34689
|
+
["endorsements", index, "credentialIndex"]
|
|
34690
|
+
);
|
|
34691
|
+
}
|
|
34692
|
+
if (classified.has(credentialIndex)) {
|
|
34693
|
+
return classificationFailure2(
|
|
34694
|
+
"VP_MEMBER_CLASSIFIED_TWICE",
|
|
34695
|
+
`endorsements[${index}].credentialIndex was already classified`,
|
|
34696
|
+
["endorsements", index, "credentialIndex"]
|
|
34697
|
+
);
|
|
34698
|
+
}
|
|
34699
|
+
if (!selected.has(targetIndex)) {
|
|
34700
|
+
return classificationFailure2(
|
|
34701
|
+
"ENDORSEMENT_TARGET_NOT_SELECTED",
|
|
34702
|
+
`endorsements[${index}].targetCredentialIndex must reference a selected credential`,
|
|
34703
|
+
["endorsements", index, "targetCredentialIndex"]
|
|
34704
|
+
);
|
|
34705
|
+
}
|
|
34706
|
+
const referenced = readSignedClaimId2(members[credentialIndex]);
|
|
34707
|
+
const target = members[targetIndex];
|
|
34708
|
+
const targetId = target !== null && typeof target === "object" ? target.id : void 0;
|
|
34709
|
+
if (typeof referenced !== "string" || typeof targetId !== "string" || referenced !== targetId) {
|
|
34710
|
+
return classificationFailure2(
|
|
34711
|
+
"ENDORSEMENT_TARGET_UNBOUND",
|
|
34712
|
+
`endorsements[${index}] claim does not reference the target credential id`,
|
|
34713
|
+
["endorsements", index]
|
|
34714
|
+
);
|
|
34715
|
+
}
|
|
34716
|
+
classified.add(credentialIndex);
|
|
34717
|
+
endorsementIndices.push(credentialIndex);
|
|
34718
|
+
}
|
|
34719
|
+
if (classified.size !== members.length) {
|
|
34720
|
+
return classificationFailure2(
|
|
34721
|
+
"UNCLASSIFIED_VP_MEMBER",
|
|
34722
|
+
"every presentation member must be classified exactly once",
|
|
34723
|
+
["presentation", "verifiableCredential"]
|
|
34724
|
+
);
|
|
34725
|
+
}
|
|
34726
|
+
return {
|
|
34727
|
+
ok: true,
|
|
34728
|
+
classification: { selectedIndices, endorsementIndices, memberCount: members.length }
|
|
34729
|
+
};
|
|
34730
|
+
}, "classifyShareManifest");
|
|
34731
|
+
var SharePayloadValidator2 = SharePayloadValidatorShape2.superRefine((payload, ctx) => {
|
|
34732
|
+
const result = classifyShareManifest2(payload);
|
|
34733
|
+
if (!result.ok) {
|
|
34107
34734
|
ctx.addIssue({
|
|
34108
34735
|
code: "custom",
|
|
34109
|
-
|
|
34110
|
-
|
|
34736
|
+
message: result.message,
|
|
34737
|
+
path: result.path,
|
|
34738
|
+
params: { shareLinkCode: result.code }
|
|
34111
34739
|
});
|
|
34112
34740
|
}
|
|
34113
|
-
|
|
34114
|
-
|
|
34115
|
-
|
|
34116
|
-
|
|
34117
|
-
|
|
34118
|
-
|
|
34119
|
-
|
|
34120
|
-
|
|
34121
|
-
|
|
34741
|
+
});
|
|
34742
|
+
var ShareRecoverySelectionValidator2 = external_exports2.object({
|
|
34743
|
+
ref: external_exports2.string().min(1).max(MAX_SHARE_SOURCE_URI_CHARS2),
|
|
34744
|
+
order: external_exports2.number().int().min(0).max(MAX_SELECTED_CREDENTIALS2 - 1)
|
|
34745
|
+
}).strict();
|
|
34746
|
+
var ShareRecoveryEndorsementValidator2 = external_exports2.object({ targetRef: external_exports2.string().min(1).max(MAX_SHARE_SOURCE_URI_CHARS2) }).strict();
|
|
34747
|
+
var ShareRecoveryPlaintextValidator2 = external_exports2.object({
|
|
34748
|
+
protocol: external_exports2.literal(SHARE_RECOVERY_PROTOCOL2),
|
|
34749
|
+
shareId: ShareLinkIdValidator2,
|
|
34750
|
+
ownerProfileId: external_exports2.string().min(1).max(128),
|
|
34751
|
+
createdAt: external_exports2.iso.datetime(),
|
|
34752
|
+
latest: external_exports2.object({ contentVersion: safeVersion2, key: ShareContentKeyValidator2 }).strict(),
|
|
34753
|
+
selection: ShareRecoverySelectionValidator2.array().min(1).max(MAX_SELECTED_CREDENTIALS2),
|
|
34754
|
+
endorsements: ShareRecoveryEndorsementValidator2.array().max(MAX_ENDORSEMENTS2).default([])
|
|
34755
|
+
}).strict().superRefine((recovery, ctx) => {
|
|
34756
|
+
const orders = /* @__PURE__ */ new Set();
|
|
34757
|
+
recovery.selection.forEach((entry, index) => {
|
|
34758
|
+
if (entry.order >= recovery.selection.length) {
|
|
34122
34759
|
ctx.addIssue({
|
|
34123
34760
|
code: "custom",
|
|
34124
|
-
|
|
34125
|
-
|
|
34761
|
+
message: "order must be within the selection bounds",
|
|
34762
|
+
path: ["selection", index, "order"]
|
|
34126
34763
|
});
|
|
34127
34764
|
}
|
|
34128
|
-
if (
|
|
34765
|
+
if (orders.has(entry.order)) {
|
|
34129
34766
|
ctx.addIssue({
|
|
34130
34767
|
code: "custom",
|
|
34131
|
-
|
|
34132
|
-
|
|
34768
|
+
message: "order must be unique within the selection",
|
|
34769
|
+
path: ["selection", index, "order"]
|
|
34133
34770
|
});
|
|
34134
34771
|
}
|
|
34772
|
+
orders.add(entry.order);
|
|
34773
|
+
});
|
|
34774
|
+
});
|
|
34775
|
+
var ShareOwnerRecoveryValidator2 = JWEValidator2.refine(
|
|
34776
|
+
(value) => utf8ByteLength2(JSON.stringify(value)) <= MAX_SHARE_RECOVERY_JWE_BYTES2,
|
|
34777
|
+
{ message: `serialized recovery JWE must be at most ${MAX_SHARE_RECOVERY_JWE_BYTES2} bytes` }
|
|
34778
|
+
);
|
|
34779
|
+
var ShareLinkStatusValidator2 = external_exports2.enum(["pending", "active", "stopped"]);
|
|
34780
|
+
var ShareContentStateValidator2 = external_exports2.enum(["staging", "finalized", "content_missing"]);
|
|
34781
|
+
var ShareLinkValidator2 = external_exports2.object({
|
|
34782
|
+
id: ShareLinkIdValidator2,
|
|
34783
|
+
title: external_exports2.string().min(1).max(120),
|
|
34784
|
+
note: external_exports2.string().max(500).optional(),
|
|
34785
|
+
selectedCount: external_exports2.number().int().min(1).max(MAX_SELECTED_CREDENTIALS2),
|
|
34786
|
+
version: safeVersion2,
|
|
34787
|
+
contentVersion: safeVersion2,
|
|
34788
|
+
status: ShareLinkStatusValidator2,
|
|
34789
|
+
contentState: ShareContentStateValidator2,
|
|
34790
|
+
createdAt: external_exports2.iso.datetime(),
|
|
34791
|
+
updatedAt: external_exports2.iso.datetime(),
|
|
34792
|
+
expiresAt: external_exports2.iso.datetime().nullable(),
|
|
34793
|
+
stoppedAt: external_exports2.iso.datetime().nullable(),
|
|
34794
|
+
lastViewedAt: external_exports2.iso.datetime().nullable(),
|
|
34795
|
+
viewCount: external_exports2.number().int().min(0).optional(),
|
|
34796
|
+
passcodeProtected: external_exports2.boolean(),
|
|
34797
|
+
notifyOnView: external_exports2.boolean(),
|
|
34798
|
+
minorPolicy: external_exports2.object({
|
|
34799
|
+
isMinor: external_exports2.boolean().nullable(),
|
|
34800
|
+
policyResolved: external_exports2.boolean(),
|
|
34801
|
+
defaultExpiryDays: external_exports2.union([external_exports2.literal(30), external_exports2.literal(365)]),
|
|
34802
|
+
viewCountingEnabled: external_exports2.boolean()
|
|
34803
|
+
}),
|
|
34804
|
+
/**
|
|
34805
|
+
* Guarded application/API URL for the content. Optional because owner APIs in
|
|
34806
|
+
* D1 have no public resolve/content endpoint yet; it must never be a
|
|
34807
|
+
* LearnCloud object URL or carry a fabricated decryption key.
|
|
34808
|
+
*/
|
|
34809
|
+
contentUrl: external_exports2.string().optional()
|
|
34810
|
+
});
|
|
34811
|
+
var clientRequestId2 = external_exports2.string().uuid();
|
|
34812
|
+
var CreateShareLinkInputValidator2 = external_exports2.object({
|
|
34813
|
+
id: ShareLinkIdValidator2,
|
|
34814
|
+
clientRequestId: clientRequestId2,
|
|
34815
|
+
title: external_exports2.string().min(1).max(120),
|
|
34816
|
+
note: external_exports2.string().max(500).optional(),
|
|
34817
|
+
expiresAt: external_exports2.iso.datetime().nullable().optional(),
|
|
34818
|
+
passcode: external_exports2.string().min(8).max(64).optional(),
|
|
34819
|
+
notifyOnView: external_exports2.boolean().default(false),
|
|
34820
|
+
selectedCount: external_exports2.number().int().min(1).max(MAX_SELECTED_CREDENTIALS2),
|
|
34821
|
+
contentVersion: external_exports2.literal(1),
|
|
34822
|
+
envelope: ShareEnvelopeValidator2,
|
|
34823
|
+
ownerEncryptedRecovery: ShareOwnerRecoveryValidator2
|
|
34824
|
+
}).strict();
|
|
34825
|
+
var UpdateShareLinkInputValidator2 = external_exports2.object({
|
|
34826
|
+
id: ShareLinkIdValidator2,
|
|
34827
|
+
expectedVersion: safeVersion2,
|
|
34828
|
+
clientRequestId: clientRequestId2,
|
|
34829
|
+
title: external_exports2.string().min(1).max(120).optional(),
|
|
34830
|
+
note: external_exports2.string().max(500).nullable().optional(),
|
|
34831
|
+
expiresAt: external_exports2.iso.datetime().nullable().optional(),
|
|
34832
|
+
/** Omitted preserves the current passcode, null removes it, and a string replaces it. */
|
|
34833
|
+
passcode: external_exports2.string().min(8).max(64).nullable().optional(),
|
|
34834
|
+
notifyOnView: external_exports2.boolean().optional(),
|
|
34835
|
+
contentVersion: safeVersion2.optional(),
|
|
34836
|
+
selectedCount: external_exports2.number().int().min(1).max(MAX_SELECTED_CREDENTIALS2).optional(),
|
|
34837
|
+
envelope: ShareEnvelopeValidator2.optional(),
|
|
34838
|
+
ownerEncryptedRecovery: ShareOwnerRecoveryValidator2.optional()
|
|
34839
|
+
}).strict().superRefine((value, ctx) => {
|
|
34840
|
+
const provided = [
|
|
34841
|
+
value.contentVersion,
|
|
34842
|
+
value.selectedCount,
|
|
34843
|
+
value.envelope,
|
|
34844
|
+
value.ownerEncryptedRecovery
|
|
34845
|
+
].filter((field) => field !== void 0).length;
|
|
34846
|
+
if (provided !== 0 && provided !== 4) {
|
|
34847
|
+
ctx.addIssue({
|
|
34848
|
+
code: "custom",
|
|
34849
|
+
message: "content replacement requires contentVersion, selectedCount, envelope and ownerEncryptedRecovery together"
|
|
34850
|
+
});
|
|
34135
34851
|
}
|
|
34136
34852
|
});
|
|
34137
|
-
var
|
|
34138
|
-
|
|
34139
|
-
|
|
34140
|
-
"
|
|
34141
|
-
|
|
34142
|
-
|
|
34853
|
+
var ShareLinkIdInputValidator2 = external_exports2.object({ id: ShareLinkIdValidator2 }).strict();
|
|
34854
|
+
var ShareLinkOperationKeyInputValidator2 = external_exports2.object({ id: ShareLinkIdValidator2, operationId: external_exports2.string().uuid() }).strict();
|
|
34855
|
+
var ShareLinkOwnerCommitOutputValidator2 = external_exports2.discriminatedUnion("status", [
|
|
34856
|
+
external_exports2.object({ status: external_exports2.literal("completed"), share: ShareLinkValidator2 }).strict(),
|
|
34857
|
+
external_exports2.object({
|
|
34858
|
+
status: external_exports2.literal("pending"),
|
|
34859
|
+
id: ShareLinkIdValidator2,
|
|
34860
|
+
operationId: external_exports2.string().uuid()
|
|
34861
|
+
}).strict()
|
|
34143
34862
|
]);
|
|
34144
|
-
var
|
|
34145
|
-
|
|
34146
|
-
|
|
34147
|
-
|
|
34148
|
-
|
|
34149
|
-
|
|
34150
|
-
|
|
34151
|
-
|
|
34152
|
-
publishedAt: external_exports2.string().min(1),
|
|
34153
|
-
effectiveAt: external_exports2.string().optional(),
|
|
34154
|
-
etag: external_exports2.string().optional(),
|
|
34155
|
-
signingMode: CredentialRefreshSigningModeValidator2.optional(),
|
|
34156
|
-
updateSummary: external_exports2.string().optional()
|
|
34157
|
-
});
|
|
34158
|
-
var GetCredentialRefreshHistoryInputValidator2 = external_exports2.object({
|
|
34159
|
-
refreshId: external_exports2.string().min(1),
|
|
34160
|
-
cursor: external_exports2.string().optional(),
|
|
34161
|
-
limit: external_exports2.number().int().positive().optional()
|
|
34162
|
-
});
|
|
34163
|
-
var GetCredentialRefreshHistoryResultValidator2 = external_exports2.object({
|
|
34164
|
-
records: CredentialRefreshVersionMetadataValidator2.array(),
|
|
34165
|
-
hasMore: external_exports2.boolean(),
|
|
34166
|
-
cursor: external_exports2.string().optional()
|
|
34167
|
-
});
|
|
34168
|
-
var CredentialRefreshChallengeValidator2 = external_exports2.object({
|
|
34169
|
-
challenge: external_exports2.string().min(1),
|
|
34170
|
-
expiresAt: external_exports2.string().min(1),
|
|
34171
|
-
domain: external_exports2.string().optional(),
|
|
34172
|
-
scheme: external_exports2.literal("LearnCardDIDAuth").optional()
|
|
34173
|
-
});
|
|
34174
|
-
var PublicCredentialRefreshEnvelopeValidator2 = external_exports2.object({
|
|
34175
|
-
format: external_exports2.literal("vc"),
|
|
34176
|
-
credential: VCValidator2,
|
|
34177
|
-
etag: external_exports2.string().optional()
|
|
34178
|
-
});
|
|
34179
|
-
var JweCredentialRefreshEnvelopeValidator2 = external_exports2.object({
|
|
34180
|
-
format: external_exports2.literal("jwe"),
|
|
34181
|
-
jwe: JWEValidator2,
|
|
34182
|
-
etag: external_exports2.string().optional(),
|
|
34183
|
-
/** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
|
|
34184
|
-
version: external_exports2.number().int().positive().optional()
|
|
34185
|
-
});
|
|
34186
|
-
var CredentialRefreshResponseEnvelopeValidator2 = external_exports2.discriminatedUnion("format", [
|
|
34187
|
-
PublicCredentialRefreshEnvelopeValidator2,
|
|
34188
|
-
JweCredentialRefreshEnvelopeValidator2
|
|
34863
|
+
var ShareLinkOwnerStatusOutputValidator2 = external_exports2.discriminatedUnion("status", [
|
|
34864
|
+
external_exports2.object({ status: external_exports2.literal("found"), share: ShareLinkValidator2 }).strict(),
|
|
34865
|
+
external_exports2.object({
|
|
34866
|
+
status: external_exports2.literal("pending"),
|
|
34867
|
+
id: ShareLinkIdValidator2,
|
|
34868
|
+
operationId: external_exports2.string().uuid()
|
|
34869
|
+
}).strict(),
|
|
34870
|
+
external_exports2.object({ status: external_exports2.literal("not_found"), id: ShareLinkIdValidator2 }).strict()
|
|
34189
34871
|
]);
|
|
34190
|
-
var
|
|
34191
|
-
|
|
34192
|
-
|
|
34193
|
-
|
|
34194
|
-
|
|
34195
|
-
|
|
34196
|
-
|
|
34197
|
-
|
|
34198
|
-
|
|
34199
|
-
|
|
34200
|
-
|
|
34201
|
-
|
|
34872
|
+
var ShareLinkOwnerRecoveryOutputValidator2 = external_exports2.object({ recovery: ShareOwnerRecoveryValidator2 }).strict();
|
|
34873
|
+
var ShareLinkOwnerContentOutputValidator2 = external_exports2.object({
|
|
34874
|
+
id: ShareLinkIdValidator2,
|
|
34875
|
+
contentVersion: safeVersion2,
|
|
34876
|
+
envelope: ShareEnvelopeValidator2
|
|
34877
|
+
}).strict();
|
|
34878
|
+
var ResolveShareLinkInputValidator2 = external_exports2.object({
|
|
34879
|
+
id: ShareLinkIdValidator2,
|
|
34880
|
+
/** Sent only in a POST body; it must never be placed in a share URL. */
|
|
34881
|
+
passcode: external_exports2.string().min(4).max(64).optional()
|
|
34882
|
+
}).strict();
|
|
34883
|
+
var ShareLinkPublicStateValidator2 = external_exports2.discriminatedUnion("state", [
|
|
34884
|
+
external_exports2.object({
|
|
34885
|
+
state: external_exports2.literal("passcode_required"),
|
|
34886
|
+
id: ShareLinkIdValidator2
|
|
34887
|
+
}).strict(),
|
|
34888
|
+
external_exports2.object({ state: external_exports2.literal("try_later"), id: ShareLinkIdValidator2 }).strict(),
|
|
34889
|
+
external_exports2.object({
|
|
34890
|
+
state: external_exports2.literal("active"),
|
|
34891
|
+
id: ShareLinkIdValidator2,
|
|
34892
|
+
title: external_exports2.string().max(120),
|
|
34893
|
+
note: external_exports2.string().max(500).optional(),
|
|
34894
|
+
selectedCount: external_exports2.number().int().min(1).max(MAX_SELECTED_CREDENTIALS2),
|
|
34895
|
+
contentVersion: safeVersion2,
|
|
34896
|
+
contentUrl: external_exports2.string(),
|
|
34897
|
+
sharer: external_exports2.object({
|
|
34898
|
+
displayName: external_exports2.string().max(120),
|
|
34899
|
+
avatar: external_exports2.string().max(2048).optional()
|
|
34900
|
+
}),
|
|
34901
|
+
createdAt: external_exports2.iso.datetime(),
|
|
34902
|
+
updatedAt: external_exports2.iso.datetime(),
|
|
34903
|
+
expiresAt: external_exports2.iso.datetime().nullable()
|
|
34904
|
+
}).strict(),
|
|
34905
|
+
external_exports2.object({
|
|
34906
|
+
state: external_exports2.literal("expired"),
|
|
34907
|
+
id: ShareLinkIdValidator2,
|
|
34908
|
+
expiresAt: external_exports2.iso.datetime()
|
|
34909
|
+
}).strict(),
|
|
34910
|
+
external_exports2.object({
|
|
34911
|
+
state: external_exports2.literal("stopped"),
|
|
34912
|
+
id: ShareLinkIdValidator2,
|
|
34913
|
+
stoppedAt: external_exports2.iso.datetime()
|
|
34914
|
+
}).strict(),
|
|
34915
|
+
external_exports2.object({ state: external_exports2.literal("not_found"), id: ShareLinkIdValidator2 }).strict()
|
|
34202
34916
|
]);
|
|
34203
|
-
var
|
|
34204
|
-
|
|
34205
|
-
|
|
34206
|
-
|
|
34207
|
-
|
|
34208
|
-
|
|
34209
|
-
var CredentialRefreshUnchangedResultValidator2 = external_exports2.object({
|
|
34210
|
-
status: external_exports2.literal("unchanged"),
|
|
34211
|
-
checkedAt: external_exports2.string().min(1),
|
|
34212
|
-
etag: external_exports2.string().optional()
|
|
34213
|
-
});
|
|
34214
|
-
var CredentialRefreshUnsupportedResultValidator2 = external_exports2.object({
|
|
34215
|
-
status: external_exports2.literal("unsupported")
|
|
34216
|
-
});
|
|
34217
|
-
var CredentialRefreshFailedResultValidator2 = external_exports2.object({
|
|
34218
|
-
status: external_exports2.literal("failed"),
|
|
34219
|
-
code: CredentialRefreshFailureCodeValidator2,
|
|
34220
|
-
retryable: external_exports2.boolean()
|
|
34917
|
+
var ListShareLinksInputValidator2 = external_exports2.object({
|
|
34918
|
+
limit: external_exports2.number().int().min(1).max(50).default(25),
|
|
34919
|
+
cursor: external_exports2.string().max(512).optional()
|
|
34920
|
+
}).strict();
|
|
34921
|
+
var PaginatedShareLinksValidator2 = PaginationResponseValidator2.extend({
|
|
34922
|
+
records: ShareLinkValidator2.array()
|
|
34221
34923
|
});
|
|
34222
|
-
var
|
|
34223
|
-
|
|
34224
|
-
|
|
34225
|
-
|
|
34226
|
-
|
|
34227
|
-
|
|
34924
|
+
var AcknowledgeViewInputValidator2 = external_exports2.object({
|
|
34925
|
+
receipt: external_exports2.string().min(22).max(128).regex(/^[A-Za-z0-9_-]+$/)
|
|
34926
|
+
}).strict();
|
|
34927
|
+
var AcknowledgeViewOutputValidator2 = external_exports2.object({ ok: external_exports2.literal(true) }).strict();
|
|
34928
|
+
var SHARE_VIEW_RECEIPT_TTL_SECONDS2 = 10 * 60;
|
|
34929
|
+
var ShareLinkPublicContentViewValidator2 = external_exports2.object({
|
|
34930
|
+
id: ShareLinkIdValidator2,
|
|
34931
|
+
contentVersion: safeVersion2,
|
|
34932
|
+
envelope: ShareEnvelopeValidator2,
|
|
34933
|
+
contentUrl: external_exports2.string(),
|
|
34934
|
+
receipt: external_exports2.string().min(22).max(128).regex(/^[A-Za-z0-9_-]+$/)
|
|
34935
|
+
}).strict();
|
|
34228
34936
|
}
|
|
34229
34937
|
});
|
|
34230
34938
|
var require_dist = __commonJS({
|
|
@@ -34520,6 +35228,18 @@ var ImageWithLoadingStateValdator = external_exports.object({
|
|
|
34520
35228
|
});
|
|
34521
35229
|
var import_types2 = __toESM(require_dist());
|
|
34522
35230
|
var import_types22 = __toESM(require_dist());
|
|
35231
|
+
var MANAGED_REFRESH_TYPE_TERM = "LearnCardCredentialRefresh2026";
|
|
35232
|
+
var MANAGED_REFRESH_DID_AUTH_TERM = "LearnCardDIDAuth";
|
|
35233
|
+
var MANAGED_REFRESH_TYPE_IRI = "https://learncard.com/refresh#LearnCardCredentialRefresh2026";
|
|
35234
|
+
var MANAGED_REFRESH_AUTHORIZATION_IRI = "https://purl.imsglobal.org/spec/ob/v3p0#authorization";
|
|
35235
|
+
var MANAGED_REFRESH_DID_AUTH_IRI = "https://docs.learncard.com/definitions#LearnCardDIDAuth";
|
|
35236
|
+
var MANAGED_REFRESH_SERVICE_CONTEXT = {
|
|
35237
|
+
[MANAGED_REFRESH_TYPE_TERM]: MANAGED_REFRESH_TYPE_IRI,
|
|
35238
|
+
authorization: {
|
|
35239
|
+
"@id": MANAGED_REFRESH_AUTHORIZATION_IRI,
|
|
35240
|
+
"@context": { [MANAGED_REFRESH_DID_AUTH_TERM]: MANAGED_REFRESH_DID_AUTH_IRI }
|
|
35241
|
+
}
|
|
35242
|
+
};
|
|
34523
35243
|
var _a4;
|
|
34524
35244
|
var EnvironmentConfigurationError = (_a4 = class extends Error {
|
|
34525
35245
|
constructor(message) {
|
|
@@ -34546,6 +35266,15 @@ var optionalEnvironmentPort = external_exports.preprocess(
|
|
|
34546
35266
|
(value) => value === "" || value === void 0 ? void 0 : value,
|
|
34547
35267
|
environmentPort.optional()
|
|
34548
35268
|
);
|
|
35269
|
+
var DEFAULT_MAX_CANONICAL_BYTES = 2 * 1024 * 1024;
|
|
35270
|
+
var _a5;
|
|
35271
|
+
var ShareContentCanonicalizationError = (_a5 = class extends Error {
|
|
35272
|
+
constructor(message) {
|
|
35273
|
+
super(message);
|
|
35274
|
+
this.code = "UNSUPPORTED_REQUEST_VALUE";
|
|
35275
|
+
this.name = "ShareContentCanonicalizationError";
|
|
35276
|
+
}
|
|
35277
|
+
}, __name(_a5, "ShareContentCanonicalizationError"), __name2(_a5, "ShareContentCanonicalizationError"), _a5);
|
|
34549
35278
|
var unwrapBoostCredential = /* @__PURE__ */ __name2((vc) => {
|
|
34550
35279
|
if (vc?.type?.includes("CertifiedBoostCredential") && vc?.boostCredential) {
|
|
34551
35280
|
return vc.boostCredential;
|
|
@@ -35142,6 +35871,204 @@ var StringQuery = external_exports.union([
|
|
|
35142
35871
|
$or: BaseStringQuery.array()
|
|
35143
35872
|
})
|
|
35144
35873
|
]);
|
|
35874
|
+
var LearnCardRefreshAuthorizationValidator = external_exports.object({ type: external_exports.literal("LearnCardDIDAuth") }).catchall(external_exports.any());
|
|
35875
|
+
var ManagedCredentialRefreshServiceValidator = external_exports.object({
|
|
35876
|
+
id: external_exports.string().min(1),
|
|
35877
|
+
type: external_exports.literal("LearnCardCredentialRefresh2026"),
|
|
35878
|
+
authorization: LearnCardRefreshAuthorizationValidator.optional()
|
|
35879
|
+
}).catchall(external_exports.any());
|
|
35880
|
+
var StandardCredentialRefreshServiceValidator = external_exports.object({
|
|
35881
|
+
id: external_exports.string().min(1),
|
|
35882
|
+
type: external_exports.literal("1EdTechCredentialRefresh")
|
|
35883
|
+
}).catchall(external_exports.any());
|
|
35884
|
+
var SupportedCredentialRefreshServiceValidator = external_exports.union([
|
|
35885
|
+
ManagedCredentialRefreshServiceValidator,
|
|
35886
|
+
StandardCredentialRefreshServiceValidator
|
|
35887
|
+
]);
|
|
35888
|
+
var AllocateCredentialRefreshInputValidator = external_exports.object({
|
|
35889
|
+
holder: external_exports.object({
|
|
35890
|
+
profileId: external_exports.string().optional(),
|
|
35891
|
+
did: external_exports.string().min(1)
|
|
35892
|
+
}),
|
|
35893
|
+
credentialId: external_exports.string().min(1)
|
|
35894
|
+
});
|
|
35895
|
+
var AllocateCredentialRefreshResultValidator = external_exports.object({
|
|
35896
|
+
refreshId: external_exports.string().min(1),
|
|
35897
|
+
refreshService: ManagedCredentialRefreshServiceValidator.extend({
|
|
35898
|
+
authorization: LearnCardRefreshAuthorizationValidator
|
|
35899
|
+
})
|
|
35900
|
+
});
|
|
35901
|
+
var ManagedCredentialRefreshReceiptValidator = external_exports.object({
|
|
35902
|
+
refreshId: external_exports.string().min(1),
|
|
35903
|
+
refreshService: ManagedCredentialRefreshServiceValidator,
|
|
35904
|
+
credentialId: external_exports.string().min(1),
|
|
35905
|
+
issuerDid: external_exports.string().min(1),
|
|
35906
|
+
holderDid: external_exports.string().min(1),
|
|
35907
|
+
credentialStatus: CredentialStatusValidator.or(
|
|
35908
|
+
CredentialStatusValidator.array()
|
|
35909
|
+
).optional()
|
|
35910
|
+
}).strip();
|
|
35911
|
+
var InboxCredentialRefreshReceiptValidator = ManagedCredentialRefreshReceiptValidator.omit(
|
|
35912
|
+
{ holderDid: true }
|
|
35913
|
+
).extend({ holderDid: external_exports.string().min(1).optional() });
|
|
35914
|
+
var CredentialRefreshSigningModeValidator = external_exports.enum(["issuer-signed", "signing-authority"]);
|
|
35915
|
+
var PublishCredentialRefreshBaseFields = {
|
|
35916
|
+
refreshId: external_exports.string().min(1),
|
|
35917
|
+
notifyHolder: external_exports.boolean().optional(),
|
|
35918
|
+
updateSummary: external_exports.string().optional(),
|
|
35919
|
+
idempotencyKey: external_exports.string().optional()
|
|
35920
|
+
};
|
|
35921
|
+
var PublishIssuerSignedRefreshValidator = external_exports.object({
|
|
35922
|
+
...PublishCredentialRefreshBaseFields,
|
|
35923
|
+
mode: external_exports.literal("issuer-signed"),
|
|
35924
|
+
signedCredential: VCValidator
|
|
35925
|
+
});
|
|
35926
|
+
var PublishSigningAuthorityRefreshValidator = external_exports.object({
|
|
35927
|
+
...PublishCredentialRefreshBaseFields,
|
|
35928
|
+
mode: external_exports.literal("signing-authority"),
|
|
35929
|
+
credential: UnsignedVCValidator,
|
|
35930
|
+
signingAuthority: external_exports.object({
|
|
35931
|
+
type: external_exports.string().min(1)
|
|
35932
|
+
}).catchall(external_exports.any())
|
|
35933
|
+
});
|
|
35934
|
+
var PublishCredentialRefreshInputValidator = external_exports.object({
|
|
35935
|
+
...PublishCredentialRefreshBaseFields,
|
|
35936
|
+
mode: CredentialRefreshSigningModeValidator,
|
|
35937
|
+
signedCredential: VCValidator.optional(),
|
|
35938
|
+
credential: UnsignedVCValidator.optional(),
|
|
35939
|
+
signingAuthority: external_exports.object({
|
|
35940
|
+
type: external_exports.string().min(1)
|
|
35941
|
+
}).catchall(external_exports.any()).optional()
|
|
35942
|
+
}).superRefine((input, ctx) => {
|
|
35943
|
+
if (input.mode === "issuer-signed" && !input.signedCredential) {
|
|
35944
|
+
ctx.addIssue({
|
|
35945
|
+
code: "custom",
|
|
35946
|
+
path: ["signedCredential"],
|
|
35947
|
+
message: "signedCredential is required for issuer-signed publication"
|
|
35948
|
+
});
|
|
35949
|
+
}
|
|
35950
|
+
if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
|
|
35951
|
+
ctx.addIssue({
|
|
35952
|
+
code: "custom",
|
|
35953
|
+
path: ["mode"],
|
|
35954
|
+
message: "issuer-signed publication cannot include signing-authority fields"
|
|
35955
|
+
});
|
|
35956
|
+
}
|
|
35957
|
+
if (input.mode === "signing-authority") {
|
|
35958
|
+
if (input.signedCredential !== void 0) {
|
|
35959
|
+
ctx.addIssue({
|
|
35960
|
+
code: "custom",
|
|
35961
|
+
path: ["signedCredential"],
|
|
35962
|
+
message: "signing-authority publication cannot include signedCredential"
|
|
35963
|
+
});
|
|
35964
|
+
}
|
|
35965
|
+
if (!input.credential) {
|
|
35966
|
+
ctx.addIssue({
|
|
35967
|
+
code: "custom",
|
|
35968
|
+
path: ["credential"],
|
|
35969
|
+
message: "credential is required for signing-authority publication"
|
|
35970
|
+
});
|
|
35971
|
+
}
|
|
35972
|
+
if (!input.signingAuthority) {
|
|
35973
|
+
ctx.addIssue({
|
|
35974
|
+
code: "custom",
|
|
35975
|
+
path: ["signingAuthority"],
|
|
35976
|
+
message: "signingAuthority is required for signing-authority publication"
|
|
35977
|
+
});
|
|
35978
|
+
}
|
|
35979
|
+
}
|
|
35980
|
+
});
|
|
35981
|
+
var PublishCredentialRefreshNotificationValidator = external_exports.enum([
|
|
35982
|
+
"queued",
|
|
35983
|
+
"suppressed",
|
|
35984
|
+
"not-applicable",
|
|
35985
|
+
/** Publication succeeded, but the post-commit notification enqueue must be retried. */
|
|
35986
|
+
"delivery-failed"
|
|
35987
|
+
]);
|
|
35988
|
+
var PublishCredentialRefreshResultValidator = external_exports.object({
|
|
35989
|
+
refreshId: external_exports.string().min(1),
|
|
35990
|
+
version: external_exports.number().int().positive(),
|
|
35991
|
+
publishedAt: external_exports.string().min(1),
|
|
35992
|
+
notification: PublishCredentialRefreshNotificationValidator
|
|
35993
|
+
});
|
|
35994
|
+
var CredentialRefreshVersionMetadataValidator = external_exports.object({
|
|
35995
|
+
version: external_exports.number().int().positive(),
|
|
35996
|
+
publishedAt: external_exports.string().min(1),
|
|
35997
|
+
effectiveAt: external_exports.string().optional(),
|
|
35998
|
+
etag: external_exports.string().optional(),
|
|
35999
|
+
signingMode: CredentialRefreshSigningModeValidator.optional(),
|
|
36000
|
+
updateSummary: external_exports.string().optional()
|
|
36001
|
+
});
|
|
36002
|
+
var GetCredentialRefreshHistoryInputValidator = external_exports.object({
|
|
36003
|
+
refreshId: external_exports.string().min(1),
|
|
36004
|
+
cursor: external_exports.string().optional(),
|
|
36005
|
+
limit: external_exports.number().int().positive().optional()
|
|
36006
|
+
});
|
|
36007
|
+
var GetCredentialRefreshHistoryResultValidator = external_exports.object({
|
|
36008
|
+
records: CredentialRefreshVersionMetadataValidator.array(),
|
|
36009
|
+
hasMore: external_exports.boolean(),
|
|
36010
|
+
cursor: external_exports.string().optional()
|
|
36011
|
+
});
|
|
36012
|
+
var CredentialRefreshChallengeValidator = external_exports.object({
|
|
36013
|
+
challenge: external_exports.string().min(1),
|
|
36014
|
+
expiresAt: external_exports.string().min(1),
|
|
36015
|
+
domain: external_exports.string().optional(),
|
|
36016
|
+
scheme: external_exports.literal("LearnCardDIDAuth").optional()
|
|
36017
|
+
});
|
|
36018
|
+
var PublicCredentialRefreshEnvelopeValidator = external_exports.object({
|
|
36019
|
+
format: external_exports.literal("vc"),
|
|
36020
|
+
credential: VCValidator,
|
|
36021
|
+
etag: external_exports.string().optional()
|
|
36022
|
+
});
|
|
36023
|
+
var JweCredentialRefreshEnvelopeValidator = external_exports.object({
|
|
36024
|
+
format: external_exports.literal("jwe"),
|
|
36025
|
+
jwe: JWEValidator,
|
|
36026
|
+
etag: external_exports.string().optional(),
|
|
36027
|
+
/** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
|
|
36028
|
+
version: external_exports.number().int().positive().optional()
|
|
36029
|
+
});
|
|
36030
|
+
var CredentialRefreshResponseEnvelopeValidator = external_exports.discriminatedUnion("format", [
|
|
36031
|
+
PublicCredentialRefreshEnvelopeValidator,
|
|
36032
|
+
JweCredentialRefreshEnvelopeValidator
|
|
36033
|
+
]);
|
|
36034
|
+
var CredentialRefreshFailureCodeValidator = external_exports.enum([
|
|
36035
|
+
"UNAVAILABLE",
|
|
36036
|
+
"TIMEOUT",
|
|
36037
|
+
"UNSUPPORTED_SERVICE",
|
|
36038
|
+
"UNAUTHORIZED",
|
|
36039
|
+
"MALFORMED_RESPONSE",
|
|
36040
|
+
"INVALID_PROOF",
|
|
36041
|
+
"ISSUER_MISMATCH",
|
|
36042
|
+
"ID_MISMATCH",
|
|
36043
|
+
"ROLLBACK",
|
|
36044
|
+
"REVOKED",
|
|
36045
|
+
"UNSAFE_ENDPOINT"
|
|
36046
|
+
]);
|
|
36047
|
+
var CredentialRefreshUpdatedResultValidator = external_exports.object({
|
|
36048
|
+
status: external_exports.literal("updated"),
|
|
36049
|
+
credential: VCValidator,
|
|
36050
|
+
etag: external_exports.string().optional(),
|
|
36051
|
+
managedVersion: external_exports.number().int().positive().optional()
|
|
36052
|
+
});
|
|
36053
|
+
var CredentialRefreshUnchangedResultValidator = external_exports.object({
|
|
36054
|
+
status: external_exports.literal("unchanged"),
|
|
36055
|
+
checkedAt: external_exports.string().min(1),
|
|
36056
|
+
etag: external_exports.string().optional()
|
|
36057
|
+
});
|
|
36058
|
+
var CredentialRefreshUnsupportedResultValidator = external_exports.object({
|
|
36059
|
+
status: external_exports.literal("unsupported")
|
|
36060
|
+
});
|
|
36061
|
+
var CredentialRefreshFailedResultValidator = external_exports.object({
|
|
36062
|
+
status: external_exports.literal("failed"),
|
|
36063
|
+
code: CredentialRefreshFailureCodeValidator,
|
|
36064
|
+
retryable: external_exports.boolean()
|
|
36065
|
+
});
|
|
36066
|
+
var CredentialRefreshResultValidator = external_exports.discriminatedUnion("status", [
|
|
36067
|
+
CredentialRefreshUpdatedResultValidator,
|
|
36068
|
+
CredentialRefreshUnchangedResultValidator,
|
|
36069
|
+
CredentialRefreshUnsupportedResultValidator,
|
|
36070
|
+
CredentialRefreshFailedResultValidator
|
|
36071
|
+
]);
|
|
35145
36072
|
var LCNProfileDisplayValidator = external_exports.object({
|
|
35146
36073
|
backgroundColor: external_exports.string().optional(),
|
|
35147
36074
|
backgroundImage: external_exports.string().optional(),
|
|
@@ -35477,7 +36404,13 @@ var SendBoostInputValidator = external_exports.object({
|
|
|
35477
36404
|
"Options for email/phone recipients (Universal Inbox)"
|
|
35478
36405
|
),
|
|
35479
36406
|
templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
35480
|
-
integrationId: external_exports.string().optional().describe("Integration ID for activity tracking")
|
|
36407
|
+
integrationId: external_exports.string().optional().describe("Integration ID for activity tracking"),
|
|
36408
|
+
refresh: external_exports.boolean().optional().describe(
|
|
36409
|
+
"Request managed credential refresh for this send. Profile/DID recipients use immediate issuance; email/phone recipients use deferred Universal Inbox signing and bind the holder at claim."
|
|
36410
|
+
),
|
|
36411
|
+
idempotencyKey: external_exports.string().min(1).max(200).optional().describe(
|
|
36412
|
+
"Caller-chosen key that makes a managed refresh send (refresh: true) safe to retry as a whole: retries with the same key reuse the same boost, refresh allocation and result. Reusing a key for a different request is rejected. With signedCredential, requires prior tRPC prepareRefreshableSend; direct REST callers omit the key and retry the exact signed credential and templateUri."
|
|
36413
|
+
)
|
|
35481
36414
|
}).refine((data) => data.templateUri || data.template || data.signedCredential, {
|
|
35482
36415
|
message: "Either templateUri, template, or signedCredential must be provided.",
|
|
35483
36416
|
path: ["templateUri"]
|
|
@@ -35492,8 +36425,12 @@ var SendBoostInputValidator = external_exports.object({
|
|
|
35492
36425
|
message: "guardianEmail must differ from recipient (self-approval not allowed)",
|
|
35493
36426
|
path: ["options", "guardianEmail"]
|
|
35494
36427
|
}
|
|
35495
|
-
)
|
|
36428
|
+
).refine((data) => !data.idempotencyKey || data.refresh === true, {
|
|
36429
|
+
message: "idempotencyKey is only supported with refresh: true.",
|
|
36430
|
+
path: ["idempotencyKey"]
|
|
36431
|
+
});
|
|
35496
36432
|
var SendInboxResponseValidator = external_exports.object({
|
|
36433
|
+
refresh: InboxCredentialRefreshReceiptValidator.optional(),
|
|
35497
36434
|
issuanceId: external_exports.string(),
|
|
35498
36435
|
status: external_exports.enum(["PENDING", "ISSUED", "EXPIRED", "DELIVERED", "CLAIMED"]),
|
|
35499
36436
|
claimUrl: external_exports.string().url().optional().describe("Present when suppressDelivery=true"),
|
|
@@ -35508,8 +36445,34 @@ var SendBoostResponseValidator = external_exports.object({
|
|
|
35508
36445
|
activityId: external_exports.string().describe("Links to the activity lifecycle for this issuance"),
|
|
35509
36446
|
inbox: SendInboxResponseValidator.optional().describe(
|
|
35510
36447
|
"Present when sent via email/phone (Universal Inbox)"
|
|
36448
|
+
),
|
|
36449
|
+
refresh: ManagedCredentialRefreshReceiptValidator.optional().describe(
|
|
36450
|
+
"Present when managed refresh was requested: issuance metadata the issuer keeps to publish future updates"
|
|
35511
36451
|
)
|
|
35512
36452
|
});
|
|
36453
|
+
var PrepareRefreshableSendInputValidator = external_exports.object({
|
|
36454
|
+
recipient: external_exports.string(),
|
|
36455
|
+
templateUri: external_exports.string().optional(),
|
|
36456
|
+
template: SendBoostTemplateValidator.optional(),
|
|
36457
|
+
contractUri: external_exports.string().optional(),
|
|
36458
|
+
templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
36459
|
+
integrationId: external_exports.string().optional(),
|
|
36460
|
+
/** Credential ID to allocate for; generated server-side when omitted. */
|
|
36461
|
+
credentialId: external_exports.string().min(1).optional(),
|
|
36462
|
+
idempotencyKey: external_exports.string().min(1).max(200).optional()
|
|
36463
|
+
}).refine((data) => Boolean(data.templateUri) !== Boolean(data.template), {
|
|
36464
|
+
message: "Provide exactly one of templateUri or template."
|
|
36465
|
+
});
|
|
36466
|
+
var PrepareRefreshableSendResultValidator = external_exports.object({
|
|
36467
|
+
boostUri: external_exports.string(),
|
|
36468
|
+
credentialId: external_exports.string(),
|
|
36469
|
+
refreshId: external_exports.string(),
|
|
36470
|
+
refreshService: ManagedCredentialRefreshServiceValidator,
|
|
36471
|
+
/** The DID to use as credentialSubject.id (recipient DID, or the profile's did:web). */
|
|
36472
|
+
holderDid: external_exports.string(),
|
|
36473
|
+
/** Present when this idempotencyKey already completed: return it without signing. */
|
|
36474
|
+
completed: SendBoostResponseValidator.optional()
|
|
36475
|
+
});
|
|
35513
36476
|
var SendInputValidator = external_exports.discriminatedUnion("type", [SendBoostInputValidator]);
|
|
35514
36477
|
var SendResponseValidator = external_exports.discriminatedUnion("type", [SendBoostResponseValidator]);
|
|
35515
36478
|
var ConsentFlowTermsStatusValidator = external_exports.enum(["live", "stale", "withdrawn"]);
|
|
@@ -35840,6 +36803,7 @@ var AuthGrantValidator = external_exports.object({
|
|
|
35840
36803
|
}, "error")
|
|
35841
36804
|
}),
|
|
35842
36805
|
scope: external_exports.string(),
|
|
36806
|
+
actAs: external_exports.string().optional(),
|
|
35843
36807
|
createdAt: external_exports.iso.datetime({ error: "createdAt must be a valid ISO 8601 datetime string" }),
|
|
35844
36808
|
expiresAt: external_exports.iso.datetime({ error: "expiresAt must be a valid ISO 8601 datetime string" }).nullish().optional()
|
|
35845
36809
|
});
|
|
@@ -35911,6 +36875,8 @@ var CreateContactMethodSessionResponseValidator = external_exports.object({
|
|
|
35911
36875
|
sessionJwt: external_exports.string()
|
|
35912
36876
|
});
|
|
35913
36877
|
var InboxCredentialValidator = external_exports.object({
|
|
36878
|
+
refresh: InboxCredentialRefreshReceiptValidator.optional(),
|
|
36879
|
+
refreshId: external_exports.string().optional(),
|
|
35914
36880
|
id: external_exports.string(),
|
|
35915
36881
|
credential: external_exports.string().optional(),
|
|
35916
36882
|
isSigned: external_exports.boolean(),
|
|
@@ -35965,12 +36931,19 @@ var IssueInboxCredentialValidator = external_exports.object({
|
|
|
35965
36931
|
templateUri: external_exports.string().optional().describe(
|
|
35966
36932
|
"URI of a boost template to use for issuance. The boost credential will be resolved and used. Mutually exclusive with credential field."
|
|
35967
36933
|
),
|
|
36934
|
+
refresh: external_exports.boolean().optional().describe(
|
|
36935
|
+
"Allocate managed refresh before signing. Requires unsigned content and a registered signing authority; binds the holder on claim."
|
|
36936
|
+
),
|
|
36937
|
+
idempotencyKey: external_exports.string().min(1).max(200).optional(),
|
|
35968
36938
|
// === OPTIONAL FEATURES ===
|
|
35969
36939
|
// Add major, distinct features at the top level.
|
|
35970
36940
|
//consentRequest: ConsentRequestValidator.optional(),
|
|
35971
36941
|
// === PROCESS CONFIGURATION (Optional) ===
|
|
35972
36942
|
// HOW should this issuance be handled?
|
|
35973
36943
|
configuration: external_exports.object({
|
|
36944
|
+
guardianEmail: external_exports.string().email().optional().describe(
|
|
36945
|
+
"Require approval from this guardian before the recipient can claim. Must differ from the recipient email."
|
|
36946
|
+
),
|
|
35974
36947
|
signingAuthority: IssueInboxSigningAuthorityValidator.optional().describe(
|
|
35975
36948
|
"The signing authority to use for the credential. If not provided, the users default signing authority will be used if the credential is not signed."
|
|
35976
36949
|
),
|
|
@@ -36024,17 +36997,130 @@ var IssueInboxCredentialValidator = external_exports.object({
|
|
|
36024
36997
|
}).optional().describe(
|
|
36025
36998
|
"Configuration for the credential issuance. If not provided, the default configuration will be used."
|
|
36026
36999
|
)
|
|
37000
|
+
}).refine((data) => !data.idempotencyKey || data.refresh === true, {
|
|
37001
|
+
message: "idempotencyKey requires refresh: true."
|
|
36027
37002
|
}).refine((data) => data.credential || data.templateUri, {
|
|
36028
37003
|
message: "Either credential or templateUri must be provided.",
|
|
36029
37004
|
path: ["credential"]
|
|
36030
|
-
})
|
|
37005
|
+
}).refine(
|
|
37006
|
+
(data) => !data.configuration?.guardianEmail || data.recipient.type !== "email" || data.configuration.guardianEmail.toLowerCase() !== data.recipient.value.toLowerCase(),
|
|
37007
|
+
{
|
|
37008
|
+
message: "guardianEmail must differ from recipient (self-approval not allowed)",
|
|
37009
|
+
path: ["configuration", "guardianEmail"]
|
|
37010
|
+
}
|
|
37011
|
+
);
|
|
36031
37012
|
var IssueInboxCredentialResponseValidator = external_exports.object({
|
|
37013
|
+
refresh: InboxCredentialRefreshReceiptValidator.optional(),
|
|
36032
37014
|
issuanceId: external_exports.string(),
|
|
36033
37015
|
status: LCNInboxStatusEnumValidator,
|
|
36034
37016
|
recipient: ContactMethodQueryValidator,
|
|
36035
37017
|
claimUrl: external_exports.string().url().optional(),
|
|
36036
37018
|
recipientDid: external_exports.string().optional()
|
|
36037
37019
|
});
|
|
37020
|
+
var InboxBatchConfigurationValidator = IssueInboxCredentialValidator.shape.configuration.unwrap().extend({
|
|
37021
|
+
refresh: IssueInboxCredentialValidator.shape.refresh.describe(
|
|
37022
|
+
"Enable managed refresh by default. An item configuration.refresh overrides this value, including false."
|
|
37023
|
+
),
|
|
37024
|
+
delivery: IssueInboxCredentialValidator.shape.configuration.unwrap().shape.delivery.unwrap().extend({ suppress: external_exports.boolean().optional() }).optional()
|
|
37025
|
+
});
|
|
37026
|
+
var InboxBatchItemConfigurationValidator = InboxBatchConfigurationValidator.extend({
|
|
37027
|
+
guardianEmail: InboxBatchConfigurationValidator.shape.guardianEmail.nullable().describe(
|
|
37028
|
+
"Require guardian approval, or set null to clear a batch-level guardianEmail for this item."
|
|
37029
|
+
)
|
|
37030
|
+
});
|
|
37031
|
+
var IssueInboxCredentialBatchItemValidator = external_exports.object({
|
|
37032
|
+
...IssueInboxCredentialValidator.shape,
|
|
37033
|
+
configuration: InboxBatchItemConfigurationValidator.optional(),
|
|
37034
|
+
idempotencyKey: external_exports.string().max(256).optional()
|
|
37035
|
+
}).refine((data) => data.credential || data.templateUri, {
|
|
37036
|
+
message: "Either credential or templateUri must be provided.",
|
|
37037
|
+
path: ["credential"]
|
|
37038
|
+
}).describe(
|
|
37039
|
+
"One issuance: provide credential or templateUri. Invalid input is rejected at submission with its item index."
|
|
37040
|
+
);
|
|
37041
|
+
var IssueInboxCredentialBatchValidator = external_exports.object({
|
|
37042
|
+
requestId: external_exports.string().min(1).max(256).optional(),
|
|
37043
|
+
items: external_exports.array(IssueInboxCredentialBatchItemValidator).min(1).max(100),
|
|
37044
|
+
configuration: InboxBatchConfigurationValidator.optional()
|
|
37045
|
+
}).superRefine((batch, ctx) => {
|
|
37046
|
+
batch.items.forEach((item, index) => {
|
|
37047
|
+
const itemGuardian = item.configuration?.guardianEmail;
|
|
37048
|
+
const guardian = itemGuardian === null ? void 0 : itemGuardian ?? batch.configuration?.guardianEmail;
|
|
37049
|
+
if (guardian && item.recipient.type === "email" && guardian.toLowerCase() === item.recipient.value.toLowerCase()) {
|
|
37050
|
+
ctx.addIssue({
|
|
37051
|
+
code: "custom",
|
|
37052
|
+
path: ["items", index, "configuration", "guardianEmail"],
|
|
37053
|
+
message: "guardianEmail must differ from recipient (self-approval not allowed)"
|
|
37054
|
+
});
|
|
37055
|
+
}
|
|
37056
|
+
});
|
|
37057
|
+
});
|
|
37058
|
+
var InboxBatchErrorReasonValidator = external_exports.enum([
|
|
37059
|
+
"DUPLICATE_KEY",
|
|
37060
|
+
"IDEMPOTENCY_MISMATCH",
|
|
37061
|
+
"IN_PROGRESS",
|
|
37062
|
+
"UNCONFIRMED"
|
|
37063
|
+
]);
|
|
37064
|
+
var IssueInboxCredentialBatchItemResultValidator = external_exports.discriminatedUnion("success", [
|
|
37065
|
+
IssueInboxCredentialResponseValidator.extend({
|
|
37066
|
+
success: external_exports.literal(true),
|
|
37067
|
+
index: external_exports.number().int().nonnegative(),
|
|
37068
|
+
deduplicated: external_exports.boolean().optional(),
|
|
37069
|
+
guardianStatus: GuardianStatusValidator.optional(),
|
|
37070
|
+
idempotencyKey: external_exports.string().optional()
|
|
37071
|
+
}),
|
|
37072
|
+
external_exports.object({
|
|
37073
|
+
success: external_exports.literal(false),
|
|
37074
|
+
index: external_exports.number().int().nonnegative(),
|
|
37075
|
+
idempotencyKey: external_exports.string().optional(),
|
|
37076
|
+
recipient: ContactMethodQueryValidator.optional(),
|
|
37077
|
+
error: external_exports.object({
|
|
37078
|
+
code: external_exports.string(),
|
|
37079
|
+
message: external_exports.string(),
|
|
37080
|
+
reason: InboxBatchErrorReasonValidator.optional()
|
|
37081
|
+
}),
|
|
37082
|
+
issuanceId: external_exports.string().optional().describe(
|
|
37083
|
+
"Present when issuance completed but replay storage could not be confirmed. Reconcile this issuance; do not issue again with a new key."
|
|
37084
|
+
),
|
|
37085
|
+
claimUrl: external_exports.string().url().optional().describe(
|
|
37086
|
+
"Claim URL of the completed issuance, if available, when replay storage could not be confirmed."
|
|
37087
|
+
)
|
|
37088
|
+
})
|
|
37089
|
+
]);
|
|
37090
|
+
var IssueInboxCredentialBatchResponseValidator = external_exports.object({
|
|
37091
|
+
results: external_exports.array(IssueInboxCredentialBatchItemResultValidator),
|
|
37092
|
+
summary: external_exports.object({
|
|
37093
|
+
total: external_exports.number(),
|
|
37094
|
+
succeeded: external_exports.number(),
|
|
37095
|
+
failed: external_exports.number(),
|
|
37096
|
+
deduplicated: external_exports.number()
|
|
37097
|
+
})
|
|
37098
|
+
});
|
|
37099
|
+
var InboxBatchReceiptValidator = external_exports.object({
|
|
37100
|
+
batchId: external_exports.string(),
|
|
37101
|
+
status: external_exports.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
|
|
37102
|
+
createdAt: external_exports.string()
|
|
37103
|
+
});
|
|
37104
|
+
var InboxBatchStatusValidator = external_exports.object({
|
|
37105
|
+
batchId: external_exports.string(),
|
|
37106
|
+
createdAt: external_exports.string(),
|
|
37107
|
+
done: external_exports.boolean().describe(
|
|
37108
|
+
"True when no queued or processing items remain, including unconfirmed outcomes."
|
|
37109
|
+
),
|
|
37110
|
+
status: external_exports.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
|
|
37111
|
+
items: external_exports.array(
|
|
37112
|
+
external_exports.object({
|
|
37113
|
+
index: external_exports.number().int().nonnegative(),
|
|
37114
|
+
state: external_exports.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
|
|
37115
|
+
result: IssueInboxCredentialBatchItemResultValidator.optional()
|
|
37116
|
+
})
|
|
37117
|
+
),
|
|
37118
|
+
summary: IssueInboxCredentialBatchResponseValidator.shape.summary.extend({
|
|
37119
|
+
completed: external_exports.number(),
|
|
37120
|
+
pending: external_exports.number(),
|
|
37121
|
+
unconfirmed: external_exports.number()
|
|
37122
|
+
})
|
|
37123
|
+
});
|
|
36038
37124
|
var CredentialNameRefValidator = external_exports.object({ name: external_exports.string() }).passthrough();
|
|
36039
37125
|
var ClaimInboxCredentialValidator = external_exports.object({
|
|
36040
37126
|
credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).or(CredentialNameRefValidator).describe("The credential to issue, or a { name } reference to resolve a boost template."),
|
|
@@ -36520,6 +37606,7 @@ var CredentialActivityValidator = external_exports.object({
|
|
|
36520
37606
|
eventType: CredentialActivityEventTypeValidator,
|
|
36521
37607
|
timestamp: external_exports.string(),
|
|
36522
37608
|
actorProfileId: external_exports.string().optional(),
|
|
37609
|
+
onBehalfOf: external_exports.string().optional(),
|
|
36523
37610
|
recipientType: CredentialActivityRecipientTypeValidator,
|
|
36524
37611
|
recipientIdentifier: external_exports.string(),
|
|
36525
37612
|
boostUri: external_exports.string().optional(),
|
|
@@ -36553,14 +37640,20 @@ var CredentialActivityStatsValidator = external_exports.object({
|
|
|
36553
37640
|
failed: external_exports.number(),
|
|
36554
37641
|
claimRate: external_exports.number()
|
|
36555
37642
|
});
|
|
36556
|
-
var
|
|
36557
|
-
var AuthSessionError = (
|
|
37643
|
+
var _a6;
|
|
37644
|
+
var AuthSessionError = (_a6 = class extends Error {
|
|
36558
37645
|
constructor(message, reason) {
|
|
36559
37646
|
super(message);
|
|
36560
37647
|
this.reason = reason;
|
|
36561
37648
|
this.name = "AuthSessionError";
|
|
36562
37649
|
}
|
|
36563
|
-
}, __name(
|
|
37650
|
+
}, __name(_a6, "AuthSessionError"), __name3(_a6, "AuthSessionError"), _a6);
|
|
37651
|
+
var EscrowPinStatusValidator = external_exports.object({
|
|
37652
|
+
state: external_exports.enum(["none", "enabled", "locked", "stale"]),
|
|
37653
|
+
enabled: external_exports.boolean(),
|
|
37654
|
+
attemptsRemaining: external_exports.number().int().nonnegative(),
|
|
37655
|
+
salt: external_exports.string().optional()
|
|
37656
|
+
});
|
|
36564
37657
|
var BITSTRING_STATUS_PURPOSES = ["revocation", "suspension"];
|
|
36565
37658
|
var BitstringStatusPurposeValidator = external_exports.enum(BITSTRING_STATUS_PURPOSES);
|
|
36566
37659
|
var BitstringStatusListEntryValidator = external_exports.object({
|
|
@@ -36669,191 +37762,456 @@ var inAppMessagesFlagValidator = external_exports.object({
|
|
|
36669
37762
|
version: external_exports.number().default(1),
|
|
36670
37763
|
messages: external_exports.array(inAppMessageValidator).default([])
|
|
36671
37764
|
}).passthrough();
|
|
36672
|
-
var
|
|
36673
|
-
var
|
|
36674
|
-
|
|
36675
|
-
|
|
36676
|
-
|
|
36677
|
-
|
|
36678
|
-
var
|
|
36679
|
-
|
|
36680
|
-
|
|
36681
|
-
|
|
36682
|
-
var
|
|
36683
|
-
|
|
36684
|
-
|
|
36685
|
-
|
|
36686
|
-
var
|
|
36687
|
-
|
|
36688
|
-
|
|
36689
|
-
|
|
36690
|
-
}
|
|
36691
|
-
|
|
36692
|
-
});
|
|
36693
|
-
var
|
|
36694
|
-
|
|
36695
|
-
|
|
36696
|
-
|
|
36697
|
-
|
|
36698
|
-
|
|
36699
|
-
|
|
36700
|
-
|
|
36701
|
-
|
|
36702
|
-
|
|
36703
|
-
|
|
36704
|
-
|
|
36705
|
-
}
|
|
36706
|
-
|
|
36707
|
-
|
|
36708
|
-
|
|
36709
|
-
|
|
36710
|
-
|
|
36711
|
-
|
|
36712
|
-
|
|
36713
|
-
|
|
36714
|
-
|
|
36715
|
-
|
|
36716
|
-
|
|
36717
|
-
|
|
36718
|
-
|
|
36719
|
-
|
|
36720
|
-
|
|
36721
|
-
|
|
36722
|
-
|
|
36723
|
-
|
|
36724
|
-
|
|
36725
|
-
|
|
36726
|
-
|
|
36727
|
-
}
|
|
36728
|
-
|
|
36729
|
-
|
|
36730
|
-
|
|
36731
|
-
|
|
36732
|
-
|
|
36733
|
-
|
|
37765
|
+
var SHARE_LINK_ID_BYTES = 16;
|
|
37766
|
+
var SHARE_CONTENT_KEY_BYTES = 32;
|
|
37767
|
+
var SHARE_IV_BYTES = 12;
|
|
37768
|
+
var SHARE_TAG_BYTES = 16;
|
|
37769
|
+
var MAX_SHARE_CIPHERTEXT_BYTES = 512 * 1024;
|
|
37770
|
+
var MAX_SHARE_RECOVERY_JWE_BYTES = 64 * 1024;
|
|
37771
|
+
var MAX_SELECTED_CREDENTIALS = 50;
|
|
37772
|
+
var MAX_ENDORSEMENTS = 200;
|
|
37773
|
+
var MAX_VP_MEMBERS = MAX_SELECTED_CREDENTIALS + MAX_ENDORSEMENTS;
|
|
37774
|
+
var MAX_SHARE_SOURCE_URI_CHARS = 2048;
|
|
37775
|
+
var MAX_SHARE_LINK_REQUEST_BYTES = 1024 * 1024;
|
|
37776
|
+
var SHARE_LINK_PROTOCOL = "lc-share/v1";
|
|
37777
|
+
var SHARE_RECOVERY_PROTOCOL = "lc-share-recovery/v1";
|
|
37778
|
+
var BASE64URL_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
|
37779
|
+
var BASE64URL_LOOKUP = (() => {
|
|
37780
|
+
const table = new Int16Array(128).fill(-1);
|
|
37781
|
+
for (let index = 0; index < BASE64URL_ALPHABET.length; index += 1) {
|
|
37782
|
+
table[BASE64URL_ALPHABET.charCodeAt(index)] = index;
|
|
37783
|
+
}
|
|
37784
|
+
return table;
|
|
37785
|
+
})();
|
|
37786
|
+
var encodeBase64Url = /* @__PURE__ */ __name3((bytes) => {
|
|
37787
|
+
let output = "";
|
|
37788
|
+
for (let index = 0; index < bytes.length; index += 3) {
|
|
37789
|
+
const first = bytes[index];
|
|
37790
|
+
const second = bytes[index + 1];
|
|
37791
|
+
const third = bytes[index + 2];
|
|
37792
|
+
output += BASE64URL_ALPHABET[first >> 2];
|
|
37793
|
+
output += BASE64URL_ALPHABET[(first & 3) << 4 | (second ?? 0) >> 4];
|
|
37794
|
+
if (second === void 0) break;
|
|
37795
|
+
output += BASE64URL_ALPHABET[(second & 15) << 2 | (third ?? 0) >> 6];
|
|
37796
|
+
if (third === void 0) break;
|
|
37797
|
+
output += BASE64URL_ALPHABET[third & 63];
|
|
37798
|
+
}
|
|
37799
|
+
return output;
|
|
37800
|
+
}, "encodeBase64Url");
|
|
37801
|
+
var decodeBase64Url = /* @__PURE__ */ __name3((value) => {
|
|
37802
|
+
if (typeof value !== "string") return null;
|
|
37803
|
+
const output = new Uint8Array(Math.floor(value.length * 6 / 8));
|
|
37804
|
+
let bits = 0;
|
|
37805
|
+
let bitCount = 0;
|
|
37806
|
+
let outputIndex = 0;
|
|
37807
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
37808
|
+
const code = value.charCodeAt(index);
|
|
37809
|
+
const digit = code < 128 ? BASE64URL_LOOKUP[code] : -1;
|
|
37810
|
+
if (digit < 0) return null;
|
|
37811
|
+
bits = bits << 6 | digit;
|
|
37812
|
+
bitCount += 6;
|
|
37813
|
+
if (bitCount >= 8) {
|
|
37814
|
+
bitCount -= 8;
|
|
37815
|
+
output[outputIndex] = bits >> bitCount & 255;
|
|
37816
|
+
outputIndex += 1;
|
|
37817
|
+
}
|
|
37818
|
+
}
|
|
37819
|
+
return output;
|
|
37820
|
+
}, "decodeBase64Url");
|
|
37821
|
+
var isCanonicalBase64Url = /* @__PURE__ */ __name3((value, expectedBytes) => {
|
|
37822
|
+
if (typeof value !== "string") return false;
|
|
37823
|
+
if (expectedBytes !== void 0 && value.length !== Math.ceil(expectedBytes * 4 / 3))
|
|
37824
|
+
return false;
|
|
37825
|
+
const decoded = decodeBase64Url(value);
|
|
37826
|
+
if (decoded === null) return false;
|
|
37827
|
+
if (expectedBytes !== void 0 && decoded.length !== expectedBytes) return false;
|
|
37828
|
+
return encodeBase64Url(decoded) === value;
|
|
37829
|
+
}, "isCanonicalBase64Url");
|
|
37830
|
+
var utf8ByteLength = /* @__PURE__ */ __name3((value) => new TextEncoder().encode(value).length, "utf8ByteLength");
|
|
37831
|
+
var canonicalBase64Url = /* @__PURE__ */ __name3((bytes) => external_exports.string().refine((value) => isCanonicalBase64Url(value, bytes), {
|
|
37832
|
+
message: `must be canonical base64url for exactly ${bytes} bytes`
|
|
37833
|
+
}), "canonicalBase64Url");
|
|
37834
|
+
var ShareLinkIdValidator = canonicalBase64Url(SHARE_LINK_ID_BYTES);
|
|
37835
|
+
var ShareContentKeyValidator = canonicalBase64Url(SHARE_CONTENT_KEY_BYTES);
|
|
37836
|
+
var ShareIvValidator = canonicalBase64Url(SHARE_IV_BYTES);
|
|
37837
|
+
var ShareCiphertextValidator = external_exports.string().refine(
|
|
37838
|
+
(value) => {
|
|
37839
|
+
if (value.length > Math.ceil(MAX_SHARE_CIPHERTEXT_BYTES * 4 / 3)) return false;
|
|
37840
|
+
const decoded = decodeBase64Url(value);
|
|
37841
|
+
if (decoded === null) return false;
|
|
37842
|
+
if (encodeBase64Url(decoded) !== value) return false;
|
|
37843
|
+
return decoded.length >= SHARE_TAG_BYTES && decoded.length <= MAX_SHARE_CIPHERTEXT_BYTES;
|
|
37844
|
+
},
|
|
37845
|
+
{
|
|
37846
|
+
message: `must be canonical base64url decoding to ${SHARE_TAG_BYTES}..${MAX_SHARE_CIPHERTEXT_BYTES} bytes`
|
|
36734
37847
|
}
|
|
36735
|
-
|
|
37848
|
+
);
|
|
37849
|
+
var ShareEnvelopeValidator = external_exports.object({
|
|
37850
|
+
v: external_exports.literal(1),
|
|
37851
|
+
alg: external_exports.literal("A256GCM"),
|
|
37852
|
+
iv: ShareIvValidator,
|
|
37853
|
+
ct: ShareCiphertextValidator
|
|
37854
|
+
}).strict();
|
|
37855
|
+
var safeVersion = external_exports.number().int().min(1).max(2 ** 31 - 1);
|
|
37856
|
+
var safeCredentialIndex = external_exports.number().int().min(0).max(MAX_VP_MEMBERS - 1);
|
|
37857
|
+
var ShareSelectionEntryValidator = external_exports.object({ credentialIndex: safeCredentialIndex }).strict();
|
|
37858
|
+
var ShareEndorsementEntryValidator = external_exports.object({ credentialIndex: safeCredentialIndex, targetCredentialIndex: safeCredentialIndex }).strict();
|
|
37859
|
+
var ShareSharerValidator = external_exports.object({
|
|
37860
|
+
profileId: external_exports.string().min(1).max(128),
|
|
37861
|
+
displayName: external_exports.string().min(1).max(120),
|
|
37862
|
+
avatar: external_exports.string().max(2048).optional()
|
|
37863
|
+
}).strict();
|
|
37864
|
+
var presentationShape = VPValidator.extend({
|
|
37865
|
+
verifiableCredential: VCValidator.array().min(1).max(MAX_VP_MEMBERS)
|
|
37866
|
+
});
|
|
37867
|
+
var hasBoundedPresentation = /* @__PURE__ */ __name3((value) => {
|
|
37868
|
+
let credentialCount = 0;
|
|
37869
|
+
const ancestors = /* @__PURE__ */ new Set();
|
|
37870
|
+
const visit = /* @__PURE__ */ __name3((node, depth) => {
|
|
37871
|
+
if (node === null || typeof node !== "object") return true;
|
|
37872
|
+
if (depth > 32 || ancestors.has(node)) return false;
|
|
37873
|
+
ancestors.add(node);
|
|
37874
|
+
try {
|
|
37875
|
+
for (const [key, child] of Object.entries(node)) {
|
|
37876
|
+
if (key === "verifiableCredential") {
|
|
37877
|
+
credentialCount += Array.isArray(child) ? child.length : 1;
|
|
37878
|
+
if (credentialCount > MAX_VP_MEMBERS) return false;
|
|
37879
|
+
}
|
|
37880
|
+
if (!visit(child, depth + 1)) return false;
|
|
37881
|
+
}
|
|
37882
|
+
return true;
|
|
37883
|
+
} finally {
|
|
37884
|
+
ancestors.delete(node);
|
|
37885
|
+
}
|
|
37886
|
+
}, "visit");
|
|
37887
|
+
return visit(value, 0);
|
|
37888
|
+
}, "hasBoundedPresentation");
|
|
37889
|
+
var ShareManifestPresentationValidator = external_exports.custom(
|
|
37890
|
+
(value) => hasBoundedPresentation(value) && presentationShape.safeParse(value).success,
|
|
37891
|
+
{ message: "invalid share presentation" }
|
|
37892
|
+
);
|
|
37893
|
+
var SharePayloadValidatorShape = external_exports.object({
|
|
37894
|
+
protocol: external_exports.literal(SHARE_LINK_PROTOCOL),
|
|
37895
|
+
shareId: ShareLinkIdValidator,
|
|
37896
|
+
contentVersion: safeVersion,
|
|
37897
|
+
createdAt: external_exports.iso.datetime(),
|
|
37898
|
+
sharer: ShareSharerValidator,
|
|
37899
|
+
presentation: ShareManifestPresentationValidator,
|
|
37900
|
+
selection: ShareSelectionEntryValidator.array().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
37901
|
+
endorsements: ShareEndorsementEntryValidator.array().max(MAX_ENDORSEMENTS).default([])
|
|
37902
|
+
}).strict();
|
|
37903
|
+
var classificationFailure = /* @__PURE__ */ __name3((code, message, path = []) => ({ ok: false, code, message, path }), "classificationFailure");
|
|
37904
|
+
var readSignedClaimId = /* @__PURE__ */ __name3((member) => {
|
|
37905
|
+
if (member === null || typeof member !== "object") return void 0;
|
|
37906
|
+
const record2 = member;
|
|
37907
|
+
const claim = record2.credentialSubject ?? record2.endorsement;
|
|
37908
|
+
if (claim === null || typeof claim !== "object") return void 0;
|
|
37909
|
+
const claimRecord = claim;
|
|
37910
|
+
const nested = claimRecord.endorsement;
|
|
37911
|
+
const nestedId = nested !== null && typeof nested === "object" ? nested.id : void 0;
|
|
37912
|
+
return claimRecord.id ?? nestedId;
|
|
37913
|
+
}, "readSignedClaimId");
|
|
37914
|
+
var classifyShareManifest = /* @__PURE__ */ __name3((payload) => {
|
|
37915
|
+
const members = payload.presentation?.verifiableCredential;
|
|
37916
|
+
if (!Array.isArray(members) || members.length === 0) {
|
|
37917
|
+
return classificationFailure("NO_PRESENTATION_MEMBERS", "presentation has no credentials");
|
|
37918
|
+
}
|
|
37919
|
+
if (members.length > MAX_VP_MEMBERS) {
|
|
37920
|
+
return classificationFailure(
|
|
37921
|
+
"TOO_MANY_VP_MEMBERS",
|
|
37922
|
+
`presentation has ${members.length} members, over the ${MAX_VP_MEMBERS} bound`
|
|
37923
|
+
);
|
|
37924
|
+
}
|
|
37925
|
+
const selection = payload.selection;
|
|
37926
|
+
const endorsements = payload.endorsements ?? [];
|
|
37927
|
+
if (!Array.isArray(selection) || selection.length < 1 || selection.length > MAX_SELECTED_CREDENTIALS) {
|
|
37928
|
+
return classificationFailure("BAD_SELECTION", "selection must contain 1..50 entries");
|
|
37929
|
+
}
|
|
37930
|
+
if (!Array.isArray(endorsements) || endorsements.length > MAX_ENDORSEMENTS) {
|
|
37931
|
+
return classificationFailure(
|
|
37932
|
+
"BAD_ENDORSEMENTS",
|
|
37933
|
+
"endorsements must contain at most 200 entries"
|
|
37934
|
+
);
|
|
37935
|
+
}
|
|
37936
|
+
const selectedIndices = [];
|
|
37937
|
+
const selected = /* @__PURE__ */ new Set();
|
|
37938
|
+
for (let index = 0; index < selection.length; index += 1) {
|
|
37939
|
+
const entry = selection[index];
|
|
37940
|
+
const credentialIndex = entry?.credentialIndex;
|
|
37941
|
+
if (!Number.isSafeInteger(credentialIndex) || credentialIndex < 0 || credentialIndex >= members.length) {
|
|
37942
|
+
return classificationFailure(
|
|
37943
|
+
"SELECTION_INDEX_OUT_OF_BOUNDS",
|
|
37944
|
+
`selection[${index}].credentialIndex is out of bounds`,
|
|
37945
|
+
["selection", index, "credentialIndex"]
|
|
37946
|
+
);
|
|
37947
|
+
}
|
|
37948
|
+
if (selected.has(credentialIndex)) {
|
|
37949
|
+
return classificationFailure(
|
|
37950
|
+
"SELECTION_INDEX_DUPLICATE",
|
|
37951
|
+
`selection[${index}].credentialIndex is duplicated`,
|
|
37952
|
+
["selection", index, "credentialIndex"]
|
|
37953
|
+
);
|
|
37954
|
+
}
|
|
37955
|
+
selected.add(credentialIndex);
|
|
37956
|
+
selectedIndices.push(credentialIndex);
|
|
37957
|
+
}
|
|
37958
|
+
const classified = new Set(selected);
|
|
37959
|
+
const endorsementIndices = [];
|
|
37960
|
+
for (let index = 0; index < endorsements.length; index += 1) {
|
|
37961
|
+
const entry = endorsements[index];
|
|
37962
|
+
const credentialIndex = entry?.credentialIndex;
|
|
37963
|
+
const targetIndex = entry?.targetCredentialIndex;
|
|
37964
|
+
if (!Number.isSafeInteger(credentialIndex) || credentialIndex < 0 || credentialIndex >= members.length) {
|
|
37965
|
+
return classificationFailure(
|
|
37966
|
+
"ENDORSEMENT_INDEX_OUT_OF_BOUNDS",
|
|
37967
|
+
`endorsements[${index}].credentialIndex is out of bounds`,
|
|
37968
|
+
["endorsements", index, "credentialIndex"]
|
|
37969
|
+
);
|
|
37970
|
+
}
|
|
37971
|
+
if (classified.has(credentialIndex)) {
|
|
37972
|
+
return classificationFailure(
|
|
37973
|
+
"VP_MEMBER_CLASSIFIED_TWICE",
|
|
37974
|
+
`endorsements[${index}].credentialIndex was already classified`,
|
|
37975
|
+
["endorsements", index, "credentialIndex"]
|
|
37976
|
+
);
|
|
37977
|
+
}
|
|
37978
|
+
if (!selected.has(targetIndex)) {
|
|
37979
|
+
return classificationFailure(
|
|
37980
|
+
"ENDORSEMENT_TARGET_NOT_SELECTED",
|
|
37981
|
+
`endorsements[${index}].targetCredentialIndex must reference a selected credential`,
|
|
37982
|
+
["endorsements", index, "targetCredentialIndex"]
|
|
37983
|
+
);
|
|
37984
|
+
}
|
|
37985
|
+
const referenced = readSignedClaimId(members[credentialIndex]);
|
|
37986
|
+
const target = members[targetIndex];
|
|
37987
|
+
const targetId = target !== null && typeof target === "object" ? target.id : void 0;
|
|
37988
|
+
if (typeof referenced !== "string" || typeof targetId !== "string" || referenced !== targetId) {
|
|
37989
|
+
return classificationFailure(
|
|
37990
|
+
"ENDORSEMENT_TARGET_UNBOUND",
|
|
37991
|
+
`endorsements[${index}] claim does not reference the target credential id`,
|
|
37992
|
+
["endorsements", index]
|
|
37993
|
+
);
|
|
37994
|
+
}
|
|
37995
|
+
classified.add(credentialIndex);
|
|
37996
|
+
endorsementIndices.push(credentialIndex);
|
|
37997
|
+
}
|
|
37998
|
+
if (classified.size !== members.length) {
|
|
37999
|
+
return classificationFailure(
|
|
38000
|
+
"UNCLASSIFIED_VP_MEMBER",
|
|
38001
|
+
"every presentation member must be classified exactly once",
|
|
38002
|
+
["presentation", "verifiableCredential"]
|
|
38003
|
+
);
|
|
38004
|
+
}
|
|
38005
|
+
return {
|
|
38006
|
+
ok: true,
|
|
38007
|
+
classification: { selectedIndices, endorsementIndices, memberCount: members.length }
|
|
38008
|
+
};
|
|
38009
|
+
}, "classifyShareManifest");
|
|
38010
|
+
var SharePayloadValidator = SharePayloadValidatorShape.superRefine((payload, ctx) => {
|
|
38011
|
+
const result = classifyShareManifest(payload);
|
|
38012
|
+
if (!result.ok) {
|
|
36736
38013
|
ctx.addIssue({
|
|
36737
38014
|
code: "custom",
|
|
36738
|
-
|
|
36739
|
-
|
|
38015
|
+
message: result.message,
|
|
38016
|
+
path: result.path,
|
|
38017
|
+
params: { shareLinkCode: result.code }
|
|
36740
38018
|
});
|
|
36741
38019
|
}
|
|
36742
|
-
|
|
36743
|
-
|
|
36744
|
-
|
|
36745
|
-
|
|
36746
|
-
|
|
36747
|
-
|
|
36748
|
-
|
|
36749
|
-
|
|
36750
|
-
|
|
38020
|
+
});
|
|
38021
|
+
var ShareRecoverySelectionValidator = external_exports.object({
|
|
38022
|
+
ref: external_exports.string().min(1).max(MAX_SHARE_SOURCE_URI_CHARS),
|
|
38023
|
+
order: external_exports.number().int().min(0).max(MAX_SELECTED_CREDENTIALS - 1)
|
|
38024
|
+
}).strict();
|
|
38025
|
+
var ShareRecoveryEndorsementValidator = external_exports.object({ targetRef: external_exports.string().min(1).max(MAX_SHARE_SOURCE_URI_CHARS) }).strict();
|
|
38026
|
+
var ShareRecoveryPlaintextValidator = external_exports.object({
|
|
38027
|
+
protocol: external_exports.literal(SHARE_RECOVERY_PROTOCOL),
|
|
38028
|
+
shareId: ShareLinkIdValidator,
|
|
38029
|
+
ownerProfileId: external_exports.string().min(1).max(128),
|
|
38030
|
+
createdAt: external_exports.iso.datetime(),
|
|
38031
|
+
latest: external_exports.object({ contentVersion: safeVersion, key: ShareContentKeyValidator }).strict(),
|
|
38032
|
+
selection: ShareRecoverySelectionValidator.array().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
38033
|
+
endorsements: ShareRecoveryEndorsementValidator.array().max(MAX_ENDORSEMENTS).default([])
|
|
38034
|
+
}).strict().superRefine((recovery, ctx) => {
|
|
38035
|
+
const orders = /* @__PURE__ */ new Set();
|
|
38036
|
+
recovery.selection.forEach((entry, index) => {
|
|
38037
|
+
if (entry.order >= recovery.selection.length) {
|
|
36751
38038
|
ctx.addIssue({
|
|
36752
38039
|
code: "custom",
|
|
36753
|
-
|
|
36754
|
-
|
|
38040
|
+
message: "order must be within the selection bounds",
|
|
38041
|
+
path: ["selection", index, "order"]
|
|
36755
38042
|
});
|
|
36756
38043
|
}
|
|
36757
|
-
if (
|
|
38044
|
+
if (orders.has(entry.order)) {
|
|
36758
38045
|
ctx.addIssue({
|
|
36759
38046
|
code: "custom",
|
|
36760
|
-
|
|
36761
|
-
|
|
38047
|
+
message: "order must be unique within the selection",
|
|
38048
|
+
path: ["selection", index, "order"]
|
|
36762
38049
|
});
|
|
36763
38050
|
}
|
|
38051
|
+
orders.add(entry.order);
|
|
38052
|
+
});
|
|
38053
|
+
});
|
|
38054
|
+
var ShareOwnerRecoveryValidator = JWEValidator.refine(
|
|
38055
|
+
(value) => utf8ByteLength(JSON.stringify(value)) <= MAX_SHARE_RECOVERY_JWE_BYTES,
|
|
38056
|
+
{ message: `serialized recovery JWE must be at most ${MAX_SHARE_RECOVERY_JWE_BYTES} bytes` }
|
|
38057
|
+
);
|
|
38058
|
+
var ShareLinkStatusValidator = external_exports.enum(["pending", "active", "stopped"]);
|
|
38059
|
+
var ShareContentStateValidator = external_exports.enum(["staging", "finalized", "content_missing"]);
|
|
38060
|
+
var ShareLinkValidator = external_exports.object({
|
|
38061
|
+
id: ShareLinkIdValidator,
|
|
38062
|
+
title: external_exports.string().min(1).max(120),
|
|
38063
|
+
note: external_exports.string().max(500).optional(),
|
|
38064
|
+
selectedCount: external_exports.number().int().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
38065
|
+
version: safeVersion,
|
|
38066
|
+
contentVersion: safeVersion,
|
|
38067
|
+
status: ShareLinkStatusValidator,
|
|
38068
|
+
contentState: ShareContentStateValidator,
|
|
38069
|
+
createdAt: external_exports.iso.datetime(),
|
|
38070
|
+
updatedAt: external_exports.iso.datetime(),
|
|
38071
|
+
expiresAt: external_exports.iso.datetime().nullable(),
|
|
38072
|
+
stoppedAt: external_exports.iso.datetime().nullable(),
|
|
38073
|
+
lastViewedAt: external_exports.iso.datetime().nullable(),
|
|
38074
|
+
viewCount: external_exports.number().int().min(0).optional(),
|
|
38075
|
+
passcodeProtected: external_exports.boolean(),
|
|
38076
|
+
notifyOnView: external_exports.boolean(),
|
|
38077
|
+
minorPolicy: external_exports.object({
|
|
38078
|
+
isMinor: external_exports.boolean().nullable(),
|
|
38079
|
+
policyResolved: external_exports.boolean(),
|
|
38080
|
+
defaultExpiryDays: external_exports.union([external_exports.literal(30), external_exports.literal(365)]),
|
|
38081
|
+
viewCountingEnabled: external_exports.boolean()
|
|
38082
|
+
}),
|
|
38083
|
+
/**
|
|
38084
|
+
* Guarded application/API URL for the content. Optional because owner APIs in
|
|
38085
|
+
* D1 have no public resolve/content endpoint yet; it must never be a
|
|
38086
|
+
* LearnCloud object URL or carry a fabricated decryption key.
|
|
38087
|
+
*/
|
|
38088
|
+
contentUrl: external_exports.string().optional()
|
|
38089
|
+
});
|
|
38090
|
+
var clientRequestId = external_exports.string().uuid();
|
|
38091
|
+
var CreateShareLinkInputValidator = external_exports.object({
|
|
38092
|
+
id: ShareLinkIdValidator,
|
|
38093
|
+
clientRequestId,
|
|
38094
|
+
title: external_exports.string().min(1).max(120),
|
|
38095
|
+
note: external_exports.string().max(500).optional(),
|
|
38096
|
+
expiresAt: external_exports.iso.datetime().nullable().optional(),
|
|
38097
|
+
passcode: external_exports.string().min(8).max(64).optional(),
|
|
38098
|
+
notifyOnView: external_exports.boolean().default(false),
|
|
38099
|
+
selectedCount: external_exports.number().int().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
38100
|
+
contentVersion: external_exports.literal(1),
|
|
38101
|
+
envelope: ShareEnvelopeValidator,
|
|
38102
|
+
ownerEncryptedRecovery: ShareOwnerRecoveryValidator
|
|
38103
|
+
}).strict();
|
|
38104
|
+
var UpdateShareLinkInputValidator = external_exports.object({
|
|
38105
|
+
id: ShareLinkIdValidator,
|
|
38106
|
+
expectedVersion: safeVersion,
|
|
38107
|
+
clientRequestId,
|
|
38108
|
+
title: external_exports.string().min(1).max(120).optional(),
|
|
38109
|
+
note: external_exports.string().max(500).nullable().optional(),
|
|
38110
|
+
expiresAt: external_exports.iso.datetime().nullable().optional(),
|
|
38111
|
+
/** Omitted preserves the current passcode, null removes it, and a string replaces it. */
|
|
38112
|
+
passcode: external_exports.string().min(8).max(64).nullable().optional(),
|
|
38113
|
+
notifyOnView: external_exports.boolean().optional(),
|
|
38114
|
+
contentVersion: safeVersion.optional(),
|
|
38115
|
+
selectedCount: external_exports.number().int().min(1).max(MAX_SELECTED_CREDENTIALS).optional(),
|
|
38116
|
+
envelope: ShareEnvelopeValidator.optional(),
|
|
38117
|
+
ownerEncryptedRecovery: ShareOwnerRecoveryValidator.optional()
|
|
38118
|
+
}).strict().superRefine((value, ctx) => {
|
|
38119
|
+
const provided = [
|
|
38120
|
+
value.contentVersion,
|
|
38121
|
+
value.selectedCount,
|
|
38122
|
+
value.envelope,
|
|
38123
|
+
value.ownerEncryptedRecovery
|
|
38124
|
+
].filter((field) => field !== void 0).length;
|
|
38125
|
+
if (provided !== 0 && provided !== 4) {
|
|
38126
|
+
ctx.addIssue({
|
|
38127
|
+
code: "custom",
|
|
38128
|
+
message: "content replacement requires contentVersion, selectedCount, envelope and ownerEncryptedRecovery together"
|
|
38129
|
+
});
|
|
36764
38130
|
}
|
|
36765
38131
|
});
|
|
36766
|
-
var
|
|
36767
|
-
|
|
36768
|
-
|
|
36769
|
-
"
|
|
36770
|
-
|
|
36771
|
-
|
|
38132
|
+
var ShareLinkIdInputValidator = external_exports.object({ id: ShareLinkIdValidator }).strict();
|
|
38133
|
+
var ShareLinkOperationKeyInputValidator = external_exports.object({ id: ShareLinkIdValidator, operationId: external_exports.string().uuid() }).strict();
|
|
38134
|
+
var ShareLinkOwnerCommitOutputValidator = external_exports.discriminatedUnion("status", [
|
|
38135
|
+
external_exports.object({ status: external_exports.literal("completed"), share: ShareLinkValidator }).strict(),
|
|
38136
|
+
external_exports.object({
|
|
38137
|
+
status: external_exports.literal("pending"),
|
|
38138
|
+
id: ShareLinkIdValidator,
|
|
38139
|
+
operationId: external_exports.string().uuid()
|
|
38140
|
+
}).strict()
|
|
36772
38141
|
]);
|
|
36773
|
-
var
|
|
36774
|
-
|
|
36775
|
-
|
|
36776
|
-
|
|
36777
|
-
|
|
36778
|
-
|
|
36779
|
-
|
|
36780
|
-
|
|
36781
|
-
publishedAt: external_exports.string().min(1),
|
|
36782
|
-
effectiveAt: external_exports.string().optional(),
|
|
36783
|
-
etag: external_exports.string().optional(),
|
|
36784
|
-
signingMode: CredentialRefreshSigningModeValidator.optional(),
|
|
36785
|
-
updateSummary: external_exports.string().optional()
|
|
36786
|
-
});
|
|
36787
|
-
var GetCredentialRefreshHistoryInputValidator = external_exports.object({
|
|
36788
|
-
refreshId: external_exports.string().min(1),
|
|
36789
|
-
cursor: external_exports.string().optional(),
|
|
36790
|
-
limit: external_exports.number().int().positive().optional()
|
|
36791
|
-
});
|
|
36792
|
-
var GetCredentialRefreshHistoryResultValidator = external_exports.object({
|
|
36793
|
-
records: CredentialRefreshVersionMetadataValidator.array(),
|
|
36794
|
-
hasMore: external_exports.boolean(),
|
|
36795
|
-
cursor: external_exports.string().optional()
|
|
36796
|
-
});
|
|
36797
|
-
var CredentialRefreshChallengeValidator = external_exports.object({
|
|
36798
|
-
challenge: external_exports.string().min(1),
|
|
36799
|
-
expiresAt: external_exports.string().min(1),
|
|
36800
|
-
domain: external_exports.string().optional(),
|
|
36801
|
-
scheme: external_exports.literal("LearnCardDIDAuth").optional()
|
|
36802
|
-
});
|
|
36803
|
-
var PublicCredentialRefreshEnvelopeValidator = external_exports.object({
|
|
36804
|
-
format: external_exports.literal("vc"),
|
|
36805
|
-
credential: VCValidator,
|
|
36806
|
-
etag: external_exports.string().optional()
|
|
36807
|
-
});
|
|
36808
|
-
var JweCredentialRefreshEnvelopeValidator = external_exports.object({
|
|
36809
|
-
format: external_exports.literal("jwe"),
|
|
36810
|
-
jwe: JWEValidator,
|
|
36811
|
-
etag: external_exports.string().optional(),
|
|
36812
|
-
/** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
|
|
36813
|
-
version: external_exports.number().int().positive().optional()
|
|
36814
|
-
});
|
|
36815
|
-
var CredentialRefreshResponseEnvelopeValidator = external_exports.discriminatedUnion("format", [
|
|
36816
|
-
PublicCredentialRefreshEnvelopeValidator,
|
|
36817
|
-
JweCredentialRefreshEnvelopeValidator
|
|
38142
|
+
var ShareLinkOwnerStatusOutputValidator = external_exports.discriminatedUnion("status", [
|
|
38143
|
+
external_exports.object({ status: external_exports.literal("found"), share: ShareLinkValidator }).strict(),
|
|
38144
|
+
external_exports.object({
|
|
38145
|
+
status: external_exports.literal("pending"),
|
|
38146
|
+
id: ShareLinkIdValidator,
|
|
38147
|
+
operationId: external_exports.string().uuid()
|
|
38148
|
+
}).strict(),
|
|
38149
|
+
external_exports.object({ status: external_exports.literal("not_found"), id: ShareLinkIdValidator }).strict()
|
|
36818
38150
|
]);
|
|
36819
|
-
var
|
|
36820
|
-
|
|
36821
|
-
|
|
36822
|
-
|
|
36823
|
-
|
|
36824
|
-
|
|
36825
|
-
|
|
36826
|
-
|
|
36827
|
-
|
|
36828
|
-
|
|
36829
|
-
|
|
36830
|
-
|
|
38151
|
+
var ShareLinkOwnerRecoveryOutputValidator = external_exports.object({ recovery: ShareOwnerRecoveryValidator }).strict();
|
|
38152
|
+
var ShareLinkOwnerContentOutputValidator = external_exports.object({
|
|
38153
|
+
id: ShareLinkIdValidator,
|
|
38154
|
+
contentVersion: safeVersion,
|
|
38155
|
+
envelope: ShareEnvelopeValidator
|
|
38156
|
+
}).strict();
|
|
38157
|
+
var ResolveShareLinkInputValidator = external_exports.object({
|
|
38158
|
+
id: ShareLinkIdValidator,
|
|
38159
|
+
/** Sent only in a POST body; it must never be placed in a share URL. */
|
|
38160
|
+
passcode: external_exports.string().min(4).max(64).optional()
|
|
38161
|
+
}).strict();
|
|
38162
|
+
var ShareLinkPublicStateValidator = external_exports.discriminatedUnion("state", [
|
|
38163
|
+
external_exports.object({
|
|
38164
|
+
state: external_exports.literal("passcode_required"),
|
|
38165
|
+
id: ShareLinkIdValidator
|
|
38166
|
+
}).strict(),
|
|
38167
|
+
external_exports.object({ state: external_exports.literal("try_later"), id: ShareLinkIdValidator }).strict(),
|
|
38168
|
+
external_exports.object({
|
|
38169
|
+
state: external_exports.literal("active"),
|
|
38170
|
+
id: ShareLinkIdValidator,
|
|
38171
|
+
title: external_exports.string().max(120),
|
|
38172
|
+
note: external_exports.string().max(500).optional(),
|
|
38173
|
+
selectedCount: external_exports.number().int().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
38174
|
+
contentVersion: safeVersion,
|
|
38175
|
+
contentUrl: external_exports.string(),
|
|
38176
|
+
sharer: external_exports.object({
|
|
38177
|
+
displayName: external_exports.string().max(120),
|
|
38178
|
+
avatar: external_exports.string().max(2048).optional()
|
|
38179
|
+
}),
|
|
38180
|
+
createdAt: external_exports.iso.datetime(),
|
|
38181
|
+
updatedAt: external_exports.iso.datetime(),
|
|
38182
|
+
expiresAt: external_exports.iso.datetime().nullable()
|
|
38183
|
+
}).strict(),
|
|
38184
|
+
external_exports.object({
|
|
38185
|
+
state: external_exports.literal("expired"),
|
|
38186
|
+
id: ShareLinkIdValidator,
|
|
38187
|
+
expiresAt: external_exports.iso.datetime()
|
|
38188
|
+
}).strict(),
|
|
38189
|
+
external_exports.object({
|
|
38190
|
+
state: external_exports.literal("stopped"),
|
|
38191
|
+
id: ShareLinkIdValidator,
|
|
38192
|
+
stoppedAt: external_exports.iso.datetime()
|
|
38193
|
+
}).strict(),
|
|
38194
|
+
external_exports.object({ state: external_exports.literal("not_found"), id: ShareLinkIdValidator }).strict()
|
|
36831
38195
|
]);
|
|
36832
|
-
var
|
|
36833
|
-
|
|
36834
|
-
|
|
36835
|
-
|
|
36836
|
-
|
|
36837
|
-
|
|
36838
|
-
var CredentialRefreshUnchangedResultValidator = external_exports.object({
|
|
36839
|
-
status: external_exports.literal("unchanged"),
|
|
36840
|
-
checkedAt: external_exports.string().min(1),
|
|
36841
|
-
etag: external_exports.string().optional()
|
|
36842
|
-
});
|
|
36843
|
-
var CredentialRefreshUnsupportedResultValidator = external_exports.object({
|
|
36844
|
-
status: external_exports.literal("unsupported")
|
|
36845
|
-
});
|
|
36846
|
-
var CredentialRefreshFailedResultValidator = external_exports.object({
|
|
36847
|
-
status: external_exports.literal("failed"),
|
|
36848
|
-
code: CredentialRefreshFailureCodeValidator,
|
|
36849
|
-
retryable: external_exports.boolean()
|
|
38196
|
+
var ListShareLinksInputValidator = external_exports.object({
|
|
38197
|
+
limit: external_exports.number().int().min(1).max(50).default(25),
|
|
38198
|
+
cursor: external_exports.string().max(512).optional()
|
|
38199
|
+
}).strict();
|
|
38200
|
+
var PaginatedShareLinksValidator = PaginationResponseValidator.extend({
|
|
38201
|
+
records: ShareLinkValidator.array()
|
|
36850
38202
|
});
|
|
36851
|
-
var
|
|
36852
|
-
|
|
36853
|
-
|
|
36854
|
-
|
|
36855
|
-
|
|
36856
|
-
|
|
38203
|
+
var AcknowledgeViewInputValidator = external_exports.object({
|
|
38204
|
+
receipt: external_exports.string().min(22).max(128).regex(/^[A-Za-z0-9_-]+$/)
|
|
38205
|
+
}).strict();
|
|
38206
|
+
var AcknowledgeViewOutputValidator = external_exports.object({ ok: external_exports.literal(true) }).strict();
|
|
38207
|
+
var SHARE_VIEW_RECEIPT_TTL_SECONDS = 10 * 60;
|
|
38208
|
+
var ShareLinkPublicContentViewValidator = external_exports.object({
|
|
38209
|
+
id: ShareLinkIdValidator,
|
|
38210
|
+
contentVersion: safeVersion,
|
|
38211
|
+
envelope: ShareEnvelopeValidator,
|
|
38212
|
+
contentUrl: external_exports.string(),
|
|
38213
|
+
receipt: external_exports.string().min(22).max(128).regex(/^[A-Za-z0-9_-]+$/)
|
|
38214
|
+
}).strict();
|
|
36857
38215
|
|
|
36858
38216
|
// src/read.ts
|
|
36859
38217
|
var isTemplateRenderMethod = /* @__PURE__ */ __name((rm) => TemplateRenderMethodValidator.safeParse(rm).success, "isTemplateRenderMethod");
|