@learncard/render-method-plugin 6.0.0 → 8.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.
@@ -15949,6 +15949,7 @@ var require_types_cjs_development = __commonJS({
15949
15949
  var __toCommonJS = /* @__PURE__ */ __name2((mod) => __copyProps2(__defProp22({}, "__esModule", { value: true }), mod), "__toCommonJS");
15950
15950
  var index_exports = {};
15951
15951
  __export22(index_exports, {
15952
+ ACT_AS_HEADER: /* @__PURE__ */ __name2(() => ACT_AS_HEADER, "ACT_AS_HEADER"),
15952
15953
  AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX: /* @__PURE__ */ __name2(() => AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX2, "AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX"),
15953
15954
  AchievementCredentialValidator: /* @__PURE__ */ __name2(() => AchievementCredentialValidator2, "AchievementCredentialValidator"),
15954
15955
  AchievementCriteriaValidator: /* @__PURE__ */ __name2(() => AchievementCriteriaValidator2, "AchievementCriteriaValidator"),
@@ -16011,6 +16012,7 @@ var require_types_cjs_development = __commonJS({
16011
16012
  ConsentFlowContractValidator: /* @__PURE__ */ __name2(() => ConsentFlowContractValidator2, "ConsentFlowContractValidator"),
16012
16013
  ConsentFlowDataForDidQueryValidator: /* @__PURE__ */ __name2(() => ConsentFlowDataForDidQueryValidator2, "ConsentFlowDataForDidQueryValidator"),
16013
16014
  ConsentFlowDataQueryValidator: /* @__PURE__ */ __name2(() => ConsentFlowDataQueryValidator2, "ConsentFlowDataQueryValidator"),
16015
+ ConsentFlowGuardianApprovalValidator: /* @__PURE__ */ __name2(() => ConsentFlowGuardianApprovalValidator2, "ConsentFlowGuardianApprovalValidator"),
16014
16016
  ConsentFlowTermValidator: /* @__PURE__ */ __name2(() => ConsentFlowTermValidator2, "ConsentFlowTermValidator"),
16015
16017
  ConsentFlowTermsQueryValidator: /* @__PURE__ */ __name2(() => ConsentFlowTermsQueryValidator2, "ConsentFlowTermsQueryValidator"),
16016
16018
  ConsentFlowTermsStatusValidator: /* @__PURE__ */ __name2(() => ConsentFlowTermsStatusValidator2, "ConsentFlowTermsStatusValidator"),
@@ -16087,10 +16089,18 @@ var require_types_cjs_development = __commonJS({
16087
16089
  IdentifierTypeValidator: /* @__PURE__ */ __name2(() => IdentifierTypeValidator2, "IdentifierTypeValidator"),
16088
16090
  IdentityObjectValidator: /* @__PURE__ */ __name2(() => IdentityObjectValidator2, "IdentityObjectValidator"),
16089
16091
  ImageValidator: /* @__PURE__ */ __name2(() => ImageValidator2, "ImageValidator"),
16092
+ InboxBatchErrorReasonValidator: /* @__PURE__ */ __name2(() => InboxBatchErrorReasonValidator2, "InboxBatchErrorReasonValidator"),
16093
+ InboxBatchReceiptValidator: /* @__PURE__ */ __name2(() => InboxBatchReceiptValidator2, "InboxBatchReceiptValidator"),
16094
+ InboxBatchStatusValidator: /* @__PURE__ */ __name2(() => InboxBatchStatusValidator2, "InboxBatchStatusValidator"),
16090
16095
  InboxCredentialQueryValidator: /* @__PURE__ */ __name2(() => InboxCredentialQueryValidator2, "InboxCredentialQueryValidator"),
16096
+ InboxCredentialRefreshReceiptValidator: /* @__PURE__ */ __name2(() => InboxCredentialRefreshReceiptValidator2, "InboxCredentialRefreshReceiptValidator"),
16091
16097
  InboxCredentialValidator: /* @__PURE__ */ __name2(() => InboxCredentialValidator2, "InboxCredentialValidator"),
16092
16098
  IncrementCounterEventValidator: /* @__PURE__ */ __name2(() => IncrementCounterEventValidator2, "IncrementCounterEventValidator"),
16093
16099
  InstalledAppValidator: /* @__PURE__ */ __name2(() => InstalledAppValidator2, "InstalledAppValidator"),
16100
+ IssueInboxCredentialBatchItemResultValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialBatchItemResultValidator2, "IssueInboxCredentialBatchItemResultValidator"),
16101
+ IssueInboxCredentialBatchItemValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialBatchItemValidator2, "IssueInboxCredentialBatchItemValidator"),
16102
+ IssueInboxCredentialBatchResponseValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialBatchResponseValidator2, "IssueInboxCredentialBatchResponseValidator"),
16103
+ IssueInboxCredentialBatchValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialBatchValidator2, "IssueInboxCredentialBatchValidator"),
16094
16104
  IssueInboxCredentialResponseValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialResponseValidator2, "IssueInboxCredentialResponseValidator"),
16095
16105
  IssueInboxCredentialValidator: /* @__PURE__ */ __name2(() => IssueInboxCredentialValidator2, "IssueInboxCredentialValidator"),
16096
16106
  IssueInboxSigningAuthorityValidator: /* @__PURE__ */ __name2(() => IssueInboxSigningAuthorityValidator2, "IssueInboxSigningAuthorityValidator"),
@@ -16139,6 +16149,7 @@ var require_types_cjs_development = __commonJS({
16139
16149
  LaunchTypeValidator: /* @__PURE__ */ __name2(() => LaunchTypeValidator2, "LaunchTypeValidator"),
16140
16150
  LearnCardRefreshAuthorizationValidator: /* @__PURE__ */ __name2(() => LearnCardRefreshAuthorizationValidator2, "LearnCardRefreshAuthorizationValidator"),
16141
16151
  LinkProviderFrameworkInputValidator: /* @__PURE__ */ __name2(() => LinkProviderFrameworkInputValidator2, "LinkProviderFrameworkInputValidator"),
16152
+ ManagedCredentialRefreshReceiptValidator: /* @__PURE__ */ __name2(() => ManagedCredentialRefreshReceiptValidator2, "ManagedCredentialRefreshReceiptValidator"),
16142
16153
  ManagedCredentialRefreshServiceValidator: /* @__PURE__ */ __name2(() => ManagedCredentialRefreshServiceValidator2, "ManagedCredentialRefreshServiceValidator"),
16143
16154
  PaginatedAppStoreListingsValidator: /* @__PURE__ */ __name2(() => PaginatedAppStoreListingsValidator2, "PaginatedAppStoreListingsValidator"),
16144
16155
  PaginatedBoostRecipientsValidator: /* @__PURE__ */ __name2(() => PaginatedBoostRecipientsValidator2, "PaginatedBoostRecipientsValidator"),
@@ -16165,6 +16176,8 @@ var require_types_cjs_development = __commonJS({
16165
16176
  PaginatedVisibleLCNProfilesValidator: /* @__PURE__ */ __name2(() => PaginatedVisibleLCNProfilesValidator2, "PaginatedVisibleLCNProfilesValidator"),
16166
16177
  PaginationOptionsValidator: /* @__PURE__ */ __name2(() => PaginationOptionsValidator2, "PaginationOptionsValidator"),
16167
16178
  PaginationResponseValidator: /* @__PURE__ */ __name2(() => PaginationResponseValidator2, "PaginationResponseValidator"),
16179
+ PrepareRefreshableSendInputValidator: /* @__PURE__ */ __name2(() => PrepareRefreshableSendInputValidator2, "PrepareRefreshableSendInputValidator"),
16180
+ PrepareRefreshableSendResultValidator: /* @__PURE__ */ __name2(() => PrepareRefreshableSendResultValidator2, "PrepareRefreshableSendResultValidator"),
16168
16181
  ProfileValidator: /* @__PURE__ */ __name2(() => ProfileValidator2, "ProfileValidator"),
16169
16182
  ProfileVisibilityEnum: /* @__PURE__ */ __name2(() => ProfileVisibilityEnum2, "ProfileVisibilityEnum"),
16170
16183
  PromotionLevelValidator: /* @__PURE__ */ __name2(() => PromotionLevelValidator2, "PromotionLevelValidator"),
@@ -16190,6 +16203,7 @@ var require_types_cjs_development = __commonJS({
16190
16203
  SendAiSessionCredentialEventValidator: /* @__PURE__ */ __name2(() => SendAiSessionCredentialEventValidator2, "SendAiSessionCredentialEventValidator"),
16191
16204
  SendBoostInputValidator: /* @__PURE__ */ __name2(() => SendBoostInputValidator2, "SendBoostInputValidator"),
16192
16205
  SendBoostResponseValidator: /* @__PURE__ */ __name2(() => SendBoostResponseValidator2, "SendBoostResponseValidator"),
16206
+ SendBoostTemplateValidator: /* @__PURE__ */ __name2(() => SendBoostTemplateValidator2, "SendBoostTemplateValidator"),
16193
16207
  SendBrandingOptionsValidator: /* @__PURE__ */ __name2(() => SendBrandingOptionsValidator2, "SendBrandingOptionsValidator"),
16194
16208
  SendCredentialEventValidator: /* @__PURE__ */ __name2(() => SendCredentialEventValidator2, "SendCredentialEventValidator"),
16195
16209
  SendInboxResponseValidator: /* @__PURE__ */ __name2(() => SendInboxResponseValidator2, "SendInboxResponseValidator"),
@@ -16909,7 +16923,7 @@ var require_types_cjs_development = __commonJS({
16909
16923
  getSizableOrigin: /* @__PURE__ */ __name2(() => getSizableOrigin2, "getSizableOrigin"),
16910
16924
  hexToUint8Array: /* @__PURE__ */ __name2(() => hexToUint8Array2, "hexToUint8Array"),
16911
16925
  isObject: /* @__PURE__ */ __name2(() => isObject2, "isObject"),
16912
- isPlainObject: /* @__PURE__ */ __name2(() => isPlainObject3, "isPlainObject"),
16926
+ isPlainObject: /* @__PURE__ */ __name2(() => isPlainObject22, "isPlainObject"),
16913
16927
  issue: /* @__PURE__ */ __name2(() => issue2, "issue"),
16914
16928
  joinValues: /* @__PURE__ */ __name2(() => joinValues2, "joinValues"),
16915
16929
  jsonStringifyReplacer: /* @__PURE__ */ __name2(() => jsonStringifyReplacer2, "jsonStringifyReplacer"),
@@ -17158,7 +17172,7 @@ var require_types_cjs_development = __commonJS({
17158
17172
  return false;
17159
17173
  }
17160
17174
  });
17161
- function isPlainObject3(o) {
17175
+ function isPlainObject22(o) {
17162
17176
  if (isObject2(o) === false)
17163
17177
  return false;
17164
17178
  const ctor = o.constructor;
@@ -17174,11 +17188,11 @@ var require_types_cjs_development = __commonJS({
17174
17188
  }
17175
17189
  return true;
17176
17190
  }
17177
- __name(isPlainObject3, "isPlainObject");
17178
- __name2(isPlainObject3, "isPlainObject");
17179
- __name22(isPlainObject3, "isPlainObject");
17191
+ __name(isPlainObject22, "isPlainObject2");
17192
+ __name2(isPlainObject22, "isPlainObject");
17193
+ __name22(isPlainObject22, "isPlainObject");
17180
17194
  function shallowClone2(o) {
17181
- if (isPlainObject3(o))
17195
+ if (isPlainObject22(o))
17182
17196
  return { ...o };
17183
17197
  if (Array.isArray(o))
17184
17198
  return [...o];
@@ -17412,7 +17426,7 @@ var require_types_cjs_development = __commonJS({
17412
17426
  __name2(omit2, "omit");
17413
17427
  __name22(omit2, "omit");
17414
17428
  function extend2(schema, shape) {
17415
- if (!isPlainObject3(shape)) {
17429
+ if (!isPlainObject22(shape)) {
17416
17430
  throw new Error("Invalid input to extend: expected a plain object");
17417
17431
  }
17418
17432
  const checks = schema._zod.def.checks;
@@ -17438,7 +17452,7 @@ var require_types_cjs_development = __commonJS({
17438
17452
  __name2(extend2, "extend");
17439
17453
  __name22(extend2, "extend");
17440
17454
  function safeExtend2(schema, shape) {
17441
- if (!isPlainObject3(shape)) {
17455
+ if (!isPlainObject22(shape)) {
17442
17456
  throw new Error("Invalid input to safeExtend: expected a plain object");
17443
17457
  }
17444
17458
  const def = mergeDefs2(schema._zod.def, {
@@ -19894,7 +19908,7 @@ var require_types_cjs_development = __commonJS({
19894
19908
  if (a instanceof Date && b instanceof Date && +a === +b) {
19895
19909
  return { valid: true, data: a };
19896
19910
  }
19897
- if (isPlainObject3(a) && isPlainObject3(b)) {
19911
+ if (isPlainObject22(a) && isPlainObject22(b)) {
19898
19912
  const bKeys = Object.keys(b);
19899
19913
  const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
19900
19914
  const newObj = { ...a, ...b };
@@ -20095,7 +20109,7 @@ var require_types_cjs_development = __commonJS({
20095
20109
  $ZodType2.init(inst, def);
20096
20110
  inst._zod.parse = (payload, ctx) => {
20097
20111
  const input = payload.value;
20098
- if (!isPlainObject3(input)) {
20112
+ if (!isPlainObject22(input)) {
20099
20113
  payload.issues.push({
20100
20114
  expected: "record",
20101
20115
  code: "invalid_type",
@@ -32050,14 +32064,22 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32050
32064
  }).catchall(external_exports2.any());
32051
32065
  var ProofValidator2 = external_exports2.object({
32052
32066
  type: external_exports2.string(),
32053
- created: external_exports2.string(),
32067
+ created: external_exports2.string().optional(),
32054
32068
  challenge: external_exports2.string().optional(),
32055
32069
  domain: external_exports2.string().optional(),
32056
32070
  nonce: external_exports2.string().optional(),
32057
32071
  proofPurpose: external_exports2.string(),
32058
32072
  verificationMethod: external_exports2.string(),
32059
32073
  jws: external_exports2.string().optional()
32060
- }).catchall(external_exports2.any());
32074
+ }).catchall(external_exports2.any()).superRefine((proof, ctx) => {
32075
+ if (proof.created === void 0 && (proof.type !== "DataIntegrityProof" || proof.cryptosuite !== "ecdsa-rdfc-2019")) {
32076
+ ctx.addIssue({
32077
+ code: "custom",
32078
+ path: ["created"],
32079
+ message: "created is required for this proof suite"
32080
+ });
32081
+ }
32082
+ });
32061
32083
  var VCValidator2 = UnsignedVCValidator2.extend({
32062
32084
  proof: ProofValidator2.or(ProofValidator2.array())
32063
32085
  });
@@ -32499,6 +32521,204 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32499
32521
  $or: BaseStringQuery2.array()
32500
32522
  })
32501
32523
  ]);
32524
+ var LearnCardRefreshAuthorizationValidator2 = external_exports2.object({ type: external_exports2.literal("LearnCardDIDAuth") }).catchall(external_exports2.any());
32525
+ var ManagedCredentialRefreshServiceValidator2 = external_exports2.object({
32526
+ id: external_exports2.string().min(1),
32527
+ type: external_exports2.literal("LearnCardCredentialRefresh2026"),
32528
+ authorization: LearnCardRefreshAuthorizationValidator2.optional()
32529
+ }).catchall(external_exports2.any());
32530
+ var StandardCredentialRefreshServiceValidator2 = external_exports2.object({
32531
+ id: external_exports2.string().min(1),
32532
+ type: external_exports2.literal("1EdTechCredentialRefresh")
32533
+ }).catchall(external_exports2.any());
32534
+ var SupportedCredentialRefreshServiceValidator2 = external_exports2.union([
32535
+ ManagedCredentialRefreshServiceValidator2,
32536
+ StandardCredentialRefreshServiceValidator2
32537
+ ]);
32538
+ var AllocateCredentialRefreshInputValidator2 = external_exports2.object({
32539
+ holder: external_exports2.object({
32540
+ profileId: external_exports2.string().optional(),
32541
+ did: external_exports2.string().min(1)
32542
+ }),
32543
+ credentialId: external_exports2.string().min(1)
32544
+ });
32545
+ var AllocateCredentialRefreshResultValidator2 = external_exports2.object({
32546
+ refreshId: external_exports2.string().min(1),
32547
+ refreshService: ManagedCredentialRefreshServiceValidator2.extend({
32548
+ authorization: LearnCardRefreshAuthorizationValidator2
32549
+ })
32550
+ });
32551
+ var ManagedCredentialRefreshReceiptValidator2 = external_exports2.object({
32552
+ refreshId: external_exports2.string().min(1),
32553
+ refreshService: ManagedCredentialRefreshServiceValidator2,
32554
+ credentialId: external_exports2.string().min(1),
32555
+ issuerDid: external_exports2.string().min(1),
32556
+ holderDid: external_exports2.string().min(1),
32557
+ credentialStatus: CredentialStatusValidator2.or(
32558
+ CredentialStatusValidator2.array()
32559
+ ).optional()
32560
+ }).strip();
32561
+ var InboxCredentialRefreshReceiptValidator2 = ManagedCredentialRefreshReceiptValidator2.omit(
32562
+ { holderDid: true }
32563
+ ).extend({ holderDid: external_exports2.string().min(1).optional() });
32564
+ var CredentialRefreshSigningModeValidator2 = external_exports2.enum(["issuer-signed", "signing-authority"]);
32565
+ var PublishCredentialRefreshBaseFields2 = {
32566
+ refreshId: external_exports2.string().min(1),
32567
+ notifyHolder: external_exports2.boolean().optional(),
32568
+ updateSummary: external_exports2.string().optional(),
32569
+ idempotencyKey: external_exports2.string().optional()
32570
+ };
32571
+ var PublishIssuerSignedRefreshValidator2 = external_exports2.object({
32572
+ ...PublishCredentialRefreshBaseFields2,
32573
+ mode: external_exports2.literal("issuer-signed"),
32574
+ signedCredential: VCValidator2
32575
+ });
32576
+ var PublishSigningAuthorityRefreshValidator2 = external_exports2.object({
32577
+ ...PublishCredentialRefreshBaseFields2,
32578
+ mode: external_exports2.literal("signing-authority"),
32579
+ credential: UnsignedVCValidator2,
32580
+ signingAuthority: external_exports2.object({
32581
+ type: external_exports2.string().min(1)
32582
+ }).catchall(external_exports2.any())
32583
+ });
32584
+ var PublishCredentialRefreshInputValidator2 = external_exports2.object({
32585
+ ...PublishCredentialRefreshBaseFields2,
32586
+ mode: CredentialRefreshSigningModeValidator2,
32587
+ signedCredential: VCValidator2.optional(),
32588
+ credential: UnsignedVCValidator2.optional(),
32589
+ signingAuthority: external_exports2.object({
32590
+ type: external_exports2.string().min(1)
32591
+ }).catchall(external_exports2.any()).optional()
32592
+ }).superRefine((input, ctx) => {
32593
+ if (input.mode === "issuer-signed" && !input.signedCredential) {
32594
+ ctx.addIssue({
32595
+ code: "custom",
32596
+ path: ["signedCredential"],
32597
+ message: "signedCredential is required for issuer-signed publication"
32598
+ });
32599
+ }
32600
+ if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
32601
+ ctx.addIssue({
32602
+ code: "custom",
32603
+ path: ["mode"],
32604
+ message: "issuer-signed publication cannot include signing-authority fields"
32605
+ });
32606
+ }
32607
+ if (input.mode === "signing-authority") {
32608
+ if (input.signedCredential !== void 0) {
32609
+ ctx.addIssue({
32610
+ code: "custom",
32611
+ path: ["signedCredential"],
32612
+ message: "signing-authority publication cannot include signedCredential"
32613
+ });
32614
+ }
32615
+ if (!input.credential) {
32616
+ ctx.addIssue({
32617
+ code: "custom",
32618
+ path: ["credential"],
32619
+ message: "credential is required for signing-authority publication"
32620
+ });
32621
+ }
32622
+ if (!input.signingAuthority) {
32623
+ ctx.addIssue({
32624
+ code: "custom",
32625
+ path: ["signingAuthority"],
32626
+ message: "signingAuthority is required for signing-authority publication"
32627
+ });
32628
+ }
32629
+ }
32630
+ });
32631
+ var PublishCredentialRefreshNotificationValidator2 = external_exports2.enum([
32632
+ "queued",
32633
+ "suppressed",
32634
+ "not-applicable",
32635
+ /** Publication succeeded, but the post-commit notification enqueue must be retried. */
32636
+ "delivery-failed"
32637
+ ]);
32638
+ var PublishCredentialRefreshResultValidator2 = external_exports2.object({
32639
+ refreshId: external_exports2.string().min(1),
32640
+ version: external_exports2.number().int().positive(),
32641
+ publishedAt: external_exports2.string().min(1),
32642
+ notification: PublishCredentialRefreshNotificationValidator2
32643
+ });
32644
+ var CredentialRefreshVersionMetadataValidator2 = external_exports2.object({
32645
+ version: external_exports2.number().int().positive(),
32646
+ publishedAt: external_exports2.string().min(1),
32647
+ effectiveAt: external_exports2.string().optional(),
32648
+ etag: external_exports2.string().optional(),
32649
+ signingMode: CredentialRefreshSigningModeValidator2.optional(),
32650
+ updateSummary: external_exports2.string().optional()
32651
+ });
32652
+ var GetCredentialRefreshHistoryInputValidator2 = external_exports2.object({
32653
+ refreshId: external_exports2.string().min(1),
32654
+ cursor: external_exports2.string().optional(),
32655
+ limit: external_exports2.number().int().positive().optional()
32656
+ });
32657
+ var GetCredentialRefreshHistoryResultValidator2 = external_exports2.object({
32658
+ records: CredentialRefreshVersionMetadataValidator2.array(),
32659
+ hasMore: external_exports2.boolean(),
32660
+ cursor: external_exports2.string().optional()
32661
+ });
32662
+ var CredentialRefreshChallengeValidator2 = external_exports2.object({
32663
+ challenge: external_exports2.string().min(1),
32664
+ expiresAt: external_exports2.string().min(1),
32665
+ domain: external_exports2.string().optional(),
32666
+ scheme: external_exports2.literal("LearnCardDIDAuth").optional()
32667
+ });
32668
+ var PublicCredentialRefreshEnvelopeValidator2 = external_exports2.object({
32669
+ format: external_exports2.literal("vc"),
32670
+ credential: VCValidator2,
32671
+ etag: external_exports2.string().optional()
32672
+ });
32673
+ var JweCredentialRefreshEnvelopeValidator2 = external_exports2.object({
32674
+ format: external_exports2.literal("jwe"),
32675
+ jwe: JWEValidator2,
32676
+ etag: external_exports2.string().optional(),
32677
+ /** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
32678
+ version: external_exports2.number().int().positive().optional()
32679
+ });
32680
+ var CredentialRefreshResponseEnvelopeValidator2 = external_exports2.discriminatedUnion("format", [
32681
+ PublicCredentialRefreshEnvelopeValidator2,
32682
+ JweCredentialRefreshEnvelopeValidator2
32683
+ ]);
32684
+ var CredentialRefreshFailureCodeValidator2 = external_exports2.enum([
32685
+ "UNAVAILABLE",
32686
+ "TIMEOUT",
32687
+ "UNSUPPORTED_SERVICE",
32688
+ "UNAUTHORIZED",
32689
+ "MALFORMED_RESPONSE",
32690
+ "INVALID_PROOF",
32691
+ "ISSUER_MISMATCH",
32692
+ "ID_MISMATCH",
32693
+ "ROLLBACK",
32694
+ "REVOKED",
32695
+ "UNSAFE_ENDPOINT"
32696
+ ]);
32697
+ var CredentialRefreshUpdatedResultValidator2 = external_exports2.object({
32698
+ status: external_exports2.literal("updated"),
32699
+ credential: VCValidator2,
32700
+ etag: external_exports2.string().optional(),
32701
+ managedVersion: external_exports2.number().int().positive().optional()
32702
+ });
32703
+ var CredentialRefreshUnchangedResultValidator2 = external_exports2.object({
32704
+ status: external_exports2.literal("unchanged"),
32705
+ checkedAt: external_exports2.string().min(1),
32706
+ etag: external_exports2.string().optional()
32707
+ });
32708
+ var CredentialRefreshUnsupportedResultValidator2 = external_exports2.object({
32709
+ status: external_exports2.literal("unsupported")
32710
+ });
32711
+ var CredentialRefreshFailedResultValidator2 = external_exports2.object({
32712
+ status: external_exports2.literal("failed"),
32713
+ code: CredentialRefreshFailureCodeValidator2,
32714
+ retryable: external_exports2.boolean()
32715
+ });
32716
+ var CredentialRefreshResultValidator2 = external_exports2.discriminatedUnion("status", [
32717
+ CredentialRefreshUpdatedResultValidator2,
32718
+ CredentialRefreshUnchangedResultValidator2,
32719
+ CredentialRefreshUnsupportedResultValidator2,
32720
+ CredentialRefreshFailedResultValidator2
32721
+ ]);
32502
32722
  var LCNProfileDisplayValidator2 = external_exports2.object({
32503
32723
  backgroundColor: external_exports2.string().optional(),
32504
32724
  backgroundImage: external_exports2.string().optional(),
@@ -32834,7 +33054,13 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32834
33054
  "Options for email/phone recipients (Universal Inbox)"
32835
33055
  ),
32836
33056
  templateData: external_exports2.record(external_exports2.string(), external_exports2.unknown()).optional(),
32837
- integrationId: external_exports2.string().optional().describe("Integration ID for activity tracking")
33057
+ integrationId: external_exports2.string().optional().describe("Integration ID for activity tracking"),
33058
+ refresh: external_exports2.boolean().optional().describe(
33059
+ "Request managed credential refresh for this send. Profile/DID recipients use immediate issuance; email/phone recipients use deferred Universal Inbox signing and bind the holder at claim."
33060
+ ),
33061
+ idempotencyKey: external_exports2.string().min(1).max(200).optional().describe(
33062
+ "Caller-chosen key that makes a managed refresh send (refresh: true) safe to retry as a whole: retries with the same key reuse the same boost, refresh allocation and result. Reusing a key for a different request is rejected. With signedCredential, requires prior tRPC prepareRefreshableSend; direct REST callers omit the key and retry the exact signed credential and templateUri."
33063
+ )
32838
33064
  }).refine((data) => data.templateUri || data.template || data.signedCredential, {
32839
33065
  message: "Either templateUri, template, or signedCredential must be provided.",
32840
33066
  path: ["templateUri"]
@@ -32849,8 +33075,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32849
33075
  message: "guardianEmail must differ from recipient (self-approval not allowed)",
32850
33076
  path: ["options", "guardianEmail"]
32851
33077
  }
32852
- );
33078
+ ).refine((data) => !data.idempotencyKey || data.refresh === true, {
33079
+ message: "idempotencyKey is only supported with refresh: true.",
33080
+ path: ["idempotencyKey"]
33081
+ });
32853
33082
  var SendInboxResponseValidator2 = external_exports2.object({
33083
+ refresh: InboxCredentialRefreshReceiptValidator2.optional(),
32854
33084
  issuanceId: external_exports2.string(),
32855
33085
  status: external_exports2.enum(["PENDING", "ISSUED", "EXPIRED", "DELIVERED", "CLAIMED"]),
32856
33086
  claimUrl: external_exports2.string().url().optional().describe("Present when suppressDelivery=true"),
@@ -32865,8 +33095,34 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32865
33095
  activityId: external_exports2.string().describe("Links to the activity lifecycle for this issuance"),
32866
33096
  inbox: SendInboxResponseValidator2.optional().describe(
32867
33097
  "Present when sent via email/phone (Universal Inbox)"
33098
+ ),
33099
+ refresh: ManagedCredentialRefreshReceiptValidator2.optional().describe(
33100
+ "Present when managed refresh was requested: issuance metadata the issuer keeps to publish future updates"
32868
33101
  )
32869
33102
  });
33103
+ var PrepareRefreshableSendInputValidator2 = external_exports2.object({
33104
+ recipient: external_exports2.string(),
33105
+ templateUri: external_exports2.string().optional(),
33106
+ template: SendBoostTemplateValidator2.optional(),
33107
+ contractUri: external_exports2.string().optional(),
33108
+ templateData: external_exports2.record(external_exports2.string(), external_exports2.unknown()).optional(),
33109
+ integrationId: external_exports2.string().optional(),
33110
+ /** Credential ID to allocate for; generated server-side when omitted. */
33111
+ credentialId: external_exports2.string().min(1).optional(),
33112
+ idempotencyKey: external_exports2.string().min(1).max(200).optional()
33113
+ }).refine((data) => Boolean(data.templateUri) !== Boolean(data.template), {
33114
+ message: "Provide exactly one of templateUri or template."
33115
+ });
33116
+ var PrepareRefreshableSendResultValidator2 = external_exports2.object({
33117
+ boostUri: external_exports2.string(),
33118
+ credentialId: external_exports2.string(),
33119
+ refreshId: external_exports2.string(),
33120
+ refreshService: ManagedCredentialRefreshServiceValidator2,
33121
+ /** The DID to use as credentialSubject.id (recipient DID, or the profile's did:web). */
33122
+ holderDid: external_exports2.string(),
33123
+ /** Present when this idempotencyKey already completed: return it without signing. */
33124
+ completed: SendBoostResponseValidator2.optional()
33125
+ });
32870
33126
  var SendInputValidator2 = external_exports2.discriminatedUnion("type", [SendBoostInputValidator2]);
32871
33127
  var SendResponseValidator2 = external_exports2.discriminatedUnion("type", [SendBoostResponseValidator2]);
32872
33128
  var ConsentFlowTermsStatusValidator2 = external_exports2.enum(["live", "stale", "withdrawn"]);
@@ -32942,15 +33198,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32942
33198
  var PaginatedConsentFlowDataValidator2 = PaginationResponseValidator2.extend({
32943
33199
  records: ConsentFlowContractDataValidator2.array()
32944
33200
  });
32945
- var ConsentFlowContractDataForDidValidator2 = external_exports2.object({
32946
- credentials: external_exports2.object({ category: external_exports2.string(), uri: external_exports2.string() }).array(),
32947
- personal: external_exports2.record(external_exports2.string(), external_exports2.string()).default({}),
32948
- date: external_exports2.string(),
32949
- contractUri: external_exports2.string()
32950
- });
32951
- var PaginatedConsentFlowDataForDidValidator2 = PaginationResponseValidator2.extend({
32952
- records: ConsentFlowContractDataForDidValidator2.array()
32953
- });
32954
33201
  var ConsentFlowTermValidator2 = external_exports2.object({
32955
33202
  sharing: external_exports2.boolean().optional(),
32956
33203
  shared: external_exports2.string().array().optional(),
@@ -32984,6 +33231,34 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
32984
33231
  status: ConsentFlowTermsStatusValidator2
32985
33232
  }).array()
32986
33233
  });
33234
+ var ConsentFlowGuardianApprovalValidator2 = external_exports2.object({
33235
+ guardianProfileId: external_exports2.string(),
33236
+ guardianDid: external_exports2.string(),
33237
+ approvedAt: external_exports2.string().datetime(),
33238
+ contractUpdatedAt: external_exports2.string()
33239
+ });
33240
+ var ConsentFlowContractDataForDidValidator2 = external_exports2.object({
33241
+ credentials: external_exports2.object({ category: external_exports2.string(), uri: external_exports2.string() }).array(),
33242
+ personal: external_exports2.record(external_exports2.string(), external_exports2.string()).default({}),
33243
+ date: external_exports2.string(),
33244
+ createdAt: external_exports2.string().optional(),
33245
+ contractUpdatedAt: external_exports2.string(),
33246
+ contractExpiresAt: external_exports2.string().optional(),
33247
+ reasonForAccessing: external_exports2.string().optional(),
33248
+ guardian: external_exports2.object({
33249
+ required: external_exports2.boolean(),
33250
+ approved: external_exports2.boolean(),
33251
+ approval: ConsentFlowGuardianApprovalValidator2.optional()
33252
+ }),
33253
+ contractUri: external_exports2.string(),
33254
+ termsUri: external_exports2.string(),
33255
+ status: ConsentFlowTermsStatusValidator2,
33256
+ expiresAt: external_exports2.string().optional(),
33257
+ terms: ConsentFlowTermsValidator2
33258
+ });
33259
+ var PaginatedConsentFlowDataForDidValidator2 = PaginationResponseValidator2.extend({
33260
+ records: ConsentFlowContractDataForDidValidator2.array()
33261
+ });
32987
33262
  var ConsentFlowContractQueryValidator2 = external_exports2.object({
32988
33263
  read: external_exports2.object({
32989
33264
  anonymize: external_exports2.boolean().optional(),
@@ -33044,6 +33319,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33044
33319
  expiresAt: external_exports2.string().optional(),
33045
33320
  oneTime: external_exports2.boolean().optional(),
33046
33321
  terms: ConsentFlowTermsValidator2.optional(),
33322
+ guardianApproval: ConsentFlowGuardianApprovalValidator2.optional(),
33047
33323
  id: external_exports2.string(),
33048
33324
  action: ConsentFlowTransactionActionValidator2,
33049
33325
  date: external_exports2.string(),
@@ -33165,6 +33441,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33165
33441
  webhookUrl: external_exports2.string().optional()
33166
33442
  });
33167
33443
  var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX2 = "auth-grant:";
33444
+ var ACT_AS_HEADER = "X-LearnCard-Act-As";
33168
33445
  var AuthGrantValidator2 = external_exports2.object({
33169
33446
  id: external_exports2.string(),
33170
33447
  name: external_exports2.string(),
@@ -33177,6 +33454,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33177
33454
  }, "error")
33178
33455
  }),
33179
33456
  scope: external_exports2.string(),
33457
+ actAs: external_exports2.string().optional(),
33180
33458
  createdAt: external_exports2.iso.datetime({ error: "createdAt must be a valid ISO 8601 datetime string" }),
33181
33459
  expiresAt: external_exports2.iso.datetime({ error: "expiresAt must be a valid ISO 8601 datetime string" }).nullish().optional()
33182
33460
  });
@@ -33248,6 +33526,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33248
33526
  sessionJwt: external_exports2.string()
33249
33527
  });
33250
33528
  var InboxCredentialValidator2 = external_exports2.object({
33529
+ refresh: InboxCredentialRefreshReceiptValidator2.optional(),
33530
+ refreshId: external_exports2.string().optional(),
33251
33531
  id: external_exports2.string(),
33252
33532
  credential: external_exports2.string().optional(),
33253
33533
  isSigned: external_exports2.boolean(),
@@ -33302,12 +33582,19 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33302
33582
  templateUri: external_exports2.string().optional().describe(
33303
33583
  "URI of a boost template to use for issuance. The boost credential will be resolved and used. Mutually exclusive with credential field."
33304
33584
  ),
33585
+ refresh: external_exports2.boolean().optional().describe(
33586
+ "Allocate managed refresh before signing. Requires unsigned content and a registered signing authority; binds the holder on claim."
33587
+ ),
33588
+ idempotencyKey: external_exports2.string().min(1).max(200).optional(),
33305
33589
  // === OPTIONAL FEATURES ===
33306
33590
  // Add major, distinct features at the top level.
33307
33591
  //consentRequest: ConsentRequestValidator.optional(),
33308
33592
  // === PROCESS CONFIGURATION (Optional) ===
33309
33593
  // HOW should this issuance be handled?
33310
33594
  configuration: external_exports2.object({
33595
+ guardianEmail: external_exports2.string().email().optional().describe(
33596
+ "Require approval from this guardian before the recipient can claim. Must differ from the recipient email."
33597
+ ),
33311
33598
  signingAuthority: IssueInboxSigningAuthorityValidator2.optional().describe(
33312
33599
  "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
33600
  ),
@@ -33361,32 +33648,145 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33361
33648
  }).optional().describe(
33362
33649
  "Configuration for the credential issuance. If not provided, the default configuration will be used."
33363
33650
  )
33651
+ }).refine((data) => !data.idempotencyKey || data.refresh === true, {
33652
+ message: "idempotencyKey requires refresh: true."
33364
33653
  }).refine((data) => data.credential || data.templateUri, {
33365
33654
  message: "Either credential or templateUri must be provided.",
33366
33655
  path: ["credential"]
33367
- });
33656
+ }).refine(
33657
+ (data) => !data.configuration?.guardianEmail || data.recipient.type !== "email" || data.configuration.guardianEmail.toLowerCase() !== data.recipient.value.toLowerCase(),
33658
+ {
33659
+ message: "guardianEmail must differ from recipient (self-approval not allowed)",
33660
+ path: ["configuration", "guardianEmail"]
33661
+ }
33662
+ );
33368
33663
  var IssueInboxCredentialResponseValidator2 = external_exports2.object({
33664
+ refresh: InboxCredentialRefreshReceiptValidator2.optional(),
33369
33665
  issuanceId: external_exports2.string(),
33370
33666
  status: LCNInboxStatusEnumValidator2,
33371
33667
  recipient: ContactMethodQueryValidator2,
33372
33668
  claimUrl: external_exports2.string().url().optional(),
33373
33669
  recipientDid: external_exports2.string().optional()
33374
33670
  });
33375
- var CredentialNameRefValidator2 = external_exports2.object({ name: external_exports2.string() }).passthrough();
33376
- var ClaimInboxCredentialValidator2 = external_exports2.object({
33377
- credential: VCValidator2.or(VPValidator2).or(UnsignedVCValidator2).or(CredentialNameRefValidator2).describe("The credential to issue, or a { name } reference to resolve a boost template."),
33378
- configuration: external_exports2.object({
33379
- publishableKey: external_exports2.string(),
33380
- expiresInDays: external_exports2.number().int().min(1).max(720).optional().describe(
33381
- "Inbox claim window in days. Defaults to 720; use a shorter window for sensitive records."
33382
- ),
33383
- signingAuthorityName: external_exports2.string().optional(),
33384
- listingId: external_exports2.string().optional(),
33385
- listingSlug: external_exports2.string().optional()
33386
- }).optional()
33671
+ var InboxBatchConfigurationValidator2 = IssueInboxCredentialValidator2.shape.configuration.unwrap().extend({
33672
+ refresh: IssueInboxCredentialValidator2.shape.refresh.describe(
33673
+ "Enable managed refresh by default. An item configuration.refresh overrides this value, including false."
33674
+ ),
33675
+ delivery: IssueInboxCredentialValidator2.shape.configuration.unwrap().shape.delivery.unwrap().extend({ suppress: external_exports2.boolean().optional() }).optional()
33387
33676
  });
33388
- var LCNDomainOrOriginValidator2 = external_exports2.union([
33389
- external_exports2.string().regex(
33677
+ var InboxBatchItemConfigurationValidator2 = InboxBatchConfigurationValidator2.extend({
33678
+ guardianEmail: InboxBatchConfigurationValidator2.shape.guardianEmail.nullable().describe(
33679
+ "Require guardian approval, or set null to clear a batch-level guardianEmail for this item."
33680
+ )
33681
+ });
33682
+ var IssueInboxCredentialBatchItemValidator2 = external_exports2.object({
33683
+ ...IssueInboxCredentialValidator2.shape,
33684
+ configuration: InboxBatchItemConfigurationValidator2.optional(),
33685
+ idempotencyKey: external_exports2.string().max(256).optional()
33686
+ }).refine((data) => data.credential || data.templateUri, {
33687
+ message: "Either credential or templateUri must be provided.",
33688
+ path: ["credential"]
33689
+ }).describe(
33690
+ "One issuance: provide credential or templateUri. Invalid input is rejected at submission with its item index."
33691
+ );
33692
+ var IssueInboxCredentialBatchValidator2 = external_exports2.object({
33693
+ requestId: external_exports2.string().min(1).max(256).optional(),
33694
+ items: external_exports2.array(IssueInboxCredentialBatchItemValidator2).min(1).max(100),
33695
+ configuration: InboxBatchConfigurationValidator2.optional()
33696
+ }).superRefine((batch, ctx) => {
33697
+ batch.items.forEach((item, index) => {
33698
+ const itemGuardian = item.configuration?.guardianEmail;
33699
+ const guardian = itemGuardian === null ? void 0 : itemGuardian ?? batch.configuration?.guardianEmail;
33700
+ if (guardian && item.recipient.type === "email" && guardian.toLowerCase() === item.recipient.value.toLowerCase()) {
33701
+ ctx.addIssue({
33702
+ code: "custom",
33703
+ path: ["items", index, "configuration", "guardianEmail"],
33704
+ message: "guardianEmail must differ from recipient (self-approval not allowed)"
33705
+ });
33706
+ }
33707
+ });
33708
+ });
33709
+ var InboxBatchErrorReasonValidator2 = external_exports2.enum([
33710
+ "DUPLICATE_KEY",
33711
+ "IDEMPOTENCY_MISMATCH",
33712
+ "IN_PROGRESS",
33713
+ "UNCONFIRMED"
33714
+ ]);
33715
+ var IssueInboxCredentialBatchItemResultValidator2 = external_exports2.discriminatedUnion("success", [
33716
+ IssueInboxCredentialResponseValidator2.extend({
33717
+ success: external_exports2.literal(true),
33718
+ index: external_exports2.number().int().nonnegative(),
33719
+ deduplicated: external_exports2.boolean().optional(),
33720
+ guardianStatus: GuardianStatusValidator2.optional(),
33721
+ idempotencyKey: external_exports2.string().optional()
33722
+ }),
33723
+ external_exports2.object({
33724
+ success: external_exports2.literal(false),
33725
+ index: external_exports2.number().int().nonnegative(),
33726
+ idempotencyKey: external_exports2.string().optional(),
33727
+ recipient: ContactMethodQueryValidator2.optional(),
33728
+ error: external_exports2.object({
33729
+ code: external_exports2.string(),
33730
+ message: external_exports2.string(),
33731
+ reason: InboxBatchErrorReasonValidator2.optional()
33732
+ }),
33733
+ issuanceId: external_exports2.string().optional().describe(
33734
+ "Present when issuance completed but replay storage could not be confirmed. Reconcile this issuance; do not issue again with a new key."
33735
+ ),
33736
+ claimUrl: external_exports2.string().url().optional().describe(
33737
+ "Claim URL of the completed issuance, if available, when replay storage could not be confirmed."
33738
+ )
33739
+ })
33740
+ ]);
33741
+ var IssueInboxCredentialBatchResponseValidator2 = external_exports2.object({
33742
+ results: external_exports2.array(IssueInboxCredentialBatchItemResultValidator2),
33743
+ summary: external_exports2.object({
33744
+ total: external_exports2.number(),
33745
+ succeeded: external_exports2.number(),
33746
+ failed: external_exports2.number(),
33747
+ deduplicated: external_exports2.number()
33748
+ })
33749
+ });
33750
+ var InboxBatchReceiptValidator2 = external_exports2.object({
33751
+ batchId: external_exports2.string(),
33752
+ status: external_exports2.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
33753
+ createdAt: external_exports2.string()
33754
+ });
33755
+ var InboxBatchStatusValidator2 = external_exports2.object({
33756
+ batchId: external_exports2.string(),
33757
+ createdAt: external_exports2.string(),
33758
+ done: external_exports2.boolean().describe(
33759
+ "True when no queued or processing items remain, including unconfirmed outcomes."
33760
+ ),
33761
+ status: external_exports2.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
33762
+ items: external_exports2.array(
33763
+ external_exports2.object({
33764
+ index: external_exports2.number().int().nonnegative(),
33765
+ state: external_exports2.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
33766
+ result: IssueInboxCredentialBatchItemResultValidator2.optional()
33767
+ })
33768
+ ),
33769
+ summary: IssueInboxCredentialBatchResponseValidator2.shape.summary.extend({
33770
+ completed: external_exports2.number(),
33771
+ pending: external_exports2.number(),
33772
+ unconfirmed: external_exports2.number()
33773
+ })
33774
+ });
33775
+ var CredentialNameRefValidator2 = external_exports2.object({ name: external_exports2.string() }).passthrough();
33776
+ var ClaimInboxCredentialValidator2 = external_exports2.object({
33777
+ credential: VCValidator2.or(VPValidator2).or(UnsignedVCValidator2).or(CredentialNameRefValidator2).describe("The credential to issue, or a { name } reference to resolve a boost template."),
33778
+ configuration: external_exports2.object({
33779
+ publishableKey: external_exports2.string(),
33780
+ expiresInDays: external_exports2.number().int().min(1).max(720).optional().describe(
33781
+ "Inbox claim window in days. Defaults to 720; use a shorter window for sensitive records."
33782
+ ),
33783
+ signingAuthorityName: external_exports2.string().optional(),
33784
+ listingId: external_exports2.string().optional(),
33785
+ listingSlug: external_exports2.string().optional()
33786
+ }).optional()
33787
+ });
33788
+ var LCNDomainOrOriginValidator2 = external_exports2.union([
33789
+ external_exports2.string().regex(
33390
33790
  /^(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
33391
33791
  {
33392
33792
  message: "Must be a valid domain (incl. subdomains), localhost, or IPv4, optionally with port"
@@ -33857,6 +34257,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
33857
34257
  eventType: CredentialActivityEventTypeValidator2,
33858
34258
  timestamp: external_exports2.string(),
33859
34259
  actorProfileId: external_exports2.string().optional(),
34260
+ onBehalfOf: external_exports2.string().optional(),
33860
34261
  recipientType: CredentialActivityRecipientTypeValidator2,
33861
34262
  recipientIdentifier: external_exports2.string(),
33862
34263
  boostUri: external_exports2.string().optional(),
@@ -34011,191 +34412,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
34011
34412
  const result = inAppMessagesFlagValidator2.safeParse(raw);
34012
34413
  return result.success ? result.data : EMPTY_IN_APP_MESSAGES_FLAG;
34013
34414
  }, "parseInAppMessagesFlag");
34014
- var LearnCardRefreshAuthorizationValidator2 = external_exports2.object({ type: external_exports2.literal("LearnCardDIDAuth") }).catchall(external_exports2.any());
34015
- var ManagedCredentialRefreshServiceValidator2 = external_exports2.object({
34016
- id: external_exports2.string().min(1),
34017
- type: external_exports2.literal("LearnCardCredentialRefresh2026"),
34018
- authorization: LearnCardRefreshAuthorizationValidator2.optional()
34019
- }).catchall(external_exports2.any());
34020
- var StandardCredentialRefreshServiceValidator2 = external_exports2.object({
34021
- id: external_exports2.string().min(1),
34022
- type: external_exports2.literal("1EdTechCredentialRefresh")
34023
- }).catchall(external_exports2.any());
34024
- var SupportedCredentialRefreshServiceValidator2 = external_exports2.union([
34025
- ManagedCredentialRefreshServiceValidator2,
34026
- StandardCredentialRefreshServiceValidator2
34027
- ]);
34028
- var AllocateCredentialRefreshInputValidator2 = external_exports2.object({
34029
- holder: external_exports2.object({
34030
- profileId: external_exports2.string().optional(),
34031
- did: external_exports2.string().min(1)
34032
- }),
34033
- credentialId: external_exports2.string().min(1)
34034
- });
34035
- var AllocateCredentialRefreshResultValidator2 = external_exports2.object({
34036
- refreshId: external_exports2.string().min(1),
34037
- refreshService: ManagedCredentialRefreshServiceValidator2.extend({
34038
- authorization: LearnCardRefreshAuthorizationValidator2
34039
- })
34040
- });
34041
- var CredentialRefreshSigningModeValidator2 = external_exports2.enum(["issuer-signed", "signing-authority"]);
34042
- var PublishCredentialRefreshBaseFields2 = {
34043
- refreshId: external_exports2.string().min(1),
34044
- notifyHolder: external_exports2.boolean().optional(),
34045
- updateSummary: external_exports2.string().optional(),
34046
- idempotencyKey: external_exports2.string().optional()
34047
- };
34048
- var PublishIssuerSignedRefreshValidator2 = external_exports2.object({
34049
- ...PublishCredentialRefreshBaseFields2,
34050
- mode: external_exports2.literal("issuer-signed"),
34051
- signedCredential: VCValidator2
34052
- });
34053
- var PublishSigningAuthorityRefreshValidator2 = external_exports2.object({
34054
- ...PublishCredentialRefreshBaseFields2,
34055
- mode: external_exports2.literal("signing-authority"),
34056
- credential: UnsignedVCValidator2,
34057
- signingAuthority: external_exports2.object({
34058
- type: external_exports2.string().min(1)
34059
- }).catchall(external_exports2.any())
34060
- });
34061
- var PublishCredentialRefreshInputValidator2 = external_exports2.object({
34062
- ...PublishCredentialRefreshBaseFields2,
34063
- mode: CredentialRefreshSigningModeValidator2,
34064
- signedCredential: VCValidator2.optional(),
34065
- credential: UnsignedVCValidator2.optional(),
34066
- signingAuthority: external_exports2.object({
34067
- type: external_exports2.string().min(1)
34068
- }).catchall(external_exports2.any()).optional()
34069
- }).superRefine((input, ctx) => {
34070
- if (input.mode === "issuer-signed" && !input.signedCredential) {
34071
- ctx.addIssue({
34072
- code: "custom",
34073
- path: ["signedCredential"],
34074
- message: "signedCredential is required for issuer-signed publication"
34075
- });
34076
- }
34077
- if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
34078
- ctx.addIssue({
34079
- code: "custom",
34080
- path: ["mode"],
34081
- message: "issuer-signed publication cannot include signing-authority fields"
34082
- });
34083
- }
34084
- if (input.mode === "signing-authority") {
34085
- if (input.signedCredential !== void 0) {
34086
- ctx.addIssue({
34087
- code: "custom",
34088
- path: ["signedCredential"],
34089
- message: "signing-authority publication cannot include signedCredential"
34090
- });
34091
- }
34092
- if (!input.credential) {
34093
- ctx.addIssue({
34094
- code: "custom",
34095
- path: ["credential"],
34096
- message: "credential is required for signing-authority publication"
34097
- });
34098
- }
34099
- if (!input.signingAuthority) {
34100
- ctx.addIssue({
34101
- code: "custom",
34102
- path: ["signingAuthority"],
34103
- message: "signingAuthority is required for signing-authority publication"
34104
- });
34105
- }
34106
- }
34107
- });
34108
- var PublishCredentialRefreshNotificationValidator2 = external_exports2.enum([
34109
- "queued",
34110
- "suppressed",
34111
- "not-applicable",
34112
- /** Publication succeeded, but the post-commit notification enqueue must be retried. */
34113
- "delivery-failed"
34114
- ]);
34115
- var PublishCredentialRefreshResultValidator2 = external_exports2.object({
34116
- refreshId: external_exports2.string().min(1),
34117
- version: external_exports2.number().int().positive(),
34118
- publishedAt: external_exports2.string().min(1),
34119
- notification: PublishCredentialRefreshNotificationValidator2
34120
- });
34121
- var CredentialRefreshVersionMetadataValidator2 = external_exports2.object({
34122
- version: external_exports2.number().int().positive(),
34123
- publishedAt: external_exports2.string().min(1),
34124
- effectiveAt: external_exports2.string().optional(),
34125
- etag: external_exports2.string().optional(),
34126
- signingMode: CredentialRefreshSigningModeValidator2.optional(),
34127
- updateSummary: external_exports2.string().optional()
34128
- });
34129
- var GetCredentialRefreshHistoryInputValidator2 = external_exports2.object({
34130
- refreshId: external_exports2.string().min(1),
34131
- cursor: external_exports2.string().optional(),
34132
- limit: external_exports2.number().int().positive().optional()
34133
- });
34134
- var GetCredentialRefreshHistoryResultValidator2 = external_exports2.object({
34135
- records: CredentialRefreshVersionMetadataValidator2.array(),
34136
- hasMore: external_exports2.boolean(),
34137
- cursor: external_exports2.string().optional()
34138
- });
34139
- var CredentialRefreshChallengeValidator2 = external_exports2.object({
34140
- challenge: external_exports2.string().min(1),
34141
- expiresAt: external_exports2.string().min(1),
34142
- domain: external_exports2.string().optional(),
34143
- scheme: external_exports2.literal("LearnCardDIDAuth").optional()
34144
- });
34145
- var PublicCredentialRefreshEnvelopeValidator2 = external_exports2.object({
34146
- format: external_exports2.literal("vc"),
34147
- credential: VCValidator2,
34148
- etag: external_exports2.string().optional()
34149
- });
34150
- var JweCredentialRefreshEnvelopeValidator2 = external_exports2.object({
34151
- format: external_exports2.literal("jwe"),
34152
- jwe: JWEValidator2,
34153
- etag: external_exports2.string().optional(),
34154
- /** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
34155
- version: external_exports2.number().int().positive().optional()
34156
- });
34157
- var CredentialRefreshResponseEnvelopeValidator2 = external_exports2.discriminatedUnion("format", [
34158
- PublicCredentialRefreshEnvelopeValidator2,
34159
- JweCredentialRefreshEnvelopeValidator2
34160
- ]);
34161
- var CredentialRefreshFailureCodeValidator2 = external_exports2.enum([
34162
- "UNAVAILABLE",
34163
- "TIMEOUT",
34164
- "UNSUPPORTED_SERVICE",
34165
- "UNAUTHORIZED",
34166
- "MALFORMED_RESPONSE",
34167
- "INVALID_PROOF",
34168
- "ISSUER_MISMATCH",
34169
- "ID_MISMATCH",
34170
- "ROLLBACK",
34171
- "REVOKED",
34172
- "UNSAFE_ENDPOINT"
34173
- ]);
34174
- var CredentialRefreshUpdatedResultValidator2 = external_exports2.object({
34175
- status: external_exports2.literal("updated"),
34176
- credential: VCValidator2,
34177
- etag: external_exports2.string().optional(),
34178
- managedVersion: external_exports2.number().int().positive().optional()
34179
- });
34180
- var CredentialRefreshUnchangedResultValidator2 = external_exports2.object({
34181
- status: external_exports2.literal("unchanged"),
34182
- checkedAt: external_exports2.string().min(1),
34183
- etag: external_exports2.string().optional()
34184
- });
34185
- var CredentialRefreshUnsupportedResultValidator2 = external_exports2.object({
34186
- status: external_exports2.literal("unsupported")
34187
- });
34188
- var CredentialRefreshFailedResultValidator2 = external_exports2.object({
34189
- status: external_exports2.literal("failed"),
34190
- code: CredentialRefreshFailureCodeValidator2,
34191
- retryable: external_exports2.boolean()
34192
- });
34193
- var CredentialRefreshResultValidator2 = external_exports2.discriminatedUnion("status", [
34194
- CredentialRefreshUpdatedResultValidator2,
34195
- CredentialRefreshUnchangedResultValidator2,
34196
- CredentialRefreshUnsupportedResultValidator2,
34197
- CredentialRefreshFailedResultValidator2
34198
- ]);
34199
34415
  }
34200
34416
  });
34201
34417
  var require_dist = __commonJS({
@@ -34491,6 +34707,18 @@ var ImageWithLoadingStateValdator = external_exports.object({
34491
34707
  });
34492
34708
  var import_types2 = __toESM(require_dist());
34493
34709
  var import_types22 = __toESM(require_dist());
34710
+ var MANAGED_REFRESH_TYPE_TERM = "LearnCardCredentialRefresh2026";
34711
+ var MANAGED_REFRESH_DID_AUTH_TERM = "LearnCardDIDAuth";
34712
+ var MANAGED_REFRESH_TYPE_IRI = "https://learncard.com/refresh#LearnCardCredentialRefresh2026";
34713
+ var MANAGED_REFRESH_AUTHORIZATION_IRI = "https://purl.imsglobal.org/spec/ob/v3p0#authorization";
34714
+ var MANAGED_REFRESH_DID_AUTH_IRI = "https://docs.learncard.com/definitions#LearnCardDIDAuth";
34715
+ var MANAGED_REFRESH_SERVICE_CONTEXT = {
34716
+ [MANAGED_REFRESH_TYPE_TERM]: MANAGED_REFRESH_TYPE_IRI,
34717
+ authorization: {
34718
+ "@id": MANAGED_REFRESH_AUTHORIZATION_IRI,
34719
+ "@context": { [MANAGED_REFRESH_DID_AUTH_TERM]: MANAGED_REFRESH_DID_AUTH_IRI }
34720
+ }
34721
+ };
34494
34722
  var _a4;
34495
34723
  var EnvironmentConfigurationError = (_a4 = class extends Error {
34496
34724
  constructor(message) {
@@ -34663,14 +34891,22 @@ var UnsignedVCValidator = external_exports.object({
34663
34891
  }).catchall(external_exports.any());
34664
34892
  var ProofValidator = external_exports.object({
34665
34893
  type: external_exports.string(),
34666
- created: external_exports.string(),
34894
+ created: external_exports.string().optional(),
34667
34895
  challenge: external_exports.string().optional(),
34668
34896
  domain: external_exports.string().optional(),
34669
34897
  nonce: external_exports.string().optional(),
34670
34898
  proofPurpose: external_exports.string(),
34671
34899
  verificationMethod: external_exports.string(),
34672
34900
  jws: external_exports.string().optional()
34673
- }).catchall(external_exports.any());
34901
+ }).catchall(external_exports.any()).superRefine((proof, ctx) => {
34902
+ if (proof.created === void 0 && (proof.type !== "DataIntegrityProof" || proof.cryptosuite !== "ecdsa-rdfc-2019")) {
34903
+ ctx.addIssue({
34904
+ code: "custom",
34905
+ path: ["created"],
34906
+ message: "created is required for this proof suite"
34907
+ });
34908
+ }
34909
+ });
34674
34910
  var VCValidator = UnsignedVCValidator.extend({
34675
34911
  proof: ProofValidator.or(ProofValidator.array())
34676
34912
  });
@@ -35105,21 +35341,219 @@ var StringQuery = external_exports.union([
35105
35341
  $or: BaseStringQuery.array()
35106
35342
  })
35107
35343
  ]);
35108
- var LCNProfileDisplayValidator = external_exports.object({
35109
- backgroundColor: external_exports.string().optional(),
35110
- backgroundImage: external_exports.string().optional(),
35111
- fadeBackgroundImage: external_exports.boolean().optional(),
35112
- repeatBackgroundImage: external_exports.boolean().optional(),
35113
- fontColor: external_exports.string().optional(),
35114
- accentColor: external_exports.string().optional(),
35115
- accentFontColor: external_exports.string().optional(),
35116
- idBackgroundImage: external_exports.string().optional(),
35117
- fadeIdBackgroundImage: external_exports.boolean().optional(),
35118
- idBackgroundColor: external_exports.string().optional(),
35119
- repeatIdBackgroundImage: external_exports.boolean().optional()
35120
- });
35121
- var ProfileVisibilityEnum = external_exports.enum(["public", "connections_only", "private"]);
35122
- var AllowConnectionRequestsEnum = external_exports.enum(["anyone", "invite_only"]);
35344
+ var LearnCardRefreshAuthorizationValidator = external_exports.object({ type: external_exports.literal("LearnCardDIDAuth") }).catchall(external_exports.any());
35345
+ var ManagedCredentialRefreshServiceValidator = external_exports.object({
35346
+ id: external_exports.string().min(1),
35347
+ type: external_exports.literal("LearnCardCredentialRefresh2026"),
35348
+ authorization: LearnCardRefreshAuthorizationValidator.optional()
35349
+ }).catchall(external_exports.any());
35350
+ var StandardCredentialRefreshServiceValidator = external_exports.object({
35351
+ id: external_exports.string().min(1),
35352
+ type: external_exports.literal("1EdTechCredentialRefresh")
35353
+ }).catchall(external_exports.any());
35354
+ var SupportedCredentialRefreshServiceValidator = external_exports.union([
35355
+ ManagedCredentialRefreshServiceValidator,
35356
+ StandardCredentialRefreshServiceValidator
35357
+ ]);
35358
+ var AllocateCredentialRefreshInputValidator = external_exports.object({
35359
+ holder: external_exports.object({
35360
+ profileId: external_exports.string().optional(),
35361
+ did: external_exports.string().min(1)
35362
+ }),
35363
+ credentialId: external_exports.string().min(1)
35364
+ });
35365
+ var AllocateCredentialRefreshResultValidator = external_exports.object({
35366
+ refreshId: external_exports.string().min(1),
35367
+ refreshService: ManagedCredentialRefreshServiceValidator.extend({
35368
+ authorization: LearnCardRefreshAuthorizationValidator
35369
+ })
35370
+ });
35371
+ var ManagedCredentialRefreshReceiptValidator = external_exports.object({
35372
+ refreshId: external_exports.string().min(1),
35373
+ refreshService: ManagedCredentialRefreshServiceValidator,
35374
+ credentialId: external_exports.string().min(1),
35375
+ issuerDid: external_exports.string().min(1),
35376
+ holderDid: external_exports.string().min(1),
35377
+ credentialStatus: CredentialStatusValidator.or(
35378
+ CredentialStatusValidator.array()
35379
+ ).optional()
35380
+ }).strip();
35381
+ var InboxCredentialRefreshReceiptValidator = ManagedCredentialRefreshReceiptValidator.omit(
35382
+ { holderDid: true }
35383
+ ).extend({ holderDid: external_exports.string().min(1).optional() });
35384
+ var CredentialRefreshSigningModeValidator = external_exports.enum(["issuer-signed", "signing-authority"]);
35385
+ var PublishCredentialRefreshBaseFields = {
35386
+ refreshId: external_exports.string().min(1),
35387
+ notifyHolder: external_exports.boolean().optional(),
35388
+ updateSummary: external_exports.string().optional(),
35389
+ idempotencyKey: external_exports.string().optional()
35390
+ };
35391
+ var PublishIssuerSignedRefreshValidator = external_exports.object({
35392
+ ...PublishCredentialRefreshBaseFields,
35393
+ mode: external_exports.literal("issuer-signed"),
35394
+ signedCredential: VCValidator
35395
+ });
35396
+ var PublishSigningAuthorityRefreshValidator = external_exports.object({
35397
+ ...PublishCredentialRefreshBaseFields,
35398
+ mode: external_exports.literal("signing-authority"),
35399
+ credential: UnsignedVCValidator,
35400
+ signingAuthority: external_exports.object({
35401
+ type: external_exports.string().min(1)
35402
+ }).catchall(external_exports.any())
35403
+ });
35404
+ var PublishCredentialRefreshInputValidator = external_exports.object({
35405
+ ...PublishCredentialRefreshBaseFields,
35406
+ mode: CredentialRefreshSigningModeValidator,
35407
+ signedCredential: VCValidator.optional(),
35408
+ credential: UnsignedVCValidator.optional(),
35409
+ signingAuthority: external_exports.object({
35410
+ type: external_exports.string().min(1)
35411
+ }).catchall(external_exports.any()).optional()
35412
+ }).superRefine((input, ctx) => {
35413
+ if (input.mode === "issuer-signed" && !input.signedCredential) {
35414
+ ctx.addIssue({
35415
+ code: "custom",
35416
+ path: ["signedCredential"],
35417
+ message: "signedCredential is required for issuer-signed publication"
35418
+ });
35419
+ }
35420
+ if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
35421
+ ctx.addIssue({
35422
+ code: "custom",
35423
+ path: ["mode"],
35424
+ message: "issuer-signed publication cannot include signing-authority fields"
35425
+ });
35426
+ }
35427
+ if (input.mode === "signing-authority") {
35428
+ if (input.signedCredential !== void 0) {
35429
+ ctx.addIssue({
35430
+ code: "custom",
35431
+ path: ["signedCredential"],
35432
+ message: "signing-authority publication cannot include signedCredential"
35433
+ });
35434
+ }
35435
+ if (!input.credential) {
35436
+ ctx.addIssue({
35437
+ code: "custom",
35438
+ path: ["credential"],
35439
+ message: "credential is required for signing-authority publication"
35440
+ });
35441
+ }
35442
+ if (!input.signingAuthority) {
35443
+ ctx.addIssue({
35444
+ code: "custom",
35445
+ path: ["signingAuthority"],
35446
+ message: "signingAuthority is required for signing-authority publication"
35447
+ });
35448
+ }
35449
+ }
35450
+ });
35451
+ var PublishCredentialRefreshNotificationValidator = external_exports.enum([
35452
+ "queued",
35453
+ "suppressed",
35454
+ "not-applicable",
35455
+ /** Publication succeeded, but the post-commit notification enqueue must be retried. */
35456
+ "delivery-failed"
35457
+ ]);
35458
+ var PublishCredentialRefreshResultValidator = external_exports.object({
35459
+ refreshId: external_exports.string().min(1),
35460
+ version: external_exports.number().int().positive(),
35461
+ publishedAt: external_exports.string().min(1),
35462
+ notification: PublishCredentialRefreshNotificationValidator
35463
+ });
35464
+ var CredentialRefreshVersionMetadataValidator = external_exports.object({
35465
+ version: external_exports.number().int().positive(),
35466
+ publishedAt: external_exports.string().min(1),
35467
+ effectiveAt: external_exports.string().optional(),
35468
+ etag: external_exports.string().optional(),
35469
+ signingMode: CredentialRefreshSigningModeValidator.optional(),
35470
+ updateSummary: external_exports.string().optional()
35471
+ });
35472
+ var GetCredentialRefreshHistoryInputValidator = external_exports.object({
35473
+ refreshId: external_exports.string().min(1),
35474
+ cursor: external_exports.string().optional(),
35475
+ limit: external_exports.number().int().positive().optional()
35476
+ });
35477
+ var GetCredentialRefreshHistoryResultValidator = external_exports.object({
35478
+ records: CredentialRefreshVersionMetadataValidator.array(),
35479
+ hasMore: external_exports.boolean(),
35480
+ cursor: external_exports.string().optional()
35481
+ });
35482
+ var CredentialRefreshChallengeValidator = external_exports.object({
35483
+ challenge: external_exports.string().min(1),
35484
+ expiresAt: external_exports.string().min(1),
35485
+ domain: external_exports.string().optional(),
35486
+ scheme: external_exports.literal("LearnCardDIDAuth").optional()
35487
+ });
35488
+ var PublicCredentialRefreshEnvelopeValidator = external_exports.object({
35489
+ format: external_exports.literal("vc"),
35490
+ credential: VCValidator,
35491
+ etag: external_exports.string().optional()
35492
+ });
35493
+ var JweCredentialRefreshEnvelopeValidator = external_exports.object({
35494
+ format: external_exports.literal("jwe"),
35495
+ jwe: JWEValidator,
35496
+ etag: external_exports.string().optional(),
35497
+ /** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
35498
+ version: external_exports.number().int().positive().optional()
35499
+ });
35500
+ var CredentialRefreshResponseEnvelopeValidator = external_exports.discriminatedUnion("format", [
35501
+ PublicCredentialRefreshEnvelopeValidator,
35502
+ JweCredentialRefreshEnvelopeValidator
35503
+ ]);
35504
+ var CredentialRefreshFailureCodeValidator = external_exports.enum([
35505
+ "UNAVAILABLE",
35506
+ "TIMEOUT",
35507
+ "UNSUPPORTED_SERVICE",
35508
+ "UNAUTHORIZED",
35509
+ "MALFORMED_RESPONSE",
35510
+ "INVALID_PROOF",
35511
+ "ISSUER_MISMATCH",
35512
+ "ID_MISMATCH",
35513
+ "ROLLBACK",
35514
+ "REVOKED",
35515
+ "UNSAFE_ENDPOINT"
35516
+ ]);
35517
+ var CredentialRefreshUpdatedResultValidator = external_exports.object({
35518
+ status: external_exports.literal("updated"),
35519
+ credential: VCValidator,
35520
+ etag: external_exports.string().optional(),
35521
+ managedVersion: external_exports.number().int().positive().optional()
35522
+ });
35523
+ var CredentialRefreshUnchangedResultValidator = external_exports.object({
35524
+ status: external_exports.literal("unchanged"),
35525
+ checkedAt: external_exports.string().min(1),
35526
+ etag: external_exports.string().optional()
35527
+ });
35528
+ var CredentialRefreshUnsupportedResultValidator = external_exports.object({
35529
+ status: external_exports.literal("unsupported")
35530
+ });
35531
+ var CredentialRefreshFailedResultValidator = external_exports.object({
35532
+ status: external_exports.literal("failed"),
35533
+ code: CredentialRefreshFailureCodeValidator,
35534
+ retryable: external_exports.boolean()
35535
+ });
35536
+ var CredentialRefreshResultValidator = external_exports.discriminatedUnion("status", [
35537
+ CredentialRefreshUpdatedResultValidator,
35538
+ CredentialRefreshUnchangedResultValidator,
35539
+ CredentialRefreshUnsupportedResultValidator,
35540
+ CredentialRefreshFailedResultValidator
35541
+ ]);
35542
+ var LCNProfileDisplayValidator = external_exports.object({
35543
+ backgroundColor: external_exports.string().optional(),
35544
+ backgroundImage: external_exports.string().optional(),
35545
+ fadeBackgroundImage: external_exports.boolean().optional(),
35546
+ repeatBackgroundImage: external_exports.boolean().optional(),
35547
+ fontColor: external_exports.string().optional(),
35548
+ accentColor: external_exports.string().optional(),
35549
+ accentFontColor: external_exports.string().optional(),
35550
+ idBackgroundImage: external_exports.string().optional(),
35551
+ fadeIdBackgroundImage: external_exports.boolean().optional(),
35552
+ idBackgroundColor: external_exports.string().optional(),
35553
+ repeatIdBackgroundImage: external_exports.boolean().optional()
35554
+ });
35555
+ var ProfileVisibilityEnum = external_exports.enum(["public", "connections_only", "private"]);
35556
+ var AllowConnectionRequestsEnum = external_exports.enum(["anyone", "invite_only"]);
35123
35557
  var LCNProfileValidator = external_exports.object({
35124
35558
  profileId: external_exports.string().min(3).max(40).describe("Unique, URL-safe identifier for the profile."),
35125
35559
  displayName: external_exports.string().default("").describe("Human-readable display name for the profile."),
@@ -35440,7 +35874,13 @@ var SendBoostInputValidator = external_exports.object({
35440
35874
  "Options for email/phone recipients (Universal Inbox)"
35441
35875
  ),
35442
35876
  templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
35443
- integrationId: external_exports.string().optional().describe("Integration ID for activity tracking")
35877
+ integrationId: external_exports.string().optional().describe("Integration ID for activity tracking"),
35878
+ refresh: external_exports.boolean().optional().describe(
35879
+ "Request managed credential refresh for this send. Profile/DID recipients use immediate issuance; email/phone recipients use deferred Universal Inbox signing and bind the holder at claim."
35880
+ ),
35881
+ idempotencyKey: external_exports.string().min(1).max(200).optional().describe(
35882
+ "Caller-chosen key that makes a managed refresh send (refresh: true) safe to retry as a whole: retries with the same key reuse the same boost, refresh allocation and result. Reusing a key for a different request is rejected. With signedCredential, requires prior tRPC prepareRefreshableSend; direct REST callers omit the key and retry the exact signed credential and templateUri."
35883
+ )
35444
35884
  }).refine((data) => data.templateUri || data.template || data.signedCredential, {
35445
35885
  message: "Either templateUri, template, or signedCredential must be provided.",
35446
35886
  path: ["templateUri"]
@@ -35455,8 +35895,12 @@ var SendBoostInputValidator = external_exports.object({
35455
35895
  message: "guardianEmail must differ from recipient (self-approval not allowed)",
35456
35896
  path: ["options", "guardianEmail"]
35457
35897
  }
35458
- );
35898
+ ).refine((data) => !data.idempotencyKey || data.refresh === true, {
35899
+ message: "idempotencyKey is only supported with refresh: true.",
35900
+ path: ["idempotencyKey"]
35901
+ });
35459
35902
  var SendInboxResponseValidator = external_exports.object({
35903
+ refresh: InboxCredentialRefreshReceiptValidator.optional(),
35460
35904
  issuanceId: external_exports.string(),
35461
35905
  status: external_exports.enum(["PENDING", "ISSUED", "EXPIRED", "DELIVERED", "CLAIMED"]),
35462
35906
  claimUrl: external_exports.string().url().optional().describe("Present when suppressDelivery=true"),
@@ -35471,8 +35915,34 @@ var SendBoostResponseValidator = external_exports.object({
35471
35915
  activityId: external_exports.string().describe("Links to the activity lifecycle for this issuance"),
35472
35916
  inbox: SendInboxResponseValidator.optional().describe(
35473
35917
  "Present when sent via email/phone (Universal Inbox)"
35918
+ ),
35919
+ refresh: ManagedCredentialRefreshReceiptValidator.optional().describe(
35920
+ "Present when managed refresh was requested: issuance metadata the issuer keeps to publish future updates"
35474
35921
  )
35475
35922
  });
35923
+ var PrepareRefreshableSendInputValidator = external_exports.object({
35924
+ recipient: external_exports.string(),
35925
+ templateUri: external_exports.string().optional(),
35926
+ template: SendBoostTemplateValidator.optional(),
35927
+ contractUri: external_exports.string().optional(),
35928
+ templateData: external_exports.record(external_exports.string(), external_exports.unknown()).optional(),
35929
+ integrationId: external_exports.string().optional(),
35930
+ /** Credential ID to allocate for; generated server-side when omitted. */
35931
+ credentialId: external_exports.string().min(1).optional(),
35932
+ idempotencyKey: external_exports.string().min(1).max(200).optional()
35933
+ }).refine((data) => Boolean(data.templateUri) !== Boolean(data.template), {
35934
+ message: "Provide exactly one of templateUri or template."
35935
+ });
35936
+ var PrepareRefreshableSendResultValidator = external_exports.object({
35937
+ boostUri: external_exports.string(),
35938
+ credentialId: external_exports.string(),
35939
+ refreshId: external_exports.string(),
35940
+ refreshService: ManagedCredentialRefreshServiceValidator,
35941
+ /** The DID to use as credentialSubject.id (recipient DID, or the profile's did:web). */
35942
+ holderDid: external_exports.string(),
35943
+ /** Present when this idempotencyKey already completed: return it without signing. */
35944
+ completed: SendBoostResponseValidator.optional()
35945
+ });
35476
35946
  var SendInputValidator = external_exports.discriminatedUnion("type", [SendBoostInputValidator]);
35477
35947
  var SendResponseValidator = external_exports.discriminatedUnion("type", [SendBoostResponseValidator]);
35478
35948
  var ConsentFlowTermsStatusValidator = external_exports.enum(["live", "stale", "withdrawn"]);
@@ -35548,15 +36018,6 @@ var ConsentFlowContractDataValidator = external_exports.object({
35548
36018
  var PaginatedConsentFlowDataValidator = PaginationResponseValidator.extend({
35549
36019
  records: ConsentFlowContractDataValidator.array()
35550
36020
  });
35551
- var ConsentFlowContractDataForDidValidator = external_exports.object({
35552
- credentials: external_exports.object({ category: external_exports.string(), uri: external_exports.string() }).array(),
35553
- personal: external_exports.record(external_exports.string(), external_exports.string()).default({}),
35554
- date: external_exports.string(),
35555
- contractUri: external_exports.string()
35556
- });
35557
- var PaginatedConsentFlowDataForDidValidator = PaginationResponseValidator.extend({
35558
- records: ConsentFlowContractDataForDidValidator.array()
35559
- });
35560
36021
  var ConsentFlowTermValidator = external_exports.object({
35561
36022
  sharing: external_exports.boolean().optional(),
35562
36023
  shared: external_exports.string().array().optional(),
@@ -35590,6 +36051,34 @@ var PaginatedConsentFlowTermsValidator = PaginationResponseValidator.extend({
35590
36051
  status: ConsentFlowTermsStatusValidator
35591
36052
  }).array()
35592
36053
  });
36054
+ var ConsentFlowGuardianApprovalValidator = external_exports.object({
36055
+ guardianProfileId: external_exports.string(),
36056
+ guardianDid: external_exports.string(),
36057
+ approvedAt: external_exports.string().datetime(),
36058
+ contractUpdatedAt: external_exports.string()
36059
+ });
36060
+ var ConsentFlowContractDataForDidValidator = external_exports.object({
36061
+ credentials: external_exports.object({ category: external_exports.string(), uri: external_exports.string() }).array(),
36062
+ personal: external_exports.record(external_exports.string(), external_exports.string()).default({}),
36063
+ date: external_exports.string(),
36064
+ createdAt: external_exports.string().optional(),
36065
+ contractUpdatedAt: external_exports.string(),
36066
+ contractExpiresAt: external_exports.string().optional(),
36067
+ reasonForAccessing: external_exports.string().optional(),
36068
+ guardian: external_exports.object({
36069
+ required: external_exports.boolean(),
36070
+ approved: external_exports.boolean(),
36071
+ approval: ConsentFlowGuardianApprovalValidator.optional()
36072
+ }),
36073
+ contractUri: external_exports.string(),
36074
+ termsUri: external_exports.string(),
36075
+ status: ConsentFlowTermsStatusValidator,
36076
+ expiresAt: external_exports.string().optional(),
36077
+ terms: ConsentFlowTermsValidator
36078
+ });
36079
+ var PaginatedConsentFlowDataForDidValidator = PaginationResponseValidator.extend({
36080
+ records: ConsentFlowContractDataForDidValidator.array()
36081
+ });
35593
36082
  var ConsentFlowContractQueryValidator = external_exports.object({
35594
36083
  read: external_exports.object({
35595
36084
  anonymize: external_exports.boolean().optional(),
@@ -35650,6 +36139,7 @@ var ConsentFlowTransactionValidator = external_exports.object({
35650
36139
  expiresAt: external_exports.string().optional(),
35651
36140
  oneTime: external_exports.boolean().optional(),
35652
36141
  terms: ConsentFlowTermsValidator.optional(),
36142
+ guardianApproval: ConsentFlowGuardianApprovalValidator.optional(),
35653
36143
  id: external_exports.string(),
35654
36144
  action: ConsentFlowTransactionActionValidator,
35655
36145
  date: external_exports.string(),
@@ -35783,6 +36273,7 @@ var AuthGrantValidator = external_exports.object({
35783
36273
  }, "error")
35784
36274
  }),
35785
36275
  scope: external_exports.string(),
36276
+ actAs: external_exports.string().optional(),
35786
36277
  createdAt: external_exports.iso.datetime({ error: "createdAt must be a valid ISO 8601 datetime string" }),
35787
36278
  expiresAt: external_exports.iso.datetime({ error: "expiresAt must be a valid ISO 8601 datetime string" }).nullish().optional()
35788
36279
  });
@@ -35854,6 +36345,8 @@ var CreateContactMethodSessionResponseValidator = external_exports.object({
35854
36345
  sessionJwt: external_exports.string()
35855
36346
  });
35856
36347
  var InboxCredentialValidator = external_exports.object({
36348
+ refresh: InboxCredentialRefreshReceiptValidator.optional(),
36349
+ refreshId: external_exports.string().optional(),
35857
36350
  id: external_exports.string(),
35858
36351
  credential: external_exports.string().optional(),
35859
36352
  isSigned: external_exports.boolean(),
@@ -35908,12 +36401,19 @@ var IssueInboxCredentialValidator = external_exports.object({
35908
36401
  templateUri: external_exports.string().optional().describe(
35909
36402
  "URI of a boost template to use for issuance. The boost credential will be resolved and used. Mutually exclusive with credential field."
35910
36403
  ),
36404
+ refresh: external_exports.boolean().optional().describe(
36405
+ "Allocate managed refresh before signing. Requires unsigned content and a registered signing authority; binds the holder on claim."
36406
+ ),
36407
+ idempotencyKey: external_exports.string().min(1).max(200).optional(),
35911
36408
  // === OPTIONAL FEATURES ===
35912
36409
  // Add major, distinct features at the top level.
35913
36410
  //consentRequest: ConsentRequestValidator.optional(),
35914
36411
  // === PROCESS CONFIGURATION (Optional) ===
35915
36412
  // HOW should this issuance be handled?
35916
36413
  configuration: external_exports.object({
36414
+ guardianEmail: external_exports.string().email().optional().describe(
36415
+ "Require approval from this guardian before the recipient can claim. Must differ from the recipient email."
36416
+ ),
35917
36417
  signingAuthority: IssueInboxSigningAuthorityValidator.optional().describe(
35918
36418
  "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."
35919
36419
  ),
@@ -35967,17 +36467,130 @@ var IssueInboxCredentialValidator = external_exports.object({
35967
36467
  }).optional().describe(
35968
36468
  "Configuration for the credential issuance. If not provided, the default configuration will be used."
35969
36469
  )
36470
+ }).refine((data) => !data.idempotencyKey || data.refresh === true, {
36471
+ message: "idempotencyKey requires refresh: true."
35970
36472
  }).refine((data) => data.credential || data.templateUri, {
35971
36473
  message: "Either credential or templateUri must be provided.",
35972
36474
  path: ["credential"]
35973
- });
36475
+ }).refine(
36476
+ (data) => !data.configuration?.guardianEmail || data.recipient.type !== "email" || data.configuration.guardianEmail.toLowerCase() !== data.recipient.value.toLowerCase(),
36477
+ {
36478
+ message: "guardianEmail must differ from recipient (self-approval not allowed)",
36479
+ path: ["configuration", "guardianEmail"]
36480
+ }
36481
+ );
35974
36482
  var IssueInboxCredentialResponseValidator = external_exports.object({
36483
+ refresh: InboxCredentialRefreshReceiptValidator.optional(),
35975
36484
  issuanceId: external_exports.string(),
35976
36485
  status: LCNInboxStatusEnumValidator,
35977
36486
  recipient: ContactMethodQueryValidator,
35978
36487
  claimUrl: external_exports.string().url().optional(),
35979
36488
  recipientDid: external_exports.string().optional()
35980
36489
  });
36490
+ var InboxBatchConfigurationValidator = IssueInboxCredentialValidator.shape.configuration.unwrap().extend({
36491
+ refresh: IssueInboxCredentialValidator.shape.refresh.describe(
36492
+ "Enable managed refresh by default. An item configuration.refresh overrides this value, including false."
36493
+ ),
36494
+ delivery: IssueInboxCredentialValidator.shape.configuration.unwrap().shape.delivery.unwrap().extend({ suppress: external_exports.boolean().optional() }).optional()
36495
+ });
36496
+ var InboxBatchItemConfigurationValidator = InboxBatchConfigurationValidator.extend({
36497
+ guardianEmail: InboxBatchConfigurationValidator.shape.guardianEmail.nullable().describe(
36498
+ "Require guardian approval, or set null to clear a batch-level guardianEmail for this item."
36499
+ )
36500
+ });
36501
+ var IssueInboxCredentialBatchItemValidator = external_exports.object({
36502
+ ...IssueInboxCredentialValidator.shape,
36503
+ configuration: InboxBatchItemConfigurationValidator.optional(),
36504
+ idempotencyKey: external_exports.string().max(256).optional()
36505
+ }).refine((data) => data.credential || data.templateUri, {
36506
+ message: "Either credential or templateUri must be provided.",
36507
+ path: ["credential"]
36508
+ }).describe(
36509
+ "One issuance: provide credential or templateUri. Invalid input is rejected at submission with its item index."
36510
+ );
36511
+ var IssueInboxCredentialBatchValidator = external_exports.object({
36512
+ requestId: external_exports.string().min(1).max(256).optional(),
36513
+ items: external_exports.array(IssueInboxCredentialBatchItemValidator).min(1).max(100),
36514
+ configuration: InboxBatchConfigurationValidator.optional()
36515
+ }).superRefine((batch, ctx) => {
36516
+ batch.items.forEach((item, index) => {
36517
+ const itemGuardian = item.configuration?.guardianEmail;
36518
+ const guardian = itemGuardian === null ? void 0 : itemGuardian ?? batch.configuration?.guardianEmail;
36519
+ if (guardian && item.recipient.type === "email" && guardian.toLowerCase() === item.recipient.value.toLowerCase()) {
36520
+ ctx.addIssue({
36521
+ code: "custom",
36522
+ path: ["items", index, "configuration", "guardianEmail"],
36523
+ message: "guardianEmail must differ from recipient (self-approval not allowed)"
36524
+ });
36525
+ }
36526
+ });
36527
+ });
36528
+ var InboxBatchErrorReasonValidator = external_exports.enum([
36529
+ "DUPLICATE_KEY",
36530
+ "IDEMPOTENCY_MISMATCH",
36531
+ "IN_PROGRESS",
36532
+ "UNCONFIRMED"
36533
+ ]);
36534
+ var IssueInboxCredentialBatchItemResultValidator = external_exports.discriminatedUnion("success", [
36535
+ IssueInboxCredentialResponseValidator.extend({
36536
+ success: external_exports.literal(true),
36537
+ index: external_exports.number().int().nonnegative(),
36538
+ deduplicated: external_exports.boolean().optional(),
36539
+ guardianStatus: GuardianStatusValidator.optional(),
36540
+ idempotencyKey: external_exports.string().optional()
36541
+ }),
36542
+ external_exports.object({
36543
+ success: external_exports.literal(false),
36544
+ index: external_exports.number().int().nonnegative(),
36545
+ idempotencyKey: external_exports.string().optional(),
36546
+ recipient: ContactMethodQueryValidator.optional(),
36547
+ error: external_exports.object({
36548
+ code: external_exports.string(),
36549
+ message: external_exports.string(),
36550
+ reason: InboxBatchErrorReasonValidator.optional()
36551
+ }),
36552
+ issuanceId: external_exports.string().optional().describe(
36553
+ "Present when issuance completed but replay storage could not be confirmed. Reconcile this issuance; do not issue again with a new key."
36554
+ ),
36555
+ claimUrl: external_exports.string().url().optional().describe(
36556
+ "Claim URL of the completed issuance, if available, when replay storage could not be confirmed."
36557
+ )
36558
+ })
36559
+ ]);
36560
+ var IssueInboxCredentialBatchResponseValidator = external_exports.object({
36561
+ results: external_exports.array(IssueInboxCredentialBatchItemResultValidator),
36562
+ summary: external_exports.object({
36563
+ total: external_exports.number(),
36564
+ succeeded: external_exports.number(),
36565
+ failed: external_exports.number(),
36566
+ deduplicated: external_exports.number()
36567
+ })
36568
+ });
36569
+ var InboxBatchReceiptValidator = external_exports.object({
36570
+ batchId: external_exports.string(),
36571
+ status: external_exports.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
36572
+ createdAt: external_exports.string()
36573
+ });
36574
+ var InboxBatchStatusValidator = external_exports.object({
36575
+ batchId: external_exports.string(),
36576
+ createdAt: external_exports.string(),
36577
+ done: external_exports.boolean().describe(
36578
+ "True when no queued or processing items remain, including unconfirmed outcomes."
36579
+ ),
36580
+ status: external_exports.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
36581
+ items: external_exports.array(
36582
+ external_exports.object({
36583
+ index: external_exports.number().int().nonnegative(),
36584
+ state: external_exports.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
36585
+ result: IssueInboxCredentialBatchItemResultValidator.optional()
36586
+ })
36587
+ ),
36588
+ summary: IssueInboxCredentialBatchResponseValidator.shape.summary.extend({
36589
+ completed: external_exports.number(),
36590
+ pending: external_exports.number(),
36591
+ unconfirmed: external_exports.number()
36592
+ })
36593
+ });
35981
36594
  var CredentialNameRefValidator = external_exports.object({ name: external_exports.string() }).passthrough();
35982
36595
  var ClaimInboxCredentialValidator = external_exports.object({
35983
36596
  credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).or(CredentialNameRefValidator).describe("The credential to issue, or a { name } reference to resolve a boost template."),
@@ -36463,6 +37076,7 @@ var CredentialActivityValidator = external_exports.object({
36463
37076
  eventType: CredentialActivityEventTypeValidator,
36464
37077
  timestamp: external_exports.string(),
36465
37078
  actorProfileId: external_exports.string().optional(),
37079
+ onBehalfOf: external_exports.string().optional(),
36466
37080
  recipientType: CredentialActivityRecipientTypeValidator,
36467
37081
  recipientIdentifier: external_exports.string(),
36468
37082
  boostUri: external_exports.string().optional(),
@@ -36612,191 +37226,6 @@ var inAppMessagesFlagValidator = external_exports.object({
36612
37226
  version: external_exports.number().default(1),
36613
37227
  messages: external_exports.array(inAppMessageValidator).default([])
36614
37228
  }).passthrough();
36615
- var LearnCardRefreshAuthorizationValidator = external_exports.object({ type: external_exports.literal("LearnCardDIDAuth") }).catchall(external_exports.any());
36616
- var ManagedCredentialRefreshServiceValidator = external_exports.object({
36617
- id: external_exports.string().min(1),
36618
- type: external_exports.literal("LearnCardCredentialRefresh2026"),
36619
- authorization: LearnCardRefreshAuthorizationValidator.optional()
36620
- }).catchall(external_exports.any());
36621
- var StandardCredentialRefreshServiceValidator = external_exports.object({
36622
- id: external_exports.string().min(1),
36623
- type: external_exports.literal("1EdTechCredentialRefresh")
36624
- }).catchall(external_exports.any());
36625
- var SupportedCredentialRefreshServiceValidator = external_exports.union([
36626
- ManagedCredentialRefreshServiceValidator,
36627
- StandardCredentialRefreshServiceValidator
36628
- ]);
36629
- var AllocateCredentialRefreshInputValidator = external_exports.object({
36630
- holder: external_exports.object({
36631
- profileId: external_exports.string().optional(),
36632
- did: external_exports.string().min(1)
36633
- }),
36634
- credentialId: external_exports.string().min(1)
36635
- });
36636
- var AllocateCredentialRefreshResultValidator = external_exports.object({
36637
- refreshId: external_exports.string().min(1),
36638
- refreshService: ManagedCredentialRefreshServiceValidator.extend({
36639
- authorization: LearnCardRefreshAuthorizationValidator
36640
- })
36641
- });
36642
- var CredentialRefreshSigningModeValidator = external_exports.enum(["issuer-signed", "signing-authority"]);
36643
- var PublishCredentialRefreshBaseFields = {
36644
- refreshId: external_exports.string().min(1),
36645
- notifyHolder: external_exports.boolean().optional(),
36646
- updateSummary: external_exports.string().optional(),
36647
- idempotencyKey: external_exports.string().optional()
36648
- };
36649
- var PublishIssuerSignedRefreshValidator = external_exports.object({
36650
- ...PublishCredentialRefreshBaseFields,
36651
- mode: external_exports.literal("issuer-signed"),
36652
- signedCredential: VCValidator
36653
- });
36654
- var PublishSigningAuthorityRefreshValidator = external_exports.object({
36655
- ...PublishCredentialRefreshBaseFields,
36656
- mode: external_exports.literal("signing-authority"),
36657
- credential: UnsignedVCValidator,
36658
- signingAuthority: external_exports.object({
36659
- type: external_exports.string().min(1)
36660
- }).catchall(external_exports.any())
36661
- });
36662
- var PublishCredentialRefreshInputValidator = external_exports.object({
36663
- ...PublishCredentialRefreshBaseFields,
36664
- mode: CredentialRefreshSigningModeValidator,
36665
- signedCredential: VCValidator.optional(),
36666
- credential: UnsignedVCValidator.optional(),
36667
- signingAuthority: external_exports.object({
36668
- type: external_exports.string().min(1)
36669
- }).catchall(external_exports.any()).optional()
36670
- }).superRefine((input, ctx) => {
36671
- if (input.mode === "issuer-signed" && !input.signedCredential) {
36672
- ctx.addIssue({
36673
- code: "custom",
36674
- path: ["signedCredential"],
36675
- message: "signedCredential is required for issuer-signed publication"
36676
- });
36677
- }
36678
- if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
36679
- ctx.addIssue({
36680
- code: "custom",
36681
- path: ["mode"],
36682
- message: "issuer-signed publication cannot include signing-authority fields"
36683
- });
36684
- }
36685
- if (input.mode === "signing-authority") {
36686
- if (input.signedCredential !== void 0) {
36687
- ctx.addIssue({
36688
- code: "custom",
36689
- path: ["signedCredential"],
36690
- message: "signing-authority publication cannot include signedCredential"
36691
- });
36692
- }
36693
- if (!input.credential) {
36694
- ctx.addIssue({
36695
- code: "custom",
36696
- path: ["credential"],
36697
- message: "credential is required for signing-authority publication"
36698
- });
36699
- }
36700
- if (!input.signingAuthority) {
36701
- ctx.addIssue({
36702
- code: "custom",
36703
- path: ["signingAuthority"],
36704
- message: "signingAuthority is required for signing-authority publication"
36705
- });
36706
- }
36707
- }
36708
- });
36709
- var PublishCredentialRefreshNotificationValidator = external_exports.enum([
36710
- "queued",
36711
- "suppressed",
36712
- "not-applicable",
36713
- /** Publication succeeded, but the post-commit notification enqueue must be retried. */
36714
- "delivery-failed"
36715
- ]);
36716
- var PublishCredentialRefreshResultValidator = external_exports.object({
36717
- refreshId: external_exports.string().min(1),
36718
- version: external_exports.number().int().positive(),
36719
- publishedAt: external_exports.string().min(1),
36720
- notification: PublishCredentialRefreshNotificationValidator
36721
- });
36722
- var CredentialRefreshVersionMetadataValidator = external_exports.object({
36723
- version: external_exports.number().int().positive(),
36724
- publishedAt: external_exports.string().min(1),
36725
- effectiveAt: external_exports.string().optional(),
36726
- etag: external_exports.string().optional(),
36727
- signingMode: CredentialRefreshSigningModeValidator.optional(),
36728
- updateSummary: external_exports.string().optional()
36729
- });
36730
- var GetCredentialRefreshHistoryInputValidator = external_exports.object({
36731
- refreshId: external_exports.string().min(1),
36732
- cursor: external_exports.string().optional(),
36733
- limit: external_exports.number().int().positive().optional()
36734
- });
36735
- var GetCredentialRefreshHistoryResultValidator = external_exports.object({
36736
- records: CredentialRefreshVersionMetadataValidator.array(),
36737
- hasMore: external_exports.boolean(),
36738
- cursor: external_exports.string().optional()
36739
- });
36740
- var CredentialRefreshChallengeValidator = external_exports.object({
36741
- challenge: external_exports.string().min(1),
36742
- expiresAt: external_exports.string().min(1),
36743
- domain: external_exports.string().optional(),
36744
- scheme: external_exports.literal("LearnCardDIDAuth").optional()
36745
- });
36746
- var PublicCredentialRefreshEnvelopeValidator = external_exports.object({
36747
- format: external_exports.literal("vc"),
36748
- credential: VCValidator,
36749
- etag: external_exports.string().optional()
36750
- });
36751
- var JweCredentialRefreshEnvelopeValidator = external_exports.object({
36752
- format: external_exports.literal("jwe"),
36753
- jwe: JWEValidator,
36754
- etag: external_exports.string().optional(),
36755
- /** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
36756
- version: external_exports.number().int().positive().optional()
36757
- });
36758
- var CredentialRefreshResponseEnvelopeValidator = external_exports.discriminatedUnion("format", [
36759
- PublicCredentialRefreshEnvelopeValidator,
36760
- JweCredentialRefreshEnvelopeValidator
36761
- ]);
36762
- var CredentialRefreshFailureCodeValidator = external_exports.enum([
36763
- "UNAVAILABLE",
36764
- "TIMEOUT",
36765
- "UNSUPPORTED_SERVICE",
36766
- "UNAUTHORIZED",
36767
- "MALFORMED_RESPONSE",
36768
- "INVALID_PROOF",
36769
- "ISSUER_MISMATCH",
36770
- "ID_MISMATCH",
36771
- "ROLLBACK",
36772
- "REVOKED",
36773
- "UNSAFE_ENDPOINT"
36774
- ]);
36775
- var CredentialRefreshUpdatedResultValidator = external_exports.object({
36776
- status: external_exports.literal("updated"),
36777
- credential: VCValidator,
36778
- etag: external_exports.string().optional(),
36779
- managedVersion: external_exports.number().int().positive().optional()
36780
- });
36781
- var CredentialRefreshUnchangedResultValidator = external_exports.object({
36782
- status: external_exports.literal("unchanged"),
36783
- checkedAt: external_exports.string().min(1),
36784
- etag: external_exports.string().optional()
36785
- });
36786
- var CredentialRefreshUnsupportedResultValidator = external_exports.object({
36787
- status: external_exports.literal("unsupported")
36788
- });
36789
- var CredentialRefreshFailedResultValidator = external_exports.object({
36790
- status: external_exports.literal("failed"),
36791
- code: CredentialRefreshFailureCodeValidator,
36792
- retryable: external_exports.boolean()
36793
- });
36794
- var CredentialRefreshResultValidator = external_exports.discriminatedUnion("status", [
36795
- CredentialRefreshUpdatedResultValidator,
36796
- CredentialRefreshUnchangedResultValidator,
36797
- CredentialRefreshUnsupportedResultValidator,
36798
- CredentialRefreshFailedResultValidator
36799
- ]);
36800
37229
 
36801
37230
  // src/read.ts
36802
37231
  var isTemplateRenderMethod = /* @__PURE__ */ __name((rm) => TemplateRenderMethodValidator.safeParse(rm).success, "isTemplateRenderMethod");