@propxchain/core-client 0.3.0-canary.31 → 0.3.0-canary.32

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@propxchain/core-client",
3
- "version": "0.3.0-canary.31",
3
+ "version": "0.3.0-canary.32",
4
4
  "description": "Typed TypeScript client for the PropXchain core canisters on the Internet Computer. Includes a deterministic mock mode for local development and tests.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -1,3 +1,15 @@
1
+ type WaterConnection =
2
+ record {
3
+ connected: TA6Answer;
4
+ meterLocation: opt text;
5
+ provider: opt text;
6
+ stopcockLocation: opt text;
7
+ };
8
+ type WarrantyItem =
9
+ record {
10
+ document: TA6Document;
11
+ present: TA6Answer;
12
+ };
1
13
  type Urgency =
2
14
  variant {
3
15
  blocking;
@@ -121,55 +133,50 @@ type TA7LeaseholdInformation =
121
133
  serviceChargePaymentFrequency: text;
122
134
  sublettingAllowed: bool;
123
135
  };
136
+ type TA6Response =
137
+ record {
138
+ answer: TA6Answer;
139
+ details: opt text;
140
+ };
124
141
  type TA6PropertyInformation =
125
142
  record {
126
- alterations: opt TA6Alterations;
127
- boundaries: text;
128
- boundaryDisputes: opt TA6BoundaryDisputes;
129
143
  completedAt: opt int;
130
144
  completedBy: principal;
131
- connectionAgreements: text;
132
- disputes: opt TA6Disputes;
133
- environmentalDetails: text;
134
- environmentalIssues: vec text;
135
- estateManagement: opt TA6EstateManagement;
136
- guarantees: text;
137
- insurance: text;
145
+ formVersion: text;
146
+ jurisdiction: Jurisdiction;
138
147
  lastModifiedAt: int;
139
148
  lastModifiedBy: principal;
140
- notices: opt TA6Notices;
141
- otherInformation: text;
142
- parkingDetails: text;
143
- parkingSpaces: nat;
144
- rightsAndEasements: text;
145
- services: text;
146
- };
147
- type TA6Notices =
148
- record {
149
- details: text;
150
- noticeType: text;
149
+ section1: Section1PropertyAndSeller;
150
+ section10: Section10Parking;
151
+ section11: Section11Services;
152
+ section12: Section12Connections;
153
+ section13: Section13Transaction;
154
+ section14: Section14Completion;
155
+ section15: Section15AdditionalInfo;
156
+ section2: Section2Boundaries;
157
+ section3: Section3Disputes;
158
+ section4: Section4Notices;
159
+ section5: Section5Alterations;
160
+ section6: Section6Guarantees;
161
+ section7: Section7Insurance;
162
+ section8: Section8Environmental;
163
+ section9: Section9Rights;
151
164
  };
152
- type TA6EstateManagement =
153
- record {
154
- annualCharge: nat;
155
- isManaged: bool;
156
- managementCompany: text;
157
- };
158
- type TA6Disputes =
159
- record {
160
- details: text;
161
- disputeType: text;
162
- };
163
- type TA6BoundaryDisputes =
164
- record {
165
- details: text;
166
- hasDisputes: bool;
165
+ type TA6Document =
166
+ variant {
167
+ Attached: nat;
168
+ NotAnswered;
169
+ NotApplicable;
170
+ NotAvailable;
171
+ ToFollow;
167
172
  };
168
- type TA6Alterations =
169
- record {
170
- details: text;
171
- hasAlterations: bool;
172
- requiresPermission: bool;
173
+ type TA6Answer =
174
+ variant {
175
+ No;
176
+ NotAnswered;
177
+ NotApplicable;
178
+ NotKnown;
179
+ Yes;
173
180
  };
174
181
  type TA10Room =
175
182
  record {
@@ -234,6 +241,227 @@ type SolicitorRecord =
234
241
  tasks: vec SolicitorTask;
235
242
  verified: bool;
236
243
  };
244
+ type SolicitorContact =
245
+ record {
246
+ address: text;
247
+ contactName: text;
248
+ email: opt text;
249
+ firmName: text;
250
+ phone: opt text;
251
+ postcode: text;
252
+ };
253
+ type SolarPower =
254
+ record {
255
+ electricityBill: TA6Document;
256
+ fitOrSegAgreement: TA6Document;
257
+ installDate: opt text;
258
+ mcsCertificate: TA6Document;
259
+ ownedOutright: opt bool;
260
+ supplyAgreement: TA6Document;
261
+ };
262
+ type SewerageSystem =
263
+ record {
264
+ dischargeType: opt DischargeType;
265
+ infiltrationSystem: TA6Answer;
266
+ lastServiceDate: opt text;
267
+ location: opt text;
268
+ otherDetails: opt text;
269
+ regulationCompliant: TA6Answer;
270
+ source: SewerageSource;
271
+ };
272
+ type SewerageSource =
273
+ variant {
274
+ Cesspool;
275
+ Mains;
276
+ Other;
277
+ SepticTank;
278
+ SewageTreatmentPlant;
279
+ };
280
+ type Severity =
281
+ variant {
282
+ Conflict;
283
+ Info;
284
+ Warning;
285
+ };
286
+ type ServicedPlantConnection =
287
+ record {
288
+ connected: TA6Answer;
289
+ makeModel: opt text;
290
+ provider: opt text;
291
+ serviceProvider: opt text;
292
+ };
293
+ type ServiceConnection =
294
+ record {
295
+ connected: TA6Answer;
296
+ provider: opt text;
297
+ };
298
+ type SellerRole =
299
+ variant {
300
+ Administrator;
301
+ Attorney;
302
+ Executor;
303
+ Seller;
304
+ Trustee;
305
+ };
306
+ type SellerParty =
307
+ record {
308
+ fullName: text;
309
+ ownershipOrAuthorityDate: opt text;
310
+ role: SellerRole;
311
+ };
312
+ type Section9Rights =
313
+ record {
314
+ q9_1Rights: vec Right;
315
+ q9_1RightsExercised: TA6Response;
316
+ q9_2Amount: opt nat;
317
+ q9_2Contributions: TA6Response;
318
+ q9_3Disagreements: TA6Response;
319
+ q9_4OthersRights: TA6Response;
320
+ q9_4Rights: vec Right;
321
+ q9_5Amount: opt nat;
322
+ q9_5ContributionsReceived: TA6Response;
323
+ q9_6Disagreements: TA6Response;
324
+ q9_7CrossingOtherProperty: TA6Response;
325
+ q9_8LeadingToOthers: TA6Response;
326
+ q9_9Arrangement: opt Arrangement;
327
+ };
328
+ type Section8Environmental =
329
+ record {
330
+ q8_1Flooded: TA6Response;
331
+ q8_2FloodDefences: TA6Response;
332
+ q8_3RadonTest: TA6Response;
333
+ q8_3aReport: TA6Document;
334
+ q8_3bBelowActionLevel: TA6Answer;
335
+ q8_4RadonRemedialMeasures: TA6Response;
336
+ q8_5CurrentBill: TA6Document;
337
+ q8_5GreenDeal: TA6Response;
338
+ q8_6JapaneseKnotweed: TA6Response;
339
+ q8_7KnotweedSurvey: TA6Answer;
340
+ q8_7SurveyDocument: TA6Document;
341
+ };
342
+ type Section7Insurance =
343
+ record {
344
+ q7_1DoYouInsure: TA6Answer;
345
+ q7_1WhoInsuresIfNot: opt text;
346
+ q7_2DifficultOrSpecialConditions: TA6Response;
347
+ q7_3Claims: TA6Response;
348
+ };
349
+ type Section6Guarantees =
350
+ record {
351
+ q6_1CentralHeating: WarrantyItem;
352
+ q6_1DampProofing: WarrantyItem;
353
+ q6_1ElectricalWork: WarrantyItem;
354
+ q6_1NewHomeWarranty: WarrantyItem;
355
+ q6_1Other: WarrantyItem;
356
+ q6_1OtherDetails: opt text;
357
+ q6_1Roofing: WarrantyItem;
358
+ q6_1TimberTreatment: WarrantyItem;
359
+ q6_1Underpinning: WarrantyItem;
360
+ q6_1WindowsDoors: WarrantyItem;
361
+ q6_2Claims: TA6Response;
362
+ q6_3Breaches: TA6Response;
363
+ };
364
+ type Section5Alterations =
365
+ record {
366
+ q5_1Alterations: AlterationTypes;
367
+ q5_2Documents: vec TA6Document;
368
+ q5_3NonResidentialUse: TA6Response;
369
+ q5_4Breaches: TA6Response;
370
+ q5_5UnresolvedIssues: TA6Response;
371
+ q5_6Solar: opt SolarPower;
372
+ q5_7ListedBuilding: TA6Response;
373
+ q5_8ConservationArea: TA6Response;
374
+ q5_9TreePreservationOrder: TA6Response;
375
+ };
376
+ type Section4Notices =
377
+ record {
378
+ q4_1NoticesReceived: TA6Response;
379
+ q4_2NearbyDevelopment: TA6Response;
380
+ q4_3NearbyUseChange: TA6Response;
381
+ };
382
+ type Section3Disputes =
383
+ record {
384
+ q3_1ExistingDisputes: TA6Response;
385
+ q3_2PotentialDisputes: TA6Response;
386
+ };
387
+ type Section2Boundaries =
388
+ record {
389
+ q2_1Features: vec BoundaryFeature;
390
+ q2_2IrregularDescription: opt text;
391
+ q2_3MovedOrAltered: TA6Response;
392
+ };
393
+ type Section1PropertyAndSeller =
394
+ record {
395
+ postcode: text;
396
+ propertyAddress: text;
397
+ sellerCompany: opt CompanySeller;
398
+ sellers: vec SellerParty;
399
+ solicitor: SolicitorContact;
400
+ uprn: opt text;
401
+ };
402
+ type Section15AdditionalInfo =
403
+ record {
404
+ additionalNotes: opt text;
405
+ consentsAttachedList: opt text;
406
+ consentsNotAvailableList: opt text;
407
+ consentsToFollowList: opt text;
408
+ q15_1ConsentsAttached: vec TA6Document;
409
+ };
410
+ type Section14Completion =
411
+ record {
412
+ q14_1ProceedsClearCharges: TA6Response;
413
+ q14_2Commitments: CompletionCommitments;
414
+ };
415
+ type Section13Transaction =
416
+ record {
417
+ q13_1DependentPurchase: TA6Response;
418
+ q13_2MovingDateRequirements: TA6Response;
419
+ q13_3SellerLivesAtProperty: TA6Answer;
420
+ q13_4OtherOccupiers17Plus: TA6Response;
421
+ q13_4bTenantsOrLodgers: TA6Answer;
422
+ q13_5VacantPossession: TA6Answer;
423
+ q13_6OccupiersAgreedSignVacate: TA6Answer;
424
+ q13_7Occupiers: vec Occupier;
425
+ };
426
+ type Section12Connections =
427
+ record {
428
+ broadband: ServiceConnection;
429
+ mainsElectricity: MeteredConnection;
430
+ mainsGas: MeteredConnection;
431
+ mainsSewerage: ServiceConnection;
432
+ mainsWater: WaterConnection;
433
+ otherServices: opt text;
434
+ sharedHeatPumps: ServicedPlantConnection;
435
+ smallSewageTreatmentPlant: ServicedPlantConnection;
436
+ telephone: ServiceConnection;
437
+ };
438
+ type Section11Services =
439
+ record {
440
+ q11_1ElectricalWorks: TA6Response;
441
+ q11_2Document: TA6Document;
442
+ q11_2ElectricalCertificates: TA6Answer;
443
+ q11_3Date: opt text;
444
+ q11_3Eicr: TA6Answer;
445
+ q11_3Report: TA6Document;
446
+ q11_4HeatingSystems: vec HeatingSystem;
447
+ q11_5aFoulWaterMains: TA6Answer;
448
+ q11_5bSurfaceWaterMains: TA6Answer;
449
+ q11_6SewerageSource: opt SewerageSource;
450
+ q11_7SewerageSystem: opt SewerageSystem;
451
+ };
452
+ type Section10Parking =
453
+ record {
454
+ q10_1Arrangements: vec ParkingType;
455
+ q10_1Details: opt text;
456
+ q10_2PermitRequired: TA6Response;
457
+ q10_3EvChargingPoint: TA6Response;
458
+ q10_3InstallConsent: TA6Document;
459
+ };
460
+ type Right =
461
+ record {
462
+ description: text;
463
+ overProperty: opt text;
464
+ };
237
465
  type Result_9 =
238
466
  variant {
239
467
  err: text;
@@ -260,19 +488,19 @@ type Result_6 =
260
488
  type Result_5 =
261
489
  variant {
262
490
  err: text;
263
- ok: nat;
491
+ ok: ApplicationStatusUpdate;
264
492
  };
265
493
  type Result_4 =
266
494
  variant {
267
495
  err: text;
268
- ok: ApplicationStatusUpdate;
496
+ ok: OfficialSearchResult;
269
497
  };
270
498
  type Result_3 =
271
499
  variant {
272
500
  err: text;
273
- ok: OfficialSearchResult;
501
+ ok: nat;
274
502
  };
275
- type Result_21 =
503
+ type Result_22 =
276
504
  variant {
277
505
  err: text;
278
506
  ok: record {
@@ -280,7 +508,7 @@ type Result_21 =
280
508
  transactions: nat;
281
509
  };
282
510
  };
283
- type Result_20 =
511
+ type Result_21 =
284
512
  variant {
285
513
  err: text;
286
514
  ok: record {
@@ -288,6 +516,11 @@ type Result_20 =
288
516
  text;
289
517
  };
290
518
  };
519
+ type Result_20 =
520
+ variant {
521
+ err: text;
522
+ ok: vec Anomaly;
523
+ };
291
524
  type Result_2 =
292
525
  variant {
293
526
  err: text;
@@ -395,6 +628,16 @@ type PartyProgress =
395
628
  parties: vec TransactionParty;
396
629
  totalParties: nat;
397
630
  };
631
+ type ParkingType =
632
+ variant {
633
+ Allocated;
634
+ Driveway;
635
+ Garage;
636
+ None;
637
+ OnRoad;
638
+ Other;
639
+ Permit;
640
+ };
398
641
  type OfficialSearchResult =
399
642
  record {
400
643
  advisoryEntries: vec text;
@@ -404,6 +647,12 @@ type OfficialSearchResult =
404
647
  priorityExpiry: text;
405
648
  registerChanged: bool;
406
649
  };
650
+ type Occupier =
651
+ record {
652
+ age: opt nat;
653
+ fullName: text;
654
+ tenancyAgreement: TA6Document;
655
+ };
407
656
  type Notification =
408
657
  record {
409
658
  createdAt: Time;
@@ -432,6 +681,13 @@ type NextStepOption =
432
681
  estimatedDelayIfSkipped: opt nat;
433
682
  whyThis: text;
434
683
  };
684
+ type MeteredConnection =
685
+ record {
686
+ connected: TA6Answer;
687
+ meterLocation: opt text;
688
+ provider: opt text;
689
+ supplyNumber: opt text;
690
+ };
435
691
  type LandRegistryStatus =
436
692
  variant {
437
693
  application_received;
@@ -481,6 +737,11 @@ type LandRegistryIntegration =
481
737
  submittedToLRAt: opt int;
482
738
  totalLRCosts: nat;
483
739
  };
740
+ type Jurisdiction =
741
+ variant {
742
+ England;
743
+ Wales;
744
+ };
484
745
  type HmlrFetchRecord =
485
746
  record {
486
747
  fetchedAt: int;
@@ -488,6 +749,57 @@ type HmlrFetchRecord =
488
749
  responseHash: text;
489
750
  titleNumber: text;
490
751
  };
752
+ type HeatingType =
753
+ variant {
754
+ DistrictHeating;
755
+ Electric;
756
+ GasCentral;
757
+ HeatPumpAir;
758
+ HeatPumpGround;
759
+ Lpg;
760
+ Oil;
761
+ Other;
762
+ SolarThermal;
763
+ SolidFuel;
764
+ };
765
+ type HeatingSystem =
766
+ record {
767
+ certificate: TA6Document;
768
+ heatingType: HeatingType;
769
+ installDate: opt text;
770
+ lastServiceDate: opt text;
771
+ otherDetails: opt text;
772
+ };
773
+ type DischargeType =
774
+ variant {
775
+ GroundWater;
776
+ SurfaceWater;
777
+ };
778
+ type CompletionCommitments =
779
+ record {
780
+ leaveServiceInfo: TA6Answer;
781
+ removeSellersItems: TA6Answer;
782
+ vacantPossession: TA6Answer;
783
+ };
784
+ type CompanySeller =
785
+ record {
786
+ companyName: text;
787
+ companyNumber: text;
788
+ countryOfIncorporation: text;
789
+ director: text;
790
+ };
791
+ type BoundaryOwnership =
792
+ variant {
793
+ NotKnown;
794
+ OwnedByNeighbour;
795
+ OwnedBySeller;
796
+ Shared;
797
+ };
798
+ type BoundaryFeature =
799
+ record {
800
+ ownership: BoundaryOwnership;
801
+ position: text;
802
+ };
491
803
  type BotConnection =
492
804
  record {
493
805
  addedAt: int;
@@ -495,6 +807,12 @@ type BotConnection =
495
807
  name: text;
496
808
  "principal": principal;
497
809
  };
810
+ type Arrangement =
811
+ record {
812
+ contributionAmount: opt nat;
813
+ description: text;
814
+ document: TA6Document;
815
+ };
498
816
  type ApplicationStatusUpdate =
499
817
  record {
500
818
  applicationReference: text;
@@ -504,6 +822,27 @@ type ApplicationStatusUpdate =
504
822
  previousStatus: LandRegistryStatus;
505
823
  statusChanged: bool;
506
824
  };
825
+ type Anomaly =
826
+ record {
827
+ detectedAt: int;
828
+ explanation: text;
829
+ ref: text;
830
+ severity: Severity;
831
+ sources: vec text;
832
+ };
833
+ type AlterationTypes =
834
+ record {
835
+ changeOfUse: bool;
836
+ conservatory: bool;
837
+ extension: bool;
838
+ garageConversion: bool;
839
+ internalWallsRemoved: bool;
840
+ loftConversion: bool;
841
+ other: bool;
842
+ otherDetails: opt text;
843
+ structuralRoofWorks: bool;
844
+ windowsPost2002: bool;
845
+ };
507
846
  type AMLStatus =
508
847
  variant {
509
848
  not_started;
@@ -512,6 +851,7 @@ type AMLStatus =
512
851
  verified;
513
852
  };
514
853
  service : {
854
+ acknowledgeTA6Wording: (txId: text) -> (Result_1);
515
855
  addParty: (transactionId: text, name: text, email: text, roleText:
516
856
  text, isPrimary: bool) -> (Result_2);
517
857
  adminForceDeleteTransaction: (transactionId: text) -> (Result);
@@ -520,7 +860,7 @@ service : {
520
860
  (Result);
521
861
  assignSolicitorRecord: (transactionId: text, solicitorRecord:
522
862
  SolicitorRecord) -> (Result_1);
523
- backfillTransactionMembers: () -> (Result_21);
863
+ backfillTransactionMembers: () -> (Result_22);
524
864
  bootstrapDocumentStorageCanister: (canisterId: principal) -> (Result);
525
865
  canAccessTransaction: (transactionId: text) -> (bool) query;
526
866
  connectBot: (transactionId: text, botPrincipal: principal, botName:
@@ -540,7 +880,7 @@ service : {
540
880
  postcode: text, titleNumber: text, seller: principal, previousOwner:
541
881
  text, amount: nat64, transactionType: text, userRole: text, propertyType:
542
882
  text, propertyCategory: text, mode: text, deposit: nat64, mortgageAmount:
543
- nat64, completionDate: text) -> (Result_20);
883
+ nat64, completionDate: text) -> (Result_21);
544
884
  deleteTransaction: (transactionId: text) -> (Result);
545
885
  disconnectBot: (transactionId: text, botPrincipal: principal) -> (Result_1);
546
886
  doesTransactionExist: (transactionId: text) -> (bool) query;
@@ -549,6 +889,7 @@ service : {
549
889
  text;
550
890
  }) query;
551
891
  getAllTransactions: () -> (vec Transaction) query;
892
+ getAnomalies: (txId: text) -> (Result_20) query;
552
893
  getCurrentPhase: (transactionId: text) -> (Result_19) query;
553
894
  getCycles: () -> (nat) query;
554
895
  getDocumentStorageCanister: () -> (opt principal) query;
@@ -593,6 +934,7 @@ service : {
593
934
  getUserManagementCanister: () -> (text) query;
594
935
  get_transaction_timeline: (transactionID: text) ->
595
936
  (opt TransactionTimeline) query;
937
+ hasAcknowledgedTA6Wording: (txId: text) -> (bool) query;
596
938
  initiate_blockchain_completion: (transactionID: text, buyerFundsHash:
597
939
  text, completionStatementHash: text) -> (Result);
598
940
  joinAsBotByInviteCode: (inviteCode: text, botName: text) -> (Result_6);
@@ -646,8 +988,8 @@ service : {
646
988
  onDocumentRegistered: (transactionId: text, docType: text, documentHash:
647
989
  text, uploadedBy: principal) -> ();
648
990
  on_blockchain_completion_success: (transactionID: text) -> (Result);
649
- pollAllPendingApplications: () -> (Result_5);
650
- pollApplicationStatus: (transactionID: text) -> (Result_4);
991
+ pollAllPendingApplications: () -> (Result_3);
992
+ pollApplicationStatus: (transactionID: text) -> (Result_5);
651
993
  /// Closes #31 (TOCTOU): per-transaction lock blocks concurrent solicitors
652
994
  /// from racing to record exchange while canModifyTransaction await is in flight.
653
995
  recordContractExchange: (transactionID: text, buyerSolicitorSignature:
@@ -677,12 +1019,13 @@ service : {
677
1019
  buyer;
678
1020
  seller;
679
1021
  }) -> (Result_1);
680
- requestOfficialSearch: (transactionID: text) -> (Result_3);
1022
+ requestOfficialSearch: (transactionID: text) -> (Result_4);
681
1023
  /// Closes #31 (TOCTOU): per-transaction lock blocks concurrent mutation
682
1024
  /// while canModifyTransaction await is in flight.
683
1025
  respondToRequisition: (transactionID: text, requisitionId: text,
684
1026
  responseText: text, _supportingDocumentHashes: vec text) -> (Result_1);
685
1027
  revokeBuyer: (transactionId: text, buyerPrincipal: principal) -> (Result);
1028
+ runCrossReference: (txId: text) -> (Result_3);
686
1029
  setDocumentStorageCanister: (canisterId: principal) -> (Result);
687
1030
  setFlowState: (transactionId: text, jsonData: text) -> (Result);
688
1031
  setLandRegistryCanister: (canisterId: text) -> (Result);