@junobuild/storage 0.1.5 → 0.1.6-next-2025-04-06
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/declarations/console/console.factory.certified.did.js +285 -0
- package/dist/declarations/{deprecated/satellite-0-0-9.factory.did.js → satellite/satellite.factory.certified.did.js} +186 -80
- package/package.json +7 -7
- package/dist/declarations/deprecated/mission_control-0-0-4.did.d.ts +0 -80
- package/dist/declarations/deprecated/mission_control-0-0-4.factory.did.js +0 -99
- package/dist/declarations/deprecated/satellite-0-0-8.did.d.ts +0 -183
- package/dist/declarations/deprecated/satellite-0-0-8.factory.did.js +0 -194
- package/dist/declarations/deprecated/satellite-0-0-9.did.d.ts +0 -199
|
@@ -0,0 +1,285 @@
|
|
|
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([], [], [])
|
|
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 CustomDomain = IDL.Record({
|
|
191
|
+
updated_at: IDL.Nat64,
|
|
192
|
+
created_at: IDL.Nat64,
|
|
193
|
+
version: IDL.Opt(IDL.Nat64),
|
|
194
|
+
bn_id: IDL.Opt(IDL.Text)
|
|
195
|
+
});
|
|
196
|
+
const PaymentStatus = IDL.Variant({
|
|
197
|
+
Refunded: IDL.Null,
|
|
198
|
+
Acknowledged: IDL.Null,
|
|
199
|
+
Completed: IDL.Null
|
|
200
|
+
});
|
|
201
|
+
const Payment = IDL.Record({
|
|
202
|
+
status: PaymentStatus,
|
|
203
|
+
updated_at: IDL.Nat64,
|
|
204
|
+
block_index_payment: IDL.Nat64,
|
|
205
|
+
mission_control_id: IDL.Opt(IDL.Principal),
|
|
206
|
+
created_at: IDL.Nat64,
|
|
207
|
+
block_index_refunded: IDL.Opt(IDL.Nat64)
|
|
208
|
+
});
|
|
209
|
+
const ControllerScope = IDL.Variant({
|
|
210
|
+
Write: IDL.Null,
|
|
211
|
+
Admin: IDL.Null
|
|
212
|
+
});
|
|
213
|
+
const SetController = IDL.Record({
|
|
214
|
+
metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
215
|
+
scope: ControllerScope,
|
|
216
|
+
expires_at: IDL.Opt(IDL.Nat64)
|
|
217
|
+
});
|
|
218
|
+
const SetControllersArgs = IDL.Record({
|
|
219
|
+
controller: SetController,
|
|
220
|
+
controllers: IDL.Vec(IDL.Principal)
|
|
221
|
+
});
|
|
222
|
+
const SegmentKind = IDL.Variant({
|
|
223
|
+
Orbiter: IDL.Null,
|
|
224
|
+
MissionControl: IDL.Null,
|
|
225
|
+
Satellite: IDL.Null
|
|
226
|
+
});
|
|
227
|
+
const RateConfig = IDL.Record({
|
|
228
|
+
max_tokens: IDL.Nat64,
|
|
229
|
+
time_per_token_ns: IDL.Nat64
|
|
230
|
+
});
|
|
231
|
+
const UploadChunk = IDL.Record({
|
|
232
|
+
content: IDL.Vec(IDL.Nat8),
|
|
233
|
+
batch_id: IDL.Nat,
|
|
234
|
+
order_id: IDL.Opt(IDL.Nat)
|
|
235
|
+
});
|
|
236
|
+
const UploadChunkResult = IDL.Record({chunk_id: IDL.Nat});
|
|
237
|
+
return IDL.Service({
|
|
238
|
+
add_credits: IDL.Func([IDL.Principal, Tokens], [], []),
|
|
239
|
+
add_invitation_code: IDL.Func([IDL.Text], [], []),
|
|
240
|
+
assert_mission_control_center: IDL.Func([AssertMissionControlCenterArgs], [], []),
|
|
241
|
+
commit_asset_upload: IDL.Func([CommitBatch], [], []),
|
|
242
|
+
commit_proposal: IDL.Func([CommitProposal], [IDL.Null], []),
|
|
243
|
+
create_orbiter: IDL.Func([CreateCanisterArgs], [IDL.Principal], []),
|
|
244
|
+
create_satellite: IDL.Func([CreateCanisterArgs], [IDL.Principal], []),
|
|
245
|
+
del_controllers: IDL.Func([DeleteControllersArgs], [], []),
|
|
246
|
+
del_custom_domain: IDL.Func([IDL.Text], [], []),
|
|
247
|
+
delete_proposal_assets: IDL.Func([DeleteProposalAssets], [], []),
|
|
248
|
+
get_config: IDL.Func([], [Config], []),
|
|
249
|
+
get_create_orbiter_fee: IDL.Func([GetCreateCanisterFeeArgs], [IDL.Opt(Tokens)], []),
|
|
250
|
+
get_create_satellite_fee: IDL.Func([GetCreateCanisterFeeArgs], [IDL.Opt(Tokens)], []),
|
|
251
|
+
get_credits: IDL.Func([], [Tokens], []),
|
|
252
|
+
get_proposal: IDL.Func([IDL.Nat], [IDL.Opt(Proposal)], []),
|
|
253
|
+
get_storage_config: IDL.Func([], [StorageConfig], []),
|
|
254
|
+
get_user_mission_control_center: IDL.Func([], [IDL.Opt(MissionControl)], []),
|
|
255
|
+
http_request: IDL.Func([HttpRequest], [HttpResponse], []),
|
|
256
|
+
http_request_streaming_callback: IDL.Func(
|
|
257
|
+
[StreamingCallbackToken],
|
|
258
|
+
[StreamingCallbackHttpResponse],
|
|
259
|
+
[]
|
|
260
|
+
),
|
|
261
|
+
init_asset_upload: IDL.Func([InitAssetKey, IDL.Nat], [InitUploadResult], []),
|
|
262
|
+
init_proposal: IDL.Func([ProposalType], [IDL.Nat, Proposal], []),
|
|
263
|
+
init_user_mission_control_center: IDL.Func([], [MissionControl], []),
|
|
264
|
+
list_assets: IDL.Func([IDL.Text, ListParams], [ListResults], []),
|
|
265
|
+
list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], []),
|
|
266
|
+
list_payments: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Nat64, Payment))], []),
|
|
267
|
+
list_user_mission_control_centers: IDL.Func(
|
|
268
|
+
[],
|
|
269
|
+
[IDL.Vec(IDL.Tuple(IDL.Principal, MissionControl))],
|
|
270
|
+
[]
|
|
271
|
+
),
|
|
272
|
+
set_controllers: IDL.Func([SetControllersArgs], [], []),
|
|
273
|
+
set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
|
|
274
|
+
set_fee: IDL.Func([SegmentKind, Tokens], [], []),
|
|
275
|
+
set_storage_config: IDL.Func([StorageConfig], [], []),
|
|
276
|
+
submit_proposal: IDL.Func([IDL.Nat], [IDL.Nat, Proposal], []),
|
|
277
|
+
update_rate_config: IDL.Func([SegmentKind, RateConfig], [], []),
|
|
278
|
+
upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []),
|
|
279
|
+
version: IDL.Func([], [IDL.Text], [])
|
|
280
|
+
});
|
|
281
|
+
};
|
|
282
|
+
// @ts-ignore
|
|
283
|
+
export const init = ({IDL}) => {
|
|
284
|
+
return [];
|
|
285
|
+
};
|
|
@@ -5,6 +5,34 @@ export const idlFactory = ({IDL}) => {
|
|
|
5
5
|
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
6
6
|
chunk_ids: IDL.Vec(IDL.Nat)
|
|
7
7
|
});
|
|
8
|
+
const ListOrderField = IDL.Variant({
|
|
9
|
+
UpdatedAt: IDL.Null,
|
|
10
|
+
Keys: IDL.Null,
|
|
11
|
+
CreatedAt: IDL.Null
|
|
12
|
+
});
|
|
13
|
+
const ListOrder = IDL.Record({field: ListOrderField, desc: IDL.Bool});
|
|
14
|
+
const TimestampMatcher = IDL.Variant({
|
|
15
|
+
Equal: IDL.Nat64,
|
|
16
|
+
Between: IDL.Tuple(IDL.Nat64, IDL.Nat64),
|
|
17
|
+
GreaterThan: IDL.Nat64,
|
|
18
|
+
LessThan: IDL.Nat64
|
|
19
|
+
});
|
|
20
|
+
const ListMatcher = IDL.Record({
|
|
21
|
+
key: IDL.Opt(IDL.Text),
|
|
22
|
+
updated_at: IDL.Opt(TimestampMatcher),
|
|
23
|
+
description: IDL.Opt(IDL.Text),
|
|
24
|
+
created_at: IDL.Opt(TimestampMatcher)
|
|
25
|
+
});
|
|
26
|
+
const ListPaginate = IDL.Record({
|
|
27
|
+
start_after: IDL.Opt(IDL.Text),
|
|
28
|
+
limit: IDL.Opt(IDL.Nat64)
|
|
29
|
+
});
|
|
30
|
+
const ListParams = IDL.Record({
|
|
31
|
+
order: IDL.Opt(ListOrder),
|
|
32
|
+
owner: IDL.Opt(IDL.Principal),
|
|
33
|
+
matcher: IDL.Opt(ListMatcher),
|
|
34
|
+
paginate: IDL.Opt(ListPaginate)
|
|
35
|
+
});
|
|
8
36
|
const DeleteControllersArgs = IDL.Record({
|
|
9
37
|
controllers: IDL.Vec(IDL.Principal)
|
|
10
38
|
});
|
|
@@ -19,26 +47,115 @@ export const idlFactory = ({IDL}) => {
|
|
|
19
47
|
scope: ControllerScope,
|
|
20
48
|
expires_at: IDL.Opt(IDL.Nat64)
|
|
21
49
|
});
|
|
22
|
-
const DelDoc = IDL.Record({
|
|
23
|
-
const
|
|
50
|
+
const DelDoc = IDL.Record({version: IDL.Opt(IDL.Nat64)});
|
|
51
|
+
const CollectionType = IDL.Variant({Db: IDL.Null, Storage: IDL.Null});
|
|
52
|
+
const DelRule = IDL.Record({version: IDL.Opt(IDL.Nat64)});
|
|
53
|
+
const DepositCyclesArgs = IDL.Record({
|
|
54
|
+
cycles: IDL.Nat,
|
|
55
|
+
destination_id: IDL.Principal
|
|
56
|
+
});
|
|
57
|
+
const AssetKey = IDL.Record({
|
|
58
|
+
token: IDL.Opt(IDL.Text),
|
|
59
|
+
collection: IDL.Text,
|
|
60
|
+
owner: IDL.Principal,
|
|
61
|
+
name: IDL.Text,
|
|
62
|
+
description: IDL.Opt(IDL.Text),
|
|
63
|
+
full_path: IDL.Text
|
|
64
|
+
});
|
|
65
|
+
const AssetEncodingNoContent = IDL.Record({
|
|
66
|
+
modified: IDL.Nat64,
|
|
67
|
+
sha256: IDL.Vec(IDL.Nat8),
|
|
68
|
+
total_length: IDL.Nat
|
|
69
|
+
});
|
|
70
|
+
const AssetNoContent = IDL.Record({
|
|
71
|
+
key: AssetKey,
|
|
72
|
+
updated_at: IDL.Nat64,
|
|
73
|
+
encodings: IDL.Vec(IDL.Tuple(IDL.Text, AssetEncodingNoContent)),
|
|
74
|
+
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
75
|
+
created_at: IDL.Nat64,
|
|
76
|
+
version: IDL.Opt(IDL.Nat64)
|
|
77
|
+
});
|
|
78
|
+
const AuthenticationConfigInternetIdentity = IDL.Record({
|
|
79
|
+
derivation_origin: IDL.Opt(IDL.Text),
|
|
80
|
+
external_alternative_origins: IDL.Opt(IDL.Vec(IDL.Text))
|
|
81
|
+
});
|
|
82
|
+
const AuthenticationConfig = IDL.Record({
|
|
83
|
+
internet_identity: IDL.Opt(AuthenticationConfigInternetIdentity)
|
|
84
|
+
});
|
|
85
|
+
const ConfigMaxMemorySize = IDL.Record({
|
|
86
|
+
stable: IDL.Opt(IDL.Nat64),
|
|
87
|
+
heap: IDL.Opt(IDL.Nat64)
|
|
88
|
+
});
|
|
89
|
+
const DbConfig = IDL.Record({
|
|
90
|
+
max_memory_size: IDL.Opt(ConfigMaxMemorySize)
|
|
91
|
+
});
|
|
92
|
+
const StorageConfigIFrame = IDL.Variant({
|
|
93
|
+
Deny: IDL.Null,
|
|
94
|
+
AllowAny: IDL.Null,
|
|
95
|
+
SameOrigin: IDL.Null
|
|
96
|
+
});
|
|
97
|
+
const StorageConfigRawAccess = IDL.Variant({
|
|
98
|
+
Deny: IDL.Null,
|
|
99
|
+
Allow: IDL.Null
|
|
100
|
+
});
|
|
101
|
+
const StorageConfigRedirect = IDL.Record({
|
|
102
|
+
status_code: IDL.Nat16,
|
|
103
|
+
location: IDL.Text
|
|
104
|
+
});
|
|
24
105
|
const StorageConfig = IDL.Record({
|
|
25
|
-
|
|
106
|
+
iframe: IDL.Opt(StorageConfigIFrame),
|
|
107
|
+
rewrites: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
108
|
+
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)))),
|
|
109
|
+
max_memory_size: IDL.Opt(ConfigMaxMemorySize),
|
|
110
|
+
raw_access: IDL.Opt(StorageConfigRawAccess),
|
|
111
|
+
redirects: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, StorageConfigRedirect)))
|
|
112
|
+
});
|
|
113
|
+
const Config = IDL.Record({
|
|
114
|
+
db: IDL.Opt(DbConfig),
|
|
115
|
+
authentication: IDL.Opt(AuthenticationConfig),
|
|
116
|
+
storage: StorageConfig
|
|
26
117
|
});
|
|
27
|
-
const Config = IDL.Record({storage: StorageConfig});
|
|
28
118
|
const Doc = IDL.Record({
|
|
29
119
|
updated_at: IDL.Nat64,
|
|
30
120
|
owner: IDL.Principal,
|
|
31
121
|
data: IDL.Vec(IDL.Nat8),
|
|
32
122
|
description: IDL.Opt(IDL.Text),
|
|
33
|
-
created_at: IDL.Nat64
|
|
123
|
+
created_at: IDL.Nat64,
|
|
124
|
+
version: IDL.Opt(IDL.Nat64)
|
|
125
|
+
});
|
|
126
|
+
const Memory = IDL.Variant({Heap: IDL.Null, Stable: IDL.Null});
|
|
127
|
+
const Permission = IDL.Variant({
|
|
128
|
+
Controllers: IDL.Null,
|
|
129
|
+
Private: IDL.Null,
|
|
130
|
+
Public: IDL.Null,
|
|
131
|
+
Managed: IDL.Null
|
|
132
|
+
});
|
|
133
|
+
const RateConfig = IDL.Record({
|
|
134
|
+
max_tokens: IDL.Nat64,
|
|
135
|
+
time_per_token_ns: IDL.Nat64
|
|
136
|
+
});
|
|
137
|
+
const Rule = IDL.Record({
|
|
138
|
+
max_capacity: IDL.Opt(IDL.Nat32),
|
|
139
|
+
memory: IDL.Opt(Memory),
|
|
140
|
+
updated_at: IDL.Nat64,
|
|
141
|
+
max_size: IDL.Opt(IDL.Nat),
|
|
142
|
+
read: Permission,
|
|
143
|
+
created_at: IDL.Nat64,
|
|
144
|
+
version: IDL.Opt(IDL.Nat64),
|
|
145
|
+
mutable_permissions: IDL.Opt(IDL.Bool),
|
|
146
|
+
rate_config: IDL.Opt(RateConfig),
|
|
147
|
+
write: Permission,
|
|
148
|
+
max_changes_per_user: IDL.Opt(IDL.Nat32)
|
|
34
149
|
});
|
|
35
150
|
const HttpRequest = IDL.Record({
|
|
36
151
|
url: IDL.Text,
|
|
37
152
|
method: IDL.Text,
|
|
38
153
|
body: IDL.Vec(IDL.Nat8),
|
|
39
|
-
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))
|
|
154
|
+
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
155
|
+
certificate_version: IDL.Opt(IDL.Nat16)
|
|
40
156
|
});
|
|
41
157
|
const StreamingCallbackToken = IDL.Record({
|
|
158
|
+
memory: Memory,
|
|
42
159
|
token: IDL.Opt(IDL.Text),
|
|
43
160
|
sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
44
161
|
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
@@ -71,46 +188,6 @@ export const idlFactory = ({IDL}) => {
|
|
|
71
188
|
full_path: IDL.Text
|
|
72
189
|
});
|
|
73
190
|
const InitUploadResult = IDL.Record({batch_id: IDL.Nat});
|
|
74
|
-
const ListOrderField = IDL.Variant({
|
|
75
|
-
UpdatedAt: IDL.Null,
|
|
76
|
-
Keys: IDL.Null,
|
|
77
|
-
CreatedAt: IDL.Null
|
|
78
|
-
});
|
|
79
|
-
const ListOrder = IDL.Record({field: ListOrderField, desc: IDL.Bool});
|
|
80
|
-
const ListMatcher = IDL.Record({
|
|
81
|
-
key: IDL.Opt(IDL.Text),
|
|
82
|
-
description: IDL.Opt(IDL.Text)
|
|
83
|
-
});
|
|
84
|
-
const ListPaginate = IDL.Record({
|
|
85
|
-
start_after: IDL.Opt(IDL.Text),
|
|
86
|
-
limit: IDL.Opt(IDL.Nat64)
|
|
87
|
-
});
|
|
88
|
-
const ListParams = IDL.Record({
|
|
89
|
-
order: IDL.Opt(ListOrder),
|
|
90
|
-
owner: IDL.Opt(IDL.Principal),
|
|
91
|
-
matcher: IDL.Opt(ListMatcher),
|
|
92
|
-
paginate: IDL.Opt(ListPaginate)
|
|
93
|
-
});
|
|
94
|
-
const AssetKey = IDL.Record({
|
|
95
|
-
token: IDL.Opt(IDL.Text),
|
|
96
|
-
collection: IDL.Text,
|
|
97
|
-
owner: IDL.Principal,
|
|
98
|
-
name: IDL.Text,
|
|
99
|
-
description: IDL.Opt(IDL.Text),
|
|
100
|
-
full_path: IDL.Text
|
|
101
|
-
});
|
|
102
|
-
const AssetEncodingNoContent = IDL.Record({
|
|
103
|
-
modified: IDL.Nat64,
|
|
104
|
-
sha256: IDL.Vec(IDL.Nat8),
|
|
105
|
-
total_length: IDL.Nat
|
|
106
|
-
});
|
|
107
|
-
const AssetNoContent = IDL.Record({
|
|
108
|
-
key: AssetKey,
|
|
109
|
-
updated_at: IDL.Nat64,
|
|
110
|
-
encodings: IDL.Vec(IDL.Tuple(IDL.Text, AssetEncodingNoContent)),
|
|
111
|
-
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
112
|
-
created_at: IDL.Nat64
|
|
113
|
-
});
|
|
114
191
|
const ListResults = IDL.Record({
|
|
115
192
|
matches_pages: IDL.Opt(IDL.Nat64),
|
|
116
193
|
matches_length: IDL.Nat64,
|
|
@@ -121,6 +198,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
121
198
|
const CustomDomain = IDL.Record({
|
|
122
199
|
updated_at: IDL.Nat64,
|
|
123
200
|
created_at: IDL.Nat64,
|
|
201
|
+
version: IDL.Opt(IDL.Nat64),
|
|
124
202
|
bn_id: IDL.Opt(IDL.Text)
|
|
125
203
|
});
|
|
126
204
|
const ListResults_1 = IDL.Record({
|
|
@@ -130,19 +208,7 @@ export const idlFactory = ({IDL}) => {
|
|
|
130
208
|
items: IDL.Vec(IDL.Tuple(IDL.Text, Doc)),
|
|
131
209
|
items_length: IDL.Nat64
|
|
132
210
|
});
|
|
133
|
-
const
|
|
134
|
-
Controllers: IDL.Null,
|
|
135
|
-
Private: IDL.Null,
|
|
136
|
-
Public: IDL.Null,
|
|
137
|
-
Managed: IDL.Null
|
|
138
|
-
});
|
|
139
|
-
const Rule = IDL.Record({
|
|
140
|
-
updated_at: IDL.Nat64,
|
|
141
|
-
max_size: IDL.Opt(IDL.Nat),
|
|
142
|
-
read: Permission,
|
|
143
|
-
created_at: IDL.Nat64,
|
|
144
|
-
write: Permission
|
|
145
|
-
});
|
|
211
|
+
const MemorySize = IDL.Record({stable: IDL.Nat64, heap: IDL.Nat64});
|
|
146
212
|
const SetController = IDL.Record({
|
|
147
213
|
metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
|
|
148
214
|
scope: ControllerScope,
|
|
@@ -153,25 +219,36 @@ export const idlFactory = ({IDL}) => {
|
|
|
153
219
|
controllers: IDL.Vec(IDL.Principal)
|
|
154
220
|
});
|
|
155
221
|
const SetDoc = IDL.Record({
|
|
156
|
-
updated_at: IDL.Opt(IDL.Nat64),
|
|
157
222
|
data: IDL.Vec(IDL.Nat8),
|
|
158
|
-
description: IDL.Opt(IDL.Text)
|
|
223
|
+
description: IDL.Opt(IDL.Text),
|
|
224
|
+
version: IDL.Opt(IDL.Nat64)
|
|
159
225
|
});
|
|
160
226
|
const SetRule = IDL.Record({
|
|
161
|
-
|
|
227
|
+
max_capacity: IDL.Opt(IDL.Nat32),
|
|
228
|
+
memory: IDL.Opt(Memory),
|
|
162
229
|
max_size: IDL.Opt(IDL.Nat),
|
|
163
230
|
read: Permission,
|
|
164
|
-
|
|
231
|
+
version: IDL.Opt(IDL.Nat64),
|
|
232
|
+
mutable_permissions: IDL.Opt(IDL.Bool),
|
|
233
|
+
rate_config: IDL.Opt(RateConfig),
|
|
234
|
+
write: Permission,
|
|
235
|
+
max_changes_per_user: IDL.Opt(IDL.Nat32)
|
|
165
236
|
});
|
|
166
|
-
const
|
|
237
|
+
const UploadChunk = IDL.Record({
|
|
167
238
|
content: IDL.Vec(IDL.Nat8),
|
|
168
|
-
batch_id: IDL.Nat
|
|
239
|
+
batch_id: IDL.Nat,
|
|
240
|
+
order_id: IDL.Opt(IDL.Nat)
|
|
169
241
|
});
|
|
170
|
-
const
|
|
242
|
+
const UploadChunkResult = IDL.Record({chunk_id: IDL.Nat});
|
|
171
243
|
return IDL.Service({
|
|
244
|
+
build_version: IDL.Func([], [IDL.Text], []),
|
|
172
245
|
commit_asset_upload: IDL.Func([CommitBatch], [], []),
|
|
246
|
+
count_assets: IDL.Func([IDL.Text, ListParams], [IDL.Nat64], []),
|
|
247
|
+
count_collection_assets: IDL.Func([IDL.Text], [IDL.Nat64], []),
|
|
248
|
+
count_collection_docs: IDL.Func([IDL.Text], [IDL.Nat64], []),
|
|
249
|
+
count_docs: IDL.Func([IDL.Text, ListParams], [IDL.Nat64], []),
|
|
173
250
|
del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
|
|
174
|
-
del_assets: IDL.Func([IDL.
|
|
251
|
+
del_assets: IDL.Func([IDL.Text], [], []),
|
|
175
252
|
del_controllers: IDL.Func(
|
|
176
253
|
[DeleteControllersArgs],
|
|
177
254
|
[IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
|
|
@@ -179,32 +256,61 @@ export const idlFactory = ({IDL}) => {
|
|
|
179
256
|
),
|
|
180
257
|
del_custom_domain: IDL.Func([IDL.Text], [], []),
|
|
181
258
|
del_doc: IDL.Func([IDL.Text, IDL.Text, DelDoc], [], []),
|
|
182
|
-
|
|
259
|
+
del_docs: IDL.Func([IDL.Text], [], []),
|
|
260
|
+
del_filtered_assets: IDL.Func([IDL.Text, ListParams], [], []),
|
|
261
|
+
del_filtered_docs: IDL.Func([IDL.Text, ListParams], [], []),
|
|
262
|
+
del_many_assets: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))], [], []),
|
|
263
|
+
del_many_docs: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text, DelDoc))], [], []),
|
|
264
|
+
del_rule: IDL.Func([CollectionType, IDL.Text, DelRule], [], []),
|
|
265
|
+
deposit_cycles: IDL.Func([DepositCyclesArgs], [], []),
|
|
266
|
+
get_asset: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(AssetNoContent)], []),
|
|
267
|
+
get_auth_config: IDL.Func([], [IDL.Opt(AuthenticationConfig)], []),
|
|
183
268
|
get_config: IDL.Func([], [Config], []),
|
|
184
|
-
|
|
185
|
-
|
|
269
|
+
get_db_config: IDL.Func([], [IDL.Opt(DbConfig)], []),
|
|
270
|
+
get_doc: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(Doc)], []),
|
|
271
|
+
get_many_assets: IDL.Func(
|
|
272
|
+
[IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
|
|
273
|
+
[IDL.Vec(IDL.Tuple(IDL.Text, IDL.Opt(AssetNoContent)))],
|
|
274
|
+
[]
|
|
275
|
+
),
|
|
276
|
+
get_many_docs: IDL.Func(
|
|
277
|
+
[IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
|
|
278
|
+
[IDL.Vec(IDL.Tuple(IDL.Text, IDL.Opt(Doc)))],
|
|
279
|
+
[]
|
|
280
|
+
),
|
|
281
|
+
get_rule: IDL.Func([CollectionType, IDL.Text], [IDL.Opt(Rule)], []),
|
|
282
|
+
get_storage_config: IDL.Func([], [StorageConfig], []),
|
|
283
|
+
http_request: IDL.Func([HttpRequest], [HttpResponse], []),
|
|
186
284
|
http_request_streaming_callback: IDL.Func(
|
|
187
285
|
[StreamingCallbackToken],
|
|
188
286
|
[StreamingCallbackHttpResponse],
|
|
189
|
-
[
|
|
287
|
+
[]
|
|
190
288
|
),
|
|
191
289
|
init_asset_upload: IDL.Func([InitAssetKey], [InitUploadResult], []),
|
|
192
|
-
list_assets: IDL.Func([IDL.
|
|
193
|
-
list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], [
|
|
194
|
-
list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], [
|
|
195
|
-
list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], [
|
|
196
|
-
list_rules: IDL.Func([
|
|
197
|
-
|
|
290
|
+
list_assets: IDL.Func([IDL.Text, ListParams], [ListResults], []),
|
|
291
|
+
list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], []),
|
|
292
|
+
list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], []),
|
|
293
|
+
list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], []),
|
|
294
|
+
list_rules: IDL.Func([CollectionType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], []),
|
|
295
|
+
memory_size: IDL.Func([], [MemorySize], []),
|
|
296
|
+
set_auth_config: IDL.Func([AuthenticationConfig], [], []),
|
|
198
297
|
set_controllers: IDL.Func(
|
|
199
298
|
[SetControllersArgs],
|
|
200
299
|
[IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
|
|
201
300
|
[]
|
|
202
301
|
),
|
|
203
302
|
set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
|
|
303
|
+
set_db_config: IDL.Func([DbConfig], [], []),
|
|
204
304
|
set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
305
|
+
set_many_docs: IDL.Func(
|
|
306
|
+
[IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text, SetDoc))],
|
|
307
|
+
[IDL.Vec(IDL.Tuple(IDL.Text, Doc))],
|
|
308
|
+
[]
|
|
309
|
+
),
|
|
310
|
+
set_rule: IDL.Func([CollectionType, IDL.Text, SetRule], [Rule], []),
|
|
311
|
+
set_storage_config: IDL.Func([StorageConfig], [], []),
|
|
312
|
+
upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []),
|
|
313
|
+
version: IDL.Func([], [IDL.Text], [])
|
|
208
314
|
});
|
|
209
315
|
};
|
|
210
316
|
// @ts-ignore
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@junobuild/storage",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.6-next-2025-04-06",
|
|
4
4
|
"description": "A library for interfacing with Juno's Storage features.",
|
|
5
5
|
"author": "David Dal Busco (https://daviddalbusco.com)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -47,11 +47,11 @@
|
|
|
47
47
|
],
|
|
48
48
|
"homepage": "https://juno.build",
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@dfinity/agent": "
|
|
51
|
-
"@dfinity/candid": "
|
|
52
|
-
"@dfinity/identity": "
|
|
53
|
-
"@dfinity/principal": "
|
|
54
|
-
"@dfinity/utils": "
|
|
50
|
+
"@dfinity/agent": "*",
|
|
51
|
+
"@dfinity/candid": "*",
|
|
52
|
+
"@dfinity/identity": "*",
|
|
53
|
+
"@dfinity/principal": "*",
|
|
54
|
+
"@dfinity/utils": "*",
|
|
55
55
|
"@junobuild/utils": "*"
|
|
56
56
|
}
|
|
57
|
-
}
|
|
57
|
+
}
|