@xyo-network/archivist 2.22.5 → 2.22.6
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.
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { XyoAccount } from '@xyo-network/account';
|
|
2
2
|
import { XyoPayload } from '@xyo-network/payload';
|
|
3
3
|
import { Archivist } from './model';
|
|
4
|
-
import {
|
|
5
|
-
export declare type XyoArchivist<T extends XyoPayload = XyoPayload> = Archivist<T, T, T, T,
|
|
4
|
+
import { XyoPayloadFindQuery } from './XyoPayloadFindFilter';
|
|
5
|
+
export declare type XyoArchivist<T extends XyoPayload = XyoPayload> = Archivist<T, T, T, T, XyoPayloadFindQuery>;
|
|
6
6
|
export declare abstract class XyoArchivistBase<T extends XyoPayload = XyoPayload> implements XyoArchivist<T> {
|
|
7
7
|
protected parent?: XyoArchivist<T>;
|
|
8
8
|
protected account?: XyoAccount;
|
|
9
9
|
constructor(parent?: XyoArchivist<T>, account?: XyoAccount);
|
|
10
10
|
abstract insert(payloads: T[]): T[] | Promise<T[]>;
|
|
11
|
-
abstract find(query:
|
|
11
|
+
abstract find(query: XyoPayloadFindQuery): T[] | Promise<T[]>;
|
|
12
12
|
abstract get(hash: string): T | Promise<T | undefined> | undefined;
|
|
13
13
|
all(): T[] | Promise<T[]>;
|
|
14
14
|
delete(_hash: string): boolean | Promise<boolean>;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { XyoQueryPayload } from '@xyo-network/payload';
|
|
2
|
-
export
|
|
2
|
+
export interface XyoPayloadFindFilter {
|
|
3
3
|
order?: 'desc' | 'asc';
|
|
4
4
|
timestamp?: number;
|
|
5
5
|
limit?: number;
|
|
6
6
|
schema?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare type XyoPayloadFindQuery = XyoQueryPayload<{
|
|
9
|
+
filter: XyoPayloadFindFilter;
|
|
7
10
|
}>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { XyoAccount } from '@xyo-network/account';
|
|
2
2
|
import { XyoPayload } from '@xyo-network/payload';
|
|
3
3
|
import { Archivist } from './model';
|
|
4
|
-
import {
|
|
5
|
-
export declare type XyoArchivist<T extends XyoPayload = XyoPayload> = Archivist<T, T, T, T,
|
|
4
|
+
import { XyoPayloadFindQuery } from './XyoPayloadFindFilter';
|
|
5
|
+
export declare type XyoArchivist<T extends XyoPayload = XyoPayload> = Archivist<T, T, T, T, XyoPayloadFindQuery>;
|
|
6
6
|
export declare abstract class XyoArchivistBase<T extends XyoPayload = XyoPayload> implements XyoArchivist<T> {
|
|
7
7
|
protected parent?: XyoArchivist<T>;
|
|
8
8
|
protected account?: XyoAccount;
|
|
9
9
|
constructor(parent?: XyoArchivist<T>, account?: XyoAccount);
|
|
10
10
|
abstract insert(payloads: T[]): T[] | Promise<T[]>;
|
|
11
|
-
abstract find(query:
|
|
11
|
+
abstract find(query: XyoPayloadFindQuery): T[] | Promise<T[]>;
|
|
12
12
|
abstract get(hash: string): T | Promise<T | undefined> | undefined;
|
|
13
13
|
all(): T[] | Promise<T[]>;
|
|
14
14
|
delete(_hash: string): boolean | Promise<boolean>;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { XyoQueryPayload } from '@xyo-network/payload';
|
|
2
|
-
export
|
|
2
|
+
export interface XyoPayloadFindFilter {
|
|
3
3
|
order?: 'desc' | 'asc';
|
|
4
4
|
timestamp?: number;
|
|
5
5
|
limit?: number;
|
|
6
6
|
schema?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare type XyoPayloadFindQuery = XyoQueryPayload<{
|
|
9
|
+
filter: XyoPayloadFindFilter;
|
|
7
10
|
}>;
|
package/package.json
CHANGED
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@xylabs/sdk-js": "^2.6.2",
|
|
13
|
-
"@xyo-network/account": "^2.22.
|
|
14
|
-
"@xyo-network/boundwitness": "^2.22.
|
|
15
|
-
"@xyo-network/core": "^2.22.
|
|
16
|
-
"@xyo-network/payload": "^2.22.
|
|
13
|
+
"@xyo-network/account": "^2.22.6",
|
|
14
|
+
"@xyo-network/boundwitness": "^2.22.6",
|
|
15
|
+
"@xyo-network/core": "^2.22.6",
|
|
16
|
+
"@xyo-network/payload": "^2.22.6",
|
|
17
17
|
"axios": "^0.27.2",
|
|
18
18
|
"lru-cache": "^7.13.1",
|
|
19
19
|
"pako": "^2.0.4"
|
|
@@ -56,6 +56,6 @@
|
|
|
56
56
|
},
|
|
57
57
|
"sideEffects": true,
|
|
58
58
|
"types": "dist/esm/index.d.ts",
|
|
59
|
-
"version": "2.22.
|
|
59
|
+
"version": "2.22.6",
|
|
60
60
|
"packageManager": "yarn@3.1.1"
|
|
61
61
|
}
|
package/src/XyoArchivist.ts
CHANGED
|
@@ -2,9 +2,9 @@ import { XyoAccount } from '@xyo-network/account'
|
|
|
2
2
|
import { XyoPayload } from '@xyo-network/payload'
|
|
3
3
|
|
|
4
4
|
import { Archivist } from './model'
|
|
5
|
-
import {
|
|
5
|
+
import { XyoPayloadFindQuery } from './XyoPayloadFindFilter'
|
|
6
6
|
|
|
7
|
-
export type XyoArchivist<T extends XyoPayload = XyoPayload> = Archivist<T, T, T, T,
|
|
7
|
+
export type XyoArchivist<T extends XyoPayload = XyoPayload> = Archivist<T, T, T, T, XyoPayloadFindQuery>
|
|
8
8
|
|
|
9
9
|
export abstract class XyoArchivistBase<T extends XyoPayload = XyoPayload> implements XyoArchivist<T> {
|
|
10
10
|
protected parent?: XyoArchivist<T>
|
|
@@ -15,7 +15,7 @@ export abstract class XyoArchivistBase<T extends XyoPayload = XyoPayload> implem
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
abstract insert(payloads: T[]): T[] | Promise<T[]>
|
|
18
|
-
abstract find(query:
|
|
18
|
+
abstract find(query: XyoPayloadFindQuery): T[] | Promise<T[]>
|
|
19
19
|
abstract get(hash: string): T | Promise<T | undefined> | undefined
|
|
20
20
|
public all(): T[] | Promise<T[]> {
|
|
21
21
|
throw Error('getAll not supported')
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { XyoQueryPayload } from '@xyo-network/payload'
|
|
2
2
|
|
|
3
|
-
export
|
|
3
|
+
export interface XyoPayloadFindFilter {
|
|
4
4
|
order?: 'desc' | 'asc'
|
|
5
5
|
timestamp?: number
|
|
6
6
|
limit?: number
|
|
7
7
|
schema?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export type XyoPayloadFindQuery = XyoQueryPayload<{
|
|
11
|
+
filter: XyoPayloadFindFilter
|
|
8
12
|
}>
|