@learncard/react 2.12.6 → 2.12.7

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.
Files changed (99) hide show
  1. package/dist/cjs/{BoostGenericCard-eba2c7f3.js → BoostGenericCard-470b0e5a.js} +4 -4
  2. package/dist/cjs/BoostGenericCard-470b0e5a.js.map +1 -0
  3. package/dist/cjs/{CertificateDisplayCard-e66ebcfb.js → CertificateDisplayCard-230b3faf.js} +3 -3
  4. package/dist/cjs/{CertificateDisplayCard-e66ebcfb.js.map → CertificateDisplayCard-230b3faf.js.map} +1 -1
  5. package/dist/cjs/{MeritBadgeDisplayCard-10badbae.js → MeritBadgeDisplayCard-a15ae981.js} +3 -3
  6. package/dist/cjs/{MeritBadgeDisplayCard-10badbae.js.map → MeritBadgeDisplayCard-a15ae981.js.map} +1 -1
  7. package/dist/cjs/{MeritBadgeSkillsCount-8c2a6cab.js → MeritBadgeSkillsCount-d6ee29b1.js} +2 -2
  8. package/dist/cjs/{MeritBadgeSkillsCount-8c2a6cab.js.map → MeritBadgeSkillsCount-d6ee29b1.js.map} +1 -1
  9. package/dist/cjs/{SchoolIDCard-10796199.js → SchoolIDCard-2d3cbb2c.js} +3 -1184
  10. package/dist/cjs/SchoolIDCard-2d3cbb2c.js.map +1 -0
  11. package/dist/cjs/{VCCard-cc89948b.js → VCCard-ff6aff86.js} +3 -3
  12. package/dist/cjs/{VCCard-cc89948b.js.map → VCCard-ff6aff86.js.map} +1 -1
  13. package/dist/cjs/{VCDisplayBackFace-e4107c55.js → VCDisplayBackFace-a2ffb5cf.js} +3 -3
  14. package/dist/cjs/{VCDisplayBackFace-e4107c55.js.map → VCDisplayBackFace-a2ffb5cf.js.map} +1 -1
  15. package/dist/cjs/{VCDisplayCard-0b4e99c0.js → VCDisplayCard-db565cac.js} +3 -3
  16. package/dist/cjs/{VCDisplayCard-0b4e99c0.js.map → VCDisplayCard-db565cac.js.map} +1 -1
  17. package/dist/cjs/{VCDisplayCard2-5c7c0ff7.js → VCDisplayCard2-023672a4.js} +6 -5
  18. package/dist/cjs/{VCDisplayCard2-5c7c0ff7.js.map → VCDisplayCard2-023672a4.js.map} +1 -1
  19. package/dist/cjs/{VCVerificationPill-ed387f6e.js → VCVerificationPill-0db1d7c8.js} +2 -2
  20. package/dist/cjs/{VCVerificationPill-ed387f6e.js.map → VCVerificationPill-0db1d7c8.js.map} +1 -1
  21. package/dist/cjs/{credential.helpers-9a9ad225.js → credential.helpers-88f72e5c.js} +2 -2
  22. package/dist/cjs/{credential.helpers-9a9ad225.js.map → credential.helpers-88f72e5c.js.map} +1 -1
  23. package/dist/cjs/index-47efbf5b.js +1186 -0
  24. package/dist/cjs/index-47efbf5b.js.map +1 -0
  25. package/dist/cjs/index.js +13 -12
  26. package/dist/cjs/index.js.map +1 -1
  27. package/dist/cjs/index14.js +13 -12
  28. package/dist/cjs/index14.js.map +1 -1
  29. package/dist/cjs/index22.js +4 -4
  30. package/dist/cjs/index31.js +2 -1
  31. package/dist/cjs/index31.js.map +1 -1
  32. package/dist/cjs/index39.js +10 -9
  33. package/dist/cjs/index39.js.map +1 -1
  34. package/dist/cjs/index4.js +3 -3
  35. package/dist/cjs/index40.js +4 -4
  36. package/dist/cjs/index41.js +5 -5
  37. package/dist/cjs/index42.js +6 -5
  38. package/dist/cjs/index42.js.map +1 -1
  39. package/dist/cjs/index43.js +1 -1
  40. package/dist/cjs/index46.js +2 -2
  41. package/dist/cjs/index7.js +3 -3
  42. package/dist/cjs/{types.esm-ba95174e.js → types.esm-94c6d461.js} +364 -188
  43. package/dist/cjs/types.esm-94c6d461.js.map +1 -0
  44. package/dist/esm/{BoostGenericCard-26502a81.js → BoostGenericCard-c9916371.js} +4 -4
  45. package/dist/esm/BoostGenericCard-c9916371.js.map +1 -0
  46. package/dist/esm/{CertificateDisplayCard-0de68029.js → CertificateDisplayCard-b5399522.js} +3 -3
  47. package/dist/esm/{CertificateDisplayCard-0de68029.js.map → CertificateDisplayCard-b5399522.js.map} +1 -1
  48. package/dist/esm/{MeritBadgeDisplayCard-e569e17f.js → MeritBadgeDisplayCard-58245297.js} +3 -3
  49. package/dist/esm/{MeritBadgeDisplayCard-e569e17f.js.map → MeritBadgeDisplayCard-58245297.js.map} +1 -1
  50. package/dist/esm/{MeritBadgeSkillsCount-d8d234a2.js → MeritBadgeSkillsCount-faee4025.js} +2 -2
  51. package/dist/esm/{MeritBadgeSkillsCount-d8d234a2.js.map → MeritBadgeSkillsCount-faee4025.js.map} +1 -1
  52. package/dist/esm/{SchoolIDCard-f82e40bc.js → SchoolIDCard-fbd1cf6c.js} +2 -1183
  53. package/dist/esm/SchoolIDCard-fbd1cf6c.js.map +1 -0
  54. package/dist/esm/{VCCard-6376f382.js → VCCard-d72f1f76.js} +3 -3
  55. package/dist/esm/{VCCard-6376f382.js.map → VCCard-d72f1f76.js.map} +1 -1
  56. package/dist/esm/{VCDisplayBackFace-2bf451a6.js → VCDisplayBackFace-66b2683d.js} +3 -3
  57. package/dist/esm/{VCDisplayBackFace-2bf451a6.js.map → VCDisplayBackFace-66b2683d.js.map} +1 -1
  58. package/dist/esm/{VCDisplayCard-ae88779a.js → VCDisplayCard-64896eb8.js} +3 -3
  59. package/dist/esm/{VCDisplayCard-ae88779a.js.map → VCDisplayCard-64896eb8.js.map} +1 -1
  60. package/dist/esm/{VCDisplayCard2-116d823d.js → VCDisplayCard2-54710551.js} +6 -5
  61. package/dist/esm/{VCDisplayCard2-116d823d.js.map → VCDisplayCard2-54710551.js.map} +1 -1
  62. package/dist/esm/{VCVerificationPill-7cc43650.js → VCVerificationPill-3e840476.js} +2 -2
  63. package/dist/esm/{VCVerificationPill-7cc43650.js.map → VCVerificationPill-3e840476.js.map} +1 -1
  64. package/dist/esm/{credential.helpers-d71e692a.js → credential.helpers-f4495f8f.js} +2 -2
  65. package/dist/esm/{credential.helpers-d71e692a.js.map → credential.helpers-f4495f8f.js.map} +1 -1
  66. package/dist/esm/index-cbd2e9db.js +1184 -0
  67. package/dist/esm/index-cbd2e9db.js.map +1 -0
  68. package/dist/esm/index.js +13 -12
  69. package/dist/esm/index.js.map +1 -1
  70. package/dist/esm/index14.js +13 -12
  71. package/dist/esm/index14.js.map +1 -1
  72. package/dist/esm/index22.js +4 -4
  73. package/dist/esm/index31.js +2 -1
  74. package/dist/esm/index31.js.map +1 -1
  75. package/dist/esm/index39.js +10 -9
  76. package/dist/esm/index39.js.map +1 -1
  77. package/dist/esm/index4.js +3 -3
  78. package/dist/esm/index40.js +4 -4
  79. package/dist/esm/index41.js +5 -5
  80. package/dist/esm/index42.js +6 -5
  81. package/dist/esm/index42.js.map +1 -1
  82. package/dist/esm/index43.js +1 -1
  83. package/dist/esm/index46.js +2 -2
  84. package/dist/esm/index7.js +3 -3
  85. package/dist/esm/{types.esm-35d4f5e9.js → types.esm-434cff58.js} +364 -188
  86. package/dist/esm/types.esm-434cff58.js.map +1 -0
  87. package/dist/main.css +1 -1
  88. package/dist/main.js +1 -1
  89. package/package.json +4 -4
  90. package/src/assets/styles/main.css +10 -0
  91. package/src/components/BoostGenericCard/BoostGenericCard.stories.tsx +41 -1
  92. package/src/components/BoostGenericCard/BoostGenericCard.tsx +2 -2
  93. package/src/components/BoostGenericCard/__tests__/BoostGenericCard.a11y.test.tsx +25 -0
  94. package/dist/cjs/BoostGenericCard-eba2c7f3.js.map +0 -1
  95. package/dist/cjs/SchoolIDCard-10796199.js.map +0 -1
  96. package/dist/cjs/types.esm-ba95174e.js.map +0 -1
  97. package/dist/esm/BoostGenericCard-26502a81.js.map +0 -1
  98. package/dist/esm/SchoolIDCard-f82e40bc.js.map +0 -1
  99. package/dist/esm/types.esm-35d4f5e9.js.map +0 -1
@@ -8009,6 +8009,201 @@ var StringQuery = union([
8009
8009
  $or: BaseStringQuery.array()
8010
8010
  })
8011
8011
  ]);
8012
+ var LearnCardRefreshAuthorizationValidator = object({ type: literal("LearnCardDIDAuth") }).catchall(any());
8013
+ var ManagedCredentialRefreshServiceValidator = object({
8014
+ id: string().min(1),
8015
+ type: literal("LearnCardCredentialRefresh2026"),
8016
+ authorization: LearnCardRefreshAuthorizationValidator.optional()
8017
+ }).catchall(any());
8018
+ var StandardCredentialRefreshServiceValidator = object({
8019
+ id: string().min(1),
8020
+ type: literal("1EdTechCredentialRefresh")
8021
+ }).catchall(any());
8022
+ union([
8023
+ ManagedCredentialRefreshServiceValidator,
8024
+ StandardCredentialRefreshServiceValidator
8025
+ ]);
8026
+ object({
8027
+ holder: object({
8028
+ profileId: string().optional(),
8029
+ did: string().min(1)
8030
+ }),
8031
+ credentialId: string().min(1)
8032
+ });
8033
+ object({
8034
+ refreshId: string().min(1),
8035
+ refreshService: ManagedCredentialRefreshServiceValidator.extend({
8036
+ authorization: LearnCardRefreshAuthorizationValidator
8037
+ })
8038
+ });
8039
+ var ManagedCredentialRefreshReceiptValidator = object({
8040
+ refreshId: string().min(1),
8041
+ refreshService: ManagedCredentialRefreshServiceValidator,
8042
+ credentialId: string().min(1),
8043
+ issuerDid: string().min(1),
8044
+ holderDid: string().min(1),
8045
+ credentialStatus: CredentialStatusValidator.or(
8046
+ CredentialStatusValidator.array()
8047
+ ).optional()
8048
+ }).strip();
8049
+ var InboxCredentialRefreshReceiptValidator = ManagedCredentialRefreshReceiptValidator.omit(
8050
+ { holderDid: true }
8051
+ ).extend({ holderDid: string().min(1).optional() });
8052
+ var CredentialRefreshSigningModeValidator = _enum(["issuer-signed", "signing-authority"]);
8053
+ var PublishCredentialRefreshBaseFields = {
8054
+ refreshId: string().min(1),
8055
+ notifyHolder: boolean().optional(),
8056
+ updateSummary: string().optional(),
8057
+ idempotencyKey: string().optional()
8058
+ };
8059
+ object(__spreadProps(__spreadValues({}, PublishCredentialRefreshBaseFields), {
8060
+ mode: literal("issuer-signed"),
8061
+ signedCredential: VCValidator
8062
+ }));
8063
+ object(__spreadProps(__spreadValues({}, PublishCredentialRefreshBaseFields), {
8064
+ mode: literal("signing-authority"),
8065
+ credential: UnsignedVCValidator,
8066
+ signingAuthority: object({
8067
+ type: string().min(1)
8068
+ }).catchall(any())
8069
+ }));
8070
+ object(__spreadProps(__spreadValues({}, PublishCredentialRefreshBaseFields), {
8071
+ mode: CredentialRefreshSigningModeValidator,
8072
+ signedCredential: VCValidator.optional(),
8073
+ credential: UnsignedVCValidator.optional(),
8074
+ signingAuthority: object({
8075
+ type: string().min(1)
8076
+ }).catchall(any()).optional()
8077
+ })).superRefine((input, ctx) => {
8078
+ if (input.mode === "issuer-signed" && !input.signedCredential) {
8079
+ ctx.addIssue({
8080
+ code: "custom",
8081
+ path: ["signedCredential"],
8082
+ message: "signedCredential is required for issuer-signed publication"
8083
+ });
8084
+ }
8085
+ if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
8086
+ ctx.addIssue({
8087
+ code: "custom",
8088
+ path: ["mode"],
8089
+ message: "issuer-signed publication cannot include signing-authority fields"
8090
+ });
8091
+ }
8092
+ if (input.mode === "signing-authority") {
8093
+ if (input.signedCredential !== void 0) {
8094
+ ctx.addIssue({
8095
+ code: "custom",
8096
+ path: ["signedCredential"],
8097
+ message: "signing-authority publication cannot include signedCredential"
8098
+ });
8099
+ }
8100
+ if (!input.credential) {
8101
+ ctx.addIssue({
8102
+ code: "custom",
8103
+ path: ["credential"],
8104
+ message: "credential is required for signing-authority publication"
8105
+ });
8106
+ }
8107
+ if (!input.signingAuthority) {
8108
+ ctx.addIssue({
8109
+ code: "custom",
8110
+ path: ["signingAuthority"],
8111
+ message: "signingAuthority is required for signing-authority publication"
8112
+ });
8113
+ }
8114
+ }
8115
+ });
8116
+ var PublishCredentialRefreshNotificationValidator = _enum([
8117
+ "queued",
8118
+ "suppressed",
8119
+ "not-applicable",
8120
+ /** Publication succeeded, but the post-commit notification enqueue must be retried. */
8121
+ "delivery-failed"
8122
+ ]);
8123
+ object({
8124
+ refreshId: string().min(1),
8125
+ version: number().int().positive(),
8126
+ publishedAt: string().min(1),
8127
+ notification: PublishCredentialRefreshNotificationValidator
8128
+ });
8129
+ var CredentialRefreshVersionMetadataValidator = object({
8130
+ version: number().int().positive(),
8131
+ publishedAt: string().min(1),
8132
+ effectiveAt: string().optional(),
8133
+ etag: string().optional(),
8134
+ signingMode: CredentialRefreshSigningModeValidator.optional(),
8135
+ updateSummary: string().optional()
8136
+ });
8137
+ object({
8138
+ refreshId: string().min(1),
8139
+ cursor: string().optional(),
8140
+ limit: number().int().positive().optional()
8141
+ });
8142
+ object({
8143
+ records: CredentialRefreshVersionMetadataValidator.array(),
8144
+ hasMore: boolean(),
8145
+ cursor: string().optional()
8146
+ });
8147
+ object({
8148
+ challenge: string().min(1),
8149
+ expiresAt: string().min(1),
8150
+ domain: string().optional(),
8151
+ scheme: literal("LearnCardDIDAuth").optional()
8152
+ });
8153
+ var PublicCredentialRefreshEnvelopeValidator = object({
8154
+ format: literal("vc"),
8155
+ credential: VCValidator,
8156
+ etag: string().optional()
8157
+ });
8158
+ var JweCredentialRefreshEnvelopeValidator = object({
8159
+ format: literal("jwe"),
8160
+ jwe: JWEValidator,
8161
+ etag: string().optional(),
8162
+ /** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
8163
+ version: number().int().positive().optional()
8164
+ });
8165
+ discriminatedUnion("format", [
8166
+ PublicCredentialRefreshEnvelopeValidator,
8167
+ JweCredentialRefreshEnvelopeValidator
8168
+ ]);
8169
+ var CredentialRefreshFailureCodeValidator = _enum([
8170
+ "UNAVAILABLE",
8171
+ "TIMEOUT",
8172
+ "UNSUPPORTED_SERVICE",
8173
+ "UNAUTHORIZED",
8174
+ "MALFORMED_RESPONSE",
8175
+ "INVALID_PROOF",
8176
+ "ISSUER_MISMATCH",
8177
+ "ID_MISMATCH",
8178
+ "ROLLBACK",
8179
+ "REVOKED",
8180
+ "UNSAFE_ENDPOINT"
8181
+ ]);
8182
+ var CredentialRefreshUpdatedResultValidator = object({
8183
+ status: literal("updated"),
8184
+ credential: VCValidator,
8185
+ etag: string().optional(),
8186
+ managedVersion: number().int().positive().optional()
8187
+ });
8188
+ var CredentialRefreshUnchangedResultValidator = object({
8189
+ status: literal("unchanged"),
8190
+ checkedAt: string().min(1),
8191
+ etag: string().optional()
8192
+ });
8193
+ var CredentialRefreshUnsupportedResultValidator = object({
8194
+ status: literal("unsupported")
8195
+ });
8196
+ var CredentialRefreshFailedResultValidator = object({
8197
+ status: literal("failed"),
8198
+ code: CredentialRefreshFailureCodeValidator,
8199
+ retryable: boolean()
8200
+ });
8201
+ discriminatedUnion("status", [
8202
+ CredentialRefreshUpdatedResultValidator,
8203
+ CredentialRefreshUnchangedResultValidator,
8204
+ CredentialRefreshUnsupportedResultValidator,
8205
+ CredentialRefreshFailedResultValidator
8206
+ ]);
8012
8207
  var LCNProfileDisplayValidator = object({
8013
8208
  backgroundColor: string().optional(),
8014
8209
  backgroundImage: string().optional(),
@@ -8344,7 +8539,13 @@ var SendBoostInputValidator = object({
8344
8539
  "Options for email/phone recipients (Universal Inbox)"
8345
8540
  ),
8346
8541
  templateData: record(string(), unknown()).optional(),
8347
- integrationId: string().optional().describe("Integration ID for activity tracking")
8542
+ integrationId: string().optional().describe("Integration ID for activity tracking"),
8543
+ refresh: boolean().optional().describe(
8544
+ "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."
8545
+ ),
8546
+ idempotencyKey: string().min(1).max(200).optional().describe(
8547
+ "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."
8548
+ )
8348
8549
  }).refine((data) => data.templateUri || data.template || data.signedCredential, {
8349
8550
  message: "Either templateUri, template, or signedCredential must be provided.",
8350
8551
  path: ["templateUri"]
@@ -8360,8 +8561,12 @@ var SendBoostInputValidator = object({
8360
8561
  message: "guardianEmail must differ from recipient (self-approval not allowed)",
8361
8562
  path: ["options", "guardianEmail"]
8362
8563
  }
8363
- );
8564
+ ).refine((data) => !data.idempotencyKey || data.refresh === true, {
8565
+ message: "idempotencyKey is only supported with refresh: true.",
8566
+ path: ["idempotencyKey"]
8567
+ });
8364
8568
  var SendInboxResponseValidator = object({
8569
+ refresh: InboxCredentialRefreshReceiptValidator.optional(),
8365
8570
  issuanceId: string(),
8366
8571
  status: _enum(["PENDING", "ISSUED", "EXPIRED", "DELIVERED", "CLAIMED"]),
8367
8572
  claimUrl: string().url().optional().describe("Present when suppressDelivery=true"),
@@ -8376,8 +8581,34 @@ var SendBoostResponseValidator = object({
8376
8581
  activityId: string().describe("Links to the activity lifecycle for this issuance"),
8377
8582
  inbox: SendInboxResponseValidator.optional().describe(
8378
8583
  "Present when sent via email/phone (Universal Inbox)"
8584
+ ),
8585
+ refresh: ManagedCredentialRefreshReceiptValidator.optional().describe(
8586
+ "Present when managed refresh was requested: issuance metadata the issuer keeps to publish future updates"
8379
8587
  )
8380
8588
  });
8589
+ object({
8590
+ recipient: string(),
8591
+ templateUri: string().optional(),
8592
+ template: SendBoostTemplateValidator.optional(),
8593
+ contractUri: string().optional(),
8594
+ templateData: record(string(), unknown()).optional(),
8595
+ integrationId: string().optional(),
8596
+ /** Credential ID to allocate for; generated server-side when omitted. */
8597
+ credentialId: string().min(1).optional(),
8598
+ idempotencyKey: string().min(1).max(200).optional()
8599
+ }).refine((data) => Boolean(data.templateUri) !== Boolean(data.template), {
8600
+ message: "Provide exactly one of templateUri or template."
8601
+ });
8602
+ object({
8603
+ boostUri: string(),
8604
+ credentialId: string(),
8605
+ refreshId: string(),
8606
+ refreshService: ManagedCredentialRefreshServiceValidator,
8607
+ /** The DID to use as credentialSubject.id (recipient DID, or the profile's did:web). */
8608
+ holderDid: string(),
8609
+ /** Present when this idempotencyKey already completed: return it without signing. */
8610
+ completed: SendBoostResponseValidator.optional()
8611
+ });
8381
8612
  discriminatedUnion("type", [SendBoostInputValidator]);
8382
8613
  discriminatedUnion("type", [SendBoostResponseValidator]);
8383
8614
  var ConsentFlowTermsStatusValidator = _enum(["live", "stale", "withdrawn"]);
@@ -8708,6 +8939,7 @@ object({
8708
8939
  }, "error")
8709
8940
  }),
8710
8941
  scope: string(),
8942
+ actAs: string().optional(),
8711
8943
  createdAt: datetime({ error: "createdAt must be a valid ISO 8601 datetime string" }),
8712
8944
  expiresAt: datetime({ error: "expiresAt must be a valid ISO 8601 datetime string" }).nullish().optional()
8713
8945
  });
@@ -8779,6 +9011,8 @@ object({
8779
9011
  sessionJwt: string()
8780
9012
  });
8781
9013
  var InboxCredentialValidator = object({
9014
+ refresh: InboxCredentialRefreshReceiptValidator.optional(),
9015
+ refreshId: string().optional(),
8782
9016
  id: string(),
8783
9017
  credential: string().optional(),
8784
9018
  isSigned: boolean(),
@@ -8822,7 +9056,7 @@ var IssueInboxSigningAuthorityValidator = object({
8822
9056
  endpoint: string().url(),
8823
9057
  name: string()
8824
9058
  });
8825
- object({
9059
+ var IssueInboxCredentialValidator = object({
8826
9060
  // === CORE DATA (Required) ===
8827
9061
  // WHAT is being sent and WHO is it for?
8828
9062
  recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
@@ -8833,12 +9067,19 @@ object({
8833
9067
  templateUri: string().optional().describe(
8834
9068
  "URI of a boost template to use for issuance. The boost credential will be resolved and used. Mutually exclusive with credential field."
8835
9069
  ),
9070
+ refresh: boolean().optional().describe(
9071
+ "Allocate managed refresh before signing. Requires unsigned content and a registered signing authority; binds the holder on claim."
9072
+ ),
9073
+ idempotencyKey: string().min(1).max(200).optional(),
8836
9074
  // === OPTIONAL FEATURES ===
8837
9075
  // Add major, distinct features at the top level.
8838
9076
  //consentRequest: ConsentRequestValidator.optional(),
8839
9077
  // === PROCESS CONFIGURATION (Optional) ===
8840
9078
  // HOW should this issuance be handled?
8841
9079
  configuration: object({
9080
+ guardianEmail: string().email().optional().describe(
9081
+ "Require approval from this guardian before the recipient can claim. Must differ from the recipient email."
9082
+ ),
8842
9083
  signingAuthority: IssueInboxSigningAuthorityValidator.optional().describe(
8843
9084
  "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."
8844
9085
  ),
@@ -8892,17 +9133,133 @@ object({
8892
9133
  }).optional().describe(
8893
9134
  "Configuration for the credential issuance. If not provided, the default configuration will be used."
8894
9135
  )
9136
+ }).refine((data) => !data.idempotencyKey || data.refresh === true, {
9137
+ message: "idempotencyKey requires refresh: true."
8895
9138
  }).refine((data) => data.credential || data.templateUri, {
8896
9139
  message: "Either credential or templateUri must be provided.",
8897
9140
  path: ["credential"]
8898
- });
8899
- object({
9141
+ }).refine(
9142
+ (data) => {
9143
+ var _a2;
9144
+ return !((_a2 = data.configuration) == null ? void 0 : _a2.guardianEmail) || data.recipient.type !== "email" || data.configuration.guardianEmail.toLowerCase() !== data.recipient.value.toLowerCase();
9145
+ },
9146
+ {
9147
+ message: "guardianEmail must differ from recipient (self-approval not allowed)",
9148
+ path: ["configuration", "guardianEmail"]
9149
+ }
9150
+ );
9151
+ var IssueInboxCredentialResponseValidator = object({
9152
+ refresh: InboxCredentialRefreshReceiptValidator.optional(),
8900
9153
  issuanceId: string(),
8901
9154
  status: LCNInboxStatusEnumValidator,
8902
9155
  recipient: ContactMethodQueryValidator,
8903
9156
  claimUrl: string().url().optional(),
8904
9157
  recipientDid: string().optional()
8905
9158
  });
9159
+ var InboxBatchConfigurationValidator = IssueInboxCredentialValidator.shape.configuration.unwrap().extend({
9160
+ refresh: IssueInboxCredentialValidator.shape.refresh.describe(
9161
+ "Enable managed refresh by default. An item configuration.refresh overrides this value, including false."
9162
+ ),
9163
+ delivery: IssueInboxCredentialValidator.shape.configuration.unwrap().shape.delivery.unwrap().extend({ suppress: boolean().optional() }).optional()
9164
+ });
9165
+ var InboxBatchItemConfigurationValidator = InboxBatchConfigurationValidator.extend({
9166
+ guardianEmail: InboxBatchConfigurationValidator.shape.guardianEmail.nullable().describe(
9167
+ "Require guardian approval, or set null to clear a batch-level guardianEmail for this item."
9168
+ )
9169
+ });
9170
+ var IssueInboxCredentialBatchItemValidator = object(__spreadProps(__spreadValues({}, IssueInboxCredentialValidator.shape), {
9171
+ configuration: InboxBatchItemConfigurationValidator.optional(),
9172
+ idempotencyKey: string().max(256).optional()
9173
+ })).refine((data) => data.credential || data.templateUri, {
9174
+ message: "Either credential or templateUri must be provided.",
9175
+ path: ["credential"]
9176
+ }).describe(
9177
+ "One issuance: provide credential or templateUri. Invalid input is rejected at submission with its item index."
9178
+ );
9179
+ object({
9180
+ requestId: string().min(1).max(256).optional(),
9181
+ items: array(IssueInboxCredentialBatchItemValidator).min(1).max(100),
9182
+ configuration: InboxBatchConfigurationValidator.optional()
9183
+ }).superRefine((batch, ctx) => {
9184
+ batch.items.forEach((item, index) => {
9185
+ var _a2, _b;
9186
+ const itemGuardian = (_a2 = item.configuration) == null ? void 0 : _a2.guardianEmail;
9187
+ const guardian = itemGuardian === null ? void 0 : itemGuardian != null ? itemGuardian : (_b = batch.configuration) == null ? void 0 : _b.guardianEmail;
9188
+ if (guardian && item.recipient.type === "email" && guardian.toLowerCase() === item.recipient.value.toLowerCase()) {
9189
+ ctx.addIssue({
9190
+ code: "custom",
9191
+ path: ["items", index, "configuration", "guardianEmail"],
9192
+ message: "guardianEmail must differ from recipient (self-approval not allowed)"
9193
+ });
9194
+ }
9195
+ });
9196
+ });
9197
+ var InboxBatchErrorReasonValidator = _enum([
9198
+ "DUPLICATE_KEY",
9199
+ "IDEMPOTENCY_MISMATCH",
9200
+ "IN_PROGRESS",
9201
+ "UNCONFIRMED"
9202
+ ]);
9203
+ var IssueInboxCredentialBatchItemResultValidator = discriminatedUnion("success", [
9204
+ IssueInboxCredentialResponseValidator.extend({
9205
+ success: literal(true),
9206
+ index: number().int().nonnegative(),
9207
+ deduplicated: boolean().optional(),
9208
+ guardianStatus: GuardianStatusValidator.optional(),
9209
+ idempotencyKey: string().optional()
9210
+ }),
9211
+ object({
9212
+ success: literal(false),
9213
+ index: number().int().nonnegative(),
9214
+ idempotencyKey: string().optional(),
9215
+ recipient: ContactMethodQueryValidator.optional(),
9216
+ error: object({
9217
+ code: string(),
9218
+ message: string(),
9219
+ reason: InboxBatchErrorReasonValidator.optional()
9220
+ }),
9221
+ issuanceId: string().optional().describe(
9222
+ "Present when issuance completed but replay storage could not be confirmed. Reconcile this issuance; do not issue again with a new key."
9223
+ ),
9224
+ claimUrl: string().url().optional().describe(
9225
+ "Claim URL of the completed issuance, if available, when replay storage could not be confirmed."
9226
+ )
9227
+ })
9228
+ ]);
9229
+ var IssueInboxCredentialBatchResponseValidator = object({
9230
+ results: array(IssueInboxCredentialBatchItemResultValidator),
9231
+ summary: object({
9232
+ total: number(),
9233
+ succeeded: number(),
9234
+ failed: number(),
9235
+ deduplicated: number()
9236
+ })
9237
+ });
9238
+ object({
9239
+ batchId: string(),
9240
+ status: _enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
9241
+ createdAt: string()
9242
+ });
9243
+ object({
9244
+ batchId: string(),
9245
+ createdAt: string(),
9246
+ done: boolean().describe(
9247
+ "True when no queued or processing items remain, including unconfirmed outcomes."
9248
+ ),
9249
+ status: _enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
9250
+ items: array(
9251
+ object({
9252
+ index: number().int().nonnegative(),
9253
+ state: _enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
9254
+ result: IssueInboxCredentialBatchItemResultValidator.optional()
9255
+ })
9256
+ ),
9257
+ summary: IssueInboxCredentialBatchResponseValidator.shape.summary.extend({
9258
+ completed: number(),
9259
+ pending: number(),
9260
+ unconfirmed: number()
9261
+ })
9262
+ });
8906
9263
  var CredentialNameRefValidator = object({ name: string() }).passthrough();
8907
9264
  object({
8908
9265
  credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).or(CredentialNameRefValidator).describe("The credential to issue, or a { name } reference to resolve a boost template."),
@@ -9388,6 +9745,7 @@ var CredentialActivityValidator = object({
9388
9745
  eventType: CredentialActivityEventTypeValidator,
9389
9746
  timestamp: string(),
9390
9747
  actorProfileId: string().optional(),
9748
+ onBehalfOf: string().optional(),
9391
9749
  recipientType: CredentialActivityRecipientTypeValidator,
9392
9750
  recipientIdentifier: string(),
9393
9751
  boostUri: string().optional(),
@@ -9536,188 +9894,6 @@ object({
9536
9894
  version: number().default(1),
9537
9895
  messages: array(inAppMessageValidator).default([])
9538
9896
  }).passthrough();
9539
- var LearnCardRefreshAuthorizationValidator = object({ type: literal("LearnCardDIDAuth") }).catchall(any());
9540
- var ManagedCredentialRefreshServiceValidator = object({
9541
- id: string().min(1),
9542
- type: literal("LearnCardCredentialRefresh2026"),
9543
- authorization: LearnCardRefreshAuthorizationValidator.optional()
9544
- }).catchall(any());
9545
- var StandardCredentialRefreshServiceValidator = object({
9546
- id: string().min(1),
9547
- type: literal("1EdTechCredentialRefresh")
9548
- }).catchall(any());
9549
- union([
9550
- ManagedCredentialRefreshServiceValidator,
9551
- StandardCredentialRefreshServiceValidator
9552
- ]);
9553
- object({
9554
- holder: object({
9555
- profileId: string().optional(),
9556
- did: string().min(1)
9557
- }),
9558
- credentialId: string().min(1)
9559
- });
9560
- object({
9561
- refreshId: string().min(1),
9562
- refreshService: ManagedCredentialRefreshServiceValidator.extend({
9563
- authorization: LearnCardRefreshAuthorizationValidator
9564
- })
9565
- });
9566
- var CredentialRefreshSigningModeValidator = _enum(["issuer-signed", "signing-authority"]);
9567
- var PublishCredentialRefreshBaseFields = {
9568
- refreshId: string().min(1),
9569
- notifyHolder: boolean().optional(),
9570
- updateSummary: string().optional(),
9571
- idempotencyKey: string().optional()
9572
- };
9573
- object(__spreadProps(__spreadValues({}, PublishCredentialRefreshBaseFields), {
9574
- mode: literal("issuer-signed"),
9575
- signedCredential: VCValidator
9576
- }));
9577
- object(__spreadProps(__spreadValues({}, PublishCredentialRefreshBaseFields), {
9578
- mode: literal("signing-authority"),
9579
- credential: UnsignedVCValidator,
9580
- signingAuthority: object({
9581
- type: string().min(1)
9582
- }).catchall(any())
9583
- }));
9584
- object(__spreadProps(__spreadValues({}, PublishCredentialRefreshBaseFields), {
9585
- mode: CredentialRefreshSigningModeValidator,
9586
- signedCredential: VCValidator.optional(),
9587
- credential: UnsignedVCValidator.optional(),
9588
- signingAuthority: object({
9589
- type: string().min(1)
9590
- }).catchall(any()).optional()
9591
- })).superRefine((input, ctx) => {
9592
- if (input.mode === "issuer-signed" && !input.signedCredential) {
9593
- ctx.addIssue({
9594
- code: "custom",
9595
- path: ["signedCredential"],
9596
- message: "signedCredential is required for issuer-signed publication"
9597
- });
9598
- }
9599
- if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
9600
- ctx.addIssue({
9601
- code: "custom",
9602
- path: ["mode"],
9603
- message: "issuer-signed publication cannot include signing-authority fields"
9604
- });
9605
- }
9606
- if (input.mode === "signing-authority") {
9607
- if (input.signedCredential !== void 0) {
9608
- ctx.addIssue({
9609
- code: "custom",
9610
- path: ["signedCredential"],
9611
- message: "signing-authority publication cannot include signedCredential"
9612
- });
9613
- }
9614
- if (!input.credential) {
9615
- ctx.addIssue({
9616
- code: "custom",
9617
- path: ["credential"],
9618
- message: "credential is required for signing-authority publication"
9619
- });
9620
- }
9621
- if (!input.signingAuthority) {
9622
- ctx.addIssue({
9623
- code: "custom",
9624
- path: ["signingAuthority"],
9625
- message: "signingAuthority is required for signing-authority publication"
9626
- });
9627
- }
9628
- }
9629
- });
9630
- var PublishCredentialRefreshNotificationValidator = _enum([
9631
- "queued",
9632
- "suppressed",
9633
- "not-applicable",
9634
- /** Publication succeeded, but the post-commit notification enqueue must be retried. */
9635
- "delivery-failed"
9636
- ]);
9637
- object({
9638
- refreshId: string().min(1),
9639
- version: number().int().positive(),
9640
- publishedAt: string().min(1),
9641
- notification: PublishCredentialRefreshNotificationValidator
9642
- });
9643
- var CredentialRefreshVersionMetadataValidator = object({
9644
- version: number().int().positive(),
9645
- publishedAt: string().min(1),
9646
- effectiveAt: string().optional(),
9647
- etag: string().optional(),
9648
- signingMode: CredentialRefreshSigningModeValidator.optional(),
9649
- updateSummary: string().optional()
9650
- });
9651
- object({
9652
- refreshId: string().min(1),
9653
- cursor: string().optional(),
9654
- limit: number().int().positive().optional()
9655
- });
9656
- object({
9657
- records: CredentialRefreshVersionMetadataValidator.array(),
9658
- hasMore: boolean(),
9659
- cursor: string().optional()
9660
- });
9661
- object({
9662
- challenge: string().min(1),
9663
- expiresAt: string().min(1),
9664
- domain: string().optional(),
9665
- scheme: literal("LearnCardDIDAuth").optional()
9666
- });
9667
- var PublicCredentialRefreshEnvelopeValidator = object({
9668
- format: literal("vc"),
9669
- credential: VCValidator,
9670
- etag: string().optional()
9671
- });
9672
- var JweCredentialRefreshEnvelopeValidator = object({
9673
- format: literal("jwe"),
9674
- jwe: JWEValidator,
9675
- etag: string().optional(),
9676
- /** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
9677
- version: number().int().positive().optional()
9678
- });
9679
- discriminatedUnion("format", [
9680
- PublicCredentialRefreshEnvelopeValidator,
9681
- JweCredentialRefreshEnvelopeValidator
9682
- ]);
9683
- var CredentialRefreshFailureCodeValidator = _enum([
9684
- "UNAVAILABLE",
9685
- "TIMEOUT",
9686
- "UNSUPPORTED_SERVICE",
9687
- "UNAUTHORIZED",
9688
- "MALFORMED_RESPONSE",
9689
- "INVALID_PROOF",
9690
- "ISSUER_MISMATCH",
9691
- "ID_MISMATCH",
9692
- "ROLLBACK",
9693
- "REVOKED",
9694
- "UNSAFE_ENDPOINT"
9695
- ]);
9696
- var CredentialRefreshUpdatedResultValidator = object({
9697
- status: literal("updated"),
9698
- credential: VCValidator,
9699
- etag: string().optional(),
9700
- managedVersion: number().int().positive().optional()
9701
- });
9702
- var CredentialRefreshUnchangedResultValidator = object({
9703
- status: literal("unchanged"),
9704
- checkedAt: string().min(1),
9705
- etag: string().optional()
9706
- });
9707
- var CredentialRefreshUnsupportedResultValidator = object({
9708
- status: literal("unsupported")
9709
- });
9710
- var CredentialRefreshFailedResultValidator = object({
9711
- status: literal("failed"),
9712
- code: CredentialRefreshFailureCodeValidator,
9713
- retryable: boolean()
9714
- });
9715
- discriminatedUnion("status", [
9716
- CredentialRefreshUpdatedResultValidator,
9717
- CredentialRefreshUnchangedResultValidator,
9718
- CredentialRefreshUnsupportedResultValidator,
9719
- CredentialRefreshFailedResultValidator
9720
- ]);
9721
9897
 
9722
9898
  exports.VerificationStatusEnum = VerificationStatusEnum;
9723
- //# sourceMappingURL=types.esm-ba95174e.js.map
9899
+ //# sourceMappingURL=types.esm-94c6d461.js.map