@junobuild/storage 0.2.2 → 0.2.4-next-2025-08-11
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/dist/browser/index.js +1 -1
- package/dist/browser/index.js.map +4 -4
- package/dist/node/index.mjs +1 -1
- package/dist/node/index.mjs.map +4 -4
- package/dist/types/api/actor.factory.d.ts +3 -0
- package/dist/types/constants/upload.constants.d.ts +1 -0
- package/dist/types/index.d.ts +3 -2
- package/dist/types/services/upload.services.d.ts +41 -0
- package/dist/types/types/{storage.types.d.ts → storage.d.ts} +2 -2
- package/dist/types/types/upload.d.ts +5 -0
- package/package.json +9 -8
- package/dist/declarations/console/console.did.d.ts +0 -299
- package/dist/declarations/console/console.factory.certified.did.js +0 -314
- package/dist/declarations/console/console.factory.did.js +0 -314
- package/dist/declarations/console/console.factory.did.mjs +0 -314
- package/dist/declarations/satellite/satellite.did.d.ts +0 -365
- package/dist/declarations/satellite/satellite.factory.certified.did.js +0 -388
- package/dist/declarations/satellite/satellite.factory.did.js +0 -388
- package/dist/declarations/satellite/satellite.factory.did.mjs +0 -388
- package/dist/types/api/storage.api.d.ts +0 -15
|
@@ -1,314 +0,0 @@
|
|
|
1
|
-
// @ts-ignore
|
|
2
|
-
export const idlFactory = ({IDL}) => {
|
|
3
|
-
const Tokens = IDL.Record({e8s: IDL.Nat64});
|
|
4
|
-
const AssertMissionControlCenterArgs = IDL.Record({
|
|
5
|
-
mission_control_id: IDL.Principal,
|
|
6
|
-
user: IDL.Principal
|
|
7
|
-
});
|
|
8
|
-
const CommitBatch = IDL.Record({
|
|
9
|
-
batch_id: IDL.Nat,
|
|
10
|
-
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
11
|
-
chunk_ids: IDL.Vec(IDL.Nat)
|
|
12
|
-
});
|
|
13
|
-
const CommitProposal = IDL.Record({
|
|
14
|
-
sha256: IDL.Vec(IDL.Nat8),
|
|
15
|
-
proposal_id: IDL.Nat
|
|
16
|
-
});
|
|
17
|
-
const CreateCanisterArgs = IDL.Record({
|
|
18
|
-
block_index: IDL.Opt(IDL.Nat64),
|
|
19
|
-
subnet_id: IDL.Opt(IDL.Principal),
|
|
20
|
-
user: IDL.Principal
|
|
21
|
-
});
|
|
22
|
-
const DeleteControllersArgs = IDL.Record({
|
|
23
|
-
controllers: IDL.Vec(IDL.Principal)
|
|
24
|
-
});
|
|
25
|
-
const DeleteProposalAssets = IDL.Record({
|
|
26
|
-
proposal_ids: IDL.Vec(IDL.Nat)
|
|
27
|
-
});
|
|
28
|
-
const StorageConfigIFrame = IDL.Variant({
|
|
29
|
-
Deny: IDL.Null,
|
|
30
|
-
AllowAny: IDL.Null,
|
|
31
|
-
SameOrigin: IDL.Null
|
|
32
|
-
});
|
|
33
|
-
const ConfigMaxMemorySize = IDL.Record({
|
|
34
|
-
stable: IDL.Opt(IDL.Nat64),
|
|
35
|
-
heap: IDL.Opt(IDL.Nat64)
|
|
36
|
-
});
|
|
37
|
-
const StorageConfigRawAccess = IDL.Variant({
|
|
38
|
-
Deny: IDL.Null,
|
|
39
|
-
Allow: IDL.Null
|
|
40
|
-
});
|
|
41
|
-
const StorageConfigRedirect = IDL.Record({
|
|
42
|
-
status_code: IDL.Nat16,
|
|
43
|
-
location: IDL.Text
|
|
44
|
-
});
|
|
45
|
-
const StorageConfig = IDL.Record({
|
|
46
|
-
iframe: IDL.Opt(StorageConfigIFrame),
|
|
47
|
-
rewrites: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
48
|
-
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)))),
|
|
49
|
-
max_memory_size: IDL.Opt(ConfigMaxMemorySize),
|
|
50
|
-
raw_access: IDL.Opt(StorageConfigRawAccess),
|
|
51
|
-
redirects: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, StorageConfigRedirect)))
|
|
52
|
-
});
|
|
53
|
-
const Config = IDL.Record({storage: StorageConfig});
|
|
54
|
-
const GetCreateCanisterFeeArgs = IDL.Record({user: IDL.Principal});
|
|
55
|
-
const ProposalStatus = IDL.Variant({
|
|
56
|
-
Initialized: IDL.Null,
|
|
57
|
-
Failed: IDL.Null,
|
|
58
|
-
Open: IDL.Null,
|
|
59
|
-
Rejected: IDL.Null,
|
|
60
|
-
Executed: IDL.Null,
|
|
61
|
-
Accepted: IDL.Null
|
|
62
|
-
});
|
|
63
|
-
const AssetsUpgradeOptions = IDL.Record({
|
|
64
|
-
clear_existing_assets: IDL.Opt(IDL.Bool)
|
|
65
|
-
});
|
|
66
|
-
const SegmentsDeploymentOptions = IDL.Record({
|
|
67
|
-
orbiter: IDL.Opt(IDL.Text),
|
|
68
|
-
mission_control_version: IDL.Opt(IDL.Text),
|
|
69
|
-
satellite_version: IDL.Opt(IDL.Text)
|
|
70
|
-
});
|
|
71
|
-
const ProposalType = IDL.Variant({
|
|
72
|
-
AssetsUpgrade: AssetsUpgradeOptions,
|
|
73
|
-
SegmentsDeployment: SegmentsDeploymentOptions
|
|
74
|
-
});
|
|
75
|
-
const Proposal = IDL.Record({
|
|
76
|
-
status: ProposalStatus,
|
|
77
|
-
updated_at: IDL.Nat64,
|
|
78
|
-
sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
79
|
-
executed_at: IDL.Opt(IDL.Nat64),
|
|
80
|
-
owner: IDL.Principal,
|
|
81
|
-
created_at: IDL.Nat64,
|
|
82
|
-
version: IDL.Opt(IDL.Nat64),
|
|
83
|
-
proposal_type: ProposalType
|
|
84
|
-
});
|
|
85
|
-
const MissionControl = IDL.Record({
|
|
86
|
-
updated_at: IDL.Nat64,
|
|
87
|
-
credits: Tokens,
|
|
88
|
-
mission_control_id: IDL.Opt(IDL.Principal),
|
|
89
|
-
owner: IDL.Principal,
|
|
90
|
-
created_at: IDL.Nat64
|
|
91
|
-
});
|
|
92
|
-
const HttpRequest = IDL.Record({
|
|
93
|
-
url: IDL.Text,
|
|
94
|
-
method: IDL.Text,
|
|
95
|
-
body: IDL.Vec(IDL.Nat8),
|
|
96
|
-
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
97
|
-
certificate_version: IDL.Opt(IDL.Nat16)
|
|
98
|
-
});
|
|
99
|
-
const Memory = IDL.Variant({Heap: IDL.Null, Stable: IDL.Null});
|
|
100
|
-
const StreamingCallbackToken = IDL.Record({
|
|
101
|
-
memory: Memory,
|
|
102
|
-
token: IDL.Opt(IDL.Text),
|
|
103
|
-
sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
104
|
-
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
105
|
-
index: IDL.Nat64,
|
|
106
|
-
encoding_type: IDL.Text,
|
|
107
|
-
full_path: IDL.Text
|
|
108
|
-
});
|
|
109
|
-
const StreamingStrategy = IDL.Variant({
|
|
110
|
-
Callback: IDL.Record({
|
|
111
|
-
token: StreamingCallbackToken,
|
|
112
|
-
callback: IDL.Func([], [], ['query'])
|
|
113
|
-
})
|
|
114
|
-
});
|
|
115
|
-
const HttpResponse = IDL.Record({
|
|
116
|
-
body: IDL.Vec(IDL.Nat8),
|
|
117
|
-
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
118
|
-
streaming_strategy: IDL.Opt(StreamingStrategy),
|
|
119
|
-
status_code: IDL.Nat16
|
|
120
|
-
});
|
|
121
|
-
const StreamingCallbackHttpResponse = IDL.Record({
|
|
122
|
-
token: IDL.Opt(StreamingCallbackToken),
|
|
123
|
-
body: IDL.Vec(IDL.Nat8)
|
|
124
|
-
});
|
|
125
|
-
const InitAssetKey = IDL.Record({
|
|
126
|
-
token: IDL.Opt(IDL.Text),
|
|
127
|
-
collection: IDL.Text,
|
|
128
|
-
name: IDL.Text,
|
|
129
|
-
description: IDL.Opt(IDL.Text),
|
|
130
|
-
encoding_type: IDL.Opt(IDL.Text),
|
|
131
|
-
full_path: IDL.Text
|
|
132
|
-
});
|
|
133
|
-
const InitUploadResult = IDL.Record({batch_id: IDL.Nat});
|
|
134
|
-
const ListOrderField = IDL.Variant({
|
|
135
|
-
UpdatedAt: IDL.Null,
|
|
136
|
-
Keys: IDL.Null,
|
|
137
|
-
CreatedAt: IDL.Null
|
|
138
|
-
});
|
|
139
|
-
const ListOrder = IDL.Record({field: ListOrderField, desc: IDL.Bool});
|
|
140
|
-
const TimestampMatcher = IDL.Variant({
|
|
141
|
-
Equal: IDL.Nat64,
|
|
142
|
-
Between: IDL.Tuple(IDL.Nat64, IDL.Nat64),
|
|
143
|
-
GreaterThan: IDL.Nat64,
|
|
144
|
-
LessThan: IDL.Nat64
|
|
145
|
-
});
|
|
146
|
-
const ListMatcher = IDL.Record({
|
|
147
|
-
key: IDL.Opt(IDL.Text),
|
|
148
|
-
updated_at: IDL.Opt(TimestampMatcher),
|
|
149
|
-
description: IDL.Opt(IDL.Text),
|
|
150
|
-
created_at: IDL.Opt(TimestampMatcher)
|
|
151
|
-
});
|
|
152
|
-
const ListPaginate = IDL.Record({
|
|
153
|
-
start_after: IDL.Opt(IDL.Text),
|
|
154
|
-
limit: IDL.Opt(IDL.Nat64)
|
|
155
|
-
});
|
|
156
|
-
const ListParams = IDL.Record({
|
|
157
|
-
order: IDL.Opt(ListOrder),
|
|
158
|
-
owner: IDL.Opt(IDL.Principal),
|
|
159
|
-
matcher: IDL.Opt(ListMatcher),
|
|
160
|
-
paginate: IDL.Opt(ListPaginate)
|
|
161
|
-
});
|
|
162
|
-
const AssetKey = IDL.Record({
|
|
163
|
-
token: IDL.Opt(IDL.Text),
|
|
164
|
-
collection: IDL.Text,
|
|
165
|
-
owner: IDL.Principal,
|
|
166
|
-
name: IDL.Text,
|
|
167
|
-
description: IDL.Opt(IDL.Text),
|
|
168
|
-
full_path: IDL.Text
|
|
169
|
-
});
|
|
170
|
-
const AssetEncodingNoContent = IDL.Record({
|
|
171
|
-
modified: IDL.Nat64,
|
|
172
|
-
sha256: IDL.Vec(IDL.Nat8),
|
|
173
|
-
total_length: IDL.Nat
|
|
174
|
-
});
|
|
175
|
-
const AssetNoContent = IDL.Record({
|
|
176
|
-
key: AssetKey,
|
|
177
|
-
updated_at: IDL.Nat64,
|
|
178
|
-
encodings: IDL.Vec(IDL.Tuple(IDL.Text, AssetEncodingNoContent)),
|
|
179
|
-
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
180
|
-
created_at: IDL.Nat64,
|
|
181
|
-
version: IDL.Opt(IDL.Nat64)
|
|
182
|
-
});
|
|
183
|
-
const ListResults = IDL.Record({
|
|
184
|
-
matches_pages: IDL.Opt(IDL.Nat64),
|
|
185
|
-
matches_length: IDL.Nat64,
|
|
186
|
-
items_page: IDL.Opt(IDL.Nat64),
|
|
187
|
-
items: IDL.Vec(IDL.Tuple(IDL.Text, AssetNoContent)),
|
|
188
|
-
items_length: IDL.Nat64
|
|
189
|
-
});
|
|
190
|
-
const ControllerScope = IDL.Variant({
|
|
191
|
-
Write: IDL.Null,
|
|
192
|
-
Admin: IDL.Null,
|
|
193
|
-
Submit: IDL.Null
|
|
194
|
-
});
|
|
195
|
-
const Controller = IDL.Record({
|
|
196
|
-
updated_at: IDL.Nat64,
|
|
197
|
-
metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
198
|
-
created_at: IDL.Nat64,
|
|
199
|
-
scope: ControllerScope,
|
|
200
|
-
expires_at: IDL.Opt(IDL.Nat64)
|
|
201
|
-
});
|
|
202
|
-
const CustomDomain = IDL.Record({
|
|
203
|
-
updated_at: IDL.Nat64,
|
|
204
|
-
created_at: IDL.Nat64,
|
|
205
|
-
version: IDL.Opt(IDL.Nat64),
|
|
206
|
-
bn_id: IDL.Opt(IDL.Text)
|
|
207
|
-
});
|
|
208
|
-
const PaymentStatus = IDL.Variant({
|
|
209
|
-
Refunded: IDL.Null,
|
|
210
|
-
Acknowledged: IDL.Null,
|
|
211
|
-
Completed: IDL.Null
|
|
212
|
-
});
|
|
213
|
-
const Payment = IDL.Record({
|
|
214
|
-
status: PaymentStatus,
|
|
215
|
-
updated_at: IDL.Nat64,
|
|
216
|
-
block_index_payment: IDL.Nat64,
|
|
217
|
-
mission_control_id: IDL.Opt(IDL.Principal),
|
|
218
|
-
created_at: IDL.Nat64,
|
|
219
|
-
block_index_refunded: IDL.Opt(IDL.Nat64)
|
|
220
|
-
});
|
|
221
|
-
const ListProposalsOrder = IDL.Record({desc: IDL.Bool});
|
|
222
|
-
const ListProposalsPaginate = IDL.Record({
|
|
223
|
-
start_after: IDL.Opt(IDL.Nat),
|
|
224
|
-
limit: IDL.Opt(IDL.Nat)
|
|
225
|
-
});
|
|
226
|
-
const ListProposalsParams = IDL.Record({
|
|
227
|
-
order: IDL.Opt(ListProposalsOrder),
|
|
228
|
-
paginate: IDL.Opt(ListProposalsPaginate)
|
|
229
|
-
});
|
|
230
|
-
const ProposalKey = IDL.Record({proposal_id: IDL.Nat});
|
|
231
|
-
const ListProposalResults = IDL.Record({
|
|
232
|
-
matches_length: IDL.Nat64,
|
|
233
|
-
items: IDL.Vec(IDL.Tuple(ProposalKey, Proposal)),
|
|
234
|
-
items_length: IDL.Nat64
|
|
235
|
-
});
|
|
236
|
-
const SetController = IDL.Record({
|
|
237
|
-
metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
238
|
-
scope: ControllerScope,
|
|
239
|
-
expires_at: IDL.Opt(IDL.Nat64)
|
|
240
|
-
});
|
|
241
|
-
const SetControllersArgs = IDL.Record({
|
|
242
|
-
controller: SetController,
|
|
243
|
-
controllers: IDL.Vec(IDL.Principal)
|
|
244
|
-
});
|
|
245
|
-
const SegmentKind = IDL.Variant({
|
|
246
|
-
Orbiter: IDL.Null,
|
|
247
|
-
MissionControl: IDL.Null,
|
|
248
|
-
Satellite: IDL.Null
|
|
249
|
-
});
|
|
250
|
-
const RateConfig = IDL.Record({
|
|
251
|
-
max_tokens: IDL.Nat64,
|
|
252
|
-
time_per_token_ns: IDL.Nat64
|
|
253
|
-
});
|
|
254
|
-
const UploadChunk = IDL.Record({
|
|
255
|
-
content: IDL.Vec(IDL.Nat8),
|
|
256
|
-
batch_id: IDL.Nat,
|
|
257
|
-
order_id: IDL.Opt(IDL.Nat)
|
|
258
|
-
});
|
|
259
|
-
const UploadChunkResult = IDL.Record({chunk_id: IDL.Nat});
|
|
260
|
-
return IDL.Service({
|
|
261
|
-
add_credits: IDL.Func([IDL.Principal, Tokens], [], []),
|
|
262
|
-
add_invitation_code: IDL.Func([IDL.Text], [], []),
|
|
263
|
-
assert_mission_control_center: IDL.Func([AssertMissionControlCenterArgs], [], ['query']),
|
|
264
|
-
commit_asset_upload: IDL.Func([CommitBatch], [], []),
|
|
265
|
-
commit_proposal: IDL.Func([CommitProposal], [IDL.Null], []),
|
|
266
|
-
commit_proposal_asset_upload: IDL.Func([CommitBatch], [], []),
|
|
267
|
-
count_proposals: IDL.Func([], [IDL.Nat64], ['query']),
|
|
268
|
-
create_orbiter: IDL.Func([CreateCanisterArgs], [IDL.Principal], []),
|
|
269
|
-
create_satellite: IDL.Func([CreateCanisterArgs], [IDL.Principal], []),
|
|
270
|
-
del_controllers: IDL.Func([DeleteControllersArgs], [], []),
|
|
271
|
-
del_custom_domain: IDL.Func([IDL.Text], [], []),
|
|
272
|
-
delete_proposal_assets: IDL.Func([DeleteProposalAssets], [], []),
|
|
273
|
-
get_config: IDL.Func([], [Config], ['query']),
|
|
274
|
-
get_create_orbiter_fee: IDL.Func([GetCreateCanisterFeeArgs], [IDL.Opt(Tokens)], ['query']),
|
|
275
|
-
get_create_satellite_fee: IDL.Func([GetCreateCanisterFeeArgs], [IDL.Opt(Tokens)], ['query']),
|
|
276
|
-
get_credits: IDL.Func([], [Tokens], ['query']),
|
|
277
|
-
get_proposal: IDL.Func([IDL.Nat], [IDL.Opt(Proposal)], ['query']),
|
|
278
|
-
get_storage_config: IDL.Func([], [StorageConfig], ['query']),
|
|
279
|
-
get_user_mission_control_center: IDL.Func([], [IDL.Opt(MissionControl)], ['query']),
|
|
280
|
-
http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
|
|
281
|
-
http_request_streaming_callback: IDL.Func(
|
|
282
|
-
[StreamingCallbackToken],
|
|
283
|
-
[StreamingCallbackHttpResponse],
|
|
284
|
-
['query']
|
|
285
|
-
),
|
|
286
|
-
init_asset_upload: IDL.Func([InitAssetKey, IDL.Nat], [InitUploadResult], []),
|
|
287
|
-
init_proposal: IDL.Func([ProposalType], [IDL.Nat, Proposal], []),
|
|
288
|
-
init_proposal_asset_upload: IDL.Func([InitAssetKey, IDL.Nat], [InitUploadResult], []),
|
|
289
|
-
init_user_mission_control_center: IDL.Func([], [MissionControl], []),
|
|
290
|
-
list_assets: IDL.Func([IDL.Text, ListParams], [ListResults], ['query']),
|
|
291
|
-
list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
|
|
292
|
-
list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
|
|
293
|
-
list_payments: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Nat64, Payment))], ['query']),
|
|
294
|
-
list_proposals: IDL.Func([ListProposalsParams], [ListProposalResults], ['query']),
|
|
295
|
-
list_user_mission_control_centers: IDL.Func(
|
|
296
|
-
[],
|
|
297
|
-
[IDL.Vec(IDL.Tuple(IDL.Principal, MissionControl))],
|
|
298
|
-
['query']
|
|
299
|
-
),
|
|
300
|
-
reject_proposal: IDL.Func([CommitProposal], [IDL.Null], []),
|
|
301
|
-
set_controllers: IDL.Func([SetControllersArgs], [], []),
|
|
302
|
-
set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
|
|
303
|
-
set_fee: IDL.Func([SegmentKind, Tokens], [], []),
|
|
304
|
-
set_storage_config: IDL.Func([StorageConfig], [], []),
|
|
305
|
-
submit_proposal: IDL.Func([IDL.Nat], [IDL.Nat, Proposal], []),
|
|
306
|
-
update_rate_config: IDL.Func([SegmentKind, RateConfig], [], []),
|
|
307
|
-
upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []),
|
|
308
|
-
upload_proposal_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], [])
|
|
309
|
-
});
|
|
310
|
-
};
|
|
311
|
-
// @ts-ignore
|
|
312
|
-
export const init = ({IDL}) => {
|
|
313
|
-
return [];
|
|
314
|
-
};
|
|
@@ -1,365 +0,0 @@
|
|
|
1
|
-
import type {ActorMethod} from '@dfinity/agent';
|
|
2
|
-
import type {IDL} from '@dfinity/candid';
|
|
3
|
-
import type {Principal} from '@dfinity/principal';
|
|
4
|
-
|
|
5
|
-
export interface AssetEncodingNoContent {
|
|
6
|
-
modified: bigint;
|
|
7
|
-
sha256: Uint8Array | number[];
|
|
8
|
-
total_length: bigint;
|
|
9
|
-
}
|
|
10
|
-
export interface AssetKey {
|
|
11
|
-
token: [] | [string];
|
|
12
|
-
collection: string;
|
|
13
|
-
owner: Principal;
|
|
14
|
-
name: string;
|
|
15
|
-
description: [] | [string];
|
|
16
|
-
full_path: string;
|
|
17
|
-
}
|
|
18
|
-
export interface AssetNoContent {
|
|
19
|
-
key: AssetKey;
|
|
20
|
-
updated_at: bigint;
|
|
21
|
-
encodings: Array<[string, AssetEncodingNoContent]>;
|
|
22
|
-
headers: Array<[string, string]>;
|
|
23
|
-
created_at: bigint;
|
|
24
|
-
version: [] | [bigint];
|
|
25
|
-
}
|
|
26
|
-
export interface AssetsUpgradeOptions {
|
|
27
|
-
clear_existing_assets: [] | [boolean];
|
|
28
|
-
}
|
|
29
|
-
export interface AuthenticationConfig {
|
|
30
|
-
internet_identity: [] | [AuthenticationConfigInternetIdentity];
|
|
31
|
-
}
|
|
32
|
-
export interface AuthenticationConfigInternetIdentity {
|
|
33
|
-
derivation_origin: [] | [string];
|
|
34
|
-
external_alternative_origins: [] | [Array<string>];
|
|
35
|
-
}
|
|
36
|
-
export type CollectionType = {Db: null} | {Storage: null};
|
|
37
|
-
export interface CommitBatch {
|
|
38
|
-
batch_id: bigint;
|
|
39
|
-
headers: Array<[string, string]>;
|
|
40
|
-
chunk_ids: Array<bigint>;
|
|
41
|
-
}
|
|
42
|
-
export interface CommitProposal {
|
|
43
|
-
sha256: Uint8Array | number[];
|
|
44
|
-
proposal_id: bigint;
|
|
45
|
-
}
|
|
46
|
-
export interface Config {
|
|
47
|
-
db: [] | [DbConfig];
|
|
48
|
-
authentication: [] | [AuthenticationConfig];
|
|
49
|
-
storage: StorageConfig;
|
|
50
|
-
}
|
|
51
|
-
export interface ConfigMaxMemorySize {
|
|
52
|
-
stable: [] | [bigint];
|
|
53
|
-
heap: [] | [bigint];
|
|
54
|
-
}
|
|
55
|
-
export interface Controller {
|
|
56
|
-
updated_at: bigint;
|
|
57
|
-
metadata: Array<[string, string]>;
|
|
58
|
-
created_at: bigint;
|
|
59
|
-
scope: ControllerScope;
|
|
60
|
-
expires_at: [] | [bigint];
|
|
61
|
-
}
|
|
62
|
-
export type ControllerScope = {Write: null} | {Admin: null} | {Submit: null};
|
|
63
|
-
export interface CustomDomain {
|
|
64
|
-
updated_at: bigint;
|
|
65
|
-
created_at: bigint;
|
|
66
|
-
version: [] | [bigint];
|
|
67
|
-
bn_id: [] | [string];
|
|
68
|
-
}
|
|
69
|
-
export interface DbConfig {
|
|
70
|
-
max_memory_size: [] | [ConfigMaxMemorySize];
|
|
71
|
-
}
|
|
72
|
-
export interface DelDoc {
|
|
73
|
-
version: [] | [bigint];
|
|
74
|
-
}
|
|
75
|
-
export interface DelRule {
|
|
76
|
-
version: [] | [bigint];
|
|
77
|
-
}
|
|
78
|
-
export interface DeleteControllersArgs {
|
|
79
|
-
controllers: Array<Principal>;
|
|
80
|
-
}
|
|
81
|
-
export interface DeleteProposalAssets {
|
|
82
|
-
proposal_ids: Array<bigint>;
|
|
83
|
-
}
|
|
84
|
-
export interface DepositCyclesArgs {
|
|
85
|
-
cycles: bigint;
|
|
86
|
-
destination_id: Principal;
|
|
87
|
-
}
|
|
88
|
-
export interface Doc {
|
|
89
|
-
updated_at: bigint;
|
|
90
|
-
owner: Principal;
|
|
91
|
-
data: Uint8Array | number[];
|
|
92
|
-
description: [] | [string];
|
|
93
|
-
created_at: bigint;
|
|
94
|
-
version: [] | [bigint];
|
|
95
|
-
}
|
|
96
|
-
export interface HttpRequest {
|
|
97
|
-
url: string;
|
|
98
|
-
method: string;
|
|
99
|
-
body: Uint8Array | number[];
|
|
100
|
-
headers: Array<[string, string]>;
|
|
101
|
-
certificate_version: [] | [number];
|
|
102
|
-
}
|
|
103
|
-
export interface HttpResponse {
|
|
104
|
-
body: Uint8Array | number[];
|
|
105
|
-
headers: Array<[string, string]>;
|
|
106
|
-
streaming_strategy: [] | [StreamingStrategy];
|
|
107
|
-
status_code: number;
|
|
108
|
-
}
|
|
109
|
-
export interface InitAssetKey {
|
|
110
|
-
token: [] | [string];
|
|
111
|
-
collection: string;
|
|
112
|
-
name: string;
|
|
113
|
-
description: [] | [string];
|
|
114
|
-
encoding_type: [] | [string];
|
|
115
|
-
full_path: string;
|
|
116
|
-
}
|
|
117
|
-
export interface InitUploadResult {
|
|
118
|
-
batch_id: bigint;
|
|
119
|
-
}
|
|
120
|
-
export interface ListMatcher {
|
|
121
|
-
key: [] | [string];
|
|
122
|
-
updated_at: [] | [TimestampMatcher];
|
|
123
|
-
description: [] | [string];
|
|
124
|
-
created_at: [] | [TimestampMatcher];
|
|
125
|
-
}
|
|
126
|
-
export interface ListOrder {
|
|
127
|
-
field: ListOrderField;
|
|
128
|
-
desc: boolean;
|
|
129
|
-
}
|
|
130
|
-
export type ListOrderField = {UpdatedAt: null} | {Keys: null} | {CreatedAt: null};
|
|
131
|
-
export interface ListPaginate {
|
|
132
|
-
start_after: [] | [string];
|
|
133
|
-
limit: [] | [bigint];
|
|
134
|
-
}
|
|
135
|
-
export interface ListParams {
|
|
136
|
-
order: [] | [ListOrder];
|
|
137
|
-
owner: [] | [Principal];
|
|
138
|
-
matcher: [] | [ListMatcher];
|
|
139
|
-
paginate: [] | [ListPaginate];
|
|
140
|
-
}
|
|
141
|
-
export interface ListProposalResults {
|
|
142
|
-
matches_length: bigint;
|
|
143
|
-
items: Array<[ProposalKey, Proposal]>;
|
|
144
|
-
items_length: bigint;
|
|
145
|
-
}
|
|
146
|
-
export interface ListProposalsOrder {
|
|
147
|
-
desc: boolean;
|
|
148
|
-
}
|
|
149
|
-
export interface ListProposalsPaginate {
|
|
150
|
-
start_after: [] | [bigint];
|
|
151
|
-
limit: [] | [bigint];
|
|
152
|
-
}
|
|
153
|
-
export interface ListProposalsParams {
|
|
154
|
-
order: [] | [ListProposalsOrder];
|
|
155
|
-
paginate: [] | [ListProposalsPaginate];
|
|
156
|
-
}
|
|
157
|
-
export interface ListResults {
|
|
158
|
-
matches_pages: [] | [bigint];
|
|
159
|
-
matches_length: bigint;
|
|
160
|
-
items_page: [] | [bigint];
|
|
161
|
-
items: Array<[string, AssetNoContent]>;
|
|
162
|
-
items_length: bigint;
|
|
163
|
-
}
|
|
164
|
-
export interface ListResults_1 {
|
|
165
|
-
matches_pages: [] | [bigint];
|
|
166
|
-
matches_length: bigint;
|
|
167
|
-
items_page: [] | [bigint];
|
|
168
|
-
items: Array<[string, Doc]>;
|
|
169
|
-
items_length: bigint;
|
|
170
|
-
}
|
|
171
|
-
export interface ListRulesMatcher {
|
|
172
|
-
include_system: boolean;
|
|
173
|
-
}
|
|
174
|
-
export interface ListRulesParams {
|
|
175
|
-
matcher: [] | [ListRulesMatcher];
|
|
176
|
-
}
|
|
177
|
-
export interface ListRulesResults {
|
|
178
|
-
matches_length: bigint;
|
|
179
|
-
items: Array<[string, Rule]>;
|
|
180
|
-
items_length: bigint;
|
|
181
|
-
}
|
|
182
|
-
export type Memory = {Heap: null} | {Stable: null};
|
|
183
|
-
export interface MemorySize {
|
|
184
|
-
stable: bigint;
|
|
185
|
-
heap: bigint;
|
|
186
|
-
}
|
|
187
|
-
export type Permission = {Controllers: null} | {Private: null} | {Public: null} | {Managed: null};
|
|
188
|
-
export interface Proposal {
|
|
189
|
-
status: ProposalStatus;
|
|
190
|
-
updated_at: bigint;
|
|
191
|
-
sha256: [] | [Uint8Array | number[]];
|
|
192
|
-
executed_at: [] | [bigint];
|
|
193
|
-
owner: Principal;
|
|
194
|
-
created_at: bigint;
|
|
195
|
-
version: [] | [bigint];
|
|
196
|
-
proposal_type: ProposalType;
|
|
197
|
-
}
|
|
198
|
-
export interface ProposalKey {
|
|
199
|
-
proposal_id: bigint;
|
|
200
|
-
}
|
|
201
|
-
export type ProposalStatus =
|
|
202
|
-
| {Initialized: null}
|
|
203
|
-
| {Failed: null}
|
|
204
|
-
| {Open: null}
|
|
205
|
-
| {Rejected: null}
|
|
206
|
-
| {Executed: null}
|
|
207
|
-
| {Accepted: null};
|
|
208
|
-
export type ProposalType =
|
|
209
|
-
| {AssetsUpgrade: AssetsUpgradeOptions}
|
|
210
|
-
| {SegmentsDeployment: SegmentsDeploymentOptions};
|
|
211
|
-
export interface RateConfig {
|
|
212
|
-
max_tokens: bigint;
|
|
213
|
-
time_per_token_ns: bigint;
|
|
214
|
-
}
|
|
215
|
-
export interface Rule {
|
|
216
|
-
max_capacity: [] | [number];
|
|
217
|
-
memory: [] | [Memory];
|
|
218
|
-
updated_at: bigint;
|
|
219
|
-
max_size: [] | [bigint];
|
|
220
|
-
read: Permission;
|
|
221
|
-
created_at: bigint;
|
|
222
|
-
version: [] | [bigint];
|
|
223
|
-
mutable_permissions: [] | [boolean];
|
|
224
|
-
rate_config: [] | [RateConfig];
|
|
225
|
-
write: Permission;
|
|
226
|
-
max_changes_per_user: [] | [number];
|
|
227
|
-
}
|
|
228
|
-
export interface SegmentsDeploymentOptions {
|
|
229
|
-
orbiter: [] | [string];
|
|
230
|
-
mission_control_version: [] | [string];
|
|
231
|
-
satellite_version: [] | [string];
|
|
232
|
-
}
|
|
233
|
-
export interface SetController {
|
|
234
|
-
metadata: Array<[string, string]>;
|
|
235
|
-
scope: ControllerScope;
|
|
236
|
-
expires_at: [] | [bigint];
|
|
237
|
-
}
|
|
238
|
-
export interface SetControllersArgs {
|
|
239
|
-
controller: SetController;
|
|
240
|
-
controllers: Array<Principal>;
|
|
241
|
-
}
|
|
242
|
-
export interface SetDoc {
|
|
243
|
-
data: Uint8Array | number[];
|
|
244
|
-
description: [] | [string];
|
|
245
|
-
version: [] | [bigint];
|
|
246
|
-
}
|
|
247
|
-
export interface SetRule {
|
|
248
|
-
max_capacity: [] | [number];
|
|
249
|
-
memory: [] | [Memory];
|
|
250
|
-
max_size: [] | [bigint];
|
|
251
|
-
read: Permission;
|
|
252
|
-
version: [] | [bigint];
|
|
253
|
-
mutable_permissions: [] | [boolean];
|
|
254
|
-
rate_config: [] | [RateConfig];
|
|
255
|
-
write: Permission;
|
|
256
|
-
max_changes_per_user: [] | [number];
|
|
257
|
-
}
|
|
258
|
-
export interface StorageConfig {
|
|
259
|
-
iframe: [] | [StorageConfigIFrame];
|
|
260
|
-
rewrites: Array<[string, string]>;
|
|
261
|
-
headers: Array<[string, Array<[string, string]>]>;
|
|
262
|
-
max_memory_size: [] | [ConfigMaxMemorySize];
|
|
263
|
-
raw_access: [] | [StorageConfigRawAccess];
|
|
264
|
-
redirects: [] | [Array<[string, StorageConfigRedirect]>];
|
|
265
|
-
}
|
|
266
|
-
export type StorageConfigIFrame = {Deny: null} | {AllowAny: null} | {SameOrigin: null};
|
|
267
|
-
export type StorageConfigRawAccess = {Deny: null} | {Allow: null};
|
|
268
|
-
export interface StorageConfigRedirect {
|
|
269
|
-
status_code: number;
|
|
270
|
-
location: string;
|
|
271
|
-
}
|
|
272
|
-
export interface StreamingCallbackHttpResponse {
|
|
273
|
-
token: [] | [StreamingCallbackToken];
|
|
274
|
-
body: Uint8Array | number[];
|
|
275
|
-
}
|
|
276
|
-
export interface StreamingCallbackToken {
|
|
277
|
-
memory: Memory;
|
|
278
|
-
token: [] | [string];
|
|
279
|
-
sha256: [] | [Uint8Array | number[]];
|
|
280
|
-
headers: Array<[string, string]>;
|
|
281
|
-
index: bigint;
|
|
282
|
-
encoding_type: string;
|
|
283
|
-
full_path: string;
|
|
284
|
-
}
|
|
285
|
-
export type StreamingStrategy = {
|
|
286
|
-
Callback: {
|
|
287
|
-
token: StreamingCallbackToken;
|
|
288
|
-
callback: [Principal, string];
|
|
289
|
-
};
|
|
290
|
-
};
|
|
291
|
-
export type TimestampMatcher =
|
|
292
|
-
| {Equal: bigint}
|
|
293
|
-
| {Between: [bigint, bigint]}
|
|
294
|
-
| {GreaterThan: bigint}
|
|
295
|
-
| {LessThan: bigint};
|
|
296
|
-
export interface UploadChunk {
|
|
297
|
-
content: Uint8Array | number[];
|
|
298
|
-
batch_id: bigint;
|
|
299
|
-
order_id: [] | [bigint];
|
|
300
|
-
}
|
|
301
|
-
export interface UploadChunkResult {
|
|
302
|
-
chunk_id: bigint;
|
|
303
|
-
}
|
|
304
|
-
export interface _SERVICE {
|
|
305
|
-
commit_asset_upload: ActorMethod<[CommitBatch], undefined>;
|
|
306
|
-
commit_proposal: ActorMethod<[CommitProposal], null>;
|
|
307
|
-
commit_proposal_asset_upload: ActorMethod<[CommitBatch], undefined>;
|
|
308
|
-
count_assets: ActorMethod<[string, ListParams], bigint>;
|
|
309
|
-
count_collection_assets: ActorMethod<[string], bigint>;
|
|
310
|
-
count_collection_docs: ActorMethod<[string], bigint>;
|
|
311
|
-
count_docs: ActorMethod<[string, ListParams], bigint>;
|
|
312
|
-
count_proposals: ActorMethod<[], bigint>;
|
|
313
|
-
del_asset: ActorMethod<[string, string], undefined>;
|
|
314
|
-
del_assets: ActorMethod<[string], undefined>;
|
|
315
|
-
del_controllers: ActorMethod<[DeleteControllersArgs], Array<[Principal, Controller]>>;
|
|
316
|
-
del_custom_domain: ActorMethod<[string], undefined>;
|
|
317
|
-
del_doc: ActorMethod<[string, string, DelDoc], undefined>;
|
|
318
|
-
del_docs: ActorMethod<[string], undefined>;
|
|
319
|
-
del_filtered_assets: ActorMethod<[string, ListParams], undefined>;
|
|
320
|
-
del_filtered_docs: ActorMethod<[string, ListParams], undefined>;
|
|
321
|
-
del_many_assets: ActorMethod<[Array<[string, string]>], undefined>;
|
|
322
|
-
del_many_docs: ActorMethod<[Array<[string, string, DelDoc]>], undefined>;
|
|
323
|
-
del_rule: ActorMethod<[CollectionType, string, DelRule], undefined>;
|
|
324
|
-
delete_proposal_assets: ActorMethod<[DeleteProposalAssets], undefined>;
|
|
325
|
-
deposit_cycles: ActorMethod<[DepositCyclesArgs], undefined>;
|
|
326
|
-
get_asset: ActorMethod<[string, string], [] | [AssetNoContent]>;
|
|
327
|
-
get_auth_config: ActorMethod<[], [] | [AuthenticationConfig]>;
|
|
328
|
-
get_config: ActorMethod<[], Config>;
|
|
329
|
-
get_db_config: ActorMethod<[], [] | [DbConfig]>;
|
|
330
|
-
get_doc: ActorMethod<[string, string], [] | [Doc]>;
|
|
331
|
-
get_many_assets: ActorMethod<[Array<[string, string]>], Array<[string, [] | [AssetNoContent]]>>;
|
|
332
|
-
get_many_docs: ActorMethod<[Array<[string, string]>], Array<[string, [] | [Doc]]>>;
|
|
333
|
-
get_proposal: ActorMethod<[bigint], [] | [Proposal]>;
|
|
334
|
-
get_rule: ActorMethod<[CollectionType, string], [] | [Rule]>;
|
|
335
|
-
get_storage_config: ActorMethod<[], StorageConfig>;
|
|
336
|
-
http_request: ActorMethod<[HttpRequest], HttpResponse>;
|
|
337
|
-
http_request_streaming_callback: ActorMethod<
|
|
338
|
-
[StreamingCallbackToken],
|
|
339
|
-
StreamingCallbackHttpResponse
|
|
340
|
-
>;
|
|
341
|
-
init_asset_upload: ActorMethod<[InitAssetKey], InitUploadResult>;
|
|
342
|
-
init_proposal: ActorMethod<[ProposalType], [bigint, Proposal]>;
|
|
343
|
-
init_proposal_asset_upload: ActorMethod<[InitAssetKey, bigint], InitUploadResult>;
|
|
344
|
-
list_assets: ActorMethod<[string, ListParams], ListResults>;
|
|
345
|
-
list_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
|
|
346
|
-
list_custom_domains: ActorMethod<[], Array<[string, CustomDomain]>>;
|
|
347
|
-
list_docs: ActorMethod<[string, ListParams], ListResults_1>;
|
|
348
|
-
list_proposals: ActorMethod<[ListProposalsParams], ListProposalResults>;
|
|
349
|
-
list_rules: ActorMethod<[CollectionType, ListRulesParams], ListRulesResults>;
|
|
350
|
-
memory_size: ActorMethod<[], MemorySize>;
|
|
351
|
-
reject_proposal: ActorMethod<[CommitProposal], null>;
|
|
352
|
-
set_auth_config: ActorMethod<[AuthenticationConfig], undefined>;
|
|
353
|
-
set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, Controller]>>;
|
|
354
|
-
set_custom_domain: ActorMethod<[string, [] | [string]], undefined>;
|
|
355
|
-
set_db_config: ActorMethod<[DbConfig], undefined>;
|
|
356
|
-
set_doc: ActorMethod<[string, string, SetDoc], Doc>;
|
|
357
|
-
set_many_docs: ActorMethod<[Array<[string, string, SetDoc]>], Array<[string, Doc]>>;
|
|
358
|
-
set_rule: ActorMethod<[CollectionType, string, SetRule], Rule>;
|
|
359
|
-
set_storage_config: ActorMethod<[StorageConfig], undefined>;
|
|
360
|
-
submit_proposal: ActorMethod<[bigint], [bigint, Proposal]>;
|
|
361
|
-
upload_asset_chunk: ActorMethod<[UploadChunk], UploadChunkResult>;
|
|
362
|
-
upload_proposal_asset_chunk: ActorMethod<[UploadChunk], UploadChunkResult>;
|
|
363
|
-
}
|
|
364
|
-
export declare const idlFactory: IDL.InterfaceFactory;
|
|
365
|
-
export declare const init: (args: {IDL: typeof IDL}) => IDL.Type[];
|