@pdtf/schemas 3.2.1-12 → 3.2.1-14
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
CHANGED
|
@@ -976,5 +976,59 @@
|
|
|
976
976
|
"contentTypes": ["Environmental Risks"]
|
|
977
977
|
}
|
|
978
978
|
]
|
|
979
|
-
}
|
|
979
|
+
},
|
|
980
|
+
"contracts": [
|
|
981
|
+
{
|
|
982
|
+
"contract": {
|
|
983
|
+
"template": {
|
|
984
|
+
"name": "Example Agency Agreement",
|
|
985
|
+
"url": "https://example.com/example-agency-agreement",
|
|
986
|
+
"externalIds": {
|
|
987
|
+
"Moverly": "file123"
|
|
988
|
+
},
|
|
989
|
+
"requiredSignatories": [
|
|
990
|
+
{
|
|
991
|
+
"role": "Seller",
|
|
992
|
+
"requiresAll": true
|
|
993
|
+
}
|
|
994
|
+
]
|
|
995
|
+
},
|
|
996
|
+
"terms": {
|
|
997
|
+
"propertyAddress": "123 Maple Street, London, SW1A 1AA",
|
|
998
|
+
"sellersNames": "Peter and Clarissa Hetherington-Smythe",
|
|
999
|
+
"sellersContactAddress": "47 Park Road, Harpenden, AL3 5AF",
|
|
1000
|
+
"sellersTelephoneNumber": "07700 900123",
|
|
1001
|
+
"sellersEmail": "peter.hetherington-smyth@email.com",
|
|
1002
|
+
"typeOfAgency": "Sole Agency",
|
|
1003
|
+
"feeAsPercent": "1.5%",
|
|
1004
|
+
"fixedFeeExVat": "£2,500",
|
|
1005
|
+
"estimatedFeeIncludingVat": "£3,000",
|
|
1006
|
+
"includeAdditionalChargeEpc": true,
|
|
1007
|
+
"additionalChargeForEpcExVat": "75",
|
|
1008
|
+
"includeAdditionalChargeForEpcAndFloorplan": true,
|
|
1009
|
+
"additionalChargeForEpcAndFloorplanExVat": "150",
|
|
1010
|
+
"includeAdditionalChargeForEpcFloorplanAndPhotos": true,
|
|
1011
|
+
"additionalChargeForEpcFloorplanAndPhotosExVat": "150",
|
|
1012
|
+
"includeAdditionalChargeForPremiumPhotos ": true,
|
|
1013
|
+
"additionalChargeForPremiumPhotosExVat": "150",
|
|
1014
|
+
"includeAdditionalChargeForBrochure": true,
|
|
1015
|
+
"additionalChargeForBrochureExVat": "150",
|
|
1016
|
+
"includeAdditionalChargeForBespokeAdvertising": true,
|
|
1017
|
+
"additionalChargeForBespokeAdvertisingExVat": "150",
|
|
1018
|
+
"initialMarketingPrice": "£450,000"
|
|
1019
|
+
}
|
|
1020
|
+
},
|
|
1021
|
+
"signatures": [
|
|
1022
|
+
{
|
|
1023
|
+
"name": "Peter Ronald Hetherington-Smythe",
|
|
1024
|
+
"signedOn": "2024-11-29T16:15:02.735Z",
|
|
1025
|
+
"externalIds": {
|
|
1026
|
+
"Moverly": "123434"
|
|
1027
|
+
},
|
|
1028
|
+
"role": "Seller",
|
|
1029
|
+
"contractHash": "IYnBjUI8TauXFop6WCvnPA=="
|
|
1030
|
+
}
|
|
1031
|
+
]
|
|
1032
|
+
}
|
|
1033
|
+
]
|
|
980
1034
|
}
|
|
@@ -39316,6 +39316,95 @@
|
|
|
39316
39316
|
}
|
|
39317
39317
|
}
|
|
39318
39318
|
}
|
|
39319
|
+
},
|
|
39320
|
+
"contracts": {
|
|
39321
|
+
"type": "array",
|
|
39322
|
+
"items": {
|
|
39323
|
+
"type": "object",
|
|
39324
|
+
"properties": {
|
|
39325
|
+
"contract": {
|
|
39326
|
+
"type": "object",
|
|
39327
|
+
"required": ["template", "terms"],
|
|
39328
|
+
"properties": {
|
|
39329
|
+
"template": {
|
|
39330
|
+
"type": "object",
|
|
39331
|
+
"required": ["name", "url", "requiredSignatories"],
|
|
39332
|
+
"properties": {
|
|
39333
|
+
"name": { "type": "string" },
|
|
39334
|
+
"url": { "type": "string", "format": "uri" },
|
|
39335
|
+
"externalIds": {
|
|
39336
|
+
"type": "object"
|
|
39337
|
+
},
|
|
39338
|
+
"requiredSignatories": {
|
|
39339
|
+
"type": "array",
|
|
39340
|
+
"items": {
|
|
39341
|
+
"type": "object",
|
|
39342
|
+
"properties": {
|
|
39343
|
+
"role": {
|
|
39344
|
+
"type": "string",
|
|
39345
|
+
"enum": [
|
|
39346
|
+
"Seller",
|
|
39347
|
+
"Seller's Conveyancer",
|
|
39348
|
+
"Prospective Buyer",
|
|
39349
|
+
"Buyer",
|
|
39350
|
+
"Buyer's Conveyancer",
|
|
39351
|
+
"Estate Agent",
|
|
39352
|
+
"Buyer's Agent",
|
|
39353
|
+
"Surveyor",
|
|
39354
|
+
"Mortgage Broker",
|
|
39355
|
+
"Lender",
|
|
39356
|
+
"Landlord",
|
|
39357
|
+
"Tenant"
|
|
39358
|
+
]
|
|
39359
|
+
},
|
|
39360
|
+
"requiresAll": { "type": "boolean" }
|
|
39361
|
+
}
|
|
39362
|
+
}
|
|
39363
|
+
}
|
|
39364
|
+
}
|
|
39365
|
+
},
|
|
39366
|
+
"terms": {
|
|
39367
|
+
"type": "object"
|
|
39368
|
+
}
|
|
39369
|
+
}
|
|
39370
|
+
},
|
|
39371
|
+
"signatures": {
|
|
39372
|
+
"type": "array",
|
|
39373
|
+
"items": {
|
|
39374
|
+
"type": "object",
|
|
39375
|
+
"required": ["name", "signedOn", "role", "contractHash"],
|
|
39376
|
+
"properties": {
|
|
39377
|
+
"name": { "type": "string" },
|
|
39378
|
+
"signedOn": { "type": "string", "format": "date-time" },
|
|
39379
|
+
"externalIds": {
|
|
39380
|
+
"type": "object"
|
|
39381
|
+
}
|
|
39382
|
+
},
|
|
39383
|
+
"role": {
|
|
39384
|
+
"type": "string",
|
|
39385
|
+
"enum": [
|
|
39386
|
+
"Seller",
|
|
39387
|
+
"Seller's Conveyancer",
|
|
39388
|
+
"Prospective Buyer",
|
|
39389
|
+
"Buyer",
|
|
39390
|
+
"Buyer's Conveyancer",
|
|
39391
|
+
"Estate Agent",
|
|
39392
|
+
"Buyer's Agent",
|
|
39393
|
+
"Surveyor",
|
|
39394
|
+
"Mortgage Broker",
|
|
39395
|
+
"Lender",
|
|
39396
|
+
"Landlord",
|
|
39397
|
+
"Tenant"
|
|
39398
|
+
]
|
|
39399
|
+
},
|
|
39400
|
+
"contractHash": {
|
|
39401
|
+
"title": "An MD5 hash of the stable-stringified contract object being signed",
|
|
39402
|
+
"type": "string"
|
|
39403
|
+
}
|
|
39404
|
+
}
|
|
39405
|
+
}
|
|
39406
|
+
}
|
|
39407
|
+
}
|
|
39319
39408
|
}
|
|
39320
39409
|
}
|
|
39321
39410
|
}
|
|
@@ -34120,6 +34120,119 @@
|
|
|
34120
34120
|
}
|
|
34121
34121
|
}
|
|
34122
34122
|
}
|
|
34123
|
+
},
|
|
34124
|
+
"contracts": {
|
|
34125
|
+
"type": "array",
|
|
34126
|
+
"items": {
|
|
34127
|
+
"type": "object",
|
|
34128
|
+
"properties": {
|
|
34129
|
+
"contract": {
|
|
34130
|
+
"type": "object",
|
|
34131
|
+
"required": [
|
|
34132
|
+
"template",
|
|
34133
|
+
"terms"
|
|
34134
|
+
],
|
|
34135
|
+
"properties": {
|
|
34136
|
+
"template": {
|
|
34137
|
+
"type": "object",
|
|
34138
|
+
"required": [
|
|
34139
|
+
"name",
|
|
34140
|
+
"url",
|
|
34141
|
+
"requiredSignatories"
|
|
34142
|
+
],
|
|
34143
|
+
"properties": {
|
|
34144
|
+
"name": {
|
|
34145
|
+
"type": "string"
|
|
34146
|
+
},
|
|
34147
|
+
"url": {
|
|
34148
|
+
"type": "string",
|
|
34149
|
+
"format": "uri"
|
|
34150
|
+
},
|
|
34151
|
+
"externalIds": {
|
|
34152
|
+
"type": "object"
|
|
34153
|
+
},
|
|
34154
|
+
"requiredSignatories": {
|
|
34155
|
+
"type": "array",
|
|
34156
|
+
"items": {
|
|
34157
|
+
"type": "object",
|
|
34158
|
+
"properties": {
|
|
34159
|
+
"role": {
|
|
34160
|
+
"type": "string",
|
|
34161
|
+
"enum": [
|
|
34162
|
+
"Seller",
|
|
34163
|
+
"Seller's Conveyancer",
|
|
34164
|
+
"Prospective Buyer",
|
|
34165
|
+
"Buyer",
|
|
34166
|
+
"Buyer's Conveyancer",
|
|
34167
|
+
"Estate Agent",
|
|
34168
|
+
"Buyer's Agent",
|
|
34169
|
+
"Surveyor",
|
|
34170
|
+
"Mortgage Broker",
|
|
34171
|
+
"Lender",
|
|
34172
|
+
"Landlord",
|
|
34173
|
+
"Tenant"
|
|
34174
|
+
]
|
|
34175
|
+
},
|
|
34176
|
+
"requiresAll": {
|
|
34177
|
+
"type": "boolean"
|
|
34178
|
+
}
|
|
34179
|
+
}
|
|
34180
|
+
}
|
|
34181
|
+
}
|
|
34182
|
+
}
|
|
34183
|
+
},
|
|
34184
|
+
"terms": {
|
|
34185
|
+
"type": "object"
|
|
34186
|
+
}
|
|
34187
|
+
}
|
|
34188
|
+
},
|
|
34189
|
+
"signatures": {
|
|
34190
|
+
"type": "array",
|
|
34191
|
+
"items": {
|
|
34192
|
+
"type": "object",
|
|
34193
|
+
"required": [
|
|
34194
|
+
"name",
|
|
34195
|
+
"signedOn",
|
|
34196
|
+
"role",
|
|
34197
|
+
"contractHash"
|
|
34198
|
+
],
|
|
34199
|
+
"properties": {
|
|
34200
|
+
"name": {
|
|
34201
|
+
"type": "string"
|
|
34202
|
+
},
|
|
34203
|
+
"signedOn": {
|
|
34204
|
+
"type": "string",
|
|
34205
|
+
"format": "date-time"
|
|
34206
|
+
},
|
|
34207
|
+
"externalIds": {
|
|
34208
|
+
"type": "object"
|
|
34209
|
+
}
|
|
34210
|
+
},
|
|
34211
|
+
"role": {
|
|
34212
|
+
"type": "string",
|
|
34213
|
+
"enum": [
|
|
34214
|
+
"Seller",
|
|
34215
|
+
"Seller's Conveyancer",
|
|
34216
|
+
"Prospective Buyer",
|
|
34217
|
+
"Buyer",
|
|
34218
|
+
"Buyer's Conveyancer",
|
|
34219
|
+
"Estate Agent",
|
|
34220
|
+
"Buyer's Agent",
|
|
34221
|
+
"Surveyor",
|
|
34222
|
+
"Mortgage Broker",
|
|
34223
|
+
"Lender",
|
|
34224
|
+
"Landlord",
|
|
34225
|
+
"Tenant"
|
|
34226
|
+
]
|
|
34227
|
+
},
|
|
34228
|
+
"contractHash": {
|
|
34229
|
+
"title": "An MD5 hash of the stable-stringified contract object being signed",
|
|
34230
|
+
"type": "string"
|
|
34231
|
+
}
|
|
34232
|
+
}
|
|
34233
|
+
}
|
|
34234
|
+
}
|
|
34235
|
+
}
|
|
34123
34236
|
}
|
|
34124
34237
|
}
|
|
34125
34238
|
}
|
|
@@ -4095,5 +4095,24 @@
|
|
|
4095
4095
|
"pricingMethodology": {}
|
|
4096
4096
|
}
|
|
4097
4097
|
}
|
|
4098
|
+
},
|
|
4099
|
+
"contracts": {
|
|
4100
|
+
"contract": {
|
|
4101
|
+
"template": {
|
|
4102
|
+
"name": {},
|
|
4103
|
+
"url": {},
|
|
4104
|
+
"externalIds": {},
|
|
4105
|
+
"requiredSignatories": {
|
|
4106
|
+
"role": {},
|
|
4107
|
+
"requiresAll": {}
|
|
4108
|
+
}
|
|
4109
|
+
},
|
|
4110
|
+
"terms": {}
|
|
4111
|
+
},
|
|
4112
|
+
"signatures": {
|
|
4113
|
+
"name": {},
|
|
4114
|
+
"signedOn": {},
|
|
4115
|
+
"externalIds": {}
|
|
4116
|
+
}
|
|
4098
4117
|
}
|
|
4099
4118
|
}
|
|
@@ -396,3 +396,10 @@ test("correctly gets titles across schemas, arrays and non-existient title prope
|
|
|
396
396
|
)
|
|
397
397
|
).toBe("Please provide their full names and ages.");
|
|
398
398
|
});
|
|
399
|
+
test("validates a valid contract", () => {
|
|
400
|
+
const path = "/contracts";
|
|
401
|
+
const data = jp.get(exampleTransaction, path);
|
|
402
|
+
const validator = getSubschemaValidator(path, exampleTransaction.$schema);
|
|
403
|
+
const isValid = validator(data);
|
|
404
|
+
expect(isValid).toBe(true);
|
|
405
|
+
});
|