@xyo-network/archivist-storage 3.9.18 → 3.9.19

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.
@@ -0,0 +1,40 @@
1
+ import type { Hash, Hex } from '@xylabs/hex';
2
+ import type { Promisable, PromisableArray } from '@xylabs/promise';
3
+ import { AbstractArchivist } from '@xyo-network/archivist-abstract';
4
+ import type { ArchivistConfig, ArchivistInstance, ArchivistModuleEventData, ArchivistNextOptions, ArchivistParams } from '@xyo-network/archivist-model';
5
+ import type { BoundWitness } from '@xyo-network/boundwitness-model';
6
+ import type { AnyConfigSchema } from '@xyo-network/module-model';
7
+ import type { Payload, Schema, WithStorageMeta } from '@xyo-network/payload-model';
8
+ export declare const StorageArchivistConfigSchema: "network.xyo.archivist.storage.config";
9
+ export type StorageArchivistConfigSchema = typeof StorageArchivistConfigSchema;
10
+ export type StorageArchivistConfig = ArchivistConfig<{
11
+ maxEntries?: number;
12
+ maxEntrySize?: number;
13
+ namespace?: string;
14
+ schema: StorageArchivistConfigSchema;
15
+ type?: 'local' | 'session' | 'page';
16
+ }>;
17
+ export type StorageArchivistParams = ArchivistParams<AnyConfigSchema<StorageArchivistConfig>>;
18
+ export declare class StorageArchivist<TParams extends StorageArchivistParams = StorageArchivistParams, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData> extends AbstractArchivist<TParams, TEventData> implements ArchivistInstance {
19
+ static readonly configSchemas: Schema[];
20
+ static readonly defaultConfigSchema: Schema;
21
+ private _privateStorage;
22
+ private _storage;
23
+ get maxEntries(): number;
24
+ get maxEntrySize(): number;
25
+ get namespace(): string;
26
+ get queries(): string[];
27
+ get type(): "local" | "session" | "page";
28
+ private get privateStorage();
29
+ private get storage();
30
+ protected allHandler(): PromisableArray<WithStorageMeta<Payload>>;
31
+ protected clearHandler(): void | Promise<void>;
32
+ protected commitHandler(): Promise<BoundWitness[]>;
33
+ protected deleteHandler(hashes: Hash[]): Promise<Hash[]>;
34
+ protected getFromCursor(order?: 'asc' | 'desc', limit?: number, cursor?: Hex, open?: boolean): WithStorageMeta[];
35
+ protected getHandler(hashes: string[]): Promisable<WithStorageMeta<Payload>[]>;
36
+ protected insertHandler(payloads: WithStorageMeta<Payload>[]): Promise<WithStorageMeta<Payload>[]>;
37
+ protected nextHandler(options?: ArchivistNextOptions): Promisable<WithStorageMeta<Payload>[]>;
38
+ protected startHandler(): Promise<boolean>;
39
+ }
40
+ //# sourceMappingURL=StorageArchivist.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"StorageArchivist.d.ts","sourceRoot":"","sources":["../../src/StorageArchivist.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAElE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,KAAK,EACV,eAAe,EAEf,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EACpB,eAAe,EAChB,MAAM,8BAA8B,CAAA;AAQrC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAEhE,OAAO,KAAK,EACV,OAAO,EAAE,MAAM,EAAE,eAAe,EACjC,MAAM,4BAA4B,CAAA;AAMnC,eAAO,MAAM,4BAA4B,EAAG,sCAA+C,CAAA;AAC3F,MAAM,MAAM,4BAA4B,GAAG,OAAO,4BAA4B,CAAA;AAE9E,MAAM,MAAM,sBAAsB,GAAG,eAAe,CAAC;IACnD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,4BAA4B,CAAA;IACpC,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,GA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CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC;cAW9F,WAAW,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,UAAU,CAAC,eAAe,CAAC,OAAO,CAAC,EAAE,CAAC;cAO7E,YAAY;CAItC"}
@@ -1,42 +1,2 @@
1
- import { Hash, Hex } from '@xylabs/hex';
2
- import { PromisableArray, Promisable } from '@xylabs/promise';
3
- import { AbstractArchivist } from '@xyo-network/archivist-abstract';
4
- import { ArchivistConfig, ArchivistParams, ArchivistModuleEventData, ArchivistInstance, ArchivistNextOptions } from '@xyo-network/archivist-model';
5
- import { BoundWitness } from '@xyo-network/boundwitness-model';
6
- import { AnyConfigSchema } from '@xyo-network/module-model';
7
- import { Schema, WithStorageMeta, Payload } from '@xyo-network/payload-model';
8
-
9
- declare const StorageArchivistConfigSchema: "network.xyo.archivist.storage.config";
10
- type StorageArchivistConfigSchema = typeof StorageArchivistConfigSchema;
11
- type StorageArchivistConfig = ArchivistConfig<{
12
- maxEntries?: number;
13
- maxEntrySize?: number;
14
- namespace?: string;
15
- schema: StorageArchivistConfigSchema;
16
- type?: 'local' | 'session' | 'page';
17
- }>;
18
- type StorageArchivistParams = ArchivistParams<AnyConfigSchema<StorageArchivistConfig>>;
19
- declare class StorageArchivist<TParams extends StorageArchivistParams = StorageArchivistParams, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData> extends AbstractArchivist<TParams, TEventData> implements ArchivistInstance {
20
- static readonly configSchemas: Schema[];
21
- static readonly defaultConfigSchema: Schema;
22
- private _privateStorage;
23
- private _storage;
24
- get maxEntries(): number;
25
- get maxEntrySize(): number;
26
- get namespace(): string;
27
- get queries(): string[];
28
- get type(): "local" | "session" | "page";
29
- private get privateStorage();
30
- private get storage();
31
- protected allHandler(): PromisableArray<WithStorageMeta<Payload>>;
32
- protected clearHandler(): void | Promise<void>;
33
- protected commitHandler(): Promise<BoundWitness[]>;
34
- protected deleteHandler(hashes: Hash[]): Promise<Hash[]>;
35
- protected getFromCursor(order?: 'asc' | 'desc', limit?: number, cursor?: Hex, open?: boolean): WithStorageMeta[];
36
- protected getHandler(hashes: string[]): Promisable<WithStorageMeta<Payload>[]>;
37
- protected insertHandler(payloads: WithStorageMeta<Payload>[]): Promise<WithStorageMeta<Payload>[]>;
38
- protected nextHandler(options?: ArchivistNextOptions): Promisable<WithStorageMeta<Payload>[]>;
39
- protected startHandler(): Promise<boolean>;
40
- }
41
-
42
- export { StorageArchivist, type StorageArchivistConfig, StorageArchivistConfigSchema, type StorageArchivistParams };
1
+ export * from './StorageArchivist.ts';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/archivist-storage",
3
- "version": "3.9.18",
3
+ "version": "3.9.19",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -33,27 +33,27 @@
33
33
  "@xylabs/exists": "^4.5.1",
34
34
  "@xylabs/hex": "^4.5.1",
35
35
  "@xylabs/promise": "^4.5.1",
36
- "@xyo-network/archivist-abstract": "^3.9.18",
37
- "@xyo-network/archivist-model": "^3.9.18",
38
- "@xyo-network/boundwitness-model": "^3.9.18",
39
- "@xyo-network/module-model": "^3.9.18",
40
- "@xyo-network/payload-builder": "^3.9.18",
41
- "@xyo-network/payload-model": "^3.9.18",
36
+ "@xyo-network/archivist-abstract": "^3.9.19",
37
+ "@xyo-network/archivist-model": "^3.9.19",
38
+ "@xyo-network/boundwitness-model": "^3.9.19",
39
+ "@xyo-network/module-model": "^3.9.19",
40
+ "@xyo-network/payload-builder": "^3.9.19",
41
+ "@xyo-network/payload-model": "^3.9.19",
42
42
  "store2": "^2.14.4"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@xylabs/delay": "^4.5.1",
46
- "@xylabs/ts-scripts-yarn3": "^5.0.25",
47
- "@xylabs/tsconfig": "^5.0.25",
46
+ "@xylabs/ts-scripts-yarn3": "^5.0.39",
47
+ "@xylabs/tsconfig": "^5.0.39",
48
48
  "@xylabs/vitest-extended": "^4.5.1",
49
- "@xyo-network/account": "^3.9.18",
50
- "@xyo-network/archivist-acceptance-tests": "^3.9.18",
51
- "@xyo-network/archivist-memory": "^3.9.18",
52
- "@xyo-network/boundwitness-wrapper": "^3.9.18",
53
- "@xyo-network/id-payload-plugin": "^3.9.18",
54
- "@xyo-network/node-memory": "^3.9.18",
55
- "@xyo-network/payload-wrapper": "^3.9.18",
56
- "typescript": "^5.7.3",
49
+ "@xyo-network/account": "^3.9.19",
50
+ "@xyo-network/archivist-acceptance-tests": "^3.9.19",
51
+ "@xyo-network/archivist-memory": "^3.9.19",
52
+ "@xyo-network/boundwitness-wrapper": "^3.9.19",
53
+ "@xyo-network/id-payload-plugin": "^3.9.19",
54
+ "@xyo-network/node-memory": "^3.9.19",
55
+ "@xyo-network/payload-wrapper": "^3.9.19",
56
+ "typescript": "^5.8.2",
57
57
  "uuid": "^11.1.0",
58
58
  "vitest": "^3.0.7"
59
59
  },