diff --git a/.changeset/EBSISD-3000.md b/.changeset/EBSISD-3000.md new file mode 100644 index 0000000000000000000000000000000000000000..ad5f4993bfcad5f19b156642c3abbaf64d4d8691 --- /dev/null +++ b/.changeset/EBSISD-3000.md @@ -0,0 +1,5 @@ +--- +"@cef-ebsi/vcdm2.0-lpid-schema": major +--- + +Create initial version of the schema. diff --git a/manifest.json b/manifest.json index f8e06bfdf3319df88072a061a6d60db80b760ab8..fc1bb5a4d53c4e3e5e573e73bb507b6cfa7d8c59 100644 --- a/manifest.json +++ b/manifest.json @@ -131,6 +131,18 @@ "verification": "Documents & Products", "context": "General" }, + { + "name": "@cef-ebsi/vcdm2.0-lpid-schema", + "version": "0.0.0", + "title": "Legal Person Identification Data (LPID)", + "description": "Data Type for the Legal Person Identification Data (LPID)", + "idBase16": "0xe2a64248941def3e4d53026a8c078891cb0eb91d3a6dc31bff7dcc81e35b89ef", + "idBase58": "zGFkBSGfJPxBeKSB3Ps7vpkCFXtgdbLJ7DQwAWaWncxPG", + "file": "schemas/vcdm2.0/lpid/schema.json", + "vcdm": "2.0", + "verification": "Documents", + "context": "General" + }, { "name": "@cef-ebsi/vcdm2.0-presentation-schema", "version": "1.0.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9d2324627ad887e858628802e1447a5ef32edcb5..a0f64d5f4d8a5a2ad7052ca384a10625033ed8f7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -312,6 +312,12 @@ importers: specifier: workspace:* version: link:../attestation + schemas/vcdm2.0/lpid: + dependencies: + '@cef-ebsi/vcdm2.0-attestation-schema': + specifier: workspace:* + version: link:../attestation + schemas/vcdm2.0/multi-uni-pilot/employment-attestation: dependencies: '@cef-ebsi/vcdm2.0-attestation-schema': @@ -3956,8 +3962,8 @@ packages: resolution: {integrity: sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==} dev: true - /nanoid@3.3.7: - resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} + /nanoid@3.3.8: + resolution: {integrity: sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true dev: true @@ -4234,8 +4240,8 @@ packages: resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} dev: true - /picocolors@1.1.0: - resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==} + /picocolors@1.1.1: + resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} dev: true /picomatch@2.3.1: @@ -4274,12 +4280,12 @@ packages: engines: {node: '>= 0.4'} dev: true - /postcss@8.4.47: - resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==} + /postcss@8.4.49: + resolution: {integrity: sha512-OCVPnIObs4N29kxTjzLfUryOkvZEq+pf8jTF0lg8E7uETuWHA+v7j3c/xJmiqpX450191LlmZfUKkXxkTry7nA==} engines: {node: ^10 || ^12 || >=14} dependencies: - nanoid: 3.3.7 - picocolors: 1.1.0 + nanoid: 3.3.8 + picocolors: 1.1.1 source-map-js: 1.2.1 dev: true @@ -4987,7 +4993,7 @@ packages: cac: 6.7.14 debug: 4.3.6 pathe: 1.1.2 - picocolors: 1.1.0 + picocolors: 1.1.1 vite: 5.4.6 transitivePeerDependencies: - '@types/node' @@ -5033,7 +5039,7 @@ packages: optional: true dependencies: esbuild: 0.21.5 - postcss: 8.4.47 + postcss: 8.4.49 rollup: 4.22.4 optionalDependencies: fsevents: 2.3.3 @@ -5076,7 +5082,7 @@ packages: local-pkg: 0.5.0 magic-string: 0.30.11 pathe: 1.1.2 - picocolors: 1.1.0 + picocolors: 1.1.1 std-env: 3.7.0 strip-literal: 2.1.0 tinybench: 2.9.0 diff --git a/schemas/vcdm2.0/lpid/CHANGELOG.md b/schemas/vcdm2.0/lpid/CHANGELOG.md new file mode 100644 index 0000000000000000000000000000000000000000..2d95859961618546b9422301ebd095d7f92d67b1 --- /dev/null +++ b/schemas/vcdm2.0/lpid/CHANGELOG.md @@ -0,0 +1 @@ +# @cef-ebsi/vcdm2.0-lpid-schema diff --git a/schemas/vcdm2.0/lpid/README.md b/schemas/vcdm2.0/lpid/README.md new file mode 100644 index 0000000000000000000000000000000000000000..be3cd8604817c27305486e4ec275569da28c7bcd --- /dev/null +++ b/schemas/vcdm2.0/lpid/README.md @@ -0,0 +1,153 @@ + + +# @cef-ebsi/vcdm2.0-lpid-schema + +> Legal Person Identification Data (LPID) +> +> Data Type for the Legal Person Identification Data (LPID) + +The schema is published to the [Trusted Schemas Registry](https://hub.ebsi.eu/apis/pilot/trusted-schemas-registry) with the IDs: + +- `0xe2a64248941def3e4d53026a8c078891cb0eb91d3a6dc31bff7dcc81e35b89ef` (hexadecimal) +- `zGFkBSGfJPxBeKSB3Ps7vpkCFXtgdbLJ7DQwAWaWncxPG` (multibase base58btc) + +## Table of Contents + +- [JSON Schema](#json-schema) +- [Installation](#installation) +- [Usage](#usage) +- [License](#license) + +## JSON Schema + +```json +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Legal Person Identification Data (LPID)", + "description": "Data Type for the Legal Person Identification Data (LPID)", + "type": "object", + "allOf": [ + { + "$ref": "./node_modules/@cef-ebsi/vcdm2.0-attestation-schema/schema.json" + }, + { + "$ref": "#/$defs/lpid" + } + ], + "$defs": { + "lpid": { + "type": "object", + "properties": { + "issuingAuthorityId": { + "type": "string" + }, + "issuingAuthority": { + "type": "string" + }, + "issuerCountry": { + "type": "string" + }, + "issuingJurisdiction": { + "type": "string" + }, + "issuanceDate": { + "type": "string" + }, + "expiryDate": { + "type": "string" + }, + "schemaId": { + "type": "string" + }, + "schemaVersion": { + "type": "string" + }, + "schemaLocation": { + "type": "string" + }, + "revocationId": { + "type": "string" + }, + "revocationLocation": { + "type": "string" + }, + "authenticSourceId": { + "type": "string" + }, + "authenticSourceName": { + "type": "string" + }, + "credentialSubject": { + "type": "object", + "description": "Data Type for the Legal Person Identification Data (LPID)", + "properties": { + "legalPersonId": { + "type": "string" + }, + "legalPersonName": { + "type": "string" + } + }, + "required": ["legalPersonId", "legalPersonName"] + } + }, + "required": [ + "issuingAuthorityId", + "issuingAuthority", + "issuerCountry", + "issuingJurisdiction", + "issuanceDate", + "expiryDate", + "schemaId", + "schemaVersion", + "schemaLocation", + "revocationId", + "revocationLocation", + "authenticSourceId", + "authenticSourceName", + "credentialSubject" + ] + } + } +} +``` + +## Installation + +```sh +# with npm +npm add @cef-ebsi/vcdm2.0-lpid-schema@0.0.0 + +# with Yarn +yarn add @cef-ebsi/vcdm2.0-lpid-schema@0.0.0 + +# with pnpm +pnpm add @cef-ebsi/vcdm2.0-lpid-schema@0.0.0 +``` + +## Usage + +The package exports the schema and its metadata as JavaScript objects: + +```js +import { schema, metadata } from "@cef-ebsi/vcdm2.0-lpid-schema"; + +// you can now use the schema and metadata +``` + +In addition, the package exports a TypeScript type corresponding to the schema: + +```ts +import type { LegalPersonIdentificationDataLPID } from "@cef-ebsi/vcdm2.0-lpid-schema"; +``` + +## License + +Copyright (C) 2024 European Union + +This program is free software: you can redistribute it and/or modify it under the terms of the EUROPEAN UNION PUBLIC LICENCE v. 1.2 as published by the European Union. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the EUROPEAN UNION PUBLIC LICENCE v. 1.2 for further details. + +You should have received a copy of the EUROPEAN UNION PUBLIC LICENCE v. 1.2. along with this program. If not, see <https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12>. diff --git a/schemas/vcdm2.0/lpid/examples/lpid.json b/schemas/vcdm2.0/lpid/examples/lpid.json new file mode 100644 index 0000000000000000000000000000000000000000..3e11043ea1500982a2853cf73aaeb76d7f97ef6b --- /dev/null +++ b/schemas/vcdm2.0/lpid/examples/lpid.json @@ -0,0 +1,28 @@ +{ + "@context": ["https://www.w3.org/ns/credentials/v2"], + "id": "id:1", + "type": ["--TYPE-TO-BE-DEFINED-FOR-LPID--"], + "issuer": "issuer:0", + "validFrom": "2024-01-01T00:00:00Z", + "issuingAuthorityId": "bolagsverket-001", + "issuingAuthority": "Bolagsverket", + "issuerCountry": "SE", + "issuingJurisdiction": "Sweden", + "issuanceDate": "2023-01-01", + "expiryDate": "2025-01-01", + "schemaId": "schema:bolagsverket-lpid", + "schemaVersion": "1.0.0", + "schemaLocation": "https://bolagsverket.se/schemas/legal-person-id", + "revocationId": "rev001", + "revocationLocation": "https://bolagsverket.se/revocations/legal-person-id", + "authenticSourceId": "auth-source-001", + "authenticSourceName": "Bolagsverket Official Records", + "credentialSubject": { + "legalPersonId": "SE5560160680", + "legalPersonName": "Acme AB" + }, + "credentialSchema": { + "id": "id:2", + "type": "JsonSchema" + } +} diff --git a/schemas/vcdm2.0/lpid/package.json b/schemas/vcdm2.0/lpid/package.json new file mode 100644 index 0000000000000000000000000000000000000000..3f6791f4d20d73c8273305958091d263fd059550 --- /dev/null +++ b/schemas/vcdm2.0/lpid/package.json @@ -0,0 +1,24 @@ +{ + "name": "@cef-ebsi/vcdm2.0-lpid-schema", + "version": "0.0.0", + "description": "Legal Person Identification Data (VCDM 2.0)", + "license": "EUPL-1.2", + "repository": { + "type": "git", + "url": "https://code.europa.eu/ebsi/json-schema.git", + "directory": "schemas/vcdm2.0/lpid" + }, + "type": "module", + "exports": "./dist/index.js", + "types": "./dist/index.d.ts", + "sideEffects": false, + "files": [ + "dist", + "examples", + "schema.json", + "schema.metadata.json" + ], + "dependencies": { + "@cef-ebsi/vcdm2.0-attestation-schema": "workspace:*" + } +} diff --git a/schemas/vcdm2.0/lpid/schema.json b/schemas/vcdm2.0/lpid/schema.json new file mode 100644 index 0000000000000000000000000000000000000000..e9a453257d7497156b505b68ad619757e00d5eb8 --- /dev/null +++ b/schemas/vcdm2.0/lpid/schema.json @@ -0,0 +1,89 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "Legal Person Identification Data (LPID)", + "description": "Data Type for the Legal Person Identification Data (LPID)", + "type": "object", + "allOf": [ + { + "$ref": "./node_modules/@cef-ebsi/vcdm2.0-attestation-schema/schema.json" + }, + { + "$ref": "#/$defs/lpid" + } + ], + "$defs": { + "lpid": { + "type": "object", + "properties": { + "issuingAuthorityId": { + "type": "string" + }, + "issuingAuthority": { + "type": "string" + }, + "issuerCountry": { + "type": "string" + }, + "issuingJurisdiction": { + "type": "string" + }, + "issuanceDate": { + "type": "string" + }, + "expiryDate": { + "type": "string" + }, + "schemaId": { + "type": "string" + }, + "schemaVersion": { + "type": "string" + }, + "schemaLocation": { + "type": "string" + }, + "revocationId": { + "type": "string" + }, + "revocationLocation": { + "type": "string" + }, + "authenticSourceId": { + "type": "string" + }, + "authenticSourceName": { + "type": "string" + }, + "credentialSubject": { + "type": "object", + "description": "Data Type for the Legal Person Identification Data (LPID)", + "properties": { + "legalPersonId": { + "type": "string" + }, + "legalPersonName": { + "type": "string" + } + }, + "required": ["legalPersonId", "legalPersonName"] + } + }, + "required": [ + "issuingAuthorityId", + "issuingAuthority", + "issuerCountry", + "issuingJurisdiction", + "issuanceDate", + "expiryDate", + "schemaId", + "schemaVersion", + "schemaLocation", + "revocationId", + "revocationLocation", + "authenticSourceId", + "authenticSourceName", + "credentialSubject" + ] + } + } +} diff --git a/schemas/vcdm2.0/lpid/schema.metadata.json b/schemas/vcdm2.0/lpid/schema.metadata.json new file mode 100644 index 0000000000000000000000000000000000000000..144c376e67833033644f3c9e48715bd812ab9748 --- /dev/null +++ b/schemas/vcdm2.0/lpid/schema.metadata.json @@ -0,0 +1,9 @@ +{ + "vcdm": "2.0", + "id": { + "base16": "0xe2a64248941def3e4d53026a8c078891cb0eb91d3a6dc31bff7dcc81e35b89ef", + "multibase_base58btc": "zGFkBSGfJPxBeKSB3Ps7vpkCFXtgdbLJ7DQwAWaWncxPG" + }, + "verification": "Documents", + "context": "General" +}