@xyo-network/archivist-model 3.6.0-rc.2 → 3.6.0-rc.3
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,7 +1,7 @@
|
|
|
1
|
-
import type { Hash } from '@xylabs/hex';
|
|
2
|
-
export interface NextOptions<TId =
|
|
1
|
+
import type { Hash, Hex } from '@xylabs/hex';
|
|
2
|
+
export interface NextOptions<TId = Hex> {
|
|
3
|
+
cursor?: TId;
|
|
3
4
|
limit?: number;
|
|
4
|
-
offset?: TId;
|
|
5
5
|
order?: 'asc' | 'desc';
|
|
6
6
|
}
|
|
7
7
|
export interface ArchivistNextOptions extends NextOptions<Hash> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NextOptions.d.ts","sourceRoot":"","sources":["../../src/NextOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"NextOptions.d.ts","sourceRoot":"","sources":["../../src/NextOptions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,aAAa,CAAA;AAE5C,MAAM,WAAW,WAAW,CAAC,GAAG,GAAG,GAAG;IACpC,MAAM,CAAC,EAAE,GAAG,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,oBAAqB,SAAQ,WAAW,CAAC,IAAI,CAAC;CAAG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Hash } from '@xylabs/hex';
|
|
2
2
|
import type { Promisable, PromisableArray } from '@xylabs/promise';
|
|
3
3
|
import type { ModuleQueryFunctions } from '@xyo-network/module-model';
|
|
4
|
-
import type { Payload } from '@xyo-network/payload-model';
|
|
4
|
+
import type { Payload, WithStorageMeta } from '@xyo-network/payload-model';
|
|
5
5
|
import type { NextOptions } from './NextOptions.ts';
|
|
6
6
|
export interface ReadArchivist<TReadResponse, TId = string> {
|
|
7
7
|
all(): PromisableArray<TReadResponse>;
|
|
@@ -16,7 +16,7 @@ export interface WriteArchivist<TReadResponse, TWriteResponse = TReadResponse, T
|
|
|
16
16
|
export interface StashArchivist<TWriteResponse> {
|
|
17
17
|
commit(): PromisableArray<TWriteResponse>;
|
|
18
18
|
}
|
|
19
|
-
export interface Archivist<TReadResponse extends Payload = Payload, TWriteResponse extends Payload = Payload, TWrite extends Payload = TReadResponse & Payload, TId = Hash> extends ReadArchivist<TReadResponse
|
|
19
|
+
export interface Archivist<TReadResponse extends Payload = Payload, TWriteResponse extends Payload = Payload, TWrite extends Payload = TReadResponse & Payload, TId = Hash> extends ReadArchivist<WithStorageMeta<TReadResponse>, TId>, WriteArchivist<WithStorageMeta<TReadResponse>, WithStorageMeta<TWriteResponse>, TWrite, TId>, StashArchivist<TWriteResponse> {
|
|
20
20
|
}
|
|
21
21
|
export interface ArchivistQueryFunctions<TReadResponse extends Payload = Payload, TWriteResponse extends Payload = Payload, TWrite extends Payload = TReadResponse & Payload, TId = Hash> extends Archivist<TReadResponse, TWriteResponse, TWrite, TId>, ModuleQueryFunctions {
|
|
22
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QueryFunctions.d.ts","sourceRoot":"","sources":["../../src/QueryFunctions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAClE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AACrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"QueryFunctions.d.ts","sourceRoot":"","sources":["../../src/QueryFunctions.ts"],"names":[],"mappings":"AAAA,OA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,EAC1D,cAAc,CAAC,eAAe,CAAC,aAAa,CAAC,EAAE,eAAe,CAAC,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAC5F,cAAc,CAAC,cAAc,CAAC;CAAG;AAEnC,MAAM,WAAW,uBAAuB,CACtC,aAAa,SAAS,OAAO,GAAG,OAAO,EACvC,cAAc,SAAS,OAAO,GAAG,OAAO,EACxC,MAAM,SAAS,OAAO,GAAG,aAAa,GAAG,OAAO,EAChD,GAAG,GAAG,IAAI,CACV,SAAQ,SAAS,CAAC,aAAa,EAAE,cAAc,EAAE,MAAM,EAAE,GAAG,CAAC,EAC7D,oBAAoB;CAAG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/archivist-model",
|
|
3
|
-
"version": "3.6.0-rc.
|
|
3
|
+
"version": "3.6.0-rc.3",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"@xylabs/object": "^4.4.12",
|
|
34
34
|
"@xylabs/promise": "^4.4.12",
|
|
35
35
|
"@xylabs/typeof": "^4.4.12",
|
|
36
|
-
"@xyo-network/account-model": "^3.6.0-rc.
|
|
37
|
-
"@xyo-network/module-events": "^3.6.0-rc.
|
|
38
|
-
"@xyo-network/module-model": "^3.6.0-rc.
|
|
39
|
-
"@xyo-network/payload-model": "^3.6.0-rc.
|
|
36
|
+
"@xyo-network/account-model": "^3.6.0-rc.3",
|
|
37
|
+
"@xyo-network/module-events": "^3.6.0-rc.3",
|
|
38
|
+
"@xyo-network/module-model": "^3.6.0-rc.3",
|
|
39
|
+
"@xyo-network/payload-model": "^3.6.0-rc.3"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@xylabs/ts-scripts-yarn3": "^4.2.4",
|
package/src/NextOptions.ts
CHANGED
package/src/QueryFunctions.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Hash } from '@xylabs/hex'
|
|
2
2
|
import type { Promisable, PromisableArray } from '@xylabs/promise'
|
|
3
3
|
import type { ModuleQueryFunctions } from '@xyo-network/module-model'
|
|
4
|
-
import type { Payload } from '@xyo-network/payload-model'
|
|
4
|
+
import type { Payload, WithStorageMeta } from '@xyo-network/payload-model'
|
|
5
5
|
|
|
6
6
|
import type { NextOptions } from './NextOptions.ts'
|
|
7
7
|
|
|
@@ -26,8 +26,8 @@ export interface Archivist<
|
|
|
26
26
|
TWriteResponse extends Payload = Payload,
|
|
27
27
|
TWrite extends Payload = TReadResponse & Payload,
|
|
28
28
|
TId = Hash,
|
|
29
|
-
> extends ReadArchivist<TReadResponse
|
|
30
|
-
WriteArchivist<TReadResponse
|
|
29
|
+
> extends ReadArchivist<WithStorageMeta<TReadResponse>, TId>,
|
|
30
|
+
WriteArchivist<WithStorageMeta<TReadResponse>, WithStorageMeta<TWriteResponse>, TWrite, TId>,
|
|
31
31
|
StashArchivist<TWriteResponse> {}
|
|
32
32
|
|
|
33
33
|
export interface ArchivistQueryFunctions<
|