@learncard/network-brain-client 2.5.55 → 2.5.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/brain-client.cjs.development.cjs +4591 -4218
- package/dist/brain-client.cjs.development.cjs.map +2 -2
- package/dist/brain-client.cjs.production.min.cjs +46 -46
- package/dist/brain-client.cjs.production.min.cjs.map +3 -3
- package/dist/brain-client.esm.js +438 -210
- package/dist/brain-client.esm.js.map +3 -3
- package/package.json +5 -5
package/dist/brain-client.esm.js
CHANGED
|
@@ -15954,6 +15954,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
15954
15954
|
var __toCommonJS = /* @__PURE__ */ __name2((mod) => __copyProps22(__defProp22({}, "__esModule", { value: true }), mod), "__toCommonJS");
|
|
15955
15955
|
var index_exports = {};
|
|
15956
15956
|
__export22(index_exports, {
|
|
15957
|
+
ACT_AS_HEADER: /* @__PURE__ */ __name2(() => ACT_AS_HEADER, "ACT_AS_HEADER"),
|
|
15957
15958
|
AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX: /* @__PURE__ */ __name2(() => AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX, "AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX"),
|
|
15958
15959
|
AchievementCredentialValidator: /* @__PURE__ */ __name2(() => AchievementCredentialValidator, "AchievementCredentialValidator"),
|
|
15959
15960
|
AchievementCriteriaValidator: /* @__PURE__ */ __name2(() => AchievementCriteriaValidator, "AchievementCriteriaValidator"),
|
|
@@ -16016,6 +16017,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
16016
16017
|
ConsentFlowContractValidator: /* @__PURE__ */ __name2(() => ConsentFlowContractValidator, "ConsentFlowContractValidator"),
|
|
16017
16018
|
ConsentFlowDataForDidQueryValidator: /* @__PURE__ */ __name2(() => ConsentFlowDataForDidQueryValidator, "ConsentFlowDataForDidQueryValidator"),
|
|
16018
16019
|
ConsentFlowDataQueryValidator: /* @__PURE__ */ __name2(() => ConsentFlowDataQueryValidator, "ConsentFlowDataQueryValidator"),
|
|
16020
|
+
ConsentFlowGuardianApprovalValidator: /* @__PURE__ */ __name2(() => ConsentFlowGuardianApprovalValidator, "ConsentFlowGuardianApprovalValidator"),
|
|
16019
16021
|
ConsentFlowTermValidator: /* @__PURE__ */ __name2(() => ConsentFlowTermValidator, "ConsentFlowTermValidator"),
|
|
16020
16022
|
ConsentFlowTermsQueryValidator: /* @__PURE__ */ __name2(() => ConsentFlowTermsQueryValidator, "ConsentFlowTermsQueryValidator"),
|
|
16021
16023
|
ConsentFlowTermsStatusValidator: /* @__PURE__ */ __name2(() => ConsentFlowTermsStatusValidator, "ConsentFlowTermsStatusValidator"),
|
|
@@ -16092,10 +16094,18 @@ var require_types_cjs_development = __commonJS({
|
|
|
16092
16094
|
IdentifierTypeValidator: /* @__PURE__ */ __name2(() => IdentifierTypeValidator, "IdentifierTypeValidator"),
|
|
16093
16095
|
IdentityObjectValidator: /* @__PURE__ */ __name2(() => IdentityObjectValidator, "IdentityObjectValidator"),
|
|
16094
16096
|
ImageValidator: /* @__PURE__ */ __name2(() => ImageValidator, "ImageValidator"),
|
|
16097
|
+
InboxBatchErrorReasonValidator: /* @__PURE__ */ __name2(() => InboxBatchErrorReasonValidator, "InboxBatchErrorReasonValidator"),
|
|
16098
|
+
InboxBatchReceiptValidator: /* @__PURE__ */ __name2(() => InboxBatchReceiptValidator, "InboxBatchReceiptValidator"),
|
|
16099
|
+
InboxBatchStatusValidator: /* @__PURE__ */ __name2(() => InboxBatchStatusValidator, "InboxBatchStatusValidator"),
|
|
16095
16100
|
InboxCredentialQueryValidator: /* @__PURE__ */ __name2(() => InboxCredentialQueryValidator, "InboxCredentialQueryValidator"),
|
|
16101
|
+
InboxCredentialRefreshReceiptValidator: /* @__PURE__ */ __name2(() => InboxCredentialRefreshReceiptValidator, "InboxCredentialRefreshReceiptValidator"),
|
|
16096
16102
|
InboxCredentialValidator: /* @__PURE__ */ __name2(() => InboxCredentialValidator, "InboxCredentialValidator"),
|
|
16097
16103
|
IncrementCounterEventValidator: /* @__PURE__ */ __name2(() => IncrementCounterEventValidator, "IncrementCounterEventValidator"),
|
|
16098
16104
|
InstalledAppValidator: /* @__PURE__ */ __name2(() => InstalledAppValidator, "InstalledAppValidator"),
|
|
16105
|
+
IssueInboxCredentialBatchItemResultValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialBatchItemResultValidator, "IssueInboxCredentialBatchItemResultValidator"),
|
|
16106
|
+
IssueInboxCredentialBatchItemValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialBatchItemValidator, "IssueInboxCredentialBatchItemValidator"),
|
|
16107
|
+
IssueInboxCredentialBatchResponseValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialBatchResponseValidator, "IssueInboxCredentialBatchResponseValidator"),
|
|
16108
|
+
IssueInboxCredentialBatchValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialBatchValidator, "IssueInboxCredentialBatchValidator"),
|
|
16099
16109
|
IssueInboxCredentialResponseValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialResponseValidator, "IssueInboxCredentialResponseValidator"),
|
|
16100
16110
|
IssueInboxCredentialValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialValidator, "IssueInboxCredentialValidator"),
|
|
16101
16111
|
IssueInboxSigningAuthorityValidator: /* @__PURE__ */ __name2(() => IssueInboxSigningAuthorityValidator, "IssueInboxSigningAuthorityValidator"),
|
|
@@ -16144,7 +16154,8 @@ var require_types_cjs_development = __commonJS({
|
|
|
16144
16154
|
LaunchTypeValidator: /* @__PURE__ */ __name2(() => LaunchTypeValidator, "LaunchTypeValidator"),
|
|
16145
16155
|
LearnCardRefreshAuthorizationValidator: /* @__PURE__ */ __name2(() => LearnCardRefreshAuthorizationValidator, "LearnCardRefreshAuthorizationValidator"),
|
|
16146
16156
|
LinkProviderFrameworkInputValidator: /* @__PURE__ */ __name2(() => LinkProviderFrameworkInputValidator, "LinkProviderFrameworkInputValidator"),
|
|
16147
|
-
|
|
16157
|
+
ManagedCredentialRefreshReceiptValidator: /* @__PURE__ */ __name2(() => ManagedCredentialRefreshReceiptValidator, "ManagedCredentialRefreshReceiptValidator"),
|
|
16158
|
+
ManagedCredentialRefreshServiceValidator: /* @__PURE__ */ __name2(() => ManagedCredentialRefreshServiceValidator2, "ManagedCredentialRefreshServiceValidator"),
|
|
16148
16159
|
PaginatedAppStoreListingsValidator: /* @__PURE__ */ __name2(() => PaginatedAppStoreListingsValidator, "PaginatedAppStoreListingsValidator"),
|
|
16149
16160
|
PaginatedBoostRecipientsValidator: /* @__PURE__ */ __name2(() => PaginatedBoostRecipientsValidator, "PaginatedBoostRecipientsValidator"),
|
|
16150
16161
|
PaginatedBoostRecipientsWithChildrenValidator: /* @__PURE__ */ __name2(() => PaginatedBoostRecipientsWithChildrenValidator, "PaginatedBoostRecipientsWithChildrenValidator"),
|
|
@@ -16170,6 +16181,8 @@ var require_types_cjs_development = __commonJS({
|
|
|
16170
16181
|
PaginatedVisibleLCNProfilesValidator: /* @__PURE__ */ __name2(() => PaginatedVisibleLCNProfilesValidator, "PaginatedVisibleLCNProfilesValidator"),
|
|
16171
16182
|
PaginationOptionsValidator: /* @__PURE__ */ __name2(() => PaginationOptionsValidator, "PaginationOptionsValidator"),
|
|
16172
16183
|
PaginationResponseValidator: /* @__PURE__ */ __name2(() => PaginationResponseValidator, "PaginationResponseValidator"),
|
|
16184
|
+
PrepareRefreshableSendInputValidator: /* @__PURE__ */ __name2(() => PrepareRefreshableSendInputValidator, "PrepareRefreshableSendInputValidator"),
|
|
16185
|
+
PrepareRefreshableSendResultValidator: /* @__PURE__ */ __name2(() => PrepareRefreshableSendResultValidator, "PrepareRefreshableSendResultValidator"),
|
|
16173
16186
|
ProfileValidator: /* @__PURE__ */ __name2(() => ProfileValidator, "ProfileValidator"),
|
|
16174
16187
|
ProfileVisibilityEnum: /* @__PURE__ */ __name2(() => ProfileVisibilityEnum, "ProfileVisibilityEnum"),
|
|
16175
16188
|
PromotionLevelValidator: /* @__PURE__ */ __name2(() => PromotionLevelValidator, "PromotionLevelValidator"),
|
|
@@ -16195,6 +16208,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
16195
16208
|
SendAiSessionCredentialEventValidator: /* @__PURE__ */ __name2(() => SendAiSessionCredentialEventValidator, "SendAiSessionCredentialEventValidator"),
|
|
16196
16209
|
SendBoostInputValidator: /* @__PURE__ */ __name2(() => SendBoostInputValidator, "SendBoostInputValidator"),
|
|
16197
16210
|
SendBoostResponseValidator: /* @__PURE__ */ __name2(() => SendBoostResponseValidator, "SendBoostResponseValidator"),
|
|
16211
|
+
SendBoostTemplateValidator: /* @__PURE__ */ __name2(() => SendBoostTemplateValidator, "SendBoostTemplateValidator"),
|
|
16198
16212
|
SendBrandingOptionsValidator: /* @__PURE__ */ __name2(() => SendBrandingOptionsValidator, "SendBrandingOptionsValidator"),
|
|
16199
16213
|
SendCredentialEventValidator: /* @__PURE__ */ __name2(() => SendCredentialEventValidator, "SendCredentialEventValidator"),
|
|
16200
16214
|
SendInboxResponseValidator: /* @__PURE__ */ __name2(() => SendInboxResponseValidator, "SendInboxResponseValidator"),
|
|
@@ -16937,7 +16951,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
16937
16951
|
getSizableOrigin: /* @__PURE__ */ __name2(() => getSizableOrigin2, "getSizableOrigin"),
|
|
16938
16952
|
hexToUint8Array: /* @__PURE__ */ __name2(() => hexToUint8Array2, "hexToUint8Array"),
|
|
16939
16953
|
isObject: /* @__PURE__ */ __name2(() => isObject3, "isObject"),
|
|
16940
|
-
isPlainObject: /* @__PURE__ */ __name2(() =>
|
|
16954
|
+
isPlainObject: /* @__PURE__ */ __name2(() => isPlainObject22, "isPlainObject"),
|
|
16941
16955
|
issue: /* @__PURE__ */ __name2(() => issue2, "issue"),
|
|
16942
16956
|
joinValues: /* @__PURE__ */ __name2(() => joinValues2, "joinValues"),
|
|
16943
16957
|
jsonStringifyReplacer: /* @__PURE__ */ __name2(() => jsonStringifyReplacer2, "jsonStringifyReplacer"),
|
|
@@ -17186,7 +17200,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
17186
17200
|
return false;
|
|
17187
17201
|
}
|
|
17188
17202
|
});
|
|
17189
|
-
function
|
|
17203
|
+
function isPlainObject22(o) {
|
|
17190
17204
|
if (isObject3(o) === false)
|
|
17191
17205
|
return false;
|
|
17192
17206
|
const ctor = o.constructor;
|
|
@@ -17202,11 +17216,11 @@ var require_types_cjs_development = __commonJS({
|
|
|
17202
17216
|
}
|
|
17203
17217
|
return true;
|
|
17204
17218
|
}
|
|
17205
|
-
__name(
|
|
17206
|
-
__name2(
|
|
17207
|
-
__name22(
|
|
17219
|
+
__name(isPlainObject22, "isPlainObject2");
|
|
17220
|
+
__name2(isPlainObject22, "isPlainObject");
|
|
17221
|
+
__name22(isPlainObject22, "isPlainObject");
|
|
17208
17222
|
function shallowClone2(o) {
|
|
17209
|
-
if (
|
|
17223
|
+
if (isPlainObject22(o))
|
|
17210
17224
|
return { ...o };
|
|
17211
17225
|
if (Array.isArray(o))
|
|
17212
17226
|
return [...o];
|
|
@@ -17440,7 +17454,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
17440
17454
|
__name2(omit2, "omit");
|
|
17441
17455
|
__name22(omit2, "omit");
|
|
17442
17456
|
function extend2(schema, shape) {
|
|
17443
|
-
if (!
|
|
17457
|
+
if (!isPlainObject22(shape)) {
|
|
17444
17458
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
17445
17459
|
}
|
|
17446
17460
|
const checks = schema._zod.def.checks;
|
|
@@ -17466,7 +17480,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
17466
17480
|
__name2(extend2, "extend");
|
|
17467
17481
|
__name22(extend2, "extend");
|
|
17468
17482
|
function safeExtend2(schema, shape) {
|
|
17469
|
-
if (!
|
|
17483
|
+
if (!isPlainObject22(shape)) {
|
|
17470
17484
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
17471
17485
|
}
|
|
17472
17486
|
const def = mergeDefs2(schema._zod.def, {
|
|
@@ -19940,7 +19954,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
19940
19954
|
if (a instanceof Date && b instanceof Date && +a === +b) {
|
|
19941
19955
|
return { valid: true, data: a };
|
|
19942
19956
|
}
|
|
19943
|
-
if (
|
|
19957
|
+
if (isPlainObject22(a) && isPlainObject22(b)) {
|
|
19944
19958
|
const bKeys = Object.keys(b);
|
|
19945
19959
|
const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
|
|
19946
19960
|
const newObj = { ...a, ...b };
|
|
@@ -20141,7 +20155,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
20141
20155
|
$ZodType2.init(inst, def);
|
|
20142
20156
|
inst._zod.parse = (payload, ctx) => {
|
|
20143
20157
|
const input = payload.value;
|
|
20144
|
-
if (!
|
|
20158
|
+
if (!isPlainObject22(input)) {
|
|
20145
20159
|
payload.issues.push({
|
|
20146
20160
|
expected: "record",
|
|
20147
20161
|
code: "invalid_type",
|
|
@@ -32114,14 +32128,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32114
32128
|
}).catchall(external_exports2.any());
|
|
32115
32129
|
var ProofValidator = external_exports2.object({
|
|
32116
32130
|
type: external_exports2.string(),
|
|
32117
|
-
created: external_exports2.string(),
|
|
32131
|
+
created: external_exports2.string().optional(),
|
|
32118
32132
|
challenge: external_exports2.string().optional(),
|
|
32119
32133
|
domain: external_exports2.string().optional(),
|
|
32120
32134
|
nonce: external_exports2.string().optional(),
|
|
32121
32135
|
proofPurpose: external_exports2.string(),
|
|
32122
32136
|
verificationMethod: external_exports2.string(),
|
|
32123
32137
|
jws: external_exports2.string().optional()
|
|
32124
|
-
}).catchall(external_exports2.any())
|
|
32138
|
+
}).catchall(external_exports2.any()).superRefine((proof, ctx) => {
|
|
32139
|
+
if (proof.created === void 0 && (proof.type !== "DataIntegrityProof" || proof.cryptosuite !== "ecdsa-rdfc-2019")) {
|
|
32140
|
+
ctx.addIssue({
|
|
32141
|
+
code: "custom",
|
|
32142
|
+
path: ["created"],
|
|
32143
|
+
message: "created is required for this proof suite"
|
|
32144
|
+
});
|
|
32145
|
+
}
|
|
32146
|
+
});
|
|
32125
32147
|
var VCValidator = UnsignedVCValidator.extend({
|
|
32126
32148
|
proof: ProofValidator.or(ProofValidator.array())
|
|
32127
32149
|
});
|
|
@@ -32563,6 +32585,204 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32563
32585
|
$or: BaseStringQuery.array()
|
|
32564
32586
|
})
|
|
32565
32587
|
]);
|
|
32588
|
+
var LearnCardRefreshAuthorizationValidator = external_exports2.object({ type: external_exports2.literal("LearnCardDIDAuth") }).catchall(external_exports2.any());
|
|
32589
|
+
var ManagedCredentialRefreshServiceValidator2 = external_exports2.object({
|
|
32590
|
+
id: external_exports2.string().min(1),
|
|
32591
|
+
type: external_exports2.literal("LearnCardCredentialRefresh2026"),
|
|
32592
|
+
authorization: LearnCardRefreshAuthorizationValidator.optional()
|
|
32593
|
+
}).catchall(external_exports2.any());
|
|
32594
|
+
var StandardCredentialRefreshServiceValidator = external_exports2.object({
|
|
32595
|
+
id: external_exports2.string().min(1),
|
|
32596
|
+
type: external_exports2.literal("1EdTechCredentialRefresh")
|
|
32597
|
+
}).catchall(external_exports2.any());
|
|
32598
|
+
var SupportedCredentialRefreshServiceValidator2 = external_exports2.union([
|
|
32599
|
+
ManagedCredentialRefreshServiceValidator2,
|
|
32600
|
+
StandardCredentialRefreshServiceValidator
|
|
32601
|
+
]);
|
|
32602
|
+
var AllocateCredentialRefreshInputValidator = external_exports2.object({
|
|
32603
|
+
holder: external_exports2.object({
|
|
32604
|
+
profileId: external_exports2.string().optional(),
|
|
32605
|
+
did: external_exports2.string().min(1)
|
|
32606
|
+
}),
|
|
32607
|
+
credentialId: external_exports2.string().min(1)
|
|
32608
|
+
});
|
|
32609
|
+
var AllocateCredentialRefreshResultValidator = external_exports2.object({
|
|
32610
|
+
refreshId: external_exports2.string().min(1),
|
|
32611
|
+
refreshService: ManagedCredentialRefreshServiceValidator2.extend({
|
|
32612
|
+
authorization: LearnCardRefreshAuthorizationValidator
|
|
32613
|
+
})
|
|
32614
|
+
});
|
|
32615
|
+
var ManagedCredentialRefreshReceiptValidator = external_exports2.object({
|
|
32616
|
+
refreshId: external_exports2.string().min(1),
|
|
32617
|
+
refreshService: ManagedCredentialRefreshServiceValidator2,
|
|
32618
|
+
credentialId: external_exports2.string().min(1),
|
|
32619
|
+
issuerDid: external_exports2.string().min(1),
|
|
32620
|
+
holderDid: external_exports2.string().min(1),
|
|
32621
|
+
credentialStatus: CredentialStatusValidator.or(
|
|
32622
|
+
CredentialStatusValidator.array()
|
|
32623
|
+
).optional()
|
|
32624
|
+
}).strip();
|
|
32625
|
+
var InboxCredentialRefreshReceiptValidator = ManagedCredentialRefreshReceiptValidator.omit(
|
|
32626
|
+
{ holderDid: true }
|
|
32627
|
+
).extend({ holderDid: external_exports2.string().min(1).optional() });
|
|
32628
|
+
var CredentialRefreshSigningModeValidator = external_exports2.enum(["issuer-signed", "signing-authority"]);
|
|
32629
|
+
var PublishCredentialRefreshBaseFields = {
|
|
32630
|
+
refreshId: external_exports2.string().min(1),
|
|
32631
|
+
notifyHolder: external_exports2.boolean().optional(),
|
|
32632
|
+
updateSummary: external_exports2.string().optional(),
|
|
32633
|
+
idempotencyKey: external_exports2.string().optional()
|
|
32634
|
+
};
|
|
32635
|
+
var PublishIssuerSignedRefreshValidator = external_exports2.object({
|
|
32636
|
+
...PublishCredentialRefreshBaseFields,
|
|
32637
|
+
mode: external_exports2.literal("issuer-signed"),
|
|
32638
|
+
signedCredential: VCValidator
|
|
32639
|
+
});
|
|
32640
|
+
var PublishSigningAuthorityRefreshValidator = external_exports2.object({
|
|
32641
|
+
...PublishCredentialRefreshBaseFields,
|
|
32642
|
+
mode: external_exports2.literal("signing-authority"),
|
|
32643
|
+
credential: UnsignedVCValidator,
|
|
32644
|
+
signingAuthority: external_exports2.object({
|
|
32645
|
+
type: external_exports2.string().min(1)
|
|
32646
|
+
}).catchall(external_exports2.any())
|
|
32647
|
+
});
|
|
32648
|
+
var PublishCredentialRefreshInputValidator = external_exports2.object({
|
|
32649
|
+
...PublishCredentialRefreshBaseFields,
|
|
32650
|
+
mode: CredentialRefreshSigningModeValidator,
|
|
32651
|
+
signedCredential: VCValidator.optional(),
|
|
32652
|
+
credential: UnsignedVCValidator.optional(),
|
|
32653
|
+
signingAuthority: external_exports2.object({
|
|
32654
|
+
type: external_exports2.string().min(1)
|
|
32655
|
+
}).catchall(external_exports2.any()).optional()
|
|
32656
|
+
}).superRefine((input, ctx) => {
|
|
32657
|
+
if (input.mode === "issuer-signed" && !input.signedCredential) {
|
|
32658
|
+
ctx.addIssue({
|
|
32659
|
+
code: "custom",
|
|
32660
|
+
path: ["signedCredential"],
|
|
32661
|
+
message: "signedCredential is required for issuer-signed publication"
|
|
32662
|
+
});
|
|
32663
|
+
}
|
|
32664
|
+
if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
|
|
32665
|
+
ctx.addIssue({
|
|
32666
|
+
code: "custom",
|
|
32667
|
+
path: ["mode"],
|
|
32668
|
+
message: "issuer-signed publication cannot include signing-authority fields"
|
|
32669
|
+
});
|
|
32670
|
+
}
|
|
32671
|
+
if (input.mode === "signing-authority") {
|
|
32672
|
+
if (input.signedCredential !== void 0) {
|
|
32673
|
+
ctx.addIssue({
|
|
32674
|
+
code: "custom",
|
|
32675
|
+
path: ["signedCredential"],
|
|
32676
|
+
message: "signing-authority publication cannot include signedCredential"
|
|
32677
|
+
});
|
|
32678
|
+
}
|
|
32679
|
+
if (!input.credential) {
|
|
32680
|
+
ctx.addIssue({
|
|
32681
|
+
code: "custom",
|
|
32682
|
+
path: ["credential"],
|
|
32683
|
+
message: "credential is required for signing-authority publication"
|
|
32684
|
+
});
|
|
32685
|
+
}
|
|
32686
|
+
if (!input.signingAuthority) {
|
|
32687
|
+
ctx.addIssue({
|
|
32688
|
+
code: "custom",
|
|
32689
|
+
path: ["signingAuthority"],
|
|
32690
|
+
message: "signingAuthority is required for signing-authority publication"
|
|
32691
|
+
});
|
|
32692
|
+
}
|
|
32693
|
+
}
|
|
32694
|
+
});
|
|
32695
|
+
var PublishCredentialRefreshNotificationValidator = external_exports2.enum([
|
|
32696
|
+
"queued",
|
|
32697
|
+
"suppressed",
|
|
32698
|
+
"not-applicable",
|
|
32699
|
+
/** Publication succeeded, but the post-commit notification enqueue must be retried. */
|
|
32700
|
+
"delivery-failed"
|
|
32701
|
+
]);
|
|
32702
|
+
var PublishCredentialRefreshResultValidator = external_exports2.object({
|
|
32703
|
+
refreshId: external_exports2.string().min(1),
|
|
32704
|
+
version: external_exports2.number().int().positive(),
|
|
32705
|
+
publishedAt: external_exports2.string().min(1),
|
|
32706
|
+
notification: PublishCredentialRefreshNotificationValidator
|
|
32707
|
+
});
|
|
32708
|
+
var CredentialRefreshVersionMetadataValidator = external_exports2.object({
|
|
32709
|
+
version: external_exports2.number().int().positive(),
|
|
32710
|
+
publishedAt: external_exports2.string().min(1),
|
|
32711
|
+
effectiveAt: external_exports2.string().optional(),
|
|
32712
|
+
etag: external_exports2.string().optional(),
|
|
32713
|
+
signingMode: CredentialRefreshSigningModeValidator.optional(),
|
|
32714
|
+
updateSummary: external_exports2.string().optional()
|
|
32715
|
+
});
|
|
32716
|
+
var GetCredentialRefreshHistoryInputValidator = external_exports2.object({
|
|
32717
|
+
refreshId: external_exports2.string().min(1),
|
|
32718
|
+
cursor: external_exports2.string().optional(),
|
|
32719
|
+
limit: external_exports2.number().int().positive().optional()
|
|
32720
|
+
});
|
|
32721
|
+
var GetCredentialRefreshHistoryResultValidator = external_exports2.object({
|
|
32722
|
+
records: CredentialRefreshVersionMetadataValidator.array(),
|
|
32723
|
+
hasMore: external_exports2.boolean(),
|
|
32724
|
+
cursor: external_exports2.string().optional()
|
|
32725
|
+
});
|
|
32726
|
+
var CredentialRefreshChallengeValidator = external_exports2.object({
|
|
32727
|
+
challenge: external_exports2.string().min(1),
|
|
32728
|
+
expiresAt: external_exports2.string().min(1),
|
|
32729
|
+
domain: external_exports2.string().optional(),
|
|
32730
|
+
scheme: external_exports2.literal("LearnCardDIDAuth").optional()
|
|
32731
|
+
});
|
|
32732
|
+
var PublicCredentialRefreshEnvelopeValidator = external_exports2.object({
|
|
32733
|
+
format: external_exports2.literal("vc"),
|
|
32734
|
+
credential: VCValidator,
|
|
32735
|
+
etag: external_exports2.string().optional()
|
|
32736
|
+
});
|
|
32737
|
+
var JweCredentialRefreshEnvelopeValidator = external_exports2.object({
|
|
32738
|
+
format: external_exports2.literal("jwe"),
|
|
32739
|
+
jwe: JWEValidator2,
|
|
32740
|
+
etag: external_exports2.string().optional(),
|
|
32741
|
+
/** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
|
|
32742
|
+
version: external_exports2.number().int().positive().optional()
|
|
32743
|
+
});
|
|
32744
|
+
var CredentialRefreshResponseEnvelopeValidator = external_exports2.discriminatedUnion("format", [
|
|
32745
|
+
PublicCredentialRefreshEnvelopeValidator,
|
|
32746
|
+
JweCredentialRefreshEnvelopeValidator
|
|
32747
|
+
]);
|
|
32748
|
+
var CredentialRefreshFailureCodeValidator = external_exports2.enum([
|
|
32749
|
+
"UNAVAILABLE",
|
|
32750
|
+
"TIMEOUT",
|
|
32751
|
+
"UNSUPPORTED_SERVICE",
|
|
32752
|
+
"UNAUTHORIZED",
|
|
32753
|
+
"MALFORMED_RESPONSE",
|
|
32754
|
+
"INVALID_PROOF",
|
|
32755
|
+
"ISSUER_MISMATCH",
|
|
32756
|
+
"ID_MISMATCH",
|
|
32757
|
+
"ROLLBACK",
|
|
32758
|
+
"REVOKED",
|
|
32759
|
+
"UNSAFE_ENDPOINT"
|
|
32760
|
+
]);
|
|
32761
|
+
var CredentialRefreshUpdatedResultValidator = external_exports2.object({
|
|
32762
|
+
status: external_exports2.literal("updated"),
|
|
32763
|
+
credential: VCValidator,
|
|
32764
|
+
etag: external_exports2.string().optional(),
|
|
32765
|
+
managedVersion: external_exports2.number().int().positive().optional()
|
|
32766
|
+
});
|
|
32767
|
+
var CredentialRefreshUnchangedResultValidator = external_exports2.object({
|
|
32768
|
+
status: external_exports2.literal("unchanged"),
|
|
32769
|
+
checkedAt: external_exports2.string().min(1),
|
|
32770
|
+
etag: external_exports2.string().optional()
|
|
32771
|
+
});
|
|
32772
|
+
var CredentialRefreshUnsupportedResultValidator = external_exports2.object({
|
|
32773
|
+
status: external_exports2.literal("unsupported")
|
|
32774
|
+
});
|
|
32775
|
+
var CredentialRefreshFailedResultValidator = external_exports2.object({
|
|
32776
|
+
status: external_exports2.literal("failed"),
|
|
32777
|
+
code: CredentialRefreshFailureCodeValidator,
|
|
32778
|
+
retryable: external_exports2.boolean()
|
|
32779
|
+
});
|
|
32780
|
+
var CredentialRefreshResultValidator = external_exports2.discriminatedUnion("status", [
|
|
32781
|
+
CredentialRefreshUpdatedResultValidator,
|
|
32782
|
+
CredentialRefreshUnchangedResultValidator,
|
|
32783
|
+
CredentialRefreshUnsupportedResultValidator,
|
|
32784
|
+
CredentialRefreshFailedResultValidator
|
|
32785
|
+
]);
|
|
32566
32786
|
var LCNProfileDisplayValidator = external_exports2.object({
|
|
32567
32787
|
backgroundColor: external_exports2.string().optional(),
|
|
32568
32788
|
backgroundImage: external_exports2.string().optional(),
|
|
@@ -32898,7 +33118,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32898
33118
|
"Options for email/phone recipients (Universal Inbox)"
|
|
32899
33119
|
),
|
|
32900
33120
|
templateData: external_exports2.record(external_exports2.string(), external_exports2.unknown()).optional(),
|
|
32901
|
-
integrationId: external_exports2.string().optional().describe("Integration ID for activity tracking")
|
|
33121
|
+
integrationId: external_exports2.string().optional().describe("Integration ID for activity tracking"),
|
|
33122
|
+
refresh: external_exports2.boolean().optional().describe(
|
|
33123
|
+
"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."
|
|
33124
|
+
),
|
|
33125
|
+
idempotencyKey: external_exports2.string().min(1).max(200).optional().describe(
|
|
33126
|
+
"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."
|
|
33127
|
+
)
|
|
32902
33128
|
}).refine((data) => data.templateUri || data.template || data.signedCredential, {
|
|
32903
33129
|
message: "Either templateUri, template, or signedCredential must be provided.",
|
|
32904
33130
|
path: ["templateUri"]
|
|
@@ -32913,8 +33139,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32913
33139
|
message: "guardianEmail must differ from recipient (self-approval not allowed)",
|
|
32914
33140
|
path: ["options", "guardianEmail"]
|
|
32915
33141
|
}
|
|
32916
|
-
)
|
|
33142
|
+
).refine((data) => !data.idempotencyKey || data.refresh === true, {
|
|
33143
|
+
message: "idempotencyKey is only supported with refresh: true.",
|
|
33144
|
+
path: ["idempotencyKey"]
|
|
33145
|
+
});
|
|
32917
33146
|
var SendInboxResponseValidator = external_exports2.object({
|
|
33147
|
+
refresh: InboxCredentialRefreshReceiptValidator.optional(),
|
|
32918
33148
|
issuanceId: external_exports2.string(),
|
|
32919
33149
|
status: external_exports2.enum(["PENDING", "ISSUED", "EXPIRED", "DELIVERED", "CLAIMED"]),
|
|
32920
33150
|
claimUrl: external_exports2.string().url().optional().describe("Present when suppressDelivery=true"),
|
|
@@ -32929,8 +33159,34 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
32929
33159
|
activityId: external_exports2.string().describe("Links to the activity lifecycle for this issuance"),
|
|
32930
33160
|
inbox: SendInboxResponseValidator.optional().describe(
|
|
32931
33161
|
"Present when sent via email/phone (Universal Inbox)"
|
|
33162
|
+
),
|
|
33163
|
+
refresh: ManagedCredentialRefreshReceiptValidator.optional().describe(
|
|
33164
|
+
"Present when managed refresh was requested: issuance metadata the issuer keeps to publish future updates"
|
|
32932
33165
|
)
|
|
32933
33166
|
});
|
|
33167
|
+
var PrepareRefreshableSendInputValidator = external_exports2.object({
|
|
33168
|
+
recipient: external_exports2.string(),
|
|
33169
|
+
templateUri: external_exports2.string().optional(),
|
|
33170
|
+
template: SendBoostTemplateValidator.optional(),
|
|
33171
|
+
contractUri: external_exports2.string().optional(),
|
|
33172
|
+
templateData: external_exports2.record(external_exports2.string(), external_exports2.unknown()).optional(),
|
|
33173
|
+
integrationId: external_exports2.string().optional(),
|
|
33174
|
+
/** Credential ID to allocate for; generated server-side when omitted. */
|
|
33175
|
+
credentialId: external_exports2.string().min(1).optional(),
|
|
33176
|
+
idempotencyKey: external_exports2.string().min(1).max(200).optional()
|
|
33177
|
+
}).refine((data) => Boolean(data.templateUri) !== Boolean(data.template), {
|
|
33178
|
+
message: "Provide exactly one of templateUri or template."
|
|
33179
|
+
});
|
|
33180
|
+
var PrepareRefreshableSendResultValidator = external_exports2.object({
|
|
33181
|
+
boostUri: external_exports2.string(),
|
|
33182
|
+
credentialId: external_exports2.string(),
|
|
33183
|
+
refreshId: external_exports2.string(),
|
|
33184
|
+
refreshService: ManagedCredentialRefreshServiceValidator2,
|
|
33185
|
+
/** The DID to use as credentialSubject.id (recipient DID, or the profile's did:web). */
|
|
33186
|
+
holderDid: external_exports2.string(),
|
|
33187
|
+
/** Present when this idempotencyKey already completed: return it without signing. */
|
|
33188
|
+
completed: SendBoostResponseValidator.optional()
|
|
33189
|
+
});
|
|
32934
33190
|
var SendInputValidator = external_exports2.discriminatedUnion("type", [SendBoostInputValidator]);
|
|
32935
33191
|
var SendResponseValidator = external_exports2.discriminatedUnion("type", [SendBoostResponseValidator]);
|
|
32936
33192
|
var ConsentFlowTermsStatusValidator = external_exports2.enum(["live", "stale", "withdrawn"]);
|
|
@@ -33006,15 +33262,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33006
33262
|
var PaginatedConsentFlowDataValidator = PaginationResponseValidator.extend({
|
|
33007
33263
|
records: ConsentFlowContractDataValidator.array()
|
|
33008
33264
|
});
|
|
33009
|
-
var ConsentFlowContractDataForDidValidator = external_exports2.object({
|
|
33010
|
-
credentials: external_exports2.object({ category: external_exports2.string(), uri: external_exports2.string() }).array(),
|
|
33011
|
-
personal: external_exports2.record(external_exports2.string(), external_exports2.string()).default({}),
|
|
33012
|
-
date: external_exports2.string(),
|
|
33013
|
-
contractUri: external_exports2.string()
|
|
33014
|
-
});
|
|
33015
|
-
var PaginatedConsentFlowDataForDidValidator = PaginationResponseValidator.extend({
|
|
33016
|
-
records: ConsentFlowContractDataForDidValidator.array()
|
|
33017
|
-
});
|
|
33018
33265
|
var ConsentFlowTermValidator = external_exports2.object({
|
|
33019
33266
|
sharing: external_exports2.boolean().optional(),
|
|
33020
33267
|
shared: external_exports2.string().array().optional(),
|
|
@@ -33048,6 +33295,34 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33048
33295
|
status: ConsentFlowTermsStatusValidator
|
|
33049
33296
|
}).array()
|
|
33050
33297
|
});
|
|
33298
|
+
var ConsentFlowGuardianApprovalValidator = external_exports2.object({
|
|
33299
|
+
guardianProfileId: external_exports2.string(),
|
|
33300
|
+
guardianDid: external_exports2.string(),
|
|
33301
|
+
approvedAt: external_exports2.string().datetime(),
|
|
33302
|
+
contractUpdatedAt: external_exports2.string()
|
|
33303
|
+
});
|
|
33304
|
+
var ConsentFlowContractDataForDidValidator = external_exports2.object({
|
|
33305
|
+
credentials: external_exports2.object({ category: external_exports2.string(), uri: external_exports2.string() }).array(),
|
|
33306
|
+
personal: external_exports2.record(external_exports2.string(), external_exports2.string()).default({}),
|
|
33307
|
+
date: external_exports2.string(),
|
|
33308
|
+
createdAt: external_exports2.string().optional(),
|
|
33309
|
+
contractUpdatedAt: external_exports2.string(),
|
|
33310
|
+
contractExpiresAt: external_exports2.string().optional(),
|
|
33311
|
+
reasonForAccessing: external_exports2.string().optional(),
|
|
33312
|
+
guardian: external_exports2.object({
|
|
33313
|
+
required: external_exports2.boolean(),
|
|
33314
|
+
approved: external_exports2.boolean(),
|
|
33315
|
+
approval: ConsentFlowGuardianApprovalValidator.optional()
|
|
33316
|
+
}),
|
|
33317
|
+
contractUri: external_exports2.string(),
|
|
33318
|
+
termsUri: external_exports2.string(),
|
|
33319
|
+
status: ConsentFlowTermsStatusValidator,
|
|
33320
|
+
expiresAt: external_exports2.string().optional(),
|
|
33321
|
+
terms: ConsentFlowTermsValidator
|
|
33322
|
+
});
|
|
33323
|
+
var PaginatedConsentFlowDataForDidValidator = PaginationResponseValidator.extend({
|
|
33324
|
+
records: ConsentFlowContractDataForDidValidator.array()
|
|
33325
|
+
});
|
|
33051
33326
|
var ConsentFlowContractQueryValidator = external_exports2.object({
|
|
33052
33327
|
read: external_exports2.object({
|
|
33053
33328
|
anonymize: external_exports2.boolean().optional(),
|
|
@@ -33108,6 +33383,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33108
33383
|
expiresAt: external_exports2.string().optional(),
|
|
33109
33384
|
oneTime: external_exports2.boolean().optional(),
|
|
33110
33385
|
terms: ConsentFlowTermsValidator.optional(),
|
|
33386
|
+
guardianApproval: ConsentFlowGuardianApprovalValidator.optional(),
|
|
33111
33387
|
id: external_exports2.string(),
|
|
33112
33388
|
action: ConsentFlowTransactionActionValidator,
|
|
33113
33389
|
date: external_exports2.string(),
|
|
@@ -33229,6 +33505,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33229
33505
|
webhookUrl: external_exports2.string().optional()
|
|
33230
33506
|
});
|
|
33231
33507
|
var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX = "auth-grant:";
|
|
33508
|
+
var ACT_AS_HEADER = "X-LearnCard-Act-As";
|
|
33232
33509
|
var AuthGrantValidator = external_exports2.object({
|
|
33233
33510
|
id: external_exports2.string(),
|
|
33234
33511
|
name: external_exports2.string(),
|
|
@@ -33241,6 +33518,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33241
33518
|
}, "error")
|
|
33242
33519
|
}),
|
|
33243
33520
|
scope: external_exports2.string(),
|
|
33521
|
+
actAs: external_exports2.string().optional(),
|
|
33244
33522
|
createdAt: external_exports2.iso.datetime({ error: "createdAt must be a valid ISO 8601 datetime string" }),
|
|
33245
33523
|
expiresAt: external_exports2.iso.datetime({ error: "expiresAt must be a valid ISO 8601 datetime string" }).nullish().optional()
|
|
33246
33524
|
});
|
|
@@ -33312,6 +33590,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33312
33590
|
sessionJwt: external_exports2.string()
|
|
33313
33591
|
});
|
|
33314
33592
|
var InboxCredentialValidator = external_exports2.object({
|
|
33593
|
+
refresh: InboxCredentialRefreshReceiptValidator.optional(),
|
|
33594
|
+
refreshId: external_exports2.string().optional(),
|
|
33315
33595
|
id: external_exports2.string(),
|
|
33316
33596
|
credential: external_exports2.string().optional(),
|
|
33317
33597
|
isSigned: external_exports2.boolean(),
|
|
@@ -33366,12 +33646,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33366
33646
|
templateUri: external_exports2.string().optional().describe(
|
|
33367
33647
|
"URI of a boost template to use for issuance. The boost credential will be resolved and used. Mutually exclusive with credential field."
|
|
33368
33648
|
),
|
|
33649
|
+
refresh: external_exports2.boolean().optional().describe(
|
|
33650
|
+
"Allocate managed refresh before signing. Requires unsigned content and a registered signing authority; binds the holder on claim."
|
|
33651
|
+
),
|
|
33652
|
+
idempotencyKey: external_exports2.string().min(1).max(200).optional(),
|
|
33369
33653
|
// === OPTIONAL FEATURES ===
|
|
33370
33654
|
// Add major, distinct features at the top level.
|
|
33371
33655
|
//consentRequest: ConsentRequestValidator.optional(),
|
|
33372
33656
|
// === PROCESS CONFIGURATION (Optional) ===
|
|
33373
33657
|
// HOW should this issuance be handled?
|
|
33374
33658
|
configuration: external_exports2.object({
|
|
33659
|
+
guardianEmail: external_exports2.string().email().optional().describe(
|
|
33660
|
+
"Require approval from this guardian before the recipient can claim. Must differ from the recipient email."
|
|
33661
|
+
),
|
|
33375
33662
|
signingAuthority: IssueInboxSigningAuthorityValidator.optional().describe(
|
|
33376
33663
|
"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."
|
|
33377
33664
|
),
|
|
@@ -33425,17 +33712,130 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33425
33712
|
}).optional().describe(
|
|
33426
33713
|
"Configuration for the credential issuance. If not provided, the default configuration will be used."
|
|
33427
33714
|
)
|
|
33715
|
+
}).refine((data) => !data.idempotencyKey || data.refresh === true, {
|
|
33716
|
+
message: "idempotencyKey requires refresh: true."
|
|
33428
33717
|
}).refine((data) => data.credential || data.templateUri, {
|
|
33429
33718
|
message: "Either credential or templateUri must be provided.",
|
|
33430
33719
|
path: ["credential"]
|
|
33431
|
-
})
|
|
33720
|
+
}).refine(
|
|
33721
|
+
(data) => !data.configuration?.guardianEmail || data.recipient.type !== "email" || data.configuration.guardianEmail.toLowerCase() !== data.recipient.value.toLowerCase(),
|
|
33722
|
+
{
|
|
33723
|
+
message: "guardianEmail must differ from recipient (self-approval not allowed)",
|
|
33724
|
+
path: ["configuration", "guardianEmail"]
|
|
33725
|
+
}
|
|
33726
|
+
);
|
|
33432
33727
|
var IssueInboxCredentialResponseValidator = external_exports2.object({
|
|
33728
|
+
refresh: InboxCredentialRefreshReceiptValidator.optional(),
|
|
33433
33729
|
issuanceId: external_exports2.string(),
|
|
33434
33730
|
status: LCNInboxStatusEnumValidator,
|
|
33435
33731
|
recipient: ContactMethodQueryValidator,
|
|
33436
33732
|
claimUrl: external_exports2.string().url().optional(),
|
|
33437
33733
|
recipientDid: external_exports2.string().optional()
|
|
33438
33734
|
});
|
|
33735
|
+
var InboxBatchConfigurationValidator = IssueInboxCredentialValidator.shape.configuration.unwrap().extend({
|
|
33736
|
+
refresh: IssueInboxCredentialValidator.shape.refresh.describe(
|
|
33737
|
+
"Enable managed refresh by default. An item configuration.refresh overrides this value, including false."
|
|
33738
|
+
),
|
|
33739
|
+
delivery: IssueInboxCredentialValidator.shape.configuration.unwrap().shape.delivery.unwrap().extend({ suppress: external_exports2.boolean().optional() }).optional()
|
|
33740
|
+
});
|
|
33741
|
+
var InboxBatchItemConfigurationValidator = InboxBatchConfigurationValidator.extend({
|
|
33742
|
+
guardianEmail: InboxBatchConfigurationValidator.shape.guardianEmail.nullable().describe(
|
|
33743
|
+
"Require guardian approval, or set null to clear a batch-level guardianEmail for this item."
|
|
33744
|
+
)
|
|
33745
|
+
});
|
|
33746
|
+
var IssueInboxCredentialBatchItemValidator = external_exports2.object({
|
|
33747
|
+
...IssueInboxCredentialValidator.shape,
|
|
33748
|
+
configuration: InboxBatchItemConfigurationValidator.optional(),
|
|
33749
|
+
idempotencyKey: external_exports2.string().max(256).optional()
|
|
33750
|
+
}).refine((data) => data.credential || data.templateUri, {
|
|
33751
|
+
message: "Either credential or templateUri must be provided.",
|
|
33752
|
+
path: ["credential"]
|
|
33753
|
+
}).describe(
|
|
33754
|
+
"One issuance: provide credential or templateUri. Invalid input is rejected at submission with its item index."
|
|
33755
|
+
);
|
|
33756
|
+
var IssueInboxCredentialBatchValidator = external_exports2.object({
|
|
33757
|
+
requestId: external_exports2.string().min(1).max(256).optional(),
|
|
33758
|
+
items: external_exports2.array(IssueInboxCredentialBatchItemValidator).min(1).max(100),
|
|
33759
|
+
configuration: InboxBatchConfigurationValidator.optional()
|
|
33760
|
+
}).superRefine((batch, ctx) => {
|
|
33761
|
+
batch.items.forEach((item, index) => {
|
|
33762
|
+
const itemGuardian = item.configuration?.guardianEmail;
|
|
33763
|
+
const guardian = itemGuardian === null ? void 0 : itemGuardian ?? batch.configuration?.guardianEmail;
|
|
33764
|
+
if (guardian && item.recipient.type === "email" && guardian.toLowerCase() === item.recipient.value.toLowerCase()) {
|
|
33765
|
+
ctx.addIssue({
|
|
33766
|
+
code: "custom",
|
|
33767
|
+
path: ["items", index, "configuration", "guardianEmail"],
|
|
33768
|
+
message: "guardianEmail must differ from recipient (self-approval not allowed)"
|
|
33769
|
+
});
|
|
33770
|
+
}
|
|
33771
|
+
});
|
|
33772
|
+
});
|
|
33773
|
+
var InboxBatchErrorReasonValidator = external_exports2.enum([
|
|
33774
|
+
"DUPLICATE_KEY",
|
|
33775
|
+
"IDEMPOTENCY_MISMATCH",
|
|
33776
|
+
"IN_PROGRESS",
|
|
33777
|
+
"UNCONFIRMED"
|
|
33778
|
+
]);
|
|
33779
|
+
var IssueInboxCredentialBatchItemResultValidator = external_exports2.discriminatedUnion("success", [
|
|
33780
|
+
IssueInboxCredentialResponseValidator.extend({
|
|
33781
|
+
success: external_exports2.literal(true),
|
|
33782
|
+
index: external_exports2.number().int().nonnegative(),
|
|
33783
|
+
deduplicated: external_exports2.boolean().optional(),
|
|
33784
|
+
guardianStatus: GuardianStatusValidator.optional(),
|
|
33785
|
+
idempotencyKey: external_exports2.string().optional()
|
|
33786
|
+
}),
|
|
33787
|
+
external_exports2.object({
|
|
33788
|
+
success: external_exports2.literal(false),
|
|
33789
|
+
index: external_exports2.number().int().nonnegative(),
|
|
33790
|
+
idempotencyKey: external_exports2.string().optional(),
|
|
33791
|
+
recipient: ContactMethodQueryValidator.optional(),
|
|
33792
|
+
error: external_exports2.object({
|
|
33793
|
+
code: external_exports2.string(),
|
|
33794
|
+
message: external_exports2.string(),
|
|
33795
|
+
reason: InboxBatchErrorReasonValidator.optional()
|
|
33796
|
+
}),
|
|
33797
|
+
issuanceId: external_exports2.string().optional().describe(
|
|
33798
|
+
"Present when issuance completed but replay storage could not be confirmed. Reconcile this issuance; do not issue again with a new key."
|
|
33799
|
+
),
|
|
33800
|
+
claimUrl: external_exports2.string().url().optional().describe(
|
|
33801
|
+
"Claim URL of the completed issuance, if available, when replay storage could not be confirmed."
|
|
33802
|
+
)
|
|
33803
|
+
})
|
|
33804
|
+
]);
|
|
33805
|
+
var IssueInboxCredentialBatchResponseValidator = external_exports2.object({
|
|
33806
|
+
results: external_exports2.array(IssueInboxCredentialBatchItemResultValidator),
|
|
33807
|
+
summary: external_exports2.object({
|
|
33808
|
+
total: external_exports2.number(),
|
|
33809
|
+
succeeded: external_exports2.number(),
|
|
33810
|
+
failed: external_exports2.number(),
|
|
33811
|
+
deduplicated: external_exports2.number()
|
|
33812
|
+
})
|
|
33813
|
+
});
|
|
33814
|
+
var InboxBatchReceiptValidator = external_exports2.object({
|
|
33815
|
+
batchId: external_exports2.string(),
|
|
33816
|
+
status: external_exports2.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
|
|
33817
|
+
createdAt: external_exports2.string()
|
|
33818
|
+
});
|
|
33819
|
+
var InboxBatchStatusValidator = external_exports2.object({
|
|
33820
|
+
batchId: external_exports2.string(),
|
|
33821
|
+
createdAt: external_exports2.string(),
|
|
33822
|
+
done: external_exports2.boolean().describe(
|
|
33823
|
+
"True when no queued or processing items remain, including unconfirmed outcomes."
|
|
33824
|
+
),
|
|
33825
|
+
status: external_exports2.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
|
|
33826
|
+
items: external_exports2.array(
|
|
33827
|
+
external_exports2.object({
|
|
33828
|
+
index: external_exports2.number().int().nonnegative(),
|
|
33829
|
+
state: external_exports2.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
|
|
33830
|
+
result: IssueInboxCredentialBatchItemResultValidator.optional()
|
|
33831
|
+
})
|
|
33832
|
+
),
|
|
33833
|
+
summary: IssueInboxCredentialBatchResponseValidator.shape.summary.extend({
|
|
33834
|
+
completed: external_exports2.number(),
|
|
33835
|
+
pending: external_exports2.number(),
|
|
33836
|
+
unconfirmed: external_exports2.number()
|
|
33837
|
+
})
|
|
33838
|
+
});
|
|
33439
33839
|
var CredentialNameRefValidator = external_exports2.object({ name: external_exports2.string() }).passthrough();
|
|
33440
33840
|
var ClaimInboxCredentialValidator = external_exports2.object({
|
|
33441
33841
|
credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).or(CredentialNameRefValidator).describe("The credential to issue, or a { name } reference to resolve a boost template."),
|
|
@@ -33921,6 +34321,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
33921
34321
|
eventType: CredentialActivityEventTypeValidator,
|
|
33922
34322
|
timestamp: external_exports2.string(),
|
|
33923
34323
|
actorProfileId: external_exports2.string().optional(),
|
|
34324
|
+
onBehalfOf: external_exports2.string().optional(),
|
|
33924
34325
|
recipientType: CredentialActivityRecipientTypeValidator,
|
|
33925
34326
|
recipientIdentifier: external_exports2.string(),
|
|
33926
34327
|
boostUri: external_exports2.string().optional(),
|
|
@@ -34084,191 +34485,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
34084
34485
|
const result = inAppMessagesFlagValidator.safeParse(raw);
|
|
34085
34486
|
return result.success ? result.data : EMPTY_IN_APP_MESSAGES_FLAG;
|
|
34086
34487
|
}, "parseInAppMessagesFlag");
|
|
34087
|
-
var LearnCardRefreshAuthorizationValidator = external_exports2.object({ type: external_exports2.literal("LearnCardDIDAuth") }).catchall(external_exports2.any());
|
|
34088
|
-
var ManagedCredentialRefreshServiceValidator = external_exports2.object({
|
|
34089
|
-
id: external_exports2.string().min(1),
|
|
34090
|
-
type: external_exports2.literal("LearnCardCredentialRefresh2026"),
|
|
34091
|
-
authorization: LearnCardRefreshAuthorizationValidator.optional()
|
|
34092
|
-
}).catchall(external_exports2.any());
|
|
34093
|
-
var StandardCredentialRefreshServiceValidator = external_exports2.object({
|
|
34094
|
-
id: external_exports2.string().min(1),
|
|
34095
|
-
type: external_exports2.literal("1EdTechCredentialRefresh")
|
|
34096
|
-
}).catchall(external_exports2.any());
|
|
34097
|
-
var SupportedCredentialRefreshServiceValidator2 = external_exports2.union([
|
|
34098
|
-
ManagedCredentialRefreshServiceValidator,
|
|
34099
|
-
StandardCredentialRefreshServiceValidator
|
|
34100
|
-
]);
|
|
34101
|
-
var AllocateCredentialRefreshInputValidator = external_exports2.object({
|
|
34102
|
-
holder: external_exports2.object({
|
|
34103
|
-
profileId: external_exports2.string().optional(),
|
|
34104
|
-
did: external_exports2.string().min(1)
|
|
34105
|
-
}),
|
|
34106
|
-
credentialId: external_exports2.string().min(1)
|
|
34107
|
-
});
|
|
34108
|
-
var AllocateCredentialRefreshResultValidator = external_exports2.object({
|
|
34109
|
-
refreshId: external_exports2.string().min(1),
|
|
34110
|
-
refreshService: ManagedCredentialRefreshServiceValidator.extend({
|
|
34111
|
-
authorization: LearnCardRefreshAuthorizationValidator
|
|
34112
|
-
})
|
|
34113
|
-
});
|
|
34114
|
-
var CredentialRefreshSigningModeValidator = external_exports2.enum(["issuer-signed", "signing-authority"]);
|
|
34115
|
-
var PublishCredentialRefreshBaseFields = {
|
|
34116
|
-
refreshId: external_exports2.string().min(1),
|
|
34117
|
-
notifyHolder: external_exports2.boolean().optional(),
|
|
34118
|
-
updateSummary: external_exports2.string().optional(),
|
|
34119
|
-
idempotencyKey: external_exports2.string().optional()
|
|
34120
|
-
};
|
|
34121
|
-
var PublishIssuerSignedRefreshValidator = external_exports2.object({
|
|
34122
|
-
...PublishCredentialRefreshBaseFields,
|
|
34123
|
-
mode: external_exports2.literal("issuer-signed"),
|
|
34124
|
-
signedCredential: VCValidator
|
|
34125
|
-
});
|
|
34126
|
-
var PublishSigningAuthorityRefreshValidator = external_exports2.object({
|
|
34127
|
-
...PublishCredentialRefreshBaseFields,
|
|
34128
|
-
mode: external_exports2.literal("signing-authority"),
|
|
34129
|
-
credential: UnsignedVCValidator,
|
|
34130
|
-
signingAuthority: external_exports2.object({
|
|
34131
|
-
type: external_exports2.string().min(1)
|
|
34132
|
-
}).catchall(external_exports2.any())
|
|
34133
|
-
});
|
|
34134
|
-
var PublishCredentialRefreshInputValidator = external_exports2.object({
|
|
34135
|
-
...PublishCredentialRefreshBaseFields,
|
|
34136
|
-
mode: CredentialRefreshSigningModeValidator,
|
|
34137
|
-
signedCredential: VCValidator.optional(),
|
|
34138
|
-
credential: UnsignedVCValidator.optional(),
|
|
34139
|
-
signingAuthority: external_exports2.object({
|
|
34140
|
-
type: external_exports2.string().min(1)
|
|
34141
|
-
}).catchall(external_exports2.any()).optional()
|
|
34142
|
-
}).superRefine((input, ctx) => {
|
|
34143
|
-
if (input.mode === "issuer-signed" && !input.signedCredential) {
|
|
34144
|
-
ctx.addIssue({
|
|
34145
|
-
code: "custom",
|
|
34146
|
-
path: ["signedCredential"],
|
|
34147
|
-
message: "signedCredential is required for issuer-signed publication"
|
|
34148
|
-
});
|
|
34149
|
-
}
|
|
34150
|
-
if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
|
|
34151
|
-
ctx.addIssue({
|
|
34152
|
-
code: "custom",
|
|
34153
|
-
path: ["mode"],
|
|
34154
|
-
message: "issuer-signed publication cannot include signing-authority fields"
|
|
34155
|
-
});
|
|
34156
|
-
}
|
|
34157
|
-
if (input.mode === "signing-authority") {
|
|
34158
|
-
if (input.signedCredential !== void 0) {
|
|
34159
|
-
ctx.addIssue({
|
|
34160
|
-
code: "custom",
|
|
34161
|
-
path: ["signedCredential"],
|
|
34162
|
-
message: "signing-authority publication cannot include signedCredential"
|
|
34163
|
-
});
|
|
34164
|
-
}
|
|
34165
|
-
if (!input.credential) {
|
|
34166
|
-
ctx.addIssue({
|
|
34167
|
-
code: "custom",
|
|
34168
|
-
path: ["credential"],
|
|
34169
|
-
message: "credential is required for signing-authority publication"
|
|
34170
|
-
});
|
|
34171
|
-
}
|
|
34172
|
-
if (!input.signingAuthority) {
|
|
34173
|
-
ctx.addIssue({
|
|
34174
|
-
code: "custom",
|
|
34175
|
-
path: ["signingAuthority"],
|
|
34176
|
-
message: "signingAuthority is required for signing-authority publication"
|
|
34177
|
-
});
|
|
34178
|
-
}
|
|
34179
|
-
}
|
|
34180
|
-
});
|
|
34181
|
-
var PublishCredentialRefreshNotificationValidator = external_exports2.enum([
|
|
34182
|
-
"queued",
|
|
34183
|
-
"suppressed",
|
|
34184
|
-
"not-applicable",
|
|
34185
|
-
/** Publication succeeded, but the post-commit notification enqueue must be retried. */
|
|
34186
|
-
"delivery-failed"
|
|
34187
|
-
]);
|
|
34188
|
-
var PublishCredentialRefreshResultValidator = external_exports2.object({
|
|
34189
|
-
refreshId: external_exports2.string().min(1),
|
|
34190
|
-
version: external_exports2.number().int().positive(),
|
|
34191
|
-
publishedAt: external_exports2.string().min(1),
|
|
34192
|
-
notification: PublishCredentialRefreshNotificationValidator
|
|
34193
|
-
});
|
|
34194
|
-
var CredentialRefreshVersionMetadataValidator = external_exports2.object({
|
|
34195
|
-
version: external_exports2.number().int().positive(),
|
|
34196
|
-
publishedAt: external_exports2.string().min(1),
|
|
34197
|
-
effectiveAt: external_exports2.string().optional(),
|
|
34198
|
-
etag: external_exports2.string().optional(),
|
|
34199
|
-
signingMode: CredentialRefreshSigningModeValidator.optional(),
|
|
34200
|
-
updateSummary: external_exports2.string().optional()
|
|
34201
|
-
});
|
|
34202
|
-
var GetCredentialRefreshHistoryInputValidator = external_exports2.object({
|
|
34203
|
-
refreshId: external_exports2.string().min(1),
|
|
34204
|
-
cursor: external_exports2.string().optional(),
|
|
34205
|
-
limit: external_exports2.number().int().positive().optional()
|
|
34206
|
-
});
|
|
34207
|
-
var GetCredentialRefreshHistoryResultValidator = external_exports2.object({
|
|
34208
|
-
records: CredentialRefreshVersionMetadataValidator.array(),
|
|
34209
|
-
hasMore: external_exports2.boolean(),
|
|
34210
|
-
cursor: external_exports2.string().optional()
|
|
34211
|
-
});
|
|
34212
|
-
var CredentialRefreshChallengeValidator = external_exports2.object({
|
|
34213
|
-
challenge: external_exports2.string().min(1),
|
|
34214
|
-
expiresAt: external_exports2.string().min(1),
|
|
34215
|
-
domain: external_exports2.string().optional(),
|
|
34216
|
-
scheme: external_exports2.literal("LearnCardDIDAuth").optional()
|
|
34217
|
-
});
|
|
34218
|
-
var PublicCredentialRefreshEnvelopeValidator = external_exports2.object({
|
|
34219
|
-
format: external_exports2.literal("vc"),
|
|
34220
|
-
credential: VCValidator,
|
|
34221
|
-
etag: external_exports2.string().optional()
|
|
34222
|
-
});
|
|
34223
|
-
var JweCredentialRefreshEnvelopeValidator = external_exports2.object({
|
|
34224
|
-
format: external_exports2.literal("jwe"),
|
|
34225
|
-
jwe: JWEValidator2,
|
|
34226
|
-
etag: external_exports2.string().optional(),
|
|
34227
|
-
/** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
|
|
34228
|
-
version: external_exports2.number().int().positive().optional()
|
|
34229
|
-
});
|
|
34230
|
-
var CredentialRefreshResponseEnvelopeValidator = external_exports2.discriminatedUnion("format", [
|
|
34231
|
-
PublicCredentialRefreshEnvelopeValidator,
|
|
34232
|
-
JweCredentialRefreshEnvelopeValidator
|
|
34233
|
-
]);
|
|
34234
|
-
var CredentialRefreshFailureCodeValidator = external_exports2.enum([
|
|
34235
|
-
"UNAVAILABLE",
|
|
34236
|
-
"TIMEOUT",
|
|
34237
|
-
"UNSUPPORTED_SERVICE",
|
|
34238
|
-
"UNAUTHORIZED",
|
|
34239
|
-
"MALFORMED_RESPONSE",
|
|
34240
|
-
"INVALID_PROOF",
|
|
34241
|
-
"ISSUER_MISMATCH",
|
|
34242
|
-
"ID_MISMATCH",
|
|
34243
|
-
"ROLLBACK",
|
|
34244
|
-
"REVOKED",
|
|
34245
|
-
"UNSAFE_ENDPOINT"
|
|
34246
|
-
]);
|
|
34247
|
-
var CredentialRefreshUpdatedResultValidator = external_exports2.object({
|
|
34248
|
-
status: external_exports2.literal("updated"),
|
|
34249
|
-
credential: VCValidator,
|
|
34250
|
-
etag: external_exports2.string().optional(),
|
|
34251
|
-
managedVersion: external_exports2.number().int().positive().optional()
|
|
34252
|
-
});
|
|
34253
|
-
var CredentialRefreshUnchangedResultValidator = external_exports2.object({
|
|
34254
|
-
status: external_exports2.literal("unchanged"),
|
|
34255
|
-
checkedAt: external_exports2.string().min(1),
|
|
34256
|
-
etag: external_exports2.string().optional()
|
|
34257
|
-
});
|
|
34258
|
-
var CredentialRefreshUnsupportedResultValidator = external_exports2.object({
|
|
34259
|
-
status: external_exports2.literal("unsupported")
|
|
34260
|
-
});
|
|
34261
|
-
var CredentialRefreshFailedResultValidator = external_exports2.object({
|
|
34262
|
-
status: external_exports2.literal("failed"),
|
|
34263
|
-
code: CredentialRefreshFailureCodeValidator,
|
|
34264
|
-
retryable: external_exports2.boolean()
|
|
34265
|
-
});
|
|
34266
|
-
var CredentialRefreshResultValidator = external_exports2.discriminatedUnion("status", [
|
|
34267
|
-
CredentialRefreshUpdatedResultValidator,
|
|
34268
|
-
CredentialRefreshUnchangedResultValidator,
|
|
34269
|
-
CredentialRefreshUnsupportedResultValidator,
|
|
34270
|
-
CredentialRefreshFailedResultValidator
|
|
34271
|
-
]);
|
|
34272
34488
|
}
|
|
34273
34489
|
});
|
|
34274
34490
|
var require_dist = __commonJS({
|
|
@@ -34564,6 +34780,18 @@ var ImageWithLoadingStateValdator = external_exports.object({
|
|
|
34564
34780
|
});
|
|
34565
34781
|
var import_types2 = __toESM(require_dist());
|
|
34566
34782
|
var import_types22 = __toESM(require_dist());
|
|
34783
|
+
var MANAGED_REFRESH_TYPE_TERM = "LearnCardCredentialRefresh2026";
|
|
34784
|
+
var MANAGED_REFRESH_DID_AUTH_TERM = "LearnCardDIDAuth";
|
|
34785
|
+
var MANAGED_REFRESH_TYPE_IRI = "https://learncard.com/refresh#LearnCardCredentialRefresh2026";
|
|
34786
|
+
var MANAGED_REFRESH_AUTHORIZATION_IRI = "https://purl.imsglobal.org/spec/ob/v3p0#authorization";
|
|
34787
|
+
var MANAGED_REFRESH_DID_AUTH_IRI = "https://docs.learncard.com/definitions#LearnCardDIDAuth";
|
|
34788
|
+
var MANAGED_REFRESH_SERVICE_CONTEXT = {
|
|
34789
|
+
[MANAGED_REFRESH_TYPE_TERM]: MANAGED_REFRESH_TYPE_IRI,
|
|
34790
|
+
authorization: {
|
|
34791
|
+
"@id": MANAGED_REFRESH_AUTHORIZATION_IRI,
|
|
34792
|
+
"@context": { [MANAGED_REFRESH_DID_AUTH_TERM]: MANAGED_REFRESH_DID_AUTH_IRI }
|
|
34793
|
+
}
|
|
34794
|
+
};
|
|
34567
34795
|
var EnvironmentConfigurationError = class extends Error {
|
|
34568
34796
|
static {
|
|
34569
34797
|
__name(this, "EnvironmentConfigurationError");
|