@propxchain/core-client 0.2.1 → 0.3.0-canary.24

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.
Files changed (63) hide show
  1. package/README.md +2 -3
  2. package/dist/auth.d.ts +7 -7
  3. package/dist/auth.d.ts.map +1 -1
  4. package/dist/auth.js +5 -5
  5. package/dist/auth.js.map +1 -1
  6. package/dist/canisters/document_storage/document_storage.did.d.ts.map +1 -1
  7. package/dist/canisters/document_storage/document_storage.did.js +90 -21
  8. package/dist/canisters/document_storage/document_storage.did.js.map +1 -1
  9. package/dist/canisters/document_verification/document_verification.did.d.ts.map +1 -1
  10. package/dist/canisters/document_verification/document_verification.did.js +132 -0
  11. package/dist/canisters/document_verification/document_verification.did.js.map +1 -1
  12. package/dist/canisters/email_service/email_service.did.d.ts.map +1 -1
  13. package/dist/canisters/email_service/email_service.did.js +40 -0
  14. package/dist/canisters/email_service/email_service.did.js.map +1 -1
  15. package/dist/canisters/land_registry_integration/land_registry_integration.did.d.ts.map +1 -1
  16. package/dist/canisters/land_registry_integration/land_registry_integration.did.js +186 -12
  17. package/dist/canisters/land_registry_integration/land_registry_integration.did.js.map +1 -1
  18. package/dist/canisters/ledger_manager/ledger_manager.did.d.ts.map +1 -1
  19. package/dist/canisters/ledger_manager/ledger_manager.did.js +55 -0
  20. package/dist/canisters/ledger_manager/ledger_manager.did.js.map +1 -1
  21. package/dist/canisters/transaction_manager/transaction_manager.did.d.ts.map +1 -1
  22. package/dist/canisters/transaction_manager/transaction_manager.did.js +338 -40
  23. package/dist/canisters/transaction_manager/transaction_manager.did.js.map +1 -1
  24. package/dist/canisters/user_management/user_management.did.d.ts.map +1 -1
  25. package/dist/canisters/user_management/user_management.did.js +122 -2
  26. package/dist/canisters/user_management/user_management.did.js.map +1 -1
  27. package/dist/client.js +1 -1
  28. package/dist/client.js.map +1 -1
  29. package/dist/index.d.ts +1 -1
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +1 -1
  32. package/dist/index.js.map +1 -1
  33. package/dist/mock.js +1 -1
  34. package/dist/mock.js.map +1 -1
  35. package/dist/types.d.ts +1 -1
  36. package/dist/types.d.ts.map +1 -1
  37. package/package.json +3 -6
  38. package/src/auth.ts +8 -9
  39. package/src/canisters/document_storage/document_storage.did +82 -12
  40. package/src/canisters/document_storage/document_storage.did.d.ts +86 -9
  41. package/src/canisters/document_storage/document_storage.did.js +128 -19
  42. package/src/canisters/document_verification/document_verification.did +150 -0
  43. package/src/canisters/document_verification/document_verification.did.d.ts +125 -1
  44. package/src/canisters/document_verification/document_verification.did.js +160 -0
  45. package/src/canisters/email_service/email_service.did +49 -0
  46. package/src/canisters/email_service/email_service.did.d.ts +49 -2
  47. package/src/canisters/email_service/email_service.did.js +68 -0
  48. package/src/canisters/land_registry_integration/land_registry_integration.did +118 -19
  49. package/src/canisters/land_registry_integration/land_registry_integration.did.d.ts +89 -19
  50. package/src/canisters/land_registry_integration/land_registry_integration.did.js +213 -11
  51. package/src/canisters/ledger_manager/ledger_manager.did +78 -0
  52. package/src/canisters/ledger_manager/ledger_manager.did.d.ts +66 -0
  53. package/src/canisters/ledger_manager/ledger_manager.did.js +75 -0
  54. package/src/canisters/transaction_manager/transaction_manager.did +438 -47
  55. package/src/canisters/transaction_manager/transaction_manager.did.d.ts +379 -36
  56. package/src/canisters/transaction_manager/transaction_manager.did.js +346 -40
  57. package/src/canisters/user_management/user_management.did +153 -3
  58. package/src/canisters/user_management/user_management.did.d.ts +121 -2
  59. package/src/canisters/user_management/user_management.did.js +166 -6
  60. package/src/client.ts +1 -1
  61. package/src/index.ts +2 -2
  62. package/src/mock.ts +1 -1
  63. package/src/types.ts +1 -1
@@ -1,3 +1,8 @@
1
+ type TransformArgs =
2
+ record {
3
+ context: blob;
4
+ response: HttpResponse;
5
+ };
1
6
  type TransactionStatus =
2
7
  variant {
3
8
  confirmed;
@@ -6,21 +11,36 @@ type TransactionStatus =
6
11
  requires_manual_review;
7
12
  sent_to_lr;
8
13
  };
9
- type Result_4 =
14
+ type Result_7 =
10
15
  variant {
11
16
  err: text;
12
17
  ok: LandRegistryAPIResponse;
13
18
  };
14
- type Result_3 =
19
+ type Result_6 =
15
20
  variant {
16
21
  err: text;
17
22
  ok: nat32;
18
23
  };
19
- type Result_2 =
24
+ type Result_5 =
20
25
  variant {
21
26
  err: text;
22
27
  ok: OwnershipTransferPayload;
23
28
  };
29
+ type Result_4 =
30
+ variant {
31
+ err: text;
32
+ ok: nat;
33
+ };
34
+ type Result_3 =
35
+ variant {
36
+ err: text;
37
+ ok: OfficialSearchResponse;
38
+ };
39
+ type Result_2 =
40
+ variant {
41
+ err: text;
42
+ ok;
43
+ };
24
44
  type Result_1 =
25
45
  variant {
26
46
  err: text;
@@ -31,6 +51,15 @@ type Result =
31
51
  err: text;
32
52
  ok: bool;
33
53
  };
54
+ type RateLimitInfo =
55
+ record {
56
+ callsThisHour: nat;
57
+ callsToday: nat;
58
+ dayResetAt: int;
59
+ endpoint: text;
60
+ hourResetAt: int;
61
+ lastCallAt: int;
62
+ };
34
63
  type Period =
35
64
  variant {
36
65
  day;
@@ -56,6 +85,20 @@ type OwnershipTransferPayload =
56
85
  transactionDate: int;
57
86
  transferID: text;
58
87
  };
88
+ type OfficialSearchResponse =
89
+ record {
90
+ advisoryEntries: vec text;
91
+ certificatePdfHash: opt text;
92
+ certificateTimestamp: text;
93
+ documentStorageId: opt nat;
94
+ httpStatus: nat;
95
+ officialCopyTimestamp: opt text;
96
+ priorityExpiry: text;
97
+ registerChangedSinceSearchFromDate: bool;
98
+ registeredProprietorNames: vec text;
99
+ resultContainsAdvisoryEntries: bool;
100
+ searchRef: text;
101
+ };
59
102
  type NewOwnerInfo =
60
103
  record {
61
104
  address: text;
@@ -94,14 +137,6 @@ type LandRegistryAPIResponse =
94
137
  responseID: text;
95
138
  status: LRStatus;
96
139
  };
97
- type LandRegistryAPICredentials =
98
- record {
99
- apiEndpoint: text;
100
- apiKey: text;
101
- authenticationType: AuthenticationType;
102
- environment: Environment;
103
- lastValidated: int;
104
- };
105
140
  type LRStatus =
106
141
  variant {
107
142
  failed;
@@ -109,28 +144,83 @@ type LRStatus =
109
144
  received;
110
145
  registered;
111
146
  };
147
+ type HttpResponse =
148
+ record {
149
+ body: blob;
150
+ headers: vec HttpHeader;
151
+ status: nat;
152
+ };
153
+ type HttpHeader =
154
+ record {
155
+ name: text;
156
+ value: text;
157
+ };
112
158
  type Environment =
113
159
  variant {
114
160
  production;
115
161
  sandbox;
116
162
  };
163
+ type CredentialStatus =
164
+ record {
165
+ daysSinceRotation: opt nat;
166
+ environment: opt Environment;
167
+ isConfigured: bool;
168
+ isExpired: bool;
169
+ lastRotated: opt int;
170
+ };
171
+ type CostSummary =
172
+ record {
173
+ byEndpoint: vec record {
174
+ text;
175
+ nat;
176
+ };
177
+ byTransaction: vec record {
178
+ text;
179
+ nat;
180
+ };
181
+ entryCount: nat;
182
+ totalPence: nat;
183
+ };
117
184
  type ConveyancerInfo =
118
185
  record {
119
186
  contactEmail: text;
120
187
  licenseNumber: text;
121
188
  name: text;
122
189
  };
123
- type AuthenticationType =
190
+ type AuditEntry =
191
+ record {
192
+ action: text;
193
+ actorType: ActorType;
194
+ caller: principal;
195
+ delegatedBy: opt principal;
196
+ details: text;
197
+ success: bool;
198
+ timestamp: int;
199
+ };
200
+ type ActorType =
124
201
  variant {
125
- api_key;
126
- oauth2;
202
+ agent;
203
+ systemActor;
204
+ user;
127
205
  };
128
206
  service : {
129
207
  check_land_registry_status: (transactionID: text) ->
130
208
  (opt LandRegistryTransactionRecord) query;
131
- configure_land_registry_api: (credentials: LandRegistryAPICredentials) ->
132
- (Result_1);
209
+ getAuditLog: () -> (vec AuditEntry) query;
210
+ getCredentialStatus: () -> (CredentialStatus) query;
133
211
  getCycles: () -> (nat) query;
212
+ getDailySpend: () -> (nat) query;
213
+ getNotificationPollingStatus: () ->
214
+ (record {
215
+ enabled: bool;
216
+ intervalSeconds: nat;
217
+ lastPollAt: int;
218
+ }) query;
219
+ getRateLimitStatus: () -> (vec record {
220
+ text;
221
+ RateLimitInfo;
222
+ }) query;
223
+ getTotalCosts: (fromDate: int, toDate: int) -> (CostSummary) query;
134
224
  get_all_pending_land_registry_submissions: (companyAccountID: text) ->
135
225
  (vec LandRegistryTransactionRecord) query;
136
226
  get_all_transactions: () ->
@@ -147,9 +237,9 @@ service : {
147
237
  environment: Environment;
148
238
  lastValidated: int;
149
239
  }) query;
150
- get_lr_response: (confirmationID: text) -> (Result_4) query;
240
+ get_lr_response: (confirmationID: text) -> (Result_7) query;
151
241
  log_land_registry_error: (transactionID: text, errorDetails: text) ->
152
- (Result_3);
242
+ (Result_6);
153
243
  prepare_ownership_transfer_payload: (transactionID: text,
154
244
  blockchainTransactionID: text, propertyAddress: text, postcode: text,
155
245
  titleNumber: text, previousOwner: text, newOwnerDetails: NewOwnerInfo,
@@ -157,13 +247,22 @@ service : {
157
247
  buyerSolicitorSignature: text, sellerSolicitorSignature: text,
158
248
  blockchainProofHash: text, blockchainCompletionProof: text,
159
249
  contractExchangeTimestamp: int, blockchainCompletionTimestamp: int) ->
160
- (Result_2);
250
+ (Result_5);
161
251
  receive_land_registry_callback: (callbackData: LandRegistryAPIResponse) ->
162
252
  (Result_1);
253
+ recordAuditEntry: (actorType: ActorType, delegatedBy: opt principal,
254
+ action: text, details: text, success: bool) -> (Result_4);
255
+ requestOfficialSearch: (titleNumber: text, searchFromDate: text,
256
+ proprietorNames: vec text, transactionId: text) -> (Result_3);
163
257
  retry_failed_land_registry_transmission: (transactionID: text) ->
164
258
  (Result_1);
165
259
  send_to_land_registry: (transactionID: text) -> (Result_1);
260
+ setDailySpendLimit: (limitPence: nat) -> (Result_2);
261
+ setNotificationPolling: (enabled: bool, intervalSeconds: opt nat) ->
262
+ (Result_2);
263
+ setUserManagementCanisterId: (canisterId: text) -> (Result_2);
166
264
  simulate_land_registry_processing: (confirmationNumber: text) -> (Result_1);
265
+ transform: (args: TransformArgs) -> (HttpResponse) query;
167
266
  validate_land_registry_connection: () -> (Result);
168
267
  verify_land_registry_receipt: (transactionID: text) -> (Result);
169
268
  }
@@ -2,26 +2,48 @@ 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 AuthenticationType = { 'api_key' : null } |
6
- { 'oauth2' : null };
5
+ export type ActorType = { 'agent' : null } |
6
+ { 'systemActor' : null } |
7
+ { 'user' : null };
8
+ export interface AuditEntry {
9
+ 'action' : string,
10
+ 'actorType' : ActorType,
11
+ 'delegatedBy' : [] | [Principal],
12
+ 'timestamp' : bigint,
13
+ 'details' : string,
14
+ 'caller' : Principal,
15
+ 'success' : boolean,
16
+ }
7
17
  export interface ConveyancerInfo {
8
18
  'name' : string,
9
19
  'contactEmail' : string,
10
20
  'licenseNumber' : string,
11
21
  }
22
+ export interface CostSummary {
23
+ 'entryCount' : bigint,
24
+ 'byEndpoint' : Array<[string, bigint]>,
25
+ 'totalPence' : bigint,
26
+ 'byTransaction' : Array<[string, bigint]>,
27
+ }
28
+ export interface CredentialStatus {
29
+ 'isExpired' : boolean,
30
+ 'isConfigured' : boolean,
31
+ 'lastRotated' : [] | [bigint],
32
+ 'environment' : [] | [Environment],
33
+ 'daysSinceRotation' : [] | [bigint],
34
+ }
12
35
  export type Environment = { 'sandbox' : null } |
13
36
  { 'production' : null };
37
+ export interface HttpHeader { 'value' : string, 'name' : string }
38
+ export interface HttpResponse {
39
+ 'status' : bigint,
40
+ 'body' : Uint8Array | number[],
41
+ 'headers' : Array<HttpHeader>,
42
+ }
14
43
  export type LRStatus = { 'processing' : null } |
15
44
  { 'received' : null } |
16
45
  { 'failed' : null } |
17
46
  { 'registered' : null };
18
- export interface LandRegistryAPICredentials {
19
- 'authenticationType' : AuthenticationType,
20
- 'lastValidated' : bigint,
21
- 'apiEndpoint' : string,
22
- 'apiKey' : string,
23
- 'environment' : Environment,
24
- }
25
47
  export interface LandRegistryAPIResponse {
26
48
  'status' : LRStatus,
27
49
  'registeredTimestamp' : [] | [bigint],
@@ -56,6 +78,19 @@ export interface NewOwnerInfo {
56
78
  'address' : string,
57
79
  'contactEmail' : string,
58
80
  }
81
+ export interface OfficialSearchResponse {
82
+ 'httpStatus' : bigint,
83
+ 'officialCopyTimestamp' : [] | [string],
84
+ 'advisoryEntries' : Array<string>,
85
+ 'documentStorageId' : [] | [bigint],
86
+ 'certificatePdfHash' : [] | [string],
87
+ 'registeredProprietorNames' : Array<string>,
88
+ 'certificateTimestamp' : string,
89
+ 'resultContainsAdvisoryEntries' : boolean,
90
+ 'registerChangedSinceSearchFromDate' : boolean,
91
+ 'priorityExpiry' : string,
92
+ 'searchRef' : string,
93
+ }
59
94
  export interface OwnershipTransferPayload {
60
95
  'transactionDate' : bigint,
61
96
  'postcode' : string,
@@ -77,31 +112,54 @@ export type Period = { 'day' : null } |
77
112
  { 'month' : null } |
78
113
  { 'week' : null } |
79
114
  { 'year' : null };
115
+ export interface RateLimitInfo {
116
+ 'callsThisHour' : bigint,
117
+ 'endpoint' : string,
118
+ 'dayResetAt' : bigint,
119
+ 'lastCallAt' : bigint,
120
+ 'callsToday' : bigint,
121
+ 'hourResetAt' : bigint,
122
+ }
80
123
  export type Result = { 'ok' : boolean } |
81
124
  { 'err' : string };
82
125
  export type Result_1 = { 'ok' : string } |
83
126
  { 'err' : string };
84
- export type Result_2 = { 'ok' : OwnershipTransferPayload } |
127
+ export type Result_2 = { 'ok' : null } |
128
+ { 'err' : string };
129
+ export type Result_3 = { 'ok' : OfficialSearchResponse } |
130
+ { 'err' : string };
131
+ export type Result_4 = { 'ok' : bigint } |
85
132
  { 'err' : string };
86
- export type Result_3 = { 'ok' : number } |
133
+ export type Result_5 = { 'ok' : OwnershipTransferPayload } |
87
134
  { 'err' : string };
88
- export type Result_4 = { 'ok' : LandRegistryAPIResponse } |
135
+ export type Result_6 = { 'ok' : number } |
136
+ { 'err' : string };
137
+ export type Result_7 = { 'ok' : LandRegistryAPIResponse } |
89
138
  { 'err' : string };
90
139
  export type TransactionStatus = { 'sent_to_lr' : null } |
91
140
  { 'requires_manual_review' : null } |
92
141
  { 'pending_api_call' : null } |
93
142
  { 'confirmed' : null } |
94
143
  { 'failed' : null };
144
+ export interface TransformArgs {
145
+ 'context' : Uint8Array | number[],
146
+ 'response' : HttpResponse,
147
+ }
95
148
  export interface _SERVICE {
96
149
  'check_land_registry_status' : ActorMethod<
97
150
  [string],
98
151
  [] | [LandRegistryTransactionRecord]
99
152
  >,
100
- 'configure_land_registry_api' : ActorMethod<
101
- [LandRegistryAPICredentials],
102
- Result_1
103
- >,
153
+ 'getAuditLog' : ActorMethod<[], Array<AuditEntry>>,
154
+ 'getCredentialStatus' : ActorMethod<[], CredentialStatus>,
104
155
  'getCycles' : ActorMethod<[], bigint>,
156
+ 'getDailySpend' : ActorMethod<[], bigint>,
157
+ 'getNotificationPollingStatus' : ActorMethod<
158
+ [],
159
+ { 'enabled' : boolean, 'intervalSeconds' : bigint, 'lastPollAt' : bigint }
160
+ >,
161
+ 'getRateLimitStatus' : ActorMethod<[], Array<[string, RateLimitInfo]>>,
162
+ 'getTotalCosts' : ActorMethod<[bigint, bigint], CostSummary>,
105
163
  'get_all_pending_land_registry_submissions' : ActorMethod<
106
164
  [string],
107
165
  Array<LandRegistryTransactionRecord>
@@ -121,8 +179,8 @@ export interface _SERVICE {
121
179
  }
122
180
  ]
123
181
  >,
124
- 'get_lr_response' : ActorMethod<[string], Result_4>,
125
- 'log_land_registry_error' : ActorMethod<[string, string], Result_3>,
182
+ 'get_lr_response' : ActorMethod<[string], Result_7>,
183
+ 'log_land_registry_error' : ActorMethod<[string, string], Result_6>,
126
184
  'prepare_ownership_transfer_payload' : ActorMethod<
127
185
  [
128
186
  string,
@@ -141,15 +199,27 @@ export interface _SERVICE {
141
199
  bigint,
142
200
  bigint,
143
201
  ],
144
- Result_2
202
+ Result_5
145
203
  >,
146
204
  'receive_land_registry_callback' : ActorMethod<
147
205
  [LandRegistryAPIResponse],
148
206
  Result_1
149
207
  >,
208
+ 'recordAuditEntry' : ActorMethod<
209
+ [ActorType, [] | [Principal], string, string, boolean],
210
+ Result_4
211
+ >,
212
+ 'requestOfficialSearch' : ActorMethod<
213
+ [string, string, Array<string>, string],
214
+ Result_3
215
+ >,
150
216
  'retry_failed_land_registry_transmission' : ActorMethod<[string], Result_1>,
151
217
  'send_to_land_registry' : ActorMethod<[string], Result_1>,
218
+ 'setDailySpendLimit' : ActorMethod<[bigint], Result_2>,
219
+ 'setNotificationPolling' : ActorMethod<[boolean, [] | [bigint]], Result_2>,
220
+ 'setUserManagementCanisterId' : ActorMethod<[string], Result_2>,
152
221
  'simulate_land_registry_processing' : ActorMethod<[string], Result_1>,
222
+ 'transform' : ActorMethod<[TransformArgs], HttpResponse>,
153
223
  'validate_land_registry_connection' : ActorMethod<[], Result>,
154
224
  'verify_land_registry_receipt' : ActorMethod<[string], Result>,
155
225
  }
@@ -76,7 +76,84 @@ export const idlFactory = ({ IDL }) => {
76
76
  'apiKey' : IDL.Text,
77
77
  'environment' : Environment,
78
78
  });
79
- const Result_1 = IDL.Variant({ 'ok' : IDL.Text, 'err' : IDL.Text });
79
+ const Result_2 = IDL.Variant({ 'ok' : IDL.Text, 'err' : IDL.Text });
80
+ const ApplicationEnquiryResponse = IDL.Record({
81
+ 'completedDate' : IDL.Opt(IDL.Text),
82
+ 'status' : IDL.Text,
83
+ 'httpStatus' : IDL.Nat,
84
+ 'lastUpdated' : IDL.Text,
85
+ 'applicationReference' : IDL.Text,
86
+ 'notes' : IDL.Vec(IDL.Text),
87
+ 'applicationDate' : IDL.Text,
88
+ });
89
+ const Result_12 = IDL.Variant({
90
+ 'ok' : ApplicationEnquiryResponse,
91
+ 'err' : IDL.Text,
92
+ });
93
+ const ActorType = IDL.Variant({
94
+ 'agent' : IDL.Null,
95
+ 'systemActor' : IDL.Null,
96
+ 'user' : IDL.Null,
97
+ });
98
+ const AuditEntry = IDL.Record({
99
+ 'action' : IDL.Text,
100
+ 'actorType' : ActorType,
101
+ 'delegatedBy' : IDL.Opt(IDL.Principal),
102
+ 'timestamp' : IDL.Int,
103
+ 'details' : IDL.Text,
104
+ 'caller' : IDL.Principal,
105
+ 'success' : IDL.Bool,
106
+ });
107
+ const CredentialStatus = IDL.Record({
108
+ 'isExpired' : IDL.Bool,
109
+ 'isConfigured' : IDL.Bool,
110
+ 'lastRotated' : IDL.Opt(IDL.Int),
111
+ 'environment' : IDL.Opt(Environment),
112
+ 'daysSinceRotation' : IDL.Opt(IDL.Nat),
113
+ });
114
+ const ECDResponse = IDL.Record({
115
+ 'httpStatus' : IDL.Nat,
116
+ 'applicationReference' : IDL.Text,
117
+ 'estimatedCompletionDate' : IDL.Text,
118
+ 'confidence' : IDL.Opt(IDL.Text),
119
+ });
120
+ const Result_11 = IDL.Variant({ 'ok' : ECDResponse, 'err' : IDL.Text });
121
+ const RateLimitInfo = IDL.Record({
122
+ 'callsThisHour' : IDL.Nat,
123
+ 'endpoint' : IDL.Text,
124
+ 'dayResetAt' : IDL.Int,
125
+ 'lastCallAt' : IDL.Int,
126
+ 'callsToday' : IDL.Nat,
127
+ 'hourResetAt' : IDL.Int,
128
+ });
129
+ const ProprietorData = IDL.Record({
130
+ 'title' : IDL.Opt(IDL.Text),
131
+ 'decoration' : IDL.Opt(IDL.Text),
132
+ 'forenames' : IDL.Opt(IDL.Text),
133
+ 'surname' : IDL.Opt(IDL.Text),
134
+ 'companyLocation' : IDL.Opt(IDL.Text),
135
+ 'organisationType' : IDL.Opt(IDL.Text),
136
+ 'proprietorName' : IDL.Text,
137
+ 'sequence' : IDL.Nat,
138
+ 'proprietorType' : IDL.Text,
139
+ });
140
+ const ProprietorNamesResponse = IDL.Record({
141
+ 'httpStatus' : IDL.Nat,
142
+ 'titleStatusCode' : IDL.Text,
143
+ 'titleNumber' : IDL.Text,
144
+ 'proprietors' : IDL.Vec(ProprietorData),
145
+ 'titleStatus' : IDL.Text,
146
+ });
147
+ const Result_10 = IDL.Variant({
148
+ 'ok' : ProprietorNamesResponse,
149
+ 'err' : IDL.Text,
150
+ });
151
+ const CostSummary = IDL.Record({
152
+ 'entryCount' : IDL.Nat,
153
+ 'byEndpoint' : IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat)),
154
+ 'totalPence' : IDL.Nat,
155
+ 'byTransaction' : IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat)),
156
+ });
80
157
  const Period = IDL.Variant({
81
158
  'day' : IDL.Null,
82
159
  'month' : IDL.Null,
@@ -90,15 +167,87 @@ export const idlFactory = ({ IDL }) => {
90
167
  'successful' : IDL.Nat32,
91
168
  'failed' : IDL.Nat32,
92
169
  });
93
- const Result_4 = IDL.Variant({
170
+ const Result_9 = IDL.Variant({
94
171
  'ok' : LandRegistryAPIResponse,
95
172
  'err' : IDL.Text,
96
173
  });
97
- const Result_3 = IDL.Variant({ 'ok' : IDL.Nat32, 'err' : IDL.Text });
98
- const Result_2 = IDL.Variant({
174
+ const Result_8 = IDL.Variant({ 'ok' : IDL.Nat32, 'err' : IDL.Text });
175
+ const LRNotification = IDL.Record({
176
+ 'titleNumber' : IDL.Opt(IDL.Text),
177
+ 'metadata' : IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
178
+ 'notificationType' : IDL.Text,
179
+ 'applicationReference' : IDL.Opt(IDL.Text),
180
+ 'receivedAt' : IDL.Int,
181
+ 'message' : IDL.Text,
182
+ });
183
+ const Result_7 = IDL.Variant({
184
+ 'ok' : IDL.Vec(LRNotification),
185
+ 'err' : IDL.Text,
186
+ });
187
+ const Result_6 = IDL.Variant({
99
188
  'ok' : OwnershipTransferPayload,
100
189
  'err' : IDL.Text,
101
190
  });
191
+ const Result_5 = IDL.Variant({ 'ok' : IDL.Nat, 'err' : IDL.Text });
192
+ const OfficialSearchResponse = IDL.Record({
193
+ 'httpStatus' : IDL.Nat,
194
+ 'officialCopyTimestamp' : IDL.Opt(IDL.Text),
195
+ 'advisoryEntries' : IDL.Vec(IDL.Text),
196
+ 'documentStorageId' : IDL.Opt(IDL.Nat),
197
+ 'certificatePdfHash' : IDL.Opt(IDL.Text),
198
+ 'registeredProprietorNames' : IDL.Vec(IDL.Text),
199
+ 'certificateTimestamp' : IDL.Text,
200
+ 'resultContainsAdvisoryEntries' : IDL.Bool,
201
+ 'registerChangedSinceSearchFromDate' : IDL.Bool,
202
+ 'priorityExpiry' : IDL.Text,
203
+ 'searchRef' : IDL.Text,
204
+ });
205
+ const Result_4 = IDL.Variant({
206
+ 'ok' : OfficialSearchResponse,
207
+ 'err' : IDL.Text,
208
+ });
209
+ const Result_3 = IDL.Variant({ 'ok' : IDL.Null, 'err' : IDL.Text });
210
+ const AP1SubmissionRequest = IDL.Record({
211
+ 'transfereeNames' : IDL.Vec(IDL.Text),
212
+ 'transferAmount' : IDL.Nat,
213
+ 'transferDate' : IDL.Text,
214
+ 'titleNumber' : IDL.Text,
215
+ 'transfereeAddress' : IDL.Text,
216
+ 'propertyAddress' : IDL.Text,
217
+ 'transferorAddress' : IDL.Text,
218
+ 'blockchainProofHash' : IDL.Text,
219
+ 'propertyPostcode' : IDL.Text,
220
+ 'conveyancerReference' : IDL.Text,
221
+ 'conveyancerAddress' : IDL.Text,
222
+ 'conveyancerSRANumber' : IDL.Text,
223
+ 'officialSearchRef' : IDL.Text,
224
+ 'transfereeType' : IDL.Text,
225
+ 'conveyancerName' : IDL.Text,
226
+ 'transferorNames' : IDL.Vec(IDL.Text),
227
+ 'applicationType' : IDL.Text,
228
+ });
229
+ const AP1SubmissionResponse = IDL.Record({
230
+ 'httpStatus' : IDL.Nat,
231
+ 'applicationReference' : IDL.Text,
232
+ 'message' : IDL.Text,
233
+ 'confirmationNumber' : IDL.Text,
234
+ 'estimatedCompletionDate' : IDL.Opt(IDL.Text),
235
+ 'scaleFePence' : IDL.Nat,
236
+ });
237
+ const Result_1 = IDL.Variant({
238
+ 'ok' : AP1SubmissionResponse,
239
+ 'err' : IDL.Text,
240
+ });
241
+ const HttpHeader = IDL.Record({ 'value' : IDL.Text, 'name' : IDL.Text });
242
+ const HttpResponse = IDL.Record({
243
+ 'status' : IDL.Nat,
244
+ 'body' : IDL.Vec(IDL.Nat8),
245
+ 'headers' : IDL.Vec(HttpHeader),
246
+ });
247
+ const TransformArgs = IDL.Record({
248
+ 'context' : IDL.Vec(IDL.Nat8),
249
+ 'response' : HttpResponse,
250
+ });
102
251
  const Result = IDL.Variant({ 'ok' : IDL.Bool, 'err' : IDL.Text });
103
252
  return IDL.Service({
104
253
  'check_land_registry_status' : IDL.Func(
@@ -108,10 +257,33 @@ export const idlFactory = ({ IDL }) => {
108
257
  ),
109
258
  'configure_land_registry_api' : IDL.Func(
110
259
  [LandRegistryAPICredentials],
111
- [Result_1],
260
+ [Result_2],
112
261
  [],
113
262
  ),
263
+ 'getApplicationStatus' : IDL.Func([IDL.Text], [Result_12], []),
264
+ 'getAuditLog' : IDL.Func([], [IDL.Vec(AuditEntry)], ['query']),
265
+ 'getCredentialStatus' : IDL.Func([], [CredentialStatus], ['query']),
114
266
  'getCycles' : IDL.Func([], [IDL.Nat], ['query']),
267
+ 'getDailySpend' : IDL.Func([], [IDL.Nat], ['query']),
268
+ 'getEstimatedCompletionDate' : IDL.Func([IDL.Text], [Result_11], []),
269
+ 'getNotificationPollingStatus' : IDL.Func(
270
+ [],
271
+ [
272
+ IDL.Record({
273
+ 'enabled' : IDL.Bool,
274
+ 'intervalSeconds' : IDL.Nat,
275
+ 'lastPollAt' : IDL.Int,
276
+ }),
277
+ ],
278
+ ['query'],
279
+ ),
280
+ 'getRateLimitStatus' : IDL.Func(
281
+ [],
282
+ [IDL.Vec(IDL.Tuple(IDL.Text, RateLimitInfo))],
283
+ ['query'],
284
+ ),
285
+ 'getRegisteredProprietorNames' : IDL.Func([IDL.Text], [Result_10], []),
286
+ 'getTotalCosts' : IDL.Func([IDL.Int, IDL.Int], [CostSummary], ['query']),
115
287
  'get_all_pending_land_registry_submissions' : IDL.Func(
116
288
  [IDL.Text],
117
289
  [IDL.Vec(LandRegistryTransactionRecord)],
@@ -140,8 +312,9 @@ export const idlFactory = ({ IDL }) => {
140
312
  ],
141
313
  ['query'],
142
314
  ),
143
- 'get_lr_response' : IDL.Func([IDL.Text], [Result_4], ['query']),
144
- 'log_land_registry_error' : IDL.Func([IDL.Text, IDL.Text], [Result_3], []),
315
+ 'get_lr_response' : IDL.Func([IDL.Text], [Result_9], ['query']),
316
+ 'log_land_registry_error' : IDL.Func([IDL.Text, IDL.Text], [Result_8], []),
317
+ 'pollNotifications' : IDL.Func([], [Result_7], []),
145
318
  'prepare_ownership_transfer_payload' : IDL.Func(
146
319
  [
147
320
  IDL.Text,
@@ -160,21 +333,50 @@ export const idlFactory = ({ IDL }) => {
160
333
  IDL.Int,
161
334
  IDL.Int,
162
335
  ],
163
- [Result_2],
336
+ [Result_6],
164
337
  [],
165
338
  ),
166
339
  'receive_land_registry_callback' : IDL.Func(
167
340
  [LandRegistryAPIResponse],
168
- [Result_1],
341
+ [Result_2],
342
+ [],
343
+ ),
344
+ 'recordAuditEntry' : IDL.Func(
345
+ [ActorType, IDL.Opt(IDL.Principal), IDL.Text, IDL.Text, IDL.Bool],
346
+ [Result_5],
347
+ [],
348
+ ),
349
+ 'requestOfficialSearch' : IDL.Func(
350
+ [IDL.Text, IDL.Text, IDL.Vec(IDL.Text), IDL.Text],
351
+ [Result_4],
169
352
  [],
170
353
  ),
171
354
  'retry_failed_land_registry_transmission' : IDL.Func(
172
355
  [IDL.Text],
356
+ [Result_2],
357
+ [],
358
+ ),
359
+ 'rotateCredentials' : IDL.Func([IDL.Text], [Result_3], []),
360
+ 'send_to_land_registry' : IDL.Func([IDL.Text], [Result_2], []),
361
+ 'setCredentials' : IDL.Func(
362
+ [IDL.Text, IDL.Text, IDL.Text, Environment],
363
+ [Result_3],
364
+ [],
365
+ ),
366
+ 'setDailySpendLimit' : IDL.Func([IDL.Nat], [Result_3], []),
367
+ 'setNotificationPolling' : IDL.Func(
368
+ [IDL.Bool, IDL.Opt(IDL.Nat)],
369
+ [Result_3],
370
+ [],
371
+ ),
372
+ 'setUserManagementCanisterId' : IDL.Func([IDL.Text], [Result_3], []),
373
+ 'simulate_land_registry_processing' : IDL.Func([IDL.Text], [Result_2], []),
374
+ 'submitApplicationToChangeRegister' : IDL.Func(
375
+ [AP1SubmissionRequest, IDL.Text],
173
376
  [Result_1],
174
377
  [],
175
378
  ),
176
- 'send_to_land_registry' : IDL.Func([IDL.Text], [Result_1], []),
177
- 'simulate_land_registry_processing' : IDL.Func([IDL.Text], [Result_1], []),
379
+ 'transform' : IDL.Func([TransformArgs], [HttpResponse], ['query']),
178
380
  'validate_land_registry_connection' : IDL.Func([], [Result], []),
179
381
  'verify_land_registry_receipt' : IDL.Func([IDL.Text], [Result], []),
180
382
  });