UNPKG

@cef-ebsi/vcdm1.1-nova-ims-digital-credential-schema

Version:

Schema defining a verifiable credential issued by NOVA IMS representing a student's course enrolment details.

511 lines (510 loc) 17.1 kB
export declare const metadata: { readonly vcdm: "1.1"; readonly id: { readonly base16: "0xbb338a82e14e38d78e0e9020aeb2b60eb17efe8e4a376549293f6886ac2a013d"; readonly multibase_base58btc: "zDbkpiR1AXmj88VXBMcPdKvSWsMPnj7N4zzXz7wDMV4F6"; }; readonly verification: "Documents"; readonly context: "Education and lifelong learning"; }; export declare const schema: { readonly $schema: "https://json-schema.org/draft/2020-12/schema"; readonly title: "NOVA IMS Digital Credential"; readonly description: "Schema defining a verifiable credential issued by NOVA IMS representing a student's course enrolment details."; readonly type: "object"; readonly allOf: readonly [ { readonly $schema: "https://json-schema.org/draft/2020-12/schema"; readonly title: "EBSI Verifiable Attestation"; readonly description: "The schema defines a generic structure for any EBSI-related Verifiable Credentials according to the Verifiable Credentials Data Model v1.1"; readonly type: "object"; readonly properties: { readonly "@context": { readonly description: "Semantic context for the issued credential. First element MUST be https://www.w3.org/2018/credentials/v1"; readonly type: "array"; readonly items: { readonly type: "string"; readonly format: "uri"; }; readonly contains: { readonly const: "https://www.w3.org/2018/credentials/v1"; }; readonly minItems: 1; readonly uniqueItems: true; }; readonly id: { readonly description: "Globally unique identifier for the issued credential"; readonly type: "string"; readonly format: "uri"; }; readonly type: { readonly description: "Full type chain, used to identify the credential base types"; readonly type: "array"; readonly items: { readonly type: "string"; }; readonly contains: { readonly type: "string"; readonly const: "VerifiableAttestation"; }; readonly uniqueItems: true; }; readonly issuer: { readonly description: "Defines a property for expressing the issuer of a Verifiable Credential"; readonly oneOf: readonly [ { readonly description: "DID of the credential issuer"; readonly type: "string"; readonly format: "uri"; }, { readonly type: "object"; readonly required: readonly ["id"]; readonly properties: { readonly id: { readonly description: "DID of the credential issuer"; readonly type: "string"; readonly format: "uri"; }; }; }, ]; }; readonly issuanceDate: { readonly description: "Defines the date and time, when the issued credential becomes valid"; readonly type: "string"; readonly format: "date-time"; }; readonly issued: { readonly description: "Defines when the issued credential was issued"; readonly type: "string"; readonly format: "date-time"; }; readonly validFrom: { readonly description: "Defines the date and time, when the issued credential becomes valid"; readonly type: "string"; readonly format: "date-time"; }; readonly validUntil: { readonly description: "Defines the date and time, when the issued credential expires"; readonly type: "string"; readonly format: "date-time"; }; readonly expirationDate: { readonly description: "Defines the date and time, when the issued credential expires"; readonly type: "string"; readonly format: "date-time"; }; readonly credentialSubject: { readonly description: "Defines information about the subject that is defined by the type chain"; readonly anyOf: readonly [ { readonly $ref: "#/allOf/0/%24defs/credentialSubject"; }, { readonly type: "array"; readonly items: { readonly $ref: "#/allOf/0/%24defs/credentialSubject"; }; }, ]; }; readonly credentialStatus: { readonly description: "Defines suspension and/or revocation details for the issued credential. Further redefined by the type extension"; readonly anyOf: readonly [ { readonly $ref: "#/allOf/0/%24defs/credentialStatus"; }, { readonly type: "array"; readonly items: { readonly $ref: "#/allOf/0/%24defs/credentialStatus"; }; }, ]; }; readonly credentialSchema: { readonly description: "One or more schemas that validate the Verifiable Credential."; readonly anyOf: readonly [ { readonly $ref: "#/allOf/0/%24defs/credentialSchema"; }, { readonly type: "array"; readonly items: { readonly $ref: "#/allOf/0/%24defs/credentialSchema"; }; }, ]; }; readonly termsOfUse: { readonly description: "Contains the terms under which the issued credential was issued"; readonly anyOf: readonly [ { readonly $ref: "#/allOf/0/%24defs/termsOfUse"; }, { readonly type: "array"; readonly items: { readonly $ref: "#/allOf/0/%24defs/termsOfUse"; }; }, ]; }; readonly evidence: { readonly description: "Contains the optional evidence used to issue this credential"; readonly anyOf: readonly [ { readonly $ref: "#/allOf/0/%24defs/evidence"; }, { readonly type: "array"; readonly items: { readonly $ref: "#/allOf/0/%24defs/evidence"; }; }, ]; }; }; readonly required: readonly [ "@context", "id", "type", "issuer", "issuanceDate", "issued", "validFrom", "credentialSubject", "credentialSchema", ]; readonly $defs: { readonly credentialSubject: { readonly description: "Defines information about the subject that is defined by the type chain"; readonly type: "object"; readonly properties: { readonly id: { readonly description: "Defines the DID of the subject that is described by the issued credential"; readonly type: "string"; readonly format: "uri"; }; }; }; readonly credentialStatus: { readonly description: "Defines suspension and/or revocation details for the issued credential. Further redefined by the type extension"; readonly type: "object"; readonly properties: { readonly id: { readonly description: "Exact identity for the credential status"; readonly type: "string"; readonly format: "uri"; }; readonly type: { readonly description: "Defines the revocation type extension"; readonly type: "string"; }; }; readonly required: readonly ["id", "type"]; }; readonly credentialSchema: { readonly description: "Contains information about the credential schema on which the issued credential is based"; readonly type: "object"; readonly properties: { readonly id: { readonly description: "References the credential schema stored on the Trusted Schemas Registry (TSR) on which the Verifiable Authorisation is based on"; readonly type: "string"; readonly format: "uri"; }; readonly type: { readonly description: "Defines credential schema type"; readonly type: "string"; }; }; readonly required: readonly ["id", "type"]; }; readonly termsOfUse: { readonly description: "Contains the terms under which the issued credential was issued"; readonly type: "object"; readonly properties: { readonly id: { readonly description: "Contains a URL that points to where more information about this instance of terms of use can be found."; readonly type: "string"; }; readonly type: { readonly description: "Defines the type extension"; readonly type: "string"; }; }; readonly required: readonly ["type"]; }; readonly evidence: { readonly type: "object"; readonly properties: { readonly id: { readonly description: "If present, it SHOULD contain a URL that points to where more information about this instance of evidence can be found."; readonly type: "string"; }; readonly type: { readonly anyOf: readonly [ { readonly description: "Defines the evidence type extension"; readonly type: "string"; }, { readonly description: "Defines the evidence type extension"; readonly type: "array"; readonly items: { readonly type: "string"; }; }, ]; }; }; readonly required: readonly ["type"]; }; }; }, { readonly properties: { readonly credentialSubject: { readonly description: "Contains details about the student and their course enrolment at NOVA IMS."; readonly type: "object"; readonly properties: { readonly firstName: { readonly type: "string"; readonly description: "The given name(s) of the student."; }; readonly familyName: { readonly type: "string"; readonly description: "The family name(s) of the student."; }; readonly courseName: { readonly type: "string"; readonly description: "The official name of the course of study at NOVA IMS."; }; readonly specialization: { readonly type: "string"; readonly description: "The specialisation within the course, if applicable."; }; readonly startDate: { readonly type: "string"; readonly format: "date"; readonly description: "The official start date of the student's enrolment in the course (YYYY-MM-DD)."; }; readonly endDate: { readonly type: "string"; readonly format: "date"; readonly description: "The official or expected end date of the student's enrolment (YYYY-MM-DD)."; }; }; readonly required: readonly [ "firstName", "familyName", "courseName", "startDate", "endDate", ]; }; }; }, ]; readonly $defs: {}; }; export declare const examples: { readonly exampleDigitalCredential: { "@context": [string, string]; id: string; type: string[]; issuer: { id: string; name: string; }; issuanceDate: string; issued: string; validFrom: string; credentialSchema: { id: string; type: string; }; credentialStatus: { id: string; type: string; }; credentialSubject: { id: string; firstName: string; familyName: string; courseName: string; specialization: string; startDate: string; endDate: string; }; }; }; /** * Schema defining a verifiable credential issued by NOVA IMS representing a student's course enrolment details. */ export type NOVAIMSDigitalCredential = EBSIVerifiableAttestation & { /** * Contains details about the student and their course enrolment at NOVA IMS. */ credentialSubject?: { /** * The given name(s) of the student. */ firstName: string; /** * The family name(s) of the student. */ familyName: string; /** * The official name of the course of study at NOVA IMS. */ courseName: string; /** * The specialisation within the course, if applicable. */ specialization?: string; /** * The official start date of the student's enrolment in the course (YYYY-MM-DD). */ startDate: string; /** * The official or expected end date of the student's enrolment (YYYY-MM-DD). */ endDate: string; [k: string]: unknown | undefined; }; [k: string]: unknown | undefined; }; /** * The schema defines a generic structure for any EBSI-related Verifiable Credentials according to the Verifiable Credentials Data Model v1.1 */ export interface EBSIVerifiableAttestation { /** * Semantic context for the issued credential. First element MUST be https://www.w3.org/2018/credentials/v1 * * @minItems 1 */ "@context": [string, ...string[]]; /** * Globally unique identifier for the issued credential */ id: string; /** * Full type chain, used to identify the credential base types */ type: string[]; /** * Defines a property for expressing the issuer of a Verifiable Credential */ issuer: | string | { /** * DID of the credential issuer */ id: string; [k: string]: unknown | undefined; }; /** * Defines the date and time, when the issued credential becomes valid */ issuanceDate: string; /** * Defines when the issued credential was issued */ issued: string; /** * Defines the date and time, when the issued credential becomes valid */ validFrom: string; /** * Defines the date and time, when the issued credential expires */ validUntil?: string; /** * Defines the date and time, when the issued credential expires */ expirationDate?: string; /** * Defines information about the subject that is defined by the type chain */ credentialSubject: CredentialSubject | CredentialSubject[]; /** * Defines suspension and/or revocation details for the issued credential. Further redefined by the type extension */ credentialStatus?: CredentialStatus | CredentialStatus[]; /** * One or more schemas that validate the Verifiable Credential. */ credentialSchema: CredentialSchema | CredentialSchema[]; /** * Contains the terms under which the issued credential was issued */ termsOfUse?: TermsOfUse | TermsOfUse[]; /** * Contains the optional evidence used to issue this credential */ evidence?: Evidence | Evidence[]; [k: string]: unknown | undefined; } /** * Defines information about the subject that is defined by the type chain */ export interface CredentialSubject { /** * Defines the DID of the subject that is described by the issued credential */ id?: string; [k: string]: unknown | undefined; } /** * Defines suspension and/or revocation details for the issued credential. Further redefined by the type extension */ export interface CredentialStatus { /** * Exact identity for the credential status */ id: string; /** * Defines the revocation type extension */ type: string; [k: string]: unknown | undefined; } /** * Contains information about the credential schema on which the issued credential is based */ export interface CredentialSchema { /** * References the credential schema stored on the Trusted Schemas Registry (TSR) on which the Verifiable Authorisation is based on */ id: string; /** * Defines credential schema type */ type: string; [k: string]: unknown | undefined; } /** * Contains the terms under which the issued credential was issued */ export interface TermsOfUse { /** * Contains a URL that points to where more information about this instance of terms of use can be found. */ id?: string; /** * Defines the type extension */ type: string; [k: string]: unknown | undefined; } export interface Evidence { /** * If present, it SHOULD contain a URL that points to where more information about this instance of evidence can be found. */ id?: string; type: string | string[]; [k: string]: unknown | undefined; }