@ixo/editor 2.5.0 → 2.7.0
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 +438 -438
- package/dist/{chunk-EEQXEWCQ.mjs → chunk-Z7FSLJDH.mjs} +4421 -760
- package/dist/chunk-Z7FSLJDH.mjs.map +1 -0
- package/dist/graphql-client-ppGpOvLH.d.ts +3134 -0
- package/dist/index.d.ts +130 -2579
- package/dist/index.mjs +33 -3
- package/dist/mantine/index.d.ts +2 -2
- package/dist/mantine/index.mjs +13 -1
- package/package.json +1 -1
- package/style.css.d.ts +5 -5
- package/dist/chunk-EEQXEWCQ.mjs.map +0 -1
|
@@ -0,0 +1,3134 @@
|
|
|
1
|
+
import * as _blocknote_core from '@blocknote/core';
|
|
2
|
+
import { BlockSchemaFromSpecs, InlineContentSchema, StyleSchema, BlockNoteEditor, PartialBlock } from '@blocknote/core';
|
|
3
|
+
import { Map, Array as Array$1, Text, Doc } from 'yjs';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { MatrixClient } from 'matrix-js-sdk';
|
|
6
|
+
|
|
7
|
+
declare const CheckboxBlockSpec: {
|
|
8
|
+
config: {
|
|
9
|
+
readonly type: "checkbox";
|
|
10
|
+
readonly propSchema: {
|
|
11
|
+
readonly checked: {
|
|
12
|
+
readonly default: false;
|
|
13
|
+
};
|
|
14
|
+
readonly allowedCheckers: {
|
|
15
|
+
readonly default: "all";
|
|
16
|
+
};
|
|
17
|
+
readonly initialChecked: {
|
|
18
|
+
readonly default: false;
|
|
19
|
+
};
|
|
20
|
+
readonly title: {
|
|
21
|
+
readonly default: "";
|
|
22
|
+
};
|
|
23
|
+
readonly description: {
|
|
24
|
+
readonly default: "";
|
|
25
|
+
};
|
|
26
|
+
readonly icon: {
|
|
27
|
+
readonly default: "square-check";
|
|
28
|
+
};
|
|
29
|
+
readonly conditions: {
|
|
30
|
+
readonly default: "";
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
readonly content: "inline";
|
|
34
|
+
};
|
|
35
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
36
|
+
readonly type: "checkbox";
|
|
37
|
+
readonly propSchema: {
|
|
38
|
+
readonly checked: {
|
|
39
|
+
readonly default: false;
|
|
40
|
+
};
|
|
41
|
+
readonly allowedCheckers: {
|
|
42
|
+
readonly default: "all";
|
|
43
|
+
};
|
|
44
|
+
readonly initialChecked: {
|
|
45
|
+
readonly default: false;
|
|
46
|
+
};
|
|
47
|
+
readonly title: {
|
|
48
|
+
readonly default: "";
|
|
49
|
+
};
|
|
50
|
+
readonly description: {
|
|
51
|
+
readonly default: "";
|
|
52
|
+
};
|
|
53
|
+
readonly icon: {
|
|
54
|
+
readonly default: "square-check";
|
|
55
|
+
};
|
|
56
|
+
readonly conditions: {
|
|
57
|
+
readonly default: "";
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
readonly content: "inline";
|
|
61
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
type CheckboxBlockProps = IxoBlockProps;
|
|
65
|
+
|
|
66
|
+
declare const ListBlockSpec: {
|
|
67
|
+
config: {
|
|
68
|
+
readonly type: "list";
|
|
69
|
+
readonly propSchema: {
|
|
70
|
+
readonly listType: {
|
|
71
|
+
readonly default: "";
|
|
72
|
+
};
|
|
73
|
+
readonly sort: {
|
|
74
|
+
readonly default: "{}";
|
|
75
|
+
};
|
|
76
|
+
readonly filter: {
|
|
77
|
+
readonly default: "{}";
|
|
78
|
+
};
|
|
79
|
+
readonly filterOptions: {
|
|
80
|
+
readonly default: "{}";
|
|
81
|
+
};
|
|
82
|
+
readonly sortOptions: {
|
|
83
|
+
readonly default: "{}";
|
|
84
|
+
};
|
|
85
|
+
readonly listConfig: {
|
|
86
|
+
readonly default: "{}";
|
|
87
|
+
};
|
|
88
|
+
readonly icon: {
|
|
89
|
+
readonly default: "📋";
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
readonly content: "none";
|
|
93
|
+
};
|
|
94
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
95
|
+
readonly type: "list";
|
|
96
|
+
readonly propSchema: {
|
|
97
|
+
readonly listType: {
|
|
98
|
+
readonly default: "";
|
|
99
|
+
};
|
|
100
|
+
readonly sort: {
|
|
101
|
+
readonly default: "{}";
|
|
102
|
+
};
|
|
103
|
+
readonly filter: {
|
|
104
|
+
readonly default: "{}";
|
|
105
|
+
};
|
|
106
|
+
readonly filterOptions: {
|
|
107
|
+
readonly default: "{}";
|
|
108
|
+
};
|
|
109
|
+
readonly sortOptions: {
|
|
110
|
+
readonly default: "{}";
|
|
111
|
+
};
|
|
112
|
+
readonly listConfig: {
|
|
113
|
+
readonly default: "{}";
|
|
114
|
+
};
|
|
115
|
+
readonly icon: {
|
|
116
|
+
readonly default: "📋";
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
readonly content: "none";
|
|
120
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
interface ListBlockSettings {
|
|
124
|
+
listType: string | null;
|
|
125
|
+
listConfig: string;
|
|
126
|
+
}
|
|
127
|
+
interface ListBlockProps extends IxoBlockProps {
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
type ProposalActionType = 'Spend' | 'UpdateMembers' | 'Stake' | 'Join' | 'AuthzExec' | 'AuthzGrant' | 'AuthzRevoke' | 'BurnNft' | 'Mint' | 'Execute' | 'Instantiate' | 'ManageSubDaos' | 'ManageCw721' | 'ManageCw20' | 'Migrate' | 'TransferNft' | 'UpdateAdmin' | 'UpdatePreProposeConfig' | 'UpdateVotingConfig' | 'GovernanceVote' | 'WithdrawTokenSwap' | 'UpdateInfo' | 'Custom' | 'ManageStorageItems' | 'ValidatorActions' | 'PerformTokenSwap' | 'DaoAdminExec' | 'StakeToGroup' | 'SendGroupToken' | 'AcceptToMarketplace' | 'CreateEntity';
|
|
131
|
+
interface Member$1 {
|
|
132
|
+
addr: string;
|
|
133
|
+
weight: number;
|
|
134
|
+
}
|
|
135
|
+
interface BaseProposalAction {
|
|
136
|
+
type: ProposalActionType;
|
|
137
|
+
}
|
|
138
|
+
interface SpendData {
|
|
139
|
+
to: string;
|
|
140
|
+
denom: string;
|
|
141
|
+
amount: string;
|
|
142
|
+
}
|
|
143
|
+
interface ManageMembersData {
|
|
144
|
+
add: Member$1[];
|
|
145
|
+
remove: {
|
|
146
|
+
addr: string;
|
|
147
|
+
}[];
|
|
148
|
+
}
|
|
149
|
+
interface SpendAction extends BaseProposalAction {
|
|
150
|
+
type: 'Spend';
|
|
151
|
+
data: SpendData;
|
|
152
|
+
}
|
|
153
|
+
interface UpdateMembersAction extends BaseProposalAction {
|
|
154
|
+
type: 'UpdateMembers';
|
|
155
|
+
data: ManageMembersData;
|
|
156
|
+
}
|
|
157
|
+
declare const StakeType: {
|
|
158
|
+
readonly Delegate: "delegate";
|
|
159
|
+
readonly Undelegate: "undelegate";
|
|
160
|
+
readonly Redelegate: "redelegate";
|
|
161
|
+
readonly WithdrawDelegatorReward: "withdraw_delegator_reward";
|
|
162
|
+
};
|
|
163
|
+
type StakeType = (typeof StakeType)[keyof typeof StakeType];
|
|
164
|
+
interface StakeData {
|
|
165
|
+
stakeType: StakeType;
|
|
166
|
+
validator: string;
|
|
167
|
+
toValidator: string;
|
|
168
|
+
amount: string;
|
|
169
|
+
denom: string;
|
|
170
|
+
}
|
|
171
|
+
interface JoinData {
|
|
172
|
+
id: string;
|
|
173
|
+
coreAddress: string;
|
|
174
|
+
address: string;
|
|
175
|
+
}
|
|
176
|
+
interface StakeAction extends BaseProposalAction {
|
|
177
|
+
type: 'Stake';
|
|
178
|
+
data: StakeData;
|
|
179
|
+
}
|
|
180
|
+
interface JoinAction extends BaseProposalAction {
|
|
181
|
+
type: 'Join';
|
|
182
|
+
data: JoinData;
|
|
183
|
+
}
|
|
184
|
+
interface Coin$1 {
|
|
185
|
+
denom: string;
|
|
186
|
+
amount: string;
|
|
187
|
+
}
|
|
188
|
+
interface Binary {
|
|
189
|
+
[k: string]: unknown;
|
|
190
|
+
}
|
|
191
|
+
interface Empty {
|
|
192
|
+
[k: string]: unknown;
|
|
193
|
+
}
|
|
194
|
+
interface GenericToken {
|
|
195
|
+
[k: string]: unknown;
|
|
196
|
+
}
|
|
197
|
+
interface SubDao {
|
|
198
|
+
addr: string;
|
|
199
|
+
charter?: string | null;
|
|
200
|
+
[k: string]: unknown;
|
|
201
|
+
}
|
|
202
|
+
interface Counterparty {
|
|
203
|
+
address: string;
|
|
204
|
+
[k: string]: unknown;
|
|
205
|
+
}
|
|
206
|
+
type DepositRefundPolicy = string;
|
|
207
|
+
type VoteOption = number;
|
|
208
|
+
type TProposalActionModel = any;
|
|
209
|
+
interface MsgDelegate {
|
|
210
|
+
[k: string]: unknown;
|
|
211
|
+
}
|
|
212
|
+
interface MsgUndelegate {
|
|
213
|
+
[k: string]: unknown;
|
|
214
|
+
}
|
|
215
|
+
interface MsgBeginRedelegate {
|
|
216
|
+
[k: string]: unknown;
|
|
217
|
+
}
|
|
218
|
+
interface MsgWithdrawDelegatorReward {
|
|
219
|
+
[k: string]: unknown;
|
|
220
|
+
}
|
|
221
|
+
type BankMsg = {
|
|
222
|
+
send: {
|
|
223
|
+
amount: Coin$1[];
|
|
224
|
+
to_address: string;
|
|
225
|
+
};
|
|
226
|
+
} | {
|
|
227
|
+
burn: {
|
|
228
|
+
amount: Coin$1[];
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
type StakingMsg = {
|
|
232
|
+
delegate: {
|
|
233
|
+
amount: Coin$1;
|
|
234
|
+
validator: string;
|
|
235
|
+
};
|
|
236
|
+
} | {
|
|
237
|
+
undelegate: {
|
|
238
|
+
amount: Coin$1;
|
|
239
|
+
validator: string;
|
|
240
|
+
};
|
|
241
|
+
} | {
|
|
242
|
+
redelegate: {
|
|
243
|
+
amount: Coin$1;
|
|
244
|
+
dst_validator: string;
|
|
245
|
+
src_validator: string;
|
|
246
|
+
};
|
|
247
|
+
};
|
|
248
|
+
type DistributionMsg = {
|
|
249
|
+
set_withdraw_address: {
|
|
250
|
+
address: string;
|
|
251
|
+
};
|
|
252
|
+
} | {
|
|
253
|
+
withdraw_delegator_reward: {
|
|
254
|
+
validator: string;
|
|
255
|
+
};
|
|
256
|
+
};
|
|
257
|
+
interface IbcTimeout {
|
|
258
|
+
[k: string]: unknown;
|
|
259
|
+
}
|
|
260
|
+
type IbcMsg = {
|
|
261
|
+
transfer: {
|
|
262
|
+
amount: Coin$1;
|
|
263
|
+
channel_id: string;
|
|
264
|
+
timeout: IbcTimeout;
|
|
265
|
+
to_address: string;
|
|
266
|
+
};
|
|
267
|
+
} | {
|
|
268
|
+
send_packet: {
|
|
269
|
+
channel_id: string;
|
|
270
|
+
data: Binary;
|
|
271
|
+
timeout: IbcTimeout;
|
|
272
|
+
};
|
|
273
|
+
} | {
|
|
274
|
+
close_channel: {
|
|
275
|
+
channel_id: string;
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
type WasmMsg = {
|
|
279
|
+
execute: {
|
|
280
|
+
contract_addr: string;
|
|
281
|
+
funds: Coin$1[];
|
|
282
|
+
msg: Binary;
|
|
283
|
+
};
|
|
284
|
+
} | {
|
|
285
|
+
instantiate: {
|
|
286
|
+
admin?: string | null;
|
|
287
|
+
code_id: number;
|
|
288
|
+
funds: Coin$1[];
|
|
289
|
+
label: string;
|
|
290
|
+
msg: Binary;
|
|
291
|
+
};
|
|
292
|
+
} | {
|
|
293
|
+
migrate: {
|
|
294
|
+
contract_addr: string;
|
|
295
|
+
msg: Binary;
|
|
296
|
+
new_code_id: number;
|
|
297
|
+
};
|
|
298
|
+
} | {
|
|
299
|
+
update_admin: {
|
|
300
|
+
admin: string;
|
|
301
|
+
contract_addr: string;
|
|
302
|
+
};
|
|
303
|
+
} | {
|
|
304
|
+
clear_admin: {
|
|
305
|
+
contract_addr: string;
|
|
306
|
+
};
|
|
307
|
+
};
|
|
308
|
+
type GovMsg = {
|
|
309
|
+
vote: {
|
|
310
|
+
proposal_id: number;
|
|
311
|
+
vote: VoteOption;
|
|
312
|
+
};
|
|
313
|
+
};
|
|
314
|
+
type StargateMsg = {
|
|
315
|
+
stargate: {
|
|
316
|
+
type_url: string;
|
|
317
|
+
value: Binary;
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
type CosmosMsgFor_Empty = {
|
|
321
|
+
bank: BankMsg;
|
|
322
|
+
} | {
|
|
323
|
+
custom: Empty;
|
|
324
|
+
} | {
|
|
325
|
+
staking: StakingMsg;
|
|
326
|
+
} | {
|
|
327
|
+
distribution: DistributionMsg;
|
|
328
|
+
} | {
|
|
329
|
+
ibc: IbcMsg;
|
|
330
|
+
} | {
|
|
331
|
+
wasm: WasmMsg;
|
|
332
|
+
} | {
|
|
333
|
+
gov: GovMsg;
|
|
334
|
+
} | StargateMsg;
|
|
335
|
+
declare const AuthzExecActionTypes: {
|
|
336
|
+
readonly Delegate: "/cosmos.staking.v1beta1.MsgDelegate";
|
|
337
|
+
readonly Undelegate: "/cosmos.staking.v1beta1.MsgUndelegate";
|
|
338
|
+
readonly Redelegate: "/cosmos.staking.v1beta1.MsgBeginRedelegate";
|
|
339
|
+
readonly ClaimRewards: "/cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward";
|
|
340
|
+
readonly Custom: "custom";
|
|
341
|
+
};
|
|
342
|
+
type AuthzExecActionType = (typeof AuthzExecActionTypes)[keyof typeof AuthzExecActionTypes];
|
|
343
|
+
interface AuthzExecData {
|
|
344
|
+
authzExecActionType: AuthzExecActionType;
|
|
345
|
+
delegate: MsgDelegate;
|
|
346
|
+
undelegate: MsgUndelegate;
|
|
347
|
+
redelegate: MsgBeginRedelegate;
|
|
348
|
+
claimRewards: MsgWithdrawDelegatorReward;
|
|
349
|
+
custom: string;
|
|
350
|
+
}
|
|
351
|
+
interface AuthzData {
|
|
352
|
+
custom?: boolean;
|
|
353
|
+
typeUrl: string;
|
|
354
|
+
value: {
|
|
355
|
+
grantee: string;
|
|
356
|
+
msgTypeUrl: string;
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
interface BurnNftData {
|
|
360
|
+
collection: string;
|
|
361
|
+
tokenId: string;
|
|
362
|
+
}
|
|
363
|
+
interface ExecuteData {
|
|
364
|
+
address: string;
|
|
365
|
+
message: string;
|
|
366
|
+
funds: Coin$1[];
|
|
367
|
+
}
|
|
368
|
+
interface InstantiateData {
|
|
369
|
+
admin: string;
|
|
370
|
+
codeId: number;
|
|
371
|
+
label: string;
|
|
372
|
+
message: string;
|
|
373
|
+
funds: Coin$1[];
|
|
374
|
+
}
|
|
375
|
+
interface ManageSubDaosData {
|
|
376
|
+
toAdd: SubDao[];
|
|
377
|
+
toRemove: {
|
|
378
|
+
address: string;
|
|
379
|
+
}[];
|
|
380
|
+
}
|
|
381
|
+
interface ManageCw721Data {
|
|
382
|
+
adding: boolean;
|
|
383
|
+
address: string;
|
|
384
|
+
}
|
|
385
|
+
interface ManageCw20Data {
|
|
386
|
+
adding: boolean;
|
|
387
|
+
address: string;
|
|
388
|
+
}
|
|
389
|
+
interface MigrateData {
|
|
390
|
+
contract: string;
|
|
391
|
+
codeId: number;
|
|
392
|
+
msg: string;
|
|
393
|
+
}
|
|
394
|
+
interface MintData {
|
|
395
|
+
to: string;
|
|
396
|
+
amount: number;
|
|
397
|
+
}
|
|
398
|
+
interface TransferNftData {
|
|
399
|
+
collection: string;
|
|
400
|
+
tokenId: string;
|
|
401
|
+
recipient: string;
|
|
402
|
+
executeSmartContract: boolean;
|
|
403
|
+
smartContractMsg: string;
|
|
404
|
+
}
|
|
405
|
+
interface UpdateAdminData {
|
|
406
|
+
contract: string;
|
|
407
|
+
newAdmin: string;
|
|
408
|
+
}
|
|
409
|
+
interface UpdatePreProposeConfigData {
|
|
410
|
+
depositRequired: boolean;
|
|
411
|
+
depositInfo: {
|
|
412
|
+
amount: string;
|
|
413
|
+
type: 'native' | 'cw20' | 'voting_module_token';
|
|
414
|
+
denomOrAddress: string;
|
|
415
|
+
token?: GenericToken;
|
|
416
|
+
refundPolicy: DepositRefundPolicy;
|
|
417
|
+
};
|
|
418
|
+
anyoneCanPropose: boolean;
|
|
419
|
+
}
|
|
420
|
+
interface UpdateProposalConfigData {
|
|
421
|
+
onlyMembersExecute: boolean;
|
|
422
|
+
thresholdType: '%' | 'majority';
|
|
423
|
+
thresholdPercentage?: number;
|
|
424
|
+
quorumEnabled: boolean;
|
|
425
|
+
quorumType: '%' | 'majority';
|
|
426
|
+
quorumPercentage?: number;
|
|
427
|
+
proposalDuration: number;
|
|
428
|
+
proposalDurationUnits: 'weeks' | 'days' | 'hours' | 'minutes' | 'seconds';
|
|
429
|
+
allowRevoting: boolean;
|
|
430
|
+
}
|
|
431
|
+
interface GovernanceVoteData {
|
|
432
|
+
proposalId: string;
|
|
433
|
+
vote: VoteOption;
|
|
434
|
+
}
|
|
435
|
+
interface WithdrawTokenSwapData {
|
|
436
|
+
contractChosen: boolean;
|
|
437
|
+
tokenSwapContractAddress?: string;
|
|
438
|
+
}
|
|
439
|
+
interface UpdateInfoData {
|
|
440
|
+
automatically_add_cw20s: boolean;
|
|
441
|
+
automatically_add_cw721s: boolean;
|
|
442
|
+
dao_uri?: string | null;
|
|
443
|
+
description: string;
|
|
444
|
+
image_url?: string | null;
|
|
445
|
+
name: string;
|
|
446
|
+
[k: string]: unknown;
|
|
447
|
+
}
|
|
448
|
+
interface CustomData {
|
|
449
|
+
message: string;
|
|
450
|
+
}
|
|
451
|
+
interface ManageStorageItemsData {
|
|
452
|
+
setting: boolean;
|
|
453
|
+
key: string;
|
|
454
|
+
value: string;
|
|
455
|
+
}
|
|
456
|
+
declare enum ValidatorActionType {
|
|
457
|
+
CreateValidator = "/cosmos.staking.v1beta1.MsgCreateValidator",
|
|
458
|
+
EditValidator = "/cosmos.staking.v1beta1.MsgEditValidator",
|
|
459
|
+
UnjailValidator = "/cosmos.slashing.v1beta1.MsgUnjail",
|
|
460
|
+
WithdrawValidatorCommission = "/cosmos.distribution.v1beta1.MsgWithdrawValidatorCommission"
|
|
461
|
+
}
|
|
462
|
+
interface ValidatorActionsData {
|
|
463
|
+
validatorActionType: ValidatorActionType;
|
|
464
|
+
createMsg: string;
|
|
465
|
+
editMsg: string;
|
|
466
|
+
}
|
|
467
|
+
interface PerformTokenSwapData {
|
|
468
|
+
contractChosen: boolean;
|
|
469
|
+
tokenSwapContractAddress?: string;
|
|
470
|
+
selfParty?: Omit<Counterparty, 'address'>;
|
|
471
|
+
counterparty?: Counterparty;
|
|
472
|
+
}
|
|
473
|
+
type DaoAdminExecData = {
|
|
474
|
+
coreAddress: string;
|
|
475
|
+
msgs: CosmosMsgFor_Empty[];
|
|
476
|
+
_actions?: TProposalActionModel[];
|
|
477
|
+
};
|
|
478
|
+
interface StakeToGroupData {
|
|
479
|
+
amount: string;
|
|
480
|
+
tokenContract: string;
|
|
481
|
+
stakingContract: string;
|
|
482
|
+
}
|
|
483
|
+
interface SendGroupTokenData {
|
|
484
|
+
amount: string;
|
|
485
|
+
contract: string;
|
|
486
|
+
toAddress: string;
|
|
487
|
+
}
|
|
488
|
+
interface AcceptToMarketplaceData {
|
|
489
|
+
did: string;
|
|
490
|
+
relayerNodeDid: string;
|
|
491
|
+
relayerNodeAddress: string;
|
|
492
|
+
}
|
|
493
|
+
interface AuthzExecAction extends BaseProposalAction {
|
|
494
|
+
type: 'AuthzExec';
|
|
495
|
+
data: AuthzExecData;
|
|
496
|
+
}
|
|
497
|
+
interface AuthzGrantAction extends BaseProposalAction {
|
|
498
|
+
type: 'AuthzGrant';
|
|
499
|
+
data: AuthzData;
|
|
500
|
+
}
|
|
501
|
+
interface AuthzRevokeAction extends BaseProposalAction {
|
|
502
|
+
type: 'AuthzRevoke';
|
|
503
|
+
data: AuthzData;
|
|
504
|
+
}
|
|
505
|
+
interface BurnNftAction extends BaseProposalAction {
|
|
506
|
+
type: 'BurnNft';
|
|
507
|
+
data: BurnNftData;
|
|
508
|
+
}
|
|
509
|
+
interface MintAction extends BaseProposalAction {
|
|
510
|
+
type: 'Mint';
|
|
511
|
+
data: MintData;
|
|
512
|
+
}
|
|
513
|
+
interface ExecuteAction extends BaseProposalAction {
|
|
514
|
+
type: 'Execute';
|
|
515
|
+
data: ExecuteData;
|
|
516
|
+
}
|
|
517
|
+
interface InstantiateAction extends BaseProposalAction {
|
|
518
|
+
type: 'Instantiate';
|
|
519
|
+
data: InstantiateData;
|
|
520
|
+
}
|
|
521
|
+
interface ManageSubDaosAction extends BaseProposalAction {
|
|
522
|
+
type: 'ManageSubDaos';
|
|
523
|
+
data: ManageSubDaosData;
|
|
524
|
+
}
|
|
525
|
+
interface ManageCw721Action extends BaseProposalAction {
|
|
526
|
+
type: 'ManageCw721';
|
|
527
|
+
data: ManageCw721Data;
|
|
528
|
+
}
|
|
529
|
+
interface ManageCw20Action extends BaseProposalAction {
|
|
530
|
+
type: 'ManageCw20';
|
|
531
|
+
data: ManageCw20Data;
|
|
532
|
+
}
|
|
533
|
+
interface MigrateAction extends BaseProposalAction {
|
|
534
|
+
type: 'Migrate';
|
|
535
|
+
data: MigrateData;
|
|
536
|
+
}
|
|
537
|
+
interface TransferNftAction extends BaseProposalAction {
|
|
538
|
+
type: 'TransferNft';
|
|
539
|
+
data: TransferNftData;
|
|
540
|
+
}
|
|
541
|
+
interface UpdateAdminAction extends BaseProposalAction {
|
|
542
|
+
type: 'UpdateAdmin';
|
|
543
|
+
data: UpdateAdminData;
|
|
544
|
+
}
|
|
545
|
+
interface UpdatePreProposeConfigAction extends BaseProposalAction {
|
|
546
|
+
type: 'UpdatePreProposeConfig';
|
|
547
|
+
data: UpdatePreProposeConfigData;
|
|
548
|
+
}
|
|
549
|
+
interface UpdateVotingConfigAction extends BaseProposalAction {
|
|
550
|
+
type: 'UpdateVotingConfig';
|
|
551
|
+
data: UpdateProposalConfigData;
|
|
552
|
+
}
|
|
553
|
+
interface GovernanceVoteAction extends BaseProposalAction {
|
|
554
|
+
type: 'GovernanceVote';
|
|
555
|
+
data: GovernanceVoteData;
|
|
556
|
+
}
|
|
557
|
+
interface WithdrawTokenSwapAction extends BaseProposalAction {
|
|
558
|
+
type: 'WithdrawTokenSwap';
|
|
559
|
+
data: WithdrawTokenSwapData;
|
|
560
|
+
}
|
|
561
|
+
interface UpdateInfoAction extends BaseProposalAction {
|
|
562
|
+
type: 'UpdateInfo';
|
|
563
|
+
data: UpdateInfoData;
|
|
564
|
+
}
|
|
565
|
+
interface CustomAction extends BaseProposalAction {
|
|
566
|
+
type: 'Custom';
|
|
567
|
+
data: CustomData;
|
|
568
|
+
}
|
|
569
|
+
interface ManageStorageItemsAction extends BaseProposalAction {
|
|
570
|
+
type: 'ManageStorageItems';
|
|
571
|
+
data: ManageStorageItemsData;
|
|
572
|
+
}
|
|
573
|
+
interface ValidatorActionsAction extends BaseProposalAction {
|
|
574
|
+
type: 'ValidatorActions';
|
|
575
|
+
data: ValidatorActionsData;
|
|
576
|
+
}
|
|
577
|
+
interface PerformTokenSwapAction extends BaseProposalAction {
|
|
578
|
+
type: 'PerformTokenSwap';
|
|
579
|
+
data: PerformTokenSwapData;
|
|
580
|
+
}
|
|
581
|
+
interface DaoAdminExecAction extends BaseProposalAction {
|
|
582
|
+
type: 'DaoAdminExec';
|
|
583
|
+
data: DaoAdminExecData;
|
|
584
|
+
}
|
|
585
|
+
interface StakeToGroupAction extends BaseProposalAction {
|
|
586
|
+
type: 'StakeToGroup';
|
|
587
|
+
data: StakeToGroupData;
|
|
588
|
+
}
|
|
589
|
+
interface SendGroupTokenAction extends BaseProposalAction {
|
|
590
|
+
type: 'SendGroupToken';
|
|
591
|
+
data: SendGroupTokenData;
|
|
592
|
+
}
|
|
593
|
+
interface AcceptToMarketplaceAction extends BaseProposalAction {
|
|
594
|
+
type: 'AcceptToMarketplace';
|
|
595
|
+
data: AcceptToMarketplaceData;
|
|
596
|
+
}
|
|
597
|
+
interface CreateEntityAction extends BaseProposalAction {
|
|
598
|
+
type: 'CreateEntity';
|
|
599
|
+
data: any;
|
|
600
|
+
}
|
|
601
|
+
type ProposalAction = SpendAction | UpdateMembersAction | StakeAction | JoinAction | AuthzExecAction | AuthzGrantAction | AuthzRevokeAction | BurnNftAction | MintAction | ExecuteAction | InstantiateAction | ManageSubDaosAction | ManageCw721Action | ManageCw20Action | MigrateAction | TransferNftAction | UpdateAdminAction | UpdatePreProposeConfigAction | UpdateVotingConfigAction | GovernanceVoteAction | WithdrawTokenSwapAction | UpdateInfoAction | CustomAction | ManageStorageItemsAction | ValidatorActionsAction | PerformTokenSwapAction | DaoAdminExecAction | StakeToGroupAction | SendGroupTokenAction | AcceptToMarketplaceAction | CreateEntityAction;
|
|
602
|
+
interface SharedProposalData {
|
|
603
|
+
[proposalId: string]: {
|
|
604
|
+
proposal: any;
|
|
605
|
+
lastFetched: number;
|
|
606
|
+
loading: boolean;
|
|
607
|
+
error?: Error;
|
|
608
|
+
};
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
type Addr = string;
|
|
612
|
+
type Uint128 = string;
|
|
613
|
+
type Timestamp = string;
|
|
614
|
+
interface Coin {
|
|
615
|
+
denom: string;
|
|
616
|
+
amount: string;
|
|
617
|
+
}
|
|
618
|
+
type Expiration = {
|
|
619
|
+
at_height: number;
|
|
620
|
+
} | {
|
|
621
|
+
at_time: Timestamp;
|
|
622
|
+
} | {
|
|
623
|
+
never: {};
|
|
624
|
+
};
|
|
625
|
+
type Status = 'open' | 'rejected' | 'passed' | 'executed' | 'closed' | 'execution_failed' | 'veto_timelock';
|
|
626
|
+
interface Threshold {
|
|
627
|
+
absolute_count?: {
|
|
628
|
+
weight: Uint128;
|
|
629
|
+
};
|
|
630
|
+
absolute_percentage?: {
|
|
631
|
+
percentage: string;
|
|
632
|
+
};
|
|
633
|
+
threshold_quorum?: {
|
|
634
|
+
threshold: string;
|
|
635
|
+
quorum: string;
|
|
636
|
+
};
|
|
637
|
+
}
|
|
638
|
+
interface Votes {
|
|
639
|
+
yes: Uint128;
|
|
640
|
+
no: Uint128;
|
|
641
|
+
abstain: Uint128;
|
|
642
|
+
}
|
|
643
|
+
interface CosmosMsgForEmpty {
|
|
644
|
+
[key: string]: any;
|
|
645
|
+
}
|
|
646
|
+
interface SingleChoiceProposal {
|
|
647
|
+
allow_revoting: boolean;
|
|
648
|
+
description: string;
|
|
649
|
+
expiration: Expiration;
|
|
650
|
+
min_voting_period?: Expiration | null;
|
|
651
|
+
msgs: CosmosMsgForEmpty[];
|
|
652
|
+
proposer: Addr;
|
|
653
|
+
start_height: number;
|
|
654
|
+
status: Status;
|
|
655
|
+
threshold: Threshold;
|
|
656
|
+
title: string;
|
|
657
|
+
total_power: Uint128;
|
|
658
|
+
votes: Votes;
|
|
659
|
+
}
|
|
660
|
+
interface ProposalResponse {
|
|
661
|
+
id: number;
|
|
662
|
+
proposal: SingleChoiceProposal;
|
|
663
|
+
}
|
|
664
|
+
type Vote = 'yes' | 'no' | 'abstain' | 'no_with_veto';
|
|
665
|
+
interface VoteInfo {
|
|
666
|
+
power: Uint128;
|
|
667
|
+
rationale?: string | null;
|
|
668
|
+
vote: Vote;
|
|
669
|
+
voter: Addr;
|
|
670
|
+
}
|
|
671
|
+
interface VoteResponse {
|
|
672
|
+
vote?: VoteInfo | null;
|
|
673
|
+
}
|
|
674
|
+
interface User {
|
|
675
|
+
address: string;
|
|
676
|
+
}
|
|
677
|
+
type IUserMatrixProfile = {
|
|
678
|
+
walletAddress: string;
|
|
679
|
+
displayname: string;
|
|
680
|
+
avatarUrl: string | null;
|
|
681
|
+
did: string;
|
|
682
|
+
verified?: boolean;
|
|
683
|
+
};
|
|
684
|
+
interface LinkedResource {
|
|
685
|
+
id: string;
|
|
686
|
+
type: string;
|
|
687
|
+
proof: string;
|
|
688
|
+
right: string;
|
|
689
|
+
encrypted: string;
|
|
690
|
+
mediaType: string;
|
|
691
|
+
description: string;
|
|
692
|
+
serviceEndpoint: string;
|
|
693
|
+
}
|
|
694
|
+
interface Service {
|
|
695
|
+
id: string;
|
|
696
|
+
type: string;
|
|
697
|
+
serviceEndpoint: string;
|
|
698
|
+
}
|
|
699
|
+
interface GQLLinkedResource {
|
|
700
|
+
id: string;
|
|
701
|
+
type: string;
|
|
702
|
+
description: string;
|
|
703
|
+
mediaType: string;
|
|
704
|
+
serviceEndpoint: string;
|
|
705
|
+
proof: string;
|
|
706
|
+
encrypted: string;
|
|
707
|
+
right: string;
|
|
708
|
+
}
|
|
709
|
+
interface EntityNode {
|
|
710
|
+
id: string;
|
|
711
|
+
type: string;
|
|
712
|
+
startDate?: string;
|
|
713
|
+
endDate?: string;
|
|
714
|
+
status: number;
|
|
715
|
+
relayerNode: string;
|
|
716
|
+
credentials?: string[];
|
|
717
|
+
entityVerified: boolean;
|
|
718
|
+
metadata: any;
|
|
719
|
+
accounts: any;
|
|
720
|
+
externalId?: string;
|
|
721
|
+
owner?: string;
|
|
722
|
+
context: any;
|
|
723
|
+
controller: string[];
|
|
724
|
+
verificationMethod: any;
|
|
725
|
+
service: Service[];
|
|
726
|
+
authentication: string[];
|
|
727
|
+
assertionMethod: string[];
|
|
728
|
+
keyAgreement: string[];
|
|
729
|
+
capabilityInvocation: string[];
|
|
730
|
+
capabilityDelegation: string[];
|
|
731
|
+
linkedResource: LinkedResource[];
|
|
732
|
+
linkedClaim: any;
|
|
733
|
+
accordedRight: any;
|
|
734
|
+
linkedEntity: any;
|
|
735
|
+
alsoKnownAs: string;
|
|
736
|
+
settings: any;
|
|
737
|
+
profile?: {
|
|
738
|
+
name?: string;
|
|
739
|
+
[key: string]: any;
|
|
740
|
+
};
|
|
741
|
+
iidById: {
|
|
742
|
+
id: string;
|
|
743
|
+
linkedResource: GQLLinkedResource[];
|
|
744
|
+
};
|
|
745
|
+
}
|
|
746
|
+
interface EntityResponse$1 {
|
|
747
|
+
id: string;
|
|
748
|
+
context: string;
|
|
749
|
+
relayerNode: string;
|
|
750
|
+
controller: string;
|
|
751
|
+
type: string;
|
|
752
|
+
startDate: string;
|
|
753
|
+
endDate: string;
|
|
754
|
+
metadata: string;
|
|
755
|
+
linkedResource: LinkedResource[];
|
|
756
|
+
settings: Record<string, LinkedResource>;
|
|
757
|
+
service: string;
|
|
758
|
+
externalId: string;
|
|
759
|
+
}
|
|
760
|
+
interface Asset {
|
|
761
|
+
did: string;
|
|
762
|
+
alsoKnownAs: string;
|
|
763
|
+
name: string;
|
|
764
|
+
icon: string;
|
|
765
|
+
issuer: string;
|
|
766
|
+
owned: boolean;
|
|
767
|
+
price: number;
|
|
768
|
+
available: boolean;
|
|
769
|
+
currency: string;
|
|
770
|
+
description?: string;
|
|
771
|
+
}
|
|
772
|
+
interface POD {
|
|
773
|
+
did: string;
|
|
774
|
+
name: string;
|
|
775
|
+
icon: string;
|
|
776
|
+
members: number;
|
|
777
|
+
isMember: boolean;
|
|
778
|
+
totalProposals: number;
|
|
779
|
+
startDate: string;
|
|
780
|
+
endDate: string;
|
|
781
|
+
description?: string;
|
|
782
|
+
}
|
|
783
|
+
interface Request {
|
|
784
|
+
did: string;
|
|
785
|
+
name: string;
|
|
786
|
+
icon: string;
|
|
787
|
+
budget: number;
|
|
788
|
+
isMember: boolean;
|
|
789
|
+
currency: string;
|
|
790
|
+
brand: string;
|
|
791
|
+
totalApplications: number;
|
|
792
|
+
description?: string;
|
|
793
|
+
}
|
|
794
|
+
interface Project {
|
|
795
|
+
did: string;
|
|
796
|
+
name: string;
|
|
797
|
+
icon: string;
|
|
798
|
+
description?: string;
|
|
799
|
+
}
|
|
800
|
+
interface Dao {
|
|
801
|
+
did: string;
|
|
802
|
+
name: string;
|
|
803
|
+
icon: string;
|
|
804
|
+
description?: string;
|
|
805
|
+
}
|
|
806
|
+
interface Balance {
|
|
807
|
+
denom: string;
|
|
808
|
+
tokenName: string;
|
|
809
|
+
chainCount: number;
|
|
810
|
+
tokenImage: string;
|
|
811
|
+
amount: number;
|
|
812
|
+
usdAmount: number;
|
|
813
|
+
isCoin: boolean;
|
|
814
|
+
isShare: boolean;
|
|
815
|
+
isCredit: boolean;
|
|
816
|
+
}
|
|
817
|
+
interface Oracle {
|
|
818
|
+
did: string;
|
|
819
|
+
name: string;
|
|
820
|
+
icon: string;
|
|
821
|
+
isActive: boolean;
|
|
822
|
+
isInvited: boolean;
|
|
823
|
+
minPoints: number;
|
|
824
|
+
maxPoints: number;
|
|
825
|
+
currency: string;
|
|
826
|
+
brand: string;
|
|
827
|
+
flowsAmount: number;
|
|
828
|
+
description?: string;
|
|
829
|
+
}
|
|
830
|
+
interface Proposal {
|
|
831
|
+
did: string;
|
|
832
|
+
name: string;
|
|
833
|
+
icon: string;
|
|
834
|
+
description: string;
|
|
835
|
+
isVotedOn: boolean;
|
|
836
|
+
vote: string | null;
|
|
837
|
+
status: string;
|
|
838
|
+
}
|
|
839
|
+
interface Member {
|
|
840
|
+
did: string;
|
|
841
|
+
username: string;
|
|
842
|
+
address: string;
|
|
843
|
+
icon: string;
|
|
844
|
+
percentage: string;
|
|
845
|
+
role: string;
|
|
846
|
+
description?: string;
|
|
847
|
+
}
|
|
848
|
+
interface Validator {
|
|
849
|
+
did: string;
|
|
850
|
+
name: string;
|
|
851
|
+
description: string;
|
|
852
|
+
icon: string;
|
|
853
|
+
amount: number;
|
|
854
|
+
currency: string;
|
|
855
|
+
commission: number;
|
|
856
|
+
isStaked: boolean;
|
|
857
|
+
isBonding: boolean;
|
|
858
|
+
isActive: boolean;
|
|
859
|
+
}
|
|
860
|
+
interface Investment {
|
|
861
|
+
did: string;
|
|
862
|
+
name: string;
|
|
863
|
+
icon: string;
|
|
864
|
+
brand: string;
|
|
865
|
+
isSubscribed: boolean;
|
|
866
|
+
isOpen: boolean;
|
|
867
|
+
currency: string;
|
|
868
|
+
currentAmount: number;
|
|
869
|
+
maxAmount: number;
|
|
870
|
+
status: string;
|
|
871
|
+
price: number;
|
|
872
|
+
description?: string;
|
|
873
|
+
}
|
|
874
|
+
interface Collection {
|
|
875
|
+
did: string;
|
|
876
|
+
name: string;
|
|
877
|
+
brand: string;
|
|
878
|
+
icon: string;
|
|
879
|
+
price: number;
|
|
880
|
+
currency: string;
|
|
881
|
+
totalAssets: number;
|
|
882
|
+
description?: string;
|
|
883
|
+
}
|
|
884
|
+
interface Transaction {
|
|
885
|
+
transactionHash: string;
|
|
886
|
+
typeUrl: string;
|
|
887
|
+
memo: string;
|
|
888
|
+
time: string;
|
|
889
|
+
description?: string;
|
|
890
|
+
}
|
|
891
|
+
interface Bid {
|
|
892
|
+
id: string;
|
|
893
|
+
did: string;
|
|
894
|
+
collection: string;
|
|
895
|
+
type: 'bid';
|
|
896
|
+
address: string;
|
|
897
|
+
data: string;
|
|
898
|
+
role: string;
|
|
899
|
+
created: string;
|
|
900
|
+
}
|
|
901
|
+
interface SubmitBidParams {
|
|
902
|
+
collectionId: string;
|
|
903
|
+
role: EAAgentRoles;
|
|
904
|
+
surveyAnswers: any;
|
|
905
|
+
}
|
|
906
|
+
interface QueryBidsParams {
|
|
907
|
+
collectionId: string;
|
|
908
|
+
pagination?: {
|
|
909
|
+
nextPageToken?: string;
|
|
910
|
+
};
|
|
911
|
+
}
|
|
912
|
+
interface QueryBidsByDidParams {
|
|
913
|
+
collectionId: string;
|
|
914
|
+
did: string;
|
|
915
|
+
}
|
|
916
|
+
interface ApproveBidParams {
|
|
917
|
+
bidId: string;
|
|
918
|
+
collectionId: string;
|
|
919
|
+
did: string;
|
|
920
|
+
}
|
|
921
|
+
interface RejectBidParams {
|
|
922
|
+
bidId: string;
|
|
923
|
+
collectionId: string;
|
|
924
|
+
did: string;
|
|
925
|
+
reason: string;
|
|
926
|
+
}
|
|
927
|
+
interface BidResponse {
|
|
928
|
+
success: boolean;
|
|
929
|
+
bidId: string;
|
|
930
|
+
}
|
|
931
|
+
interface QueryBidsResponse {
|
|
932
|
+
data: Bid[];
|
|
933
|
+
nextPageToken?: string;
|
|
934
|
+
}
|
|
935
|
+
declare enum EAAgentRoles {
|
|
936
|
+
owners = "PO",
|
|
937
|
+
evaluators = "EA",
|
|
938
|
+
serviceProviders = "SA",
|
|
939
|
+
investors = "IA"
|
|
940
|
+
}
|
|
941
|
+
declare enum AgentRole {
|
|
942
|
+
Owner = "PO",// Collection Controller
|
|
943
|
+
Evaluator = "EA",// Evaluator
|
|
944
|
+
ServiceProvider = "SA",// Contributor/Service Agent
|
|
945
|
+
Investor = "IA"
|
|
946
|
+
}
|
|
947
|
+
type CheckUserRoleParams = {
|
|
948
|
+
/** Address to check role for */
|
|
949
|
+
userAddress: string;
|
|
950
|
+
/** Admin account address of the entity */
|
|
951
|
+
adminAddress: string;
|
|
952
|
+
/** Deed DID */
|
|
953
|
+
deedDid: string;
|
|
954
|
+
/** Claim collection IDs to check roles for */
|
|
955
|
+
collectionIds: string[];
|
|
956
|
+
};
|
|
957
|
+
type ClaimCollectionRole = {
|
|
958
|
+
collectionId: string;
|
|
959
|
+
role: AgentRole;
|
|
960
|
+
};
|
|
961
|
+
type ClaimCollection = {
|
|
962
|
+
id: string;
|
|
963
|
+
name: string;
|
|
964
|
+
description: string;
|
|
965
|
+
entity: string;
|
|
966
|
+
protocol: EntityNode | null;
|
|
967
|
+
admin: string;
|
|
968
|
+
};
|
|
969
|
+
type ClaimCollectionResponse = {
|
|
970
|
+
adminAddress: string;
|
|
971
|
+
collections: ClaimCollection[];
|
|
972
|
+
};
|
|
973
|
+
type Claim = {
|
|
974
|
+
claimId: string;
|
|
975
|
+
collectionId: string;
|
|
976
|
+
agentDid: string;
|
|
977
|
+
agentAddress: string;
|
|
978
|
+
submissionDate: string;
|
|
979
|
+
paymentsStatus: {
|
|
980
|
+
approval: string;
|
|
981
|
+
rejection: string;
|
|
982
|
+
evaluation: string;
|
|
983
|
+
submission: string;
|
|
984
|
+
};
|
|
985
|
+
schemaType: string | null;
|
|
986
|
+
};
|
|
987
|
+
interface GetClaimsPerCollectionIdParams {
|
|
988
|
+
collectionId: string;
|
|
989
|
+
}
|
|
990
|
+
interface GetClaimsPerUserAddressParams {
|
|
991
|
+
collectionId: string;
|
|
992
|
+
userAddress: string;
|
|
993
|
+
}
|
|
994
|
+
interface FAQItem {
|
|
995
|
+
question: string;
|
|
996
|
+
answer: string;
|
|
997
|
+
}
|
|
998
|
+
interface ContactInfo {
|
|
999
|
+
email: string;
|
|
1000
|
+
location: string;
|
|
1001
|
+
socialLinks: string[];
|
|
1002
|
+
website: string;
|
|
1003
|
+
}
|
|
1004
|
+
interface Relationships {
|
|
1005
|
+
funders?: string[];
|
|
1006
|
+
memberOf?: string[];
|
|
1007
|
+
partners?: string[];
|
|
1008
|
+
}
|
|
1009
|
+
interface LogoUrl {
|
|
1010
|
+
alt: string;
|
|
1011
|
+
url: string;
|
|
1012
|
+
}
|
|
1013
|
+
interface AdditionalProperties {
|
|
1014
|
+
content_hashes?: Record<string, string>;
|
|
1015
|
+
content_summaries?: Record<string, string>;
|
|
1016
|
+
fetch_errors?: Array<{
|
|
1017
|
+
error: string;
|
|
1018
|
+
url: string;
|
|
1019
|
+
}>;
|
|
1020
|
+
last_fetch_date?: string;
|
|
1021
|
+
}
|
|
1022
|
+
interface Coordinates {
|
|
1023
|
+
type: string;
|
|
1024
|
+
coordinates: [number, number];
|
|
1025
|
+
}
|
|
1026
|
+
interface DomainCard {
|
|
1027
|
+
additional_properties?: AdditionalProperties;
|
|
1028
|
+
address?: string;
|
|
1029
|
+
alternate_names?: string[];
|
|
1030
|
+
area_served?: string;
|
|
1031
|
+
categories?: string[];
|
|
1032
|
+
contact?: ContactInfo;
|
|
1033
|
+
coordinates?: Coordinates;
|
|
1034
|
+
credential_type?: string[];
|
|
1035
|
+
description?: string;
|
|
1036
|
+
entity_type?: string[];
|
|
1037
|
+
faq?: FAQItem[];
|
|
1038
|
+
id: string;
|
|
1039
|
+
image_urls?: Array<Record<string, any>>;
|
|
1040
|
+
indexed_at?: string;
|
|
1041
|
+
issuer?: string;
|
|
1042
|
+
keywords?: string[];
|
|
1043
|
+
knows_about?: string[];
|
|
1044
|
+
location?: string;
|
|
1045
|
+
logo_url?: LogoUrl;
|
|
1046
|
+
name: string;
|
|
1047
|
+
overview?: string;
|
|
1048
|
+
relationships?: Relationships;
|
|
1049
|
+
same_as?: string[];
|
|
1050
|
+
schema_id?: string;
|
|
1051
|
+
summary?: string;
|
|
1052
|
+
updated_at?: string;
|
|
1053
|
+
url?: string;
|
|
1054
|
+
valid_from?: string;
|
|
1055
|
+
}
|
|
1056
|
+
interface AssetDetails extends Asset {
|
|
1057
|
+
actionSections: SelectionActionSection[];
|
|
1058
|
+
}
|
|
1059
|
+
interface CollectionDetails extends Collection {
|
|
1060
|
+
actionSections: SelectionActionSection[];
|
|
1061
|
+
}
|
|
1062
|
+
interface TransactionDetails extends Transaction {
|
|
1063
|
+
actionSections: SelectionActionSection[];
|
|
1064
|
+
}
|
|
1065
|
+
interface InvestmentDetails extends Investment {
|
|
1066
|
+
actionSections: SelectionActionSection[];
|
|
1067
|
+
}
|
|
1068
|
+
interface OracleDetails extends Oracle {
|
|
1069
|
+
actionSections: SelectionActionSection[];
|
|
1070
|
+
}
|
|
1071
|
+
interface PODDetails extends POD {
|
|
1072
|
+
actionSections: SelectionActionSection[];
|
|
1073
|
+
}
|
|
1074
|
+
interface ProposalDetails extends Proposal {
|
|
1075
|
+
actionSections: SelectionActionSection[];
|
|
1076
|
+
}
|
|
1077
|
+
interface RequestDetails extends Request {
|
|
1078
|
+
actionSections: SelectionActionSection[];
|
|
1079
|
+
}
|
|
1080
|
+
interface MemberDetails extends Member {
|
|
1081
|
+
actionSections: SelectionActionSection[];
|
|
1082
|
+
}
|
|
1083
|
+
interface ValidatorDetails extends Validator {
|
|
1084
|
+
actionSections: SelectionActionSection[];
|
|
1085
|
+
}
|
|
1086
|
+
interface LinkedResourceDetails extends LinkedResource {
|
|
1087
|
+
actionSections: SelectionActionSection[];
|
|
1088
|
+
}
|
|
1089
|
+
interface DAOGroup {
|
|
1090
|
+
id: string;
|
|
1091
|
+
name: string;
|
|
1092
|
+
coreAddress: string;
|
|
1093
|
+
}
|
|
1094
|
+
interface BlockRequirements {
|
|
1095
|
+
proposal?: {
|
|
1096
|
+
coreAddress: string;
|
|
1097
|
+
};
|
|
1098
|
+
}
|
|
1099
|
+
interface VoteParams {
|
|
1100
|
+
proposalId: number;
|
|
1101
|
+
rationale?: string;
|
|
1102
|
+
vote: Vote;
|
|
1103
|
+
proposalContractAddress: string;
|
|
1104
|
+
}
|
|
1105
|
+
interface CreateProposalParams {
|
|
1106
|
+
preProposalContractAddress: string;
|
|
1107
|
+
title: string;
|
|
1108
|
+
description: string;
|
|
1109
|
+
actions?: ProposalAction[];
|
|
1110
|
+
coreAddress?: string;
|
|
1111
|
+
groupContractAddress?: string;
|
|
1112
|
+
}
|
|
1113
|
+
interface EmailNotificationParams {
|
|
1114
|
+
channel: 'email';
|
|
1115
|
+
to: string[];
|
|
1116
|
+
cc?: string[];
|
|
1117
|
+
bcc?: string[];
|
|
1118
|
+
subject: string;
|
|
1119
|
+
body: string;
|
|
1120
|
+
bodyType?: 'text' | 'html';
|
|
1121
|
+
from?: string;
|
|
1122
|
+
replyTo?: string;
|
|
1123
|
+
}
|
|
1124
|
+
interface SmsNotificationParams {
|
|
1125
|
+
channel: 'sms';
|
|
1126
|
+
to: string[];
|
|
1127
|
+
body: string;
|
|
1128
|
+
}
|
|
1129
|
+
interface WhatsAppNotificationParams {
|
|
1130
|
+
channel: 'whatsapp';
|
|
1131
|
+
to: string[];
|
|
1132
|
+
body: string;
|
|
1133
|
+
templateId?: string;
|
|
1134
|
+
templateVariables?: Record<string, string>;
|
|
1135
|
+
}
|
|
1136
|
+
type NotificationParams = EmailNotificationParams | SmsNotificationParams | WhatsAppNotificationParams;
|
|
1137
|
+
interface NotificationResponse {
|
|
1138
|
+
messageId: string;
|
|
1139
|
+
status: 'accepted' | 'rejected';
|
|
1140
|
+
timestamp: string;
|
|
1141
|
+
}
|
|
1142
|
+
interface BlocknoteHandlers {
|
|
1143
|
+
getVote: (proposalContractAddress: string, proposalId: string, userAddress: string) => Promise<VoteResponse>;
|
|
1144
|
+
getProposal: (proposalContractAddress: string, proposalId: string) => Promise<ProposalResponse>;
|
|
1145
|
+
getCurrentUser: () => User;
|
|
1146
|
+
getMatrixInfoPerDid: (did: string) => Promise<IUserMatrixProfile>;
|
|
1147
|
+
getDaoGroupsIds: () => Promise<string[] | undefined>;
|
|
1148
|
+
getDAOGroups: () => Promise<DAOGroup[]>;
|
|
1149
|
+
getRelayerDid: () => string | undefined;
|
|
1150
|
+
getEntityDid: () => string | undefined;
|
|
1151
|
+
vote: ({ proposalId, rationale, vote, proposalContractAddress }: VoteParams) => Promise<void>;
|
|
1152
|
+
createProposal: (params: CreateProposalParams) => Promise<string>;
|
|
1153
|
+
getEntity: (did: string) => Promise<EntityResponse$1>;
|
|
1154
|
+
getDomainCard: () => Promise<DomainCard>;
|
|
1155
|
+
askCompanion: (prompt: string) => Promise<void>;
|
|
1156
|
+
getAssets: (collectionDid: string, page: number, ownerAddress?: string) => Promise<{
|
|
1157
|
+
data: Asset[];
|
|
1158
|
+
totalCount: number;
|
|
1159
|
+
}>;
|
|
1160
|
+
getCollections: (relayerDid: string, page: number) => Promise<{
|
|
1161
|
+
data: Collection[];
|
|
1162
|
+
totalCount: number;
|
|
1163
|
+
}>;
|
|
1164
|
+
getTransactions: (address: string, page: number) => Promise<{
|
|
1165
|
+
data: Transaction[];
|
|
1166
|
+
totalCount: number;
|
|
1167
|
+
}>;
|
|
1168
|
+
getInvestments: (relayerDid: string, page: number) => Promise<{
|
|
1169
|
+
data: Investment[];
|
|
1170
|
+
totalCount: number;
|
|
1171
|
+
}>;
|
|
1172
|
+
getOracles: (relayerDid: string, page: number) => Promise<{
|
|
1173
|
+
data: Oracle[];
|
|
1174
|
+
totalCount: number;
|
|
1175
|
+
}>;
|
|
1176
|
+
getPODs: (relayerDid: string, page: number) => Promise<{
|
|
1177
|
+
data: POD[];
|
|
1178
|
+
totalCount: number;
|
|
1179
|
+
}>;
|
|
1180
|
+
getProposals: (relayerDid: string, page: number) => Promise<{
|
|
1181
|
+
data: Proposal[];
|
|
1182
|
+
totalCount: number;
|
|
1183
|
+
}>;
|
|
1184
|
+
getRequests: (relayerDid: string, page: number) => Promise<{
|
|
1185
|
+
data: Request[];
|
|
1186
|
+
totalCount: number;
|
|
1187
|
+
}>;
|
|
1188
|
+
getDaos: (relayerDid: string, page: number) => Promise<{
|
|
1189
|
+
data: Dao[];
|
|
1190
|
+
totalCount: number;
|
|
1191
|
+
}>;
|
|
1192
|
+
getProjects: (relayerDid: string, page: number) => Promise<{
|
|
1193
|
+
data: Project[];
|
|
1194
|
+
totalCount: number;
|
|
1195
|
+
}>;
|
|
1196
|
+
getMembers: (address: string, groupCoreAddress: string, withBalance: boolean, page: number) => Promise<{
|
|
1197
|
+
data: Member[];
|
|
1198
|
+
totalCount: number;
|
|
1199
|
+
}>;
|
|
1200
|
+
getDaoMembers: (address: string, groupIds: string[], withBalance: boolean, page: number) => Promise<{
|
|
1201
|
+
data: Member[];
|
|
1202
|
+
totalCount: number;
|
|
1203
|
+
}>;
|
|
1204
|
+
getValidators: (relayerDid: string, page: number) => Promise<{
|
|
1205
|
+
data: Validator[];
|
|
1206
|
+
totalCount: number;
|
|
1207
|
+
}>;
|
|
1208
|
+
executeProposal: (params: {
|
|
1209
|
+
proposalId: number;
|
|
1210
|
+
proposalContractAddress: string;
|
|
1211
|
+
}) => Promise<void>;
|
|
1212
|
+
getProposalContractAddress: (params: {
|
|
1213
|
+
coreAddress: string;
|
|
1214
|
+
}) => Promise<{
|
|
1215
|
+
proposalContractAddress: string;
|
|
1216
|
+
}>;
|
|
1217
|
+
getPreProposalContractAddress: (params: {
|
|
1218
|
+
coreAddress: string;
|
|
1219
|
+
}) => Promise<{
|
|
1220
|
+
preProposalContractAddress: string;
|
|
1221
|
+
}>;
|
|
1222
|
+
getGroupContractAddress: (params: {
|
|
1223
|
+
coreAddress: string;
|
|
1224
|
+
}) => Promise<{
|
|
1225
|
+
groupContractAddress: string;
|
|
1226
|
+
}>;
|
|
1227
|
+
getBalances: (address: string) => Promise<{
|
|
1228
|
+
data: Balance[];
|
|
1229
|
+
}>;
|
|
1230
|
+
sendNotification: (params: NotificationParams) => Promise<NotificationResponse>;
|
|
1231
|
+
getAssetDetails?: (id: string) => Promise<AssetDetails>;
|
|
1232
|
+
getCollectionDetails?: (id: string) => Promise<CollectionDetails>;
|
|
1233
|
+
getTransactionDetails?: (id: string) => Promise<TransactionDetails>;
|
|
1234
|
+
getInvestmentDetails?: (id: string) => Promise<InvestmentDetails>;
|
|
1235
|
+
getOracleDetails?: (id: string) => Promise<OracleDetails>;
|
|
1236
|
+
getPODDetails?: (id: string) => Promise<PODDetails>;
|
|
1237
|
+
getProposalDetails?: (id: string) => Promise<ProposalDetails>;
|
|
1238
|
+
getRequestDetails?: (id: string) => Promise<RequestDetails>;
|
|
1239
|
+
getMemberDetails?: (id: string) => Promise<MemberDetails>;
|
|
1240
|
+
getValidatorDetails?: (id: string) => Promise<ValidatorDetails>;
|
|
1241
|
+
getLinkedResourceDetails?: (id: string) => Promise<LinkedResourceDetails>;
|
|
1242
|
+
getDaoMemberDetails?: (id: string) => Promise<MemberDetails>;
|
|
1243
|
+
getDeedSurveyTemplate: (deedDid: string) => Promise<{
|
|
1244
|
+
surveyTemplate: any;
|
|
1245
|
+
claimCollectionId: string;
|
|
1246
|
+
} | null>;
|
|
1247
|
+
submitClaim: (params: {
|
|
1248
|
+
surveyData: any;
|
|
1249
|
+
deedDid: string;
|
|
1250
|
+
collectionId: string;
|
|
1251
|
+
adminAddress: string;
|
|
1252
|
+
pin: string;
|
|
1253
|
+
}) => Promise<{
|
|
1254
|
+
transactionHash: string;
|
|
1255
|
+
claimId: string;
|
|
1256
|
+
}>;
|
|
1257
|
+
requestPin: (config?: {
|
|
1258
|
+
title?: string;
|
|
1259
|
+
description?: string;
|
|
1260
|
+
submitText?: string;
|
|
1261
|
+
}) => Promise<string>;
|
|
1262
|
+
getClaimCollections: (params: {
|
|
1263
|
+
deedDid: string;
|
|
1264
|
+
}) => Promise<ClaimCollectionResponse>;
|
|
1265
|
+
getClaimsPerCollectionId: (params: GetClaimsPerCollectionIdParams) => Promise<Claim[]>;
|
|
1266
|
+
getClaimsPerUserAddress: (params: GetClaimsPerUserAddressParams) => Promise<Claim[]>;
|
|
1267
|
+
getClaimData: (collectionId: string, claimId: string) => Promise<any>;
|
|
1268
|
+
evaluateClaim: (granteeAddress: string, did: string, payload: {
|
|
1269
|
+
claimId: string;
|
|
1270
|
+
collectionId: string;
|
|
1271
|
+
adminAddress: string;
|
|
1272
|
+
status?: number;
|
|
1273
|
+
verificationProof: string;
|
|
1274
|
+
amount?: Coin;
|
|
1275
|
+
}) => Promise<void>;
|
|
1276
|
+
submitBid: (params: SubmitBidParams) => Promise<BidResponse>;
|
|
1277
|
+
queryBids: (params: QueryBidsParams) => Promise<QueryBidsResponse>;
|
|
1278
|
+
queryBidsByDid: (params: QueryBidsByDidParams) => Promise<{
|
|
1279
|
+
data: Bid[];
|
|
1280
|
+
}>;
|
|
1281
|
+
approveBid: (params: ApproveBidParams) => Promise<BidResponse>;
|
|
1282
|
+
rejectBid: (params: RejectBidParams) => Promise<BidResponse>;
|
|
1283
|
+
getUserRoles: (params: CheckUserRoleParams) => Promise<ClaimCollectionRole[]>;
|
|
1284
|
+
getBidContributorSurveyTemplate: (deedId: string) => Promise<{
|
|
1285
|
+
surveyTemplate: any;
|
|
1286
|
+
} | null>;
|
|
1287
|
+
getBidEvaluatorSurveyTemplate: (deedId: string) => Promise<{
|
|
1288
|
+
surveyTemplate: any;
|
|
1289
|
+
} | null>;
|
|
1290
|
+
approveServiceAgentApplication: (params: {
|
|
1291
|
+
adminAddress: string;
|
|
1292
|
+
collectionId: string;
|
|
1293
|
+
agentQuota: number;
|
|
1294
|
+
deedDid: string;
|
|
1295
|
+
currentUserAddress: string;
|
|
1296
|
+
}) => Promise<void>;
|
|
1297
|
+
approveEvaluatorApplication: (params: {
|
|
1298
|
+
adminAddress: string;
|
|
1299
|
+
collectionId: string;
|
|
1300
|
+
deedDid: string;
|
|
1301
|
+
evaluatorAddress: string;
|
|
1302
|
+
agentQuota?: number;
|
|
1303
|
+
claimIds?: string[];
|
|
1304
|
+
maxAmounts?: Coin[];
|
|
1305
|
+
}) => Promise<void>;
|
|
1306
|
+
publicFileUpload: (file: File) => Promise<{
|
|
1307
|
+
encrypted: string;
|
|
1308
|
+
cid: string;
|
|
1309
|
+
proof: string;
|
|
1310
|
+
serviceEndpoint: string;
|
|
1311
|
+
url: string;
|
|
1312
|
+
mxc: string;
|
|
1313
|
+
}>;
|
|
1314
|
+
/**
|
|
1315
|
+
* Check if entity has signing key set up
|
|
1316
|
+
*/
|
|
1317
|
+
checkEntitySigningSetup?: (entityDid: string) => Promise<{
|
|
1318
|
+
hasSigningKey: boolean;
|
|
1319
|
+
keyId?: string;
|
|
1320
|
+
}>;
|
|
1321
|
+
/**
|
|
1322
|
+
* Set up entity signing (generates mnemonic, adds verification method)
|
|
1323
|
+
* Requires wallet signature
|
|
1324
|
+
*/
|
|
1325
|
+
setupEntitySigning?: (params: {
|
|
1326
|
+
entityDid: string;
|
|
1327
|
+
entityRoomId: string;
|
|
1328
|
+
pin: string;
|
|
1329
|
+
}) => Promise<{
|
|
1330
|
+
transactionHash: string;
|
|
1331
|
+
keyId: string;
|
|
1332
|
+
}>;
|
|
1333
|
+
/**
|
|
1334
|
+
* Check if current user has signing key set up
|
|
1335
|
+
*/
|
|
1336
|
+
checkUserSigningSetup?: () => Promise<{
|
|
1337
|
+
hasSigningKey: boolean;
|
|
1338
|
+
keyId?: string;
|
|
1339
|
+
}>;
|
|
1340
|
+
/**
|
|
1341
|
+
* Sign a capability delegation
|
|
1342
|
+
*/
|
|
1343
|
+
signCapability?: (params: {
|
|
1344
|
+
/** DID of issuer (entity or user) */
|
|
1345
|
+
issuerDid: string;
|
|
1346
|
+
/** Whether signing as entity or user */
|
|
1347
|
+
issuerType: 'entity' | 'user';
|
|
1348
|
+
/** Entity room ID (required if issuerType is 'entity') */
|
|
1349
|
+
entityRoomId?: string;
|
|
1350
|
+
/** DID of recipient */
|
|
1351
|
+
audience: string;
|
|
1352
|
+
/** Capabilities to grant */
|
|
1353
|
+
capabilities: Array<{
|
|
1354
|
+
can: string;
|
|
1355
|
+
with: string;
|
|
1356
|
+
nb?: Record<string, any>;
|
|
1357
|
+
}>;
|
|
1358
|
+
/** IDs of parent capabilities (proofs) */
|
|
1359
|
+
proofs?: string[];
|
|
1360
|
+
/** Expiration timestamp */
|
|
1361
|
+
expiration?: number;
|
|
1362
|
+
/** PIN to decrypt signing mnemonic */
|
|
1363
|
+
pin: string;
|
|
1364
|
+
}) => Promise<{
|
|
1365
|
+
id: string;
|
|
1366
|
+
raw: string;
|
|
1367
|
+
signature: string;
|
|
1368
|
+
}>;
|
|
1369
|
+
/**
|
|
1370
|
+
* Verify a capability signature against issuer's DID document
|
|
1371
|
+
*/
|
|
1372
|
+
verifyCapabilitySignature?: (params: {
|
|
1373
|
+
/** Raw capability JSON */
|
|
1374
|
+
capabilityRaw: string;
|
|
1375
|
+
/** Expected issuer DID */
|
|
1376
|
+
issuerDid: string;
|
|
1377
|
+
}) => Promise<{
|
|
1378
|
+
valid: boolean;
|
|
1379
|
+
error?: string;
|
|
1380
|
+
}>;
|
|
1381
|
+
/**
|
|
1382
|
+
* Search for users by name or DID
|
|
1383
|
+
*/
|
|
1384
|
+
searchUsers?: (query: string) => Promise<Array<{
|
|
1385
|
+
did: string;
|
|
1386
|
+
displayName: string;
|
|
1387
|
+
avatarUrl?: string;
|
|
1388
|
+
address?: string;
|
|
1389
|
+
}>>;
|
|
1390
|
+
/**
|
|
1391
|
+
* Get registered oracles for an entity
|
|
1392
|
+
*/
|
|
1393
|
+
getRegisteredOracles?: (entityDid: string) => Promise<Array<{
|
|
1394
|
+
did: string;
|
|
1395
|
+
name: string;
|
|
1396
|
+
description?: string;
|
|
1397
|
+
capabilities?: string[];
|
|
1398
|
+
}>>;
|
|
1399
|
+
/**
|
|
1400
|
+
* Get entity info including room ID
|
|
1401
|
+
*/
|
|
1402
|
+
getEntityInfo?: (entityDid: string) => Promise<{
|
|
1403
|
+
did: string;
|
|
1404
|
+
name: string;
|
|
1405
|
+
roomId: string;
|
|
1406
|
+
adminAddress: string;
|
|
1407
|
+
controllerDid: string;
|
|
1408
|
+
}>;
|
|
1409
|
+
/**
|
|
1410
|
+
* Sign a Verifiable Credential using entity or user key.
|
|
1411
|
+
* Creates a DataIntegrityProof using eddsa-rdfc-2022 cryptosuite.
|
|
1412
|
+
*/
|
|
1413
|
+
signCredential?: (params: {
|
|
1414
|
+
/** DID of issuer (entity or user) */
|
|
1415
|
+
issuerDid: string;
|
|
1416
|
+
/** Whether signing as entity or user */
|
|
1417
|
+
issuerType: 'entity' | 'user';
|
|
1418
|
+
/** Entity room ID (required if issuerType is 'entity') */
|
|
1419
|
+
entityRoomId?: string;
|
|
1420
|
+
/** The unsigned credential to sign */
|
|
1421
|
+
credential: {
|
|
1422
|
+
'@context': any;
|
|
1423
|
+
id: string;
|
|
1424
|
+
type: string[];
|
|
1425
|
+
issuer: {
|
|
1426
|
+
id: string;
|
|
1427
|
+
};
|
|
1428
|
+
validFrom: string;
|
|
1429
|
+
validUntil: string;
|
|
1430
|
+
credentialSchema: {
|
|
1431
|
+
id: string;
|
|
1432
|
+
type: string;
|
|
1433
|
+
};
|
|
1434
|
+
credentialSubject: any;
|
|
1435
|
+
};
|
|
1436
|
+
/** PIN to decrypt signing mnemonic */
|
|
1437
|
+
pin: string;
|
|
1438
|
+
}) => Promise<{
|
|
1439
|
+
/** The signed credential with proof attached */
|
|
1440
|
+
signedCredential: {
|
|
1441
|
+
'@context': any;
|
|
1442
|
+
id: string;
|
|
1443
|
+
type: string[];
|
|
1444
|
+
issuer: {
|
|
1445
|
+
id: string;
|
|
1446
|
+
};
|
|
1447
|
+
validFrom: string;
|
|
1448
|
+
validUntil: string;
|
|
1449
|
+
credentialSchema: {
|
|
1450
|
+
id: string;
|
|
1451
|
+
type: string;
|
|
1452
|
+
};
|
|
1453
|
+
credentialSubject: any;
|
|
1454
|
+
proof: {
|
|
1455
|
+
type: 'DataIntegrityProof';
|
|
1456
|
+
created: string;
|
|
1457
|
+
verificationMethod: string;
|
|
1458
|
+
cryptosuite: 'eddsa-rdfc-2022';
|
|
1459
|
+
proofPurpose: 'assertionMethod';
|
|
1460
|
+
proofValue: string;
|
|
1461
|
+
};
|
|
1462
|
+
};
|
|
1463
|
+
}>;
|
|
1464
|
+
/**
|
|
1465
|
+
* Create a new domain entity with the provided linked resources.
|
|
1466
|
+
* This is called after the domain card credential has been uploaded.
|
|
1467
|
+
*/
|
|
1468
|
+
createDomain?: (params: {
|
|
1469
|
+
/** Entity type from survey (e.g., 'dao', 'protocol') */
|
|
1470
|
+
entityType: string;
|
|
1471
|
+
/** Linked resources to attach to the entity (includes domain card) */
|
|
1472
|
+
linkedResource: Array<{
|
|
1473
|
+
id: string;
|
|
1474
|
+
type: string;
|
|
1475
|
+
proof: string;
|
|
1476
|
+
right: string;
|
|
1477
|
+
encrypted: string;
|
|
1478
|
+
mediaType: string;
|
|
1479
|
+
description: string;
|
|
1480
|
+
serviceEndpoint: string;
|
|
1481
|
+
}>;
|
|
1482
|
+
/** Start date for the entity (from validFrom) */
|
|
1483
|
+
startDate?: string;
|
|
1484
|
+
/** End date for the entity (from validUntil) */
|
|
1485
|
+
endDate?: string;
|
|
1486
|
+
}) => Promise<{
|
|
1487
|
+
/** The DID of the newly created entity */
|
|
1488
|
+
entityDid: string;
|
|
1489
|
+
/** Transaction hash */
|
|
1490
|
+
transactionHash: string;
|
|
1491
|
+
}>;
|
|
1492
|
+
}
|
|
1493
|
+
type DocType = 'template' | 'page' | 'flow';
|
|
1494
|
+
interface BlocknoteContextValue {
|
|
1495
|
+
editor?: IxoEditorType;
|
|
1496
|
+
handlers?: BlocknoteHandlers;
|
|
1497
|
+
blockRequirements?: BlockRequirements;
|
|
1498
|
+
editable?: boolean;
|
|
1499
|
+
docType: DocType;
|
|
1500
|
+
sharedProposals: SharedProposalData;
|
|
1501
|
+
fetchSharedProposal: (proposalId: string, contractAddress: string, force?: boolean) => Promise<ProposalResponse>;
|
|
1502
|
+
invalidateProposal: (proposalId: string) => void;
|
|
1503
|
+
subscribeToProposal: (proposalId: string) => ProposalResponse | undefined;
|
|
1504
|
+
activeDrawerId: string | null;
|
|
1505
|
+
drawerContent: React.ReactNode | null;
|
|
1506
|
+
openDrawer: (id: string, content: React.ReactNode) => void;
|
|
1507
|
+
closeDrawer: () => void;
|
|
1508
|
+
}
|
|
1509
|
+
declare const BlocknoteProvider: React.FC<{
|
|
1510
|
+
children: React.ReactNode;
|
|
1511
|
+
editor?: IxoEditorType;
|
|
1512
|
+
handlers?: BlocknoteHandlers;
|
|
1513
|
+
blockRequirements?: BlockRequirements;
|
|
1514
|
+
editable?: boolean;
|
|
1515
|
+
}>;
|
|
1516
|
+
declare const useBlocknoteContext: () => BlocknoteContextValue;
|
|
1517
|
+
declare const useBlocknoteHandlers: () => BlocknoteHandlers;
|
|
1518
|
+
|
|
1519
|
+
interface SelectionActionItem {
|
|
1520
|
+
id: string;
|
|
1521
|
+
label: string;
|
|
1522
|
+
icon?: string;
|
|
1523
|
+
onClick: (itemId: string, itemData: any) => void | Promise<void>;
|
|
1524
|
+
}
|
|
1525
|
+
interface SelectionActionSection {
|
|
1526
|
+
title: string;
|
|
1527
|
+
description?: string;
|
|
1528
|
+
actions: SelectionActionItem[];
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
interface OverviewBlockProps {
|
|
1532
|
+
block: any;
|
|
1533
|
+
editor: any;
|
|
1534
|
+
}
|
|
1535
|
+
declare const OverviewBlock: {
|
|
1536
|
+
config: {
|
|
1537
|
+
readonly type: "overview";
|
|
1538
|
+
readonly propSchema: {};
|
|
1539
|
+
readonly content: "none";
|
|
1540
|
+
};
|
|
1541
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
1542
|
+
readonly type: "overview";
|
|
1543
|
+
readonly propSchema: {};
|
|
1544
|
+
readonly content: "none";
|
|
1545
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
1546
|
+
};
|
|
1547
|
+
|
|
1548
|
+
declare const ProposalBlockSpec: {
|
|
1549
|
+
config: {
|
|
1550
|
+
readonly type: "proposal";
|
|
1551
|
+
readonly propSchema: {
|
|
1552
|
+
readonly status: {
|
|
1553
|
+
readonly default: "draft";
|
|
1554
|
+
readonly values: readonly ["draft", "open", "passed", "rejected", "executed", "closed", "execution_failed", "veto_timelock"];
|
|
1555
|
+
};
|
|
1556
|
+
readonly title: {
|
|
1557
|
+
readonly default: "";
|
|
1558
|
+
};
|
|
1559
|
+
readonly description: {
|
|
1560
|
+
readonly default: "";
|
|
1561
|
+
};
|
|
1562
|
+
readonly icon: {
|
|
1563
|
+
readonly default: "file-text";
|
|
1564
|
+
};
|
|
1565
|
+
readonly proposalId: {
|
|
1566
|
+
readonly default: "";
|
|
1567
|
+
};
|
|
1568
|
+
readonly actions: {
|
|
1569
|
+
readonly default: "[]";
|
|
1570
|
+
};
|
|
1571
|
+
readonly voteEnabled: {
|
|
1572
|
+
readonly default: true;
|
|
1573
|
+
};
|
|
1574
|
+
readonly voteTitle: {
|
|
1575
|
+
readonly default: "";
|
|
1576
|
+
};
|
|
1577
|
+
readonly voteSubtitle: {
|
|
1578
|
+
readonly default: "";
|
|
1579
|
+
};
|
|
1580
|
+
readonly voteIcon: {
|
|
1581
|
+
readonly default: "checklist";
|
|
1582
|
+
};
|
|
1583
|
+
readonly daysLeft: {
|
|
1584
|
+
readonly default: 0;
|
|
1585
|
+
};
|
|
1586
|
+
readonly proposalContractAddress: {
|
|
1587
|
+
readonly default: "";
|
|
1588
|
+
};
|
|
1589
|
+
readonly coreAddress: {
|
|
1590
|
+
readonly default: "";
|
|
1591
|
+
};
|
|
1592
|
+
readonly conditions: {
|
|
1593
|
+
readonly default: "";
|
|
1594
|
+
};
|
|
1595
|
+
};
|
|
1596
|
+
readonly content: "none";
|
|
1597
|
+
};
|
|
1598
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
1599
|
+
readonly type: "proposal";
|
|
1600
|
+
readonly propSchema: {
|
|
1601
|
+
readonly status: {
|
|
1602
|
+
readonly default: "draft";
|
|
1603
|
+
readonly values: readonly ["draft", "open", "passed", "rejected", "executed", "closed", "execution_failed", "veto_timelock"];
|
|
1604
|
+
};
|
|
1605
|
+
readonly title: {
|
|
1606
|
+
readonly default: "";
|
|
1607
|
+
};
|
|
1608
|
+
readonly description: {
|
|
1609
|
+
readonly default: "";
|
|
1610
|
+
};
|
|
1611
|
+
readonly icon: {
|
|
1612
|
+
readonly default: "file-text";
|
|
1613
|
+
};
|
|
1614
|
+
readonly proposalId: {
|
|
1615
|
+
readonly default: "";
|
|
1616
|
+
};
|
|
1617
|
+
readonly actions: {
|
|
1618
|
+
readonly default: "[]";
|
|
1619
|
+
};
|
|
1620
|
+
readonly voteEnabled: {
|
|
1621
|
+
readonly default: true;
|
|
1622
|
+
};
|
|
1623
|
+
readonly voteTitle: {
|
|
1624
|
+
readonly default: "";
|
|
1625
|
+
};
|
|
1626
|
+
readonly voteSubtitle: {
|
|
1627
|
+
readonly default: "";
|
|
1628
|
+
};
|
|
1629
|
+
readonly voteIcon: {
|
|
1630
|
+
readonly default: "checklist";
|
|
1631
|
+
};
|
|
1632
|
+
readonly daysLeft: {
|
|
1633
|
+
readonly default: 0;
|
|
1634
|
+
};
|
|
1635
|
+
readonly proposalContractAddress: {
|
|
1636
|
+
readonly default: "";
|
|
1637
|
+
};
|
|
1638
|
+
readonly coreAddress: {
|
|
1639
|
+
readonly default: "";
|
|
1640
|
+
};
|
|
1641
|
+
readonly conditions: {
|
|
1642
|
+
readonly default: "";
|
|
1643
|
+
};
|
|
1644
|
+
};
|
|
1645
|
+
readonly content: "none";
|
|
1646
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
1647
|
+
};
|
|
1648
|
+
|
|
1649
|
+
type ProposalBlockProps = IxoBlockProps;
|
|
1650
|
+
|
|
1651
|
+
declare const ApiRequestBlockSpec: {
|
|
1652
|
+
config: {
|
|
1653
|
+
readonly type: "apiRequest";
|
|
1654
|
+
readonly propSchema: {
|
|
1655
|
+
readonly title: {
|
|
1656
|
+
readonly default: "";
|
|
1657
|
+
};
|
|
1658
|
+
readonly description: {
|
|
1659
|
+
readonly default: "";
|
|
1660
|
+
};
|
|
1661
|
+
readonly icon: {
|
|
1662
|
+
readonly default: "square-check";
|
|
1663
|
+
};
|
|
1664
|
+
readonly endpoint: {
|
|
1665
|
+
readonly default: "";
|
|
1666
|
+
};
|
|
1667
|
+
readonly method: {
|
|
1668
|
+
readonly default: "GET";
|
|
1669
|
+
};
|
|
1670
|
+
readonly headers: {
|
|
1671
|
+
readonly default: "[]";
|
|
1672
|
+
};
|
|
1673
|
+
readonly body: {
|
|
1674
|
+
readonly default: "[]";
|
|
1675
|
+
};
|
|
1676
|
+
readonly response: {
|
|
1677
|
+
readonly default: "";
|
|
1678
|
+
};
|
|
1679
|
+
readonly status: {
|
|
1680
|
+
readonly default: "idle";
|
|
1681
|
+
};
|
|
1682
|
+
readonly responseSchema: {
|
|
1683
|
+
readonly default: "";
|
|
1684
|
+
};
|
|
1685
|
+
readonly conditions: {
|
|
1686
|
+
readonly default: "";
|
|
1687
|
+
};
|
|
1688
|
+
};
|
|
1689
|
+
readonly content: "inline";
|
|
1690
|
+
};
|
|
1691
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
1692
|
+
readonly type: "apiRequest";
|
|
1693
|
+
readonly propSchema: {
|
|
1694
|
+
readonly title: {
|
|
1695
|
+
readonly default: "";
|
|
1696
|
+
};
|
|
1697
|
+
readonly description: {
|
|
1698
|
+
readonly default: "";
|
|
1699
|
+
};
|
|
1700
|
+
readonly icon: {
|
|
1701
|
+
readonly default: "square-check";
|
|
1702
|
+
};
|
|
1703
|
+
readonly endpoint: {
|
|
1704
|
+
readonly default: "";
|
|
1705
|
+
};
|
|
1706
|
+
readonly method: {
|
|
1707
|
+
readonly default: "GET";
|
|
1708
|
+
};
|
|
1709
|
+
readonly headers: {
|
|
1710
|
+
readonly default: "[]";
|
|
1711
|
+
};
|
|
1712
|
+
readonly body: {
|
|
1713
|
+
readonly default: "[]";
|
|
1714
|
+
};
|
|
1715
|
+
readonly response: {
|
|
1716
|
+
readonly default: "";
|
|
1717
|
+
};
|
|
1718
|
+
readonly status: {
|
|
1719
|
+
readonly default: "idle";
|
|
1720
|
+
};
|
|
1721
|
+
readonly responseSchema: {
|
|
1722
|
+
readonly default: "";
|
|
1723
|
+
};
|
|
1724
|
+
readonly conditions: {
|
|
1725
|
+
readonly default: "";
|
|
1726
|
+
};
|
|
1727
|
+
};
|
|
1728
|
+
readonly content: "inline";
|
|
1729
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
1730
|
+
};
|
|
1731
|
+
|
|
1732
|
+
type ApiRequestBlockProps = IxoBlockProps;
|
|
1733
|
+
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
1734
|
+
type KeyValuePair = {
|
|
1735
|
+
key: string;
|
|
1736
|
+
value: string;
|
|
1737
|
+
};
|
|
1738
|
+
|
|
1739
|
+
declare const blockSpecs: {
|
|
1740
|
+
checkbox: {
|
|
1741
|
+
config: {
|
|
1742
|
+
readonly type: "checkbox";
|
|
1743
|
+
readonly propSchema: {
|
|
1744
|
+
readonly checked: {
|
|
1745
|
+
readonly default: false;
|
|
1746
|
+
};
|
|
1747
|
+
readonly allowedCheckers: {
|
|
1748
|
+
readonly default: "all";
|
|
1749
|
+
};
|
|
1750
|
+
readonly initialChecked: {
|
|
1751
|
+
readonly default: false;
|
|
1752
|
+
};
|
|
1753
|
+
readonly title: {
|
|
1754
|
+
readonly default: "";
|
|
1755
|
+
};
|
|
1756
|
+
readonly description: {
|
|
1757
|
+
readonly default: "";
|
|
1758
|
+
};
|
|
1759
|
+
readonly icon: {
|
|
1760
|
+
readonly default: "square-check";
|
|
1761
|
+
};
|
|
1762
|
+
readonly conditions: {
|
|
1763
|
+
readonly default: "";
|
|
1764
|
+
};
|
|
1765
|
+
};
|
|
1766
|
+
readonly content: "inline";
|
|
1767
|
+
};
|
|
1768
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
1769
|
+
readonly type: "checkbox";
|
|
1770
|
+
readonly propSchema: {
|
|
1771
|
+
readonly checked: {
|
|
1772
|
+
readonly default: false;
|
|
1773
|
+
};
|
|
1774
|
+
readonly allowedCheckers: {
|
|
1775
|
+
readonly default: "all";
|
|
1776
|
+
};
|
|
1777
|
+
readonly initialChecked: {
|
|
1778
|
+
readonly default: false;
|
|
1779
|
+
};
|
|
1780
|
+
readonly title: {
|
|
1781
|
+
readonly default: "";
|
|
1782
|
+
};
|
|
1783
|
+
readonly description: {
|
|
1784
|
+
readonly default: "";
|
|
1785
|
+
};
|
|
1786
|
+
readonly icon: {
|
|
1787
|
+
readonly default: "square-check";
|
|
1788
|
+
};
|
|
1789
|
+
readonly conditions: {
|
|
1790
|
+
readonly default: "";
|
|
1791
|
+
};
|
|
1792
|
+
};
|
|
1793
|
+
readonly content: "inline";
|
|
1794
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
1795
|
+
};
|
|
1796
|
+
list: {
|
|
1797
|
+
config: {
|
|
1798
|
+
readonly type: "list";
|
|
1799
|
+
readonly propSchema: {
|
|
1800
|
+
readonly listType: {
|
|
1801
|
+
readonly default: "";
|
|
1802
|
+
};
|
|
1803
|
+
readonly sort: {
|
|
1804
|
+
readonly default: "{}";
|
|
1805
|
+
};
|
|
1806
|
+
readonly filter: {
|
|
1807
|
+
readonly default: "{}";
|
|
1808
|
+
};
|
|
1809
|
+
readonly filterOptions: {
|
|
1810
|
+
readonly default: "{}";
|
|
1811
|
+
};
|
|
1812
|
+
readonly sortOptions: {
|
|
1813
|
+
readonly default: "{}";
|
|
1814
|
+
};
|
|
1815
|
+
readonly listConfig: {
|
|
1816
|
+
readonly default: "{}";
|
|
1817
|
+
};
|
|
1818
|
+
readonly icon: {
|
|
1819
|
+
readonly default: "📋";
|
|
1820
|
+
};
|
|
1821
|
+
};
|
|
1822
|
+
readonly content: "none";
|
|
1823
|
+
};
|
|
1824
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
1825
|
+
readonly type: "list";
|
|
1826
|
+
readonly propSchema: {
|
|
1827
|
+
readonly listType: {
|
|
1828
|
+
readonly default: "";
|
|
1829
|
+
};
|
|
1830
|
+
readonly sort: {
|
|
1831
|
+
readonly default: "{}";
|
|
1832
|
+
};
|
|
1833
|
+
readonly filter: {
|
|
1834
|
+
readonly default: "{}";
|
|
1835
|
+
};
|
|
1836
|
+
readonly filterOptions: {
|
|
1837
|
+
readonly default: "{}";
|
|
1838
|
+
};
|
|
1839
|
+
readonly sortOptions: {
|
|
1840
|
+
readonly default: "{}";
|
|
1841
|
+
};
|
|
1842
|
+
readonly listConfig: {
|
|
1843
|
+
readonly default: "{}";
|
|
1844
|
+
};
|
|
1845
|
+
readonly icon: {
|
|
1846
|
+
readonly default: "📋";
|
|
1847
|
+
};
|
|
1848
|
+
};
|
|
1849
|
+
readonly content: "none";
|
|
1850
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
1851
|
+
};
|
|
1852
|
+
enumChecklist: {
|
|
1853
|
+
config: {
|
|
1854
|
+
readonly type: "enumChecklist";
|
|
1855
|
+
readonly propSchema: {
|
|
1856
|
+
readonly listType: {
|
|
1857
|
+
readonly default: "";
|
|
1858
|
+
};
|
|
1859
|
+
readonly listConfig: {
|
|
1860
|
+
readonly default: "{}";
|
|
1861
|
+
};
|
|
1862
|
+
readonly selectedIds: {
|
|
1863
|
+
readonly default: "[]";
|
|
1864
|
+
};
|
|
1865
|
+
};
|
|
1866
|
+
readonly content: "none";
|
|
1867
|
+
};
|
|
1868
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
1869
|
+
readonly type: "enumChecklist";
|
|
1870
|
+
readonly propSchema: {
|
|
1871
|
+
readonly listType: {
|
|
1872
|
+
readonly default: "";
|
|
1873
|
+
};
|
|
1874
|
+
readonly listConfig: {
|
|
1875
|
+
readonly default: "{}";
|
|
1876
|
+
};
|
|
1877
|
+
readonly selectedIds: {
|
|
1878
|
+
readonly default: "[]";
|
|
1879
|
+
};
|
|
1880
|
+
};
|
|
1881
|
+
readonly content: "none";
|
|
1882
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
1883
|
+
};
|
|
1884
|
+
overview: {
|
|
1885
|
+
config: {
|
|
1886
|
+
readonly type: "overview";
|
|
1887
|
+
readonly propSchema: {};
|
|
1888
|
+
readonly content: "none";
|
|
1889
|
+
};
|
|
1890
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
1891
|
+
readonly type: "overview";
|
|
1892
|
+
readonly propSchema: {};
|
|
1893
|
+
readonly content: "none";
|
|
1894
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
1895
|
+
};
|
|
1896
|
+
proposal: {
|
|
1897
|
+
config: {
|
|
1898
|
+
readonly type: "proposal";
|
|
1899
|
+
readonly propSchema: {
|
|
1900
|
+
readonly status: {
|
|
1901
|
+
readonly default: "draft";
|
|
1902
|
+
readonly values: readonly ["draft", "open", "passed", "rejected", "executed", "closed", "execution_failed", "veto_timelock"];
|
|
1903
|
+
};
|
|
1904
|
+
readonly title: {
|
|
1905
|
+
readonly default: "";
|
|
1906
|
+
};
|
|
1907
|
+
readonly description: {
|
|
1908
|
+
readonly default: "";
|
|
1909
|
+
};
|
|
1910
|
+
readonly icon: {
|
|
1911
|
+
readonly default: "file-text";
|
|
1912
|
+
};
|
|
1913
|
+
readonly proposalId: {
|
|
1914
|
+
readonly default: "";
|
|
1915
|
+
};
|
|
1916
|
+
readonly actions: {
|
|
1917
|
+
readonly default: "[]";
|
|
1918
|
+
};
|
|
1919
|
+
readonly voteEnabled: {
|
|
1920
|
+
readonly default: true;
|
|
1921
|
+
};
|
|
1922
|
+
readonly voteTitle: {
|
|
1923
|
+
readonly default: "";
|
|
1924
|
+
};
|
|
1925
|
+
readonly voteSubtitle: {
|
|
1926
|
+
readonly default: "";
|
|
1927
|
+
};
|
|
1928
|
+
readonly voteIcon: {
|
|
1929
|
+
readonly default: "checklist";
|
|
1930
|
+
};
|
|
1931
|
+
readonly daysLeft: {
|
|
1932
|
+
readonly default: 0;
|
|
1933
|
+
};
|
|
1934
|
+
readonly proposalContractAddress: {
|
|
1935
|
+
readonly default: "";
|
|
1936
|
+
};
|
|
1937
|
+
readonly coreAddress: {
|
|
1938
|
+
readonly default: "";
|
|
1939
|
+
};
|
|
1940
|
+
readonly conditions: {
|
|
1941
|
+
readonly default: "";
|
|
1942
|
+
};
|
|
1943
|
+
};
|
|
1944
|
+
readonly content: "none";
|
|
1945
|
+
};
|
|
1946
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
1947
|
+
readonly type: "proposal";
|
|
1948
|
+
readonly propSchema: {
|
|
1949
|
+
readonly status: {
|
|
1950
|
+
readonly default: "draft";
|
|
1951
|
+
readonly values: readonly ["draft", "open", "passed", "rejected", "executed", "closed", "execution_failed", "veto_timelock"];
|
|
1952
|
+
};
|
|
1953
|
+
readonly title: {
|
|
1954
|
+
readonly default: "";
|
|
1955
|
+
};
|
|
1956
|
+
readonly description: {
|
|
1957
|
+
readonly default: "";
|
|
1958
|
+
};
|
|
1959
|
+
readonly icon: {
|
|
1960
|
+
readonly default: "file-text";
|
|
1961
|
+
};
|
|
1962
|
+
readonly proposalId: {
|
|
1963
|
+
readonly default: "";
|
|
1964
|
+
};
|
|
1965
|
+
readonly actions: {
|
|
1966
|
+
readonly default: "[]";
|
|
1967
|
+
};
|
|
1968
|
+
readonly voteEnabled: {
|
|
1969
|
+
readonly default: true;
|
|
1970
|
+
};
|
|
1971
|
+
readonly voteTitle: {
|
|
1972
|
+
readonly default: "";
|
|
1973
|
+
};
|
|
1974
|
+
readonly voteSubtitle: {
|
|
1975
|
+
readonly default: "";
|
|
1976
|
+
};
|
|
1977
|
+
readonly voteIcon: {
|
|
1978
|
+
readonly default: "checklist";
|
|
1979
|
+
};
|
|
1980
|
+
readonly daysLeft: {
|
|
1981
|
+
readonly default: 0;
|
|
1982
|
+
};
|
|
1983
|
+
readonly proposalContractAddress: {
|
|
1984
|
+
readonly default: "";
|
|
1985
|
+
};
|
|
1986
|
+
readonly coreAddress: {
|
|
1987
|
+
readonly default: "";
|
|
1988
|
+
};
|
|
1989
|
+
readonly conditions: {
|
|
1990
|
+
readonly default: "";
|
|
1991
|
+
};
|
|
1992
|
+
};
|
|
1993
|
+
readonly content: "none";
|
|
1994
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
1995
|
+
};
|
|
1996
|
+
apiRequest: {
|
|
1997
|
+
config: {
|
|
1998
|
+
readonly type: "apiRequest";
|
|
1999
|
+
readonly propSchema: {
|
|
2000
|
+
readonly title: {
|
|
2001
|
+
readonly default: "";
|
|
2002
|
+
};
|
|
2003
|
+
readonly description: {
|
|
2004
|
+
readonly default: "";
|
|
2005
|
+
};
|
|
2006
|
+
readonly icon: {
|
|
2007
|
+
readonly default: "square-check";
|
|
2008
|
+
};
|
|
2009
|
+
readonly endpoint: {
|
|
2010
|
+
readonly default: "";
|
|
2011
|
+
};
|
|
2012
|
+
readonly method: {
|
|
2013
|
+
readonly default: "GET";
|
|
2014
|
+
};
|
|
2015
|
+
readonly headers: {
|
|
2016
|
+
readonly default: "[]";
|
|
2017
|
+
};
|
|
2018
|
+
readonly body: {
|
|
2019
|
+
readonly default: "[]";
|
|
2020
|
+
};
|
|
2021
|
+
readonly response: {
|
|
2022
|
+
readonly default: "";
|
|
2023
|
+
};
|
|
2024
|
+
readonly status: {
|
|
2025
|
+
readonly default: "idle";
|
|
2026
|
+
};
|
|
2027
|
+
readonly responseSchema: {
|
|
2028
|
+
readonly default: "";
|
|
2029
|
+
};
|
|
2030
|
+
readonly conditions: {
|
|
2031
|
+
readonly default: "";
|
|
2032
|
+
};
|
|
2033
|
+
};
|
|
2034
|
+
readonly content: "inline";
|
|
2035
|
+
};
|
|
2036
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
2037
|
+
readonly type: "apiRequest";
|
|
2038
|
+
readonly propSchema: {
|
|
2039
|
+
readonly title: {
|
|
2040
|
+
readonly default: "";
|
|
2041
|
+
};
|
|
2042
|
+
readonly description: {
|
|
2043
|
+
readonly default: "";
|
|
2044
|
+
};
|
|
2045
|
+
readonly icon: {
|
|
2046
|
+
readonly default: "square-check";
|
|
2047
|
+
};
|
|
2048
|
+
readonly endpoint: {
|
|
2049
|
+
readonly default: "";
|
|
2050
|
+
};
|
|
2051
|
+
readonly method: {
|
|
2052
|
+
readonly default: "GET";
|
|
2053
|
+
};
|
|
2054
|
+
readonly headers: {
|
|
2055
|
+
readonly default: "[]";
|
|
2056
|
+
};
|
|
2057
|
+
readonly body: {
|
|
2058
|
+
readonly default: "[]";
|
|
2059
|
+
};
|
|
2060
|
+
readonly response: {
|
|
2061
|
+
readonly default: "";
|
|
2062
|
+
};
|
|
2063
|
+
readonly status: {
|
|
2064
|
+
readonly default: "idle";
|
|
2065
|
+
};
|
|
2066
|
+
readonly responseSchema: {
|
|
2067
|
+
readonly default: "";
|
|
2068
|
+
};
|
|
2069
|
+
readonly conditions: {
|
|
2070
|
+
readonly default: "";
|
|
2071
|
+
};
|
|
2072
|
+
};
|
|
2073
|
+
readonly content: "inline";
|
|
2074
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
2075
|
+
};
|
|
2076
|
+
notify: {
|
|
2077
|
+
config: {
|
|
2078
|
+
readonly type: "notify";
|
|
2079
|
+
readonly propSchema: {
|
|
2080
|
+
readonly title: {
|
|
2081
|
+
readonly default: "";
|
|
2082
|
+
};
|
|
2083
|
+
readonly description: {
|
|
2084
|
+
readonly default: "";
|
|
2085
|
+
};
|
|
2086
|
+
readonly icon: {
|
|
2087
|
+
readonly default: "bell";
|
|
2088
|
+
};
|
|
2089
|
+
readonly channel: {
|
|
2090
|
+
readonly default: "email";
|
|
2091
|
+
};
|
|
2092
|
+
readonly to: {
|
|
2093
|
+
readonly default: "[]";
|
|
2094
|
+
};
|
|
2095
|
+
readonly cc: {
|
|
2096
|
+
readonly default: "[]";
|
|
2097
|
+
};
|
|
2098
|
+
readonly bcc: {
|
|
2099
|
+
readonly default: "[]";
|
|
2100
|
+
};
|
|
2101
|
+
readonly subject: {
|
|
2102
|
+
readonly default: "";
|
|
2103
|
+
};
|
|
2104
|
+
readonly body: {
|
|
2105
|
+
readonly default: "";
|
|
2106
|
+
};
|
|
2107
|
+
readonly bodyType: {
|
|
2108
|
+
readonly default: "text";
|
|
2109
|
+
};
|
|
2110
|
+
readonly from: {
|
|
2111
|
+
readonly default: "";
|
|
2112
|
+
};
|
|
2113
|
+
readonly replyTo: {
|
|
2114
|
+
readonly default: "";
|
|
2115
|
+
};
|
|
2116
|
+
readonly templateId: {
|
|
2117
|
+
readonly default: "";
|
|
2118
|
+
};
|
|
2119
|
+
readonly templateVariables: {
|
|
2120
|
+
readonly default: "{}";
|
|
2121
|
+
};
|
|
2122
|
+
readonly status: {
|
|
2123
|
+
readonly default: "idle";
|
|
2124
|
+
};
|
|
2125
|
+
readonly messageId: {
|
|
2126
|
+
readonly default: "";
|
|
2127
|
+
};
|
|
2128
|
+
readonly sentAt: {
|
|
2129
|
+
readonly default: "";
|
|
2130
|
+
};
|
|
2131
|
+
readonly errorMessage: {
|
|
2132
|
+
readonly default: "";
|
|
2133
|
+
};
|
|
2134
|
+
readonly conditions: {
|
|
2135
|
+
readonly default: "";
|
|
2136
|
+
};
|
|
2137
|
+
};
|
|
2138
|
+
readonly content: "inline";
|
|
2139
|
+
};
|
|
2140
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
2141
|
+
readonly type: "notify";
|
|
2142
|
+
readonly propSchema: {
|
|
2143
|
+
readonly title: {
|
|
2144
|
+
readonly default: "";
|
|
2145
|
+
};
|
|
2146
|
+
readonly description: {
|
|
2147
|
+
readonly default: "";
|
|
2148
|
+
};
|
|
2149
|
+
readonly icon: {
|
|
2150
|
+
readonly default: "bell";
|
|
2151
|
+
};
|
|
2152
|
+
readonly channel: {
|
|
2153
|
+
readonly default: "email";
|
|
2154
|
+
};
|
|
2155
|
+
readonly to: {
|
|
2156
|
+
readonly default: "[]";
|
|
2157
|
+
};
|
|
2158
|
+
readonly cc: {
|
|
2159
|
+
readonly default: "[]";
|
|
2160
|
+
};
|
|
2161
|
+
readonly bcc: {
|
|
2162
|
+
readonly default: "[]";
|
|
2163
|
+
};
|
|
2164
|
+
readonly subject: {
|
|
2165
|
+
readonly default: "";
|
|
2166
|
+
};
|
|
2167
|
+
readonly body: {
|
|
2168
|
+
readonly default: "";
|
|
2169
|
+
};
|
|
2170
|
+
readonly bodyType: {
|
|
2171
|
+
readonly default: "text";
|
|
2172
|
+
};
|
|
2173
|
+
readonly from: {
|
|
2174
|
+
readonly default: "";
|
|
2175
|
+
};
|
|
2176
|
+
readonly replyTo: {
|
|
2177
|
+
readonly default: "";
|
|
2178
|
+
};
|
|
2179
|
+
readonly templateId: {
|
|
2180
|
+
readonly default: "";
|
|
2181
|
+
};
|
|
2182
|
+
readonly templateVariables: {
|
|
2183
|
+
readonly default: "{}";
|
|
2184
|
+
};
|
|
2185
|
+
readonly status: {
|
|
2186
|
+
readonly default: "idle";
|
|
2187
|
+
};
|
|
2188
|
+
readonly messageId: {
|
|
2189
|
+
readonly default: "";
|
|
2190
|
+
};
|
|
2191
|
+
readonly sentAt: {
|
|
2192
|
+
readonly default: "";
|
|
2193
|
+
};
|
|
2194
|
+
readonly errorMessage: {
|
|
2195
|
+
readonly default: "";
|
|
2196
|
+
};
|
|
2197
|
+
readonly conditions: {
|
|
2198
|
+
readonly default: "";
|
|
2199
|
+
};
|
|
2200
|
+
};
|
|
2201
|
+
readonly content: "inline";
|
|
2202
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
2203
|
+
};
|
|
2204
|
+
claim: {
|
|
2205
|
+
config: {
|
|
2206
|
+
readonly type: "claim";
|
|
2207
|
+
readonly propSchema: {
|
|
2208
|
+
readonly title: {
|
|
2209
|
+
readonly default: "";
|
|
2210
|
+
};
|
|
2211
|
+
readonly description: {
|
|
2212
|
+
readonly default: "";
|
|
2213
|
+
};
|
|
2214
|
+
readonly icon: {
|
|
2215
|
+
readonly default: "square-check";
|
|
2216
|
+
};
|
|
2217
|
+
readonly deedDid: {
|
|
2218
|
+
readonly default: "";
|
|
2219
|
+
};
|
|
2220
|
+
readonly selectedCollections: {
|
|
2221
|
+
readonly default: "[]";
|
|
2222
|
+
};
|
|
2223
|
+
readonly adminAddress: {
|
|
2224
|
+
readonly default: "";
|
|
2225
|
+
};
|
|
2226
|
+
readonly claimCollectionId: {
|
|
2227
|
+
readonly default: "";
|
|
2228
|
+
};
|
|
2229
|
+
readonly parentCapability: {
|
|
2230
|
+
readonly default: "";
|
|
2231
|
+
};
|
|
2232
|
+
readonly authorisedActors: {
|
|
2233
|
+
readonly default: "";
|
|
2234
|
+
};
|
|
2235
|
+
readonly linkedClaimCollectionId: {
|
|
2236
|
+
readonly default: "";
|
|
2237
|
+
};
|
|
2238
|
+
readonly activationUpstreamNodeId: {
|
|
2239
|
+
readonly default: "";
|
|
2240
|
+
};
|
|
2241
|
+
readonly activationRequiredStatus: {
|
|
2242
|
+
readonly default: "";
|
|
2243
|
+
};
|
|
2244
|
+
readonly activationRequireAuthorisedActor: {
|
|
2245
|
+
readonly default: false;
|
|
2246
|
+
};
|
|
2247
|
+
};
|
|
2248
|
+
readonly content: "none";
|
|
2249
|
+
};
|
|
2250
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
2251
|
+
readonly type: "claim";
|
|
2252
|
+
readonly propSchema: {
|
|
2253
|
+
readonly title: {
|
|
2254
|
+
readonly default: "";
|
|
2255
|
+
};
|
|
2256
|
+
readonly description: {
|
|
2257
|
+
readonly default: "";
|
|
2258
|
+
};
|
|
2259
|
+
readonly icon: {
|
|
2260
|
+
readonly default: "square-check";
|
|
2261
|
+
};
|
|
2262
|
+
readonly deedDid: {
|
|
2263
|
+
readonly default: "";
|
|
2264
|
+
};
|
|
2265
|
+
readonly selectedCollections: {
|
|
2266
|
+
readonly default: "[]";
|
|
2267
|
+
};
|
|
2268
|
+
readonly adminAddress: {
|
|
2269
|
+
readonly default: "";
|
|
2270
|
+
};
|
|
2271
|
+
readonly claimCollectionId: {
|
|
2272
|
+
readonly default: "";
|
|
2273
|
+
};
|
|
2274
|
+
readonly parentCapability: {
|
|
2275
|
+
readonly default: "";
|
|
2276
|
+
};
|
|
2277
|
+
readonly authorisedActors: {
|
|
2278
|
+
readonly default: "";
|
|
2279
|
+
};
|
|
2280
|
+
readonly linkedClaimCollectionId: {
|
|
2281
|
+
readonly default: "";
|
|
2282
|
+
};
|
|
2283
|
+
readonly activationUpstreamNodeId: {
|
|
2284
|
+
readonly default: "";
|
|
2285
|
+
};
|
|
2286
|
+
readonly activationRequiredStatus: {
|
|
2287
|
+
readonly default: "";
|
|
2288
|
+
};
|
|
2289
|
+
readonly activationRequireAuthorisedActor: {
|
|
2290
|
+
readonly default: false;
|
|
2291
|
+
};
|
|
2292
|
+
};
|
|
2293
|
+
readonly content: "none";
|
|
2294
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
2295
|
+
};
|
|
2296
|
+
bid: {
|
|
2297
|
+
config: {
|
|
2298
|
+
readonly type: "bid";
|
|
2299
|
+
readonly propSchema: {
|
|
2300
|
+
readonly title: {
|
|
2301
|
+
readonly default: "";
|
|
2302
|
+
};
|
|
2303
|
+
readonly description: {
|
|
2304
|
+
readonly default: "";
|
|
2305
|
+
};
|
|
2306
|
+
readonly did: {
|
|
2307
|
+
readonly default: "";
|
|
2308
|
+
};
|
|
2309
|
+
readonly selectedCollections: {
|
|
2310
|
+
readonly default: "[]";
|
|
2311
|
+
};
|
|
2312
|
+
readonly adminAddress: {
|
|
2313
|
+
readonly default: "";
|
|
2314
|
+
};
|
|
2315
|
+
readonly parentCapability: {
|
|
2316
|
+
readonly default: "";
|
|
2317
|
+
};
|
|
2318
|
+
readonly authorisedActors: {
|
|
2319
|
+
readonly default: "";
|
|
2320
|
+
};
|
|
2321
|
+
readonly linkedClaimCollectionId: {
|
|
2322
|
+
readonly default: "";
|
|
2323
|
+
};
|
|
2324
|
+
readonly activationUpstreamNodeId: {
|
|
2325
|
+
readonly default: "";
|
|
2326
|
+
};
|
|
2327
|
+
readonly activationRequiredStatus: {
|
|
2328
|
+
readonly default: "";
|
|
2329
|
+
};
|
|
2330
|
+
readonly activationRequireAuthorisedActor: {
|
|
2331
|
+
readonly default: false;
|
|
2332
|
+
};
|
|
2333
|
+
};
|
|
2334
|
+
readonly content: "none";
|
|
2335
|
+
};
|
|
2336
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
2337
|
+
readonly type: "bid";
|
|
2338
|
+
readonly propSchema: {
|
|
2339
|
+
readonly title: {
|
|
2340
|
+
readonly default: "";
|
|
2341
|
+
};
|
|
2342
|
+
readonly description: {
|
|
2343
|
+
readonly default: "";
|
|
2344
|
+
};
|
|
2345
|
+
readonly did: {
|
|
2346
|
+
readonly default: "";
|
|
2347
|
+
};
|
|
2348
|
+
readonly selectedCollections: {
|
|
2349
|
+
readonly default: "[]";
|
|
2350
|
+
};
|
|
2351
|
+
readonly adminAddress: {
|
|
2352
|
+
readonly default: "";
|
|
2353
|
+
};
|
|
2354
|
+
readonly parentCapability: {
|
|
2355
|
+
readonly default: "";
|
|
2356
|
+
};
|
|
2357
|
+
readonly authorisedActors: {
|
|
2358
|
+
readonly default: "";
|
|
2359
|
+
};
|
|
2360
|
+
readonly linkedClaimCollectionId: {
|
|
2361
|
+
readonly default: "";
|
|
2362
|
+
};
|
|
2363
|
+
readonly activationUpstreamNodeId: {
|
|
2364
|
+
readonly default: "";
|
|
2365
|
+
};
|
|
2366
|
+
readonly activationRequiredStatus: {
|
|
2367
|
+
readonly default: "";
|
|
2368
|
+
};
|
|
2369
|
+
readonly activationRequireAuthorisedActor: {
|
|
2370
|
+
readonly default: false;
|
|
2371
|
+
};
|
|
2372
|
+
};
|
|
2373
|
+
readonly content: "none";
|
|
2374
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
2375
|
+
};
|
|
2376
|
+
evaluator: {
|
|
2377
|
+
config: {
|
|
2378
|
+
readonly type: "evaluator";
|
|
2379
|
+
readonly propSchema: {
|
|
2380
|
+
readonly title: {
|
|
2381
|
+
readonly default: "";
|
|
2382
|
+
};
|
|
2383
|
+
readonly description: {
|
|
2384
|
+
readonly default: "";
|
|
2385
|
+
};
|
|
2386
|
+
readonly icon: {
|
|
2387
|
+
readonly default: "checklist";
|
|
2388
|
+
};
|
|
2389
|
+
readonly deedDid: {
|
|
2390
|
+
readonly default: "";
|
|
2391
|
+
};
|
|
2392
|
+
readonly selectedCollections: {
|
|
2393
|
+
readonly default: "[]";
|
|
2394
|
+
};
|
|
2395
|
+
readonly adminAddress: {
|
|
2396
|
+
readonly default: "";
|
|
2397
|
+
};
|
|
2398
|
+
};
|
|
2399
|
+
readonly content: "none";
|
|
2400
|
+
};
|
|
2401
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
2402
|
+
readonly type: "evaluator";
|
|
2403
|
+
readonly propSchema: {
|
|
2404
|
+
readonly title: {
|
|
2405
|
+
readonly default: "";
|
|
2406
|
+
};
|
|
2407
|
+
readonly description: {
|
|
2408
|
+
readonly default: "";
|
|
2409
|
+
};
|
|
2410
|
+
readonly icon: {
|
|
2411
|
+
readonly default: "checklist";
|
|
2412
|
+
};
|
|
2413
|
+
readonly deedDid: {
|
|
2414
|
+
readonly default: "";
|
|
2415
|
+
};
|
|
2416
|
+
readonly selectedCollections: {
|
|
2417
|
+
readonly default: "[]";
|
|
2418
|
+
};
|
|
2419
|
+
readonly adminAddress: {
|
|
2420
|
+
readonly default: "";
|
|
2421
|
+
};
|
|
2422
|
+
};
|
|
2423
|
+
readonly content: "none";
|
|
2424
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
2425
|
+
};
|
|
2426
|
+
domainCreator: {
|
|
2427
|
+
config: {
|
|
2428
|
+
readonly type: "domainCreator";
|
|
2429
|
+
readonly propSchema: {
|
|
2430
|
+
readonly title: {
|
|
2431
|
+
readonly default: "";
|
|
2432
|
+
};
|
|
2433
|
+
readonly description: {
|
|
2434
|
+
readonly default: "";
|
|
2435
|
+
};
|
|
2436
|
+
readonly icon: {
|
|
2437
|
+
readonly default: "file-text";
|
|
2438
|
+
};
|
|
2439
|
+
readonly surveySchema: {
|
|
2440
|
+
readonly default: "";
|
|
2441
|
+
};
|
|
2442
|
+
readonly answers: {
|
|
2443
|
+
readonly default: "";
|
|
2444
|
+
};
|
|
2445
|
+
readonly lastSubmission: {
|
|
2446
|
+
readonly default: "";
|
|
2447
|
+
};
|
|
2448
|
+
};
|
|
2449
|
+
readonly content: "none";
|
|
2450
|
+
};
|
|
2451
|
+
implementation: _blocknote_core.TiptapBlockImplementation<{
|
|
2452
|
+
readonly type: "domainCreator";
|
|
2453
|
+
readonly propSchema: {
|
|
2454
|
+
readonly title: {
|
|
2455
|
+
readonly default: "";
|
|
2456
|
+
};
|
|
2457
|
+
readonly description: {
|
|
2458
|
+
readonly default: "";
|
|
2459
|
+
};
|
|
2460
|
+
readonly icon: {
|
|
2461
|
+
readonly default: "file-text";
|
|
2462
|
+
};
|
|
2463
|
+
readonly surveySchema: {
|
|
2464
|
+
readonly default: "";
|
|
2465
|
+
};
|
|
2466
|
+
readonly answers: {
|
|
2467
|
+
readonly default: "";
|
|
2468
|
+
};
|
|
2469
|
+
readonly lastSubmission: {
|
|
2470
|
+
readonly default: "";
|
|
2471
|
+
};
|
|
2472
|
+
};
|
|
2473
|
+
readonly content: "none";
|
|
2474
|
+
}, any, _blocknote_core.InlineContentSchema, _blocknote_core.StyleSchema>;
|
|
2475
|
+
};
|
|
2476
|
+
};
|
|
2477
|
+
declare const getExtraSlashMenuItems: (editor: any) => {
|
|
2478
|
+
title: string;
|
|
2479
|
+
onItemClick: () => void;
|
|
2480
|
+
aliases: string[];
|
|
2481
|
+
group: string;
|
|
2482
|
+
subtext: string;
|
|
2483
|
+
}[];
|
|
2484
|
+
|
|
2485
|
+
/**
|
|
2486
|
+
* Page metadata stored in Matrix state events
|
|
2487
|
+
* Now stores only URL strings in separate events
|
|
2488
|
+
*/
|
|
2489
|
+
interface PageMetadata {
|
|
2490
|
+
/** Cover image URL */
|
|
2491
|
+
cover?: string;
|
|
2492
|
+
/** Icon/logo image URL */
|
|
2493
|
+
icon?: string;
|
|
2494
|
+
}
|
|
2495
|
+
/**
|
|
2496
|
+
* Callback type for metadata change subscriptions
|
|
2497
|
+
*/
|
|
2498
|
+
type MetadataChangeCallback = (metadata: PageMetadata) => void;
|
|
2499
|
+
/**
|
|
2500
|
+
* Manager for Matrix state events containing page metadata (cover, icon)
|
|
2501
|
+
*
|
|
2502
|
+
* Stores cover and icon as separate state events, each containing only the URL string.
|
|
2503
|
+
*/
|
|
2504
|
+
declare class MatrixMetadataManager {
|
|
2505
|
+
private matrixClient;
|
|
2506
|
+
private roomId;
|
|
2507
|
+
private subscribers;
|
|
2508
|
+
private eventHandler;
|
|
2509
|
+
constructor(matrixClient: MatrixClient, roomId: string);
|
|
2510
|
+
/**
|
|
2511
|
+
* Set up Matrix event listener for real-time updates
|
|
2512
|
+
*/
|
|
2513
|
+
private setupEventListener;
|
|
2514
|
+
/**
|
|
2515
|
+
* Notify all subscribers of metadata changes
|
|
2516
|
+
*/
|
|
2517
|
+
private notifySubscribers;
|
|
2518
|
+
/**
|
|
2519
|
+
* Send metadata to Matrix state events (separate events for cover and icon)
|
|
2520
|
+
*
|
|
2521
|
+
* @param metadata - The metadata to store (only URL strings)
|
|
2522
|
+
* @param permissions - Permission check object
|
|
2523
|
+
* @returns Promise that resolves when state events are sent
|
|
2524
|
+
*/
|
|
2525
|
+
setMetadata(metadata: PageMetadata, permissions: {
|
|
2526
|
+
write: boolean;
|
|
2527
|
+
}): Promise<void>;
|
|
2528
|
+
/**
|
|
2529
|
+
* Get current metadata from Matrix state (reads from separate events)
|
|
2530
|
+
*
|
|
2531
|
+
* @returns Current metadata or null if not set
|
|
2532
|
+
*/
|
|
2533
|
+
getMetadata(): PageMetadata | null;
|
|
2534
|
+
/**
|
|
2535
|
+
* Subscribe to metadata changes
|
|
2536
|
+
*
|
|
2537
|
+
* @param callback - Function to call when metadata changes
|
|
2538
|
+
* @returns Unsubscribe function
|
|
2539
|
+
*/
|
|
2540
|
+
subscribe(callback: MetadataChangeCallback): () => void;
|
|
2541
|
+
/**
|
|
2542
|
+
* Clean up event listeners and subscriptions
|
|
2543
|
+
* Call this when the manager is no longer needed
|
|
2544
|
+
*/
|
|
2545
|
+
dispose(): void;
|
|
2546
|
+
}
|
|
2547
|
+
|
|
2548
|
+
type CapabilityURI = string;
|
|
2549
|
+
type DID = string;
|
|
2550
|
+
type ClaimCollectionURI = string;
|
|
2551
|
+
type EvaluationStatus = 'pending' | 'approved' | 'rejected';
|
|
2552
|
+
interface LinkedClaim {
|
|
2553
|
+
collectionId: ClaimCollectionURI;
|
|
2554
|
+
}
|
|
2555
|
+
interface ActivationCondition {
|
|
2556
|
+
upstreamNodeId: string;
|
|
2557
|
+
requiredStatus: EvaluationStatus;
|
|
2558
|
+
requireAuthorisedActor?: boolean;
|
|
2559
|
+
}
|
|
2560
|
+
interface FlowNodeAuthzExtension {
|
|
2561
|
+
parentCapability?: CapabilityURI;
|
|
2562
|
+
authorisedActors?: DID[];
|
|
2563
|
+
linkedClaim?: LinkedClaim;
|
|
2564
|
+
activationCondition?: ActivationCondition;
|
|
2565
|
+
}
|
|
2566
|
+
interface FlowNodeRuntimeState {
|
|
2567
|
+
claimId?: string;
|
|
2568
|
+
submittedByDid?: DID;
|
|
2569
|
+
evaluationStatus?: EvaluationStatus;
|
|
2570
|
+
executionTimestamp?: number;
|
|
2571
|
+
derivedUcan?: string;
|
|
2572
|
+
authorisedActorsSnapshot?: DID[];
|
|
2573
|
+
}
|
|
2574
|
+
interface FlowNodeBase {
|
|
2575
|
+
id: string;
|
|
2576
|
+
type: string;
|
|
2577
|
+
props: Record<string, any>;
|
|
2578
|
+
}
|
|
2579
|
+
type FlowNode = FlowNodeBase & FlowNodeAuthzExtension;
|
|
2580
|
+
|
|
2581
|
+
/**
|
|
2582
|
+
* Capability types for UCAN-based authorization
|
|
2583
|
+
*/
|
|
2584
|
+
interface Capability {
|
|
2585
|
+
/** Action that can be performed, e.g., "flow/execute", "flow/block/execute" */
|
|
2586
|
+
can: string;
|
|
2587
|
+
/** Resource URI, e.g., "ixo:flow:abc123", "ixo:flow:abc123:blockId" */
|
|
2588
|
+
with: string;
|
|
2589
|
+
/** Additional constraints (optional) */
|
|
2590
|
+
nb?: Record<string, any>;
|
|
2591
|
+
}
|
|
2592
|
+
interface SignedCapability {
|
|
2593
|
+
/** Unique identifier (CID or generated ID) */
|
|
2594
|
+
id: string;
|
|
2595
|
+
/** DID of the issuer (entity or user who signed) */
|
|
2596
|
+
issuer: string;
|
|
2597
|
+
/** DID of the recipient */
|
|
2598
|
+
audience: string;
|
|
2599
|
+
/** Capabilities being granted */
|
|
2600
|
+
capabilities: Capability[];
|
|
2601
|
+
/** IDs of parent capabilities in the chain (empty for root) */
|
|
2602
|
+
proofs: string[];
|
|
2603
|
+
/** Unix timestamp when capability expires (optional) */
|
|
2604
|
+
expiration?: number;
|
|
2605
|
+
/** ISO timestamp when created */
|
|
2606
|
+
issuedAt: string;
|
|
2607
|
+
/** Base64 encoded signature */
|
|
2608
|
+
signature: string;
|
|
2609
|
+
}
|
|
2610
|
+
interface CapabilityValidationResult {
|
|
2611
|
+
valid: boolean;
|
|
2612
|
+
error?: string;
|
|
2613
|
+
/** The full chain from root to the validated capability */
|
|
2614
|
+
chain?: SignedCapability[];
|
|
2615
|
+
}
|
|
2616
|
+
interface DelegationGrant {
|
|
2617
|
+
/** DID of recipient */
|
|
2618
|
+
audience: string;
|
|
2619
|
+
/** Display name of recipient (for UI) */
|
|
2620
|
+
audienceDisplayName?: string;
|
|
2621
|
+
/** Capabilities to grant */
|
|
2622
|
+
capabilities: Capability[];
|
|
2623
|
+
/** IDs of proof capabilities */
|
|
2624
|
+
proofs: string[];
|
|
2625
|
+
/** Expiration timestamp (optional) */
|
|
2626
|
+
expiration?: number;
|
|
2627
|
+
/** Whether recipient can further delegate */
|
|
2628
|
+
canDelegate?: boolean;
|
|
2629
|
+
}
|
|
2630
|
+
|
|
2631
|
+
/**
|
|
2632
|
+
* The schema type for the IXO editor, derived from block specs
|
|
2633
|
+
*/
|
|
2634
|
+
type IxoBlockSchema = BlockSchemaFromSpecs<typeof blockSpecs>;
|
|
2635
|
+
/**
|
|
2636
|
+
* Editor mode representing different use cases
|
|
2637
|
+
*/
|
|
2638
|
+
type EditorMode = 'flow' | 'template' | 'readonly';
|
|
2639
|
+
/**
|
|
2640
|
+
* Flow metadata stored in the Y.Doc root map
|
|
2641
|
+
*/
|
|
2642
|
+
interface FlowMetadata {
|
|
2643
|
+
'@context': string;
|
|
2644
|
+
_type: string;
|
|
2645
|
+
schema_version: string;
|
|
2646
|
+
doc_id: string;
|
|
2647
|
+
title: string;
|
|
2648
|
+
createdAt: string;
|
|
2649
|
+
createdBy: string;
|
|
2650
|
+
/** DID of the flow owner who has root signing authority */
|
|
2651
|
+
flowOwnerDid: string;
|
|
2652
|
+
}
|
|
2653
|
+
/**
|
|
2654
|
+
* Image data returned from publicFileUpload handler
|
|
2655
|
+
*/
|
|
2656
|
+
interface ImageData {
|
|
2657
|
+
url: string;
|
|
2658
|
+
cid: string;
|
|
2659
|
+
encrypted: string;
|
|
2660
|
+
proof: string;
|
|
2661
|
+
serviceEndpoint: string;
|
|
2662
|
+
mxc: string;
|
|
2663
|
+
}
|
|
2664
|
+
/**
|
|
2665
|
+
* Extended editor type that augments BlockNoteEditor with IXO-specific properties
|
|
2666
|
+
* and methods. This type should be used throughout the application instead of
|
|
2667
|
+
* the base BlockNoteEditor type.
|
|
2668
|
+
*
|
|
2669
|
+
* Type Parameters:
|
|
2670
|
+
* - BSchema: The block schema (defaults to IxoBlockSchema)
|
|
2671
|
+
* - ISchema: The inline content schema (uses BlockNote defaults)
|
|
2672
|
+
* - SSchema: The style schema (uses BlockNote defaults)
|
|
2673
|
+
*/
|
|
2674
|
+
interface IxoEditorType<BSchema extends IxoBlockSchema = IxoBlockSchema, ISchema extends InlineContentSchema = InlineContentSchema, SSchema extends StyleSchema = StyleSchema> extends BlockNoteEditor<BSchema, ISchema, SSchema> {
|
|
2675
|
+
/**
|
|
2676
|
+
* Configuration options for the editor
|
|
2677
|
+
* @internal
|
|
2678
|
+
*/
|
|
2679
|
+
_ixoConfig: IxoEditorConfig;
|
|
2680
|
+
/**
|
|
2681
|
+
* Y.Doc root map for collaborative metadata storage
|
|
2682
|
+
* @internal
|
|
2683
|
+
*/
|
|
2684
|
+
_yRoot?: Map<any>;
|
|
2685
|
+
/**
|
|
2686
|
+
* Y.Array for flow-specific structured block storage
|
|
2687
|
+
* @internal
|
|
2688
|
+
*/
|
|
2689
|
+
_yFlow?: Array$1<any>;
|
|
2690
|
+
/**
|
|
2691
|
+
* Y.Map for runtime per-node state (claim status, timestamps, etc.)
|
|
2692
|
+
* @internal
|
|
2693
|
+
*/
|
|
2694
|
+
_yRuntime?: Map<any>;
|
|
2695
|
+
/**
|
|
2696
|
+
* Y.Map for storing capability delegations
|
|
2697
|
+
* @internal
|
|
2698
|
+
*/
|
|
2699
|
+
_yDelegations?: Map<any>;
|
|
2700
|
+
/**
|
|
2701
|
+
* Current editor mode (flow, template, readonly)
|
|
2702
|
+
*/
|
|
2703
|
+
mode?: EditorMode;
|
|
2704
|
+
/**
|
|
2705
|
+
* Current user information (for collaborative editing)
|
|
2706
|
+
*/
|
|
2707
|
+
user?: IxoCollaborativeUser;
|
|
2708
|
+
/**
|
|
2709
|
+
* Document type (template, flow, page)
|
|
2710
|
+
* This is a local prop-based value, NOT synced via CRDT
|
|
2711
|
+
*/
|
|
2712
|
+
docType?: 'template' | 'flow' | 'page';
|
|
2713
|
+
/**
|
|
2714
|
+
* Get user-specific properties for a block
|
|
2715
|
+
* @param block - The block to get user properties for
|
|
2716
|
+
* @returns User-specific properties object
|
|
2717
|
+
*/
|
|
2718
|
+
getUserProps?: (block: any) => Record<string, any>;
|
|
2719
|
+
/**
|
|
2720
|
+
* Update user-specific properties for a block
|
|
2721
|
+
* @param block - The block to update
|
|
2722
|
+
* @param updates - Properties to update
|
|
2723
|
+
*/
|
|
2724
|
+
updateUserProps?: (block: any, updates: Record<string, any>) => void;
|
|
2725
|
+
/**
|
|
2726
|
+
* Get flow-level metadata
|
|
2727
|
+
* @returns Flow metadata object
|
|
2728
|
+
*/
|
|
2729
|
+
getFlowMetadata?: () => FlowMetadata;
|
|
2730
|
+
/**
|
|
2731
|
+
* Update flow-level metadata
|
|
2732
|
+
* @param updates - Metadata fields to update
|
|
2733
|
+
*/
|
|
2734
|
+
updateFlowMetadata?: (updates: Partial<FlowMetadata>) => void;
|
|
2735
|
+
/**
|
|
2736
|
+
* Get the DID of the flow owner (who has root signing authority)
|
|
2737
|
+
* @returns Flow owner DID or empty string if not set
|
|
2738
|
+
*/
|
|
2739
|
+
getFlowOwnerDid?: () => string;
|
|
2740
|
+
/**
|
|
2741
|
+
* Get the flow array (structured block storage)
|
|
2742
|
+
* @returns Array of flow blocks
|
|
2743
|
+
*/
|
|
2744
|
+
getFlow?: () => any[];
|
|
2745
|
+
/**
|
|
2746
|
+
* Retrieve a flow node by id from the structured flow array if available.
|
|
2747
|
+
*/
|
|
2748
|
+
getFlowNode?: (nodeId: string) => FlowNode | null;
|
|
2749
|
+
/**
|
|
2750
|
+
* Get a delegation by ID
|
|
2751
|
+
*/
|
|
2752
|
+
getDelegation?: (capabilityId: string) => SignedCapability | null;
|
|
2753
|
+
/**
|
|
2754
|
+
* Store a delegation
|
|
2755
|
+
*/
|
|
2756
|
+
setDelegation?: (capability: SignedCapability) => void;
|
|
2757
|
+
/**
|
|
2758
|
+
* Get the root capability for this flow
|
|
2759
|
+
*/
|
|
2760
|
+
getRootCapability?: () => SignedCapability | null;
|
|
2761
|
+
/**
|
|
2762
|
+
* Set the root capability ID
|
|
2763
|
+
*/
|
|
2764
|
+
setRootCapabilityId?: (capabilityId: string) => void;
|
|
2765
|
+
/**
|
|
2766
|
+
* Get all delegations as array
|
|
2767
|
+
*/
|
|
2768
|
+
getAllDelegations?: () => SignedCapability[];
|
|
2769
|
+
/**
|
|
2770
|
+
* Remove a delegation (revoke)
|
|
2771
|
+
*/
|
|
2772
|
+
removeDelegation?: (capabilityId: string) => void;
|
|
2773
|
+
/**
|
|
2774
|
+
* Matrix metadata manager for page metadata (cover, icon)
|
|
2775
|
+
* @internal
|
|
2776
|
+
*/
|
|
2777
|
+
_metadataManager?: MatrixMetadataManager;
|
|
2778
|
+
/**
|
|
2779
|
+
* Set page metadata (cover image and/or icon)
|
|
2780
|
+
* @param metadata - Partial metadata to update (merges with existing)
|
|
2781
|
+
* @returns Promise that resolves when metadata is updated
|
|
2782
|
+
*/
|
|
2783
|
+
setPageMetadata?: (metadata: Partial<PageMetadata>) => Promise<void>;
|
|
2784
|
+
/**
|
|
2785
|
+
* Get current page metadata (cover image and icon)
|
|
2786
|
+
* @returns Current metadata or null if not set
|
|
2787
|
+
*/
|
|
2788
|
+
getPageMetadata?: () => PageMetadata | null;
|
|
2789
|
+
/**
|
|
2790
|
+
* @deprecated Use setPageMetadata({ cover: imageData }) instead
|
|
2791
|
+
*/
|
|
2792
|
+
setCoverImage?: (imageData?: ImageData) => void;
|
|
2793
|
+
/**
|
|
2794
|
+
* @deprecated Use getPageMetadata()?.cover instead
|
|
2795
|
+
*/
|
|
2796
|
+
getCoverImage?: () => ImageData | undefined;
|
|
2797
|
+
/**
|
|
2798
|
+
* @deprecated Use setPageMetadata({ icon: imageData }) instead
|
|
2799
|
+
*/
|
|
2800
|
+
setLogo?: (imageData?: ImageData) => void;
|
|
2801
|
+
/**
|
|
2802
|
+
* @deprecated Use getPageMetadata()?.icon instead
|
|
2803
|
+
*/
|
|
2804
|
+
getLogo?: () => ImageData | undefined;
|
|
2805
|
+
}
|
|
2806
|
+
/**
|
|
2807
|
+
* Re-map BlockNote renderer props to use IxoEditorType instead of BlockNoteEditor.
|
|
2808
|
+
* This is used in block renderers to ensure they receive the augmented editor type.
|
|
2809
|
+
*
|
|
2810
|
+
* @example
|
|
2811
|
+
* ```typescript
|
|
2812
|
+
* export function MyBlock(props: IxoBlockProps) {
|
|
2813
|
+
* const { block, editor } = props;
|
|
2814
|
+
* // editor is now IxoEditorType with full type safety
|
|
2815
|
+
* console.log(editor.user?.name);
|
|
2816
|
+
* }
|
|
2817
|
+
* ```
|
|
2818
|
+
*/
|
|
2819
|
+
interface IxoBlockProps<TBlock = any> {
|
|
2820
|
+
editor: IxoEditorType;
|
|
2821
|
+
block: TBlock;
|
|
2822
|
+
}
|
|
2823
|
+
|
|
2824
|
+
type IxoEditorTheme = 'light' | 'dark';
|
|
2825
|
+
interface IxoEditorOptions {
|
|
2826
|
+
/**
|
|
2827
|
+
* The color theme for the editor
|
|
2828
|
+
* @default 'light'
|
|
2829
|
+
*/
|
|
2830
|
+
theme?: IxoEditorTheme;
|
|
2831
|
+
/**
|
|
2832
|
+
* Function to handle file uploads
|
|
2833
|
+
*/
|
|
2834
|
+
uploadFile?: (file: File) => Promise<string>;
|
|
2835
|
+
/**
|
|
2836
|
+
* Initial content for the editor
|
|
2837
|
+
*/
|
|
2838
|
+
initialContent?: PartialBlock[];
|
|
2839
|
+
/**
|
|
2840
|
+
* Whether the editor is editable
|
|
2841
|
+
* @default true
|
|
2842
|
+
*/
|
|
2843
|
+
editable?: boolean;
|
|
2844
|
+
/**
|
|
2845
|
+
* Whether to show the side menu (drag handle, plus button)
|
|
2846
|
+
* @default true
|
|
2847
|
+
*/
|
|
2848
|
+
sideMenu?: boolean;
|
|
2849
|
+
/**
|
|
2850
|
+
* Whether to enable the slash menu
|
|
2851
|
+
* @default true
|
|
2852
|
+
*/
|
|
2853
|
+
slashMenu?: boolean;
|
|
2854
|
+
/**
|
|
2855
|
+
* Whether to show the formatting toolbar
|
|
2856
|
+
* @default true
|
|
2857
|
+
*/
|
|
2858
|
+
formattingToolbar?: boolean;
|
|
2859
|
+
/**
|
|
2860
|
+
* Whether to show the link toolbar
|
|
2861
|
+
* @default true
|
|
2862
|
+
*/
|
|
2863
|
+
linkToolbar?: boolean;
|
|
2864
|
+
/**
|
|
2865
|
+
* Whether to show the file panel
|
|
2866
|
+
* @default true
|
|
2867
|
+
*/
|
|
2868
|
+
filePanel?: boolean;
|
|
2869
|
+
/**
|
|
2870
|
+
* Whether to show table handles
|
|
2871
|
+
* @default true
|
|
2872
|
+
*/
|
|
2873
|
+
tableHandles?: boolean;
|
|
2874
|
+
/**
|
|
2875
|
+
* Document type (template, flow, page)
|
|
2876
|
+
* This is a local prop and NOT synced via CRDT
|
|
2877
|
+
* @default 'flow'
|
|
2878
|
+
*/
|
|
2879
|
+
docType?: 'template' | 'flow' | 'page';
|
|
2880
|
+
}
|
|
2881
|
+
interface IxoCollaborativeUser {
|
|
2882
|
+
name: string;
|
|
2883
|
+
color: string;
|
|
2884
|
+
accessToken: string;
|
|
2885
|
+
address: string;
|
|
2886
|
+
id: string;
|
|
2887
|
+
}
|
|
2888
|
+
interface IxoCollaborativeEditorPermissions {
|
|
2889
|
+
/**
|
|
2890
|
+
* Whether the user has write permissions
|
|
2891
|
+
* @default false
|
|
2892
|
+
*/
|
|
2893
|
+
write: boolean;
|
|
2894
|
+
}
|
|
2895
|
+
interface IxoCollaborativeEditorOptions extends IxoEditorOptions {
|
|
2896
|
+
user: IxoCollaborativeUser;
|
|
2897
|
+
matrixClient: MatrixClient;
|
|
2898
|
+
roomId: string;
|
|
2899
|
+
/**
|
|
2900
|
+
* User permissions for the collaborative document
|
|
2901
|
+
* @default { write: false }
|
|
2902
|
+
*/
|
|
2903
|
+
permissions?: IxoCollaborativeEditorPermissions;
|
|
2904
|
+
/**
|
|
2905
|
+
* Unique identifier for the document/flow
|
|
2906
|
+
*/
|
|
2907
|
+
docId?: string;
|
|
2908
|
+
/**
|
|
2909
|
+
* Title of the flow document
|
|
2910
|
+
*/
|
|
2911
|
+
title?: string;
|
|
2912
|
+
}
|
|
2913
|
+
interface IxoEditorConfig {
|
|
2914
|
+
theme: IxoEditorTheme;
|
|
2915
|
+
editable: boolean;
|
|
2916
|
+
sideMenu: boolean;
|
|
2917
|
+
slashMenu: boolean;
|
|
2918
|
+
formattingToolbar: boolean;
|
|
2919
|
+
linkToolbar: boolean;
|
|
2920
|
+
filePanel: boolean;
|
|
2921
|
+
tableHandles: boolean;
|
|
2922
|
+
}
|
|
2923
|
+
|
|
2924
|
+
/**
|
|
2925
|
+
* Custom hook that wraps useCreateBlockNote with IXO-specific configurations (Mantine version)
|
|
2926
|
+
* @param options - Configuration options for the IxoEditor
|
|
2927
|
+
* @returns A configured IxoEditor instance with augmented type properties
|
|
2928
|
+
*/
|
|
2929
|
+
declare function useCreateIxoEditor(options?: IxoEditorOptions): IxoEditorType | undefined;
|
|
2930
|
+
|
|
2931
|
+
/**
|
|
2932
|
+
* Custom hook that wraps useCreateBlockNote with IXO-specific configurations (Mantine version)
|
|
2933
|
+
* @param options - Configuration options for the IxoEditor
|
|
2934
|
+
* @returns A configured collaborative IxoEditor instance with augmented type properties
|
|
2935
|
+
*/
|
|
2936
|
+
declare function useCreateCollaborativeIxoEditor(options: IxoCollaborativeEditorOptions): {
|
|
2937
|
+
editor: IxoEditorType | undefined;
|
|
2938
|
+
connectionStatus: string;
|
|
2939
|
+
title: Text;
|
|
2940
|
+
yDoc: Doc;
|
|
2941
|
+
root: Map<any>;
|
|
2942
|
+
flowArray: Array$1<any>;
|
|
2943
|
+
};
|
|
2944
|
+
|
|
2945
|
+
interface PageHeaderMenuItem {
|
|
2946
|
+
label: string;
|
|
2947
|
+
onClick: () => void;
|
|
2948
|
+
icon?: React.ReactNode;
|
|
2949
|
+
disabled?: boolean;
|
|
2950
|
+
divider?: boolean;
|
|
2951
|
+
}
|
|
2952
|
+
interface PageHeaderProps {
|
|
2953
|
+
title?: string;
|
|
2954
|
+
icon?: React.ReactNode;
|
|
2955
|
+
isPrivate?: boolean;
|
|
2956
|
+
lastEdited?: string;
|
|
2957
|
+
onShare?: () => void;
|
|
2958
|
+
onFavorite?: () => void;
|
|
2959
|
+
isFavorited?: boolean;
|
|
2960
|
+
menuItems?: PageHeaderMenuItem[];
|
|
2961
|
+
}
|
|
2962
|
+
/**
|
|
2963
|
+
* PageHeader component - A Notion-style page header with title, privacy badge, and actions
|
|
2964
|
+
*/
|
|
2965
|
+
declare function PageHeader({ title, icon, isPrivate, lastEdited, onShare, onFavorite, isFavorited, menuItems, }: PageHeaderProps): React.ReactElement;
|
|
2966
|
+
|
|
2967
|
+
interface IxoEditorProps {
|
|
2968
|
+
editor: IxoEditorType | undefined;
|
|
2969
|
+
editable?: boolean;
|
|
2970
|
+
className?: string;
|
|
2971
|
+
onChange?: () => void;
|
|
2972
|
+
onSelectionChange?: () => void;
|
|
2973
|
+
children?: React.ReactNode;
|
|
2974
|
+
mantineTheme?: any;
|
|
2975
|
+
handlers?: BlocknoteHandlers;
|
|
2976
|
+
blockRequirements?: BlockRequirements;
|
|
2977
|
+
isPanelVisible?: boolean;
|
|
2978
|
+
coverImageUrl?: string;
|
|
2979
|
+
logoUrl?: string;
|
|
2980
|
+
selfNav?: boolean;
|
|
2981
|
+
pageHeaderProps?: Omit<PageHeaderProps, 'children'>;
|
|
2982
|
+
}
|
|
2983
|
+
/**
|
|
2984
|
+
* IxoEditor component - A customized BlockNote editor for IXO (Mantine UI)
|
|
2985
|
+
*/
|
|
2986
|
+
declare function IxoEditor({ editor, editable, className, onChange, onSelectionChange, children, mantineTheme, handlers, blockRequirements, isPanelVisible, coverImageUrl, logoUrl, selfNav, pageHeaderProps, }: IxoEditorProps): React.ReactElement | null;
|
|
2987
|
+
|
|
2988
|
+
interface CoverImageProps {
|
|
2989
|
+
coverImageUrl?: string;
|
|
2990
|
+
logoUrl?: string;
|
|
2991
|
+
}
|
|
2992
|
+
/**
|
|
2993
|
+
* CoverImage component - Notion-like cover image with logo
|
|
2994
|
+
*/
|
|
2995
|
+
declare function CoverImage({ coverImageUrl, logoUrl }: CoverImageProps): React.ReactElement | null;
|
|
2996
|
+
|
|
2997
|
+
type AuthorizationTabState = {
|
|
2998
|
+
parentCapability: string;
|
|
2999
|
+
authorisedActors: string;
|
|
3000
|
+
activationUpstreamNodeId: string;
|
|
3001
|
+
activationRequiredStatus: 'pending' | 'approved' | 'rejected' | '';
|
|
3002
|
+
activationRequireAuthorisedActor: boolean;
|
|
3003
|
+
};
|
|
3004
|
+
interface AuthorizationTabProps extends IxoBlockProps {
|
|
3005
|
+
/** Flow URI for capability scoping */
|
|
3006
|
+
flowUri?: string;
|
|
3007
|
+
/** Entity DID that owns this flow */
|
|
3008
|
+
entityDid?: string;
|
|
3009
|
+
/** Flow permissions (actors with flow-level access) */
|
|
3010
|
+
flowActors?: Array<{
|
|
3011
|
+
did: string;
|
|
3012
|
+
displayName: string;
|
|
3013
|
+
}>;
|
|
3014
|
+
/** Callback to open flow permissions panel */
|
|
3015
|
+
onOpenFlowPermissions?: () => void;
|
|
3016
|
+
}
|
|
3017
|
+
declare const AuthorizationTab: React.FC<AuthorizationTabProps>;
|
|
3018
|
+
|
|
3019
|
+
type EvaluationTabState = {
|
|
3020
|
+
linkedClaimCollectionId: string;
|
|
3021
|
+
};
|
|
3022
|
+
interface EvaluationTabProps extends IxoBlockProps {
|
|
3023
|
+
}
|
|
3024
|
+
declare const EvaluationTab: React.FC<EvaluationTabProps>;
|
|
3025
|
+
|
|
3026
|
+
interface EntitySigningSetupProps {
|
|
3027
|
+
opened: boolean;
|
|
3028
|
+
onClose: () => void;
|
|
3029
|
+
entityDid: string;
|
|
3030
|
+
entityName?: string;
|
|
3031
|
+
onSetup: (pin: string) => Promise<{
|
|
3032
|
+
success: boolean;
|
|
3033
|
+
error?: string;
|
|
3034
|
+
}>;
|
|
3035
|
+
}
|
|
3036
|
+
declare const EntitySigningSetup: React.FC<EntitySigningSetupProps>;
|
|
3037
|
+
|
|
3038
|
+
interface FlowPermissionsPanelProps {
|
|
3039
|
+
editor: IxoEditorType;
|
|
3040
|
+
entityDid: string;
|
|
3041
|
+
entityName?: string;
|
|
3042
|
+
currentUserDid: string;
|
|
3043
|
+
onGrantPermission: () => void;
|
|
3044
|
+
onRevokePermission: (capabilityId: string) => Promise<void>;
|
|
3045
|
+
getUserDisplayName?: (did: string) => Promise<string>;
|
|
3046
|
+
}
|
|
3047
|
+
declare const FlowPermissionsPanel: React.FC<FlowPermissionsPanelProps>;
|
|
3048
|
+
|
|
3049
|
+
interface GrantPermissionModalProps {
|
|
3050
|
+
opened: boolean;
|
|
3051
|
+
onClose: () => void;
|
|
3052
|
+
flowUri: string;
|
|
3053
|
+
/** Blocks available for scope selection. If single block, scope UI is hidden. */
|
|
3054
|
+
blocks: Array<{
|
|
3055
|
+
id: string;
|
|
3056
|
+
type: string;
|
|
3057
|
+
name?: string;
|
|
3058
|
+
}>;
|
|
3059
|
+
/** Optional: specific block to grant permission for (hides scope selection) */
|
|
3060
|
+
targetBlockId?: string;
|
|
3061
|
+
searchUsers: (query: string) => Promise<Array<{
|
|
3062
|
+
did: string;
|
|
3063
|
+
displayName: string;
|
|
3064
|
+
avatarUrl?: string;
|
|
3065
|
+
}>>;
|
|
3066
|
+
getOracles?: () => Promise<Array<{
|
|
3067
|
+
did: string;
|
|
3068
|
+
name: string;
|
|
3069
|
+
}>>;
|
|
3070
|
+
onGrant: (grant: DelegationGrant, pin: string) => Promise<{
|
|
3071
|
+
success: boolean;
|
|
3072
|
+
error?: string;
|
|
3073
|
+
}>;
|
|
3074
|
+
}
|
|
3075
|
+
declare const GrantPermissionModal: React.FC<GrantPermissionModalProps>;
|
|
3076
|
+
|
|
3077
|
+
/**
|
|
3078
|
+
* GraphQL queries and types for IXO network
|
|
3079
|
+
*/
|
|
3080
|
+
interface Entity {
|
|
3081
|
+
context: string;
|
|
3082
|
+
relayerNode: string;
|
|
3083
|
+
controller: string;
|
|
3084
|
+
id: string;
|
|
3085
|
+
type: string;
|
|
3086
|
+
startDate: string;
|
|
3087
|
+
endDate: string;
|
|
3088
|
+
metadata: string;
|
|
3089
|
+
linkedResource: any[];
|
|
3090
|
+
settings: Record<string, Record<string, any>>;
|
|
3091
|
+
service: string;
|
|
3092
|
+
externalId: string;
|
|
3093
|
+
}
|
|
3094
|
+
interface EntityResponse {
|
|
3095
|
+
entity: Entity;
|
|
3096
|
+
}
|
|
3097
|
+
interface EntityVariables {
|
|
3098
|
+
entityId: string;
|
|
3099
|
+
}
|
|
3100
|
+
/**
|
|
3101
|
+
* Fetches entity data by ID from the IXO network
|
|
3102
|
+
* @param entityId - The unique identifier for the entity
|
|
3103
|
+
* @returns Promise resolving to the entity data
|
|
3104
|
+
*/
|
|
3105
|
+
declare function getEntity(entityId: string): Promise<Entity>;
|
|
3106
|
+
|
|
3107
|
+
/**
|
|
3108
|
+
* Lightweight GraphQL client for IXO network queries
|
|
3109
|
+
*/
|
|
3110
|
+
interface GraphQLResponse<T = any> {
|
|
3111
|
+
data?: T;
|
|
3112
|
+
errors?: Array<{
|
|
3113
|
+
message: string;
|
|
3114
|
+
locations?: Array<{
|
|
3115
|
+
line: number;
|
|
3116
|
+
column: number;
|
|
3117
|
+
}>;
|
|
3118
|
+
path?: Array<string | number>;
|
|
3119
|
+
}>;
|
|
3120
|
+
}
|
|
3121
|
+
interface GraphQLRequest {
|
|
3122
|
+
query: string;
|
|
3123
|
+
variables?: Record<string, any>;
|
|
3124
|
+
operationName?: string;
|
|
3125
|
+
}
|
|
3126
|
+
declare class GraphQLClient {
|
|
3127
|
+
private endpoint;
|
|
3128
|
+
private headers;
|
|
3129
|
+
constructor(endpoint: string, headers?: Record<string, string>);
|
|
3130
|
+
request<T = any>(request: GraphQLRequest): Promise<T>;
|
|
3131
|
+
}
|
|
3132
|
+
declare const ixoGraphQLClient: GraphQLClient;
|
|
3133
|
+
|
|
3134
|
+
export { type VoteResponse as $, AuthorizationTab as A, type OverviewBlockProps as B, type Capability as C, type DelegationGrant as D, type EvaluationStatus as E, type FlowNode as F, GrantPermissionModal as G, type ProposalBlockProps as H, type IxoEditorType as I, type ApiRequestBlockProps as J, type HttpMethod as K, ListBlockSpec as L, type KeyValuePair as M, BlocknoteProvider as N, OverviewBlock as O, ProposalBlockSpec as P, useBlocknoteContext as Q, useBlocknoteHandlers as R, type SignedCapability as S, StakeType as T, AuthzExecActionTypes as U, ValidatorActionType as V, type BlocknoteHandlers as W, type BlocknoteContextValue as X, type BlockRequirements as Y, type ProposalResponse as Z, type SingleChoiceProposal as _, type FlowNodeAuthzExtension as a, type VoteInfo as a0, type Vote as a1, type User as a2, type Addr as a3, type Uint128 as a4, type Timestamp as a5, type Expiration as a6, type Status as a7, type Threshold as a8, type Votes as a9, type CosmosMsgForEmpty as aa, type ProposalAction as ab, getEntity as ac, type Entity as ad, type EntityResponse as ae, type EntityVariables as af, GraphQLClient as ag, ixoGraphQLClient as ah, type GraphQLResponse as ai, type GraphQLRequest as aj, PageHeader as ak, type PageHeaderProps as al, type PageHeaderMenuItem as am, type FlowNodeRuntimeState as b, type CapabilityValidationResult as c, useCreateCollaborativeIxoEditor as d, IxoEditor as e, type IxoEditorProps as f, CoverImage as g, type CoverImageProps as h, type AuthorizationTabState as i, EvaluationTab as j, type EvaluationTabState as k, EntitySigningSetup as l, FlowPermissionsPanel as m, type IxoEditorOptions as n, type IxoEditorTheme as o, type IxoEditorConfig as p, type IxoCollaborativeUser as q, type IxoCollaborativeEditorOptions as r, CheckboxBlockSpec as s, ApiRequestBlockSpec as t, useCreateIxoEditor as u, blockSpecs as v, getExtraSlashMenuItems as w, type CheckboxBlockProps as x, type ListBlockSettings as y, type ListBlockProps as z };
|