@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.
@@ -1,230 +1,230 @@
1
- export const idlFactory = ({ IDL }) => {
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
- });
9
- const Time = IDL.Int;
10
- const AuditLog = IDL.Record({
11
- 'id' : IDL.Nat,
12
- 'action' : IDL.Text,
13
- 'actorType' : ActorType,
14
- 'metadata' : IDL.Text,
15
- 'delegatedBy' : IDL.Opt(IDL.Principal),
16
- 'timestamp' : Time,
17
- 'success' : IDL.Bool,
18
- 'documentId' : IDL.Nat,
19
- 'actorPrincipal' : IDL.Principal,
20
- });
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({
49
- 'ok' : IDL.Record({
50
- 'id' : IDL.Nat,
51
- 'contentType' : IDL.Text,
52
- 'fileHash' : IDL.Text,
53
- 'fileName' : IDL.Text,
54
- 'fileSize' : IDL.Nat,
55
- 'totalChunks' : IDL.Nat,
56
- 'docType' : IDL.Text,
57
- 'uploadedAt' : IDL.Int,
58
- 'uploadedBy' : IDL.Principal,
59
- 'transactionId' : IDL.Opt(IDL.Text),
60
- }),
61
- 'err' : IDL.Text,
62
- });
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,
80
- });
81
- const Result = IDL.Variant({ 'ok' : IDL.Bool, 'err' : IDL.Text });
82
- return IDL.Service({
83
- 'deleteDocument' : IDL.Func([IDL.Nat, IDL.Text], [Result_2], []),
84
- 'downloadDocumentChunk' : IDL.Func([IDL.Nat, IDL.Nat], [Result_6], []),
85
- 'generateCSRFToken' : IDL.Func([], [IDL.Text], []),
86
- 'getAuditLogs' : IDL.Func([IDL.Nat], [IDL.Vec(AuditLog)], ['query']),
87
- 'getCSRFToken' : IDL.Func([], [IDL.Opt(IDL.Text)], ['query']),
88
- 'getCycles' : IDL.Func([], [IDL.Nat], ['query']),
89
- 'getDocumentByLandRegistryReference' : IDL.Func(
90
- [IDL.Text],
91
- [IDL.Opt(DocumentProof)],
92
- ['query'],
93
- ),
94
- 'getDocumentMetadata' : IDL.Func([IDL.Nat], [Result_5], ['query']),
95
- 'getDocumentProof' : IDL.Func(
96
- [IDL.Nat],
97
- [IDL.Opt(DocumentProof)],
98
- ['query'],
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
- ),
126
- 'getMyAuditLogs' : IDL.Func(
127
- [IDL.Principal],
128
- [IDL.Vec(AuditLog)],
129
- ['query'],
130
- ),
131
- 'getRecentAuditLogs' : IDL.Func([IDL.Nat], [IDL.Vec(AuditLog)], ['query']),
132
- 'getStorageStats' : IDL.Func(
133
- [],
134
- [
135
- IDL.Record({
136
- 'averageFileSizeBytes' : IDL.Nat,
137
- 'totalSizeBytes' : IDL.Nat,
138
- 'verifiedDocuments' : IDL.Nat,
139
- 'totalDocuments' : IDL.Nat,
140
- }),
141
- ],
142
- ['query'],
143
- ),
144
- 'getTransactionDocuments' : IDL.Func(
145
- [IDL.Text],
146
- [IDL.Vec(DocumentProof)],
147
- ['query'],
148
- ),
149
- 'getTransactionManagerCanister' : IDL.Func(
150
- [],
151
- [IDL.Opt(IDL.Principal)],
152
- ['query'],
153
- ),
154
- 'getUserManagementCanister' : IDL.Func(
155
- [],
156
- [IDL.Opt(IDL.Principal)],
157
- ['query'],
158
- ),
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
- ),
172
- 'registerDocumentProof' : IDL.Func(
173
- [
174
- IDL.Text,
175
- IDL.Text,
176
- IDL.Nat,
177
- IDL.Text,
178
- IDL.Text,
179
- IDL.Opt(IDL.Text),
180
- IDL.Text,
181
- IDL.Text,
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],
203
- [Result_2],
204
- [],
205
- ),
206
- 'setLandRegistryCanister' : IDL.Func([IDL.Principal], [Result_2], []),
207
- 'setTransactionManagerCanister' : IDL.Func(
208
- [IDL.Principal, IDL.Text],
209
- [Result_2],
210
- [],
211
- ),
212
- 'setUserManagementCanister' : IDL.Func(
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],
219
- [Result_1],
220
- [],
221
- ),
222
- 'validateCSRFToken' : IDL.Func([IDL.Text], [IDL.Bool], []),
223
- 'verifyDocumentHash' : IDL.Func(
224
- [IDL.Nat, IDL.Text, IDL.Text],
225
- [Result],
226
- [],
227
- ),
228
- });
229
- };
230
- export const init = ({ IDL }) => { return []; };
1
+ export const idlFactory = ({ IDL }) => {
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
+ });
9
+ const Time = IDL.Int;
10
+ const AuditLog = IDL.Record({
11
+ 'id' : IDL.Nat,
12
+ 'action' : IDL.Text,
13
+ 'actorType' : ActorType,
14
+ 'metadata' : IDL.Text,
15
+ 'delegatedBy' : IDL.Opt(IDL.Principal),
16
+ 'timestamp' : Time,
17
+ 'success' : IDL.Bool,
18
+ 'documentId' : IDL.Nat,
19
+ 'actorPrincipal' : IDL.Principal,
20
+ });
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({
49
+ 'ok' : IDL.Record({
50
+ 'id' : IDL.Nat,
51
+ 'contentType' : IDL.Text,
52
+ 'fileHash' : IDL.Text,
53
+ 'fileName' : IDL.Text,
54
+ 'fileSize' : IDL.Nat,
55
+ 'totalChunks' : IDL.Nat,
56
+ 'docType' : IDL.Text,
57
+ 'uploadedAt' : IDL.Int,
58
+ 'uploadedBy' : IDL.Principal,
59
+ 'transactionId' : IDL.Opt(IDL.Text),
60
+ }),
61
+ 'err' : IDL.Text,
62
+ });
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,
80
+ });
81
+ const Result = IDL.Variant({ 'ok' : IDL.Bool, 'err' : IDL.Text });
82
+ return IDL.Service({
83
+ 'deleteDocument' : IDL.Func([IDL.Nat, IDL.Text], [Result_2], []),
84
+ 'downloadDocumentChunk' : IDL.Func([IDL.Nat, IDL.Nat], [Result_6], []),
85
+ 'generateCSRFToken' : IDL.Func([], [IDL.Text], []),
86
+ 'getAuditLogs' : IDL.Func([IDL.Nat], [IDL.Vec(AuditLog)], ['query']),
87
+ 'getCSRFToken' : IDL.Func([], [IDL.Opt(IDL.Text)], ['query']),
88
+ 'getCycles' : IDL.Func([], [IDL.Nat], ['query']),
89
+ 'getDocumentByLandRegistryReference' : IDL.Func(
90
+ [IDL.Text],
91
+ [IDL.Opt(DocumentProof)],
92
+ ['query'],
93
+ ),
94
+ 'getDocumentMetadata' : IDL.Func([IDL.Nat], [Result_5], ['query']),
95
+ 'getDocumentProof' : IDL.Func(
96
+ [IDL.Nat],
97
+ [IDL.Opt(DocumentProof)],
98
+ ['query'],
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
+ ),
126
+ 'getMyAuditLogs' : IDL.Func(
127
+ [IDL.Principal],
128
+ [IDL.Vec(AuditLog)],
129
+ ['query'],
130
+ ),
131
+ 'getRecentAuditLogs' : IDL.Func([IDL.Nat], [IDL.Vec(AuditLog)], ['query']),
132
+ 'getStorageStats' : IDL.Func(
133
+ [],
134
+ [
135
+ IDL.Record({
136
+ 'averageFileSizeBytes' : IDL.Nat,
137
+ 'totalSizeBytes' : IDL.Nat,
138
+ 'verifiedDocuments' : IDL.Nat,
139
+ 'totalDocuments' : IDL.Nat,
140
+ }),
141
+ ],
142
+ ['query'],
143
+ ),
144
+ 'getTransactionDocuments' : IDL.Func(
145
+ [IDL.Text],
146
+ [IDL.Vec(DocumentProof)],
147
+ ['query'],
148
+ ),
149
+ 'getTransactionManagerCanister' : IDL.Func(
150
+ [],
151
+ [IDL.Opt(IDL.Principal)],
152
+ ['query'],
153
+ ),
154
+ 'getUserManagementCanister' : IDL.Func(
155
+ [],
156
+ [IDL.Opt(IDL.Principal)],
157
+ ['query'],
158
+ ),
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
+ ),
172
+ 'registerDocumentProof' : IDL.Func(
173
+ [
174
+ IDL.Text,
175
+ IDL.Text,
176
+ IDL.Nat,
177
+ IDL.Text,
178
+ IDL.Text,
179
+ IDL.Opt(IDL.Text),
180
+ IDL.Text,
181
+ IDL.Text,
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],
203
+ [Result_2],
204
+ [],
205
+ ),
206
+ 'setLandRegistryCanister' : IDL.Func([IDL.Principal], [Result_2], []),
207
+ 'setTransactionManagerCanister' : IDL.Func(
208
+ [IDL.Principal, IDL.Text],
209
+ [Result_2],
210
+ [],
211
+ ),
212
+ 'setUserManagementCanister' : IDL.Func(
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],
219
+ [Result_1],
220
+ [],
221
+ ),
222
+ 'validateCSRFToken' : IDL.Func([IDL.Text], [IDL.Bool], []),
223
+ 'verifyDocumentHash' : IDL.Func(
224
+ [IDL.Nat, IDL.Text, IDL.Text],
225
+ [Result],
226
+ [],
227
+ ),
228
+ });
229
+ };
230
+ export const init = ({ IDL }) => { return []; };