@learncard/types 5.19.0 → 5.21.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.
package/dist/types.esm.js CHANGED
@@ -138,14 +138,22 @@ var UnsignedVCValidator = z.object({
138
138
  }).catchall(z.any());
139
139
  var ProofValidator = z.object({
140
140
  type: z.string(),
141
- created: z.string(),
141
+ created: z.string().optional(),
142
142
  challenge: z.string().optional(),
143
143
  domain: z.string().optional(),
144
144
  nonce: z.string().optional(),
145
145
  proofPurpose: z.string(),
146
146
  verificationMethod: z.string(),
147
147
  jws: z.string().optional()
148
- }).catchall(z.any());
148
+ }).catchall(z.any()).superRefine((proof, ctx) => {
149
+ if (proof.created === void 0 && (proof.type !== "DataIntegrityProof" || proof.cryptosuite !== "ecdsa-rdfc-2019")) {
150
+ ctx.addIssue({
151
+ code: "custom",
152
+ path: ["created"],
153
+ message: "created is required for this proof suite"
154
+ });
155
+ }
156
+ });
149
157
  var VCValidator = UnsignedVCValidator.extend({
150
158
  proof: ProofValidator.or(ProofValidator.array())
151
159
  });
@@ -581,7 +589,7 @@ var PaginatedEncryptedCredentialRecordsValidator = PaginationResponseValidator.e
581
589
  });
582
590
 
583
591
  // src/lcn.ts
584
- import { z as z11 } from "zod/v4";
592
+ import { z as z12 } from "zod/v4";
585
593
 
586
594
  // src/queries.ts
587
595
  import { z as z10 } from "zod/v4";
@@ -622,48 +630,249 @@ var StringQuery = z10.union([
622
630
  })
623
631
  ]);
624
632
 
633
+ // src/credential-refresh.ts
634
+ import { z as z11 } from "zod/v4";
635
+ var LearnCardRefreshAuthorizationValidator = z11.object({ type: z11.literal("LearnCardDIDAuth") }).catchall(z11.any());
636
+ var ManagedCredentialRefreshServiceValidator = z11.object({
637
+ id: z11.string().min(1),
638
+ type: z11.literal("LearnCardCredentialRefresh2026"),
639
+ authorization: LearnCardRefreshAuthorizationValidator.optional()
640
+ }).catchall(z11.any());
641
+ var StandardCredentialRefreshServiceValidator = z11.object({
642
+ id: z11.string().min(1),
643
+ type: z11.literal("1EdTechCredentialRefresh")
644
+ }).catchall(z11.any());
645
+ var SupportedCredentialRefreshServiceValidator = z11.union([
646
+ ManagedCredentialRefreshServiceValidator,
647
+ StandardCredentialRefreshServiceValidator
648
+ ]);
649
+ var AllocateCredentialRefreshInputValidator = z11.object({
650
+ holder: z11.object({
651
+ profileId: z11.string().optional(),
652
+ did: z11.string().min(1)
653
+ }),
654
+ credentialId: z11.string().min(1)
655
+ });
656
+ var AllocateCredentialRefreshResultValidator = z11.object({
657
+ refreshId: z11.string().min(1),
658
+ refreshService: ManagedCredentialRefreshServiceValidator.extend({
659
+ authorization: LearnCardRefreshAuthorizationValidator
660
+ })
661
+ });
662
+ var ManagedCredentialRefreshReceiptValidator = z11.object({
663
+ refreshId: z11.string().min(1),
664
+ refreshService: ManagedCredentialRefreshServiceValidator,
665
+ credentialId: z11.string().min(1),
666
+ issuerDid: z11.string().min(1),
667
+ holderDid: z11.string().min(1),
668
+ credentialStatus: CredentialStatusValidator.or(
669
+ CredentialStatusValidator.array()
670
+ ).optional()
671
+ }).strip();
672
+ var InboxCredentialRefreshReceiptValidator = ManagedCredentialRefreshReceiptValidator.omit(
673
+ { holderDid: true }
674
+ ).extend({ holderDid: z11.string().min(1).optional() });
675
+ var CredentialRefreshSigningModeValidator = z11.enum(["issuer-signed", "signing-authority"]);
676
+ var PublishCredentialRefreshBaseFields = {
677
+ refreshId: z11.string().min(1),
678
+ notifyHolder: z11.boolean().optional(),
679
+ updateSummary: z11.string().optional(),
680
+ idempotencyKey: z11.string().optional()
681
+ };
682
+ var PublishIssuerSignedRefreshValidator = z11.object({
683
+ ...PublishCredentialRefreshBaseFields,
684
+ mode: z11.literal("issuer-signed"),
685
+ signedCredential: VCValidator
686
+ });
687
+ var PublishSigningAuthorityRefreshValidator = z11.object({
688
+ ...PublishCredentialRefreshBaseFields,
689
+ mode: z11.literal("signing-authority"),
690
+ credential: UnsignedVCValidator,
691
+ signingAuthority: z11.object({
692
+ type: z11.string().min(1)
693
+ }).catchall(z11.any())
694
+ });
695
+ var PublishCredentialRefreshInputValidator = z11.object({
696
+ ...PublishCredentialRefreshBaseFields,
697
+ mode: CredentialRefreshSigningModeValidator,
698
+ signedCredential: VCValidator.optional(),
699
+ credential: UnsignedVCValidator.optional(),
700
+ signingAuthority: z11.object({
701
+ type: z11.string().min(1)
702
+ }).catchall(z11.any()).optional()
703
+ }).superRefine((input, ctx) => {
704
+ if (input.mode === "issuer-signed" && !input.signedCredential) {
705
+ ctx.addIssue({
706
+ code: "custom",
707
+ path: ["signedCredential"],
708
+ message: "signedCredential is required for issuer-signed publication"
709
+ });
710
+ }
711
+ if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
712
+ ctx.addIssue({
713
+ code: "custom",
714
+ path: ["mode"],
715
+ message: "issuer-signed publication cannot include signing-authority fields"
716
+ });
717
+ }
718
+ if (input.mode === "signing-authority") {
719
+ if (input.signedCredential !== void 0) {
720
+ ctx.addIssue({
721
+ code: "custom",
722
+ path: ["signedCredential"],
723
+ message: "signing-authority publication cannot include signedCredential"
724
+ });
725
+ }
726
+ if (!input.credential) {
727
+ ctx.addIssue({
728
+ code: "custom",
729
+ path: ["credential"],
730
+ message: "credential is required for signing-authority publication"
731
+ });
732
+ }
733
+ if (!input.signingAuthority) {
734
+ ctx.addIssue({
735
+ code: "custom",
736
+ path: ["signingAuthority"],
737
+ message: "signingAuthority is required for signing-authority publication"
738
+ });
739
+ }
740
+ }
741
+ });
742
+ var PublishCredentialRefreshNotificationValidator = z11.enum([
743
+ "queued",
744
+ "suppressed",
745
+ "not-applicable",
746
+ /** Publication succeeded, but the post-commit notification enqueue must be retried. */
747
+ "delivery-failed"
748
+ ]);
749
+ var PublishCredentialRefreshResultValidator = z11.object({
750
+ refreshId: z11.string().min(1),
751
+ version: z11.number().int().positive(),
752
+ publishedAt: z11.string().min(1),
753
+ notification: PublishCredentialRefreshNotificationValidator
754
+ });
755
+ var CredentialRefreshVersionMetadataValidator = z11.object({
756
+ version: z11.number().int().positive(),
757
+ publishedAt: z11.string().min(1),
758
+ effectiveAt: z11.string().optional(),
759
+ etag: z11.string().optional(),
760
+ signingMode: CredentialRefreshSigningModeValidator.optional(),
761
+ updateSummary: z11.string().optional()
762
+ });
763
+ var GetCredentialRefreshHistoryInputValidator = z11.object({
764
+ refreshId: z11.string().min(1),
765
+ cursor: z11.string().optional(),
766
+ limit: z11.number().int().positive().optional()
767
+ });
768
+ var GetCredentialRefreshHistoryResultValidator = z11.object({
769
+ records: CredentialRefreshVersionMetadataValidator.array(),
770
+ hasMore: z11.boolean(),
771
+ cursor: z11.string().optional()
772
+ });
773
+ var CredentialRefreshChallengeValidator = z11.object({
774
+ challenge: z11.string().min(1),
775
+ expiresAt: z11.string().min(1),
776
+ domain: z11.string().optional(),
777
+ scheme: z11.literal("LearnCardDIDAuth").optional()
778
+ });
779
+ var PublicCredentialRefreshEnvelopeValidator = z11.object({
780
+ format: z11.literal("vc"),
781
+ credential: VCValidator,
782
+ etag: z11.string().optional()
783
+ });
784
+ var JweCredentialRefreshEnvelopeValidator = z11.object({
785
+ format: z11.literal("jwe"),
786
+ jwe: JWEValidator,
787
+ etag: z11.string().optional(),
788
+ /** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
789
+ version: z11.number().int().positive().optional()
790
+ });
791
+ var CredentialRefreshResponseEnvelopeValidator = z11.discriminatedUnion("format", [
792
+ PublicCredentialRefreshEnvelopeValidator,
793
+ JweCredentialRefreshEnvelopeValidator
794
+ ]);
795
+ var CredentialRefreshFailureCodeValidator = z11.enum([
796
+ "UNAVAILABLE",
797
+ "TIMEOUT",
798
+ "UNSUPPORTED_SERVICE",
799
+ "UNAUTHORIZED",
800
+ "MALFORMED_RESPONSE",
801
+ "INVALID_PROOF",
802
+ "ISSUER_MISMATCH",
803
+ "ID_MISMATCH",
804
+ "ROLLBACK",
805
+ "REVOKED",
806
+ "UNSAFE_ENDPOINT"
807
+ ]);
808
+ var CredentialRefreshUpdatedResultValidator = z11.object({
809
+ status: z11.literal("updated"),
810
+ credential: VCValidator,
811
+ etag: z11.string().optional(),
812
+ managedVersion: z11.number().int().positive().optional()
813
+ });
814
+ var CredentialRefreshUnchangedResultValidator = z11.object({
815
+ status: z11.literal("unchanged"),
816
+ checkedAt: z11.string().min(1),
817
+ etag: z11.string().optional()
818
+ });
819
+ var CredentialRefreshUnsupportedResultValidator = z11.object({
820
+ status: z11.literal("unsupported")
821
+ });
822
+ var CredentialRefreshFailedResultValidator = z11.object({
823
+ status: z11.literal("failed"),
824
+ code: CredentialRefreshFailureCodeValidator,
825
+ retryable: z11.boolean()
826
+ });
827
+ var CredentialRefreshResultValidator = z11.discriminatedUnion("status", [
828
+ CredentialRefreshUpdatedResultValidator,
829
+ CredentialRefreshUnchangedResultValidator,
830
+ CredentialRefreshUnsupportedResultValidator,
831
+ CredentialRefreshFailedResultValidator
832
+ ]);
833
+
625
834
  // src/lcn.ts
626
- var LCNProfileDisplayValidator = z11.object({
627
- backgroundColor: z11.string().optional(),
628
- backgroundImage: z11.string().optional(),
629
- fadeBackgroundImage: z11.boolean().optional(),
630
- repeatBackgroundImage: z11.boolean().optional(),
631
- fontColor: z11.string().optional(),
632
- accentColor: z11.string().optional(),
633
- accentFontColor: z11.string().optional(),
634
- idBackgroundImage: z11.string().optional(),
635
- fadeIdBackgroundImage: z11.boolean().optional(),
636
- idBackgroundColor: z11.string().optional(),
637
- repeatIdBackgroundImage: z11.boolean().optional()
638
- });
639
- var ProfileVisibilityEnum = z11.enum(["public", "connections_only", "private"]);
640
- var AllowConnectionRequestsEnum = z11.enum(["anyone", "invite_only"]);
641
- var LCNProfileValidator = z11.object({
642
- profileId: z11.string().min(3).max(40).describe("Unique, URL-safe identifier for the profile."),
643
- displayName: z11.string().default("").describe("Human-readable display name for the profile."),
644
- shortBio: z11.string().default("").describe("Short bio for the profile."),
645
- bio: z11.string().default("").describe("Longer bio for the profile."),
646
- did: z11.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
647
- isPrivate: z11.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
835
+ var LCNProfileDisplayValidator = z12.object({
836
+ backgroundColor: z12.string().optional(),
837
+ backgroundImage: z12.string().optional(),
838
+ fadeBackgroundImage: z12.boolean().optional(),
839
+ repeatBackgroundImage: z12.boolean().optional(),
840
+ fontColor: z12.string().optional(),
841
+ accentColor: z12.string().optional(),
842
+ accentFontColor: z12.string().optional(),
843
+ idBackgroundImage: z12.string().optional(),
844
+ fadeIdBackgroundImage: z12.boolean().optional(),
845
+ idBackgroundColor: z12.string().optional(),
846
+ repeatIdBackgroundImage: z12.boolean().optional()
847
+ });
848
+ var ProfileVisibilityEnum = z12.enum(["public", "connections_only", "private"]);
849
+ var AllowConnectionRequestsEnum = z12.enum(["anyone", "invite_only"]);
850
+ var LCNProfileValidator = z12.object({
851
+ profileId: z12.string().min(3).max(40).describe("Unique, URL-safe identifier for the profile."),
852
+ displayName: z12.string().default("").describe("Human-readable display name for the profile."),
853
+ shortBio: z12.string().default("").describe("Short bio for the profile."),
854
+ bio: z12.string().default("").describe("Longer bio for the profile."),
855
+ did: z12.string().describe("Decentralized Identifier for the profile. (auto-assigned)"),
856
+ isPrivate: z12.boolean().optional().describe("Whether the profile is private or not and shows up in search results."),
648
857
  profileVisibility: ProfileVisibilityEnum.default("public").optional().describe("Profile visibility: 'public', 'connections_only', or 'private'."),
649
- showEmail: z11.boolean().default(false).optional().describe("Whether to show email to connections."),
858
+ showEmail: z12.boolean().default(false).optional().describe("Whether to show email to connections."),
650
859
  allowConnectionRequests: AllowConnectionRequestsEnum.default("anyone").optional().describe("Who can send connection requests: 'anyone' or 'invite_only'."),
651
- email: z11.string().optional().describe("Contact email address for the profile. (deprecated)"),
652
- image: z11.string().optional().describe("Profile image URL for the profile."),
653
- heroImage: z11.string().optional().describe("Hero image URL for the profile."),
654
- websiteLink: z11.string().optional().describe("Website link for the profile."),
655
- isServiceProfile: z11.boolean().default(false).optional().describe("Whether the profile is a service profile or not."),
656
- type: z11.string().optional().describe('Profile type: e.g. "person", "organization", "service".'),
657
- notificationsWebhook: z11.string().url().startsWith("http").optional().describe("URL to send notifications to."),
860
+ email: z12.string().optional().describe("Contact email address for the profile. (deprecated)"),
861
+ image: z12.string().optional().describe("Profile image URL for the profile."),
862
+ heroImage: z12.string().optional().describe("Hero image URL for the profile."),
863
+ websiteLink: z12.string().optional().describe("Website link for the profile."),
864
+ isServiceProfile: z12.boolean().default(false).optional().describe("Whether the profile is a service profile or not."),
865
+ type: z12.string().optional().describe('Profile type: e.g. "person", "organization", "service".'),
866
+ notificationsWebhook: z12.string().url().startsWith("http").optional().describe("URL to send notifications to."),
658
867
  display: LCNProfileDisplayValidator.optional().describe("Display settings for the profile."),
659
- highlightedCredentials: z11.array(z11.string()).max(5).optional().describe("Up to 5 unique boost URIs to highlight on the profile."),
660
- role: z11.string().default("").optional().describe('Role of the profile: e.g. "teacher", "student".'),
661
- dob: z11.string().default("").optional().describe('Date of birth of the profile: e.g. "1990-01-01".'),
662
- country: z11.string().optional().describe("Country for the profile."),
663
- locale: z11.string().optional().describe(
868
+ highlightedCredentials: z12.array(z12.string()).max(5).optional().describe("Up to 5 unique boost URIs to highlight on the profile."),
869
+ role: z12.string().default("").optional().describe('Role of the profile: e.g. "teacher", "student".'),
870
+ dob: z12.string().default("").optional().describe('Date of birth of the profile: e.g. "1990-01-01".'),
871
+ country: z12.string().optional().describe("Country for the profile."),
872
+ locale: z12.string().optional().describe(
664
873
  "BCP-47 language tag (e.g. 'es', 'fr', 'ar') \u2014 the user's preferred language for server-sent notifications and emails."
665
874
  ),
666
- approved: z11.boolean().optional().describe("Approval status for the profile.")
875
+ approved: z12.boolean().optional().describe("Approval status for the profile.")
667
876
  });
668
877
  var LCNPublicProfileValidator = LCNProfileValidator.pick({
669
878
  profileId: true,
@@ -675,30 +884,30 @@ var LCNPublicProfileValidator = LCNProfileValidator.pick({
675
884
  isServiceProfile: true,
676
885
  display: true
677
886
  });
678
- var LCNConnectionPromptStatusValidator = z11.enum(["PENDING", "SKIPPED", "CONNECTED"]);
679
- var LCNConnectionPromptSurfaceValidator = z11.enum(["POST_CLAIM", "NOTIFICATION"]);
680
- var LCNConnectionPromptActionStatusValidator = z11.enum([
887
+ var LCNConnectionPromptStatusValidator = z12.enum(["PENDING", "SKIPPED", "CONNECTED"]);
888
+ var LCNConnectionPromptSurfaceValidator = z12.enum(["POST_CLAIM", "NOTIFICATION"]);
889
+ var LCNConnectionPromptActionStatusValidator = z12.enum([
681
890
  "PENDING",
682
891
  "SKIPPED",
683
892
  "CONNECTED",
684
893
  "STALE"
685
894
  ]);
686
- var LCNConnectionPromptValidator = z11.object({
687
- promptId: z11.string().uuid(),
895
+ var LCNConnectionPromptValidator = z12.object({
896
+ promptId: z12.string().uuid(),
688
897
  status: LCNConnectionPromptStatusValidator,
689
898
  surface: LCNConnectionPromptSurfaceValidator,
690
- triggerId: z11.string(),
691
- triggeredAt: z11.iso.datetime(),
692
- updatedAt: z11.iso.datetime(),
899
+ triggerId: z12.string(),
900
+ triggeredAt: z12.iso.datetime(),
901
+ updatedAt: z12.iso.datetime(),
693
902
  counterpart: LCNPublicProfileValidator
694
903
  });
695
- var LCNConnectionPromptActionResultValidator = z11.object({
696
- promptId: z11.string().uuid(),
904
+ var LCNConnectionPromptActionResultValidator = z12.object({
905
+ promptId: z12.string().uuid(),
697
906
  status: LCNConnectionPromptActionStatusValidator
698
907
  });
699
- var LCNConnectionPromptMetadataValidator = z11.object({
700
- promptId: z11.string().uuid(),
701
- counterpartProfileId: z11.string()
908
+ var LCNConnectionPromptMetadataValidator = z12.object({
909
+ promptId: z12.string().uuid(),
910
+ counterpartProfileId: z12.string()
702
911
  });
703
912
  var LCNAuthedProfileValidator = LCNPublicProfileValidator.extend({
704
913
  bio: LCNProfileValidator.shape.bio,
@@ -709,22 +918,22 @@ var LCNAuthedProfileValidator = LCNPublicProfileValidator.extend({
709
918
  });
710
919
  var LCNConnectionProfileValidator = LCNAuthedProfileValidator.extend({
711
920
  email: LCNProfileValidator.shape.email,
712
- connectedAt: z11.iso.datetime().optional().describe("When the viewer and this profile became connected.")
921
+ connectedAt: z12.iso.datetime().optional().describe("When the viewer and this profile became connected.")
713
922
  });
714
- var LCNVisibleProfileValidator = z11.union([
923
+ var LCNVisibleProfileValidator = z12.union([
715
924
  LCNConnectionProfileValidator.strict(),
716
925
  LCNAuthedProfileValidator.strict(),
717
926
  LCNPublicProfileValidator.strict(),
718
927
  LCNProfileValidator
719
928
  ]);
720
- var LCNProfileQueryValidator = z11.object({
929
+ var LCNProfileQueryValidator = z12.object({
721
930
  profileId: StringQuery,
722
931
  displayName: StringQuery,
723
932
  shortBio: StringQuery,
724
933
  bio: StringQuery,
725
934
  email: StringQuery,
726
935
  websiteLink: StringQuery,
727
- isServiceProfile: z11.boolean(),
936
+ isServiceProfile: z12.boolean(),
728
937
  type: StringQuery
729
938
  }).partial();
730
939
  var PaginatedLCNProfilesValidator = PaginationResponseValidator.extend({
@@ -733,26 +942,26 @@ var PaginatedLCNProfilesValidator = PaginationResponseValidator.extend({
733
942
  var PaginatedVisibleLCNProfilesValidator = PaginationResponseValidator.extend({
734
943
  records: LCNVisibleProfileValidator.array()
735
944
  });
736
- var LCNProfileConnectionStatusEnum = z11.enum([
945
+ var LCNProfileConnectionStatusEnum = z12.enum([
737
946
  "CONNECTED",
738
947
  "PENDING_REQUEST_SENT",
739
948
  "PENDING_REQUEST_RECEIVED",
740
949
  "NOT_CONNECTED"
741
950
  ]);
742
- var LCNProfileManagerValidator = z11.object({
743
- id: z11.string(),
744
- created: z11.string(),
745
- displayName: z11.string().default("").optional(),
746
- shortBio: z11.string().default("").optional(),
747
- bio: z11.string().default("").optional(),
748
- email: z11.string().optional(),
749
- image: z11.string().optional(),
750
- heroImage: z11.string().optional()
951
+ var LCNProfileManagerValidator = z12.object({
952
+ id: z12.string(),
953
+ created: z12.string(),
954
+ displayName: z12.string().default("").optional(),
955
+ shortBio: z12.string().default("").optional(),
956
+ bio: z12.string().default("").optional(),
957
+ email: z12.string().optional(),
958
+ image: z12.string().optional(),
959
+ heroImage: z12.string().optional()
751
960
  });
752
961
  var PaginatedLCNProfileManagersValidator = PaginationResponseValidator.extend({
753
- records: LCNProfileManagerValidator.extend({ did: z11.string() }).array()
962
+ records: LCNProfileManagerValidator.extend({ did: z12.string() }).array()
754
963
  });
755
- var LCNProfileManagerQueryValidator = z11.object({
964
+ var LCNProfileManagerQueryValidator = z12.object({
756
965
  id: StringQuery,
757
966
  displayName: StringQuery,
758
967
  shortBio: StringQuery,
@@ -760,105 +969,105 @@ var LCNProfileManagerQueryValidator = z11.object({
760
969
  email: StringQuery
761
970
  }).partial();
762
971
  var PaginatedLCNProfilesAndManagersValidator = PaginationResponseValidator.extend({
763
- records: z11.object({
972
+ records: z12.object({
764
973
  profile: LCNProfileValidator,
765
- manager: LCNProfileManagerValidator.extend({ did: z11.string() }).optional()
974
+ manager: LCNProfileManagerValidator.extend({ did: z12.string() }).optional()
766
975
  }).array()
767
976
  });
768
- var SentCredentialInfoValidator = z11.object({
769
- uri: z11.string(),
770
- to: z11.string(),
771
- from: z11.string(),
772
- sent: z11.iso.datetime(),
773
- received: z11.iso.datetime().optional(),
774
- metadata: z11.record(z11.string(), z11.unknown()).optional()
775
- });
776
- var BoostPermissionsValidator = z11.object({
777
- role: z11.string(),
778
- canView: z11.boolean().default(true),
779
- canEdit: z11.boolean(),
780
- canIssue: z11.boolean(),
781
- canRevoke: z11.boolean(),
782
- canManagePermissions: z11.boolean(),
783
- canIssueChildren: z11.string(),
784
- canCreateChildren: z11.string(),
785
- canEditChildren: z11.string(),
786
- canRevokeChildren: z11.string(),
787
- canManageChildrenPermissions: z11.string(),
788
- canManageChildrenProfiles: z11.boolean().optional(),
789
- canViewAnalytics: z11.boolean()
790
- });
791
- var BoostPermissionsQueryValidator = z11.object({
977
+ var SentCredentialInfoValidator = z12.object({
978
+ uri: z12.string(),
979
+ to: z12.string(),
980
+ from: z12.string(),
981
+ sent: z12.iso.datetime(),
982
+ received: z12.iso.datetime().optional(),
983
+ metadata: z12.record(z12.string(), z12.unknown()).optional()
984
+ });
985
+ var BoostPermissionsValidator = z12.object({
986
+ role: z12.string(),
987
+ canView: z12.boolean().default(true),
988
+ canEdit: z12.boolean(),
989
+ canIssue: z12.boolean(),
990
+ canRevoke: z12.boolean(),
991
+ canManagePermissions: z12.boolean(),
992
+ canIssueChildren: z12.string(),
993
+ canCreateChildren: z12.string(),
994
+ canEditChildren: z12.string(),
995
+ canRevokeChildren: z12.string(),
996
+ canManageChildrenPermissions: z12.string(),
997
+ canManageChildrenProfiles: z12.boolean().optional(),
998
+ canViewAnalytics: z12.boolean()
999
+ });
1000
+ var BoostPermissionsQueryValidator = z12.object({
792
1001
  role: StringQuery,
793
- canView: z11.boolean(),
794
- canEdit: z11.boolean(),
795
- canIssue: z11.boolean(),
796
- canRevoke: z11.boolean(),
797
- canManagePermissions: z11.boolean(),
1002
+ canView: z12.boolean(),
1003
+ canEdit: z12.boolean(),
1004
+ canIssue: z12.boolean(),
1005
+ canRevoke: z12.boolean(),
1006
+ canManagePermissions: z12.boolean(),
798
1007
  canIssueChildren: StringQuery,
799
1008
  canCreateChildren: StringQuery,
800
1009
  canEditChildren: StringQuery,
801
1010
  canRevokeChildren: StringQuery,
802
1011
  canManageChildrenPermissions: StringQuery,
803
- canManageChildrenProfiles: z11.boolean(),
804
- canViewAnalytics: z11.boolean()
1012
+ canManageChildrenProfiles: z12.boolean(),
1013
+ canViewAnalytics: z12.boolean()
805
1014
  }).partial();
806
- var ClaimHookTypeValidator = z11.enum(["GRANT_PERMISSIONS", "ADD_ADMIN", "AUTO_CONNECT"]);
807
- var ClaimHookValidator = z11.discriminatedUnion("type", [
808
- z11.object({
809
- type: z11.literal(ClaimHookTypeValidator.enum.GRANT_PERMISSIONS),
810
- data: z11.object({
811
- claimUri: z11.string(),
812
- targetUri: z11.string(),
1015
+ var ClaimHookTypeValidator = z12.enum(["GRANT_PERMISSIONS", "ADD_ADMIN", "AUTO_CONNECT"]);
1016
+ var ClaimHookValidator = z12.discriminatedUnion("type", [
1017
+ z12.object({
1018
+ type: z12.literal(ClaimHookTypeValidator.enum.GRANT_PERMISSIONS),
1019
+ data: z12.object({
1020
+ claimUri: z12.string(),
1021
+ targetUri: z12.string(),
813
1022
  permissions: BoostPermissionsValidator.partial()
814
1023
  })
815
1024
  }),
816
- z11.object({
817
- type: z11.literal(ClaimHookTypeValidator.enum.ADD_ADMIN),
818
- data: z11.object({ claimUri: z11.string(), targetUri: z11.string() })
1025
+ z12.object({
1026
+ type: z12.literal(ClaimHookTypeValidator.enum.ADD_ADMIN),
1027
+ data: z12.object({ claimUri: z12.string(), targetUri: z12.string() })
819
1028
  }),
820
- z11.object({
821
- type: z11.literal(ClaimHookTypeValidator.enum.AUTO_CONNECT),
822
- data: z11.object({ claimUri: z11.string(), targetUri: z11.string() })
1029
+ z12.object({
1030
+ type: z12.literal(ClaimHookTypeValidator.enum.AUTO_CONNECT),
1031
+ data: z12.object({ claimUri: z12.string(), targetUri: z12.string() })
823
1032
  })
824
1033
  ]);
825
- var ClaimHookQueryValidator = z11.object({
1034
+ var ClaimHookQueryValidator = z12.object({
826
1035
  type: StringQuery,
827
- data: z11.object({
1036
+ data: z12.object({
828
1037
  claimUri: StringQuery,
829
1038
  targetUri: StringQuery,
830
1039
  permissions: BoostPermissionsQueryValidator.partial()
831
1040
  }).partial()
832
1041
  });
833
- var FullClaimHookValidator = z11.object({ id: z11.string(), createdAt: z11.string(), updatedAt: z11.string() }).and(ClaimHookValidator);
1042
+ var FullClaimHookValidator = z12.object({ id: z12.string(), createdAt: z12.string(), updatedAt: z12.string() }).and(ClaimHookValidator);
834
1043
  var PaginatedClaimHooksValidator = PaginationResponseValidator.extend({
835
1044
  records: FullClaimHookValidator.array()
836
1045
  });
837
- var LCNBoostStatus = z11.enum(["DRAFT", "PROVISIONAL", "LIVE"]);
838
- var BoostValidator = z11.object({
839
- uri: z11.string(),
840
- name: z11.string().optional(),
841
- type: z11.string().optional(),
842
- category: z11.string().optional(),
843
- created: z11.string().optional(),
1046
+ var LCNBoostStatus = z12.enum(["DRAFT", "PROVISIONAL", "LIVE"]);
1047
+ var BoostValidator = z12.object({
1048
+ uri: z12.string(),
1049
+ name: z12.string().optional(),
1050
+ type: z12.string().optional(),
1051
+ category: z12.string().optional(),
1052
+ created: z12.string().optional(),
844
1053
  status: LCNBoostStatus.optional(),
845
- autoConnectRecipients: z11.boolean().optional(),
846
- meta: z11.record(z11.string(), z11.any()).optional(),
1054
+ autoConnectRecipients: z12.boolean().optional(),
1055
+ meta: z12.record(z12.string(), z12.any()).optional(),
847
1056
  claimPermissions: BoostPermissionsValidator.optional(),
848
1057
  defaultPermissions: BoostPermissionsValidator.optional(),
849
- allowAnyoneToCreateChildren: z11.boolean().optional()
1058
+ allowAnyoneToCreateChildren: z12.boolean().optional()
850
1059
  });
851
- var BaseBoostQueryValidator = z11.object({
1060
+ var BaseBoostQueryValidator = z12.object({
852
1061
  uri: StringQuery,
853
1062
  name: StringQuery,
854
1063
  type: StringQuery,
855
1064
  category: StringQuery,
856
- meta: z11.record(z11.string(), StringQuery),
857
- status: LCNBoostStatus.or(z11.object({ $in: LCNBoostStatus.array() })),
858
- autoConnectRecipients: z11.boolean()
1065
+ meta: z12.record(z12.string(), StringQuery),
1066
+ status: LCNBoostStatus.or(z12.object({ $in: LCNBoostStatus.array() })),
1067
+ autoConnectRecipients: z12.boolean()
859
1068
  }).partial();
860
- var BoostQueryValidator = z11.union([
861
- z11.object({
1069
+ var BoostQueryValidator = z12.union([
1070
+ z12.object({
862
1071
  $or: BaseBoostQueryValidator.array()
863
1072
  }),
864
1073
  BaseBoostQueryValidator
@@ -866,99 +1075,105 @@ var BoostQueryValidator = z11.union([
866
1075
  var PaginatedBoostsValidator = PaginationResponseValidator.extend({
867
1076
  records: BoostValidator.array()
868
1077
  });
869
- var BoostRecipientValidator = z11.object({
1078
+ var BoostRecipientValidator = z12.object({
870
1079
  to: LCNVisibleProfileValidator,
871
- from: z11.string(),
872
- received: z11.string().optional(),
873
- uri: z11.string().optional(),
874
- status: z11.enum(["active", "revoked", "suspended"]).optional()
1080
+ from: z12.string(),
1081
+ received: z12.string().optional(),
1082
+ uri: z12.string().optional(),
1083
+ status: z12.enum(["active", "revoked", "suspended"]).optional()
875
1084
  });
876
1085
  var PaginatedBoostRecipientsValidator = PaginationResponseValidator.extend({
877
1086
  records: BoostRecipientValidator.array()
878
1087
  });
879
- var BoostRecipientWithChildrenValidator = z11.object({
1088
+ var BoostRecipientWithChildrenValidator = z12.object({
880
1089
  to: LCNVisibleProfileValidator,
881
- from: z11.string(),
882
- received: z11.string().optional(),
883
- boostUris: z11.array(z11.string()),
884
- credentialUris: z11.array(z11.string()).optional(),
885
- status: z11.enum(["active", "revoked", "suspended"]).optional()
1090
+ from: z12.string(),
1091
+ received: z12.string().optional(),
1092
+ boostUris: z12.array(z12.string()),
1093
+ credentialUris: z12.array(z12.string()).optional(),
1094
+ status: z12.enum(["active", "revoked", "suspended"]).optional()
886
1095
  });
887
1096
  var PaginatedBoostRecipientsWithChildrenValidator = PaginationResponseValidator.extend({
888
1097
  records: BoostRecipientWithChildrenValidator.array()
889
1098
  });
890
- var LCNBoostClaimLinkSigningAuthorityValidator = z11.object({
891
- endpoint: z11.string(),
892
- name: z11.string(),
893
- did: z11.string().optional()
1099
+ var LCNBoostClaimLinkSigningAuthorityValidator = z12.object({
1100
+ endpoint: z12.string(),
1101
+ name: z12.string(),
1102
+ did: z12.string().optional()
894
1103
  });
895
- var LCNBoostClaimLinkOptionsValidator = z11.object({
896
- ttlSeconds: z11.number().optional(),
897
- totalUses: z11.number().optional()
1104
+ var LCNBoostClaimLinkOptionsValidator = z12.object({
1105
+ ttlSeconds: z12.number().optional(),
1106
+ totalUses: z12.number().optional()
898
1107
  });
899
- var LCNSigningAuthorityValidator = z11.object({
900
- endpoint: z11.string()
1108
+ var LCNSigningAuthorityValidator = z12.object({
1109
+ endpoint: z12.string()
901
1110
  });
902
- var LCNSigningAuthorityForUserValidator = z11.object({
1111
+ var LCNSigningAuthorityForUserValidator = z12.object({
903
1112
  signingAuthority: LCNSigningAuthorityValidator,
904
- relationship: z11.object({
905
- name: z11.string().max(15).regex(/^[a-z0-9-]+$/, {
1113
+ relationship: z12.object({
1114
+ name: z12.string().max(15).regex(/^[a-z0-9-]+$/, {
906
1115
  message: "The input string must contain only lowercase letters, numbers, and hyphens."
907
1116
  }),
908
- did: z11.string(),
909
- isPrimary: z11.boolean().optional()
1117
+ did: z12.string(),
1118
+ isPrimary: z12.boolean().optional()
910
1119
  })
911
1120
  });
912
- var AutoBoostConfigValidator = z11.object({
913
- boostUri: z11.string(),
914
- signingAuthority: z11.object({
915
- endpoint: z11.string(),
916
- name: z11.string()
1121
+ var AutoBoostConfigValidator = z12.object({
1122
+ boostUri: z12.string(),
1123
+ signingAuthority: z12.object({
1124
+ endpoint: z12.string(),
1125
+ name: z12.string()
917
1126
  })
918
1127
  });
919
1128
  var SendBoostTemplateValidator = BoostValidator.partial().omit({ uri: true, claimPermissions: true }).extend({
920
1129
  credential: VCValidator.or(UnsignedVCValidator),
921
1130
  claimPermissions: BoostPermissionsValidator.partial().optional(),
922
- skills: z11.array(
923
- z11.object({
924
- frameworkId: z11.string(),
925
- id: z11.string(),
926
- proficiencyLevel: z11.number().optional()
1131
+ skills: z12.array(
1132
+ z12.object({
1133
+ frameworkId: z12.string(),
1134
+ id: z12.string(),
1135
+ proficiencyLevel: z12.number().optional()
927
1136
  })
928
1137
  ).min(1).optional()
929
1138
  });
930
- var SendBrandingOptionsValidator = z11.object({
931
- issuerName: z11.string().optional().describe("Name of the issuing organization"),
932
- issuerLogoUrl: z11.string().url().optional().describe("Logo URL of the issuing organization"),
933
- credentialName: z11.string().optional().describe("Display name for the credential"),
934
- recipientName: z11.string().optional().describe("Name of the recipient for personalization")
1139
+ var SendBrandingOptionsValidator = z12.object({
1140
+ issuerName: z12.string().optional().describe("Name of the issuing organization"),
1141
+ issuerLogoUrl: z12.string().url().optional().describe("Logo URL of the issuing organization"),
1142
+ credentialName: z12.string().optional().describe("Display name for the credential"),
1143
+ recipientName: z12.string().optional().describe("Name of the recipient for personalization")
935
1144
  });
936
- var GuardianStatusValidator = z11.enum([
1145
+ var GuardianStatusValidator = z12.enum([
937
1146
  "AWAITING_GUARDIAN",
938
1147
  "GUARDIAN_APPROVED",
939
1148
  "GUARDIAN_REJECTED"
940
1149
  ]);
941
- var SendOptionsValidator = z11.object({
942
- webhookUrl: z11.string().url().optional().describe("Webhook URL to receive claim notifications"),
943
- suppressDelivery: z11.boolean().optional().describe("If true, returns claimUrl without sending email/SMS"),
1150
+ var SendOptionsValidator = z12.object({
1151
+ webhookUrl: z12.string().url().optional().describe("Webhook URL to receive claim notifications"),
1152
+ suppressDelivery: z12.boolean().optional().describe("If true, returns claimUrl without sending email/SMS"),
944
1153
  branding: SendBrandingOptionsValidator.optional().describe("Branding for email/SMS delivery"),
945
- guardianEmail: z11.string().email().optional().describe("Guardian email that must approve before student can claim"),
946
- expiresInDays: z11.number().int().min(1).max(720).optional().describe(
1154
+ guardianEmail: z12.string().email().optional().describe("Guardian email that must approve before student can claim"),
1155
+ expiresInDays: z12.number().int().min(1).max(720).optional().describe(
947
1156
  "How many days the credential stays claimable in the Universal Inbox (default 30). Does not change the credential validity period."
948
1157
  )
949
1158
  });
950
- var SendBoostInputValidator = z11.object({
951
- type: z11.literal("boost"),
952
- recipient: z11.string().describe("Profile ID, DID, email, or phone number (auto-detected)"),
953
- contractUri: z11.string().optional(),
954
- templateUri: z11.string().optional(),
1159
+ var SendBoostInputValidator = z12.object({
1160
+ type: z12.literal("boost"),
1161
+ recipient: z12.string().describe("Profile ID, DID, email, or phone number (auto-detected)"),
1162
+ contractUri: z12.string().optional(),
1163
+ templateUri: z12.string().optional(),
955
1164
  template: SendBoostTemplateValidator.optional(),
956
1165
  signedCredential: VCValidator.optional(),
957
1166
  options: SendOptionsValidator.optional().describe(
958
1167
  "Options for email/phone recipients (Universal Inbox)"
959
1168
  ),
960
- templateData: z11.record(z11.string(), z11.unknown()).optional(),
961
- integrationId: z11.string().optional().describe("Integration ID for activity tracking")
1169
+ templateData: z12.record(z12.string(), z12.unknown()).optional(),
1170
+ integrationId: z12.string().optional().describe("Integration ID for activity tracking"),
1171
+ refresh: z12.boolean().optional().describe(
1172
+ "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."
1173
+ ),
1174
+ idempotencyKey: z12.string().min(1).max(200).optional().describe(
1175
+ "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."
1176
+ )
962
1177
  }).refine((data) => data.templateUri || data.template || data.signedCredential, {
963
1178
  message: "Either templateUri, template, or signedCredential must be provided.",
964
1179
  path: ["templateUri"]
@@ -973,248 +1188,298 @@ var SendBoostInputValidator = z11.object({
973
1188
  message: "guardianEmail must differ from recipient (self-approval not allowed)",
974
1189
  path: ["options", "guardianEmail"]
975
1190
  }
976
- );
977
- var SendInboxResponseValidator = z11.object({
978
- issuanceId: z11.string(),
979
- status: z11.enum(["PENDING", "ISSUED", "EXPIRED", "DELIVERED", "CLAIMED"]),
980
- claimUrl: z11.string().url().optional().describe("Present when suppressDelivery=true"),
1191
+ ).refine((data) => !data.idempotencyKey || data.refresh === true, {
1192
+ message: "idempotencyKey is only supported with refresh: true.",
1193
+ path: ["idempotencyKey"]
1194
+ });
1195
+ var SendInboxResponseValidator = z12.object({
1196
+ refresh: InboxCredentialRefreshReceiptValidator.optional(),
1197
+ issuanceId: z12.string(),
1198
+ status: z12.enum(["PENDING", "ISSUED", "EXPIRED", "DELIVERED", "CLAIMED"]),
1199
+ claimUrl: z12.string().url().optional().describe("Present when suppressDelivery=true"),
981
1200
  guardianStatus: GuardianStatusValidator.optional().describe(
982
1201
  "Present when guardianEmail was specified"
983
1202
  )
984
1203
  });
985
- var SendBoostResponseValidator = z11.object({
986
- type: z11.literal("boost"),
987
- credentialUri: z11.string(),
988
- uri: z11.string(),
989
- activityId: z11.string().describe("Links to the activity lifecycle for this issuance"),
1204
+ var SendBoostResponseValidator = z12.object({
1205
+ type: z12.literal("boost"),
1206
+ credentialUri: z12.string(),
1207
+ uri: z12.string(),
1208
+ activityId: z12.string().describe("Links to the activity lifecycle for this issuance"),
990
1209
  inbox: SendInboxResponseValidator.optional().describe(
991
1210
  "Present when sent via email/phone (Universal Inbox)"
1211
+ ),
1212
+ refresh: ManagedCredentialRefreshReceiptValidator.optional().describe(
1213
+ "Present when managed refresh was requested: issuance metadata the issuer keeps to publish future updates"
992
1214
  )
993
1215
  });
994
- var SendInputValidator = z11.discriminatedUnion("type", [SendBoostInputValidator]);
995
- var SendResponseValidator = z11.discriminatedUnion("type", [SendBoostResponseValidator]);
996
- var ConsentFlowTermsStatusValidator = z11.enum(["live", "stale", "withdrawn"]);
997
- var ConsentFlowContractValidator = z11.object({
998
- read: z11.object({
999
- anonymize: z11.boolean().optional(),
1000
- credentials: z11.object({
1001
- categories: z11.record(
1002
- z11.string(),
1003
- z11.object({
1004
- required: z11.boolean(),
1005
- defaultEnabled: z11.boolean().optional()
1216
+ var PrepareRefreshableSendInputValidator = z12.object({
1217
+ recipient: z12.string(),
1218
+ templateUri: z12.string().optional(),
1219
+ template: SendBoostTemplateValidator.optional(),
1220
+ contractUri: z12.string().optional(),
1221
+ templateData: z12.record(z12.string(), z12.unknown()).optional(),
1222
+ integrationId: z12.string().optional(),
1223
+ /** Credential ID to allocate for; generated server-side when omitted. */
1224
+ credentialId: z12.string().min(1).optional(),
1225
+ idempotencyKey: z12.string().min(1).max(200).optional()
1226
+ }).refine((data) => Boolean(data.templateUri) !== Boolean(data.template), {
1227
+ message: "Provide exactly one of templateUri or template."
1228
+ });
1229
+ var PrepareRefreshableSendResultValidator = z12.object({
1230
+ boostUri: z12.string(),
1231
+ credentialId: z12.string(),
1232
+ refreshId: z12.string(),
1233
+ refreshService: ManagedCredentialRefreshServiceValidator,
1234
+ /** The DID to use as credentialSubject.id (recipient DID, or the profile's did:web). */
1235
+ holderDid: z12.string(),
1236
+ /** Present when this idempotencyKey already completed: return it without signing. */
1237
+ completed: SendBoostResponseValidator.optional()
1238
+ });
1239
+ var SendInputValidator = z12.discriminatedUnion("type", [SendBoostInputValidator]);
1240
+ var SendResponseValidator = z12.discriminatedUnion("type", [SendBoostResponseValidator]);
1241
+ var ConsentFlowTermsStatusValidator = z12.enum(["live", "stale", "withdrawn"]);
1242
+ var ConsentFlowContractValidator = z12.object({
1243
+ read: z12.object({
1244
+ anonymize: z12.boolean().optional(),
1245
+ credentials: z12.object({
1246
+ categories: z12.record(
1247
+ z12.string(),
1248
+ z12.object({
1249
+ required: z12.boolean(),
1250
+ defaultEnabled: z12.boolean().optional()
1006
1251
  })
1007
1252
  ).default({})
1008
1253
  }).prefault({ categories: {} }),
1009
- personal: z11.record(
1010
- z11.string(),
1011
- z11.object({ required: z11.boolean(), defaultEnabled: z11.boolean().optional() })
1254
+ personal: z12.record(
1255
+ z12.string(),
1256
+ z12.object({ required: z12.boolean(), defaultEnabled: z12.boolean().optional() })
1012
1257
  ).default({})
1013
1258
  }).prefault({ credentials: { categories: {} }, personal: {} }),
1014
- write: z11.object({
1015
- credentials: z11.object({
1016
- categories: z11.record(
1017
- z11.string(),
1018
- z11.object({
1019
- required: z11.boolean(),
1020
- defaultEnabled: z11.boolean().optional()
1259
+ write: z12.object({
1260
+ credentials: z12.object({
1261
+ categories: z12.record(
1262
+ z12.string(),
1263
+ z12.object({
1264
+ required: z12.boolean(),
1265
+ defaultEnabled: z12.boolean().optional()
1021
1266
  })
1022
1267
  ).default({})
1023
1268
  }).prefault({ categories: {} }),
1024
- personal: z11.record(
1025
- z11.string(),
1026
- z11.object({ required: z11.boolean(), defaultEnabled: z11.boolean().optional() })
1269
+ personal: z12.record(
1270
+ z12.string(),
1271
+ z12.object({ required: z12.boolean(), defaultEnabled: z12.boolean().optional() })
1027
1272
  ).default({})
1028
1273
  }).prefault({ credentials: { categories: {} }, personal: {} })
1029
1274
  });
1030
- var ConsentFlowContractDetailsValidator = z11.object({
1275
+ var ConsentFlowContractDetailsValidator = z12.object({
1031
1276
  contract: ConsentFlowContractValidator,
1032
1277
  owner: LCNProfileValidator,
1033
- name: z11.string(),
1034
- subtitle: z11.string().optional(),
1035
- description: z11.string().optional(),
1036
- reasonForAccessing: z11.string().optional(),
1037
- image: z11.string().optional(),
1038
- uri: z11.string(),
1039
- needsGuardianConsent: z11.boolean().optional(),
1040
- redirectUrl: z11.string().optional(),
1041
- frontDoorBoostUri: z11.string().optional(),
1042
- createdAt: z11.string(),
1043
- updatedAt: z11.string(),
1044
- expiresAt: z11.string().optional(),
1045
- autoBoosts: z11.string().array().optional(),
1046
- writers: z11.array(LCNProfileValidator).optional()
1047
- });
1048
- var ConsentFlowContractRequestStatusValidator = z11.enum(["pending", "accepted", "denied"]).nullable();
1049
- var ConsentFlowContractRequestReadStatusValidator = z11.enum(["unseen", "seen"]).nullable();
1050
- var ConsentFlowContractRequestForProfileValidator = z11.object({
1278
+ name: z12.string(),
1279
+ subtitle: z12.string().optional(),
1280
+ description: z12.string().optional(),
1281
+ reasonForAccessing: z12.string().optional(),
1282
+ image: z12.string().optional(),
1283
+ uri: z12.string(),
1284
+ needsGuardianConsent: z12.boolean().optional(),
1285
+ redirectUrl: z12.string().optional(),
1286
+ frontDoorBoostUri: z12.string().optional(),
1287
+ createdAt: z12.string(),
1288
+ updatedAt: z12.string(),
1289
+ expiresAt: z12.string().optional(),
1290
+ autoBoosts: z12.string().array().optional(),
1291
+ writers: z12.array(LCNProfileValidator).optional()
1292
+ });
1293
+ var ConsentFlowContractRequestStatusValidator = z12.enum(["pending", "accepted", "denied"]).nullable();
1294
+ var ConsentFlowContractRequestReadStatusValidator = z12.enum(["unseen", "seen"]).nullable();
1295
+ var ConsentFlowContractRequestForProfileValidator = z12.object({
1051
1296
  profile: LCNProfileValidator,
1052
1297
  status: ConsentFlowContractRequestStatusValidator,
1053
1298
  readStatus: ConsentFlowContractRequestReadStatusValidator.optional()
1054
1299
  });
1055
- var ConsentFlowContractRequestForProfileListValidator = z11.array(
1300
+ var ConsentFlowContractRequestForProfileListValidator = z12.array(
1056
1301
  ConsentFlowContractRequestForProfileValidator
1057
1302
  );
1058
1303
  var PaginatedConsentFlowContractsValidator = PaginationResponseValidator.extend({
1059
1304
  records: ConsentFlowContractDetailsValidator.omit({ owner: true }).array()
1060
1305
  });
1061
- var ConsentFlowContractDataValidator = z11.object({
1062
- credentials: z11.object({ categories: z11.record(z11.string(), z11.string().array()).default({}) }),
1063
- personal: z11.record(z11.string(), z11.string()).default({}),
1064
- date: z11.string()
1306
+ var ConsentFlowContractDataValidator = z12.object({
1307
+ credentials: z12.object({ categories: z12.record(z12.string(), z12.string().array()).default({}) }),
1308
+ personal: z12.record(z12.string(), z12.string()).default({}),
1309
+ date: z12.string()
1065
1310
  });
1066
1311
  var PaginatedConsentFlowDataValidator = PaginationResponseValidator.extend({
1067
1312
  records: ConsentFlowContractDataValidator.array()
1068
1313
  });
1069
- var ConsentFlowContractDataForDidValidator = z11.object({
1070
- credentials: z11.object({ category: z11.string(), uri: z11.string() }).array(),
1071
- personal: z11.record(z11.string(), z11.string()).default({}),
1072
- date: z11.string(),
1073
- contractUri: z11.string()
1074
- });
1075
- var PaginatedConsentFlowDataForDidValidator = PaginationResponseValidator.extend({
1076
- records: ConsentFlowContractDataForDidValidator.array()
1077
- });
1078
- var ConsentFlowTermValidator = z11.object({
1079
- sharing: z11.boolean().optional(),
1080
- shared: z11.string().array().optional(),
1081
- shareAll: z11.boolean().optional(),
1082
- shareUntil: z11.string().optional()
1083
- });
1084
- var ConsentFlowTermsValidator = z11.object({
1085
- read: z11.object({
1086
- anonymize: z11.boolean().optional(),
1087
- credentials: z11.object({
1088
- shareAll: z11.boolean().optional(),
1089
- sharing: z11.boolean().optional(),
1090
- categories: z11.record(z11.string(), ConsentFlowTermValidator).default({})
1314
+ var ConsentFlowTermValidator = z12.object({
1315
+ sharing: z12.boolean().optional(),
1316
+ shared: z12.string().array().optional(),
1317
+ shareAll: z12.boolean().optional(),
1318
+ shareUntil: z12.string().optional()
1319
+ });
1320
+ var ConsentFlowTermsValidator = z12.object({
1321
+ read: z12.object({
1322
+ anonymize: z12.boolean().optional(),
1323
+ credentials: z12.object({
1324
+ shareAll: z12.boolean().optional(),
1325
+ sharing: z12.boolean().optional(),
1326
+ categories: z12.record(z12.string(), ConsentFlowTermValidator).default({})
1091
1327
  }).prefault({ categories: {} }),
1092
- personal: z11.record(z11.string(), z11.string()).default({})
1328
+ personal: z12.record(z12.string(), z12.string()).default({})
1093
1329
  }).prefault({ credentials: { categories: {} }, personal: {} }),
1094
- write: z11.object({
1095
- credentials: z11.object({ categories: z11.record(z11.string(), z11.boolean()).default({}) }).prefault({ categories: {} }),
1096
- personal: z11.record(z11.string(), z11.boolean()).default({})
1330
+ write: z12.object({
1331
+ credentials: z12.object({ categories: z12.record(z12.string(), z12.boolean()).default({}) }).prefault({ categories: {} }),
1332
+ personal: z12.record(z12.string(), z12.boolean()).default({})
1097
1333
  }).prefault({ credentials: { categories: {} }, personal: {} }),
1098
- deniedWriters: z11.array(z11.string()).optional()
1334
+ deniedWriters: z12.array(z12.string()).optional()
1099
1335
  });
1100
1336
  var PaginatedConsentFlowTermsValidator = PaginationResponseValidator.extend({
1101
- records: z11.object({
1102
- expiresAt: z11.string().optional(),
1103
- oneTime: z11.boolean().optional(),
1337
+ records: z12.object({
1338
+ expiresAt: z12.string().optional(),
1339
+ oneTime: z12.boolean().optional(),
1104
1340
  terms: ConsentFlowTermsValidator,
1105
1341
  contract: ConsentFlowContractDetailsValidator,
1106
- uri: z11.string(),
1342
+ uri: z12.string(),
1107
1343
  consenter: LCNProfileValidator,
1108
1344
  status: ConsentFlowTermsStatusValidator
1109
1345
  }).array()
1110
1346
  });
1111
- var ConsentFlowContractQueryValidator = z11.object({
1112
- read: z11.object({
1113
- anonymize: z11.boolean().optional(),
1114
- credentials: z11.object({
1115
- categories: z11.record(z11.string(), z11.object({ required: z11.boolean().optional() })).optional()
1347
+ var ConsentFlowGuardianApprovalValidator = z12.object({
1348
+ guardianProfileId: z12.string(),
1349
+ guardianDid: z12.string(),
1350
+ approvedAt: z12.string().datetime(),
1351
+ contractUpdatedAt: z12.string()
1352
+ });
1353
+ var ConsentFlowContractDataForDidValidator = z12.object({
1354
+ credentials: z12.object({ category: z12.string(), uri: z12.string() }).array(),
1355
+ personal: z12.record(z12.string(), z12.string()).default({}),
1356
+ date: z12.string(),
1357
+ createdAt: z12.string().optional(),
1358
+ contractUpdatedAt: z12.string(),
1359
+ contractExpiresAt: z12.string().optional(),
1360
+ reasonForAccessing: z12.string().optional(),
1361
+ guardian: z12.object({
1362
+ required: z12.boolean(),
1363
+ approved: z12.boolean(),
1364
+ approval: ConsentFlowGuardianApprovalValidator.optional()
1365
+ }),
1366
+ contractUri: z12.string(),
1367
+ termsUri: z12.string(),
1368
+ status: ConsentFlowTermsStatusValidator,
1369
+ expiresAt: z12.string().optional(),
1370
+ terms: ConsentFlowTermsValidator
1371
+ });
1372
+ var PaginatedConsentFlowDataForDidValidator = PaginationResponseValidator.extend({
1373
+ records: ConsentFlowContractDataForDidValidator.array()
1374
+ });
1375
+ var ConsentFlowContractQueryValidator = z12.object({
1376
+ read: z12.object({
1377
+ anonymize: z12.boolean().optional(),
1378
+ credentials: z12.object({
1379
+ categories: z12.record(z12.string(), z12.object({ required: z12.boolean().optional() })).optional()
1116
1380
  }).optional(),
1117
- personal: z11.record(z11.string(), z11.object({ required: z11.boolean().optional() })).optional()
1381
+ personal: z12.record(z12.string(), z12.object({ required: z12.boolean().optional() })).optional()
1118
1382
  }).optional(),
1119
- write: z11.object({
1120
- credentials: z11.object({
1121
- categories: z11.record(z11.string(), z11.object({ required: z11.boolean().optional() })).optional()
1383
+ write: z12.object({
1384
+ credentials: z12.object({
1385
+ categories: z12.record(z12.string(), z12.object({ required: z12.boolean().optional() })).optional()
1122
1386
  }).optional(),
1123
- personal: z11.record(z11.string(), z11.object({ required: z11.boolean().optional() })).optional()
1387
+ personal: z12.record(z12.string(), z12.object({ required: z12.boolean().optional() })).optional()
1124
1388
  }).optional()
1125
1389
  });
1126
- var ConsentFlowDataQueryValidator = z11.object({
1127
- anonymize: z11.boolean().optional(),
1128
- credentials: z11.object({ categories: z11.record(z11.string(), z11.boolean()).optional() }).optional(),
1129
- personal: z11.record(z11.string(), z11.boolean()).optional()
1390
+ var ConsentFlowDataQueryValidator = z12.object({
1391
+ anonymize: z12.boolean().optional(),
1392
+ credentials: z12.object({ categories: z12.record(z12.string(), z12.boolean()).optional() }).optional(),
1393
+ personal: z12.record(z12.string(), z12.boolean()).optional()
1130
1394
  });
1131
- var ConsentFlowDataForDidQueryValidator = z11.object({
1132
- credentials: z11.object({ categories: z11.record(z11.string(), z11.boolean()).optional() }).optional(),
1133
- personal: z11.record(z11.string(), z11.boolean()).optional(),
1395
+ var ConsentFlowDataForDidQueryValidator = z12.object({
1396
+ credentials: z12.object({ categories: z12.record(z12.string(), z12.boolean()).optional() }).optional(),
1397
+ personal: z12.record(z12.string(), z12.boolean()).optional(),
1134
1398
  id: StringQuery.optional()
1135
1399
  });
1136
- var ConsentFlowTermsQueryValidator = z11.object({
1137
- read: z11.object({
1138
- anonymize: z11.boolean().optional(),
1139
- credentials: z11.object({
1140
- shareAll: z11.boolean().optional(),
1141
- sharing: z11.boolean().optional(),
1142
- categories: z11.record(z11.string(), ConsentFlowTermValidator.optional()).optional()
1400
+ var ConsentFlowTermsQueryValidator = z12.object({
1401
+ read: z12.object({
1402
+ anonymize: z12.boolean().optional(),
1403
+ credentials: z12.object({
1404
+ shareAll: z12.boolean().optional(),
1405
+ sharing: z12.boolean().optional(),
1406
+ categories: z12.record(z12.string(), ConsentFlowTermValidator.optional()).optional()
1143
1407
  }).optional(),
1144
- personal: z11.record(z11.string(), z11.string()).optional()
1408
+ personal: z12.record(z12.string(), z12.string()).optional()
1145
1409
  }).optional(),
1146
- write: z11.object({
1147
- credentials: z11.object({ categories: z11.record(z11.string(), z11.boolean()).optional() }).optional(),
1148
- personal: z11.record(z11.string(), z11.boolean()).optional()
1410
+ write: z12.object({
1411
+ credentials: z12.object({ categories: z12.record(z12.string(), z12.boolean()).optional() }).optional(),
1412
+ personal: z12.record(z12.string(), z12.boolean()).optional()
1149
1413
  }).optional()
1150
1414
  });
1151
- var ConsentFlowTransactionActionValidator = z11.enum([
1415
+ var ConsentFlowTransactionActionValidator = z12.enum([
1152
1416
  "consent",
1153
1417
  "update",
1154
1418
  "sync",
1155
1419
  "withdraw",
1156
1420
  "write"
1157
1421
  ]);
1158
- var ConsentFlowTransactionsQueryValidator = z11.object({
1422
+ var ConsentFlowTransactionsQueryValidator = z12.object({
1159
1423
  terms: ConsentFlowTermsQueryValidator.optional(),
1160
1424
  action: ConsentFlowTransactionActionValidator.or(
1161
1425
  ConsentFlowTransactionActionValidator.array()
1162
1426
  ).optional(),
1163
- date: z11.object({ $gt: z11.string() }).or(z11.object({ $lt: z11.string() })).or(z11.object({ $eq: z11.string() })).optional(),
1164
- expiresAt: z11.object({ $gt: z11.string() }).or(z11.object({ $lt: z11.string() })).or(z11.object({ $eq: z11.string() })).optional(),
1165
- oneTime: z11.boolean().optional()
1427
+ date: z12.object({ $gt: z12.string() }).or(z12.object({ $lt: z12.string() })).or(z12.object({ $eq: z12.string() })).optional(),
1428
+ expiresAt: z12.object({ $gt: z12.string() }).or(z12.object({ $lt: z12.string() })).or(z12.object({ $eq: z12.string() })).optional(),
1429
+ oneTime: z12.boolean().optional()
1166
1430
  });
1167
- var ConsentFlowTransactionValidator = z11.object({
1168
- expiresAt: z11.string().optional(),
1169
- oneTime: z11.boolean().optional(),
1431
+ var ConsentFlowTransactionValidator = z12.object({
1432
+ expiresAt: z12.string().optional(),
1433
+ oneTime: z12.boolean().optional(),
1170
1434
  terms: ConsentFlowTermsValidator.optional(),
1171
- id: z11.string(),
1435
+ guardianApproval: ConsentFlowGuardianApprovalValidator.optional(),
1436
+ id: z12.string(),
1172
1437
  action: ConsentFlowTransactionActionValidator,
1173
- date: z11.string(),
1174
- uris: z11.string().array().optional()
1438
+ date: z12.string(),
1439
+ uris: z12.string().array().optional()
1175
1440
  });
1176
- var HolderExportConsentRecordValidator = z11.object({
1177
- termsUri: z11.string(),
1441
+ var HolderExportConsentRecordValidator = z12.object({
1442
+ termsUri: z12.string(),
1178
1443
  status: ConsentFlowTermsStatusValidator,
1179
1444
  contract: ConsentFlowContractDetailsValidator,
1180
1445
  terms: ConsentFlowTermsValidator,
1181
1446
  transactions: ConsentFlowTransactionValidator.array()
1182
1447
  });
1183
- var HolderExportMetadataValidator = z11.object({
1448
+ var HolderExportMetadataValidator = z12.object({
1184
1449
  consentRecords: HolderExportConsentRecordValidator.array(),
1185
- truncated: z11.boolean().optional(),
1186
- warnings: z11.string().array().optional(),
1187
- limits: z11.object({
1188
- maxConsentRecords: z11.number(),
1189
- maxTransactionsPerConsentRecord: z11.number()
1450
+ truncated: z12.boolean().optional(),
1451
+ warnings: z12.string().array().optional(),
1452
+ limits: z12.object({
1453
+ maxConsentRecords: z12.number(),
1454
+ maxTransactionsPerConsentRecord: z12.number()
1190
1455
  }).optional()
1191
1456
  });
1192
1457
  var PaginatedConsentFlowTransactionsValidator = PaginationResponseValidator.extend({
1193
1458
  records: ConsentFlowTransactionValidator.array()
1194
1459
  });
1195
- var BaseSkillFrameworkQueryValidator = z11.object({
1460
+ var BaseSkillFrameworkQueryValidator = z12.object({
1196
1461
  id: StringQuery,
1197
1462
  name: StringQuery,
1198
1463
  description: StringQuery,
1199
1464
  sourceURI: StringQuery,
1200
1465
  status: StringQuery
1201
1466
  }).partial();
1202
- var SkillFrameworkQueryValidator = z11.union([
1203
- z11.object({ $or: BaseSkillFrameworkQueryValidator.array() }),
1467
+ var SkillFrameworkQueryValidator = z12.union([
1468
+ z12.object({ $or: BaseSkillFrameworkQueryValidator.array() }),
1204
1469
  BaseSkillFrameworkQueryValidator
1205
1470
  ]);
1206
- var ContractCredentialValidator = z11.object({
1207
- credentialUri: z11.string(),
1208
- termsUri: z11.string(),
1209
- contractUri: z11.string(),
1210
- boostUri: z11.string(),
1211
- category: z11.string().optional(),
1212
- date: z11.string()
1471
+ var ContractCredentialValidator = z12.object({
1472
+ credentialUri: z12.string(),
1473
+ termsUri: z12.string(),
1474
+ contractUri: z12.string(),
1475
+ boostUri: z12.string(),
1476
+ category: z12.string().optional(),
1477
+ date: z12.string()
1213
1478
  });
1214
1479
  var PaginatedContractCredentialsValidator = PaginationResponseValidator.extend({
1215
1480
  records: ContractCredentialValidator.array()
1216
1481
  });
1217
- var LCNNotificationTypeEnumValidator = z11.enum([
1482
+ var LCNNotificationTypeEnumValidator = z12.enum([
1218
1483
  "CONNECTION_REQUEST",
1219
1484
  "CONNECTION_REQUEST_EXPIRED_INVITE",
1220
1485
  "CONNECTION_ACCEPTED",
@@ -1243,15 +1508,15 @@ var LCNNotificationTypeEnumValidator = z11.enum([
1243
1508
  "CREDENTIAL_UNSUSPENDED",
1244
1509
  "CREDENTIAL_REFRESHED"
1245
1510
  ]);
1246
- var LCNNotificationMessageValidator = z11.object({
1247
- title: z11.string().optional(),
1248
- body: z11.string().optional()
1511
+ var LCNNotificationMessageValidator = z12.object({
1512
+ title: z12.string().optional(),
1513
+ body: z12.string().optional()
1249
1514
  });
1250
- var LCNInboxContactMethodValidator = z11.object({
1251
- type: z11.string(),
1252
- value: z11.string()
1515
+ var LCNInboxContactMethodValidator = z12.object({
1516
+ type: z12.string(),
1517
+ value: z12.string()
1253
1518
  });
1254
- var LCNInboxStatusEnumValidator = z11.enum([
1519
+ var LCNInboxStatusEnumValidator = z12.enum([
1255
1520
  "PENDING",
1256
1521
  "ISSUED",
1257
1522
  "EXPIRED",
@@ -1260,162 +1525,166 @@ var LCNInboxStatusEnumValidator = z11.enum([
1260
1525
  /* DEPRECATED — use ISSUED */
1261
1526
  "CLAIMED"
1262
1527
  ]);
1263
- var LCNNotificationInboxValidator = z11.object({
1264
- issuanceId: z11.string(),
1528
+ var LCNNotificationInboxValidator = z12.object({
1529
+ issuanceId: z12.string(),
1265
1530
  status: LCNInboxStatusEnumValidator,
1266
- recipient: z11.object({
1531
+ recipient: z12.object({
1267
1532
  contactMethod: LCNInboxContactMethodValidator.optional(),
1268
- learnCardId: z11.string().optional()
1533
+ learnCardId: z12.string().optional()
1269
1534
  }),
1270
- timestamp: z11.iso.datetime().optional()
1535
+ timestamp: z12.iso.datetime().optional()
1271
1536
  });
1272
- var LCNNotificationMetadataValidator = z11.object({
1537
+ var LCNNotificationMetadataValidator = z12.object({
1273
1538
  connectionPrompt: LCNConnectionPromptMetadataValidator.optional()
1274
- }).catchall(z11.unknown());
1275
- var LCNNotificationDataValidator = z11.object({
1276
- vcUris: z11.array(z11.string()).optional(),
1277
- vpUris: z11.array(z11.string()).optional(),
1539
+ }).catchall(z12.unknown());
1540
+ var LCNNotificationDataValidator = z12.object({
1541
+ vcUris: z12.array(z12.string()).optional(),
1542
+ vpUris: z12.array(z12.string()).optional(),
1278
1543
  transaction: ConsentFlowTransactionValidator.optional(),
1279
1544
  inbox: LCNNotificationInboxValidator.optional(),
1280
1545
  metadata: LCNNotificationMetadataValidator.optional()
1281
1546
  }).loose();
1282
- var LCNNotificationValidator = z11.object({
1547
+ var LCNNotificationValidator = z12.object({
1283
1548
  type: LCNNotificationTypeEnumValidator,
1284
- to: LCNProfileValidator.partial().and(z11.object({ did: z11.string() })),
1285
- from: z11.union([z11.string(), LCNProfileValidator.partial().and(z11.object({ did: z11.string() }))]),
1549
+ to: LCNProfileValidator.partial().and(z12.object({ did: z12.string() })),
1550
+ from: z12.union([z12.string(), LCNProfileValidator.partial().and(z12.object({ did: z12.string() }))]),
1286
1551
  message: LCNNotificationMessageValidator.optional(),
1287
1552
  data: LCNNotificationDataValidator.optional(),
1288
- sent: z11.iso.datetime().optional(),
1289
- webhookUrl: z11.string().optional()
1553
+ sent: z12.iso.datetime().optional(),
1554
+ webhookUrl: z12.string().optional()
1290
1555
  });
1291
1556
  var AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX = "auth-grant:";
1292
- var AuthGrantValidator = z11.object({
1293
- id: z11.string(),
1294
- name: z11.string(),
1295
- description: z11.string().optional(),
1296
- challenge: z11.string().startsWith(AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX).min(10, { message: "Challenge is too short" }).max(100, { message: "Challenge is too long" }),
1297
- status: z11.enum(["revoked", "active"], {
1557
+ var ACT_AS_HEADER = "X-LearnCard-Act-As";
1558
+ var AuthGrantValidator = z12.object({
1559
+ id: z12.string(),
1560
+ name: z12.string(),
1561
+ description: z12.string().optional(),
1562
+ challenge: z12.string().startsWith(AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX).min(10, { message: "Challenge is too short" }).max(100, { message: "Challenge is too long" }),
1563
+ status: z12.enum(["revoked", "active"], {
1298
1564
  error: /* @__PURE__ */ __name((issue) => {
1299
1565
  if (issue.code === "invalid_value") return "Status must be either active or revoked";
1300
1566
  return "Status is required";
1301
1567
  }, "error")
1302
1568
  }),
1303
- scope: z11.string(),
1304
- createdAt: z11.iso.datetime({ error: "createdAt must be a valid ISO 8601 datetime string" }),
1305
- expiresAt: z11.iso.datetime({ error: "expiresAt must be a valid ISO 8601 datetime string" }).nullish().optional()
1306
- });
1307
- var FlatAuthGrantValidator = z11.object({ id: z11.string() }).catchall(z11.any());
1308
- var AuthGrantStatusValidator = z11.enum(["active", "revoked"]);
1309
- var AuthGrantQueryValidator = z11.object({
1569
+ scope: z12.string(),
1570
+ actAs: z12.string().optional(),
1571
+ createdAt: z12.iso.datetime({ error: "createdAt must be a valid ISO 8601 datetime string" }),
1572
+ expiresAt: z12.iso.datetime({ error: "expiresAt must be a valid ISO 8601 datetime string" }).nullish().optional()
1573
+ });
1574
+ var FlatAuthGrantValidator = z12.object({ id: z12.string() }).catchall(z12.any());
1575
+ var AuthGrantStatusValidator = z12.enum(["active", "revoked"]);
1576
+ var AuthGrantQueryValidator = z12.object({
1310
1577
  id: StringQuery,
1311
1578
  name: StringQuery,
1312
1579
  description: StringQuery,
1313
1580
  status: AuthGrantStatusValidator
1314
1581
  }).partial();
1315
- var contactMethodBase = z11.object({
1316
- id: z11.string(),
1317
- isVerified: z11.boolean(),
1318
- verifiedAt: z11.string().optional(),
1319
- isPrimary: z11.boolean(),
1320
- createdAt: z11.string()
1321
- });
1322
- var ContactMethodValidator = z11.discriminatedUnion("type", [
1323
- z11.object({
1324
- type: z11.literal("email"),
1325
- value: z11.string().email()
1582
+ var contactMethodBase = z12.object({
1583
+ id: z12.string(),
1584
+ isVerified: z12.boolean(),
1585
+ verifiedAt: z12.string().optional(),
1586
+ isPrimary: z12.boolean(),
1587
+ createdAt: z12.string()
1588
+ });
1589
+ var ContactMethodValidator = z12.discriminatedUnion("type", [
1590
+ z12.object({
1591
+ type: z12.literal("email"),
1592
+ value: z12.string().email()
1326
1593
  }).merge(contactMethodBase),
1327
- z11.object({
1328
- type: z11.literal("phone"),
1329
- value: z11.string()
1594
+ z12.object({
1595
+ type: z12.literal("phone"),
1596
+ value: z12.string()
1330
1597
  // Can be improved with a regex later
1331
1598
  }).merge(contactMethodBase)
1332
1599
  ]);
1333
- var createContactMethodBase = z11.object({
1334
- isVerified: z11.boolean().optional(),
1335
- isPrimary: z11.boolean().optional()
1336
- });
1337
- var ContactMethodCreateValidator = z11.discriminatedUnion("type", [
1338
- z11.object({
1339
- type: z11.literal("email"),
1340
- value: z11.string().email()
1600
+ var createContactMethodBase = z12.object({
1601
+ isVerified: z12.boolean().optional(),
1602
+ isPrimary: z12.boolean().optional()
1603
+ });
1604
+ var ContactMethodCreateValidator = z12.discriminatedUnion("type", [
1605
+ z12.object({
1606
+ type: z12.literal("email"),
1607
+ value: z12.string().email()
1341
1608
  }).merge(createContactMethodBase),
1342
- z11.object({
1343
- type: z11.literal("phone"),
1344
- value: z11.string()
1609
+ z12.object({
1610
+ type: z12.literal("phone"),
1611
+ value: z12.string()
1345
1612
  }).merge(createContactMethodBase)
1346
1613
  ]);
1347
- var ContactMethodQueryValidator = z11.discriminatedUnion("type", [
1348
- z11.object({
1349
- type: z11.literal("email"),
1350
- value: z11.string().email()
1614
+ var ContactMethodQueryValidator = z12.discriminatedUnion("type", [
1615
+ z12.object({
1616
+ type: z12.literal("email"),
1617
+ value: z12.string().email()
1351
1618
  }),
1352
- z11.object({
1353
- type: z11.literal("phone"),
1354
- value: z11.string()
1619
+ z12.object({
1620
+ type: z12.literal("phone"),
1621
+ value: z12.string()
1355
1622
  })
1356
1623
  ]);
1357
- var ContactMethodVerificationRequestValidator = z11.object({
1358
- value: z11.string(),
1359
- type: z11.enum(["email", "phone"])
1624
+ var ContactMethodVerificationRequestValidator = z12.object({
1625
+ value: z12.string(),
1626
+ type: z12.enum(["email", "phone"])
1360
1627
  });
1361
- var ContactMethodVerificationValidator = z11.object({
1362
- token: z11.string()
1628
+ var ContactMethodVerificationValidator = z12.object({
1629
+ token: z12.string()
1363
1630
  });
1364
- var SetPrimaryContactMethodValidator = z11.object({
1365
- contactMethodId: z11.string()
1631
+ var SetPrimaryContactMethodValidator = z12.object({
1632
+ contactMethodId: z12.string()
1366
1633
  });
1367
- var CreateContactMethodSessionValidator = z11.object({
1634
+ var CreateContactMethodSessionValidator = z12.object({
1368
1635
  contactMethod: ContactMethodVerificationRequestValidator,
1369
- otpChallenge: z11.string()
1636
+ otpChallenge: z12.string()
1370
1637
  });
1371
- var CreateContactMethodSessionResponseValidator = z11.object({
1372
- sessionJwt: z11.string()
1638
+ var CreateContactMethodSessionResponseValidator = z12.object({
1639
+ sessionJwt: z12.string()
1373
1640
  });
1374
- var InboxCredentialValidator = z11.object({
1375
- id: z11.string(),
1376
- credential: z11.string().optional(),
1377
- isSigned: z11.boolean(),
1641
+ var InboxCredentialValidator = z12.object({
1642
+ refresh: InboxCredentialRefreshReceiptValidator.optional(),
1643
+ refreshId: z12.string().optional(),
1644
+ id: z12.string(),
1645
+ credential: z12.string().optional(),
1646
+ isSigned: z12.boolean(),
1378
1647
  currentStatus: LCNInboxStatusEnumValidator,
1379
- isAccepted: z11.boolean().optional(),
1380
- expiresAt: z11.string(),
1381
- createdAt: z11.string(),
1382
- finalizedAt: z11.string().optional(),
1383
- expiredAt: z11.string().optional(),
1384
- credentialName: z11.string().optional(),
1385
- achievementType: z11.string().optional(),
1386
- issuerDid: z11.string(),
1387
- webhookUrl: z11.string().optional(),
1388
- boostUri: z11.string().optional(),
1389
- activityId: z11.string().optional(),
1390
- integrationId: z11.string().optional(),
1391
- signingAuthority: z11.object({
1392
- endpoint: z11.string().optional(),
1393
- name: z11.string().optional()
1648
+ isAccepted: z12.boolean().optional(),
1649
+ expiresAt: z12.string(),
1650
+ createdAt: z12.string(),
1651
+ finalizedAt: z12.string().optional(),
1652
+ expiredAt: z12.string().optional(),
1653
+ credentialName: z12.string().optional(),
1654
+ achievementType: z12.string().optional(),
1655
+ issuerDid: z12.string(),
1656
+ webhookUrl: z12.string().optional(),
1657
+ boostUri: z12.string().optional(),
1658
+ activityId: z12.string().optional(),
1659
+ integrationId: z12.string().optional(),
1660
+ signingAuthority: z12.object({
1661
+ endpoint: z12.string().optional(),
1662
+ name: z12.string().optional()
1394
1663
  }).optional(),
1395
1664
  // Guardian gate fields (all optional — absent on pre-existing credentials)
1396
- guardianEmail: z11.string().email().optional(),
1665
+ guardianEmail: z12.string().email().optional(),
1397
1666
  guardianStatus: GuardianStatusValidator.optional(),
1398
- guardianApprovedAt: z11.string().optional(),
1399
- guardianApprovedByDid: z11.string().optional()
1667
+ guardianApprovedAt: z12.string().optional(),
1668
+ guardianApprovedByDid: z12.string().optional()
1400
1669
  });
1401
- var PaginatedInboxCredentialsValidator = z11.object({
1402
- hasMore: z11.boolean(),
1403
- records: z11.array(InboxCredentialValidator),
1404
- cursor: z11.string().optional()
1670
+ var PaginatedInboxCredentialsValidator = z12.object({
1671
+ hasMore: z12.boolean(),
1672
+ records: z12.array(InboxCredentialValidator),
1673
+ cursor: z12.string().optional()
1405
1674
  });
1406
- var InboxCredentialQueryValidator = z11.object({
1675
+ var InboxCredentialQueryValidator = z12.object({
1407
1676
  currentStatus: LCNInboxStatusEnumValidator,
1408
- id: z11.string(),
1409
- isSigned: z11.boolean(),
1410
- isAccepted: z11.boolean().optional(),
1411
- issuerDid: z11.string(),
1412
- boostUri: z11.string()
1677
+ id: z12.string(),
1678
+ isSigned: z12.boolean(),
1679
+ isAccepted: z12.boolean().optional(),
1680
+ issuerDid: z12.string(),
1681
+ boostUri: z12.string()
1413
1682
  }).partial();
1414
- var IssueInboxSigningAuthorityValidator = z11.object({
1415
- endpoint: z11.string().url(),
1416
- name: z11.string()
1683
+ var IssueInboxSigningAuthorityValidator = z12.object({
1684
+ endpoint: z12.string().url(),
1685
+ name: z12.string()
1417
1686
  });
1418
- var IssueInboxCredentialValidator = z11.object({
1687
+ var IssueInboxCredentialValidator = z12.object({
1419
1688
  // === CORE DATA (Required) ===
1420
1689
  // WHAT is being sent and WHO is it for?
1421
1690
  recipient: ContactMethodQueryValidator.describe("The recipient of the credential"),
@@ -1423,53 +1692,60 @@ var IssueInboxCredentialValidator = z11.object({
1423
1692
  credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).optional().describe(
1424
1693
  "The credential to issue. If not signed, the users default signing authority will be used, or the specified signing authority in the configuration."
1425
1694
  ),
1426
- templateUri: z11.string().optional().describe(
1695
+ templateUri: z12.string().optional().describe(
1427
1696
  "URI of a boost template to use for issuance. The boost credential will be resolved and used. Mutually exclusive with credential field."
1428
1697
  ),
1698
+ refresh: z12.boolean().optional().describe(
1699
+ "Allocate managed refresh before signing. Requires unsigned content and a registered signing authority; binds the holder on claim."
1700
+ ),
1701
+ idempotencyKey: z12.string().min(1).max(200).optional(),
1429
1702
  // === OPTIONAL FEATURES ===
1430
1703
  // Add major, distinct features at the top level.
1431
1704
  //consentRequest: ConsentRequestValidator.optional(),
1432
1705
  // === PROCESS CONFIGURATION (Optional) ===
1433
1706
  // HOW should this issuance be handled?
1434
- configuration: z11.object({
1707
+ configuration: z12.object({
1708
+ guardianEmail: z12.string().email().optional().describe(
1709
+ "Require approval from this guardian before the recipient can claim. Must differ from the recipient email."
1710
+ ),
1435
1711
  signingAuthority: IssueInboxSigningAuthorityValidator.optional().describe(
1436
1712
  "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."
1437
1713
  ),
1438
- webhookUrl: z11.string().url().optional().describe("The webhook URL to receive credential issuance events."),
1439
- expiresInDays: z11.number().int().min(1).max(720).optional().describe(
1714
+ webhookUrl: z12.string().url().optional().describe("The webhook URL to receive credential issuance events."),
1715
+ expiresInDays: z12.number().int().min(1).max(720).optional().describe(
1440
1716
  "How many days the encrypted inbox payload remains claimable. This does not change the credential validity period."
1441
1717
  ),
1442
- templateData: z11.record(z11.string(), z11.unknown()).optional().describe(
1718
+ templateData: z12.record(z12.string(), z12.unknown()).optional().describe(
1443
1719
  "Template data to render into the boost credential template using Mustache syntax. Only used when boostUri is provided."
1444
1720
  ),
1445
1721
  // --- For User-Facing Delivery (Email/SMS) ---
1446
- delivery: z11.object({
1447
- suppress: z11.boolean().optional().default(false).describe(
1722
+ delivery: z12.object({
1723
+ suppress: z12.boolean().optional().default(false).describe(
1448
1724
  "Whether to suppress delivery of the credential to the recipient. If true, the email/sms will not be sent to the recipient. Useful if you would like to manually send claim link to your users."
1449
1725
  ),
1450
- template: z11.object({
1451
- id: z11.enum(["universal-inbox-claim"]).optional().describe(
1726
+ template: z12.object({
1727
+ id: z12.enum(["universal-inbox-claim"]).optional().describe(
1452
1728
  "The template ID to use for the credential delivery. If not provided, the default template will be used."
1453
1729
  ),
1454
- model: z11.object({
1455
- issuer: z11.object({
1456
- name: z11.string().optional().describe(
1730
+ model: z12.object({
1731
+ issuer: z12.object({
1732
+ name: z12.string().optional().describe(
1457
1733
  'The name of the organization (e.g., "State University").'
1458
1734
  ),
1459
- logoUrl: z11.string().url().optional().describe(
1735
+ logoUrl: z12.string().url().optional().describe(
1460
1736
  "The URL of the organization's logo."
1461
1737
  )
1462
1738
  }).optional(),
1463
- credential: z11.object({
1464
- name: z11.string().optional().describe(
1739
+ credential: z12.object({
1740
+ name: z12.string().optional().describe(
1465
1741
  'The name of the credential (e.g., "Bachelor of Science").'
1466
1742
  ),
1467
- type: z11.string().optional().describe(
1743
+ type: z12.string().optional().describe(
1468
1744
  'The type of the credential (e.g., "degree", "certificate").'
1469
1745
  )
1470
1746
  }).optional(),
1471
- recipient: z11.object({
1472
- name: z11.string().optional().describe(
1747
+ recipient: z12.object({
1748
+ name: z12.string().optional().describe(
1473
1749
  'The name of the recipient (e.g., "John Doe").'
1474
1750
  )
1475
1751
  }).optional()
@@ -1485,74 +1761,187 @@ var IssueInboxCredentialValidator = z11.object({
1485
1761
  }).optional().describe(
1486
1762
  "Configuration for the credential issuance. If not provided, the default configuration will be used."
1487
1763
  )
1764
+ }).refine((data) => !data.idempotencyKey || data.refresh === true, {
1765
+ message: "idempotencyKey requires refresh: true."
1488
1766
  }).refine((data) => data.credential || data.templateUri, {
1489
1767
  message: "Either credential or templateUri must be provided.",
1490
1768
  path: ["credential"]
1491
- });
1492
- var IssueInboxCredentialResponseValidator = z11.object({
1493
- issuanceId: z11.string(),
1769
+ }).refine(
1770
+ (data) => !data.configuration?.guardianEmail || data.recipient.type !== "email" || data.configuration.guardianEmail.toLowerCase() !== data.recipient.value.toLowerCase(),
1771
+ {
1772
+ message: "guardianEmail must differ from recipient (self-approval not allowed)",
1773
+ path: ["configuration", "guardianEmail"]
1774
+ }
1775
+ );
1776
+ var IssueInboxCredentialResponseValidator = z12.object({
1777
+ refresh: InboxCredentialRefreshReceiptValidator.optional(),
1778
+ issuanceId: z12.string(),
1494
1779
  status: LCNInboxStatusEnumValidator,
1495
1780
  recipient: ContactMethodQueryValidator,
1496
- claimUrl: z11.string().url().optional(),
1497
- recipientDid: z11.string().optional()
1781
+ claimUrl: z12.string().url().optional(),
1782
+ recipientDid: z12.string().optional()
1783
+ });
1784
+ var InboxBatchConfigurationValidator = IssueInboxCredentialValidator.shape.configuration.unwrap().extend({
1785
+ refresh: IssueInboxCredentialValidator.shape.refresh.describe(
1786
+ "Enable managed refresh by default. An item configuration.refresh overrides this value, including false."
1787
+ ),
1788
+ delivery: IssueInboxCredentialValidator.shape.configuration.unwrap().shape.delivery.unwrap().extend({ suppress: z12.boolean().optional() }).optional()
1498
1789
  });
1499
- var CredentialNameRefValidator = z11.object({ name: z11.string() }).passthrough();
1500
- var ClaimInboxCredentialValidator = z11.object({
1790
+ var InboxBatchItemConfigurationValidator = InboxBatchConfigurationValidator.extend({
1791
+ guardianEmail: InboxBatchConfigurationValidator.shape.guardianEmail.nullable().describe(
1792
+ "Require guardian approval, or set null to clear a batch-level guardianEmail for this item."
1793
+ )
1794
+ });
1795
+ var IssueInboxCredentialBatchItemValidator = z12.object({
1796
+ ...IssueInboxCredentialValidator.shape,
1797
+ configuration: InboxBatchItemConfigurationValidator.optional(),
1798
+ idempotencyKey: z12.string().max(256).optional()
1799
+ }).refine((data) => data.credential || data.templateUri, {
1800
+ message: "Either credential or templateUri must be provided.",
1801
+ path: ["credential"]
1802
+ }).describe(
1803
+ "One issuance: provide credential or templateUri. Invalid input is rejected at submission with its item index."
1804
+ );
1805
+ var IssueInboxCredentialBatchValidator = z12.object({
1806
+ requestId: z12.string().min(1).max(256).optional(),
1807
+ items: z12.array(IssueInboxCredentialBatchItemValidator).min(1).max(100),
1808
+ configuration: InboxBatchConfigurationValidator.optional()
1809
+ }).superRefine((batch, ctx) => {
1810
+ batch.items.forEach((item, index) => {
1811
+ const itemGuardian = item.configuration?.guardianEmail;
1812
+ const guardian = itemGuardian === null ? void 0 : itemGuardian ?? batch.configuration?.guardianEmail;
1813
+ if (guardian && item.recipient.type === "email" && guardian.toLowerCase() === item.recipient.value.toLowerCase()) {
1814
+ ctx.addIssue({
1815
+ code: "custom",
1816
+ path: ["items", index, "configuration", "guardianEmail"],
1817
+ message: "guardianEmail must differ from recipient (self-approval not allowed)"
1818
+ });
1819
+ }
1820
+ });
1821
+ });
1822
+ var InboxBatchErrorReasonValidator = z12.enum([
1823
+ "DUPLICATE_KEY",
1824
+ "IDEMPOTENCY_MISMATCH",
1825
+ "IN_PROGRESS",
1826
+ "UNCONFIRMED"
1827
+ ]);
1828
+ var IssueInboxCredentialBatchItemResultValidator = z12.discriminatedUnion("success", [
1829
+ IssueInboxCredentialResponseValidator.extend({
1830
+ success: z12.literal(true),
1831
+ index: z12.number().int().nonnegative(),
1832
+ deduplicated: z12.boolean().optional(),
1833
+ guardianStatus: GuardianStatusValidator.optional(),
1834
+ idempotencyKey: z12.string().optional()
1835
+ }),
1836
+ z12.object({
1837
+ success: z12.literal(false),
1838
+ index: z12.number().int().nonnegative(),
1839
+ idempotencyKey: z12.string().optional(),
1840
+ recipient: ContactMethodQueryValidator.optional(),
1841
+ error: z12.object({
1842
+ code: z12.string(),
1843
+ message: z12.string(),
1844
+ reason: InboxBatchErrorReasonValidator.optional()
1845
+ }),
1846
+ issuanceId: z12.string().optional().describe(
1847
+ "Present when issuance completed but replay storage could not be confirmed. Reconcile this issuance; do not issue again with a new key."
1848
+ ),
1849
+ claimUrl: z12.string().url().optional().describe(
1850
+ "Claim URL of the completed issuance, if available, when replay storage could not be confirmed."
1851
+ )
1852
+ })
1853
+ ]);
1854
+ var IssueInboxCredentialBatchResponseValidator = z12.object({
1855
+ results: z12.array(IssueInboxCredentialBatchItemResultValidator),
1856
+ summary: z12.object({
1857
+ total: z12.number(),
1858
+ succeeded: z12.number(),
1859
+ failed: z12.number(),
1860
+ deduplicated: z12.number()
1861
+ })
1862
+ });
1863
+ var InboxBatchReceiptValidator = z12.object({
1864
+ batchId: z12.string(),
1865
+ status: z12.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
1866
+ createdAt: z12.string()
1867
+ });
1868
+ var InboxBatchStatusValidator = z12.object({
1869
+ batchId: z12.string(),
1870
+ createdAt: z12.string(),
1871
+ done: z12.boolean().describe(
1872
+ "True when no queued or processing items remain, including unconfirmed outcomes."
1873
+ ),
1874
+ status: z12.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
1875
+ items: z12.array(
1876
+ z12.object({
1877
+ index: z12.number().int().nonnegative(),
1878
+ state: z12.enum(["QUEUED", "PROCESSING", "COMPLETED", "NEEDS_RECONCILIATION"]),
1879
+ result: IssueInboxCredentialBatchItemResultValidator.optional()
1880
+ })
1881
+ ),
1882
+ summary: IssueInboxCredentialBatchResponseValidator.shape.summary.extend({
1883
+ completed: z12.number(),
1884
+ pending: z12.number(),
1885
+ unconfirmed: z12.number()
1886
+ })
1887
+ });
1888
+ var CredentialNameRefValidator = z12.object({ name: z12.string() }).passthrough();
1889
+ var ClaimInboxCredentialValidator = z12.object({
1501
1890
  credential: VCValidator.or(VPValidator).or(UnsignedVCValidator).or(CredentialNameRefValidator).describe("The credential to issue, or a { name } reference to resolve a boost template."),
1502
- configuration: z11.object({
1503
- publishableKey: z11.string(),
1504
- expiresInDays: z11.number().int().min(1).max(720).optional().describe(
1891
+ configuration: z12.object({
1892
+ publishableKey: z12.string(),
1893
+ expiresInDays: z12.number().int().min(1).max(720).optional().describe(
1505
1894
  "Inbox claim window in days. Defaults to 720; use a shorter window for sensitive records."
1506
1895
  ),
1507
- signingAuthorityName: z11.string().optional(),
1508
- listingId: z11.string().optional(),
1509
- listingSlug: z11.string().optional()
1896
+ signingAuthorityName: z12.string().optional(),
1897
+ listingId: z12.string().optional(),
1898
+ listingSlug: z12.string().optional()
1510
1899
  }).optional()
1511
1900
  });
1512
- var LCNDomainOrOriginValidator = z11.union([
1513
- z11.string().regex(
1901
+ var LCNDomainOrOriginValidator = z12.union([
1902
+ z12.string().regex(
1514
1903
  /^(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
1515
1904
  {
1516
1905
  message: "Must be a valid domain (incl. subdomains), localhost, or IPv4, optionally with port"
1517
1906
  }
1518
1907
  ),
1519
- z11.string().regex(
1908
+ z12.string().regex(
1520
1909
  /^https?:\/\/(?:(?:[a-zA-Z0-9-]{1,63}\.)+[a-zA-Z]{2,63}|localhost|\d{1,3}(?:\.\d{1,3}){3})(?::\d{1,5})?$/,
1521
1910
  { message: "Must be a valid http(s) origin" }
1522
1911
  )
1523
1912
  ]);
1524
- var LCNIntegrationStatusEnum = z11.enum(["setup", "active", "paused"]);
1525
- var LCNIntegrationValidator = z11.object({
1526
- id: z11.string(),
1527
- name: z11.string(),
1528
- description: z11.string().optional(),
1529
- publishableKey: z11.string(),
1530
- whitelistedDomains: z11.array(LCNDomainOrOriginValidator).default([]),
1913
+ var LCNIntegrationStatusEnum = z12.enum(["setup", "active", "paused"]);
1914
+ var LCNIntegrationValidator = z12.object({
1915
+ id: z12.string(),
1916
+ name: z12.string(),
1917
+ description: z12.string().optional(),
1918
+ publishableKey: z12.string(),
1919
+ whitelistedDomains: z12.array(LCNDomainOrOriginValidator).default([]),
1531
1920
  // Setup/onboarding status
1532
1921
  status: LCNIntegrationStatusEnum.default("setup"),
1533
- guideType: z11.string().optional(),
1534
- guideState: z11.record(z11.string(), z11.any()).optional(),
1922
+ guideType: z12.string().optional(),
1923
+ guideState: z12.record(z12.string(), z12.any()).optional(),
1535
1924
  // Timestamps
1536
- createdAt: z11.string().optional(),
1537
- updatedAt: z11.string().optional()
1538
- });
1539
- var LCNIntegrationCreateValidator = z11.object({
1540
- name: z11.string(),
1541
- description: z11.string().optional(),
1542
- whitelistedDomains: z11.array(LCNDomainOrOriginValidator).default([]),
1543
- guideType: z11.string().optional()
1544
- });
1545
- var LCNIntegrationUpdateValidator = z11.object({
1546
- name: z11.string().optional(),
1547
- description: z11.string().optional(),
1548
- whitelistedDomains: z11.array(LCNDomainOrOriginValidator).optional(),
1549
- rotatePublishableKey: z11.boolean().optional(),
1925
+ createdAt: z12.string().optional(),
1926
+ updatedAt: z12.string().optional()
1927
+ });
1928
+ var LCNIntegrationCreateValidator = z12.object({
1929
+ name: z12.string(),
1930
+ description: z12.string().optional(),
1931
+ whitelistedDomains: z12.array(LCNDomainOrOriginValidator).default([]),
1932
+ guideType: z12.string().optional()
1933
+ });
1934
+ var LCNIntegrationUpdateValidator = z12.object({
1935
+ name: z12.string().optional(),
1936
+ description: z12.string().optional(),
1937
+ whitelistedDomains: z12.array(LCNDomainOrOriginValidator).optional(),
1938
+ rotatePublishableKey: z12.boolean().optional(),
1550
1939
  // Setup/onboarding updates
1551
1940
  status: LCNIntegrationStatusEnum.optional(),
1552
- guideType: z11.string().optional(),
1553
- guideState: z11.record(z11.string(), z11.any()).optional()
1941
+ guideType: z12.string().optional(),
1942
+ guideState: z12.record(z12.string(), z12.any()).optional()
1554
1943
  });
1555
- var LCNIntegrationQueryValidator = z11.object({
1944
+ var LCNIntegrationQueryValidator = z12.object({
1556
1945
  id: StringQuery,
1557
1946
  name: StringQuery,
1558
1947
  description: StringQuery,
@@ -1562,117 +1951,117 @@ var LCNIntegrationQueryValidator = z11.object({
1562
1951
  var PaginatedLCNIntegrationsValidator = PaginationResponseValidator.extend({
1563
1952
  records: LCNIntegrationValidator.array()
1564
1953
  });
1565
- var ClaimTokenValidator = z11.object({
1566
- token: z11.string(),
1567
- contactMethodId: z11.string(),
1568
- autoVerifyContactMethod: z11.boolean().optional().default(false),
1569
- createdAt: z11.string(),
1570
- expiresAt: z11.string(),
1571
- used: z11.boolean()
1572
- });
1573
- var TagValidator = z11.object({
1574
- id: z11.string(),
1575
- name: z11.string().min(1),
1576
- slug: z11.string().min(1),
1577
- createdAt: z11.string().optional(),
1578
- updatedAt: z11.string().optional()
1579
- });
1580
- var SkillStatusEnum = z11.enum(["active", "archived"]);
1581
- var SkillValidator = z11.object({
1582
- id: z11.string(),
1583
- statement: z11.string(),
1584
- description: z11.string().optional(),
1585
- code: z11.string().optional(),
1586
- icon: z11.string().optional(),
1587
- type: z11.string().default("skill"),
1954
+ var ClaimTokenValidator = z12.object({
1955
+ token: z12.string(),
1956
+ contactMethodId: z12.string(),
1957
+ autoVerifyContactMethod: z12.boolean().optional().default(false),
1958
+ createdAt: z12.string(),
1959
+ expiresAt: z12.string(),
1960
+ used: z12.boolean()
1961
+ });
1962
+ var TagValidator = z12.object({
1963
+ id: z12.string(),
1964
+ name: z12.string().min(1),
1965
+ slug: z12.string().min(1),
1966
+ createdAt: z12.string().optional(),
1967
+ updatedAt: z12.string().optional()
1968
+ });
1969
+ var SkillStatusEnum = z12.enum(["active", "archived"]);
1970
+ var SkillValidator = z12.object({
1971
+ id: z12.string(),
1972
+ statement: z12.string(),
1973
+ description: z12.string().optional(),
1974
+ code: z12.string().optional(),
1975
+ icon: z12.string().optional(),
1976
+ type: z12.string().default("skill"),
1588
1977
  status: SkillStatusEnum.default("active"),
1589
- frameworkId: z11.string().optional(),
1590
- createdAt: z11.string().optional(),
1591
- updatedAt: z11.string().optional()
1978
+ frameworkId: z12.string().optional(),
1979
+ createdAt: z12.string().optional(),
1980
+ updatedAt: z12.string().optional()
1592
1981
  });
1593
- var BaseSkillQueryValidator = z11.object({
1982
+ var BaseSkillQueryValidator = z12.object({
1594
1983
  id: StringQuery,
1595
1984
  statement: StringQuery,
1596
1985
  description: StringQuery,
1597
1986
  code: StringQuery,
1598
1987
  type: StringQuery,
1599
- status: SkillStatusEnum.or(z11.object({ $in: SkillStatusEnum.array() }))
1988
+ status: SkillStatusEnum.or(z12.object({ $in: SkillStatusEnum.array() }))
1600
1989
  }).partial();
1601
- var SkillQueryValidator = z11.union([
1602
- z11.object({
1990
+ var SkillQueryValidator = z12.union([
1991
+ z12.object({
1603
1992
  $or: BaseSkillQueryValidator.array()
1604
1993
  }),
1605
1994
  BaseSkillQueryValidator
1606
1995
  ]);
1607
- var SkillSemanticSearchInputValidator = z11.object({
1608
- text: z11.string().min(1),
1609
- frameworkId: z11.string().optional(),
1610
- limit: z11.number().int().min(1).max(200).default(50)
1996
+ var SkillSemanticSearchInputValidator = z12.object({
1997
+ text: z12.string().min(1),
1998
+ frameworkId: z12.string().optional(),
1999
+ limit: z12.number().int().min(1).max(200).default(50)
1611
2000
  });
1612
2001
  var SkillSemanticSearchResultItemValidator = SkillValidator.extend({
1613
- score: z11.number()
2002
+ score: z12.number()
1614
2003
  });
1615
- var SkillSemanticSearchResultValidator = z11.object({
2004
+ var SkillSemanticSearchResultValidator = z12.object({
1616
2005
  records: SkillSemanticSearchResultItemValidator.array()
1617
2006
  });
1618
- var SkillFrameworkStatusEnum = z11.enum(["active", "archived"]);
1619
- var SkillFrameworkValidator = z11.object({
1620
- id: z11.string(),
1621
- name: z11.string(),
1622
- description: z11.string().optional(),
1623
- image: z11.string().optional(),
1624
- sourceURI: z11.string().url().optional(),
1625
- isPublic: z11.boolean().default(false),
2007
+ var SkillFrameworkStatusEnum = z12.enum(["active", "archived"]);
2008
+ var SkillFrameworkValidator = z12.object({
2009
+ id: z12.string(),
2010
+ name: z12.string(),
2011
+ description: z12.string().optional(),
2012
+ image: z12.string().optional(),
2013
+ sourceURI: z12.string().url().optional(),
2014
+ isPublic: z12.boolean().default(false),
1626
2015
  status: SkillFrameworkStatusEnum.default("active"),
1627
- createdAt: z11.string().optional(),
1628
- updatedAt: z11.string().optional()
2016
+ createdAt: z12.string().optional(),
2017
+ updatedAt: z12.string().optional()
1629
2018
  });
1630
2019
  var PaginatedSkillFrameworksValidator = PaginationResponseValidator.extend({
1631
2020
  records: SkillFrameworkValidator.array()
1632
2021
  });
1633
2022
  var SkillTreeNodeValidator = SkillValidator.extend({
1634
- children: z11.array(z11.lazy(() => SkillTreeNodeValidator)),
1635
- hasChildren: z11.boolean(),
1636
- childrenCursor: z11.string().nullable().optional()
1637
- });
1638
- var PaginatedSkillTreeValidator = z11.object({
1639
- hasMore: z11.boolean(),
1640
- cursor: z11.string().nullable(),
1641
- records: z11.array(SkillTreeNodeValidator)
1642
- });
1643
- var SkillTreeNodeInputValidator = z11.lazy(
1644
- () => z11.object({
1645
- id: z11.string().optional(),
1646
- statement: z11.string(),
1647
- description: z11.string().optional(),
1648
- code: z11.string().optional(),
1649
- icon: z11.string().optional(),
1650
- type: z11.string().optional(),
2023
+ children: z12.array(z12.lazy(() => SkillTreeNodeValidator)),
2024
+ hasChildren: z12.boolean(),
2025
+ childrenCursor: z12.string().nullable().optional()
2026
+ });
2027
+ var PaginatedSkillTreeValidator = z12.object({
2028
+ hasMore: z12.boolean(),
2029
+ cursor: z12.string().nullable(),
2030
+ records: z12.array(SkillTreeNodeValidator)
2031
+ });
2032
+ var SkillTreeNodeInputValidator = z12.lazy(
2033
+ () => z12.object({
2034
+ id: z12.string().optional(),
2035
+ statement: z12.string(),
2036
+ description: z12.string().optional(),
2037
+ code: z12.string().optional(),
2038
+ icon: z12.string().optional(),
2039
+ type: z12.string().optional(),
1651
2040
  status: SkillStatusEnum.optional(),
1652
- children: z11.array(SkillTreeNodeInputValidator).optional()
2041
+ children: z12.array(SkillTreeNodeInputValidator).optional()
1653
2042
  })
1654
2043
  );
1655
- var LinkProviderFrameworkInputValidator = z11.object({
1656
- frameworkId: z11.string()
1657
- });
1658
- var CreateManagedFrameworkInputValidator = z11.object({
1659
- id: z11.string().optional(),
1660
- name: z11.string().min(1),
1661
- description: z11.string().optional(),
1662
- image: z11.string().optional(),
1663
- sourceURI: z11.string().url().optional(),
1664
- isPublic: z11.boolean().optional(),
2044
+ var LinkProviderFrameworkInputValidator = z12.object({
2045
+ frameworkId: z12.string()
2046
+ });
2047
+ var CreateManagedFrameworkInputValidator = z12.object({
2048
+ id: z12.string().optional(),
2049
+ name: z12.string().min(1),
2050
+ description: z12.string().optional(),
2051
+ image: z12.string().optional(),
2052
+ sourceURI: z12.string().url().optional(),
2053
+ isPublic: z12.boolean().optional(),
1665
2054
  status: SkillFrameworkStatusEnum.optional(),
1666
- skills: z11.array(SkillTreeNodeInputValidator).optional(),
1667
- boostUris: z11.array(z11.string()).optional()
1668
- });
1669
- var UpdateFrameworkInputValidator = z11.object({
1670
- id: z11.string(),
1671
- name: z11.string().min(1).optional(),
1672
- description: z11.string().optional(),
1673
- image: z11.string().optional(),
1674
- sourceURI: z11.string().url().optional(),
1675
- isPublic: z11.boolean().optional(),
2055
+ skills: z12.array(SkillTreeNodeInputValidator).optional(),
2056
+ boostUris: z12.array(z12.string()).optional()
2057
+ });
2058
+ var UpdateFrameworkInputValidator = z12.object({
2059
+ id: z12.string(),
2060
+ name: z12.string().min(1).optional(),
2061
+ description: z12.string().optional(),
2062
+ image: z12.string().optional(),
2063
+ sourceURI: z12.string().url().optional(),
2064
+ isPublic: z12.boolean().optional(),
1676
2065
  status: SkillFrameworkStatusEnum.optional()
1677
2066
  }).refine(
1678
2067
  (data) => data.name !== void 0 || data.description !== void 0 || data.image !== void 0 || data.sourceURI !== void 0 || data.isPublic !== void 0 || data.status !== void 0,
@@ -1681,38 +2070,38 @@ var UpdateFrameworkInputValidator = z11.object({
1681
2070
  path: ["name"]
1682
2071
  }
1683
2072
  );
1684
- var DeleteFrameworkInputValidator = z11.object({ id: z11.string() });
1685
- var CreateManagedFrameworkBatchInputValidator = z11.object({
1686
- frameworks: z11.array(
2073
+ var DeleteFrameworkInputValidator = z12.object({ id: z12.string() });
2074
+ var CreateManagedFrameworkBatchInputValidator = z12.object({
2075
+ frameworks: z12.array(
1687
2076
  CreateManagedFrameworkInputValidator.extend({
1688
- skills: z11.array(SkillTreeNodeInputValidator).optional()
2077
+ skills: z12.array(SkillTreeNodeInputValidator).optional()
1689
2078
  })
1690
2079
  ).min(1)
1691
2080
  });
1692
- var SkillFrameworkAdminInputValidator = z11.object({
1693
- frameworkId: z11.string(),
1694
- profileId: z11.string()
2081
+ var SkillFrameworkAdminInputValidator = z12.object({
2082
+ frameworkId: z12.string(),
2083
+ profileId: z12.string()
1695
2084
  });
1696
- var SkillFrameworkIdInputValidator = z11.object({ frameworkId: z11.string() });
2085
+ var SkillFrameworkIdInputValidator = z12.object({ frameworkId: z12.string() });
1697
2086
  var SkillFrameworkAdminsValidator = LCNProfileValidator.array();
1698
- var SyncFrameworkInputValidator = z11.object({ id: z11.string() });
1699
- var AddTagInputValidator = z11.object({
1700
- slug: z11.string().min(1),
1701
- name: z11.string().min(1)
2087
+ var SyncFrameworkInputValidator = z12.object({ id: z12.string() });
2088
+ var AddTagInputValidator = z12.object({
2089
+ slug: z12.string().min(1),
2090
+ name: z12.string().min(1)
1702
2091
  });
1703
- var CreateSkillInputValidator = z11.object({
1704
- frameworkId: z11.string(),
2092
+ var CreateSkillInputValidator = z12.object({
2093
+ frameworkId: z12.string(),
1705
2094
  skill: SkillTreeNodeInputValidator,
1706
- parentId: z11.string().nullable().optional()
1707
- });
1708
- var UpdateSkillInputValidator = z11.object({
1709
- frameworkId: z11.string(),
1710
- id: z11.string(),
1711
- statement: z11.string().optional(),
1712
- description: z11.string().optional(),
1713
- code: z11.string().optional(),
1714
- icon: z11.string().optional(),
1715
- type: z11.string().optional(),
2095
+ parentId: z12.string().nullable().optional()
2096
+ });
2097
+ var UpdateSkillInputValidator = z12.object({
2098
+ frameworkId: z12.string(),
2099
+ id: z12.string(),
2100
+ statement: z12.string().optional(),
2101
+ description: z12.string().optional(),
2102
+ code: z12.string().optional(),
2103
+ icon: z12.string().optional(),
2104
+ type: z12.string().optional(),
1716
2105
  status: SkillStatusEnum.optional()
1717
2106
  }).refine(
1718
2107
  (data) => data.statement !== void 0 || data.description !== void 0 || data.code !== void 0 || data.icon !== void 0 || data.type !== void 0 || data.status !== void 0,
@@ -1721,56 +2110,56 @@ var UpdateSkillInputValidator = z11.object({
1721
2110
  path: ["statement"]
1722
2111
  }
1723
2112
  );
1724
- var SkillDeletionStrategyValidator = z11.enum(["recursive", "reparent"]);
1725
- var DeleteSkillInputValidator = z11.object({
1726
- frameworkId: z11.string(),
1727
- id: z11.string(),
2113
+ var SkillDeletionStrategyValidator = z12.enum(["recursive", "reparent"]);
2114
+ var DeleteSkillInputValidator = z12.object({
2115
+ frameworkId: z12.string(),
2116
+ id: z12.string(),
1728
2117
  strategy: SkillDeletionStrategyValidator.optional().default("reparent")
1729
2118
  });
1730
- var CreateSkillsBatchInputValidator = z11.object({
1731
- frameworkId: z11.string(),
1732
- skills: z11.array(SkillTreeNodeInputValidator).min(1),
1733
- parentId: z11.string().nullable().optional()
2119
+ var CreateSkillsBatchInputValidator = z12.object({
2120
+ frameworkId: z12.string(),
2121
+ skills: z12.array(SkillTreeNodeInputValidator).min(1),
2122
+ parentId: z12.string().nullable().optional()
1734
2123
  });
1735
- var ReplaceSkillFrameworkSkillsInputValidator = z11.object({
1736
- frameworkId: z11.string(),
1737
- skills: z11.array(SkillTreeNodeInputValidator).min(0)
2124
+ var ReplaceSkillFrameworkSkillsInputValidator = z12.object({
2125
+ frameworkId: z12.string(),
2126
+ skills: z12.array(SkillTreeNodeInputValidator).min(0)
1738
2127
  });
1739
- var ReplaceSkillFrameworkSkillsResultValidator = z11.object({
1740
- created: z11.number().int().min(0),
1741
- updated: z11.number().int().min(0),
1742
- deleted: z11.number().int().min(0),
1743
- unchanged: z11.number().int().min(0),
1744
- total: z11.number().int().min(0)
2128
+ var ReplaceSkillFrameworkSkillsResultValidator = z12.object({
2129
+ created: z12.number().int().min(0),
2130
+ updated: z12.number().int().min(0),
2131
+ deleted: z12.number().int().min(0),
2132
+ unchanged: z12.number().int().min(0),
2133
+ total: z12.number().int().min(0)
1745
2134
  });
1746
- var CountSkillsInputValidator = z11.object({
1747
- frameworkId: z11.string(),
1748
- skillId: z11.string().optional(),
1749
- recursive: z11.boolean().optional().default(false),
1750
- onlyCountCompetencies: z11.boolean().optional().default(false)
2135
+ var CountSkillsInputValidator = z12.object({
2136
+ frameworkId: z12.string(),
2137
+ skillId: z12.string().optional(),
2138
+ recursive: z12.boolean().optional().default(false),
2139
+ onlyCountCompetencies: z12.boolean().optional().default(false)
1751
2140
  });
1752
- var CountSkillsResultValidator = z11.object({
1753
- count: z11.number().int().min(0)
2141
+ var CountSkillsResultValidator = z12.object({
2142
+ count: z12.number().int().min(0)
1754
2143
  });
1755
- var GetFullSkillTreeInputValidator = z11.object({
1756
- frameworkId: z11.string()
2144
+ var GetFullSkillTreeInputValidator = z12.object({
2145
+ frameworkId: z12.string()
1757
2146
  });
1758
- var GetFullSkillTreeResultValidator = z11.object({
1759
- skills: z11.array(SkillTreeNodeValidator)
2147
+ var GetFullSkillTreeResultValidator = z12.object({
2148
+ skills: z12.array(SkillTreeNodeValidator)
1760
2149
  });
1761
- var GetSkillPathInputValidator = z11.object({
1762
- frameworkId: z11.string(),
1763
- skillId: z11.string()
2150
+ var GetSkillPathInputValidator = z12.object({
2151
+ frameworkId: z12.string(),
2152
+ skillId: z12.string()
1764
2153
  });
1765
- var GetSkillPathResultValidator = z11.object({
1766
- path: z11.array(SkillValidator)
2154
+ var GetSkillPathResultValidator = z12.object({
2155
+ path: z12.array(SkillValidator)
1767
2156
  });
1768
- var FrameworkWithSkillsValidator = z11.object({
2157
+ var FrameworkWithSkillsValidator = z12.object({
1769
2158
  framework: SkillFrameworkValidator,
1770
2159
  skills: PaginatedSkillTreeValidator
1771
2160
  });
1772
- var AppListingStatusValidator = z11.enum(["DRAFT", "PENDING_REVIEW", "LISTED", "ARCHIVED"]);
1773
- var LaunchTypeValidator = z11.enum([
2161
+ var AppListingStatusValidator = z12.enum(["DRAFT", "PENDING_REVIEW", "LISTED", "ARCHIVED"]);
2162
+ var LaunchTypeValidator = z12.enum([
1774
2163
  "EMBEDDED_IFRAME",
1775
2164
  "SECOND_SCREEN",
1776
2165
  "DIRECT_LINK",
@@ -1778,43 +2167,43 @@ var LaunchTypeValidator = z11.enum([
1778
2167
  "SERVER_HEADLESS",
1779
2168
  "AI_TUTOR"
1780
2169
  ]);
1781
- var PromotionLevelValidator = z11.enum([
2170
+ var PromotionLevelValidator = z12.enum([
1782
2171
  "FEATURED_CAROUSEL",
1783
2172
  "CURATED_LIST",
1784
2173
  "STANDARD",
1785
2174
  "DEMOTED"
1786
2175
  ]);
1787
- var AgeRatingValidator = z11.enum(["4+", "9+", "12+", "17+"]);
1788
- var AppStoreListingSubmitterValidator = z11.object({
1789
- profileId: z11.string(),
1790
- displayName: z11.string(),
1791
- email: z11.string().optional()
1792
- });
1793
- var AppStoreListingValidator = z11.object({
1794
- listing_id: z11.string(),
1795
- slug: z11.string().optional(),
1796
- display_name: z11.string(),
1797
- tagline: z11.string(),
1798
- full_description: z11.string(),
1799
- icon_url: z11.string(),
2176
+ var AgeRatingValidator = z12.enum(["4+", "9+", "12+", "17+"]);
2177
+ var AppStoreListingSubmitterValidator = z12.object({
2178
+ profileId: z12.string(),
2179
+ displayName: z12.string(),
2180
+ email: z12.string().optional()
2181
+ });
2182
+ var AppStoreListingValidator = z12.object({
2183
+ listing_id: z12.string(),
2184
+ slug: z12.string().optional(),
2185
+ display_name: z12.string(),
2186
+ tagline: z12.string(),
2187
+ full_description: z12.string(),
2188
+ icon_url: z12.string(),
1800
2189
  app_listing_status: AppListingStatusValidator,
1801
2190
  launch_type: LaunchTypeValidator,
1802
- launch_config_json: z11.string(),
1803
- category: z11.string().optional(),
1804
- promo_video_url: z11.string().optional(),
2191
+ launch_config_json: z12.string(),
2192
+ category: z12.string().optional(),
2193
+ promo_video_url: z12.string().optional(),
1805
2194
  promotion_level: PromotionLevelValidator.optional(),
1806
- ios_app_store_id: z11.string().optional(),
1807
- android_app_store_id: z11.string().optional(),
1808
- privacy_policy_url: z11.string().optional(),
1809
- terms_url: z11.string().optional(),
1810
- highlights: z11.array(z11.string()).optional(),
1811
- screenshots: z11.array(z11.string()).optional(),
1812
- hero_background_color: z11.string().optional(),
1813
- min_age: z11.number().int().min(0).max(18).optional(),
2195
+ ios_app_store_id: z12.string().optional(),
2196
+ android_app_store_id: z12.string().optional(),
2197
+ privacy_policy_url: z12.string().optional(),
2198
+ terms_url: z12.string().optional(),
2199
+ highlights: z12.array(z12.string()).optional(),
2200
+ screenshots: z12.array(z12.string()).optional(),
2201
+ hero_background_color: z12.string().optional(),
2202
+ min_age: z12.number().int().min(0).max(18).optional(),
1814
2203
  age_rating: AgeRatingValidator.optional(),
1815
- submitted_at: z11.string().optional(),
2204
+ submitted_at: z12.string().optional(),
1816
2205
  submitter: AppStoreListingSubmitterValidator.optional(),
1817
- contact_email: z11.string().email().optional()
2206
+ contact_email: z12.string().email().optional()
1818
2207
  });
1819
2208
  var AppStoreListingCreateValidator = AppStoreListingValidator.omit({
1820
2209
  listing_id: true,
@@ -1827,7 +2216,7 @@ var AppStoreListingUpdateValidator = AppStoreListingValidator.partial().omit({
1827
2216
  promotion_level: true
1828
2217
  });
1829
2218
  var InstalledAppValidator = AppStoreListingValidator.extend({
1830
- installed_at: z11.string()
2219
+ installed_at: z12.string()
1831
2220
  });
1832
2221
  var PaginatedAppStoreListingsValidator = PaginationResponseValidator.extend({
1833
2222
  records: AppStoreListingValidator.array()
@@ -1835,111 +2224,111 @@ var PaginatedAppStoreListingsValidator = PaginationResponseValidator.extend({
1835
2224
  var PaginatedInstalledAppsValidator = PaginationResponseValidator.extend({
1836
2225
  records: InstalledAppValidator.array()
1837
2226
  });
1838
- var AppBoostValidator = z11.object({
1839
- templateAlias: z11.string().min(1).max(50).regex(/^[a-z0-9-]+$/),
1840
- boostUri: z11.string()
2227
+ var AppBoostValidator = z12.object({
2228
+ templateAlias: z12.string().min(1).max(50).regex(/^[a-z0-9-]+$/),
2229
+ boostUri: z12.string()
1841
2230
  });
1842
- var SendCredentialEventValidator = z11.object({
1843
- type: z11.literal("send-credential"),
1844
- templateAlias: z11.string(),
1845
- templateData: z11.record(z11.string(), z11.unknown()).optional(),
1846
- preventDuplicateClaim: z11.boolean().optional()
2231
+ var SendCredentialEventValidator = z12.object({
2232
+ type: z12.literal("send-credential"),
2233
+ templateAlias: z12.string(),
2234
+ templateData: z12.record(z12.string(), z12.unknown()).optional(),
2235
+ preventDuplicateClaim: z12.boolean().optional()
1847
2236
  });
1848
- var CheckCredentialEventValidator = z11.object({
1849
- type: z11.literal("check-credential"),
1850
- templateAlias: z11.string().optional(),
1851
- boostUri: z11.string().optional()
2237
+ var CheckCredentialEventValidator = z12.object({
2238
+ type: z12.literal("check-credential"),
2239
+ templateAlias: z12.string().optional(),
2240
+ boostUri: z12.string().optional()
1852
2241
  }).refine((input) => Boolean(input.templateAlias) !== Boolean(input.boostUri), {
1853
2242
  message: "Exactly one of templateAlias or boostUri is required"
1854
2243
  });
1855
- var CheckIssuanceStatusEventValidator = z11.object({
1856
- type: z11.literal("check-issuance-status"),
1857
- templateAlias: z11.string().optional(),
1858
- boostUri: z11.string().optional(),
1859
- recipient: z11.string()
2244
+ var CheckIssuanceStatusEventValidator = z12.object({
2245
+ type: z12.literal("check-issuance-status"),
2246
+ templateAlias: z12.string().optional(),
2247
+ boostUri: z12.string().optional(),
2248
+ recipient: z12.string()
1860
2249
  }).refine((input) => Boolean(input.templateAlias) !== Boolean(input.boostUri), {
1861
2250
  message: "Exactly one of templateAlias or boostUri is required"
1862
2251
  });
1863
- var GetTemplateRecipientsEventValidator = z11.object({
1864
- type: z11.literal("get-template-recipients"),
1865
- templateAlias: z11.string().optional(),
1866
- boostUri: z11.string().optional(),
1867
- limit: z11.number().optional(),
1868
- cursor: z11.string().optional()
2252
+ var GetTemplateRecipientsEventValidator = z12.object({
2253
+ type: z12.literal("get-template-recipients"),
2254
+ templateAlias: z12.string().optional(),
2255
+ boostUri: z12.string().optional(),
2256
+ limit: z12.number().optional(),
2257
+ cursor: z12.string().optional()
1869
2258
  }).refine((input) => Boolean(input.templateAlias) !== Boolean(input.boostUri), {
1870
2259
  message: "Exactly one of templateAlias or boostUri is required"
1871
2260
  });
1872
- var RequestLearnerContextEventValidator = z11.object({
1873
- type: z11.literal("request-learner-context"),
1874
- includeCredentials: z11.boolean().optional().default(true),
1875
- includePersonalData: z11.boolean().optional().default(false),
1876
- format: z11.enum(["prompt", "structured"]).optional().default("prompt"),
1877
- instructions: z11.string().optional(),
1878
- detailLevel: z11.enum(["compact", "expanded"]).optional().default("compact"),
1879
- waitForSync: z11.boolean().optional().default(false)
1880
- });
1881
- var SummaryCredentialKeywordValidator = z11.object({
1882
- occupations: z11.array(z11.string()).nullable(),
1883
- careers: z11.array(z11.string()).nullable(),
1884
- jobs: z11.array(z11.string()).nullable(),
1885
- skills: z11.array(z11.string()).nullable(),
1886
- fieldOfStudy: z11.string().nullable()
1887
- });
1888
- var SummaryCredentialDataValidator = z11.object({
1889
- title: z11.string().describe("Short, concise title for the learning session or credential"),
1890
- summary: z11.string().describe("Comprehensive summary of what happened during the session"),
1891
- learned: z11.array(z11.string()).describe("Bullet points of key knowledge gained"),
1892
- skills: z11.array(
1893
- z11.object({
1894
- title: z11.string().describe("Name of the skill category"),
1895
- description: z11.string().describe("Detailed description of what this skill category involves")
2261
+ var RequestLearnerContextEventValidator = z12.object({
2262
+ type: z12.literal("request-learner-context"),
2263
+ includeCredentials: z12.boolean().optional().default(true),
2264
+ includePersonalData: z12.boolean().optional().default(false),
2265
+ format: z12.enum(["prompt", "structured"]).optional().default("prompt"),
2266
+ instructions: z12.string().optional(),
2267
+ detailLevel: z12.enum(["compact", "expanded"]).optional().default("compact"),
2268
+ waitForSync: z12.boolean().optional().default(false)
2269
+ });
2270
+ var SummaryCredentialKeywordValidator = z12.object({
2271
+ occupations: z12.array(z12.string()).nullable(),
2272
+ careers: z12.array(z12.string()).nullable(),
2273
+ jobs: z12.array(z12.string()).nullable(),
2274
+ skills: z12.array(z12.string()).nullable(),
2275
+ fieldOfStudy: z12.string().nullable()
2276
+ });
2277
+ var SummaryCredentialDataValidator = z12.object({
2278
+ title: z12.string().describe("Short, concise title for the learning session or credential"),
2279
+ summary: z12.string().describe("Comprehensive summary of what happened during the session"),
2280
+ learned: z12.array(z12.string()).describe("Bullet points of key knowledge gained"),
2281
+ skills: z12.array(
2282
+ z12.object({
2283
+ title: z12.string().describe("Name of the skill category"),
2284
+ description: z12.string().describe("Detailed description of what this skill category involves")
1896
2285
  })
1897
2286
  ).describe("Categorized skills learned during the session"),
1898
- nextSteps: z11.array(
1899
- z11.object({
1900
- title: z11.string().describe("Title of the suggested next step"),
1901
- description: z11.string().describe("Description explaining why this next step is recommended"),
2287
+ nextSteps: z12.array(
2288
+ z12.object({
2289
+ title: z12.string().describe("Title of the suggested next step"),
2290
+ description: z12.string().describe("Description explaining why this next step is recommended"),
1902
2291
  keywords: SummaryCredentialKeywordValidator.optional().describe(
1903
2292
  "Optional taxonomy keywords for occupations/careers/jobs/skills/fieldOfStudy. Omit if not relevant."
1904
2293
  )
1905
2294
  })
1906
2295
  ).describe("Recommended follow-up activities or learning modules"),
1907
- reflections: z11.array(
1908
- z11.object({
1909
- title: z11.string().describe("Title of the reflection"),
1910
- description: z11.string().describe("Detailed description of what this reflection involves")
2296
+ reflections: z12.array(
2297
+ z12.object({
2298
+ title: z12.string().describe("Title of the reflection"),
2299
+ description: z12.string().describe("Detailed description of what this reflection involves")
1911
2300
  })
1912
2301
  ).describe("Reflections on the learning experience")
1913
2302
  });
1914
- var SendAiSessionCredentialEventValidator = z11.object({
1915
- type: z11.literal("send-ai-session-credential"),
1916
- sessionTitle: z11.string(),
2303
+ var SendAiSessionCredentialEventValidator = z12.object({
2304
+ type: z12.literal("send-ai-session-credential"),
2305
+ sessionTitle: z12.string(),
1917
2306
  summaryData: SummaryCredentialDataValidator,
1918
- metadata: z11.record(z11.string(), z11.unknown()).optional()
1919
- });
1920
- var SendNotificationEventValidator = z11.object({
1921
- type: z11.literal("send-notification"),
1922
- title: z11.string().optional(),
1923
- body: z11.string().optional(),
1924
- actionPath: z11.string().optional(),
1925
- category: z11.string().optional(),
1926
- priority: z11.enum(["normal", "high"]).optional()
1927
- });
1928
- var counterKeyValidator = z11.string().min(1).max(64).regex(/^[a-zA-Z0-9_-]+$/, "Key must be alphanumeric with _ or -");
1929
- var IncrementCounterEventValidator = z11.object({
1930
- type: z11.literal("increment-counter"),
2307
+ metadata: z12.record(z12.string(), z12.unknown()).optional()
2308
+ });
2309
+ var SendNotificationEventValidator = z12.object({
2310
+ type: z12.literal("send-notification"),
2311
+ title: z12.string().optional(),
2312
+ body: z12.string().optional(),
2313
+ actionPath: z12.string().optional(),
2314
+ category: z12.string().optional(),
2315
+ priority: z12.enum(["normal", "high"]).optional()
2316
+ });
2317
+ var counterKeyValidator = z12.string().min(1).max(64).regex(/^[a-zA-Z0-9_-]+$/, "Key must be alphanumeric with _ or -");
2318
+ var IncrementCounterEventValidator = z12.object({
2319
+ type: z12.literal("increment-counter"),
1931
2320
  key: counterKeyValidator,
1932
- amount: z11.number().int().finite()
2321
+ amount: z12.number().int().finite()
1933
2322
  });
1934
- var GetCounterEventValidator = z11.object({
1935
- type: z11.literal("get-counter"),
2323
+ var GetCounterEventValidator = z12.object({
2324
+ type: z12.literal("get-counter"),
1936
2325
  key: counterKeyValidator
1937
2326
  });
1938
- var GetCountersEventValidator = z11.object({
1939
- type: z11.literal("get-counters"),
1940
- keys: z11.array(counterKeyValidator).min(1).max(50).optional()
2327
+ var GetCountersEventValidator = z12.object({
2328
+ type: z12.literal("get-counters"),
2329
+ keys: z12.array(counterKeyValidator).min(1).max(50).optional()
1941
2330
  });
1942
- var AppEventValidator = z11.discriminatedUnion("type", [
2331
+ var AppEventValidator = z12.discriminatedUnion("type", [
1943
2332
  SendCredentialEventValidator,
1944
2333
  CheckCredentialEventValidator,
1945
2334
  CheckIssuanceStatusEventValidator,
@@ -1951,20 +2340,20 @@ var AppEventValidator = z11.discriminatedUnion("type", [
1951
2340
  GetCounterEventValidator,
1952
2341
  GetCountersEventValidator
1953
2342
  ]);
1954
- var AppEventInputValidator = z11.object({
1955
- listingId: z11.string(),
2343
+ var AppEventInputValidator = z12.object({
2344
+ listingId: z12.string(),
1956
2345
  event: AppEventValidator
1957
2346
  });
1958
- var AppEventResponseValidator = z11.record(z11.string(), z11.unknown());
1959
- var CredentialActivityEventTypeValidator = z11.enum([
2347
+ var AppEventResponseValidator = z12.record(z12.string(), z12.unknown());
2348
+ var CredentialActivityEventTypeValidator = z12.enum([
1960
2349
  "CREATED",
1961
2350
  "DELIVERED",
1962
2351
  "CLAIMED",
1963
2352
  "EXPIRED",
1964
2353
  "FAILED"
1965
2354
  ]);
1966
- var CredentialActivityRecipientTypeValidator = z11.enum(["profile", "email", "phone"]);
1967
- var CredentialActivitySourceTypeValidator = z11.enum([
2355
+ var CredentialActivityRecipientTypeValidator = z12.enum(["profile", "email", "phone"]);
2356
+ var CredentialActivitySourceTypeValidator = z12.enum([
1968
2357
  "send",
1969
2358
  "sendBoost",
1970
2359
  "sendCredential",
@@ -1975,44 +2364,45 @@ var CredentialActivitySourceTypeValidator = z11.enum([
1975
2364
  "acceptCredential",
1976
2365
  "appEvent"
1977
2366
  ]);
1978
- var CredentialActivityValidator = z11.object({
1979
- id: z11.string(),
1980
- activityId: z11.string(),
2367
+ var CredentialActivityValidator = z12.object({
2368
+ id: z12.string(),
2369
+ activityId: z12.string(),
1981
2370
  eventType: CredentialActivityEventTypeValidator,
1982
- timestamp: z11.string(),
1983
- actorProfileId: z11.string().optional(),
2371
+ timestamp: z12.string(),
2372
+ actorProfileId: z12.string().optional(),
2373
+ onBehalfOf: z12.string().optional(),
1984
2374
  recipientType: CredentialActivityRecipientTypeValidator,
1985
- recipientIdentifier: z11.string(),
1986
- boostUri: z11.string().optional(),
1987
- credentialUri: z11.string().optional(),
1988
- inboxCredentialId: z11.string().optional(),
1989
- integrationId: z11.string().optional(),
2375
+ recipientIdentifier: z12.string(),
2376
+ boostUri: z12.string().optional(),
2377
+ credentialUri: z12.string().optional(),
2378
+ inboxCredentialId: z12.string().optional(),
2379
+ integrationId: z12.string().optional(),
1990
2380
  source: CredentialActivitySourceTypeValidator,
1991
- metadata: z11.record(z11.string(), z11.unknown()).optional(),
1992
- status: z11.enum(["active", "revoked", "suspended"]).optional()
2381
+ metadata: z12.record(z12.string(), z12.unknown()).optional(),
2382
+ status: z12.enum(["active", "revoked", "suspended"]).optional()
1993
2383
  });
1994
2384
  var CredentialActivityWithDetailsValidator = CredentialActivityValidator.extend({
1995
- boost: z11.object({
1996
- id: z11.string(),
1997
- name: z11.string().optional(),
1998
- category: z11.string().optional()
2385
+ boost: z12.object({
2386
+ id: z12.string(),
2387
+ name: z12.string().optional(),
2388
+ category: z12.string().optional()
1999
2389
  }).optional(),
2000
- recipientProfile: z11.object({
2001
- profileId: z11.string(),
2002
- displayName: z11.string().optional()
2390
+ recipientProfile: z12.object({
2391
+ profileId: z12.string(),
2392
+ displayName: z12.string().optional()
2003
2393
  }).optional()
2004
2394
  });
2005
2395
  var PaginatedCredentialActivitiesValidator = PaginationResponseValidator.extend({
2006
2396
  records: CredentialActivityWithDetailsValidator.array()
2007
2397
  });
2008
- var CredentialActivityStatsValidator = z11.object({
2009
- total: z11.number(),
2010
- created: z11.number(),
2011
- delivered: z11.number(),
2012
- claimed: z11.number(),
2013
- expired: z11.number(),
2014
- failed: z11.number(),
2015
- claimRate: z11.number()
2398
+ var CredentialActivityStatsValidator = z12.object({
2399
+ total: z12.number(),
2400
+ created: z12.number(),
2401
+ delivered: z12.number(),
2402
+ claimed: z12.number(),
2403
+ expired: z12.number(),
2404
+ failed: z12.number(),
2405
+ claimRate: z12.number()
2016
2406
  });
2017
2407
 
2018
2408
  // src/auth.ts
@@ -2028,313 +2418,126 @@ var AuthSessionError = class extends Error {
2028
2418
  };
2029
2419
 
2030
2420
  // src/bitstring-status-list.ts
2031
- import { z as z12 } from "zod/v4";
2421
+ import { z as z13 } from "zod/v4";
2032
2422
  var BITSTRING_STATUS_PURPOSES = ["revocation", "suspension"];
2033
2423
  var DEFAULT_BITSTRING_STATUS_LIST_SIZE = 131072;
2034
- var BitstringStatusPurposeValidator = z12.enum(BITSTRING_STATUS_PURPOSES);
2035
- var BitstringStatusListEntryValidator = z12.object({
2036
- id: z12.string().optional(),
2037
- type: z12.literal("BitstringStatusListEntry"),
2424
+ var BitstringStatusPurposeValidator = z13.enum(BITSTRING_STATUS_PURPOSES);
2425
+ var BitstringStatusListEntryValidator = z13.object({
2426
+ id: z13.string().optional(),
2427
+ type: z13.literal("BitstringStatusListEntry"),
2038
2428
  statusPurpose: BitstringStatusPurposeValidator,
2039
- statusListIndex: z12.string().or(z12.number().int().nonnegative()),
2040
- statusListCredential: z12.string()
2429
+ statusListIndex: z13.string().or(z13.number().int().nonnegative()),
2430
+ statusListCredential: z13.string()
2041
2431
  });
2042
2432
  var AllocatedBitstringStatusListEntryValidator = BitstringStatusListEntryValidator.extend({
2043
- id: z12.string()
2433
+ id: z13.string()
2044
2434
  });
2045
- var BitstringStatusListCredentialSubjectValidator = z12.object({
2046
- id: z12.string().optional(),
2047
- type: z12.literal("BitstringStatusList"),
2435
+ var BitstringStatusListCredentialSubjectValidator = z13.object({
2436
+ id: z13.string().optional(),
2437
+ type: z13.literal("BitstringStatusList"),
2048
2438
  statusPurpose: BitstringStatusPurposeValidator,
2049
- encodedList: z12.string()
2439
+ encodedList: z13.string()
2050
2440
  });
2051
- var AllocateCredentialStatusInputValidator = z12.object({
2052
- statusPurposes: z12.array(BitstringStatusPurposeValidator).optional(),
2053
- listSize: z12.number().int().positive().optional()
2441
+ var AllocateCredentialStatusInputValidator = z13.object({
2442
+ statusPurposes: z13.array(BitstringStatusPurposeValidator).optional(),
2443
+ listSize: z13.number().int().positive().optional()
2054
2444
  }).default({});
2055
2445
 
2056
2446
  // src/inAppMessages.ts
2057
- import { z as z13 } from "zod";
2058
- var inAppMessagePlatformValidator = z13.enum(["ios", "android", "web"]);
2059
- var inAppMessageVersionSourceValidator = z13.enum(["native", "web", "capgo"]);
2060
- var inAppMessageVersionOpValidator = z13.enum(["lt", "lte", "eq", "gte", "gt"]);
2061
- var platformPredicateValidator = z13.object({ platform: z13.array(inAppMessagePlatformValidator).nonempty() }).strict();
2062
- var rolePredicateValidator = z13.object({ role: z13.array(z13.string()).nonempty() }).strict();
2063
- var versionPredicateValidator = z13.object({
2064
- version: z13.object({
2447
+ import { z as z14 } from "zod";
2448
+ var inAppMessagePlatformValidator = z14.enum(["ios", "android", "web"]);
2449
+ var inAppMessageVersionSourceValidator = z14.enum(["native", "web", "capgo"]);
2450
+ var inAppMessageVersionOpValidator = z14.enum(["lt", "lte", "eq", "gte", "gt"]);
2451
+ var platformPredicateValidator = z14.object({ platform: z14.array(inAppMessagePlatformValidator).nonempty() }).strict();
2452
+ var rolePredicateValidator = z14.object({ role: z14.array(z14.string()).nonempty() }).strict();
2453
+ var versionPredicateValidator = z14.object({
2454
+ version: z14.object({
2065
2455
  source: inAppMessageVersionSourceValidator,
2066
2456
  op: inAppMessageVersionOpValidator,
2067
- value: z13.string()
2457
+ value: z14.string()
2068
2458
  }).strict()
2069
2459
  }).strict();
2070
- var inAppMessagePredicateValidator = z13.lazy(
2071
- () => z13.union([
2460
+ var inAppMessagePredicateValidator = z14.lazy(
2461
+ () => z14.union([
2072
2462
  platformPredicateValidator,
2073
2463
  rolePredicateValidator,
2074
2464
  versionPredicateValidator,
2075
- z13.object({ all: z13.array(inAppMessagePredicateValidator) }).strict(),
2076
- z13.object({ any: z13.array(inAppMessagePredicateValidator) }).strict(),
2077
- z13.object({ not: inAppMessagePredicateValidator }).strict()
2465
+ z14.object({ all: z14.array(inAppMessagePredicateValidator) }).strict(),
2466
+ z14.object({ any: z14.array(inAppMessagePredicateValidator) }).strict(),
2467
+ z14.object({ not: inAppMessagePredicateValidator }).strict()
2078
2468
  ])
2079
2469
  );
2080
- var inAppMessageActionStyleValidator = z13.enum(["primary", "secondary", "positive", "dismiss"]).default("secondary");
2081
- var internalLinkActionValidator = z13.object({ type: z13.literal("internalLink"), path: z13.string() }).passthrough();
2082
- var externalLinkActionValidator = z13.object({ type: z13.literal("externalLink"), url: z13.string() }).passthrough();
2083
- var appStoreActionValidator = z13.object({
2084
- type: z13.literal("appStore"),
2085
- iosUrl: z13.string().optional(),
2086
- androidUrl: z13.string().optional(),
2087
- webUrl: z13.string().optional()
2470
+ var inAppMessageActionStyleValidator = z14.enum(["primary", "secondary", "positive", "dismiss"]).default("secondary");
2471
+ var internalLinkActionValidator = z14.object({ type: z14.literal("internalLink"), path: z14.string() }).passthrough();
2472
+ var externalLinkActionValidator = z14.object({ type: z14.literal("externalLink"), url: z14.string() }).passthrough();
2473
+ var appStoreActionValidator = z14.object({
2474
+ type: z14.literal("appStore"),
2475
+ iosUrl: z14.string().optional(),
2476
+ androidUrl: z14.string().optional(),
2477
+ webUrl: z14.string().optional()
2088
2478
  }).passthrough();
2089
- var capgoUpdateActionValidator = z13.object({ type: z13.literal("capgoUpdate") }).passthrough();
2090
- var dismissActionValidator = z13.object({ type: z13.literal("dismiss") }).passthrough();
2091
- var inAppMessageActionTargetValidator = z13.union([
2479
+ var capgoUpdateActionValidator = z14.object({ type: z14.literal("capgoUpdate") }).passthrough();
2480
+ var dismissActionValidator = z14.object({ type: z14.literal("dismiss") }).passthrough();
2481
+ var inAppMessageActionTargetValidator = z14.union([
2092
2482
  internalLinkActionValidator,
2093
2483
  externalLinkActionValidator,
2094
2484
  appStoreActionValidator,
2095
2485
  capgoUpdateActionValidator,
2096
2486
  dismissActionValidator
2097
2487
  ]);
2098
- var inAppMessageActionValidator = z13.object({
2099
- label: z13.string(),
2488
+ var inAppMessageActionValidator = z14.object({
2489
+ label: z14.string(),
2100
2490
  style: inAppMessageActionStyleValidator,
2101
2491
  action: inAppMessageActionTargetValidator,
2102
2492
  /** When true, the message closes after this action runs (default true). */
2103
- closeOnComplete: z13.boolean().default(true)
2493
+ closeOnComplete: z14.boolean().default(true)
2104
2494
  }).passthrough();
2105
- var inAppMessageMediaValidator = z13.object({
2106
- type: z13.enum(["youtube", "image", "gif"]),
2107
- url: z13.string(),
2495
+ var inAppMessageMediaValidator = z14.object({
2496
+ type: z14.enum(["youtube", "image", "gif"]),
2497
+ url: z14.string(),
2108
2498
  /** Aspect ratio hint, e.g. "16:9" or "1:1". Defaults to 16:9. */
2109
- aspect: z13.string().default("16:9"),
2499
+ aspect: z14.string().default("16:9"),
2110
2500
  /** Alt text for images/gifs (accessibility). */
2111
- alt: z13.string().optional()
2501
+ alt: z14.string().optional()
2112
2502
  }).passthrough();
2113
- var inAppMessageFrequencyValidator = z13.union([
2114
- z13.literal("once"),
2115
- z13.literal("session"),
2116
- z13.literal("always"),
2117
- z13.object({ everyDays: z13.number().positive() }).strict()
2503
+ var inAppMessageFrequencyValidator = z14.union([
2504
+ z14.literal("once"),
2505
+ z14.literal("session"),
2506
+ z14.literal("always"),
2507
+ z14.object({ everyDays: z14.number().positive() }).strict()
2118
2508
  ]).default("once");
2119
- var inAppMessagePresentationValidator = z13.enum(["modal", "banner", "toast"]).default("modal");
2120
- var inAppMessageValidator = z13.object({
2509
+ var inAppMessagePresentationValidator = z14.enum(["modal", "banner", "toast"]).default("modal");
2510
+ var inAppMessageValidator = z14.object({
2121
2511
  /** Stable identifier — used to persist dismissal / frequency state. */
2122
- id: z13.string(),
2512
+ id: z14.string(),
2123
2513
  /** Higher priority wins when multiple messages match. Default 0. */
2124
- priority: z13.number().default(0),
2514
+ priority: z14.number().default(0),
2125
2515
  /** When false, the message is required/blocking (no dismiss affordance). */
2126
- dismissible: z13.boolean().default(true),
2516
+ dismissible: z14.boolean().default(true),
2127
2517
  frequency: inAppMessageFrequencyValidator,
2128
2518
  presentation: inAppMessagePresentationValidator,
2129
2519
  media: inAppMessageMediaValidator.optional(),
2130
2520
  /** Optional emoji hero glyph — rendered only when `media` is not set. */
2131
- emoji: z13.string().optional(),
2132
- title: z13.string(),
2133
- body: z13.string().optional(),
2134
- actions: z13.array(inAppMessageActionValidator).default([]),
2521
+ emoji: z14.string().optional(),
2522
+ title: z14.string(),
2523
+ body: z14.string().optional(),
2524
+ actions: z14.array(inAppMessageActionValidator).default([]),
2135
2525
  /** Targeting predicate tree. Omitted → matches everyone. */
2136
2526
  targeting: inAppMessagePredicateValidator.optional(),
2137
2527
  /** Allow disabling a message without removing it from the flag. */
2138
- enabled: z13.boolean().default(true)
2528
+ enabled: z14.boolean().default(true)
2139
2529
  }).passthrough();
2140
- var inAppMessagesFlagValidator = z13.object({
2141
- version: z13.number().default(1),
2142
- messages: z13.array(inAppMessageValidator).default([])
2530
+ var inAppMessagesFlagValidator = z14.object({
2531
+ version: z14.number().default(1),
2532
+ messages: z14.array(inAppMessageValidator).default([])
2143
2533
  }).passthrough();
2144
2534
  var EMPTY_IN_APP_MESSAGES_FLAG = { version: 1, messages: [] };
2145
2535
  var parseInAppMessagesFlag = /* @__PURE__ */ __name((raw) => {
2146
2536
  const result = inAppMessagesFlagValidator.safeParse(raw);
2147
2537
  return result.success ? result.data : EMPTY_IN_APP_MESSAGES_FLAG;
2148
2538
  }, "parseInAppMessagesFlag");
2149
-
2150
- // src/credential-refresh.ts
2151
- import { z as z14 } from "zod/v4";
2152
- var LearnCardRefreshAuthorizationValidator = z14.object({ type: z14.literal("LearnCardDIDAuth") }).catchall(z14.any());
2153
- var ManagedCredentialRefreshServiceValidator = z14.object({
2154
- id: z14.string().min(1),
2155
- type: z14.literal("LearnCardCredentialRefresh2026"),
2156
- authorization: LearnCardRefreshAuthorizationValidator.optional()
2157
- }).catchall(z14.any());
2158
- var StandardCredentialRefreshServiceValidator = z14.object({
2159
- id: z14.string().min(1),
2160
- type: z14.literal("1EdTechCredentialRefresh")
2161
- }).catchall(z14.any());
2162
- var SupportedCredentialRefreshServiceValidator = z14.union([
2163
- ManagedCredentialRefreshServiceValidator,
2164
- StandardCredentialRefreshServiceValidator
2165
- ]);
2166
- var AllocateCredentialRefreshInputValidator = z14.object({
2167
- holder: z14.object({
2168
- profileId: z14.string().optional(),
2169
- did: z14.string().min(1)
2170
- }),
2171
- credentialId: z14.string().min(1)
2172
- });
2173
- var AllocateCredentialRefreshResultValidator = z14.object({
2174
- refreshId: z14.string().min(1),
2175
- refreshService: ManagedCredentialRefreshServiceValidator.extend({
2176
- authorization: LearnCardRefreshAuthorizationValidator
2177
- })
2178
- });
2179
- var CredentialRefreshSigningModeValidator = z14.enum(["issuer-signed", "signing-authority"]);
2180
- var PublishCredentialRefreshBaseFields = {
2181
- refreshId: z14.string().min(1),
2182
- notifyHolder: z14.boolean().optional(),
2183
- updateSummary: z14.string().optional(),
2184
- idempotencyKey: z14.string().optional()
2185
- };
2186
- var PublishIssuerSignedRefreshValidator = z14.object({
2187
- ...PublishCredentialRefreshBaseFields,
2188
- mode: z14.literal("issuer-signed"),
2189
- signedCredential: VCValidator
2190
- });
2191
- var PublishSigningAuthorityRefreshValidator = z14.object({
2192
- ...PublishCredentialRefreshBaseFields,
2193
- mode: z14.literal("signing-authority"),
2194
- credential: UnsignedVCValidator,
2195
- signingAuthority: z14.object({
2196
- type: z14.string().min(1)
2197
- }).catchall(z14.any())
2198
- });
2199
- var PublishCredentialRefreshInputValidator = z14.object({
2200
- ...PublishCredentialRefreshBaseFields,
2201
- mode: CredentialRefreshSigningModeValidator,
2202
- signedCredential: VCValidator.optional(),
2203
- credential: UnsignedVCValidator.optional(),
2204
- signingAuthority: z14.object({
2205
- type: z14.string().min(1)
2206
- }).catchall(z14.any()).optional()
2207
- }).superRefine((input, ctx) => {
2208
- if (input.mode === "issuer-signed" && !input.signedCredential) {
2209
- ctx.addIssue({
2210
- code: "custom",
2211
- path: ["signedCredential"],
2212
- message: "signedCredential is required for issuer-signed publication"
2213
- });
2214
- }
2215
- if (input.mode === "issuer-signed" && (input.credential !== void 0 || input.signingAuthority !== void 0)) {
2216
- ctx.addIssue({
2217
- code: "custom",
2218
- path: ["mode"],
2219
- message: "issuer-signed publication cannot include signing-authority fields"
2220
- });
2221
- }
2222
- if (input.mode === "signing-authority") {
2223
- if (input.signedCredential !== void 0) {
2224
- ctx.addIssue({
2225
- code: "custom",
2226
- path: ["signedCredential"],
2227
- message: "signing-authority publication cannot include signedCredential"
2228
- });
2229
- }
2230
- if (!input.credential) {
2231
- ctx.addIssue({
2232
- code: "custom",
2233
- path: ["credential"],
2234
- message: "credential is required for signing-authority publication"
2235
- });
2236
- }
2237
- if (!input.signingAuthority) {
2238
- ctx.addIssue({
2239
- code: "custom",
2240
- path: ["signingAuthority"],
2241
- message: "signingAuthority is required for signing-authority publication"
2242
- });
2243
- }
2244
- }
2245
- });
2246
- var PublishCredentialRefreshNotificationValidator = z14.enum([
2247
- "queued",
2248
- "suppressed",
2249
- "not-applicable",
2250
- /** Publication succeeded, but the post-commit notification enqueue must be retried. */
2251
- "delivery-failed"
2252
- ]);
2253
- var PublishCredentialRefreshResultValidator = z14.object({
2254
- refreshId: z14.string().min(1),
2255
- version: z14.number().int().positive(),
2256
- publishedAt: z14.string().min(1),
2257
- notification: PublishCredentialRefreshNotificationValidator
2258
- });
2259
- var CredentialRefreshVersionMetadataValidator = z14.object({
2260
- version: z14.number().int().positive(),
2261
- publishedAt: z14.string().min(1),
2262
- effectiveAt: z14.string().optional(),
2263
- etag: z14.string().optional(),
2264
- signingMode: CredentialRefreshSigningModeValidator.optional(),
2265
- updateSummary: z14.string().optional()
2266
- });
2267
- var GetCredentialRefreshHistoryInputValidator = z14.object({
2268
- refreshId: z14.string().min(1),
2269
- cursor: z14.string().optional(),
2270
- limit: z14.number().int().positive().optional()
2271
- });
2272
- var GetCredentialRefreshHistoryResultValidator = z14.object({
2273
- records: CredentialRefreshVersionMetadataValidator.array(),
2274
- hasMore: z14.boolean(),
2275
- cursor: z14.string().optional()
2276
- });
2277
- var CredentialRefreshChallengeValidator = z14.object({
2278
- challenge: z14.string().min(1),
2279
- expiresAt: z14.string().min(1),
2280
- domain: z14.string().optional(),
2281
- scheme: z14.literal("LearnCardDIDAuth").optional()
2282
- });
2283
- var PublicCredentialRefreshEnvelopeValidator = z14.object({
2284
- format: z14.literal("vc"),
2285
- credential: VCValidator,
2286
- etag: z14.string().optional()
2287
- });
2288
- var JweCredentialRefreshEnvelopeValidator = z14.object({
2289
- format: z14.literal("jwe"),
2290
- jwe: JWEValidator,
2291
- etag: z14.string().optional(),
2292
- /** Present on LearnCard-managed endpoints; optional for interoperable JWE services. */
2293
- version: z14.number().int().positive().optional()
2294
- });
2295
- var CredentialRefreshResponseEnvelopeValidator = z14.discriminatedUnion("format", [
2296
- PublicCredentialRefreshEnvelopeValidator,
2297
- JweCredentialRefreshEnvelopeValidator
2298
- ]);
2299
- var CredentialRefreshFailureCodeValidator = z14.enum([
2300
- "UNAVAILABLE",
2301
- "TIMEOUT",
2302
- "UNSUPPORTED_SERVICE",
2303
- "UNAUTHORIZED",
2304
- "MALFORMED_RESPONSE",
2305
- "INVALID_PROOF",
2306
- "ISSUER_MISMATCH",
2307
- "ID_MISMATCH",
2308
- "ROLLBACK",
2309
- "REVOKED",
2310
- "UNSAFE_ENDPOINT"
2311
- ]);
2312
- var CredentialRefreshUpdatedResultValidator = z14.object({
2313
- status: z14.literal("updated"),
2314
- credential: VCValidator,
2315
- etag: z14.string().optional(),
2316
- managedVersion: z14.number().int().positive().optional()
2317
- });
2318
- var CredentialRefreshUnchangedResultValidator = z14.object({
2319
- status: z14.literal("unchanged"),
2320
- checkedAt: z14.string().min(1),
2321
- etag: z14.string().optional()
2322
- });
2323
- var CredentialRefreshUnsupportedResultValidator = z14.object({
2324
- status: z14.literal("unsupported")
2325
- });
2326
- var CredentialRefreshFailedResultValidator = z14.object({
2327
- status: z14.literal("failed"),
2328
- code: CredentialRefreshFailureCodeValidator,
2329
- retryable: z14.boolean()
2330
- });
2331
- var CredentialRefreshResultValidator = z14.discriminatedUnion("status", [
2332
- CredentialRefreshUpdatedResultValidator,
2333
- CredentialRefreshUnchangedResultValidator,
2334
- CredentialRefreshUnsupportedResultValidator,
2335
- CredentialRefreshFailedResultValidator
2336
- ]);
2337
2539
  export {
2540
+ ACT_AS_HEADER,
2338
2541
  AUTH_GRANT_AUDIENCE_DOMAIN_PREFIX,
2339
2542
  AchievementCredentialValidator,
2340
2543
  AchievementCriteriaValidator,
@@ -2397,6 +2600,7 @@ export {
2397
2600
  ConsentFlowContractValidator,
2398
2601
  ConsentFlowDataForDidQueryValidator,
2399
2602
  ConsentFlowDataQueryValidator,
2603
+ ConsentFlowGuardianApprovalValidator,
2400
2604
  ConsentFlowTermValidator,
2401
2605
  ConsentFlowTermsQueryValidator,
2402
2606
  ConsentFlowTermsStatusValidator,
@@ -2473,10 +2677,18 @@ export {
2473
2677
  IdentifierTypeValidator,
2474
2678
  IdentityObjectValidator,
2475
2679
  ImageValidator,
2680
+ InboxBatchErrorReasonValidator,
2681
+ InboxBatchReceiptValidator,
2682
+ InboxBatchStatusValidator,
2476
2683
  InboxCredentialQueryValidator,
2684
+ InboxCredentialRefreshReceiptValidator,
2477
2685
  InboxCredentialValidator,
2478
2686
  IncrementCounterEventValidator,
2479
2687
  InstalledAppValidator,
2688
+ IssueInboxCredentialBatchItemResultValidator,
2689
+ IssueInboxCredentialBatchItemValidator,
2690
+ IssueInboxCredentialBatchResponseValidator,
2691
+ IssueInboxCredentialBatchValidator,
2480
2692
  IssueInboxCredentialResponseValidator,
2481
2693
  IssueInboxCredentialValidator,
2482
2694
  IssueInboxSigningAuthorityValidator,
@@ -2525,6 +2737,7 @@ export {
2525
2737
  LaunchTypeValidator,
2526
2738
  LearnCardRefreshAuthorizationValidator,
2527
2739
  LinkProviderFrameworkInputValidator,
2740
+ ManagedCredentialRefreshReceiptValidator,
2528
2741
  ManagedCredentialRefreshServiceValidator,
2529
2742
  PaginatedAppStoreListingsValidator,
2530
2743
  PaginatedBoostRecipientsValidator,
@@ -2551,6 +2764,8 @@ export {
2551
2764
  PaginatedVisibleLCNProfilesValidator,
2552
2765
  PaginationOptionsValidator,
2553
2766
  PaginationResponseValidator,
2767
+ PrepareRefreshableSendInputValidator,
2768
+ PrepareRefreshableSendResultValidator,
2554
2769
  ProfileValidator,
2555
2770
  ProfileVisibilityEnum,
2556
2771
  PromotionLevelValidator,
@@ -2576,6 +2791,7 @@ export {
2576
2791
  SendAiSessionCredentialEventValidator,
2577
2792
  SendBoostInputValidator,
2578
2793
  SendBoostResponseValidator,
2794
+ SendBoostTemplateValidator,
2579
2795
  SendBrandingOptionsValidator,
2580
2796
  SendCredentialEventValidator,
2581
2797
  SendInboxResponseValidator,