@learncard/react 2.12.7 → 2.12.9
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/cjs/{AchievementCard-98d6c7f9.js → AchievementCard-f6bdb95c.js} +5 -5
- package/dist/cjs/{AchievementCard-98d6c7f9.js.map → AchievementCard-f6bdb95c.js.map} +1 -1
- package/dist/cjs/{BoostGenericCard-470b0e5a.js → BoostGenericCard-a414aaef.js} +5 -5
- package/dist/cjs/BoostGenericCard-a414aaef.js.map +1 -0
- package/dist/cjs/{BoostSmallCard-ac8ab73d.js → BoostSmallCard-507de790.js} +6 -4
- package/dist/cjs/BoostSmallCard-507de790.js.map +1 -0
- package/dist/cjs/{CertificateDisplayCard-230b3faf.js → CertificateDisplayCard-8bd3b831.js} +18 -19
- package/dist/cjs/{CertificateDisplayCard-230b3faf.js.map → CertificateDisplayCard-8bd3b831.js.map} +1 -1
- package/dist/cjs/{CircleCheckButton-f76e5b5d.js → CircleCheckButton-05f58196.js} +2 -2
- package/dist/cjs/{CircleCheckButton-f76e5b5d.js.map → CircleCheckButton-05f58196.js.map} +1 -1
- package/dist/cjs/{CircleIcon-f0fa68c7.js → CircleIcon-47392efc.js} +3 -3
- package/dist/cjs/{CircleIcon-f0fa68c7.js.map → CircleIcon-47392efc.js.map} +1 -1
- package/dist/cjs/{CourseVerticalCard-0a8ea4dc.js → CourseVerticalCard-0d046145.js} +4 -4
- package/dist/cjs/{CourseVerticalCard-0a8ea4dc.js.map → CourseVerticalCard-0d046145.js.map} +1 -1
- package/dist/cjs/{GenericCard-cdc6eede.js → GenericCard-e2faac81.js} +4 -4
- package/dist/cjs/{GenericCard-cdc6eede.js.map → GenericCard-e2faac81.js.map} +1 -1
- package/dist/cjs/{JobListCard-c53660e8.js → JobListCard-a90be136.js} +3 -3
- package/dist/cjs/{JobListCard-c53660e8.js.map → JobListCard-a90be136.js.map} +1 -1
- package/dist/cjs/{LearnPill-da2d2a8e.js → LearnPill-29ffbdcd.js} +3 -3
- package/dist/cjs/{LearnPill-da2d2a8e.js.map → LearnPill-29ffbdcd.js.map} +1 -1
- package/dist/cjs/{MeritBadgeDisplayCard-a15ae981.js → MeritBadgeDisplayCard-cc7b75af.js} +4 -4
- package/dist/cjs/{MeritBadgeDisplayCard-a15ae981.js.map → MeritBadgeDisplayCard-cc7b75af.js.map} +1 -1
- package/dist/cjs/{MeritBadgeSkillsCount-d6ee29b1.js → MeritBadgeSkillsCount-3e797913.js} +2 -2
- package/dist/cjs/{MeritBadgeSkillsCount-d6ee29b1.js.map → MeritBadgeSkillsCount-3e797913.js.map} +1 -1
- package/dist/cjs/{RoundedPill-b54f3ac1.js → RoundedPill-542ecd7a.js} +2 -2
- package/dist/cjs/{RoundedPill-b54f3ac1.js.map → RoundedPill-542ecd7a.js.map} +1 -1
- package/dist/cjs/{SchoolIDCard-2d3cbb2c.js → SchoolIDCard-10796199.js} +1184 -3
- package/dist/cjs/SchoolIDCard-10796199.js.map +1 -0
- package/dist/cjs/{SkillTabCard-efade17a.js → SkillTabCard-353cc2d1.js} +4 -4
- package/dist/cjs/{SkillTabCard-efade17a.js.map → SkillTabCard-353cc2d1.js.map} +1 -1
- package/dist/cjs/{VCCard-ff6aff86.js → VCCard-6706999a.js} +3 -3
- package/dist/cjs/{VCCard-ff6aff86.js.map → VCCard-6706999a.js.map} +1 -1
- package/dist/cjs/{VCDisplayBackFace-a2ffb5cf.js → VCDisplayBackFace-2eb4300a.js} +3 -3
- package/dist/cjs/{VCDisplayBackFace-a2ffb5cf.js.map → VCDisplayBackFace-2eb4300a.js.map} +1 -1
- package/dist/cjs/{VCDisplayCard-db565cac.js → VCDisplayCard-4276378b.js} +3 -3
- package/dist/cjs/{VCDisplayCard-db565cac.js.map → VCDisplayCard-4276378b.js.map} +1 -1
- package/dist/cjs/{VCDisplayCard2-023672a4.js → VCDisplayCard2-5f7fed25.js} +17 -9
- package/dist/cjs/VCDisplayCard2-5f7fed25.js.map +1 -0
- package/dist/cjs/{VCVerificationPill-0db1d7c8.js → VCVerificationPill-fe1eb97b.js} +2 -2
- package/dist/cjs/{VCVerificationPill-0db1d7c8.js.map → VCVerificationPill-fe1eb97b.js.map} +1 -1
- package/dist/cjs/{constants-2430d4bc.js → constants-dd01b5de.js} +5 -5
- package/dist/cjs/{constants-2430d4bc.js.map → constants-dd01b5de.js.map} +1 -1
- package/dist/cjs/{credential.helpers-88f72e5c.js → credential.helpers-2d2d8bf5.js} +69 -3
- package/dist/cjs/credential.helpers-2d2d8bf5.js.map +1 -0
- package/dist/cjs/{icons-857d4be1.js → icons-4693cac7.js} +2 -2
- package/dist/cjs/{icons-857d4be1.js.map → icons-4693cac7.js.map} +1 -1
- package/dist/cjs/{index-5488badc.js → index-3daa4cfe.js} +3 -1
- package/dist/cjs/index-3daa4cfe.js.map +1 -0
- package/dist/cjs/{index-ba659c28.js → index-603feb35.js} +8 -2
- package/dist/cjs/index-603feb35.js.map +1 -0
- package/dist/cjs/index.js +27 -27
- package/dist/cjs/index11.js +5 -5
- package/dist/cjs/index13.js +7 -6
- package/dist/cjs/index13.js.map +1 -1
- package/dist/cjs/index14.js +27 -27
- package/dist/cjs/index16.js +4 -3
- package/dist/cjs/index16.js.map +1 -1
- package/dist/cjs/index19.js +4 -3
- package/dist/cjs/index19.js.map +1 -1
- package/dist/cjs/index2.js +7 -6
- package/dist/cjs/index2.js.map +1 -1
- package/dist/cjs/index22.js +5 -5
- package/dist/cjs/index29.js +3 -3
- package/dist/cjs/index30.js +6 -5
- package/dist/cjs/index30.js.map +1 -1
- package/dist/cjs/index31.js +1 -2
- package/dist/cjs/index31.js.map +1 -1
- package/dist/cjs/index34.js +5 -5
- package/dist/cjs/index39.js +10 -11
- package/dist/cjs/index39.js.map +1 -1
- package/dist/cjs/index4.js +9 -8
- package/dist/cjs/index4.js.map +1 -1
- package/dist/cjs/index40.js +5 -5
- package/dist/cjs/index41.js +6 -6
- package/dist/cjs/index42.js +6 -7
- package/dist/cjs/index42.js.map +1 -1
- package/dist/cjs/index43.js +1 -1
- package/dist/cjs/index46.js +2 -2
- package/dist/cjs/index5.js +7 -6
- package/dist/cjs/index5.js.map +1 -1
- package/dist/cjs/index7.js +4 -4
- package/dist/cjs/index8.js +4 -4
- package/dist/cjs/index9.js +3 -3
- package/dist/cjs/qualifications.svg +10 -0
- package/dist/cjs/{types.esm-94c6d461.js → types.esm-6ef18f40.js} +774 -14
- package/dist/cjs/types.esm-6ef18f40.js.map +1 -0
- package/dist/esm/{AchievementCard-0f183e9d.js → AchievementCard-d0cf882f.js} +5 -5
- package/dist/esm/{AchievementCard-0f183e9d.js.map → AchievementCard-d0cf882f.js.map} +1 -1
- package/dist/esm/{BoostGenericCard-c9916371.js → BoostGenericCard-c5cdd66b.js} +5 -5
- package/dist/esm/BoostGenericCard-c5cdd66b.js.map +1 -0
- package/dist/esm/{BoostSmallCard-35b0290d.js → BoostSmallCard-3f5d83b9.js} +6 -4
- package/dist/esm/BoostSmallCard-3f5d83b9.js.map +1 -0
- package/dist/esm/{CertificateDisplayCard-b5399522.js → CertificateDisplayCard-98c807c3.js} +18 -19
- package/dist/esm/{CertificateDisplayCard-b5399522.js.map → CertificateDisplayCard-98c807c3.js.map} +1 -1
- package/dist/esm/{CircleCheckButton-23a9c7d4.js → CircleCheckButton-50702ec6.js} +2 -2
- package/dist/esm/{CircleCheckButton-23a9c7d4.js.map → CircleCheckButton-50702ec6.js.map} +1 -1
- package/dist/esm/{CircleIcon-abd5ff06.js → CircleIcon-060ef060.js} +3 -3
- package/dist/esm/{CircleIcon-abd5ff06.js.map → CircleIcon-060ef060.js.map} +1 -1
- package/dist/esm/{CourseVerticalCard-fe85271e.js → CourseVerticalCard-2544cfbb.js} +4 -4
- package/dist/esm/{CourseVerticalCard-fe85271e.js.map → CourseVerticalCard-2544cfbb.js.map} +1 -1
- package/dist/esm/{GenericCard-b40c0617.js → GenericCard-31644ac4.js} +4 -4
- package/dist/esm/{GenericCard-b40c0617.js.map → GenericCard-31644ac4.js.map} +1 -1
- package/dist/esm/{JobListCard-dfb94830.js → JobListCard-4fc7fbe4.js} +3 -3
- package/dist/esm/{JobListCard-dfb94830.js.map → JobListCard-4fc7fbe4.js.map} +1 -1
- package/dist/esm/{LearnPill-ce240a4a.js → LearnPill-a2b93b1d.js} +3 -3
- package/dist/esm/{LearnPill-ce240a4a.js.map → LearnPill-a2b93b1d.js.map} +1 -1
- package/dist/esm/{MeritBadgeDisplayCard-58245297.js → MeritBadgeDisplayCard-e55e904e.js} +4 -4
- package/dist/esm/{MeritBadgeDisplayCard-58245297.js.map → MeritBadgeDisplayCard-e55e904e.js.map} +1 -1
- package/dist/esm/{MeritBadgeSkillsCount-faee4025.js → MeritBadgeSkillsCount-942ebe6f.js} +2 -2
- package/dist/esm/{MeritBadgeSkillsCount-faee4025.js.map → MeritBadgeSkillsCount-942ebe6f.js.map} +1 -1
- package/dist/esm/{RoundedPill-50279e5d.js → RoundedPill-8e97b9e3.js} +2 -2
- package/dist/esm/{RoundedPill-50279e5d.js.map → RoundedPill-8e97b9e3.js.map} +1 -1
- package/dist/esm/{SchoolIDCard-fbd1cf6c.js → SchoolIDCard-f82e40bc.js} +1183 -2
- package/dist/esm/SchoolIDCard-f82e40bc.js.map +1 -0
- package/dist/esm/{SkillTabCard-f2edb3fc.js → SkillTabCard-a3f601e8.js} +4 -4
- package/dist/esm/{SkillTabCard-f2edb3fc.js.map → SkillTabCard-a3f601e8.js.map} +1 -1
- package/dist/esm/{VCCard-d72f1f76.js → VCCard-95276c28.js} +3 -3
- package/dist/esm/{VCCard-d72f1f76.js.map → VCCard-95276c28.js.map} +1 -1
- package/dist/esm/{VCDisplayBackFace-66b2683d.js → VCDisplayBackFace-7510b046.js} +3 -3
- package/dist/esm/{VCDisplayBackFace-66b2683d.js.map → VCDisplayBackFace-7510b046.js.map} +1 -1
- package/dist/esm/{VCDisplayCard-64896eb8.js → VCDisplayCard-43ac58ba.js} +3 -3
- package/dist/esm/{VCDisplayCard-64896eb8.js.map → VCDisplayCard-43ac58ba.js.map} +1 -1
- package/dist/esm/{VCDisplayCard2-54710551.js → VCDisplayCard2-0a41ea81.js} +17 -9
- package/dist/esm/VCDisplayCard2-0a41ea81.js.map +1 -0
- package/dist/esm/{VCVerificationPill-3e840476.js → VCVerificationPill-8f6be696.js} +2 -2
- package/dist/esm/{VCVerificationPill-3e840476.js.map → VCVerificationPill-8f6be696.js.map} +1 -1
- package/dist/esm/{constants-010faf74.js → constants-e2e2e619.js} +5 -5
- package/dist/esm/{constants-010faf74.js.map → constants-e2e2e619.js.map} +1 -1
- package/dist/esm/{credential.helpers-f4495f8f.js → credential.helpers-72ff82a4.js} +69 -3
- package/dist/esm/credential.helpers-72ff82a4.js.map +1 -0
- package/dist/esm/{icons-fdd35170.js → icons-a6c7fed6.js} +2 -2
- package/dist/esm/{icons-fdd35170.js.map → icons-a6c7fed6.js.map} +1 -1
- package/dist/esm/{index-28917993.js → index-8be2f857.js} +3 -1
- package/dist/esm/index-8be2f857.js.map +1 -0
- package/dist/esm/{index-7542e9ee.js → index-e3586083.js} +7 -2
- package/dist/esm/index-e3586083.js.map +1 -0
- package/dist/esm/index.js +27 -27
- package/dist/esm/index11.js +5 -5
- package/dist/esm/index13.js +7 -6
- package/dist/esm/index13.js.map +1 -1
- package/dist/esm/index14.js +27 -27
- package/dist/esm/index16.js +4 -3
- package/dist/esm/index16.js.map +1 -1
- package/dist/esm/index19.js +4 -3
- package/dist/esm/index19.js.map +1 -1
- package/dist/esm/index2.js +7 -6
- package/dist/esm/index2.js.map +1 -1
- package/dist/esm/index22.js +5 -5
- package/dist/esm/index29.js +3 -3
- package/dist/esm/index30.js +6 -5
- package/dist/esm/index30.js.map +1 -1
- package/dist/esm/index31.js +1 -2
- package/dist/esm/index31.js.map +1 -1
- package/dist/esm/index34.js +5 -5
- package/dist/esm/index39.js +10 -11
- package/dist/esm/index39.js.map +1 -1
- package/dist/esm/index4.js +9 -8
- package/dist/esm/index4.js.map +1 -1
- package/dist/esm/index40.js +5 -5
- package/dist/esm/index41.js +6 -6
- package/dist/esm/index42.js +6 -7
- package/dist/esm/index42.js.map +1 -1
- package/dist/esm/index43.js +1 -1
- package/dist/esm/index46.js +2 -2
- package/dist/esm/index5.js +7 -6
- package/dist/esm/index5.js.map +1 -1
- package/dist/esm/index7.js +4 -4
- package/dist/esm/index8.js +4 -4
- package/dist/esm/index9.js +3 -3
- package/dist/esm/qualifications.svg +10 -0
- package/dist/esm/{types.esm-434cff58.js → types.esm-4968f4d0.js} +774 -14
- package/dist/esm/types.esm-4968f4d0.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/main.css +1 -1
- package/dist/main.js +1 -1
- package/package.json +4 -4
- package/src/assets/images/qualifications.svg +10 -0
- package/src/components/CertificateDisplayCard/CertificateFrontFace.tsx +15 -16
- package/src/components/VCDisplayCard2/VCIDDisplayFrontFace.tsx +8 -2
- package/src/components/svgs/QualificationsIcon.tsx +44 -0
- package/src/components/svgs/index.ts +1 -0
- package/src/constants/index.ts +5 -0
- package/src/helpers/color.helpers.ts +2 -0
- package/src/helpers/credential.helpers.tsx +9 -0
- package/src/helpers/display.helpers.ts +1 -0
- package/src/types/index.ts +2 -0
- package/dist/cjs/BoostGenericCard-470b0e5a.js.map +0 -1
- package/dist/cjs/BoostSmallCard-ac8ab73d.js.map +0 -1
- package/dist/cjs/SchoolIDCard-2d3cbb2c.js.map +0 -1
- package/dist/cjs/VCDisplayCard2-023672a4.js.map +0 -1
- package/dist/cjs/credential.helpers-88f72e5c.js.map +0 -1
- package/dist/cjs/index-47efbf5b.js +0 -1186
- package/dist/cjs/index-47efbf5b.js.map +0 -1
- package/dist/cjs/index-5488badc.js.map +0 -1
- package/dist/cjs/index-ba659c28.js.map +0 -1
- package/dist/cjs/types.esm-94c6d461.js.map +0 -1
- package/dist/esm/BoostGenericCard-c9916371.js.map +0 -1
- package/dist/esm/BoostSmallCard-35b0290d.js.map +0 -1
- package/dist/esm/SchoolIDCard-fbd1cf6c.js.map +0 -1
- package/dist/esm/VCDisplayCard2-54710551.js.map +0 -1
- package/dist/esm/credential.helpers-f4495f8f.js.map +0 -1
- package/dist/esm/index-28917993.js.map +0 -1
- package/dist/esm/index-7542e9ee.js.map +0 -1
- package/dist/esm/index-cbd2e9db.js +0 -1184
- package/dist/esm/index-cbd2e9db.js.map +0 -1
- package/dist/esm/types.esm-434cff58.js.map +0 -1
|
@@ -7408,6 +7408,7 @@ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
|
7408
7408
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
7409
7409
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7410
7410
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7411
|
+
var __pow = Math.pow;
|
|
7411
7412
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7412
7413
|
var __spreadValues = (a, b) => {
|
|
7413
7414
|
for (var prop in b || (b = {}))
|
|
@@ -7421,7 +7422,7 @@ var __spreadValues = (a, b) => {
|
|
|
7421
7422
|
return a;
|
|
7422
7423
|
};
|
|
7423
7424
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
7424
|
-
var _a;
|
|
7425
|
+
var _a, _b;
|
|
7425
7426
|
var __defProp2 = Object.defineProperty;
|
|
7426
7427
|
var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
|
|
7427
7428
|
var ContextValidator = array(string().or(record(string(), any())));
|
|
@@ -7847,7 +7848,8 @@ var AssociationTypeValidator = _enum([
|
|
|
7847
7848
|
"replacedBy"
|
|
7848
7849
|
]).or(string());
|
|
7849
7850
|
var AssociationValidator = object({
|
|
7850
|
-
|
|
7851
|
+
// Accept compacted scalars while retaining the existing permissive array contract.
|
|
7852
|
+
type: string().min(1).or(string().array().nonempty()),
|
|
7851
7853
|
associationType: AssociationTypeValidator,
|
|
7852
7854
|
sourceId: string().optional(),
|
|
7853
7855
|
targetId: string()
|
|
@@ -8661,11 +8663,48 @@ var ConsentFlowContractDetailsValidator = object({
|
|
|
8661
8663
|
updatedAt: string(),
|
|
8662
8664
|
expiresAt: string().optional(),
|
|
8663
8665
|
autoBoosts: string().array().optional(),
|
|
8664
|
-
writers: array(LCNProfileValidator).optional()
|
|
8666
|
+
writers: array(LCNProfileValidator).optional(),
|
|
8667
|
+
recipients: array(LCNPublicProfileValidator.extend({ did: string() })).optional(),
|
|
8668
|
+
audienceVersion: number().int().nonnegative().optional()
|
|
8665
8669
|
});
|
|
8666
|
-
var ConsentFlowContractRequestStatusValidator = _enum(["pending", "accepted", "denied"]).nullable();
|
|
8670
|
+
var ConsentFlowContractRequestStatusValidator = _enum(["pending", "accepted", "denied", "cancelled"]).nullable();
|
|
8667
8671
|
var ConsentFlowContractRequestReadStatusValidator = _enum(["unseen", "seen"]).nullable();
|
|
8668
|
-
var
|
|
8672
|
+
var ConsentFlowReferralValidator = object({
|
|
8673
|
+
requestId: string(),
|
|
8674
|
+
requestedBy: string(),
|
|
8675
|
+
externalReferenceId: string().max(256).optional()
|
|
8676
|
+
});
|
|
8677
|
+
var ContractRequestFieldsValidator = ConsentFlowReferralValidator.partial().extend({
|
|
8678
|
+
requestedAt: string().optional(),
|
|
8679
|
+
message: string().max(500).optional()
|
|
8680
|
+
});
|
|
8681
|
+
object({
|
|
8682
|
+
contractUri: string(),
|
|
8683
|
+
targetProfileId: string(),
|
|
8684
|
+
externalReferenceId: string().trim().min(1).max(256).optional(),
|
|
8685
|
+
message: string().trim().max(500).optional()
|
|
8686
|
+
});
|
|
8687
|
+
object({
|
|
8688
|
+
eventId: string(),
|
|
8689
|
+
deliveryKey: string(),
|
|
8690
|
+
event: _enum([
|
|
8691
|
+
"request_sent",
|
|
8692
|
+
"request_accepted",
|
|
8693
|
+
"request_denied",
|
|
8694
|
+
"request_cancelled",
|
|
8695
|
+
"consent_created",
|
|
8696
|
+
"consent_updated",
|
|
8697
|
+
"consent_withdrawn",
|
|
8698
|
+
"credentials_synced"
|
|
8699
|
+
]),
|
|
8700
|
+
contractUri: string(),
|
|
8701
|
+
termsUri: string().optional(),
|
|
8702
|
+
requestId: string().optional(),
|
|
8703
|
+
requestedBy: string().optional(),
|
|
8704
|
+
externalReferenceId: string().optional(),
|
|
8705
|
+
recipientRole: _enum(["owner", "recipient", "requester", "target"])
|
|
8706
|
+
});
|
|
8707
|
+
var ConsentFlowContractRequestForProfileValidator = ContractRequestFieldsValidator.extend({
|
|
8669
8708
|
profile: LCNProfileValidator,
|
|
8670
8709
|
status: ConsentFlowContractRequestStatusValidator,
|
|
8671
8710
|
readStatus: ConsentFlowContractRequestReadStatusValidator.optional()
|
|
@@ -8711,6 +8750,7 @@ PaginationResponseValidator.extend({
|
|
|
8711
8750
|
expiresAt: string().optional(),
|
|
8712
8751
|
oneTime: boolean().optional(),
|
|
8713
8752
|
terms: ConsentFlowTermsValidator,
|
|
8753
|
+
referral: ConsentFlowReferralValidator.optional(),
|
|
8714
8754
|
contract: ConsentFlowContractDetailsValidator,
|
|
8715
8755
|
uri: string(),
|
|
8716
8756
|
consenter: LCNProfileValidator,
|
|
@@ -8806,6 +8846,7 @@ var ConsentFlowTransactionValidator = object({
|
|
|
8806
8846
|
oneTime: boolean().optional(),
|
|
8807
8847
|
terms: ConsentFlowTermsValidator.optional(),
|
|
8808
8848
|
guardianApproval: ConsentFlowGuardianApprovalValidator.optional(),
|
|
8849
|
+
referral: ConsentFlowReferralValidator.optional(),
|
|
8809
8850
|
id: string(),
|
|
8810
8851
|
action: ConsentFlowTransactionActionValidator,
|
|
8811
8852
|
date: string(),
|
|
@@ -8816,6 +8857,7 @@ var HolderExportConsentRecordValidator = object({
|
|
|
8816
8857
|
status: ConsentFlowTermsStatusValidator,
|
|
8817
8858
|
contract: ConsentFlowContractDetailsValidator,
|
|
8818
8859
|
terms: ConsentFlowTermsValidator,
|
|
8860
|
+
referral: ConsentFlowReferralValidator.optional(),
|
|
8819
8861
|
transactions: ConsentFlowTransactionValidator.array()
|
|
8820
8862
|
});
|
|
8821
8863
|
object({
|
|
@@ -9182,9 +9224,9 @@ object({
|
|
|
9182
9224
|
configuration: InboxBatchConfigurationValidator.optional()
|
|
9183
9225
|
}).superRefine((batch, ctx) => {
|
|
9184
9226
|
batch.items.forEach((item, index) => {
|
|
9185
|
-
var _a2,
|
|
9227
|
+
var _a2, _b2;
|
|
9186
9228
|
const itemGuardian = (_a2 = item.configuration) == null ? void 0 : _a2.guardianEmail;
|
|
9187
|
-
const guardian = itemGuardian === null ? void 0 : itemGuardian != null ? itemGuardian : (
|
|
9229
|
+
const guardian = itemGuardian === null ? void 0 : itemGuardian != null ? itemGuardian : (_b2 = batch.configuration) == null ? void 0 : _b2.guardianEmail;
|
|
9188
9230
|
if (guardian && item.recipient.type === "email" && guardian.toLowerCase() === item.recipient.value.toLowerCase()) {
|
|
9189
9231
|
ctx.addIssue({
|
|
9190
9232
|
code: "custom",
|
|
@@ -9554,7 +9596,7 @@ var AppStoreListingSubmitterValidator = object({
|
|
|
9554
9596
|
displayName: string(),
|
|
9555
9597
|
email: string().optional()
|
|
9556
9598
|
});
|
|
9557
|
-
var
|
|
9599
|
+
var AppStoreListingFieldsValidator = object({
|
|
9558
9600
|
listing_id: string(),
|
|
9559
9601
|
slug: string().optional(),
|
|
9560
9602
|
display_name: string(),
|
|
@@ -9580,15 +9622,33 @@ var AppStoreListingValidator = object({
|
|
|
9580
9622
|
submitter: AppStoreListingSubmitterValidator.optional(),
|
|
9581
9623
|
contact_email: string().email().optional()
|
|
9582
9624
|
});
|
|
9625
|
+
var PendingListingUpdateStatusValidator = _enum(["DRAFT", "PENDING_REVIEW"]);
|
|
9626
|
+
var PendingListingUpdateValidator = object({
|
|
9627
|
+
status: PendingListingUpdateStatusValidator,
|
|
9628
|
+
submitted_at: string().optional(),
|
|
9629
|
+
changes: AppStoreListingFieldsValidator.omit({
|
|
9630
|
+
listing_id: true,
|
|
9631
|
+
app_listing_status: true,
|
|
9632
|
+
promotion_level: true,
|
|
9633
|
+
submitted_at: true,
|
|
9634
|
+
submitter: true
|
|
9635
|
+
}).partial(),
|
|
9636
|
+
manifest_version: number().int().min(1).optional()
|
|
9637
|
+
});
|
|
9638
|
+
var AppStoreListingValidator = AppStoreListingFieldsValidator.extend({
|
|
9639
|
+
pending_update: PendingListingUpdateValidator.optional()
|
|
9640
|
+
});
|
|
9583
9641
|
AppStoreListingValidator.omit({
|
|
9584
9642
|
listing_id: true,
|
|
9585
9643
|
app_listing_status: true,
|
|
9586
|
-
promotion_level: true
|
|
9644
|
+
promotion_level: true,
|
|
9645
|
+
pending_update: true
|
|
9587
9646
|
});
|
|
9588
9647
|
AppStoreListingValidator.partial().omit({
|
|
9589
9648
|
listing_id: true,
|
|
9590
9649
|
app_listing_status: true,
|
|
9591
|
-
promotion_level: true
|
|
9650
|
+
promotion_level: true,
|
|
9651
|
+
pending_update: true
|
|
9592
9652
|
});
|
|
9593
9653
|
var InstalledAppValidator = AppStoreListingValidator.extend({
|
|
9594
9654
|
installed_at: string()
|
|
@@ -9603,12 +9663,87 @@ object({
|
|
|
9603
9663
|
templateAlias: string().min(1).max(50).regex(/^[a-z0-9-]+$/),
|
|
9604
9664
|
boostUri: string()
|
|
9605
9665
|
});
|
|
9606
|
-
var
|
|
9666
|
+
var InlineWalletCategoryValidator = _enum([
|
|
9667
|
+
"Achievement",
|
|
9668
|
+
"Skill",
|
|
9669
|
+
"ID",
|
|
9670
|
+
"Learning History",
|
|
9671
|
+
"Work History",
|
|
9672
|
+
"Social Badges",
|
|
9673
|
+
"Membership",
|
|
9674
|
+
"Accomplishment",
|
|
9675
|
+
"Experiences",
|
|
9676
|
+
"Accommodation",
|
|
9677
|
+
"Family"
|
|
9678
|
+
]);
|
|
9679
|
+
var InlineAlignmentValidator = object({
|
|
9680
|
+
name: string(),
|
|
9681
|
+
url: string(),
|
|
9682
|
+
framework: string().optional(),
|
|
9683
|
+
code: string().optional()
|
|
9684
|
+
}).passthrough();
|
|
9685
|
+
var InlineEvidenceValidator = object({
|
|
9686
|
+
id: string().optional(),
|
|
9687
|
+
name: string().optional(),
|
|
9688
|
+
narrative: string().optional()
|
|
9689
|
+
}).passthrough();
|
|
9690
|
+
var InlineWalletSkillTagValidator = object({
|
|
9691
|
+
frameworkId: string(),
|
|
9692
|
+
id: string(),
|
|
9693
|
+
proficiencyLevel: string().optional()
|
|
9694
|
+
}).passthrough();
|
|
9695
|
+
var SimpleInlineCredentialTemplateValidator = object({
|
|
9696
|
+
rawCredential: _undefined().optional(),
|
|
9697
|
+
name: string(),
|
|
9698
|
+
description: string().optional(),
|
|
9699
|
+
image: string().optional(),
|
|
9700
|
+
issuerName: string().optional(),
|
|
9701
|
+
achievementType: string().optional(),
|
|
9702
|
+
category: InlineWalletCategoryValidator.optional(),
|
|
9703
|
+
criteria: object({
|
|
9704
|
+
narrative: string().optional(),
|
|
9705
|
+
url: string().optional()
|
|
9706
|
+
}).passthrough().optional(),
|
|
9707
|
+
alignments: array(InlineAlignmentValidator).optional(),
|
|
9708
|
+
tags: array(string()).optional(),
|
|
9709
|
+
activity: object({
|
|
9710
|
+
startDate: string().optional(),
|
|
9711
|
+
endDate: string().optional()
|
|
9712
|
+
}).passthrough().optional(),
|
|
9713
|
+
credits: object({
|
|
9714
|
+
earned: union([number(), string()]).optional(),
|
|
9715
|
+
available: union([number(), string()]).optional()
|
|
9716
|
+
}).passthrough().optional(),
|
|
9717
|
+
validUntil: string().optional(),
|
|
9718
|
+
evidence: array(InlineEvidenceValidator).optional(),
|
|
9719
|
+
walletSkills: array(InlineWalletSkillTagValidator).optional()
|
|
9720
|
+
}).passthrough();
|
|
9721
|
+
var RawInlineCredentialTemplateValidator = object({
|
|
9722
|
+
rawCredential: record(string(), unknown()),
|
|
9723
|
+
category: InlineWalletCategoryValidator.optional(),
|
|
9724
|
+
walletSkills: array(InlineWalletSkillTagValidator).optional()
|
|
9725
|
+
}).passthrough();
|
|
9726
|
+
var InlineCredentialTemplateValidator = union([
|
|
9727
|
+
RawInlineCredentialTemplateValidator,
|
|
9728
|
+
SimpleInlineCredentialTemplateValidator
|
|
9729
|
+
]);
|
|
9730
|
+
var LegacySendCredentialEventValidator = object({
|
|
9607
9731
|
type: literal("send-credential"),
|
|
9608
9732
|
templateAlias: string(),
|
|
9609
9733
|
templateData: record(string(), unknown()).optional(),
|
|
9610
9734
|
preventDuplicateClaim: boolean().optional()
|
|
9611
9735
|
});
|
|
9736
|
+
var InlineSendCredentialEventValidator = object({
|
|
9737
|
+
type: literal("send-credential"),
|
|
9738
|
+
alias: string(),
|
|
9739
|
+
template: InlineCredentialTemplateValidator,
|
|
9740
|
+
templateData: record(string(), unknown()).optional(),
|
|
9741
|
+
preventDuplicateClaim: boolean().optional()
|
|
9742
|
+
});
|
|
9743
|
+
var SendCredentialEventValidator = union([
|
|
9744
|
+
LegacySendCredentialEventValidator,
|
|
9745
|
+
InlineSendCredentialEventValidator
|
|
9746
|
+
]);
|
|
9612
9747
|
var CheckCredentialEventValidator = object({
|
|
9613
9748
|
type: literal("check-credential"),
|
|
9614
9749
|
templateAlias: string().optional(),
|
|
@@ -9703,7 +9838,119 @@ var GetCountersEventValidator = object({
|
|
|
9703
9838
|
type: literal("get-counters"),
|
|
9704
9839
|
keys: array(counterKeyValidator).min(1).max(50).optional()
|
|
9705
9840
|
});
|
|
9706
|
-
var
|
|
9841
|
+
var ConsentRequestWalletCategoryValidator = _enum([
|
|
9842
|
+
"Achievement",
|
|
9843
|
+
"Skill",
|
|
9844
|
+
"ID",
|
|
9845
|
+
"Learning History",
|
|
9846
|
+
"Work History",
|
|
9847
|
+
"Social Badges",
|
|
9848
|
+
"Membership",
|
|
9849
|
+
"Accomplishment",
|
|
9850
|
+
"Experiences",
|
|
9851
|
+
"Accommodation",
|
|
9852
|
+
"Family"
|
|
9853
|
+
]);
|
|
9854
|
+
var ConsentRequestPersonalFieldValidator = _enum([
|
|
9855
|
+
"name",
|
|
9856
|
+
"email",
|
|
9857
|
+
"phone",
|
|
9858
|
+
"birthDate",
|
|
9859
|
+
"country",
|
|
9860
|
+
"avatar"
|
|
9861
|
+
]);
|
|
9862
|
+
var ConsentRequestValidator = object({
|
|
9863
|
+
read: object({
|
|
9864
|
+
credentialCategories: array(ConsentRequestWalletCategoryValidator).optional(),
|
|
9865
|
+
personalFields: array(ConsentRequestPersonalFieldValidator).optional()
|
|
9866
|
+
}).optional(),
|
|
9867
|
+
write: object({
|
|
9868
|
+
credentialCategories: array(ConsentRequestWalletCategoryValidator).optional()
|
|
9869
|
+
}).optional(),
|
|
9870
|
+
reason: string().optional()
|
|
9871
|
+
});
|
|
9872
|
+
var NormalizedConsentScopesValidator = object({
|
|
9873
|
+
read: object({
|
|
9874
|
+
credentialCategories: array(ConsentRequestWalletCategoryValidator).default([]),
|
|
9875
|
+
personalFields: array(ConsentRequestPersonalFieldValidator).default([])
|
|
9876
|
+
}),
|
|
9877
|
+
write: object({
|
|
9878
|
+
credentialCategories: array(ConsentRequestWalletCategoryValidator).default([])
|
|
9879
|
+
})
|
|
9880
|
+
});
|
|
9881
|
+
var CapturedTemplateRecordValidator = object({
|
|
9882
|
+
alias: string(),
|
|
9883
|
+
template: InlineCredentialTemplateValidator,
|
|
9884
|
+
version: number().int().min(1),
|
|
9885
|
+
lastUsedAt: string()
|
|
9886
|
+
}).passthrough();
|
|
9887
|
+
var CapturedConsentRecordValidator = object({
|
|
9888
|
+
scopes: NormalizedConsentScopesValidator,
|
|
9889
|
+
reason: string().optional(),
|
|
9890
|
+
lastUsedAt: string()
|
|
9891
|
+
}).passthrough();
|
|
9892
|
+
var AppManifestValidator = object({
|
|
9893
|
+
manifestVersion: literal(1),
|
|
9894
|
+
appUrl: string(),
|
|
9895
|
+
appKey: string().max(200).optional(),
|
|
9896
|
+
suggestedName: string().optional(),
|
|
9897
|
+
suggestedIconUrl: string().optional(),
|
|
9898
|
+
permissions: array(string()).default([]),
|
|
9899
|
+
templates: array(CapturedTemplateRecordValidator).default([]),
|
|
9900
|
+
consentRequests: array(CapturedConsentRecordValidator).default([]),
|
|
9901
|
+
usedConsentContract: boolean().optional(),
|
|
9902
|
+
featuresLaunched: array(string()).default([]),
|
|
9903
|
+
counterKeys: array(string()).default([]),
|
|
9904
|
+
usedLearnerContext: boolean(),
|
|
9905
|
+
usedNotifications: boolean(),
|
|
9906
|
+
firstCapturedAt: string(),
|
|
9907
|
+
lastUpdatedAt: string()
|
|
9908
|
+
}).passthrough();
|
|
9909
|
+
var AppManifestVersionStatusValidator = _enum(["draft", "active", "superseded"]);
|
|
9910
|
+
object({
|
|
9911
|
+
id: string(),
|
|
9912
|
+
version: number().int().min(1),
|
|
9913
|
+
manifestHash: string(),
|
|
9914
|
+
manifest: AppManifestValidator,
|
|
9915
|
+
status: AppManifestVersionStatusValidator,
|
|
9916
|
+
createdAt: string(),
|
|
9917
|
+
activatedAt: string().optional()
|
|
9918
|
+
});
|
|
9919
|
+
var AppManifestStringDiffValidator = object({
|
|
9920
|
+
added: array(string()),
|
|
9921
|
+
removed: array(string()),
|
|
9922
|
+
changed: array(string())
|
|
9923
|
+
});
|
|
9924
|
+
var AppManifestTemplateRefValidator = object({
|
|
9925
|
+
alias: string(),
|
|
9926
|
+
version: number().int().min(1)
|
|
9927
|
+
});
|
|
9928
|
+
var AppManifestTemplateChangeValidator = object({
|
|
9929
|
+
alias: string(),
|
|
9930
|
+
fromVersion: number().int().min(1),
|
|
9931
|
+
toVersion: number().int().min(1)
|
|
9932
|
+
});
|
|
9933
|
+
object({
|
|
9934
|
+
permissions: AppManifestStringDiffValidator,
|
|
9935
|
+
templates: object({
|
|
9936
|
+
added: array(AppManifestTemplateRefValidator),
|
|
9937
|
+
removed: array(AppManifestTemplateRefValidator),
|
|
9938
|
+
changed: array(AppManifestTemplateChangeValidator)
|
|
9939
|
+
}),
|
|
9940
|
+
consentScopes: AppManifestStringDiffValidator,
|
|
9941
|
+
featurePaths: AppManifestStringDiffValidator,
|
|
9942
|
+
counterKeys: AppManifestStringDiffValidator,
|
|
9943
|
+
requiresReview: boolean()
|
|
9944
|
+
});
|
|
9945
|
+
var UpsertConsentContractEventValidator = object({
|
|
9946
|
+
type: literal("upsert-consent-contract"),
|
|
9947
|
+
scopes: ConsentRequestValidator
|
|
9948
|
+
});
|
|
9949
|
+
object({
|
|
9950
|
+
contractUri: string(),
|
|
9951
|
+
created: boolean()
|
|
9952
|
+
});
|
|
9953
|
+
var AppEventValidator = union([
|
|
9707
9954
|
SendCredentialEventValidator,
|
|
9708
9955
|
CheckCredentialEventValidator,
|
|
9709
9956
|
CheckIssuanceStatusEventValidator,
|
|
@@ -9713,7 +9960,8 @@ var AppEventValidator = discriminatedUnion("type", [
|
|
|
9713
9960
|
SendNotificationEventValidator,
|
|
9714
9961
|
IncrementCounterEventValidator,
|
|
9715
9962
|
GetCounterEventValidator,
|
|
9716
|
-
GetCountersEventValidator
|
|
9963
|
+
GetCountersEventValidator,
|
|
9964
|
+
UpsertConsentContractEventValidator
|
|
9717
9965
|
]);
|
|
9718
9966
|
object({
|
|
9719
9967
|
listingId: string(),
|
|
@@ -9786,6 +10034,20 @@ object({
|
|
|
9786
10034
|
this.name = "AuthSessionError";
|
|
9787
10035
|
}
|
|
9788
10036
|
}, __name(_a, "AuthSessionError"), _a);
|
|
10037
|
+
(_b = class extends Error {
|
|
10038
|
+
constructor(operation, providerType) {
|
|
10039
|
+
super(`${operation} is not supported by ${providerType}`);
|
|
10040
|
+
this.operation = operation;
|
|
10041
|
+
this.providerType = providerType;
|
|
10042
|
+
this.name = "UnsupportedSignInOperationError";
|
|
10043
|
+
}
|
|
10044
|
+
}, __name(_b, "UnsupportedSignInOperationError"), _b);
|
|
10045
|
+
object({
|
|
10046
|
+
state: _enum(["none", "enabled", "locked", "stale"]),
|
|
10047
|
+
enabled: boolean(),
|
|
10048
|
+
attemptsRemaining: number().int().nonnegative(),
|
|
10049
|
+
salt: string().optional()
|
|
10050
|
+
});
|
|
9789
10051
|
var BITSTRING_STATUS_PURPOSES = ["revocation", "suspension"];
|
|
9790
10052
|
var BitstringStatusPurposeValidator = _enum(BITSTRING_STATUS_PURPOSES);
|
|
9791
10053
|
var BitstringStatusListEntryValidator = object({
|
|
@@ -9894,6 +10156,504 @@ object({
|
|
|
9894
10156
|
version: number().default(1),
|
|
9895
10157
|
messages: array(inAppMessageValidator).default([])
|
|
9896
10158
|
}).passthrough();
|
|
10159
|
+
var SHARE_LINK_ID_BYTES = 16;
|
|
10160
|
+
var SHARE_CONTENT_KEY_BYTES = 32;
|
|
10161
|
+
var SHARE_IV_BYTES = 12;
|
|
10162
|
+
var SHARE_TAG_BYTES = 16;
|
|
10163
|
+
var MAX_SHARE_CIPHERTEXT_BYTES = 512 * 1024;
|
|
10164
|
+
var MAX_SHARE_RECOVERY_JWE_BYTES = 64 * 1024;
|
|
10165
|
+
var MAX_SELECTED_CREDENTIALS = 50;
|
|
10166
|
+
var MAX_ENDORSEMENTS = 200;
|
|
10167
|
+
var MAX_VP_MEMBERS = MAX_SELECTED_CREDENTIALS + MAX_ENDORSEMENTS;
|
|
10168
|
+
var MAX_SHARE_SOURCE_URI_CHARS = 2048;
|
|
10169
|
+
var SHARE_LINK_PROTOCOL = "lc-share/v1";
|
|
10170
|
+
var SHARE_RECOVERY_PROTOCOL = "lc-share-recovery/v1";
|
|
10171
|
+
var BASE64URL_ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
|
|
10172
|
+
var BASE64URL_LOOKUP = (() => {
|
|
10173
|
+
const table = new Int16Array(128).fill(-1);
|
|
10174
|
+
for (let index = 0; index < BASE64URL_ALPHABET.length; index += 1) {
|
|
10175
|
+
table[BASE64URL_ALPHABET.charCodeAt(index)] = index;
|
|
10176
|
+
}
|
|
10177
|
+
return table;
|
|
10178
|
+
})();
|
|
10179
|
+
var encodeBase64Url = /* @__PURE__ */ __name((bytes) => {
|
|
10180
|
+
let output = "";
|
|
10181
|
+
for (let index = 0; index < bytes.length; index += 3) {
|
|
10182
|
+
const first = bytes[index];
|
|
10183
|
+
const second = bytes[index + 1];
|
|
10184
|
+
const third = bytes[index + 2];
|
|
10185
|
+
output += BASE64URL_ALPHABET[first >> 2];
|
|
10186
|
+
output += BASE64URL_ALPHABET[(first & 3) << 4 | (second != null ? second : 0) >> 4];
|
|
10187
|
+
if (second === void 0) break;
|
|
10188
|
+
output += BASE64URL_ALPHABET[(second & 15) << 2 | (third != null ? third : 0) >> 6];
|
|
10189
|
+
if (third === void 0) break;
|
|
10190
|
+
output += BASE64URL_ALPHABET[third & 63];
|
|
10191
|
+
}
|
|
10192
|
+
return output;
|
|
10193
|
+
}, "encodeBase64Url");
|
|
10194
|
+
var decodeBase64Url = /* @__PURE__ */ __name((value) => {
|
|
10195
|
+
if (typeof value !== "string") return null;
|
|
10196
|
+
const output = new Uint8Array(Math.floor(value.length * 6 / 8));
|
|
10197
|
+
let bits = 0;
|
|
10198
|
+
let bitCount = 0;
|
|
10199
|
+
let outputIndex = 0;
|
|
10200
|
+
for (let index = 0; index < value.length; index += 1) {
|
|
10201
|
+
const code = value.charCodeAt(index);
|
|
10202
|
+
const digit = code < 128 ? BASE64URL_LOOKUP[code] : -1;
|
|
10203
|
+
if (digit < 0) return null;
|
|
10204
|
+
bits = bits << 6 | digit;
|
|
10205
|
+
bitCount += 6;
|
|
10206
|
+
if (bitCount >= 8) {
|
|
10207
|
+
bitCount -= 8;
|
|
10208
|
+
output[outputIndex] = bits >> bitCount & 255;
|
|
10209
|
+
outputIndex += 1;
|
|
10210
|
+
}
|
|
10211
|
+
}
|
|
10212
|
+
return output;
|
|
10213
|
+
}, "decodeBase64Url");
|
|
10214
|
+
var isCanonicalBase64Url = /* @__PURE__ */ __name((value, expectedBytes) => {
|
|
10215
|
+
if (typeof value !== "string") return false;
|
|
10216
|
+
if (expectedBytes !== void 0 && value.length !== Math.ceil(expectedBytes * 4 / 3))
|
|
10217
|
+
return false;
|
|
10218
|
+
const decoded = decodeBase64Url(value);
|
|
10219
|
+
if (decoded === null) return false;
|
|
10220
|
+
if (expectedBytes !== void 0 && decoded.length !== expectedBytes) return false;
|
|
10221
|
+
return encodeBase64Url(decoded) === value;
|
|
10222
|
+
}, "isCanonicalBase64Url");
|
|
10223
|
+
var decodedBase64UrlByteLength = /* @__PURE__ */ __name((value) => {
|
|
10224
|
+
var _a2, _b2;
|
|
10225
|
+
return (_b2 = (_a2 = decodeBase64Url(value)) == null ? void 0 : _a2.length) != null ? _b2 : null;
|
|
10226
|
+
}, "decodedBase64UrlByteLength");
|
|
10227
|
+
var utf8ByteLength = /* @__PURE__ */ __name((value) => new TextEncoder().encode(value).length, "utf8ByteLength");
|
|
10228
|
+
var canonicalBase64Url = /* @__PURE__ */ __name((bytes) => string().refine((value) => isCanonicalBase64Url(value, bytes), {
|
|
10229
|
+
message: `must be canonical base64url for exactly ${bytes} bytes`
|
|
10230
|
+
}), "canonicalBase64Url");
|
|
10231
|
+
var ShareLinkIdValidator = canonicalBase64Url(SHARE_LINK_ID_BYTES);
|
|
10232
|
+
var ShareContentKeyValidator = canonicalBase64Url(SHARE_CONTENT_KEY_BYTES);
|
|
10233
|
+
var ShareIvValidator = canonicalBase64Url(SHARE_IV_BYTES);
|
|
10234
|
+
var ShareCiphertextValidator = string().refine(
|
|
10235
|
+
(value) => {
|
|
10236
|
+
if (value.length > Math.ceil(MAX_SHARE_CIPHERTEXT_BYTES * 4 / 3)) return false;
|
|
10237
|
+
const decoded = decodeBase64Url(value);
|
|
10238
|
+
if (decoded === null) return false;
|
|
10239
|
+
if (encodeBase64Url(decoded) !== value) return false;
|
|
10240
|
+
return decoded.length >= SHARE_TAG_BYTES && decoded.length <= MAX_SHARE_CIPHERTEXT_BYTES;
|
|
10241
|
+
},
|
|
10242
|
+
{
|
|
10243
|
+
message: `must be canonical base64url decoding to ${SHARE_TAG_BYTES}..${MAX_SHARE_CIPHERTEXT_BYTES} bytes`
|
|
10244
|
+
}
|
|
10245
|
+
);
|
|
10246
|
+
var ShareEnvelopeValidator = object({
|
|
10247
|
+
v: literal(1),
|
|
10248
|
+
alg: literal("A256GCM"),
|
|
10249
|
+
iv: ShareIvValidator,
|
|
10250
|
+
ct: ShareCiphertextValidator
|
|
10251
|
+
}).strict();
|
|
10252
|
+
var safeVersion = number().int().min(1).max(__pow(2, 31) - 1);
|
|
10253
|
+
var safeCredentialIndex = number().int().min(0).max(MAX_VP_MEMBERS - 1);
|
|
10254
|
+
var ShareSelectionEntryValidator = object({ credentialIndex: safeCredentialIndex }).strict();
|
|
10255
|
+
var ShareEndorsementEntryValidator = object({ credentialIndex: safeCredentialIndex, targetCredentialIndex: safeCredentialIndex }).strict();
|
|
10256
|
+
var ShareSharerValidator = object({
|
|
10257
|
+
profileId: string().min(1).max(128),
|
|
10258
|
+
displayName: string().min(1).max(120),
|
|
10259
|
+
avatar: string().max(2048).optional()
|
|
10260
|
+
}).strict();
|
|
10261
|
+
var presentationShape = VPValidator.extend({
|
|
10262
|
+
verifiableCredential: VCValidator.array().min(1).max(MAX_VP_MEMBERS)
|
|
10263
|
+
});
|
|
10264
|
+
var hasBoundedPresentation = /* @__PURE__ */ __name((value) => {
|
|
10265
|
+
let credentialCount = 0;
|
|
10266
|
+
const ancestors = /* @__PURE__ */ new Set();
|
|
10267
|
+
const visit = /* @__PURE__ */ __name((node, depth) => {
|
|
10268
|
+
if (node === null || typeof node !== "object") return true;
|
|
10269
|
+
if (depth > 32 || ancestors.has(node)) return false;
|
|
10270
|
+
ancestors.add(node);
|
|
10271
|
+
try {
|
|
10272
|
+
for (const [key, child] of Object.entries(node)) {
|
|
10273
|
+
if (key === "verifiableCredential") {
|
|
10274
|
+
credentialCount += Array.isArray(child) ? child.length : 1;
|
|
10275
|
+
if (credentialCount > MAX_VP_MEMBERS) return false;
|
|
10276
|
+
}
|
|
10277
|
+
if (!visit(child, depth + 1)) return false;
|
|
10278
|
+
}
|
|
10279
|
+
return true;
|
|
10280
|
+
} finally {
|
|
10281
|
+
ancestors.delete(node);
|
|
10282
|
+
}
|
|
10283
|
+
}, "visit");
|
|
10284
|
+
return visit(value, 0);
|
|
10285
|
+
}, "hasBoundedPresentation");
|
|
10286
|
+
var ShareManifestPresentationValidator = custom(
|
|
10287
|
+
(value) => hasBoundedPresentation(value) && presentationShape.safeParse(value).success,
|
|
10288
|
+
{ message: "invalid share presentation" }
|
|
10289
|
+
);
|
|
10290
|
+
var SharePayloadValidatorShape = object({
|
|
10291
|
+
protocol: literal(SHARE_LINK_PROTOCOL),
|
|
10292
|
+
shareId: ShareLinkIdValidator,
|
|
10293
|
+
contentVersion: safeVersion,
|
|
10294
|
+
createdAt: datetime(),
|
|
10295
|
+
sharer: ShareSharerValidator,
|
|
10296
|
+
presentation: ShareManifestPresentationValidator,
|
|
10297
|
+
selection: ShareSelectionEntryValidator.array().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
10298
|
+
endorsements: ShareEndorsementEntryValidator.array().max(MAX_ENDORSEMENTS).default([])
|
|
10299
|
+
}).strict();
|
|
10300
|
+
var classificationFailure = /* @__PURE__ */ __name((code, message, path = []) => ({ ok: false, code, message, path }), "classificationFailure");
|
|
10301
|
+
var readSignedClaimId = /* @__PURE__ */ __name((member) => {
|
|
10302
|
+
var _a2, _b2;
|
|
10303
|
+
if (member === null || typeof member !== "object") return void 0;
|
|
10304
|
+
const record = member;
|
|
10305
|
+
const claim = (_a2 = record.credentialSubject) != null ? _a2 : record.endorsement;
|
|
10306
|
+
if (claim === null || typeof claim !== "object") return void 0;
|
|
10307
|
+
const claimRecord = claim;
|
|
10308
|
+
const nested = claimRecord.endorsement;
|
|
10309
|
+
const nestedId = nested !== null && typeof nested === "object" ? nested.id : void 0;
|
|
10310
|
+
return (_b2 = claimRecord.id) != null ? _b2 : nestedId;
|
|
10311
|
+
}, "readSignedClaimId");
|
|
10312
|
+
var classifyShareManifest = /* @__PURE__ */ __name((payload) => {
|
|
10313
|
+
var _a2, _b2;
|
|
10314
|
+
const members = (_a2 = payload.presentation) == null ? void 0 : _a2.verifiableCredential;
|
|
10315
|
+
if (!Array.isArray(members) || members.length === 0) {
|
|
10316
|
+
return classificationFailure("NO_PRESENTATION_MEMBERS", "presentation has no credentials");
|
|
10317
|
+
}
|
|
10318
|
+
if (members.length > MAX_VP_MEMBERS) {
|
|
10319
|
+
return classificationFailure(
|
|
10320
|
+
"TOO_MANY_VP_MEMBERS",
|
|
10321
|
+
`presentation has ${members.length} members, over the ${MAX_VP_MEMBERS} bound`
|
|
10322
|
+
);
|
|
10323
|
+
}
|
|
10324
|
+
const selection = payload.selection;
|
|
10325
|
+
const endorsements = (_b2 = payload.endorsements) != null ? _b2 : [];
|
|
10326
|
+
if (!Array.isArray(selection) || selection.length < 1 || selection.length > MAX_SELECTED_CREDENTIALS) {
|
|
10327
|
+
return classificationFailure("BAD_SELECTION", "selection must contain 1..50 entries");
|
|
10328
|
+
}
|
|
10329
|
+
if (!Array.isArray(endorsements) || endorsements.length > MAX_ENDORSEMENTS) {
|
|
10330
|
+
return classificationFailure(
|
|
10331
|
+
"BAD_ENDORSEMENTS",
|
|
10332
|
+
"endorsements must contain at most 200 entries"
|
|
10333
|
+
);
|
|
10334
|
+
}
|
|
10335
|
+
const selectedIndices = [];
|
|
10336
|
+
const selected = /* @__PURE__ */ new Set();
|
|
10337
|
+
for (let index = 0; index < selection.length; index += 1) {
|
|
10338
|
+
const entry = selection[index];
|
|
10339
|
+
const credentialIndex = entry == null ? void 0 : entry.credentialIndex;
|
|
10340
|
+
if (!Number.isSafeInteger(credentialIndex) || credentialIndex < 0 || credentialIndex >= members.length) {
|
|
10341
|
+
return classificationFailure(
|
|
10342
|
+
"SELECTION_INDEX_OUT_OF_BOUNDS",
|
|
10343
|
+
`selection[${index}].credentialIndex is out of bounds`,
|
|
10344
|
+
["selection", index, "credentialIndex"]
|
|
10345
|
+
);
|
|
10346
|
+
}
|
|
10347
|
+
if (selected.has(credentialIndex)) {
|
|
10348
|
+
return classificationFailure(
|
|
10349
|
+
"SELECTION_INDEX_DUPLICATE",
|
|
10350
|
+
`selection[${index}].credentialIndex is duplicated`,
|
|
10351
|
+
["selection", index, "credentialIndex"]
|
|
10352
|
+
);
|
|
10353
|
+
}
|
|
10354
|
+
selected.add(credentialIndex);
|
|
10355
|
+
selectedIndices.push(credentialIndex);
|
|
10356
|
+
}
|
|
10357
|
+
const classified = new Set(selected);
|
|
10358
|
+
const endorsementIndices = [];
|
|
10359
|
+
for (let index = 0; index < endorsements.length; index += 1) {
|
|
10360
|
+
const entry = endorsements[index];
|
|
10361
|
+
const credentialIndex = entry == null ? void 0 : entry.credentialIndex;
|
|
10362
|
+
const targetIndex = entry == null ? void 0 : entry.targetCredentialIndex;
|
|
10363
|
+
if (!Number.isSafeInteger(credentialIndex) || credentialIndex < 0 || credentialIndex >= members.length) {
|
|
10364
|
+
return classificationFailure(
|
|
10365
|
+
"ENDORSEMENT_INDEX_OUT_OF_BOUNDS",
|
|
10366
|
+
`endorsements[${index}].credentialIndex is out of bounds`,
|
|
10367
|
+
["endorsements", index, "credentialIndex"]
|
|
10368
|
+
);
|
|
10369
|
+
}
|
|
10370
|
+
if (classified.has(credentialIndex)) {
|
|
10371
|
+
return classificationFailure(
|
|
10372
|
+
"VP_MEMBER_CLASSIFIED_TWICE",
|
|
10373
|
+
`endorsements[${index}].credentialIndex was already classified`,
|
|
10374
|
+
["endorsements", index, "credentialIndex"]
|
|
10375
|
+
);
|
|
10376
|
+
}
|
|
10377
|
+
if (!selected.has(targetIndex)) {
|
|
10378
|
+
return classificationFailure(
|
|
10379
|
+
"ENDORSEMENT_TARGET_NOT_SELECTED",
|
|
10380
|
+
`endorsements[${index}].targetCredentialIndex must reference a selected credential`,
|
|
10381
|
+
["endorsements", index, "targetCredentialIndex"]
|
|
10382
|
+
);
|
|
10383
|
+
}
|
|
10384
|
+
const referenced = readSignedClaimId(members[credentialIndex]);
|
|
10385
|
+
const target = members[targetIndex];
|
|
10386
|
+
const targetId = target !== null && typeof target === "object" ? target.id : void 0;
|
|
10387
|
+
if (typeof referenced !== "string" || typeof targetId !== "string" || referenced !== targetId) {
|
|
10388
|
+
return classificationFailure(
|
|
10389
|
+
"ENDORSEMENT_TARGET_UNBOUND",
|
|
10390
|
+
`endorsements[${index}] claim does not reference the target credential id`,
|
|
10391
|
+
["endorsements", index]
|
|
10392
|
+
);
|
|
10393
|
+
}
|
|
10394
|
+
classified.add(credentialIndex);
|
|
10395
|
+
endorsementIndices.push(credentialIndex);
|
|
10396
|
+
}
|
|
10397
|
+
if (classified.size !== members.length) {
|
|
10398
|
+
return classificationFailure(
|
|
10399
|
+
"UNCLASSIFIED_VP_MEMBER",
|
|
10400
|
+
"every presentation member must be classified exactly once",
|
|
10401
|
+
["presentation", "verifiableCredential"]
|
|
10402
|
+
);
|
|
10403
|
+
}
|
|
10404
|
+
return {
|
|
10405
|
+
ok: true,
|
|
10406
|
+
classification: { selectedIndices, endorsementIndices, memberCount: members.length }
|
|
10407
|
+
};
|
|
10408
|
+
}, "classifyShareManifest");
|
|
10409
|
+
SharePayloadValidatorShape.superRefine((payload, ctx) => {
|
|
10410
|
+
const result = classifyShareManifest(payload);
|
|
10411
|
+
if (!result.ok) {
|
|
10412
|
+
ctx.addIssue({
|
|
10413
|
+
code: "custom",
|
|
10414
|
+
message: result.message,
|
|
10415
|
+
path: result.path,
|
|
10416
|
+
params: { shareLinkCode: result.code }
|
|
10417
|
+
});
|
|
10418
|
+
}
|
|
10419
|
+
});
|
|
10420
|
+
var ShareRecoverySelectionValidator = object({
|
|
10421
|
+
ref: string().min(1).max(MAX_SHARE_SOURCE_URI_CHARS),
|
|
10422
|
+
order: number().int().min(0).max(MAX_SELECTED_CREDENTIALS - 1)
|
|
10423
|
+
}).strict();
|
|
10424
|
+
var ShareRecoveryEndorsementValidator = object({ targetRef: string().min(1).max(MAX_SHARE_SOURCE_URI_CHARS) }).strict();
|
|
10425
|
+
object({
|
|
10426
|
+
protocol: literal(SHARE_RECOVERY_PROTOCOL),
|
|
10427
|
+
shareId: ShareLinkIdValidator,
|
|
10428
|
+
ownerProfileId: string().min(1).max(128),
|
|
10429
|
+
createdAt: datetime(),
|
|
10430
|
+
latest: object({ contentVersion: safeVersion, key: ShareContentKeyValidator }).strict(),
|
|
10431
|
+
selection: ShareRecoverySelectionValidator.array().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
10432
|
+
endorsements: ShareRecoveryEndorsementValidator.array().max(MAX_ENDORSEMENTS).default([])
|
|
10433
|
+
}).strict().superRefine((recovery, ctx) => {
|
|
10434
|
+
const orders = /* @__PURE__ */ new Set();
|
|
10435
|
+
recovery.selection.forEach((entry, index) => {
|
|
10436
|
+
if (entry.order >= recovery.selection.length) {
|
|
10437
|
+
ctx.addIssue({
|
|
10438
|
+
code: "custom",
|
|
10439
|
+
message: "order must be within the selection bounds",
|
|
10440
|
+
path: ["selection", index, "order"]
|
|
10441
|
+
});
|
|
10442
|
+
}
|
|
10443
|
+
if (orders.has(entry.order)) {
|
|
10444
|
+
ctx.addIssue({
|
|
10445
|
+
code: "custom",
|
|
10446
|
+
message: "order must be unique within the selection",
|
|
10447
|
+
path: ["selection", index, "order"]
|
|
10448
|
+
});
|
|
10449
|
+
}
|
|
10450
|
+
orders.add(entry.order);
|
|
10451
|
+
});
|
|
10452
|
+
});
|
|
10453
|
+
var ShareOwnerRecoveryValidator = JWEValidator.refine(
|
|
10454
|
+
(value) => utf8ByteLength(JSON.stringify(value)) <= MAX_SHARE_RECOVERY_JWE_BYTES,
|
|
10455
|
+
{ message: `serialized recovery JWE must be at most ${MAX_SHARE_RECOVERY_JWE_BYTES} bytes` }
|
|
10456
|
+
);
|
|
10457
|
+
var ShareLinkStatusValidator = _enum(["pending", "active", "stopped"]);
|
|
10458
|
+
var ShareContentStateValidator = _enum(["staging", "finalized", "content_missing"]);
|
|
10459
|
+
var ShareLinkValidator = object({
|
|
10460
|
+
id: ShareLinkIdValidator,
|
|
10461
|
+
title: string().min(1).max(120),
|
|
10462
|
+
note: string().max(500).optional(),
|
|
10463
|
+
selectedCount: number().int().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
10464
|
+
version: safeVersion,
|
|
10465
|
+
contentVersion: safeVersion,
|
|
10466
|
+
status: ShareLinkStatusValidator,
|
|
10467
|
+
attachmentId: string().uuid().nullable().optional(),
|
|
10468
|
+
attachmentChunkCount: number().int().min(1).max(16).nullable().optional(),
|
|
10469
|
+
contentState: ShareContentStateValidator,
|
|
10470
|
+
createdAt: datetime(),
|
|
10471
|
+
updatedAt: datetime(),
|
|
10472
|
+
expiresAt: datetime().nullable(),
|
|
10473
|
+
stoppedAt: datetime().nullable(),
|
|
10474
|
+
lastViewedAt: datetime().nullable(),
|
|
10475
|
+
viewCount: number().int().min(0).optional(),
|
|
10476
|
+
passcodeProtected: boolean(),
|
|
10477
|
+
notifyOnView: boolean(),
|
|
10478
|
+
minorPolicy: object({
|
|
10479
|
+
isMinor: boolean().nullable(),
|
|
10480
|
+
policyResolved: boolean(),
|
|
10481
|
+
defaultExpiryDays: union([literal(30), literal(365)]),
|
|
10482
|
+
viewCountingEnabled: boolean()
|
|
10483
|
+
}),
|
|
10484
|
+
/**
|
|
10485
|
+
* Guarded application/API URL for the content. Optional because owner APIs in
|
|
10486
|
+
* D1 have no public resolve/content endpoint yet; it must never be a
|
|
10487
|
+
* LearnCloud object URL or carry a fabricated decryption key.
|
|
10488
|
+
*/
|
|
10489
|
+
contentUrl: string().optional()
|
|
10490
|
+
});
|
|
10491
|
+
var clientRequestId = string().uuid();
|
|
10492
|
+
var ShareLinkAttachmentValidator = object({
|
|
10493
|
+
id: string().uuid(),
|
|
10494
|
+
chunkCount: number().int().min(1).max(16)
|
|
10495
|
+
}).strict();
|
|
10496
|
+
var attachmentChunkKey = {
|
|
10497
|
+
id: ShareLinkIdValidator,
|
|
10498
|
+
contentVersion: safeVersion,
|
|
10499
|
+
attachmentId: string().uuid(),
|
|
10500
|
+
chunkIndex: number().int().min(0).max(15)
|
|
10501
|
+
};
|
|
10502
|
+
var ShareLinkAttachmentChunkEnvelopeValidator = ShareEnvelopeValidator.refine(
|
|
10503
|
+
(value) => {
|
|
10504
|
+
var _a2;
|
|
10505
|
+
return ((_a2 = decodedBase64UrlByteLength(value.ct)) != null ? _a2 : Infinity) <= 256 * 1024 + SHARE_TAG_BYTES;
|
|
10506
|
+
}
|
|
10507
|
+
);
|
|
10508
|
+
object(__spreadProps(__spreadValues({}, attachmentChunkKey), {
|
|
10509
|
+
chunkCount: number().int().min(1).max(16),
|
|
10510
|
+
envelope: ShareLinkAttachmentChunkEnvelopeValidator,
|
|
10511
|
+
ownerEncryptedRecovery: ShareOwnerRecoveryValidator
|
|
10512
|
+
})).strict().refine((value) => value.chunkIndex < value.chunkCount);
|
|
10513
|
+
object(__spreadProps(__spreadValues({}, attachmentChunkKey), {
|
|
10514
|
+
passcode: string().min(4).max(64).optional(),
|
|
10515
|
+
accessToken: string().min(1).max(2048).optional()
|
|
10516
|
+
})).strict();
|
|
10517
|
+
object(__spreadProps(__spreadValues({}, attachmentChunkKey), {
|
|
10518
|
+
envelope: ShareLinkAttachmentChunkEnvelopeValidator,
|
|
10519
|
+
accessToken: string().min(1).max(2048).optional()
|
|
10520
|
+
})).strict();
|
|
10521
|
+
object({
|
|
10522
|
+
id: ShareLinkIdValidator,
|
|
10523
|
+
contentVersion: safeVersion,
|
|
10524
|
+
attachmentId: string().uuid(),
|
|
10525
|
+
chunkCount: number().int().min(1).max(16)
|
|
10526
|
+
}).strict();
|
|
10527
|
+
object({ ok: literal(true) }).strict();
|
|
10528
|
+
object({ ok: boolean() }).strict();
|
|
10529
|
+
object({
|
|
10530
|
+
id: ShareLinkIdValidator,
|
|
10531
|
+
clientRequestId,
|
|
10532
|
+
title: string().min(1).max(120),
|
|
10533
|
+
note: string().max(500).optional(),
|
|
10534
|
+
expiresAt: datetime().nullable().optional(),
|
|
10535
|
+
passcode: string().min(8).max(64).optional(),
|
|
10536
|
+
notifyOnView: boolean().default(false),
|
|
10537
|
+
selectedCount: number().int().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
10538
|
+
contentVersion: literal(1),
|
|
10539
|
+
envelope: ShareEnvelopeValidator,
|
|
10540
|
+
ownerEncryptedRecovery: ShareOwnerRecoveryValidator,
|
|
10541
|
+
attachment: ShareLinkAttachmentValidator.optional()
|
|
10542
|
+
}).strict();
|
|
10543
|
+
object({
|
|
10544
|
+
id: ShareLinkIdValidator,
|
|
10545
|
+
expectedVersion: safeVersion,
|
|
10546
|
+
clientRequestId,
|
|
10547
|
+
title: string().min(1).max(120).optional(),
|
|
10548
|
+
note: string().max(500).nullable().optional(),
|
|
10549
|
+
expiresAt: datetime().nullable().optional(),
|
|
10550
|
+
/** Omitted preserves the current passcode, null removes it, and a string replaces it. */
|
|
10551
|
+
passcode: string().min(8).max(64).nullable().optional(),
|
|
10552
|
+
notifyOnView: boolean().optional(),
|
|
10553
|
+
contentVersion: safeVersion.optional(),
|
|
10554
|
+
selectedCount: number().int().min(1).max(MAX_SELECTED_CREDENTIALS).optional(),
|
|
10555
|
+
envelope: ShareEnvelopeValidator.optional(),
|
|
10556
|
+
ownerEncryptedRecovery: ShareOwnerRecoveryValidator.optional(),
|
|
10557
|
+
attachment: ShareLinkAttachmentValidator.optional()
|
|
10558
|
+
}).strict().superRefine((value, ctx) => {
|
|
10559
|
+
const provided = [
|
|
10560
|
+
value.contentVersion,
|
|
10561
|
+
value.selectedCount,
|
|
10562
|
+
value.envelope,
|
|
10563
|
+
value.ownerEncryptedRecovery
|
|
10564
|
+
].filter((field) => field !== void 0).length;
|
|
10565
|
+
if (provided !== 0 && provided !== 4) {
|
|
10566
|
+
ctx.addIssue({
|
|
10567
|
+
code: "custom",
|
|
10568
|
+
message: "content replacement requires contentVersion, selectedCount, envelope and ownerEncryptedRecovery together"
|
|
10569
|
+
});
|
|
10570
|
+
}
|
|
10571
|
+
if (value.attachment !== void 0 && provided !== 4) {
|
|
10572
|
+
ctx.addIssue({ code: "custom", message: "attachment requires a content replacement" });
|
|
10573
|
+
}
|
|
10574
|
+
});
|
|
10575
|
+
object({ id: ShareLinkIdValidator }).strict();
|
|
10576
|
+
object({ id: ShareLinkIdValidator, operationId: string().uuid() }).strict();
|
|
10577
|
+
discriminatedUnion("status", [
|
|
10578
|
+
object({ status: literal("completed"), share: ShareLinkValidator }).strict(),
|
|
10579
|
+
object({
|
|
10580
|
+
status: literal("pending"),
|
|
10581
|
+
id: ShareLinkIdValidator,
|
|
10582
|
+
operationId: string().uuid()
|
|
10583
|
+
}).strict()
|
|
10584
|
+
]);
|
|
10585
|
+
discriminatedUnion("status", [
|
|
10586
|
+
object({ status: literal("found"), share: ShareLinkValidator }).strict(),
|
|
10587
|
+
object({
|
|
10588
|
+
status: literal("pending"),
|
|
10589
|
+
id: ShareLinkIdValidator,
|
|
10590
|
+
operationId: string().uuid()
|
|
10591
|
+
}).strict(),
|
|
10592
|
+
object({ status: literal("not_found"), id: ShareLinkIdValidator }).strict()
|
|
10593
|
+
]);
|
|
10594
|
+
object({ recovery: ShareOwnerRecoveryValidator }).strict();
|
|
10595
|
+
object({
|
|
10596
|
+
id: ShareLinkIdValidator,
|
|
10597
|
+
contentVersion: safeVersion,
|
|
10598
|
+
envelope: ShareEnvelopeValidator
|
|
10599
|
+
}).strict();
|
|
10600
|
+
object({
|
|
10601
|
+
id: ShareLinkIdValidator,
|
|
10602
|
+
/** Sent only in a POST body; it must never be placed in a share URL. */
|
|
10603
|
+
passcode: string().min(4).max(64).optional()
|
|
10604
|
+
}).strict();
|
|
10605
|
+
discriminatedUnion("state", [
|
|
10606
|
+
object({
|
|
10607
|
+
state: literal("passcode_required"),
|
|
10608
|
+
id: ShareLinkIdValidator
|
|
10609
|
+
}).strict(),
|
|
10610
|
+
object({ state: literal("try_later"), id: ShareLinkIdValidator }).strict(),
|
|
10611
|
+
object({
|
|
10612
|
+
state: literal("active"),
|
|
10613
|
+
id: ShareLinkIdValidator,
|
|
10614
|
+
title: string().max(120),
|
|
10615
|
+
note: string().max(500).optional(),
|
|
10616
|
+
selectedCount: number().int().min(1).max(MAX_SELECTED_CREDENTIALS),
|
|
10617
|
+
contentVersion: safeVersion,
|
|
10618
|
+
contentUrl: string(),
|
|
10619
|
+
sharer: object({
|
|
10620
|
+
displayName: string().max(120),
|
|
10621
|
+
avatar: string().max(2048).optional()
|
|
10622
|
+
}),
|
|
10623
|
+
createdAt: datetime(),
|
|
10624
|
+
updatedAt: datetime(),
|
|
10625
|
+
expiresAt: datetime().nullable()
|
|
10626
|
+
}).strict(),
|
|
10627
|
+
object({
|
|
10628
|
+
state: literal("expired"),
|
|
10629
|
+
id: ShareLinkIdValidator,
|
|
10630
|
+
expiresAt: datetime()
|
|
10631
|
+
}).strict(),
|
|
10632
|
+
object({
|
|
10633
|
+
state: literal("stopped"),
|
|
10634
|
+
id: ShareLinkIdValidator,
|
|
10635
|
+
stoppedAt: datetime()
|
|
10636
|
+
}).strict(),
|
|
10637
|
+
object({ state: literal("not_found"), id: ShareLinkIdValidator }).strict()
|
|
10638
|
+
]);
|
|
10639
|
+
object({
|
|
10640
|
+
limit: number().int().min(1).max(50).default(25),
|
|
10641
|
+
cursor: string().max(512).optional()
|
|
10642
|
+
}).strict();
|
|
10643
|
+
PaginationResponseValidator.extend({
|
|
10644
|
+
records: ShareLinkValidator.array()
|
|
10645
|
+
});
|
|
10646
|
+
object({
|
|
10647
|
+
receipt: string().min(22).max(128).regex(/^[A-Za-z0-9_-]+$/)
|
|
10648
|
+
}).strict();
|
|
10649
|
+
object({ ok: literal(true) }).strict();
|
|
10650
|
+
object({
|
|
10651
|
+
id: ShareLinkIdValidator,
|
|
10652
|
+
contentVersion: safeVersion,
|
|
10653
|
+
envelope: ShareEnvelopeValidator,
|
|
10654
|
+
contentUrl: string(),
|
|
10655
|
+
receipt: string().min(22).max(128).regex(/^[A-Za-z0-9_-]+$/)
|
|
10656
|
+
}).strict();
|
|
9897
10657
|
|
|
9898
10658
|
exports.VerificationStatusEnum = VerificationStatusEnum;
|
|
9899
|
-
//# sourceMappingURL=types.esm-
|
|
10659
|
+
//# sourceMappingURL=types.esm-6ef18f40.js.map
|