@learncard/helpers 1.4.1 → 1.5.1
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/credential-refresh.d.ts +58 -0
- package/dist/credential-refresh.d.ts.map +1 -0
- package/dist/helpers.cjs.development.cjs +3920 -3578
- package/dist/helpers.cjs.development.cjs.map +4 -4
- package/dist/helpers.cjs.production.min.cjs +12 -12
- package/dist/helpers.cjs.production.min.cjs.map +4 -4
- package/dist/helpers.esm.js +322 -17
- package/dist/helpers.esm.js.map +4 -4
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/credential-refresh.ts +128 -0
- package/src/index.ts +1 -0
package/dist/helpers.esm.js
CHANGED
|
@@ -64,6 +64,8 @@ var require_types_cjs_development = __commonJS({
|
|
|
64
64
|
AgeRatingValidator: /* @__PURE__ */ __name(() => AgeRatingValidator, "AgeRatingValidator"),
|
|
65
65
|
AlignmentTargetTypeValidator: /* @__PURE__ */ __name(() => AlignmentTargetTypeValidator, "AlignmentTargetTypeValidator"),
|
|
66
66
|
AlignmentValidator: /* @__PURE__ */ __name(() => AlignmentValidator, "AlignmentValidator"),
|
|
67
|
+
AllocateCredentialRefreshInputValidator: /* @__PURE__ */ __name(() => AllocateCredentialRefreshInputValidator, "AllocateCredentialRefreshInputValidator"),
|
|
68
|
+
AllocateCredentialRefreshResultValidator: /* @__PURE__ */ __name(() => AllocateCredentialRefreshResultValidator, "AllocateCredentialRefreshResultValidator"),
|
|
67
69
|
AllocateCredentialStatusInputValidator: /* @__PURE__ */ __name(() => AllocateCredentialStatusInputValidator, "AllocateCredentialStatusInputValidator"),
|
|
68
70
|
AllocatedBitstringStatusListEntryValidator: /* @__PURE__ */ __name(() => AllocatedBitstringStatusListEntryValidator, "AllocatedBitstringStatusListEntryValidator"),
|
|
69
71
|
AllowConnectionRequestsEnum: /* @__PURE__ */ __name(() => AllowConnectionRequestsEnum, "AllowConnectionRequestsEnum"),
|
|
@@ -113,6 +115,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
113
115
|
ConsentFlowContractValidator: /* @__PURE__ */ __name(() => ConsentFlowContractValidator, "ConsentFlowContractValidator"),
|
|
114
116
|
ConsentFlowDataForDidQueryValidator: /* @__PURE__ */ __name(() => ConsentFlowDataForDidQueryValidator, "ConsentFlowDataForDidQueryValidator"),
|
|
115
117
|
ConsentFlowDataQueryValidator: /* @__PURE__ */ __name(() => ConsentFlowDataQueryValidator, "ConsentFlowDataQueryValidator"),
|
|
118
|
+
ConsentFlowGuardianApprovalValidator: /* @__PURE__ */ __name(() => ConsentFlowGuardianApprovalValidator, "ConsentFlowGuardianApprovalValidator"),
|
|
116
119
|
ConsentFlowTermValidator: /* @__PURE__ */ __name(() => ConsentFlowTermValidator, "ConsentFlowTermValidator"),
|
|
117
120
|
ConsentFlowTermsQueryValidator: /* @__PURE__ */ __name(() => ConsentFlowTermsQueryValidator, "ConsentFlowTermsQueryValidator"),
|
|
118
121
|
ConsentFlowTermsStatusValidator: /* @__PURE__ */ __name(() => ConsentFlowTermsStatusValidator, "ConsentFlowTermsStatusValidator"),
|
|
@@ -145,6 +148,16 @@ var require_types_cjs_development = __commonJS({
|
|
|
145
148
|
CredentialInfoValidator: /* @__PURE__ */ __name(() => CredentialInfoValidator, "CredentialInfoValidator"),
|
|
146
149
|
CredentialNameRefValidator: /* @__PURE__ */ __name(() => CredentialNameRefValidator, "CredentialNameRefValidator"),
|
|
147
150
|
CredentialRecordValidator: /* @__PURE__ */ __name(() => CredentialRecordValidator, "CredentialRecordValidator"),
|
|
151
|
+
CredentialRefreshChallengeValidator: /* @__PURE__ */ __name(() => CredentialRefreshChallengeValidator, "CredentialRefreshChallengeValidator"),
|
|
152
|
+
CredentialRefreshFailedResultValidator: /* @__PURE__ */ __name(() => CredentialRefreshFailedResultValidator, "CredentialRefreshFailedResultValidator"),
|
|
153
|
+
CredentialRefreshFailureCodeValidator: /* @__PURE__ */ __name(() => CredentialRefreshFailureCodeValidator, "CredentialRefreshFailureCodeValidator"),
|
|
154
|
+
CredentialRefreshResponseEnvelopeValidator: /* @__PURE__ */ __name(() => CredentialRefreshResponseEnvelopeValidator, "CredentialRefreshResponseEnvelopeValidator"),
|
|
155
|
+
CredentialRefreshResultValidator: /* @__PURE__ */ __name(() => CredentialRefreshResultValidator, "CredentialRefreshResultValidator"),
|
|
156
|
+
CredentialRefreshSigningModeValidator: /* @__PURE__ */ __name(() => CredentialRefreshSigningModeValidator, "CredentialRefreshSigningModeValidator"),
|
|
157
|
+
CredentialRefreshUnchangedResultValidator: /* @__PURE__ */ __name(() => CredentialRefreshUnchangedResultValidator, "CredentialRefreshUnchangedResultValidator"),
|
|
158
|
+
CredentialRefreshUnsupportedResultValidator: /* @__PURE__ */ __name(() => CredentialRefreshUnsupportedResultValidator, "CredentialRefreshUnsupportedResultValidator"),
|
|
159
|
+
CredentialRefreshUpdatedResultValidator: /* @__PURE__ */ __name(() => CredentialRefreshUpdatedResultValidator, "CredentialRefreshUpdatedResultValidator"),
|
|
160
|
+
CredentialRefreshVersionMetadataValidator: /* @__PURE__ */ __name(() => CredentialRefreshVersionMetadataValidator, "CredentialRefreshVersionMetadataValidator"),
|
|
148
161
|
CredentialSchemaValidator: /* @__PURE__ */ __name(() => CredentialSchemaValidator, "CredentialSchemaValidator"),
|
|
149
162
|
CredentialStatusValidator: /* @__PURE__ */ __name(() => CredentialStatusValidator, "CredentialStatusValidator"),
|
|
150
163
|
CredentialSubjectValidator: /* @__PURE__ */ __name(() => CredentialSubjectValidator, "CredentialSubjectValidator"),
|
|
@@ -165,6 +178,8 @@ var require_types_cjs_development = __commonJS({
|
|
|
165
178
|
GeoCoordinatesValidator: /* @__PURE__ */ __name(() => GeoCoordinatesValidator, "GeoCoordinatesValidator"),
|
|
166
179
|
GetCounterEventValidator: /* @__PURE__ */ __name(() => GetCounterEventValidator, "GetCounterEventValidator"),
|
|
167
180
|
GetCountersEventValidator: /* @__PURE__ */ __name(() => GetCountersEventValidator, "GetCountersEventValidator"),
|
|
181
|
+
GetCredentialRefreshHistoryInputValidator: /* @__PURE__ */ __name(() => GetCredentialRefreshHistoryInputValidator, "GetCredentialRefreshHistoryInputValidator"),
|
|
182
|
+
GetCredentialRefreshHistoryResultValidator: /* @__PURE__ */ __name(() => GetCredentialRefreshHistoryResultValidator, "GetCredentialRefreshHistoryResultValidator"),
|
|
168
183
|
GetFullSkillTreeInputValidator: /* @__PURE__ */ __name(() => GetFullSkillTreeInputValidator, "GetFullSkillTreeInputValidator"),
|
|
169
184
|
GetFullSkillTreeResultValidator: /* @__PURE__ */ __name(() => GetFullSkillTreeResultValidator, "GetFullSkillTreeResultValidator"),
|
|
170
185
|
GetSkillPathInputValidator: /* @__PURE__ */ __name(() => GetSkillPathInputValidator, "GetSkillPathInputValidator"),
|
|
@@ -189,6 +204,7 @@ var require_types_cjs_development = __commonJS({
|
|
|
189
204
|
JWEValidator: /* @__PURE__ */ __name(() => JWEValidator2, "JWEValidator"),
|
|
190
205
|
JWKValidator: /* @__PURE__ */ __name(() => JWKValidator, "JWKValidator"),
|
|
191
206
|
JWKWithPrivateKeyValidator: /* @__PURE__ */ __name(() => JWKWithPrivateKeyValidator, "JWKWithPrivateKeyValidator"),
|
|
207
|
+
JweCredentialRefreshEnvelopeValidator: /* @__PURE__ */ __name(() => JweCredentialRefreshEnvelopeValidator, "JweCredentialRefreshEnvelopeValidator"),
|
|
192
208
|
KnownAchievementTypeValidator: /* @__PURE__ */ __name(() => KnownAchievementTypeValidator, "KnownAchievementTypeValidator"),
|
|
193
209
|
LCNAuthedProfileValidator: /* @__PURE__ */ __name(() => LCNAuthedProfileValidator, "LCNAuthedProfileValidator"),
|
|
194
210
|
LCNBoostClaimLinkOptionsValidator: /* @__PURE__ */ __name(() => LCNBoostClaimLinkOptionsValidator, "LCNBoostClaimLinkOptionsValidator"),
|
|
@@ -226,7 +242,9 @@ var require_types_cjs_development = __commonJS({
|
|
|
226
242
|
LCNSigningAuthorityValidator: /* @__PURE__ */ __name(() => LCNSigningAuthorityValidator, "LCNSigningAuthorityValidator"),
|
|
227
243
|
LCNVisibleProfileValidator: /* @__PURE__ */ __name(() => LCNVisibleProfileValidator, "LCNVisibleProfileValidator"),
|
|
228
244
|
LaunchTypeValidator: /* @__PURE__ */ __name(() => LaunchTypeValidator, "LaunchTypeValidator"),
|
|
245
|
+
LearnCardRefreshAuthorizationValidator: /* @__PURE__ */ __name(() => LearnCardRefreshAuthorizationValidator, "LearnCardRefreshAuthorizationValidator"),
|
|
229
246
|
LinkProviderFrameworkInputValidator: /* @__PURE__ */ __name(() => LinkProviderFrameworkInputValidator, "LinkProviderFrameworkInputValidator"),
|
|
247
|
+
ManagedCredentialRefreshServiceValidator: /* @__PURE__ */ __name(() => ManagedCredentialRefreshServiceValidator, "ManagedCredentialRefreshServiceValidator"),
|
|
230
248
|
PaginatedAppStoreListingsValidator: /* @__PURE__ */ __name(() => PaginatedAppStoreListingsValidator, "PaginatedAppStoreListingsValidator"),
|
|
231
249
|
PaginatedBoostRecipientsValidator: /* @__PURE__ */ __name(() => PaginatedBoostRecipientsValidator, "PaginatedBoostRecipientsValidator"),
|
|
232
250
|
PaginatedBoostRecipientsWithChildrenValidator: /* @__PURE__ */ __name(() => PaginatedBoostRecipientsWithChildrenValidator, "PaginatedBoostRecipientsWithChildrenValidator"),
|
|
@@ -256,6 +274,12 @@ var require_types_cjs_development = __commonJS({
|
|
|
256
274
|
ProfileVisibilityEnum: /* @__PURE__ */ __name(() => ProfileVisibilityEnum, "ProfileVisibilityEnum"),
|
|
257
275
|
PromotionLevelValidator: /* @__PURE__ */ __name(() => PromotionLevelValidator, "PromotionLevelValidator"),
|
|
258
276
|
ProofValidator: /* @__PURE__ */ __name(() => ProofValidator, "ProofValidator"),
|
|
277
|
+
PublicCredentialRefreshEnvelopeValidator: /* @__PURE__ */ __name(() => PublicCredentialRefreshEnvelopeValidator, "PublicCredentialRefreshEnvelopeValidator"),
|
|
278
|
+
PublishCredentialRefreshInputValidator: /* @__PURE__ */ __name(() => PublishCredentialRefreshInputValidator, "PublishCredentialRefreshInputValidator"),
|
|
279
|
+
PublishCredentialRefreshNotificationValidator: /* @__PURE__ */ __name(() => PublishCredentialRefreshNotificationValidator, "PublishCredentialRefreshNotificationValidator"),
|
|
280
|
+
PublishCredentialRefreshResultValidator: /* @__PURE__ */ __name(() => PublishCredentialRefreshResultValidator, "PublishCredentialRefreshResultValidator"),
|
|
281
|
+
PublishIssuerSignedRefreshValidator: /* @__PURE__ */ __name(() => PublishIssuerSignedRefreshValidator, "PublishIssuerSignedRefreshValidator"),
|
|
282
|
+
PublishSigningAuthorityRefreshValidator: /* @__PURE__ */ __name(() => PublishSigningAuthorityRefreshValidator, "PublishSigningAuthorityRefreshValidator"),
|
|
259
283
|
RefreshServiceValidator: /* @__PURE__ */ __name(() => RefreshServiceValidator, "RefreshServiceValidator"),
|
|
260
284
|
RegExpValidator: /* @__PURE__ */ __name(() => RegExpValidator, "RegExpValidator"),
|
|
261
285
|
RelatedValidator: /* @__PURE__ */ __name(() => RelatedValidator, "RelatedValidator"),
|
|
@@ -296,11 +320,13 @@ var require_types_cjs_development = __commonJS({
|
|
|
296
320
|
SkillTreeNodeInputValidator: /* @__PURE__ */ __name(() => SkillTreeNodeInputValidator, "SkillTreeNodeInputValidator"),
|
|
297
321
|
SkillTreeNodeValidator: /* @__PURE__ */ __name(() => SkillTreeNodeValidator, "SkillTreeNodeValidator"),
|
|
298
322
|
SkillValidator: /* @__PURE__ */ __name(() => SkillValidator, "SkillValidator"),
|
|
323
|
+
StandardCredentialRefreshServiceValidator: /* @__PURE__ */ __name(() => StandardCredentialRefreshServiceValidator, "StandardCredentialRefreshServiceValidator"),
|
|
299
324
|
StatusCheckEntryValidator: /* @__PURE__ */ __name(() => StatusCheckEntryValidator, "StatusCheckEntryValidator"),
|
|
300
325
|
StoredCredentialEnvelopeValidator: /* @__PURE__ */ __name(() => StoredCredentialEnvelopeValidator, "StoredCredentialEnvelopeValidator"),
|
|
301
326
|
StringQuery: /* @__PURE__ */ __name(() => StringQuery, "StringQuery"),
|
|
302
327
|
SummaryCredentialDataValidator: /* @__PURE__ */ __name(() => SummaryCredentialDataValidator, "SummaryCredentialDataValidator"),
|
|
303
328
|
SummaryCredentialKeywordValidator: /* @__PURE__ */ __name(() => SummaryCredentialKeywordValidator, "SummaryCredentialKeywordValidator"),
|
|
329
|
+
SupportedCredentialRefreshServiceValidator: /* @__PURE__ */ __name(() => SupportedCredentialRefreshServiceValidator2, "SupportedCredentialRefreshServiceValidator"),
|
|
304
330
|
SyncFrameworkInputValidator: /* @__PURE__ */ __name(() => SyncFrameworkInputValidator, "SyncFrameworkInputValidator"),
|
|
305
331
|
TagValidator: /* @__PURE__ */ __name(() => TagValidator, "TagValidator"),
|
|
306
332
|
TemplateRenderMethodValidator: /* @__PURE__ */ __name(() => TemplateRenderMethodValidator, "TemplateRenderMethodValidator"),
|
|
@@ -15736,14 +15762,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15736
15762
|
}).catchall(external_exports.any());
|
|
15737
15763
|
var ProofValidator = external_exports.object({
|
|
15738
15764
|
type: external_exports.string(),
|
|
15739
|
-
created: external_exports.string(),
|
|
15765
|
+
created: external_exports.string().optional(),
|
|
15740
15766
|
challenge: external_exports.string().optional(),
|
|
15741
15767
|
domain: external_exports.string().optional(),
|
|
15742
15768
|
nonce: external_exports.string().optional(),
|
|
15743
15769
|
proofPurpose: external_exports.string(),
|
|
15744
15770
|
verificationMethod: external_exports.string(),
|
|
15745
15771
|
jws: external_exports.string().optional()
|
|
15746
|
-
}).catchall(external_exports.any())
|
|
15772
|
+
}).catchall(external_exports.any()).superRefine((proof, ctx) => {
|
|
15773
|
+
if (proof.created === void 0 && (proof.type !== "DataIntegrityProof" || proof.cryptosuite !== "ecdsa-rdfc-2019")) {
|
|
15774
|
+
ctx.addIssue({
|
|
15775
|
+
code: "custom",
|
|
15776
|
+
path: ["created"],
|
|
15777
|
+
message: "created is required for this proof suite"
|
|
15778
|
+
});
|
|
15779
|
+
}
|
|
15780
|
+
});
|
|
15747
15781
|
var VCValidator = UnsignedVCValidator.extend({
|
|
15748
15782
|
proof: ProofValidator.or(ProofValidator.array())
|
|
15749
15783
|
});
|
|
@@ -16504,7 +16538,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16504
16538
|
webhookUrl: external_exports.string().url().optional().describe("Webhook URL to receive claim notifications"),
|
|
16505
16539
|
suppressDelivery: external_exports.boolean().optional().describe("If true, returns claimUrl without sending email/SMS"),
|
|
16506
16540
|
branding: SendBrandingOptionsValidator.optional().describe("Branding for email/SMS delivery"),
|
|
16507
|
-
guardianEmail: external_exports.string().email().optional().describe("Guardian email that must approve before student can claim")
|
|
16541
|
+
guardianEmail: external_exports.string().email().optional().describe("Guardian email that must approve before student can claim"),
|
|
16542
|
+
expiresInDays: external_exports.number().int().min(1).max(720).optional().describe(
|
|
16543
|
+
"How many days the credential stays claimable in the Universal Inbox (default 30). Does not change the credential validity period."
|
|
16544
|
+
)
|
|
16508
16545
|
});
|
|
16509
16546
|
var SendBoostInputValidator = external_exports.object({
|
|
16510
16547
|
type: external_exports.literal("boost"),
|
|
@@ -16625,15 +16662,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16625
16662
|
var PaginatedConsentFlowDataValidator = PaginationResponseValidator.extend({
|
|
16626
16663
|
records: ConsentFlowContractDataValidator.array()
|
|
16627
16664
|
});
|
|
16628
|
-
var ConsentFlowContractDataForDidValidator = external_exports.object({
|
|
16629
|
-
credentials: external_exports.object({ category: external_exports.string(), uri: external_exports.string() }).array(),
|
|
16630
|
-
personal: external_exports.record(external_exports.string(), external_exports.string()).default({}),
|
|
16631
|
-
date: external_exports.string(),
|
|
16632
|
-
contractUri: external_exports.string()
|
|
16633
|
-
});
|
|
16634
|
-
var PaginatedConsentFlowDataForDidValidator = PaginationResponseValidator.extend({
|
|
16635
|
-
records: ConsentFlowContractDataForDidValidator.array()
|
|
16636
|
-
});
|
|
16637
16665
|
var ConsentFlowTermValidator = external_exports.object({
|
|
16638
16666
|
sharing: external_exports.boolean().optional(),
|
|
16639
16667
|
shared: external_exports.string().array().optional(),
|
|
@@ -16667,6 +16695,34 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16667
16695
|
status: ConsentFlowTermsStatusValidator
|
|
16668
16696
|
}).array()
|
|
16669
16697
|
});
|
|
16698
|
+
var ConsentFlowGuardianApprovalValidator = external_exports.object({
|
|
16699
|
+
guardianProfileId: external_exports.string(),
|
|
16700
|
+
guardianDid: external_exports.string(),
|
|
16701
|
+
approvedAt: external_exports.string().datetime(),
|
|
16702
|
+
contractUpdatedAt: external_exports.string()
|
|
16703
|
+
});
|
|
16704
|
+
var ConsentFlowContractDataForDidValidator = external_exports.object({
|
|
16705
|
+
credentials: external_exports.object({ category: external_exports.string(), uri: external_exports.string() }).array(),
|
|
16706
|
+
personal: external_exports.record(external_exports.string(), external_exports.string()).default({}),
|
|
16707
|
+
date: external_exports.string(),
|
|
16708
|
+
createdAt: external_exports.string().optional(),
|
|
16709
|
+
contractUpdatedAt: external_exports.string(),
|
|
16710
|
+
contractExpiresAt: external_exports.string().optional(),
|
|
16711
|
+
reasonForAccessing: external_exports.string().optional(),
|
|
16712
|
+
guardian: external_exports.object({
|
|
16713
|
+
required: external_exports.boolean(),
|
|
16714
|
+
approved: external_exports.boolean(),
|
|
16715
|
+
approval: ConsentFlowGuardianApprovalValidator.optional()
|
|
16716
|
+
}),
|
|
16717
|
+
contractUri: external_exports.string(),
|
|
16718
|
+
termsUri: external_exports.string(),
|
|
16719
|
+
status: ConsentFlowTermsStatusValidator,
|
|
16720
|
+
expiresAt: external_exports.string().optional(),
|
|
16721
|
+
terms: ConsentFlowTermsValidator
|
|
16722
|
+
});
|
|
16723
|
+
var PaginatedConsentFlowDataForDidValidator = PaginationResponseValidator.extend({
|
|
16724
|
+
records: ConsentFlowContractDataForDidValidator.array()
|
|
16725
|
+
});
|
|
16670
16726
|
var ConsentFlowContractQueryValidator = external_exports.object({
|
|
16671
16727
|
read: external_exports.object({
|
|
16672
16728
|
anonymize: external_exports.boolean().optional(),
|
|
@@ -16727,6 +16783,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16727
16783
|
expiresAt: external_exports.string().optional(),
|
|
16728
16784
|
oneTime: external_exports.boolean().optional(),
|
|
16729
16785
|
terms: ConsentFlowTermsValidator.optional(),
|
|
16786
|
+
guardianApproval: ConsentFlowGuardianApprovalValidator.optional(),
|
|
16730
16787
|
id: external_exports.string(),
|
|
16731
16788
|
action: ConsentFlowTransactionActionValidator,
|
|
16732
16789
|
date: external_exports.string(),
|
|
@@ -16799,7 +16856,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16799
16856
|
"APP_NOTIFICATION",
|
|
16800
16857
|
"CREDENTIAL_REVOKED",
|
|
16801
16858
|
"CREDENTIAL_SUSPENDED",
|
|
16802
|
-
"CREDENTIAL_UNSUSPENDED"
|
|
16859
|
+
"CREDENTIAL_UNSUSPENDED",
|
|
16860
|
+
"CREDENTIAL_REFRESHED"
|
|
16803
16861
|
]);
|
|
16804
16862
|
var LCNNotificationMessageValidator = external_exports.object({
|
|
16805
16863
|
title: external_exports.string().optional(),
|
|
@@ -16931,12 +16989,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16931
16989
|
});
|
|
16932
16990
|
var InboxCredentialValidator = external_exports.object({
|
|
16933
16991
|
id: external_exports.string(),
|
|
16934
|
-
credential: external_exports.string(),
|
|
16992
|
+
credential: external_exports.string().optional(),
|
|
16935
16993
|
isSigned: external_exports.boolean(),
|
|
16936
16994
|
currentStatus: LCNInboxStatusEnumValidator,
|
|
16937
16995
|
isAccepted: external_exports.boolean().optional(),
|
|
16938
16996
|
expiresAt: external_exports.string(),
|
|
16939
16997
|
createdAt: external_exports.string(),
|
|
16998
|
+
finalizedAt: external_exports.string().optional(),
|
|
16999
|
+
expiredAt: external_exports.string().optional(),
|
|
17000
|
+
credentialName: external_exports.string().optional(),
|
|
17001
|
+
achievementType: external_exports.string().optional(),
|
|
16940
17002
|
issuerDid: external_exports.string(),
|
|
16941
17003
|
webhookUrl: external_exports.string().optional(),
|
|
16942
17004
|
boostUri: external_exports.string().optional(),
|
|
@@ -16990,7 +17052,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16990
17052
|
"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."
|
|
16991
17053
|
),
|
|
16992
17054
|
webhookUrl: external_exports.string().url().optional().describe("The webhook URL to receive credential issuance events."),
|
|
16993
|
-
expiresInDays: external_exports.number().min(1).max(
|
|
17055
|
+
expiresInDays: external_exports.number().int().min(1).max(720).optional().describe(
|
|
17056
|
+
"How many days the encrypted inbox payload remains claimable. This does not change the credential validity period."
|
|
17057
|
+
),
|
|
16994
17058
|
templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional().describe(
|
|
16995
17059
|
"Template data to render into the boost credential template using Mustache syntax. Only used when boostUri is provided."
|
|
16996
17060
|
),
|
|
@@ -17053,6 +17117,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17053
17117
|
credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).or(CredentialNameRefValidator).describe("The credential to issue, or a { name } reference to resolve a boost template."),
|
|
17054
17118
|
configuration: external_exports.object({
|
|
17055
17119
|
publishableKey: external_exports.string(),
|
|
17120
|
+
expiresInDays: external_exports.number().int().min(1).max(720).optional().describe(
|
|
17121
|
+
"Inbox claim window in days. Defaults to 720; use a shorter window for sensitive records."
|
|
17122
|
+
),
|
|
17056
17123
|
signingAuthorityName: external_exports.string().optional(),
|
|
17057
17124
|
listingId: external_exports.string().optional(),
|
|
17058
17125
|
listingSlug: external_exports.string().optional()
|
|
@@ -17690,6 +17757,191 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
17690
17757
|
const result = inAppMessagesFlagValidator.safeParse(raw);
|
|
17691
17758
|
return result.success ? result.data : EMPTY_IN_APP_MESSAGES_FLAG;
|
|
17692
17759
|
}, "parseInAppMessagesFlag");
|
|
17760
|
+
var LearnCardRefreshAuthorizationValidator = external_exports.object({ type: external_exports.literal("LearnCardDIDAuth") }).catchall(external_exports.any());
|
|
17761
|
+
var ManagedCredentialRefreshServiceValidator = external_exports.object({
|
|
17762
|
+
id: external_exports.string().min(1),
|
|
17763
|
+
type: external_exports.literal("LearnCardCredentialRefresh2026"),
|
|
17764
|
+
authorization: LearnCardRefreshAuthorizationValidator.optional()
|
|
17765
|
+
}).catchall(external_exports.any());
|
|
17766
|
+
var StandardCredentialRefreshServiceValidator = external_exports.object({
|
|
17767
|
+
id: external_exports.string().min(1),
|
|
17768
|
+
type: external_exports.literal("1EdTechCredentialRefresh")
|
|
17769
|
+
}).catchall(external_exports.any());
|
|
17770
|
+
var SupportedCredentialRefreshServiceValidator2 = external_exports.union([
|
|
17771
|
+
ManagedCredentialRefreshServiceValidator,
|
|
17772
|
+
StandardCredentialRefreshServiceValidator
|
|
17773
|
+
]);
|
|
17774
|
+
var AllocateCredentialRefreshInputValidator = external_exports.object({
|
|
17775
|
+
holder: external_exports.object({
|
|
17776
|
+
profileId: external_exports.string().optional(),
|
|
17777
|
+
did: external_exports.string().min(1)
|
|
17778
|
+
}),
|
|
17779
|
+
credentialId: external_exports.string().min(1)
|
|
17780
|
+
});
|
|
17781
|
+
var AllocateCredentialRefreshResultValidator = external_exports.object({
|
|
17782
|
+
refreshId: external_exports.string().min(1),
|
|
17783
|
+
refreshService: ManagedCredentialRefreshServiceValidator.extend({
|
|
17784
|
+
authorization: LearnCardRefreshAuthorizationValidator
|
|
17785
|
+
})
|
|
17786
|
+
});
|
|
17787
|
+
var CredentialRefreshSigningModeValidator = external_exports.enum(["issuer-signed", "signing-authority"]);
|
|
17788
|
+
var PublishCredentialRefreshBaseFields = {
|
|
17789
|
+
refreshId: external_exports.string().min(1),
|
|
17790
|
+
notifyHolder: external_exports.boolean().optional(),
|
|
17791
|
+
updateSummary: external_exports.string().optional(),
|
|
17792
|
+
idempotencyKey: external_exports.string().optional()
|
|
17793
|
+
};
|
|
17794
|
+
var PublishIssuerSignedRefreshValidator = external_exports.object({
|
|
17795
|
+
...PublishCredentialRefreshBaseFields,
|
|
17796
|
+
mode: external_exports.literal("issuer-signed"),
|
|
17797
|
+
signedCredential: VCValidator
|
|
17798
|
+
});
|
|
17799
|
+
var PublishSigningAuthorityRefreshValidator = external_exports.object({
|
|
17800
|
+
...PublishCredentialRefreshBaseFields,
|
|
17801
|
+
mode: external_exports.literal("signing-authority"),
|
|
17802
|
+
credential: UnsignedVCValidator,
|
|
17803
|
+
signingAuthority: external_exports.object({
|
|
17804
|
+
type: external_exports.string().min(1)
|
|
17805
|
+
}).catchall(external_exports.any())
|
|
17806
|
+
});
|
|
17807
|
+
var PublishCredentialRefreshInputValidator = external_exports.object({
|
|
17808
|
+
...PublishCredentialRefreshBaseFields,
|
|
17809
|
+
mode: CredentialRefreshSigningModeValidator,
|
|
17810
|
+
signedCredential: VCValidator.optional(),
|
|
17811
|
+
credential: UnsignedVCValidator.optional(),
|
|
17812
|
+
signingAuthority: external_exports.object({
|
|
17813
|
+
type: external_exports.string().min(1)
|
|
17814
|
+
}).catchall(external_exports.any()).optional()
|
|
17815
|
+
}).superRefine((input, ctx) => {
|
|
17816
|
+
if (input.mode === "issuer-signed" && !input.signedCredential) {
|
|
17817
|
+
ctx.addIssue({
|
|
17818
|
+
code: "custom",
|
|
17819
|
+
path: ["signedCredential"],
|
|
17820
|
+
message: "signedCredential is required for issuer-signed publication"
|
|
17821
|
+
});
|
|
17822
|
+
}
|
|
17823
|
+
if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
|
|
17824
|
+
ctx.addIssue({
|
|
17825
|
+
code: "custom",
|
|
17826
|
+
path: ["mode"],
|
|
17827
|
+
message: "issuer-signed publication cannot include signing-authority fields"
|
|
17828
|
+
});
|
|
17829
|
+
}
|
|
17830
|
+
if (input.mode === "signing-authority") {
|
|
17831
|
+
if (input.signedCredential !== void 0) {
|
|
17832
|
+
ctx.addIssue({
|
|
17833
|
+
code: "custom",
|
|
17834
|
+
path: ["signedCredential"],
|
|
17835
|
+
message: "signing-authority publication cannot include signedCredential"
|
|
17836
|
+
});
|
|
17837
|
+
}
|
|
17838
|
+
if (!input.credential) {
|
|
17839
|
+
ctx.addIssue({
|
|
17840
|
+
code: "custom",
|
|
17841
|
+
path: ["credential"],
|
|
17842
|
+
message: "credential is required for signing-authority publication"
|
|
17843
|
+
});
|
|
17844
|
+
}
|
|
17845
|
+
if (!input.signingAuthority) {
|
|
17846
|
+
ctx.addIssue({
|
|
17847
|
+
code: "custom",
|
|
17848
|
+
path: ["signingAuthority"],
|
|
17849
|
+
message: "signingAuthority is required for signing-authority publication"
|
|
17850
|
+
});
|
|
17851
|
+
}
|
|
17852
|
+
}
|
|
17853
|
+
});
|
|
17854
|
+
var PublishCredentialRefreshNotificationValidator = external_exports.enum([
|
|
17855
|
+
"queued",
|
|
17856
|
+
"suppressed",
|
|
17857
|
+
"not-applicable",
|
|
17858
|
+
/** Publication succeeded, but the post-commit notification enqueue must be retried. */
|
|
17859
|
+
"delivery-failed"
|
|
17860
|
+
]);
|
|
17861
|
+
var PublishCredentialRefreshResultValidator = external_exports.object({
|
|
17862
|
+
refreshId: external_exports.string().min(1),
|
|
17863
|
+
version: external_exports.number().int().positive(),
|
|
17864
|
+
publishedAt: external_exports.string().min(1),
|
|
17865
|
+
notification: PublishCredentialRefreshNotificationValidator
|
|
17866
|
+
});
|
|
17867
|
+
var CredentialRefreshVersionMetadataValidator = external_exports.object({
|
|
17868
|
+
version: external_exports.number().int().positive(),
|
|
17869
|
+
publishedAt: external_exports.string().min(1),
|
|
17870
|
+
effectiveAt: external_exports.string().optional(),
|
|
17871
|
+
etag: external_exports.string().optional(),
|
|
17872
|
+
signingMode: CredentialRefreshSigningModeValidator.optional(),
|
|
17873
|
+
updateSummary: external_exports.string().optional()
|
|
17874
|
+
});
|
|
17875
|
+
var GetCredentialRefreshHistoryInputValidator = external_exports.object({
|
|
17876
|
+
refreshId: external_exports.string().min(1),
|
|
17877
|
+
cursor: external_exports.string().optional(),
|
|
17878
|
+
limit: external_exports.number().int().positive().optional()
|
|
17879
|
+
});
|
|
17880
|
+
var GetCredentialRefreshHistoryResultValidator = external_exports.object({
|
|
17881
|
+
records: CredentialRefreshVersionMetadataValidator.array(),
|
|
17882
|
+
hasMore: external_exports.boolean(),
|
|
17883
|
+
cursor: external_exports.string().optional()
|
|
17884
|
+
});
|
|
17885
|
+
var CredentialRefreshChallengeValidator = external_exports.object({
|
|
17886
|
+
challenge: external_exports.string().min(1),
|
|
17887
|
+
expiresAt: external_exports.string().min(1),
|
|
17888
|
+
domain: external_exports.string().optional(),
|
|
17889
|
+
scheme: external_exports.literal("LearnCardDIDAuth").optional()
|
|
17890
|
+
});
|
|
17891
|
+
var PublicCredentialRefreshEnvelopeValidator = external_exports.object({
|
|
17892
|
+
format: external_exports.literal("vc"),
|
|
17893
|
+
credential: VCValidator,
|
|
17894
|
+
etag: external_exports.string().optional()
|
|
17895
|
+
});
|
|
17896
|
+
var JweCredentialRefreshEnvelopeValidator = external_exports.object({
|
|
17897
|
+
format: external_exports.literal("jwe"),
|
|
17898
|
+
jwe: JWEValidator2,
|
|
17899
|
+
etag: external_exports.string().optional(),
|
|
17900
|
+
/** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
|
|
17901
|
+
version: external_exports.number().int().positive().optional()
|
|
17902
|
+
});
|
|
17903
|
+
var CredentialRefreshResponseEnvelopeValidator = external_exports.discriminatedUnion("format", [
|
|
17904
|
+
PublicCredentialRefreshEnvelopeValidator,
|
|
17905
|
+
JweCredentialRefreshEnvelopeValidator
|
|
17906
|
+
]);
|
|
17907
|
+
var CredentialRefreshFailureCodeValidator = external_exports.enum([
|
|
17908
|
+
"UNAVAILABLE",
|
|
17909
|
+
"TIMEOUT",
|
|
17910
|
+
"UNSUPPORTED_SERVICE",
|
|
17911
|
+
"UNAUTHORIZED",
|
|
17912
|
+
"MALFORMED_RESPONSE",
|
|
17913
|
+
"INVALID_PROOF",
|
|
17914
|
+
"ISSUER_MISMATCH",
|
|
17915
|
+
"ID_MISMATCH",
|
|
17916
|
+
"ROLLBACK",
|
|
17917
|
+
"REVOKED",
|
|
17918
|
+
"UNSAFE_ENDPOINT"
|
|
17919
|
+
]);
|
|
17920
|
+
var CredentialRefreshUpdatedResultValidator = external_exports.object({
|
|
17921
|
+
status: external_exports.literal("updated"),
|
|
17922
|
+
credential: VCValidator,
|
|
17923
|
+
etag: external_exports.string().optional(),
|
|
17924
|
+
managedVersion: external_exports.number().int().positive().optional()
|
|
17925
|
+
});
|
|
17926
|
+
var CredentialRefreshUnchangedResultValidator = external_exports.object({
|
|
17927
|
+
status: external_exports.literal("unchanged"),
|
|
17928
|
+
checkedAt: external_exports.string().min(1),
|
|
17929
|
+
etag: external_exports.string().optional()
|
|
17930
|
+
});
|
|
17931
|
+
var CredentialRefreshUnsupportedResultValidator = external_exports.object({
|
|
17932
|
+
status: external_exports.literal("unsupported")
|
|
17933
|
+
});
|
|
17934
|
+
var CredentialRefreshFailedResultValidator = external_exports.object({
|
|
17935
|
+
status: external_exports.literal("failed"),
|
|
17936
|
+
code: CredentialRefreshFailureCodeValidator,
|
|
17937
|
+
retryable: external_exports.boolean()
|
|
17938
|
+
});
|
|
17939
|
+
var CredentialRefreshResultValidator = external_exports.discriminatedUnion("status", [
|
|
17940
|
+
CredentialRefreshUpdatedResultValidator,
|
|
17941
|
+
CredentialRefreshUnchangedResultValidator,
|
|
17942
|
+
CredentialRefreshUnsupportedResultValidator,
|
|
17943
|
+
CredentialRefreshFailedResultValidator
|
|
17944
|
+
]);
|
|
17693
17945
|
}
|
|
17694
17946
|
});
|
|
17695
17947
|
|
|
@@ -17706,7 +17958,7 @@ var require_dist = __commonJS({
|
|
|
17706
17958
|
});
|
|
17707
17959
|
|
|
17708
17960
|
// src/index.ts
|
|
17709
|
-
var
|
|
17961
|
+
var import_types3 = __toESM(require_dist());
|
|
17710
17962
|
|
|
17711
17963
|
// src/images/filestack.helpers.ts
|
|
17712
17964
|
var filestack_helpers_exports = {};
|
|
@@ -18552,6 +18804,53 @@ var inferW3cVersionFromContext = /* @__PURE__ */ __name((vc) => {
|
|
|
18552
18804
|
return isV2 ? "w3c-vc-2.0" : "w3c-vc-1.1";
|
|
18553
18805
|
}, "inferW3cVersionFromContext");
|
|
18554
18806
|
|
|
18807
|
+
// src/credential-refresh.ts
|
|
18808
|
+
var import_types2 = __toESM(require_dist());
|
|
18809
|
+
var getSupportedRefreshService = /* @__PURE__ */ __name((vc) => {
|
|
18810
|
+
const refreshService = vc?.refreshService;
|
|
18811
|
+
if (!refreshService) return void 0;
|
|
18812
|
+
const services = Array.isArray(refreshService) ? refreshService : [refreshService];
|
|
18813
|
+
for (const service of services) {
|
|
18814
|
+
const parsed = import_types2.SupportedCredentialRefreshServiceValidator.safeParse(service);
|
|
18815
|
+
if (parsed.success) return parsed.data;
|
|
18816
|
+
}
|
|
18817
|
+
return void 0;
|
|
18818
|
+
}, "getSupportedRefreshService");
|
|
18819
|
+
var getCredentialIssuerId = /* @__PURE__ */ __name((vc) => {
|
|
18820
|
+
const issuer = vc?.issuer;
|
|
18821
|
+
if (!issuer) return void 0;
|
|
18822
|
+
if (typeof issuer === "string") return issuer;
|
|
18823
|
+
return typeof issuer.id === "string" ? issuer.id : void 0;
|
|
18824
|
+
}, "getCredentialIssuerId");
|
|
18825
|
+
var getCredentialEffectiveTime = /* @__PURE__ */ __name((vc) => {
|
|
18826
|
+
const raw = vc?.validFrom ?? vc?.issuanceDate;
|
|
18827
|
+
if (typeof raw !== "string" || raw.length === 0) return void 0;
|
|
18828
|
+
const parsed = Date.parse(raw);
|
|
18829
|
+
return Number.isNaN(parsed) ? void 0 : parsed;
|
|
18830
|
+
}, "getCredentialEffectiveTime");
|
|
18831
|
+
var canonicalizeCredentialContent = /* @__PURE__ */ __name((value) => {
|
|
18832
|
+
if (Array.isArray(value)) {
|
|
18833
|
+
return value.map((entry) => canonicalizeCredentialContent(entry));
|
|
18834
|
+
}
|
|
18835
|
+
if (value !== null && typeof value === "object") {
|
|
18836
|
+
const source = value;
|
|
18837
|
+
const sorted = {};
|
|
18838
|
+
for (const key of Object.keys(source).sort()) {
|
|
18839
|
+
sorted[key] = canonicalizeCredentialContent(source[key]);
|
|
18840
|
+
}
|
|
18841
|
+
return sorted;
|
|
18842
|
+
}
|
|
18843
|
+
return value;
|
|
18844
|
+
}, "canonicalizeCredentialContent");
|
|
18845
|
+
var canonicalizeCredentialJson = /* @__PURE__ */ __name((value) => JSON.stringify(canonicalizeCredentialContent(value)), "canonicalizeCredentialJson");
|
|
18846
|
+
var credentialContentsEqual = /* @__PURE__ */ __name((first, second) => {
|
|
18847
|
+
const stripProof = /* @__PURE__ */ __name((vc) => {
|
|
18848
|
+
const { proof: _proof, ...rest } = vc ?? {};
|
|
18849
|
+
return rest;
|
|
18850
|
+
}, "stripProof");
|
|
18851
|
+
return canonicalizeCredentialJson(stripProof(first)) === canonicalizeCredentialJson(stripProof(second));
|
|
18852
|
+
}, "credentialContentsEqual");
|
|
18853
|
+
|
|
18555
18854
|
// src/did.ts
|
|
18556
18855
|
var getDidWeb = /* @__PURE__ */ __name((domain, profileId) => {
|
|
18557
18856
|
let decodedDomain = domain;
|
|
@@ -18615,7 +18914,7 @@ var parseEnvironment = /* @__PURE__ */ __name((schema, raw, context) => {
|
|
|
18615
18914
|
// src/index.ts
|
|
18616
18915
|
var isHex = /* @__PURE__ */ __name((str) => /^[0-9a-f]+$/i.test(str), "isHex");
|
|
18617
18916
|
var isEncrypted = /* @__PURE__ */ __name((item) => {
|
|
18618
|
-
return
|
|
18917
|
+
return import_types3.JWEValidator.safeParse(item).success;
|
|
18619
18918
|
}, "isEncrypted");
|
|
18620
18919
|
var RegExpTransformer = {
|
|
18621
18920
|
serialize(object) {
|
|
@@ -18668,9 +18967,12 @@ export {
|
|
|
18668
18967
|
ImageWithLoadingStateValdator,
|
|
18669
18968
|
RegExpTransformer,
|
|
18670
18969
|
calculateAgeFromDob,
|
|
18970
|
+
canonicalizeCredentialContent,
|
|
18971
|
+
canonicalizeCredentialJson,
|
|
18671
18972
|
capitalizeFirstLetter,
|
|
18672
18973
|
changeQuality4 as changeQuality,
|
|
18673
18974
|
checkAppInstallEligibility,
|
|
18975
|
+
credentialContentsEqual,
|
|
18674
18976
|
curriedArraySlice,
|
|
18675
18977
|
curriedInnerImmerOuterImmer,
|
|
18676
18978
|
curriedInnerImmerOuterReact,
|
|
@@ -18691,9 +18993,12 @@ export {
|
|
|
18691
18993
|
getBitstringStatusListBit,
|
|
18692
18994
|
getBitstringStatusListEntries,
|
|
18693
18995
|
getBitstringStatusListEntryForPurpose,
|
|
18996
|
+
getCredentialEffectiveTime,
|
|
18997
|
+
getCredentialIssuerId,
|
|
18694
18998
|
getCredentialStatusArray,
|
|
18695
18999
|
getDidWeb,
|
|
18696
19000
|
getProvider,
|
|
19001
|
+
getSupportedRefreshService,
|
|
18697
19002
|
getUrlsFromSrcSet,
|
|
18698
19003
|
immerArraySlice,
|
|
18699
19004
|
innerImmerOuterImmer,
|