@pdtf/schemas 0.7.2 → 0.7.5
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/package.json +1 -1
- package/src/examples/exampleAddParticipantVouch.json +32 -0
- package/src/examples/exampleDocumentedVouch.json +2 -1
- package/src/schemas/legal-information.json +6 -6
- package/src/schemas/material-facts.json +10 -4
- package/src/schemas/pdtf-transaction-search-results.json +40 -0
- package/src/schemas/pdtf-verified-claims.json +4 -11
- package/src/tests/pdtfVerifiedClaims.test.js +9 -9
- package/src/tests/verifiedClaimsValidator.test.js +5 -5
- package/src/schemas/verified_claims-12.json +0 -621
package/package.json
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"verification": {
|
|
3
|
+
"trust_framework": "uk_pdtf",
|
|
4
|
+
"time": "2022-01-25T13:05:03.108Z",
|
|
5
|
+
"evidence": [
|
|
6
|
+
{
|
|
7
|
+
"type": "vouch",
|
|
8
|
+
"attestation": {
|
|
9
|
+
"type": "digital_attestation",
|
|
10
|
+
"voucher": {
|
|
11
|
+
"name": "Martin Abode"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"verification_method": {
|
|
15
|
+
"type": "auth"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"claims": {
|
|
21
|
+
"/participants/-": {
|
|
22
|
+
"name": {
|
|
23
|
+
"firstName": "Martin",
|
|
24
|
+
"lastName": "Abode"
|
|
25
|
+
},
|
|
26
|
+
"email": "martin@abode.co.uk",
|
|
27
|
+
"organisation": "Abode and Floggit Estate Agents",
|
|
28
|
+
"organisationReference": "MAR/12243/22",
|
|
29
|
+
"role": "Estate Agent"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"value": "randomHashValue"
|
|
13
13
|
},
|
|
14
14
|
"url": "https://fakeFileStore.com/some/kind/of/file",
|
|
15
|
-
"desc": "proofOfAddress.pdf"
|
|
15
|
+
"desc": "proofOfAddress.pdf",
|
|
16
|
+
"pdtfSchemaPath": "/propertyPack/materialFacts/councilTax/councilTaxAffectingAlterations/details"
|
|
16
17
|
}
|
|
17
18
|
],
|
|
18
19
|
"verification_method": {
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"minItems": 1,
|
|
27
27
|
"items": {
|
|
28
28
|
"type": "object",
|
|
29
|
+
"baspiRef": "B1.1.1",
|
|
29
30
|
"title": "Owner name",
|
|
30
31
|
"required": ["firstName", "lastName"],
|
|
31
32
|
"properties": {
|
|
@@ -254,7 +255,7 @@
|
|
|
254
255
|
"type": "object",
|
|
255
256
|
"properties": {
|
|
256
257
|
"hasSolarPanels": {
|
|
257
|
-
"baspiRef": "
|
|
258
|
+
"baspiRef": "B4.3",
|
|
258
259
|
"RDSRef": "Property/Flags",
|
|
259
260
|
"title": "Are there solar or photovoltaic panels installed at the property?",
|
|
260
261
|
"type": "string",
|
|
@@ -736,7 +737,7 @@
|
|
|
736
737
|
"baspiRef": "B7.5",
|
|
737
738
|
"RDSRef": "",
|
|
738
739
|
"title": "Do you have a Digital Property Logbook?",
|
|
739
|
-
"description": "See https://www.rlba.org.uk/what-is-a-property-logbook?
|
|
740
|
+
"description": "See https://www.rlba.org.uk/what-is-a-property-logbook?",
|
|
740
741
|
"type": "object",
|
|
741
742
|
"properties": {
|
|
742
743
|
"yesNo": {
|
|
@@ -763,8 +764,7 @@
|
|
|
763
764
|
"enum": ["Yes"]
|
|
764
765
|
},
|
|
765
766
|
"willHandoverLogbook": {
|
|
766
|
-
"title": "Please confirm that on completion you will
|
|
767
|
-
"description": "[NOTE: It is recommended that you reset the password before handing it over to avoid security issues by passing on your own password.]",
|
|
767
|
+
"title": "Please confirm that on completion you will transfer it to the new owner",
|
|
768
768
|
"type": "boolean",
|
|
769
769
|
"const": true
|
|
770
770
|
}
|
|
@@ -915,13 +915,13 @@
|
|
|
915
915
|
"yesNo": {
|
|
916
916
|
"enum": ["No", "Not required"]
|
|
917
917
|
},
|
|
918
|
-
"
|
|
918
|
+
"details": {
|
|
919
919
|
"title": "Please outline the reasons why",
|
|
920
920
|
"type": "string",
|
|
921
921
|
"minLength": 1
|
|
922
922
|
}
|
|
923
923
|
},
|
|
924
|
-
"required": ["
|
|
924
|
+
"required": ["details"]
|
|
925
925
|
}
|
|
926
926
|
]
|
|
927
927
|
}
|
|
@@ -248,6 +248,7 @@
|
|
|
248
248
|
"required": ["hasDelayFactors"],
|
|
249
249
|
"properties": {
|
|
250
250
|
"hasDelayFactors": {
|
|
251
|
+
"baspiRef": "A1.2.1",
|
|
251
252
|
"title": "Are you aware of any factors which might delay or complicate the sale?",
|
|
252
253
|
"description": "E.g. family split, pending application for grant of probate, absent seller or unregistered title? If yes, provide details and likely timescale for delay (if known)",
|
|
253
254
|
"$ref": "#/$defs/yesNoDetailIfYes"
|
|
@@ -294,6 +295,7 @@
|
|
|
294
295
|
"enum": ["Other"]
|
|
295
296
|
},
|
|
296
297
|
"otherOwnershipDetails": {
|
|
298
|
+
"baspiRef": "A1.3.2",
|
|
297
299
|
"title": "Details of the ownership type",
|
|
298
300
|
"type": "string",
|
|
299
301
|
"minLength": 1
|
|
@@ -1251,7 +1253,7 @@
|
|
|
1251
1253
|
"type": "string"
|
|
1252
1254
|
},
|
|
1253
1255
|
"maintenanceAgreements": {
|
|
1254
|
-
"
|
|
1256
|
+
"baspiRef": "A7.2",
|
|
1255
1257
|
"RDSRef": "Services/Certificates,Services/OtherServices/Certificates",
|
|
1256
1258
|
"title": "Do you have any licences, maintenance agreements, contracts or service agreements in relation to this service?",
|
|
1257
1259
|
"$ref": "#/$defs/yesNoDetailIfYes"
|
|
@@ -1351,6 +1353,7 @@
|
|
|
1351
1353
|
"required": ["hasGreenDealLoan"],
|
|
1352
1354
|
"properties": {
|
|
1353
1355
|
"hasGreenDealLoan": {
|
|
1356
|
+
"baspiRef": "A7.3",
|
|
1354
1357
|
"title": "Is this property subject to a Green Deal loan or other financed home improvement scheme?",
|
|
1355
1358
|
"description": "If yes, please provide details below including any outstanding payments for the renewable devices and any feed-in tariffs and a copy of your fuel bills",
|
|
1356
1359
|
"$ref": "#/$defs/yesNoDetailIfYes"
|
|
@@ -1366,6 +1369,7 @@
|
|
|
1366
1369
|
"required": ["hasCentralHeating"],
|
|
1367
1370
|
"properties": {
|
|
1368
1371
|
"hasCentralHeating": {
|
|
1372
|
+
"baspiRef": "A7.4",
|
|
1369
1373
|
"title": "Is there full/partial central heating in your property?",
|
|
1370
1374
|
"type": "string",
|
|
1371
1375
|
"enum": ["Yes", "No"]
|
|
@@ -1400,7 +1404,7 @@
|
|
|
1400
1404
|
"required": ["centralHeatingFuelType"],
|
|
1401
1405
|
"properties": {
|
|
1402
1406
|
"centralHeatingFuelType": {
|
|
1403
|
-
"baspiRef": "
|
|
1407
|
+
"baspiRef": "A7.5.1a",
|
|
1404
1408
|
"title": "What type of fuel does the system and boiler run on?",
|
|
1405
1409
|
"type": "string",
|
|
1406
1410
|
"enum": ["Gas", "Electricity", "Oil", "LPG", "Other"]
|
|
@@ -1423,6 +1427,7 @@
|
|
|
1423
1427
|
"enum": ["Other"]
|
|
1424
1428
|
},
|
|
1425
1429
|
"otherCentralHeatingFuelType": {
|
|
1430
|
+
"baspiRef": "A7.5.1b",
|
|
1426
1431
|
"title": "Please describe the other fuel type",
|
|
1427
1432
|
"type": "string",
|
|
1428
1433
|
"minLength": 1
|
|
@@ -1742,6 +1747,7 @@
|
|
|
1742
1747
|
"required": ["consumerProtectionRegulationsResponse"],
|
|
1743
1748
|
"properties": {
|
|
1744
1749
|
"consumerProtectionRegulationsResponse": {
|
|
1750
|
+
"baspiRef": "A13.1",
|
|
1745
1751
|
"title": "Seller's declaration",
|
|
1746
1752
|
"description": "I/we confirm the answers to be truthful and accurate and to the best of my/our knowledge. The questions have been designed to assist with the disclosure of material information and any misleading or incorrect answers are likely to be exposed later in the legal process which may hinder my/our sale. I/we will provide my property lawyer with the additional documentation in support of the information supplied on this form. If there are any changes which alter the information provided, I/we will immediately notify the person marketing the property as well as my/our property lawyer.",
|
|
1747
1753
|
"type": "boolean",
|
|
@@ -1907,7 +1913,7 @@
|
|
|
1907
1913
|
"type": "string"
|
|
1908
1914
|
},
|
|
1909
1915
|
"maintenanceAgreements": {
|
|
1910
|
-
"
|
|
1916
|
+
"baspiRef": "A7.2",
|
|
1911
1917
|
"RDSRef": "Services/Certificates,Services/OtherServices/Certificates",
|
|
1912
1918
|
"title": "Do you have any licences, maintenance agreements, contracts or service agreements in relation to this service?",
|
|
1913
1919
|
"$ref": "#/$defs/yesNoDetailIfYes"
|
|
@@ -1930,7 +1936,7 @@
|
|
|
1930
1936
|
"type": "string"
|
|
1931
1937
|
},
|
|
1932
1938
|
"maintenanceAgreements": {
|
|
1933
|
-
"
|
|
1939
|
+
"baspiRef": "A7.2",
|
|
1934
1940
|
"RDSRef": "Services/Certificates,Services/OtherServices/Certificates",
|
|
1935
1941
|
"title": "Do you have any licences, maintenance agreements, contracts or service agreements in relation to this service?",
|
|
1936
1942
|
"$ref": "#/$defs/yesNoDetailIfYes"
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/Property-Data-Trust-Framework/schemas/master/src/schemas/minified-pdtf-transaction.json",
|
|
4
|
+
"title": "Property Data Trust Framework Transaction Schema",
|
|
5
|
+
"description": "A schema defining search results containing minimal elements of the PDTF transaction data structure.",
|
|
6
|
+
"type": "array",
|
|
7
|
+
"items": {
|
|
8
|
+
"type": "object",
|
|
9
|
+
"required": [
|
|
10
|
+
"$schema",
|
|
11
|
+
"transactionId",
|
|
12
|
+
"status",
|
|
13
|
+
"uprn",
|
|
14
|
+
"createdAt",
|
|
15
|
+
"updatedAt"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"transactionId": {
|
|
19
|
+
"title": "UUID for the transaction",
|
|
20
|
+
"type": "string",
|
|
21
|
+
"format": "uuid"
|
|
22
|
+
},
|
|
23
|
+
"status": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"enum": ["active", "cancelled", "completed"]
|
|
26
|
+
},
|
|
27
|
+
"uprn": {
|
|
28
|
+
"type": "integer"
|
|
29
|
+
},
|
|
30
|
+
"createdAt": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"format": "date-time"
|
|
33
|
+
},
|
|
34
|
+
"updatedAt": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"format": "date-time"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -404,17 +404,10 @@
|
|
|
404
404
|
"required": ["verified_claims"],
|
|
405
405
|
"properties": {
|
|
406
406
|
"verified_claims": {
|
|
407
|
-
"
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
{
|
|
412
|
-
"type": "array",
|
|
413
|
-
"items": {
|
|
414
|
-
"$ref": "#/definitions/verified_claims_def"
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
]
|
|
407
|
+
"type": "array",
|
|
408
|
+
"items": {
|
|
409
|
+
"$ref": "#/definitions/verified_claims_def"
|
|
410
|
+
}
|
|
418
411
|
}
|
|
419
412
|
},
|
|
420
413
|
"additionalProperties": false
|
|
@@ -15,38 +15,38 @@ addFormats(ajv);
|
|
|
15
15
|
const validator = ajv.compile(verifiedClaimsSchema);
|
|
16
16
|
|
|
17
17
|
test("valid vouch sample is valid", () => {
|
|
18
|
-
const isValid = validator({ verified_claims: exampleVouch });
|
|
18
|
+
const isValid = validator({ verified_claims: [exampleVouch] });
|
|
19
19
|
expect(isValid).toBe(true);
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
test("valid electronic record sample is valid", () => {
|
|
23
|
-
const isValid = validator({ verified_claims: exampleElectronicRecord });
|
|
23
|
+
const isValid = validator({ verified_claims: [exampleElectronicRecord] });
|
|
24
24
|
expect(isValid).toBe(true);
|
|
25
25
|
});
|
|
26
26
|
|
|
27
27
|
test("valid documented vouch sample is valid", () => {
|
|
28
|
-
const isValid = validator({ verified_claims: exampleDocumentedVouch });
|
|
28
|
+
const isValid = validator({ verified_claims: [exampleDocumentedVouch] });
|
|
29
29
|
expect(isValid).toBe(true);
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
test("sample with primitive claims value is valid", () => {
|
|
33
33
|
const clonedVouch = JSON.parse(JSON.stringify(exampleVouch));
|
|
34
34
|
clonedVouch.claims = { "/propertyPack/uprn": 123456 };
|
|
35
|
-
const isValid = validator({ verified_claims: clonedVouch });
|
|
35
|
+
const isValid = validator({ verified_claims: [clonedVouch] });
|
|
36
36
|
expect(isValid).toBe(true);
|
|
37
37
|
});
|
|
38
38
|
|
|
39
39
|
test("sample with undefined claims value is also valid, but this would fail when the payload is validated", () => {
|
|
40
40
|
const clonedVouch = JSON.parse(JSON.stringify(exampleVouch));
|
|
41
41
|
clonedVouch.claims = { "/propertyPack/uprn": undefined };
|
|
42
|
-
const isValid = validator({ verified_claims: clonedVouch });
|
|
42
|
+
const isValid = validator({ verified_claims: [clonedVouch] });
|
|
43
43
|
expect(isValid).toBe(true);
|
|
44
44
|
});
|
|
45
45
|
|
|
46
46
|
test("claim with missing claims is invalid", () => {
|
|
47
47
|
const clonedVouch = JSON.parse(JSON.stringify(exampleVouch));
|
|
48
48
|
delete clonedVouch.claims;
|
|
49
|
-
const isValid = validator({ verified_claims: clonedVouch });
|
|
49
|
+
const isValid = validator({ verified_claims: [clonedVouch] });
|
|
50
50
|
expect(isValid).toBe(false);
|
|
51
51
|
});
|
|
52
52
|
|
|
@@ -55,20 +55,20 @@ test("claim with invalid claims path is invalid", () => {
|
|
|
55
55
|
const originalPath = Object.keys(clonedVouch.claims)[0];
|
|
56
56
|
const data = clonedVouch.claims[originalPath];
|
|
57
57
|
clonedVouch.claims = { "invalidPath//of?someKind": data };
|
|
58
|
-
const isValid = validator({ verified_claims: clonedVouch });
|
|
58
|
+
const isValid = validator({ verified_claims: [clonedVouch] });
|
|
59
59
|
expect(isValid).toBe(false);
|
|
60
60
|
});
|
|
61
61
|
|
|
62
62
|
test("verification with invalid evidence type is invalid", () => {
|
|
63
63
|
const clonedVouch = JSON.parse(JSON.stringify(exampleVouch));
|
|
64
64
|
clonedVouch.verification.evidence[0].type = "something invalid";
|
|
65
|
-
const isValid = validator({ verified_claims: clonedVouch });
|
|
65
|
+
const isValid = validator({ verified_claims: [clonedVouch] });
|
|
66
66
|
expect(isValid).toBe(false);
|
|
67
67
|
});
|
|
68
68
|
|
|
69
69
|
test("verification with no framework type is invalid", () => {
|
|
70
70
|
const clonedVouch = JSON.parse(JSON.stringify(exampleVouch));
|
|
71
71
|
delete clonedVouch.verification.trust_framework;
|
|
72
|
-
const isValid = validator({ verified_claims: clonedVouch });
|
|
72
|
+
const isValid = validator({ verified_claims: [clonedVouch] });
|
|
73
73
|
expect(isValid).toBe(false);
|
|
74
74
|
});
|
|
@@ -4,7 +4,7 @@ const exampleVouch = require("../examples/exampleVouch.json");
|
|
|
4
4
|
const exampleDocumentedVouch = require("../examples/exampleDocumentedVouch.json");
|
|
5
5
|
|
|
6
6
|
test("returns an empty array for a valid claim", () => {
|
|
7
|
-
expect(validateVerifiedClaims(exampleVouch)).toEqual([]);
|
|
7
|
+
expect(validateVerifiedClaims([exampleVouch])).toEqual([]);
|
|
8
8
|
});
|
|
9
9
|
|
|
10
10
|
test("returns an empty array for a valid array of claims", () => {
|
|
@@ -19,7 +19,7 @@ test("returns an array with an error stating if path is incorrect", () => {
|
|
|
19
19
|
clonedVouch.claims = {
|
|
20
20
|
"/propertyPack/INVALID/materialFacts/councilTax": data,
|
|
21
21
|
};
|
|
22
|
-
expect(validateVerifiedClaims(clonedVouch)).toEqual([
|
|
22
|
+
expect(validateVerifiedClaims([clonedVouch])).toEqual([
|
|
23
23
|
"Path /propertyPack/INVALID/materialFacts/councilTax is not a valid PDTF schema path",
|
|
24
24
|
]);
|
|
25
25
|
});
|
|
@@ -36,7 +36,7 @@ test("returns an array of errors if data in the path is in invalid format", () =
|
|
|
36
36
|
},
|
|
37
37
|
},
|
|
38
38
|
};
|
|
39
|
-
expect(validateVerifiedClaims(clonedVouch)).toEqual([
|
|
39
|
+
expect(validateVerifiedClaims([clonedVouch])).toEqual([
|
|
40
40
|
{
|
|
41
41
|
instancePath: "",
|
|
42
42
|
schemaPath: "#/required",
|
|
@@ -67,7 +67,7 @@ test("returns an array of errors for verified claim with multiple paths", () =>
|
|
|
67
67
|
},
|
|
68
68
|
},
|
|
69
69
|
};
|
|
70
|
-
expect(validateVerifiedClaims(clonedVouch)).toEqual([
|
|
70
|
+
expect(validateVerifiedClaims([clonedVouch])).toEqual([
|
|
71
71
|
"Path /propertyPack/materialFacts/cousncilTaxBad is not a valid PDTF schema path",
|
|
72
72
|
"Path /propertyPack/materialFacts/councilTaxBadTwo is not a valid PDTF schema path",
|
|
73
73
|
]);
|
|
@@ -92,5 +92,5 @@ test("returns an empty array of errors for verified claim with multiple valid pa
|
|
|
92
92
|
postcode: "property.postcode",
|
|
93
93
|
},
|
|
94
94
|
};
|
|
95
|
-
expect(validateVerifiedClaims(clonedVouch)).toEqual([]);
|
|
95
|
+
expect(validateVerifiedClaims([clonedVouch])).toEqual([]);
|
|
96
96
|
});
|
|
@@ -1,621 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
-
"$id": "https://openid.net/schemas/verified_claims-12.json",
|
|
4
|
-
"definitions": {
|
|
5
|
-
"date_type": {
|
|
6
|
-
"type": "string",
|
|
7
|
-
"format": "date"
|
|
8
|
-
},
|
|
9
|
-
"time_type": {
|
|
10
|
-
"type": "string",
|
|
11
|
-
"format": "date-time"
|
|
12
|
-
},
|
|
13
|
-
"document_number": {
|
|
14
|
-
"type": "string"
|
|
15
|
-
},
|
|
16
|
-
"document_details": {
|
|
17
|
-
"type": "object",
|
|
18
|
-
"properties": {
|
|
19
|
-
"type": {
|
|
20
|
-
"type": "string"
|
|
21
|
-
},
|
|
22
|
-
"document_number": {
|
|
23
|
-
"$ref": "#/definitions/document_number"
|
|
24
|
-
},
|
|
25
|
-
"number": {
|
|
26
|
-
"$ref": "#/definitions/document_number"
|
|
27
|
-
},
|
|
28
|
-
"personal_number": {
|
|
29
|
-
"type": "string"
|
|
30
|
-
},
|
|
31
|
-
"serial_number": {
|
|
32
|
-
"type": "string"
|
|
33
|
-
},
|
|
34
|
-
"date_of_issuance": {
|
|
35
|
-
"$ref": "#/definitions/date_type"
|
|
36
|
-
},
|
|
37
|
-
"date_of_expiry": {
|
|
38
|
-
"$ref": "#/definitions/date_type"
|
|
39
|
-
},
|
|
40
|
-
"issuer": {
|
|
41
|
-
"type": "object",
|
|
42
|
-
"properties": {
|
|
43
|
-
"name": {
|
|
44
|
-
"type": "string"
|
|
45
|
-
},
|
|
46
|
-
"formatted": {
|
|
47
|
-
"type": "string"
|
|
48
|
-
},
|
|
49
|
-
"street_address": {
|
|
50
|
-
"type": "string"
|
|
51
|
-
},
|
|
52
|
-
"locality": {
|
|
53
|
-
"type": "string"
|
|
54
|
-
},
|
|
55
|
-
"region": {
|
|
56
|
-
"type": "string"
|
|
57
|
-
},
|
|
58
|
-
"postal_code": {
|
|
59
|
-
"type": "string"
|
|
60
|
-
},
|
|
61
|
-
"country": {
|
|
62
|
-
"type": "string"
|
|
63
|
-
},
|
|
64
|
-
"country_code": {
|
|
65
|
-
"type": "string"
|
|
66
|
-
},
|
|
67
|
-
"jurisdiction": {
|
|
68
|
-
"type": "string"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
"validation_method": {
|
|
75
|
-
"type": "object",
|
|
76
|
-
"properties": {
|
|
77
|
-
"type": {
|
|
78
|
-
"type": "string"
|
|
79
|
-
},
|
|
80
|
-
"policy": {
|
|
81
|
-
"type": "string"
|
|
82
|
-
},
|
|
83
|
-
"procedure": {
|
|
84
|
-
"type": "string"
|
|
85
|
-
},
|
|
86
|
-
"status": {
|
|
87
|
-
"type": "string"
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
"verification_method": {
|
|
92
|
-
"type": "object",
|
|
93
|
-
"properties": {
|
|
94
|
-
"type": {
|
|
95
|
-
"type": "string"
|
|
96
|
-
},
|
|
97
|
-
"policy": {
|
|
98
|
-
"type": "string"
|
|
99
|
-
},
|
|
100
|
-
"procedure": {
|
|
101
|
-
"type": "string"
|
|
102
|
-
},
|
|
103
|
-
"status": {
|
|
104
|
-
"type": "string"
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
"evidence": {
|
|
109
|
-
"type": "object",
|
|
110
|
-
"properties": {
|
|
111
|
-
"type": {
|
|
112
|
-
"type": "string",
|
|
113
|
-
"enum": [
|
|
114
|
-
"electronic_signature",
|
|
115
|
-
"id_document",
|
|
116
|
-
"document",
|
|
117
|
-
"electronic_record",
|
|
118
|
-
"vouch",
|
|
119
|
-
"utility_bill"
|
|
120
|
-
]
|
|
121
|
-
},
|
|
122
|
-
"attachments": {
|
|
123
|
-
"$ref": "#/definitions/attachments"
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
"required": ["type"],
|
|
127
|
-
"allOf": [
|
|
128
|
-
{
|
|
129
|
-
"if": {
|
|
130
|
-
"properties": {
|
|
131
|
-
"type": {
|
|
132
|
-
"const": "electronic_signature"
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
"then": {
|
|
137
|
-
"properties": {
|
|
138
|
-
"signature_type": {
|
|
139
|
-
"type": "string"
|
|
140
|
-
},
|
|
141
|
-
"issuer": {
|
|
142
|
-
"type": "string"
|
|
143
|
-
},
|
|
144
|
-
"serial_number": {
|
|
145
|
-
"type": "string"
|
|
146
|
-
},
|
|
147
|
-
"created_at": {
|
|
148
|
-
"$ref": "#/definitions/time_type"
|
|
149
|
-
}
|
|
150
|
-
}
|
|
151
|
-
},
|
|
152
|
-
"else": {}
|
|
153
|
-
},
|
|
154
|
-
{
|
|
155
|
-
"if": {
|
|
156
|
-
"properties": {
|
|
157
|
-
"type": {
|
|
158
|
-
"type": "string",
|
|
159
|
-
"pattern": "^(id_)*document$"
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
"then": {
|
|
164
|
-
"properties": {
|
|
165
|
-
"validation_method": {
|
|
166
|
-
"$ref": "#/definitions/validation_method"
|
|
167
|
-
},
|
|
168
|
-
"verification_method": {
|
|
169
|
-
"$ref": "#/definitions/verification_method"
|
|
170
|
-
},
|
|
171
|
-
"method": {
|
|
172
|
-
"type": "string"
|
|
173
|
-
},
|
|
174
|
-
"verifier": {
|
|
175
|
-
"type": "object",
|
|
176
|
-
"properties": {
|
|
177
|
-
"organization": {
|
|
178
|
-
"type": "string"
|
|
179
|
-
},
|
|
180
|
-
"txn": {
|
|
181
|
-
"type": "string"
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
},
|
|
185
|
-
"time": {
|
|
186
|
-
"$ref": "#/definitions/time_type"
|
|
187
|
-
},
|
|
188
|
-
"document_details": {
|
|
189
|
-
"$ref": "#/definitions/document_details"
|
|
190
|
-
},
|
|
191
|
-
"document": {
|
|
192
|
-
"$ref": "#/definitions/document_details"
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
|
-
},
|
|
196
|
-
"else": {}
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
"if": {
|
|
200
|
-
"properties": {
|
|
201
|
-
"type": {
|
|
202
|
-
"const": "electronic_record"
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
},
|
|
206
|
-
"then": {
|
|
207
|
-
"properties": {
|
|
208
|
-
"validation_method": {
|
|
209
|
-
"$ref": "#/definitions/validation_method"
|
|
210
|
-
},
|
|
211
|
-
"verification_method": {
|
|
212
|
-
"$ref": "#/definitions/verification_method"
|
|
213
|
-
},
|
|
214
|
-
"verifier": {
|
|
215
|
-
"type": "object",
|
|
216
|
-
"properties": {
|
|
217
|
-
"organization": {
|
|
218
|
-
"type": "string"
|
|
219
|
-
},
|
|
220
|
-
"txn": {
|
|
221
|
-
"type": "string"
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
},
|
|
225
|
-
"time": {
|
|
226
|
-
"$ref": "#/definitions/time_type"
|
|
227
|
-
},
|
|
228
|
-
"record": {
|
|
229
|
-
"type": "object",
|
|
230
|
-
"properties": {
|
|
231
|
-
"type": {
|
|
232
|
-
"type": "string"
|
|
233
|
-
},
|
|
234
|
-
"personal_number": {
|
|
235
|
-
"type": "string"
|
|
236
|
-
},
|
|
237
|
-
"created_at": {
|
|
238
|
-
"$ref": "#/definitions/date_type"
|
|
239
|
-
},
|
|
240
|
-
"date_of_expiry": {
|
|
241
|
-
"$ref": "#/definitions/date_type"
|
|
242
|
-
},
|
|
243
|
-
"source": {
|
|
244
|
-
"type": "object",
|
|
245
|
-
"properties": {
|
|
246
|
-
"name": {
|
|
247
|
-
"type": "string"
|
|
248
|
-
},
|
|
249
|
-
"formatted": {
|
|
250
|
-
"type": "string"
|
|
251
|
-
},
|
|
252
|
-
"street_address": {
|
|
253
|
-
"type": "string"
|
|
254
|
-
},
|
|
255
|
-
"locality": {
|
|
256
|
-
"type": "string"
|
|
257
|
-
},
|
|
258
|
-
"region": {
|
|
259
|
-
"type": "string"
|
|
260
|
-
},
|
|
261
|
-
"postal_code": {
|
|
262
|
-
"type": "string"
|
|
263
|
-
},
|
|
264
|
-
"country": {
|
|
265
|
-
"type": "string"
|
|
266
|
-
},
|
|
267
|
-
"country_code": {
|
|
268
|
-
"type": "string"
|
|
269
|
-
},
|
|
270
|
-
"jurisdiction": {
|
|
271
|
-
"type": "string"
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
}
|
|
278
|
-
},
|
|
279
|
-
"else": {}
|
|
280
|
-
},
|
|
281
|
-
{
|
|
282
|
-
"if": {
|
|
283
|
-
"properties": {
|
|
284
|
-
"type": {
|
|
285
|
-
"const": "vouch"
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
},
|
|
289
|
-
"then": {
|
|
290
|
-
"properties": {
|
|
291
|
-
"validation_method": {
|
|
292
|
-
"$ref": "#/definitions/validation_method"
|
|
293
|
-
},
|
|
294
|
-
"verification_method": {
|
|
295
|
-
"$ref": "#/definitions/verification_method"
|
|
296
|
-
},
|
|
297
|
-
"verifier": {
|
|
298
|
-
"type": "object",
|
|
299
|
-
"properties": {
|
|
300
|
-
"organization": {
|
|
301
|
-
"type": "string"
|
|
302
|
-
},
|
|
303
|
-
"txn": {
|
|
304
|
-
"type": "string"
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
},
|
|
308
|
-
"time": {
|
|
309
|
-
"$ref": "#/definitions/time_type"
|
|
310
|
-
},
|
|
311
|
-
"attestation": {
|
|
312
|
-
"type": "object",
|
|
313
|
-
"properties": {
|
|
314
|
-
"type": {
|
|
315
|
-
"type": "string"
|
|
316
|
-
},
|
|
317
|
-
"reference_number": {
|
|
318
|
-
"type": "string"
|
|
319
|
-
},
|
|
320
|
-
"personal_number": {
|
|
321
|
-
"type": "string"
|
|
322
|
-
},
|
|
323
|
-
"date_of_issuance": {
|
|
324
|
-
"$ref": "#/definitions/date_type"
|
|
325
|
-
},
|
|
326
|
-
"date_of_expiry": {
|
|
327
|
-
"$ref": "#/definitions/date_type"
|
|
328
|
-
},
|
|
329
|
-
"voucher": {
|
|
330
|
-
"type": "object",
|
|
331
|
-
"properties": {
|
|
332
|
-
"name": {
|
|
333
|
-
"type": "string"
|
|
334
|
-
},
|
|
335
|
-
"birthdate": {
|
|
336
|
-
"$ref": "#/definitions/date_type"
|
|
337
|
-
},
|
|
338
|
-
"formatted": {
|
|
339
|
-
"type": "string"
|
|
340
|
-
},
|
|
341
|
-
"street_address": {
|
|
342
|
-
"type": "string"
|
|
343
|
-
},
|
|
344
|
-
"locality": {
|
|
345
|
-
"type": "string"
|
|
346
|
-
},
|
|
347
|
-
"region": {
|
|
348
|
-
"type": "string"
|
|
349
|
-
},
|
|
350
|
-
"postal_code": {
|
|
351
|
-
"type": "string"
|
|
352
|
-
},
|
|
353
|
-
"country": {
|
|
354
|
-
"type": "string"
|
|
355
|
-
},
|
|
356
|
-
"occupation": {
|
|
357
|
-
"type": "string"
|
|
358
|
-
},
|
|
359
|
-
"organization": {
|
|
360
|
-
"type": "string"
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
},
|
|
368
|
-
"else": {}
|
|
369
|
-
},
|
|
370
|
-
{
|
|
371
|
-
"if": {
|
|
372
|
-
"properties": {
|
|
373
|
-
"type": {
|
|
374
|
-
"const": "utility_bill"
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
},
|
|
378
|
-
"then": {
|
|
379
|
-
"properties": {
|
|
380
|
-
"provider": {
|
|
381
|
-
"type": "object",
|
|
382
|
-
"properties": {
|
|
383
|
-
"name": {
|
|
384
|
-
"type": "string"
|
|
385
|
-
},
|
|
386
|
-
"formatted": {
|
|
387
|
-
"type": "string"
|
|
388
|
-
},
|
|
389
|
-
"street_address": {
|
|
390
|
-
"type": "string"
|
|
391
|
-
},
|
|
392
|
-
"locality": {
|
|
393
|
-
"type": "string"
|
|
394
|
-
},
|
|
395
|
-
"region": {
|
|
396
|
-
"type": "string"
|
|
397
|
-
},
|
|
398
|
-
"postal_code": {
|
|
399
|
-
"type": "string"
|
|
400
|
-
},
|
|
401
|
-
"country": {
|
|
402
|
-
"type": "string"
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
},
|
|
406
|
-
"date": {
|
|
407
|
-
"$ref": "#/definitions/date_type"
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
},
|
|
411
|
-
"else": {}
|
|
412
|
-
}
|
|
413
|
-
]
|
|
414
|
-
},
|
|
415
|
-
"digest": {
|
|
416
|
-
"type": "object",
|
|
417
|
-
"properties": {
|
|
418
|
-
"alg": {
|
|
419
|
-
"type": "string"
|
|
420
|
-
},
|
|
421
|
-
"value": {
|
|
422
|
-
"type": "string",
|
|
423
|
-
"contentEncoding": "base64"
|
|
424
|
-
}
|
|
425
|
-
},
|
|
426
|
-
"required": ["alg", "value"]
|
|
427
|
-
},
|
|
428
|
-
"external_attachment": {
|
|
429
|
-
"type": "object",
|
|
430
|
-
"properties": {
|
|
431
|
-
"desc": {
|
|
432
|
-
"type": "string"
|
|
433
|
-
},
|
|
434
|
-
"digest": {
|
|
435
|
-
"$ref": "#/definitions/digest"
|
|
436
|
-
},
|
|
437
|
-
"url": {
|
|
438
|
-
"type": "string",
|
|
439
|
-
"format": "uri"
|
|
440
|
-
},
|
|
441
|
-
"access_token": {
|
|
442
|
-
"type": ["string", "null"]
|
|
443
|
-
},
|
|
444
|
-
"expires_in": {
|
|
445
|
-
"type": "integer",
|
|
446
|
-
"minimum": 1
|
|
447
|
-
}
|
|
448
|
-
},
|
|
449
|
-
"required": ["digest", "url"]
|
|
450
|
-
},
|
|
451
|
-
"embedded_attachment": {
|
|
452
|
-
"type": "object",
|
|
453
|
-
"properties": {
|
|
454
|
-
"desc": {
|
|
455
|
-
"type": "string"
|
|
456
|
-
},
|
|
457
|
-
"content_type": {
|
|
458
|
-
"type": "string"
|
|
459
|
-
},
|
|
460
|
-
"content": {
|
|
461
|
-
"type": "string",
|
|
462
|
-
"contentEncoding": "base64"
|
|
463
|
-
}
|
|
464
|
-
},
|
|
465
|
-
"required": ["content_type", "content"]
|
|
466
|
-
},
|
|
467
|
-
"attachments": {
|
|
468
|
-
"type": "array",
|
|
469
|
-
"minItems": 1,
|
|
470
|
-
"items": {
|
|
471
|
-
"oneOf": [
|
|
472
|
-
{
|
|
473
|
-
"$ref": "#/definitions/external_attachment"
|
|
474
|
-
},
|
|
475
|
-
{
|
|
476
|
-
"$ref": "#/definitions/embedded_attachment"
|
|
477
|
-
}
|
|
478
|
-
]
|
|
479
|
-
}
|
|
480
|
-
},
|
|
481
|
-
"verified_claims_def": {
|
|
482
|
-
"type": "object",
|
|
483
|
-
"properties": {
|
|
484
|
-
"verification": {
|
|
485
|
-
"type": "object",
|
|
486
|
-
"properties": {
|
|
487
|
-
"trust_framework": {
|
|
488
|
-
"type": "string"
|
|
489
|
-
},
|
|
490
|
-
"assurance_level": {
|
|
491
|
-
"type": "string"
|
|
492
|
-
},
|
|
493
|
-
"assurance_process": {
|
|
494
|
-
"type": "object",
|
|
495
|
-
"properties": {
|
|
496
|
-
"policy": {
|
|
497
|
-
"type": "string"
|
|
498
|
-
},
|
|
499
|
-
"procedure": {
|
|
500
|
-
"type": "string"
|
|
501
|
-
},
|
|
502
|
-
"status": {
|
|
503
|
-
"type": "string"
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
},
|
|
507
|
-
"time": {
|
|
508
|
-
"$ref": "#/definitions/time_type"
|
|
509
|
-
},
|
|
510
|
-
"verification_process": {
|
|
511
|
-
"type": "string"
|
|
512
|
-
},
|
|
513
|
-
"evidence": {
|
|
514
|
-
"type": "array",
|
|
515
|
-
"minItems": 1,
|
|
516
|
-
"items": {
|
|
517
|
-
"oneOf": [
|
|
518
|
-
{
|
|
519
|
-
"$ref": "#/definitions/evidence"
|
|
520
|
-
}
|
|
521
|
-
]
|
|
522
|
-
}
|
|
523
|
-
}
|
|
524
|
-
},
|
|
525
|
-
"required": ["trust_framework"],
|
|
526
|
-
"additionalProperties": true
|
|
527
|
-
},
|
|
528
|
-
"claims": {
|
|
529
|
-
"type": "object",
|
|
530
|
-
"minProperties": 1
|
|
531
|
-
}
|
|
532
|
-
},
|
|
533
|
-
"required": ["verification", "claims"],
|
|
534
|
-
"additionalProperties": false
|
|
535
|
-
},
|
|
536
|
-
"distributed_claims_available_def": {
|
|
537
|
-
"type": "object",
|
|
538
|
-
"properties": {},
|
|
539
|
-
"additionalProperties": {
|
|
540
|
-
"$ref": "#/definitions/verified_claims_def"
|
|
541
|
-
}
|
|
542
|
-
},
|
|
543
|
-
"aggregated_claims": {
|
|
544
|
-
"type": "object",
|
|
545
|
-
"properties": {
|
|
546
|
-
"JWT": {
|
|
547
|
-
"type": "string"
|
|
548
|
-
}
|
|
549
|
-
},
|
|
550
|
-
"required": ["JWT"]
|
|
551
|
-
},
|
|
552
|
-
"distributed_claims": {
|
|
553
|
-
"type": "object",
|
|
554
|
-
"properties": {
|
|
555
|
-
"endpoint": {
|
|
556
|
-
"type": "string"
|
|
557
|
-
},
|
|
558
|
-
"access_token": {
|
|
559
|
-
"type": "string"
|
|
560
|
-
}
|
|
561
|
-
},
|
|
562
|
-
"required": ["endpoint", "access_token"]
|
|
563
|
-
},
|
|
564
|
-
"_claim_sources": {
|
|
565
|
-
"anyOf": [
|
|
566
|
-
{
|
|
567
|
-
"$ref": "#/definitions/aggregated_claims"
|
|
568
|
-
},
|
|
569
|
-
{
|
|
570
|
-
"$ref": "#/definitions/distributed_claims"
|
|
571
|
-
}
|
|
572
|
-
]
|
|
573
|
-
}
|
|
574
|
-
},
|
|
575
|
-
"type": "object",
|
|
576
|
-
"required": ["verified_claims"],
|
|
577
|
-
"properties": {
|
|
578
|
-
"verified_claims": {
|
|
579
|
-
"anyOf": [
|
|
580
|
-
{
|
|
581
|
-
"$ref": "#/definitions/verified_claims_def"
|
|
582
|
-
},
|
|
583
|
-
{
|
|
584
|
-
"type": "array",
|
|
585
|
-
"items": {
|
|
586
|
-
"$ref": "#/definitions/verified_claims_def"
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
]
|
|
590
|
-
},
|
|
591
|
-
"_claim_names": {
|
|
592
|
-
"type": "object",
|
|
593
|
-
"properties": {
|
|
594
|
-
"verified_claims": {
|
|
595
|
-
"anyOf": [
|
|
596
|
-
{
|
|
597
|
-
"type": "string"
|
|
598
|
-
},
|
|
599
|
-
{
|
|
600
|
-
"type": "array",
|
|
601
|
-
"items": {
|
|
602
|
-
"type": "string"
|
|
603
|
-
}
|
|
604
|
-
},
|
|
605
|
-
{
|
|
606
|
-
"$ref": "#/definitions/distributed_claims_available_def"
|
|
607
|
-
}
|
|
608
|
-
]
|
|
609
|
-
}
|
|
610
|
-
},
|
|
611
|
-
"additionalProperties": false
|
|
612
|
-
},
|
|
613
|
-
"_claim_sources": {
|
|
614
|
-
"type": "object",
|
|
615
|
-
"properties": {},
|
|
616
|
-
"additionalProperties": {
|
|
617
|
-
"$ref": "#/definitions/_claim_sources"
|
|
618
|
-
}
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
}
|