@xyo-network/archivist-generic 4.0.2 → 4.1.0
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.
- package/dist/neutral/index.d.ts +42 -0
- package/package.json +27 -27
- /package/{dist/types → build/neutral}/Archivist.d.ts +0 -0
- /package/{dist/types → build/neutral}/Archivist.d.ts.map +0 -0
- /package/{dist/types → build/neutral}/Config.d.ts +0 -0
- /package/{dist/types → build/neutral}/Config.d.ts.map +0 -0
- /package/{dist/types → build/neutral}/index.d.ts +0 -0
- /package/{dist/types → build/neutral}/index.d.ts.map +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import * as _xylabs_promise from '@xylabs/promise';
|
|
2
|
+
import { PromisableArray } from '@xylabs/promise';
|
|
3
|
+
import { Hash } from '@xylabs/hex';
|
|
4
|
+
import { AccountInstance } from '@xyo-network/account-model';
|
|
5
|
+
import { AbstractArchivist } from '@xyo-network/archivist-abstract';
|
|
6
|
+
import { ArchivistConfig, ArchivistParams, ArchivistDriver, ArchivistModuleEventData, AttachableArchivistInstance, ArchivistNextOptions, ArchivistSnapshotPayload } from '@xyo-network/archivist-model';
|
|
7
|
+
import { BoundWitness } from '@xyo-network/boundwitness-model';
|
|
8
|
+
import { AnyConfigSchema, ModuleInstance } from '@xyo-network/module-model';
|
|
9
|
+
import { Payload, Schema, WithStorageMeta } from '@xyo-network/payload-model';
|
|
10
|
+
import { EmptyObject, WithAdditional } from '@xylabs/object';
|
|
11
|
+
|
|
12
|
+
declare const GenericArchivistConfigSchema: "network.xyo.archivist.generic.config";
|
|
13
|
+
type GenericArchivistConfigSchema = typeof GenericArchivistConfigSchema;
|
|
14
|
+
type GenericArchivistConfig<TConfig extends Payload | EmptyObject | void = void, TSchema extends Schema | void = void> = ArchivistConfig<WithAdditional<{
|
|
15
|
+
max?: number;
|
|
16
|
+
}, TConfig>, TSchema extends Schema ? TSchema : GenericArchivistConfigSchema | ArchivistConfig['schema']>;
|
|
17
|
+
|
|
18
|
+
interface GenericArchivistParams<TConfig extends AnyConfigSchema<GenericArchivistConfig> = AnyConfigSchema<GenericArchivistConfig>> extends ArchivistParams<TConfig> {
|
|
19
|
+
driver?: ArchivistDriver<Hash, Payload, WithStorageMeta<Payload>>;
|
|
20
|
+
}
|
|
21
|
+
declare class GenericArchivist<TParams extends GenericArchivistParams<AnyConfigSchema<GenericArchivistConfig>> = GenericArchivistParams, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData> extends AbstractArchivist<TParams, TEventData> implements AttachableArchivistInstance, ModuleInstance {
|
|
22
|
+
static readonly configSchemas: Schema[];
|
|
23
|
+
static readonly defaultConfigSchema: Schema;
|
|
24
|
+
static readonly labels: {
|
|
25
|
+
"network.xyo.storage.class": string;
|
|
26
|
+
};
|
|
27
|
+
get queries(): string[];
|
|
28
|
+
protected get driver(): ArchivistDriver<Lowercase<string>, Payload, WithStorageMeta<Payload>>;
|
|
29
|
+
static from(payloads: Payload[], account?: AccountInstance): Promise<GenericArchivist>;
|
|
30
|
+
protected allHandler(): _xylabs_promise.Promisable<WithStorageMeta<Payload>[]>;
|
|
31
|
+
protected clearHandler(): _xylabs_promise.Promisable<void>;
|
|
32
|
+
protected commitHandler(): Promise<BoundWitness[]>;
|
|
33
|
+
protected deleteHandler(hashes: Hash[]): Promise<WithStorageMeta<Payload>[]>;
|
|
34
|
+
protected getHandler(hashes: Hash[]): _xylabs_promise.Promisable<WithStorageMeta<Payload>[]>;
|
|
35
|
+
protected insertHandler(payloads: WithStorageMeta<Payload>[]): WithStorageMeta<Payload>[];
|
|
36
|
+
protected nextHandler(options?: ArchivistNextOptions): _xylabs_promise.Promisable<WithStorageMeta<Payload>[]>;
|
|
37
|
+
protected payloadCountHandler(): number;
|
|
38
|
+
protected snapshotHandler(): PromisableArray<ArchivistSnapshotPayload<WithStorageMeta<Payload>, Hash>>;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export { GenericArchivist, GenericArchivistConfigSchema };
|
|
42
|
+
export type { GenericArchivistConfig, GenericArchivistParams };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/archivist-generic",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -21,40 +21,40 @@
|
|
|
21
21
|
"type": "module",
|
|
22
22
|
"exports": {
|
|
23
23
|
".": {
|
|
24
|
-
"types": "./dist/
|
|
24
|
+
"types": "./dist/neutral/index.d.ts",
|
|
25
25
|
"default": "./dist/neutral/index.mjs"
|
|
26
26
|
},
|
|
27
27
|
"./package.json": "./package.json"
|
|
28
28
|
},
|
|
29
29
|
"module": "dist/neutral/index.mjs",
|
|
30
|
-
"types": "dist/
|
|
30
|
+
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@xylabs/assert": "^4.
|
|
33
|
-
"@xylabs/
|
|
34
|
-
"@xylabs/
|
|
35
|
-
"@xylabs/
|
|
36
|
-
"@xylabs/
|
|
37
|
-
"@
|
|
38
|
-
"@
|
|
39
|
-
"@xyo-network/
|
|
40
|
-
"@xyo-network/
|
|
41
|
-
"@xyo-network/
|
|
42
|
-
"@xyo-network/
|
|
43
|
-
"@xyo-network/
|
|
44
|
-
"@xyo-network/module-model": "^4.0.2",
|
|
45
|
-
"@xyo-network/payload-builder": "^4.0.2",
|
|
46
|
-
"@xyo-network/payload-model": "^4.0.2",
|
|
47
|
-
"lru-cache": "^11.1.0"
|
|
32
|
+
"@xylabs/assert": "^4.13.15",
|
|
33
|
+
"@xylabs/exists": "^4.13.15",
|
|
34
|
+
"@xylabs/hex": "^4.13.15",
|
|
35
|
+
"@xylabs/object": "^4.13.15",
|
|
36
|
+
"@xylabs/promise": "^4.13.15",
|
|
37
|
+
"@xyo-network/account": "^4.1.0",
|
|
38
|
+
"@xyo-network/account-model": "^4.1.0",
|
|
39
|
+
"@xyo-network/archivist-abstract": "^4.1.0",
|
|
40
|
+
"@xyo-network/archivist-model": "^4.1.0",
|
|
41
|
+
"@xyo-network/boundwitness-model": "^4.1.0",
|
|
42
|
+
"@xyo-network/module-model": "^4.1.0",
|
|
43
|
+
"@xyo-network/payload-model": "^4.1.0"
|
|
48
44
|
},
|
|
49
45
|
"devDependencies": {
|
|
50
|
-
"@xylabs/
|
|
51
|
-
"@xylabs/
|
|
52
|
-
"@xylabs/
|
|
53
|
-
"@xylabs/
|
|
54
|
-
"@
|
|
55
|
-
"@
|
|
56
|
-
"@xyo-network/
|
|
57
|
-
"@xyo-network/
|
|
46
|
+
"@xylabs/creatable": "^4.13.15",
|
|
47
|
+
"@xylabs/delay": "^4.13.15",
|
|
48
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.20",
|
|
49
|
+
"@xylabs/tsconfig": "^7.0.0-rc.20",
|
|
50
|
+
"@xylabs/typeof": "^4.13.15",
|
|
51
|
+
"@xylabs/vitest-extended": "^4.13.15",
|
|
52
|
+
"@xyo-network/archivist-acceptance-tests": "^4.1.0",
|
|
53
|
+
"@xyo-network/id-payload-plugin": "^4.1.0",
|
|
54
|
+
"@xyo-network/payload-builder": "^4.1.0",
|
|
55
|
+
"@xyo-network/payload-wrapper": "^4.1.0",
|
|
56
|
+
"@xyo-network/wallet": "^4.1.0",
|
|
57
|
+
"lru-cache": "^11.1.0",
|
|
58
58
|
"typescript": "^5.8.3",
|
|
59
59
|
"vitest": "^3.2.4"
|
|
60
60
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|