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