@interncom/diplomatic 0.0.38 → 0.0.40

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.
@@ -26,6 +26,10 @@ declare class LocalStorageStore implements IClientStateStore {
26
26
  ops: Map<string, Uint8Array>;
27
27
  storeOp: (sha256: Uint8Array, cipherOp: Uint8Array) => Promise<void>;
28
28
  clearOp: (sha256: Uint8Array) => Promise<void>;
29
+ listOps: () => Promise<{
30
+ sha256: string;
31
+ cipherOp: Uint8Array;
32
+ }[]>;
29
33
  hasOp: (sha256: Uint8Array) => Promise<boolean>;
30
34
  }
31
35
  export declare const localStorageStore: LocalStorageStore;
@@ -30,6 +30,10 @@ declare class MemoryStore implements IClientStateStore {
30
30
  ops: Map<string, Uint8Array>;
31
31
  storeOp: (sha256: Uint8Array, cipherOp: Uint8Array) => Promise<void>;
32
32
  clearOp: (sha256: Uint8Array) => Promise<void>;
33
+ listOps: () => Promise<{
34
+ sha256: string;
35
+ cipherOp: Uint8Array;
36
+ }[]>;
33
37
  hasOp: (sha256: Uint8Array) => Promise<boolean>;
34
38
  }
35
39
  export declare const memoryStore: MemoryStore;
package/dist/types.d.ts CHANGED
@@ -21,6 +21,10 @@ export interface IClientStateStore {
21
21
  numDownloads: () => Promise<number>;
22
22
  storeOp: (sha256: Uint8Array, cipherOp: Uint8Array) => Promise<void>;
23
23
  clearOp: (sha256: Uint8Array) => Promise<void>;
24
+ listOps: () => Promise<Array<{
25
+ cipherOp: Uint8Array;
26
+ sha256: string;
27
+ }>>;
24
28
  hasOp: (sha256: Uint8Array) => Promise<boolean>;
25
29
  }
26
30
  export interface IDiplomaticClientState {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@interncom/diplomatic",
3
- "version": "0.0.38",
3
+ "version": "0.0.40",
4
4
  "type": "module",
5
5
  "description": "Secure sync layer",
6
6
  "main": "dist/index.mjs",
@@ -19,6 +19,8 @@
19
19
  "access": "public"
20
20
  },
21
21
  "devDependencies": {
22
+ "@types/file-saver": "^2.0.7",
23
+ "@types/node": "^20.14.11",
22
24
  "@types/react": "^18.3.3",
23
25
  "esbuild": "0.21.5",
24
26
  "react": "^18.3.1",
@@ -30,6 +32,8 @@
30
32
  },
31
33
  "dependencies": {
32
34
  "@msgpack/msgpack": "^3.0.0-beta2",
33
- "idb": "^8.0.0"
35
+ "file-saver": "^2.0.5",
36
+ "idb": "^8.0.0",
37
+ "jszip": "^3.10.1"
34
38
  }
35
39
  }