@propxchain/core-client 0.2.1-canary.9 → 0.3.0-canary.23
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/README.md +2 -3
- package/dist/auth.d.ts +7 -7
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +5 -5
- package/dist/auth.js.map +1 -1
- package/dist/canisters/document_storage/document_storage.did.d.ts.map +1 -1
- package/dist/canisters/document_storage/document_storage.did.js +90 -21
- package/dist/canisters/document_storage/document_storage.did.js.map +1 -1
- package/dist/canisters/document_verification/document_verification.did.d.ts.map +1 -1
- package/dist/canisters/document_verification/document_verification.did.js +132 -0
- package/dist/canisters/document_verification/document_verification.did.js.map +1 -1
- package/dist/canisters/email_service/email_service.did.d.ts.map +1 -1
- package/dist/canisters/email_service/email_service.did.js +40 -0
- package/dist/canisters/email_service/email_service.did.js.map +1 -1
- package/dist/canisters/land_registry_integration/land_registry_integration.did.d.ts.map +1 -1
- package/dist/canisters/land_registry_integration/land_registry_integration.did.js +186 -12
- package/dist/canisters/land_registry_integration/land_registry_integration.did.js.map +1 -1
- package/dist/canisters/ledger_manager/ledger_manager.did.d.ts.map +1 -1
- package/dist/canisters/ledger_manager/ledger_manager.did.js +55 -0
- package/dist/canisters/ledger_manager/ledger_manager.did.js.map +1 -1
- package/dist/canisters/transaction_manager/transaction_manager.did.d.ts.map +1 -1
- package/dist/canisters/transaction_manager/transaction_manager.did.js +42 -4
- package/dist/canisters/transaction_manager/transaction_manager.did.js.map +1 -1
- package/dist/canisters/user_management/user_management.did.d.ts.map +1 -1
- package/dist/canisters/user_management/user_management.did.js +115 -18
- package/dist/canisters/user_management/user_management.did.js.map +1 -1
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mock.js +1 -1
- package/dist/mock.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -6
- package/src/auth.ts +8 -9
- package/src/canisters/document_storage/document_storage.did +82 -12
- package/src/canisters/document_storage/document_storage.did.d.ts +86 -9
- package/src/canisters/document_storage/document_storage.did.js +128 -19
- package/src/canisters/document_verification/document_verification.did +150 -0
- package/src/canisters/document_verification/document_verification.did.d.ts +125 -1
- package/src/canisters/document_verification/document_verification.did.js +160 -0
- package/src/canisters/email_service/email_service.did +49 -0
- package/src/canisters/email_service/email_service.did.d.ts +49 -2
- package/src/canisters/email_service/email_service.did.js +68 -0
- package/src/canisters/land_registry_integration/land_registry_integration.did +118 -19
- package/src/canisters/land_registry_integration/land_registry_integration.did.d.ts +89 -19
- package/src/canisters/land_registry_integration/land_registry_integration.did.js +213 -11
- package/src/canisters/ledger_manager/ledger_manager.did +78 -0
- package/src/canisters/ledger_manager/ledger_manager.did.d.ts +66 -0
- package/src/canisters/ledger_manager/ledger_manager.did.js +75 -0
- package/src/canisters/transaction_manager/transaction_manager.did +98 -5
- package/src/canisters/transaction_manager/transaction_manager.did.d.ts +102 -4
- package/src/canisters/transaction_manager/transaction_manager.did.js +50 -4
- package/src/canisters/user_management/user_management.did +133 -18
- package/src/canisters/user_management/user_management.did.d.ts +108 -16
- package/src/canisters/user_management/user_management.did.js +151 -22
- package/src/client.ts +1 -1
- package/src/index.ts +2 -2
- package/src/mock.ts +1 -1
- package/src/types.ts +1 -1
|
@@ -3,15 +3,137 @@ type VerificationMethod =
|
|
|
3
3
|
commercial_api: text;
|
|
4
4
|
dvla_api;
|
|
5
5
|
manual_solicitor;
|
|
6
|
+
oscar_ai: OscarVerificationDetails;
|
|
6
7
|
passport_dcs;
|
|
7
8
|
system_hash_only;
|
|
8
9
|
};
|
|
10
|
+
type TransactionVerificationSummary =
|
|
11
|
+
record {
|
|
12
|
+
allDocumentsVerified: bool;
|
|
13
|
+
allLRDocumentsCurrent: bool;
|
|
14
|
+
daysUntilSearchExpiry: opt int;
|
|
15
|
+
expiredDocuments: nat;
|
|
16
|
+
hasOfficialSearch: bool;
|
|
17
|
+
lrDocuments: vec LRDocumentSummary;
|
|
18
|
+
missingDocuments: vec text;
|
|
19
|
+
officialSearchExpiry: opt int;
|
|
20
|
+
officialSearchValid: bool;
|
|
21
|
+
readyForCompletion: bool;
|
|
22
|
+
readyForExchange: bool;
|
|
23
|
+
readyForSubmission: bool;
|
|
24
|
+
titleNumber: text;
|
|
25
|
+
totalDocuments: nat;
|
|
26
|
+
transactionId: text;
|
|
27
|
+
unverifiedDocuments: nat;
|
|
28
|
+
verifiedDocuments: nat;
|
|
29
|
+
};
|
|
9
30
|
type Time = int;
|
|
31
|
+
type Result_4 =
|
|
32
|
+
variant {
|
|
33
|
+
err: text;
|
|
34
|
+
ok: TransactionVerificationSummary;
|
|
35
|
+
};
|
|
36
|
+
type Result_3 =
|
|
37
|
+
variant {
|
|
38
|
+
err: text;
|
|
39
|
+
ok: nat;
|
|
40
|
+
};
|
|
41
|
+
type Result_2 =
|
|
42
|
+
variant {
|
|
43
|
+
err: text;
|
|
44
|
+
ok: OfficialCopyVerification;
|
|
45
|
+
};
|
|
46
|
+
type Result_1 =
|
|
47
|
+
variant {
|
|
48
|
+
err: text;
|
|
49
|
+
ok: OSCertificateVerification;
|
|
50
|
+
};
|
|
10
51
|
type Result =
|
|
11
52
|
variant {
|
|
12
53
|
err: text;
|
|
13
54
|
ok: DocumentVerification;
|
|
14
55
|
};
|
|
56
|
+
type PriorityStatus =
|
|
57
|
+
variant {
|
|
58
|
+
Active;
|
|
59
|
+
Expired;
|
|
60
|
+
ExpiringImminently;
|
|
61
|
+
Unknown;
|
|
62
|
+
};
|
|
63
|
+
type OscarVerificationInput =
|
|
64
|
+
record {
|
|
65
|
+
confidence: nat;
|
|
66
|
+
documentType: text;
|
|
67
|
+
extractedData: text;
|
|
68
|
+
issues: vec OscarIssue;
|
|
69
|
+
mismatches: vec DataMismatch;
|
|
70
|
+
requiresSolicitorReview: bool;
|
|
71
|
+
};
|
|
72
|
+
type OscarVerificationDetails =
|
|
73
|
+
record {
|
|
74
|
+
analysisTimestamp: Time;
|
|
75
|
+
confidence: nat;
|
|
76
|
+
documentType: text;
|
|
77
|
+
extractedData: text;
|
|
78
|
+
issues: vec OscarIssue;
|
|
79
|
+
mismatches: vec DataMismatch;
|
|
80
|
+
requiresSolicitorReview: bool;
|
|
81
|
+
};
|
|
82
|
+
type OscarIssue =
|
|
83
|
+
record {
|
|
84
|
+
code: text;
|
|
85
|
+
field: opt text;
|
|
86
|
+
message: text;
|
|
87
|
+
severity: variant {
|
|
88
|
+
error;
|
|
89
|
+
info;
|
|
90
|
+
warning;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
type OfficialCopyVerification =
|
|
94
|
+
record {
|
|
95
|
+
copyType: LRDocumentType;
|
|
96
|
+
documentAge: nat;
|
|
97
|
+
hashVerified: bool;
|
|
98
|
+
isCurrent: bool;
|
|
99
|
+
issuedAt: int;
|
|
100
|
+
titleNumberMatches: bool;
|
|
101
|
+
verifiedAt: int;
|
|
102
|
+
verifiedBy: principal;
|
|
103
|
+
};
|
|
104
|
+
type OSCertificateVerification =
|
|
105
|
+
record {
|
|
106
|
+
advisoryEntries: vec text;
|
|
107
|
+
daysRemaining: opt int;
|
|
108
|
+
hashVerified: bool;
|
|
109
|
+
priorityExpiry: opt int;
|
|
110
|
+
priorityStatus: PriorityStatus;
|
|
111
|
+
registerChangedFlag: opt bool;
|
|
112
|
+
titleNumberMatches: bool;
|
|
113
|
+
verifiedAt: int;
|
|
114
|
+
verifiedBy: principal;
|
|
115
|
+
};
|
|
116
|
+
type LRDocumentType =
|
|
117
|
+
variant {
|
|
118
|
+
AP1Acknowledgement;
|
|
119
|
+
CompletionConfirmation;
|
|
120
|
+
LandChargesSearchK16;
|
|
121
|
+
LocalAuthoritySearch;
|
|
122
|
+
OfficialCopyRegister;
|
|
123
|
+
OfficialCopyTitlePlan;
|
|
124
|
+
OfficialSearchCertificate;
|
|
125
|
+
RegisterExtract;
|
|
126
|
+
RequisitionNotice;
|
|
127
|
+
SearchOfPartCertificate;
|
|
128
|
+
};
|
|
129
|
+
type LRDocumentSummary =
|
|
130
|
+
record {
|
|
131
|
+
documentType: LRDocumentType;
|
|
132
|
+
isCurrent: bool;
|
|
133
|
+
isVerified: bool;
|
|
134
|
+
landRegistryReference: opt text;
|
|
135
|
+
validUntil: opt int;
|
|
136
|
+
};
|
|
15
137
|
type DocumentVerification =
|
|
16
138
|
record {
|
|
17
139
|
calculatedHash: text;
|
|
@@ -45,9 +167,17 @@ type DocumentMetadata =
|
|
|
45
167
|
uploadedAt: Time;
|
|
46
168
|
uploadedBy: principal;
|
|
47
169
|
};
|
|
170
|
+
type DataMismatch =
|
|
171
|
+
record {
|
|
172
|
+
expected: text;
|
|
173
|
+
field: text;
|
|
174
|
+
found: text;
|
|
175
|
+
};
|
|
48
176
|
type AuditLog =
|
|
49
177
|
record {
|
|
50
178
|
action: text;
|
|
179
|
+
actorType: ActorType;
|
|
180
|
+
delegatedBy: opt principal;
|
|
51
181
|
details: text;
|
|
52
182
|
documentId: nat;
|
|
53
183
|
id: nat;
|
|
@@ -55,6 +185,12 @@ type AuditLog =
|
|
|
55
185
|
success: bool;
|
|
56
186
|
timestamp: Time;
|
|
57
187
|
};
|
|
188
|
+
type ActorType =
|
|
189
|
+
variant {
|
|
190
|
+
agent;
|
|
191
|
+
systemActor;
|
|
192
|
+
user;
|
|
193
|
+
};
|
|
58
194
|
service : {
|
|
59
195
|
deleteDocument: (documentId: nat) -> (variant {
|
|
60
196
|
err: text;
|
|
@@ -70,6 +206,8 @@ service : {
|
|
|
70
206
|
getDocument: (id: nat) -> (opt DocumentMetadata) query;
|
|
71
207
|
getDocumentVerifications: (documentId: nat) ->
|
|
72
208
|
(vec DocumentVerification) query;
|
|
209
|
+
getOscarVerificationDetails: (verificationId: nat) ->
|
|
210
|
+
(opt OscarVerificationDetails) query;
|
|
73
211
|
getPropertyDocuments: (propertyId: nat) -> (vec DocumentMetadata) query;
|
|
74
212
|
getRecentAuditLogs: (limit: nat) -> (vec AuditLog) query;
|
|
75
213
|
getStats: () ->
|
|
@@ -79,10 +217,16 @@ service : {
|
|
|
79
217
|
totalVerifications: nat;
|
|
80
218
|
verifiedDocuments: nat;
|
|
81
219
|
}) query;
|
|
220
|
+
getTransactionVerificationSummary: (transactionId: text, titleNumber:
|
|
221
|
+
text) -> (Result_4);
|
|
82
222
|
getUnverifiedDocuments: (propertyId: nat) -> (vec DocumentMetadata) query;
|
|
83
223
|
getVerification: (verificationId: nat) -> (opt DocumentVerification) query;
|
|
224
|
+
getVerificationsByTransaction: (txId: nat) ->
|
|
225
|
+
(vec DocumentVerification) query;
|
|
84
226
|
getVerificationsByVerifier: (verifier: principal) ->
|
|
85
227
|
(vec DocumentVerification) query;
|
|
228
|
+
recordAuditEntry: (actorType: ActorType, delegatedBy: opt principal,
|
|
229
|
+
action: text, documentId: nat, details: text, success: bool) -> (Result_3);
|
|
86
230
|
registerDocument: (propertyId: nat, transactionId: opt nat, documentType:
|
|
87
231
|
text, documentHash: text, storageDocumentId: opt nat, fileName: opt text,
|
|
88
232
|
fileSize: opt nat, contentType: opt text) -> (nat);
|
|
@@ -90,9 +234,15 @@ service : {
|
|
|
90
234
|
setUserManagementCanister: (canisterId: principal) -> ();
|
|
91
235
|
verifyDocument: (documentId: nat) -> (bool);
|
|
92
236
|
verifyDocumentWithHash: (documentId: nat, notes: opt text) -> (Result);
|
|
237
|
+
verifyOfficialCopy: (documentId: nat, expectedTitleNumber: text,
|
|
238
|
+
maxAgeDays: nat) -> (Result_2);
|
|
239
|
+
verifyOfficialSearchCertificate: (documentId: nat, expectedTitleNumber:
|
|
240
|
+
text, _expectedTransactionId: opt text) -> (Result_1);
|
|
93
241
|
verifyWithCommercialAPI: (_documentId: nat, _apiProvider: text,
|
|
94
242
|
_verificationData: text) -> (Result);
|
|
95
243
|
verifyWithDVLA: (_documentId: nat, _drivingLicenseNumber: text) -> (Result);
|
|
244
|
+
verifyWithOscar: (documentId: nat, oscarResult: OscarVerificationInput) ->
|
|
245
|
+
(Result);
|
|
96
246
|
verifyWithPassportDCS: (_documentId: nat, _passportNumber: text) ->
|
|
97
247
|
(Result);
|
|
98
248
|
}
|
|
@@ -2,15 +2,25 @@ import type { Principal } from '@dfinity/principal';
|
|
|
2
2
|
import type { ActorMethod } from '@dfinity/agent';
|
|
3
3
|
import type { IDL } from '@dfinity/candid';
|
|
4
4
|
|
|
5
|
+
export type ActorType = { 'agent' : null } |
|
|
6
|
+
{ 'systemActor' : null } |
|
|
7
|
+
{ 'user' : null };
|
|
5
8
|
export interface AuditLog {
|
|
6
9
|
'id' : bigint,
|
|
7
10
|
'action' : string,
|
|
11
|
+
'actorType' : ActorType,
|
|
12
|
+
'delegatedBy' : [] | [Principal],
|
|
8
13
|
'performedBy' : Principal,
|
|
9
14
|
'timestamp' : Time,
|
|
10
15
|
'details' : string,
|
|
11
16
|
'success' : boolean,
|
|
12
17
|
'documentId' : bigint,
|
|
13
18
|
}
|
|
19
|
+
export interface DataMismatch {
|
|
20
|
+
'field' : string,
|
|
21
|
+
'found' : string,
|
|
22
|
+
'expected' : string,
|
|
23
|
+
}
|
|
14
24
|
export interface DocumentMetadata {
|
|
15
25
|
'id' : bigint,
|
|
16
26
|
'documentHash' : string,
|
|
@@ -42,10 +52,105 @@ export interface DocumentVerification {
|
|
|
42
52
|
'verifiedBy' : Principal,
|
|
43
53
|
'verificationMethod' : VerificationMethod,
|
|
44
54
|
}
|
|
55
|
+
export interface LRDocumentSummary {
|
|
56
|
+
'documentType' : LRDocumentType,
|
|
57
|
+
'isVerified' : boolean,
|
|
58
|
+
'isCurrent' : boolean,
|
|
59
|
+
'landRegistryReference' : [] | [string],
|
|
60
|
+
'validUntil' : [] | [bigint],
|
|
61
|
+
}
|
|
62
|
+
export type LRDocumentType = { 'LandChargesSearchK16' : null } |
|
|
63
|
+
{ 'OfficialSearchCertificate' : null } |
|
|
64
|
+
{ 'SearchOfPartCertificate' : null } |
|
|
65
|
+
{ 'RegisterExtract' : null } |
|
|
66
|
+
{ 'OfficialCopyRegister' : null } |
|
|
67
|
+
{ 'LocalAuthoritySearch' : null } |
|
|
68
|
+
{ 'OfficialCopyTitlePlan' : null } |
|
|
69
|
+
{ 'CompletionConfirmation' : null } |
|
|
70
|
+
{ 'AP1Acknowledgement' : null } |
|
|
71
|
+
{ 'RequisitionNotice' : null };
|
|
72
|
+
export interface OSCertificateVerification {
|
|
73
|
+
'priorityStatus' : PriorityStatus,
|
|
74
|
+
'registerChangedFlag' : [] | [boolean],
|
|
75
|
+
'advisoryEntries' : Array<string>,
|
|
76
|
+
'hashVerified' : boolean,
|
|
77
|
+
'priorityExpiry' : [] | [bigint],
|
|
78
|
+
'titleNumberMatches' : boolean,
|
|
79
|
+
'daysRemaining' : [] | [bigint],
|
|
80
|
+
'verifiedAt' : bigint,
|
|
81
|
+
'verifiedBy' : Principal,
|
|
82
|
+
}
|
|
83
|
+
export interface OfficialCopyVerification {
|
|
84
|
+
'documentAge' : bigint,
|
|
85
|
+
'hashVerified' : boolean,
|
|
86
|
+
'issuedAt' : bigint,
|
|
87
|
+
'titleNumberMatches' : boolean,
|
|
88
|
+
'isCurrent' : boolean,
|
|
89
|
+
'copyType' : LRDocumentType,
|
|
90
|
+
'verifiedAt' : bigint,
|
|
91
|
+
'verifiedBy' : Principal,
|
|
92
|
+
}
|
|
93
|
+
export interface OscarIssue {
|
|
94
|
+
'field' : [] | [string],
|
|
95
|
+
'code' : string,
|
|
96
|
+
'message' : string,
|
|
97
|
+
'severity' : { 'warning' : null } |
|
|
98
|
+
{ 'info' : null } |
|
|
99
|
+
{ 'error' : null },
|
|
100
|
+
}
|
|
101
|
+
export interface OscarVerificationDetails {
|
|
102
|
+
'documentType' : string,
|
|
103
|
+
'requiresSolicitorReview' : boolean,
|
|
104
|
+
'extractedData' : string,
|
|
105
|
+
'issues' : Array<OscarIssue>,
|
|
106
|
+
'mismatches' : Array<DataMismatch>,
|
|
107
|
+
'confidence' : bigint,
|
|
108
|
+
'analysisTimestamp' : Time,
|
|
109
|
+
}
|
|
110
|
+
export interface OscarVerificationInput {
|
|
111
|
+
'documentType' : string,
|
|
112
|
+
'requiresSolicitorReview' : boolean,
|
|
113
|
+
'extractedData' : string,
|
|
114
|
+
'issues' : Array<OscarIssue>,
|
|
115
|
+
'mismatches' : Array<DataMismatch>,
|
|
116
|
+
'confidence' : bigint,
|
|
117
|
+
}
|
|
118
|
+
export type PriorityStatus = { 'Active' : null } |
|
|
119
|
+
{ 'ExpiringImminently' : null } |
|
|
120
|
+
{ 'Unknown' : null } |
|
|
121
|
+
{ 'Expired' : null };
|
|
45
122
|
export type Result = { 'ok' : DocumentVerification } |
|
|
46
123
|
{ 'err' : string };
|
|
124
|
+
export type Result_1 = { 'ok' : OSCertificateVerification } |
|
|
125
|
+
{ 'err' : string };
|
|
126
|
+
export type Result_2 = { 'ok' : OfficialCopyVerification } |
|
|
127
|
+
{ 'err' : string };
|
|
128
|
+
export type Result_3 = { 'ok' : bigint } |
|
|
129
|
+
{ 'err' : string };
|
|
130
|
+
export type Result_4 = { 'ok' : TransactionVerificationSummary } |
|
|
131
|
+
{ 'err' : string };
|
|
47
132
|
export type Time = bigint;
|
|
48
|
-
export
|
|
133
|
+
export interface TransactionVerificationSummary {
|
|
134
|
+
'missingDocuments' : Array<string>,
|
|
135
|
+
'expiredDocuments' : bigint,
|
|
136
|
+
'hasOfficialSearch' : boolean,
|
|
137
|
+
'titleNumber' : string,
|
|
138
|
+
'allDocumentsVerified' : boolean,
|
|
139
|
+
'readyForSubmission' : boolean,
|
|
140
|
+
'readyForCompletion' : boolean,
|
|
141
|
+
'officialSearchValid' : boolean,
|
|
142
|
+
'allLRDocumentsCurrent' : boolean,
|
|
143
|
+
'verifiedDocuments' : bigint,
|
|
144
|
+
'daysUntilSearchExpiry' : [] | [bigint],
|
|
145
|
+
'lrDocuments' : Array<LRDocumentSummary>,
|
|
146
|
+
'officialSearchExpiry' : [] | [bigint],
|
|
147
|
+
'readyForExchange' : boolean,
|
|
148
|
+
'unverifiedDocuments' : bigint,
|
|
149
|
+
'totalDocuments' : bigint,
|
|
150
|
+
'transactionId' : string,
|
|
151
|
+
}
|
|
152
|
+
export type VerificationMethod = { 'oscar_ai' : OscarVerificationDetails } |
|
|
153
|
+
{ 'passport_dcs' : null } |
|
|
49
154
|
{ 'commercial_api' : string } |
|
|
50
155
|
{ 'system_hash_only' : null } |
|
|
51
156
|
{ 'manual_solicitor' : null } |
|
|
@@ -70,6 +175,10 @@ export interface _SERVICE {
|
|
|
70
175
|
[bigint],
|
|
71
176
|
Array<DocumentVerification>
|
|
72
177
|
>,
|
|
178
|
+
'getOscarVerificationDetails' : ActorMethod<
|
|
179
|
+
[bigint],
|
|
180
|
+
[] | [OscarVerificationDetails]
|
|
181
|
+
>,
|
|
73
182
|
'getPropertyDocuments' : ActorMethod<[bigint], Array<DocumentMetadata>>,
|
|
74
183
|
'getRecentAuditLogs' : ActorMethod<[bigint], Array<AuditLog>>,
|
|
75
184
|
'getStats' : ActorMethod<
|
|
@@ -81,12 +190,21 @@ export interface _SERVICE {
|
|
|
81
190
|
'totalDocuments' : bigint,
|
|
82
191
|
}
|
|
83
192
|
>,
|
|
193
|
+
'getTransactionVerificationSummary' : ActorMethod<[string, string], Result_4>,
|
|
84
194
|
'getUnverifiedDocuments' : ActorMethod<[bigint], Array<DocumentMetadata>>,
|
|
85
195
|
'getVerification' : ActorMethod<[bigint], [] | [DocumentVerification]>,
|
|
196
|
+
'getVerificationsByTransaction' : ActorMethod<
|
|
197
|
+
[bigint],
|
|
198
|
+
Array<DocumentVerification>
|
|
199
|
+
>,
|
|
86
200
|
'getVerificationsByVerifier' : ActorMethod<
|
|
87
201
|
[Principal],
|
|
88
202
|
Array<DocumentVerification>
|
|
89
203
|
>,
|
|
204
|
+
'recordAuditEntry' : ActorMethod<
|
|
205
|
+
[ActorType, [] | [Principal], string, bigint, string, boolean],
|
|
206
|
+
Result_3
|
|
207
|
+
>,
|
|
90
208
|
'registerDocument' : ActorMethod<
|
|
91
209
|
[
|
|
92
210
|
bigint,
|
|
@@ -104,8 +222,14 @@ export interface _SERVICE {
|
|
|
104
222
|
'setUserManagementCanister' : ActorMethod<[Principal], undefined>,
|
|
105
223
|
'verifyDocument' : ActorMethod<[bigint], boolean>,
|
|
106
224
|
'verifyDocumentWithHash' : ActorMethod<[bigint, [] | [string]], Result>,
|
|
225
|
+
'verifyOfficialCopy' : ActorMethod<[bigint, string, bigint], Result_2>,
|
|
226
|
+
'verifyOfficialSearchCertificate' : ActorMethod<
|
|
227
|
+
[bigint, string, [] | [string]],
|
|
228
|
+
Result_1
|
|
229
|
+
>,
|
|
107
230
|
'verifyWithCommercialAPI' : ActorMethod<[bigint, string, string], Result>,
|
|
108
231
|
'verifyWithDVLA' : ActorMethod<[bigint, string], Result>,
|
|
232
|
+
'verifyWithOscar' : ActorMethod<[bigint, OscarVerificationInput], Result>,
|
|
109
233
|
'verifyWithPassportDCS' : ActorMethod<[bigint, string], Result>,
|
|
110
234
|
}
|
|
111
235
|
export declare const idlFactory: IDL.InterfaceFactory;
|
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
export const idlFactory = ({ IDL }) => {
|
|
2
|
+
const ActorType = IDL.Variant({
|
|
3
|
+
'agent' : IDL.Null,
|
|
4
|
+
'systemActor' : IDL.Null,
|
|
5
|
+
'user' : IDL.Null,
|
|
6
|
+
});
|
|
2
7
|
const Time = IDL.Int;
|
|
3
8
|
const AuditLog = IDL.Record({
|
|
4
9
|
'id' : IDL.Nat,
|
|
5
10
|
'action' : IDL.Text,
|
|
11
|
+
'actorType' : ActorType,
|
|
12
|
+
'delegatedBy' : IDL.Opt(IDL.Principal),
|
|
6
13
|
'performedBy' : IDL.Principal,
|
|
7
14
|
'timestamp' : Time,
|
|
8
15
|
'details' : IDL.Text,
|
|
@@ -24,7 +31,32 @@ export const idlFactory = ({ IDL }) => {
|
|
|
24
31
|
'uploadedBy' : IDL.Principal,
|
|
25
32
|
'transactionId' : IDL.Opt(IDL.Nat),
|
|
26
33
|
});
|
|
34
|
+
const OscarIssue = IDL.Record({
|
|
35
|
+
'field' : IDL.Opt(IDL.Text),
|
|
36
|
+
'code' : IDL.Text,
|
|
37
|
+
'message' : IDL.Text,
|
|
38
|
+
'severity' : IDL.Variant({
|
|
39
|
+
'warning' : IDL.Null,
|
|
40
|
+
'info' : IDL.Null,
|
|
41
|
+
'error' : IDL.Null,
|
|
42
|
+
}),
|
|
43
|
+
});
|
|
44
|
+
const DataMismatch = IDL.Record({
|
|
45
|
+
'field' : IDL.Text,
|
|
46
|
+
'found' : IDL.Text,
|
|
47
|
+
'expected' : IDL.Text,
|
|
48
|
+
});
|
|
49
|
+
const OscarVerificationDetails = IDL.Record({
|
|
50
|
+
'documentType' : IDL.Text,
|
|
51
|
+
'requiresSolicitorReview' : IDL.Bool,
|
|
52
|
+
'extractedData' : IDL.Text,
|
|
53
|
+
'issues' : IDL.Vec(OscarIssue),
|
|
54
|
+
'mismatches' : IDL.Vec(DataMismatch),
|
|
55
|
+
'confidence' : IDL.Nat,
|
|
56
|
+
'analysisTimestamp' : Time,
|
|
57
|
+
});
|
|
27
58
|
const VerificationMethod = IDL.Variant({
|
|
59
|
+
'oscar_ai' : OscarVerificationDetails,
|
|
28
60
|
'passport_dcs' : IDL.Null,
|
|
29
61
|
'commercial_api' : IDL.Text,
|
|
30
62
|
'system_hash_only' : IDL.Null,
|
|
@@ -47,7 +79,93 @@ export const idlFactory = ({ IDL }) => {
|
|
|
47
79
|
'verifiedBy' : IDL.Principal,
|
|
48
80
|
'verificationMethod' : VerificationMethod,
|
|
49
81
|
});
|
|
82
|
+
const LRDocumentType = IDL.Variant({
|
|
83
|
+
'LandChargesSearchK16' : IDL.Null,
|
|
84
|
+
'OfficialSearchCertificate' : IDL.Null,
|
|
85
|
+
'SearchOfPartCertificate' : IDL.Null,
|
|
86
|
+
'RegisterExtract' : IDL.Null,
|
|
87
|
+
'OfficialCopyRegister' : IDL.Null,
|
|
88
|
+
'LocalAuthoritySearch' : IDL.Null,
|
|
89
|
+
'OfficialCopyTitlePlan' : IDL.Null,
|
|
90
|
+
'CompletionConfirmation' : IDL.Null,
|
|
91
|
+
'AP1Acknowledgement' : IDL.Null,
|
|
92
|
+
'RequisitionNotice' : IDL.Null,
|
|
93
|
+
});
|
|
94
|
+
const LRDocumentSummary = IDL.Record({
|
|
95
|
+
'documentType' : LRDocumentType,
|
|
96
|
+
'isVerified' : IDL.Bool,
|
|
97
|
+
'isCurrent' : IDL.Bool,
|
|
98
|
+
'landRegistryReference' : IDL.Opt(IDL.Text),
|
|
99
|
+
'validUntil' : IDL.Opt(IDL.Int),
|
|
100
|
+
});
|
|
101
|
+
const TransactionVerificationSummary = IDL.Record({
|
|
102
|
+
'missingDocuments' : IDL.Vec(IDL.Text),
|
|
103
|
+
'expiredDocuments' : IDL.Nat,
|
|
104
|
+
'hasOfficialSearch' : IDL.Bool,
|
|
105
|
+
'titleNumber' : IDL.Text,
|
|
106
|
+
'allDocumentsVerified' : IDL.Bool,
|
|
107
|
+
'readyForSubmission' : IDL.Bool,
|
|
108
|
+
'readyForCompletion' : IDL.Bool,
|
|
109
|
+
'officialSearchValid' : IDL.Bool,
|
|
110
|
+
'allLRDocumentsCurrent' : IDL.Bool,
|
|
111
|
+
'verifiedDocuments' : IDL.Nat,
|
|
112
|
+
'daysUntilSearchExpiry' : IDL.Opt(IDL.Int),
|
|
113
|
+
'lrDocuments' : IDL.Vec(LRDocumentSummary),
|
|
114
|
+
'officialSearchExpiry' : IDL.Opt(IDL.Int),
|
|
115
|
+
'readyForExchange' : IDL.Bool,
|
|
116
|
+
'unverifiedDocuments' : IDL.Nat,
|
|
117
|
+
'totalDocuments' : IDL.Nat,
|
|
118
|
+
'transactionId' : IDL.Text,
|
|
119
|
+
});
|
|
120
|
+
const Result_4 = IDL.Variant({
|
|
121
|
+
'ok' : TransactionVerificationSummary,
|
|
122
|
+
'err' : IDL.Text,
|
|
123
|
+
});
|
|
124
|
+
const Result_3 = IDL.Variant({ 'ok' : IDL.Nat, 'err' : IDL.Text });
|
|
50
125
|
const Result = IDL.Variant({ 'ok' : DocumentVerification, 'err' : IDL.Text });
|
|
126
|
+
const OfficialCopyVerification = IDL.Record({
|
|
127
|
+
'documentAge' : IDL.Nat,
|
|
128
|
+
'hashVerified' : IDL.Bool,
|
|
129
|
+
'issuedAt' : IDL.Int,
|
|
130
|
+
'titleNumberMatches' : IDL.Bool,
|
|
131
|
+
'isCurrent' : IDL.Bool,
|
|
132
|
+
'copyType' : LRDocumentType,
|
|
133
|
+
'verifiedAt' : IDL.Int,
|
|
134
|
+
'verifiedBy' : IDL.Principal,
|
|
135
|
+
});
|
|
136
|
+
const Result_2 = IDL.Variant({
|
|
137
|
+
'ok' : OfficialCopyVerification,
|
|
138
|
+
'err' : IDL.Text,
|
|
139
|
+
});
|
|
140
|
+
const PriorityStatus = IDL.Variant({
|
|
141
|
+
'Active' : IDL.Null,
|
|
142
|
+
'ExpiringImminently' : IDL.Null,
|
|
143
|
+
'Unknown' : IDL.Null,
|
|
144
|
+
'Expired' : IDL.Null,
|
|
145
|
+
});
|
|
146
|
+
const OSCertificateVerification = IDL.Record({
|
|
147
|
+
'priorityStatus' : PriorityStatus,
|
|
148
|
+
'registerChangedFlag' : IDL.Opt(IDL.Bool),
|
|
149
|
+
'advisoryEntries' : IDL.Vec(IDL.Text),
|
|
150
|
+
'hashVerified' : IDL.Bool,
|
|
151
|
+
'priorityExpiry' : IDL.Opt(IDL.Int),
|
|
152
|
+
'titleNumberMatches' : IDL.Bool,
|
|
153
|
+
'daysRemaining' : IDL.Opt(IDL.Int),
|
|
154
|
+
'verifiedAt' : IDL.Int,
|
|
155
|
+
'verifiedBy' : IDL.Principal,
|
|
156
|
+
});
|
|
157
|
+
const Result_1 = IDL.Variant({
|
|
158
|
+
'ok' : OSCertificateVerification,
|
|
159
|
+
'err' : IDL.Text,
|
|
160
|
+
});
|
|
161
|
+
const OscarVerificationInput = IDL.Record({
|
|
162
|
+
'documentType' : IDL.Text,
|
|
163
|
+
'requiresSolicitorReview' : IDL.Bool,
|
|
164
|
+
'extractedData' : IDL.Text,
|
|
165
|
+
'issues' : IDL.Vec(OscarIssue),
|
|
166
|
+
'mismatches' : IDL.Vec(DataMismatch),
|
|
167
|
+
'confidence' : IDL.Nat,
|
|
168
|
+
});
|
|
51
169
|
return IDL.Service({
|
|
52
170
|
'deleteDocument' : IDL.Func(
|
|
53
171
|
[IDL.Nat],
|
|
@@ -72,6 +190,11 @@ export const idlFactory = ({ IDL }) => {
|
|
|
72
190
|
[IDL.Vec(DocumentVerification)],
|
|
73
191
|
['query'],
|
|
74
192
|
),
|
|
193
|
+
'getOscarVerificationDetails' : IDL.Func(
|
|
194
|
+
[IDL.Nat],
|
|
195
|
+
[IDL.Opt(OscarVerificationDetails)],
|
|
196
|
+
['query'],
|
|
197
|
+
),
|
|
75
198
|
'getPropertyDocuments' : IDL.Func(
|
|
76
199
|
[IDL.Nat],
|
|
77
200
|
[IDL.Vec(DocumentMetadata)],
|
|
@@ -90,6 +213,11 @@ export const idlFactory = ({ IDL }) => {
|
|
|
90
213
|
],
|
|
91
214
|
['query'],
|
|
92
215
|
),
|
|
216
|
+
'getTransactionVerificationSummary' : IDL.Func(
|
|
217
|
+
[IDL.Text, IDL.Text],
|
|
218
|
+
[Result_4],
|
|
219
|
+
[],
|
|
220
|
+
),
|
|
93
221
|
'getUnverifiedDocuments' : IDL.Func(
|
|
94
222
|
[IDL.Nat],
|
|
95
223
|
[IDL.Vec(DocumentMetadata)],
|
|
@@ -100,11 +228,28 @@ export const idlFactory = ({ IDL }) => {
|
|
|
100
228
|
[IDL.Opt(DocumentVerification)],
|
|
101
229
|
['query'],
|
|
102
230
|
),
|
|
231
|
+
'getVerificationsByTransaction' : IDL.Func(
|
|
232
|
+
[IDL.Nat],
|
|
233
|
+
[IDL.Vec(DocumentVerification)],
|
|
234
|
+
['query'],
|
|
235
|
+
),
|
|
103
236
|
'getVerificationsByVerifier' : IDL.Func(
|
|
104
237
|
[IDL.Principal],
|
|
105
238
|
[IDL.Vec(DocumentVerification)],
|
|
106
239
|
['query'],
|
|
107
240
|
),
|
|
241
|
+
'recordAuditEntry' : IDL.Func(
|
|
242
|
+
[
|
|
243
|
+
ActorType,
|
|
244
|
+
IDL.Opt(IDL.Principal),
|
|
245
|
+
IDL.Text,
|
|
246
|
+
IDL.Nat,
|
|
247
|
+
IDL.Text,
|
|
248
|
+
IDL.Bool,
|
|
249
|
+
],
|
|
250
|
+
[Result_3],
|
|
251
|
+
[],
|
|
252
|
+
),
|
|
108
253
|
'registerDocument' : IDL.Func(
|
|
109
254
|
[
|
|
110
255
|
IDL.Nat,
|
|
@@ -127,12 +272,27 @@ export const idlFactory = ({ IDL }) => {
|
|
|
127
272
|
[Result],
|
|
128
273
|
[],
|
|
129
274
|
),
|
|
275
|
+
'verifyOfficialCopy' : IDL.Func(
|
|
276
|
+
[IDL.Nat, IDL.Text, IDL.Nat],
|
|
277
|
+
[Result_2],
|
|
278
|
+
[],
|
|
279
|
+
),
|
|
280
|
+
'verifyOfficialSearchCertificate' : IDL.Func(
|
|
281
|
+
[IDL.Nat, IDL.Text, IDL.Opt(IDL.Text)],
|
|
282
|
+
[Result_1],
|
|
283
|
+
[],
|
|
284
|
+
),
|
|
130
285
|
'verifyWithCommercialAPI' : IDL.Func(
|
|
131
286
|
[IDL.Nat, IDL.Text, IDL.Text],
|
|
132
287
|
[Result],
|
|
133
288
|
[],
|
|
134
289
|
),
|
|
135
290
|
'verifyWithDVLA' : IDL.Func([IDL.Nat, IDL.Text], [Result], []),
|
|
291
|
+
'verifyWithOscar' : IDL.Func(
|
|
292
|
+
[IDL.Nat, OscarVerificationInput],
|
|
293
|
+
[Result],
|
|
294
|
+
[],
|
|
295
|
+
),
|
|
136
296
|
'verifyWithPassportDCS' : IDL.Func([IDL.Nat, IDL.Text], [Result], []),
|
|
137
297
|
});
|
|
138
298
|
};
|
|
@@ -1,33 +1,82 @@
|
|
|
1
|
+
type Result_1 =
|
|
2
|
+
variant {
|
|
3
|
+
err: text;
|
|
4
|
+
ok: nat;
|
|
5
|
+
};
|
|
6
|
+
type Result =
|
|
7
|
+
variant {
|
|
8
|
+
err: text;
|
|
9
|
+
ok: text;
|
|
10
|
+
};
|
|
1
11
|
type EmailNotification =
|
|
2
12
|
record {
|
|
3
13
|
company: opt text;
|
|
4
14
|
contactType: ContactType;
|
|
5
15
|
email: text;
|
|
6
16
|
id: nat;
|
|
17
|
+
lrNotificationType: opt text;
|
|
7
18
|
message: text;
|
|
8
19
|
name: text;
|
|
9
20
|
partnerType: opt text;
|
|
10
21
|
phone: opt text;
|
|
11
22
|
processed: bool;
|
|
23
|
+
propertyAddress: opt text;
|
|
12
24
|
subject: text;
|
|
13
25
|
timestamp: int;
|
|
26
|
+
titleNumber: opt text;
|
|
27
|
+
transactionId: opt text;
|
|
14
28
|
userType: opt text;
|
|
15
29
|
volume: opt text;
|
|
16
30
|
website: opt text;
|
|
17
31
|
};
|
|
18
32
|
type ContactType =
|
|
19
33
|
variant {
|
|
34
|
+
email_verification;
|
|
35
|
+
lr_application_registered;
|
|
36
|
+
lr_application_submitted;
|
|
37
|
+
lr_budget_alert;
|
|
38
|
+
lr_official_search_complete;
|
|
39
|
+
lr_requisition_raised;
|
|
40
|
+
lr_search_expiry_warning;
|
|
41
|
+
lr_status_change;
|
|
42
|
+
message_notification;
|
|
20
43
|
partners;
|
|
21
44
|
sales;
|
|
22
45
|
support;
|
|
23
46
|
};
|
|
24
47
|
service : {
|
|
48
|
+
checkAndSendExpiryWarnings: (daysThreshold: nat) -> (Result_1);
|
|
49
|
+
disableExpiryWarningTimer: () -> (Result);
|
|
50
|
+
enableExpiryWarningTimer: () -> (Result);
|
|
25
51
|
formatNotificationAsEmail: (id: nat) -> (opt text) query;
|
|
26
52
|
getAllNotifications: () -> (vec EmailNotification) query;
|
|
53
|
+
getCycles: () -> (nat) query;
|
|
54
|
+
getExpiryWarningStatus: () ->
|
|
55
|
+
(record {
|
|
56
|
+
lastCheckTime: int;
|
|
57
|
+
timerActive: bool;
|
|
58
|
+
}) query;
|
|
59
|
+
getLandRegistryNotifications: (txnId: text) ->
|
|
60
|
+
(vec EmailNotification) query;
|
|
27
61
|
getNotification: (id: nat) -> (opt EmailNotification) query;
|
|
62
|
+
getTransactionManagerCanister: () -> (text) query;
|
|
28
63
|
getUnprocessedCount: () -> (nat) query;
|
|
64
|
+
getUnprocessedLRNotifications: () -> (vec EmailNotification) query;
|
|
29
65
|
getUnprocessedNotifications: () -> (vec EmailNotification) query;
|
|
66
|
+
getUserManagementCanister: () -> (text) query;
|
|
30
67
|
markAsProcessed: (id: nat) -> (bool);
|
|
68
|
+
sendBudgetAlert: (recipientEmail: text, recipientName: text, currentSpend:
|
|
69
|
+
nat, budgetLimit: nat, percentUsed: nat) -> (nat);
|
|
70
|
+
sendLandRegistryNotification: (recipientEmail: text, recipientName:
|
|
71
|
+
text, notificationType: text, txnId: text, title: text, propAddress:
|
|
72
|
+
text, details: text) -> (nat);
|
|
73
|
+
setTransactionManagerCanister: (canisterId: text) -> (Result);
|
|
74
|
+
setUserManagementCanister: (canisterId: text) -> (Result);
|
|
75
|
+
submitEmailVerification: (name: text, email: text, verificationToken:
|
|
76
|
+
text) -> (nat);
|
|
77
|
+
submitMessageNotification: (recipientEmail: text, recipientName: text,
|
|
78
|
+
senderName: text, subject: text, messagePreview: text, threadId: text,
|
|
79
|
+
transactionId: text, propertyAddress: text, priority: text) -> (nat);
|
|
31
80
|
submitPartnerInquiry: (name: text, email: text, company: text, website:
|
|
32
81
|
text, partnerType: text, message: text) -> (nat);
|
|
33
82
|
submitSalesInquiry: (name: text, email: text, company: text, phone:
|