@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
@@ -3,5 +3,5 @@ import './icon.green.fat-arrow.png';
3
3
  import '@learncard/helpers';
4
4
  import './vc.check.svg';
5
5
  import './index-cb3a593b.js';
6
- import './types.esm-35d4f5e9.js';
6
+ import './types.esm-434cff58.js';
7
7
  //# sourceMappingURL=index43.js.map
@@ -1,6 +1,6 @@
1
- export { V as ValidationStateIndicator } from './VCVerificationPill-7cc43650.js';
1
+ export { V as ValidationStateIndicator } from './VCVerificationPill-3e840476.js';
2
2
  import 'react';
3
- import './types.esm-35d4f5e9.js';
3
+ import './types.esm-434cff58.js';
4
4
  import './RedXCircle.svg';
5
5
  import './GreenCheckCircle.svg';
6
6
  import './YellowWarningCircle.svg';
@@ -1,11 +1,11 @@
1
1
  import 'react';
2
2
  import './i18n-35209bfa.js';
3
- export { C as CertDisplayCardSkillsCount, a as CertificateBackFace, b as CertificateDisplayCard, c as CertificateFrontFace } from './CertificateDisplayCard-0de68029.js';
3
+ export { C as CertDisplayCardSkillsCount, a as CertificateBackFace, b as CertificateDisplayCard, c as CertificateFrontFace } from './CertificateDisplayCard-b5399522.js';
4
4
  import './index-cb3a593b.js';
5
- import './types.esm-35d4f5e9.js';
5
+ import './types.esm-434cff58.js';
6
6
  import '@learncard/helpers';
7
7
  export { V as VERIFIER_STATES } from './VerifierStateBadgeAndText-f2bbd9fd.js';
8
- import './credential.helpers-d71e692a.js';
8
+ import './credential.helpers-f4495f8f.js';
9
9
  import './index-28917993.js';
10
10
  import './PuzzlePiece-a3d9cc62.js';
11
11
  import './User-f5ea0f01.js';
@@ -8007,6 +8007,201 @@ var StringQuery = union([
8007
8007
  $or: BaseStringQuery.array()
8008
8008
  })
8009
8009
  ]);
8010
+ var LearnCardRefreshAuthorizationValidator = object({ type: literal("LearnCardDIDAuth") }).catchall(any());
8011
+ var ManagedCredentialRefreshServiceValidator = object({
8012
+ id: string().min(1),
8013
+ type: literal("LearnCardCredentialRefresh2026"),
8014
+ authorization: LearnCardRefreshAuthorizationValidator.optional()
8015
+ }).catchall(any());
8016
+ var StandardCredentialRefreshServiceValidator = object({
8017
+ id: string().min(1),
8018
+ type: literal("1EdTechCredentialRefresh")
8019
+ }).catchall(any());
8020
+ union([
8021
+ ManagedCredentialRefreshServiceValidator,
8022
+ StandardCredentialRefreshServiceValidator
8023
+ ]);
8024
+ object({
8025
+ holder: object({
8026
+ profileId: string().optional(),
8027
+ did: string().min(1)
8028
+ }),
8029
+ credentialId: string().min(1)
8030
+ });
8031
+ object({
8032
+ refreshId: string().min(1),
8033
+ refreshService: ManagedCredentialRefreshServiceValidator.extend({
8034
+ authorization: LearnCardRefreshAuthorizationValidator
8035
+ })
8036
+ });
8037
+ var ManagedCredentialRefreshReceiptValidator = object({
8038
+ refreshId: string().min(1),
8039
+ refreshService: ManagedCredentialRefreshServiceValidator,
8040
+ credentialId: string().min(1),
8041
+ issuerDid: string().min(1),
8042
+ holderDid: string().min(1),
8043
+ credentialStatus: CredentialStatusValidator.or(
8044
+ CredentialStatusValidator.array()
8045
+ ).optional()
8046
+ }).strip();
8047
+ var InboxCredentialRefreshReceiptValidator = ManagedCredentialRefreshReceiptValidator.omit(
8048
+ { holderDid: true }
8049
+ ).extend({ holderDid: string().min(1).optional() });
8050
+ var CredentialRefreshSigningModeValidator = _enum(["issuer-signed", "signing-authority"]);
8051
+ var PublishCredentialRefreshBaseFields = {
8052
+ refreshId: string().min(1),
8053
+ notifyHolder: boolean().optional(),
8054
+ updateSummary: string().optional(),
8055
+ idempotencyKey: string().optional()
8056
+ };
8057
+ object(__spreadProps(__spreadValues({}, PublishCredentialRefreshBaseFields), {
8058
+ mode: literal("issuer-signed"),
8059
+ signedCredential: VCValidator
8060
+ }));
8061
+ object(__spreadProps(__spreadValues({}, PublishCredentialRefreshBaseFields), {
8062
+ mode: literal("signing-authority"),
8063
+ credential: UnsignedVCValidator,
8064
+ signingAuthority: object({
8065
+ type: string().min(1)
8066
+ }).catchall(any())
8067
+ }));
8068
+ object(__spreadProps(__spreadValues({}, PublishCredentialRefreshBaseFields), {
8069
+ mode: CredentialRefreshSigningModeValidator,
8070
+ signedCredential: VCValidator.optional(),
8071
+ credential: UnsignedVCValidator.optional(),
8072
+ signingAuthority: object({
8073
+ type: string().min(1)
8074
+ }).catchall(any()).optional()
8075
+ })).superRefine((input, ctx) => {
8076
+ if (input.mode === "issuer-signed" && !input.signedCredential) {
8077
+ ctx.addIssue({
8078
+ code: "custom",
8079
+ path: ["signedCredential"],
8080
+ message: "signedCredential is required for issuer-signed publication"
8081
+ });
8082
+ }
8083
+ if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
8084
+ ctx.addIssue({
8085
+ code: "custom",
8086
+ path: ["mode"],
8087
+ message: "issuer-signed publication cannot include signing-authority fields"
8088
+ });
8089
+ }
8090
+ if (input.mode === "signing-authority") {
8091
+ if (input.signedCredential !== void 0) {
8092
+ ctx.addIssue({
8093
+ code: "custom",
8094
+ path: ["signedCredential"],
8095
+ message: "signing-authority publication cannot include signedCredential"
8096
+ });
8097
+ }
8098
+ if (!input.credential) {
8099
+ ctx.addIssue({
8100
+ code: "custom",
8101
+ path: ["credential"],
8102
+ message: "credential is required for signing-authority publication"
8103
+ });
8104
+ }
8105
+ if (!input.signingAuthority) {
8106
+ ctx.addIssue({
8107
+ code: "custom",
8108
+ path: ["signingAuthority"],
8109
+ message: "signingAuthority is required for signing-authority publication"
8110
+ });
8111
+ }
8112
+ }
8113
+ });
8114
+ var PublishCredentialRefreshNotificationValidator = _enum([
8115
+ "queued",
8116
+ "suppressed",
8117
+ "not-applicable",
8118
+ /** Publication succeeded, but the post-commit notification enqueue must be retried. */
8119
+ "delivery-failed"
8120
+ ]);
8121
+ object({
8122
+ refreshId: string().min(1),
8123
+ version: number().int().positive(),
8124
+ publishedAt: string().min(1),
8125
+ notification: PublishCredentialRefreshNotificationValidator
8126
+ });
8127
+ var CredentialRefreshVersionMetadataValidator = object({
8128
+ version: number().int().positive(),
8129
+ publishedAt: string().min(1),
8130
+ effectiveAt: string().optional(),
8131
+ etag: string().optional(),
8132
+ signingMode: CredentialRefreshSigningModeValidator.optional(),
8133
+ updateSummary: string().optional()
8134
+ });
8135
+ object({
8136
+ refreshId: string().min(1),
8137
+ cursor: string().optional(),
8138
+ limit: number().int().positive().optional()
8139
+ });
8140
+ object({
8141
+ records: CredentialRefreshVersionMetadataValidator.array(),
8142
+ hasMore: boolean(),
8143
+ cursor: string().optional()
8144
+ });
8145
+ object({
8146
+ challenge: string().min(1),
8147
+ expiresAt: string().min(1),
8148
+ domain: string().optional(),
8149
+ scheme: literal("LearnCardDIDAuth").optional()
8150
+ });
8151
+ var PublicCredentialRefreshEnvelopeValidator = object({
8152
+ format: literal("vc"),
8153
+ credential: VCValidator,
8154
+ etag: string().optional()
8155
+ });
8156
+ var JweCredentialRefreshEnvelopeValidator = object({
8157
+ format: literal("jwe"),
8158
+ jwe: JWEValidator,
8159
+ etag: string().optional(),
8160
+ /** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
8161
+ version: number().int().positive().optional()
8162
+ });
8163
+ discriminatedUnion("format", [
8164
+ PublicCredentialRefreshEnvelopeValidator,
8165
+ JweCredentialRefreshEnvelopeValidator
8166
+ ]);
8167
+ var CredentialRefreshFailureCodeValidator = _enum([
8168
+ "UNAVAILABLE",
8169
+ "TIMEOUT",
8170
+ "UNSUPPORTED_SERVICE",
8171
+ "UNAUTHORIZED",
8172
+ "MALFORMED_RESPONSE",
8173
+ "INVALID_PROOF",
8174
+ "ISSUER_MISMATCH",
8175
+ "ID_MISMATCH",
8176
+ "ROLLBACK",
8177
+ "REVOKED",
8178
+ "UNSAFE_ENDPOINT"
8179
+ ]);
8180
+ var CredentialRefreshUpdatedResultValidator = object({
8181
+ status: literal("updated"),
8182
+ credential: VCValidator,
8183
+ etag: string().optional(),
8184
+ managedVersion: number().int().positive().optional()
8185
+ });
8186
+ var CredentialRefreshUnchangedResultValidator = object({
8187
+ status: literal("unchanged"),
8188
+ checkedAt: string().min(1),
8189
+ etag: string().optional()
8190
+ });
8191
+ var CredentialRefreshUnsupportedResultValidator = object({
8192
+ status: literal("unsupported")
8193
+ });
8194
+ var CredentialRefreshFailedResultValidator = object({
8195
+ status: literal("failed"),
8196
+ code: CredentialRefreshFailureCodeValidator,
8197
+ retryable: boolean()
8198
+ });
8199
+ discriminatedUnion("status", [
8200
+ CredentialRefreshUpdatedResultValidator,
8201
+ CredentialRefreshUnchangedResultValidator,
8202
+ CredentialRefreshUnsupportedResultValidator,
8203
+ CredentialRefreshFailedResultValidator
8204
+ ]);
8010
8205
  var LCNProfileDisplayValidator = object({
8011
8206
  backgroundColor: string().optional(),
8012
8207
  backgroundImage: string().optional(),
@@ -8342,7 +8537,13 @@ var SendBoostInputValidator = object({
8342
8537
  "Options for email/phone recipients (Universal Inbox)"
8343
8538
  ),
8344
8539
  templateData: record(string(), unknown()).optional(),
8345
- integrationId: string().optional().describe("Integration ID for activity tracking")
8540
+ integrationId: string().optional().describe("Integration ID for activity tracking"),
8541
+ refresh: boolean().optional().describe(
8542
+ "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."
8543
+ ),
8544
+ idempotencyKey: string().min(1).max(200).optional().describe(
8545
+ "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."
8546
+ )
8346
8547
  }).refine((data) => data.templateUri || data.template || data.signedCredential, {
8347
8548
  message: "Either templateUri, template, or signedCredential must be provided.",
8348
8549
  path: ["templateUri"]
@@ -8358,8 +8559,12 @@ var SendBoostInputValidator = object({
8358
8559
  message: "guardianEmail must differ from recipient (self-approval not allowed)",
8359
8560
  path: ["options", "guardianEmail"]
8360
8561
  }
8361
- );
8562
+ ).refine((data) => !data.idempotencyKey || data.refresh === true, {
8563
+ message: "idempotencyKey is only supported with refresh: true.",
8564
+ path: ["idempotencyKey"]
8565
+ });
8362
8566
  var SendInboxResponseValidator = object({
8567
+ refresh: InboxCredentialRefreshReceiptValidator.optional(),
8363
8568
  issuanceId: string(),
8364
8569
  status: _enum(["PENDING", "ISSUED", "EXPIRED", "DELIVERED", "CLAIMED"]),
8365
8570
  claimUrl: string().url().optional().describe("Present when suppressDelivery=true"),
@@ -8374,8 +8579,34 @@ var SendBoostResponseValidator = object({
8374
8579
  activityId: string().describe("Links to the activity lifecycle for this issuance"),
8375
8580
  inbox: SendInboxResponseValidator.optional().describe(
8376
8581
  "Present when sent via email/phone (Universal Inbox)"
8582
+ ),
8583
+ refresh: ManagedCredentialRefreshReceiptValidator.optional().describe(
8584
+ "Present when managed refresh was requested: issuance metadata the issuer keeps to publish future updates"
8377
8585
  )
8378
8586
  });
8587
+ object({
8588
+ recipient: string(),
8589
+ templateUri: string().optional(),
8590
+ template: SendBoostTemplateValidator.optional(),
8591
+ contractUri: string().optional(),
8592
+ templateData: record(string(), unknown()).optional(),
8593
+ integrationId: string().optional(),
8594
+ /** Credential ID to allocate for; generated server-side when omitted. */
8595
+ credentialId: string().min(1).optional(),
8596
+ idempotencyKey: string().min(1).max(200).optional()
8597
+ }).refine((data) => Boolean(data.templateUri) !== Boolean(data.template), {
8598
+ message: "Provide exactly one of templateUri or template."
8599
+ });
8600
+ object({
8601
+ boostUri: string(),
8602
+ credentialId: string(),
8603
+ refreshId: string(),
8604
+ refreshService: ManagedCredentialRefreshServiceValidator,
8605
+ /** The DID to use as credentialSubject.id (recipient DID, or the profile's did:web). */
8606
+ holderDid: string(),
8607
+ /** Present when this idempotencyKey already completed: return it without signing. */
8608
+ completed: SendBoostResponseValidator.optional()
8609
+ });
8379
8610
  discriminatedUnion("type", [SendBoostInputValidator]);
8380
8611
  discriminatedUnion("type", [SendBoostResponseValidator]);
8381
8612
  var ConsentFlowTermsStatusValidator = _enum(["live", "stale", "withdrawn"]);
@@ -8706,6 +8937,7 @@ object({
8706
8937
  }, "error")
8707
8938
  }),
8708
8939
  scope: string(),
8940
+ actAs: string().optional(),
8709
8941
  createdAt: datetime({ error: "createdAt must be a valid ISO 8601 datetime string" }),
8710
8942
  expiresAt: datetime({ error: "expiresAt must be a valid ISO 8601 datetime string" }).nullish().optional()
8711
8943
  });
@@ -8777,6 +9009,8 @@ object({
8777
9009
  sessionJwt: string()
8778
9010
  });
8779
9011
  var InboxCredentialValidator = object({
9012
+ refresh: InboxCredentialRefreshReceiptValidator.optional(),
9013
+ refreshId: string().optional(),
8780
9014
  id: string(),
8781
9015
  credential: string().optional(),
8782
9016
  isSigned: boolean(),
@@ -8820,7 +9054,7 @@ var IssueInboxSigningAuthorityValidator = object({
8820
9054
  endpoint: string().url(),
8821
9055
  name: string()
8822
9056
  });
8823
- object({
9057
+ var IssueInboxCredentialValidator = object({
8824
9058
  // === CORE DATA (Required) ===
8825
9059
  // WHAT is being sent and WHO is it for?
8826
9060
  recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
@@ -8831,12 +9065,19 @@ object({
8831
9065
  templateUri: string().optional().describe(
8832
9066
  "URI of a boost template to use for issuance. The boost credential will be resolved and used. Mutually exclusive with credential field."
8833
9067
  ),
9068
+ refresh: boolean().optional().describe(
9069
+ "Allocate managed refresh before signing. Requires unsigned content and a registered signing authority; binds the holder on claim."
9070
+ ),
9071
+ idempotencyKey: string().min(1).max(200).optional(),
8834
9072
  // === OPTIONAL FEATURES ===
8835
9073
  // Add major, distinct features at the top level.
8836
9074
  //consentRequest: ConsentRequestValidator.optional(),
8837
9075
  // === PROCESS CONFIGURATION (Optional) ===
8838
9076
  // HOW should this issuance be handled?
8839
9077
  configuration: object({
9078
+ guardianEmail: string().email().optional().describe(
9079
+ "Require approval from this guardian before the recipient can claim. Must differ from the recipient email."
9080
+ ),
8840
9081
  signingAuthority: IssueInboxSigningAuthorityValidator.optional().describe(
8841
9082
  "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."
8842
9083
  ),
@@ -8890,17 +9131,133 @@ object({
8890
9131
  }).optional().describe(
8891
9132
  "Configuration for the credential issuance. If not provided, the default configuration will be used."
8892
9133
  )
9134
+ }).refine((data) => !data.idempotencyKey || data.refresh === true, {
9135
+ message: "idempotencyKey requires refresh: true."
8893
9136
  }).refine((data) => data.credential || data.templateUri, {
8894
9137
  message: "Either credential or templateUri must be provided.",
8895
9138
  path: ["credential"]
8896
- });
8897
- object({
9139
+ }).refine(
9140
+ (data) => {
9141
+ var _a2;
9142
+ return !((_a2 = data.configuration) == null ? void 0 : _a2.guardianEmail) || data.recipient.type !== "email" || data.configuration.guardianEmail.toLowerCase() !== data.recipient.value.toLowerCase();
9143
+ },
9144
+ {
9145
+ message: "guardianEmail must differ from recipient (self-approval not allowed)",
9146
+ path: ["configuration", "guardianEmail"]
9147
+ }
9148
+ );
9149
+ var IssueInboxCredentialResponseValidator = object({
9150
+ refresh: InboxCredentialRefreshReceiptValidator.optional(),
8898
9151
  issuanceId: string(),
8899
9152
  status: LCNInboxStatusEnumValidator,
8900
9153
  recipient: ContactMethodQueryValidator,
8901
9154
  claimUrl: string().url().optional(),
8902
9155
  recipientDid: string().optional()
8903
9156
  });
9157
+ var InboxBatchConfigurationValidator = IssueInboxCredentialValidator.shape.configuration.unwrap().extend({
9158
+ refresh: IssueInboxCredentialValidator.shape.refresh.describe(
9159
+ "Enable managed refresh by default. An item configuration.refresh overrides this value, including false."
9160
+ ),
9161
+ delivery: IssueInboxCredentialValidator.shape.configuration.unwrap().shape.delivery.unwrap().extend({ suppress: boolean().optional() }).optional()
9162
+ });
9163
+ var InboxBatchItemConfigurationValidator = InboxBatchConfigurationValidator.extend({
9164
+ guardianEmail: InboxBatchConfigurationValidator.shape.guardianEmail.nullable().describe(
9165
+ "Require guardian approval, or set null to clear a batch-level guardianEmail for this item."
9166
+ )
9167
+ });
9168
+ var IssueInboxCredentialBatchItemValidator = object(__spreadProps(__spreadValues({}, IssueInboxCredentialValidator.shape), {
9169
+ configuration: InboxBatchItemConfigurationValidator.optional(),
9170
+ idempotencyKey: string().max(256).optional()
9171
+ })).refine((data) => data.credential || data.templateUri, {
9172
+ message: "Either credential or templateUri must be provided.",
9173
+ path: ["credential"]
9174
+ }).describe(
9175
+ "One issuance: provide credential or templateUri. Invalid input is rejected at submission with its item index."
9176
+ );
9177
+ object({
9178
+ requestId: string().min(1).max(256).optional(),
9179
+ items: array(IssueInboxCredentialBatchItemValidator).min(1).max(100),
9180
+ configuration: InboxBatchConfigurationValidator.optional()
9181
+ }).superRefine((batch, ctx) => {
9182
+ batch.items.forEach((item, index) => {
9183
+ var _a2, _b;
9184
+ const itemGuardian = (_a2 = item.configuration) == null ? void 0 : _a2.guardianEmail;
9185
+ const guardian = itemGuardian === null ? void 0 : itemGuardian != null ? itemGuardian : (_b = batch.configuration) == null ? void 0 : _b.guardianEmail;
9186
+ if (guardian && item.recipient.type === "email" && guardian.toLowerCase() === item.recipient.value.toLowerCase()) {
9187
+ ctx.addIssue({
9188
+ code: "custom",
9189
+ path: ["items", index, "configuration", "guardianEmail"],
9190
+ message: "guardianEmail must differ from recipient (self-approval not allowed)"
9191
+ });
9192
+ }
9193
+ });
9194
+ });
9195
+ var InboxBatchErrorReasonValidator = _enum([
9196
+ "DUPLICATE_KEY",
9197
+ "IDEMPOTENCY_MISMATCH",
9198
+ "IN_PROGRESS",
9199
+ "UNCONFIRMED"
9200
+ ]);
9201
+ var IssueInboxCredentialBatchItemResultValidator = discriminatedUnion("success", [
9202
+ IssueInboxCredentialResponseValidator.extend({
9203
+ success: literal(true),
9204
+ index: number().int().nonnegative(),
9205
+ deduplicated: boolean().optional(),
9206
+ guardianStatus: GuardianStatusValidator.optional(),
9207
+ idempotencyKey: string().optional()
9208
+ }),
9209
+ object({
9210
+ success: literal(false),
9211
+ index: number().int().nonnegative(),
9212
+ idempotencyKey: string().optional(),
9213
+ recipient: ContactMethodQueryValidator.optional(),
9214
+ error: object({
9215
+ code: string(),
9216
+ message: string(),
9217
+ reason: InboxBatchErrorReasonValidator.optional()
9218
+ }),
9219
+ issuanceId: string().optional().describe(
9220
+ "Present when issuance completed but replay storage could not be confirmed. Reconcile this issuance; do not issue again with a new key."
9221
+ ),
9222
+ claimUrl: string().url().optional().describe(
9223
+ "Claim URL of the completed issuance, if available, when replay storage could not be confirmed."
9224
+ )
9225
+ })
9226
+ ]);
9227
+ var IssueInboxCredentialBatchResponseValidator = object({
9228
+ results: array(IssueInboxCredentialBatchItemResultValidator),
9229
+ summary: object({
9230
+ total: number(),
9231
+ succeeded: number(),
9232
+ failed: number(),
9233
+ deduplicated: number()
9234
+ })
9235
+ });
9236
+ object({
9237
+ batchId: string(),
9238
+ status: _enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
9239
+ createdAt: string()
9240
+ });
9241
+ object({
9242
+ batchId: string(),
9243
+ createdAt: string(),
9244
+ done: boolean().describe(
9245
+ "True when no queued or processing items remain, including unconfirmed outcomes."
9246
+ ),
9247
+ status: _enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
9248
+ items: array(
9249
+ object({
9250
+ index: number().int().nonnegative(),
9251
+ state: _enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
9252
+ result: IssueInboxCredentialBatchItemResultValidator.optional()
9253
+ })
9254
+ ),
9255
+ summary: IssueInboxCredentialBatchResponseValidator.shape.summary.extend({
9256
+ completed: number(),
9257
+ pending: number(),
9258
+ unconfirmed: number()
9259
+ })
9260
+ });
8904
9261
  var CredentialNameRefValidator = object({ name: string() }).passthrough();
8905
9262
  object({
8906
9263
  credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).or(CredentialNameRefValidator).describe("The credential to issue, or a { name } reference to resolve a boost template."),
@@ -9386,6 +9743,7 @@ var CredentialActivityValidator = object({
9386
9743
  eventType: CredentialActivityEventTypeValidator,
9387
9744
  timestamp: string(),
9388
9745
  actorProfileId: string().optional(),
9746
+ onBehalfOf: string().optional(),
9389
9747
  recipientType: CredentialActivityRecipientTypeValidator,
9390
9748
  recipientIdentifier: string(),
9391
9749
  boostUri: string().optional(),
@@ -9534,188 +9892,6 @@ object({
9534
9892
  version: number().default(1),
9535
9893
  messages: array(inAppMessageValidator).default([])
9536
9894
  }).passthrough();
9537
- var LearnCardRefreshAuthorizationValidator = object({ type: literal("LearnCardDIDAuth") }).catchall(any());
9538
- var ManagedCredentialRefreshServiceValidator = object({
9539
- id: string().min(1),
9540
- type: literal("LearnCardCredentialRefresh2026"),
9541
- authorization: LearnCardRefreshAuthorizationValidator.optional()
9542
- }).catchall(any());
9543
- var StandardCredentialRefreshServiceValidator = object({
9544
- id: string().min(1),
9545
- type: literal("1EdTechCredentialRefresh")
9546
- }).catchall(any());
9547
- union([
9548
- ManagedCredentialRefreshServiceValidator,
9549
- StandardCredentialRefreshServiceValidator
9550
- ]);
9551
- object({
9552
- holder: object({
9553
- profileId: string().optional(),
9554
- did: string().min(1)
9555
- }),
9556
- credentialId: string().min(1)
9557
- });
9558
- object({
9559
- refreshId: string().min(1),
9560
- refreshService: ManagedCredentialRefreshServiceValidator.extend({
9561
- authorization: LearnCardRefreshAuthorizationValidator
9562
- })
9563
- });
9564
- var CredentialRefreshSigningModeValidator = _enum(["issuer-signed", "signing-authority"]);
9565
- var PublishCredentialRefreshBaseFields = {
9566
- refreshId: string().min(1),
9567
- notifyHolder: boolean().optional(),
9568
- updateSummary: string().optional(),
9569
- idempotencyKey: string().optional()
9570
- };
9571
- object(__spreadProps(__spreadValues({}, PublishCredentialRefreshBaseFields), {
9572
- mode: literal("issuer-signed"),
9573
- signedCredential: VCValidator
9574
- }));
9575
- object(__spreadProps(__spreadValues({}, PublishCredentialRefreshBaseFields), {
9576
- mode: literal("signing-authority"),
9577
- credential: UnsignedVCValidator,
9578
- signingAuthority: object({
9579
- type: string().min(1)
9580
- }).catchall(any())
9581
- }));
9582
- object(__spreadProps(__spreadValues({}, PublishCredentialRefreshBaseFields), {
9583
- mode: CredentialRefreshSigningModeValidator,
9584
- signedCredential: VCValidator.optional(),
9585
- credential: UnsignedVCValidator.optional(),
9586
- signingAuthority: object({
9587
- type: string().min(1)
9588
- }).catchall(any()).optional()
9589
- })).superRefine((input, ctx) => {
9590
- if (input.mode === "issuer-signed" && !input.signedCredential) {
9591
- ctx.addIssue({
9592
- code: "custom",
9593
- path: ["signedCredential"],
9594
- message: "signedCredential is required for issuer-signed publication"
9595
- });
9596
- }
9597
- if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
9598
- ctx.addIssue({
9599
- code: "custom",
9600
- path: ["mode"],
9601
- message: "issuer-signed publication cannot include signing-authority fields"
9602
- });
9603
- }
9604
- if (input.mode === "signing-authority") {
9605
- if (input.signedCredential !== void 0) {
9606
- ctx.addIssue({
9607
- code: "custom",
9608
- path: ["signedCredential"],
9609
- message: "signing-authority publication cannot include signedCredential"
9610
- });
9611
- }
9612
- if (!input.credential) {
9613
- ctx.addIssue({
9614
- code: "custom",
9615
- path: ["credential"],
9616
- message: "credential is required for signing-authority publication"
9617
- });
9618
- }
9619
- if (!input.signingAuthority) {
9620
- ctx.addIssue({
9621
- code: "custom",
9622
- path: ["signingAuthority"],
9623
- message: "signingAuthority is required for signing-authority publication"
9624
- });
9625
- }
9626
- }
9627
- });
9628
- var PublishCredentialRefreshNotificationValidator = _enum([
9629
- "queued",
9630
- "suppressed",
9631
- "not-applicable",
9632
- /** Publication succeeded, but the post-commit notification enqueue must be retried. */
9633
- "delivery-failed"
9634
- ]);
9635
- object({
9636
- refreshId: string().min(1),
9637
- version: number().int().positive(),
9638
- publishedAt: string().min(1),
9639
- notification: PublishCredentialRefreshNotificationValidator
9640
- });
9641
- var CredentialRefreshVersionMetadataValidator = object({
9642
- version: number().int().positive(),
9643
- publishedAt: string().min(1),
9644
- effectiveAt: string().optional(),
9645
- etag: string().optional(),
9646
- signingMode: CredentialRefreshSigningModeValidator.optional(),
9647
- updateSummary: string().optional()
9648
- });
9649
- object({
9650
- refreshId: string().min(1),
9651
- cursor: string().optional(),
9652
- limit: number().int().positive().optional()
9653
- });
9654
- object({
9655
- records: CredentialRefreshVersionMetadataValidator.array(),
9656
- hasMore: boolean(),
9657
- cursor: string().optional()
9658
- });
9659
- object({
9660
- challenge: string().min(1),
9661
- expiresAt: string().min(1),
9662
- domain: string().optional(),
9663
- scheme: literal("LearnCardDIDAuth").optional()
9664
- });
9665
- var PublicCredentialRefreshEnvelopeValidator = object({
9666
- format: literal("vc"),
9667
- credential: VCValidator,
9668
- etag: string().optional()
9669
- });
9670
- var JweCredentialRefreshEnvelopeValidator = object({
9671
- format: literal("jwe"),
9672
- jwe: JWEValidator,
9673
- etag: string().optional(),
9674
- /** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
9675
- version: number().int().positive().optional()
9676
- });
9677
- discriminatedUnion("format", [
9678
- PublicCredentialRefreshEnvelopeValidator,
9679
- JweCredentialRefreshEnvelopeValidator
9680
- ]);
9681
- var CredentialRefreshFailureCodeValidator = _enum([
9682
- "UNAVAILABLE",
9683
- "TIMEOUT",
9684
- "UNSUPPORTED_SERVICE",
9685
- "UNAUTHORIZED",
9686
- "MALFORMED_RESPONSE",
9687
- "INVALID_PROOF",
9688
- "ISSUER_MISMATCH",
9689
- "ID_MISMATCH",
9690
- "ROLLBACK",
9691
- "REVOKED",
9692
- "UNSAFE_ENDPOINT"
9693
- ]);
9694
- var CredentialRefreshUpdatedResultValidator = object({
9695
- status: literal("updated"),
9696
- credential: VCValidator,
9697
- etag: string().optional(),
9698
- managedVersion: number().int().positive().optional()
9699
- });
9700
- var CredentialRefreshUnchangedResultValidator = object({
9701
- status: literal("unchanged"),
9702
- checkedAt: string().min(1),
9703
- etag: string().optional()
9704
- });
9705
- var CredentialRefreshUnsupportedResultValidator = object({
9706
- status: literal("unsupported")
9707
- });
9708
- var CredentialRefreshFailedResultValidator = object({
9709
- status: literal("failed"),
9710
- code: CredentialRefreshFailureCodeValidator,
9711
- retryable: boolean()
9712
- });
9713
- discriminatedUnion("status", [
9714
- CredentialRefreshUpdatedResultValidator,
9715
- CredentialRefreshUnchangedResultValidator,
9716
- CredentialRefreshUnsupportedResultValidator,
9717
- CredentialRefreshFailedResultValidator
9718
- ]);
9719
9895
 
9720
9896
  export { VerificationStatusEnum as V };
9721
- //# sourceMappingURL=types.esm-35d4f5e9.js.map
9897
+ //# sourceMappingURL=types.esm-434cff58.js.map