@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
|
@@ -1,297 +1,297 @@
|
|
|
1
|
-
type UserType =
|
|
2
|
-
variant {
|
|
3
|
-
admin;
|
|
4
|
-
assisted_buyer;
|
|
5
|
-
assisted_seller;
|
|
6
|
-
buyer;
|
|
7
|
-
conveyancer_managed;
|
|
8
|
-
conveyancer_transparent;
|
|
9
|
-
diy_buyer;
|
|
10
|
-
diy_seller;
|
|
11
|
-
estate_agent;
|
|
12
|
-
mortgage_broker;
|
|
13
|
-
platform_admin;
|
|
14
|
-
platform_support;
|
|
15
|
-
property_developer;
|
|
16
|
-
seller;
|
|
17
|
-
solicitor_client_linked;
|
|
18
|
-
solicitor_managed;
|
|
19
|
-
solicitor_platform_only;
|
|
20
|
-
solicitor_transparent;
|
|
21
|
-
};
|
|
22
|
-
type UserRole =
|
|
23
|
-
variant {
|
|
24
|
-
admin;
|
|
25
|
-
buyer;
|
|
26
|
-
guest;
|
|
27
|
-
seller;
|
|
28
|
-
solicitor;
|
|
29
|
-
};
|
|
30
|
-
type UserProfile =
|
|
31
|
-
record {
|
|
32
|
-
businessGatewayEnabled: bool;
|
|
33
|
-
businessGatewayUsername: opt text;
|
|
34
|
-
clientPrincipals: vec principal;
|
|
35
|
-
conveyancerReference: opt text;
|
|
36
|
-
createdAt: Time;
|
|
37
|
-
email: text;
|
|
38
|
-
emailVerificationSentAt: opt Time;
|
|
39
|
-
emailVerificationToken: opt text;
|
|
40
|
-
emailVerified: bool;
|
|
41
|
-
firmSRANumber: opt text;
|
|
42
|
-
isPlatformOnlySolicitor: bool;
|
|
43
|
-
isVerified: bool;
|
|
44
|
-
lawFirmAddress: opt text;
|
|
45
|
-
lawFirmName: opt text;
|
|
46
|
-
managedBySolicitor: opt principal;
|
|
47
|
-
mobile: text;
|
|
48
|
-
name: text;
|
|
49
|
-
"principal": principal;
|
|
50
|
-
role: opt UserRole;
|
|
51
|
-
solicitorLicenseNumber: opt text;
|
|
52
|
-
sraNumber: opt text;
|
|
53
|
-
userType: UserType;
|
|
54
|
-
};
|
|
55
|
-
type TransactionProgress =
|
|
56
|
-
record {
|
|
57
|
-
blockingParties: vec principal;
|
|
58
|
-
completionPercentage: nat;
|
|
59
|
-
members: vec TransactionMember;
|
|
60
|
-
membersComplete: nat;
|
|
61
|
-
readyToExchange: bool;
|
|
62
|
-
totalMembers: nat;
|
|
63
|
-
transactionId: text;
|
|
64
|
-
};
|
|
65
|
-
type TransactionMember =
|
|
66
|
-
record {
|
|
67
|
-
canInviteOthers: bool;
|
|
68
|
-
canViewProgress: bool;
|
|
69
|
-
documentsComplete: bool;
|
|
70
|
-
joinedAt: Time;
|
|
71
|
-
lastActivityAt: Time;
|
|
72
|
-
"principal": principal;
|
|
73
|
-
requiredDocuments: vec text;
|
|
74
|
-
role: UserType;
|
|
75
|
-
transactionId: text;
|
|
76
|
-
uploadedDocuments: vec text;
|
|
77
|
-
};
|
|
78
|
-
type Time = int;
|
|
79
|
-
type SolicitorSubmissionDetails =
|
|
80
|
-
record {
|
|
81
|
-
businessGatewayEnabled: bool;
|
|
82
|
-
conveyancerReference: opt text;
|
|
83
|
-
email: text;
|
|
84
|
-
firmAddress: text;
|
|
85
|
-
firmName: text;
|
|
86
|
-
firmSRANumber: opt text;
|
|
87
|
-
fullName: text;
|
|
88
|
-
principalId: principal;
|
|
89
|
-
sraNumber: text;
|
|
90
|
-
};
|
|
91
|
-
type Result_5 =
|
|
92
|
-
variant {
|
|
93
|
-
err: text;
|
|
94
|
-
ok: SolicitorSubmissionDetails;
|
|
95
|
-
};
|
|
96
|
-
type Result_4 =
|
|
97
|
-
variant {
|
|
98
|
-
err: text;
|
|
99
|
-
ok;
|
|
100
|
-
};
|
|
101
|
-
type Result_3 =
|
|
102
|
-
variant {
|
|
103
|
-
err: text;
|
|
104
|
-
ok: nat;
|
|
105
|
-
};
|
|
106
|
-
type Result_2 =
|
|
107
|
-
variant {
|
|
108
|
-
err: text;
|
|
109
|
-
ok: BotAgent;
|
|
110
|
-
};
|
|
111
|
-
type Result_1 =
|
|
112
|
-
variant {
|
|
113
|
-
err: text;
|
|
114
|
-
ok: text;
|
|
115
|
-
};
|
|
116
|
-
type Result =
|
|
117
|
-
variant {
|
|
118
|
-
err: text;
|
|
119
|
-
ok: record {
|
|
120
|
-
ownerPrincipal: principal;
|
|
121
|
-
role: BotRole;
|
|
122
|
-
};
|
|
123
|
-
};
|
|
124
|
-
type Permission =
|
|
125
|
-
variant {
|
|
126
|
-
AdminManageUsers;
|
|
127
|
-
AdminViewAllTransactions;
|
|
128
|
-
InvitePartyToTransaction: text;
|
|
129
|
-
ManageClientAccess: principal;
|
|
130
|
-
UpdateMemberDocuments: record {
|
|
131
|
-
text;
|
|
132
|
-
principal;
|
|
133
|
-
};
|
|
134
|
-
ViewDevelopmentUnits: text;
|
|
135
|
-
ViewSharedTransaction: text;
|
|
136
|
-
ViewTransactionProgress: text;
|
|
137
|
-
};
|
|
138
|
-
type BotRole =
|
|
139
|
-
variant {
|
|
140
|
-
BotFirm;
|
|
141
|
-
BotInternal;
|
|
142
|
-
BotPersonal;
|
|
143
|
-
};
|
|
144
|
-
type BotAgent =
|
|
145
|
-
record {
|
|
146
|
-
botPrincipal: principal;
|
|
147
|
-
callCount: nat;
|
|
148
|
-
createdAt: Time;
|
|
149
|
-
description: text;
|
|
150
|
-
isActive: bool;
|
|
151
|
-
lastActive: Time;
|
|
152
|
-
name: text;
|
|
153
|
-
ownerPrincipal: principal;
|
|
154
|
-
role: BotRole;
|
|
155
|
-
};
|
|
156
|
-
type BotActionLog =
|
|
157
|
-
record {
|
|
158
|
-
action: text;
|
|
159
|
-
botPrincipal: principal;
|
|
160
|
-
id: nat;
|
|
161
|
-
metadata: text;
|
|
162
|
-
success: bool;
|
|
163
|
-
timestamp: Time;
|
|
164
|
-
transactionId: opt text;
|
|
165
|
-
};
|
|
166
|
-
type AuditLog =
|
|
167
|
-
record {
|
|
168
|
-
action: text;
|
|
169
|
-
actorPrincipal: principal;
|
|
170
|
-
actorType: ActorType;
|
|
171
|
-
delegatedBy: opt principal;
|
|
172
|
-
id: nat;
|
|
173
|
-
metadata: text;
|
|
174
|
-
success: bool;
|
|
175
|
-
targetPrincipal: opt principal;
|
|
176
|
-
timestamp: Time;
|
|
177
|
-
transactionId: opt text;
|
|
178
|
-
};
|
|
179
|
-
type AdminRole =
|
|
180
|
-
variant {
|
|
181
|
-
regular;
|
|
182
|
-
super;
|
|
183
|
-
};
|
|
184
|
-
type AdminRecord =
|
|
185
|
-
record {
|
|
186
|
-
grantedAt: Time;
|
|
187
|
-
grantedBy: principal;
|
|
188
|
-
note: opt text;
|
|
189
|
-
"principal": principal;
|
|
190
|
-
role: AdminRole;
|
|
191
|
-
};
|
|
192
|
-
type AdminMutationResult_1 =
|
|
193
|
-
variant {
|
|
194
|
-
err: AdminMutationError;
|
|
195
|
-
ok;
|
|
196
|
-
};
|
|
197
|
-
type AdminMutationResult =
|
|
198
|
-
variant {
|
|
199
|
-
err: AdminMutationError;
|
|
200
|
-
ok: AdminRecord;
|
|
201
|
-
};
|
|
202
|
-
type AdminMutationError =
|
|
203
|
-
variant {
|
|
204
|
-
anonymousCaller;
|
|
205
|
-
cannotDemoteController;
|
|
206
|
-
cannotDemoteLastSuperAdmin;
|
|
207
|
-
invalidCsrfToken;
|
|
208
|
-
notSuperAdmin;
|
|
209
|
-
targetIsAnonymous;
|
|
210
|
-
};
|
|
211
|
-
type ActorType =
|
|
212
|
-
variant {
|
|
213
|
-
agent;
|
|
214
|
-
systemActor;
|
|
215
|
-
user;
|
|
216
|
-
};
|
|
217
|
-
service : {
|
|
218
|
-
addTransactionMember: (transactionId: text, memberPrincipal: principal,
|
|
219
|
-
role: UserType, canViewProgress: bool, canInviteOthers: bool, csrfToken:
|
|
220
|
-
text) -> (bool);
|
|
221
|
-
adminLinkPrincipals: (primary: principal, alias: principal) -> (Result_1);
|
|
222
|
-
amIAdmin: () -> (bool) query;
|
|
223
|
-
bootstrapAdmin: (name: text, email: text) -> (bool);
|
|
224
|
-
canUserAccessTransaction: (user: principal, txId: text) -> (bool) query;
|
|
225
|
-
checkPermissionWithAudit: (permission: Permission) -> (bool);
|
|
226
|
-
claimLinkCode: (code: text) -> (Result_1);
|
|
227
|
-
createUserForPrincipal: (targetPrincipal: principal, name: text, email:
|
|
228
|
-
text, mobile: text, userTypeText: text, csrfToken: text) -> (bool);
|
|
229
|
-
deactivateBot: (botPrincipal: principal) -> (Result_4);
|
|
230
|
-
deleteUserByPrincipal: (targetPrincipal: principal, csrfToken: text) ->
|
|
231
|
-
(bool);
|
|
232
|
-
demoteAdmin: (target: principal, csrfToken: text) ->
|
|
233
|
-
(AdminMutationResult_1);
|
|
234
|
-
generateCSRFToken: () -> (text);
|
|
235
|
-
generateLinkCode: () -> (Result_1);
|
|
236
|
-
getAllBots: () -> (vec BotAgent) query;
|
|
237
|
-
getAllUsers: () -> (vec UserProfile) query;
|
|
238
|
-
getAuditLogs: (limit: nat) -> (vec AuditLog) query;
|
|
239
|
-
getBotActionLogs: (botPrincipal: principal, limit: nat) ->
|
|
240
|
-
(vec BotActionLog) query;
|
|
241
|
-
getBotAgent: (botPrincipal: principal) -> (opt BotAgent) query;
|
|
242
|
-
getCSRFToken: () -> (opt text) query;
|
|
243
|
-
getCycles: () -> (nat) query;
|
|
244
|
-
getLinkedPrincipals: ("principal": principal) -> (vec principal) query;
|
|
245
|
-
getMyBots: () -> (vec BotAgent) query;
|
|
246
|
-
getMyLinkedPrincipals: () -> (vec principal) query;
|
|
247
|
-
getMyManagingSolicitor: () -> (opt UserProfile) query;
|
|
248
|
-
getMyProfile: () -> (opt UserProfile) query;
|
|
249
|
-
getMyProfileUpdate: () -> (opt UserProfile);
|
|
250
|
-
getMySolicitorClients: () -> (vec UserProfile) query;
|
|
251
|
-
getSolicitorSubmissionDetails: (solicitorPrincipal: principal) ->
|
|
252
|
-
(Result_5) query;
|
|
253
|
-
getTransactionMembers: (transactionId: text) ->
|
|
254
|
-
(opt vec TransactionMember) query;
|
|
255
|
-
getTransactionProgress: (transactionId: text) ->
|
|
256
|
-
(opt TransactionProgress) query;
|
|
257
|
-
getUserProfile: ("principal": principal) -> (opt UserProfile) query;
|
|
258
|
-
getUserProfileByPrincipal: ("principal": principal) ->
|
|
259
|
-
(opt UserProfile) query;
|
|
260
|
-
hasPermission: (permission: Permission) -> (bool) query;
|
|
261
|
-
linkSolicitorToClient: (solicitorPrincipal: principal, consentGiven:
|
|
262
|
-
bool, csrfToken: text) -> (bool);
|
|
263
|
-
listAdmins: () -> (vec AdminRecord) query;
|
|
264
|
-
logBotAction: (botPrincipal: principal, action: text, transactionId:
|
|
265
|
-
opt text, success: bool, metadata: text) -> (Result_4);
|
|
266
|
-
myAdminRole: () -> (opt AdminRole) query;
|
|
267
|
-
promoteAdmin: (target: principal, role: AdminRole, note: opt text,
|
|
268
|
-
csrfToken: text) -> (AdminMutationResult);
|
|
269
|
-
reactivateBot: (botPrincipal: principal) -> (Result_4);
|
|
270
|
-
recordAuditEntry: (actorType: ActorType, delegatedBy: opt principal,
|
|
271
|
-
action: text, targetPrincipal: opt principal, transactionId: opt text,
|
|
272
|
-
success: bool, metadata: text) -> (Result_3);
|
|
273
|
-
registerBot: (botPrincipal: principal, name: text, description: text, role:
|
|
274
|
-
BotRole) -> (Result_2);
|
|
275
|
-
registerUser: (name: text, email: text, mobile: text, userType: text) ->
|
|
276
|
-
(bool);
|
|
277
|
-
registerUserV2: (name: text, email: text, mobile: text, userType: UserType,
|
|
278
|
-
solicitorLicenseNumber: opt text, lawFirmName: opt text, lawFirmAddress:
|
|
279
|
-
opt text, sraNumber: opt text, csrfToken: text) -> (bool);
|
|
280
|
-
resendVerificationEmail: (csrfToken: text) -> (bool);
|
|
281
|
-
revokeSolicitorAccess: (solicitorPrincipal: principal, csrfToken: text) ->
|
|
282
|
-
(bool);
|
|
283
|
-
unlinkPrincipal: (alias: principal) -> (Result_1);
|
|
284
|
-
updateMemberDocuments: (transactionId: text, uploadedDocumentName:
|
|
285
|
-
text, csrfToken: text) -> (bool);
|
|
286
|
-
updateSolicitorLRDetails: (sraNumber: opt text, businessGatewayEnabled:
|
|
287
|
-
bool, businessGatewayUsername: opt text, firmSRANumber: opt text,
|
|
288
|
-
conveyancerReference: opt text) -> (Result_1);
|
|
289
|
-
updateTransactionMemberRequiredDocs: (transactionId: text,
|
|
290
|
-
documentsToRemove: vec text, csrfToken: text) -> (bool);
|
|
291
|
-
validateAdmin: ("principal": principal) -> (bool) query;
|
|
292
|
-
validateBot: (botPrincipal: principal) -> (Result) query;
|
|
293
|
-
validateCSRFToken: (token: text) -> (bool);
|
|
294
|
-
verifyEmail: (token: text, csrfToken: text) -> (bool);
|
|
295
|
-
verifyUser: (userPrincipal: principal, csrfToken: text) -> (bool);
|
|
296
|
-
whoAmI: () -> (principal) query;
|
|
297
|
-
}
|
|
1
|
+
type UserType =
|
|
2
|
+
variant {
|
|
3
|
+
admin;
|
|
4
|
+
assisted_buyer;
|
|
5
|
+
assisted_seller;
|
|
6
|
+
buyer;
|
|
7
|
+
conveyancer_managed;
|
|
8
|
+
conveyancer_transparent;
|
|
9
|
+
diy_buyer;
|
|
10
|
+
diy_seller;
|
|
11
|
+
estate_agent;
|
|
12
|
+
mortgage_broker;
|
|
13
|
+
platform_admin;
|
|
14
|
+
platform_support;
|
|
15
|
+
property_developer;
|
|
16
|
+
seller;
|
|
17
|
+
solicitor_client_linked;
|
|
18
|
+
solicitor_managed;
|
|
19
|
+
solicitor_platform_only;
|
|
20
|
+
solicitor_transparent;
|
|
21
|
+
};
|
|
22
|
+
type UserRole =
|
|
23
|
+
variant {
|
|
24
|
+
admin;
|
|
25
|
+
buyer;
|
|
26
|
+
guest;
|
|
27
|
+
seller;
|
|
28
|
+
solicitor;
|
|
29
|
+
};
|
|
30
|
+
type UserProfile =
|
|
31
|
+
record {
|
|
32
|
+
businessGatewayEnabled: bool;
|
|
33
|
+
businessGatewayUsername: opt text;
|
|
34
|
+
clientPrincipals: vec principal;
|
|
35
|
+
conveyancerReference: opt text;
|
|
36
|
+
createdAt: Time;
|
|
37
|
+
email: text;
|
|
38
|
+
emailVerificationSentAt: opt Time;
|
|
39
|
+
emailVerificationToken: opt text;
|
|
40
|
+
emailVerified: bool;
|
|
41
|
+
firmSRANumber: opt text;
|
|
42
|
+
isPlatformOnlySolicitor: bool;
|
|
43
|
+
isVerified: bool;
|
|
44
|
+
lawFirmAddress: opt text;
|
|
45
|
+
lawFirmName: opt text;
|
|
46
|
+
managedBySolicitor: opt principal;
|
|
47
|
+
mobile: text;
|
|
48
|
+
name: text;
|
|
49
|
+
"principal": principal;
|
|
50
|
+
role: opt UserRole;
|
|
51
|
+
solicitorLicenseNumber: opt text;
|
|
52
|
+
sraNumber: opt text;
|
|
53
|
+
userType: UserType;
|
|
54
|
+
};
|
|
55
|
+
type TransactionProgress =
|
|
56
|
+
record {
|
|
57
|
+
blockingParties: vec principal;
|
|
58
|
+
completionPercentage: nat;
|
|
59
|
+
members: vec TransactionMember;
|
|
60
|
+
membersComplete: nat;
|
|
61
|
+
readyToExchange: bool;
|
|
62
|
+
totalMembers: nat;
|
|
63
|
+
transactionId: text;
|
|
64
|
+
};
|
|
65
|
+
type TransactionMember =
|
|
66
|
+
record {
|
|
67
|
+
canInviteOthers: bool;
|
|
68
|
+
canViewProgress: bool;
|
|
69
|
+
documentsComplete: bool;
|
|
70
|
+
joinedAt: Time;
|
|
71
|
+
lastActivityAt: Time;
|
|
72
|
+
"principal": principal;
|
|
73
|
+
requiredDocuments: vec text;
|
|
74
|
+
role: UserType;
|
|
75
|
+
transactionId: text;
|
|
76
|
+
uploadedDocuments: vec text;
|
|
77
|
+
};
|
|
78
|
+
type Time = int;
|
|
79
|
+
type SolicitorSubmissionDetails =
|
|
80
|
+
record {
|
|
81
|
+
businessGatewayEnabled: bool;
|
|
82
|
+
conveyancerReference: opt text;
|
|
83
|
+
email: text;
|
|
84
|
+
firmAddress: text;
|
|
85
|
+
firmName: text;
|
|
86
|
+
firmSRANumber: opt text;
|
|
87
|
+
fullName: text;
|
|
88
|
+
principalId: principal;
|
|
89
|
+
sraNumber: text;
|
|
90
|
+
};
|
|
91
|
+
type Result_5 =
|
|
92
|
+
variant {
|
|
93
|
+
err: text;
|
|
94
|
+
ok: SolicitorSubmissionDetails;
|
|
95
|
+
};
|
|
96
|
+
type Result_4 =
|
|
97
|
+
variant {
|
|
98
|
+
err: text;
|
|
99
|
+
ok;
|
|
100
|
+
};
|
|
101
|
+
type Result_3 =
|
|
102
|
+
variant {
|
|
103
|
+
err: text;
|
|
104
|
+
ok: nat;
|
|
105
|
+
};
|
|
106
|
+
type Result_2 =
|
|
107
|
+
variant {
|
|
108
|
+
err: text;
|
|
109
|
+
ok: BotAgent;
|
|
110
|
+
};
|
|
111
|
+
type Result_1 =
|
|
112
|
+
variant {
|
|
113
|
+
err: text;
|
|
114
|
+
ok: text;
|
|
115
|
+
};
|
|
116
|
+
type Result =
|
|
117
|
+
variant {
|
|
118
|
+
err: text;
|
|
119
|
+
ok: record {
|
|
120
|
+
ownerPrincipal: principal;
|
|
121
|
+
role: BotRole;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
type Permission =
|
|
125
|
+
variant {
|
|
126
|
+
AdminManageUsers;
|
|
127
|
+
AdminViewAllTransactions;
|
|
128
|
+
InvitePartyToTransaction: text;
|
|
129
|
+
ManageClientAccess: principal;
|
|
130
|
+
UpdateMemberDocuments: record {
|
|
131
|
+
text;
|
|
132
|
+
principal;
|
|
133
|
+
};
|
|
134
|
+
ViewDevelopmentUnits: text;
|
|
135
|
+
ViewSharedTransaction: text;
|
|
136
|
+
ViewTransactionProgress: text;
|
|
137
|
+
};
|
|
138
|
+
type BotRole =
|
|
139
|
+
variant {
|
|
140
|
+
BotFirm;
|
|
141
|
+
BotInternal;
|
|
142
|
+
BotPersonal;
|
|
143
|
+
};
|
|
144
|
+
type BotAgent =
|
|
145
|
+
record {
|
|
146
|
+
botPrincipal: principal;
|
|
147
|
+
callCount: nat;
|
|
148
|
+
createdAt: Time;
|
|
149
|
+
description: text;
|
|
150
|
+
isActive: bool;
|
|
151
|
+
lastActive: Time;
|
|
152
|
+
name: text;
|
|
153
|
+
ownerPrincipal: principal;
|
|
154
|
+
role: BotRole;
|
|
155
|
+
};
|
|
156
|
+
type BotActionLog =
|
|
157
|
+
record {
|
|
158
|
+
action: text;
|
|
159
|
+
botPrincipal: principal;
|
|
160
|
+
id: nat;
|
|
161
|
+
metadata: text;
|
|
162
|
+
success: bool;
|
|
163
|
+
timestamp: Time;
|
|
164
|
+
transactionId: opt text;
|
|
165
|
+
};
|
|
166
|
+
type AuditLog =
|
|
167
|
+
record {
|
|
168
|
+
action: text;
|
|
169
|
+
actorPrincipal: principal;
|
|
170
|
+
actorType: ActorType;
|
|
171
|
+
delegatedBy: opt principal;
|
|
172
|
+
id: nat;
|
|
173
|
+
metadata: text;
|
|
174
|
+
success: bool;
|
|
175
|
+
targetPrincipal: opt principal;
|
|
176
|
+
timestamp: Time;
|
|
177
|
+
transactionId: opt text;
|
|
178
|
+
};
|
|
179
|
+
type AdminRole =
|
|
180
|
+
variant {
|
|
181
|
+
regular;
|
|
182
|
+
super;
|
|
183
|
+
};
|
|
184
|
+
type AdminRecord =
|
|
185
|
+
record {
|
|
186
|
+
grantedAt: Time;
|
|
187
|
+
grantedBy: principal;
|
|
188
|
+
note: opt text;
|
|
189
|
+
"principal": principal;
|
|
190
|
+
role: AdminRole;
|
|
191
|
+
};
|
|
192
|
+
type AdminMutationResult_1 =
|
|
193
|
+
variant {
|
|
194
|
+
err: AdminMutationError;
|
|
195
|
+
ok;
|
|
196
|
+
};
|
|
197
|
+
type AdminMutationResult =
|
|
198
|
+
variant {
|
|
199
|
+
err: AdminMutationError;
|
|
200
|
+
ok: AdminRecord;
|
|
201
|
+
};
|
|
202
|
+
type AdminMutationError =
|
|
203
|
+
variant {
|
|
204
|
+
anonymousCaller;
|
|
205
|
+
cannotDemoteController;
|
|
206
|
+
cannotDemoteLastSuperAdmin;
|
|
207
|
+
invalidCsrfToken;
|
|
208
|
+
notSuperAdmin;
|
|
209
|
+
targetIsAnonymous;
|
|
210
|
+
};
|
|
211
|
+
type ActorType =
|
|
212
|
+
variant {
|
|
213
|
+
agent;
|
|
214
|
+
systemActor;
|
|
215
|
+
user;
|
|
216
|
+
};
|
|
217
|
+
service : {
|
|
218
|
+
addTransactionMember: (transactionId: text, memberPrincipal: principal,
|
|
219
|
+
role: UserType, canViewProgress: bool, canInviteOthers: bool, csrfToken:
|
|
220
|
+
text) -> (bool);
|
|
221
|
+
adminLinkPrincipals: (primary: principal, alias: principal) -> (Result_1);
|
|
222
|
+
amIAdmin: () -> (bool) query;
|
|
223
|
+
bootstrapAdmin: (name: text, email: text) -> (bool);
|
|
224
|
+
canUserAccessTransaction: (user: principal, txId: text) -> (bool) query;
|
|
225
|
+
checkPermissionWithAudit: (permission: Permission) -> (bool);
|
|
226
|
+
claimLinkCode: (code: text) -> (Result_1);
|
|
227
|
+
createUserForPrincipal: (targetPrincipal: principal, name: text, email:
|
|
228
|
+
text, mobile: text, userTypeText: text, csrfToken: text) -> (bool);
|
|
229
|
+
deactivateBot: (botPrincipal: principal) -> (Result_4);
|
|
230
|
+
deleteUserByPrincipal: (targetPrincipal: principal, csrfToken: text) ->
|
|
231
|
+
(bool);
|
|
232
|
+
demoteAdmin: (target: principal, csrfToken: text) ->
|
|
233
|
+
(AdminMutationResult_1);
|
|
234
|
+
generateCSRFToken: () -> (text);
|
|
235
|
+
generateLinkCode: () -> (Result_1);
|
|
236
|
+
getAllBots: () -> (vec BotAgent) query;
|
|
237
|
+
getAllUsers: () -> (vec UserProfile) query;
|
|
238
|
+
getAuditLogs: (limit: nat) -> (vec AuditLog) query;
|
|
239
|
+
getBotActionLogs: (botPrincipal: principal, limit: nat) ->
|
|
240
|
+
(vec BotActionLog) query;
|
|
241
|
+
getBotAgent: (botPrincipal: principal) -> (opt BotAgent) query;
|
|
242
|
+
getCSRFToken: () -> (opt text) query;
|
|
243
|
+
getCycles: () -> (nat) query;
|
|
244
|
+
getLinkedPrincipals: ("principal": principal) -> (vec principal) query;
|
|
245
|
+
getMyBots: () -> (vec BotAgent) query;
|
|
246
|
+
getMyLinkedPrincipals: () -> (vec principal) query;
|
|
247
|
+
getMyManagingSolicitor: () -> (opt UserProfile) query;
|
|
248
|
+
getMyProfile: () -> (opt UserProfile) query;
|
|
249
|
+
getMyProfileUpdate: () -> (opt UserProfile);
|
|
250
|
+
getMySolicitorClients: () -> (vec UserProfile) query;
|
|
251
|
+
getSolicitorSubmissionDetails: (solicitorPrincipal: principal) ->
|
|
252
|
+
(Result_5) query;
|
|
253
|
+
getTransactionMembers: (transactionId: text) ->
|
|
254
|
+
(opt vec TransactionMember) query;
|
|
255
|
+
getTransactionProgress: (transactionId: text) ->
|
|
256
|
+
(opt TransactionProgress) query;
|
|
257
|
+
getUserProfile: ("principal": principal) -> (opt UserProfile) query;
|
|
258
|
+
getUserProfileByPrincipal: ("principal": principal) ->
|
|
259
|
+
(opt UserProfile) query;
|
|
260
|
+
hasPermission: (permission: Permission) -> (bool) query;
|
|
261
|
+
linkSolicitorToClient: (solicitorPrincipal: principal, consentGiven:
|
|
262
|
+
bool, csrfToken: text) -> (bool);
|
|
263
|
+
listAdmins: () -> (vec AdminRecord) query;
|
|
264
|
+
logBotAction: (botPrincipal: principal, action: text, transactionId:
|
|
265
|
+
opt text, success: bool, metadata: text) -> (Result_4);
|
|
266
|
+
myAdminRole: () -> (opt AdminRole) query;
|
|
267
|
+
promoteAdmin: (target: principal, role: AdminRole, note: opt text,
|
|
268
|
+
csrfToken: text) -> (AdminMutationResult);
|
|
269
|
+
reactivateBot: (botPrincipal: principal) -> (Result_4);
|
|
270
|
+
recordAuditEntry: (actorType: ActorType, delegatedBy: opt principal,
|
|
271
|
+
action: text, targetPrincipal: opt principal, transactionId: opt text,
|
|
272
|
+
success: bool, metadata: text) -> (Result_3);
|
|
273
|
+
registerBot: (botPrincipal: principal, name: text, description: text, role:
|
|
274
|
+
BotRole) -> (Result_2);
|
|
275
|
+
registerUser: (name: text, email: text, mobile: text, userType: text) ->
|
|
276
|
+
(bool);
|
|
277
|
+
registerUserV2: (name: text, email: text, mobile: text, userType: UserType,
|
|
278
|
+
solicitorLicenseNumber: opt text, lawFirmName: opt text, lawFirmAddress:
|
|
279
|
+
opt text, sraNumber: opt text, csrfToken: text) -> (bool);
|
|
280
|
+
resendVerificationEmail: (csrfToken: text) -> (bool);
|
|
281
|
+
revokeSolicitorAccess: (solicitorPrincipal: principal, csrfToken: text) ->
|
|
282
|
+
(bool);
|
|
283
|
+
unlinkPrincipal: (alias: principal) -> (Result_1);
|
|
284
|
+
updateMemberDocuments: (transactionId: text, uploadedDocumentName:
|
|
285
|
+
text, csrfToken: text) -> (bool);
|
|
286
|
+
updateSolicitorLRDetails: (sraNumber: opt text, businessGatewayEnabled:
|
|
287
|
+
bool, businessGatewayUsername: opt text, firmSRANumber: opt text,
|
|
288
|
+
conveyancerReference: opt text) -> (Result_1);
|
|
289
|
+
updateTransactionMemberRequiredDocs: (transactionId: text,
|
|
290
|
+
documentsToRemove: vec text, csrfToken: text) -> (bool);
|
|
291
|
+
validateAdmin: ("principal": principal) -> (bool) query;
|
|
292
|
+
validateBot: (botPrincipal: principal) -> (Result) query;
|
|
293
|
+
validateCSRFToken: (token: text) -> (bool);
|
|
294
|
+
verifyEmail: (token: text, csrfToken: text) -> (bool);
|
|
295
|
+
verifyUser: (userPrincipal: principal, csrfToken: text) -> (bool);
|
|
296
|
+
whoAmI: () -> (principal) query;
|
|
297
|
+
}
|