@learncard/render-method-plugin 5.0.0 → 6.0.0

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.
@@ -15993,6 +15993,8 @@ var require_types_cjs_development = __commonJS({
15993
15993
  AgeRatingValidator: /* @__PURE__ */ __name2(() => AgeRatingValidator2, "AgeRatingValidator"),
15994
15994
  AlignmentTargetTypeValidator: /* @__PURE__ */ __name2(() => AlignmentTargetTypeValidator2, "AlignmentTargetTypeValidator"),
15995
15995
  AlignmentValidator: /* @__PURE__ */ __name2(() => AlignmentValidator2, "AlignmentValidator"),
15996
+ AllocateCredentialRefreshInputValidator: /* @__PURE__ */ __name2(() => AllocateCredentialRefreshInputValidator2, "AllocateCredentialRefreshInputValidator"),
15997
+ AllocateCredentialRefreshResultValidator: /* @__PURE__ */ __name2(() => AllocateCredentialRefreshResultValidator2, "AllocateCredentialRefreshResultValidator"),
15996
15998
  AllocateCredentialStatusInputValidator: /* @__PURE__ */ __name2(() => AllocateCredentialStatusInputValidator2, "AllocateCredentialStatusInputValidator"),
15997
15999
  AllocatedBitstringStatusListEntryValidator: /* @__PURE__ */ __name2(() => AllocatedBitstringStatusListEntryValidator2, "AllocatedBitstringStatusListEntryValidator"),
15998
16000
  AllowConnectionRequestsEnum: /* @__PURE__ */ __name2(() => AllowConnectionRequestsEnum2, "AllowConnectionRequestsEnum"),
@@ -16074,6 +16076,16 @@ var require_types_cjs_development = __commonJS({
16074
16076
  CredentialInfoValidator: /* @__PURE__ */ __name2(() => CredentialInfoValidator2, "CredentialInfoValidator"),
16075
16077
  CredentialNameRefValidator: /* @__PURE__ */ __name2(() => CredentialNameRefValidator2, "CredentialNameRefValidator"),
16076
16078
  CredentialRecordValidator: /* @__PURE__ */ __name2(() => CredentialRecordValidator2, "CredentialRecordValidator"),
16079
+ CredentialRefreshChallengeValidator: /* @__PURE__ */ __name2(() => CredentialRefreshChallengeValidator2, "CredentialRefreshChallengeValidator"),
16080
+ CredentialRefreshFailedResultValidator: /* @__PURE__ */ __name2(() => CredentialRefreshFailedResultValidator2, "CredentialRefreshFailedResultValidator"),
16081
+ CredentialRefreshFailureCodeValidator: /* @__PURE__ */ __name2(() => CredentialRefreshFailureCodeValidator2, "CredentialRefreshFailureCodeValidator"),
16082
+ CredentialRefreshResponseEnvelopeValidator: /* @__PURE__ */ __name2(() => CredentialRefreshResponseEnvelopeValidator2, "CredentialRefreshResponseEnvelopeValidator"),
16083
+ CredentialRefreshResultValidator: /* @__PURE__ */ __name2(() => CredentialRefreshResultValidator2, "CredentialRefreshResultValidator"),
16084
+ CredentialRefreshSigningModeValidator: /* @__PURE__ */ __name2(() => CredentialRefreshSigningModeValidator2, "CredentialRefreshSigningModeValidator"),
16085
+ CredentialRefreshUnchangedResultValidator: /* @__PURE__ */ __name2(() => CredentialRefreshUnchangedResultValidator2, "CredentialRefreshUnchangedResultValidator"),
16086
+ CredentialRefreshUnsupportedResultValidator: /* @__PURE__ */ __name2(() => CredentialRefreshUnsupportedResultValidator2, "CredentialRefreshUnsupportedResultValidator"),
16087
+ CredentialRefreshUpdatedResultValidator: /* @__PURE__ */ __name2(() => CredentialRefreshUpdatedResultValidator2, "CredentialRefreshUpdatedResultValidator"),
16088
+ CredentialRefreshVersionMetadataValidator: /* @__PURE__ */ __name2(() => CredentialRefreshVersionMetadataValidator2, "CredentialRefreshVersionMetadataValidator"),
16077
16089
  CredentialSchemaValidator: /* @__PURE__ */ __name2(() => CredentialSchemaValidator2, "CredentialSchemaValidator"),
16078
16090
  CredentialStatusValidator: /* @__PURE__ */ __name2(() => CredentialStatusValidator2, "CredentialStatusValidator"),
16079
16091
  CredentialSubjectValidator: /* @__PURE__ */ __name2(() => CredentialSubjectValidator2, "CredentialSubjectValidator"),
@@ -16094,6 +16106,8 @@ var require_types_cjs_development = __commonJS({
16094
16106
  GeoCoordinatesValidator: /* @__PURE__ */ __name2(() => GeoCoordinatesValidator2, "GeoCoordinatesValidator"),
16095
16107
  GetCounterEventValidator: /* @__PURE__ */ __name2(() => GetCounterEventValidator2, "GetCounterEventValidator"),
16096
16108
  GetCountersEventValidator: /* @__PURE__ */ __name2(() => GetCountersEventValidator2, "GetCountersEventValidator"),
16109
+ GetCredentialRefreshHistoryInputValidator: /* @__PURE__ */ __name2(() => GetCredentialRefreshHistoryInputValidator2, "GetCredentialRefreshHistoryInputValidator"),
16110
+ GetCredentialRefreshHistoryResultValidator: /* @__PURE__ */ __name2(() => GetCredentialRefreshHistoryResultValidator2, "GetCredentialRefreshHistoryResultValidator"),
16097
16111
  GetFullSkillTreeInputValidator: /* @__PURE__ */ __name2(() => GetFullSkillTreeInputValidator2, "GetFullSkillTreeInputValidator"),
16098
16112
  GetFullSkillTreeResultValidator: /* @__PURE__ */ __name2(() => GetFullSkillTreeResultValidator2, "GetFullSkillTreeResultValidator"),
16099
16113
  GetSkillPathInputValidator: /* @__PURE__ */ __name2(() => GetSkillPathInputValidator2, "GetSkillPathInputValidator"),
@@ -16118,6 +16132,7 @@ var require_types_cjs_development = __commonJS({
16118
16132
  JWEValidator: /* @__PURE__ */ __name2(() => JWEValidator2, "JWEValidator"),
16119
16133
  JWKValidator: /* @__PURE__ */ __name2(() => JWKValidator2, "JWKValidator"),
16120
16134
  JWKWithPrivateKeyValidator: /* @__PURE__ */ __name2(() => JWKWithPrivateKeyValidator2, "JWKWithPrivateKeyValidator"),
16135
+ JweCredentialRefreshEnvelopeValidator: /* @__PURE__ */ __name2(() => JweCredentialRefreshEnvelopeValidator2, "JweCredentialRefreshEnvelopeValidator"),
16121
16136
  KnownAchievementTypeValidator: /* @__PURE__ */ __name2(() => KnownAchievementTypeValidator2, "KnownAchievementTypeValidator"),
16122
16137
  LCNAuthedProfileValidator: /* @__PURE__ */ __name2(() => LCNAuthedProfileValidator2, "LCNAuthedProfileValidator"),
16123
16138
  LCNBoostClaimLinkOptionsValidator: /* @__PURE__ */ __name2(() => LCNBoostClaimLinkOptionsValidator2, "LCNBoostClaimLinkOptionsValidator"),
@@ -16155,7 +16170,9 @@ var require_types_cjs_development = __commonJS({
16155
16170
  LCNSigningAuthorityValidator: /* @__PURE__ */ __name2(() => LCNSigningAuthorityValidator2, "LCNSigningAuthorityValidator"),
16156
16171
  LCNVisibleProfileValidator: /* @__PURE__ */ __name2(() => LCNVisibleProfileValidator2, "LCNVisibleProfileValidator"),
16157
16172
  LaunchTypeValidator: /* @__PURE__ */ __name2(() => LaunchTypeValidator2, "LaunchTypeValidator"),
16173
+ LearnCardRefreshAuthorizationValidator: /* @__PURE__ */ __name2(() => LearnCardRefreshAuthorizationValidator2, "LearnCardRefreshAuthorizationValidator"),
16158
16174
  LinkProviderFrameworkInputValidator: /* @__PURE__ */ __name2(() => LinkProviderFrameworkInputValidator2, "LinkProviderFrameworkInputValidator"),
16175
+ ManagedCredentialRefreshServiceValidator: /* @__PURE__ */ __name2(() => ManagedCredentialRefreshServiceValidator2, "ManagedCredentialRefreshServiceValidator"),
16159
16176
  PaginatedAppStoreListingsValidator: /* @__PURE__ */ __name2(() => PaginatedAppStoreListingsValidator2, "PaginatedAppStoreListingsValidator"),
16160
16177
  PaginatedBoostRecipientsValidator: /* @__PURE__ */ __name2(() => PaginatedBoostRecipientsValidator2, "PaginatedBoostRecipientsValidator"),
16161
16178
  PaginatedBoostRecipientsWithChildrenValidator: /* @__PURE__ */ __name2(() => PaginatedBoostRecipientsWithChildrenValidator2, "PaginatedBoostRecipientsWithChildrenValidator"),
@@ -16185,6 +16202,12 @@ var require_types_cjs_development = __commonJS({
16185
16202
  ProfileVisibilityEnum: /* @__PURE__ */ __name2(() => ProfileVisibilityEnum2, "ProfileVisibilityEnum"),
16186
16203
  PromotionLevelValidator: /* @__PURE__ */ __name2(() => PromotionLevelValidator2, "PromotionLevelValidator"),
16187
16204
  ProofValidator: /* @__PURE__ */ __name2(() => ProofValidator2, "ProofValidator"),
16205
+ PublicCredentialRefreshEnvelopeValidator: /* @__PURE__ */ __name2(() => PublicCredentialRefreshEnvelopeValidator2, "PublicCredentialRefreshEnvelopeValidator"),
16206
+ PublishCredentialRefreshInputValidator: /* @__PURE__ */ __name2(() => PublishCredentialRefreshInputValidator2, "PublishCredentialRefreshInputValidator"),
16207
+ PublishCredentialRefreshNotificationValidator: /* @__PURE__ */ __name2(() => PublishCredentialRefreshNotificationValidator2, "PublishCredentialRefreshNotificationValidator"),
16208
+ PublishCredentialRefreshResultValidator: /* @__PURE__ */ __name2(() => PublishCredentialRefreshResultValidator2, "PublishCredentialRefreshResultValidator"),
16209
+ PublishIssuerSignedRefreshValidator: /* @__PURE__ */ __name2(() => PublishIssuerSignedRefreshValidator2, "PublishIssuerSignedRefreshValidator"),
16210
+ PublishSigningAuthorityRefreshValidator: /* @__PURE__ */ __name2(() => PublishSigningAuthorityRefreshValidator2, "PublishSigningAuthorityRefreshValidator"),
16188
16211
  RefreshServiceValidator: /* @__PURE__ */ __name2(() => RefreshServiceValidator2, "RefreshServiceValidator"),
16189
16212
  RegExpValidator: /* @__PURE__ */ __name2(() => RegExpValidator2, "RegExpValidator"),
16190
16213
  RelatedValidator: /* @__PURE__ */ __name2(() => RelatedValidator2, "RelatedValidator"),
@@ -16225,11 +16248,13 @@ var require_types_cjs_development = __commonJS({
16225
16248
  SkillTreeNodeInputValidator: /* @__PURE__ */ __name2(() => SkillTreeNodeInputValidator2, "SkillTreeNodeInputValidator"),
16226
16249
  SkillTreeNodeValidator: /* @__PURE__ */ __name2(() => SkillTreeNodeValidator2, "SkillTreeNodeValidator"),
16227
16250
  SkillValidator: /* @__PURE__ */ __name2(() => SkillValidator2, "SkillValidator"),
16251
+ StandardCredentialRefreshServiceValidator: /* @__PURE__ */ __name2(() => StandardCredentialRefreshServiceValidator2, "StandardCredentialRefreshServiceValidator"),
16228
16252
  StatusCheckEntryValidator: /* @__PURE__ */ __name2(() => StatusCheckEntryValidator2, "StatusCheckEntryValidator"),
16229
16253
  StoredCredentialEnvelopeValidator: /* @__PURE__ */ __name2(() => StoredCredentialEnvelopeValidator2, "StoredCredentialEnvelopeValidator"),
16230
16254
  StringQuery: /* @__PURE__ */ __name2(() => StringQuery2, "StringQuery"),
16231
16255
  SummaryCredentialDataValidator: /* @__PURE__ */ __name2(() => SummaryCredentialDataValidator2, "SummaryCredentialDataValidator"),
16232
16256
  SummaryCredentialKeywordValidator: /* @__PURE__ */ __name2(() => SummaryCredentialKeywordValidator2, "SummaryCredentialKeywordValidator"),
16257
+ SupportedCredentialRefreshServiceValidator: /* @__PURE__ */ __name2(() => SupportedCredentialRefreshServiceValidator2, "SupportedCredentialRefreshServiceValidator"),
16233
16258
  SyncFrameworkInputValidator: /* @__PURE__ */ __name2(() => SyncFrameworkInputValidator2, "SyncFrameworkInputValidator"),
16234
16259
  TagValidator: /* @__PURE__ */ __name2(() => TagValidator2, "TagValidator"),
16235
16260
  TemplateRenderMethodValidator: /* @__PURE__ */ __name2(() => TemplateRenderMethodValidator2, "TemplateRenderMethodValidator"),
@@ -32826,7 +32851,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32826
32851
  webhookUrl: external_exports2.string().url().optional().describe("Webhook URL to receive claim notifications"),
32827
32852
  suppressDelivery: external_exports2.boolean().optional().describe("If true, returns claimUrl without sending email/SMS"),
32828
32853
  branding: SendBrandingOptionsValidator2.optional().describe("Branding for email/SMS delivery"),
32829
- guardianEmail: external_exports2.string().email().optional().describe("Guardian email that must approve before student can claim")
32854
+ guardianEmail: external_exports2.string().email().optional().describe("Guardian email that must approve before student can claim"),
32855
+ expiresInDays: external_exports2.number().int().min(1).max(720).optional().describe(
32856
+ "How many days the credential stays claimable in the Universal Inbox (default 30). Does not change the credential validity period."
32857
+ )
32830
32858
  });
32831
32859
  var SendBoostInputValidator2 = external_exports2.object({
32832
32860
  type: external_exports2.literal("boost"),
@@ -33121,7 +33149,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33121
33149
  "APP_NOTIFICATION",
33122
33150
  "CREDENTIAL_REVOKED",
33123
33151
  "CREDENTIAL_SUSPENDED",
33124
- "CREDENTIAL_UNSUSPENDED"
33152
+ "CREDENTIAL_UNSUSPENDED",
33153
+ "CREDENTIAL_REFRESHED"
33125
33154
  ]);
33126
33155
  var LCNNotificationMessageValidator2 = external_exports2.object({
33127
33156
  title: external_exports2.string().optional(),
@@ -33253,12 +33282,16 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33253
33282
  });
33254
33283
  var InboxCredentialValidator2 = external_exports2.object({
33255
33284
  id: external_exports2.string(),
33256
- credential: external_exports2.string(),
33285
+ credential: external_exports2.string().optional(),
33257
33286
  isSigned: external_exports2.boolean(),
33258
33287
  currentStatus: LCNInboxStatusEnumValidator2,
33259
33288
  isAccepted: external_exports2.boolean().optional(),
33260
33289
  expiresAt: external_exports2.string(),
33261
33290
  createdAt: external_exports2.string(),
33291
+ finalizedAt: external_exports2.string().optional(),
33292
+ expiredAt: external_exports2.string().optional(),
33293
+ credentialName: external_exports2.string().optional(),
33294
+ achievementType: external_exports2.string().optional(),
33262
33295
  issuerDid: external_exports2.string(),
33263
33296
  webhookUrl: external_exports2.string().optional(),
33264
33297
  boostUri: external_exports2.string().optional(),
@@ -33312,7 +33345,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33312
33345
  "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."
33313
33346
  ),
33314
33347
  webhookUrl: external_exports2.string().url().optional().describe("The webhook URL to receive credential issuance events."),
33315
- expiresInDays: external_exports2.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
33348
+ expiresInDays: external_exports2.number().int().min(1).max(720).optional().describe(
33349
+ "How many days the encrypted inbox payload remains claimable. This does not change the credential validity period."
33350
+ ),
33316
33351
  templateData: external_exports2.record(external_exports2.string(), external_exports2.unknown()).optional().describe(
33317
33352
  "Template data to render into the boost credential template using Mustache syntax. Only used when boostUri is provided."
33318
33353
  ),
@@ -33375,6 +33410,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33375
33410
  credential: VCValidator2.or(VPValidator2).or(UnsignedVCValidator2).or(CredentialNameRefValidator2).describe("The credential to issue, or a { name } reference to resolve a boost template."),
33376
33411
  configuration: external_exports2.object({
33377
33412
  publishableKey: external_exports2.string(),
33413
+ expiresInDays: external_exports2.number().int().min(1).max(720).optional().describe(
33414
+ "Inbox claim window in days. Defaults to 720; use a shorter window for sensitive records."
33415
+ ),
33378
33416
  signingAuthorityName: external_exports2.string().optional(),
33379
33417
  listingId: external_exports2.string().optional(),
33380
33418
  listingSlug: external_exports2.string().optional()
@@ -34006,6 +34044,191 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
34006
34044
  const result = inAppMessagesFlagValidator2.safeParse(raw);
34007
34045
  return result.success ? result.data : EMPTY_IN_APP_MESSAGES_FLAG;
34008
34046
  }, "parseInAppMessagesFlag");
34047
+ var LearnCardRefreshAuthorizationValidator2 = external_exports2.object({ type: external_exports2.literal("LearnCardDIDAuth") }).catchall(external_exports2.any());
34048
+ var ManagedCredentialRefreshServiceValidator2 = external_exports2.object({
34049
+ id: external_exports2.string().min(1),
34050
+ type: external_exports2.literal("LearnCardCredentialRefresh2026"),
34051
+ authorization: LearnCardRefreshAuthorizationValidator2.optional()
34052
+ }).catchall(external_exports2.any());
34053
+ var StandardCredentialRefreshServiceValidator2 = external_exports2.object({
34054
+ id: external_exports2.string().min(1),
34055
+ type: external_exports2.literal("1EdTechCredentialRefresh")
34056
+ }).catchall(external_exports2.any());
34057
+ var SupportedCredentialRefreshServiceValidator2 = external_exports2.union([
34058
+ ManagedCredentialRefreshServiceValidator2,
34059
+ StandardCredentialRefreshServiceValidator2
34060
+ ]);
34061
+ var AllocateCredentialRefreshInputValidator2 = external_exports2.object({
34062
+ holder: external_exports2.object({
34063
+ profileId: external_exports2.string().optional(),
34064
+ did: external_exports2.string().min(1)
34065
+ }),
34066
+ credentialId: external_exports2.string().min(1)
34067
+ });
34068
+ var AllocateCredentialRefreshResultValidator2 = external_exports2.object({
34069
+ refreshId: external_exports2.string().min(1),
34070
+ refreshService: ManagedCredentialRefreshServiceValidator2.extend({
34071
+ authorization: LearnCardRefreshAuthorizationValidator2
34072
+ })
34073
+ });
34074
+ var CredentialRefreshSigningModeValidator2 = external_exports2.enum(["issuer-signed", "signing-authority"]);
34075
+ var PublishCredentialRefreshBaseFields2 = {
34076
+ refreshId: external_exports2.string().min(1),
34077
+ notifyHolder: external_exports2.boolean().optional(),
34078
+ updateSummary: external_exports2.string().optional(),
34079
+ idempotencyKey: external_exports2.string().optional()
34080
+ };
34081
+ var PublishIssuerSignedRefreshValidator2 = external_exports2.object({
34082
+ ...PublishCredentialRefreshBaseFields2,
34083
+ mode: external_exports2.literal("issuer-signed"),
34084
+ signedCredential: VCValidator2
34085
+ });
34086
+ var PublishSigningAuthorityRefreshValidator2 = external_exports2.object({
34087
+ ...PublishCredentialRefreshBaseFields2,
34088
+ mode: external_exports2.literal("signing-authority"),
34089
+ credential: UnsignedVCValidator2,
34090
+ signingAuthority: external_exports2.object({
34091
+ type: external_exports2.string().min(1)
34092
+ }).catchall(external_exports2.any())
34093
+ });
34094
+ var PublishCredentialRefreshInputValidator2 = external_exports2.object({
34095
+ ...PublishCredentialRefreshBaseFields2,
34096
+ mode: CredentialRefreshSigningModeValidator2,
34097
+ signedCredential: VCValidator2.optional(),
34098
+ credential: UnsignedVCValidator2.optional(),
34099
+ signingAuthority: external_exports2.object({
34100
+ type: external_exports2.string().min(1)
34101
+ }).catchall(external_exports2.any()).optional()
34102
+ }).superRefine((input, ctx) => {
34103
+ if (input.mode === "issuer-signed" && !input.signedCredential) {
34104
+ ctx.addIssue({
34105
+ code: "custom",
34106
+ path: ["signedCredential"],
34107
+ message: "signedCredential is required for issuer-signed publication"
34108
+ });
34109
+ }
34110
+ if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
34111
+ ctx.addIssue({
34112
+ code: "custom",
34113
+ path: ["mode"],
34114
+ message: "issuer-signed publication cannot include signing-authority fields"
34115
+ });
34116
+ }
34117
+ if (input.mode === "signing-authority") {
34118
+ if (input.signedCredential !== void 0) {
34119
+ ctx.addIssue({
34120
+ code: "custom",
34121
+ path: ["signedCredential"],
34122
+ message: "signing-authority publication cannot include signedCredential"
34123
+ });
34124
+ }
34125
+ if (!input.credential) {
34126
+ ctx.addIssue({
34127
+ code: "custom",
34128
+ path: ["credential"],
34129
+ message: "credential is required for signing-authority publication"
34130
+ });
34131
+ }
34132
+ if (!input.signingAuthority) {
34133
+ ctx.addIssue({
34134
+ code: "custom",
34135
+ path: ["signingAuthority"],
34136
+ message: "signingAuthority is required for signing-authority publication"
34137
+ });
34138
+ }
34139
+ }
34140
+ });
34141
+ var PublishCredentialRefreshNotificationValidator2 = external_exports2.enum([
34142
+ "queued",
34143
+ "suppressed",
34144
+ "not-applicable",
34145
+ /** Publication succeeded, but the post-commit notification enqueue must be retried. */
34146
+ "delivery-failed"
34147
+ ]);
34148
+ var PublishCredentialRefreshResultValidator2 = external_exports2.object({
34149
+ refreshId: external_exports2.string().min(1),
34150
+ version: external_exports2.number().int().positive(),
34151
+ publishedAt: external_exports2.string().min(1),
34152
+ notification: PublishCredentialRefreshNotificationValidator2
34153
+ });
34154
+ var CredentialRefreshVersionMetadataValidator2 = external_exports2.object({
34155
+ version: external_exports2.number().int().positive(),
34156
+ publishedAt: external_exports2.string().min(1),
34157
+ effectiveAt: external_exports2.string().optional(),
34158
+ etag: external_exports2.string().optional(),
34159
+ signingMode: CredentialRefreshSigningModeValidator2.optional(),
34160
+ updateSummary: external_exports2.string().optional()
34161
+ });
34162
+ var GetCredentialRefreshHistoryInputValidator2 = external_exports2.object({
34163
+ refreshId: external_exports2.string().min(1),
34164
+ cursor: external_exports2.string().optional(),
34165
+ limit: external_exports2.number().int().positive().optional()
34166
+ });
34167
+ var GetCredentialRefreshHistoryResultValidator2 = external_exports2.object({
34168
+ records: CredentialRefreshVersionMetadataValidator2.array(),
34169
+ hasMore: external_exports2.boolean(),
34170
+ cursor: external_exports2.string().optional()
34171
+ });
34172
+ var CredentialRefreshChallengeValidator2 = external_exports2.object({
34173
+ challenge: external_exports2.string().min(1),
34174
+ expiresAt: external_exports2.string().min(1),
34175
+ domain: external_exports2.string().optional(),
34176
+ scheme: external_exports2.literal("LearnCardDIDAuth").optional()
34177
+ });
34178
+ var PublicCredentialRefreshEnvelopeValidator2 = external_exports2.object({
34179
+ format: external_exports2.literal("vc"),
34180
+ credential: VCValidator2,
34181
+ etag: external_exports2.string().optional()
34182
+ });
34183
+ var JweCredentialRefreshEnvelopeValidator2 = external_exports2.object({
34184
+ format: external_exports2.literal("jwe"),
34185
+ jwe: JWEValidator2,
34186
+ etag: external_exports2.string().optional(),
34187
+ /** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
34188
+ version: external_exports2.number().int().positive().optional()
34189
+ });
34190
+ var CredentialRefreshResponseEnvelopeValidator2 = external_exports2.discriminatedUnion("format", [
34191
+ PublicCredentialRefreshEnvelopeValidator2,
34192
+ JweCredentialRefreshEnvelopeValidator2
34193
+ ]);
34194
+ var CredentialRefreshFailureCodeValidator2 = external_exports2.enum([
34195
+ "UNAVAILABLE",
34196
+ "TIMEOUT",
34197
+ "UNSUPPORTED_SERVICE",
34198
+ "UNAUTHORIZED",
34199
+ "MALFORMED_RESPONSE",
34200
+ "INVALID_PROOF",
34201
+ "ISSUER_MISMATCH",
34202
+ "ID_MISMATCH",
34203
+ "ROLLBACK",
34204
+ "REVOKED",
34205
+ "UNSAFE_ENDPOINT"
34206
+ ]);
34207
+ var CredentialRefreshUpdatedResultValidator2 = external_exports2.object({
34208
+ status: external_exports2.literal("updated"),
34209
+ credential: VCValidator2,
34210
+ etag: external_exports2.string().optional(),
34211
+ managedVersion: external_exports2.number().int().positive().optional()
34212
+ });
34213
+ var CredentialRefreshUnchangedResultValidator2 = external_exports2.object({
34214
+ status: external_exports2.literal("unchanged"),
34215
+ checkedAt: external_exports2.string().min(1),
34216
+ etag: external_exports2.string().optional()
34217
+ });
34218
+ var CredentialRefreshUnsupportedResultValidator2 = external_exports2.object({
34219
+ status: external_exports2.literal("unsupported")
34220
+ });
34221
+ var CredentialRefreshFailedResultValidator2 = external_exports2.object({
34222
+ status: external_exports2.literal("failed"),
34223
+ code: CredentialRefreshFailureCodeValidator2,
34224
+ retryable: external_exports2.boolean()
34225
+ });
34226
+ var CredentialRefreshResultValidator2 = external_exports2.discriminatedUnion("status", [
34227
+ CredentialRefreshUpdatedResultValidator2,
34228
+ CredentialRefreshUnchangedResultValidator2,
34229
+ CredentialRefreshUnsupportedResultValidator2,
34230
+ CredentialRefreshFailedResultValidator2
34231
+ ]);
34009
34232
  }
34010
34233
  });
34011
34234
  var require_dist = __commonJS({
@@ -34018,7 +34241,7 @@ var require_dist = __commonJS({
34018
34241
  }
34019
34242
  }
34020
34243
  });
34021
- var import_types2 = __toESM(require_dist());
34244
+ var import_types3 = __toESM(require_dist());
34022
34245
  var filestack_helpers_exports = {};
34023
34246
  __export2(filestack_helpers_exports, {
34024
34247
  changeQuality: /* @__PURE__ */ __name(() => changeQuality, "changeQuality"),
@@ -34299,7 +34522,8 @@ var ImageWithLoadingStateValdator = external_exports.object({
34299
34522
  image: external_exports.string(),
34300
34523
  loading: external_exports.union([ImageResizingValidator, ImageUploadingValidator]).optional()
34301
34524
  });
34302
- var import_types3 = __toESM(require_dist());
34525
+ var import_types2 = __toESM(require_dist());
34526
+ var import_types22 = __toESM(require_dist());
34303
34527
  var _a4;
34304
34528
  var EnvironmentConfigurationError = (_a4 = class extends Error {
34305
34529
  constructor(message) {
@@ -35233,7 +35457,10 @@ var SendOptionsValidator = external_exports.object({
35233
35457
  webhookUrl: external_exports.string().url().optional().describe("Webhook URL to receive claim notifications"),
35234
35458
  suppressDelivery: external_exports.boolean().optional().describe("If true, returns claimUrl without sending email/SMS"),
35235
35459
  branding: SendBrandingOptionsValidator.optional().describe("Branding for email/SMS delivery"),
35236
- guardianEmail: external_exports.string().email().optional().describe("Guardian email that must approve before student can claim")
35460
+ guardianEmail: external_exports.string().email().optional().describe("Guardian email that must approve before student can claim"),
35461
+ expiresInDays: external_exports.number().int().min(1).max(720).optional().describe(
35462
+ "How many days the credential stays claimable in the Universal Inbox (default 30). Does not change the credential validity period."
35463
+ )
35237
35464
  });
35238
35465
  var SendBoostInputValidator = external_exports.object({
35239
35466
  type: external_exports.literal("boost"),
@@ -35528,7 +35755,8 @@ var LCNNotificationTypeEnumValidator = external_exports.enum([
35528
35755
  "APP_NOTIFICATION",
35529
35756
  "CREDENTIAL_REVOKED",
35530
35757
  "CREDENTIAL_SUSPENDED",
35531
- "CREDENTIAL_UNSUSPENDED"
35758
+ "CREDENTIAL_UNSUSPENDED",
35759
+ "CREDENTIAL_REFRESHED"
35532
35760
  ]);
35533
35761
  var LCNNotificationMessageValidator = external_exports.object({
35534
35762
  title: external_exports.string().optional(),
@@ -35660,12 +35888,16 @@ var CreateContactMethodSessionResponseValidator = external_exports.object({
35660
35888
  });
35661
35889
  var InboxCredentialValidator = external_exports.object({
35662
35890
  id: external_exports.string(),
35663
- credential: external_exports.string(),
35891
+ credential: external_exports.string().optional(),
35664
35892
  isSigned: external_exports.boolean(),
35665
35893
  currentStatus: LCNInboxStatusEnumValidator,
35666
35894
  isAccepted: external_exports.boolean().optional(),
35667
35895
  expiresAt: external_exports.string(),
35668
35896
  createdAt: external_exports.string(),
35897
+ finalizedAt: external_exports.string().optional(),
35898
+ expiredAt: external_exports.string().optional(),
35899
+ credentialName: external_exports.string().optional(),
35900
+ achievementType: external_exports.string().optional(),
35669
35901
  issuerDid: external_exports.string(),
35670
35902
  webhookUrl: external_exports.string().optional(),
35671
35903
  boostUri: external_exports.string().optional(),
@@ -35719,7 +35951,9 @@ var IssueInboxCredentialValidator = external_exports.object({
35719
35951
  "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."
35720
35952
  ),
35721
35953
  webhookUrl: external_exports.string().url().optional().describe("The webhook URL to receive credential issuance events."),
35722
- expiresInDays: external_exports.number().min(1).max(365).optional().describe("The number of days the credential will be valid for."),
35954
+ expiresInDays: external_exports.number().int().min(1).max(720).optional().describe(
35955
+ "How many days the encrypted inbox payload remains claimable. This does not change the credential validity period."
35956
+ ),
35723
35957
  templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional().describe(
35724
35958
  "Template data to render into the boost credential template using Mustache syntax. Only used when boostUri is provided."
35725
35959
  ),
@@ -35782,6 +36016,9 @@ var ClaimInboxCredentialValidator = external_exports.object({
35782
36016
  credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).or(CredentialNameRefValidator).describe("The credential to issue, or a { name } reference to resolve a boost template."),
35783
36017
  configuration: external_exports.object({
35784
36018
  publishableKey: external_exports.string(),
36019
+ expiresInDays: external_exports.number().int().min(1).max(720).optional().describe(
36020
+ "Inbox claim window in days. Defaults to 720; use a shorter window for sensitive records."
36021
+ ),
35785
36022
  signingAuthorityName: external_exports.string().optional(),
35786
36023
  listingId: external_exports.string().optional(),
35787
36024
  listingSlug: external_exports.string().optional()
@@ -36408,6 +36645,191 @@ var inAppMessagesFlagValidator = external_exports.object({
36408
36645
  version: external_exports.number().default(1),
36409
36646
  messages: external_exports.array(inAppMessageValidator).default([])
36410
36647
  }).passthrough();
36648
+ var LearnCardRefreshAuthorizationValidator = external_exports.object({ type: external_exports.literal("LearnCardDIDAuth") }).catchall(external_exports.any());
36649
+ var ManagedCredentialRefreshServiceValidator = external_exports.object({
36650
+ id: external_exports.string().min(1),
36651
+ type: external_exports.literal("LearnCardCredentialRefresh2026"),
36652
+ authorization: LearnCardRefreshAuthorizationValidator.optional()
36653
+ }).catchall(external_exports.any());
36654
+ var StandardCredentialRefreshServiceValidator = external_exports.object({
36655
+ id: external_exports.string().min(1),
36656
+ type: external_exports.literal("1EdTechCredentialRefresh")
36657
+ }).catchall(external_exports.any());
36658
+ var SupportedCredentialRefreshServiceValidator = external_exports.union([
36659
+ ManagedCredentialRefreshServiceValidator,
36660
+ StandardCredentialRefreshServiceValidator
36661
+ ]);
36662
+ var AllocateCredentialRefreshInputValidator = external_exports.object({
36663
+ holder: external_exports.object({
36664
+ profileId: external_exports.string().optional(),
36665
+ did: external_exports.string().min(1)
36666
+ }),
36667
+ credentialId: external_exports.string().min(1)
36668
+ });
36669
+ var AllocateCredentialRefreshResultValidator = external_exports.object({
36670
+ refreshId: external_exports.string().min(1),
36671
+ refreshService: ManagedCredentialRefreshServiceValidator.extend({
36672
+ authorization: LearnCardRefreshAuthorizationValidator
36673
+ })
36674
+ });
36675
+ var CredentialRefreshSigningModeValidator = external_exports.enum(["issuer-signed", "signing-authority"]);
36676
+ var PublishCredentialRefreshBaseFields = {
36677
+ refreshId: external_exports.string().min(1),
36678
+ notifyHolder: external_exports.boolean().optional(),
36679
+ updateSummary: external_exports.string().optional(),
36680
+ idempotencyKey: external_exports.string().optional()
36681
+ };
36682
+ var PublishIssuerSignedRefreshValidator = external_exports.object({
36683
+ ...PublishCredentialRefreshBaseFields,
36684
+ mode: external_exports.literal("issuer-signed"),
36685
+ signedCredential: VCValidator
36686
+ });
36687
+ var PublishSigningAuthorityRefreshValidator = external_exports.object({
36688
+ ...PublishCredentialRefreshBaseFields,
36689
+ mode: external_exports.literal("signing-authority"),
36690
+ credential: UnsignedVCValidator,
36691
+ signingAuthority: external_exports.object({
36692
+ type: external_exports.string().min(1)
36693
+ }).catchall(external_exports.any())
36694
+ });
36695
+ var PublishCredentialRefreshInputValidator = external_exports.object({
36696
+ ...PublishCredentialRefreshBaseFields,
36697
+ mode: CredentialRefreshSigningModeValidator,
36698
+ signedCredential: VCValidator.optional(),
36699
+ credential: UnsignedVCValidator.optional(),
36700
+ signingAuthority: external_exports.object({
36701
+ type: external_exports.string().min(1)
36702
+ }).catchall(external_exports.any()).optional()
36703
+ }).superRefine((input, ctx) => {
36704
+ if (input.mode === "issuer-signed" && !input.signedCredential) {
36705
+ ctx.addIssue({
36706
+ code: "custom",
36707
+ path: ["signedCredential"],
36708
+ message: "signedCredential is required for issuer-signed publication"
36709
+ });
36710
+ }
36711
+ if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
36712
+ ctx.addIssue({
36713
+ code: "custom",
36714
+ path: ["mode"],
36715
+ message: "issuer-signed publication cannot include signing-authority fields"
36716
+ });
36717
+ }
36718
+ if (input.mode === "signing-authority") {
36719
+ if (input.signedCredential !== void 0) {
36720
+ ctx.addIssue({
36721
+ code: "custom",
36722
+ path: ["signedCredential"],
36723
+ message: "signing-authority publication cannot include signedCredential"
36724
+ });
36725
+ }
36726
+ if (!input.credential) {
36727
+ ctx.addIssue({
36728
+ code: "custom",
36729
+ path: ["credential"],
36730
+ message: "credential is required for signing-authority publication"
36731
+ });
36732
+ }
36733
+ if (!input.signingAuthority) {
36734
+ ctx.addIssue({
36735
+ code: "custom",
36736
+ path: ["signingAuthority"],
36737
+ message: "signingAuthority is required for signing-authority publication"
36738
+ });
36739
+ }
36740
+ }
36741
+ });
36742
+ var PublishCredentialRefreshNotificationValidator = external_exports.enum([
36743
+ "queued",
36744
+ "suppressed",
36745
+ "not-applicable",
36746
+ /** Publication succeeded, but the post-commit notification enqueue must be retried. */
36747
+ "delivery-failed"
36748
+ ]);
36749
+ var PublishCredentialRefreshResultValidator = external_exports.object({
36750
+ refreshId: external_exports.string().min(1),
36751
+ version: external_exports.number().int().positive(),
36752
+ publishedAt: external_exports.string().min(1),
36753
+ notification: PublishCredentialRefreshNotificationValidator
36754
+ });
36755
+ var CredentialRefreshVersionMetadataValidator = external_exports.object({
36756
+ version: external_exports.number().int().positive(),
36757
+ publishedAt: external_exports.string().min(1),
36758
+ effectiveAt: external_exports.string().optional(),
36759
+ etag: external_exports.string().optional(),
36760
+ signingMode: CredentialRefreshSigningModeValidator.optional(),
36761
+ updateSummary: external_exports.string().optional()
36762
+ });
36763
+ var GetCredentialRefreshHistoryInputValidator = external_exports.object({
36764
+ refreshId: external_exports.string().min(1),
36765
+ cursor: external_exports.string().optional(),
36766
+ limit: external_exports.number().int().positive().optional()
36767
+ });
36768
+ var GetCredentialRefreshHistoryResultValidator = external_exports.object({
36769
+ records: CredentialRefreshVersionMetadataValidator.array(),
36770
+ hasMore: external_exports.boolean(),
36771
+ cursor: external_exports.string().optional()
36772
+ });
36773
+ var CredentialRefreshChallengeValidator = external_exports.object({
36774
+ challenge: external_exports.string().min(1),
36775
+ expiresAt: external_exports.string().min(1),
36776
+ domain: external_exports.string().optional(),
36777
+ scheme: external_exports.literal("LearnCardDIDAuth").optional()
36778
+ });
36779
+ var PublicCredentialRefreshEnvelopeValidator = external_exports.object({
36780
+ format: external_exports.literal("vc"),
36781
+ credential: VCValidator,
36782
+ etag: external_exports.string().optional()
36783
+ });
36784
+ var JweCredentialRefreshEnvelopeValidator = external_exports.object({
36785
+ format: external_exports.literal("jwe"),
36786
+ jwe: JWEValidator,
36787
+ etag: external_exports.string().optional(),
36788
+ /** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
36789
+ version: external_exports.number().int().positive().optional()
36790
+ });
36791
+ var CredentialRefreshResponseEnvelopeValidator = external_exports.discriminatedUnion("format", [
36792
+ PublicCredentialRefreshEnvelopeValidator,
36793
+ JweCredentialRefreshEnvelopeValidator
36794
+ ]);
36795
+ var CredentialRefreshFailureCodeValidator = external_exports.enum([
36796
+ "UNAVAILABLE",
36797
+ "TIMEOUT",
36798
+ "UNSUPPORTED_SERVICE",
36799
+ "UNAUTHORIZED",
36800
+ "MALFORMED_RESPONSE",
36801
+ "INVALID_PROOF",
36802
+ "ISSUER_MISMATCH",
36803
+ "ID_MISMATCH",
36804
+ "ROLLBACK",
36805
+ "REVOKED",
36806
+ "UNSAFE_ENDPOINT"
36807
+ ]);
36808
+ var CredentialRefreshUpdatedResultValidator = external_exports.object({
36809
+ status: external_exports.literal("updated"),
36810
+ credential: VCValidator,
36811
+ etag: external_exports.string().optional(),
36812
+ managedVersion: external_exports.number().int().positive().optional()
36813
+ });
36814
+ var CredentialRefreshUnchangedResultValidator = external_exports.object({
36815
+ status: external_exports.literal("unchanged"),
36816
+ checkedAt: external_exports.string().min(1),
36817
+ etag: external_exports.string().optional()
36818
+ });
36819
+ var CredentialRefreshUnsupportedResultValidator = external_exports.object({
36820
+ status: external_exports.literal("unsupported")
36821
+ });
36822
+ var CredentialRefreshFailedResultValidator = external_exports.object({
36823
+ status: external_exports.literal("failed"),
36824
+ code: CredentialRefreshFailureCodeValidator,
36825
+ retryable: external_exports.boolean()
36826
+ });
36827
+ var CredentialRefreshResultValidator = external_exports.discriminatedUnion("status", [
36828
+ CredentialRefreshUpdatedResultValidator,
36829
+ CredentialRefreshUnchangedResultValidator,
36830
+ CredentialRefreshUnsupportedResultValidator,
36831
+ CredentialRefreshFailedResultValidator
36832
+ ]);
36411
36833
 
36412
36834
  // src/read.ts
36413
36835
  var isTemplateRenderMethod = /* @__PURE__ */ __name((rm) => TemplateRenderMethodValidator.safeParse(rm).success, "isTemplateRenderMethod");