@junobuild/storage 0.0.4 → 0.0.5

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.
@@ -230,8 +230,10 @@ export interface UploadChunkResult {
230
230
  export interface _SERVICE {
231
231
  build_version: ActorMethod<[], string>;
232
232
  commit_asset_upload: ActorMethod<[CommitBatch], undefined>;
233
- count_assets: ActorMethod<[string], bigint>;
234
- count_docs: ActorMethod<[string], bigint>;
233
+ count_assets: ActorMethod<[string, ListParams], bigint>;
234
+ count_collection_assets: ActorMethod<[string], bigint>;
235
+ count_collection_docs: ActorMethod<[string], bigint>;
236
+ count_docs: ActorMethod<[string, ListParams], bigint>;
235
237
  del_asset: ActorMethod<[string, string], undefined>;
236
238
  del_assets: ActorMethod<[string], undefined>;
237
239
  del_controllers: ActorMethod<[DeleteControllersArgs], Array<[Principal, Controller]>>;
@@ -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
  });
@@ -136,34 +164,6 @@ export const idlFactory = ({IDL}) => {
136
164
  full_path: IDL.Text
137
165
  });
138
166
  const InitUploadResult = IDL.Record({batch_id: IDL.Nat});
139
- const ListOrderField = IDL.Variant({
140
- UpdatedAt: IDL.Null,
141
- Keys: IDL.Null,
142
- CreatedAt: IDL.Null
143
- });
144
- const ListOrder = IDL.Record({field: ListOrderField, desc: IDL.Bool});
145
- const TimestampMatcher = IDL.Variant({
146
- Equal: IDL.Nat64,
147
- Between: IDL.Tuple(IDL.Nat64, IDL.Nat64),
148
- GreaterThan: IDL.Nat64,
149
- LessThan: IDL.Nat64
150
- });
151
- const ListMatcher = IDL.Record({
152
- key: IDL.Opt(IDL.Text),
153
- updated_at: IDL.Opt(TimestampMatcher),
154
- description: IDL.Opt(IDL.Text),
155
- created_at: IDL.Opt(TimestampMatcher)
156
- });
157
- const ListPaginate = IDL.Record({
158
- start_after: IDL.Opt(IDL.Text),
159
- limit: IDL.Opt(IDL.Nat64)
160
- });
161
- const ListParams = IDL.Record({
162
- order: IDL.Opt(ListOrder),
163
- owner: IDL.Opt(IDL.Principal),
164
- matcher: IDL.Opt(ListMatcher),
165
- paginate: IDL.Opt(ListPaginate)
166
- });
167
167
  const ListResults = IDL.Record({
168
168
  matches_pages: IDL.Opt(IDL.Nat64),
169
169
  matches_length: IDL.Nat64,
@@ -234,8 +234,10 @@ export const idlFactory = ({IDL}) => {
234
234
  return IDL.Service({
235
235
  build_version: IDL.Func([], [IDL.Text], ['query']),
236
236
  commit_asset_upload: IDL.Func([CommitBatch], [], []),
237
- count_assets: IDL.Func([IDL.Text], [IDL.Nat64], ['query']),
238
- count_docs: IDL.Func([IDL.Text], [IDL.Nat64], ['query']),
237
+ count_assets: IDL.Func([IDL.Text, ListParams], [IDL.Nat64], ['query']),
238
+ count_collection_assets: IDL.Func([IDL.Text], [IDL.Nat64], ['query']),
239
+ count_collection_docs: IDL.Func([IDL.Text], [IDL.Nat64], ['query']),
240
+ count_docs: IDL.Func([IDL.Text, ListParams], [IDL.Nat64], ['query']),
239
241
  del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
240
242
  del_assets: IDL.Func([IDL.Text], [], []),
241
243
  del_controllers: IDL.Func(
@@ -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
  });
@@ -136,34 +164,6 @@ export const idlFactory = ({IDL}) => {
136
164
  full_path: IDL.Text
137
165
  });
138
166
  const InitUploadResult = IDL.Record({batch_id: IDL.Nat});
139
- const ListOrderField = IDL.Variant({
140
- UpdatedAt: IDL.Null,
141
- Keys: IDL.Null,
142
- CreatedAt: IDL.Null
143
- });
144
- const ListOrder = IDL.Record({field: ListOrderField, desc: IDL.Bool});
145
- const TimestampMatcher = IDL.Variant({
146
- Equal: IDL.Nat64,
147
- Between: IDL.Tuple(IDL.Nat64, IDL.Nat64),
148
- GreaterThan: IDL.Nat64,
149
- LessThan: IDL.Nat64
150
- });
151
- const ListMatcher = IDL.Record({
152
- key: IDL.Opt(IDL.Text),
153
- updated_at: IDL.Opt(TimestampMatcher),
154
- description: IDL.Opt(IDL.Text),
155
- created_at: IDL.Opt(TimestampMatcher)
156
- });
157
- const ListPaginate = IDL.Record({
158
- start_after: IDL.Opt(IDL.Text),
159
- limit: IDL.Opt(IDL.Nat64)
160
- });
161
- const ListParams = IDL.Record({
162
- order: IDL.Opt(ListOrder),
163
- owner: IDL.Opt(IDL.Principal),
164
- matcher: IDL.Opt(ListMatcher),
165
- paginate: IDL.Opt(ListPaginate)
166
- });
167
167
  const ListResults = IDL.Record({
168
168
  matches_pages: IDL.Opt(IDL.Nat64),
169
169
  matches_length: IDL.Nat64,
@@ -234,8 +234,10 @@ export const idlFactory = ({IDL}) => {
234
234
  return IDL.Service({
235
235
  build_version: IDL.Func([], [IDL.Text], ['query']),
236
236
  commit_asset_upload: IDL.Func([CommitBatch], [], []),
237
- count_assets: IDL.Func([IDL.Text], [IDL.Nat64], ['query']),
238
- count_docs: IDL.Func([IDL.Text], [IDL.Nat64], ['query']),
237
+ count_assets: IDL.Func([IDL.Text, ListParams], [IDL.Nat64], ['query']),
238
+ count_collection_assets: IDL.Func([IDL.Text], [IDL.Nat64], ['query']),
239
+ count_collection_docs: IDL.Func([IDL.Text], [IDL.Nat64], ['query']),
240
+ count_docs: IDL.Func([IDL.Text, ListParams], [IDL.Nat64], ['query']),
239
241
  del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
240
242
  del_assets: IDL.Func([IDL.Text], [], []),
241
243
  del_controllers: IDL.Func(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junobuild/storage",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
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",