@propxchain/core-client 0.2.1 → 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 +122 -2
- 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 +153 -3
- package/src/canisters/user_management/user_management.did.d.ts +121 -2
- package/src/canisters/user_management/user_management.did.js +166 -6
- package/src/client.ts +1 -1
- package/src/index.ts +2 -2
- package/src/mock.ts +1 -1
- package/src/types.ts +1 -1
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
type Time = int;
|
|
2
|
-
type
|
|
2
|
+
type Result_6 =
|
|
3
|
+
variant {
|
|
4
|
+
err: text;
|
|
5
|
+
ok: blob;
|
|
6
|
+
};
|
|
7
|
+
type Result_5 =
|
|
3
8
|
variant {
|
|
4
9
|
err: text;
|
|
5
10
|
ok:
|
|
@@ -16,54 +21,108 @@ type Result_3 =
|
|
|
16
21
|
uploadedBy: principal;
|
|
17
22
|
};
|
|
18
23
|
};
|
|
19
|
-
type
|
|
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 =
|
|
20
36
|
variant {
|
|
21
37
|
err: text;
|
|
22
38
|
ok: nat;
|
|
23
39
|
};
|
|
24
|
-
type
|
|
40
|
+
type Result_2 =
|
|
25
41
|
variant {
|
|
26
42
|
err: text;
|
|
27
43
|
ok: text;
|
|
28
44
|
};
|
|
45
|
+
type Result_1 =
|
|
46
|
+
variant {
|
|
47
|
+
err: text;
|
|
48
|
+
ok: record {
|
|
49
|
+
isComplete: bool;
|
|
50
|
+
totalChunks: nat;
|
|
51
|
+
uploadedChunks: nat;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
29
54
|
type Result =
|
|
30
55
|
variant {
|
|
31
56
|
err: text;
|
|
32
57
|
ok: bool;
|
|
33
58
|
};
|
|
59
|
+
type DocumentSource =
|
|
60
|
+
variant {
|
|
61
|
+
LandRegistryAPI;
|
|
62
|
+
LandRegistryNotification;
|
|
63
|
+
SystemGenerated;
|
|
64
|
+
UserUploaded;
|
|
65
|
+
};
|
|
34
66
|
type DocumentProof =
|
|
35
67
|
record {
|
|
68
|
+
apiCostPence: opt nat;
|
|
36
69
|
contentType: text;
|
|
37
70
|
docType: text;
|
|
71
|
+
documentSource: DocumentSource;
|
|
72
|
+
fetchedFromApi: bool;
|
|
38
73
|
fileHash: text;
|
|
39
74
|
fileName: text;
|
|
40
75
|
fileSize: nat;
|
|
41
76
|
id: nat;
|
|
77
|
+
landRegistryReference: opt text;
|
|
42
78
|
storageLocation: text;
|
|
79
|
+
titleNumber: opt text;
|
|
80
|
+
totalChunks: nat;
|
|
43
81
|
transactionId: opt text;
|
|
44
82
|
uploadedAt: Time;
|
|
45
83
|
uploadedBy: principal;
|
|
84
|
+
uploadedChunks: nat;
|
|
85
|
+
validUntil: opt int;
|
|
46
86
|
verified: bool;
|
|
47
87
|
};
|
|
48
88
|
type AuditLog =
|
|
49
89
|
record {
|
|
50
90
|
action: text;
|
|
51
91
|
actorPrincipal: principal;
|
|
92
|
+
actorType: ActorType;
|
|
93
|
+
delegatedBy: opt principal;
|
|
52
94
|
documentId: nat;
|
|
53
95
|
id: nat;
|
|
54
96
|
metadata: text;
|
|
55
97
|
success: bool;
|
|
56
98
|
timestamp: Time;
|
|
57
99
|
};
|
|
100
|
+
type ActorType =
|
|
101
|
+
variant {
|
|
102
|
+
agent;
|
|
103
|
+
systemActor;
|
|
104
|
+
user;
|
|
105
|
+
};
|
|
58
106
|
service : {
|
|
59
|
-
deleteDocument: (documentId: nat, csrfToken: text) -> (
|
|
107
|
+
deleteDocument: (documentId: nat, csrfToken: text) -> (Result_2);
|
|
108
|
+
downloadDocumentChunk: (documentId: nat, chunkIndex: nat) -> (Result_6);
|
|
60
109
|
generateCSRFToken: () -> (text);
|
|
61
110
|
getAuditLogs: (documentId: nat) -> (vec AuditLog) query;
|
|
62
111
|
getCSRFToken: () -> (opt text) query;
|
|
63
112
|
getCycles: () -> (nat) query;
|
|
64
|
-
|
|
113
|
+
getDocumentByLandRegistryReference: (lrRef: text) ->
|
|
114
|
+
(opt DocumentProof) query;
|
|
115
|
+
getDocumentMetadata: (documentId: nat) -> (Result_5) query;
|
|
65
116
|
getDocumentProof: (documentId: nat) -> (opt DocumentProof) query;
|
|
66
|
-
|
|
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;
|
|
67
126
|
getRecentAuditLogs: (limit: nat) -> (vec AuditLog) query;
|
|
68
127
|
getStorageStats: () ->
|
|
69
128
|
(record {
|
|
@@ -75,14 +134,25 @@ service : {
|
|
|
75
134
|
getTransactionDocuments: (transactionId: text) -> (vec DocumentProof) query;
|
|
76
135
|
getTransactionManagerCanister: () -> (opt principal) query;
|
|
77
136
|
getUserManagementCanister: () -> (opt principal) query;
|
|
78
|
-
markDocumentDeleted: (documentId: nat, csrfToken: text) -> (
|
|
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);
|
|
79
141
|
registerDocumentProof: (fileName: text, fileHash: text, fileSize: nat,
|
|
80
142
|
contentType: text, storageLocation: text, transactionId: opt text,
|
|
81
|
-
docType: text, csrfToken: text) -> (
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
(
|
|
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);
|
|
86
156
|
validateCSRFToken: (token: text) -> (bool);
|
|
87
157
|
verifyDocumentHash: (documentId: nat, providedHash: text, csrfToken:
|
|
88
158
|
text) -> (Result);
|
|
@@ -2,10 +2,15 @@ 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,
|
|
8
12
|
'metadata' : string,
|
|
13
|
+
'delegatedBy' : [] | [Principal],
|
|
9
14
|
'timestamp' : Time,
|
|
10
15
|
'success' : boolean,
|
|
11
16
|
'documentId' : bigint,
|
|
@@ -14,23 +19,52 @@ export interface AuditLog {
|
|
|
14
19
|
export interface DocumentProof {
|
|
15
20
|
'id' : bigint,
|
|
16
21
|
'verified' : boolean,
|
|
22
|
+
'uploadedChunks' : bigint,
|
|
17
23
|
'contentType' : string,
|
|
24
|
+
'titleNumber' : [] | [string],
|
|
18
25
|
'fileHash' : string,
|
|
19
26
|
'fileName' : string,
|
|
20
27
|
'fileSize' : bigint,
|
|
28
|
+
'documentSource' : DocumentSource,
|
|
29
|
+
'totalChunks' : bigint,
|
|
30
|
+
'fetchedFromApi' : boolean,
|
|
31
|
+
'apiCostPence' : [] | [bigint],
|
|
32
|
+
'landRegistryReference' : [] | [string],
|
|
21
33
|
'storageLocation' : string,
|
|
22
34
|
'docType' : string,
|
|
23
35
|
'uploadedAt' : Time,
|
|
24
36
|
'uploadedBy' : Principal,
|
|
37
|
+
'validUntil' : [] | [bigint],
|
|
25
38
|
'transactionId' : [] | [string],
|
|
26
39
|
}
|
|
40
|
+
export type DocumentSource = { 'UserUploaded' : null } |
|
|
41
|
+
{ 'LandRegistryAPI' : null } |
|
|
42
|
+
{ 'LandRegistryNotification' : null } |
|
|
43
|
+
{ 'SystemGenerated' : null };
|
|
27
44
|
export type Result = { 'ok' : boolean } |
|
|
28
45
|
{ 'err' : string };
|
|
29
|
-
export type Result_1 = {
|
|
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 } |
|
|
30
55
|
{ 'err' : string };
|
|
31
|
-
export type
|
|
56
|
+
export type Result_3 = { 'ok' : bigint } |
|
|
32
57
|
{ 'err' : string };
|
|
33
|
-
export type
|
|
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 = {
|
|
34
68
|
'ok' : {
|
|
35
69
|
'id' : bigint,
|
|
36
70
|
'contentType' : string,
|
|
@@ -45,15 +79,34 @@ export type Result_3 = {
|
|
|
45
79
|
}
|
|
46
80
|
} |
|
|
47
81
|
{ 'err' : string };
|
|
82
|
+
export type Result_6 = { 'ok' : Uint8Array | number[] } |
|
|
83
|
+
{ 'err' : string };
|
|
48
84
|
export type Time = bigint;
|
|
49
85
|
export interface _SERVICE {
|
|
50
|
-
'deleteDocument' : ActorMethod<[bigint, string],
|
|
86
|
+
'deleteDocument' : ActorMethod<[bigint, string], Result_2>,
|
|
87
|
+
'downloadDocumentChunk' : ActorMethod<[bigint, bigint], Result_6>,
|
|
51
88
|
'generateCSRFToken' : ActorMethod<[], string>,
|
|
52
89
|
'getAuditLogs' : ActorMethod<[bigint], Array<AuditLog>>,
|
|
53
90
|
'getCSRFToken' : ActorMethod<[], [] | [string]>,
|
|
54
91
|
'getCycles' : ActorMethod<[], bigint>,
|
|
55
|
-
'
|
|
92
|
+
'getDocumentByLandRegistryReference' : ActorMethod<
|
|
93
|
+
[string],
|
|
94
|
+
[] | [DocumentProof]
|
|
95
|
+
>,
|
|
96
|
+
'getDocumentMetadata' : ActorMethod<[bigint], Result_5>,
|
|
56
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
|
+
>,
|
|
57
110
|
'getMyAuditLogs' : ActorMethod<[Principal], Array<AuditLog>>,
|
|
58
111
|
'getRecentAuditLogs' : ActorMethod<[bigint], Array<AuditLog>>,
|
|
59
112
|
'getStorageStats' : ActorMethod<
|
|
@@ -68,13 +121,37 @@ export interface _SERVICE {
|
|
|
68
121
|
'getTransactionDocuments' : ActorMethod<[string], Array<DocumentProof>>,
|
|
69
122
|
'getTransactionManagerCanister' : ActorMethod<[], [] | [Principal]>,
|
|
70
123
|
'getUserManagementCanister' : ActorMethod<[], [] | [Principal]>,
|
|
71
|
-
'markDocumentDeleted' : ActorMethod<[bigint, string],
|
|
124
|
+
'markDocumentDeleted' : ActorMethod<[bigint, string], Result_2>,
|
|
125
|
+
'recordAuditEntry' : ActorMethod<
|
|
126
|
+
[ActorType, [] | [Principal], string, bigint, boolean, string],
|
|
127
|
+
Result_3
|
|
128
|
+
>,
|
|
72
129
|
'registerDocumentProof' : ActorMethod<
|
|
73
130
|
[string, string, bigint, string, string, [] | [string], string, string],
|
|
74
|
-
|
|
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
|
|
75
154
|
>,
|
|
76
|
-
'setTransactionManagerCanister' : ActorMethod<[Principal, string], Result_1>,
|
|
77
|
-
'setUserManagementCanister' : ActorMethod<[Principal, string], Result_1>,
|
|
78
155
|
'validateCSRFToken' : ActorMethod<[string], boolean>,
|
|
79
156
|
'verifyDocumentHash' : ActorMethod<[bigint, string, string], Result>,
|
|
80
157
|
}
|
|
@@ -1,16 +1,51 @@
|
|
|
1
1
|
export const idlFactory = ({ IDL }) => {
|
|
2
|
-
const
|
|
2
|
+
const Result_2 = IDL.Variant({ 'ok' : IDL.Text, 'err' : IDL.Text });
|
|
3
|
+
const Result_6 = IDL.Variant({ 'ok' : IDL.Vec(IDL.Nat8), 'err' : IDL.Text });
|
|
4
|
+
const ActorType = IDL.Variant({
|
|
5
|
+
'agent' : IDL.Null,
|
|
6
|
+
'systemActor' : IDL.Null,
|
|
7
|
+
'user' : IDL.Null,
|
|
8
|
+
});
|
|
3
9
|
const Time = IDL.Int;
|
|
4
10
|
const AuditLog = IDL.Record({
|
|
5
11
|
'id' : IDL.Nat,
|
|
6
12
|
'action' : IDL.Text,
|
|
13
|
+
'actorType' : ActorType,
|
|
7
14
|
'metadata' : IDL.Text,
|
|
15
|
+
'delegatedBy' : IDL.Opt(IDL.Principal),
|
|
8
16
|
'timestamp' : Time,
|
|
9
17
|
'success' : IDL.Bool,
|
|
10
18
|
'documentId' : IDL.Nat,
|
|
11
19
|
'actorPrincipal' : IDL.Principal,
|
|
12
20
|
});
|
|
13
|
-
const
|
|
21
|
+
const DocumentSource = IDL.Variant({
|
|
22
|
+
'UserUploaded' : IDL.Null,
|
|
23
|
+
'LandRegistryAPI' : IDL.Null,
|
|
24
|
+
'LandRegistryNotification' : IDL.Null,
|
|
25
|
+
'SystemGenerated' : IDL.Null,
|
|
26
|
+
});
|
|
27
|
+
const DocumentProof = IDL.Record({
|
|
28
|
+
'id' : IDL.Nat,
|
|
29
|
+
'verified' : IDL.Bool,
|
|
30
|
+
'uploadedChunks' : IDL.Nat,
|
|
31
|
+
'contentType' : IDL.Text,
|
|
32
|
+
'titleNumber' : IDL.Opt(IDL.Text),
|
|
33
|
+
'fileHash' : IDL.Text,
|
|
34
|
+
'fileName' : IDL.Text,
|
|
35
|
+
'fileSize' : IDL.Nat,
|
|
36
|
+
'documentSource' : DocumentSource,
|
|
37
|
+
'totalChunks' : IDL.Nat,
|
|
38
|
+
'fetchedFromApi' : IDL.Bool,
|
|
39
|
+
'apiCostPence' : IDL.Opt(IDL.Nat),
|
|
40
|
+
'landRegistryReference' : IDL.Opt(IDL.Text),
|
|
41
|
+
'storageLocation' : IDL.Text,
|
|
42
|
+
'docType' : IDL.Text,
|
|
43
|
+
'uploadedAt' : Time,
|
|
44
|
+
'uploadedBy' : IDL.Principal,
|
|
45
|
+
'validUntil' : IDL.Opt(IDL.Int),
|
|
46
|
+
'transactionId' : IDL.Opt(IDL.Text),
|
|
47
|
+
});
|
|
48
|
+
const Result_5 = IDL.Variant({
|
|
14
49
|
'ok' : IDL.Record({
|
|
15
50
|
'id' : IDL.Nat,
|
|
16
51
|
'contentType' : IDL.Text,
|
|
@@ -25,33 +60,69 @@ export const idlFactory = ({ IDL }) => {
|
|
|
25
60
|
}),
|
|
26
61
|
'err' : IDL.Text,
|
|
27
62
|
});
|
|
28
|
-
const
|
|
29
|
-
'
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
'
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
'
|
|
63
|
+
const Result_4 = IDL.Variant({
|
|
64
|
+
'ok' : IDL.Record({
|
|
65
|
+
'uploadedChunks' : IDL.Nat,
|
|
66
|
+
'totalChunks' : IDL.Nat,
|
|
67
|
+
'missingChunks' : IDL.Vec(IDL.Nat),
|
|
68
|
+
'isComplete' : IDL.Bool,
|
|
69
|
+
}),
|
|
70
|
+
'err' : IDL.Text,
|
|
71
|
+
});
|
|
72
|
+
const Result_3 = IDL.Variant({ 'ok' : IDL.Nat, 'err' : IDL.Text });
|
|
73
|
+
const Result_1 = IDL.Variant({
|
|
74
|
+
'ok' : IDL.Record({
|
|
75
|
+
'uploadedChunks' : IDL.Nat,
|
|
76
|
+
'totalChunks' : IDL.Nat,
|
|
77
|
+
'isComplete' : IDL.Bool,
|
|
78
|
+
}),
|
|
79
|
+
'err' : IDL.Text,
|
|
40
80
|
});
|
|
41
|
-
const Result_2 = IDL.Variant({ 'ok' : IDL.Nat, 'err' : IDL.Text });
|
|
42
81
|
const Result = IDL.Variant({ 'ok' : IDL.Bool, 'err' : IDL.Text });
|
|
43
82
|
return IDL.Service({
|
|
44
|
-
'deleteDocument' : IDL.Func([IDL.Nat, IDL.Text], [
|
|
83
|
+
'deleteDocument' : IDL.Func([IDL.Nat, IDL.Text], [Result_2], []),
|
|
84
|
+
'downloadDocumentChunk' : IDL.Func([IDL.Nat, IDL.Nat], [Result_6], []),
|
|
45
85
|
'generateCSRFToken' : IDL.Func([], [IDL.Text], []),
|
|
46
86
|
'getAuditLogs' : IDL.Func([IDL.Nat], [IDL.Vec(AuditLog)], ['query']),
|
|
47
87
|
'getCSRFToken' : IDL.Func([], [IDL.Opt(IDL.Text)], ['query']),
|
|
48
88
|
'getCycles' : IDL.Func([], [IDL.Nat], ['query']),
|
|
49
|
-
'
|
|
89
|
+
'getDocumentByLandRegistryReference' : IDL.Func(
|
|
90
|
+
[IDL.Text],
|
|
91
|
+
[IDL.Opt(DocumentProof)],
|
|
92
|
+
['query'],
|
|
93
|
+
),
|
|
94
|
+
'getDocumentMetadata' : IDL.Func([IDL.Nat], [Result_5], ['query']),
|
|
50
95
|
'getDocumentProof' : IDL.Func(
|
|
51
96
|
[IDL.Nat],
|
|
52
97
|
[IDL.Opt(DocumentProof)],
|
|
53
98
|
['query'],
|
|
54
99
|
),
|
|
100
|
+
'getDocumentUploadStatus' : IDL.Func([IDL.Nat], [Result_4], ['query']),
|
|
101
|
+
'getDocumentVerificationCanister' : IDL.Func(
|
|
102
|
+
[],
|
|
103
|
+
[IDL.Opt(IDL.Principal)],
|
|
104
|
+
['query'],
|
|
105
|
+
),
|
|
106
|
+
'getExpiredLandRegistryDocuments' : IDL.Func(
|
|
107
|
+
[],
|
|
108
|
+
[IDL.Vec(DocumentProof)],
|
|
109
|
+
['query'],
|
|
110
|
+
),
|
|
111
|
+
'getLandRegistryCanister' : IDL.Func(
|
|
112
|
+
[],
|
|
113
|
+
[IDL.Opt(IDL.Principal)],
|
|
114
|
+
['query'],
|
|
115
|
+
),
|
|
116
|
+
'getLandRegistryDocumentsForTitle' : IDL.Func(
|
|
117
|
+
[IDL.Text],
|
|
118
|
+
[IDL.Vec(DocumentProof)],
|
|
119
|
+
['query'],
|
|
120
|
+
),
|
|
121
|
+
'getLandRegistryDocumentsForTransaction' : IDL.Func(
|
|
122
|
+
[IDL.Text],
|
|
123
|
+
[IDL.Vec(DocumentProof)],
|
|
124
|
+
['query'],
|
|
125
|
+
),
|
|
55
126
|
'getMyAuditLogs' : IDL.Func(
|
|
56
127
|
[IDL.Principal],
|
|
57
128
|
[IDL.Vec(AuditLog)],
|
|
@@ -85,7 +156,19 @@ export const idlFactory = ({ IDL }) => {
|
|
|
85
156
|
[IDL.Opt(IDL.Principal)],
|
|
86
157
|
['query'],
|
|
87
158
|
),
|
|
88
|
-
'markDocumentDeleted' : IDL.Func([IDL.Nat, IDL.Text], [
|
|
159
|
+
'markDocumentDeleted' : IDL.Func([IDL.Nat, IDL.Text], [Result_2], []),
|
|
160
|
+
'recordAuditEntry' : IDL.Func(
|
|
161
|
+
[
|
|
162
|
+
ActorType,
|
|
163
|
+
IDL.Opt(IDL.Principal),
|
|
164
|
+
IDL.Text,
|
|
165
|
+
IDL.Nat,
|
|
166
|
+
IDL.Bool,
|
|
167
|
+
IDL.Text,
|
|
168
|
+
],
|
|
169
|
+
[Result_3],
|
|
170
|
+
[],
|
|
171
|
+
),
|
|
89
172
|
'registerDocumentProof' : IDL.Func(
|
|
90
173
|
[
|
|
91
174
|
IDL.Text,
|
|
@@ -97,16 +180,42 @@ export const idlFactory = ({ IDL }) => {
|
|
|
97
180
|
IDL.Text,
|
|
98
181
|
IDL.Text,
|
|
99
182
|
],
|
|
183
|
+
[Result_3],
|
|
184
|
+
[],
|
|
185
|
+
),
|
|
186
|
+
'registerLandRegistryDocument' : IDL.Func(
|
|
187
|
+
[
|
|
188
|
+
IDL.Text,
|
|
189
|
+
IDL.Text,
|
|
190
|
+
IDL.Text,
|
|
191
|
+
IDL.Text,
|
|
192
|
+
IDL.Nat,
|
|
193
|
+
IDL.Text,
|
|
194
|
+
IDL.Text,
|
|
195
|
+
IDL.Opt(IDL.Int),
|
|
196
|
+
IDL.Nat,
|
|
197
|
+
],
|
|
198
|
+
[Result_3],
|
|
199
|
+
[],
|
|
200
|
+
),
|
|
201
|
+
'setDocumentVerificationCanister' : IDL.Func(
|
|
202
|
+
[IDL.Principal],
|
|
100
203
|
[Result_2],
|
|
101
204
|
[],
|
|
102
205
|
),
|
|
206
|
+
'setLandRegistryCanister' : IDL.Func([IDL.Principal], [Result_2], []),
|
|
103
207
|
'setTransactionManagerCanister' : IDL.Func(
|
|
104
208
|
[IDL.Principal, IDL.Text],
|
|
105
|
-
[
|
|
209
|
+
[Result_2],
|
|
106
210
|
[],
|
|
107
211
|
),
|
|
108
212
|
'setUserManagementCanister' : IDL.Func(
|
|
109
213
|
[IDL.Principal, IDL.Text],
|
|
214
|
+
[Result_2],
|
|
215
|
+
[],
|
|
216
|
+
),
|
|
217
|
+
'uploadDocumentChunk' : IDL.Func(
|
|
218
|
+
[IDL.Nat, IDL.Nat, IDL.Vec(IDL.Nat8), IDL.Text],
|
|
110
219
|
[Result_1],
|
|
111
220
|
[],
|
|
112
221
|
),
|