@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
|
@@ -1365,10 +1365,10 @@ function $constructor(name, initializer3, params) {
|
|
|
1365
1365
|
let Definition = _Definition;
|
|
1366
1366
|
Object.defineProperty(Definition, "name", { value: name });
|
|
1367
1367
|
function _(def) {
|
|
1368
|
-
var
|
|
1368
|
+
var _a7;
|
|
1369
1369
|
const inst = params?.Parent ? new Definition() : this;
|
|
1370
1370
|
init(inst, def);
|
|
1371
|
-
(
|
|
1371
|
+
(_a7 = inst._zod).deferred ?? (_a7.deferred = []);
|
|
1372
1372
|
for (const fn of inst._zod.deferred) {
|
|
1373
1373
|
fn();
|
|
1374
1374
|
}
|
|
@@ -2034,8 +2034,8 @@ function explicitlyAborted(x, startIndex = 0) {
|
|
|
2034
2034
|
__name(explicitlyAborted, "explicitlyAborted");
|
|
2035
2035
|
function prefixIssues(path, issues) {
|
|
2036
2036
|
return issues.map((iss) => {
|
|
2037
|
-
var
|
|
2038
|
-
(
|
|
2037
|
+
var _a7;
|
|
2038
|
+
(_a7 = iss).path ?? (_a7.path = []);
|
|
2039
2039
|
iss.path.unshift(path);
|
|
2040
2040
|
return iss;
|
|
2041
2041
|
});
|
|
@@ -2238,7 +2238,7 @@ __name(formatError, "formatError");
|
|
|
2238
2238
|
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
2239
2239
|
const result = { errors: [] };
|
|
2240
2240
|
const processError = /* @__PURE__ */ __name((error52, path = []) => {
|
|
2241
|
-
var
|
|
2241
|
+
var _a7, _b;
|
|
2242
2242
|
for (const issue2 of error52.issues) {
|
|
2243
2243
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
2244
2244
|
issue2.errors.map((issues) => processError({ issues }, [...path, ...issue2.path]));
|
|
@@ -2259,7 +2259,7 @@ function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
|
2259
2259
|
const terminal = i === fullpath.length - 1;
|
|
2260
2260
|
if (typeof el === "string") {
|
|
2261
2261
|
curr.properties ?? (curr.properties = {});
|
|
2262
|
-
(
|
|
2262
|
+
(_a7 = curr.properties)[el] ?? (_a7[el] = { errors: [] });
|
|
2263
2263
|
curr = curr.properties[el];
|
|
2264
2264
|
} else {
|
|
2265
2265
|
curr.items ?? (curr.items = []);
|
|
@@ -2564,10 +2564,10 @@ var sha512_base64url = /* @__PURE__ */ fixedBase64url(86);
|
|
|
2564
2564
|
|
|
2565
2565
|
// ../../../node_modules/zod/v4/core/checks.js
|
|
2566
2566
|
var $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
|
|
2567
|
-
var
|
|
2567
|
+
var _a7;
|
|
2568
2568
|
inst._zod ?? (inst._zod = {});
|
|
2569
2569
|
inst._zod.def = def;
|
|
2570
|
-
(
|
|
2570
|
+
(_a7 = inst._zod).onattach ?? (_a7.onattach = []);
|
|
2571
2571
|
});
|
|
2572
2572
|
var numericOriginMap = {
|
|
2573
2573
|
number: "number",
|
|
@@ -2633,8 +2633,8 @@ var $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan",
|
|
|
2633
2633
|
var $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
|
|
2634
2634
|
$ZodCheck.init(inst, def);
|
|
2635
2635
|
inst._zod.onattach.push((inst2) => {
|
|
2636
|
-
var
|
|
2637
|
-
(
|
|
2636
|
+
var _a7;
|
|
2637
|
+
(_a7 = inst2._zod.bag).multipleOf ?? (_a7.multipleOf = def.value);
|
|
2638
2638
|
});
|
|
2639
2639
|
inst._zod.check = (payload) => {
|
|
2640
2640
|
if (typeof payload.value !== typeof def.value)
|
|
@@ -2767,9 +2767,9 @@ var $ZodCheckBigIntFormat = /* @__PURE__ */ $constructor("$ZodCheckBigIntFormat"
|
|
|
2767
2767
|
};
|
|
2768
2768
|
});
|
|
2769
2769
|
var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, def) => {
|
|
2770
|
-
var
|
|
2770
|
+
var _a7;
|
|
2771
2771
|
$ZodCheck.init(inst, def);
|
|
2772
|
-
(
|
|
2772
|
+
(_a7 = inst._zod.def).when ?? (_a7.when = (payload) => {
|
|
2773
2773
|
const val = payload.value;
|
|
2774
2774
|
return !nullish(val) && val.size !== void 0;
|
|
2775
2775
|
});
|
|
@@ -2795,9 +2795,9 @@ var $ZodCheckMaxSize = /* @__PURE__ */ $constructor("$ZodCheckMaxSize", (inst, d
|
|
|
2795
2795
|
};
|
|
2796
2796
|
});
|
|
2797
2797
|
var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, def) => {
|
|
2798
|
-
var
|
|
2798
|
+
var _a7;
|
|
2799
2799
|
$ZodCheck.init(inst, def);
|
|
2800
|
-
(
|
|
2800
|
+
(_a7 = inst._zod.def).when ?? (_a7.when = (payload) => {
|
|
2801
2801
|
const val = payload.value;
|
|
2802
2802
|
return !nullish(val) && val.size !== void 0;
|
|
2803
2803
|
});
|
|
@@ -2823,9 +2823,9 @@ var $ZodCheckMinSize = /* @__PURE__ */ $constructor("$ZodCheckMinSize", (inst, d
|
|
|
2823
2823
|
};
|
|
2824
2824
|
});
|
|
2825
2825
|
var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (inst, def) => {
|
|
2826
|
-
var
|
|
2826
|
+
var _a7;
|
|
2827
2827
|
$ZodCheck.init(inst, def);
|
|
2828
|
-
(
|
|
2828
|
+
(_a7 = inst._zod.def).when ?? (_a7.when = (payload) => {
|
|
2829
2829
|
const val = payload.value;
|
|
2830
2830
|
return !nullish(val) && val.size !== void 0;
|
|
2831
2831
|
});
|
|
@@ -2853,9 +2853,9 @@ var $ZodCheckSizeEquals = /* @__PURE__ */ $constructor("$ZodCheckSizeEquals", (i
|
|
|
2853
2853
|
};
|
|
2854
2854
|
});
|
|
2855
2855
|
var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
|
|
2856
|
-
var
|
|
2856
|
+
var _a7;
|
|
2857
2857
|
$ZodCheck.init(inst, def);
|
|
2858
|
-
(
|
|
2858
|
+
(_a7 = inst._zod.def).when ?? (_a7.when = (payload) => {
|
|
2859
2859
|
const val = payload.value;
|
|
2860
2860
|
return !nullish(val) && val.length !== void 0;
|
|
2861
2861
|
});
|
|
@@ -2882,9 +2882,9 @@ var $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (ins
|
|
|
2882
2882
|
};
|
|
2883
2883
|
});
|
|
2884
2884
|
var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
|
|
2885
|
-
var
|
|
2885
|
+
var _a7;
|
|
2886
2886
|
$ZodCheck.init(inst, def);
|
|
2887
|
-
(
|
|
2887
|
+
(_a7 = inst._zod.def).when ?? (_a7.when = (payload) => {
|
|
2888
2888
|
const val = payload.value;
|
|
2889
2889
|
return !nullish(val) && val.length !== void 0;
|
|
2890
2890
|
});
|
|
@@ -2911,9 +2911,9 @@ var $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (ins
|
|
|
2911
2911
|
};
|
|
2912
2912
|
});
|
|
2913
2913
|
var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
|
|
2914
|
-
var
|
|
2914
|
+
var _a7;
|
|
2915
2915
|
$ZodCheck.init(inst, def);
|
|
2916
|
-
(
|
|
2916
|
+
(_a7 = inst._zod.def).when ?? (_a7.when = (payload) => {
|
|
2917
2917
|
const val = payload.value;
|
|
2918
2918
|
return !nullish(val) && val.length !== void 0;
|
|
2919
2919
|
});
|
|
@@ -2942,7 +2942,7 @@ var $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals"
|
|
|
2942
2942
|
};
|
|
2943
2943
|
});
|
|
2944
2944
|
var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
|
|
2945
|
-
var
|
|
2945
|
+
var _a7, _b;
|
|
2946
2946
|
$ZodCheck.init(inst, def);
|
|
2947
2947
|
inst._zod.onattach.push((inst2) => {
|
|
2948
2948
|
const bag = inst2._zod.bag;
|
|
@@ -2953,7 +2953,7 @@ var $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat"
|
|
|
2953
2953
|
}
|
|
2954
2954
|
});
|
|
2955
2955
|
if (def.pattern)
|
|
2956
|
-
(
|
|
2956
|
+
(_a7 = inst._zod).check ?? (_a7.check = (payload) => {
|
|
2957
2957
|
def.pattern.lastIndex = 0;
|
|
2958
2958
|
if (def.pattern.test(payload.value))
|
|
2959
2959
|
return;
|
|
@@ -3158,7 +3158,7 @@ var version = {
|
|
|
3158
3158
|
|
|
3159
3159
|
// ../../../node_modules/zod/v4/core/schemas.js
|
|
3160
3160
|
var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
3161
|
-
var
|
|
3161
|
+
var _a7;
|
|
3162
3162
|
inst ?? (inst = {});
|
|
3163
3163
|
inst._zod.def = def;
|
|
3164
3164
|
inst._zod.bag = inst._zod.bag || {};
|
|
@@ -3173,7 +3173,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
3173
3173
|
}
|
|
3174
3174
|
}
|
|
3175
3175
|
if (checks.length === 0) {
|
|
3176
|
-
(
|
|
3176
|
+
(_a7 = inst._zod).deferred ?? (_a7.deferred = []);
|
|
3177
3177
|
inst._zod.deferred?.push(() => {
|
|
3178
3178
|
inst._zod.run = inst._zod.parse;
|
|
3179
3179
|
});
|
|
@@ -12564,7 +12564,7 @@ function initializeContext(params) {
|
|
|
12564
12564
|
}
|
|
12565
12565
|
__name(initializeContext, "initializeContext");
|
|
12566
12566
|
function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
12567
|
-
var
|
|
12567
|
+
var _a7;
|
|
12568
12568
|
const def = schema._zod.def;
|
|
12569
12569
|
const seen = ctx.seen.get(schema);
|
|
12570
12570
|
if (seen) {
|
|
@@ -12612,7 +12612,7 @@ function process2(schema, ctx, _params = { path: [], schemaPath: [] }) {
|
|
|
12612
12612
|
delete result.schema.default;
|
|
12613
12613
|
}
|
|
12614
12614
|
if (ctx.io === "input" && "_prefault" in result.schema)
|
|
12615
|
-
(
|
|
12615
|
+
(_a7 = result.schema).default ?? (_a7.default = result.schema._prefault);
|
|
12616
12616
|
delete result.schema._prefault;
|
|
12617
12617
|
const _result = ctx.seen.get(schema);
|
|
12618
12618
|
return _result.schema;
|
|
@@ -15961,7 +15961,7 @@ var __toESM = /* @__PURE__ */ __name((mod, isNodeMode, target) => (target = mod
|
|
|
15961
15961
|
var require_types_cjs_development = __commonJS({
|
|
15962
15962
|
"../learn-card-types/dist/types.cjs.development.cjs"(exports, module2) {
|
|
15963
15963
|
"use strict";
|
|
15964
|
-
var
|
|
15964
|
+
var _a8, _b, _c, _d, _e, _f, _g;
|
|
15965
15965
|
var __defProp22 = Object.defineProperty;
|
|
15966
15966
|
var __getOwnPropDesc22 = Object.getOwnPropertyDescriptor;
|
|
15967
15967
|
var __getOwnPropNames22 = Object.getOwnPropertyNames;
|
|
@@ -15982,12 +15982,15 @@ var require_types_cjs_development = __commonJS({
|
|
|
15982
15982
|
var __toCommonJS2 = /* @__PURE__ */ __name2((mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod), "__toCommonJS");
|
|
15983
15983
|
var index_exports2 = {};
|
|
15984
15984
|
__export22(index_exports2, {
|
|
15985
|
+
ACT_AS_HEADER: /* @__PURE__ */ __name2(() => ACT_AS_HEADER, "ACT_AS_HEADER"),
|
|
15985
15986
|
AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX: /* @__PURE__ */ __name2(() => AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX2, "AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX"),
|
|
15986
15987
|
AchievementCredentialValidator: /* @__PURE__ */ __name2(() => AchievementCredentialValidator2, "AchievementCredentialValidator"),
|
|
15987
15988
|
AchievementCriteriaValidator: /* @__PURE__ */ __name2(() => AchievementCriteriaValidator2, "AchievementCriteriaValidator"),
|
|
15988
15989
|
AchievementSubjectValidator: /* @__PURE__ */ __name2(() => AchievementSubjectValidator2, "AchievementSubjectValidator"),
|
|
15989
15990
|
AchievementTypeValidator: /* @__PURE__ */ __name2(() => AchievementTypeValidator2, "AchievementTypeValidator"),
|
|
15990
15991
|
AchievementValidator: /* @__PURE__ */ __name2(() => AchievementValidator2, "AchievementValidator"),
|
|
15992
|
+
AcknowledgeViewInputValidator: /* @__PURE__ */ __name2(() => AcknowledgeViewInputValidator2, "AcknowledgeViewInputValidator"),
|
|
15993
|
+
AcknowledgeViewOutputValidator: /* @__PURE__ */ __name2(() => AcknowledgeViewOutputValidator2, "AcknowledgeViewOutputValidator"),
|
|
15991
15994
|
AddTagInputValidator: /* @__PURE__ */ __name2(() => AddTagInputValidator2, "AddTagInputValidator"),
|
|
15992
15995
|
AddressValidator: /* @__PURE__ */ __name2(() => AddressValidator2, "AddressValidator"),
|
|
15993
15996
|
AgeRatingValidator: /* @__PURE__ */ __name2(() => AgeRatingValidator2, "AgeRatingValidator"),
|
|
@@ -16065,6 +16068,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
16065
16068
|
CreateContactMethodSessionValidator: /* @__PURE__ */ __name2(() => CreateContactMethodSessionValidator2, "CreateContactMethodSessionValidator"),
|
|
16066
16069
|
CreateManagedFrameworkBatchInputValidator: /* @__PURE__ */ __name2(() => CreateManagedFrameworkBatchInputValidator2, "CreateManagedFrameworkBatchInputValidator"),
|
|
16067
16070
|
CreateManagedFrameworkInputValidator: /* @__PURE__ */ __name2(() => CreateManagedFrameworkInputValidator2, "CreateManagedFrameworkInputValidator"),
|
|
16071
|
+
CreateShareLinkInputValidator: /* @__PURE__ */ __name2(() => CreateShareLinkInputValidator2, "CreateShareLinkInputValidator"),
|
|
16068
16072
|
CreateSkillInputValidator: /* @__PURE__ */ __name2(() => CreateSkillInputValidator2, "CreateSkillInputValidator"),
|
|
16069
16073
|
CreateSkillsBatchInputValidator: /* @__PURE__ */ __name2(() => CreateSkillsBatchInputValidator2, "CreateSkillsBatchInputValidator"),
|
|
16070
16074
|
CredentialActivityEventTypeValidator: /* @__PURE__ */ __name2(() => CredentialActivityEventTypeValidator2, "CredentialActivityEventTypeValidator"),
|
|
@@ -16096,10 +16100,14 @@ var require_types_cjs_development = __commonJS({
|
|
|
16096
16100
|
DeleteSkillInputValidator: /* @__PURE__ */ __name2(() => DeleteSkillInputValidator2, "DeleteSkillInputValidator"),
|
|
16097
16101
|
DidDocumentValidator: /* @__PURE__ */ __name2(() => DidDocumentValidator2, "DidDocumentValidator"),
|
|
16098
16102
|
EMPTY_IN_APP_MESSAGES_FLAG: /* @__PURE__ */ __name2(() => EMPTY_IN_APP_MESSAGES_FLAG, "EMPTY_IN_APP_MESSAGES_FLAG"),
|
|
16103
|
+
ESCROW_PIN_LOCKED_MESSAGE: /* @__PURE__ */ __name2(() => ESCROW_PIN_LOCKED_MESSAGE, "ESCROW_PIN_LOCKED_MESSAGE"),
|
|
16104
|
+
ESCROW_PIN_MISMATCH_PATTERN: /* @__PURE__ */ __name2(() => ESCROW_PIN_MISMATCH_PATTERN, "ESCROW_PIN_MISMATCH_PATTERN"),
|
|
16105
|
+
ESCROW_PIN_UNAVAILABLE_MESSAGE: /* @__PURE__ */ __name2(() => ESCROW_PIN_UNAVAILABLE_MESSAGE, "ESCROW_PIN_UNAVAILABLE_MESSAGE"),
|
|
16099
16106
|
EncryptedCredentialRecordValidator: /* @__PURE__ */ __name2(() => EncryptedCredentialRecordValidator2, "EncryptedCredentialRecordValidator"),
|
|
16100
16107
|
EncryptedRecordValidator: /* @__PURE__ */ __name2(() => EncryptedRecordValidator2, "EncryptedRecordValidator"),
|
|
16101
16108
|
EndorsementCredentialValidator: /* @__PURE__ */ __name2(() => EndorsementCredentialValidator2, "EndorsementCredentialValidator"),
|
|
16102
16109
|
EndorsementSubjectValidator: /* @__PURE__ */ __name2(() => EndorsementSubjectValidator2, "EndorsementSubjectValidator"),
|
|
16110
|
+
EscrowPinStatusValidator: /* @__PURE__ */ __name2(() => EscrowPinStatusValidator2, "EscrowPinStatusValidator"),
|
|
16103
16111
|
EvidenceValidator: /* @__PURE__ */ __name2(() => EvidenceValidator2, "EvidenceValidator"),
|
|
16104
16112
|
FlatAuthGrantValidator: /* @__PURE__ */ __name2(() => FlatAuthGrantValidator2, "FlatAuthGrantValidator"),
|
|
16105
16113
|
FrameworkWithSkillsValidator: /* @__PURE__ */ __name2(() => FrameworkWithSkillsValidator2, "FrameworkWithSkillsValidator"),
|
|
@@ -16121,10 +16129,18 @@ var require_types_cjs_development = __commonJS({
|
|
|
16121
16129
|
IdentifierTypeValidator: /* @__PURE__ */ __name2(() => IdentifierTypeValidator2, "IdentifierTypeValidator"),
|
|
16122
16130
|
IdentityObjectValidator: /* @__PURE__ */ __name2(() => IdentityObjectValidator2, "IdentityObjectValidator"),
|
|
16123
16131
|
ImageValidator: /* @__PURE__ */ __name2(() => ImageValidator2, "ImageValidator"),
|
|
16132
|
+
InboxBatchErrorReasonValidator: /* @__PURE__ */ __name2(() => InboxBatchErrorReasonValidator2, "InboxBatchErrorReasonValidator"),
|
|
16133
|
+
InboxBatchReceiptValidator: /* @__PURE__ */ __name2(() => InboxBatchReceiptValidator2, "InboxBatchReceiptValidator"),
|
|
16134
|
+
InboxBatchStatusValidator: /* @__PURE__ */ __name2(() => InboxBatchStatusValidator2, "InboxBatchStatusValidator"),
|
|
16124
16135
|
InboxCredentialQueryValidator: /* @__PURE__ */ __name2(() => InboxCredentialQueryValidator2, "InboxCredentialQueryValidator"),
|
|
16136
|
+
InboxCredentialRefreshReceiptValidator: /* @__PURE__ */ __name2(() => InboxCredentialRefreshReceiptValidator2, "InboxCredentialRefreshReceiptValidator"),
|
|
16125
16137
|
InboxCredentialValidator: /* @__PURE__ */ __name2(() => InboxCredentialValidator2, "InboxCredentialValidator"),
|
|
16126
16138
|
IncrementCounterEventValidator: /* @__PURE__ */ __name2(() => IncrementCounterEventValidator2, "IncrementCounterEventValidator"),
|
|
16127
16139
|
InstalledAppValidator: /* @__PURE__ */ __name2(() => InstalledAppValidator2, "InstalledAppValidator"),
|
|
16140
|
+
IssueInboxCredentialBatchItemResultValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialBatchItemResultValidator2, "IssueInboxCredentialBatchItemResultValidator"),
|
|
16141
|
+
IssueInboxCredentialBatchItemValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialBatchItemValidator2, "IssueInboxCredentialBatchItemValidator"),
|
|
16142
|
+
IssueInboxCredentialBatchResponseValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialBatchResponseValidator2, "IssueInboxCredentialBatchResponseValidator"),
|
|
16143
|
+
IssueInboxCredentialBatchValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialBatchValidator2, "IssueInboxCredentialBatchValidator"),
|
|
16128
16144
|
IssueInboxCredentialResponseValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialResponseValidator2, "IssueInboxCredentialResponseValidator"),
|
|
16129
16145
|
IssueInboxCredentialValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialValidator2, "IssueInboxCredentialValidator"),
|
|
16130
16146
|
IssueInboxSigningAuthorityValidator: /* @__PURE__ */ __name2(() => IssueInboxSigningAuthorityValidator2, "IssueInboxSigningAuthorityValidator"),
|
|
@@ -16173,6 +16189,15 @@ var require_types_cjs_development = __commonJS({
|
|
|
16173
16189
|
LaunchTypeValidator: /* @__PURE__ */ __name2(() => LaunchTypeValidator2, "LaunchTypeValidator"),
|
|
16174
16190
|
LearnCardRefreshAuthorizationValidator: /* @__PURE__ */ __name2(() => LearnCardRefreshAuthorizationValidator2, "LearnCardRefreshAuthorizationValidator"),
|
|
16175
16191
|
LinkProviderFrameworkInputValidator: /* @__PURE__ */ __name2(() => LinkProviderFrameworkInputValidator2, "LinkProviderFrameworkInputValidator"),
|
|
16192
|
+
ListShareLinksInputValidator: /* @__PURE__ */ __name2(() => ListShareLinksInputValidator2, "ListShareLinksInputValidator"),
|
|
16193
|
+
MAX_ENDORSEMENTS: /* @__PURE__ */ __name2(() => MAX_ENDORSEMENTS2, "MAX_ENDORSEMENTS"),
|
|
16194
|
+
MAX_SELECTED_CREDENTIALS: /* @__PURE__ */ __name2(() => MAX_SELECTED_CREDENTIALS2, "MAX_SELECTED_CREDENTIALS"),
|
|
16195
|
+
MAX_SHARE_CIPHERTEXT_BYTES: /* @__PURE__ */ __name2(() => MAX_SHARE_CIPHERTEXT_BYTES2, "MAX_SHARE_CIPHERTEXT_BYTES"),
|
|
16196
|
+
MAX_SHARE_LINK_REQUEST_BYTES: /* @__PURE__ */ __name2(() => MAX_SHARE_LINK_REQUEST_BYTES2, "MAX_SHARE_LINK_REQUEST_BYTES"),
|
|
16197
|
+
MAX_SHARE_RECOVERY_JWE_BYTES: /* @__PURE__ */ __name2(() => MAX_SHARE_RECOVERY_JWE_BYTES2, "MAX_SHARE_RECOVERY_JWE_BYTES"),
|
|
16198
|
+
MAX_SHARE_SOURCE_URI_CHARS: /* @__PURE__ */ __name2(() => MAX_SHARE_SOURCE_URI_CHARS2, "MAX_SHARE_SOURCE_URI_CHARS"),
|
|
16199
|
+
MAX_VP_MEMBERS: /* @__PURE__ */ __name2(() => MAX_VP_MEMBERS2, "MAX_VP_MEMBERS"),
|
|
16200
|
+
ManagedCredentialRefreshReceiptValidator: /* @__PURE__ */ __name2(() => ManagedCredentialRefreshReceiptValidator2, "ManagedCredentialRefreshReceiptValidator"),
|
|
16176
16201
|
ManagedCredentialRefreshServiceValidator: /* @__PURE__ */ __name2(() => ManagedCredentialRefreshServiceValidator2, "ManagedCredentialRefreshServiceValidator"),
|
|
16177
16202
|
PaginatedAppStoreListingsValidator: /* @__PURE__ */ __name2(() => PaginatedAppStoreListingsValidator2, "PaginatedAppStoreListingsValidator"),
|
|
16178
16203
|
PaginatedBoostRecipientsValidator: /* @__PURE__ */ __name2(() => PaginatedBoostRecipientsValidator2, "PaginatedBoostRecipientsValidator"),
|
|
@@ -16194,11 +16219,14 @@ var require_types_cjs_development = __commonJS({
|
|
|
16194
16219
|
PaginatedLCNProfileManagersValidator: /* @__PURE__ */ __name2(() => PaginatedLCNProfileManagersValidator2, "PaginatedLCNProfileManagersValidator"),
|
|
16195
16220
|
PaginatedLCNProfilesAndManagersValidator: /* @__PURE__ */ __name2(() => PaginatedLCNProfilesAndManagersValidator2, "PaginatedLCNProfilesAndManagersValidator"),
|
|
16196
16221
|
PaginatedLCNProfilesValidator: /* @__PURE__ */ __name2(() => PaginatedLCNProfilesValidator2, "PaginatedLCNProfilesValidator"),
|
|
16222
|
+
PaginatedShareLinksValidator: /* @__PURE__ */ __name2(() => PaginatedShareLinksValidator2, "PaginatedShareLinksValidator"),
|
|
16197
16223
|
PaginatedSkillFrameworksValidator: /* @__PURE__ */ __name2(() => PaginatedSkillFrameworksValidator2, "PaginatedSkillFrameworksValidator"),
|
|
16198
16224
|
PaginatedSkillTreeValidator: /* @__PURE__ */ __name2(() => PaginatedSkillTreeValidator2, "PaginatedSkillTreeValidator"),
|
|
16199
16225
|
PaginatedVisibleLCNProfilesValidator: /* @__PURE__ */ __name2(() => PaginatedVisibleLCNProfilesValidator2, "PaginatedVisibleLCNProfilesValidator"),
|
|
16200
16226
|
PaginationOptionsValidator: /* @__PURE__ */ __name2(() => PaginationOptionsValidator2, "PaginationOptionsValidator"),
|
|
16201
16227
|
PaginationResponseValidator: /* @__PURE__ */ __name2(() => PaginationResponseValidator2, "PaginationResponseValidator"),
|
|
16228
|
+
PrepareRefreshableSendInputValidator: /* @__PURE__ */ __name2(() => PrepareRefreshableSendInputValidator2, "PrepareRefreshableSendInputValidator"),
|
|
16229
|
+
PrepareRefreshableSendResultValidator: /* @__PURE__ */ __name2(() => PrepareRefreshableSendResultValidator2, "PrepareRefreshableSendResultValidator"),
|
|
16202
16230
|
ProfileValidator: /* @__PURE__ */ __name2(() => ProfileValidator2, "ProfileValidator"),
|
|
16203
16231
|
ProfileVisibilityEnum: /* @__PURE__ */ __name2(() => ProfileVisibilityEnum2, "ProfileVisibilityEnum"),
|
|
16204
16232
|
PromotionLevelValidator: /* @__PURE__ */ __name2(() => PromotionLevelValidator2, "PromotionLevelValidator"),
|
|
@@ -16216,14 +16244,24 @@ var require_types_cjs_development = __commonJS({
|
|
|
16216
16244
|
ReplaceSkillFrameworkSkillsInputValidator: /* @__PURE__ */ __name2(() => ReplaceSkillFrameworkSkillsInputValidator2, "ReplaceSkillFrameworkSkillsInputValidator"),
|
|
16217
16245
|
ReplaceSkillFrameworkSkillsResultValidator: /* @__PURE__ */ __name2(() => ReplaceSkillFrameworkSkillsResultValidator2, "ReplaceSkillFrameworkSkillsResultValidator"),
|
|
16218
16246
|
RequestLearnerContextEventValidator: /* @__PURE__ */ __name2(() => RequestLearnerContextEventValidator2, "RequestLearnerContextEventValidator"),
|
|
16247
|
+
ResolveShareLinkInputValidator: /* @__PURE__ */ __name2(() => ResolveShareLinkInputValidator2, "ResolveShareLinkInputValidator"),
|
|
16219
16248
|
ResultDescriptionValidator: /* @__PURE__ */ __name2(() => ResultDescriptionValidator2, "ResultDescriptionValidator"),
|
|
16220
16249
|
ResultStatusTypeValidator: /* @__PURE__ */ __name2(() => ResultStatusTypeValidator2, "ResultStatusTypeValidator"),
|
|
16221
16250
|
ResultTypeValidator: /* @__PURE__ */ __name2(() => ResultTypeValidator2, "ResultTypeValidator"),
|
|
16222
16251
|
ResultValidator: /* @__PURE__ */ __name2(() => ResultValidator2, "ResultValidator"),
|
|
16223
16252
|
RubricCriterionValidator: /* @__PURE__ */ __name2(() => RubricCriterionValidator2, "RubricCriterionValidator"),
|
|
16253
|
+
SHARE_AAD_PREFIX: /* @__PURE__ */ __name2(() => SHARE_AAD_PREFIX, "SHARE_AAD_PREFIX"),
|
|
16254
|
+
SHARE_CONTENT_KEY_BYTES: /* @__PURE__ */ __name2(() => SHARE_CONTENT_KEY_BYTES2, "SHARE_CONTENT_KEY_BYTES"),
|
|
16255
|
+
SHARE_IV_BYTES: /* @__PURE__ */ __name2(() => SHARE_IV_BYTES2, "SHARE_IV_BYTES"),
|
|
16256
|
+
SHARE_LINK_ID_BYTES: /* @__PURE__ */ __name2(() => SHARE_LINK_ID_BYTES2, "SHARE_LINK_ID_BYTES"),
|
|
16257
|
+
SHARE_LINK_PROTOCOL: /* @__PURE__ */ __name2(() => SHARE_LINK_PROTOCOL2, "SHARE_LINK_PROTOCOL"),
|
|
16258
|
+
SHARE_RECOVERY_PROTOCOL: /* @__PURE__ */ __name2(() => SHARE_RECOVERY_PROTOCOL2, "SHARE_RECOVERY_PROTOCOL"),
|
|
16259
|
+
SHARE_TAG_BYTES: /* @__PURE__ */ __name2(() => SHARE_TAG_BYTES2, "SHARE_TAG_BYTES"),
|
|
16260
|
+
SHARE_VIEW_RECEIPT_TTL_SECONDS: /* @__PURE__ */ __name2(() => SHARE_VIEW_RECEIPT_TTL_SECONDS2, "SHARE_VIEW_RECEIPT_TTL_SECONDS"),
|
|
16224
16261
|
SendAiSessionCredentialEventValidator: /* @__PURE__ */ __name2(() => SendAiSessionCredentialEventValidator2, "SendAiSessionCredentialEventValidator"),
|
|
16225
16262
|
SendBoostInputValidator: /* @__PURE__ */ __name2(() => SendBoostInputValidator2, "SendBoostInputValidator"),
|
|
16226
16263
|
SendBoostResponseValidator: /* @__PURE__ */ __name2(() => SendBoostResponseValidator2, "SendBoostResponseValidator"),
|
|
16264
|
+
SendBoostTemplateValidator: /* @__PURE__ */ __name2(() => SendBoostTemplateValidator2, "SendBoostTemplateValidator"),
|
|
16227
16265
|
SendBrandingOptionsValidator: /* @__PURE__ */ __name2(() => SendBrandingOptionsValidator2, "SendBrandingOptionsValidator"),
|
|
16228
16266
|
SendCredentialEventValidator: /* @__PURE__ */ __name2(() => SendCredentialEventValidator2, "SendCredentialEventValidator"),
|
|
16229
16267
|
SendInboxResponseValidator: /* @__PURE__ */ __name2(() => SendInboxResponseValidator2, "SendInboxResponseValidator"),
|
|
@@ -16234,6 +16272,32 @@ var require_types_cjs_development = __commonJS({
|
|
|
16234
16272
|
SentCredentialInfoValidator: /* @__PURE__ */ __name2(() => SentCredentialInfoValidator2, "SentCredentialInfoValidator"),
|
|
16235
16273
|
ServiceValidator: /* @__PURE__ */ __name2(() => ServiceValidator2, "ServiceValidator"),
|
|
16236
16274
|
SetPrimaryContactMethodValidator: /* @__PURE__ */ __name2(() => SetPrimaryContactMethodValidator2, "SetPrimaryContactMethodValidator"),
|
|
16275
|
+
ShareCiphertextValidator: /* @__PURE__ */ __name2(() => ShareCiphertextValidator2, "ShareCiphertextValidator"),
|
|
16276
|
+
ShareContentKeyValidator: /* @__PURE__ */ __name2(() => ShareContentKeyValidator2, "ShareContentKeyValidator"),
|
|
16277
|
+
ShareContentStateValidator: /* @__PURE__ */ __name2(() => ShareContentStateValidator2, "ShareContentStateValidator"),
|
|
16278
|
+
ShareEndorsementEntryValidator: /* @__PURE__ */ __name2(() => ShareEndorsementEntryValidator2, "ShareEndorsementEntryValidator"),
|
|
16279
|
+
ShareEnvelopeValidator: /* @__PURE__ */ __name2(() => ShareEnvelopeValidator2, "ShareEnvelopeValidator"),
|
|
16280
|
+
ShareIvValidator: /* @__PURE__ */ __name2(() => ShareIvValidator2, "ShareIvValidator"),
|
|
16281
|
+
ShareLinkIdInputValidator: /* @__PURE__ */ __name2(() => ShareLinkIdInputValidator2, "ShareLinkIdInputValidator"),
|
|
16282
|
+
ShareLinkIdValidator: /* @__PURE__ */ __name2(() => ShareLinkIdValidator2, "ShareLinkIdValidator"),
|
|
16283
|
+
ShareLinkOperationKeyInputValidator: /* @__PURE__ */ __name2(() => ShareLinkOperationKeyInputValidator2, "ShareLinkOperationKeyInputValidator"),
|
|
16284
|
+
ShareLinkOwnerCommitOutputValidator: /* @__PURE__ */ __name2(() => ShareLinkOwnerCommitOutputValidator2, "ShareLinkOwnerCommitOutputValidator"),
|
|
16285
|
+
ShareLinkOwnerContentOutputValidator: /* @__PURE__ */ __name2(() => ShareLinkOwnerContentOutputValidator2, "ShareLinkOwnerContentOutputValidator"),
|
|
16286
|
+
ShareLinkOwnerRecoveryOutputValidator: /* @__PURE__ */ __name2(() => ShareLinkOwnerRecoveryOutputValidator2, "ShareLinkOwnerRecoveryOutputValidator"),
|
|
16287
|
+
ShareLinkOwnerStatusOutputValidator: /* @__PURE__ */ __name2(() => ShareLinkOwnerStatusOutputValidator2, "ShareLinkOwnerStatusOutputValidator"),
|
|
16288
|
+
ShareLinkPublicContentViewValidator: /* @__PURE__ */ __name2(() => ShareLinkPublicContentViewValidator2, "ShareLinkPublicContentViewValidator"),
|
|
16289
|
+
ShareLinkPublicStateValidator: /* @__PURE__ */ __name2(() => ShareLinkPublicStateValidator2, "ShareLinkPublicStateValidator"),
|
|
16290
|
+
ShareLinkStatusValidator: /* @__PURE__ */ __name2(() => ShareLinkStatusValidator2, "ShareLinkStatusValidator"),
|
|
16291
|
+
ShareLinkValidator: /* @__PURE__ */ __name2(() => ShareLinkValidator2, "ShareLinkValidator"),
|
|
16292
|
+
ShareManifestPresentationValidator: /* @__PURE__ */ __name2(() => ShareManifestPresentationValidator2, "ShareManifestPresentationValidator"),
|
|
16293
|
+
ShareOwnerRecoveryValidator: /* @__PURE__ */ __name2(() => ShareOwnerRecoveryValidator2, "ShareOwnerRecoveryValidator"),
|
|
16294
|
+
SharePayloadValidator: /* @__PURE__ */ __name2(() => SharePayloadValidator2, "SharePayloadValidator"),
|
|
16295
|
+
SharePayloadValidatorShape: /* @__PURE__ */ __name2(() => SharePayloadValidatorShape2, "SharePayloadValidatorShape"),
|
|
16296
|
+
ShareRecoveryEndorsementValidator: /* @__PURE__ */ __name2(() => ShareRecoveryEndorsementValidator2, "ShareRecoveryEndorsementValidator"),
|
|
16297
|
+
ShareRecoveryPlaintextValidator: /* @__PURE__ */ __name2(() => ShareRecoveryPlaintextValidator2, "ShareRecoveryPlaintextValidator"),
|
|
16298
|
+
ShareRecoverySelectionValidator: /* @__PURE__ */ __name2(() => ShareRecoverySelectionValidator2, "ShareRecoverySelectionValidator"),
|
|
16299
|
+
ShareSelectionEntryValidator: /* @__PURE__ */ __name2(() => ShareSelectionEntryValidator2, "ShareSelectionEntryValidator"),
|
|
16300
|
+
ShareSharerValidator: /* @__PURE__ */ __name2(() => ShareSharerValidator2, "ShareSharerValidator"),
|
|
16237
16301
|
SkillDeletionStrategyValidator: /* @__PURE__ */ __name2(() => SkillDeletionStrategyValidator2, "SkillDeletionStrategyValidator"),
|
|
16238
16302
|
SkillFrameworkAdminInputValidator: /* @__PURE__ */ __name2(() => SkillFrameworkAdminInputValidator2, "SkillFrameworkAdminInputValidator"),
|
|
16239
16303
|
SkillFrameworkAdminsValidator: /* @__PURE__ */ __name2(() => SkillFrameworkAdminsValidator2, "SkillFrameworkAdminsValidator"),
|
|
@@ -16265,6 +16329,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
16265
16329
|
UnsignedVCValidator: /* @__PURE__ */ __name2(() => UnsignedVCValidator2, "UnsignedVCValidator"),
|
|
16266
16330
|
UnsignedVPValidator: /* @__PURE__ */ __name2(() => UnsignedVPValidator2, "UnsignedVPValidator"),
|
|
16267
16331
|
UpdateFrameworkInputValidator: /* @__PURE__ */ __name2(() => UpdateFrameworkInputValidator2, "UpdateFrameworkInputValidator"),
|
|
16332
|
+
UpdateShareLinkInputValidator: /* @__PURE__ */ __name2(() => UpdateShareLinkInputValidator2, "UpdateShareLinkInputValidator"),
|
|
16268
16333
|
UpdateSkillInputValidator: /* @__PURE__ */ __name2(() => UpdateSkillInputValidator2, "UpdateSkillInputValidator"),
|
|
16269
16334
|
VC2EvidenceValidator: /* @__PURE__ */ __name2(() => VC2EvidenceValidator2, "VC2EvidenceValidator"),
|
|
16270
16335
|
VCValidator: /* @__PURE__ */ __name2(() => VCValidator2, "VCValidator"),
|
|
@@ -16276,7 +16341,12 @@ var require_types_cjs_development = __commonJS({
|
|
|
16276
16341
|
VerificationStatusValidator: /* @__PURE__ */ __name2(() => VerificationStatusValidator2, "VerificationStatusValidator"),
|
|
16277
16342
|
appStoreActionValidator: /* @__PURE__ */ __name2(() => appStoreActionValidator2, "appStoreActionValidator"),
|
|
16278
16343
|
capgoUpdateActionValidator: /* @__PURE__ */ __name2(() => capgoUpdateActionValidator2, "capgoUpdateActionValidator"),
|
|
16344
|
+
classifyShareManifest: /* @__PURE__ */ __name2(() => classifyShareManifest2, "classifyShareManifest"),
|
|
16345
|
+
decodeBase64Url: /* @__PURE__ */ __name2(() => decodeBase64Url2, "decodeBase64Url"),
|
|
16346
|
+
decodedBase64UrlByteLength: /* @__PURE__ */ __name2(() => decodedBase64UrlByteLength, "decodedBase64UrlByteLength"),
|
|
16279
16347
|
dismissActionValidator: /* @__PURE__ */ __name2(() => dismissActionValidator2, "dismissActionValidator"),
|
|
16348
|
+
encodeBase64Url: /* @__PURE__ */ __name2(() => encodeBase64Url2, "encodeBase64Url"),
|
|
16349
|
+
escrowPinMismatchMessage: /* @__PURE__ */ __name2(() => escrowPinMismatchMessage, "escrowPinMismatchMessage"),
|
|
16280
16350
|
externalLinkActionValidator: /* @__PURE__ */ __name2(() => externalLinkActionValidator2, "externalLinkActionValidator"),
|
|
16281
16351
|
inAppMessageActionStyleValidator: /* @__PURE__ */ __name2(() => inAppMessageActionStyleValidator2, "inAppMessageActionStyleValidator"),
|
|
16282
16352
|
inAppMessageActionTargetValidator: /* @__PURE__ */ __name2(() => inAppMessageActionTargetValidator2, "inAppMessageActionTargetValidator"),
|
|
@@ -16291,10 +16361,12 @@ var require_types_cjs_development = __commonJS({
|
|
|
16291
16361
|
inAppMessageVersionSourceValidator: /* @__PURE__ */ __name2(() => inAppMessageVersionSourceValidator2, "inAppMessageVersionSourceValidator"),
|
|
16292
16362
|
inAppMessagesFlagValidator: /* @__PURE__ */ __name2(() => inAppMessagesFlagValidator2, "inAppMessagesFlagValidator"),
|
|
16293
16363
|
internalLinkActionValidator: /* @__PURE__ */ __name2(() => internalLinkActionValidator2, "internalLinkActionValidator"),
|
|
16364
|
+
isCanonicalBase64Url: /* @__PURE__ */ __name2(() => isCanonicalBase64Url2, "isCanonicalBase64Url"),
|
|
16294
16365
|
isStoredCredentialEnvelope: /* @__PURE__ */ __name2(() => isStoredCredentialEnvelope2, "isStoredCredentialEnvelope"),
|
|
16295
16366
|
parseInAppMessagesFlag: /* @__PURE__ */ __name2(() => parseInAppMessagesFlag, "parseInAppMessagesFlag"),
|
|
16296
16367
|
platformPredicateValidator: /* @__PURE__ */ __name2(() => platformPredicateValidator2, "platformPredicateValidator"),
|
|
16297
16368
|
rolePredicateValidator: /* @__PURE__ */ __name2(() => rolePredicateValidator2, "rolePredicateValidator"),
|
|
16369
|
+
utf8ByteLength: /* @__PURE__ */ __name2(() => utf8ByteLength2, "utf8ByteLength"),
|
|
16298
16370
|
versionPredicateValidator: /* @__PURE__ */ __name2(() => versionPredicateValidator2, "versionPredicateValidator")
|
|
16299
16371
|
});
|
|
16300
16372
|
module2.exports = __toCommonJS2(index_exports2);
|
|
@@ -16816,7 +16888,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
16816
16888
|
util: /* @__PURE__ */ __name2(() => util_exports2, "util"),
|
|
16817
16889
|
version: /* @__PURE__ */ __name2(() => version3, "version")
|
|
16818
16890
|
});
|
|
16819
|
-
var
|
|
16891
|
+
var _a7;
|
|
16820
16892
|
var NEVER2 = /* @__PURE__ */ Object.freeze({
|
|
16821
16893
|
status: "aborted"
|
|
16822
16894
|
});
|
|
@@ -16886,18 +16958,18 @@ var require_types_cjs_development = __commonJS({
|
|
|
16886
16958
|
__name2($constructor2, "$constructor");
|
|
16887
16959
|
__name22($constructor2, "$constructor");
|
|
16888
16960
|
var $brand2 = /* @__PURE__ */ Symbol("zod_brand");
|
|
16889
|
-
var $ZodAsyncError2 = (
|
|
16961
|
+
var $ZodAsyncError2 = (_a8 = class extends Error {
|
|
16890
16962
|
constructor() {
|
|
16891
16963
|
super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
|
|
16892
16964
|
}
|
|
16893
|
-
}, __name(
|
|
16965
|
+
}, __name(_a8, "$ZodAsyncError"), __name2(_a8, "$ZodAsyncError"), __name22(_a8, "$ZodAsyncError"), _a8);
|
|
16894
16966
|
var $ZodEncodeError2 = (_b = class extends Error {
|
|
16895
16967
|
constructor(name) {
|
|
16896
16968
|
super(`Encountered unidirectional transform during encode: ${name}`);
|
|
16897
16969
|
this.name = "ZodEncodeError";
|
|
16898
16970
|
}
|
|
16899
16971
|
}, __name(_b, "$ZodEncodeError"), __name2(_b, "$ZodEncodeError"), __name22(_b, "$ZodEncodeError"), _b);
|
|
16900
|
-
(
|
|
16972
|
+
(_a7 = globalThis).__zod_globalConfig ?? (_a7.__zod_globalConfig = {});
|
|
16901
16973
|
var globalConfig2 = globalThis.__zod_globalConfig;
|
|
16902
16974
|
function config2(newConfig) {
|
|
16903
16975
|
if (newConfig)
|
|
@@ -16943,7 +17015,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
16943
17015
|
getSizableOrigin: /* @__PURE__ */ __name2(() => getSizableOrigin2, "getSizableOrigin"),
|
|
16944
17016
|
hexToUint8Array: /* @__PURE__ */ __name2(() => hexToUint8Array2, "hexToUint8Array"),
|
|
16945
17017
|
isObject: /* @__PURE__ */ __name2(() => isObject2, "isObject"),
|
|
16946
|
-
isPlainObject: /* @__PURE__ */ __name2(() =>
|
|
17018
|
+
isPlainObject: /* @__PURE__ */ __name2(() => isPlainObject22, "isPlainObject"),
|
|
16947
17019
|
issue: /* @__PURE__ */ __name2(() => issue2, "issue"),
|
|
16948
17020
|
joinValues: /* @__PURE__ */ __name2(() => joinValues2, "joinValues"),
|
|
16949
17021
|
jsonStringifyReplacer: /* @__PURE__ */ __name2(() => jsonStringifyReplacer2, "jsonStringifyReplacer"),
|
|
@@ -17192,7 +17264,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
17192
17264
|
return false;
|
|
17193
17265
|
}
|
|
17194
17266
|
});
|
|
17195
|
-
function
|
|
17267
|
+
function isPlainObject22(o) {
|
|
17196
17268
|
if (isObject2(o) === false)
|
|
17197
17269
|
return false;
|
|
17198
17270
|
const ctor = o.constructor;
|
|
@@ -17208,11 +17280,11 @@ var require_types_cjs_development = __commonJS({
|
|
|
17208
17280
|
}
|
|
17209
17281
|
return true;
|
|
17210
17282
|
}
|
|
17211
|
-
__name(
|
|
17212
|
-
__name2(
|
|
17213
|
-
__name22(
|
|
17283
|
+
__name(isPlainObject22, "isPlainObject2");
|
|
17284
|
+
__name2(isPlainObject22, "isPlainObject");
|
|
17285
|
+
__name22(isPlainObject22, "isPlainObject");
|
|
17214
17286
|
function shallowClone2(o) {
|
|
17215
|
-
if (
|
|
17287
|
+
if (isPlainObject22(o))
|
|
17216
17288
|
return { ...o };
|
|
17217
17289
|
if (Array.isArray(o))
|
|
17218
17290
|
return [...o];
|
|
@@ -17446,7 +17518,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
17446
17518
|
__name2(omit2, "omit");
|
|
17447
17519
|
__name22(omit2, "omit");
|
|
17448
17520
|
function extend2(schema, shape) {
|
|
17449
|
-
if (!
|
|
17521
|
+
if (!isPlainObject22(shape)) {
|
|
17450
17522
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
17451
17523
|
}
|
|
17452
17524
|
const checks = schema._zod.def.checks;
|
|
@@ -17472,7 +17544,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
17472
17544
|
__name2(extend2, "extend");
|
|
17473
17545
|
__name22(extend2, "extend");
|
|
17474
17546
|
function safeExtend2(schema, shape) {
|
|
17475
|
-
if (!
|
|
17547
|
+
if (!isPlainObject22(shape)) {
|
|
17476
17548
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
17477
17549
|
}
|
|
17478
17550
|
const def = mergeDefs2(schema._zod.def, {
|
|
@@ -19928,7 +20000,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
19928
20000
|
if (a instanceof Date && b instanceof Date && +a === +b) {
|
|
19929
20001
|
return { valid: true, data: a };
|
|
19930
20002
|
}
|
|
19931
|
-
if (
|
|
20003
|
+
if (isPlainObject22(a) && isPlainObject22(b)) {
|
|
19932
20004
|
const bKeys = Object.keys(b);
|
|
19933
20005
|
const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
|
|
19934
20006
|
const newObj = { ...a, ...b };
|
|
@@ -20129,7 +20201,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
20129
20201
|
$ZodType2.init(inst, def);
|
|
20130
20202
|
inst._zod.parse = (payload, ctx) => {
|
|
20131
20203
|
const input = payload.value;
|
|
20132
|
-
if (!
|
|
20204
|
+
if (!isPlainObject22(input)) {
|
|
20133
20205
|
payload.issues.push({
|
|
20134
20206
|
expected: "record",
|
|
20135
20207
|
code: "invalid_type",
|
|
@@ -32541,6 +32613,204 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32541
32613
|
$or: BaseStringQuery2.array()
|
|
32542
32614
|
})
|
|
32543
32615
|
]);
|
|
32616
|
+
var LearnCardRefreshAuthorizationValidator2 = external_exports2.object({ type: external_exports2.literal("LearnCardDIDAuth") }).catchall(external_exports2.any());
|
|
32617
|
+
var ManagedCredentialRefreshServiceValidator2 = external_exports2.object({
|
|
32618
|
+
id: external_exports2.string().min(1),
|
|
32619
|
+
type: external_exports2.literal("LearnCardCredentialRefresh2026"),
|
|
32620
|
+
authorization: LearnCardRefreshAuthorizationValidator2.optional()
|
|
32621
|
+
}).catchall(external_exports2.any());
|
|
32622
|
+
var StandardCredentialRefreshServiceValidator2 = external_exports2.object({
|
|
32623
|
+
id: external_exports2.string().min(1),
|
|
32624
|
+
type: external_exports2.literal("1EdTechCredentialRefresh")
|
|
32625
|
+
}).catchall(external_exports2.any());
|
|
32626
|
+
var SupportedCredentialRefreshServiceValidator2 = external_exports2.union([
|
|
32627
|
+
ManagedCredentialRefreshServiceValidator2,
|
|
32628
|
+
StandardCredentialRefreshServiceValidator2
|
|
32629
|
+
]);
|
|
32630
|
+
var AllocateCredentialRefreshInputValidator2 = external_exports2.object({
|
|
32631
|
+
holder: external_exports2.object({
|
|
32632
|
+
profileId: external_exports2.string().optional(),
|
|
32633
|
+
did: external_exports2.string().min(1)
|
|
32634
|
+
}),
|
|
32635
|
+
credentialId: external_exports2.string().min(1)
|
|
32636
|
+
});
|
|
32637
|
+
var AllocateCredentialRefreshResultValidator2 = external_exports2.object({
|
|
32638
|
+
refreshId: external_exports2.string().min(1),
|
|
32639
|
+
refreshService: ManagedCredentialRefreshServiceValidator2.extend({
|
|
32640
|
+
authorization: LearnCardRefreshAuthorizationValidator2
|
|
32641
|
+
})
|
|
32642
|
+
});
|
|
32643
|
+
var ManagedCredentialRefreshReceiptValidator2 = external_exports2.object({
|
|
32644
|
+
refreshId: external_exports2.string().min(1),
|
|
32645
|
+
refreshService: ManagedCredentialRefreshServiceValidator2,
|
|
32646
|
+
credentialId: external_exports2.string().min(1),
|
|
32647
|
+
issuerDid: external_exports2.string().min(1),
|
|
32648
|
+
holderDid: external_exports2.string().min(1),
|
|
32649
|
+
credentialStatus: CredentialStatusValidator2.or(
|
|
32650
|
+
CredentialStatusValidator2.array()
|
|
32651
|
+
).optional()
|
|
32652
|
+
}).strip();
|
|
32653
|
+
var InboxCredentialRefreshReceiptValidator2 = ManagedCredentialRefreshReceiptValidator2.omit(
|
|
32654
|
+
{ holderDid: true }
|
|
32655
|
+
).extend({ holderDid: external_exports2.string().min(1).optional() });
|
|
32656
|
+
var CredentialRefreshSigningModeValidator2 = external_exports2.enum(["issuer-signed", "signing-authority"]);
|
|
32657
|
+
var PublishCredentialRefreshBaseFields2 = {
|
|
32658
|
+
refreshId: external_exports2.string().min(1),
|
|
32659
|
+
notifyHolder: external_exports2.boolean().optional(),
|
|
32660
|
+
updateSummary: external_exports2.string().optional(),
|
|
32661
|
+
idempotencyKey: external_exports2.string().optional()
|
|
32662
|
+
};
|
|
32663
|
+
var PublishIssuerSignedRefreshValidator2 = external_exports2.object({
|
|
32664
|
+
...PublishCredentialRefreshBaseFields2,
|
|
32665
|
+
mode: external_exports2.literal("issuer-signed"),
|
|
32666
|
+
signedCredential: VCValidator2
|
|
32667
|
+
});
|
|
32668
|
+
var PublishSigningAuthorityRefreshValidator2 = external_exports2.object({
|
|
32669
|
+
...PublishCredentialRefreshBaseFields2,
|
|
32670
|
+
mode: external_exports2.literal("signing-authority"),
|
|
32671
|
+
credential: UnsignedVCValidator2,
|
|
32672
|
+
signingAuthority: external_exports2.object({
|
|
32673
|
+
type: external_exports2.string().min(1)
|
|
32674
|
+
}).catchall(external_exports2.any())
|
|
32675
|
+
});
|
|
32676
|
+
var PublishCredentialRefreshInputValidator2 = external_exports2.object({
|
|
32677
|
+
...PublishCredentialRefreshBaseFields2,
|
|
32678
|
+
mode: CredentialRefreshSigningModeValidator2,
|
|
32679
|
+
signedCredential: VCValidator2.optional(),
|
|
32680
|
+
credential: UnsignedVCValidator2.optional(),
|
|
32681
|
+
signingAuthority: external_exports2.object({
|
|
32682
|
+
type: external_exports2.string().min(1)
|
|
32683
|
+
}).catchall(external_exports2.any()).optional()
|
|
32684
|
+
}).superRefine((input, ctx) => {
|
|
32685
|
+
if (input.mode === "issuer-signed" && !input.signedCredential) {
|
|
32686
|
+
ctx.addIssue({
|
|
32687
|
+
code: "custom",
|
|
32688
|
+
path: ["signedCredential"],
|
|
32689
|
+
message: "signedCredential is required for issuer-signed publication"
|
|
32690
|
+
});
|
|
32691
|
+
}
|
|
32692
|
+
if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
|
|
32693
|
+
ctx.addIssue({
|
|
32694
|
+
code: "custom",
|
|
32695
|
+
path: ["mode"],
|
|
32696
|
+
message: "issuer-signed publication cannot include signing-authority fields"
|
|
32697
|
+
});
|
|
32698
|
+
}
|
|
32699
|
+
if (input.mode === "signing-authority") {
|
|
32700
|
+
if (input.signedCredential !== void 0) {
|
|
32701
|
+
ctx.addIssue({
|
|
32702
|
+
code: "custom",
|
|
32703
|
+
path: ["signedCredential"],
|
|
32704
|
+
message: "signing-authority publication cannot include signedCredential"
|
|
32705
|
+
});
|
|
32706
|
+
}
|
|
32707
|
+
if (!input.credential) {
|
|
32708
|
+
ctx.addIssue({
|
|
32709
|
+
code: "custom",
|
|
32710
|
+
path: ["credential"],
|
|
32711
|
+
message: "credential is required for signing-authority publication"
|
|
32712
|
+
});
|
|
32713
|
+
}
|
|
32714
|
+
if (!input.signingAuthority) {
|
|
32715
|
+
ctx.addIssue({
|
|
32716
|
+
code: "custom",
|
|
32717
|
+
path: ["signingAuthority"],
|
|
32718
|
+
message: "signingAuthority is required for signing-authority publication"
|
|
32719
|
+
});
|
|
32720
|
+
}
|
|
32721
|
+
}
|
|
32722
|
+
});
|
|
32723
|
+
var PublishCredentialRefreshNotificationValidator2 = external_exports2.enum([
|
|
32724
|
+
"queued",
|
|
32725
|
+
"suppressed",
|
|
32726
|
+
"not-applicable",
|
|
32727
|
+
/** Publication succeeded, but the post-commit notification enqueue must be retried. */
|
|
32728
|
+
"delivery-failed"
|
|
32729
|
+
]);
|
|
32730
|
+
var PublishCredentialRefreshResultValidator2 = external_exports2.object({
|
|
32731
|
+
refreshId: external_exports2.string().min(1),
|
|
32732
|
+
version: external_exports2.number().int().positive(),
|
|
32733
|
+
publishedAt: external_exports2.string().min(1),
|
|
32734
|
+
notification: PublishCredentialRefreshNotificationValidator2
|
|
32735
|
+
});
|
|
32736
|
+
var CredentialRefreshVersionMetadataValidator2 = external_exports2.object({
|
|
32737
|
+
version: external_exports2.number().int().positive(),
|
|
32738
|
+
publishedAt: external_exports2.string().min(1),
|
|
32739
|
+
effectiveAt: external_exports2.string().optional(),
|
|
32740
|
+
etag: external_exports2.string().optional(),
|
|
32741
|
+
signingMode: CredentialRefreshSigningModeValidator2.optional(),
|
|
32742
|
+
updateSummary: external_exports2.string().optional()
|
|
32743
|
+
});
|
|
32744
|
+
var GetCredentialRefreshHistoryInputValidator2 = external_exports2.object({
|
|
32745
|
+
refreshId: external_exports2.string().min(1),
|
|
32746
|
+
cursor: external_exports2.string().optional(),
|
|
32747
|
+
limit: external_exports2.number().int().positive().optional()
|
|
32748
|
+
});
|
|
32749
|
+
var GetCredentialRefreshHistoryResultValidator2 = external_exports2.object({
|
|
32750
|
+
records: CredentialRefreshVersionMetadataValidator2.array(),
|
|
32751
|
+
hasMore: external_exports2.boolean(),
|
|
32752
|
+
cursor: external_exports2.string().optional()
|
|
32753
|
+
});
|
|
32754
|
+
var CredentialRefreshChallengeValidator2 = external_exports2.object({
|
|
32755
|
+
challenge: external_exports2.string().min(1),
|
|
32756
|
+
expiresAt: external_exports2.string().min(1),
|
|
32757
|
+
domain: external_exports2.string().optional(),
|
|
32758
|
+
scheme: external_exports2.literal("LearnCardDIDAuth").optional()
|
|
32759
|
+
});
|
|
32760
|
+
var PublicCredentialRefreshEnvelopeValidator2 = external_exports2.object({
|
|
32761
|
+
format: external_exports2.literal("vc"),
|
|
32762
|
+
credential: VCValidator2,
|
|
32763
|
+
etag: external_exports2.string().optional()
|
|
32764
|
+
});
|
|
32765
|
+
var JweCredentialRefreshEnvelopeValidator2 = external_exports2.object({
|
|
32766
|
+
format: external_exports2.literal("jwe"),
|
|
32767
|
+
jwe: JWEValidator2,
|
|
32768
|
+
etag: external_exports2.string().optional(),
|
|
32769
|
+
/** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
|
|
32770
|
+
version: external_exports2.number().int().positive().optional()
|
|
32771
|
+
});
|
|
32772
|
+
var CredentialRefreshResponseEnvelopeValidator2 = external_exports2.discriminatedUnion("format", [
|
|
32773
|
+
PublicCredentialRefreshEnvelopeValidator2,
|
|
32774
|
+
JweCredentialRefreshEnvelopeValidator2
|
|
32775
|
+
]);
|
|
32776
|
+
var CredentialRefreshFailureCodeValidator2 = external_exports2.enum([
|
|
32777
|
+
"UNAVAILABLE",
|
|
32778
|
+
"TIMEOUT",
|
|
32779
|
+
"UNSUPPORTED_SERVICE",
|
|
32780
|
+
"UNAUTHORIZED",
|
|
32781
|
+
"MALFORMED_RESPONSE",
|
|
32782
|
+
"INVALID_PROOF",
|
|
32783
|
+
"ISSUER_MISMATCH",
|
|
32784
|
+
"ID_MISMATCH",
|
|
32785
|
+
"ROLLBACK",
|
|
32786
|
+
"REVOKED",
|
|
32787
|
+
"UNSAFE_ENDPOINT"
|
|
32788
|
+
]);
|
|
32789
|
+
var CredentialRefreshUpdatedResultValidator2 = external_exports2.object({
|
|
32790
|
+
status: external_exports2.literal("updated"),
|
|
32791
|
+
credential: VCValidator2,
|
|
32792
|
+
etag: external_exports2.string().optional(),
|
|
32793
|
+
managedVersion: external_exports2.number().int().positive().optional()
|
|
32794
|
+
});
|
|
32795
|
+
var CredentialRefreshUnchangedResultValidator2 = external_exports2.object({
|
|
32796
|
+
status: external_exports2.literal("unchanged"),
|
|
32797
|
+
checkedAt: external_exports2.string().min(1),
|
|
32798
|
+
etag: external_exports2.string().optional()
|
|
32799
|
+
});
|
|
32800
|
+
var CredentialRefreshUnsupportedResultValidator2 = external_exports2.object({
|
|
32801
|
+
status: external_exports2.literal("unsupported")
|
|
32802
|
+
});
|
|
32803
|
+
var CredentialRefreshFailedResultValidator2 = external_exports2.object({
|
|
32804
|
+
status: external_exports2.literal("failed"),
|
|
32805
|
+
code: CredentialRefreshFailureCodeValidator2,
|
|
32806
|
+
retryable: external_exports2.boolean()
|
|
32807
|
+
});
|
|
32808
|
+
var CredentialRefreshResultValidator2 = external_exports2.discriminatedUnion("status", [
|
|
32809
|
+
CredentialRefreshUpdatedResultValidator2,
|
|
32810
|
+
CredentialRefreshUnchangedResultValidator2,
|
|
32811
|
+
CredentialRefreshUnsupportedResultValidator2,
|
|
32812
|
+
CredentialRefreshFailedResultValidator2
|
|
32813
|
+
]);
|
|
32544
32814
|
var LCNProfileDisplayValidator2 = external_exports2.object({
|
|
32545
32815
|
backgroundColor: external_exports2.string().optional(),
|
|
32546
32816
|
backgroundImage: external_exports2.string().optional(),
|
|
@@ -32876,7 +33146,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32876
33146
|
"Options for email/phone recipients (Universal Inbox)"
|
|
32877
33147
|
),
|
|
32878
33148
|
templateData: external_exports2.record(external_exports2.string(), external_exports2.unknown()).optional(),
|
|
32879
|
-
integrationId: external_exports2.string().optional().describe("Integration ID for activity tracking")
|
|
33149
|
+
integrationId: external_exports2.string().optional().describe("Integration ID for activity tracking"),
|
|
33150
|
+
refresh: external_exports2.boolean().optional().describe(
|
|
33151
|
+
"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."
|
|
33152
|
+
),
|
|
33153
|
+
idempotencyKey: external_exports2.string().min(1).max(200).optional().describe(
|
|
33154
|
+
"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."
|
|
33155
|
+
)
|
|
32880
33156
|
}).refine((data) => data.templateUri || data.template || data.signedCredential, {
|
|
32881
33157
|
message: "Either templateUri, template, or signedCredential must be provided.",
|
|
32882
33158
|
path: ["templateUri"]
|
|
@@ -32891,8 +33167,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32891
33167
|
message: "guardianEmail must differ from recipient (self-approval not allowed)",
|
|
32892
33168
|
path: ["options", "guardianEmail"]
|
|
32893
33169
|
}
|
|
32894
|
-
)
|
|
33170
|
+
).refine((data) => !data.idempotencyKey || data.refresh === true, {
|
|
33171
|
+
message: "idempotencyKey is only supported with refresh: true.",
|
|
33172
|
+
path: ["idempotencyKey"]
|
|
33173
|
+
});
|
|
32895
33174
|
var SendInboxResponseValidator2 = external_exports2.object({
|
|
33175
|
+
refresh: InboxCredentialRefreshReceiptValidator2.optional(),
|
|
32896
33176
|
issuanceId: external_exports2.string(),
|
|
32897
33177
|
status: external_exports2.enum(["PENDING", "ISSUED", "EXPIRED", "DELIVERED", "CLAIMED"]),
|
|
32898
33178
|
claimUrl: external_exports2.string().url().optional().describe("Present when suppressDelivery=true"),
|
|
@@ -32907,8 +33187,34 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32907
33187
|
activityId: external_exports2.string().describe("Links to the activity lifecycle for this issuance"),
|
|
32908
33188
|
inbox: SendInboxResponseValidator2.optional().describe(
|
|
32909
33189
|
"Present when sent via email/phone (Universal Inbox)"
|
|
33190
|
+
),
|
|
33191
|
+
refresh: ManagedCredentialRefreshReceiptValidator2.optional().describe(
|
|
33192
|
+
"Present when managed refresh was requested: issuance metadata the issuer keeps to publish future updates"
|
|
32910
33193
|
)
|
|
32911
33194
|
});
|
|
33195
|
+
var PrepareRefreshableSendInputValidator2 = external_exports2.object({
|
|
33196
|
+
recipient: external_exports2.string(),
|
|
33197
|
+
templateUri: external_exports2.string().optional(),
|
|
33198
|
+
template: SendBoostTemplateValidator2.optional(),
|
|
33199
|
+
contractUri: external_exports2.string().optional(),
|
|
33200
|
+
templateData: external_exports2.record(external_exports2.string(), external_exports2.unknown()).optional(),
|
|
33201
|
+
integrationId: external_exports2.string().optional(),
|
|
33202
|
+
/** Credential ID to allocate for; generated server-side when omitted. */
|
|
33203
|
+
credentialId: external_exports2.string().min(1).optional(),
|
|
33204
|
+
idempotencyKey: external_exports2.string().min(1).max(200).optional()
|
|
33205
|
+
}).refine((data) => Boolean(data.templateUri) !== Boolean(data.template), {
|
|
33206
|
+
message: "Provide exactly one of templateUri or template."
|
|
33207
|
+
});
|
|
33208
|
+
var PrepareRefreshableSendResultValidator2 = external_exports2.object({
|
|
33209
|
+
boostUri: external_exports2.string(),
|
|
33210
|
+
credentialId: external_exports2.string(),
|
|
33211
|
+
refreshId: external_exports2.string(),
|
|
33212
|
+
refreshService: ManagedCredentialRefreshServiceValidator2,
|
|
33213
|
+
/** The DID to use as credentialSubject.id (recipient DID, or the profile's did:web). */
|
|
33214
|
+
holderDid: external_exports2.string(),
|
|
33215
|
+
/** Present when this idempotencyKey already completed: return it without signing. */
|
|
33216
|
+
completed: SendBoostResponseValidator2.optional()
|
|
33217
|
+
});
|
|
32912
33218
|
var SendInputValidator2 = external_exports2.discriminatedUnion("type", [SendBoostInputValidator2]);
|
|
32913
33219
|
var SendResponseValidator2 = external_exports2.discriminatedUnion("type", [SendBoostResponseValidator2]);
|
|
32914
33220
|
var ConsentFlowTermsStatusValidator2 = external_exports2.enum(["live", "stale", "withdrawn"]);
|
|
@@ -33227,6 +33533,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33227
33533
|
webhookUrl: external_exports2.string().optional()
|
|
33228
33534
|
});
|
|
33229
33535
|
var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX2 = "auth-grant:";
|
|
33536
|
+
var ACT_AS_HEADER = "X-LearnCard-Act-As";
|
|
33230
33537
|
var AuthGrantValidator2 = external_exports2.object({
|
|
33231
33538
|
id: external_exports2.string(),
|
|
33232
33539
|
name: external_exports2.string(),
|
|
@@ -33239,6 +33546,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33239
33546
|
}, "error")
|
|
33240
33547
|
}),
|
|
33241
33548
|
scope: external_exports2.string(),
|
|
33549
|
+
actAs: external_exports2.string().optional(),
|
|
33242
33550
|
createdAt: external_exports2.iso.datetime({ error: "createdAt must be a valid ISO 8601 datetime string" }),
|
|
33243
33551
|
expiresAt: external_exports2.iso.datetime({ error: "expiresAt must be a valid ISO 8601 datetime string" }).nullish().optional()
|
|
33244
33552
|
});
|
|
@@ -33310,6 +33618,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33310
33618
|
sessionJwt: external_exports2.string()
|
|
33311
33619
|
});
|
|
33312
33620
|
var InboxCredentialValidator2 = external_exports2.object({
|
|
33621
|
+
refresh: InboxCredentialRefreshReceiptValidator2.optional(),
|
|
33622
|
+
refreshId: external_exports2.string().optional(),
|
|
33313
33623
|
id: external_exports2.string(),
|
|
33314
33624
|
credential: external_exports2.string().optional(),
|
|
33315
33625
|
isSigned: external_exports2.boolean(),
|
|
@@ -33364,12 +33674,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33364
33674
|
templateUri: external_exports2.string().optional().describe(
|
|
33365
33675
|
"URI of a boost template to use for issuance. The boost credential will be resolved and used. Mutually exclusive with credential field."
|
|
33366
33676
|
),
|
|
33677
|
+
refresh: external_exports2.boolean().optional().describe(
|
|
33678
|
+
"Allocate managed refresh before signing. Requires unsigned content and a registered signing authority; binds the holder on claim."
|
|
33679
|
+
),
|
|
33680
|
+
idempotencyKey: external_exports2.string().min(1).max(200).optional(),
|
|
33367
33681
|
// === OPTIONAL FEATURES ===
|
|
33368
33682
|
// Add major, distinct features at the top level.
|
|
33369
33683
|
//consentRequest: ConsentRequestValidator.optional(),
|
|
33370
33684
|
// === PROCESS CONFIGURATION (Optional) ===
|
|
33371
33685
|
// HOW should this issuance be handled?
|
|
33372
33686
|
configuration: external_exports2.object({
|
|
33687
|
+
guardianEmail: external_exports2.string().email().optional().describe(
|
|
33688
|
+
"Require approval from this guardian before the recipient can claim. Must differ from the recipient email."
|
|
33689
|
+
),
|
|
33373
33690
|
signingAuthority: IssueInboxSigningAuthorityValidator2.optional().describe(
|
|
33374
33691
|
"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."
|
|
33375
33692
|
),
|
|
@@ -33423,17 +33740,130 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33423
33740
|
}).optional().describe(
|
|
33424
33741
|
"Configuration for the credential issuance. If not provided, the default configuration will be used."
|
|
33425
33742
|
)
|
|
33743
|
+
}).refine((data) => !data.idempotencyKey || data.refresh === true, {
|
|
33744
|
+
message: "idempotencyKey requires refresh: true."
|
|
33426
33745
|
}).refine((data) => data.credential || data.templateUri, {
|
|
33427
33746
|
message: "Either credential or templateUri must be provided.",
|
|
33428
33747
|
path: ["credential"]
|
|
33429
|
-
})
|
|
33748
|
+
}).refine(
|
|
33749
|
+
(data) => !data.configuration?.guardianEmail || data.recipient.type !== "email" || data.configuration.guardianEmail.toLowerCase() !== data.recipient.value.toLowerCase(),
|
|
33750
|
+
{
|
|
33751
|
+
message: "guardianEmail must differ from recipient (self-approval not allowed)",
|
|
33752
|
+
path: ["configuration", "guardianEmail"]
|
|
33753
|
+
}
|
|
33754
|
+
);
|
|
33430
33755
|
var IssueInboxCredentialResponseValidator2 = external_exports2.object({
|
|
33756
|
+
refresh: InboxCredentialRefreshReceiptValidator2.optional(),
|
|
33431
33757
|
issuanceId: external_exports2.string(),
|
|
33432
33758
|
status: LCNInboxStatusEnumValidator2,
|
|
33433
33759
|
recipient: ContactMethodQueryValidator2,
|
|
33434
33760
|
claimUrl: external_exports2.string().url().optional(),
|
|
33435
33761
|
recipientDid: external_exports2.string().optional()
|
|
33436
33762
|
});
|
|
33763
|
+
var InboxBatchConfigurationValidator2 = IssueInboxCredentialValidator2.shape.configuration.unwrap().extend({
|
|
33764
|
+
refresh: IssueInboxCredentialValidator2.shape.refresh.describe(
|
|
33765
|
+
"Enable managed refresh by default. An item configuration.refresh overrides this value, including false."
|
|
33766
|
+
),
|
|
33767
|
+
delivery: IssueInboxCredentialValidator2.shape.configuration.unwrap().shape.delivery.unwrap().extend({ suppress: external_exports2.boolean().optional() }).optional()
|
|
33768
|
+
});
|
|
33769
|
+
var InboxBatchItemConfigurationValidator2 = InboxBatchConfigurationValidator2.extend({
|
|
33770
|
+
guardianEmail: InboxBatchConfigurationValidator2.shape.guardianEmail.nullable().describe(
|
|
33771
|
+
"Require guardian approval, or set null to clear a batch-level guardianEmail for this item."
|
|
33772
|
+
)
|
|
33773
|
+
});
|
|
33774
|
+
var IssueInboxCredentialBatchItemValidator2 = external_exports2.object({
|
|
33775
|
+
...IssueInboxCredentialValidator2.shape,
|
|
33776
|
+
configuration: InboxBatchItemConfigurationValidator2.optional(),
|
|
33777
|
+
idempotencyKey: external_exports2.string().max(256).optional()
|
|
33778
|
+
}).refine((data) => data.credential || data.templateUri, {
|
|
33779
|
+
message: "Either credential or templateUri must be provided.",
|
|
33780
|
+
path: ["credential"]
|
|
33781
|
+
}).describe(
|
|
33782
|
+
"One issuance: provide credential or templateUri. Invalid input is rejected at submission with its item index."
|
|
33783
|
+
);
|
|
33784
|
+
var IssueInboxCredentialBatchValidator2 = external_exports2.object({
|
|
33785
|
+
requestId: external_exports2.string().min(1).max(256).optional(),
|
|
33786
|
+
items: external_exports2.array(IssueInboxCredentialBatchItemValidator2).min(1).max(100),
|
|
33787
|
+
configuration: InboxBatchConfigurationValidator2.optional()
|
|
33788
|
+
}).superRefine((batch, ctx) => {
|
|
33789
|
+
batch.items.forEach((item, index) => {
|
|
33790
|
+
const itemGuardian = item.configuration?.guardianEmail;
|
|
33791
|
+
const guardian = itemGuardian === null ? void 0 : itemGuardian ?? batch.configuration?.guardianEmail;
|
|
33792
|
+
if (guardian && item.recipient.type === "email" && guardian.toLowerCase() === item.recipient.value.toLowerCase()) {
|
|
33793
|
+
ctx.addIssue({
|
|
33794
|
+
code: "custom",
|
|
33795
|
+
path: ["items", index, "configuration", "guardianEmail"],
|
|
33796
|
+
message: "guardianEmail must differ from recipient (self-approval not allowed)"
|
|
33797
|
+
});
|
|
33798
|
+
}
|
|
33799
|
+
});
|
|
33800
|
+
});
|
|
33801
|
+
var InboxBatchErrorReasonValidator2 = external_exports2.enum([
|
|
33802
|
+
"DUPLICATE_KEY",
|
|
33803
|
+
"IDEMPOTENCY_MISMATCH",
|
|
33804
|
+
"IN_PROGRESS",
|
|
33805
|
+
"UNCONFIRMED"
|
|
33806
|
+
]);
|
|
33807
|
+
var IssueInboxCredentialBatchItemResultValidator2 = external_exports2.discriminatedUnion("success", [
|
|
33808
|
+
IssueInboxCredentialResponseValidator2.extend({
|
|
33809
|
+
success: external_exports2.literal(true),
|
|
33810
|
+
index: external_exports2.number().int().nonnegative(),
|
|
33811
|
+
deduplicated: external_exports2.boolean().optional(),
|
|
33812
|
+
guardianStatus: GuardianStatusValidator2.optional(),
|
|
33813
|
+
idempotencyKey: external_exports2.string().optional()
|
|
33814
|
+
}),
|
|
33815
|
+
external_exports2.object({
|
|
33816
|
+
success: external_exports2.literal(false),
|
|
33817
|
+
index: external_exports2.number().int().nonnegative(),
|
|
33818
|
+
idempotencyKey: external_exports2.string().optional(),
|
|
33819
|
+
recipient: ContactMethodQueryValidator2.optional(),
|
|
33820
|
+
error: external_exports2.object({
|
|
33821
|
+
code: external_exports2.string(),
|
|
33822
|
+
message: external_exports2.string(),
|
|
33823
|
+
reason: InboxBatchErrorReasonValidator2.optional()
|
|
33824
|
+
}),
|
|
33825
|
+
issuanceId: external_exports2.string().optional().describe(
|
|
33826
|
+
"Present when issuance completed but replay storage could not be confirmed. Reconcile this issuance; do not issue again with a new key."
|
|
33827
|
+
),
|
|
33828
|
+
claimUrl: external_exports2.string().url().optional().describe(
|
|
33829
|
+
"Claim URL of the completed issuance, if available, when replay storage could not be confirmed."
|
|
33830
|
+
)
|
|
33831
|
+
})
|
|
33832
|
+
]);
|
|
33833
|
+
var IssueInboxCredentialBatchResponseValidator2 = external_exports2.object({
|
|
33834
|
+
results: external_exports2.array(IssueInboxCredentialBatchItemResultValidator2),
|
|
33835
|
+
summary: external_exports2.object({
|
|
33836
|
+
total: external_exports2.number(),
|
|
33837
|
+
succeeded: external_exports2.number(),
|
|
33838
|
+
failed: external_exports2.number(),
|
|
33839
|
+
deduplicated: external_exports2.number()
|
|
33840
|
+
})
|
|
33841
|
+
});
|
|
33842
|
+
var InboxBatchReceiptValidator2 = external_exports2.object({
|
|
33843
|
+
batchId: external_exports2.string(),
|
|
33844
|
+
status: external_exports2.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
|
|
33845
|
+
createdAt: external_exports2.string()
|
|
33846
|
+
});
|
|
33847
|
+
var InboxBatchStatusValidator2 = external_exports2.object({
|
|
33848
|
+
batchId: external_exports2.string(),
|
|
33849
|
+
createdAt: external_exports2.string(),
|
|
33850
|
+
done: external_exports2.boolean().describe(
|
|
33851
|
+
"True when no queued or processing items remain, including unconfirmed outcomes."
|
|
33852
|
+
),
|
|
33853
|
+
status: external_exports2.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
|
|
33854
|
+
items: external_exports2.array(
|
|
33855
|
+
external_exports2.object({
|
|
33856
|
+
index: external_exports2.number().int().nonnegative(),
|
|
33857
|
+
state: external_exports2.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
|
|
33858
|
+
result: IssueInboxCredentialBatchItemResultValidator2.optional()
|
|
33859
|
+
})
|
|
33860
|
+
),
|
|
33861
|
+
summary: IssueInboxCredentialBatchResponseValidator2.shape.summary.extend({
|
|
33862
|
+
completed: external_exports2.number(),
|
|
33863
|
+
pending: external_exports2.number(),
|
|
33864
|
+
unconfirmed: external_exports2.number()
|
|
33865
|
+
})
|
|
33866
|
+
});
|
|
33437
33867
|
var CredentialNameRefValidator2 = external_exports2.object({ name: external_exports2.string() }).passthrough();
|
|
33438
33868
|
var ClaimInboxCredentialValidator2 = external_exports2.object({
|
|
33439
33869
|
credential: VCValidator2.or(VPValidator2).or(UnsignedVCValidator2).or(CredentialNameRefValidator2).describe("The credential to issue, or a { name } reference to resolve a boost template."),
|
|
@@ -33919,6 +34349,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33919
34349
|
eventType: CredentialActivityEventTypeValidator2,
|
|
33920
34350
|
timestamp: external_exports2.string(),
|
|
33921
34351
|
actorProfileId: external_exports2.string().optional(),
|
|
34352
|
+
onBehalfOf: external_exports2.string().optional(),
|
|
33922
34353
|
recipientType: CredentialActivityRecipientTypeValidator2,
|
|
33923
34354
|
recipientIdentifier: external_exports2.string(),
|
|
33924
34355
|
boostUri: external_exports2.string().optional(),
|
|
@@ -33959,6 +34390,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33959
34390
|
this.name = "AuthSessionError";
|
|
33960
34391
|
}
|
|
33961
34392
|
}, __name(_g, "AuthSessionError"), __name2(_g, "AuthSessionError"), __name22(_g, "AuthSessionError"), _g);
|
|
34393
|
+
var ESCROW_PIN_LOCKED_MESSAGE = "Too many incorrect PIN attempts. You can still recover by waiting.";
|
|
34394
|
+
var ESCROW_PIN_UNAVAILABLE_MESSAGE = "PIN recovery is not available for this account.";
|
|
34395
|
+
var ESCROW_PIN_MISMATCH_PATTERN = /^Incorrect PIN\. (\d+) attempts left\.$/;
|
|
34396
|
+
var escrowPinMismatchMessage = /* @__PURE__ */ __name22((attemptsRemaining) => `Incorrect PIN. ${attemptsRemaining} attempts left.`, "escrowPinMismatchMessage");
|
|
34397
|
+
var EscrowPinStatusValidator2 = external_exports2.object({
|
|
34398
|
+
state: external_exports2.enum(["none", "enabled", "locked", "stale"]),
|
|
34399
|
+
enabled: external_exports2.boolean(),
|
|
34400
|
+
attemptsRemaining: external_exports2.number().int().nonnegative(),
|
|
34401
|
+
salt: external_exports2.string().optional()
|
|
34402
|
+
});
|
|
33962
34403
|
var BITSTRING_STATUS_PURPOSES2 = ["revocation", "suspension"];
|
|
33963
34404
|
var DEFAULT_BITSTRING_STATUS_LIST_SIZE = 131072;
|
|
33964
34405
|
var BitstringStatusPurposeValidator2 = external_exports2.enum(BITSTRING_STATUS_PURPOSES2);
|
|
@@ -34073,191 +34514,458 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
34073
34514
|
const result = inAppMessagesFlagValidator2.safeParse(raw);
|
|
34074
34515
|
return result.success ? result.data : EMPTY_IN_APP_MESSAGES_FLAG;
|
|
34075
34516
|
}, "parseInAppMessagesFlag");
|
|
34076
|
-
var
|
|
34077
|
-
var
|
|
34078
|
-
|
|
34079
|
-
|
|
34080
|
-
|
|
34081
|
-
|
|
34082
|
-
var
|
|
34083
|
-
|
|
34084
|
-
|
|
34085
|
-
|
|
34086
|
-
var
|
|
34087
|
-
|
|
34088
|
-
|
|
34089
|
-
|
|
34090
|
-
var
|
|
34091
|
-
|
|
34092
|
-
|
|
34093
|
-
|
|
34094
|
-
|
|
34095
|
-
|
|
34096
|
-
|
|
34097
|
-
|
|
34098
|
-
|
|
34099
|
-
|
|
34100
|
-
|
|
34101
|
-
|
|
34102
|
-
|
|
34103
|
-
|
|
34104
|
-
|
|
34105
|
-
|
|
34106
|
-
|
|
34107
|
-
|
|
34108
|
-
|
|
34109
|
-
|
|
34110
|
-
|
|
34111
|
-
|
|
34112
|
-
|
|
34113
|
-
|
|
34114
|
-
|
|
34115
|
-
|
|
34116
|
-
|
|
34117
|
-
|
|
34118
|
-
|
|
34119
|
-
|
|
34120
|
-
|
|
34121
|
-
|
|
34122
|
-
|
|
34123
|
-
|
|
34124
|
-
|
|
34125
|
-
|
|
34126
|
-
|
|
34127
|
-
|
|
34128
|
-
|
|
34129
|
-
|
|
34130
|
-
}
|
|
34131
|
-
|
|
34132
|
-
|
|
34133
|
-
|
|
34134
|
-
|
|
34135
|
-
|
|
34136
|
-
|
|
34137
|
-
|
|
34517
|
+
var SHARE_LINK_ID_BYTES2 = 16;
|
|
34518
|
+
var SHARE_CONTENT_KEY_BYTES2 = 32;
|
|
34519
|
+
var SHARE_IV_BYTES2 = 12;
|
|
34520
|
+
var SHARE_TAG_BYTES2 = 16;
|
|
34521
|
+
var MAX_SHARE_CIPHERTEXT_BYTES2 = 512 * 1024;
|
|
34522
|
+
var MAX_SHARE_RECOVERY_JWE_BYTES2 = 64 * 1024;
|
|
34523
|
+
var MAX_SELECTED_CREDENTIALS2 = 50;
|
|
34524
|
+
var MAX_ENDORSEMENTS2 = 200;
|
|
34525
|
+
var MAX_VP_MEMBERS2 = MAX_SELECTED_CREDENTIALS2 + MAX_ENDORSEMENTS2;
|
|
34526
|
+
var MAX_SHARE_SOURCE_URI_CHARS2 = 2048;
|
|
34527
|
+
var MAX_SHARE_LINK_REQUEST_BYTES2 = 1024 * 1024;
|
|
34528
|
+
var SHARE_LINK_PROTOCOL2 = "lc-share/v1";
|
|
34529
|
+
var SHARE_RECOVERY_PROTOCOL2 = "lc-share-recovery/v1";
|
|
34530
|
+
var SHARE_AAD_PREFIX = "lc-share:v1";
|
|
34531
|
+
var BASE64URL_ALPHABET2 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
|
34532
|
+
var BASE64URL_LOOKUP2 = (() => {
|
|
34533
|
+
const table = new Int16Array(128).fill(-1);
|
|
34534
|
+
for (let index = 0; index < BASE64URL_ALPHABET2.length; index += 1) {
|
|
34535
|
+
table[BASE64URL_ALPHABET2.charCodeAt(index)] = index;
|
|
34536
|
+
}
|
|
34537
|
+
return table;
|
|
34538
|
+
})();
|
|
34539
|
+
var encodeBase64Url2 = /* @__PURE__ */ __name22((bytes) => {
|
|
34540
|
+
let output = "";
|
|
34541
|
+
for (let index = 0; index < bytes.length; index += 3) {
|
|
34542
|
+
const first = bytes[index];
|
|
34543
|
+
const second = bytes[index + 1];
|
|
34544
|
+
const third = bytes[index + 2];
|
|
34545
|
+
output += BASE64URL_ALPHABET2[first >> 2];
|
|
34546
|
+
output += BASE64URL_ALPHABET2[(first & 3) << 4 | (second ?? 0) >> 4];
|
|
34547
|
+
if (second === void 0) break;
|
|
34548
|
+
output += BASE64URL_ALPHABET2[(second & 15) << 2 | (third ?? 0) >> 6];
|
|
34549
|
+
if (third === void 0) break;
|
|
34550
|
+
output += BASE64URL_ALPHABET2[third & 63];
|
|
34551
|
+
}
|
|
34552
|
+
return output;
|
|
34553
|
+
}, "encodeBase64Url");
|
|
34554
|
+
var decodeBase64Url2 = /* @__PURE__ */ __name22((value) => {
|
|
34555
|
+
if (typeof value !== "string") return null;
|
|
34556
|
+
const output = new Uint8Array(Math.floor(value.length * 6 / 8));
|
|
34557
|
+
let bits = 0;
|
|
34558
|
+
let bitCount = 0;
|
|
34559
|
+
let outputIndex = 0;
|
|
34560
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
34561
|
+
const code = value.charCodeAt(index);
|
|
34562
|
+
const digit = code < 128 ? BASE64URL_LOOKUP2[code] : -1;
|
|
34563
|
+
if (digit < 0) return null;
|
|
34564
|
+
bits = bits << 6 | digit;
|
|
34565
|
+
bitCount += 6;
|
|
34566
|
+
if (bitCount >= 8) {
|
|
34567
|
+
bitCount -= 8;
|
|
34568
|
+
output[outputIndex] = bits >> bitCount & 255;
|
|
34569
|
+
outputIndex += 1;
|
|
34570
|
+
}
|
|
34571
|
+
}
|
|
34572
|
+
return output;
|
|
34573
|
+
}, "decodeBase64Url");
|
|
34574
|
+
var isCanonicalBase64Url2 = /* @__PURE__ */ __name22((value, expectedBytes) => {
|
|
34575
|
+
if (typeof value !== "string") return false;
|
|
34576
|
+
if (expectedBytes !== void 0 && value.length !== Math.ceil(expectedBytes * 4 / 3))
|
|
34577
|
+
return false;
|
|
34578
|
+
const decoded = decodeBase64Url2(value);
|
|
34579
|
+
if (decoded === null) return false;
|
|
34580
|
+
if (expectedBytes !== void 0 && decoded.length !== expectedBytes) return false;
|
|
34581
|
+
return encodeBase64Url2(decoded) === value;
|
|
34582
|
+
}, "isCanonicalBase64Url");
|
|
34583
|
+
var decodedBase64UrlByteLength = /* @__PURE__ */ __name22((value) => decodeBase64Url2(value)?.length ?? null, "decodedBase64UrlByteLength");
|
|
34584
|
+
var utf8ByteLength2 = /* @__PURE__ */ __name22((value) => new TextEncoder().encode(value).length, "utf8ByteLength");
|
|
34585
|
+
var canonicalBase64Url2 = /* @__PURE__ */ __name22((bytes) => external_exports2.string().refine((value) => isCanonicalBase64Url2(value, bytes), {
|
|
34586
|
+
message: `must be canonical base64url for exactly ${bytes} bytes`
|
|
34587
|
+
}), "canonicalBase64Url");
|
|
34588
|
+
var ShareLinkIdValidator2 = canonicalBase64Url2(SHARE_LINK_ID_BYTES2);
|
|
34589
|
+
var ShareContentKeyValidator2 = canonicalBase64Url2(SHARE_CONTENT_KEY_BYTES2);
|
|
34590
|
+
var ShareIvValidator2 = canonicalBase64Url2(SHARE_IV_BYTES2);
|
|
34591
|
+
var ShareCiphertextValidator2 = external_exports2.string().refine(
|
|
34592
|
+
(value) => {
|
|
34593
|
+
if (value.length > Math.ceil(MAX_SHARE_CIPHERTEXT_BYTES2 * 4 / 3)) return false;
|
|
34594
|
+
const decoded = decodeBase64Url2(value);
|
|
34595
|
+
if (decoded === null) return false;
|
|
34596
|
+
if (encodeBase64Url2(decoded) !== value) return false;
|
|
34597
|
+
return decoded.length >= SHARE_TAG_BYTES2 && decoded.length <= MAX_SHARE_CIPHERTEXT_BYTES2;
|
|
34598
|
+
},
|
|
34599
|
+
{
|
|
34600
|
+
message: `must be canonical base64url decoding to ${SHARE_TAG_BYTES2}..${MAX_SHARE_CIPHERTEXT_BYTES2} bytes`
|
|
34138
34601
|
}
|
|
34139
|
-
|
|
34602
|
+
);
|
|
34603
|
+
var ShareEnvelopeValidator2 = external_exports2.object({
|
|
34604
|
+
v: external_exports2.literal(1),
|
|
34605
|
+
alg: external_exports2.literal("A256GCM"),
|
|
34606
|
+
iv: ShareIvValidator2,
|
|
34607
|
+
ct: ShareCiphertextValidator2
|
|
34608
|
+
}).strict();
|
|
34609
|
+
var safeVersion2 = external_exports2.number().int().min(1).max(2 ** 31 - 1);
|
|
34610
|
+
var safeCredentialIndex2 = external_exports2.number().int().min(0).max(MAX_VP_MEMBERS2 - 1);
|
|
34611
|
+
var ShareSelectionEntryValidator2 = external_exports2.object({ credentialIndex: safeCredentialIndex2 }).strict();
|
|
34612
|
+
var ShareEndorsementEntryValidator2 = external_exports2.object({ credentialIndex: safeCredentialIndex2, targetCredentialIndex: safeCredentialIndex2 }).strict();
|
|
34613
|
+
var ShareSharerValidator2 = external_exports2.object({
|
|
34614
|
+
profileId: external_exports2.string().min(1).max(128),
|
|
34615
|
+
displayName: external_exports2.string().min(1).max(120),
|
|
34616
|
+
avatar: external_exports2.string().max(2048).optional()
|
|
34617
|
+
}).strict();
|
|
34618
|
+
var presentationShape2 = VPValidator2.extend({
|
|
34619
|
+
verifiableCredential: VCValidator2.array().min(1).max(MAX_VP_MEMBERS2)
|
|
34620
|
+
});
|
|
34621
|
+
var hasBoundedPresentation2 = /* @__PURE__ */ __name22((value) => {
|
|
34622
|
+
let credentialCount = 0;
|
|
34623
|
+
const ancestors = /* @__PURE__ */ new Set();
|
|
34624
|
+
const visit = /* @__PURE__ */ __name22((node, depth) => {
|
|
34625
|
+
if (node === null || typeof node !== "object") return true;
|
|
34626
|
+
if (depth > 32 || ancestors.has(node)) return false;
|
|
34627
|
+
ancestors.add(node);
|
|
34628
|
+
try {
|
|
34629
|
+
for (const [key, child] of Object.entries(node)) {
|
|
34630
|
+
if (key === "verifiableCredential") {
|
|
34631
|
+
credentialCount += Array.isArray(child) ? child.length : 1;
|
|
34632
|
+
if (credentialCount > MAX_VP_MEMBERS2) return false;
|
|
34633
|
+
}
|
|
34634
|
+
if (!visit(child, depth + 1)) return false;
|
|
34635
|
+
}
|
|
34636
|
+
return true;
|
|
34637
|
+
} finally {
|
|
34638
|
+
ancestors.delete(node);
|
|
34639
|
+
}
|
|
34640
|
+
}, "visit");
|
|
34641
|
+
return visit(value, 0);
|
|
34642
|
+
}, "hasBoundedPresentation");
|
|
34643
|
+
var ShareManifestPresentationValidator2 = external_exports2.custom(
|
|
34644
|
+
(value) => hasBoundedPresentation2(value) && presentationShape2.safeParse(value).success,
|
|
34645
|
+
{ message: "invalid share presentation" }
|
|
34646
|
+
);
|
|
34647
|
+
var SharePayloadValidatorShape2 = external_exports2.object({
|
|
34648
|
+
protocol: external_exports2.literal(SHARE_LINK_PROTOCOL2),
|
|
34649
|
+
shareId: ShareLinkIdValidator2,
|
|
34650
|
+
contentVersion: safeVersion2,
|
|
34651
|
+
createdAt: external_exports2.iso.datetime(),
|
|
34652
|
+
sharer: ShareSharerValidator2,
|
|
34653
|
+
presentation: ShareManifestPresentationValidator2,
|
|
34654
|
+
selection: ShareSelectionEntryValidator2.array().min(1).max(MAX_SELECTED_CREDENTIALS2),
|
|
34655
|
+
endorsements: ShareEndorsementEntryValidator2.array().max(MAX_ENDORSEMENTS2).default([])
|
|
34656
|
+
}).strict();
|
|
34657
|
+
var classificationFailure2 = /* @__PURE__ */ __name22((code, message, path = []) => ({ ok: false, code, message, path }), "classificationFailure");
|
|
34658
|
+
var readSignedClaimId2 = /* @__PURE__ */ __name22((member) => {
|
|
34659
|
+
if (member === null || typeof member !== "object") return void 0;
|
|
34660
|
+
const record22 = member;
|
|
34661
|
+
const claim = record22.credentialSubject ?? record22.endorsement;
|
|
34662
|
+
if (claim === null || typeof claim !== "object") return void 0;
|
|
34663
|
+
const claimRecord = claim;
|
|
34664
|
+
const nested = claimRecord.endorsement;
|
|
34665
|
+
const nestedId = nested !== null && typeof nested === "object" ? nested.id : void 0;
|
|
34666
|
+
return claimRecord.id ?? nestedId;
|
|
34667
|
+
}, "readSignedClaimId");
|
|
34668
|
+
var classifyShareManifest2 = /* @__PURE__ */ __name22((payload) => {
|
|
34669
|
+
const members = payload.presentation?.verifiableCredential;
|
|
34670
|
+
if (!Array.isArray(members) || members.length === 0) {
|
|
34671
|
+
return classificationFailure2("NO_PRESENTATION_MEMBERS", "presentation has no credentials");
|
|
34672
|
+
}
|
|
34673
|
+
if (members.length > MAX_VP_MEMBERS2) {
|
|
34674
|
+
return classificationFailure2(
|
|
34675
|
+
"TOO_MANY_VP_MEMBERS",
|
|
34676
|
+
`presentation has ${members.length} members, over the ${MAX_VP_MEMBERS2} bound`
|
|
34677
|
+
);
|
|
34678
|
+
}
|
|
34679
|
+
const selection = payload.selection;
|
|
34680
|
+
const endorsements = payload.endorsements ?? [];
|
|
34681
|
+
if (!Array.isArray(selection) || selection.length < 1 || selection.length > MAX_SELECTED_CREDENTIALS2) {
|
|
34682
|
+
return classificationFailure2("BAD_SELECTION", "selection must contain 1..50 entries");
|
|
34683
|
+
}
|
|
34684
|
+
if (!Array.isArray(endorsements) || endorsements.length > MAX_ENDORSEMENTS2) {
|
|
34685
|
+
return classificationFailure2(
|
|
34686
|
+
"BAD_ENDORSEMENTS",
|
|
34687
|
+
"endorsements must contain at most 200 entries"
|
|
34688
|
+
);
|
|
34689
|
+
}
|
|
34690
|
+
const selectedIndices = [];
|
|
34691
|
+
const selected = /* @__PURE__ */ new Set();
|
|
34692
|
+
for (let index = 0; index < selection.length; index += 1) {
|
|
34693
|
+
const entry = selection[index];
|
|
34694
|
+
const credentialIndex = entry?.credentialIndex;
|
|
34695
|
+
if (!Number.isSafeInteger(credentialIndex) || credentialIndex < 0 || credentialIndex >= members.length) {
|
|
34696
|
+
return classificationFailure2(
|
|
34697
|
+
"SELECTION_INDEX_OUT_OF_BOUNDS",
|
|
34698
|
+
`selection[${index}].credentialIndex is out of bounds`,
|
|
34699
|
+
["selection", index, "credentialIndex"]
|
|
34700
|
+
);
|
|
34701
|
+
}
|
|
34702
|
+
if (selected.has(credentialIndex)) {
|
|
34703
|
+
return classificationFailure2(
|
|
34704
|
+
"SELECTION_INDEX_DUPLICATE",
|
|
34705
|
+
`selection[${index}].credentialIndex is duplicated`,
|
|
34706
|
+
["selection", index, "credentialIndex"]
|
|
34707
|
+
);
|
|
34708
|
+
}
|
|
34709
|
+
selected.add(credentialIndex);
|
|
34710
|
+
selectedIndices.push(credentialIndex);
|
|
34711
|
+
}
|
|
34712
|
+
const classified = new Set(selected);
|
|
34713
|
+
const endorsementIndices = [];
|
|
34714
|
+
for (let index = 0; index < endorsements.length; index += 1) {
|
|
34715
|
+
const entry = endorsements[index];
|
|
34716
|
+
const credentialIndex = entry?.credentialIndex;
|
|
34717
|
+
const targetIndex = entry?.targetCredentialIndex;
|
|
34718
|
+
if (!Number.isSafeInteger(credentialIndex) || credentialIndex < 0 || credentialIndex >= members.length) {
|
|
34719
|
+
return classificationFailure2(
|
|
34720
|
+
"ENDORSEMENT_INDEX_OUT_OF_BOUNDS",
|
|
34721
|
+
`endorsements[${index}].credentialIndex is out of bounds`,
|
|
34722
|
+
["endorsements", index, "credentialIndex"]
|
|
34723
|
+
);
|
|
34724
|
+
}
|
|
34725
|
+
if (classified.has(credentialIndex)) {
|
|
34726
|
+
return classificationFailure2(
|
|
34727
|
+
"VP_MEMBER_CLASSIFIED_TWICE",
|
|
34728
|
+
`endorsements[${index}].credentialIndex was already classified`,
|
|
34729
|
+
["endorsements", index, "credentialIndex"]
|
|
34730
|
+
);
|
|
34731
|
+
}
|
|
34732
|
+
if (!selected.has(targetIndex)) {
|
|
34733
|
+
return classificationFailure2(
|
|
34734
|
+
"ENDORSEMENT_TARGET_NOT_SELECTED",
|
|
34735
|
+
`endorsements[${index}].targetCredentialIndex must reference a selected credential`,
|
|
34736
|
+
["endorsements", index, "targetCredentialIndex"]
|
|
34737
|
+
);
|
|
34738
|
+
}
|
|
34739
|
+
const referenced = readSignedClaimId2(members[credentialIndex]);
|
|
34740
|
+
const target = members[targetIndex];
|
|
34741
|
+
const targetId = target !== null && typeof target === "object" ? target.id : void 0;
|
|
34742
|
+
if (typeof referenced !== "string" || typeof targetId !== "string" || referenced !== targetId) {
|
|
34743
|
+
return classificationFailure2(
|
|
34744
|
+
"ENDORSEMENT_TARGET_UNBOUND",
|
|
34745
|
+
`endorsements[${index}] claim does not reference the target credential id`,
|
|
34746
|
+
["endorsements", index]
|
|
34747
|
+
);
|
|
34748
|
+
}
|
|
34749
|
+
classified.add(credentialIndex);
|
|
34750
|
+
endorsementIndices.push(credentialIndex);
|
|
34751
|
+
}
|
|
34752
|
+
if (classified.size !== members.length) {
|
|
34753
|
+
return classificationFailure2(
|
|
34754
|
+
"UNCLASSIFIED_VP_MEMBER",
|
|
34755
|
+
"every presentation member must be classified exactly once",
|
|
34756
|
+
["presentation", "verifiableCredential"]
|
|
34757
|
+
);
|
|
34758
|
+
}
|
|
34759
|
+
return {
|
|
34760
|
+
ok: true,
|
|
34761
|
+
classification: { selectedIndices, endorsementIndices, memberCount: members.length }
|
|
34762
|
+
};
|
|
34763
|
+
}, "classifyShareManifest");
|
|
34764
|
+
var SharePayloadValidator2 = SharePayloadValidatorShape2.superRefine((payload, ctx) => {
|
|
34765
|
+
const result = classifyShareManifest2(payload);
|
|
34766
|
+
if (!result.ok) {
|
|
34140
34767
|
ctx.addIssue({
|
|
34141
34768
|
code: "custom",
|
|
34142
|
-
|
|
34143
|
-
|
|
34769
|
+
message: result.message,
|
|
34770
|
+
path: result.path,
|
|
34771
|
+
params: { shareLinkCode: result.code }
|
|
34144
34772
|
});
|
|
34145
34773
|
}
|
|
34146
|
-
|
|
34147
|
-
|
|
34148
|
-
|
|
34149
|
-
|
|
34150
|
-
|
|
34151
|
-
|
|
34152
|
-
|
|
34153
|
-
|
|
34154
|
-
|
|
34774
|
+
});
|
|
34775
|
+
var ShareRecoverySelectionValidator2 = external_exports2.object({
|
|
34776
|
+
ref: external_exports2.string().min(1).max(MAX_SHARE_SOURCE_URI_CHARS2),
|
|
34777
|
+
order: external_exports2.number().int().min(0).max(MAX_SELECTED_CREDENTIALS2 - 1)
|
|
34778
|
+
}).strict();
|
|
34779
|
+
var ShareRecoveryEndorsementValidator2 = external_exports2.object({ targetRef: external_exports2.string().min(1).max(MAX_SHARE_SOURCE_URI_CHARS2) }).strict();
|
|
34780
|
+
var ShareRecoveryPlaintextValidator2 = external_exports2.object({
|
|
34781
|
+
protocol: external_exports2.literal(SHARE_RECOVERY_PROTOCOL2),
|
|
34782
|
+
shareId: ShareLinkIdValidator2,
|
|
34783
|
+
ownerProfileId: external_exports2.string().min(1).max(128),
|
|
34784
|
+
createdAt: external_exports2.iso.datetime(),
|
|
34785
|
+
latest: external_exports2.object({ contentVersion: safeVersion2, key: ShareContentKeyValidator2 }).strict(),
|
|
34786
|
+
selection: ShareRecoverySelectionValidator2.array().min(1).max(MAX_SELECTED_CREDENTIALS2),
|
|
34787
|
+
endorsements: ShareRecoveryEndorsementValidator2.array().max(MAX_ENDORSEMENTS2).default([])
|
|
34788
|
+
}).strict().superRefine((recovery, ctx) => {
|
|
34789
|
+
const orders = /* @__PURE__ */ new Set();
|
|
34790
|
+
recovery.selection.forEach((entry, index) => {
|
|
34791
|
+
if (entry.order >= recovery.selection.length) {
|
|
34155
34792
|
ctx.addIssue({
|
|
34156
34793
|
code: "custom",
|
|
34157
|
-
|
|
34158
|
-
|
|
34794
|
+
message: "order must be within the selection bounds",
|
|
34795
|
+
path: ["selection", index, "order"]
|
|
34159
34796
|
});
|
|
34160
34797
|
}
|
|
34161
|
-
if (
|
|
34798
|
+
if (orders.has(entry.order)) {
|
|
34162
34799
|
ctx.addIssue({
|
|
34163
34800
|
code: "custom",
|
|
34164
|
-
|
|
34165
|
-
|
|
34801
|
+
message: "order must be unique within the selection",
|
|
34802
|
+
path: ["selection", index, "order"]
|
|
34166
34803
|
});
|
|
34167
34804
|
}
|
|
34805
|
+
orders.add(entry.order);
|
|
34806
|
+
});
|
|
34807
|
+
});
|
|
34808
|
+
var ShareOwnerRecoveryValidator2 = JWEValidator2.refine(
|
|
34809
|
+
(value) => utf8ByteLength2(JSON.stringify(value)) <= MAX_SHARE_RECOVERY_JWE_BYTES2,
|
|
34810
|
+
{ message: `serialized recovery JWE must be at most ${MAX_SHARE_RECOVERY_JWE_BYTES2} bytes` }
|
|
34811
|
+
);
|
|
34812
|
+
var ShareLinkStatusValidator2 = external_exports2.enum(["pending", "active", "stopped"]);
|
|
34813
|
+
var ShareContentStateValidator2 = external_exports2.enum(["staging", "finalized", "content_missing"]);
|
|
34814
|
+
var ShareLinkValidator2 = external_exports2.object({
|
|
34815
|
+
id: ShareLinkIdValidator2,
|
|
34816
|
+
title: external_exports2.string().min(1).max(120),
|
|
34817
|
+
note: external_exports2.string().max(500).optional(),
|
|
34818
|
+
selectedCount: external_exports2.number().int().min(1).max(MAX_SELECTED_CREDENTIALS2),
|
|
34819
|
+
version: safeVersion2,
|
|
34820
|
+
contentVersion: safeVersion2,
|
|
34821
|
+
status: ShareLinkStatusValidator2,
|
|
34822
|
+
contentState: ShareContentStateValidator2,
|
|
34823
|
+
createdAt: external_exports2.iso.datetime(),
|
|
34824
|
+
updatedAt: external_exports2.iso.datetime(),
|
|
34825
|
+
expiresAt: external_exports2.iso.datetime().nullable(),
|
|
34826
|
+
stoppedAt: external_exports2.iso.datetime().nullable(),
|
|
34827
|
+
lastViewedAt: external_exports2.iso.datetime().nullable(),
|
|
34828
|
+
viewCount: external_exports2.number().int().min(0).optional(),
|
|
34829
|
+
passcodeProtected: external_exports2.boolean(),
|
|
34830
|
+
notifyOnView: external_exports2.boolean(),
|
|
34831
|
+
minorPolicy: external_exports2.object({
|
|
34832
|
+
isMinor: external_exports2.boolean().nullable(),
|
|
34833
|
+
policyResolved: external_exports2.boolean(),
|
|
34834
|
+
defaultExpiryDays: external_exports2.union([external_exports2.literal(30), external_exports2.literal(365)]),
|
|
34835
|
+
viewCountingEnabled: external_exports2.boolean()
|
|
34836
|
+
}),
|
|
34837
|
+
/**
|
|
34838
|
+
* Guarded application/API URL for the content. Optional because owner APIs in
|
|
34839
|
+
* D1 have no public resolve/content endpoint yet; it must never be a
|
|
34840
|
+
* LearnCloud object URL or carry a fabricated decryption key.
|
|
34841
|
+
*/
|
|
34842
|
+
contentUrl: external_exports2.string().optional()
|
|
34843
|
+
});
|
|
34844
|
+
var clientRequestId2 = external_exports2.string().uuid();
|
|
34845
|
+
var CreateShareLinkInputValidator2 = external_exports2.object({
|
|
34846
|
+
id: ShareLinkIdValidator2,
|
|
34847
|
+
clientRequestId: clientRequestId2,
|
|
34848
|
+
title: external_exports2.string().min(1).max(120),
|
|
34849
|
+
note: external_exports2.string().max(500).optional(),
|
|
34850
|
+
expiresAt: external_exports2.iso.datetime().nullable().optional(),
|
|
34851
|
+
passcode: external_exports2.string().min(8).max(64).optional(),
|
|
34852
|
+
notifyOnView: external_exports2.boolean().default(false),
|
|
34853
|
+
selectedCount: external_exports2.number().int().min(1).max(MAX_SELECTED_CREDENTIALS2),
|
|
34854
|
+
contentVersion: external_exports2.literal(1),
|
|
34855
|
+
envelope: ShareEnvelopeValidator2,
|
|
34856
|
+
ownerEncryptedRecovery: ShareOwnerRecoveryValidator2
|
|
34857
|
+
}).strict();
|
|
34858
|
+
var UpdateShareLinkInputValidator2 = external_exports2.object({
|
|
34859
|
+
id: ShareLinkIdValidator2,
|
|
34860
|
+
expectedVersion: safeVersion2,
|
|
34861
|
+
clientRequestId: clientRequestId2,
|
|
34862
|
+
title: external_exports2.string().min(1).max(120).optional(),
|
|
34863
|
+
note: external_exports2.string().max(500).nullable().optional(),
|
|
34864
|
+
expiresAt: external_exports2.iso.datetime().nullable().optional(),
|
|
34865
|
+
/** Omitted preserves the current passcode, null removes it, and a string replaces it. */
|
|
34866
|
+
passcode: external_exports2.string().min(8).max(64).nullable().optional(),
|
|
34867
|
+
notifyOnView: external_exports2.boolean().optional(),
|
|
34868
|
+
contentVersion: safeVersion2.optional(),
|
|
34869
|
+
selectedCount: external_exports2.number().int().min(1).max(MAX_SELECTED_CREDENTIALS2).optional(),
|
|
34870
|
+
envelope: ShareEnvelopeValidator2.optional(),
|
|
34871
|
+
ownerEncryptedRecovery: ShareOwnerRecoveryValidator2.optional()
|
|
34872
|
+
}).strict().superRefine((value, ctx) => {
|
|
34873
|
+
const provided = [
|
|
34874
|
+
value.contentVersion,
|
|
34875
|
+
value.selectedCount,
|
|
34876
|
+
value.envelope,
|
|
34877
|
+
value.ownerEncryptedRecovery
|
|
34878
|
+
].filter((field) => field !== void 0).length;
|
|
34879
|
+
if (provided !== 0 && provided !== 4) {
|
|
34880
|
+
ctx.addIssue({
|
|
34881
|
+
code: "custom",
|
|
34882
|
+
message: "content replacement requires contentVersion, selectedCount, envelope and ownerEncryptedRecovery together"
|
|
34883
|
+
});
|
|
34168
34884
|
}
|
|
34169
34885
|
});
|
|
34170
|
-
var
|
|
34171
|
-
|
|
34172
|
-
|
|
34173
|
-
"
|
|
34174
|
-
|
|
34175
|
-
|
|
34886
|
+
var ShareLinkIdInputValidator2 = external_exports2.object({ id: ShareLinkIdValidator2 }).strict();
|
|
34887
|
+
var ShareLinkOperationKeyInputValidator2 = external_exports2.object({ id: ShareLinkIdValidator2, operationId: external_exports2.string().uuid() }).strict();
|
|
34888
|
+
var ShareLinkOwnerCommitOutputValidator2 = external_exports2.discriminatedUnion("status", [
|
|
34889
|
+
external_exports2.object({ status: external_exports2.literal("completed"), share: ShareLinkValidator2 }).strict(),
|
|
34890
|
+
external_exports2.object({
|
|
34891
|
+
status: external_exports2.literal("pending"),
|
|
34892
|
+
id: ShareLinkIdValidator2,
|
|
34893
|
+
operationId: external_exports2.string().uuid()
|
|
34894
|
+
}).strict()
|
|
34176
34895
|
]);
|
|
34177
|
-
var
|
|
34178
|
-
|
|
34179
|
-
|
|
34180
|
-
|
|
34181
|
-
|
|
34182
|
-
|
|
34183
|
-
|
|
34184
|
-
|
|
34185
|
-
publishedAt: external_exports2.string().min(1),
|
|
34186
|
-
effectiveAt: external_exports2.string().optional(),
|
|
34187
|
-
etag: external_exports2.string().optional(),
|
|
34188
|
-
signingMode: CredentialRefreshSigningModeValidator2.optional(),
|
|
34189
|
-
updateSummary: external_exports2.string().optional()
|
|
34190
|
-
});
|
|
34191
|
-
var GetCredentialRefreshHistoryInputValidator2 = external_exports2.object({
|
|
34192
|
-
refreshId: external_exports2.string().min(1),
|
|
34193
|
-
cursor: external_exports2.string().optional(),
|
|
34194
|
-
limit: external_exports2.number().int().positive().optional()
|
|
34195
|
-
});
|
|
34196
|
-
var GetCredentialRefreshHistoryResultValidator2 = external_exports2.object({
|
|
34197
|
-
records: CredentialRefreshVersionMetadataValidator2.array(),
|
|
34198
|
-
hasMore: external_exports2.boolean(),
|
|
34199
|
-
cursor: external_exports2.string().optional()
|
|
34200
|
-
});
|
|
34201
|
-
var CredentialRefreshChallengeValidator2 = external_exports2.object({
|
|
34202
|
-
challenge: external_exports2.string().min(1),
|
|
34203
|
-
expiresAt: external_exports2.string().min(1),
|
|
34204
|
-
domain: external_exports2.string().optional(),
|
|
34205
|
-
scheme: external_exports2.literal("LearnCardDIDAuth").optional()
|
|
34206
|
-
});
|
|
34207
|
-
var PublicCredentialRefreshEnvelopeValidator2 = external_exports2.object({
|
|
34208
|
-
format: external_exports2.literal("vc"),
|
|
34209
|
-
credential: VCValidator2,
|
|
34210
|
-
etag: external_exports2.string().optional()
|
|
34211
|
-
});
|
|
34212
|
-
var JweCredentialRefreshEnvelopeValidator2 = external_exports2.object({
|
|
34213
|
-
format: external_exports2.literal("jwe"),
|
|
34214
|
-
jwe: JWEValidator2,
|
|
34215
|
-
etag: external_exports2.string().optional(),
|
|
34216
|
-
/** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
|
|
34217
|
-
version: external_exports2.number().int().positive().optional()
|
|
34218
|
-
});
|
|
34219
|
-
var CredentialRefreshResponseEnvelopeValidator2 = external_exports2.discriminatedUnion("format", [
|
|
34220
|
-
PublicCredentialRefreshEnvelopeValidator2,
|
|
34221
|
-
JweCredentialRefreshEnvelopeValidator2
|
|
34896
|
+
var ShareLinkOwnerStatusOutputValidator2 = external_exports2.discriminatedUnion("status", [
|
|
34897
|
+
external_exports2.object({ status: external_exports2.literal("found"), share: ShareLinkValidator2 }).strict(),
|
|
34898
|
+
external_exports2.object({
|
|
34899
|
+
status: external_exports2.literal("pending"),
|
|
34900
|
+
id: ShareLinkIdValidator2,
|
|
34901
|
+
operationId: external_exports2.string().uuid()
|
|
34902
|
+
}).strict(),
|
|
34903
|
+
external_exports2.object({ status: external_exports2.literal("not_found"), id: ShareLinkIdValidator2 }).strict()
|
|
34222
34904
|
]);
|
|
34223
|
-
var
|
|
34224
|
-
|
|
34225
|
-
|
|
34226
|
-
|
|
34227
|
-
|
|
34228
|
-
|
|
34229
|
-
|
|
34230
|
-
|
|
34231
|
-
|
|
34232
|
-
|
|
34233
|
-
|
|
34234
|
-
|
|
34905
|
+
var ShareLinkOwnerRecoveryOutputValidator2 = external_exports2.object({ recovery: ShareOwnerRecoveryValidator2 }).strict();
|
|
34906
|
+
var ShareLinkOwnerContentOutputValidator2 = external_exports2.object({
|
|
34907
|
+
id: ShareLinkIdValidator2,
|
|
34908
|
+
contentVersion: safeVersion2,
|
|
34909
|
+
envelope: ShareEnvelopeValidator2
|
|
34910
|
+
}).strict();
|
|
34911
|
+
var ResolveShareLinkInputValidator2 = external_exports2.object({
|
|
34912
|
+
id: ShareLinkIdValidator2,
|
|
34913
|
+
/** Sent only in a POST body; it must never be placed in a share URL. */
|
|
34914
|
+
passcode: external_exports2.string().min(4).max(64).optional()
|
|
34915
|
+
}).strict();
|
|
34916
|
+
var ShareLinkPublicStateValidator2 = external_exports2.discriminatedUnion("state", [
|
|
34917
|
+
external_exports2.object({
|
|
34918
|
+
state: external_exports2.literal("passcode_required"),
|
|
34919
|
+
id: ShareLinkIdValidator2
|
|
34920
|
+
}).strict(),
|
|
34921
|
+
external_exports2.object({ state: external_exports2.literal("try_later"), id: ShareLinkIdValidator2 }).strict(),
|
|
34922
|
+
external_exports2.object({
|
|
34923
|
+
state: external_exports2.literal("active"),
|
|
34924
|
+
id: ShareLinkIdValidator2,
|
|
34925
|
+
title: external_exports2.string().max(120),
|
|
34926
|
+
note: external_exports2.string().max(500).optional(),
|
|
34927
|
+
selectedCount: external_exports2.number().int().min(1).max(MAX_SELECTED_CREDENTIALS2),
|
|
34928
|
+
contentVersion: safeVersion2,
|
|
34929
|
+
contentUrl: external_exports2.string(),
|
|
34930
|
+
sharer: external_exports2.object({
|
|
34931
|
+
displayName: external_exports2.string().max(120),
|
|
34932
|
+
avatar: external_exports2.string().max(2048).optional()
|
|
34933
|
+
}),
|
|
34934
|
+
createdAt: external_exports2.iso.datetime(),
|
|
34935
|
+
updatedAt: external_exports2.iso.datetime(),
|
|
34936
|
+
expiresAt: external_exports2.iso.datetime().nullable()
|
|
34937
|
+
}).strict(),
|
|
34938
|
+
external_exports2.object({
|
|
34939
|
+
state: external_exports2.literal("expired"),
|
|
34940
|
+
id: ShareLinkIdValidator2,
|
|
34941
|
+
expiresAt: external_exports2.iso.datetime()
|
|
34942
|
+
}).strict(),
|
|
34943
|
+
external_exports2.object({
|
|
34944
|
+
state: external_exports2.literal("stopped"),
|
|
34945
|
+
id: ShareLinkIdValidator2,
|
|
34946
|
+
stoppedAt: external_exports2.iso.datetime()
|
|
34947
|
+
}).strict(),
|
|
34948
|
+
external_exports2.object({ state: external_exports2.literal("not_found"), id: ShareLinkIdValidator2 }).strict()
|
|
34235
34949
|
]);
|
|
34236
|
-
var
|
|
34237
|
-
|
|
34238
|
-
|
|
34239
|
-
|
|
34240
|
-
|
|
34241
|
-
|
|
34242
|
-
var CredentialRefreshUnchangedResultValidator2 = external_exports2.object({
|
|
34243
|
-
status: external_exports2.literal("unchanged"),
|
|
34244
|
-
checkedAt: external_exports2.string().min(1),
|
|
34245
|
-
etag: external_exports2.string().optional()
|
|
34246
|
-
});
|
|
34247
|
-
var CredentialRefreshUnsupportedResultValidator2 = external_exports2.object({
|
|
34248
|
-
status: external_exports2.literal("unsupported")
|
|
34249
|
-
});
|
|
34250
|
-
var CredentialRefreshFailedResultValidator2 = external_exports2.object({
|
|
34251
|
-
status: external_exports2.literal("failed"),
|
|
34252
|
-
code: CredentialRefreshFailureCodeValidator2,
|
|
34253
|
-
retryable: external_exports2.boolean()
|
|
34950
|
+
var ListShareLinksInputValidator2 = external_exports2.object({
|
|
34951
|
+
limit: external_exports2.number().int().min(1).max(50).default(25),
|
|
34952
|
+
cursor: external_exports2.string().max(512).optional()
|
|
34953
|
+
}).strict();
|
|
34954
|
+
var PaginatedShareLinksValidator2 = PaginationResponseValidator2.extend({
|
|
34955
|
+
records: ShareLinkValidator2.array()
|
|
34254
34956
|
});
|
|
34255
|
-
var
|
|
34256
|
-
|
|
34257
|
-
|
|
34258
|
-
|
|
34259
|
-
|
|
34260
|
-
|
|
34957
|
+
var AcknowledgeViewInputValidator2 = external_exports2.object({
|
|
34958
|
+
receipt: external_exports2.string().min(22).max(128).regex(/^[A-Za-z0-9_-]+$/)
|
|
34959
|
+
}).strict();
|
|
34960
|
+
var AcknowledgeViewOutputValidator2 = external_exports2.object({ ok: external_exports2.literal(true) }).strict();
|
|
34961
|
+
var SHARE_VIEW_RECEIPT_TTL_SECONDS2 = 10 * 60;
|
|
34962
|
+
var ShareLinkPublicContentViewValidator2 = external_exports2.object({
|
|
34963
|
+
id: ShareLinkIdValidator2,
|
|
34964
|
+
contentVersion: safeVersion2,
|
|
34965
|
+
envelope: ShareEnvelopeValidator2,
|
|
34966
|
+
contentUrl: external_exports2.string(),
|
|
34967
|
+
receipt: external_exports2.string().min(22).max(128).regex(/^[A-Za-z0-9_-]+$/)
|
|
34968
|
+
}).strict();
|
|
34261
34969
|
}
|
|
34262
34970
|
});
|
|
34263
34971
|
var require_dist = __commonJS({
|
|
@@ -34553,6 +35261,18 @@ var ImageWithLoadingStateValdator = external_exports.object({
|
|
|
34553
35261
|
});
|
|
34554
35262
|
var import_types2 = __toESM(require_dist());
|
|
34555
35263
|
var import_types22 = __toESM(require_dist());
|
|
35264
|
+
var MANAGED_REFRESH_TYPE_TERM = "LearnCardCredentialRefresh2026";
|
|
35265
|
+
var MANAGED_REFRESH_DID_AUTH_TERM = "LearnCardDIDAuth";
|
|
35266
|
+
var MANAGED_REFRESH_TYPE_IRI = "https://learncard.com/refresh#LearnCardCredentialRefresh2026";
|
|
35267
|
+
var MANAGED_REFRESH_AUTHORIZATION_IRI = "https://purl.imsglobal.org/spec/ob/v3p0#authorization";
|
|
35268
|
+
var MANAGED_REFRESH_DID_AUTH_IRI = "https://docs.learncard.com/definitions#LearnCardDIDAuth";
|
|
35269
|
+
var MANAGED_REFRESH_SERVICE_CONTEXT = {
|
|
35270
|
+
[MANAGED_REFRESH_TYPE_TERM]: MANAGED_REFRESH_TYPE_IRI,
|
|
35271
|
+
authorization: {
|
|
35272
|
+
"@id": MANAGED_REFRESH_AUTHORIZATION_IRI,
|
|
35273
|
+
"@context": { [MANAGED_REFRESH_DID_AUTH_TERM]: MANAGED_REFRESH_DID_AUTH_IRI }
|
|
35274
|
+
}
|
|
35275
|
+
};
|
|
34556
35276
|
var _a4;
|
|
34557
35277
|
var EnvironmentConfigurationError = (_a4 = class extends Error {
|
|
34558
35278
|
constructor(message) {
|
|
@@ -34579,6 +35299,15 @@ var optionalEnvironmentPort = external_exports.preprocess(
|
|
|
34579
35299
|
(value) => value === "" || value === void 0 ? void 0 : value,
|
|
34580
35300
|
environmentPort.optional()
|
|
34581
35301
|
);
|
|
35302
|
+
var DEFAULT_MAX_CANONICAL_BYTES = 2 * 1024 * 1024;
|
|
35303
|
+
var _a5;
|
|
35304
|
+
var ShareContentCanonicalizationError = (_a5 = class extends Error {
|
|
35305
|
+
constructor(message) {
|
|
35306
|
+
super(message);
|
|
35307
|
+
this.code = "UNSUPPORTED_REQUEST_VALUE";
|
|
35308
|
+
this.name = "ShareContentCanonicalizationError";
|
|
35309
|
+
}
|
|
35310
|
+
}, __name(_a5, "ShareContentCanonicalizationError"), __name2(_a5, "ShareContentCanonicalizationError"), _a5);
|
|
34582
35311
|
var unwrapBoostCredential = /* @__PURE__ */ __name2((vc) => {
|
|
34583
35312
|
if (vc?.type?.includes("CertifiedBoostCredential") && vc?.boostCredential) {
|
|
34584
35313
|
return vc.boostCredential;
|
|
@@ -35175,6 +35904,204 @@ var StringQuery = external_exports.union([
|
|
|
35175
35904
|
$or: BaseStringQuery.array()
|
|
35176
35905
|
})
|
|
35177
35906
|
]);
|
|
35907
|
+
var LearnCardRefreshAuthorizationValidator = external_exports.object({ type: external_exports.literal("LearnCardDIDAuth") }).catchall(external_exports.any());
|
|
35908
|
+
var ManagedCredentialRefreshServiceValidator = external_exports.object({
|
|
35909
|
+
id: external_exports.string().min(1),
|
|
35910
|
+
type: external_exports.literal("LearnCardCredentialRefresh2026"),
|
|
35911
|
+
authorization: LearnCardRefreshAuthorizationValidator.optional()
|
|
35912
|
+
}).catchall(external_exports.any());
|
|
35913
|
+
var StandardCredentialRefreshServiceValidator = external_exports.object({
|
|
35914
|
+
id: external_exports.string().min(1),
|
|
35915
|
+
type: external_exports.literal("1EdTechCredentialRefresh")
|
|
35916
|
+
}).catchall(external_exports.any());
|
|
35917
|
+
var SupportedCredentialRefreshServiceValidator = external_exports.union([
|
|
35918
|
+
ManagedCredentialRefreshServiceValidator,
|
|
35919
|
+
StandardCredentialRefreshServiceValidator
|
|
35920
|
+
]);
|
|
35921
|
+
var AllocateCredentialRefreshInputValidator = external_exports.object({
|
|
35922
|
+
holder: external_exports.object({
|
|
35923
|
+
profileId: external_exports.string().optional(),
|
|
35924
|
+
did: external_exports.string().min(1)
|
|
35925
|
+
}),
|
|
35926
|
+
credentialId: external_exports.string().min(1)
|
|
35927
|
+
});
|
|
35928
|
+
var AllocateCredentialRefreshResultValidator = external_exports.object({
|
|
35929
|
+
refreshId: external_exports.string().min(1),
|
|
35930
|
+
refreshService: ManagedCredentialRefreshServiceValidator.extend({
|
|
35931
|
+
authorization: LearnCardRefreshAuthorizationValidator
|
|
35932
|
+
})
|
|
35933
|
+
});
|
|
35934
|
+
var ManagedCredentialRefreshReceiptValidator = external_exports.object({
|
|
35935
|
+
refreshId: external_exports.string().min(1),
|
|
35936
|
+
refreshService: ManagedCredentialRefreshServiceValidator,
|
|
35937
|
+
credentialId: external_exports.string().min(1),
|
|
35938
|
+
issuerDid: external_exports.string().min(1),
|
|
35939
|
+
holderDid: external_exports.string().min(1),
|
|
35940
|
+
credentialStatus: CredentialStatusValidator.or(
|
|
35941
|
+
CredentialStatusValidator.array()
|
|
35942
|
+
).optional()
|
|
35943
|
+
}).strip();
|
|
35944
|
+
var InboxCredentialRefreshReceiptValidator = ManagedCredentialRefreshReceiptValidator.omit(
|
|
35945
|
+
{ holderDid: true }
|
|
35946
|
+
).extend({ holderDid: external_exports.string().min(1).optional() });
|
|
35947
|
+
var CredentialRefreshSigningModeValidator = external_exports.enum(["issuer-signed", "signing-authority"]);
|
|
35948
|
+
var PublishCredentialRefreshBaseFields = {
|
|
35949
|
+
refreshId: external_exports.string().min(1),
|
|
35950
|
+
notifyHolder: external_exports.boolean().optional(),
|
|
35951
|
+
updateSummary: external_exports.string().optional(),
|
|
35952
|
+
idempotencyKey: external_exports.string().optional()
|
|
35953
|
+
};
|
|
35954
|
+
var PublishIssuerSignedRefreshValidator = external_exports.object({
|
|
35955
|
+
...PublishCredentialRefreshBaseFields,
|
|
35956
|
+
mode: external_exports.literal("issuer-signed"),
|
|
35957
|
+
signedCredential: VCValidator
|
|
35958
|
+
});
|
|
35959
|
+
var PublishSigningAuthorityRefreshValidator = external_exports.object({
|
|
35960
|
+
...PublishCredentialRefreshBaseFields,
|
|
35961
|
+
mode: external_exports.literal("signing-authority"),
|
|
35962
|
+
credential: UnsignedVCValidator,
|
|
35963
|
+
signingAuthority: external_exports.object({
|
|
35964
|
+
type: external_exports.string().min(1)
|
|
35965
|
+
}).catchall(external_exports.any())
|
|
35966
|
+
});
|
|
35967
|
+
var PublishCredentialRefreshInputValidator = external_exports.object({
|
|
35968
|
+
...PublishCredentialRefreshBaseFields,
|
|
35969
|
+
mode: CredentialRefreshSigningModeValidator,
|
|
35970
|
+
signedCredential: VCValidator.optional(),
|
|
35971
|
+
credential: UnsignedVCValidator.optional(),
|
|
35972
|
+
signingAuthority: external_exports.object({
|
|
35973
|
+
type: external_exports.string().min(1)
|
|
35974
|
+
}).catchall(external_exports.any()).optional()
|
|
35975
|
+
}).superRefine((input, ctx) => {
|
|
35976
|
+
if (input.mode === "issuer-signed" && !input.signedCredential) {
|
|
35977
|
+
ctx.addIssue({
|
|
35978
|
+
code: "custom",
|
|
35979
|
+
path: ["signedCredential"],
|
|
35980
|
+
message: "signedCredential is required for issuer-signed publication"
|
|
35981
|
+
});
|
|
35982
|
+
}
|
|
35983
|
+
if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
|
|
35984
|
+
ctx.addIssue({
|
|
35985
|
+
code: "custom",
|
|
35986
|
+
path: ["mode"],
|
|
35987
|
+
message: "issuer-signed publication cannot include signing-authority fields"
|
|
35988
|
+
});
|
|
35989
|
+
}
|
|
35990
|
+
if (input.mode === "signing-authority") {
|
|
35991
|
+
if (input.signedCredential !== void 0) {
|
|
35992
|
+
ctx.addIssue({
|
|
35993
|
+
code: "custom",
|
|
35994
|
+
path: ["signedCredential"],
|
|
35995
|
+
message: "signing-authority publication cannot include signedCredential"
|
|
35996
|
+
});
|
|
35997
|
+
}
|
|
35998
|
+
if (!input.credential) {
|
|
35999
|
+
ctx.addIssue({
|
|
36000
|
+
code: "custom",
|
|
36001
|
+
path: ["credential"],
|
|
36002
|
+
message: "credential is required for signing-authority publication"
|
|
36003
|
+
});
|
|
36004
|
+
}
|
|
36005
|
+
if (!input.signingAuthority) {
|
|
36006
|
+
ctx.addIssue({
|
|
36007
|
+
code: "custom",
|
|
36008
|
+
path: ["signingAuthority"],
|
|
36009
|
+
message: "signingAuthority is required for signing-authority publication"
|
|
36010
|
+
});
|
|
36011
|
+
}
|
|
36012
|
+
}
|
|
36013
|
+
});
|
|
36014
|
+
var PublishCredentialRefreshNotificationValidator = external_exports.enum([
|
|
36015
|
+
"queued",
|
|
36016
|
+
"suppressed",
|
|
36017
|
+
"not-applicable",
|
|
36018
|
+
/** Publication succeeded, but the post-commit notification enqueue must be retried. */
|
|
36019
|
+
"delivery-failed"
|
|
36020
|
+
]);
|
|
36021
|
+
var PublishCredentialRefreshResultValidator = external_exports.object({
|
|
36022
|
+
refreshId: external_exports.string().min(1),
|
|
36023
|
+
version: external_exports.number().int().positive(),
|
|
36024
|
+
publishedAt: external_exports.string().min(1),
|
|
36025
|
+
notification: PublishCredentialRefreshNotificationValidator
|
|
36026
|
+
});
|
|
36027
|
+
var CredentialRefreshVersionMetadataValidator = external_exports.object({
|
|
36028
|
+
version: external_exports.number().int().positive(),
|
|
36029
|
+
publishedAt: external_exports.string().min(1),
|
|
36030
|
+
effectiveAt: external_exports.string().optional(),
|
|
36031
|
+
etag: external_exports.string().optional(),
|
|
36032
|
+
signingMode: CredentialRefreshSigningModeValidator.optional(),
|
|
36033
|
+
updateSummary: external_exports.string().optional()
|
|
36034
|
+
});
|
|
36035
|
+
var GetCredentialRefreshHistoryInputValidator = external_exports.object({
|
|
36036
|
+
refreshId: external_exports.string().min(1),
|
|
36037
|
+
cursor: external_exports.string().optional(),
|
|
36038
|
+
limit: external_exports.number().int().positive().optional()
|
|
36039
|
+
});
|
|
36040
|
+
var GetCredentialRefreshHistoryResultValidator = external_exports.object({
|
|
36041
|
+
records: CredentialRefreshVersionMetadataValidator.array(),
|
|
36042
|
+
hasMore: external_exports.boolean(),
|
|
36043
|
+
cursor: external_exports.string().optional()
|
|
36044
|
+
});
|
|
36045
|
+
var CredentialRefreshChallengeValidator = external_exports.object({
|
|
36046
|
+
challenge: external_exports.string().min(1),
|
|
36047
|
+
expiresAt: external_exports.string().min(1),
|
|
36048
|
+
domain: external_exports.string().optional(),
|
|
36049
|
+
scheme: external_exports.literal("LearnCardDIDAuth").optional()
|
|
36050
|
+
});
|
|
36051
|
+
var PublicCredentialRefreshEnvelopeValidator = external_exports.object({
|
|
36052
|
+
format: external_exports.literal("vc"),
|
|
36053
|
+
credential: VCValidator,
|
|
36054
|
+
etag: external_exports.string().optional()
|
|
36055
|
+
});
|
|
36056
|
+
var JweCredentialRefreshEnvelopeValidator = external_exports.object({
|
|
36057
|
+
format: external_exports.literal("jwe"),
|
|
36058
|
+
jwe: JWEValidator,
|
|
36059
|
+
etag: external_exports.string().optional(),
|
|
36060
|
+
/** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
|
|
36061
|
+
version: external_exports.number().int().positive().optional()
|
|
36062
|
+
});
|
|
36063
|
+
var CredentialRefreshResponseEnvelopeValidator = external_exports.discriminatedUnion("format", [
|
|
36064
|
+
PublicCredentialRefreshEnvelopeValidator,
|
|
36065
|
+
JweCredentialRefreshEnvelopeValidator
|
|
36066
|
+
]);
|
|
36067
|
+
var CredentialRefreshFailureCodeValidator = external_exports.enum([
|
|
36068
|
+
"UNAVAILABLE",
|
|
36069
|
+
"TIMEOUT",
|
|
36070
|
+
"UNSUPPORTED_SERVICE",
|
|
36071
|
+
"UNAUTHORIZED",
|
|
36072
|
+
"MALFORMED_RESPONSE",
|
|
36073
|
+
"INVALID_PROOF",
|
|
36074
|
+
"ISSUER_MISMATCH",
|
|
36075
|
+
"ID_MISMATCH",
|
|
36076
|
+
"ROLLBACK",
|
|
36077
|
+
"REVOKED",
|
|
36078
|
+
"UNSAFE_ENDPOINT"
|
|
36079
|
+
]);
|
|
36080
|
+
var CredentialRefreshUpdatedResultValidator = external_exports.object({
|
|
36081
|
+
status: external_exports.literal("updated"),
|
|
36082
|
+
credential: VCValidator,
|
|
36083
|
+
etag: external_exports.string().optional(),
|
|
36084
|
+
managedVersion: external_exports.number().int().positive().optional()
|
|
36085
|
+
});
|
|
36086
|
+
var CredentialRefreshUnchangedResultValidator = external_exports.object({
|
|
36087
|
+
status: external_exports.literal("unchanged"),
|
|
36088
|
+
checkedAt: external_exports.string().min(1),
|
|
36089
|
+
etag: external_exports.string().optional()
|
|
36090
|
+
});
|
|
36091
|
+
var CredentialRefreshUnsupportedResultValidator = external_exports.object({
|
|
36092
|
+
status: external_exports.literal("unsupported")
|
|
36093
|
+
});
|
|
36094
|
+
var CredentialRefreshFailedResultValidator = external_exports.object({
|
|
36095
|
+
status: external_exports.literal("failed"),
|
|
36096
|
+
code: CredentialRefreshFailureCodeValidator,
|
|
36097
|
+
retryable: external_exports.boolean()
|
|
36098
|
+
});
|
|
36099
|
+
var CredentialRefreshResultValidator = external_exports.discriminatedUnion("status", [
|
|
36100
|
+
CredentialRefreshUpdatedResultValidator,
|
|
36101
|
+
CredentialRefreshUnchangedResultValidator,
|
|
36102
|
+
CredentialRefreshUnsupportedResultValidator,
|
|
36103
|
+
CredentialRefreshFailedResultValidator
|
|
36104
|
+
]);
|
|
35178
36105
|
var LCNProfileDisplayValidator = external_exports.object({
|
|
35179
36106
|
backgroundColor: external_exports.string().optional(),
|
|
35180
36107
|
backgroundImage: external_exports.string().optional(),
|
|
@@ -35510,7 +36437,13 @@ var SendBoostInputValidator = external_exports.object({
|
|
|
35510
36437
|
"Options for email/phone recipients (Universal Inbox)"
|
|
35511
36438
|
),
|
|
35512
36439
|
templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
35513
|
-
integrationId: external_exports.string().optional().describe("Integration ID for activity tracking")
|
|
36440
|
+
integrationId: external_exports.string().optional().describe("Integration ID for activity tracking"),
|
|
36441
|
+
refresh: external_exports.boolean().optional().describe(
|
|
36442
|
+
"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."
|
|
36443
|
+
),
|
|
36444
|
+
idempotencyKey: external_exports.string().min(1).max(200).optional().describe(
|
|
36445
|
+
"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."
|
|
36446
|
+
)
|
|
35514
36447
|
}).refine((data) => data.templateUri || data.template || data.signedCredential, {
|
|
35515
36448
|
message: "Either templateUri, template, or signedCredential must be provided.",
|
|
35516
36449
|
path: ["templateUri"]
|
|
@@ -35525,8 +36458,12 @@ var SendBoostInputValidator = external_exports.object({
|
|
|
35525
36458
|
message: "guardianEmail must differ from recipient (self-approval not allowed)",
|
|
35526
36459
|
path: ["options", "guardianEmail"]
|
|
35527
36460
|
}
|
|
35528
|
-
)
|
|
36461
|
+
).refine((data) => !data.idempotencyKey || data.refresh === true, {
|
|
36462
|
+
message: "idempotencyKey is only supported with refresh: true.",
|
|
36463
|
+
path: ["idempotencyKey"]
|
|
36464
|
+
});
|
|
35529
36465
|
var SendInboxResponseValidator = external_exports.object({
|
|
36466
|
+
refresh: InboxCredentialRefreshReceiptValidator.optional(),
|
|
35530
36467
|
issuanceId: external_exports.string(),
|
|
35531
36468
|
status: external_exports.enum(["PENDING", "ISSUED", "EXPIRED", "DELIVERED", "CLAIMED"]),
|
|
35532
36469
|
claimUrl: external_exports.string().url().optional().describe("Present when suppressDelivery=true"),
|
|
@@ -35541,8 +36478,34 @@ var SendBoostResponseValidator = external_exports.object({
|
|
|
35541
36478
|
activityId: external_exports.string().describe("Links to the activity lifecycle for this issuance"),
|
|
35542
36479
|
inbox: SendInboxResponseValidator.optional().describe(
|
|
35543
36480
|
"Present when sent via email/phone (Universal Inbox)"
|
|
36481
|
+
),
|
|
36482
|
+
refresh: ManagedCredentialRefreshReceiptValidator.optional().describe(
|
|
36483
|
+
"Present when managed refresh was requested: issuance metadata the issuer keeps to publish future updates"
|
|
35544
36484
|
)
|
|
35545
36485
|
});
|
|
36486
|
+
var PrepareRefreshableSendInputValidator = external_exports.object({
|
|
36487
|
+
recipient: external_exports.string(),
|
|
36488
|
+
templateUri: external_exports.string().optional(),
|
|
36489
|
+
template: SendBoostTemplateValidator.optional(),
|
|
36490
|
+
contractUri: external_exports.string().optional(),
|
|
36491
|
+
templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
36492
|
+
integrationId: external_exports.string().optional(),
|
|
36493
|
+
/** Credential ID to allocate for; generated server-side when omitted. */
|
|
36494
|
+
credentialId: external_exports.string().min(1).optional(),
|
|
36495
|
+
idempotencyKey: external_exports.string().min(1).max(200).optional()
|
|
36496
|
+
}).refine((data) => Boolean(data.templateUri) !== Boolean(data.template), {
|
|
36497
|
+
message: "Provide exactly one of templateUri or template."
|
|
36498
|
+
});
|
|
36499
|
+
var PrepareRefreshableSendResultValidator = external_exports.object({
|
|
36500
|
+
boostUri: external_exports.string(),
|
|
36501
|
+
credentialId: external_exports.string(),
|
|
36502
|
+
refreshId: external_exports.string(),
|
|
36503
|
+
refreshService: ManagedCredentialRefreshServiceValidator,
|
|
36504
|
+
/** The DID to use as credentialSubject.id (recipient DID, or the profile's did:web). */
|
|
36505
|
+
holderDid: external_exports.string(),
|
|
36506
|
+
/** Present when this idempotencyKey already completed: return it without signing. */
|
|
36507
|
+
completed: SendBoostResponseValidator.optional()
|
|
36508
|
+
});
|
|
35546
36509
|
var SendInputValidator = external_exports.discriminatedUnion("type", [SendBoostInputValidator]);
|
|
35547
36510
|
var SendResponseValidator = external_exports.discriminatedUnion("type", [SendBoostResponseValidator]);
|
|
35548
36511
|
var ConsentFlowTermsStatusValidator = external_exports.enum(["live", "stale", "withdrawn"]);
|
|
@@ -35873,6 +36836,7 @@ var AuthGrantValidator = external_exports.object({
|
|
|
35873
36836
|
}, "error")
|
|
35874
36837
|
}),
|
|
35875
36838
|
scope: external_exports.string(),
|
|
36839
|
+
actAs: external_exports.string().optional(),
|
|
35876
36840
|
createdAt: external_exports.iso.datetime({ error: "createdAt must be a valid ISO 8601 datetime string" }),
|
|
35877
36841
|
expiresAt: external_exports.iso.datetime({ error: "expiresAt must be a valid ISO 8601 datetime string" }).nullish().optional()
|
|
35878
36842
|
});
|
|
@@ -35944,6 +36908,8 @@ var CreateContactMethodSessionResponseValidator = external_exports.object({
|
|
|
35944
36908
|
sessionJwt: external_exports.string()
|
|
35945
36909
|
});
|
|
35946
36910
|
var InboxCredentialValidator = external_exports.object({
|
|
36911
|
+
refresh: InboxCredentialRefreshReceiptValidator.optional(),
|
|
36912
|
+
refreshId: external_exports.string().optional(),
|
|
35947
36913
|
id: external_exports.string(),
|
|
35948
36914
|
credential: external_exports.string().optional(),
|
|
35949
36915
|
isSigned: external_exports.boolean(),
|
|
@@ -35998,12 +36964,19 @@ var IssueInboxCredentialValidator = external_exports.object({
|
|
|
35998
36964
|
templateUri: external_exports.string().optional().describe(
|
|
35999
36965
|
"URI of a boost template to use for issuance. The boost credential will be resolved and used. Mutually exclusive with credential field."
|
|
36000
36966
|
),
|
|
36967
|
+
refresh: external_exports.boolean().optional().describe(
|
|
36968
|
+
"Allocate managed refresh before signing. Requires unsigned content and a registered signing authority; binds the holder on claim."
|
|
36969
|
+
),
|
|
36970
|
+
idempotencyKey: external_exports.string().min(1).max(200).optional(),
|
|
36001
36971
|
// === OPTIONAL FEATURES ===
|
|
36002
36972
|
// Add major, distinct features at the top level.
|
|
36003
36973
|
//consentRequest: ConsentRequestValidator.optional(),
|
|
36004
36974
|
// === PROCESS CONFIGURATION (Optional) ===
|
|
36005
36975
|
// HOW should this issuance be handled?
|
|
36006
36976
|
configuration: external_exports.object({
|
|
36977
|
+
guardianEmail: external_exports.string().email().optional().describe(
|
|
36978
|
+
"Require approval from this guardian before the recipient can claim. Must differ from the recipient email."
|
|
36979
|
+
),
|
|
36007
36980
|
signingAuthority: IssueInboxSigningAuthorityValidator.optional().describe(
|
|
36008
36981
|
"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."
|
|
36009
36982
|
),
|
|
@@ -36057,17 +37030,130 @@ var IssueInboxCredentialValidator = external_exports.object({
|
|
|
36057
37030
|
}).optional().describe(
|
|
36058
37031
|
"Configuration for the credential issuance. If not provided, the default configuration will be used."
|
|
36059
37032
|
)
|
|
37033
|
+
}).refine((data) => !data.idempotencyKey || data.refresh === true, {
|
|
37034
|
+
message: "idempotencyKey requires refresh: true."
|
|
36060
37035
|
}).refine((data) => data.credential || data.templateUri, {
|
|
36061
37036
|
message: "Either credential or templateUri must be provided.",
|
|
36062
37037
|
path: ["credential"]
|
|
36063
|
-
})
|
|
37038
|
+
}).refine(
|
|
37039
|
+
(data) => !data.configuration?.guardianEmail || data.recipient.type !== "email" || data.configuration.guardianEmail.toLowerCase() !== data.recipient.value.toLowerCase(),
|
|
37040
|
+
{
|
|
37041
|
+
message: "guardianEmail must differ from recipient (self-approval not allowed)",
|
|
37042
|
+
path: ["configuration", "guardianEmail"]
|
|
37043
|
+
}
|
|
37044
|
+
);
|
|
36064
37045
|
var IssueInboxCredentialResponseValidator = external_exports.object({
|
|
37046
|
+
refresh: InboxCredentialRefreshReceiptValidator.optional(),
|
|
36065
37047
|
issuanceId: external_exports.string(),
|
|
36066
37048
|
status: LCNInboxStatusEnumValidator,
|
|
36067
37049
|
recipient: ContactMethodQueryValidator,
|
|
36068
37050
|
claimUrl: external_exports.string().url().optional(),
|
|
36069
37051
|
recipientDid: external_exports.string().optional()
|
|
36070
37052
|
});
|
|
37053
|
+
var InboxBatchConfigurationValidator = IssueInboxCredentialValidator.shape.configuration.unwrap().extend({
|
|
37054
|
+
refresh: IssueInboxCredentialValidator.shape.refresh.describe(
|
|
37055
|
+
"Enable managed refresh by default. An item configuration.refresh overrides this value, including false."
|
|
37056
|
+
),
|
|
37057
|
+
delivery: IssueInboxCredentialValidator.shape.configuration.unwrap().shape.delivery.unwrap().extend({ suppress: external_exports.boolean().optional() }).optional()
|
|
37058
|
+
});
|
|
37059
|
+
var InboxBatchItemConfigurationValidator = InboxBatchConfigurationValidator.extend({
|
|
37060
|
+
guardianEmail: InboxBatchConfigurationValidator.shape.guardianEmail.nullable().describe(
|
|
37061
|
+
"Require guardian approval, or set null to clear a batch-level guardianEmail for this item."
|
|
37062
|
+
)
|
|
37063
|
+
});
|
|
37064
|
+
var IssueInboxCredentialBatchItemValidator = external_exports.object({
|
|
37065
|
+
...IssueInboxCredentialValidator.shape,
|
|
37066
|
+
configuration: InboxBatchItemConfigurationValidator.optional(),
|
|
37067
|
+
idempotencyKey: external_exports.string().max(256).optional()
|
|
37068
|
+
}).refine((data) => data.credential || data.templateUri, {
|
|
37069
|
+
message: "Either credential or templateUri must be provided.",
|
|
37070
|
+
path: ["credential"]
|
|
37071
|
+
}).describe(
|
|
37072
|
+
"One issuance: provide credential or templateUri. Invalid input is rejected at submission with its item index."
|
|
37073
|
+
);
|
|
37074
|
+
var IssueInboxCredentialBatchValidator = external_exports.object({
|
|
37075
|
+
requestId: external_exports.string().min(1).max(256).optional(),
|
|
37076
|
+
items: external_exports.array(IssueInboxCredentialBatchItemValidator).min(1).max(100),
|
|
37077
|
+
configuration: InboxBatchConfigurationValidator.optional()
|
|
37078
|
+
}).superRefine((batch, ctx) => {
|
|
37079
|
+
batch.items.forEach((item, index) => {
|
|
37080
|
+
const itemGuardian = item.configuration?.guardianEmail;
|
|
37081
|
+
const guardian = itemGuardian === null ? void 0 : itemGuardian ?? batch.configuration?.guardianEmail;
|
|
37082
|
+
if (guardian && item.recipient.type === "email" && guardian.toLowerCase() === item.recipient.value.toLowerCase()) {
|
|
37083
|
+
ctx.addIssue({
|
|
37084
|
+
code: "custom",
|
|
37085
|
+
path: ["items", index, "configuration", "guardianEmail"],
|
|
37086
|
+
message: "guardianEmail must differ from recipient (self-approval not allowed)"
|
|
37087
|
+
});
|
|
37088
|
+
}
|
|
37089
|
+
});
|
|
37090
|
+
});
|
|
37091
|
+
var InboxBatchErrorReasonValidator = external_exports.enum([
|
|
37092
|
+
"DUPLICATE_KEY",
|
|
37093
|
+
"IDEMPOTENCY_MISMATCH",
|
|
37094
|
+
"IN_PROGRESS",
|
|
37095
|
+
"UNCONFIRMED"
|
|
37096
|
+
]);
|
|
37097
|
+
var IssueInboxCredentialBatchItemResultValidator = external_exports.discriminatedUnion("success", [
|
|
37098
|
+
IssueInboxCredentialResponseValidator.extend({
|
|
37099
|
+
success: external_exports.literal(true),
|
|
37100
|
+
index: external_exports.number().int().nonnegative(),
|
|
37101
|
+
deduplicated: external_exports.boolean().optional(),
|
|
37102
|
+
guardianStatus: GuardianStatusValidator.optional(),
|
|
37103
|
+
idempotencyKey: external_exports.string().optional()
|
|
37104
|
+
}),
|
|
37105
|
+
external_exports.object({
|
|
37106
|
+
success: external_exports.literal(false),
|
|
37107
|
+
index: external_exports.number().int().nonnegative(),
|
|
37108
|
+
idempotencyKey: external_exports.string().optional(),
|
|
37109
|
+
recipient: ContactMethodQueryValidator.optional(),
|
|
37110
|
+
error: external_exports.object({
|
|
37111
|
+
code: external_exports.string(),
|
|
37112
|
+
message: external_exports.string(),
|
|
37113
|
+
reason: InboxBatchErrorReasonValidator.optional()
|
|
37114
|
+
}),
|
|
37115
|
+
issuanceId: external_exports.string().optional().describe(
|
|
37116
|
+
"Present when issuance completed but replay storage could not be confirmed. Reconcile this issuance; do not issue again with a new key."
|
|
37117
|
+
),
|
|
37118
|
+
claimUrl: external_exports.string().url().optional().describe(
|
|
37119
|
+
"Claim URL of the completed issuance, if available, when replay storage could not be confirmed."
|
|
37120
|
+
)
|
|
37121
|
+
})
|
|
37122
|
+
]);
|
|
37123
|
+
var IssueInboxCredentialBatchResponseValidator = external_exports.object({
|
|
37124
|
+
results: external_exports.array(IssueInboxCredentialBatchItemResultValidator),
|
|
37125
|
+
summary: external_exports.object({
|
|
37126
|
+
total: external_exports.number(),
|
|
37127
|
+
succeeded: external_exports.number(),
|
|
37128
|
+
failed: external_exports.number(),
|
|
37129
|
+
deduplicated: external_exports.number()
|
|
37130
|
+
})
|
|
37131
|
+
});
|
|
37132
|
+
var InboxBatchReceiptValidator = external_exports.object({
|
|
37133
|
+
batchId: external_exports.string(),
|
|
37134
|
+
status: external_exports.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
|
|
37135
|
+
createdAt: external_exports.string()
|
|
37136
|
+
});
|
|
37137
|
+
var InboxBatchStatusValidator = external_exports.object({
|
|
37138
|
+
batchId: external_exports.string(),
|
|
37139
|
+
createdAt: external_exports.string(),
|
|
37140
|
+
done: external_exports.boolean().describe(
|
|
37141
|
+
"True when no queued or processing items remain, including unconfirmed outcomes."
|
|
37142
|
+
),
|
|
37143
|
+
status: external_exports.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
|
|
37144
|
+
items: external_exports.array(
|
|
37145
|
+
external_exports.object({
|
|
37146
|
+
index: external_exports.number().int().nonnegative(),
|
|
37147
|
+
state: external_exports.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
|
|
37148
|
+
result: IssueInboxCredentialBatchItemResultValidator.optional()
|
|
37149
|
+
})
|
|
37150
|
+
),
|
|
37151
|
+
summary: IssueInboxCredentialBatchResponseValidator.shape.summary.extend({
|
|
37152
|
+
completed: external_exports.number(),
|
|
37153
|
+
pending: external_exports.number(),
|
|
37154
|
+
unconfirmed: external_exports.number()
|
|
37155
|
+
})
|
|
37156
|
+
});
|
|
36071
37157
|
var CredentialNameRefValidator = external_exports.object({ name: external_exports.string() }).passthrough();
|
|
36072
37158
|
var ClaimInboxCredentialValidator = external_exports.object({
|
|
36073
37159
|
credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).or(CredentialNameRefValidator).describe("The credential to issue, or a { name } reference to resolve a boost template."),
|
|
@@ -36553,6 +37639,7 @@ var CredentialActivityValidator = external_exports.object({
|
|
|
36553
37639
|
eventType: CredentialActivityEventTypeValidator,
|
|
36554
37640
|
timestamp: external_exports.string(),
|
|
36555
37641
|
actorProfileId: external_exports.string().optional(),
|
|
37642
|
+
onBehalfOf: external_exports.string().optional(),
|
|
36556
37643
|
recipientType: CredentialActivityRecipientTypeValidator,
|
|
36557
37644
|
recipientIdentifier: external_exports.string(),
|
|
36558
37645
|
boostUri: external_exports.string().optional(),
|
|
@@ -36586,14 +37673,20 @@ var CredentialActivityStatsValidator = external_exports.object({
|
|
|
36586
37673
|
failed: external_exports.number(),
|
|
36587
37674
|
claimRate: external_exports.number()
|
|
36588
37675
|
});
|
|
36589
|
-
var
|
|
36590
|
-
var AuthSessionError = (
|
|
37676
|
+
var _a6;
|
|
37677
|
+
var AuthSessionError = (_a6 = class extends Error {
|
|
36591
37678
|
constructor(message, reason) {
|
|
36592
37679
|
super(message);
|
|
36593
37680
|
this.reason = reason;
|
|
36594
37681
|
this.name = "AuthSessionError";
|
|
36595
37682
|
}
|
|
36596
|
-
}, __name(
|
|
37683
|
+
}, __name(_a6, "AuthSessionError"), __name3(_a6, "AuthSessionError"), _a6);
|
|
37684
|
+
var EscrowPinStatusValidator = external_exports.object({
|
|
37685
|
+
state: external_exports.enum(["none", "enabled", "locked", "stale"]),
|
|
37686
|
+
enabled: external_exports.boolean(),
|
|
37687
|
+
attemptsRemaining: external_exports.number().int().nonnegative(),
|
|
37688
|
+
salt: external_exports.string().optional()
|
|
37689
|
+
});
|
|
36597
37690
|
var BITSTRING_STATUS_PURPOSES = ["revocation", "suspension"];
|
|
36598
37691
|
var BitstringStatusPurposeValidator = external_exports.enum(BITSTRING_STATUS_PURPOSES);
|
|
36599
37692
|
var BitstringStatusListEntryValidator = external_exports.object({
|
|
@@ -36702,191 +37795,456 @@ var inAppMessagesFlagValidator = external_exports.object({
|
|
|
36702
37795
|
version: external_exports.number().default(1),
|
|
36703
37796
|
messages: external_exports.array(inAppMessageValidator).default([])
|
|
36704
37797
|
}).passthrough();
|
|
36705
|
-
var
|
|
36706
|
-
var
|
|
36707
|
-
|
|
36708
|
-
|
|
36709
|
-
|
|
36710
|
-
|
|
36711
|
-
var
|
|
36712
|
-
|
|
36713
|
-
|
|
36714
|
-
|
|
36715
|
-
var
|
|
36716
|
-
|
|
36717
|
-
|
|
36718
|
-
|
|
36719
|
-
var
|
|
36720
|
-
|
|
36721
|
-
|
|
36722
|
-
|
|
36723
|
-
}
|
|
36724
|
-
|
|
36725
|
-
});
|
|
36726
|
-
var
|
|
36727
|
-
|
|
36728
|
-
|
|
36729
|
-
|
|
36730
|
-
|
|
36731
|
-
|
|
36732
|
-
|
|
36733
|
-
|
|
36734
|
-
|
|
36735
|
-
|
|
36736
|
-
|
|
36737
|
-
|
|
36738
|
-
}
|
|
36739
|
-
|
|
36740
|
-
|
|
36741
|
-
|
|
36742
|
-
|
|
36743
|
-
|
|
36744
|
-
|
|
36745
|
-
|
|
36746
|
-
|
|
36747
|
-
|
|
36748
|
-
|
|
36749
|
-
|
|
36750
|
-
|
|
36751
|
-
|
|
36752
|
-
|
|
36753
|
-
|
|
36754
|
-
|
|
36755
|
-
|
|
36756
|
-
|
|
36757
|
-
|
|
36758
|
-
|
|
36759
|
-
|
|
36760
|
-
}
|
|
36761
|
-
|
|
36762
|
-
|
|
36763
|
-
|
|
36764
|
-
|
|
36765
|
-
|
|
36766
|
-
|
|
37798
|
+
var SHARE_LINK_ID_BYTES = 16;
|
|
37799
|
+
var SHARE_CONTENT_KEY_BYTES = 32;
|
|
37800
|
+
var SHARE_IV_BYTES = 12;
|
|
37801
|
+
var SHARE_TAG_BYTES = 16;
|
|
37802
|
+
var MAX_SHARE_CIPHERTEXT_BYTES = 512 * 1024;
|
|
37803
|
+
var MAX_SHARE_RECOVERY_JWE_BYTES = 64 * 1024;
|
|
37804
|
+
var MAX_SELECTED_CREDENTIALS = 50;
|
|
37805
|
+
var MAX_ENDORSEMENTS = 200;
|
|
37806
|
+
var MAX_VP_MEMBERS = MAX_SELECTED_CREDENTIALS + MAX_ENDORSEMENTS;
|
|
37807
|
+
var MAX_SHARE_SOURCE_URI_CHARS = 2048;
|
|
37808
|
+
var MAX_SHARE_LINK_REQUEST_BYTES = 1024 * 1024;
|
|
37809
|
+
var SHARE_LINK_PROTOCOL = "lc-share/v1";
|
|
37810
|
+
var SHARE_RECOVERY_PROTOCOL = "lc-share-recovery/v1";
|
|
37811
|
+
var BASE64URL_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
|
37812
|
+
var BASE64URL_LOOKUP = (() => {
|
|
37813
|
+
const table = new Int16Array(128).fill(-1);
|
|
37814
|
+
for (let index = 0; index < BASE64URL_ALPHABET.length; index += 1) {
|
|
37815
|
+
table[BASE64URL_ALPHABET.charCodeAt(index)] = index;
|
|
37816
|
+
}
|
|
37817
|
+
return table;
|
|
37818
|
+
})();
|
|
37819
|
+
var encodeBase64Url = /* @__PURE__ */ __name3((bytes) => {
|
|
37820
|
+
let output = "";
|
|
37821
|
+
for (let index = 0; index < bytes.length; index += 3) {
|
|
37822
|
+
const first = bytes[index];
|
|
37823
|
+
const second = bytes[index + 1];
|
|
37824
|
+
const third = bytes[index + 2];
|
|
37825
|
+
output += BASE64URL_ALPHABET[first >> 2];
|
|
37826
|
+
output += BASE64URL_ALPHABET[(first & 3) << 4 | (second ?? 0) >> 4];
|
|
37827
|
+
if (second === void 0) break;
|
|
37828
|
+
output += BASE64URL_ALPHABET[(second & 15) << 2 | (third ?? 0) >> 6];
|
|
37829
|
+
if (third === void 0) break;
|
|
37830
|
+
output += BASE64URL_ALPHABET[third & 63];
|
|
37831
|
+
}
|
|
37832
|
+
return output;
|
|
37833
|
+
}, "encodeBase64Url");
|
|
37834
|
+
var decodeBase64Url = /* @__PURE__ */ __name3((value) => {
|
|
37835
|
+
if (typeof value !== "string") return null;
|
|
37836
|
+
const output = new Uint8Array(Math.floor(value.length * 6 / 8));
|
|
37837
|
+
let bits = 0;
|
|
37838
|
+
let bitCount = 0;
|
|
37839
|
+
let outputIndex = 0;
|
|
37840
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
37841
|
+
const code = value.charCodeAt(index);
|
|
37842
|
+
const digit = code < 128 ? BASE64URL_LOOKUP[code] : -1;
|
|
37843
|
+
if (digit < 0) return null;
|
|
37844
|
+
bits = bits << 6 | digit;
|
|
37845
|
+
bitCount += 6;
|
|
37846
|
+
if (bitCount >= 8) {
|
|
37847
|
+
bitCount -= 8;
|
|
37848
|
+
output[outputIndex] = bits >> bitCount & 255;
|
|
37849
|
+
outputIndex += 1;
|
|
37850
|
+
}
|
|
37851
|
+
}
|
|
37852
|
+
return output;
|
|
37853
|
+
}, "decodeBase64Url");
|
|
37854
|
+
var isCanonicalBase64Url = /* @__PURE__ */ __name3((value, expectedBytes) => {
|
|
37855
|
+
if (typeof value !== "string") return false;
|
|
37856
|
+
if (expectedBytes !== void 0 && value.length !== Math.ceil(expectedBytes * 4 / 3))
|
|
37857
|
+
return false;
|
|
37858
|
+
const decoded = decodeBase64Url(value);
|
|
37859
|
+
if (decoded === null) return false;
|
|
37860
|
+
if (expectedBytes !== void 0 && decoded.length !== expectedBytes) return false;
|
|
37861
|
+
return encodeBase64Url(decoded) === value;
|
|
37862
|
+
}, "isCanonicalBase64Url");
|
|
37863
|
+
var utf8ByteLength = /* @__PURE__ */ __name3((value) => new TextEncoder().encode(value).length, "utf8ByteLength");
|
|
37864
|
+
var canonicalBase64Url = /* @__PURE__ */ __name3((bytes) => external_exports.string().refine((value) => isCanonicalBase64Url(value, bytes), {
|
|
37865
|
+
message: `must be canonical base64url for exactly ${bytes} bytes`
|
|
37866
|
+
}), "canonicalBase64Url");
|
|
37867
|
+
var ShareLinkIdValidator = canonicalBase64Url(SHARE_LINK_ID_BYTES);
|
|
37868
|
+
var ShareContentKeyValidator = canonicalBase64Url(SHARE_CONTENT_KEY_BYTES);
|
|
37869
|
+
var ShareIvValidator = canonicalBase64Url(SHARE_IV_BYTES);
|
|
37870
|
+
var ShareCiphertextValidator = external_exports.string().refine(
|
|
37871
|
+
(value) => {
|
|
37872
|
+
if (value.length > Math.ceil(MAX_SHARE_CIPHERTEXT_BYTES * 4 / 3)) return false;
|
|
37873
|
+
const decoded = decodeBase64Url(value);
|
|
37874
|
+
if (decoded === null) return false;
|
|
37875
|
+
if (encodeBase64Url(decoded) !== value) return false;
|
|
37876
|
+
return decoded.length >= SHARE_TAG_BYTES && decoded.length <= MAX_SHARE_CIPHERTEXT_BYTES;
|
|
37877
|
+
},
|
|
37878
|
+
{
|
|
37879
|
+
message: `must be canonical base64url decoding to ${SHARE_TAG_BYTES}..${MAX_SHARE_CIPHERTEXT_BYTES} bytes`
|
|
36767
37880
|
}
|
|
36768
|
-
|
|
37881
|
+
);
|
|
37882
|
+
var ShareEnvelopeValidator = external_exports.object({
|
|
37883
|
+
v: external_exports.literal(1),
|
|
37884
|
+
alg: external_exports.literal("A256GCM"),
|
|
37885
|
+
iv: ShareIvValidator,
|
|
37886
|
+
ct: ShareCiphertextValidator
|
|
37887
|
+
}).strict();
|
|
37888
|
+
var safeVersion = external_exports.number().int().min(1).max(2 ** 31 - 1);
|
|
37889
|
+
var safeCredentialIndex = external_exports.number().int().min(0).max(MAX_VP_MEMBERS - 1);
|
|
37890
|
+
var ShareSelectionEntryValidator = external_exports.object({ credentialIndex: safeCredentialIndex }).strict();
|
|
37891
|
+
var ShareEndorsementEntryValidator = external_exports.object({ credentialIndex: safeCredentialIndex, targetCredentialIndex: safeCredentialIndex }).strict();
|
|
37892
|
+
var ShareSharerValidator = external_exports.object({
|
|
37893
|
+
profileId: external_exports.string().min(1).max(128),
|
|
37894
|
+
displayName: external_exports.string().min(1).max(120),
|
|
37895
|
+
avatar: external_exports.string().max(2048).optional()
|
|
37896
|
+
}).strict();
|
|
37897
|
+
var presentationShape = VPValidator.extend({
|
|
37898
|
+
verifiableCredential: VCValidator.array().min(1).max(MAX_VP_MEMBERS)
|
|
37899
|
+
});
|
|
37900
|
+
var hasBoundedPresentation = /* @__PURE__ */ __name3((value) => {
|
|
37901
|
+
let credentialCount = 0;
|
|
37902
|
+
const ancestors = /* @__PURE__ */ new Set();
|
|
37903
|
+
const visit = /* @__PURE__ */ __name3((node, depth) => {
|
|
37904
|
+
if (node === null || typeof node !== "object") return true;
|
|
37905
|
+
if (depth > 32 || ancestors.has(node)) return false;
|
|
37906
|
+
ancestors.add(node);
|
|
37907
|
+
try {
|
|
37908
|
+
for (const [key, child] of Object.entries(node)) {
|
|
37909
|
+
if (key === "verifiableCredential") {
|
|
37910
|
+
credentialCount += Array.isArray(child) ? child.length : 1;
|
|
37911
|
+
if (credentialCount > MAX_VP_MEMBERS) return false;
|
|
37912
|
+
}
|
|
37913
|
+
if (!visit(child, depth + 1)) return false;
|
|
37914
|
+
}
|
|
37915
|
+
return true;
|
|
37916
|
+
} finally {
|
|
37917
|
+
ancestors.delete(node);
|
|
37918
|
+
}
|
|
37919
|
+
}, "visit");
|
|
37920
|
+
return visit(value, 0);
|
|
37921
|
+
}, "hasBoundedPresentation");
|
|
37922
|
+
var ShareManifestPresentationValidator = external_exports.custom(
|
|
37923
|
+
(value) => hasBoundedPresentation(value) && presentationShape.safeParse(value).success,
|
|
37924
|
+
{ message: "invalid share presentation" }
|
|
37925
|
+
);
|
|
37926
|
+
var SharePayloadValidatorShape = external_exports.object({
|
|
37927
|
+
protocol: external_exports.literal(SHARE_LINK_PROTOCOL),
|
|
37928
|
+
shareId: ShareLinkIdValidator,
|
|
37929
|
+
contentVersion: safeVersion,
|
|
37930
|
+
createdAt: external_exports.iso.datetime(),
|
|
37931
|
+
sharer: ShareSharerValidator,
|
|
37932
|
+
presentation: ShareManifestPresentationValidator,
|
|
37933
|
+
selection: ShareSelectionEntryValidator.array().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
37934
|
+
endorsements: ShareEndorsementEntryValidator.array().max(MAX_ENDORSEMENTS).default([])
|
|
37935
|
+
}).strict();
|
|
37936
|
+
var classificationFailure = /* @__PURE__ */ __name3((code, message, path = []) => ({ ok: false, code, message, path }), "classificationFailure");
|
|
37937
|
+
var readSignedClaimId = /* @__PURE__ */ __name3((member) => {
|
|
37938
|
+
if (member === null || typeof member !== "object") return void 0;
|
|
37939
|
+
const record2 = member;
|
|
37940
|
+
const claim = record2.credentialSubject ?? record2.endorsement;
|
|
37941
|
+
if (claim === null || typeof claim !== "object") return void 0;
|
|
37942
|
+
const claimRecord = claim;
|
|
37943
|
+
const nested = claimRecord.endorsement;
|
|
37944
|
+
const nestedId = nested !== null && typeof nested === "object" ? nested.id : void 0;
|
|
37945
|
+
return claimRecord.id ?? nestedId;
|
|
37946
|
+
}, "readSignedClaimId");
|
|
37947
|
+
var classifyShareManifest = /* @__PURE__ */ __name3((payload) => {
|
|
37948
|
+
const members = payload.presentation?.verifiableCredential;
|
|
37949
|
+
if (!Array.isArray(members) || members.length === 0) {
|
|
37950
|
+
return classificationFailure("NO_PRESENTATION_MEMBERS", "presentation has no credentials");
|
|
37951
|
+
}
|
|
37952
|
+
if (members.length > MAX_VP_MEMBERS) {
|
|
37953
|
+
return classificationFailure(
|
|
37954
|
+
"TOO_MANY_VP_MEMBERS",
|
|
37955
|
+
`presentation has ${members.length} members, over the ${MAX_VP_MEMBERS} bound`
|
|
37956
|
+
);
|
|
37957
|
+
}
|
|
37958
|
+
const selection = payload.selection;
|
|
37959
|
+
const endorsements = payload.endorsements ?? [];
|
|
37960
|
+
if (!Array.isArray(selection) || selection.length < 1 || selection.length > MAX_SELECTED_CREDENTIALS) {
|
|
37961
|
+
return classificationFailure("BAD_SELECTION", "selection must contain 1..50 entries");
|
|
37962
|
+
}
|
|
37963
|
+
if (!Array.isArray(endorsements) || endorsements.length > MAX_ENDORSEMENTS) {
|
|
37964
|
+
return classificationFailure(
|
|
37965
|
+
"BAD_ENDORSEMENTS",
|
|
37966
|
+
"endorsements must contain at most 200 entries"
|
|
37967
|
+
);
|
|
37968
|
+
}
|
|
37969
|
+
const selectedIndices = [];
|
|
37970
|
+
const selected = /* @__PURE__ */ new Set();
|
|
37971
|
+
for (let index = 0; index < selection.length; index += 1) {
|
|
37972
|
+
const entry = selection[index];
|
|
37973
|
+
const credentialIndex = entry?.credentialIndex;
|
|
37974
|
+
if (!Number.isSafeInteger(credentialIndex) || credentialIndex < 0 || credentialIndex >= members.length) {
|
|
37975
|
+
return classificationFailure(
|
|
37976
|
+
"SELECTION_INDEX_OUT_OF_BOUNDS",
|
|
37977
|
+
`selection[${index}].credentialIndex is out of bounds`,
|
|
37978
|
+
["selection", index, "credentialIndex"]
|
|
37979
|
+
);
|
|
37980
|
+
}
|
|
37981
|
+
if (selected.has(credentialIndex)) {
|
|
37982
|
+
return classificationFailure(
|
|
37983
|
+
"SELECTION_INDEX_DUPLICATE",
|
|
37984
|
+
`selection[${index}].credentialIndex is duplicated`,
|
|
37985
|
+
["selection", index, "credentialIndex"]
|
|
37986
|
+
);
|
|
37987
|
+
}
|
|
37988
|
+
selected.add(credentialIndex);
|
|
37989
|
+
selectedIndices.push(credentialIndex);
|
|
37990
|
+
}
|
|
37991
|
+
const classified = new Set(selected);
|
|
37992
|
+
const endorsementIndices = [];
|
|
37993
|
+
for (let index = 0; index < endorsements.length; index += 1) {
|
|
37994
|
+
const entry = endorsements[index];
|
|
37995
|
+
const credentialIndex = entry?.credentialIndex;
|
|
37996
|
+
const targetIndex = entry?.targetCredentialIndex;
|
|
37997
|
+
if (!Number.isSafeInteger(credentialIndex) || credentialIndex < 0 || credentialIndex >= members.length) {
|
|
37998
|
+
return classificationFailure(
|
|
37999
|
+
"ENDORSEMENT_INDEX_OUT_OF_BOUNDS",
|
|
38000
|
+
`endorsements[${index}].credentialIndex is out of bounds`,
|
|
38001
|
+
["endorsements", index, "credentialIndex"]
|
|
38002
|
+
);
|
|
38003
|
+
}
|
|
38004
|
+
if (classified.has(credentialIndex)) {
|
|
38005
|
+
return classificationFailure(
|
|
38006
|
+
"VP_MEMBER_CLASSIFIED_TWICE",
|
|
38007
|
+
`endorsements[${index}].credentialIndex was already classified`,
|
|
38008
|
+
["endorsements", index, "credentialIndex"]
|
|
38009
|
+
);
|
|
38010
|
+
}
|
|
38011
|
+
if (!selected.has(targetIndex)) {
|
|
38012
|
+
return classificationFailure(
|
|
38013
|
+
"ENDORSEMENT_TARGET_NOT_SELECTED",
|
|
38014
|
+
`endorsements[${index}].targetCredentialIndex must reference a selected credential`,
|
|
38015
|
+
["endorsements", index, "targetCredentialIndex"]
|
|
38016
|
+
);
|
|
38017
|
+
}
|
|
38018
|
+
const referenced = readSignedClaimId(members[credentialIndex]);
|
|
38019
|
+
const target = members[targetIndex];
|
|
38020
|
+
const targetId = target !== null && typeof target === "object" ? target.id : void 0;
|
|
38021
|
+
if (typeof referenced !== "string" || typeof targetId !== "string" || referenced !== targetId) {
|
|
38022
|
+
return classificationFailure(
|
|
38023
|
+
"ENDORSEMENT_TARGET_UNBOUND",
|
|
38024
|
+
`endorsements[${index}] claim does not reference the target credential id`,
|
|
38025
|
+
["endorsements", index]
|
|
38026
|
+
);
|
|
38027
|
+
}
|
|
38028
|
+
classified.add(credentialIndex);
|
|
38029
|
+
endorsementIndices.push(credentialIndex);
|
|
38030
|
+
}
|
|
38031
|
+
if (classified.size !== members.length) {
|
|
38032
|
+
return classificationFailure(
|
|
38033
|
+
"UNCLASSIFIED_VP_MEMBER",
|
|
38034
|
+
"every presentation member must be classified exactly once",
|
|
38035
|
+
["presentation", "verifiableCredential"]
|
|
38036
|
+
);
|
|
38037
|
+
}
|
|
38038
|
+
return {
|
|
38039
|
+
ok: true,
|
|
38040
|
+
classification: { selectedIndices, endorsementIndices, memberCount: members.length }
|
|
38041
|
+
};
|
|
38042
|
+
}, "classifyShareManifest");
|
|
38043
|
+
var SharePayloadValidator = SharePayloadValidatorShape.superRefine((payload, ctx) => {
|
|
38044
|
+
const result = classifyShareManifest(payload);
|
|
38045
|
+
if (!result.ok) {
|
|
36769
38046
|
ctx.addIssue({
|
|
36770
38047
|
code: "custom",
|
|
36771
|
-
|
|
36772
|
-
|
|
38048
|
+
message: result.message,
|
|
38049
|
+
path: result.path,
|
|
38050
|
+
params: { shareLinkCode: result.code }
|
|
36773
38051
|
});
|
|
36774
38052
|
}
|
|
36775
|
-
|
|
36776
|
-
|
|
36777
|
-
|
|
36778
|
-
|
|
36779
|
-
|
|
36780
|
-
|
|
36781
|
-
|
|
36782
|
-
|
|
36783
|
-
|
|
38053
|
+
});
|
|
38054
|
+
var ShareRecoverySelectionValidator = external_exports.object({
|
|
38055
|
+
ref: external_exports.string().min(1).max(MAX_SHARE_SOURCE_URI_CHARS),
|
|
38056
|
+
order: external_exports.number().int().min(0).max(MAX_SELECTED_CREDENTIALS - 1)
|
|
38057
|
+
}).strict();
|
|
38058
|
+
var ShareRecoveryEndorsementValidator = external_exports.object({ targetRef: external_exports.string().min(1).max(MAX_SHARE_SOURCE_URI_CHARS) }).strict();
|
|
38059
|
+
var ShareRecoveryPlaintextValidator = external_exports.object({
|
|
38060
|
+
protocol: external_exports.literal(SHARE_RECOVERY_PROTOCOL),
|
|
38061
|
+
shareId: ShareLinkIdValidator,
|
|
38062
|
+
ownerProfileId: external_exports.string().min(1).max(128),
|
|
38063
|
+
createdAt: external_exports.iso.datetime(),
|
|
38064
|
+
latest: external_exports.object({ contentVersion: safeVersion, key: ShareContentKeyValidator }).strict(),
|
|
38065
|
+
selection: ShareRecoverySelectionValidator.array().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
38066
|
+
endorsements: ShareRecoveryEndorsementValidator.array().max(MAX_ENDORSEMENTS).default([])
|
|
38067
|
+
}).strict().superRefine((recovery, ctx) => {
|
|
38068
|
+
const orders = /* @__PURE__ */ new Set();
|
|
38069
|
+
recovery.selection.forEach((entry, index) => {
|
|
38070
|
+
if (entry.order >= recovery.selection.length) {
|
|
36784
38071
|
ctx.addIssue({
|
|
36785
38072
|
code: "custom",
|
|
36786
|
-
|
|
36787
|
-
|
|
38073
|
+
message: "order must be within the selection bounds",
|
|
38074
|
+
path: ["selection", index, "order"]
|
|
36788
38075
|
});
|
|
36789
38076
|
}
|
|
36790
|
-
if (
|
|
38077
|
+
if (orders.has(entry.order)) {
|
|
36791
38078
|
ctx.addIssue({
|
|
36792
38079
|
code: "custom",
|
|
36793
|
-
|
|
36794
|
-
|
|
38080
|
+
message: "order must be unique within the selection",
|
|
38081
|
+
path: ["selection", index, "order"]
|
|
36795
38082
|
});
|
|
36796
38083
|
}
|
|
38084
|
+
orders.add(entry.order);
|
|
38085
|
+
});
|
|
38086
|
+
});
|
|
38087
|
+
var ShareOwnerRecoveryValidator = JWEValidator.refine(
|
|
38088
|
+
(value) => utf8ByteLength(JSON.stringify(value)) <= MAX_SHARE_RECOVERY_JWE_BYTES,
|
|
38089
|
+
{ message: `serialized recovery JWE must be at most ${MAX_SHARE_RECOVERY_JWE_BYTES} bytes` }
|
|
38090
|
+
);
|
|
38091
|
+
var ShareLinkStatusValidator = external_exports.enum(["pending", "active", "stopped"]);
|
|
38092
|
+
var ShareContentStateValidator = external_exports.enum(["staging", "finalized", "content_missing"]);
|
|
38093
|
+
var ShareLinkValidator = external_exports.object({
|
|
38094
|
+
id: ShareLinkIdValidator,
|
|
38095
|
+
title: external_exports.string().min(1).max(120),
|
|
38096
|
+
note: external_exports.string().max(500).optional(),
|
|
38097
|
+
selectedCount: external_exports.number().int().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
38098
|
+
version: safeVersion,
|
|
38099
|
+
contentVersion: safeVersion,
|
|
38100
|
+
status: ShareLinkStatusValidator,
|
|
38101
|
+
contentState: ShareContentStateValidator,
|
|
38102
|
+
createdAt: external_exports.iso.datetime(),
|
|
38103
|
+
updatedAt: external_exports.iso.datetime(),
|
|
38104
|
+
expiresAt: external_exports.iso.datetime().nullable(),
|
|
38105
|
+
stoppedAt: external_exports.iso.datetime().nullable(),
|
|
38106
|
+
lastViewedAt: external_exports.iso.datetime().nullable(),
|
|
38107
|
+
viewCount: external_exports.number().int().min(0).optional(),
|
|
38108
|
+
passcodeProtected: external_exports.boolean(),
|
|
38109
|
+
notifyOnView: external_exports.boolean(),
|
|
38110
|
+
minorPolicy: external_exports.object({
|
|
38111
|
+
isMinor: external_exports.boolean().nullable(),
|
|
38112
|
+
policyResolved: external_exports.boolean(),
|
|
38113
|
+
defaultExpiryDays: external_exports.union([external_exports.literal(30), external_exports.literal(365)]),
|
|
38114
|
+
viewCountingEnabled: external_exports.boolean()
|
|
38115
|
+
}),
|
|
38116
|
+
/**
|
|
38117
|
+
* Guarded application/API URL for the content. Optional because owner APIs in
|
|
38118
|
+
* D1 have no public resolve/content endpoint yet; it must never be a
|
|
38119
|
+
* LearnCloud object URL or carry a fabricated decryption key.
|
|
38120
|
+
*/
|
|
38121
|
+
contentUrl: external_exports.string().optional()
|
|
38122
|
+
});
|
|
38123
|
+
var clientRequestId = external_exports.string().uuid();
|
|
38124
|
+
var CreateShareLinkInputValidator = external_exports.object({
|
|
38125
|
+
id: ShareLinkIdValidator,
|
|
38126
|
+
clientRequestId,
|
|
38127
|
+
title: external_exports.string().min(1).max(120),
|
|
38128
|
+
note: external_exports.string().max(500).optional(),
|
|
38129
|
+
expiresAt: external_exports.iso.datetime().nullable().optional(),
|
|
38130
|
+
passcode: external_exports.string().min(8).max(64).optional(),
|
|
38131
|
+
notifyOnView: external_exports.boolean().default(false),
|
|
38132
|
+
selectedCount: external_exports.number().int().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
38133
|
+
contentVersion: external_exports.literal(1),
|
|
38134
|
+
envelope: ShareEnvelopeValidator,
|
|
38135
|
+
ownerEncryptedRecovery: ShareOwnerRecoveryValidator
|
|
38136
|
+
}).strict();
|
|
38137
|
+
var UpdateShareLinkInputValidator = external_exports.object({
|
|
38138
|
+
id: ShareLinkIdValidator,
|
|
38139
|
+
expectedVersion: safeVersion,
|
|
38140
|
+
clientRequestId,
|
|
38141
|
+
title: external_exports.string().min(1).max(120).optional(),
|
|
38142
|
+
note: external_exports.string().max(500).nullable().optional(),
|
|
38143
|
+
expiresAt: external_exports.iso.datetime().nullable().optional(),
|
|
38144
|
+
/** Omitted preserves the current passcode, null removes it, and a string replaces it. */
|
|
38145
|
+
passcode: external_exports.string().min(8).max(64).nullable().optional(),
|
|
38146
|
+
notifyOnView: external_exports.boolean().optional(),
|
|
38147
|
+
contentVersion: safeVersion.optional(),
|
|
38148
|
+
selectedCount: external_exports.number().int().min(1).max(MAX_SELECTED_CREDENTIALS).optional(),
|
|
38149
|
+
envelope: ShareEnvelopeValidator.optional(),
|
|
38150
|
+
ownerEncryptedRecovery: ShareOwnerRecoveryValidator.optional()
|
|
38151
|
+
}).strict().superRefine((value, ctx) => {
|
|
38152
|
+
const provided = [
|
|
38153
|
+
value.contentVersion,
|
|
38154
|
+
value.selectedCount,
|
|
38155
|
+
value.envelope,
|
|
38156
|
+
value.ownerEncryptedRecovery
|
|
38157
|
+
].filter((field) => field !== void 0).length;
|
|
38158
|
+
if (provided !== 0 && provided !== 4) {
|
|
38159
|
+
ctx.addIssue({
|
|
38160
|
+
code: "custom",
|
|
38161
|
+
message: "content replacement requires contentVersion, selectedCount, envelope and ownerEncryptedRecovery together"
|
|
38162
|
+
});
|
|
36797
38163
|
}
|
|
36798
38164
|
});
|
|
36799
|
-
var
|
|
36800
|
-
|
|
36801
|
-
|
|
36802
|
-
"
|
|
36803
|
-
|
|
36804
|
-
|
|
38165
|
+
var ShareLinkIdInputValidator = external_exports.object({ id: ShareLinkIdValidator }).strict();
|
|
38166
|
+
var ShareLinkOperationKeyInputValidator = external_exports.object({ id: ShareLinkIdValidator, operationId: external_exports.string().uuid() }).strict();
|
|
38167
|
+
var ShareLinkOwnerCommitOutputValidator = external_exports.discriminatedUnion("status", [
|
|
38168
|
+
external_exports.object({ status: external_exports.literal("completed"), share: ShareLinkValidator }).strict(),
|
|
38169
|
+
external_exports.object({
|
|
38170
|
+
status: external_exports.literal("pending"),
|
|
38171
|
+
id: ShareLinkIdValidator,
|
|
38172
|
+
operationId: external_exports.string().uuid()
|
|
38173
|
+
}).strict()
|
|
36805
38174
|
]);
|
|
36806
|
-
var
|
|
36807
|
-
|
|
36808
|
-
|
|
36809
|
-
|
|
36810
|
-
|
|
36811
|
-
|
|
36812
|
-
|
|
36813
|
-
|
|
36814
|
-
publishedAt: external_exports.string().min(1),
|
|
36815
|
-
effectiveAt: external_exports.string().optional(),
|
|
36816
|
-
etag: external_exports.string().optional(),
|
|
36817
|
-
signingMode: CredentialRefreshSigningModeValidator.optional(),
|
|
36818
|
-
updateSummary: external_exports.string().optional()
|
|
36819
|
-
});
|
|
36820
|
-
var GetCredentialRefreshHistoryInputValidator = external_exports.object({
|
|
36821
|
-
refreshId: external_exports.string().min(1),
|
|
36822
|
-
cursor: external_exports.string().optional(),
|
|
36823
|
-
limit: external_exports.number().int().positive().optional()
|
|
36824
|
-
});
|
|
36825
|
-
var GetCredentialRefreshHistoryResultValidator = external_exports.object({
|
|
36826
|
-
records: CredentialRefreshVersionMetadataValidator.array(),
|
|
36827
|
-
hasMore: external_exports.boolean(),
|
|
36828
|
-
cursor: external_exports.string().optional()
|
|
36829
|
-
});
|
|
36830
|
-
var CredentialRefreshChallengeValidator = external_exports.object({
|
|
36831
|
-
challenge: external_exports.string().min(1),
|
|
36832
|
-
expiresAt: external_exports.string().min(1),
|
|
36833
|
-
domain: external_exports.string().optional(),
|
|
36834
|
-
scheme: external_exports.literal("LearnCardDIDAuth").optional()
|
|
36835
|
-
});
|
|
36836
|
-
var PublicCredentialRefreshEnvelopeValidator = external_exports.object({
|
|
36837
|
-
format: external_exports.literal("vc"),
|
|
36838
|
-
credential: VCValidator,
|
|
36839
|
-
etag: external_exports.string().optional()
|
|
36840
|
-
});
|
|
36841
|
-
var JweCredentialRefreshEnvelopeValidator = external_exports.object({
|
|
36842
|
-
format: external_exports.literal("jwe"),
|
|
36843
|
-
jwe: JWEValidator,
|
|
36844
|
-
etag: external_exports.string().optional(),
|
|
36845
|
-
/** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
|
|
36846
|
-
version: external_exports.number().int().positive().optional()
|
|
36847
|
-
});
|
|
36848
|
-
var CredentialRefreshResponseEnvelopeValidator = external_exports.discriminatedUnion("format", [
|
|
36849
|
-
PublicCredentialRefreshEnvelopeValidator,
|
|
36850
|
-
JweCredentialRefreshEnvelopeValidator
|
|
38175
|
+
var ShareLinkOwnerStatusOutputValidator = external_exports.discriminatedUnion("status", [
|
|
38176
|
+
external_exports.object({ status: external_exports.literal("found"), share: ShareLinkValidator }).strict(),
|
|
38177
|
+
external_exports.object({
|
|
38178
|
+
status: external_exports.literal("pending"),
|
|
38179
|
+
id: ShareLinkIdValidator,
|
|
38180
|
+
operationId: external_exports.string().uuid()
|
|
38181
|
+
}).strict(),
|
|
38182
|
+
external_exports.object({ status: external_exports.literal("not_found"), id: ShareLinkIdValidator }).strict()
|
|
36851
38183
|
]);
|
|
36852
|
-
var
|
|
36853
|
-
|
|
36854
|
-
|
|
36855
|
-
|
|
36856
|
-
|
|
36857
|
-
|
|
36858
|
-
|
|
36859
|
-
|
|
36860
|
-
|
|
36861
|
-
|
|
36862
|
-
|
|
36863
|
-
|
|
38184
|
+
var ShareLinkOwnerRecoveryOutputValidator = external_exports.object({ recovery: ShareOwnerRecoveryValidator }).strict();
|
|
38185
|
+
var ShareLinkOwnerContentOutputValidator = external_exports.object({
|
|
38186
|
+
id: ShareLinkIdValidator,
|
|
38187
|
+
contentVersion: safeVersion,
|
|
38188
|
+
envelope: ShareEnvelopeValidator
|
|
38189
|
+
}).strict();
|
|
38190
|
+
var ResolveShareLinkInputValidator = external_exports.object({
|
|
38191
|
+
id: ShareLinkIdValidator,
|
|
38192
|
+
/** Sent only in a POST body; it must never be placed in a share URL. */
|
|
38193
|
+
passcode: external_exports.string().min(4).max(64).optional()
|
|
38194
|
+
}).strict();
|
|
38195
|
+
var ShareLinkPublicStateValidator = external_exports.discriminatedUnion("state", [
|
|
38196
|
+
external_exports.object({
|
|
38197
|
+
state: external_exports.literal("passcode_required"),
|
|
38198
|
+
id: ShareLinkIdValidator
|
|
38199
|
+
}).strict(),
|
|
38200
|
+
external_exports.object({ state: external_exports.literal("try_later"), id: ShareLinkIdValidator }).strict(),
|
|
38201
|
+
external_exports.object({
|
|
38202
|
+
state: external_exports.literal("active"),
|
|
38203
|
+
id: ShareLinkIdValidator,
|
|
38204
|
+
title: external_exports.string().max(120),
|
|
38205
|
+
note: external_exports.string().max(500).optional(),
|
|
38206
|
+
selectedCount: external_exports.number().int().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
38207
|
+
contentVersion: safeVersion,
|
|
38208
|
+
contentUrl: external_exports.string(),
|
|
38209
|
+
sharer: external_exports.object({
|
|
38210
|
+
displayName: external_exports.string().max(120),
|
|
38211
|
+
avatar: external_exports.string().max(2048).optional()
|
|
38212
|
+
}),
|
|
38213
|
+
createdAt: external_exports.iso.datetime(),
|
|
38214
|
+
updatedAt: external_exports.iso.datetime(),
|
|
38215
|
+
expiresAt: external_exports.iso.datetime().nullable()
|
|
38216
|
+
}).strict(),
|
|
38217
|
+
external_exports.object({
|
|
38218
|
+
state: external_exports.literal("expired"),
|
|
38219
|
+
id: ShareLinkIdValidator,
|
|
38220
|
+
expiresAt: external_exports.iso.datetime()
|
|
38221
|
+
}).strict(),
|
|
38222
|
+
external_exports.object({
|
|
38223
|
+
state: external_exports.literal("stopped"),
|
|
38224
|
+
id: ShareLinkIdValidator,
|
|
38225
|
+
stoppedAt: external_exports.iso.datetime()
|
|
38226
|
+
}).strict(),
|
|
38227
|
+
external_exports.object({ state: external_exports.literal("not_found"), id: ShareLinkIdValidator }).strict()
|
|
36864
38228
|
]);
|
|
36865
|
-
var
|
|
36866
|
-
|
|
36867
|
-
|
|
36868
|
-
|
|
36869
|
-
|
|
36870
|
-
|
|
36871
|
-
var CredentialRefreshUnchangedResultValidator = external_exports.object({
|
|
36872
|
-
status: external_exports.literal("unchanged"),
|
|
36873
|
-
checkedAt: external_exports.string().min(1),
|
|
36874
|
-
etag: external_exports.string().optional()
|
|
36875
|
-
});
|
|
36876
|
-
var CredentialRefreshUnsupportedResultValidator = external_exports.object({
|
|
36877
|
-
status: external_exports.literal("unsupported")
|
|
36878
|
-
});
|
|
36879
|
-
var CredentialRefreshFailedResultValidator = external_exports.object({
|
|
36880
|
-
status: external_exports.literal("failed"),
|
|
36881
|
-
code: CredentialRefreshFailureCodeValidator,
|
|
36882
|
-
retryable: external_exports.boolean()
|
|
38229
|
+
var ListShareLinksInputValidator = external_exports.object({
|
|
38230
|
+
limit: external_exports.number().int().min(1).max(50).default(25),
|
|
38231
|
+
cursor: external_exports.string().max(512).optional()
|
|
38232
|
+
}).strict();
|
|
38233
|
+
var PaginatedShareLinksValidator = PaginationResponseValidator.extend({
|
|
38234
|
+
records: ShareLinkValidator.array()
|
|
36883
38235
|
});
|
|
36884
|
-
var
|
|
36885
|
-
|
|
36886
|
-
|
|
36887
|
-
|
|
36888
|
-
|
|
36889
|
-
|
|
38236
|
+
var AcknowledgeViewInputValidator = external_exports.object({
|
|
38237
|
+
receipt: external_exports.string().min(22).max(128).regex(/^[A-Za-z0-9_-]+$/)
|
|
38238
|
+
}).strict();
|
|
38239
|
+
var AcknowledgeViewOutputValidator = external_exports.object({ ok: external_exports.literal(true) }).strict();
|
|
38240
|
+
var SHARE_VIEW_RECEIPT_TTL_SECONDS = 10 * 60;
|
|
38241
|
+
var ShareLinkPublicContentViewValidator = external_exports.object({
|
|
38242
|
+
id: ShareLinkIdValidator,
|
|
38243
|
+
contentVersion: safeVersion,
|
|
38244
|
+
envelope: ShareEnvelopeValidator,
|
|
38245
|
+
contentUrl: external_exports.string(),
|
|
38246
|
+
receipt: external_exports.string().min(22).max(128).regex(/^[A-Za-z0-9_-]+$/)
|
|
38247
|
+
}).strict();
|
|
36890
38248
|
|
|
36891
38249
|
// src/read.ts
|
|
36892
38250
|
var isTemplateRenderMethod = /* @__PURE__ */ __name((rm) => TemplateRenderMethodValidator.safeParse(rm).success, "isTemplateRenderMethod");
|