@junobuild/storage 0.2.0-next-2025-06-12 → 0.2.0-next-2025-06-20

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.
@@ -254,6 +254,7 @@ export interface _SERVICE {
254
254
  add_credits: ActorMethod<[Principal, Tokens], undefined>;
255
255
  add_invitation_code: ActorMethod<[string], undefined>;
256
256
  assert_mission_control_center: ActorMethod<[AssertMissionControlCenterArgs], undefined>;
257
+ commit_asset_upload: ActorMethod<[CommitBatch], undefined>;
257
258
  commit_proposal: ActorMethod<[CommitProposal], null>;
258
259
  commit_proposal_asset_upload: ActorMethod<[CommitBatch], undefined>;
259
260
  count_proposals: ActorMethod<[], bigint>;
@@ -274,6 +275,7 @@ export interface _SERVICE {
274
275
  [StreamingCallbackToken],
275
276
  StreamingCallbackHttpResponse
276
277
  >;
278
+ init_asset_upload: ActorMethod<[InitAssetKey, bigint], InitUploadResult>;
277
279
  init_proposal: ActorMethod<[ProposalType], [bigint, Proposal]>;
278
280
  init_proposal_asset_upload: ActorMethod<[InitAssetKey, bigint], InitUploadResult>;
279
281
  init_user_mission_control_center: ActorMethod<[], MissionControl>;
@@ -290,6 +292,7 @@ export interface _SERVICE {
290
292
  set_storage_config: ActorMethod<[StorageConfig], undefined>;
291
293
  submit_proposal: ActorMethod<[bigint], [bigint, Proposal]>;
292
294
  update_rate_config: ActorMethod<[SegmentKind, RateConfig], undefined>;
295
+ upload_asset_chunk: ActorMethod<[UploadChunk], UploadChunkResult>;
293
296
  upload_proposal_asset_chunk: ActorMethod<[UploadChunk], UploadChunkResult>;
294
297
  }
295
298
  export declare const idlFactory: IDL.InterfaceFactory;
@@ -5,15 +5,15 @@ export const idlFactory = ({IDL}) => {
5
5
  mission_control_id: IDL.Principal,
6
6
  user: IDL.Principal
7
7
  });
8
- const CommitProposal = IDL.Record({
9
- sha256: IDL.Vec(IDL.Nat8),
10
- proposal_id: IDL.Nat
11
- });
12
8
  const CommitBatch = IDL.Record({
13
9
  batch_id: IDL.Nat,
14
10
  headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
15
11
  chunk_ids: IDL.Vec(IDL.Nat)
16
12
  });
13
+ const CommitProposal = IDL.Record({
14
+ sha256: IDL.Vec(IDL.Nat8),
15
+ proposal_id: IDL.Nat
16
+ });
17
17
  const CreateCanisterArgs = IDL.Record({
18
18
  block_index: IDL.Opt(IDL.Nat64),
19
19
  subnet_id: IDL.Opt(IDL.Principal),
@@ -261,6 +261,7 @@ export const idlFactory = ({IDL}) => {
261
261
  add_credits: IDL.Func([IDL.Principal, Tokens], [], []),
262
262
  add_invitation_code: IDL.Func([IDL.Text], [], []),
263
263
  assert_mission_control_center: IDL.Func([AssertMissionControlCenterArgs], [], []),
264
+ commit_asset_upload: IDL.Func([CommitBatch], [], []),
264
265
  commit_proposal: IDL.Func([CommitProposal], [IDL.Null], []),
265
266
  commit_proposal_asset_upload: IDL.Func([CommitBatch], [], []),
266
267
  count_proposals: IDL.Func([], [IDL.Nat64], []),
@@ -282,6 +283,7 @@ export const idlFactory = ({IDL}) => {
282
283
  [StreamingCallbackHttpResponse],
283
284
  []
284
285
  ),
286
+ init_asset_upload: IDL.Func([InitAssetKey, IDL.Nat], [InitUploadResult], []),
285
287
  init_proposal: IDL.Func([ProposalType], [IDL.Nat, Proposal], []),
286
288
  init_proposal_asset_upload: IDL.Func([InitAssetKey, IDL.Nat], [InitUploadResult], []),
287
289
  init_user_mission_control_center: IDL.Func([], [MissionControl], []),
@@ -302,6 +304,7 @@ export const idlFactory = ({IDL}) => {
302
304
  set_storage_config: IDL.Func([StorageConfig], [], []),
303
305
  submit_proposal: IDL.Func([IDL.Nat], [IDL.Nat, Proposal], []),
304
306
  update_rate_config: IDL.Func([SegmentKind, RateConfig], [], []),
307
+ upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []),
305
308
  upload_proposal_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], [])
306
309
  });
307
310
  };
@@ -5,15 +5,15 @@ export const idlFactory = ({IDL}) => {
5
5
  mission_control_id: IDL.Principal,
6
6
  user: IDL.Principal
7
7
  });
8
- const CommitProposal = IDL.Record({
9
- sha256: IDL.Vec(IDL.Nat8),
10
- proposal_id: IDL.Nat
11
- });
12
8
  const CommitBatch = IDL.Record({
13
9
  batch_id: IDL.Nat,
14
10
  headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
15
11
  chunk_ids: IDL.Vec(IDL.Nat)
16
12
  });
13
+ const CommitProposal = IDL.Record({
14
+ sha256: IDL.Vec(IDL.Nat8),
15
+ proposal_id: IDL.Nat
16
+ });
17
17
  const CreateCanisterArgs = IDL.Record({
18
18
  block_index: IDL.Opt(IDL.Nat64),
19
19
  subnet_id: IDL.Opt(IDL.Principal),
@@ -261,6 +261,7 @@ export const idlFactory = ({IDL}) => {
261
261
  add_credits: IDL.Func([IDL.Principal, Tokens], [], []),
262
262
  add_invitation_code: IDL.Func([IDL.Text], [], []),
263
263
  assert_mission_control_center: IDL.Func([AssertMissionControlCenterArgs], [], ['query']),
264
+ commit_asset_upload: IDL.Func([CommitBatch], [], []),
264
265
  commit_proposal: IDL.Func([CommitProposal], [IDL.Null], []),
265
266
  commit_proposal_asset_upload: IDL.Func([CommitBatch], [], []),
266
267
  count_proposals: IDL.Func([], [IDL.Nat64], ['query']),
@@ -282,6 +283,7 @@ export const idlFactory = ({IDL}) => {
282
283
  [StreamingCallbackHttpResponse],
283
284
  ['query']
284
285
  ),
286
+ init_asset_upload: IDL.Func([InitAssetKey, IDL.Nat], [InitUploadResult], []),
285
287
  init_proposal: IDL.Func([ProposalType], [IDL.Nat, Proposal], []),
286
288
  init_proposal_asset_upload: IDL.Func([InitAssetKey, IDL.Nat], [InitUploadResult], []),
287
289
  init_user_mission_control_center: IDL.Func([], [MissionControl], []),
@@ -302,6 +304,7 @@ export const idlFactory = ({IDL}) => {
302
304
  set_storage_config: IDL.Func([StorageConfig], [], []),
303
305
  submit_proposal: IDL.Func([IDL.Nat], [IDL.Nat, Proposal], []),
304
306
  update_rate_config: IDL.Func([SegmentKind, RateConfig], [], []),
307
+ upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []),
305
308
  upload_proposal_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], [])
306
309
  });
307
310
  };
@@ -5,15 +5,15 @@ export const idlFactory = ({IDL}) => {
5
5
  mission_control_id: IDL.Principal,
6
6
  user: IDL.Principal
7
7
  });
8
- const CommitProposal = IDL.Record({
9
- sha256: IDL.Vec(IDL.Nat8),
10
- proposal_id: IDL.Nat
11
- });
12
8
  const CommitBatch = IDL.Record({
13
9
  batch_id: IDL.Nat,
14
10
  headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
15
11
  chunk_ids: IDL.Vec(IDL.Nat)
16
12
  });
13
+ const CommitProposal = IDL.Record({
14
+ sha256: IDL.Vec(IDL.Nat8),
15
+ proposal_id: IDL.Nat
16
+ });
17
17
  const CreateCanisterArgs = IDL.Record({
18
18
  block_index: IDL.Opt(IDL.Nat64),
19
19
  subnet_id: IDL.Opt(IDL.Principal),
@@ -261,6 +261,7 @@ export const idlFactory = ({IDL}) => {
261
261
  add_credits: IDL.Func([IDL.Principal, Tokens], [], []),
262
262
  add_invitation_code: IDL.Func([IDL.Text], [], []),
263
263
  assert_mission_control_center: IDL.Func([AssertMissionControlCenterArgs], [], ['query']),
264
+ commit_asset_upload: IDL.Func([CommitBatch], [], []),
264
265
  commit_proposal: IDL.Func([CommitProposal], [IDL.Null], []),
265
266
  commit_proposal_asset_upload: IDL.Func([CommitBatch], [], []),
266
267
  count_proposals: IDL.Func([], [IDL.Nat64], ['query']),
@@ -282,6 +283,7 @@ export const idlFactory = ({IDL}) => {
282
283
  [StreamingCallbackHttpResponse],
283
284
  ['query']
284
285
  ),
286
+ init_asset_upload: IDL.Func([InitAssetKey, IDL.Nat], [InitUploadResult], []),
285
287
  init_proposal: IDL.Func([ProposalType], [IDL.Nat, Proposal], []),
286
288
  init_proposal_asset_upload: IDL.Func([InitAssetKey, IDL.Nat], [InitUploadResult], []),
287
289
  init_user_mission_control_center: IDL.Func([], [MissionControl], []),
@@ -302,6 +304,7 @@ export const idlFactory = ({IDL}) => {
302
304
  set_storage_config: IDL.Func([StorageConfig], [], []),
303
305
  submit_proposal: IDL.Func([IDL.Nat], [IDL.Nat, Proposal], []),
304
306
  update_rate_config: IDL.Func([SegmentKind, RateConfig], [], []),
307
+ upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []),
305
308
  upload_proposal_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], [])
306
309
  });
307
310
  };
@@ -168,6 +168,17 @@ export interface ListResults_1 {
168
168
  items: Array<[string, Doc]>;
169
169
  items_length: bigint;
170
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
+ }
171
182
  export type Memory = {Heap: null} | {Stable: null};
172
183
  export interface MemorySize {
173
184
  stable: bigint;
@@ -335,7 +346,7 @@ export interface _SERVICE {
335
346
  list_custom_domains: ActorMethod<[], Array<[string, CustomDomain]>>;
336
347
  list_docs: ActorMethod<[string, ListParams], ListResults_1>;
337
348
  list_proposals: ActorMethod<[ListProposalsParams], ListProposalResults>;
338
- list_rules: ActorMethod<[CollectionType], Array<[string, Rule]>>;
349
+ list_rules: ActorMethod<[CollectionType, ListRulesParams], ListRulesResults>;
339
350
  memory_size: ActorMethod<[], MemorySize>;
340
351
  reject_proposal: ActorMethod<[CommitProposal], null>;
341
352
  set_auth_config: ActorMethod<[AuthenticationConfig], undefined>;
@@ -261,6 +261,13 @@ export const idlFactory = ({IDL}) => {
261
261
  items: IDL.Vec(IDL.Tuple(ProposalKey, Proposal)),
262
262
  items_length: IDL.Nat64
263
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
+ });
264
271
  const MemorySize = IDL.Record({stable: IDL.Nat64, heap: IDL.Nat64});
265
272
  const SetController = IDL.Record({
266
273
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
@@ -351,7 +358,7 @@ export const idlFactory = ({IDL}) => {
351
358
  list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], []),
352
359
  list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], []),
353
360
  list_proposals: IDL.Func([ListProposalsParams], [ListProposalResults], []),
354
- list_rules: IDL.Func([CollectionType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], []),
361
+ list_rules: IDL.Func([CollectionType, ListRulesParams], [ListRulesResults], []),
355
362
  memory_size: IDL.Func([], [MemorySize], []),
356
363
  reject_proposal: IDL.Func([CommitProposal], [IDL.Null], []),
357
364
  set_auth_config: IDL.Func([AuthenticationConfig], [], []),
@@ -261,6 +261,13 @@ export const idlFactory = ({IDL}) => {
261
261
  items: IDL.Vec(IDL.Tuple(ProposalKey, Proposal)),
262
262
  items_length: IDL.Nat64
263
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
+ });
264
271
  const MemorySize = IDL.Record({stable: IDL.Nat64, heap: IDL.Nat64});
265
272
  const SetController = IDL.Record({
266
273
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
@@ -351,7 +358,7 @@ export const idlFactory = ({IDL}) => {
351
358
  list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
352
359
  list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], ['query']),
353
360
  list_proposals: IDL.Func([ListProposalsParams], [ListProposalResults], ['query']),
354
- list_rules: IDL.Func([CollectionType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], ['query']),
361
+ list_rules: IDL.Func([CollectionType, ListRulesParams], [ListRulesResults], ['query']),
355
362
  memory_size: IDL.Func([], [MemorySize], ['query']),
356
363
  reject_proposal: IDL.Func([CommitProposal], [IDL.Null], []),
357
364
  set_auth_config: IDL.Func([AuthenticationConfig], [], []),
@@ -261,6 +261,13 @@ export const idlFactory = ({IDL}) => {
261
261
  items: IDL.Vec(IDL.Tuple(ProposalKey, Proposal)),
262
262
  items_length: IDL.Nat64
263
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
+ });
264
271
  const MemorySize = IDL.Record({stable: IDL.Nat64, heap: IDL.Nat64});
265
272
  const SetController = IDL.Record({
266
273
  metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
@@ -351,7 +358,7 @@ export const idlFactory = ({IDL}) => {
351
358
  list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
352
359
  list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], ['query']),
353
360
  list_proposals: IDL.Func([ListProposalsParams], [ListProposalResults], ['query']),
354
- list_rules: IDL.Func([CollectionType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], ['query']),
361
+ list_rules: IDL.Func([CollectionType, ListRulesParams], [ListRulesResults], ['query']),
355
362
  memory_size: IDL.Func([], [MemorySize], ['query']),
356
363
  reject_proposal: IDL.Func([CommitProposal], [IDL.Null], []),
357
364
  set_auth_config: IDL.Func([AuthenticationConfig], [], []),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junobuild/storage",
3
- "version": "0.2.0-next-2025-06-12",
3
+ "version": "0.2.0-next-2025-06-20",
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",