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