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