UNPKG

di-wings

Version:

Aviary Tech's common library for decentralized identity

602 lines 19.1 kB
import { z } from "zod"; import type { VerifiableCredential } from '../models/credential'; export declare const verifiableCredentialSchema: z.ZodEffects<z.ZodIntersection<z.ZodObject<{ '@context': z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>, "many">, (string | Record<string, any>)[], (string | Record<string, any>)[]>; id: z.ZodOptional<z.ZodString>; type: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], string[]>; issuer: z.ZodUnion<[z.ZodString, z.ZodIntersection<z.ZodObject<{ id: z.ZodString; name: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{ '@value': z.ZodString; '@language': z.ZodString; '@direction': z.ZodOptional<z.ZodEnum<["ltr", "rtl"]>>; }, "strict", z.ZodTypeAny, { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; }, { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; }>, z.ZodArray<z.ZodObject<{ '@value': z.ZodString; '@language': z.ZodString; '@direction': z.ZodOptional<z.ZodEnum<["ltr", "rtl"]>>; }, "strict", z.ZodTypeAny, { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; }, { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; }>, "many">]>>; description: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{ '@value': z.ZodString; '@language': z.ZodString; '@direction': z.ZodOptional<z.ZodEnum<["ltr", "rtl"]>>; }, "strict", z.ZodTypeAny, { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; }, { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; }>, z.ZodArray<z.ZodObject<{ '@value': z.ZodString; '@language': z.ZodString; '@direction': z.ZodOptional<z.ZodEnum<["ltr", "rtl"]>>; }, "strict", z.ZodTypeAny, { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; }, { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; }>, "many">]>>; }, "strip", z.ZodTypeAny, { id: string; name?: string | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; } | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; }[] | undefined; description?: string | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; } | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; }[] | undefined; }, { id: string; name?: string | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; } | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; }[] | undefined; description?: string | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; } | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; }[] | undefined; }>, z.ZodRecord<z.ZodString, z.ZodAny>>]>; validFrom: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; validUntil: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>; credentialSubject: z.ZodUnion<[z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodAny>, Record<string, any>, Record<string, any>>, z.ZodArray<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodAny>, Record<string, any>, Record<string, any>>, "many">]>; credentialStatus: z.ZodOptional<z.ZodIntersection<z.ZodObject<{ type: z.ZodString; }, "strip", z.ZodTypeAny, { type: string; }, { type: string; }>, z.ZodRecord<z.ZodString, z.ZodAny>>>; termsOfUse: z.ZodOptional<z.ZodUnion<[z.ZodIntersection<z.ZodObject<{ type: z.ZodString; }, "strip", z.ZodTypeAny, { type: string; }, { type: string; }>, z.ZodRecord<z.ZodString, z.ZodAny>>, z.ZodArray<z.ZodIntersection<z.ZodObject<{ type: z.ZodString; }, "strip", z.ZodTypeAny, { type: string; }, { type: string; }>, z.ZodRecord<z.ZodString, z.ZodAny>>, "many">]>>; evidence: z.ZodOptional<z.ZodUnion<[z.ZodIntersection<z.ZodObject<{ type: z.ZodString; }, "strip", z.ZodTypeAny, { type: string; }, { type: string; }>, z.ZodRecord<z.ZodString, z.ZodAny>>, z.ZodArray<z.ZodIntersection<z.ZodObject<{ type: z.ZodString; }, "strip", z.ZodTypeAny, { type: string; }, { type: string; }>, z.ZodRecord<z.ZodString, z.ZodAny>>, "many">]>>; refreshService: z.ZodOptional<z.ZodUnion<[z.ZodIntersection<z.ZodObject<{ type: z.ZodString; }, "strip", z.ZodTypeAny, { type: string; }, { type: string; }>, z.ZodRecord<z.ZodString, z.ZodAny>>, z.ZodArray<z.ZodIntersection<z.ZodObject<{ type: z.ZodString; }, "strip", z.ZodTypeAny, { type: string; }, { type: string; }>, z.ZodRecord<z.ZodString, z.ZodAny>>, "many">]>>; credentialSchema: z.ZodOptional<z.ZodUnion<[z.ZodIntersection<z.ZodObject<{ type: z.ZodString; id: z.ZodString; }, "strip", z.ZodTypeAny, { type: string; id: string; }, { type: string; id: string; }>, z.ZodRecord<z.ZodString, z.ZodAny>>, z.ZodArray<z.ZodIntersection<z.ZodObject<{ type: z.ZodString; id: z.ZodString; }, "strip", z.ZodTypeAny, { type: string; id: string; }, { type: string; id: string; }>, z.ZodRecord<z.ZodString, z.ZodAny>>, "many">]>>; relatedResource: z.ZodOptional<z.ZodUnion<[z.ZodIntersection<z.ZodIntersection<z.ZodObject<{ id: z.ZodString; type: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { id: string; type?: string | undefined; }, { id: string; type?: string | undefined; }>, z.ZodUnion<[z.ZodObject<{ digestSRI: z.ZodString; }, "strip", z.ZodTypeAny, { digestSRI: string; }, { digestSRI: string; }>, z.ZodObject<{ digestMultibase: z.ZodString; }, "strip", z.ZodTypeAny, { digestMultibase: string; }, { digestMultibase: string; }>, z.ZodObject<{ digestSRI: z.ZodString; digestMultibase: z.ZodString; }, "strip", z.ZodTypeAny, { digestSRI: string; digestMultibase: string; }, { digestSRI: string; digestMultibase: string; }>]>>, z.ZodRecord<z.ZodString, z.ZodAny>>, z.ZodArray<z.ZodIntersection<z.ZodIntersection<z.ZodObject<{ id: z.ZodString; type: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { id: string; type?: string | undefined; }, { id: string; type?: string | undefined; }>, z.ZodUnion<[z.ZodObject<{ digestSRI: z.ZodString; }, "strip", z.ZodTypeAny, { digestSRI: string; }, { digestSRI: string; }>, z.ZodObject<{ digestMultibase: z.ZodString; }, "strip", z.ZodTypeAny, { digestMultibase: string; }, { digestMultibase: string; }>, z.ZodObject<{ digestSRI: z.ZodString; digestMultibase: z.ZodString; }, "strip", z.ZodTypeAny, { digestSRI: string; digestMultibase: string; }, { digestSRI: string; digestMultibase: string; }>]>>, z.ZodRecord<z.ZodString, z.ZodAny>>, "many">]>>; proof: z.ZodUnion<[z.ZodArray<z.ZodObject<{ type: z.ZodString; proofPurpose: z.ZodString; verificationMethod: z.ZodString; proofValue: z.ZodString; }, "strip", z.ZodTypeAny, { type: string; proofValue: string; verificationMethod: string; proofPurpose: string; }, { type: string; proofValue: string; verificationMethod: string; proofPurpose: string; }>, "many">, z.ZodObject<{ type: z.ZodString; proofPurpose: z.ZodString; verificationMethod: z.ZodString; proofValue: z.ZodString; }, "strip", z.ZodTypeAny, { type: string; proofValue: string; verificationMethod: string; proofPurpose: string; }, { type: string; proofValue: string; verificationMethod: string; proofPurpose: string; }>]>; }, "strip", z.ZodTypeAny, { type: string[]; proof: { type: string; proofValue: string; verificationMethod: string; proofPurpose: string; }[] | { type: string; proofValue: string; verificationMethod: string; proofPurpose: string; }; '@context': (string | Record<string, any>)[]; credentialSubject: Record<string, any> | Record<string, any>[]; issuer: string | ({ id: string; name?: string | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; } | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; }[] | undefined; description?: string | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; } | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; }[] | undefined; } & Record<string, any>); id?: string | undefined; credentialStatus?: ({ type: string; } & Record<string, any>) | undefined; validFrom?: string | undefined; validUntil?: string | undefined; termsOfUse?: ({ type: string; } & Record<string, any>) | ({ type: string; } & Record<string, any>)[] | undefined; evidence?: ({ type: string; } & Record<string, any>) | ({ type: string; } & Record<string, any>)[] | undefined; refreshService?: ({ type: string; } & Record<string, any>) | ({ type: string; } & Record<string, any>)[] | undefined; credentialSchema?: ({ type: string; id: string; } & Record<string, any>) | ({ type: string; id: string; } & Record<string, any>)[] | undefined; relatedResource?: (({ id: string; type?: string | undefined; } & ({ digestSRI: string; } | { digestMultibase: string; } | { digestSRI: string; digestMultibase: string; })) & Record<string, any>) | (({ id: string; type?: string | undefined; } & ({ digestSRI: string; } | { digestMultibase: string; } | { digestSRI: string; digestMultibase: string; })) & Record<string, any>)[] | undefined; }, { type: string[]; proof: { type: string; proofValue: string; verificationMethod: string; proofPurpose: string; }[] | { type: string; proofValue: string; verificationMethod: string; proofPurpose: string; }; '@context': (string | Record<string, any>)[]; credentialSubject: Record<string, any> | Record<string, any>[]; issuer: string | ({ id: string; name?: string | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; } | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; }[] | undefined; description?: string | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; } | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; }[] | undefined; } & Record<string, any>); id?: string | undefined; credentialStatus?: ({ type: string; } & Record<string, any>) | undefined; validFrom?: string | undefined; validUntil?: string | undefined; termsOfUse?: ({ type: string; } & Record<string, any>) | ({ type: string; } & Record<string, any>)[] | undefined; evidence?: ({ type: string; } & Record<string, any>) | ({ type: string; } & Record<string, any>)[] | undefined; refreshService?: ({ type: string; } & Record<string, any>) | ({ type: string; } & Record<string, any>)[] | undefined; credentialSchema?: ({ type: string; id: string; } & Record<string, any>) | ({ type: string; id: string; } & Record<string, any>)[] | undefined; relatedResource?: (({ id: string; type?: string | undefined; } & ({ digestSRI: string; } | { digestMultibase: string; } | { digestSRI: string; digestMultibase: string; })) & Record<string, any>) | (({ id: string; type?: string | undefined; } & ({ digestSRI: string; } | { digestMultibase: string; } | { digestSRI: string; digestMultibase: string; })) & Record<string, any>)[] | undefined; }>, z.ZodRecord<z.ZodString, z.ZodAny>>, { type: string[]; proof: { type: string; proofValue: string; verificationMethod: string; proofPurpose: string; }[] | { type: string; proofValue: string; verificationMethod: string; proofPurpose: string; }; '@context': (string | Record<string, any>)[]; credentialSubject: Record<string, any> | Record<string, any>[]; issuer: string | ({ id: string; name?: string | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; } | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; }[] | undefined; description?: string | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; } | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; }[] | undefined; } & Record<string, any>); id?: string | undefined; credentialStatus?: ({ type: string; } & Record<string, any>) | undefined; validFrom?: string | undefined; validUntil?: string | undefined; termsOfUse?: ({ type: string; } & Record<string, any>) | ({ type: string; } & Record<string, any>)[] | undefined; evidence?: ({ type: string; } & Record<string, any>) | ({ type: string; } & Record<string, any>)[] | undefined; refreshService?: ({ type: string; } & Record<string, any>) | ({ type: string; } & Record<string, any>)[] | undefined; credentialSchema?: ({ type: string; id: string; } & Record<string, any>) | ({ type: string; id: string; } & Record<string, any>)[] | undefined; relatedResource?: (({ id: string; type?: string | undefined; } & ({ digestSRI: string; } | { digestMultibase: string; } | { digestSRI: string; digestMultibase: string; })) & Record<string, any>) | (({ id: string; type?: string | undefined; } & ({ digestSRI: string; } | { digestMultibase: string; } | { digestSRI: string; digestMultibase: string; })) & Record<string, any>)[] | undefined; } & Record<string, any>, { type: string[]; proof: { type: string; proofValue: string; verificationMethod: string; proofPurpose: string; }[] | { type: string; proofValue: string; verificationMethod: string; proofPurpose: string; }; '@context': (string | Record<string, any>)[]; credentialSubject: Record<string, any> | Record<string, any>[]; issuer: string | ({ id: string; name?: string | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; } | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; }[] | undefined; description?: string | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; } | { '@value': string; '@language': string; '@direction'?: "ltr" | "rtl" | undefined; }[] | undefined; } & Record<string, any>); id?: string | undefined; credentialStatus?: ({ type: string; } & Record<string, any>) | undefined; validFrom?: string | undefined; validUntil?: string | undefined; termsOfUse?: ({ type: string; } & Record<string, any>) | ({ type: string; } & Record<string, any>)[] | undefined; evidence?: ({ type: string; } & Record<string, any>) | ({ type: string; } & Record<string, any>)[] | undefined; refreshService?: ({ type: string; } & Record<string, any>) | ({ type: string; } & Record<string, any>)[] | undefined; credentialSchema?: ({ type: string; id: string; } & Record<string, any>) | ({ type: string; id: string; } & Record<string, any>)[] | undefined; relatedResource?: (({ id: string; type?: string | undefined; } & ({ digestSRI: string; } | { digestMultibase: string; } | { digestSRI: string; digestMultibase: string; })) & Record<string, any>) | (({ id: string; type?: string | undefined; } & ({ digestSRI: string; } | { digestMultibase: string; } | { digestSRI: string; digestMultibase: string; })) & Record<string, any>)[] | undefined; } & Record<string, any>>; export declare function validateCredential(verifiableCredential: VerifiableCredential): void; //# sourceMappingURL=credential.d.ts.map