@learncard/types 5.1.0 → 5.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/crypto.d.ts +322 -1
- package/dist/index.d.ts +1 -0
- package/dist/lcn.d.ts +61 -0
- package/dist/learncard.d.ts +6 -10
- package/dist/obv3.d.ts +1382 -1545
- package/dist/types.cjs.development.js +60 -8
- package/dist/types.cjs.development.js.map +4 -4
- package/dist/types.cjs.production.min.js +1 -1
- package/dist/types.cjs.production.min.js.map +4 -4
- package/dist/types.esm.js +60 -8
- package/dist/types.esm.js.map +4 -4
- package/dist/vc.d.ts +68 -74
- package/package.json +4 -10
package/dist/types.esm.js.map
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"version": 3,
|
3
|
-
"sources": ["../src/vc.ts", "../src/obv3.ts", "../src/learncard.ts", "../src/crypto.ts"],
|
4
|
-
"sourcesContent": ["import { z } from 'zod';\n\nexport const ContextValidator = z.string().array();\nexport type Context = z.infer<typeof ContextValidator>;\n\nexport const AchievementCriteriaValidator = z.object({\n type: z.string().optional(),\n narrative: z.string().optional(),\n});\nexport type AchievementCriteria = z.infer<typeof AchievementCriteriaValidator>;\n\nexport const ImageValidator = z.string().or(\n z.object({\n id: z.string(),\n type: z.string(),\n caption: z.string().optional(),\n })\n);\nexport type Image = z.infer<typeof ImageValidator>;\n\nexport const GeoCoordinatesValidator = z.object({\n type: z.string().min(1).or(z.string().array().nonempty()),\n latitude: z.number(),\n longitude: z.number(),\n});\nexport type GeoCoordinates = z.infer<typeof GeoCoordinatesValidator>;\n\nexport const AddressValidator = z.object({\n type: z.string().min(1).or(z.string().array().nonempty()),\n addressCountry: z.string().optional(),\n addressCountryCode: z.string().optional(),\n addressRegion: z.string().optional(),\n addressLocality: z.string().optional(),\n streetAddress: z.string().optional(),\n postOfficeBoxNumber: z.string().optional(),\n postalCode: z.string().optional(),\n geo: GeoCoordinatesValidator.optional(),\n});\nexport type Address = z.infer<typeof AddressValidator>;\n\nexport const IdentifierTypeValidator = z\n .enum([\n 'sourcedId',\n 'systemId',\n 'productId',\n 'userName',\n 'accountId',\n 'emailAddress',\n 'nationalIdentityNumber',\n 'isbn',\n 'issn',\n 'lisSourcedId',\n 'oneRosterSourcedId',\n 'sisSourcedId',\n 'ltiContextId',\n 'ltiDeploymentId',\n 'ltiToolId',\n 'ltiPlatformId',\n 'ltiUserId',\n 'identifier',\n ])\n .or(z.string());\nexport type IdentifierType = z.infer<typeof IdentifierTypeValidator>;\n\nexport const IdentifierEntryValidator = z.object({\n type: z.string().min(1).or(z.string().array().nonempty()),\n identifier: z.string(),\n identifierType: IdentifierTypeValidator,\n});\nexport type IdentifierEntry = z.infer<typeof IdentifierEntryValidator>;\n\nexport const ProfileValidator = z.string().or(\n z\n .object({\n id: z.string().optional(),\n type: z.string().or(z.string().array().nonempty().optional()),\n name: z.string().optional(),\n url: z.string().optional(),\n phone: z.string().optional(),\n description: z.string().optional(),\n endorsement: z.any().array().optional(), // Recursive type\n image: ImageValidator.optional(),\n email: z.string().email().optional(),\n address: AddressValidator.optional(),\n otherIdentifier: IdentifierEntryValidator.array().optional(),\n official: z.string().optional(),\n parentOrg: z.any().optional(), // Recursive types are annoying =(\n familyName: z.string().optional(),\n givenName: z.string().optional(),\n additionalName: z.string().optional(),\n patronymicName: z.string().optional(),\n honorificPrefix: z.string().optional(),\n honorificSuffix: z.string().optional(),\n familyNamePrefix: z.string().optional(),\n dateOfBirth: z.string().optional(),\n })\n .catchall(z.any())\n);\nexport type Profile = z.infer<typeof ProfileValidator>;\n\nexport const CredentialSubjectValidator = z.object({ id: z.string().optional() }).catchall(z.any());\nexport type CredentialSubject = z.infer<typeof CredentialSubjectValidator>;\n\nexport const CredentialStatusValidator = z.object({ type: z.string(), id: z.string() });\nexport type CredentialStatus = z.infer<typeof CredentialStatusValidator>;\n\nexport const CredentialSchemaValidator = z.object({ id: z.string(), type: z.string() });\nexport type CredentialSchema = z.infer<typeof CredentialSchemaValidator>;\n\nexport const RefreshServiceValidator = z\n .object({ id: z.string(), type: z.string() })\n .catchall(z.any());\nexport type RefreshService = z.infer<typeof RefreshServiceValidator>;\n\nexport const UnsignedVCValidator = z\n .object({\n '@context': ContextValidator,\n id: z.string().optional(),\n type: z.string().array().nonempty(),\n issuer: ProfileValidator,\n issuanceDate: z.string(),\n expirationDate: z.string().optional(),\n credentialSubject: CredentialSubjectValidator.or(CredentialSubjectValidator.array()),\n credentialStatus: CredentialStatusValidator.optional(),\n credentialSchema: CredentialSchemaValidator.array().optional(),\n refreshService: RefreshServiceValidator.optional(),\n })\n .catchall(z.any());\nexport type UnsignedVC = z.infer<typeof UnsignedVCValidator>;\n\nexport const ProofValidator = z\n .object({\n type: z.string(),\n created: z.string(),\n challenge: z.string().optional(),\n domain: z.string().optional(),\n nonce: z.string().optional(),\n proofPurpose: z.string(),\n verificationMethod: z.string(),\n jws: z.string().optional(),\n })\n .catchall(z.any());\nexport type Proof = z.infer<typeof ProofValidator>;\n\nexport const VCValidator = UnsignedVCValidator.extend({\n proof: ProofValidator.or(ProofValidator.array()),\n});\nexport type VC = z.infer<typeof VCValidator>;\n\nexport const UnsignedVPValidator = z\n .object({\n '@context': ContextValidator,\n id: z.string().optional(),\n type: z.string().array().nonempty(),\n verifiableCredential: VCValidator.or(VCValidator.array()).optional(),\n holder: z.string().optional(),\n })\n .catchall(z.any());\nexport type UnsignedVP = z.infer<typeof UnsignedVPValidator>;\n\nexport const VPValidator = UnsignedVPValidator.extend({\n proof: ProofValidator.or(ProofValidator.array()),\n});\nexport type VP = z.infer<typeof VPValidator>;\n", "import { z } from 'zod';\nimport {\n UnsignedVCValidator,\n ProofValidator,\n ProfileValidator,\n ImageValidator,\n IdentifierEntryValidator,\n} from './vc';\n\nexport const AlignmentTargetTypeValidator = z\n .enum([\n 'ceasn:Competency',\n 'ceterms:Credential',\n 'CFItem',\n 'CFRubric',\n 'CFRubricCriterion',\n 'CFRubricCriterionLevel',\n 'CTDL',\n ])\n .or(z.string());\nexport type AlignmentTargetType = z.infer<typeof AlignmentTargetTypeValidator>;\n\nexport const AlignmentValidator = z.object({\n type: z.string().array().nonempty(),\n targetCode: z.string().optional(),\n targetDescription: z.string().optional(),\n targetName: z.string(),\n targetFramework: z.string().optional(),\n targetType: AlignmentTargetTypeValidator.optional(),\n targetUrl: z.string(),\n});\nexport type Alignment = z.infer<typeof AlignmentValidator>;\n\nexport const KnownAchievementTypeValidator = z.enum([\n 'Achievement',\n 'ApprenticeshipCertificate',\n 'Assessment',\n 'Assignment',\n 'AssociateDegree',\n 'Award',\n 'Badge',\n 'BachelorDegree',\n 'Certificate',\n 'CertificateOfCompletion',\n 'Certification',\n 'CommunityService',\n 'Competency',\n 'Course',\n 'CoCurricular',\n 'Degree',\n 'Diploma',\n 'DoctoralDegree',\n 'Fieldwork',\n 'GeneralEducationDevelopment',\n 'JourneymanCertificate',\n 'LearningProgram',\n 'License',\n 'Membership',\n 'ProfessionalDoctorate',\n 'QualityAssuranceCredential',\n 'MasterCertificate',\n 'MasterDegree',\n 'MicroCredential',\n 'ResearchDoctorate',\n 'SecondarySchoolDiploma',\n]);\nexport type KnownAchievementType = z.infer<typeof KnownAchievementTypeValidator>;\n\nexport const AchievementTypeValidator = KnownAchievementTypeValidator.or(z.string());\nexport type AchievementType = z.infer<typeof AchievementTypeValidator>;\n\nexport const CriteriaValidator = z\n .object({ id: z.string().optional(), narrative: z.string().optional() })\n .catchall(z.any());\nexport type Criteria = z.infer<typeof CriteriaValidator>;\n\nexport const EndorsementSubjectValidator = z.object({\n id: z.string(),\n type: z.string().array().nonempty(),\n endorsementComment: z.string().optional(),\n});\nexport type EndorsementSubject = z.infer<typeof EndorsementSubjectValidator>;\n\nexport const EndorsementCredentialValidator = UnsignedVCValidator.extend({\n credentialSubject: EndorsementSubjectValidator,\n proof: ProofValidator.or(ProofValidator.array()).optional(),\n});\nexport type EndorsementCredential = z.infer<typeof EndorsementCredentialValidator>;\n\nexport const RelatedValidator = z.object({\n id: z.string(),\n '@language': z.string().optional(),\n version: z.string().optional(),\n});\nexport type Related = z.infer<typeof RelatedValidator>;\n\nexport const ResultTypeValidator = z\n .enum([\n 'GradePointAverage',\n 'LetterGrade',\n 'Percent',\n 'PerformanceLevel',\n 'PredictedScore',\n 'RawScore',\n 'Result',\n 'RubricCriterion',\n 'RubricCriterionLevel',\n 'RubricScore',\n 'ScaledScore',\n 'Status',\n ])\n .or(z.string());\nexport type ResultType = z.infer<typeof ResultTypeValidator>;\n\nexport const RubricCriterionValidator = z\n .object({\n id: z.string(),\n type: z.string().array().nonempty(),\n alignment: AlignmentValidator.array().optional(),\n description: z.string().optional(),\n level: z.string().optional(),\n name: z.string(),\n points: z.string().optional(),\n })\n .catchall(z.any());\nexport type RubricCriterion = z.infer<typeof RubricCriterionValidator>;\n\nexport const ResultDescriptionValidator = z\n .object({\n id: z.string(),\n type: z.string().array().nonempty(),\n alignment: AlignmentValidator.array().optional(),\n allowedValue: z.string().array().optional(),\n name: z.string(),\n requiredLevel: z.string().optional(),\n requiredValue: z.string().optional(),\n resultType: ResultTypeValidator,\n rubricCriterionLevel: RubricCriterionValidator.array().optional(),\n valueMax: z.string().optional(),\n valueMin: z.string().optional(),\n })\n .catchall(z.any());\nexport type ResultDescription = z.infer<typeof ResultDescriptionValidator>;\n\nexport const AchievementValidator = z\n .object({\n id: z.string().optional(),\n type: z.string().array().nonempty(),\n alignment: AlignmentValidator.array().optional(),\n achievementType: AchievementTypeValidator.optional(),\n creator: ProfileValidator.optional(),\n creditsAvailable: z.number().optional(),\n criteria: CriteriaValidator,\n description: z.string(),\n endorsement: EndorsementCredentialValidator.array().optional(),\n fieldOfStudy: z.string().optional(),\n humanCode: z.string().optional(),\n image: ImageValidator.optional(),\n '@language': z.string().optional(),\n name: z.string(),\n otherIdentifier: IdentifierEntryValidator.array().optional(),\n related: RelatedValidator.array().optional(),\n resultDescription: ResultDescriptionValidator.array().optional(),\n specialization: z.string().optional(),\n tag: z.string().array().optional(),\n version: z.string().optional(),\n })\n .catchall(z.any());\nexport type Achievement = z.infer<typeof AchievementValidator>;\n\nexport const IdentityObjectValidator = z.object({\n type: z.string(),\n hashed: z.boolean(),\n identityHash: z.string(),\n identityType: z.string(),\n salt: z.string().optional(),\n});\nexport type IdentityObject = z.infer<typeof IdentityObjectValidator>;\n\nexport const ResultStatusTypeValidator = z.enum([\n 'Completed',\n 'Enrolled',\n 'Failed',\n 'InProgress',\n 'OnHold',\n 'Withdrew',\n]);\nexport type ResultStatusType = z.infer<typeof ResultStatusTypeValidator>;\n\nexport const ResultValidator = z\n .object({\n type: z.string().array().nonempty(),\n achievedLevel: z.string().optional(),\n alignment: AlignmentValidator.array().optional(),\n resultDescription: z.string().optional(),\n status: ResultStatusTypeValidator.optional(),\n value: z.string().optional(),\n })\n .catchall(z.any());\nexport type Result = z.infer<typeof ResultValidator>;\n\nexport const AchievementSubjectValidator = z\n .object({\n id: z.string().optional(),\n type: z.string().array().nonempty(),\n activityEndDate: z.string().optional(),\n activityStartDate: z.string().optional(),\n creditsEarned: z.number().optional(),\n achievement: AchievementValidator.optional(),\n identifier: IdentityObjectValidator.array().optional(),\n image: ImageValidator.optional(),\n licenseNumber: z.string().optional(),\n narrative: z.string().optional(),\n result: ResultValidator.array().optional(),\n role: z.string().optional(),\n source: ProfileValidator.optional(),\n term: z.string().optional(),\n })\n .catchall(z.any());\nexport type AchievementSubject = z.infer<typeof AchievementSubjectValidator>;\n\nexport const EvidenceValidator = z\n .object({\n id: z.string().optional(),\n type: z.string().array().nonempty(),\n narrative: z.string().optional(),\n name: z.string().optional(),\n description: z.string().optional(),\n genre: z.string().optional(),\n audience: z.string().optional(),\n })\n .catchall(z.any());\nexport type Evidence = z.infer<typeof EvidenceValidator>;\n\nexport const UnsignedAchievementCredentialValidator = UnsignedVCValidator.extend({\n name: z.string().optional(),\n description: z.string().optional(),\n image: ImageValidator.optional(),\n credentialSubject: AchievementSubjectValidator.or(AchievementSubjectValidator.array()),\n endorsement: UnsignedVCValidator.array().optional(),\n evidence: EvidenceValidator.array().optional(),\n});\nexport type UnsignedAchievementCredential = z.infer<typeof UnsignedAchievementCredentialValidator>;\n\nexport const AchievementCredentialValidator = UnsignedAchievementCredentialValidator.extend({\n proof: ProofValidator.or(ProofValidator.array()),\n});\nexport type AchievementCredential = z.infer<typeof AchievementCredentialValidator>;\n", "import { z } from 'zod';\nimport { CredentialSubjectValidator, ProfileValidator } from './vc';\n\nexport const VerificationCheckValidator = z.object({\n checks: z.string().array(),\n warnings: z.string().array(),\n errors: z.string().array(),\n});\nexport type VerificationCheck = z.infer<typeof VerificationCheckValidator>;\n\nexport const VerificationStatusValidator = z.enum(['Success', 'Failed', 'Error']);\nexport type VerificationStatus = z.infer<typeof VerificationStatusValidator>;\nexport const VerificationStatusEnum = VerificationStatusValidator.enum;\n\nexport const VerificationItemValidator = z.object({\n check: z.string(),\n status: VerificationStatusValidator,\n message: z.string().optional(),\n details: z.string().optional(),\n});\nexport type VerificationItem = z.infer<typeof VerificationItemValidator>;\n\nexport const CredentialInfoValidator = z.object({\n title: z.string().optional(),\n createdAt: z.string().optional(),\n issuer: ProfileValidator.optional(),\n issuee: ProfileValidator.optional(),\n credentialSubject: CredentialSubjectValidator.optional(),\n});\nexport type CredentialInfo = z.infer<typeof CredentialInfoValidator>;\n\nexport type CredentialRecord<Metadata extends Record<string, any> = Record<never, never>> = {\n id: string;\n uri: string;\n [key: string]: any;\n} & Metadata;\n\nexport const CredentialRecordValidator: z.ZodType<CredentialRecord> = z\n .object({ id: z.string(), uri: z.string() })\n .catchall(z.any());\n", "import { z } from 'zod';\n\nexport const JWKValidator = z.object({\n kty: z.string(),\n crv: z.string(),\n x: z.string(),\n y: z.string().optional(),\n d: z.string(),\n});\nexport type JWK = z.infer<typeof JWKValidator>;\n"],
|
5
|
-
"mappings": ";AAAA,SAAS,SAAS;AAEX,IAAM,mBAAmB,EAAE,OAAO,EAAE,MAAM;AAG1C,IAAM,+BAA+B,EAAE,OAAO;AAAA,EACjD,MAAM,EAAE,OAAO,EAAE,SAAS;AAAA,EAC1B,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ts", "../src/learncard.ts", "../src/lcn.ts", "../src/crypto.ts"],
|
4
|
+
"sourcesContent": ["import { z } from 'zod';\n\nexport const ContextValidator = z.array(z.string().or(z.record(z.any())));\nexport type Context = z.infer<typeof ContextValidator>;\n\nexport const AchievementCriteriaValidator = z.object({\n type: z.string().optional(),\n narrative: z.string().optional(),\n});\nexport type AchievementCriteria = z.infer<typeof AchievementCriteriaValidator>;\n\nexport const ImageValidator = z.string().or(\n z.object({\n id: z.string(),\n type: z.string(),\n caption: z.string().optional(),\n })\n);\nexport type Image = z.infer<typeof ImageValidator>;\n\nexport const GeoCoordinatesValidator = z.object({\n type: z.string().min(1).or(z.string().array().nonempty()),\n latitude: z.number(),\n longitude: z.number(),\n});\nexport type GeoCoordinates = z.infer<typeof GeoCoordinatesValidator>;\n\nexport const AddressValidator = z.object({\n type: z.string().min(1).or(z.string().array().nonempty()),\n addressCountry: z.string().optional(),\n addressCountryCode: z.string().optional(),\n addressRegion: z.string().optional(),\n addressLocality: z.string().optional(),\n streetAddress: z.string().optional(),\n postOfficeBoxNumber: z.string().optional(),\n postalCode: z.string().optional(),\n geo: GeoCoordinatesValidator.optional(),\n});\nexport type Address = z.infer<typeof AddressValidator>;\n\nexport const IdentifierTypeValidator = z\n .enum([\n 'sourcedId',\n 'systemId',\n 'productId',\n 'userName',\n 'accountId',\n 'emailAddress',\n 'nationalIdentityNumber',\n 'isbn',\n 'issn',\n 'lisSourcedId',\n 'oneRosterSourcedId',\n 'sisSourcedId',\n 'ltiContextId',\n 'ltiDeploymentId',\n 'ltiToolId',\n 'ltiPlatformId',\n 'ltiUserId',\n 'identifier',\n ])\n .or(z.string());\nexport type IdentifierType = z.infer<typeof IdentifierTypeValidator>;\n\nexport const IdentifierEntryValidator = z.object({\n type: z.string().min(1).or(z.string().array().nonempty()),\n identifier: z.string(),\n identifierType: IdentifierTypeValidator,\n});\nexport type IdentifierEntry = z.infer<typeof IdentifierEntryValidator>;\n\nexport const ProfileValidator = z.string().or(\n z\n .object({\n id: z.string().optional(),\n type: z.string().or(z.string().array().nonempty().optional()),\n name: z.string().optional(),\n url: z.string().optional(),\n phone: z.string().optional(),\n description: z.string().optional(),\n endorsement: z.any().array().optional(), // Recursive type\n image: ImageValidator.optional(),\n email: z.string().email().optional(),\n address: AddressValidator.optional(),\n otherIdentifier: IdentifierEntryValidator.array().optional(),\n official: z.string().optional(),\n parentOrg: z.any().optional(), // Recursive types are annoying =(\n familyName: z.string().optional(),\n givenName: z.string().optional(),\n additionalName: z.string().optional(),\n patronymicName: z.string().optional(),\n honorificPrefix: z.string().optional(),\n honorificSuffix: z.string().optional(),\n familyNamePrefix: z.string().optional(),\n dateOfBirth: z.string().optional(),\n })\n .catchall(z.any())\n);\nexport type Profile = z.infer<typeof ProfileValidator>;\n\nexport const CredentialSubjectValidator = z.object({ id: z.string().optional() }).catchall(z.any());\nexport type CredentialSubject = z.infer<typeof CredentialSubjectValidator>;\n\nexport const CredentialStatusValidator = z.object({ type: z.string(), id: z.string() });\nexport type CredentialStatus = z.infer<typeof CredentialStatusValidator>;\n\nexport const CredentialSchemaValidator = z.object({ id: z.string(), type: z.string() });\nexport type CredentialSchema = z.infer<typeof CredentialSchemaValidator>;\n\nexport const RefreshServiceValidator = z\n .object({ id: z.string(), type: z.string() })\n .catchall(z.any());\nexport type RefreshService = z.infer<typeof RefreshServiceValidator>;\n\nexport const UnsignedVCValidator = z\n .object({\n '@context': ContextValidator,\n id: z.string().optional(),\n type: z.string().array().nonempty(),\n issuer: ProfileValidator,\n issuanceDate: z.string(),\n expirationDate: z.string().optional(),\n credentialSubject: CredentialSubjectValidator.or(CredentialSubjectValidator.array()),\n credentialStatus: CredentialStatusValidator.optional(),\n credentialSchema: CredentialSchemaValidator.array().optional(),\n refreshService: RefreshServiceValidator.optional(),\n })\n .catchall(z.any());\nexport type UnsignedVC = z.infer<typeof UnsignedVCValidator>;\n\nexport const ProofValidator = z\n .object({\n type: z.string(),\n created: z.string(),\n challenge: z.string().optional(),\n domain: z.string().optional(),\n nonce: z.string().optional(),\n proofPurpose: z.string(),\n verificationMethod: z.string(),\n jws: z.string().optional(),\n })\n .catchall(z.any());\nexport type Proof = z.infer<typeof ProofValidator>;\n\nexport const VCValidator = UnsignedVCValidator.extend({\n proof: ProofValidator.or(ProofValidator.array()),\n});\nexport type VC = z.infer<typeof VCValidator>;\n\nexport const UnsignedVPValidator = z\n .object({\n '@context': ContextValidator,\n id: z.string().optional(),\n type: z.string().array().nonempty(),\n verifiableCredential: VCValidator.or(VCValidator.array()).optional(),\n holder: z.string().optional(),\n })\n .catchall(z.any());\nexport type UnsignedVP = z.infer<typeof UnsignedVPValidator>;\n\nexport const VPValidator = UnsignedVPValidator.extend({\n proof: ProofValidator.or(ProofValidator.array()),\n});\nexport type VP = z.infer<typeof VPValidator>;\n", "import { z } from 'zod';\nimport {\n UnsignedVCValidator,\n ProofValidator,\n ProfileValidator,\n ImageValidator,\n IdentifierEntryValidator,\n} from './vc';\n\nexport const AlignmentTargetTypeValidator = z\n .enum([\n 'ceasn:Competency',\n 'ceterms:Credential',\n 'CFItem',\n 'CFRubric',\n 'CFRubricCriterion',\n 'CFRubricCriterionLevel',\n 'CTDL',\n ])\n .or(z.string());\nexport type AlignmentTargetType = z.infer<typeof AlignmentTargetTypeValidator>;\n\nexport const AlignmentValidator = z.object({\n type: z.string().array().nonempty(),\n targetCode: z.string().optional(),\n targetDescription: z.string().optional(),\n targetName: z.string(),\n targetFramework: z.string().optional(),\n targetType: AlignmentTargetTypeValidator.optional(),\n targetUrl: z.string(),\n});\nexport type Alignment = z.infer<typeof AlignmentValidator>;\n\nexport const KnownAchievementTypeValidator = z.enum([\n 'Achievement',\n 'ApprenticeshipCertificate',\n 'Assessment',\n 'Assignment',\n 'AssociateDegree',\n 'Award',\n 'Badge',\n 'BachelorDegree',\n 'Certificate',\n 'CertificateOfCompletion',\n 'Certification',\n 'CommunityService',\n 'Competency',\n 'Course',\n 'CoCurricular',\n 'Degree',\n 'Diploma',\n 'DoctoralDegree',\n 'Fieldwork',\n 'GeneralEducationDevelopment',\n 'JourneymanCertificate',\n 'LearningProgram',\n 'License',\n 'Membership',\n 'ProfessionalDoctorate',\n 'QualityAssuranceCredential',\n 'MasterCertificate',\n 'MasterDegree',\n 'MicroCredential',\n 'ResearchDoctorate',\n 'SecondarySchoolDiploma',\n]);\nexport type KnownAchievementType = z.infer<typeof KnownAchievementTypeValidator>;\n\nexport const AchievementTypeValidator = KnownAchievementTypeValidator.or(z.string());\nexport type AchievementType = z.infer<typeof AchievementTypeValidator>;\n\nexport const CriteriaValidator = z\n .object({ id: z.string().optional(), narrative: z.string().optional() })\n .catchall(z.any());\nexport type Criteria = z.infer<typeof CriteriaValidator>;\n\nexport const EndorsementSubjectValidator = z.object({\n id: z.string(),\n type: z.string().array().nonempty(),\n endorsementComment: z.string().optional(),\n});\nexport type EndorsementSubject = z.infer<typeof EndorsementSubjectValidator>;\n\nexport const EndorsementCredentialValidator = UnsignedVCValidator.extend({\n credentialSubject: EndorsementSubjectValidator,\n proof: ProofValidator.or(ProofValidator.array()).optional(),\n});\nexport type EndorsementCredential = z.infer<typeof EndorsementCredentialValidator>;\n\nexport const RelatedValidator = z.object({\n id: z.string(),\n '@language': z.string().optional(),\n version: z.string().optional(),\n});\nexport type Related = z.infer<typeof RelatedValidator>;\n\nexport const ResultTypeValidator = z\n .enum([\n 'GradePointAverage',\n 'LetterGrade',\n 'Percent',\n 'PerformanceLevel',\n 'PredictedScore',\n 'RawScore',\n 'Result',\n 'RubricCriterion',\n 'RubricCriterionLevel',\n 'RubricScore',\n 'ScaledScore',\n 'Status',\n ])\n .or(z.string());\nexport type ResultType = z.infer<typeof ResultTypeValidator>;\n\nexport const RubricCriterionValidator = z\n .object({\n id: z.string(),\n type: z.string().array().nonempty(),\n alignment: AlignmentValidator.array().optional(),\n description: z.string().optional(),\n level: z.string().optional(),\n name: z.string(),\n points: z.string().optional(),\n })\n .catchall(z.any());\nexport type RubricCriterion = z.infer<typeof RubricCriterionValidator>;\n\nexport const ResultDescriptionValidator = z\n .object({\n id: z.string(),\n type: z.string().array().nonempty(),\n alignment: AlignmentValidator.array().optional(),\n allowedValue: z.string().array().optional(),\n name: z.string(),\n requiredLevel: z.string().optional(),\n requiredValue: z.string().optional(),\n resultType: ResultTypeValidator,\n rubricCriterionLevel: RubricCriterionValidator.array().optional(),\n valueMax: z.string().optional(),\n valueMin: z.string().optional(),\n })\n .catchall(z.any());\nexport type ResultDescription = z.infer<typeof ResultDescriptionValidator>;\n\nexport const AchievementValidator = z\n .object({\n id: z.string().optional(),\n type: z.string().array().nonempty(),\n alignment: AlignmentValidator.array().optional(),\n achievementType: AchievementTypeValidator.optional(),\n creator: ProfileValidator.optional(),\n creditsAvailable: z.number().optional(),\n criteria: CriteriaValidator,\n description: z.string(),\n endorsement: EndorsementCredentialValidator.array().optional(),\n fieldOfStudy: z.string().optional(),\n humanCode: z.string().optional(),\n image: ImageValidator.optional(),\n '@language': z.string().optional(),\n name: z.string(),\n otherIdentifier: IdentifierEntryValidator.array().optional(),\n related: RelatedValidator.array().optional(),\n resultDescription: ResultDescriptionValidator.array().optional(),\n specialization: z.string().optional(),\n tag: z.string().array().optional(),\n version: z.string().optional(),\n })\n .catchall(z.any());\nexport type Achievement = z.infer<typeof AchievementValidator>;\n\nexport const IdentityObjectValidator = z.object({\n type: z.string(),\n hashed: z.boolean(),\n identityHash: z.string(),\n identityType: z.string(),\n salt: z.string().optional(),\n});\nexport type IdentityObject = z.infer<typeof IdentityObjectValidator>;\n\nexport const ResultStatusTypeValidator = z.enum([\n 'Completed',\n 'Enrolled',\n 'Failed',\n 'InProgress',\n 'OnHold',\n 'Withdrew',\n]);\nexport type ResultStatusType = z.infer<typeof ResultStatusTypeValidator>;\n\nexport const ResultValidator = z\n .object({\n type: z.string().array().nonempty(),\n achievedLevel: z.string().optional(),\n alignment: AlignmentValidator.array().optional(),\n resultDescription: z.string().optional(),\n status: ResultStatusTypeValidator.optional(),\n value: z.string().optional(),\n })\n .catchall(z.any());\nexport type Result = z.infer<typeof ResultValidator>;\n\nexport const AchievementSubjectValidator = z\n .object({\n id: z.string().optional(),\n type: z.string().array().nonempty(),\n activityEndDate: z.string().optional(),\n activityStartDate: z.string().optional(),\n creditsEarned: z.number().optional(),\n achievement: AchievementValidator.optional(),\n identifier: IdentityObjectValidator.array().optional(),\n image: ImageValidator.optional(),\n licenseNumber: z.string().optional(),\n narrative: z.string().optional(),\n result: ResultValidator.array().optional(),\n role: z.string().optional(),\n source: ProfileValidator.optional(),\n term: z.string().optional(),\n })\n .catchall(z.any());\nexport type AchievementSubject = z.infer<typeof AchievementSubjectValidator>;\n\nexport const EvidenceValidator = z\n .object({\n id: z.string().optional(),\n type: z.string().array().nonempty(),\n narrative: z.string().optional(),\n name: z.string().optional(),\n description: z.string().optional(),\n genre: z.string().optional(),\n audience: z.string().optional(),\n })\n .catchall(z.any());\nexport type Evidence = z.infer<typeof EvidenceValidator>;\n\nexport const UnsignedAchievementCredentialValidator = UnsignedVCValidator.extend({\n name: z.string().optional(),\n description: z.string().optional(),\n image: ImageValidator.optional(),\n credentialSubject: AchievementSubjectValidator.or(AchievementSubjectValidator.array()),\n endorsement: UnsignedVCValidator.array().optional(),\n evidence: EvidenceValidator.array().optional(),\n});\nexport type UnsignedAchievementCredential = z.infer<typeof UnsignedAchievementCredentialValidator>;\n\nexport const AchievementCredentialValidator = UnsignedAchievementCredentialValidator.extend({\n proof: ProofValidator.or(ProofValidator.array()),\n});\nexport type AchievementCredential = z.infer<typeof AchievementCredentialValidator>;\n", "import { z } from 'zod';\nimport { CredentialSubjectValidator, ProfileValidator } from './vc';\n\nexport const VerificationCheckValidator = z.object({\n checks: z.string().array(),\n warnings: z.string().array(),\n errors: z.string().array(),\n});\nexport type VerificationCheck = z.infer<typeof VerificationCheckValidator>;\n\nexport const VerificationStatusValidator = z.enum(['Success', 'Failed', 'Error']);\nexport type VerificationStatus = z.infer<typeof VerificationStatusValidator>;\nexport const VerificationStatusEnum = VerificationStatusValidator.enum;\n\nexport const VerificationItemValidator = z.object({\n check: z.string(),\n status: VerificationStatusValidator,\n message: z.string().optional(),\n details: z.string().optional(),\n});\nexport type VerificationItem = z.infer<typeof VerificationItemValidator>;\n\nexport const CredentialInfoValidator = z.object({\n title: z.string().optional(),\n createdAt: z.string().optional(),\n issuer: ProfileValidator.optional(),\n issuee: ProfileValidator.optional(),\n credentialSubject: CredentialSubjectValidator.optional(),\n});\nexport type CredentialInfo = z.infer<typeof CredentialInfoValidator>;\n\nexport type CredentialRecord<Metadata extends Record<string, any> = Record<never, never>> = {\n id: string;\n uri: string;\n [key: string]: any;\n} & Metadata;\n\nexport const CredentialRecordValidator: z.ZodType<CredentialRecord> = z\n .object({ id: z.string(), uri: z.string() })\n .catchall(z.any());\n", "import { z } from 'zod';\n\nexport const LCNProfileValidator = z.object({\n profileId: z.string().min(3).max(40),\n displayName: z.string().default(''),\n did: z.string(),\n email: z.string().optional(),\n image: z.string().optional(),\n isServiceProfile: z.boolean().default(false).optional(),\n});\nexport type LCNProfile = z.infer<typeof LCNProfileValidator>;\n\nexport const SentCredentialInfoValidator = z.object({\n uri: z.string(),\n to: z.string(),\n from: z.string(),\n sent: z.string().datetime(),\n received: z.string().datetime().optional(),\n});\nexport type SentCredentialInfo = z.infer<typeof SentCredentialInfoValidator>;\n\nexport const BoostValidator = z.object({\n uri: z.string(),\n name: z.string().optional(),\n type: z.string().optional(),\n category: z.string().optional(),\n});\nexport type Boost = z.infer<typeof BoostValidator>;\n", "import { z } from 'zod';\n\nexport const JWKValidator = z.object({\n kty: z.string(),\n crv: z.string(),\n x: z.string(),\n y: z.string().optional(),\n n: z.string().optional(),\n d: z.string(),\n});\nexport type JWK = z.infer<typeof JWKValidator>;\n\nexport const JWERecipientHeaderValidator = z.object({\n alg: z.string(),\n iv: z.string(),\n tag: z.string(),\n epk: JWKValidator.partial().optional(),\n kid: z.string().optional(),\n apv: z.string().optional(),\n apu: z.string().optional(),\n});\nexport type JWERecipientHeader = z.infer<typeof JWERecipientHeaderValidator>;\n\nexport const JWERecipientValidator = z.object({\n header: JWERecipientHeaderValidator,\n encrypted_key: z.string(),\n});\nexport type JWERecipient = z.infer<typeof JWERecipientValidator>;\n\nexport const JWEValidator = z.object({\n protected: z.string(),\n iv: z.string(),\n ciphertext: z.string(),\n tag: z.string(),\n aad: z.string().optional(),\n recipients: JWERecipientValidator.array().optional(),\n});\nexport type JWE = z.infer<typeof JWEValidator>;\n"],
|
5
|
+
"mappings": ";AAAA,SAAS,SAAS;AAEX,IAAM,mBAAmB,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC;AAGjE,IAAM,+BAA+B,EAAE,OAAO;AAAA,EACjD,MAAM,EAAE,OAAO,EAAE,SAAS;AAAA,EAC1B,WAAW,EAAE,OAAO,EAAE,SAAS;AACnC,CAAC;AAGM,IAAM,iBAAiB,EAAE,OAAO,EAAE;AAAA,EACrC,EAAE,OAAO;AAAA,IACL,IAAI,EAAE,OAAO;AAAA,IACb,MAAM,EAAE,OAAO;AAAA,IACf,SAAS,EAAE,OAAO,EAAE,SAAS;AAAA,EACjC,CAAC;AACL;AAGO,IAAM,0BAA0B,EAAE,OAAO;AAAA,EAC5C,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC;AAAA,EACxD,UAAU,EAAE,OAAO;AAAA,EACnB,WAAW,EAAE,OAAO;AACxB,CAAC;AAGM,IAAM,mBAAmB,EAAE,OAAO;AAAA,EACrC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,CAAC;AAAA,EACxD,gBAAgB,EAAE,OAAO,EAAE,SAAS;AAAA,EACpC,oBAAoB,EAAE,OAAO,EAAE,SAAS;AAAA,EACxC,eAAe,EAAE,OAAO,EAAE,SAAS;AAAA,EACnC,iBAAiB,EAAE,O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AE,OAAO,EAAE,SAAS;AAAA,EACvB,GAAGA,GAAE,OAAO;AAChB,CAAC;AAGM,IAAM,8BAA8BA,GAAE,OAAO;AAAA,EAChD,KAAKA,GAAE,OAAO;AAAA,EACd,IAAIA,GAAE,OAAO;AAAA,EACb,KAAKA,GAAE,OAAO;AAAA,EACd,KAAK,aAAa,QAAQ,EAAE,SAAS;AAAA,EACrC,KAAKA,GAAE,OAAO,EAAE,SAAS;AAAA,EACzB,KAAKA,GAAE,OAAO,EAAE,SAAS;AAAA,EACzB,KAAKA,GAAE,OAAO,EAAE,SAAS;AAC7B,CAAC;AAGM,IAAM,wBAAwBA,GAAE,OAAO;AAAA,EAC1C,QAAQ;AAAA,EACR,eAAeA,GAAE,OAAO;AAC5B,CAAC;AAGM,IAAM,eAAeA,GAAE,OAAO;AAAA,EACjC,WAAWA,GAAE,OAAO;AAAA,EACpB,IAAIA,GAAE,OAAO;AAAA,EACb,YAAYA,GAAE,OAAO;AAAA,EACrB,KAAKA,GAAE,OAAO;AAAA,EACd,KAAKA,GAAE,OAAO,EAAE,SAAS;AAAA,EACzB,YAAY,sBAAsB,MAAM,EAAE,SAAS;AACvD,CAAC;",
|
6
|
+
"names": ["z", "z", "z", "z", "z", "z"]
|
7
7
|
}
|
package/dist/vc.d.ts
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import { z } from 'zod';
|
2
|
-
export declare const ContextValidator: z.ZodArray<z.ZodString, "many">;
|
3
|
-
export
|
2
|
+
export declare const ContextValidator: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
|
3
|
+
export type Context = z.infer<typeof ContextValidator>;
|
4
4
|
export declare const AchievementCriteriaValidator: z.ZodObject<{
|
5
5
|
type: z.ZodOptional<z.ZodString>;
|
6
6
|
narrative: z.ZodOptional<z.ZodString>;
|
@@ -11,7 +11,7 @@ export declare const AchievementCriteriaValidator: z.ZodObject<{
|
|
11
11
|
type?: string | undefined;
|
12
12
|
narrative?: string | undefined;
|
13
13
|
}>;
|
14
|
-
export
|
14
|
+
export type AchievementCriteria = z.infer<typeof AchievementCriteriaValidator>;
|
15
15
|
export declare const ImageValidator: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
16
16
|
id: z.ZodString;
|
17
17
|
type: z.ZodString;
|
@@ -25,7 +25,7 @@ export declare const ImageValidator: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
25
25
|
type: string;
|
26
26
|
id: string;
|
27
27
|
}>]>;
|
28
|
-
export
|
28
|
+
export type Image = z.infer<typeof ImageValidator>;
|
29
29
|
export declare const GeoCoordinatesValidator: z.ZodObject<{
|
30
30
|
type: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "atleastone">]>;
|
31
31
|
latitude: z.ZodNumber;
|
@@ -39,7 +39,7 @@ export declare const GeoCoordinatesValidator: z.ZodObject<{
|
|
39
39
|
latitude: number;
|
40
40
|
longitude: number;
|
41
41
|
}>;
|
42
|
-
export
|
42
|
+
export type GeoCoordinates = z.infer<typeof GeoCoordinatesValidator>;
|
43
43
|
export declare const AddressValidator: z.ZodObject<{
|
44
44
|
type: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "atleastone">]>;
|
45
45
|
addressCountry: z.ZodOptional<z.ZodString>;
|
@@ -91,9 +91,9 @@ export declare const AddressValidator: z.ZodObject<{
|
|
91
91
|
} | undefined;
|
92
92
|
type: string | [string, ...string[]];
|
93
93
|
}>;
|
94
|
-
export
|
94
|
+
export type Address = z.infer<typeof AddressValidator>;
|
95
95
|
export declare const IdentifierTypeValidator: z.ZodUnion<[z.ZodEnum<["sourcedId", "systemId", "productId", "userName", "accountId", "emailAddress", "nationalIdentityNumber", "isbn", "issn", "lisSourcedId", "oneRosterSourcedId", "sisSourcedId", "ltiContextId", "ltiDeploymentId", "ltiToolId", "ltiPlatformId", "ltiUserId", "identifier"]>, z.ZodString]>;
|
96
|
-
export
|
96
|
+
export type IdentifierType = z.infer<typeof IdentifierTypeValidator>;
|
97
97
|
export declare const IdentifierEntryValidator: z.ZodObject<{
|
98
98
|
type: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "atleastone">]>;
|
99
99
|
identifier: z.ZodString;
|
@@ -107,7 +107,7 @@ export declare const IdentifierEntryValidator: z.ZodObject<{
|
|
107
107
|
identifier: string;
|
108
108
|
identifierType: string;
|
109
109
|
}>;
|
110
|
-
export
|
110
|
+
export type IdentifierEntry = z.infer<typeof IdentifierEntryValidator>;
|
111
111
|
export declare const ProfileValidator: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
112
112
|
id: z.ZodOptional<z.ZodString>;
|
113
113
|
type: z.ZodUnion<[z.ZodString, z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>]>;
|
@@ -295,7 +295,7 @@ export declare const ProfileValidator: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
|
295
295
|
familyNamePrefix?: string | undefined;
|
296
296
|
dateOfBirth?: string | undefined;
|
297
297
|
}>]>;
|
298
|
-
export
|
298
|
+
export type Profile = z.infer<typeof ProfileValidator>;
|
299
299
|
export declare const CredentialSubjectValidator: z.ZodObject<{
|
300
300
|
id: z.ZodOptional<z.ZodString>;
|
301
301
|
}, "strip", z.ZodAny, {
|
@@ -305,7 +305,7 @@ export declare const CredentialSubjectValidator: z.ZodObject<{
|
|
305
305
|
[x: string]: any;
|
306
306
|
id?: string | undefined;
|
307
307
|
}>;
|
308
|
-
export
|
308
|
+
export type CredentialSubject = z.infer<typeof CredentialSubjectValidator>;
|
309
309
|
export declare const CredentialStatusValidator: z.ZodObject<{
|
310
310
|
type: z.ZodString;
|
311
311
|
id: z.ZodString;
|
@@ -316,7 +316,7 @@ export declare const CredentialStatusValidator: z.ZodObject<{
|
|
316
316
|
type: string;
|
317
317
|
id: string;
|
318
318
|
}>;
|
319
|
-
export
|
319
|
+
export type CredentialStatus = z.infer<typeof CredentialStatusValidator>;
|
320
320
|
export declare const CredentialSchemaValidator: z.ZodObject<{
|
321
321
|
id: z.ZodString;
|
322
322
|
type: z.ZodString;
|
@@ -327,7 +327,7 @@ export declare const CredentialSchemaValidator: z.ZodObject<{
|
|
327
327
|
type: string;
|
328
328
|
id: string;
|
329
329
|
}>;
|
330
|
-
export
|
330
|
+
export type CredentialSchema = z.infer<typeof CredentialSchemaValidator>;
|
331
331
|
export declare const RefreshServiceValidator: z.ZodObject<{
|
332
332
|
id: z.ZodString;
|
333
333
|
type: z.ZodString;
|
@@ -340,9 +340,9 @@ export declare const RefreshServiceValidator: z.ZodObject<{
|
|
340
340
|
type: string;
|
341
341
|
id: string;
|
342
342
|
}>;
|
343
|
-
export
|
343
|
+
export type RefreshService = z.infer<typeof RefreshServiceValidator>;
|
344
344
|
export declare const UnsignedVCValidator: z.ZodObject<{
|
345
|
-
'@context': z.ZodArray<z.ZodString, "many">;
|
345
|
+
'@context': z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
|
346
346
|
id: z.ZodOptional<z.ZodString>;
|
347
347
|
type: z.ZodArray<z.ZodString, "atleastone">;
|
348
348
|
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
@@ -601,7 +601,7 @@ export declare const UnsignedVCValidator: z.ZodObject<{
|
|
601
601
|
id: string;
|
602
602
|
} | undefined;
|
603
603
|
type: [string, ...string[]];
|
604
|
-
'@context': string[];
|
604
|
+
'@context': (string | Record<string, any>)[];
|
605
605
|
issuer: string | {
|
606
606
|
[x: string]: any;
|
607
607
|
type?: string | [string, ...string[]] | undefined;
|
@@ -674,7 +674,7 @@ export declare const UnsignedVCValidator: z.ZodObject<{
|
|
674
674
|
id: string;
|
675
675
|
} | undefined;
|
676
676
|
type: [string, ...string[]];
|
677
|
-
'@context': string[];
|
677
|
+
'@context': (string | Record<string, any>)[];
|
678
678
|
issuer: string | {
|
679
679
|
[x: string]: any;
|
680
680
|
type?: string | [string, ...string[]] | undefined;
|
@@ -730,7 +730,7 @@ export declare const UnsignedVCValidator: z.ZodObject<{
|
|
730
730
|
id?: string | undefined;
|
731
731
|
}[];
|
732
732
|
}>;
|
733
|
-
export
|
733
|
+
export type UnsignedVC = z.infer<typeof UnsignedVCValidator>;
|
734
734
|
export declare const ProofValidator: z.ZodObject<{
|
735
735
|
type: z.ZodString;
|
736
736
|
created: z.ZodString;
|
@@ -761,11 +761,11 @@ export declare const ProofValidator: z.ZodObject<{
|
|
761
761
|
proofPurpose: string;
|
762
762
|
verificationMethod: string;
|
763
763
|
}>;
|
764
|
-
export
|
765
|
-
export declare const VCValidator: z.ZodObject<
|
766
|
-
'@context': z.ZodArray<z.ZodString, "many">;
|
767
|
-
id: z.ZodOptional<z.ZodString>;
|
764
|
+
export type Proof = z.infer<typeof ProofValidator>;
|
765
|
+
export declare const VCValidator: z.ZodObject<{
|
768
766
|
type: z.ZodArray<z.ZodString, "atleastone">;
|
767
|
+
id: z.ZodOptional<z.ZodString>;
|
768
|
+
'@context': z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
|
769
769
|
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
770
770
|
id: z.ZodOptional<z.ZodString>;
|
771
771
|
type: z.ZodUnion<[z.ZodString, z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>]>;
|
@@ -1004,7 +1004,6 @@ export declare const VCValidator: z.ZodObject<z.extendShape<{
|
|
1004
1004
|
type: string;
|
1005
1005
|
id: string;
|
1006
1006
|
}>>;
|
1007
|
-
}, {
|
1008
1007
|
proof: z.ZodUnion<[z.ZodObject<{
|
1009
1008
|
type: z.ZodString;
|
1010
1009
|
created: z.ZodString;
|
@@ -1064,7 +1063,7 @@ export declare const VCValidator: z.ZodObject<z.extendShape<{
|
|
1064
1063
|
proofPurpose: string;
|
1065
1064
|
verificationMethod: string;
|
1066
1065
|
}>, "many">]>;
|
1067
|
-
}
|
1066
|
+
}, "strip", z.ZodAny, {
|
1068
1067
|
[x: string]: any;
|
1069
1068
|
id?: string | undefined;
|
1070
1069
|
expirationDate?: string | undefined;
|
@@ -1082,7 +1081,7 @@ export declare const VCValidator: z.ZodObject<z.extendShape<{
|
|
1082
1081
|
id: string;
|
1083
1082
|
} | undefined;
|
1084
1083
|
type: [string, ...string[]];
|
1085
|
-
'@context': string[];
|
1084
|
+
'@context': (string | Record<string, any>)[];
|
1086
1085
|
issuer: string | {
|
1087
1086
|
[x: string]: any;
|
1088
1087
|
type?: string | [string, ...string[]] | undefined;
|
@@ -1176,7 +1175,7 @@ export declare const VCValidator: z.ZodObject<z.extendShape<{
|
|
1176
1175
|
id: string;
|
1177
1176
|
} | undefined;
|
1178
1177
|
type: [string, ...string[]];
|
1179
|
-
'@context': string[];
|
1178
|
+
'@context': (string | Record<string, any>)[];
|
1180
1179
|
issuer: string | {
|
1181
1180
|
[x: string]: any;
|
1182
1181
|
type?: string | [string, ...string[]] | undefined;
|
@@ -1253,15 +1252,15 @@ export declare const VCValidator: z.ZodObject<z.extendShape<{
|
|
1253
1252
|
verificationMethod: string;
|
1254
1253
|
}[];
|
1255
1254
|
}>;
|
1256
|
-
export
|
1255
|
+
export type VC = z.infer<typeof VCValidator>;
|
1257
1256
|
export declare const UnsignedVPValidator: z.ZodObject<{
|
1258
|
-
'@context': z.ZodArray<z.ZodString, "many">;
|
1257
|
+
'@context': z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
|
1259
1258
|
id: z.ZodOptional<z.ZodString>;
|
1260
1259
|
type: z.ZodArray<z.ZodString, "atleastone">;
|
1261
|
-
verifiableCredential: z.ZodOptional<z.ZodUnion<[z.ZodObject<
|
1262
|
-
'@context': z.ZodArray<z.ZodString, "many">;
|
1263
|
-
id: z.ZodOptional<z.ZodString>;
|
1260
|
+
verifiableCredential: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
1264
1261
|
type: z.ZodArray<z.ZodString, "atleastone">;
|
1262
|
+
id: z.ZodOptional<z.ZodString>;
|
1263
|
+
'@context': z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
|
1265
1264
|
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
1266
1265
|
id: z.ZodOptional<z.ZodString>;
|
1267
1266
|
type: z.ZodUnion<[z.ZodString, z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>]>;
|
@@ -1500,7 +1499,6 @@ export declare const UnsignedVPValidator: z.ZodObject<{
|
|
1500
1499
|
type: string;
|
1501
1500
|
id: string;
|
1502
1501
|
}>>;
|
1503
|
-
}, {
|
1504
1502
|
proof: z.ZodUnion<[z.ZodObject<{
|
1505
1503
|
type: z.ZodString;
|
1506
1504
|
created: z.ZodString;
|
@@ -1560,7 +1558,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
|
|
1560
1558
|
proofPurpose: string;
|
1561
1559
|
verificationMethod: string;
|
1562
1560
|
}>, "many">]>;
|
1563
|
-
}
|
1561
|
+
}, "strip", z.ZodAny, {
|
1564
1562
|
[x: string]: any;
|
1565
1563
|
id?: string | undefined;
|
1566
1564
|
expirationDate?: string | undefined;
|
@@ -1578,7 +1576,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
|
|
1578
1576
|
id: string;
|
1579
1577
|
} | undefined;
|
1580
1578
|
type: [string, ...string[]];
|
1581
|
-
'@context': string[];
|
1579
|
+
'@context': (string | Record<string, any>)[];
|
1582
1580
|
issuer: string | {
|
1583
1581
|
[x: string]: any;
|
1584
1582
|
type?: string | [string, ...string[]] | undefined;
|
@@ -1672,7 +1670,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
|
|
1672
1670
|
id: string;
|
1673
1671
|
} | undefined;
|
1674
1672
|
type: [string, ...string[]];
|
1675
|
-
'@context': string[];
|
1673
|
+
'@context': (string | Record<string, any>)[];
|
1676
1674
|
issuer: string | {
|
1677
1675
|
[x: string]: any;
|
1678
1676
|
type?: string | [string, ...string[]] | undefined;
|
@@ -1748,10 +1746,10 @@ export declare const UnsignedVPValidator: z.ZodObject<{
|
|
1748
1746
|
proofPurpose: string;
|
1749
1747
|
verificationMethod: string;
|
1750
1748
|
}[];
|
1751
|
-
}>, z.ZodArray<z.ZodObject<
|
1752
|
-
'@context': z.ZodArray<z.ZodString, "many">;
|
1753
|
-
id: z.ZodOptional<z.ZodString>;
|
1749
|
+
}>, z.ZodArray<z.ZodObject<{
|
1754
1750
|
type: z.ZodArray<z.ZodString, "atleastone">;
|
1751
|
+
id: z.ZodOptional<z.ZodString>;
|
1752
|
+
'@context': z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
|
1755
1753
|
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
1756
1754
|
id: z.ZodOptional<z.ZodString>;
|
1757
1755
|
type: z.ZodUnion<[z.ZodString, z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>]>;
|
@@ -1990,7 +1988,6 @@ export declare const UnsignedVPValidator: z.ZodObject<{
|
|
1990
1988
|
type: string;
|
1991
1989
|
id: string;
|
1992
1990
|
}>>;
|
1993
|
-
}, {
|
1994
1991
|
proof: z.ZodUnion<[z.ZodObject<{
|
1995
1992
|
type: z.ZodString;
|
1996
1993
|
created: z.ZodString;
|
@@ -2050,7 +2047,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
|
|
2050
2047
|
proofPurpose: string;
|
2051
2048
|
verificationMethod: string;
|
2052
2049
|
}>, "many">]>;
|
2053
|
-
}
|
2050
|
+
}, "strip", z.ZodAny, {
|
2054
2051
|
[x: string]: any;
|
2055
2052
|
id?: string | undefined;
|
2056
2053
|
expirationDate?: string | undefined;
|
@@ -2068,7 +2065,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
|
|
2068
2065
|
id: string;
|
2069
2066
|
} | undefined;
|
2070
2067
|
type: [string, ...string[]];
|
2071
|
-
'@context': string[];
|
2068
|
+
'@context': (string | Record<string, any>)[];
|
2072
2069
|
issuer: string | {
|
2073
2070
|
[x: string]: any;
|
2074
2071
|
type?: string | [string, ...string[]] | undefined;
|
@@ -2162,7 +2159,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
|
|
2162
2159
|
id: string;
|
2163
2160
|
} | undefined;
|
2164
2161
|
type: [string, ...string[]];
|
2165
|
-
'@context': string[];
|
2162
|
+
'@context': (string | Record<string, any>)[];
|
2166
2163
|
issuer: string | {
|
2167
2164
|
[x: string]: any;
|
2168
2165
|
type?: string | [string, ...string[]] | undefined;
|
@@ -2261,7 +2258,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
|
|
2261
2258
|
id: string;
|
2262
2259
|
} | undefined;
|
2263
2260
|
type: [string, ...string[]];
|
2264
|
-
'@context': string[];
|
2261
|
+
'@context': (string | Record<string, any>)[];
|
2265
2262
|
issuer: string | {
|
2266
2263
|
[x: string]: any;
|
2267
2264
|
type?: string | [string, ...string[]] | undefined;
|
@@ -2355,7 +2352,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
|
|
2355
2352
|
id: string;
|
2356
2353
|
} | undefined;
|
2357
2354
|
type: [string, ...string[]];
|
2358
|
-
'@context': string[];
|
2355
|
+
'@context': (string | Record<string, any>)[];
|
2359
2356
|
issuer: string | {
|
2360
2357
|
[x: string]: any;
|
2361
2358
|
type?: string | [string, ...string[]] | undefined;
|
@@ -2434,7 +2431,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
|
|
2434
2431
|
}[] | undefined;
|
2435
2432
|
holder?: string | undefined;
|
2436
2433
|
type: [string, ...string[]];
|
2437
|
-
'@context': string[];
|
2434
|
+
'@context': (string | Record<string, any>)[];
|
2438
2435
|
}, {
|
2439
2436
|
[x: string]: any;
|
2440
2437
|
id?: string | undefined;
|
@@ -2456,7 +2453,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
|
|
2456
2453
|
id: string;
|
2457
2454
|
} | undefined;
|
2458
2455
|
type: [string, ...string[]];
|
2459
|
-
'@context': string[];
|
2456
|
+
'@context': (string | Record<string, any>)[];
|
2460
2457
|
issuer: string | {
|
2461
2458
|
[x: string]: any;
|
2462
2459
|
type?: string | [string, ...string[]] | undefined;
|
@@ -2550,7 +2547,7 @@ export declare const UnsignedVPValidator: z.ZodObject<{
|
|
2550
2547
|
id: string;
|
2551
2548
|
} | undefined;
|
2552
2549
|
type: [string, ...string[]];
|
2553
|
-
'@context': string[];
|
2550
|
+
'@context': (string | Record<string, any>)[];
|
2554
2551
|
issuer: string | {
|
2555
2552
|
[x: string]: any;
|
2556
2553
|
type?: string | [string, ...string[]] | undefined;
|
@@ -2629,17 +2626,17 @@ export declare const UnsignedVPValidator: z.ZodObject<{
|
|
2629
2626
|
}[] | undefined;
|
2630
2627
|
holder?: string | undefined;
|
2631
2628
|
type: [string, ...string[]];
|
2632
|
-
'@context': string[];
|
2629
|
+
'@context': (string | Record<string, any>)[];
|
2633
2630
|
}>;
|
2634
|
-
export
|
2635
|
-
export declare const VPValidator: z.ZodObject<
|
2636
|
-
'@context': z.ZodArray<z.ZodString, "many">;
|
2637
|
-
id: z.ZodOptional<z.ZodString>;
|
2631
|
+
export type UnsignedVP = z.infer<typeof UnsignedVPValidator>;
|
2632
|
+
export declare const VPValidator: z.ZodObject<{
|
2638
2633
|
type: z.ZodArray<z.ZodString, "atleastone">;
|
2639
|
-
|
2640
|
-
|
2641
|
-
|
2634
|
+
id: z.ZodOptional<z.ZodString>;
|
2635
|
+
'@context': z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
|
2636
|
+
verifiableCredential: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
|
2642
2637
|
type: z.ZodArray<z.ZodString, "atleastone">;
|
2638
|
+
id: z.ZodOptional<z.ZodString>;
|
2639
|
+
'@context': z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
|
2643
2640
|
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
2644
2641
|
id: z.ZodOptional<z.ZodString>;
|
2645
2642
|
type: z.ZodUnion<[z.ZodString, z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>]>;
|
@@ -2878,7 +2875,6 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
2878
2875
|
type: string;
|
2879
2876
|
id: string;
|
2880
2877
|
}>>;
|
2881
|
-
}, {
|
2882
2878
|
proof: z.ZodUnion<[z.ZodObject<{
|
2883
2879
|
type: z.ZodString;
|
2884
2880
|
created: z.ZodString;
|
@@ -2938,7 +2934,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
2938
2934
|
proofPurpose: string;
|
2939
2935
|
verificationMethod: string;
|
2940
2936
|
}>, "many">]>;
|
2941
|
-
}
|
2937
|
+
}, "strip", z.ZodAny, {
|
2942
2938
|
[x: string]: any;
|
2943
2939
|
id?: string | undefined;
|
2944
2940
|
expirationDate?: string | undefined;
|
@@ -2956,7 +2952,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
2956
2952
|
id: string;
|
2957
2953
|
} | undefined;
|
2958
2954
|
type: [string, ...string[]];
|
2959
|
-
'@context': string[];
|
2955
|
+
'@context': (string | Record<string, any>)[];
|
2960
2956
|
issuer: string | {
|
2961
2957
|
[x: string]: any;
|
2962
2958
|
type?: string | [string, ...string[]] | undefined;
|
@@ -3050,7 +3046,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
3050
3046
|
id: string;
|
3051
3047
|
} | undefined;
|
3052
3048
|
type: [string, ...string[]];
|
3053
|
-
'@context': string[];
|
3049
|
+
'@context': (string | Record<string, any>)[];
|
3054
3050
|
issuer: string | {
|
3055
3051
|
[x: string]: any;
|
3056
3052
|
type?: string | [string, ...string[]] | undefined;
|
@@ -3126,10 +3122,10 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
3126
3122
|
proofPurpose: string;
|
3127
3123
|
verificationMethod: string;
|
3128
3124
|
}[];
|
3129
|
-
}>, z.ZodArray<z.ZodObject<
|
3130
|
-
'@context': z.ZodArray<z.ZodString, "many">;
|
3131
|
-
id: z.ZodOptional<z.ZodString>;
|
3125
|
+
}>, z.ZodArray<z.ZodObject<{
|
3132
3126
|
type: z.ZodArray<z.ZodString, "atleastone">;
|
3127
|
+
id: z.ZodOptional<z.ZodString>;
|
3128
|
+
'@context': z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">;
|
3133
3129
|
issuer: z.ZodUnion<[z.ZodString, z.ZodObject<{
|
3134
3130
|
id: z.ZodOptional<z.ZodString>;
|
3135
3131
|
type: z.ZodUnion<[z.ZodString, z.ZodOptional<z.ZodArray<z.ZodString, "atleastone">>]>;
|
@@ -3368,7 +3364,6 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
3368
3364
|
type: string;
|
3369
3365
|
id: string;
|
3370
3366
|
}>>;
|
3371
|
-
}, {
|
3372
3367
|
proof: z.ZodUnion<[z.ZodObject<{
|
3373
3368
|
type: z.ZodString;
|
3374
3369
|
created: z.ZodString;
|
@@ -3428,7 +3423,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
3428
3423
|
proofPurpose: string;
|
3429
3424
|
verificationMethod: string;
|
3430
3425
|
}>, "many">]>;
|
3431
|
-
}
|
3426
|
+
}, "strip", z.ZodAny, {
|
3432
3427
|
[x: string]: any;
|
3433
3428
|
id?: string | undefined;
|
3434
3429
|
expirationDate?: string | undefined;
|
@@ -3446,7 +3441,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
3446
3441
|
id: string;
|
3447
3442
|
} | undefined;
|
3448
3443
|
type: [string, ...string[]];
|
3449
|
-
'@context': string[];
|
3444
|
+
'@context': (string | Record<string, any>)[];
|
3450
3445
|
issuer: string | {
|
3451
3446
|
[x: string]: any;
|
3452
3447
|
type?: string | [string, ...string[]] | undefined;
|
@@ -3540,7 +3535,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
3540
3535
|
id: string;
|
3541
3536
|
} | undefined;
|
3542
3537
|
type: [string, ...string[]];
|
3543
|
-
'@context': string[];
|
3538
|
+
'@context': (string | Record<string, any>)[];
|
3544
3539
|
issuer: string | {
|
3545
3540
|
[x: string]: any;
|
3546
3541
|
type?: string | [string, ...string[]] | undefined;
|
@@ -3618,7 +3613,6 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
3618
3613
|
}[];
|
3619
3614
|
}>, "many">]>>;
|
3620
3615
|
holder: z.ZodOptional<z.ZodString>;
|
3621
|
-
}, {
|
3622
3616
|
proof: z.ZodUnion<[z.ZodObject<{
|
3623
3617
|
type: z.ZodString;
|
3624
3618
|
created: z.ZodString;
|
@@ -3678,7 +3672,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
3678
3672
|
proofPurpose: string;
|
3679
3673
|
verificationMethod: string;
|
3680
3674
|
}>, "many">]>;
|
3681
|
-
}
|
3675
|
+
}, "strip", z.ZodAny, {
|
3682
3676
|
[x: string]: any;
|
3683
3677
|
id?: string | undefined;
|
3684
3678
|
verifiableCredential?: {
|
@@ -3699,7 +3693,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
3699
3693
|
id: string;
|
3700
3694
|
} | undefined;
|
3701
3695
|
type: [string, ...string[]];
|
3702
|
-
'@context': string[];
|
3696
|
+
'@context': (string | Record<string, any>)[];
|
3703
3697
|
issuer: string | {
|
3704
3698
|
[x: string]: any;
|
3705
3699
|
type?: string | [string, ...string[]] | undefined;
|
@@ -3793,7 +3787,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
3793
3787
|
id: string;
|
3794
3788
|
} | undefined;
|
3795
3789
|
type: [string, ...string[]];
|
3796
|
-
'@context': string[];
|
3790
|
+
'@context': (string | Record<string, any>)[];
|
3797
3791
|
issuer: string | {
|
3798
3792
|
[x: string]: any;
|
3799
3793
|
type?: string | [string, ...string[]] | undefined;
|
@@ -3872,7 +3866,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
3872
3866
|
}[] | undefined;
|
3873
3867
|
holder?: string | undefined;
|
3874
3868
|
type: [string, ...string[]];
|
3875
|
-
'@context': string[];
|
3869
|
+
'@context': (string | Record<string, any>)[];
|
3876
3870
|
proof: {
|
3877
3871
|
[x: string]: any;
|
3878
3872
|
challenge?: string | undefined;
|
@@ -3915,7 +3909,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
3915
3909
|
id: string;
|
3916
3910
|
} | undefined;
|
3917
3911
|
type: [string, ...string[]];
|
3918
|
-
'@context': string[];
|
3912
|
+
'@context': (string | Record<string, any>)[];
|
3919
3913
|
issuer: string | {
|
3920
3914
|
[x: string]: any;
|
3921
3915
|
type?: string | [string, ...string[]] | undefined;
|
@@ -4009,7 +4003,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
4009
4003
|
id: string;
|
4010
4004
|
} | undefined;
|
4011
4005
|
type: [string, ...string[]];
|
4012
|
-
'@context': string[];
|
4006
|
+
'@context': (string | Record<string, any>)[];
|
4013
4007
|
issuer: string | {
|
4014
4008
|
[x: string]: any;
|
4015
4009
|
type?: string | [string, ...string[]] | undefined;
|
@@ -4088,7 +4082,7 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
4088
4082
|
}[] | undefined;
|
4089
4083
|
holder?: string | undefined;
|
4090
4084
|
type: [string, ...string[]];
|
4091
|
-
'@context': string[];
|
4085
|
+
'@context': (string | Record<string, any>)[];
|
4092
4086
|
proof: {
|
4093
4087
|
[x: string]: any;
|
4094
4088
|
challenge?: string | undefined;
|
@@ -4111,4 +4105,4 @@ export declare const VPValidator: z.ZodObject<z.extendShape<{
|
|
4111
4105
|
verificationMethod: string;
|
4112
4106
|
}[];
|
4113
4107
|
}>;
|
4114
|
-
export
|
4108
|
+
export type VP = z.infer<typeof VPValidator>;
|