@junobuild/core 0.0.48 → 0.0.49

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.
Files changed (28) hide show
  1. package/declarations/satellite/satellite.did.d.ts +17 -3
  2. package/declarations/satellite/satellite.factory.did.js +23 -6
  3. package/declarations/satellite/satellite.factory.did.mjs +23 -6
  4. package/dist/browser/canisterStatus-TBLYKI2M.js +2 -0
  5. package/dist/browser/{chunk-DAMIJKS3.js → chunk-JAXPYESO.js} +8 -8
  6. package/dist/browser/{chunk-DAMIJKS3.js.map → chunk-JAXPYESO.js.map} +3 -3
  7. package/dist/browser/index.js +27 -27
  8. package/dist/browser/index.js.map +4 -4
  9. package/dist/declarations/satellite/satellite.did.d.ts +17 -3
  10. package/dist/declarations/satellite/satellite.factory.did.js +23 -6
  11. package/dist/declarations/satellite/satellite.factory.did.mjs +23 -6
  12. package/dist/node/index.mjs +36 -36
  13. package/dist/node/index.mjs.map +4 -4
  14. package/dist/types/api/doc.api.d.ts +1 -1
  15. package/dist/types/api/storage.api.d.ts +3 -3
  16. package/dist/types/services/doc.services.d.ts +9 -9
  17. package/dist/types/services/storage.services.d.ts +9 -9
  18. package/dist/types/types/doc.types.d.ts +1 -0
  19. package/dist/types/utils/actor.utils.d.ts +1 -1
  20. package/dist/workers/auth.worker.js +17 -12
  21. package/dist/workers/auth.worker.js.map +4 -4
  22. package/package.json +5 -5
  23. package/declarations/satellite/index.d.ts +0 -45
  24. package/declarations/satellite/index.js +0 -37
  25. package/dist/browser/canisterStatus-XBZ7P3SA.js +0 -2
  26. package/dist/declarations/satellite/index.d.ts +0 -45
  27. package/dist/declarations/satellite/index.js +0 -37
  28. /package/dist/browser/{canisterStatus-XBZ7P3SA.js.map → canisterStatus-TBLYKI2M.js.map} +0 -0
@@ -4,7 +4,7 @@ import type { Satellite } from '../types/satellite.types';
4
4
  export declare const getDoc: <D>({ collection, key, satellite }: {
5
5
  collection: string;
6
6
  satellite: Satellite;
7
- } & Pick<Doc<D>, "key">) => Promise<Doc<D> | undefined>;
7
+ } & Pick<Doc<D>, 'key'>) => Promise<Doc<D> | undefined>;
8
8
  export declare const getManyDocs: ({ docs, satellite }: {
9
9
  docs: ({
10
10
  collection: string;
@@ -2,7 +2,7 @@ import type { AssetNoContent } from '../../declarations/satellite/satellite.did'
2
2
  import type { ListParams, ListResults } from '../types/list.types';
3
3
  import type { Satellite } from '../types/satellite.types';
4
4
  import type { AssetKey, Storage } from '../types/storage.types';
5
- export declare const uploadAsset: ({ data, filename, collection, headers, token, fullPath, encoding, description, satellite }: Required<Omit<Storage, "description" | "token" | "encoding">> & Pick<Storage, "description" | "token" | "encoding"> & {
5
+ export declare const uploadAsset: ({ data, filename, collection, headers, token, fullPath, encoding, description, satellite }: Required<Omit<Storage, 'token' | 'encoding' | 'description'>> & Pick<Storage, 'token' | 'encoding' | 'description'> & {
6
6
  satellite: Satellite;
7
7
  }) => Promise<void>;
8
8
  export declare const listAssets: ({ collection, satellite, filter }: {
@@ -13,7 +13,7 @@ export declare const listAssets: ({ collection, satellite, filter }: {
13
13
  export declare const deleteAsset: ({ collection, fullPath, satellite }: {
14
14
  collection: string;
15
15
  satellite: Satellite;
16
- } & Pick<AssetKey, "fullPath">) => Promise<void>;
16
+ } & Pick<AssetKey, 'fullPath'>) => Promise<void>;
17
17
  export declare const deleteManyAssets: ({ assets, satellite }: {
18
18
  assets: ({
19
19
  collection: string;
@@ -23,7 +23,7 @@ export declare const deleteManyAssets: ({ assets, satellite }: {
23
23
  export declare const getAsset: ({ collection, fullPath, satellite }: {
24
24
  collection: string;
25
25
  satellite: Satellite;
26
- } & Pick<AssetKey, "fullPath">) => Promise<AssetNoContent | undefined>;
26
+ } & Pick<AssetKey, 'fullPath'>) => Promise<AssetNoContent | undefined>;
27
27
  export declare const getManyAssets: ({ assets, satellite }: {
28
28
  assets: ({
29
29
  collection: string;
@@ -3,40 +3,40 @@ import type { ListParams, ListResults } from '../types/list.types';
3
3
  import type { SatelliteOptions } from '../types/satellite.types';
4
4
  export declare const getDoc: <D>({ satellite, ...rest }: {
5
5
  collection: string;
6
- satellite?: Partial<import("../types/satellite.types").Satellite> | undefined;
7
- } & Pick<Doc<D>, "key">) => Promise<Doc<D> | undefined>;
6
+ satellite?: SatelliteOptions;
7
+ } & Pick<Doc<D>, 'key'>) => Promise<Doc<D> | undefined>;
8
8
  export declare const getManyDocs: ({ satellite, ...rest }: {
9
9
  docs: ({
10
10
  collection: string;
11
11
  } & Pick<Doc<any>, 'key'>)[];
12
- satellite?: Partial<import("../types/satellite.types").Satellite> | undefined;
12
+ satellite?: SatelliteOptions;
13
13
  }) => Promise<(Doc<any> | undefined)[]>;
14
14
  export declare const setDoc: <D>({ satellite, ...rest }: {
15
15
  collection: string;
16
16
  doc: Doc<D>;
17
- satellite?: Partial<import("../types/satellite.types").Satellite> | undefined;
17
+ satellite?: SatelliteOptions;
18
18
  }) => Promise<Doc<D>>;
19
19
  export declare const setManyDocs: ({ satellite, ...rest }: {
20
20
  docs: {
21
21
  collection: string;
22
22
  doc: Doc<any>;
23
23
  }[];
24
- satellite?: Partial<import("../types/satellite.types").Satellite> | undefined;
24
+ satellite?: SatelliteOptions;
25
25
  }) => Promise<Doc<any>[]>;
26
26
  export declare const deleteDoc: <D>({ satellite, ...rest }: {
27
27
  collection: string;
28
28
  doc: Doc<D>;
29
- satellite?: Partial<import("../types/satellite.types").Satellite> | undefined;
29
+ satellite?: SatelliteOptions;
30
30
  }) => Promise<void>;
31
31
  export declare const deleteManyDocs: ({ satellite, ...rest }: {
32
32
  docs: {
33
33
  collection: string;
34
34
  doc: Doc<any>;
35
35
  }[];
36
- satellite?: Partial<import("../types/satellite.types").Satellite> | undefined;
36
+ satellite?: SatelliteOptions;
37
37
  }) => Promise<void>;
38
38
  export declare const listDocs: <D>({ satellite, filter, ...rest }: {
39
39
  collection: string;
40
- filter?: ListParams | undefined;
41
- satellite?: Partial<import("../types/satellite.types").Satellite> | undefined;
40
+ filter?: ListParams;
41
+ satellite?: SatelliteOptions;
42
42
  }) => Promise<ListResults<Doc<D>>>;
@@ -12,26 +12,26 @@ export declare const uploadFile: (params: Partial<Pick<Storage, 'filename'>> & O
12
12
  }) => Promise<AssetKey>;
13
13
  export declare const listAssets: ({ collection, satellite: satelliteOptions, filter }: {
14
14
  collection: string;
15
- satellite?: Partial<import("../types/satellite.types").Satellite> | undefined;
16
- filter?: ListParams | undefined;
15
+ satellite?: SatelliteOptions;
16
+ filter?: ListParams;
17
17
  }) => Promise<Assets>;
18
18
  export declare const deleteAsset: ({ collection, fullPath, satellite }: {
19
19
  collection: string;
20
- satellite?: Partial<import("../types/satellite.types").Satellite> | undefined;
21
- } & Pick<AssetKey, "fullPath">) => Promise<void>;
20
+ satellite?: SatelliteOptions;
21
+ } & Pick<AssetKey, 'fullPath'>) => Promise<void>;
22
22
  export declare const deleteManyAssets: ({ assets, satellite }: {
23
23
  assets: ({
24
24
  collection: string;
25
25
  } & Pick<AssetKey, 'fullPath'>)[];
26
- satellite?: Partial<import("../types/satellite.types").Satellite> | undefined;
27
- } & Pick<AssetKey, "fullPath">) => Promise<void>;
26
+ satellite?: SatelliteOptions;
27
+ } & Pick<AssetKey, 'fullPath'>) => Promise<void>;
28
28
  export declare const getAsset: ({ satellite, ...rest }: {
29
29
  collection: string;
30
- satellite?: Partial<import("../types/satellite.types").Satellite> | undefined;
31
- } & Pick<AssetKey, "fullPath">) => Promise<AssetNoContent | undefined>;
30
+ satellite?: SatelliteOptions;
31
+ } & Pick<AssetKey, 'fullPath'>) => Promise<AssetNoContent | undefined>;
32
32
  export declare const getManyAssets: ({ satellite, ...rest }: {
33
33
  assets: ({
34
34
  collection: string;
35
35
  } & Pick<AssetKey, 'fullPath'>)[];
36
- satellite?: Partial<import("../types/satellite.types").Satellite> | undefined;
36
+ satellite?: SatelliteOptions;
37
37
  }) => Promise<(AssetNoContent | undefined)[]>;
@@ -5,4 +5,5 @@ export interface Doc<D> {
5
5
  owner?: string;
6
6
  created_at?: bigint;
7
7
  updated_at?: bigint;
8
+ version?: bigint;
8
9
  }
@@ -3,4 +3,4 @@ import type { IDL } from '@dfinity/candid';
3
3
  import type { Satellite } from '../types/satellite.types';
4
4
  export declare const createActor: <T = Record<string, ActorMethod<unknown[], unknown>>>({ satelliteId: canisterId, idlFactory, identity, fetch, container }: {
5
5
  idlFactory: IDL.InterfaceFactory;
6
- } & Required<Pick<Satellite, "satelliteId" | "identity">> & Pick<Satellite, "fetch" | "container">) => Promise<ActorSubclass<T>>;
6
+ } & Required<Pick<Satellite, 'satelliteId' | 'identity'>> & Pick<Satellite, 'fetch' | 'container'>) => Promise<ActorSubclass<T>>;