@velocitycareerlabs/common-schemas 1.17.0-dev-build.1bc6fcace
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/NOTICE +1 -0
- package/index.js +28 -0
- package/package.json +16 -0
- package/src/credential-type/credential-type.schema.json +9 -0
- package/src/credential-type/index.js +23 -0
- package/src/credential-type/new-credential-type.schema.json +96 -0
- package/src/did/did-doc.schema.json +148 -0
- package/src/did/did-key.schema.json +62 -0
- package/src/did/did-proof.schema.json +44 -0
- package/src/did/did-service.schema.json +44 -0
- package/src/did/index.js +29 -0
- package/src/did/modify-did-service.schema.json +14 -0
- package/src/entity/immutable-entity.schema.json +15 -0
- package/src/entity/index.js +20 -0
- package/src/entity/mutable-entity.schema.json +19 -0
- package/src/error/error.schema.json +19 -0
- package/src/error/index.js +19 -0
- package/src/general/address.schema.json +33 -0
- package/src/general/date.schema.json +23 -0
- package/src/general/email.schema.json +13 -0
- package/src/general/error-response.schema.json +20 -0
- package/src/general/index.js +37 -0
- package/src/general/location.schema.json +20 -0
- package/src/general/multilingual-string.schema.json +40 -0
- package/src/general/page-body.schema.json +28 -0
- package/src/general/page-query.schema.json +29 -0
- package/src/general/phone.schema.json +13 -0
- package/src/identity/id-document.schema.json +39 -0
- package/src/identity/index.js +21 -0
- package/src/issuing/holder-offer.schema.json +142 -0
- package/src/issuing/index.js +23 -0
- package/src/issuing/issuer-data.schema.json +26 -0
- package/src/jwts/index.js +31 -0
- package/src/jwts/jwt-decode.response.200.schema.json +20 -0
- package/src/jwts/jwt-decode.schema.json +15 -0
- package/src/jwts/jwt-sign.response.200.schema.json +14 -0
- package/src/jwts/jwt-sign.schema.json +40 -0
- package/src/jwts/jwt-verify.response.200.schema.json +17 -0
- package/src/jwts/jwt-verify.schema.json +19 -0
- package/src/organization/index.js +39 -0
- package/src/organization/organization-profile-modification.schema.json +172 -0
- package/src/organization/organization-profile-public-response.schema.js +16 -0
- package/src/organization/organization-profile-verifiable-credential.schema.json +25 -0
- package/src/organization/organization-profile.schema.json +57 -0
- package/src/organization/organization-verified-profile.schema.json +125 -0
- package/src/organization/organization.search-profile.query-params.schema.json +50 -0
- package/src/organization/organization.search.query-params.schema.json +42 -0
- package/src/organization/public-key.schema.json +99 -0
- package/src/organization/registrar-message-response.json +9 -0
- package/src/organization/registrar-message.json +84 -0
- package/src/verification/identify-webhook.request.body.schema.json +113 -0
- package/src/verification/index.js +23 -0
- package/src/verification/verification.identify.response.200.schema.json +12 -0
package/src/did/index.js
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 Velocity Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const didDocSchema = require('./did-doc.schema.json');
|
|
18
|
+
const didServiceSchema = require('./did-service.schema.json');
|
|
19
|
+
const didProofSchema = require('./did-proof.schema.json');
|
|
20
|
+
const modifyDidServiceSchema = require('./modify-did-service.schema.json');
|
|
21
|
+
const didKeySchema = require('./did-key.schema.json');
|
|
22
|
+
|
|
23
|
+
module.exports = {
|
|
24
|
+
didDocSchema,
|
|
25
|
+
didServiceSchema,
|
|
26
|
+
didProofSchema,
|
|
27
|
+
modifyDidServiceSchema,
|
|
28
|
+
didKeySchema,
|
|
29
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "modify-did-service",
|
|
4
|
+
"title": "modify-did-service",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"serviceEndpoint": {
|
|
8
|
+
"type": "string"
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
"required": [
|
|
12
|
+
"serviceEndpoint"
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"$id": "immutable-entity",
|
|
5
|
+
"properties": {
|
|
6
|
+
"id": {
|
|
7
|
+
"type": "string"
|
|
8
|
+
},
|
|
9
|
+
"createdAt": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"format": "date-time"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"required": ["id", "createdAt"]
|
|
15
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 Velocity Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const immutableEntitySchema = require('./immutable-entity.schema.json');
|
|
18
|
+
const mutableEntitySchema = require('./mutable-entity.schema.json');
|
|
19
|
+
|
|
20
|
+
module.exports = { mutableEntitySchema, immutableEntitySchema };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"$id": "mutable-entity",
|
|
5
|
+
"properties": {
|
|
6
|
+
"id": {
|
|
7
|
+
"type": "string"
|
|
8
|
+
},
|
|
9
|
+
"createdAt": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"format": "date-time"
|
|
12
|
+
},
|
|
13
|
+
"updatedAt": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"format": "date-time"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"required": ["id", "createdAt", "updatedAt"]
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "object",
|
|
3
|
+
"$id": "error",
|
|
4
|
+
"properties": {
|
|
5
|
+
"error": {
|
|
6
|
+
"type": "string"
|
|
7
|
+
},
|
|
8
|
+
"message": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"statusCode": {
|
|
12
|
+
"type": "integer"
|
|
13
|
+
},
|
|
14
|
+
"errorCode": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"additionalProperties": true
|
|
19
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 Velocity Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const errorSchema = require('./error.schema.json');
|
|
18
|
+
|
|
19
|
+
module.exports = { errorSchema };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "address",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"$id": "https://velocitynetwork.foundation/schemas/address.schema.json",
|
|
5
|
+
"additionalProperties": false,
|
|
6
|
+
"description": "address validation schema",
|
|
7
|
+
"properties": {
|
|
8
|
+
"line1": {
|
|
9
|
+
"type": "string"
|
|
10
|
+
},
|
|
11
|
+
"line2": {
|
|
12
|
+
"type": "string"
|
|
13
|
+
},
|
|
14
|
+
"line3": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
},
|
|
17
|
+
"regionCode": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"format": "regex",
|
|
20
|
+
"pattern": "^[A-Z]{2}(-[A-Z0-9]{1,3})?$",
|
|
21
|
+
"description": "An uppercase region code as defined by [ISO-3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)"
|
|
22
|
+
},
|
|
23
|
+
"countryCode": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"format": "regex",
|
|
26
|
+
"pattern": "^[A-Z]{2}$",
|
|
27
|
+
"description": "An uppercase two-letter country code as defined by [ISO-3166-1](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)"
|
|
28
|
+
},
|
|
29
|
+
"postcode": {
|
|
30
|
+
"type": "string"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "date",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"$id": "https://velocitynetwork.foundation/schemas/date.schema.json",
|
|
5
|
+
"description": "date validation schema",
|
|
6
|
+
"properties": {
|
|
7
|
+
"day": {
|
|
8
|
+
"type": "integer",
|
|
9
|
+
"minimum": 1,
|
|
10
|
+
"maximum": 31
|
|
11
|
+
},
|
|
12
|
+
"month": {
|
|
13
|
+
"type": "integer",
|
|
14
|
+
"minimum": 1,
|
|
15
|
+
"maximum": 12
|
|
16
|
+
},
|
|
17
|
+
"year": {
|
|
18
|
+
"type": "integer",
|
|
19
|
+
"minimum": 500
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"additionalProperties": false
|
|
23
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "email",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"$id": "https://velocitynetwork.foundation/schemas/email.schema.json",
|
|
5
|
+
"description": "email schema",
|
|
6
|
+
"properties": {
|
|
7
|
+
"email": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"format": "email"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"required": ["email"]
|
|
13
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "error-response",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"$id": "https://velocitynetwork.foundation/schemas/error-response.schema.json",
|
|
5
|
+
"description": "error response schema",
|
|
6
|
+
"properties": {
|
|
7
|
+
"error": {
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
"message": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"statusCode": {
|
|
14
|
+
"type": "integer"
|
|
15
|
+
},
|
|
16
|
+
"errorCode": {
|
|
17
|
+
"type": "string"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 Velocity Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const addressSchema = require('./address.schema.json');
|
|
18
|
+
const dateSchema = require('./date.schema.json');
|
|
19
|
+
const locationSchema = require('./location.schema.json');
|
|
20
|
+
const multilingualStringSchema = require('./multilingual-string.schema.json');
|
|
21
|
+
const emailSchema = require('./email.schema.json');
|
|
22
|
+
const phoneSchema = require('./phone.schema.json');
|
|
23
|
+
const pageBodySchema = require('./page-body.schema.json');
|
|
24
|
+
const pageQuerySchema = require('./page-query.schema.json');
|
|
25
|
+
const errorResponseSchema = require('./error-response.schema.json');
|
|
26
|
+
|
|
27
|
+
module.exports = {
|
|
28
|
+
addressSchema,
|
|
29
|
+
dateSchema,
|
|
30
|
+
locationSchema,
|
|
31
|
+
multilingualStringSchema,
|
|
32
|
+
emailSchema,
|
|
33
|
+
phoneSchema,
|
|
34
|
+
pageBodySchema,
|
|
35
|
+
pageQuerySchema,
|
|
36
|
+
errorResponseSchema,
|
|
37
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "location",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"$id": "https://velocitynetwork.foundation/schemas/location.schema.json",
|
|
5
|
+
"description": "location validation schema",
|
|
6
|
+
"properties": {
|
|
7
|
+
"countryCode": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"format": "regex",
|
|
10
|
+
"pattern": "^[A-Z]{2}$"
|
|
11
|
+
},
|
|
12
|
+
"regionCode": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"format": "regex",
|
|
15
|
+
"pattern": "^[A-Za-z0-9]{1,3}(-[A-Za-z0-9]{1,3})?$",
|
|
16
|
+
"description": "An uppercase region code as defined by [ISO-3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"additionalProperties": false
|
|
20
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
|
|
2
|
+
{
|
|
3
|
+
"type": "object",
|
|
4
|
+
"title": "multilingual-string",
|
|
5
|
+
"$id": "https://velocitynetwork.foundation/schemas/multilingual-string.schema.json",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"description": "an internationalized version of a string",
|
|
8
|
+
"properties": {
|
|
9
|
+
"localized": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"propertyNames": {
|
|
12
|
+
"pattern": "^[a-z]{2}(_[A-Z]{2})?$"
|
|
13
|
+
},
|
|
14
|
+
"additionalProperties": {
|
|
15
|
+
"type": "string"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"preferredLocale": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"properties": {
|
|
21
|
+
"country": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"format": "regex",
|
|
24
|
+
"pattern": "^[A-Z]{2}$"
|
|
25
|
+
},
|
|
26
|
+
"language": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"format": "regex",
|
|
29
|
+
"pattern": "^[a-z]{2}$"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"required": [
|
|
33
|
+
"language"
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"required": [
|
|
38
|
+
"localized"
|
|
39
|
+
]
|
|
40
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "page-body",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"$id": "https://velocitynetwork.foundation/schemas/page-body.schema.json",
|
|
5
|
+
"description": "Schema for configuring pagination with a page body",
|
|
6
|
+
"properties": {
|
|
7
|
+
"size": {
|
|
8
|
+
"type": "number",
|
|
9
|
+
"description": "The number of items to display per page"
|
|
10
|
+
},
|
|
11
|
+
"skip": {
|
|
12
|
+
"type": "number",
|
|
13
|
+
"description": "The number of items to skip before displaying the page (DEPRECATED)"
|
|
14
|
+
},
|
|
15
|
+
"nextPageToken": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "The token to use to retrieve the next page"
|
|
18
|
+
},
|
|
19
|
+
"prevPageToken": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"description": "The token to use to retrieve the previous page"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"required": [
|
|
25
|
+
"size"
|
|
26
|
+
],
|
|
27
|
+
"additionalProperties": false
|
|
28
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "page-query",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"$id": "https://velocitynetwork.foundation/schemas/page-query.schema.json",
|
|
5
|
+
"description": "Schema for configuring pagination with a page in the querystring",
|
|
6
|
+
"properties": {
|
|
7
|
+
"page": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"properties": {
|
|
10
|
+
"size": {
|
|
11
|
+
"type": "integer",
|
|
12
|
+
"minimum": 1
|
|
13
|
+
},
|
|
14
|
+
"skip": {
|
|
15
|
+
"type": "integer",
|
|
16
|
+
"minimum": 0
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"sort": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"items": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"minItems": 2,
|
|
25
|
+
"maxItems": 2
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "phone",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"$id": "https://velocitynetwork.foundation/schemas/phone-number.schema.json",
|
|
5
|
+
"description": "phone schema",
|
|
6
|
+
"properties": {
|
|
7
|
+
"phone": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"pattern": "^\\+[1-9]\\d{1,14}$"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"required": ["phone"]
|
|
13
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "id-document",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"$id": "https://velocitynetwork.foundation/schemas/id-document.schema.json",
|
|
5
|
+
"description": "id document v1 schema",
|
|
6
|
+
"properties": {
|
|
7
|
+
"kind": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "DriversLicense, IdCard, SSN, NI Number, etc"
|
|
10
|
+
},
|
|
11
|
+
"authorityId": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "DID id of the issuing authority"
|
|
14
|
+
},
|
|
15
|
+
"location": {
|
|
16
|
+
"$ref": "https://velocitynetwork.foundation/schemas/location.schema.json#"
|
|
17
|
+
},
|
|
18
|
+
"identityNumber": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "The id number of the identity credential"
|
|
21
|
+
},
|
|
22
|
+
"firstName": {
|
|
23
|
+
"$ref": "https://velocitynetwork.foundation/schemas/multilingual-string.schema.json#"
|
|
24
|
+
},
|
|
25
|
+
"lastName": {
|
|
26
|
+
"$ref": "https://velocitynetwork.foundation/schemas/multilingual-string.schema.json#"
|
|
27
|
+
},
|
|
28
|
+
"middleNames": {
|
|
29
|
+
"$ref": "https://velocitynetwork.foundation/schemas/multilingual-string.schema.json#"
|
|
30
|
+
},
|
|
31
|
+
"address": {
|
|
32
|
+
"$ref": "https://velocitynetwork.foundation/schemas/address.schema.json#"
|
|
33
|
+
},
|
|
34
|
+
"dob": {
|
|
35
|
+
"$ref": "https://velocitynetwork.foundation/schemas/date.schema.json#"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"required": []
|
|
39
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 Velocity Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const idDocumentSchema = require('./id-document.schema.json');
|
|
18
|
+
|
|
19
|
+
module.exports = {
|
|
20
|
+
idDocumentSchema,
|
|
21
|
+
};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://velocitycareerlabs.io/holder-offer.schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"description": "An offer is similar to a credential but is never encoded as a JWT as it doesnt carry the digital signature.",
|
|
6
|
+
"additionalProperties": false,
|
|
7
|
+
"properties": {
|
|
8
|
+
"type": {
|
|
9
|
+
"type": "array",
|
|
10
|
+
"items": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"description": "type is identical to the standard based type found on verifiable credentials but does not accept a string, it only accepts an array to indicate an unordered set of type URIs"
|
|
14
|
+
},
|
|
15
|
+
"issuer": {
|
|
16
|
+
"oneOf": [
|
|
17
|
+
{
|
|
18
|
+
"type": "object",
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"required": [
|
|
21
|
+
"id"
|
|
22
|
+
],
|
|
23
|
+
"properties": {
|
|
24
|
+
"id": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "the did id for the issuer."
|
|
27
|
+
},
|
|
28
|
+
"type": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "the type of the issuer property"
|
|
31
|
+
},
|
|
32
|
+
"name": {
|
|
33
|
+
"type": "string"
|
|
34
|
+
},
|
|
35
|
+
"image": {
|
|
36
|
+
"type": "string"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"type": "string"
|
|
42
|
+
}
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"credentialSubject": {
|
|
46
|
+
"type": "object",
|
|
47
|
+
"additionalProperties": true,
|
|
48
|
+
"description": "Contains all the claims of the credential"
|
|
49
|
+
},
|
|
50
|
+
"credentialSchema": {
|
|
51
|
+
"oneOf": [
|
|
52
|
+
{
|
|
53
|
+
"type": "object",
|
|
54
|
+
"description": "Contains all the claims of the credential",
|
|
55
|
+
"properties": {
|
|
56
|
+
"type": {
|
|
57
|
+
"type": "string"
|
|
58
|
+
},
|
|
59
|
+
"id": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"format": "uri"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"required": [
|
|
65
|
+
"type",
|
|
66
|
+
"id"
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "array",
|
|
71
|
+
"items": {
|
|
72
|
+
"type": "object",
|
|
73
|
+
"description": "Contains all the claims of the credential",
|
|
74
|
+
"properties": {
|
|
75
|
+
"type": {
|
|
76
|
+
"type": "string"
|
|
77
|
+
},
|
|
78
|
+
"id": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"format": "uri"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"required": [
|
|
84
|
+
"type",
|
|
85
|
+
"id"
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
"offerCreationDate": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"format": "date-time"
|
|
94
|
+
},
|
|
95
|
+
"offerExpirationDate": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"format": "date-time"
|
|
98
|
+
},
|
|
99
|
+
"offerId": {
|
|
100
|
+
"type": "string"
|
|
101
|
+
},
|
|
102
|
+
"id": {
|
|
103
|
+
"type": "string"
|
|
104
|
+
},
|
|
105
|
+
"exchangeId": {
|
|
106
|
+
"type": "string"
|
|
107
|
+
},
|
|
108
|
+
"hash": {
|
|
109
|
+
"type": "string"
|
|
110
|
+
},
|
|
111
|
+
"linkedCredentials": {
|
|
112
|
+
"type": "array",
|
|
113
|
+
"items": {
|
|
114
|
+
"type": "object",
|
|
115
|
+
"properties": {
|
|
116
|
+
"linkCode": {
|
|
117
|
+
"type": "string"
|
|
118
|
+
},
|
|
119
|
+
"linkType": {
|
|
120
|
+
"type": "string",
|
|
121
|
+
"enum": [
|
|
122
|
+
"REPLACE"
|
|
123
|
+
]
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"required": [
|
|
127
|
+
"linkCode",
|
|
128
|
+
"linkType"
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
"required": [
|
|
134
|
+
"type",
|
|
135
|
+
"issuer",
|
|
136
|
+
"credentialSubject",
|
|
137
|
+
"offerCreationDate",
|
|
138
|
+
"offerExpirationDate",
|
|
139
|
+
"offerId",
|
|
140
|
+
"hash"
|
|
141
|
+
]
|
|
142
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 Velocity Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
const issuerDataSchema = require('./issuer-data.schema.json');
|
|
18
|
+
const holderOfferSchema = require('./holder-offer.schema.json');
|
|
19
|
+
|
|
20
|
+
module.exports = {
|
|
21
|
+
issuerDataSchema,
|
|
22
|
+
holderOfferSchema,
|
|
23
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "issuer-data",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"$id": "https://velocitynetwork.foundation/schemas/issuer-data.schema.json",
|
|
5
|
+
"description": "issuer data schema",
|
|
6
|
+
"properties": {
|
|
7
|
+
"credentialType": {
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
"issuer": {
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"issued": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"format": "date-time"
|
|
16
|
+
},
|
|
17
|
+
"validFrom": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"format": "date-time"
|
|
20
|
+
},
|
|
21
|
+
"validUntil": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"format": "date-time"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|