@learncard/sss-key-manager 0.1.22 → 0.1.24
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/sss-key-manager.cjs.development.js +415 -199
- package/dist/sss-key-manager.cjs.development.js.map +2 -2
- package/dist/sss-key-manager.cjs.production.min.js +8 -8
- package/dist/sss-key-manager.cjs.production.min.js.map +3 -3
- package/dist/sss-key-manager.esm.js +415 -199
- package/dist/sss-key-manager.esm.js.map +2 -2
- package/package.json +3 -3
|
@@ -49,6 +49,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
49
49
|
var __toCommonJS = /* @__PURE__ */ __name((mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod), "__toCommonJS");
|
|
50
50
|
var index_exports = {};
|
|
51
51
|
__export(index_exports, {
|
|
52
|
+
ACT_AS_HEADER: /* @__PURE__ */ __name(() => ACT_AS_HEADER, "ACT_AS_HEADER"),
|
|
52
53
|
AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX: /* @__PURE__ */ __name(() => AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX, "AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX"),
|
|
53
54
|
AchievementCredentialValidator: /* @__PURE__ */ __name(() => AchievementCredentialValidator, "AchievementCredentialValidator"),
|
|
54
55
|
AchievementCriteriaValidator: /* @__PURE__ */ __name(() => AchievementCriteriaValidator, "AchievementCriteriaValidator"),
|
|
@@ -111,6 +112,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
111
112
|
ConsentFlowContractValidator: /* @__PURE__ */ __name(() => ConsentFlowContractValidator, "ConsentFlowContractValidator"),
|
|
112
113
|
ConsentFlowDataForDidQueryValidator: /* @__PURE__ */ __name(() => ConsentFlowDataForDidQueryValidator, "ConsentFlowDataForDidQueryValidator"),
|
|
113
114
|
ConsentFlowDataQueryValidator: /* @__PURE__ */ __name(() => ConsentFlowDataQueryValidator, "ConsentFlowDataQueryValidator"),
|
|
115
|
+
ConsentFlowGuardianApprovalValidator: /* @__PURE__ */ __name(() => ConsentFlowGuardianApprovalValidator, "ConsentFlowGuardianApprovalValidator"),
|
|
114
116
|
ConsentFlowTermValidator: /* @__PURE__ */ __name(() => ConsentFlowTermValidator, "ConsentFlowTermValidator"),
|
|
115
117
|
ConsentFlowTermsQueryValidator: /* @__PURE__ */ __name(() => ConsentFlowTermsQueryValidator, "ConsentFlowTermsQueryValidator"),
|
|
116
118
|
ConsentFlowTermsStatusValidator: /* @__PURE__ */ __name(() => ConsentFlowTermsStatusValidator, "ConsentFlowTermsStatusValidator"),
|
|
@@ -187,10 +189,18 @@ var require_types_cjs_development = __commonJS({
|
|
|
187
189
|
IdentifierTypeValidator: /* @__PURE__ */ __name(() => IdentifierTypeValidator, "IdentifierTypeValidator"),
|
|
188
190
|
IdentityObjectValidator: /* @__PURE__ */ __name(() => IdentityObjectValidator, "IdentityObjectValidator"),
|
|
189
191
|
ImageValidator: /* @__PURE__ */ __name(() => ImageValidator, "ImageValidator"),
|
|
192
|
+
InboxBatchErrorReasonValidator: /* @__PURE__ */ __name(() => InboxBatchErrorReasonValidator, "InboxBatchErrorReasonValidator"),
|
|
193
|
+
InboxBatchReceiptValidator: /* @__PURE__ */ __name(() => InboxBatchReceiptValidator, "InboxBatchReceiptValidator"),
|
|
194
|
+
InboxBatchStatusValidator: /* @__PURE__ */ __name(() => InboxBatchStatusValidator, "InboxBatchStatusValidator"),
|
|
190
195
|
InboxCredentialQueryValidator: /* @__PURE__ */ __name(() => InboxCredentialQueryValidator, "InboxCredentialQueryValidator"),
|
|
196
|
+
InboxCredentialRefreshReceiptValidator: /* @__PURE__ */ __name(() => InboxCredentialRefreshReceiptValidator, "InboxCredentialRefreshReceiptValidator"),
|
|
191
197
|
InboxCredentialValidator: /* @__PURE__ */ __name(() => InboxCredentialValidator, "InboxCredentialValidator"),
|
|
192
198
|
IncrementCounterEventValidator: /* @__PURE__ */ __name(() => IncrementCounterEventValidator, "IncrementCounterEventValidator"),
|
|
193
199
|
InstalledAppValidator: /* @__PURE__ */ __name(() => InstalledAppValidator, "InstalledAppValidator"),
|
|
200
|
+
IssueInboxCredentialBatchItemResultValidator: /* @__PURE__ */ __name(() => IssueInboxCredentialBatchItemResultValidator, "IssueInboxCredentialBatchItemResultValidator"),
|
|
201
|
+
IssueInboxCredentialBatchItemValidator: /* @__PURE__ */ __name(() => IssueInboxCredentialBatchItemValidator, "IssueInboxCredentialBatchItemValidator"),
|
|
202
|
+
IssueInboxCredentialBatchResponseValidator: /* @__PURE__ */ __name(() => IssueInboxCredentialBatchResponseValidator, "IssueInboxCredentialBatchResponseValidator"),
|
|
203
|
+
IssueInboxCredentialBatchValidator: /* @__PURE__ */ __name(() => IssueInboxCredentialBatchValidator, "IssueInboxCredentialBatchValidator"),
|
|
194
204
|
IssueInboxCredentialResponseValidator: /* @__PURE__ */ __name(() => IssueInboxCredentialResponseValidator, "IssueInboxCredentialResponseValidator"),
|
|
195
205
|
IssueInboxCredentialValidator: /* @__PURE__ */ __name(() => IssueInboxCredentialValidator, "IssueInboxCredentialValidator"),
|
|
196
206
|
IssueInboxSigningAuthorityValidator: /* @__PURE__ */ __name(() => IssueInboxSigningAuthorityValidator, "IssueInboxSigningAuthorityValidator"),
|
|
@@ -239,6 +249,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
239
249
|
LaunchTypeValidator: /* @__PURE__ */ __name(() => LaunchTypeValidator, "LaunchTypeValidator"),
|
|
240
250
|
LearnCardRefreshAuthorizationValidator: /* @__PURE__ */ __name(() => LearnCardRefreshAuthorizationValidator, "LearnCardRefreshAuthorizationValidator"),
|
|
241
251
|
LinkProviderFrameworkInputValidator: /* @__PURE__ */ __name(() => LinkProviderFrameworkInputValidator, "LinkProviderFrameworkInputValidator"),
|
|
252
|
+
ManagedCredentialRefreshReceiptValidator: /* @__PURE__ */ __name(() => ManagedCredentialRefreshReceiptValidator, "ManagedCredentialRefreshReceiptValidator"),
|
|
242
253
|
ManagedCredentialRefreshServiceValidator: /* @__PURE__ */ __name(() => ManagedCredentialRefreshServiceValidator, "ManagedCredentialRefreshServiceValidator"),
|
|
243
254
|
PaginatedAppStoreListingsValidator: /* @__PURE__ */ __name(() => PaginatedAppStoreListingsValidator, "PaginatedAppStoreListingsValidator"),
|
|
244
255
|
PaginatedBoostRecipientsValidator: /* @__PURE__ */ __name(() => PaginatedBoostRecipientsValidator, "PaginatedBoostRecipientsValidator"),
|
|
@@ -265,6 +276,8 @@ var require_types_cjs_development = __commonJS({
|
|
|
265
276
|
PaginatedVisibleLCNProfilesValidator: /* @__PURE__ */ __name(() => PaginatedVisibleLCNProfilesValidator, "PaginatedVisibleLCNProfilesValidator"),
|
|
266
277
|
PaginationOptionsValidator: /* @__PURE__ */ __name(() => PaginationOptionsValidator, "PaginationOptionsValidator"),
|
|
267
278
|
PaginationResponseValidator: /* @__PURE__ */ __name(() => PaginationResponseValidator, "PaginationResponseValidator"),
|
|
279
|
+
PrepareRefreshableSendInputValidator: /* @__PURE__ */ __name(() => PrepareRefreshableSendInputValidator, "PrepareRefreshableSendInputValidator"),
|
|
280
|
+
PrepareRefreshableSendResultValidator: /* @__PURE__ */ __name(() => PrepareRefreshableSendResultValidator, "PrepareRefreshableSendResultValidator"),
|
|
268
281
|
ProfileValidator: /* @__PURE__ */ __name(() => ProfileValidator, "ProfileValidator"),
|
|
269
282
|
ProfileVisibilityEnum: /* @__PURE__ */ __name(() => ProfileVisibilityEnum, "ProfileVisibilityEnum"),
|
|
270
283
|
PromotionLevelValidator: /* @__PURE__ */ __name(() => PromotionLevelValidator, "PromotionLevelValidator"),
|
|
@@ -290,6 +303,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
290
303
|
SendAiSessionCredentialEventValidator: /* @__PURE__ */ __name(() => SendAiSessionCredentialEventValidator, "SendAiSessionCredentialEventValidator"),
|
|
291
304
|
SendBoostInputValidator: /* @__PURE__ */ __name(() => SendBoostInputValidator, "SendBoostInputValidator"),
|
|
292
305
|
SendBoostResponseValidator: /* @__PURE__ */ __name(() => SendBoostResponseValidator, "SendBoostResponseValidator"),
|
|
306
|
+
SendBoostTemplateValidator: /* @__PURE__ */ __name(() => SendBoostTemplateValidator, "SendBoostTemplateValidator"),
|
|
293
307
|
SendBrandingOptionsValidator: /* @__PURE__ */ __name(() => SendBrandingOptionsValidator, "SendBrandingOptionsValidator"),
|
|
294
308
|
SendCredentialEventValidator: /* @__PURE__ */ __name(() => SendCredentialEventValidator, "SendCredentialEventValidator"),
|
|
295
309
|
SendInboxResponseValidator: /* @__PURE__ */ __name(() => SendInboxResponseValidator, "SendInboxResponseValidator"),
|
|
@@ -15757,14 +15771,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15757
15771
|
}).catchall(external_exports.any());
|
|
15758
15772
|
var ProofValidator = external_exports.object({
|
|
15759
15773
|
type: external_exports.string(),
|
|
15760
|
-
created: external_exports.string(),
|
|
15774
|
+
created: external_exports.string().optional(),
|
|
15761
15775
|
challenge: external_exports.string().optional(),
|
|
15762
15776
|
domain: external_exports.string().optional(),
|
|
15763
15777
|
nonce: external_exports.string().optional(),
|
|
15764
15778
|
proofPurpose: external_exports.string(),
|
|
15765
15779
|
verificationMethod: external_exports.string(),
|
|
15766
15780
|
jws: external_exports.string().optional()
|
|
15767
|
-
}).catchall(external_exports.any())
|
|
15781
|
+
}).catchall(external_exports.any()).superRefine((proof, ctx) => {
|
|
15782
|
+
if (proof.created === void 0 && (proof.type !== "DataIntegrityProof" || proof.cryptosuite !== "ecdsa-rdfc-2019")) {
|
|
15783
|
+
ctx.addIssue({
|
|
15784
|
+
code: "custom",
|
|
15785
|
+
path: ["created"],
|
|
15786
|
+
message: "created is required for this proof suite"
|
|
15787
|
+
});
|
|
15788
|
+
}
|
|
15789
|
+
});
|
|
15768
15790
|
var VCValidator = UnsignedVCValidator.extend({
|
|
15769
15791
|
proof: ProofValidator.or(ProofValidator.array())
|
|
15770
15792
|
});
|
|
@@ -16206,6 +16228,204 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16206
16228
|
$or: BaseStringQuery.array()
|
|
16207
16229
|
})
|
|
16208
16230
|
]);
|
|
16231
|
+
var LearnCardRefreshAuthorizationValidator = external_exports.object({ type: external_exports.literal("LearnCardDIDAuth") }).catchall(external_exports.any());
|
|
16232
|
+
var ManagedCredentialRefreshServiceValidator = external_exports.object({
|
|
16233
|
+
id: external_exports.string().min(1),
|
|
16234
|
+
type: external_exports.literal("LearnCardCredentialRefresh2026"),
|
|
16235
|
+
authorization: LearnCardRefreshAuthorizationValidator.optional()
|
|
16236
|
+
}).catchall(external_exports.any());
|
|
16237
|
+
var StandardCredentialRefreshServiceValidator = external_exports.object({
|
|
16238
|
+
id: external_exports.string().min(1),
|
|
16239
|
+
type: external_exports.literal("1EdTechCredentialRefresh")
|
|
16240
|
+
}).catchall(external_exports.any());
|
|
16241
|
+
var SupportedCredentialRefreshServiceValidator = external_exports.union([
|
|
16242
|
+
ManagedCredentialRefreshServiceValidator,
|
|
16243
|
+
StandardCredentialRefreshServiceValidator
|
|
16244
|
+
]);
|
|
16245
|
+
var AllocateCredentialRefreshInputValidator = external_exports.object({
|
|
16246
|
+
holder: external_exports.object({
|
|
16247
|
+
profileId: external_exports.string().optional(),
|
|
16248
|
+
did: external_exports.string().min(1)
|
|
16249
|
+
}),
|
|
16250
|
+
credentialId: external_exports.string().min(1)
|
|
16251
|
+
});
|
|
16252
|
+
var AllocateCredentialRefreshResultValidator = external_exports.object({
|
|
16253
|
+
refreshId: external_exports.string().min(1),
|
|
16254
|
+
refreshService: ManagedCredentialRefreshServiceValidator.extend({
|
|
16255
|
+
authorization: LearnCardRefreshAuthorizationValidator
|
|
16256
|
+
})
|
|
16257
|
+
});
|
|
16258
|
+
var ManagedCredentialRefreshReceiptValidator = external_exports.object({
|
|
16259
|
+
refreshId: external_exports.string().min(1),
|
|
16260
|
+
refreshService: ManagedCredentialRefreshServiceValidator,
|
|
16261
|
+
credentialId: external_exports.string().min(1),
|
|
16262
|
+
issuerDid: external_exports.string().min(1),
|
|
16263
|
+
holderDid: external_exports.string().min(1),
|
|
16264
|
+
credentialStatus: CredentialStatusValidator.or(
|
|
16265
|
+
CredentialStatusValidator.array()
|
|
16266
|
+
).optional()
|
|
16267
|
+
}).strip();
|
|
16268
|
+
var InboxCredentialRefreshReceiptValidator = ManagedCredentialRefreshReceiptValidator.omit(
|
|
16269
|
+
{ holderDid: true }
|
|
16270
|
+
).extend({ holderDid: external_exports.string().min(1).optional() });
|
|
16271
|
+
var CredentialRefreshSigningModeValidator = external_exports.enum(["issuer-signed", "signing-authority"]);
|
|
16272
|
+
var PublishCredentialRefreshBaseFields = {
|
|
16273
|
+
refreshId: external_exports.string().min(1),
|
|
16274
|
+
notifyHolder: external_exports.boolean().optional(),
|
|
16275
|
+
updateSummary: external_exports.string().optional(),
|
|
16276
|
+
idempotencyKey: external_exports.string().optional()
|
|
16277
|
+
};
|
|
16278
|
+
var PublishIssuerSignedRefreshValidator = external_exports.object({
|
|
16279
|
+
...PublishCredentialRefreshBaseFields,
|
|
16280
|
+
mode: external_exports.literal("issuer-signed"),
|
|
16281
|
+
signedCredential: VCValidator
|
|
16282
|
+
});
|
|
16283
|
+
var PublishSigningAuthorityRefreshValidator = external_exports.object({
|
|
16284
|
+
...PublishCredentialRefreshBaseFields,
|
|
16285
|
+
mode: external_exports.literal("signing-authority"),
|
|
16286
|
+
credential: UnsignedVCValidator,
|
|
16287
|
+
signingAuthority: external_exports.object({
|
|
16288
|
+
type: external_exports.string().min(1)
|
|
16289
|
+
}).catchall(external_exports.any())
|
|
16290
|
+
});
|
|
16291
|
+
var PublishCredentialRefreshInputValidator = external_exports.object({
|
|
16292
|
+
...PublishCredentialRefreshBaseFields,
|
|
16293
|
+
mode: CredentialRefreshSigningModeValidator,
|
|
16294
|
+
signedCredential: VCValidator.optional(),
|
|
16295
|
+
credential: UnsignedVCValidator.optional(),
|
|
16296
|
+
signingAuthority: external_exports.object({
|
|
16297
|
+
type: external_exports.string().min(1)
|
|
16298
|
+
}).catchall(external_exports.any()).optional()
|
|
16299
|
+
}).superRefine((input, ctx) => {
|
|
16300
|
+
if (input.mode === "issuer-signed" && !input.signedCredential) {
|
|
16301
|
+
ctx.addIssue({
|
|
16302
|
+
code: "custom",
|
|
16303
|
+
path: ["signedCredential"],
|
|
16304
|
+
message: "signedCredential is required for issuer-signed publication"
|
|
16305
|
+
});
|
|
16306
|
+
}
|
|
16307
|
+
if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
|
|
16308
|
+
ctx.addIssue({
|
|
16309
|
+
code: "custom",
|
|
16310
|
+
path: ["mode"],
|
|
16311
|
+
message: "issuer-signed publication cannot include signing-authority fields"
|
|
16312
|
+
});
|
|
16313
|
+
}
|
|
16314
|
+
if (input.mode === "signing-authority") {
|
|
16315
|
+
if (input.signedCredential !== void 0) {
|
|
16316
|
+
ctx.addIssue({
|
|
16317
|
+
code: "custom",
|
|
16318
|
+
path: ["signedCredential"],
|
|
16319
|
+
message: "signing-authority publication cannot include signedCredential"
|
|
16320
|
+
});
|
|
16321
|
+
}
|
|
16322
|
+
if (!input.credential) {
|
|
16323
|
+
ctx.addIssue({
|
|
16324
|
+
code: "custom",
|
|
16325
|
+
path: ["credential"],
|
|
16326
|
+
message: "credential is required for signing-authority publication"
|
|
16327
|
+
});
|
|
16328
|
+
}
|
|
16329
|
+
if (!input.signingAuthority) {
|
|
16330
|
+
ctx.addIssue({
|
|
16331
|
+
code: "custom",
|
|
16332
|
+
path: ["signingAuthority"],
|
|
16333
|
+
message: "signingAuthority is required for signing-authority publication"
|
|
16334
|
+
});
|
|
16335
|
+
}
|
|
16336
|
+
}
|
|
16337
|
+
});
|
|
16338
|
+
var PublishCredentialRefreshNotificationValidator = external_exports.enum([
|
|
16339
|
+
"queued",
|
|
16340
|
+
"suppressed",
|
|
16341
|
+
"not-applicable",
|
|
16342
|
+
/** Publication succeeded, but the post-commit notification enqueue must be retried. */
|
|
16343
|
+
"delivery-failed"
|
|
16344
|
+
]);
|
|
16345
|
+
var PublishCredentialRefreshResultValidator = external_exports.object({
|
|
16346
|
+
refreshId: external_exports.string().min(1),
|
|
16347
|
+
version: external_exports.number().int().positive(),
|
|
16348
|
+
publishedAt: external_exports.string().min(1),
|
|
16349
|
+
notification: PublishCredentialRefreshNotificationValidator
|
|
16350
|
+
});
|
|
16351
|
+
var CredentialRefreshVersionMetadataValidator = external_exports.object({
|
|
16352
|
+
version: external_exports.number().int().positive(),
|
|
16353
|
+
publishedAt: external_exports.string().min(1),
|
|
16354
|
+
effectiveAt: external_exports.string().optional(),
|
|
16355
|
+
etag: external_exports.string().optional(),
|
|
16356
|
+
signingMode: CredentialRefreshSigningModeValidator.optional(),
|
|
16357
|
+
updateSummary: external_exports.string().optional()
|
|
16358
|
+
});
|
|
16359
|
+
var GetCredentialRefreshHistoryInputValidator = external_exports.object({
|
|
16360
|
+
refreshId: external_exports.string().min(1),
|
|
16361
|
+
cursor: external_exports.string().optional(),
|
|
16362
|
+
limit: external_exports.number().int().positive().optional()
|
|
16363
|
+
});
|
|
16364
|
+
var GetCredentialRefreshHistoryResultValidator = external_exports.object({
|
|
16365
|
+
records: CredentialRefreshVersionMetadataValidator.array(),
|
|
16366
|
+
hasMore: external_exports.boolean(),
|
|
16367
|
+
cursor: external_exports.string().optional()
|
|
16368
|
+
});
|
|
16369
|
+
var CredentialRefreshChallengeValidator = external_exports.object({
|
|
16370
|
+
challenge: external_exports.string().min(1),
|
|
16371
|
+
expiresAt: external_exports.string().min(1),
|
|
16372
|
+
domain: external_exports.string().optional(),
|
|
16373
|
+
scheme: external_exports.literal("LearnCardDIDAuth").optional()
|
|
16374
|
+
});
|
|
16375
|
+
var PublicCredentialRefreshEnvelopeValidator = external_exports.object({
|
|
16376
|
+
format: external_exports.literal("vc"),
|
|
16377
|
+
credential: VCValidator,
|
|
16378
|
+
etag: external_exports.string().optional()
|
|
16379
|
+
});
|
|
16380
|
+
var JweCredentialRefreshEnvelopeValidator = external_exports.object({
|
|
16381
|
+
format: external_exports.literal("jwe"),
|
|
16382
|
+
jwe: JWEValidator,
|
|
16383
|
+
etag: external_exports.string().optional(),
|
|
16384
|
+
/** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
|
|
16385
|
+
version: external_exports.number().int().positive().optional()
|
|
16386
|
+
});
|
|
16387
|
+
var CredentialRefreshResponseEnvelopeValidator = external_exports.discriminatedUnion("format", [
|
|
16388
|
+
PublicCredentialRefreshEnvelopeValidator,
|
|
16389
|
+
JweCredentialRefreshEnvelopeValidator
|
|
16390
|
+
]);
|
|
16391
|
+
var CredentialRefreshFailureCodeValidator = external_exports.enum([
|
|
16392
|
+
"UNAVAILABLE",
|
|
16393
|
+
"TIMEOUT",
|
|
16394
|
+
"UNSUPPORTED_SERVICE",
|
|
16395
|
+
"UNAUTHORIZED",
|
|
16396
|
+
"MALFORMED_RESPONSE",
|
|
16397
|
+
"INVALID_PROOF",
|
|
16398
|
+
"ISSUER_MISMATCH",
|
|
16399
|
+
"ID_MISMATCH",
|
|
16400
|
+
"ROLLBACK",
|
|
16401
|
+
"REVOKED",
|
|
16402
|
+
"UNSAFE_ENDPOINT"
|
|
16403
|
+
]);
|
|
16404
|
+
var CredentialRefreshUpdatedResultValidator = external_exports.object({
|
|
16405
|
+
status: external_exports.literal("updated"),
|
|
16406
|
+
credential: VCValidator,
|
|
16407
|
+
etag: external_exports.string().optional(),
|
|
16408
|
+
managedVersion: external_exports.number().int().positive().optional()
|
|
16409
|
+
});
|
|
16410
|
+
var CredentialRefreshUnchangedResultValidator = external_exports.object({
|
|
16411
|
+
status: external_exports.literal("unchanged"),
|
|
16412
|
+
checkedAt: external_exports.string().min(1),
|
|
16413
|
+
etag: external_exports.string().optional()
|
|
16414
|
+
});
|
|
16415
|
+
var CredentialRefreshUnsupportedResultValidator = external_exports.object({
|
|
16416
|
+
status: external_exports.literal("unsupported")
|
|
16417
|
+
});
|
|
16418
|
+
var CredentialRefreshFailedResultValidator = external_exports.object({
|
|
16419
|
+
status: external_exports.literal("failed"),
|
|
16420
|
+
code: CredentialRefreshFailureCodeValidator,
|
|
16421
|
+
retryable: external_exports.boolean()
|
|
16422
|
+
});
|
|
16423
|
+
var CredentialRefreshResultValidator = external_exports.discriminatedUnion("status", [
|
|
16424
|
+
CredentialRefreshUpdatedResultValidator,
|
|
16425
|
+
CredentialRefreshUnchangedResultValidator,
|
|
16426
|
+
CredentialRefreshUnsupportedResultValidator,
|
|
16427
|
+
CredentialRefreshFailedResultValidator
|
|
16428
|
+
]);
|
|
16209
16429
|
var LCNProfileDisplayValidator = external_exports.object({
|
|
16210
16430
|
backgroundColor: external_exports.string().optional(),
|
|
16211
16431
|
backgroundImage: external_exports.string().optional(),
|
|
@@ -16541,7 +16761,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16541
16761
|
"Options for email/phone recipients (Universal Inbox)"
|
|
16542
16762
|
),
|
|
16543
16763
|
templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
16544
|
-
integrationId: external_exports.string().optional().describe("Integration ID for activity tracking")
|
|
16764
|
+
integrationId: external_exports.string().optional().describe("Integration ID for activity tracking"),
|
|
16765
|
+
refresh: external_exports.boolean().optional().describe(
|
|
16766
|
+
"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."
|
|
16767
|
+
),
|
|
16768
|
+
idempotencyKey: external_exports.string().min(1).max(200).optional().describe(
|
|
16769
|
+
"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."
|
|
16770
|
+
)
|
|
16545
16771
|
}).refine((data) => data.templateUri || data.template || data.signedCredential, {
|
|
16546
16772
|
message: "Either templateUri, template, or signedCredential must be provided.",
|
|
16547
16773
|
path: ["templateUri"]
|
|
@@ -16556,8 +16782,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16556
16782
|
message: "guardianEmail must differ from recipient (self-approval not allowed)",
|
|
16557
16783
|
path: ["options", "guardianEmail"]
|
|
16558
16784
|
}
|
|
16559
|
-
)
|
|
16785
|
+
).refine((data) => !data.idempotencyKey || data.refresh === true, {
|
|
16786
|
+
message: "idempotencyKey is only supported with refresh: true.",
|
|
16787
|
+
path: ["idempotencyKey"]
|
|
16788
|
+
});
|
|
16560
16789
|
var SendInboxResponseValidator = external_exports.object({
|
|
16790
|
+
refresh: InboxCredentialRefreshReceiptValidator.optional(),
|
|
16561
16791
|
issuanceId: external_exports.string(),
|
|
16562
16792
|
status: external_exports.enum(["PENDING", "ISSUED", "EXPIRED", "DELIVERED", "CLAIMED"]),
|
|
16563
16793
|
claimUrl: external_exports.string().url().optional().describe("Present when suppressDelivery=true"),
|
|
@@ -16572,8 +16802,34 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16572
16802
|
activityId: external_exports.string().describe("Links to the activity lifecycle for this issuance"),
|
|
16573
16803
|
inbox: SendInboxResponseValidator.optional().describe(
|
|
16574
16804
|
"Present when sent via email/phone (Universal Inbox)"
|
|
16805
|
+
),
|
|
16806
|
+
refresh: ManagedCredentialRefreshReceiptValidator.optional().describe(
|
|
16807
|
+
"Present when managed refresh was requested: issuance metadata the issuer keeps to publish future updates"
|
|
16575
16808
|
)
|
|
16576
16809
|
});
|
|
16810
|
+
var PrepareRefreshableSendInputValidator = external_exports.object({
|
|
16811
|
+
recipient: external_exports.string(),
|
|
16812
|
+
templateUri: external_exports.string().optional(),
|
|
16813
|
+
template: SendBoostTemplateValidator.optional(),
|
|
16814
|
+
contractUri: external_exports.string().optional(),
|
|
16815
|
+
templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
|
|
16816
|
+
integrationId: external_exports.string().optional(),
|
|
16817
|
+
/** Credential ID to allocate for; generated server-side when omitted. */
|
|
16818
|
+
credentialId: external_exports.string().min(1).optional(),
|
|
16819
|
+
idempotencyKey: external_exports.string().min(1).max(200).optional()
|
|
16820
|
+
}).refine((data) => Boolean(data.templateUri) !== Boolean(data.template), {
|
|
16821
|
+
message: "Provide exactly one of templateUri or template."
|
|
16822
|
+
});
|
|
16823
|
+
var PrepareRefreshableSendResultValidator = external_exports.object({
|
|
16824
|
+
boostUri: external_exports.string(),
|
|
16825
|
+
credentialId: external_exports.string(),
|
|
16826
|
+
refreshId: external_exports.string(),
|
|
16827
|
+
refreshService: ManagedCredentialRefreshServiceValidator,
|
|
16828
|
+
/** The DID to use as credentialSubject.id (recipient DID, or the profile's did:web). */
|
|
16829
|
+
holderDid: external_exports.string(),
|
|
16830
|
+
/** Present when this idempotencyKey already completed: return it without signing. */
|
|
16831
|
+
completed: SendBoostResponseValidator.optional()
|
|
16832
|
+
});
|
|
16577
16833
|
var SendInputValidator = external_exports.discriminatedUnion("type", [SendBoostInputValidator]);
|
|
16578
16834
|
var SendResponseValidator = external_exports.discriminatedUnion("type", [SendBoostResponseValidator]);
|
|
16579
16835
|
var ConsentFlowTermsStatusValidator = external_exports.enum(["live", "stale", "withdrawn"]);
|
|
@@ -16649,15 +16905,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16649
16905
|
var PaginatedConsentFlowDataValidator = PaginationResponseValidator.extend({
|
|
16650
16906
|
records: ConsentFlowContractDataValidator.array()
|
|
16651
16907
|
});
|
|
16652
|
-
var ConsentFlowContractDataForDidValidator = external_exports.object({
|
|
16653
|
-
credentials: external_exports.object({ category: external_exports.string(), uri: external_exports.string() }).array(),
|
|
16654
|
-
personal: external_exports.record(external_exports.string(), external_exports.string()).default({}),
|
|
16655
|
-
date: external_exports.string(),
|
|
16656
|
-
contractUri: external_exports.string()
|
|
16657
|
-
});
|
|
16658
|
-
var PaginatedConsentFlowDataForDidValidator = PaginationResponseValidator.extend({
|
|
16659
|
-
records: ConsentFlowContractDataForDidValidator.array()
|
|
16660
|
-
});
|
|
16661
16908
|
var ConsentFlowTermValidator = external_exports.object({
|
|
16662
16909
|
sharing: external_exports.boolean().optional(),
|
|
16663
16910
|
shared: external_exports.string().array().optional(),
|
|
@@ -16691,6 +16938,34 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16691
16938
|
status: ConsentFlowTermsStatusValidator
|
|
16692
16939
|
}).array()
|
|
16693
16940
|
});
|
|
16941
|
+
var ConsentFlowGuardianApprovalValidator = external_exports.object({
|
|
16942
|
+
guardianProfileId: external_exports.string(),
|
|
16943
|
+
guardianDid: external_exports.string(),
|
|
16944
|
+
approvedAt: external_exports.string().datetime(),
|
|
16945
|
+
contractUpdatedAt: external_exports.string()
|
|
16946
|
+
});
|
|
16947
|
+
var ConsentFlowContractDataForDidValidator = external_exports.object({
|
|
16948
|
+
credentials: external_exports.object({ category: external_exports.string(), uri: external_exports.string() }).array(),
|
|
16949
|
+
personal: external_exports.record(external_exports.string(), external_exports.string()).default({}),
|
|
16950
|
+
date: external_exports.string(),
|
|
16951
|
+
createdAt: external_exports.string().optional(),
|
|
16952
|
+
contractUpdatedAt: external_exports.string(),
|
|
16953
|
+
contractExpiresAt: external_exports.string().optional(),
|
|
16954
|
+
reasonForAccessing: external_exports.string().optional(),
|
|
16955
|
+
guardian: external_exports.object({
|
|
16956
|
+
required: external_exports.boolean(),
|
|
16957
|
+
approved: external_exports.boolean(),
|
|
16958
|
+
approval: ConsentFlowGuardianApprovalValidator.optional()
|
|
16959
|
+
}),
|
|
16960
|
+
contractUri: external_exports.string(),
|
|
16961
|
+
termsUri: external_exports.string(),
|
|
16962
|
+
status: ConsentFlowTermsStatusValidator,
|
|
16963
|
+
expiresAt: external_exports.string().optional(),
|
|
16964
|
+
terms: ConsentFlowTermsValidator
|
|
16965
|
+
});
|
|
16966
|
+
var PaginatedConsentFlowDataForDidValidator = PaginationResponseValidator.extend({
|
|
16967
|
+
records: ConsentFlowContractDataForDidValidator.array()
|
|
16968
|
+
});
|
|
16694
16969
|
var ConsentFlowContractQueryValidator = external_exports.object({
|
|
16695
16970
|
read: external_exports.object({
|
|
16696
16971
|
anonymize: external_exports.boolean().optional(),
|
|
@@ -16751,6 +17026,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16751
17026
|
expiresAt: external_exports.string().optional(),
|
|
16752
17027
|
oneTime: external_exports.boolean().optional(),
|
|
16753
17028
|
terms: ConsentFlowTermsValidator.optional(),
|
|
17029
|
+
guardianApproval: ConsentFlowGuardianApprovalValidator.optional(),
|
|
16754
17030
|
id: external_exports.string(),
|
|
16755
17031
|
action: ConsentFlowTransactionActionValidator,
|
|
16756
17032
|
date: external_exports.string(),
|
|
@@ -16872,6 +17148,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16872
17148
|
webhookUrl: external_exports.string().optional()
|
|
16873
17149
|
});
|
|
16874
17150
|
var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX = "auth-grant:";
|
|
17151
|
+
var ACT_AS_HEADER = "X-LearnCard-Act-As";
|
|
16875
17152
|
var AuthGrantValidator = external_exports.object({
|
|
16876
17153
|
id: external_exports.string(),
|
|
16877
17154
|
name: external_exports.string(),
|
|
@@ -16884,6 +17161,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16884
17161
|
}, "error")
|
|
16885
17162
|
}),
|
|
16886
17163
|
scope: external_exports.string(),
|
|
17164
|
+
actAs: external_exports.string().optional(),
|
|
16887
17165
|
createdAt: external_exports.iso.datetime({ error: "createdAt must be a valid ISO 8601 datetime string" }),
|
|
16888
17166
|
expiresAt: external_exports.iso.datetime({ error: "expiresAt must be a valid ISO 8601 datetime string" }).nullish().optional()
|
|
16889
17167
|
});
|
|
@@ -16955,6 +17233,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16955
17233
|
sessionJwt: external_exports.string()
|
|
16956
17234
|
});
|
|
16957
17235
|
var InboxCredentialValidator = external_exports.object({
|
|
17236
|
+
refresh: InboxCredentialRefreshReceiptValidator.optional(),
|
|
17237
|
+
refreshId: external_exports.string().optional(),
|
|
16958
17238
|
id: external_exports.string(),
|
|
16959
17239
|
credential: external_exports.string().optional(),
|
|
16960
17240
|
isSigned: external_exports.boolean(),
|
|
@@ -17009,12 +17289,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17009
17289
|
templateUri: external_exports.string().optional().describe(
|
|
17010
17290
|
"URI of a boost template to use for issuance. The boost credential will be resolved and used. Mutually exclusive with credential field."
|
|
17011
17291
|
),
|
|
17292
|
+
refresh: external_exports.boolean().optional().describe(
|
|
17293
|
+
"Allocate managed refresh before signing. Requires unsigned content and a registered signing authority; binds the holder on claim."
|
|
17294
|
+
),
|
|
17295
|
+
idempotencyKey: external_exports.string().min(1).max(200).optional(),
|
|
17012
17296
|
// === OPTIONAL FEATURES ===
|
|
17013
17297
|
// Add major, distinct features at the top level.
|
|
17014
17298
|
//consentRequest: ConsentRequestValidator.optional(),
|
|
17015
17299
|
// === PROCESS CONFIGURATION (Optional) ===
|
|
17016
17300
|
// HOW should this issuance be handled?
|
|
17017
17301
|
configuration: external_exports.object({
|
|
17302
|
+
guardianEmail: external_exports.string().email().optional().describe(
|
|
17303
|
+
"Require approval from this guardian before the recipient can claim. Must differ from the recipient email."
|
|
17304
|
+
),
|
|
17018
17305
|
signingAuthority: IssueInboxSigningAuthorityValidator.optional().describe(
|
|
17019
17306
|
"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."
|
|
17020
17307
|
),
|
|
@@ -17068,17 +17355,130 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17068
17355
|
}).optional().describe(
|
|
17069
17356
|
"Configuration for the credential issuance. If not provided, the default configuration will be used."
|
|
17070
17357
|
)
|
|
17358
|
+
}).refine((data) => !data.idempotencyKey || data.refresh === true, {
|
|
17359
|
+
message: "idempotencyKey requires refresh: true."
|
|
17071
17360
|
}).refine((data) => data.credential || data.templateUri, {
|
|
17072
17361
|
message: "Either credential or templateUri must be provided.",
|
|
17073
17362
|
path: ["credential"]
|
|
17074
|
-
})
|
|
17363
|
+
}).refine(
|
|
17364
|
+
(data) => !data.configuration?.guardianEmail || data.recipient.type !== "email" || data.configuration.guardianEmail.toLowerCase() !== data.recipient.value.toLowerCase(),
|
|
17365
|
+
{
|
|
17366
|
+
message: "guardianEmail must differ from recipient (self-approval not allowed)",
|
|
17367
|
+
path: ["configuration", "guardianEmail"]
|
|
17368
|
+
}
|
|
17369
|
+
);
|
|
17075
17370
|
var IssueInboxCredentialResponseValidator = external_exports.object({
|
|
17371
|
+
refresh: InboxCredentialRefreshReceiptValidator.optional(),
|
|
17076
17372
|
issuanceId: external_exports.string(),
|
|
17077
17373
|
status: LCNInboxStatusEnumValidator,
|
|
17078
17374
|
recipient: ContactMethodQueryValidator,
|
|
17079
17375
|
claimUrl: external_exports.string().url().optional(),
|
|
17080
17376
|
recipientDid: external_exports.string().optional()
|
|
17081
17377
|
});
|
|
17378
|
+
var InboxBatchConfigurationValidator = IssueInboxCredentialValidator.shape.configuration.unwrap().extend({
|
|
17379
|
+
refresh: IssueInboxCredentialValidator.shape.refresh.describe(
|
|
17380
|
+
"Enable managed refresh by default. An item configuration.refresh overrides this value, including false."
|
|
17381
|
+
),
|
|
17382
|
+
delivery: IssueInboxCredentialValidator.shape.configuration.unwrap().shape.delivery.unwrap().extend({ suppress: external_exports.boolean().optional() }).optional()
|
|
17383
|
+
});
|
|
17384
|
+
var InboxBatchItemConfigurationValidator = InboxBatchConfigurationValidator.extend({
|
|
17385
|
+
guardianEmail: InboxBatchConfigurationValidator.shape.guardianEmail.nullable().describe(
|
|
17386
|
+
"Require guardian approval, or set null to clear a batch-level guardianEmail for this item."
|
|
17387
|
+
)
|
|
17388
|
+
});
|
|
17389
|
+
var IssueInboxCredentialBatchItemValidator = external_exports.object({
|
|
17390
|
+
...IssueInboxCredentialValidator.shape,
|
|
17391
|
+
configuration: InboxBatchItemConfigurationValidator.optional(),
|
|
17392
|
+
idempotencyKey: external_exports.string().max(256).optional()
|
|
17393
|
+
}).refine((data) => data.credential || data.templateUri, {
|
|
17394
|
+
message: "Either credential or templateUri must be provided.",
|
|
17395
|
+
path: ["credential"]
|
|
17396
|
+
}).describe(
|
|
17397
|
+
"One issuance: provide credential or templateUri. Invalid input is rejected at submission with its item index."
|
|
17398
|
+
);
|
|
17399
|
+
var IssueInboxCredentialBatchValidator = external_exports.object({
|
|
17400
|
+
requestId: external_exports.string().min(1).max(256).optional(),
|
|
17401
|
+
items: external_exports.array(IssueInboxCredentialBatchItemValidator).min(1).max(100),
|
|
17402
|
+
configuration: InboxBatchConfigurationValidator.optional()
|
|
17403
|
+
}).superRefine((batch, ctx) => {
|
|
17404
|
+
batch.items.forEach((item, index) => {
|
|
17405
|
+
const itemGuardian = item.configuration?.guardianEmail;
|
|
17406
|
+
const guardian = itemGuardian === null ? void 0 : itemGuardian ?? batch.configuration?.guardianEmail;
|
|
17407
|
+
if (guardian && item.recipient.type === "email" && guardian.toLowerCase() === item.recipient.value.toLowerCase()) {
|
|
17408
|
+
ctx.addIssue({
|
|
17409
|
+
code: "custom",
|
|
17410
|
+
path: ["items", index, "configuration", "guardianEmail"],
|
|
17411
|
+
message: "guardianEmail must differ from recipient (self-approval not allowed)"
|
|
17412
|
+
});
|
|
17413
|
+
}
|
|
17414
|
+
});
|
|
17415
|
+
});
|
|
17416
|
+
var InboxBatchErrorReasonValidator = external_exports.enum([
|
|
17417
|
+
"DUPLICATE_KEY",
|
|
17418
|
+
"IDEMPOTENCY_MISMATCH",
|
|
17419
|
+
"IN_PROGRESS",
|
|
17420
|
+
"UNCONFIRMED"
|
|
17421
|
+
]);
|
|
17422
|
+
var IssueInboxCredentialBatchItemResultValidator = external_exports.discriminatedUnion("success", [
|
|
17423
|
+
IssueInboxCredentialResponseValidator.extend({
|
|
17424
|
+
success: external_exports.literal(true),
|
|
17425
|
+
index: external_exports.number().int().nonnegative(),
|
|
17426
|
+
deduplicated: external_exports.boolean().optional(),
|
|
17427
|
+
guardianStatus: GuardianStatusValidator.optional(),
|
|
17428
|
+
idempotencyKey: external_exports.string().optional()
|
|
17429
|
+
}),
|
|
17430
|
+
external_exports.object({
|
|
17431
|
+
success: external_exports.literal(false),
|
|
17432
|
+
index: external_exports.number().int().nonnegative(),
|
|
17433
|
+
idempotencyKey: external_exports.string().optional(),
|
|
17434
|
+
recipient: ContactMethodQueryValidator.optional(),
|
|
17435
|
+
error: external_exports.object({
|
|
17436
|
+
code: external_exports.string(),
|
|
17437
|
+
message: external_exports.string(),
|
|
17438
|
+
reason: InboxBatchErrorReasonValidator.optional()
|
|
17439
|
+
}),
|
|
17440
|
+
issuanceId: external_exports.string().optional().describe(
|
|
17441
|
+
"Present when issuance completed but replay storage could not be confirmed. Reconcile this issuance; do not issue again with a new key."
|
|
17442
|
+
),
|
|
17443
|
+
claimUrl: external_exports.string().url().optional().describe(
|
|
17444
|
+
"Claim URL of the completed issuance, if available, when replay storage could not be confirmed."
|
|
17445
|
+
)
|
|
17446
|
+
})
|
|
17447
|
+
]);
|
|
17448
|
+
var IssueInboxCredentialBatchResponseValidator = external_exports.object({
|
|
17449
|
+
results: external_exports.array(IssueInboxCredentialBatchItemResultValidator),
|
|
17450
|
+
summary: external_exports.object({
|
|
17451
|
+
total: external_exports.number(),
|
|
17452
|
+
succeeded: external_exports.number(),
|
|
17453
|
+
failed: external_exports.number(),
|
|
17454
|
+
deduplicated: external_exports.number()
|
|
17455
|
+
})
|
|
17456
|
+
});
|
|
17457
|
+
var InboxBatchReceiptValidator = external_exports.object({
|
|
17458
|
+
batchId: external_exports.string(),
|
|
17459
|
+
status: external_exports.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
|
|
17460
|
+
createdAt: external_exports.string()
|
|
17461
|
+
});
|
|
17462
|
+
var InboxBatchStatusValidator = external_exports.object({
|
|
17463
|
+
batchId: external_exports.string(),
|
|
17464
|
+
createdAt: external_exports.string(),
|
|
17465
|
+
done: external_exports.boolean().describe(
|
|
17466
|
+
"True when no queued or processing items remain, including unconfirmed outcomes."
|
|
17467
|
+
),
|
|
17468
|
+
status: external_exports.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
|
|
17469
|
+
items: external_exports.array(
|
|
17470
|
+
external_exports.object({
|
|
17471
|
+
index: external_exports.number().int().nonnegative(),
|
|
17472
|
+
state: external_exports.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
|
|
17473
|
+
result: IssueInboxCredentialBatchItemResultValidator.optional()
|
|
17474
|
+
})
|
|
17475
|
+
),
|
|
17476
|
+
summary: IssueInboxCredentialBatchResponseValidator.shape.summary.extend({
|
|
17477
|
+
completed: external_exports.number(),
|
|
17478
|
+
pending: external_exports.number(),
|
|
17479
|
+
unconfirmed: external_exports.number()
|
|
17480
|
+
})
|
|
17481
|
+
});
|
|
17082
17482
|
var CredentialNameRefValidator = external_exports.object({ name: external_exports.string() }).passthrough();
|
|
17083
17483
|
var ClaimInboxCredentialValidator = external_exports.object({
|
|
17084
17484
|
credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).or(CredentialNameRefValidator).describe("The credential to issue, or a { name } reference to resolve a boost template."),
|
|
@@ -17564,6 +17964,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17564
17964
|
eventType: CredentialActivityEventTypeValidator,
|
|
17565
17965
|
timestamp: external_exports.string(),
|
|
17566
17966
|
actorProfileId: external_exports.string().optional(),
|
|
17967
|
+
onBehalfOf: external_exports.string().optional(),
|
|
17567
17968
|
recipientType: CredentialActivityRecipientTypeValidator,
|
|
17568
17969
|
recipientIdentifier: external_exports.string(),
|
|
17569
17970
|
boostUri: external_exports.string().optional(),
|
|
@@ -17724,191 +18125,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17724
18125
|
const result = inAppMessagesFlagValidator.safeParse(raw);
|
|
17725
18126
|
return result.success ? result.data : EMPTY_IN_APP_MESSAGES_FLAG;
|
|
17726
18127
|
}, "parseInAppMessagesFlag");
|
|
17727
|
-
var LearnCardRefreshAuthorizationValidator = external_exports.object({ type: external_exports.literal("LearnCardDIDAuth") }).catchall(external_exports.any());
|
|
17728
|
-
var ManagedCredentialRefreshServiceValidator = external_exports.object({
|
|
17729
|
-
id: external_exports.string().min(1),
|
|
17730
|
-
type: external_exports.literal("LearnCardCredentialRefresh2026"),
|
|
17731
|
-
authorization: LearnCardRefreshAuthorizationValidator.optional()
|
|
17732
|
-
}).catchall(external_exports.any());
|
|
17733
|
-
var StandardCredentialRefreshServiceValidator = external_exports.object({
|
|
17734
|
-
id: external_exports.string().min(1),
|
|
17735
|
-
type: external_exports.literal("1EdTechCredentialRefresh")
|
|
17736
|
-
}).catchall(external_exports.any());
|
|
17737
|
-
var SupportedCredentialRefreshServiceValidator = external_exports.union([
|
|
17738
|
-
ManagedCredentialRefreshServiceValidator,
|
|
17739
|
-
StandardCredentialRefreshServiceValidator
|
|
17740
|
-
]);
|
|
17741
|
-
var AllocateCredentialRefreshInputValidator = external_exports.object({
|
|
17742
|
-
holder: external_exports.object({
|
|
17743
|
-
profileId: external_exports.string().optional(),
|
|
17744
|
-
did: external_exports.string().min(1)
|
|
17745
|
-
}),
|
|
17746
|
-
credentialId: external_exports.string().min(1)
|
|
17747
|
-
});
|
|
17748
|
-
var AllocateCredentialRefreshResultValidator = external_exports.object({
|
|
17749
|
-
refreshId: external_exports.string().min(1),
|
|
17750
|
-
refreshService: ManagedCredentialRefreshServiceValidator.extend({
|
|
17751
|
-
authorization: LearnCardRefreshAuthorizationValidator
|
|
17752
|
-
})
|
|
17753
|
-
});
|
|
17754
|
-
var CredentialRefreshSigningModeValidator = external_exports.enum(["issuer-signed", "signing-authority"]);
|
|
17755
|
-
var PublishCredentialRefreshBaseFields = {
|
|
17756
|
-
refreshId: external_exports.string().min(1),
|
|
17757
|
-
notifyHolder: external_exports.boolean().optional(),
|
|
17758
|
-
updateSummary: external_exports.string().optional(),
|
|
17759
|
-
idempotencyKey: external_exports.string().optional()
|
|
17760
|
-
};
|
|
17761
|
-
var PublishIssuerSignedRefreshValidator = external_exports.object({
|
|
17762
|
-
...PublishCredentialRefreshBaseFields,
|
|
17763
|
-
mode: external_exports.literal("issuer-signed"),
|
|
17764
|
-
signedCredential: VCValidator
|
|
17765
|
-
});
|
|
17766
|
-
var PublishSigningAuthorityRefreshValidator = external_exports.object({
|
|
17767
|
-
...PublishCredentialRefreshBaseFields,
|
|
17768
|
-
mode: external_exports.literal("signing-authority"),
|
|
17769
|
-
credential: UnsignedVCValidator,
|
|
17770
|
-
signingAuthority: external_exports.object({
|
|
17771
|
-
type: external_exports.string().min(1)
|
|
17772
|
-
}).catchall(external_exports.any())
|
|
17773
|
-
});
|
|
17774
|
-
var PublishCredentialRefreshInputValidator = external_exports.object({
|
|
17775
|
-
...PublishCredentialRefreshBaseFields,
|
|
17776
|
-
mode: CredentialRefreshSigningModeValidator,
|
|
17777
|
-
signedCredential: VCValidator.optional(),
|
|
17778
|
-
credential: UnsignedVCValidator.optional(),
|
|
17779
|
-
signingAuthority: external_exports.object({
|
|
17780
|
-
type: external_exports.string().min(1)
|
|
17781
|
-
}).catchall(external_exports.any()).optional()
|
|
17782
|
-
}).superRefine((input, ctx) => {
|
|
17783
|
-
if (input.mode === "issuer-signed" && !input.signedCredential) {
|
|
17784
|
-
ctx.addIssue({
|
|
17785
|
-
code: "custom",
|
|
17786
|
-
path: ["signedCredential"],
|
|
17787
|
-
message: "signedCredential is required for issuer-signed publication"
|
|
17788
|
-
});
|
|
17789
|
-
}
|
|
17790
|
-
if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
|
|
17791
|
-
ctx.addIssue({
|
|
17792
|
-
code: "custom",
|
|
17793
|
-
path: ["mode"],
|
|
17794
|
-
message: "issuer-signed publication cannot include signing-authority fields"
|
|
17795
|
-
});
|
|
17796
|
-
}
|
|
17797
|
-
if (input.mode === "signing-authority") {
|
|
17798
|
-
if (input.signedCredential !== void 0) {
|
|
17799
|
-
ctx.addIssue({
|
|
17800
|
-
code: "custom",
|
|
17801
|
-
path: ["signedCredential"],
|
|
17802
|
-
message: "signing-authority publication cannot include signedCredential"
|
|
17803
|
-
});
|
|
17804
|
-
}
|
|
17805
|
-
if (!input.credential) {
|
|
17806
|
-
ctx.addIssue({
|
|
17807
|
-
code: "custom",
|
|
17808
|
-
path: ["credential"],
|
|
17809
|
-
message: "credential is required for signing-authority publication"
|
|
17810
|
-
});
|
|
17811
|
-
}
|
|
17812
|
-
if (!input.signingAuthority) {
|
|
17813
|
-
ctx.addIssue({
|
|
17814
|
-
code: "custom",
|
|
17815
|
-
path: ["signingAuthority"],
|
|
17816
|
-
message: "signingAuthority is required for signing-authority publication"
|
|
17817
|
-
});
|
|
17818
|
-
}
|
|
17819
|
-
}
|
|
17820
|
-
});
|
|
17821
|
-
var PublishCredentialRefreshNotificationValidator = external_exports.enum([
|
|
17822
|
-
"queued",
|
|
17823
|
-
"suppressed",
|
|
17824
|
-
"not-applicable",
|
|
17825
|
-
/** Publication succeeded, but the post-commit notification enqueue must be retried. */
|
|
17826
|
-
"delivery-failed"
|
|
17827
|
-
]);
|
|
17828
|
-
var PublishCredentialRefreshResultValidator = external_exports.object({
|
|
17829
|
-
refreshId: external_exports.string().min(1),
|
|
17830
|
-
version: external_exports.number().int().positive(),
|
|
17831
|
-
publishedAt: external_exports.string().min(1),
|
|
17832
|
-
notification: PublishCredentialRefreshNotificationValidator
|
|
17833
|
-
});
|
|
17834
|
-
var CredentialRefreshVersionMetadataValidator = external_exports.object({
|
|
17835
|
-
version: external_exports.number().int().positive(),
|
|
17836
|
-
publishedAt: external_exports.string().min(1),
|
|
17837
|
-
effectiveAt: external_exports.string().optional(),
|
|
17838
|
-
etag: external_exports.string().optional(),
|
|
17839
|
-
signingMode: CredentialRefreshSigningModeValidator.optional(),
|
|
17840
|
-
updateSummary: external_exports.string().optional()
|
|
17841
|
-
});
|
|
17842
|
-
var GetCredentialRefreshHistoryInputValidator = external_exports.object({
|
|
17843
|
-
refreshId: external_exports.string().min(1),
|
|
17844
|
-
cursor: external_exports.string().optional(),
|
|
17845
|
-
limit: external_exports.number().int().positive().optional()
|
|
17846
|
-
});
|
|
17847
|
-
var GetCredentialRefreshHistoryResultValidator = external_exports.object({
|
|
17848
|
-
records: CredentialRefreshVersionMetadataValidator.array(),
|
|
17849
|
-
hasMore: external_exports.boolean(),
|
|
17850
|
-
cursor: external_exports.string().optional()
|
|
17851
|
-
});
|
|
17852
|
-
var CredentialRefreshChallengeValidator = external_exports.object({
|
|
17853
|
-
challenge: external_exports.string().min(1),
|
|
17854
|
-
expiresAt: external_exports.string().min(1),
|
|
17855
|
-
domain: external_exports.string().optional(),
|
|
17856
|
-
scheme: external_exports.literal("LearnCardDIDAuth").optional()
|
|
17857
|
-
});
|
|
17858
|
-
var PublicCredentialRefreshEnvelopeValidator = external_exports.object({
|
|
17859
|
-
format: external_exports.literal("vc"),
|
|
17860
|
-
credential: VCValidator,
|
|
17861
|
-
etag: external_exports.string().optional()
|
|
17862
|
-
});
|
|
17863
|
-
var JweCredentialRefreshEnvelopeValidator = external_exports.object({
|
|
17864
|
-
format: external_exports.literal("jwe"),
|
|
17865
|
-
jwe: JWEValidator,
|
|
17866
|
-
etag: external_exports.string().optional(),
|
|
17867
|
-
/** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
|
|
17868
|
-
version: external_exports.number().int().positive().optional()
|
|
17869
|
-
});
|
|
17870
|
-
var CredentialRefreshResponseEnvelopeValidator = external_exports.discriminatedUnion("format", [
|
|
17871
|
-
PublicCredentialRefreshEnvelopeValidator,
|
|
17872
|
-
JweCredentialRefreshEnvelopeValidator
|
|
17873
|
-
]);
|
|
17874
|
-
var CredentialRefreshFailureCodeValidator = external_exports.enum([
|
|
17875
|
-
"UNAVAILABLE",
|
|
17876
|
-
"TIMEOUT",
|
|
17877
|
-
"UNSUPPORTED_SERVICE",
|
|
17878
|
-
"UNAUTHORIZED",
|
|
17879
|
-
"MALFORMED_RESPONSE",
|
|
17880
|
-
"INVALID_PROOF",
|
|
17881
|
-
"ISSUER_MISMATCH",
|
|
17882
|
-
"ID_MISMATCH",
|
|
17883
|
-
"ROLLBACK",
|
|
17884
|
-
"REVOKED",
|
|
17885
|
-
"UNSAFE_ENDPOINT"
|
|
17886
|
-
]);
|
|
17887
|
-
var CredentialRefreshUpdatedResultValidator = external_exports.object({
|
|
17888
|
-
status: external_exports.literal("updated"),
|
|
17889
|
-
credential: VCValidator,
|
|
17890
|
-
etag: external_exports.string().optional(),
|
|
17891
|
-
managedVersion: external_exports.number().int().positive().optional()
|
|
17892
|
-
});
|
|
17893
|
-
var CredentialRefreshUnchangedResultValidator = external_exports.object({
|
|
17894
|
-
status: external_exports.literal("unchanged"),
|
|
17895
|
-
checkedAt: external_exports.string().min(1),
|
|
17896
|
-
etag: external_exports.string().optional()
|
|
17897
|
-
});
|
|
17898
|
-
var CredentialRefreshUnsupportedResultValidator = external_exports.object({
|
|
17899
|
-
status: external_exports.literal("unsupported")
|
|
17900
|
-
});
|
|
17901
|
-
var CredentialRefreshFailedResultValidator = external_exports.object({
|
|
17902
|
-
status: external_exports.literal("failed"),
|
|
17903
|
-
code: CredentialRefreshFailureCodeValidator,
|
|
17904
|
-
retryable: external_exports.boolean()
|
|
17905
|
-
});
|
|
17906
|
-
var CredentialRefreshResultValidator = external_exports.discriminatedUnion("status", [
|
|
17907
|
-
CredentialRefreshUpdatedResultValidator,
|
|
17908
|
-
CredentialRefreshUnchangedResultValidator,
|
|
17909
|
-
CredentialRefreshUnsupportedResultValidator,
|
|
17910
|
-
CredentialRefreshFailedResultValidator
|
|
17911
|
-
]);
|
|
17912
18128
|
}
|
|
17913
18129
|
});
|
|
17914
18130
|
|