@junobuild/core-peer 0.0.1 → 0.0.2

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.
@@ -10,11 +10,29 @@ export declare const setDoc: <D>({ collection, doc, satellite }: {
10
10
  doc: Doc<D>;
11
11
  satellite: Satellite;
12
12
  }) => Promise<Doc<D>>;
13
+ export declare const setManyDocs: ({ docs, satellite }: {
14
+ docs: {
15
+ collection: string;
16
+ doc: Doc<any>;
17
+ }[];
18
+ satellite: Satellite;
19
+ }) => Promise<Doc<any>[]>;
13
20
  export declare const deleteDoc: <D>({ collection, doc, satellite }: {
14
21
  collection: string;
15
22
  doc: Doc<D>;
16
23
  satellite: Satellite;
17
24
  }) => Promise<void>;
25
+ export declare const deleteDocs: ({ collection, satellite }: {
26
+ collection: string;
27
+ satellite: Satellite;
28
+ }) => Promise<void>;
29
+ export declare const deleteManyDocs: ({ docs, satellite }: {
30
+ docs: {
31
+ collection: string;
32
+ doc: Doc<any>;
33
+ }[];
34
+ satellite: Satellite;
35
+ }) => Promise<void>;
18
36
  export declare const listDocs: <D>({ collection, filter, satellite }: {
19
37
  collection: string;
20
38
  filter: ListParams;
@@ -18,3 +18,9 @@ export declare const deleteAssets: ({ collection, satellite }: {
18
18
  collection: string;
19
19
  satellite: Satellite;
20
20
  }) => Promise<void>;
21
+ export declare const deleteManyAssets: ({ assets, satellite }: {
22
+ assets: ({
23
+ collection: string;
24
+ } & Pick<AssetKey, 'fullPath'>)[];
25
+ satellite: Satellite;
26
+ }) => Promise<void>;
@@ -10,11 +10,29 @@ export declare const setDoc: <D>({ satellite, ...rest }: {
10
10
  doc: Doc<D>;
11
11
  satellite?: Partial<import("../types/satellite.types").Satellite> | undefined;
12
12
  }) => Promise<Doc<D>>;
13
+ export declare const setManyDocs: ({ satellite, ...rest }: {
14
+ docs: {
15
+ collection: string;
16
+ doc: Doc<any>;
17
+ }[];
18
+ satellite?: Partial<import("../types/satellite.types").Satellite> | undefined;
19
+ }) => Promise<Doc<any>[]>;
13
20
  export declare const deleteDoc: <D>({ satellite, ...rest }: {
14
21
  collection: string;
15
22
  doc: Doc<D>;
16
23
  satellite?: Partial<import("../types/satellite.types").Satellite> | undefined;
17
24
  }) => Promise<void>;
25
+ export declare const deleteDocs: ({ collection, satellite }: {
26
+ collection: string;
27
+ satellite?: Partial<import("../types/satellite.types").Satellite> | undefined;
28
+ }) => Promise<void>;
29
+ export declare const deleteManyDocs: ({ satellite, ...rest }: {
30
+ docs: {
31
+ collection: string;
32
+ doc: Doc<any>;
33
+ }[];
34
+ satellite?: Partial<import("../types/satellite.types").Satellite> | undefined;
35
+ }) => Promise<void>;
18
36
  export declare const listDocs: <D>({ satellite, filter, ...rest }: {
19
37
  collection: string;
20
38
  filter?: ListParams | undefined;
@@ -22,3 +22,9 @@ export declare const deleteAssets: ({ collection, satellite }: {
22
22
  collection: string;
23
23
  satellite?: Partial<import("../types/satellite.types").Satellite> | undefined;
24
24
  }) => Promise<void>;
25
+ export declare const deleteManyAssets: ({ assets, satellite }: {
26
+ assets: ({
27
+ collection: string;
28
+ } & Pick<AssetKey, 'fullPath'>)[];
29
+ satellite?: Partial<import("../types/satellite.types").Satellite> | undefined;
30
+ } & Pick<AssetKey, "fullPath">) => Promise<void>;
@@ -0,0 +1,8 @@
1
+ import type { DelDoc, Doc as DocApi, SetDoc } from '../../declarations/satellite/satellite.did';
2
+ import type { Doc } from '../types/doc.types';
3
+ export declare const toSetDoc: <D>(doc: Doc<D>) => Promise<SetDoc>;
4
+ export declare const toDelDoc: <D>(doc: Doc<D>) => DelDoc;
5
+ export declare const fromDoc: <D>({ updatedDoc, key }: {
6
+ updatedDoc: DocApi;
7
+ key: string;
8
+ }) => Promise<Doc<D>>;
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junobuild/core-peer",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "JavaScript core client for Juno minus DFINITY agent-js dependencies",
5
5
  "author": "David Dal Busco (https://daviddalbusco.com)",
6
6
  "license": "MIT",