@propxchain/core-client 0.2.1-canary.19 → 0.2.1-canary.21

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 (40) hide show
  1. package/dist/canisters/document_storage/document_storage.did.d.ts.map +1 -1
  2. package/dist/canisters/document_storage/document_storage.did.js +90 -21
  3. package/dist/canisters/document_storage/document_storage.did.js.map +1 -1
  4. package/dist/canisters/document_verification/document_verification.did.d.ts.map +1 -1
  5. package/dist/canisters/document_verification/document_verification.did.js +132 -0
  6. package/dist/canisters/document_verification/document_verification.did.js.map +1 -1
  7. package/dist/canisters/email_service/email_service.did.d.ts.map +1 -1
  8. package/dist/canisters/email_service/email_service.did.js +40 -0
  9. package/dist/canisters/email_service/email_service.did.js.map +1 -1
  10. package/dist/canisters/land_registry_integration/land_registry_integration.did.d.ts.map +1 -1
  11. package/dist/canisters/land_registry_integration/land_registry_integration.did.js +186 -12
  12. package/dist/canisters/land_registry_integration/land_registry_integration.did.js.map +1 -1
  13. package/dist/canisters/ledger_manager/ledger_manager.did.d.ts.map +1 -1
  14. package/dist/canisters/ledger_manager/ledger_manager.did.js +55 -2
  15. package/dist/canisters/ledger_manager/ledger_manager.did.js.map +1 -1
  16. package/dist/canisters/user_management/user_management.did.d.ts.map +1 -1
  17. package/dist/canisters/user_management/user_management.did.js +103 -22
  18. package/dist/canisters/user_management/user_management.did.js.map +1 -1
  19. package/package.json +1 -1
  20. package/src/canisters/document_storage/document_storage.did +159 -89
  21. package/src/canisters/document_storage/document_storage.did.d.ts +159 -82
  22. package/src/canisters/document_storage/document_storage.did.js +230 -121
  23. package/src/canisters/document_verification/document_verification.did +248 -98
  24. package/src/canisters/document_verification/document_verification.did.d.ts +236 -112
  25. package/src/canisters/document_verification/document_verification.did.js +299 -139
  26. package/src/canisters/email_service/email_service.did +86 -37
  27. package/src/canisters/email_service/email_service.did.d.ts +92 -45
  28. package/src/canisters/email_service/email_service.did.js +131 -63
  29. package/src/canisters/land_registry_integration/land_registry_integration.did +395 -169
  30. package/src/canisters/land_registry_integration/land_registry_integration.did.d.ts +331 -157
  31. package/src/canisters/land_registry_integration/land_registry_integration.did.js +384 -182
  32. package/src/canisters/ledger_manager/ledger_manager.did +232 -161
  33. package/src/canisters/ledger_manager/ledger_manager.did.d.ts +205 -142
  34. package/src/canisters/ledger_manager/ledger_manager.did.js +256 -187
  35. package/src/canisters/property_registry/property_registry.did.d.ts +71 -71
  36. package/src/canisters/transaction_manager/transaction_manager.did +27 -0
  37. package/src/canisters/transaction_manager/transaction_manager.did.d.ts +29 -0
  38. package/src/canisters/user_management/user_management.did +297 -197
  39. package/src/canisters/user_management/user_management.did.d.ts +267 -193
  40. package/src/canisters/user_management/user_management.did.js +352 -243
@@ -1,187 +1,256 @@
1
- export const idlFactory = ({ IDL }) => {
2
- const TransactionRole = IDL.Variant({
3
- 'agent' : IDL.Null,
4
- 'solicitor' : IDL.Null,
5
- 'seller' : IDL.Null,
6
- 'buyer' : IDL.Null,
7
- });
8
- const Counterparty = IDL.Record({
9
- 'accountID' : IDL.Text,
10
- 'name' : IDL.Text,
11
- });
12
- const TeamMemberRole = IDL.Variant({
13
- 'manager' : IDL.Null,
14
- 'admin' : IDL.Null,
15
- 'viewer' : IDL.Null,
16
- });
17
- const TeamPermissions = IDL.Record({
18
- 'canSign' : IDL.Bool,
19
- 'canInitiate' : IDL.Bool,
20
- 'canViewAnalytics' : IDL.Bool,
21
- 'canManageTeam' : IDL.Bool,
22
- });
23
- const AccountType = IDL.Variant({
24
- 'company' : IDL.Null,
25
- 'individual' : IDL.Null,
26
- });
27
- const BlockchainEfficiencyMetrics = IDL.Record({
28
- 'avgBlockchainCompletionDays' : IDL.Nat,
29
- 'totalCostSaved' : IDL.Nat,
30
- 'avgTraditionalCompletionDays' : IDL.Nat,
31
- 'timeReductionPercent' : IDL.Nat,
32
- 'avgTraditionalCost' : IDL.Nat,
33
- 'avgBlockchainCost' : IDL.Nat,
34
- 'transactionsCompleted' : IDL.Nat,
35
- 'costReductionPercent' : IDL.Nat,
36
- 'totalTimeSavedDays' : IDL.Nat,
37
- });
38
- const CompanyLedger = IDL.Record({
39
- 'companyAccountID' : IDL.Text,
40
- 'avgCompletionTime' : IDL.Nat,
41
- 'costSavings' : IDL.Nat,
42
- 'completedThisMonth' : IDL.Nat,
43
- 'activeTransactions' : IDL.Nat,
44
- 'teamMemberCount' : IDL.Nat,
45
- 'totalTransactions' : IDL.Nat,
46
- });
47
- const Time = IDL.Int;
48
- const CompanyTeamMember = IDL.Record({
49
- 'memberID' : IDL.Text,
50
- 'permissions' : TeamPermissions,
51
- 'accountID' : IDL.Text,
52
- 'joinDate' : Time,
53
- 'name' : IDL.Text,
54
- 'role' : TeamMemberRole,
55
- 'email' : IDL.Text,
56
- });
57
- const Analytics = IDL.Record({
58
- 'transactionVolume' : IDL.Nat,
59
- 'avgCompletionTime' : IDL.Nat,
60
- 'period' : IDL.Text,
61
- 'totalCostSavings' : IDL.Nat,
62
- 'completedTransactions' : IDL.Nat,
63
- 'totalTransactions' : IDL.Nat,
64
- });
65
- const UserAccount = IDL.Record({
66
- 'taxID' : IDL.Opt(IDL.Text),
67
- 'accountID' : IDL.Text,
68
- 'name' : IDL.Text,
69
- 'isActive' : IDL.Bool,
70
- 'email' : IDL.Text,
71
- 'accountType' : AccountType,
72
- 'companyName' : IDL.Opt(IDL.Text),
73
- 'registrationDate' : Time,
74
- });
75
- const TransactionStatus = IDL.Variant({
76
- 'active' : IDL.Null,
77
- 'pending' : IDL.Null,
78
- 'completed' : IDL.Null,
79
- 'failed' : IDL.Null,
80
- });
81
- const VerificationStatus = IDL.Variant({
82
- 'verified' : IDL.Null,
83
- 'pending' : IDL.Null,
84
- 'failed' : IDL.Null,
85
- });
86
- const DocumentVerification = IDL.Record({
87
- 'mortgageApproval' : VerificationStatus,
88
- 'propertyDeed' : VerificationStatus,
89
- 'landRegistryConfirm' : VerificationStatus,
90
- 'surveyReport' : VerificationStatus,
91
- });
92
- const UserLedgerEntry = IDL.Record({
93
- 'completedDate' : IDL.Opt(Time),
94
- 'initiatedDate' : Time,
95
- 'status' : TransactionStatus,
96
- 'accountID' : IDL.Text,
97
- 'documentStatus' : DocumentVerification,
98
- 'costsSaved' : IDL.Nat,
99
- 'propertyAddress' : IDL.Text,
100
- 'entryID' : IDL.Text,
101
- 'propertyValue' : IDL.Nat,
102
- 'roleInTransaction' : TransactionRole,
103
- 'counterparties' : IDL.Vec(Counterparty),
104
- 'transactionID' : IDL.Text,
105
- });
106
- const Result = IDL.Variant({ 'ok' : IDL.Text, 'err' : IDL.Text });
107
- const Result_1 = IDL.Variant({ 'ok' : IDL.Nat, 'err' : IDL.Text });
108
- return IDL.Service({
109
- 'addTransactionToLedger' : IDL.Func(
110
- [
111
- IDL.Text,
112
- IDL.Text,
113
- TransactionRole,
114
- IDL.Text,
115
- IDL.Nat,
116
- IDL.Vec(Counterparty),
117
- ],
118
- [IDL.Bool],
119
- [],
120
- ),
121
- 'createCompanyTeamMember' : IDL.Func(
122
- [IDL.Text, IDL.Text, IDL.Text, TeamMemberRole, TeamPermissions],
123
- [IDL.Text],
124
- [],
125
- ),
126
- 'createUserAccount' : IDL.Func(
127
- [IDL.Text, IDL.Text, AccountType, IDL.Opt(IDL.Text), IDL.Opt(IDL.Text)],
128
- [IDL.Text],
129
- [],
130
- ),
131
- 'getBlockchainEfficiencyMetrics' : IDL.Func(
132
- [IDL.Text],
133
- [BlockchainEfficiencyMetrics],
134
- ['query'],
135
- ),
136
- 'getCompanyLedger' : IDL.Func([IDL.Text], [CompanyLedger], ['query']),
137
- 'getCompanyTeamMembers' : IDL.Func(
138
- [IDL.Text],
139
- [IDL.Vec(CompanyTeamMember)],
140
- ['query'],
141
- ),
142
- 'getCycles' : IDL.Func([], [IDL.Nat], ['query']),
143
- 'getGlobalBlockchainStats' : IDL.Func(
144
- [],
145
- [BlockchainEfficiencyMetrics],
146
- ['query'],
147
- ),
148
- 'getLedgerAnalytics' : IDL.Func(
149
- [IDL.Text, IDL.Text],
150
- [Analytics],
151
- ['query'],
152
- ),
153
- 'getMyAccount' : IDL.Func([], [IDL.Opt(UserAccount)], ['query']),
154
- 'getMyLedger' : IDL.Func([], [IDL.Vec(UserLedgerEntry)], ['query']),
155
- 'getUserAccount' : IDL.Func([IDL.Text], [IDL.Opt(UserAccount)], ['query']),
156
- 'getUserLedger' : IDL.Func(
157
- [IDL.Text],
158
- [IDL.Vec(UserLedgerEntry)],
159
- ['query'],
160
- ),
161
- 'logEvent' : IDL.Func(
162
- [IDL.Text, IDL.Text, IDL.Text, IDL.Opt(IDL.Text)],
163
- [Result_1],
164
- [],
165
- ),
166
- 'setDocumentVerificationCanister' : IDL.Func([IDL.Principal], [], []),
167
- 'setPropertyRegistryCanister' : IDL.Func([IDL.Principal], [], []),
168
- 'setTransactionManagerCanister' : IDL.Func([IDL.Principal], [], []),
169
- 'setUserManagementCanister' : IDL.Func([IDL.Principal], [], []),
170
- 'syncTransactionToLedger' : IDL.Func(
171
- [IDL.Nat, IDL.Principal],
172
- [Result],
173
- [],
174
- ),
175
- 'updateTeamMemberPermissions' : IDL.Func(
176
- [IDL.Text, IDL.Text, TeamPermissions],
177
- [IDL.Bool],
178
- [],
179
- ),
180
- 'updateTransactionStatus' : IDL.Func(
181
- [IDL.Text, IDL.Text, TransactionStatus],
182
- [IDL.Bool],
183
- [],
184
- ),
185
- });
186
- };
187
- export const init = ({ IDL }) => { return []; };
1
+ export const idlFactory = ({ IDL }) => {
2
+ const TransactionRole = IDL.Variant({
3
+ 'agent' : IDL.Null,
4
+ 'solicitor' : IDL.Null,
5
+ 'seller' : IDL.Null,
6
+ 'buyer' : IDL.Null,
7
+ });
8
+ const Counterparty = IDL.Record({
9
+ 'accountID' : IDL.Text,
10
+ 'name' : IDL.Text,
11
+ });
12
+ const TeamMemberRole = IDL.Variant({
13
+ 'manager' : IDL.Null,
14
+ 'admin' : IDL.Null,
15
+ 'viewer' : IDL.Null,
16
+ });
17
+ const TeamPermissions = IDL.Record({
18
+ 'canSign' : IDL.Bool,
19
+ 'canInitiate' : IDL.Bool,
20
+ 'canViewAnalytics' : IDL.Bool,
21
+ 'canManageTeam' : IDL.Bool,
22
+ });
23
+ const AccountType = IDL.Variant({
24
+ 'company' : IDL.Null,
25
+ 'individual' : IDL.Null,
26
+ });
27
+ const AuditEvent = IDL.Record({
28
+ 'eventId' : IDL.Nat,
29
+ 'metadata' : IDL.Opt(IDL.Text),
30
+ 'timestamp' : IDL.Int,
31
+ 'details' : IDL.Text,
32
+ 'caller' : IDL.Principal,
33
+ 'transactionId' : IDL.Text,
34
+ 'eventType' : IDL.Text,
35
+ });
36
+ const BlockchainEfficiencyMetrics = IDL.Record({
37
+ 'avgBlockchainCompletionDays' : IDL.Nat,
38
+ 'totalCostSaved' : IDL.Nat,
39
+ 'avgTraditionalCompletionDays' : IDL.Nat,
40
+ 'timeReductionPercent' : IDL.Nat,
41
+ 'avgTraditionalCost' : IDL.Nat,
42
+ 'avgBlockchainCost' : IDL.Nat,
43
+ 'transactionsCompleted' : IDL.Nat,
44
+ 'costReductionPercent' : IDL.Nat,
45
+ 'totalTimeSavedDays' : IDL.Nat,
46
+ });
47
+ const BudgetStatus = IDL.Record({
48
+ 'dailyRemaining' : IDL.Nat,
49
+ 'isOverDailyBudget' : IDL.Bool,
50
+ 'monthlyLimit' : IDL.Nat,
51
+ 'monthlySpent' : IDL.Nat,
52
+ 'dailyLimit' : IDL.Nat,
53
+ 'dailySpent' : IDL.Nat,
54
+ 'isOverMonthlyBudget' : IDL.Bool,
55
+ 'monthlyRemaining' : IDL.Nat,
56
+ });
57
+ const CompanyLedger = IDL.Record({
58
+ 'companyAccountID' : IDL.Text,
59
+ 'avgCompletionTime' : IDL.Nat,
60
+ 'costSavings' : IDL.Nat,
61
+ 'completedThisMonth' : IDL.Nat,
62
+ 'activeTransactions' : IDL.Nat,
63
+ 'teamMemberCount' : IDL.Nat,
64
+ 'totalTransactions' : IDL.Nat,
65
+ });
66
+ const Time = IDL.Int;
67
+ const CompanyTeamMember = IDL.Record({
68
+ 'memberID' : IDL.Text,
69
+ 'permissions' : TeamPermissions,
70
+ 'accountID' : IDL.Text,
71
+ 'joinDate' : Time,
72
+ 'name' : IDL.Text,
73
+ 'role' : TeamMemberRole,
74
+ 'email' : IDL.Text,
75
+ });
76
+ const LRCostReport = IDL.Record({
77
+ 'entryCount' : IDL.Nat,
78
+ 'byEndpoint' : IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat)),
79
+ 'avgCostPerTransaction' : IDL.Nat,
80
+ 'totalGBP' : IDL.Text,
81
+ 'totalPence' : IDL.Nat,
82
+ });
83
+ const LandRegistryCostEntry = IDL.Record({
84
+ 'id' : IDL.Nat,
85
+ 'titleNumber' : IDL.Text,
86
+ 'invoiceReference' : IDL.Opt(IDL.Text),
87
+ 'description' : IDL.Text,
88
+ 'calledAt' : IDL.Int,
89
+ 'calledBy' : IDL.Principal,
90
+ 'apiEndpoint' : IDL.Text,
91
+ 'costPence' : IDL.Nat,
92
+ 'transactionId' : IDL.Text,
93
+ });
94
+ const Analytics = IDL.Record({
95
+ 'transactionVolume' : IDL.Nat,
96
+ 'avgCompletionTime' : IDL.Nat,
97
+ 'period' : IDL.Text,
98
+ 'totalCostSavings' : IDL.Nat,
99
+ 'completedTransactions' : IDL.Nat,
100
+ 'totalTransactions' : IDL.Nat,
101
+ });
102
+ const UserAccount = IDL.Record({
103
+ 'taxID' : IDL.Opt(IDL.Text),
104
+ 'accountID' : IDL.Text,
105
+ 'name' : IDL.Text,
106
+ 'isActive' : IDL.Bool,
107
+ 'email' : IDL.Text,
108
+ 'accountType' : AccountType,
109
+ 'companyName' : IDL.Opt(IDL.Text),
110
+ 'registrationDate' : Time,
111
+ });
112
+ const TransactionStatus = IDL.Variant({
113
+ 'active' : IDL.Null,
114
+ 'pending' : IDL.Null,
115
+ 'completed' : IDL.Null,
116
+ 'failed' : IDL.Null,
117
+ });
118
+ const VerificationStatus = IDL.Variant({
119
+ 'verified' : IDL.Null,
120
+ 'pending' : IDL.Null,
121
+ 'failed' : IDL.Null,
122
+ });
123
+ const DocumentVerification = IDL.Record({
124
+ 'mortgageApproval' : VerificationStatus,
125
+ 'propertyDeed' : VerificationStatus,
126
+ 'landRegistryConfirm' : VerificationStatus,
127
+ 'surveyReport' : VerificationStatus,
128
+ });
129
+ const UserLedgerEntry = IDL.Record({
130
+ 'completedDate' : IDL.Opt(Time),
131
+ 'initiatedDate' : Time,
132
+ 'status' : TransactionStatus,
133
+ 'accountID' : IDL.Text,
134
+ 'documentStatus' : DocumentVerification,
135
+ 'costsSaved' : IDL.Nat,
136
+ 'propertyAddress' : IDL.Text,
137
+ 'entryID' : IDL.Text,
138
+ 'propertyValue' : IDL.Nat,
139
+ 'roleInTransaction' : TransactionRole,
140
+ 'counterparties' : IDL.Vec(Counterparty),
141
+ 'transactionID' : IDL.Text,
142
+ });
143
+ const Result_2 = IDL.Variant({ 'ok' : IDL.Nat, 'err' : IDL.Text });
144
+ const Result_1 = IDL.Variant({ 'ok' : IDL.Null, 'err' : IDL.Text });
145
+ const Result = IDL.Variant({ 'ok' : IDL.Text, 'err' : IDL.Text });
146
+ return IDL.Service({
147
+ 'addTransactionToLedger' : IDL.Func(
148
+ [
149
+ IDL.Text,
150
+ IDL.Text,
151
+ TransactionRole,
152
+ IDL.Text,
153
+ IDL.Nat,
154
+ IDL.Vec(Counterparty),
155
+ ],
156
+ [IDL.Bool],
157
+ [],
158
+ ),
159
+ 'canAffordAPICall' : IDL.Func([IDL.Nat], [IDL.Bool], ['query']),
160
+ 'clearFailedAuditEvents' : IDL.Func([], [], []),
161
+ 'createCompanyTeamMember' : IDL.Func(
162
+ [IDL.Text, IDL.Text, IDL.Text, TeamMemberRole, TeamPermissions],
163
+ [IDL.Text],
164
+ [],
165
+ ),
166
+ 'createUserAccount' : IDL.Func(
167
+ [IDL.Text, IDL.Text, AccountType, IDL.Opt(IDL.Text), IDL.Opt(IDL.Text)],
168
+ [IDL.Text],
169
+ [],
170
+ ),
171
+ 'getAllAuditEvents' : IDL.Func([], [IDL.Vec(AuditEvent)], ['query']),
172
+ 'getBlockchainEfficiencyMetrics' : IDL.Func(
173
+ [IDL.Text],
174
+ [BlockchainEfficiencyMetrics],
175
+ ['query'],
176
+ ),
177
+ 'getBudgetStatus' : IDL.Func([], [BudgetStatus], ['query']),
178
+ 'getCompanyLedger' : IDL.Func([IDL.Text], [CompanyLedger], ['query']),
179
+ 'getCompanyTeamMembers' : IDL.Func(
180
+ [IDL.Text],
181
+ [IDL.Vec(CompanyTeamMember)],
182
+ ['query'],
183
+ ),
184
+ 'getCycles' : IDL.Func([], [IDL.Nat], ['query']),
185
+ 'getDailyLRSpend' : IDL.Func([], [IDL.Nat], ['query']),
186
+ 'getEventsByTransaction' : IDL.Func(
187
+ [IDL.Text],
188
+ [IDL.Vec(AuditEvent)],
189
+ ['query'],
190
+ ),
191
+ 'getFailedAuditEvents' : IDL.Func([], [IDL.Vec(AuditEvent)], ['query']),
192
+ 'getGlobalBlockchainStats' : IDL.Func(
193
+ [],
194
+ [BlockchainEfficiencyMetrics],
195
+ ['query'],
196
+ ),
197
+ 'getLRCostReport' : IDL.Func([IDL.Int, IDL.Int], [LRCostReport], ['query']),
198
+ 'getLRCostsForTransaction' : IDL.Func(
199
+ [IDL.Text],
200
+ [IDL.Vec(LandRegistryCostEntry)],
201
+ ['query'],
202
+ ),
203
+ 'getLRSpendByEndpoint' : IDL.Func(
204
+ [IDL.Int, IDL.Int],
205
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Nat))],
206
+ ['query'],
207
+ ),
208
+ 'getLedgerAnalytics' : IDL.Func(
209
+ [IDL.Text, IDL.Text],
210
+ [Analytics],
211
+ ['query'],
212
+ ),
213
+ 'getMonthlyLRSpend' : IDL.Func([], [IDL.Nat], ['query']),
214
+ 'getMyAccount' : IDL.Func([], [IDL.Opt(UserAccount)], ['query']),
215
+ 'getMyLedger' : IDL.Func([], [IDL.Vec(UserLedgerEntry)], ['query']),
216
+ 'getUserAccount' : IDL.Func([IDL.Text], [IDL.Opt(UserAccount)], ['query']),
217
+ 'getUserLedger' : IDL.Func(
218
+ [IDL.Text],
219
+ [IDL.Vec(UserLedgerEntry)],
220
+ ['query'],
221
+ ),
222
+ 'logEvent' : IDL.Func(
223
+ [IDL.Text, IDL.Text, IDL.Text, IDL.Opt(IDL.Text)],
224
+ [Result_2],
225
+ [],
226
+ ),
227
+ 'recordLandRegistryCost' : IDL.Func(
228
+ [IDL.Text, IDL.Text, IDL.Nat, IDL.Text, IDL.Text, IDL.Opt(IDL.Text)],
229
+ [Result_2],
230
+ [],
231
+ ),
232
+ 'setDailyBudget' : IDL.Func([IDL.Nat], [Result_1], []),
233
+ 'setDocumentStorageCanister' : IDL.Func([IDL.Principal], [], []),
234
+ 'setDocumentVerificationCanister' : IDL.Func([IDL.Principal], [], []),
235
+ 'setMonthlyBudget' : IDL.Func([IDL.Nat], [Result_1], []),
236
+ 'setPropertyRegistryCanister' : IDL.Func([IDL.Principal], [], []),
237
+ 'setTransactionManagerCanister' : IDL.Func([IDL.Principal], [], []),
238
+ 'setUserManagementCanister' : IDL.Func([IDL.Principal], [], []),
239
+ 'syncTransactionToLedger' : IDL.Func(
240
+ [IDL.Nat, IDL.Principal],
241
+ [Result],
242
+ [],
243
+ ),
244
+ 'updateTeamMemberPermissions' : IDL.Func(
245
+ [IDL.Text, IDL.Text, TeamPermissions],
246
+ [IDL.Bool],
247
+ [],
248
+ ),
249
+ 'updateTransactionStatus' : IDL.Func(
250
+ [IDL.Text, IDL.Text, TransactionStatus],
251
+ [IDL.Bool],
252
+ [],
253
+ ),
254
+ });
255
+ };
256
+ export const init = ({ IDL }) => { return []; };
@@ -1,71 +1,71 @@
1
- import type { Principal } from '@icp-sdk/core/principal';
2
- import type { ActorMethod } from '@icp-sdk/core/agent';
3
- import type { IDL } from '@icp-sdk/core/candid';
4
-
5
- export interface ChainPropertyView {
6
- 'status' : PropertyStatus,
7
- 'progressPercentage' : bigint,
8
- 'role' : string,
9
- 'documentsComplete' : boolean,
10
- 'financingComplete' : boolean,
11
- 'searchesComplete' : boolean,
12
- 'anonymousId' : string,
13
- }
14
- export interface Property {
15
- 'id' : bigint,
16
- 'anonymousPropertyId' : string,
17
- 'status' : PropertyStatus,
18
- 'propertyType' : string,
19
- 'owner' : Principal,
20
- 'createdAt' : Time,
21
- 'size' : bigint,
22
- 'documentsComplete' : boolean,
23
- 'description' : string,
24
- 'isVerified' : boolean,
25
- 'linkedProperties' : Array<string>,
26
- 'address' : string,
27
- 'chainPosition' : [] | [bigint],
28
- 'financingComplete' : boolean,
29
- 'price' : bigint,
30
- 'searchesComplete' : boolean,
31
- 'transactionId' : [] | [string],
32
- }
33
- export type PropertyStatus = { 'Listed' : null } |
34
- { 'InTransaction' : null } |
35
- { 'Cancelled' : null } |
36
- { 'Completed' : null };
37
- export type Result = { 'ok' : null } |
38
- { 'err' : string };
39
- export type Result_1 = { 'ok' : ChainPropertyView } |
40
- { 'err' : string };
41
- export type Result_2 = { 'ok' : string } |
42
- { 'err' : string };
43
- export type Result_3 = { 'ok' : Array<string> } |
44
- { 'err' : string };
45
- export type Time = bigint;
46
- export interface _SERVICE {
47
- 'buildPropertyChain' : ActorMethod<[string], Result_3>,
48
- 'canViewFullPropertyDetails' : ActorMethod<[string, Principal], boolean>,
49
- 'generateAnonymousPropertyId' : ActorMethod<[string], Result_2>,
50
- 'getAllProperties' : ActorMethod<[], Array<Property>>,
51
- 'getCycles' : ActorMethod<[], bigint>,
52
- 'getProperty' : ActorMethod<[bigint], [] | [Property]>,
53
- 'getPropertyForChainView' : ActorMethod<[string, Principal], Result_1>,
54
- 'registerProperty' : ActorMethod<
55
- [string, bigint, bigint, string, string],
56
- bigint
57
- >,
58
- 'transferOwnership' : ActorMethod<[bigint, Principal], boolean>,
59
- 'updatePropertyProgress' : ActorMethod<
60
- [bigint, boolean, boolean, boolean],
61
- Result
62
- >,
63
- 'updatePropertyStatus' : ActorMethod<[bigint, PropertyStatus], Result>,
64
- 'updatePropertyTransaction' : ActorMethod<
65
- [bigint, [] | [string], [] | [bigint], Array<string>],
66
- Result
67
- >,
68
- 'verifyProperty' : ActorMethod<[bigint], boolean>,
69
- }
70
- export declare const idlFactory: IDL.InterfaceFactory;
71
- 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 interface ChainPropertyView {
6
+ 'status' : PropertyStatus,
7
+ 'progressPercentage' : bigint,
8
+ 'role' : string,
9
+ 'documentsComplete' : boolean,
10
+ 'financingComplete' : boolean,
11
+ 'searchesComplete' : boolean,
12
+ 'anonymousId' : string,
13
+ }
14
+ export interface Property {
15
+ 'id' : bigint,
16
+ 'anonymousPropertyId' : string,
17
+ 'status' : PropertyStatus,
18
+ 'propertyType' : string,
19
+ 'owner' : Principal,
20
+ 'createdAt' : Time,
21
+ 'size' : bigint,
22
+ 'documentsComplete' : boolean,
23
+ 'description' : string,
24
+ 'isVerified' : boolean,
25
+ 'linkedProperties' : Array<string>,
26
+ 'address' : string,
27
+ 'chainPosition' : [] | [bigint],
28
+ 'financingComplete' : boolean,
29
+ 'price' : bigint,
30
+ 'searchesComplete' : boolean,
31
+ 'transactionId' : [] | [string],
32
+ }
33
+ export type PropertyStatus = { 'Listed' : null } |
34
+ { 'InTransaction' : null } |
35
+ { 'Cancelled' : null } |
36
+ { 'Completed' : null };
37
+ export type Result = { 'ok' : null } |
38
+ { 'err' : string };
39
+ export type Result_1 = { 'ok' : ChainPropertyView } |
40
+ { 'err' : string };
41
+ export type Result_2 = { 'ok' : string } |
42
+ { 'err' : string };
43
+ export type Result_3 = { 'ok' : Array<string> } |
44
+ { 'err' : string };
45
+ export type Time = bigint;
46
+ export interface _SERVICE {
47
+ 'buildPropertyChain' : ActorMethod<[string], Result_3>,
48
+ 'canViewFullPropertyDetails' : ActorMethod<[string, Principal], boolean>,
49
+ 'generateAnonymousPropertyId' : ActorMethod<[string], Result_2>,
50
+ 'getAllProperties' : ActorMethod<[], Array<Property>>,
51
+ 'getCycles' : ActorMethod<[], bigint>,
52
+ 'getProperty' : ActorMethod<[bigint], [] | [Property]>,
53
+ 'getPropertyForChainView' : ActorMethod<[string, Principal], Result_1>,
54
+ 'registerProperty' : ActorMethod<
55
+ [string, bigint, bigint, string, string],
56
+ bigint
57
+ >,
58
+ 'transferOwnership' : ActorMethod<[bigint, Principal], boolean>,
59
+ 'updatePropertyProgress' : ActorMethod<
60
+ [bigint, boolean, boolean, boolean],
61
+ Result
62
+ >,
63
+ 'updatePropertyStatus' : ActorMethod<[bigint, PropertyStatus], Result>,
64
+ 'updatePropertyTransaction' : ActorMethod<
65
+ [bigint, [] | [string], [] | [bigint], Array<string>],
66
+ Result
67
+ >,
68
+ 'verifyProperty' : ActorMethod<[bigint], boolean>,
69
+ }
70
+ export declare const idlFactory: IDL.InterfaceFactory;
71
+ export declare const init: (args: { IDL: typeof IDL }) => IDL.Type[];
@@ -576,6 +576,32 @@ service : {
576
576
  joinAsBotByInviteCode: (inviteCode: text, botName: text) -> (Result_6);
577
577
  joinTransactionByInviteCode: (inviteCode: text) -> (Result_6);
578
578
  joinTransactionByInviteCodeAsBuyer: (inviteCode: text) -> (Result_6);
579
+ /// Caller-initiated removal from a transaction they joined but didn't
580
+ /// create. Counterpart to `removeParty` (which is seller/admin-driven and
581
+ /// gated against primary parties) — this is the "I want out" path for a
582
+ /// joined buyer or any other access-list member.
583
+ ///
584
+ /// Gates:
585
+ /// - Anonymous callers rejected outright.
586
+ /// - Seller / createdBy cannot leave their own transaction (they
587
+ /// dispose via deleteTransaction).
588
+ /// - Caller must currently have access to the transaction.
589
+ /// - Locked after contract exchange (same posture as assignBuyer):
590
+ /// once the deal is signed nobody walks away by toggling a button.
591
+ ///
592
+ /// Effects:
593
+ /// - Caller is removed from `accessList`.
594
+ /// - If the caller is the assigned buyer (`txn.buyer == msg.caller`),
595
+ /// the buyer slot is reset to the seller placeholder, matching the
596
+ /// sentinel state that `assignBuyer` checks for. The transaction
597
+ /// re-enters the "Awaiting buyer" state and the invite code is
598
+ /// reusable by a new joiner.
599
+ /// - Audit event `buyer_left` (or `party_left` for non-buyer leavers)
600
+ /// is logged via the existing ledger pattern.
601
+ ///
602
+ /// Concurrency: uses the same acquireTxLock/finally releaseTxLock
603
+ /// posture as assignBuyer so a leave can't race against an in-flight
604
+ /// stage write.
579
605
  leaveTransaction: (transactionId: text) -> (Result);
580
606
  linkTransactionToChain: (myTransactionId: text, buyingTransactionId:
581
607
  text) -> (Result_1);
@@ -590,6 +616,7 @@ service : {
590
616
  /// 2. Stale-pin txs where the org's pinned principal changed after the
591
617
  /// tx was created (e.g. admin password reset → new ICP key, or org
592
618
  /// ownership transferred to a different admin).
619
+ ///
593
620
  /// Idempotent over the target: re-running with the same developerPrincipal
594
621
  /// returns an error (already at target), so admin-driven backfill scripts
595
622
  /// don't silently re-touch state. Always rejects: