@learncard/sss-key-manager 0.1.21 → 0.1.23

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.
@@ -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"),
@@ -109,6 +111,7 @@ var require_types_cjs_development = __commonJS({
109
111
  ConsentFlowContractValidator: /* @__PURE__ */ __name(() => ConsentFlowContractValidator, "ConsentFlowContractValidator"),
110
112
  ConsentFlowDataForDidQueryValidator: /* @__PURE__ */ __name(() => ConsentFlowDataForDidQueryValidator, "ConsentFlowDataForDidQueryValidator"),
111
113
  ConsentFlowDataQueryValidator: /* @__PURE__ */ __name(() => ConsentFlowDataQueryValidator, "ConsentFlowDataQueryValidator"),
114
+ ConsentFlowGuardianApprovalValidator: /* @__PURE__ */ __name(() => ConsentFlowGuardianApprovalValidator, "ConsentFlowGuardianApprovalValidator"),
112
115
  ConsentFlowTermValidator: /* @__PURE__ */ __name(() => ConsentFlowTermValidator, "ConsentFlowTermValidator"),
113
116
  ConsentFlowTermsQueryValidator: /* @__PURE__ */ __name(() => ConsentFlowTermsQueryValidator, "ConsentFlowTermsQueryValidator"),
114
117
  ConsentFlowTermsStatusValidator: /* @__PURE__ */ __name(() => ConsentFlowTermsStatusValidator, "ConsentFlowTermsStatusValidator"),
@@ -141,6 +144,16 @@ var require_types_cjs_development = __commonJS({
141
144
  CredentialInfoValidator: /* @__PURE__ */ __name(() => CredentialInfoValidator, "CredentialInfoValidator"),
142
145
  CredentialNameRefValidator: /* @__PURE__ */ __name(() => CredentialNameRefValidator, "CredentialNameRefValidator"),
143
146
  CredentialRecordValidator: /* @__PURE__ */ __name(() => CredentialRecordValidator, "CredentialRecordValidator"),
147
+ CredentialRefreshChallengeValidator: /* @__PURE__ */ __name(() => CredentialRefreshChallengeValidator, "CredentialRefreshChallengeValidator"),
148
+ CredentialRefreshFailedResultValidator: /* @__PURE__ */ __name(() => CredentialRefreshFailedResultValidator, "CredentialRefreshFailedResultValidator"),
149
+ CredentialRefreshFailureCodeValidator: /* @__PURE__ */ __name(() => CredentialRefreshFailureCodeValidator, "CredentialRefreshFailureCodeValidator"),
150
+ CredentialRefreshResponseEnvelopeValidator: /* @__PURE__ */ __name(() => CredentialRefreshResponseEnvelopeValidator, "CredentialRefreshResponseEnvelopeValidator"),
151
+ CredentialRefreshResultValidator: /* @__PURE__ */ __name(() => CredentialRefreshResultValidator, "CredentialRefreshResultValidator"),
152
+ CredentialRefreshSigningModeValidator: /* @__PURE__ */ __name(() => CredentialRefreshSigningModeValidator, "CredentialRefreshSigningModeValidator"),
153
+ CredentialRefreshUnchangedResultValidator: /* @__PURE__ */ __name(() => CredentialRefreshUnchangedResultValidator, "CredentialRefreshUnchangedResultValidator"),
154
+ CredentialRefreshUnsupportedResultValidator: /* @__PURE__ */ __name(() => CredentialRefreshUnsupportedResultValidator, "CredentialRefreshUnsupportedResultValidator"),
155
+ CredentialRefreshUpdatedResultValidator: /* @__PURE__ */ __name(() => CredentialRefreshUpdatedResultValidator, "CredentialRefreshUpdatedResultValidator"),
156
+ CredentialRefreshVersionMetadataValidator: /* @__PURE__ */ __name(() => CredentialRefreshVersionMetadataValidator, "CredentialRefreshVersionMetadataValidator"),
144
157
  CredentialSchemaValidator: /* @__PURE__ */ __name(() => CredentialSchemaValidator, "CredentialSchemaValidator"),
145
158
  CredentialStatusValidator: /* @__PURE__ */ __name(() => CredentialStatusValidator, "CredentialStatusValidator"),
146
159
  CredentialSubjectValidator: /* @__PURE__ */ __name(() => CredentialSubjectValidator, "CredentialSubjectValidator"),
@@ -161,6 +174,8 @@ var require_types_cjs_development = __commonJS({
161
174
  GeoCoordinatesValidator: /* @__PURE__ */ __name(() => GeoCoordinatesValidator, "GeoCoordinatesValidator"),
162
175
  GetCounterEventValidator: /* @__PURE__ */ __name(() => GetCounterEventValidator, "GetCounterEventValidator"),
163
176
  GetCountersEventValidator: /* @__PURE__ */ __name(() => GetCountersEventValidator, "GetCountersEventValidator"),
177
+ GetCredentialRefreshHistoryInputValidator: /* @__PURE__ */ __name(() => GetCredentialRefreshHistoryInputValidator, "GetCredentialRefreshHistoryInputValidator"),
178
+ GetCredentialRefreshHistoryResultValidator: /* @__PURE__ */ __name(() => GetCredentialRefreshHistoryResultValidator, "GetCredentialRefreshHistoryResultValidator"),
164
179
  GetFullSkillTreeInputValidator: /* @__PURE__ */ __name(() => GetFullSkillTreeInputValidator, "GetFullSkillTreeInputValidator"),
165
180
  GetFullSkillTreeResultValidator: /* @__PURE__ */ __name(() => GetFullSkillTreeResultValidator, "GetFullSkillTreeResultValidator"),
166
181
  GetSkillPathInputValidator: /* @__PURE__ */ __name(() => GetSkillPathInputValidator, "GetSkillPathInputValidator"),
@@ -185,6 +200,7 @@ var require_types_cjs_development = __commonJS({
185
200
  JWEValidator: /* @__PURE__ */ __name(() => JWEValidator, "JWEValidator"),
186
201
  JWKValidator: /* @__PURE__ */ __name(() => JWKValidator, "JWKValidator"),
187
202
  JWKWithPrivateKeyValidator: /* @__PURE__ */ __name(() => JWKWithPrivateKeyValidator, "JWKWithPrivateKeyValidator"),
203
+ JweCredentialRefreshEnvelopeValidator: /* @__PURE__ */ __name(() => JweCredentialRefreshEnvelopeValidator, "JweCredentialRefreshEnvelopeValidator"),
188
204
  KnownAchievementTypeValidator: /* @__PURE__ */ __name(() => KnownAchievementTypeValidator, "KnownAchievementTypeValidator"),
189
205
  LCNAuthedProfileValidator: /* @__PURE__ */ __name(() => LCNAuthedProfileValidator, "LCNAuthedProfileValidator"),
190
206
  LCNBoostClaimLinkOptionsValidator: /* @__PURE__ */ __name(() => LCNBoostClaimLinkOptionsValidator, "LCNBoostClaimLinkOptionsValidator"),
@@ -222,7 +238,9 @@ var require_types_cjs_development = __commonJS({
222
238
  LCNSigningAuthorityValidator: /* @__PURE__ */ __name(() => LCNSigningAuthorityValidator, "LCNSigningAuthorityValidator"),
223
239
  LCNVisibleProfileValidator: /* @__PURE__ */ __name(() => LCNVisibleProfileValidator, "LCNVisibleProfileValidator"),
224
240
  LaunchTypeValidator: /* @__PURE__ */ __name(() => LaunchTypeValidator, "LaunchTypeValidator"),
241
+ LearnCardRefreshAuthorizationValidator: /* @__PURE__ */ __name(() => LearnCardRefreshAuthorizationValidator, "LearnCardRefreshAuthorizationValidator"),
225
242
  LinkProviderFrameworkInputValidator: /* @__PURE__ */ __name(() => LinkProviderFrameworkInputValidator, "LinkProviderFrameworkInputValidator"),
243
+ ManagedCredentialRefreshServiceValidator: /* @__PURE__ */ __name(() => ManagedCredentialRefreshServiceValidator, "ManagedCredentialRefreshServiceValidator"),
226
244
  PaginatedAppStoreListingsValidator: /* @__PURE__ */ __name(() => PaginatedAppStoreListingsValidator, "PaginatedAppStoreListingsValidator"),
227
245
  PaginatedBoostRecipientsValidator: /* @__PURE__ */ __name(() => PaginatedBoostRecipientsValidator, "PaginatedBoostRecipientsValidator"),
228
246
  PaginatedBoostRecipientsWithChildrenValidator: /* @__PURE__ */ __name(() => PaginatedBoostRecipientsWithChildrenValidator, "PaginatedBoostRecipientsWithChildrenValidator"),
@@ -252,6 +270,12 @@ var require_types_cjs_development = __commonJS({
252
270
  ProfileVisibilityEnum: /* @__PURE__ */ __name(() => ProfileVisibilityEnum, "ProfileVisibilityEnum"),
253
271
  PromotionLevelValidator: /* @__PURE__ */ __name(() => PromotionLevelValidator, "PromotionLevelValidator"),
254
272
  ProofValidator: /* @__PURE__ */ __name(() => ProofValidator, "ProofValidator"),
273
+ PublicCredentialRefreshEnvelopeValidator: /* @__PURE__ */ __name(() => PublicCredentialRefreshEnvelopeValidator, "PublicCredentialRefreshEnvelopeValidator"),
274
+ PublishCredentialRefreshInputValidator: /* @__PURE__ */ __name(() => PublishCredentialRefreshInputValidator, "PublishCredentialRefreshInputValidator"),
275
+ PublishCredentialRefreshNotificationValidator: /* @__PURE__ */ __name(() => PublishCredentialRefreshNotificationValidator, "PublishCredentialRefreshNotificationValidator"),
276
+ PublishCredentialRefreshResultValidator: /* @__PURE__ */ __name(() => PublishCredentialRefreshResultValidator, "PublishCredentialRefreshResultValidator"),
277
+ PublishIssuerSignedRefreshValidator: /* @__PURE__ */ __name(() => PublishIssuerSignedRefreshValidator, "PublishIssuerSignedRefreshValidator"),
278
+ PublishSigningAuthorityRefreshValidator: /* @__PURE__ */ __name(() => PublishSigningAuthorityRefreshValidator, "PublishSigningAuthorityRefreshValidator"),
255
279
  RefreshServiceValidator: /* @__PURE__ */ __name(() => RefreshServiceValidator, "RefreshServiceValidator"),
256
280
  RegExpValidator: /* @__PURE__ */ __name(() => RegExpValidator, "RegExpValidator"),
257
281
  RelatedValidator: /* @__PURE__ */ __name(() => RelatedValidator, "RelatedValidator"),
@@ -292,11 +316,13 @@ var require_types_cjs_development = __commonJS({
292
316
  SkillTreeNodeInputValidator: /* @__PURE__ */ __name(() => SkillTreeNodeInputValidator, "SkillTreeNodeInputValidator"),
293
317
  SkillTreeNodeValidator: /* @__PURE__ */ __name(() => SkillTreeNodeValidator, "SkillTreeNodeValidator"),
294
318
  SkillValidator: /* @__PURE__ */ __name(() => SkillValidator, "SkillValidator"),
319
+ StandardCredentialRefreshServiceValidator: /* @__PURE__ */ __name(() => StandardCredentialRefreshServiceValidator, "StandardCredentialRefreshServiceValidator"),
295
320
  StatusCheckEntryValidator: /* @__PURE__ */ __name(() => StatusCheckEntryValidator, "StatusCheckEntryValidator"),
296
321
  StoredCredentialEnvelopeValidator: /* @__PURE__ */ __name(() => StoredCredentialEnvelopeValidator, "StoredCredentialEnvelopeValidator"),
297
322
  StringQuery: /* @__PURE__ */ __name(() => StringQuery, "StringQuery"),
298
323
  SummaryCredentialDataValidator: /* @__PURE__ */ __name(() => SummaryCredentialDataValidator, "SummaryCredentialDataValidator"),
299
324
  SummaryCredentialKeywordValidator: /* @__PURE__ */ __name(() => SummaryCredentialKeywordValidator, "SummaryCredentialKeywordValidator"),
325
+ SupportedCredentialRefreshServiceValidator: /* @__PURE__ */ __name(() => SupportedCredentialRefreshServiceValidator, "SupportedCredentialRefreshServiceValidator"),
300
326
  SyncFrameworkInputValidator: /* @__PURE__ */ __name(() => SyncFrameworkInputValidator, "SyncFrameworkInputValidator"),
301
327
  TagValidator: /* @__PURE__ */ __name(() => TagValidator, "TagValidator"),
302
328
  TemplateRenderMethodValidator: /* @__PURE__ */ __name(() => TemplateRenderMethodValidator, "TemplateRenderMethodValidator"),
@@ -15732,14 +15758,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15732
15758
  }).catchall(external_exports.any());
15733
15759
  var ProofValidator = external_exports.object({
15734
15760
  type: external_exports.string(),
15735
- created: external_exports.string(),
15761
+ created: external_exports.string().optional(),
15736
15762
  challenge: external_exports.string().optional(),
15737
15763
  domain: external_exports.string().optional(),
15738
15764
  nonce: external_exports.string().optional(),
15739
15765
  proofPurpose: external_exports.string(),
15740
15766
  verificationMethod: external_exports.string(),
15741
15767
  jws: external_exports.string().optional()
15742
- }).catchall(external_exports.any());
15768
+ }).catchall(external_exports.any()).superRefine((proof, ctx) => {
15769
+ if (proof.created === void 0 && (proof.type !== "DataIntegrityProof" || proof.cryptosuite !== "ecdsa-rdfc-2019")) {
15770
+ ctx.addIssue({
15771
+ code: "custom",
15772
+ path: ["created"],
15773
+ message: "created is required for this proof suite"
15774
+ });
15775
+ }
15776
+ });
15743
15777
  var VCValidator = UnsignedVCValidator.extend({
15744
15778
  proof: ProofValidator.or(ProofValidator.array())
15745
15779
  });
@@ -16500,7 +16534,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16500
16534
  webhookUrl: external_exports.string().url().optional().describe("Webhook URL to receive claim notifications"),
16501
16535
  suppressDelivery: external_exports.boolean().optional().describe("If true, returns claimUrl without sending email/SMS"),
16502
16536
  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")
16537
+ guardianEmail: external_exports.string().email().optional().describe("Guardian email that must approve before student can claim"),
16538
+ expiresInDays: external_exports.number().int().min(1).max(720).optional().describe(
16539
+ "How many days the credential stays claimable in the Universal Inbox (default 30). Does not change the credential validity period."
16540
+ )
16504
16541
  });
16505
16542
  var SendBoostInputValidator = external_exports.object({
16506
16543
  type: external_exports.literal("boost"),
@@ -16621,15 +16658,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16621
16658
  var PaginatedConsentFlowDataValidator = PaginationResponseValidator.extend({
16622
16659
  records: ConsentFlowContractDataValidator.array()
16623
16660
  });
16624
- var ConsentFlowContractDataForDidValidator = external_exports.object({
16625
- credentials: external_exports.object({ category: external_exports.string(), uri: external_exports.string() }).array(),
16626
- personal: external_exports.record(external_exports.string(), external_exports.string()).default({}),
16627
- date: external_exports.string(),
16628
- contractUri: external_exports.string()
16629
- });
16630
- var PaginatedConsentFlowDataForDidValidator = PaginationResponseValidator.extend({
16631
- records: ConsentFlowContractDataForDidValidator.array()
16632
- });
16633
16661
  var ConsentFlowTermValidator = external_exports.object({
16634
16662
  sharing: external_exports.boolean().optional(),
16635
16663
  shared: external_exports.string().array().optional(),
@@ -16663,6 +16691,34 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16663
16691
  status: ConsentFlowTermsStatusValidator
16664
16692
  }).array()
16665
16693
  });
16694
+ var ConsentFlowGuardianApprovalValidator = external_exports.object({
16695
+ guardianProfileId: external_exports.string(),
16696
+ guardianDid: external_exports.string(),
16697
+ approvedAt: external_exports.string().datetime(),
16698
+ contractUpdatedAt: external_exports.string()
16699
+ });
16700
+ var ConsentFlowContractDataForDidValidator = external_exports.object({
16701
+ credentials: external_exports.object({ category: external_exports.string(), uri: external_exports.string() }).array(),
16702
+ personal: external_exports.record(external_exports.string(), external_exports.string()).default({}),
16703
+ date: external_exports.string(),
16704
+ createdAt: external_exports.string().optional(),
16705
+ contractUpdatedAt: external_exports.string(),
16706
+ contractExpiresAt: external_exports.string().optional(),
16707
+ reasonForAccessing: external_exports.string().optional(),
16708
+ guardian: external_exports.object({
16709
+ required: external_exports.boolean(),
16710
+ approved: external_exports.boolean(),
16711
+ approval: ConsentFlowGuardianApprovalValidator.optional()
16712
+ }),
16713
+ contractUri: external_exports.string(),
16714
+ termsUri: external_exports.string(),
16715
+ status: ConsentFlowTermsStatusValidator,
16716
+ expiresAt: external_exports.string().optional(),
16717
+ terms: ConsentFlowTermsValidator
16718
+ });
16719
+ var PaginatedConsentFlowDataForDidValidator = PaginationResponseValidator.extend({
16720
+ records: ConsentFlowContractDataForDidValidator.array()
16721
+ });
16666
16722
  var ConsentFlowContractQueryValidator = external_exports.object({
16667
16723
  read: external_exports.object({
16668
16724
  anonymize: external_exports.boolean().optional(),
@@ -16723,6 +16779,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16723
16779
  expiresAt: external_exports.string().optional(),
16724
16780
  oneTime: external_exports.boolean().optional(),
16725
16781
  terms: ConsentFlowTermsValidator.optional(),
16782
+ guardianApproval: ConsentFlowGuardianApprovalValidator.optional(),
16726
16783
  id: external_exports.string(),
16727
16784
  action: ConsentFlowTransactionActionValidator,
16728
16785
  date: external_exports.string(),
@@ -16795,7 +16852,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16795
16852
  "APP_NOTIFICATION",
16796
16853
  "CREDENTIAL_REVOKED",
16797
16854
  "CREDENTIAL_SUSPENDED",
16798
- "CREDENTIAL_UNSUSPENDED"
16855
+ "CREDENTIAL_UNSUSPENDED",
16856
+ "CREDENTIAL_REFRESHED"
16799
16857
  ]);
16800
16858
  var LCNNotificationMessageValidator = external_exports.object({
16801
16859
  title: external_exports.string().optional(),
@@ -16927,12 +16985,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16927
16985
  });
16928
16986
  var InboxCredentialValidator = external_exports.object({
16929
16987
  id: external_exports.string(),
16930
- credential: external_exports.string(),
16988
+ credential: external_exports.string().optional(),
16931
16989
  isSigned: external_exports.boolean(),
16932
16990
  currentStatus: LCNInboxStatusEnumValidator,
16933
16991
  isAccepted: external_exports.boolean().optional(),
16934
16992
  expiresAt: external_exports.string(),
16935
16993
  createdAt: external_exports.string(),
16994
+ finalizedAt: external_exports.string().optional(),
16995
+ expiredAt: external_exports.string().optional(),
16996
+ credentialName: external_exports.string().optional(),
16997
+ achievementType: external_exports.string().optional(),
16936
16998
  issuerDid: external_exports.string(),
16937
16999
  webhookUrl: external_exports.string().optional(),
16938
17000
  boostUri: external_exports.string().optional(),
@@ -16986,7 +17048,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
16986
17048
  "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
17049
  ),
16988
17050
  webhookUrl: external_exports.string().url().optional().describe("The webhook URL to receive credential issuance events."),
16989
- expiresInDays: external_exports.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
17051
+ expiresInDays: external_exports.number().int().min(1).max(720).optional().describe(
17052
+ "How many days the encrypted inbox payload remains claimable. This does not change the credential validity period."
17053
+ ),
16990
17054
  templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional().describe(
16991
17055
  "Template data to render into the boost credential template using Mustache syntax. Only used when boostUri is provided."
16992
17056
  ),
@@ -17049,6 +17113,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17049
17113
  credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).or(CredentialNameRefValidator).describe("The credential to issue, or a { name } reference to resolve a boost template."),
17050
17114
  configuration: external_exports.object({
17051
17115
  publishableKey: external_exports.string(),
17116
+ expiresInDays: external_exports.number().int().min(1).max(720).optional().describe(
17117
+ "Inbox claim window in days. Defaults to 720; use a shorter window for sensitive records."
17118
+ ),
17052
17119
  signingAuthorityName: external_exports.string().optional(),
17053
17120
  listingId: external_exports.string().optional(),
17054
17121
  listingSlug: external_exports.string().optional()
@@ -17686,6 +17753,191 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
17686
17753
  const result = inAppMessagesFlagValidator.safeParse(raw);
17687
17754
  return result.success ? result.data : EMPTY_IN_APP_MESSAGES_FLAG;
17688
17755
  }, "parseInAppMessagesFlag");
17756
+ var LearnCardRefreshAuthorizationValidator = external_exports.object({ type: external_exports.literal("LearnCardDIDAuth") }).catchall(external_exports.any());
17757
+ var ManagedCredentialRefreshServiceValidator = external_exports.object({
17758
+ id: external_exports.string().min(1),
17759
+ type: external_exports.literal("LearnCardCredentialRefresh2026"),
17760
+ authorization: LearnCardRefreshAuthorizationValidator.optional()
17761
+ }).catchall(external_exports.any());
17762
+ var StandardCredentialRefreshServiceValidator = external_exports.object({
17763
+ id: external_exports.string().min(1),
17764
+ type: external_exports.literal("1EdTechCredentialRefresh")
17765
+ }).catchall(external_exports.any());
17766
+ var SupportedCredentialRefreshServiceValidator = external_exports.union([
17767
+ ManagedCredentialRefreshServiceValidator,
17768
+ StandardCredentialRefreshServiceValidator
17769
+ ]);
17770
+ var AllocateCredentialRefreshInputValidator = external_exports.object({
17771
+ holder: external_exports.object({
17772
+ profileId: external_exports.string().optional(),
17773
+ did: external_exports.string().min(1)
17774
+ }),
17775
+ credentialId: external_exports.string().min(1)
17776
+ });
17777
+ var AllocateCredentialRefreshResultValidator = external_exports.object({
17778
+ refreshId: external_exports.string().min(1),
17779
+ refreshService: ManagedCredentialRefreshServiceValidator.extend({
17780
+ authorization: LearnCardRefreshAuthorizationValidator
17781
+ })
17782
+ });
17783
+ var CredentialRefreshSigningModeValidator = external_exports.enum(["issuer-signed", "signing-authority"]);
17784
+ var PublishCredentialRefreshBaseFields = {
17785
+ refreshId: external_exports.string().min(1),
17786
+ notifyHolder: external_exports.boolean().optional(),
17787
+ updateSummary: external_exports.string().optional(),
17788
+ idempotencyKey: external_exports.string().optional()
17789
+ };
17790
+ var PublishIssuerSignedRefreshValidator = external_exports.object({
17791
+ ...PublishCredentialRefreshBaseFields,
17792
+ mode: external_exports.literal("issuer-signed"),
17793
+ signedCredential: VCValidator
17794
+ });
17795
+ var PublishSigningAuthorityRefreshValidator = external_exports.object({
17796
+ ...PublishCredentialRefreshBaseFields,
17797
+ mode: external_exports.literal("signing-authority"),
17798
+ credential: UnsignedVCValidator,
17799
+ signingAuthority: external_exports.object({
17800
+ type: external_exports.string().min(1)
17801
+ }).catchall(external_exports.any())
17802
+ });
17803
+ var PublishCredentialRefreshInputValidator = external_exports.object({
17804
+ ...PublishCredentialRefreshBaseFields,
17805
+ mode: CredentialRefreshSigningModeValidator,
17806
+ signedCredential: VCValidator.optional(),
17807
+ credential: UnsignedVCValidator.optional(),
17808
+ signingAuthority: external_exports.object({
17809
+ type: external_exports.string().min(1)
17810
+ }).catchall(external_exports.any()).optional()
17811
+ }).superRefine((input, ctx) => {
17812
+ if (input.mode === "issuer-signed" && !input.signedCredential) {
17813
+ ctx.addIssue({
17814
+ code: "custom",
17815
+ path: ["signedCredential"],
17816
+ message: "signedCredential is required for issuer-signed publication"
17817
+ });
17818
+ }
17819
+ if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
17820
+ ctx.addIssue({
17821
+ code: "custom",
17822
+ path: ["mode"],
17823
+ message: "issuer-signed publication cannot include signing-authority fields"
17824
+ });
17825
+ }
17826
+ if (input.mode === "signing-authority") {
17827
+ if (input.signedCredential !== void 0) {
17828
+ ctx.addIssue({
17829
+ code: "custom",
17830
+ path: ["signedCredential"],
17831
+ message: "signing-authority publication cannot include signedCredential"
17832
+ });
17833
+ }
17834
+ if (!input.credential) {
17835
+ ctx.addIssue({
17836
+ code: "custom",
17837
+ path: ["credential"],
17838
+ message: "credential is required for signing-authority publication"
17839
+ });
17840
+ }
17841
+ if (!input.signingAuthority) {
17842
+ ctx.addIssue({
17843
+ code: "custom",
17844
+ path: ["signingAuthority"],
17845
+ message: "signingAuthority is required for signing-authority publication"
17846
+ });
17847
+ }
17848
+ }
17849
+ });
17850
+ var PublishCredentialRefreshNotificationValidator = external_exports.enum([
17851
+ "queued",
17852
+ "suppressed",
17853
+ "not-applicable",
17854
+ /** Publication succeeded, but the post-commit notification enqueue must be retried. */
17855
+ "delivery-failed"
17856
+ ]);
17857
+ var PublishCredentialRefreshResultValidator = external_exports.object({
17858
+ refreshId: external_exports.string().min(1),
17859
+ version: external_exports.number().int().positive(),
17860
+ publishedAt: external_exports.string().min(1),
17861
+ notification: PublishCredentialRefreshNotificationValidator
17862
+ });
17863
+ var CredentialRefreshVersionMetadataValidator = external_exports.object({
17864
+ version: external_exports.number().int().positive(),
17865
+ publishedAt: external_exports.string().min(1),
17866
+ effectiveAt: external_exports.string().optional(),
17867
+ etag: external_exports.string().optional(),
17868
+ signingMode: CredentialRefreshSigningModeValidator.optional(),
17869
+ updateSummary: external_exports.string().optional()
17870
+ });
17871
+ var GetCredentialRefreshHistoryInputValidator = external_exports.object({
17872
+ refreshId: external_exports.string().min(1),
17873
+ cursor: external_exports.string().optional(),
17874
+ limit: external_exports.number().int().positive().optional()
17875
+ });
17876
+ var GetCredentialRefreshHistoryResultValidator = external_exports.object({
17877
+ records: CredentialRefreshVersionMetadataValidator.array(),
17878
+ hasMore: external_exports.boolean(),
17879
+ cursor: external_exports.string().optional()
17880
+ });
17881
+ var CredentialRefreshChallengeValidator = external_exports.object({
17882
+ challenge: external_exports.string().min(1),
17883
+ expiresAt: external_exports.string().min(1),
17884
+ domain: external_exports.string().optional(),
17885
+ scheme: external_exports.literal("LearnCardDIDAuth").optional()
17886
+ });
17887
+ var PublicCredentialRefreshEnvelopeValidator = external_exports.object({
17888
+ format: external_exports.literal("vc"),
17889
+ credential: VCValidator,
17890
+ etag: external_exports.string().optional()
17891
+ });
17892
+ var JweCredentialRefreshEnvelopeValidator = external_exports.object({
17893
+ format: external_exports.literal("jwe"),
17894
+ jwe: JWEValidator,
17895
+ etag: external_exports.string().optional(),
17896
+ /** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
17897
+ version: external_exports.number().int().positive().optional()
17898
+ });
17899
+ var CredentialRefreshResponseEnvelopeValidator = external_exports.discriminatedUnion("format", [
17900
+ PublicCredentialRefreshEnvelopeValidator,
17901
+ JweCredentialRefreshEnvelopeValidator
17902
+ ]);
17903
+ var CredentialRefreshFailureCodeValidator = external_exports.enum([
17904
+ "UNAVAILABLE",
17905
+ "TIMEOUT",
17906
+ "UNSUPPORTED_SERVICE",
17907
+ "UNAUTHORIZED",
17908
+ "MALFORMED_RESPONSE",
17909
+ "INVALID_PROOF",
17910
+ "ISSUER_MISMATCH",
17911
+ "ID_MISMATCH",
17912
+ "ROLLBACK",
17913
+ "REVOKED",
17914
+ "UNSAFE_ENDPOINT"
17915
+ ]);
17916
+ var CredentialRefreshUpdatedResultValidator = external_exports.object({
17917
+ status: external_exports.literal("updated"),
17918
+ credential: VCValidator,
17919
+ etag: external_exports.string().optional(),
17920
+ managedVersion: external_exports.number().int().positive().optional()
17921
+ });
17922
+ var CredentialRefreshUnchangedResultValidator = external_exports.object({
17923
+ status: external_exports.literal("unchanged"),
17924
+ checkedAt: external_exports.string().min(1),
17925
+ etag: external_exports.string().optional()
17926
+ });
17927
+ var CredentialRefreshUnsupportedResultValidator = external_exports.object({
17928
+ status: external_exports.literal("unsupported")
17929
+ });
17930
+ var CredentialRefreshFailedResultValidator = external_exports.object({
17931
+ status: external_exports.literal("failed"),
17932
+ code: CredentialRefreshFailureCodeValidator,
17933
+ retryable: external_exports.boolean()
17934
+ });
17935
+ var CredentialRefreshResultValidator = external_exports.discriminatedUnion("status", [
17936
+ CredentialRefreshUpdatedResultValidator,
17937
+ CredentialRefreshUnchangedResultValidator,
17938
+ CredentialRefreshUnsupportedResultValidator,
17939
+ CredentialRefreshFailedResultValidator
17940
+ ]);
17689
17941
  }
17690
17942
  });
17691
17943