@learncard/sss-key-manager 0.1.21 → 0.1.22
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/README.md +157 -16
- package/dist/sss-key-manager.cjs.development.js +227 -4
- package/dist/sss-key-manager.cjs.development.js.map +2 -2
- package/dist/sss-key-manager.cjs.production.min.js +6 -6
- package/dist/sss-key-manager.cjs.production.min.js.map +3 -3
- package/dist/sss-key-manager.esm.js +227 -4
- package/dist/sss-key-manager.esm.js.map +2 -2
- package/package.json +2 -2
|
@@ -60,6 +60,8 @@ var require_types_cjs_development = __commonJS({
|
|
|
60
60
|
AgeRatingValidator: /* @__PURE__ */ __name(() => AgeRatingValidator, "AgeRatingValidator"),
|
|
61
61
|
AlignmentTargetTypeValidator: /* @__PURE__ */ __name(() => AlignmentTargetTypeValidator, "AlignmentTargetTypeValidator"),
|
|
62
62
|
AlignmentValidator: /* @__PURE__ */ __name(() => AlignmentValidator, "AlignmentValidator"),
|
|
63
|
+
AllocateCredentialRefreshInputValidator: /* @__PURE__ */ __name(() => AllocateCredentialRefreshInputValidator, "AllocateCredentialRefreshInputValidator"),
|
|
64
|
+
AllocateCredentialRefreshResultValidator: /* @__PURE__ */ __name(() => AllocateCredentialRefreshResultValidator, "AllocateCredentialRefreshResultValidator"),
|
|
63
65
|
AllocateCredentialStatusInputValidator: /* @__PURE__ */ __name(() => AllocateCredentialStatusInputValidator, "AllocateCredentialStatusInputValidator"),
|
|
64
66
|
AllocatedBitstringStatusListEntryValidator: /* @__PURE__ */ __name(() => AllocatedBitstringStatusListEntryValidator, "AllocatedBitstringStatusListEntryValidator"),
|
|
65
67
|
AllowConnectionRequestsEnum: /* @__PURE__ */ __name(() => AllowConnectionRequestsEnum, "AllowConnectionRequestsEnum"),
|
|
@@ -141,6 +143,16 @@ var require_types_cjs_development = __commonJS({
|
|
|
141
143
|
CredentialInfoValidator: /* @__PURE__ */ __name(() => CredentialInfoValidator, "CredentialInfoValidator"),
|
|
142
144
|
CredentialNameRefValidator: /* @__PURE__ */ __name(() => CredentialNameRefValidator, "CredentialNameRefValidator"),
|
|
143
145
|
CredentialRecordValidator: /* @__PURE__ */ __name(() => CredentialRecordValidator, "CredentialRecordValidator"),
|
|
146
|
+
CredentialRefreshChallengeValidator: /* @__PURE__ */ __name(() => CredentialRefreshChallengeValidator, "CredentialRefreshChallengeValidator"),
|
|
147
|
+
CredentialRefreshFailedResultValidator: /* @__PURE__ */ __name(() => CredentialRefreshFailedResultValidator, "CredentialRefreshFailedResultValidator"),
|
|
148
|
+
CredentialRefreshFailureCodeValidator: /* @__PURE__ */ __name(() => CredentialRefreshFailureCodeValidator, "CredentialRefreshFailureCodeValidator"),
|
|
149
|
+
CredentialRefreshResponseEnvelopeValidator: /* @__PURE__ */ __name(() => CredentialRefreshResponseEnvelopeValidator, "CredentialRefreshResponseEnvelopeValidator"),
|
|
150
|
+
CredentialRefreshResultValidator: /* @__PURE__ */ __name(() => CredentialRefreshResultValidator, "CredentialRefreshResultValidator"),
|
|
151
|
+
CredentialRefreshSigningModeValidator: /* @__PURE__ */ __name(() => CredentialRefreshSigningModeValidator, "CredentialRefreshSigningModeValidator"),
|
|
152
|
+
CredentialRefreshUnchangedResultValidator: /* @__PURE__ */ __name(() => CredentialRefreshUnchangedResultValidator, "CredentialRefreshUnchangedResultValidator"),
|
|
153
|
+
CredentialRefreshUnsupportedResultValidator: /* @__PURE__ */ __name(() => CredentialRefreshUnsupportedResultValidator, "CredentialRefreshUnsupportedResultValidator"),
|
|
154
|
+
CredentialRefreshUpdatedResultValidator: /* @__PURE__ */ __name(() => CredentialRefreshUpdatedResultValidator, "CredentialRefreshUpdatedResultValidator"),
|
|
155
|
+
CredentialRefreshVersionMetadataValidator: /* @__PURE__ */ __name(() => CredentialRefreshVersionMetadataValidator, "CredentialRefreshVersionMetadataValidator"),
|
|
144
156
|
CredentialSchemaValidator: /* @__PURE__ */ __name(() => CredentialSchemaValidator, "CredentialSchemaValidator"),
|
|
145
157
|
CredentialStatusValidator: /* @__PURE__ */ __name(() => CredentialStatusValidator, "CredentialStatusValidator"),
|
|
146
158
|
CredentialSubjectValidator: /* @__PURE__ */ __name(() => CredentialSubjectValidator, "CredentialSubjectValidator"),
|
|
@@ -161,6 +173,8 @@ var require_types_cjs_development = __commonJS({
|
|
|
161
173
|
GeoCoordinatesValidator: /* @__PURE__ */ __name(() => GeoCoordinatesValidator, "GeoCoordinatesValidator"),
|
|
162
174
|
GetCounterEventValidator: /* @__PURE__ */ __name(() => GetCounterEventValidator, "GetCounterEventValidator"),
|
|
163
175
|
GetCountersEventValidator: /* @__PURE__ */ __name(() => GetCountersEventValidator, "GetCountersEventValidator"),
|
|
176
|
+
GetCredentialRefreshHistoryInputValidator: /* @__PURE__ */ __name(() => GetCredentialRefreshHistoryInputValidator, "GetCredentialRefreshHistoryInputValidator"),
|
|
177
|
+
GetCredentialRefreshHistoryResultValidator: /* @__PURE__ */ __name(() => GetCredentialRefreshHistoryResultValidator, "GetCredentialRefreshHistoryResultValidator"),
|
|
164
178
|
GetFullSkillTreeInputValidator: /* @__PURE__ */ __name(() => GetFullSkillTreeInputValidator, "GetFullSkillTreeInputValidator"),
|
|
165
179
|
GetFullSkillTreeResultValidator: /* @__PURE__ */ __name(() => GetFullSkillTreeResultValidator, "GetFullSkillTreeResultValidator"),
|
|
166
180
|
GetSkillPathInputValidator: /* @__PURE__ */ __name(() => GetSkillPathInputValidator, "GetSkillPathInputValidator"),
|
|
@@ -185,6 +199,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
185
199
|
JWEValidator: /* @__PURE__ */ __name(() => JWEValidator, "JWEValidator"),
|
|
186
200
|
JWKValidator: /* @__PURE__ */ __name(() => JWKValidator, "JWKValidator"),
|
|
187
201
|
JWKWithPrivateKeyValidator: /* @__PURE__ */ __name(() => JWKWithPrivateKeyValidator, "JWKWithPrivateKeyValidator"),
|
|
202
|
+
JweCredentialRefreshEnvelopeValidator: /* @__PURE__ */ __name(() => JweCredentialRefreshEnvelopeValidator, "JweCredentialRefreshEnvelopeValidator"),
|
|
188
203
|
KnownAchievementTypeValidator: /* @__PURE__ */ __name(() => KnownAchievementTypeValidator, "KnownAchievementTypeValidator"),
|
|
189
204
|
LCNAuthedProfileValidator: /* @__PURE__ */ __name(() => LCNAuthedProfileValidator, "LCNAuthedProfileValidator"),
|
|
190
205
|
LCNBoostClaimLinkOptionsValidator: /* @__PURE__ */ __name(() => LCNBoostClaimLinkOptionsValidator, "LCNBoostClaimLinkOptionsValidator"),
|
|
@@ -222,7 +237,9 @@ var require_types_cjs_development = __commonJS({
|
|
|
222
237
|
LCNSigningAuthorityValidator: /* @__PURE__ */ __name(() => LCNSigningAuthorityValidator, "LCNSigningAuthorityValidator"),
|
|
223
238
|
LCNVisibleProfileValidator: /* @__PURE__ */ __name(() => LCNVisibleProfileValidator, "LCNVisibleProfileValidator"),
|
|
224
239
|
LaunchTypeValidator: /* @__PURE__ */ __name(() => LaunchTypeValidator, "LaunchTypeValidator"),
|
|
240
|
+
LearnCardRefreshAuthorizationValidator: /* @__PURE__ */ __name(() => LearnCardRefreshAuthorizationValidator, "LearnCardRefreshAuthorizationValidator"),
|
|
225
241
|
LinkProviderFrameworkInputValidator: /* @__PURE__ */ __name(() => LinkProviderFrameworkInputValidator, "LinkProviderFrameworkInputValidator"),
|
|
242
|
+
ManagedCredentialRefreshServiceValidator: /* @__PURE__ */ __name(() => ManagedCredentialRefreshServiceValidator, "ManagedCredentialRefreshServiceValidator"),
|
|
226
243
|
PaginatedAppStoreListingsValidator: /* @__PURE__ */ __name(() => PaginatedAppStoreListingsValidator, "PaginatedAppStoreListingsValidator"),
|
|
227
244
|
PaginatedBoostRecipientsValidator: /* @__PURE__ */ __name(() => PaginatedBoostRecipientsValidator, "PaginatedBoostRecipientsValidator"),
|
|
228
245
|
PaginatedBoostRecipientsWithChildrenValidator: /* @__PURE__ */ __name(() => PaginatedBoostRecipientsWithChildrenValidator, "PaginatedBoostRecipientsWithChildrenValidator"),
|
|
@@ -252,6 +269,12 @@ var require_types_cjs_development = __commonJS({
|
|
|
252
269
|
ProfileVisibilityEnum: /* @__PURE__ */ __name(() => ProfileVisibilityEnum, "ProfileVisibilityEnum"),
|
|
253
270
|
PromotionLevelValidator: /* @__PURE__ */ __name(() => PromotionLevelValidator, "PromotionLevelValidator"),
|
|
254
271
|
ProofValidator: /* @__PURE__ */ __name(() => ProofValidator, "ProofValidator"),
|
|
272
|
+
PublicCredentialRefreshEnvelopeValidator: /* @__PURE__ */ __name(() => PublicCredentialRefreshEnvelopeValidator, "PublicCredentialRefreshEnvelopeValidator"),
|
|
273
|
+
PublishCredentialRefreshInputValidator: /* @__PURE__ */ __name(() => PublishCredentialRefreshInputValidator, "PublishCredentialRefreshInputValidator"),
|
|
274
|
+
PublishCredentialRefreshNotificationValidator: /* @__PURE__ */ __name(() => PublishCredentialRefreshNotificationValidator, "PublishCredentialRefreshNotificationValidator"),
|
|
275
|
+
PublishCredentialRefreshResultValidator: /* @__PURE__ */ __name(() => PublishCredentialRefreshResultValidator, "PublishCredentialRefreshResultValidator"),
|
|
276
|
+
PublishIssuerSignedRefreshValidator: /* @__PURE__ */ __name(() => PublishIssuerSignedRefreshValidator, "PublishIssuerSignedRefreshValidator"),
|
|
277
|
+
PublishSigningAuthorityRefreshValidator: /* @__PURE__ */ __name(() => PublishSigningAuthorityRefreshValidator, "PublishSigningAuthorityRefreshValidator"),
|
|
255
278
|
RefreshServiceValidator: /* @__PURE__ */ __name(() => RefreshServiceValidator, "RefreshServiceValidator"),
|
|
256
279
|
RegExpValidator: /* @__PURE__ */ __name(() => RegExpValidator, "RegExpValidator"),
|
|
257
280
|
RelatedValidator: /* @__PURE__ */ __name(() => RelatedValidator, "RelatedValidator"),
|
|
@@ -292,11 +315,13 @@ var require_types_cjs_development = __commonJS({
|
|
|
292
315
|
SkillTreeNodeInputValidator: /* @__PURE__ */ __name(() => SkillTreeNodeInputValidator, "SkillTreeNodeInputValidator"),
|
|
293
316
|
SkillTreeNodeValidator: /* @__PURE__ */ __name(() => SkillTreeNodeValidator, "SkillTreeNodeValidator"),
|
|
294
317
|
SkillValidator: /* @__PURE__ */ __name(() => SkillValidator, "SkillValidator"),
|
|
318
|
+
StandardCredentialRefreshServiceValidator: /* @__PURE__ */ __name(() => StandardCredentialRefreshServiceValidator, "StandardCredentialRefreshServiceValidator"),
|
|
295
319
|
StatusCheckEntryValidator: /* @__PURE__ */ __name(() => StatusCheckEntryValidator, "StatusCheckEntryValidator"),
|
|
296
320
|
StoredCredentialEnvelopeValidator: /* @__PURE__ */ __name(() => StoredCredentialEnvelopeValidator, "StoredCredentialEnvelopeValidator"),
|
|
297
321
|
StringQuery: /* @__PURE__ */ __name(() => StringQuery, "StringQuery"),
|
|
298
322
|
SummaryCredentialDataValidator: /* @__PURE__ */ __name(() => SummaryCredentialDataValidator, "SummaryCredentialDataValidator"),
|
|
299
323
|
SummaryCredentialKeywordValidator: /* @__PURE__ */ __name(() => SummaryCredentialKeywordValidator, "SummaryCredentialKeywordValidator"),
|
|
324
|
+
SupportedCredentialRefreshServiceValidator: /* @__PURE__ */ __name(() => SupportedCredentialRefreshServiceValidator, "SupportedCredentialRefreshServiceValidator"),
|
|
300
325
|
SyncFrameworkInputValidator: /* @__PURE__ */ __name(() => SyncFrameworkInputValidator, "SyncFrameworkInputValidator"),
|
|
301
326
|
TagValidator: /* @__PURE__ */ __name(() => TagValidator, "TagValidator"),
|
|
302
327
|
TemplateRenderMethodValidator: /* @__PURE__ */ __name(() => TemplateRenderMethodValidator, "TemplateRenderMethodValidator"),
|
|
@@ -16500,7 +16525,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16500
16525
|
webhookUrl: external_exports.string().url().optional().describe("Webhook URL to receive claim notifications"),
|
|
16501
16526
|
suppressDelivery: external_exports.boolean().optional().describe("If true, returns claimUrl without sending email/SMS"),
|
|
16502
16527
|
branding: SendBrandingOptionsValidator.optional().describe("Branding for email/SMS delivery"),
|
|
16503
|
-
guardianEmail: external_exports.string().email().optional().describe("Guardian email that must approve before student can claim")
|
|
16528
|
+
guardianEmail: external_exports.string().email().optional().describe("Guardian email that must approve before student can claim"),
|
|
16529
|
+
expiresInDays: external_exports.number().int().min(1).max(720).optional().describe(
|
|
16530
|
+
"How many days the credential stays claimable in the Universal Inbox (default 30). Does not change the credential validity period."
|
|
16531
|
+
)
|
|
16504
16532
|
});
|
|
16505
16533
|
var SendBoostInputValidator = external_exports.object({
|
|
16506
16534
|
type: external_exports.literal("boost"),
|
|
@@ -16795,7 +16823,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16795
16823
|
"APP_NOTIFICATION",
|
|
16796
16824
|
"CREDENTIAL_REVOKED",
|
|
16797
16825
|
"CREDENTIAL_SUSPENDED",
|
|
16798
|
-
"CREDENTIAL_UNSUSPENDED"
|
|
16826
|
+
"CREDENTIAL_UNSUSPENDED",
|
|
16827
|
+
"CREDENTIAL_REFRESHED"
|
|
16799
16828
|
]);
|
|
16800
16829
|
var LCNNotificationMessageValidator = external_exports.object({
|
|
16801
16830
|
title: external_exports.string().optional(),
|
|
@@ -16927,12 +16956,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16927
16956
|
});
|
|
16928
16957
|
var InboxCredentialValidator = external_exports.object({
|
|
16929
16958
|
id: external_exports.string(),
|
|
16930
|
-
credential: external_exports.string(),
|
|
16959
|
+
credential: external_exports.string().optional(),
|
|
16931
16960
|
isSigned: external_exports.boolean(),
|
|
16932
16961
|
currentStatus: LCNInboxStatusEnumValidator,
|
|
16933
16962
|
isAccepted: external_exports.boolean().optional(),
|
|
16934
16963
|
expiresAt: external_exports.string(),
|
|
16935
16964
|
createdAt: external_exports.string(),
|
|
16965
|
+
finalizedAt: external_exports.string().optional(),
|
|
16966
|
+
expiredAt: external_exports.string().optional(),
|
|
16967
|
+
credentialName: external_exports.string().optional(),
|
|
16968
|
+
achievementType: external_exports.string().optional(),
|
|
16936
16969
|
issuerDid: external_exports.string(),
|
|
16937
16970
|
webhookUrl: external_exports.string().optional(),
|
|
16938
16971
|
boostUri: external_exports.string().optional(),
|
|
@@ -16986,7 +17019,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16986
17019
|
"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."
|
|
16987
17020
|
),
|
|
16988
17021
|
webhookUrl: external_exports.string().url().optional().describe("The webhook URL to receive credential issuance events."),
|
|
16989
|
-
expiresInDays: external_exports.number().min(1).max(
|
|
17022
|
+
expiresInDays: external_exports.number().int().min(1).max(720).optional().describe(
|
|
17023
|
+
"How many days the encrypted inbox payload remains claimable. This does not change the credential validity period."
|
|
17024
|
+
),
|
|
16990
17025
|
templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional().describe(
|
|
16991
17026
|
"Template data to render into the boost credential template using Mustache syntax. Only used when boostUri is provided."
|
|
16992
17027
|
),
|
|
@@ -17049,6 +17084,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17049
17084
|
credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).or(CredentialNameRefValidator).describe("The credential to issue, or a { name } reference to resolve a boost template."),
|
|
17050
17085
|
configuration: external_exports.object({
|
|
17051
17086
|
publishableKey: external_exports.string(),
|
|
17087
|
+
expiresInDays: external_exports.number().int().min(1).max(720).optional().describe(
|
|
17088
|
+
"Inbox claim window in days. Defaults to 720; use a shorter window for sensitive records."
|
|
17089
|
+
),
|
|
17052
17090
|
signingAuthorityName: external_exports.string().optional(),
|
|
17053
17091
|
listingId: external_exports.string().optional(),
|
|
17054
17092
|
listingSlug: external_exports.string().optional()
|
|
@@ -17686,6 +17724,191 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17686
17724
|
const result = inAppMessagesFlagValidator.safeParse(raw);
|
|
17687
17725
|
return result.success ? result.data : EMPTY_IN_APP_MESSAGES_FLAG;
|
|
17688
17726
|
}, "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
|
+
]);
|
|
17689
17912
|
}
|
|
17690
17913
|
});
|
|
17691
17914
|
|