@propxchain/core-client 0.2.1-canary.21 → 0.2.1-canary.22
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/canisters/document_storage/document_storage.did +159 -159
- package/src/canisters/document_storage/document_storage.did.d.ts +159 -159
- package/src/canisters/document_storage/document_storage.did.js +230 -230
- package/src/canisters/document_verification/document_verification.did +248 -248
- package/src/canisters/document_verification/document_verification.did.d.ts +236 -236
- package/src/canisters/document_verification/document_verification.did.js +299 -299
- package/src/canisters/email_service/email_service.did +86 -86
- package/src/canisters/email_service/email_service.did.d.ts +92 -92
- package/src/canisters/email_service/email_service.did.js +131 -131
- package/src/canisters/land_registry_integration/land_registry_integration.did +395 -395
- package/src/canisters/land_registry_integration/land_registry_integration.did.d.ts +331 -331
- package/src/canisters/land_registry_integration/land_registry_integration.did.js +384 -384
- package/src/canisters/ledger_manager/ledger_manager.did +232 -232
- package/src/canisters/ledger_manager/ledger_manager.did.d.ts +205 -205
- package/src/canisters/ledger_manager/ledger_manager.did.js +256 -256
- package/src/canisters/property_registry/property_registry.did.d.ts +71 -71
- package/src/canisters/user_management/user_management.did +297 -297
- package/src/canisters/user_management/user_management.did.d.ts +267 -267
- package/src/canisters/user_management/user_management.did.js +352 -352
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@propxchain/core-client",
|
|
3
|
-
"version": "0.2.1-canary.
|
|
3
|
+
"version": "0.2.1-canary.22",
|
|
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,159 +1,159 @@
|
|
|
1
|
-
type Time = int;
|
|
2
|
-
type Result_6 =
|
|
3
|
-
variant {
|
|
4
|
-
err: text;
|
|
5
|
-
ok: blob;
|
|
6
|
-
};
|
|
7
|
-
type Result_5 =
|
|
8
|
-
variant {
|
|
9
|
-
err: text;
|
|
10
|
-
ok:
|
|
11
|
-
record {
|
|
12
|
-
contentType: text;
|
|
13
|
-
docType: text;
|
|
14
|
-
fileHash: text;
|
|
15
|
-
fileName: text;
|
|
16
|
-
fileSize: nat;
|
|
17
|
-
id: nat;
|
|
18
|
-
totalChunks: nat;
|
|
19
|
-
transactionId: opt text;
|
|
20
|
-
uploadedAt: int;
|
|
21
|
-
uploadedBy: principal;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
type Result_4 =
|
|
25
|
-
variant {
|
|
26
|
-
err: text;
|
|
27
|
-
ok:
|
|
28
|
-
record {
|
|
29
|
-
isComplete: bool;
|
|
30
|
-
missingChunks: vec nat;
|
|
31
|
-
totalChunks: nat;
|
|
32
|
-
uploadedChunks: nat;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
type Result_3 =
|
|
36
|
-
variant {
|
|
37
|
-
err: text;
|
|
38
|
-
ok: nat;
|
|
39
|
-
};
|
|
40
|
-
type Result_2 =
|
|
41
|
-
variant {
|
|
42
|
-
err: text;
|
|
43
|
-
ok: text;
|
|
44
|
-
};
|
|
45
|
-
type Result_1 =
|
|
46
|
-
variant {
|
|
47
|
-
err: text;
|
|
48
|
-
ok: record {
|
|
49
|
-
isComplete: bool;
|
|
50
|
-
totalChunks: nat;
|
|
51
|
-
uploadedChunks: nat;
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
type Result =
|
|
55
|
-
variant {
|
|
56
|
-
err: text;
|
|
57
|
-
ok: bool;
|
|
58
|
-
};
|
|
59
|
-
type DocumentSource =
|
|
60
|
-
variant {
|
|
61
|
-
LandRegistryAPI;
|
|
62
|
-
LandRegistryNotification;
|
|
63
|
-
SystemGenerated;
|
|
64
|
-
UserUploaded;
|
|
65
|
-
};
|
|
66
|
-
type DocumentProof =
|
|
67
|
-
record {
|
|
68
|
-
apiCostPence: opt nat;
|
|
69
|
-
contentType: text;
|
|
70
|
-
docType: text;
|
|
71
|
-
documentSource: DocumentSource;
|
|
72
|
-
fetchedFromApi: bool;
|
|
73
|
-
fileHash: text;
|
|
74
|
-
fileName: text;
|
|
75
|
-
fileSize: nat;
|
|
76
|
-
id: nat;
|
|
77
|
-
landRegistryReference: opt text;
|
|
78
|
-
storageLocation: text;
|
|
79
|
-
titleNumber: opt text;
|
|
80
|
-
totalChunks: nat;
|
|
81
|
-
transactionId: opt text;
|
|
82
|
-
uploadedAt: Time;
|
|
83
|
-
uploadedBy: principal;
|
|
84
|
-
uploadedChunks: nat;
|
|
85
|
-
validUntil: opt int;
|
|
86
|
-
verified: bool;
|
|
87
|
-
};
|
|
88
|
-
type AuditLog =
|
|
89
|
-
record {
|
|
90
|
-
action: text;
|
|
91
|
-
actorPrincipal: principal;
|
|
92
|
-
actorType: ActorType;
|
|
93
|
-
delegatedBy: opt principal;
|
|
94
|
-
documentId: nat;
|
|
95
|
-
id: nat;
|
|
96
|
-
metadata: text;
|
|
97
|
-
success: bool;
|
|
98
|
-
timestamp: Time;
|
|
99
|
-
};
|
|
100
|
-
type ActorType =
|
|
101
|
-
variant {
|
|
102
|
-
agent;
|
|
103
|
-
systemActor;
|
|
104
|
-
user;
|
|
105
|
-
};
|
|
106
|
-
service : {
|
|
107
|
-
deleteDocument: (documentId: nat, csrfToken: text) -> (Result_2);
|
|
108
|
-
downloadDocumentChunk: (documentId: nat, chunkIndex: nat) -> (Result_6);
|
|
109
|
-
generateCSRFToken: () -> (text);
|
|
110
|
-
getAuditLogs: (documentId: nat) -> (vec AuditLog) query;
|
|
111
|
-
getCSRFToken: () -> (opt text) query;
|
|
112
|
-
getCycles: () -> (nat) query;
|
|
113
|
-
getDocumentByLandRegistryReference: (lrRef: text) ->
|
|
114
|
-
(opt DocumentProof) query;
|
|
115
|
-
getDocumentMetadata: (documentId: nat) -> (Result_5) query;
|
|
116
|
-
getDocumentProof: (documentId: nat) -> (opt DocumentProof) query;
|
|
117
|
-
getDocumentUploadStatus: (documentId: nat) -> (Result_4) query;
|
|
118
|
-
getDocumentVerificationCanister: () -> (opt principal) query;
|
|
119
|
-
getExpiredLandRegistryDocuments: () -> (vec DocumentProof) query;
|
|
120
|
-
getLandRegistryCanister: () -> (opt principal) query;
|
|
121
|
-
getLandRegistryDocumentsForTitle: (titleNumber: text) ->
|
|
122
|
-
(vec DocumentProof) query;
|
|
123
|
-
getLandRegistryDocumentsForTransaction: (transactionId: text) ->
|
|
124
|
-
(vec DocumentProof) query;
|
|
125
|
-
getMyAuditLogs: (_principal: principal) -> (vec AuditLog) query;
|
|
126
|
-
getRecentAuditLogs: (limit: nat) -> (vec AuditLog) query;
|
|
127
|
-
getStorageStats: () ->
|
|
128
|
-
(record {
|
|
129
|
-
averageFileSizeBytes: nat;
|
|
130
|
-
totalDocuments: nat;
|
|
131
|
-
totalSizeBytes: nat;
|
|
132
|
-
verifiedDocuments: nat;
|
|
133
|
-
}) query;
|
|
134
|
-
getTransactionDocuments: (transactionId: text) -> (vec DocumentProof) query;
|
|
135
|
-
getTransactionManagerCanister: () -> (opt principal) query;
|
|
136
|
-
getUserManagementCanister: () -> (opt principal) query;
|
|
137
|
-
markDocumentDeleted: (documentId: nat, csrfToken: text) -> (Result_2);
|
|
138
|
-
recordAuditEntry: (actorType: ActorType, delegatedBy: opt principal,
|
|
139
|
-
action: text, documentId: nat, success: bool, metadata: text) ->
|
|
140
|
-
(Result_3);
|
|
141
|
-
registerDocumentProof: (fileName: text, fileHash: text, fileSize: nat,
|
|
142
|
-
contentType: text, storageLocation: text, transactionId: opt text,
|
|
143
|
-
docType: text, csrfToken: text) -> (Result_3);
|
|
144
|
-
registerLandRegistryDocument: (transactionId: text, titleNumber: text,
|
|
145
|
-
documentType: text, fileHash: text, fileSize: nat, contentType: text,
|
|
146
|
-
landRegistryReference: text, validUntil: opt int, costPence: nat) ->
|
|
147
|
-
(Result_3);
|
|
148
|
-
setDocumentVerificationCanister: (canisterId: principal) -> (Result_2);
|
|
149
|
-
setLandRegistryCanister: (canisterId: principal) -> (Result_2);
|
|
150
|
-
setTransactionManagerCanister: (canisterId: principal, _csrfToken:
|
|
151
|
-
text) -> (Result_2);
|
|
152
|
-
setUserManagementCanister: (canisterId: principal, _csrfToken: text) ->
|
|
153
|
-
(Result_2);
|
|
154
|
-
uploadDocumentChunk: (documentId: nat, chunkIndex: nat, data: blob,
|
|
155
|
-
csrfToken: text) -> (Result_1);
|
|
156
|
-
validateCSRFToken: (token: text) -> (bool);
|
|
157
|
-
verifyDocumentHash: (documentId: nat, providedHash: text, csrfToken:
|
|
158
|
-
text) -> (Result);
|
|
159
|
-
}
|
|
1
|
+
type Time = int;
|
|
2
|
+
type Result_6 =
|
|
3
|
+
variant {
|
|
4
|
+
err: text;
|
|
5
|
+
ok: blob;
|
|
6
|
+
};
|
|
7
|
+
type Result_5 =
|
|
8
|
+
variant {
|
|
9
|
+
err: text;
|
|
10
|
+
ok:
|
|
11
|
+
record {
|
|
12
|
+
contentType: text;
|
|
13
|
+
docType: text;
|
|
14
|
+
fileHash: text;
|
|
15
|
+
fileName: text;
|
|
16
|
+
fileSize: nat;
|
|
17
|
+
id: nat;
|
|
18
|
+
totalChunks: nat;
|
|
19
|
+
transactionId: opt text;
|
|
20
|
+
uploadedAt: int;
|
|
21
|
+
uploadedBy: principal;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
type Result_4 =
|
|
25
|
+
variant {
|
|
26
|
+
err: text;
|
|
27
|
+
ok:
|
|
28
|
+
record {
|
|
29
|
+
isComplete: bool;
|
|
30
|
+
missingChunks: vec nat;
|
|
31
|
+
totalChunks: nat;
|
|
32
|
+
uploadedChunks: nat;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
type Result_3 =
|
|
36
|
+
variant {
|
|
37
|
+
err: text;
|
|
38
|
+
ok: nat;
|
|
39
|
+
};
|
|
40
|
+
type Result_2 =
|
|
41
|
+
variant {
|
|
42
|
+
err: text;
|
|
43
|
+
ok: text;
|
|
44
|
+
};
|
|
45
|
+
type Result_1 =
|
|
46
|
+
variant {
|
|
47
|
+
err: text;
|
|
48
|
+
ok: record {
|
|
49
|
+
isComplete: bool;
|
|
50
|
+
totalChunks: nat;
|
|
51
|
+
uploadedChunks: nat;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
type Result =
|
|
55
|
+
variant {
|
|
56
|
+
err: text;
|
|
57
|
+
ok: bool;
|
|
58
|
+
};
|
|
59
|
+
type DocumentSource =
|
|
60
|
+
variant {
|
|
61
|
+
LandRegistryAPI;
|
|
62
|
+
LandRegistryNotification;
|
|
63
|
+
SystemGenerated;
|
|
64
|
+
UserUploaded;
|
|
65
|
+
};
|
|
66
|
+
type DocumentProof =
|
|
67
|
+
record {
|
|
68
|
+
apiCostPence: opt nat;
|
|
69
|
+
contentType: text;
|
|
70
|
+
docType: text;
|
|
71
|
+
documentSource: DocumentSource;
|
|
72
|
+
fetchedFromApi: bool;
|
|
73
|
+
fileHash: text;
|
|
74
|
+
fileName: text;
|
|
75
|
+
fileSize: nat;
|
|
76
|
+
id: nat;
|
|
77
|
+
landRegistryReference: opt text;
|
|
78
|
+
storageLocation: text;
|
|
79
|
+
titleNumber: opt text;
|
|
80
|
+
totalChunks: nat;
|
|
81
|
+
transactionId: opt text;
|
|
82
|
+
uploadedAt: Time;
|
|
83
|
+
uploadedBy: principal;
|
|
84
|
+
uploadedChunks: nat;
|
|
85
|
+
validUntil: opt int;
|
|
86
|
+
verified: bool;
|
|
87
|
+
};
|
|
88
|
+
type AuditLog =
|
|
89
|
+
record {
|
|
90
|
+
action: text;
|
|
91
|
+
actorPrincipal: principal;
|
|
92
|
+
actorType: ActorType;
|
|
93
|
+
delegatedBy: opt principal;
|
|
94
|
+
documentId: nat;
|
|
95
|
+
id: nat;
|
|
96
|
+
metadata: text;
|
|
97
|
+
success: bool;
|
|
98
|
+
timestamp: Time;
|
|
99
|
+
};
|
|
100
|
+
type ActorType =
|
|
101
|
+
variant {
|
|
102
|
+
agent;
|
|
103
|
+
systemActor;
|
|
104
|
+
user;
|
|
105
|
+
};
|
|
106
|
+
service : {
|
|
107
|
+
deleteDocument: (documentId: nat, csrfToken: text) -> (Result_2);
|
|
108
|
+
downloadDocumentChunk: (documentId: nat, chunkIndex: nat) -> (Result_6);
|
|
109
|
+
generateCSRFToken: () -> (text);
|
|
110
|
+
getAuditLogs: (documentId: nat) -> (vec AuditLog) query;
|
|
111
|
+
getCSRFToken: () -> (opt text) query;
|
|
112
|
+
getCycles: () -> (nat) query;
|
|
113
|
+
getDocumentByLandRegistryReference: (lrRef: text) ->
|
|
114
|
+
(opt DocumentProof) query;
|
|
115
|
+
getDocumentMetadata: (documentId: nat) -> (Result_5) query;
|
|
116
|
+
getDocumentProof: (documentId: nat) -> (opt DocumentProof) query;
|
|
117
|
+
getDocumentUploadStatus: (documentId: nat) -> (Result_4) query;
|
|
118
|
+
getDocumentVerificationCanister: () -> (opt principal) query;
|
|
119
|
+
getExpiredLandRegistryDocuments: () -> (vec DocumentProof) query;
|
|
120
|
+
getLandRegistryCanister: () -> (opt principal) query;
|
|
121
|
+
getLandRegistryDocumentsForTitle: (titleNumber: text) ->
|
|
122
|
+
(vec DocumentProof) query;
|
|
123
|
+
getLandRegistryDocumentsForTransaction: (transactionId: text) ->
|
|
124
|
+
(vec DocumentProof) query;
|
|
125
|
+
getMyAuditLogs: (_principal: principal) -> (vec AuditLog) query;
|
|
126
|
+
getRecentAuditLogs: (limit: nat) -> (vec AuditLog) query;
|
|
127
|
+
getStorageStats: () ->
|
|
128
|
+
(record {
|
|
129
|
+
averageFileSizeBytes: nat;
|
|
130
|
+
totalDocuments: nat;
|
|
131
|
+
totalSizeBytes: nat;
|
|
132
|
+
verifiedDocuments: nat;
|
|
133
|
+
}) query;
|
|
134
|
+
getTransactionDocuments: (transactionId: text) -> (vec DocumentProof) query;
|
|
135
|
+
getTransactionManagerCanister: () -> (opt principal) query;
|
|
136
|
+
getUserManagementCanister: () -> (opt principal) query;
|
|
137
|
+
markDocumentDeleted: (documentId: nat, csrfToken: text) -> (Result_2);
|
|
138
|
+
recordAuditEntry: (actorType: ActorType, delegatedBy: opt principal,
|
|
139
|
+
action: text, documentId: nat, success: bool, metadata: text) ->
|
|
140
|
+
(Result_3);
|
|
141
|
+
registerDocumentProof: (fileName: text, fileHash: text, fileSize: nat,
|
|
142
|
+
contentType: text, storageLocation: text, transactionId: opt text,
|
|
143
|
+
docType: text, csrfToken: text) -> (Result_3);
|
|
144
|
+
registerLandRegistryDocument: (transactionId: text, titleNumber: text,
|
|
145
|
+
documentType: text, fileHash: text, fileSize: nat, contentType: text,
|
|
146
|
+
landRegistryReference: text, validUntil: opt int, costPence: nat) ->
|
|
147
|
+
(Result_3);
|
|
148
|
+
setDocumentVerificationCanister: (canisterId: principal) -> (Result_2);
|
|
149
|
+
setLandRegistryCanister: (canisterId: principal) -> (Result_2);
|
|
150
|
+
setTransactionManagerCanister: (canisterId: principal, _csrfToken:
|
|
151
|
+
text) -> (Result_2);
|
|
152
|
+
setUserManagementCanister: (canisterId: principal, _csrfToken: text) ->
|
|
153
|
+
(Result_2);
|
|
154
|
+
uploadDocumentChunk: (documentId: nat, chunkIndex: nat, data: blob,
|
|
155
|
+
csrfToken: text) -> (Result_1);
|
|
156
|
+
validateCSRFToken: (token: text) -> (bool);
|
|
157
|
+
verifyDocumentHash: (documentId: nat, providedHash: text, csrfToken:
|
|
158
|
+
text) -> (Result);
|
|
159
|
+
}
|
|
@@ -1,159 +1,159 @@
|
|
|
1
|
-
import type { Principal } from '@dfinity/principal';
|
|
2
|
-
import type { ActorMethod } from '@dfinity/agent';
|
|
3
|
-
import type { IDL } from '@dfinity/candid';
|
|
4
|
-
|
|
5
|
-
export type ActorType = { 'agent' : null } |
|
|
6
|
-
{ 'systemActor' : null } |
|
|
7
|
-
{ 'user' : null };
|
|
8
|
-
export interface AuditLog {
|
|
9
|
-
'id' : bigint,
|
|
10
|
-
'action' : string,
|
|
11
|
-
'actorType' : ActorType,
|
|
12
|
-
'metadata' : string,
|
|
13
|
-
'delegatedBy' : [] | [Principal],
|
|
14
|
-
'timestamp' : Time,
|
|
15
|
-
'success' : boolean,
|
|
16
|
-
'documentId' : bigint,
|
|
17
|
-
'actorPrincipal' : Principal,
|
|
18
|
-
}
|
|
19
|
-
export interface DocumentProof {
|
|
20
|
-
'id' : bigint,
|
|
21
|
-
'verified' : boolean,
|
|
22
|
-
'uploadedChunks' : bigint,
|
|
23
|
-
'contentType' : string,
|
|
24
|
-
'titleNumber' : [] | [string],
|
|
25
|
-
'fileHash' : string,
|
|
26
|
-
'fileName' : string,
|
|
27
|
-
'fileSize' : bigint,
|
|
28
|
-
'documentSource' : DocumentSource,
|
|
29
|
-
'totalChunks' : bigint,
|
|
30
|
-
'fetchedFromApi' : boolean,
|
|
31
|
-
'apiCostPence' : [] | [bigint],
|
|
32
|
-
'landRegistryReference' : [] | [string],
|
|
33
|
-
'storageLocation' : string,
|
|
34
|
-
'docType' : string,
|
|
35
|
-
'uploadedAt' : Time,
|
|
36
|
-
'uploadedBy' : Principal,
|
|
37
|
-
'validUntil' : [] | [bigint],
|
|
38
|
-
'transactionId' : [] | [string],
|
|
39
|
-
}
|
|
40
|
-
export type DocumentSource = { 'UserUploaded' : null } |
|
|
41
|
-
{ 'LandRegistryAPI' : null } |
|
|
42
|
-
{ 'LandRegistryNotification' : null } |
|
|
43
|
-
{ 'SystemGenerated' : null };
|
|
44
|
-
export type Result = { 'ok' : boolean } |
|
|
45
|
-
{ 'err' : string };
|
|
46
|
-
export type Result_1 = {
|
|
47
|
-
'ok' : {
|
|
48
|
-
'uploadedChunks' : bigint,
|
|
49
|
-
'totalChunks' : bigint,
|
|
50
|
-
'isComplete' : boolean,
|
|
51
|
-
}
|
|
52
|
-
} |
|
|
53
|
-
{ 'err' : string };
|
|
54
|
-
export type Result_2 = { 'ok' : string } |
|
|
55
|
-
{ 'err' : string };
|
|
56
|
-
export type Result_3 = { 'ok' : bigint } |
|
|
57
|
-
{ 'err' : string };
|
|
58
|
-
export type Result_4 = {
|
|
59
|
-
'ok' : {
|
|
60
|
-
'uploadedChunks' : bigint,
|
|
61
|
-
'totalChunks' : bigint,
|
|
62
|
-
'missingChunks' : Array<bigint>,
|
|
63
|
-
'isComplete' : boolean,
|
|
64
|
-
}
|
|
65
|
-
} |
|
|
66
|
-
{ 'err' : string };
|
|
67
|
-
export type Result_5 = {
|
|
68
|
-
'ok' : {
|
|
69
|
-
'id' : bigint,
|
|
70
|
-
'contentType' : string,
|
|
71
|
-
'fileHash' : string,
|
|
72
|
-
'fileName' : string,
|
|
73
|
-
'fileSize' : bigint,
|
|
74
|
-
'totalChunks' : bigint,
|
|
75
|
-
'docType' : string,
|
|
76
|
-
'uploadedAt' : bigint,
|
|
77
|
-
'uploadedBy' : Principal,
|
|
78
|
-
'transactionId' : [] | [string],
|
|
79
|
-
}
|
|
80
|
-
} |
|
|
81
|
-
{ 'err' : string };
|
|
82
|
-
export type Result_6 = { 'ok' : Uint8Array | number[] } |
|
|
83
|
-
{ 'err' : string };
|
|
84
|
-
export type Time = bigint;
|
|
85
|
-
export interface _SERVICE {
|
|
86
|
-
'deleteDocument' : ActorMethod<[bigint, string], Result_2>,
|
|
87
|
-
'downloadDocumentChunk' : ActorMethod<[bigint, bigint], Result_6>,
|
|
88
|
-
'generateCSRFToken' : ActorMethod<[], string>,
|
|
89
|
-
'getAuditLogs' : ActorMethod<[bigint], Array<AuditLog>>,
|
|
90
|
-
'getCSRFToken' : ActorMethod<[], [] | [string]>,
|
|
91
|
-
'getCycles' : ActorMethod<[], bigint>,
|
|
92
|
-
'getDocumentByLandRegistryReference' : ActorMethod<
|
|
93
|
-
[string],
|
|
94
|
-
[] | [DocumentProof]
|
|
95
|
-
>,
|
|
96
|
-
'getDocumentMetadata' : ActorMethod<[bigint], Result_5>,
|
|
97
|
-
'getDocumentProof' : ActorMethod<[bigint], [] | [DocumentProof]>,
|
|
98
|
-
'getDocumentUploadStatus' : ActorMethod<[bigint], Result_4>,
|
|
99
|
-
'getDocumentVerificationCanister' : ActorMethod<[], [] | [Principal]>,
|
|
100
|
-
'getExpiredLandRegistryDocuments' : ActorMethod<[], Array<DocumentProof>>,
|
|
101
|
-
'getLandRegistryCanister' : ActorMethod<[], [] | [Principal]>,
|
|
102
|
-
'getLandRegistryDocumentsForTitle' : ActorMethod<
|
|
103
|
-
[string],
|
|
104
|
-
Array<DocumentProof>
|
|
105
|
-
>,
|
|
106
|
-
'getLandRegistryDocumentsForTransaction' : ActorMethod<
|
|
107
|
-
[string],
|
|
108
|
-
Array<DocumentProof>
|
|
109
|
-
>,
|
|
110
|
-
'getMyAuditLogs' : ActorMethod<[Principal], Array<AuditLog>>,
|
|
111
|
-
'getRecentAuditLogs' : ActorMethod<[bigint], Array<AuditLog>>,
|
|
112
|
-
'getStorageStats' : ActorMethod<
|
|
113
|
-
[],
|
|
114
|
-
{
|
|
115
|
-
'averageFileSizeBytes' : bigint,
|
|
116
|
-
'totalSizeBytes' : bigint,
|
|
117
|
-
'verifiedDocuments' : bigint,
|
|
118
|
-
'totalDocuments' : bigint,
|
|
119
|
-
}
|
|
120
|
-
>,
|
|
121
|
-
'getTransactionDocuments' : ActorMethod<[string], Array<DocumentProof>>,
|
|
122
|
-
'getTransactionManagerCanister' : ActorMethod<[], [] | [Principal]>,
|
|
123
|
-
'getUserManagementCanister' : ActorMethod<[], [] | [Principal]>,
|
|
124
|
-
'markDocumentDeleted' : ActorMethod<[bigint, string], Result_2>,
|
|
125
|
-
'recordAuditEntry' : ActorMethod<
|
|
126
|
-
[ActorType, [] | [Principal], string, bigint, boolean, string],
|
|
127
|
-
Result_3
|
|
128
|
-
>,
|
|
129
|
-
'registerDocumentProof' : ActorMethod<
|
|
130
|
-
[string, string, bigint, string, string, [] | [string], string, string],
|
|
131
|
-
Result_3
|
|
132
|
-
>,
|
|
133
|
-
'registerLandRegistryDocument' : ActorMethod<
|
|
134
|
-
[
|
|
135
|
-
string,
|
|
136
|
-
string,
|
|
137
|
-
string,
|
|
138
|
-
string,
|
|
139
|
-
bigint,
|
|
140
|
-
string,
|
|
141
|
-
string,
|
|
142
|
-
[] | [bigint],
|
|
143
|
-
bigint,
|
|
144
|
-
],
|
|
145
|
-
Result_3
|
|
146
|
-
>,
|
|
147
|
-
'setDocumentVerificationCanister' : ActorMethod<[Principal], Result_2>,
|
|
148
|
-
'setLandRegistryCanister' : ActorMethod<[Principal], Result_2>,
|
|
149
|
-
'setTransactionManagerCanister' : ActorMethod<[Principal, string], Result_2>,
|
|
150
|
-
'setUserManagementCanister' : ActorMethod<[Principal, string], Result_2>,
|
|
151
|
-
'uploadDocumentChunk' : ActorMethod<
|
|
152
|
-
[bigint, bigint, Uint8Array | number[], string],
|
|
153
|
-
Result_1
|
|
154
|
-
>,
|
|
155
|
-
'validateCSRFToken' : ActorMethod<[string], boolean>,
|
|
156
|
-
'verifyDocumentHash' : ActorMethod<[bigint, string, string], Result>,
|
|
157
|
-
}
|
|
158
|
-
export declare const idlFactory: IDL.InterfaceFactory;
|
|
159
|
-
export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
|
|
1
|
+
import type { Principal } from '@dfinity/principal';
|
|
2
|
+
import type { ActorMethod } from '@dfinity/agent';
|
|
3
|
+
import type { IDL } from '@dfinity/candid';
|
|
4
|
+
|
|
5
|
+
export type ActorType = { 'agent' : null } |
|
|
6
|
+
{ 'systemActor' : null } |
|
|
7
|
+
{ 'user' : null };
|
|
8
|
+
export interface AuditLog {
|
|
9
|
+
'id' : bigint,
|
|
10
|
+
'action' : string,
|
|
11
|
+
'actorType' : ActorType,
|
|
12
|
+
'metadata' : string,
|
|
13
|
+
'delegatedBy' : [] | [Principal],
|
|
14
|
+
'timestamp' : Time,
|
|
15
|
+
'success' : boolean,
|
|
16
|
+
'documentId' : bigint,
|
|
17
|
+
'actorPrincipal' : Principal,
|
|
18
|
+
}
|
|
19
|
+
export interface DocumentProof {
|
|
20
|
+
'id' : bigint,
|
|
21
|
+
'verified' : boolean,
|
|
22
|
+
'uploadedChunks' : bigint,
|
|
23
|
+
'contentType' : string,
|
|
24
|
+
'titleNumber' : [] | [string],
|
|
25
|
+
'fileHash' : string,
|
|
26
|
+
'fileName' : string,
|
|
27
|
+
'fileSize' : bigint,
|
|
28
|
+
'documentSource' : DocumentSource,
|
|
29
|
+
'totalChunks' : bigint,
|
|
30
|
+
'fetchedFromApi' : boolean,
|
|
31
|
+
'apiCostPence' : [] | [bigint],
|
|
32
|
+
'landRegistryReference' : [] | [string],
|
|
33
|
+
'storageLocation' : string,
|
|
34
|
+
'docType' : string,
|
|
35
|
+
'uploadedAt' : Time,
|
|
36
|
+
'uploadedBy' : Principal,
|
|
37
|
+
'validUntil' : [] | [bigint],
|
|
38
|
+
'transactionId' : [] | [string],
|
|
39
|
+
}
|
|
40
|
+
export type DocumentSource = { 'UserUploaded' : null } |
|
|
41
|
+
{ 'LandRegistryAPI' : null } |
|
|
42
|
+
{ 'LandRegistryNotification' : null } |
|
|
43
|
+
{ 'SystemGenerated' : null };
|
|
44
|
+
export type Result = { 'ok' : boolean } |
|
|
45
|
+
{ 'err' : string };
|
|
46
|
+
export type Result_1 = {
|
|
47
|
+
'ok' : {
|
|
48
|
+
'uploadedChunks' : bigint,
|
|
49
|
+
'totalChunks' : bigint,
|
|
50
|
+
'isComplete' : boolean,
|
|
51
|
+
}
|
|
52
|
+
} |
|
|
53
|
+
{ 'err' : string };
|
|
54
|
+
export type Result_2 = { 'ok' : string } |
|
|
55
|
+
{ 'err' : string };
|
|
56
|
+
export type Result_3 = { 'ok' : bigint } |
|
|
57
|
+
{ 'err' : string };
|
|
58
|
+
export type Result_4 = {
|
|
59
|
+
'ok' : {
|
|
60
|
+
'uploadedChunks' : bigint,
|
|
61
|
+
'totalChunks' : bigint,
|
|
62
|
+
'missingChunks' : Array<bigint>,
|
|
63
|
+
'isComplete' : boolean,
|
|
64
|
+
}
|
|
65
|
+
} |
|
|
66
|
+
{ 'err' : string };
|
|
67
|
+
export type Result_5 = {
|
|
68
|
+
'ok' : {
|
|
69
|
+
'id' : bigint,
|
|
70
|
+
'contentType' : string,
|
|
71
|
+
'fileHash' : string,
|
|
72
|
+
'fileName' : string,
|
|
73
|
+
'fileSize' : bigint,
|
|
74
|
+
'totalChunks' : bigint,
|
|
75
|
+
'docType' : string,
|
|
76
|
+
'uploadedAt' : bigint,
|
|
77
|
+
'uploadedBy' : Principal,
|
|
78
|
+
'transactionId' : [] | [string],
|
|
79
|
+
}
|
|
80
|
+
} |
|
|
81
|
+
{ 'err' : string };
|
|
82
|
+
export type Result_6 = { 'ok' : Uint8Array | number[] } |
|
|
83
|
+
{ 'err' : string };
|
|
84
|
+
export type Time = bigint;
|
|
85
|
+
export interface _SERVICE {
|
|
86
|
+
'deleteDocument' : ActorMethod<[bigint, string], Result_2>,
|
|
87
|
+
'downloadDocumentChunk' : ActorMethod<[bigint, bigint], Result_6>,
|
|
88
|
+
'generateCSRFToken' : ActorMethod<[], string>,
|
|
89
|
+
'getAuditLogs' : ActorMethod<[bigint], Array<AuditLog>>,
|
|
90
|
+
'getCSRFToken' : ActorMethod<[], [] | [string]>,
|
|
91
|
+
'getCycles' : ActorMethod<[], bigint>,
|
|
92
|
+
'getDocumentByLandRegistryReference' : ActorMethod<
|
|
93
|
+
[string],
|
|
94
|
+
[] | [DocumentProof]
|
|
95
|
+
>,
|
|
96
|
+
'getDocumentMetadata' : ActorMethod<[bigint], Result_5>,
|
|
97
|
+
'getDocumentProof' : ActorMethod<[bigint], [] | [DocumentProof]>,
|
|
98
|
+
'getDocumentUploadStatus' : ActorMethod<[bigint], Result_4>,
|
|
99
|
+
'getDocumentVerificationCanister' : ActorMethod<[], [] | [Principal]>,
|
|
100
|
+
'getExpiredLandRegistryDocuments' : ActorMethod<[], Array<DocumentProof>>,
|
|
101
|
+
'getLandRegistryCanister' : ActorMethod<[], [] | [Principal]>,
|
|
102
|
+
'getLandRegistryDocumentsForTitle' : ActorMethod<
|
|
103
|
+
[string],
|
|
104
|
+
Array<DocumentProof>
|
|
105
|
+
>,
|
|
106
|
+
'getLandRegistryDocumentsForTransaction' : ActorMethod<
|
|
107
|
+
[string],
|
|
108
|
+
Array<DocumentProof>
|
|
109
|
+
>,
|
|
110
|
+
'getMyAuditLogs' : ActorMethod<[Principal], Array<AuditLog>>,
|
|
111
|
+
'getRecentAuditLogs' : ActorMethod<[bigint], Array<AuditLog>>,
|
|
112
|
+
'getStorageStats' : ActorMethod<
|
|
113
|
+
[],
|
|
114
|
+
{
|
|
115
|
+
'averageFileSizeBytes' : bigint,
|
|
116
|
+
'totalSizeBytes' : bigint,
|
|
117
|
+
'verifiedDocuments' : bigint,
|
|
118
|
+
'totalDocuments' : bigint,
|
|
119
|
+
}
|
|
120
|
+
>,
|
|
121
|
+
'getTransactionDocuments' : ActorMethod<[string], Array<DocumentProof>>,
|
|
122
|
+
'getTransactionManagerCanister' : ActorMethod<[], [] | [Principal]>,
|
|
123
|
+
'getUserManagementCanister' : ActorMethod<[], [] | [Principal]>,
|
|
124
|
+
'markDocumentDeleted' : ActorMethod<[bigint, string], Result_2>,
|
|
125
|
+
'recordAuditEntry' : ActorMethod<
|
|
126
|
+
[ActorType, [] | [Principal], string, bigint, boolean, string],
|
|
127
|
+
Result_3
|
|
128
|
+
>,
|
|
129
|
+
'registerDocumentProof' : ActorMethod<
|
|
130
|
+
[string, string, bigint, string, string, [] | [string], string, string],
|
|
131
|
+
Result_3
|
|
132
|
+
>,
|
|
133
|
+
'registerLandRegistryDocument' : ActorMethod<
|
|
134
|
+
[
|
|
135
|
+
string,
|
|
136
|
+
string,
|
|
137
|
+
string,
|
|
138
|
+
string,
|
|
139
|
+
bigint,
|
|
140
|
+
string,
|
|
141
|
+
string,
|
|
142
|
+
[] | [bigint],
|
|
143
|
+
bigint,
|
|
144
|
+
],
|
|
145
|
+
Result_3
|
|
146
|
+
>,
|
|
147
|
+
'setDocumentVerificationCanister' : ActorMethod<[Principal], Result_2>,
|
|
148
|
+
'setLandRegistryCanister' : ActorMethod<[Principal], Result_2>,
|
|
149
|
+
'setTransactionManagerCanister' : ActorMethod<[Principal, string], Result_2>,
|
|
150
|
+
'setUserManagementCanister' : ActorMethod<[Principal, string], Result_2>,
|
|
151
|
+
'uploadDocumentChunk' : ActorMethod<
|
|
152
|
+
[bigint, bigint, Uint8Array | number[], string],
|
|
153
|
+
Result_1
|
|
154
|
+
>,
|
|
155
|
+
'validateCSRFToken' : ActorMethod<[string], boolean>,
|
|
156
|
+
'verifyDocumentHash' : ActorMethod<[bigint, string, string], Result>,
|
|
157
|
+
}
|
|
158
|
+
export declare const idlFactory: IDL.InterfaceFactory;
|
|
159
|
+
export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
|