@xyo-network/archivist-view 2.111.3 → 3.0.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.
Files changed (48) hide show
  1. package/dist/neutral/index.d.ts +53 -2
  2. package/package.json +14 -33
  3. package/xy.config.ts +12 -0
  4. package/dist/browser/ViewArchivist.d.cts +0 -46
  5. package/dist/browser/ViewArchivist.d.cts.map +0 -1
  6. package/dist/browser/ViewArchivist.d.mts +0 -46
  7. package/dist/browser/ViewArchivist.d.mts.map +0 -1
  8. package/dist/browser/ViewArchivist.d.ts +0 -46
  9. package/dist/browser/ViewArchivist.d.ts.map +0 -1
  10. package/dist/browser/index.cjs +0 -86
  11. package/dist/browser/index.cjs.map +0 -1
  12. package/dist/browser/index.d.cts +0 -2
  13. package/dist/browser/index.d.cts.map +0 -1
  14. package/dist/browser/index.d.mts +0 -2
  15. package/dist/browser/index.d.mts.map +0 -1
  16. package/dist/browser/index.d.ts +0 -2
  17. package/dist/browser/index.d.ts.map +0 -1
  18. package/dist/browser/index.mjs +0 -65
  19. package/dist/browser/index.mjs.map +0 -1
  20. package/dist/neutral/ViewArchivist.d.cts +0 -46
  21. package/dist/neutral/ViewArchivist.d.cts.map +0 -1
  22. package/dist/neutral/ViewArchivist.d.mts +0 -46
  23. package/dist/neutral/ViewArchivist.d.mts.map +0 -1
  24. package/dist/neutral/ViewArchivist.d.ts +0 -46
  25. package/dist/neutral/ViewArchivist.d.ts.map +0 -1
  26. package/dist/neutral/index.cjs +0 -86
  27. package/dist/neutral/index.cjs.map +0 -1
  28. package/dist/neutral/index.d.cts +0 -2
  29. package/dist/neutral/index.d.cts.map +0 -1
  30. package/dist/neutral/index.d.mts +0 -2
  31. package/dist/neutral/index.d.mts.map +0 -1
  32. package/dist/neutral/index.d.ts.map +0 -1
  33. package/dist/node/ViewArchivist.d.cts +0 -46
  34. package/dist/node/ViewArchivist.d.cts.map +0 -1
  35. package/dist/node/ViewArchivist.d.mts +0 -46
  36. package/dist/node/ViewArchivist.d.mts.map +0 -1
  37. package/dist/node/ViewArchivist.d.ts +0 -46
  38. package/dist/node/ViewArchivist.d.ts.map +0 -1
  39. package/dist/node/index.cjs +0 -97
  40. package/dist/node/index.cjs.map +0 -1
  41. package/dist/node/index.d.cts +0 -2
  42. package/dist/node/index.d.cts.map +0 -1
  43. package/dist/node/index.d.mts +0 -2
  44. package/dist/node/index.d.mts.map +0 -1
  45. package/dist/node/index.d.ts +0 -2
  46. package/dist/node/index.d.ts.map +0 -1
  47. package/dist/node/index.mjs +0 -71
  48. package/dist/node/index.mjs.map +0 -1
@@ -1,2 +1,53 @@
1
- export * from './ViewArchivist.ts';
2
- //# sourceMappingURL=index.d.ts.map
1
+ import * as _xyo_network_archivist_model from '@xyo-network/archivist-model';
2
+ import { ArchivistConfig, ArchivistModuleEventData, ArchivistInstance, ArchivistNextOptions } from '@xyo-network/archivist-model';
3
+ import * as _xyo_network_module_model from '@xyo-network/module-model';
4
+ import { ModuleIdentifier, AnyConfigSchema, ModuleParams, ModuleInstance } from '@xyo-network/module-model';
5
+ import * as _xyo_network_payload_model from '@xyo-network/payload-model';
6
+ import { Schema, PayloadWithMeta } from '@xyo-network/payload-model';
7
+ import * as _xyo_network_account_model from '@xyo-network/account-model';
8
+ import * as _xylabs_object from '@xylabs/object';
9
+ import { Hash } from '@xylabs/hex';
10
+ import { AbstractArchivist } from '@xyo-network/archivist-abstract';
11
+
12
+ declare const ViewArchivistConfigSchema: "network.xyo.archivist.view.config";
13
+ type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema;
14
+ type ViewArchivistConfig = ArchivistConfig<{
15
+ originArchivist?: ModuleIdentifier;
16
+ }, ViewArchivistConfigSchema>;
17
+ type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>;
18
+ declare class ViewArchivist<TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData> extends AbstractArchivist<TParams, TEventData> implements ArchivistInstance, ModuleInstance {
19
+ static readonly configSchemas: Schema[];
20
+ static readonly defaultConfigSchema: Schema;
21
+ static readonly labels: {
22
+ ModuleLimitationLabelName: string;
23
+ };
24
+ private _originArchivistInstance?;
25
+ get originArchivist(): string;
26
+ get queries(): string[];
27
+ originArchivistInstance(): Promise<ArchivistInstance<_xylabs_object.BaseParamsFields & {
28
+ account?: _xyo_network_account_model.AccountInstance | "random";
29
+ addToResolvers?: boolean;
30
+ additionalSigners?: _xyo_network_account_model.AccountInstance[];
31
+ allowNameResolution?: boolean;
32
+ config: _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & _xyo_network_payload_model.SchemaFields & _xyo_network_payload_model.PayloadFields & Omit<_xyo_network_module_model.ArchivingModuleConfig & _xyo_network_module_model.ModuleConfigFields & {
33
+ parents?: _xyo_network_archivist_model.ArchivistParents;
34
+ requireAllParents?: boolean;
35
+ schema: "network.xyo.archivist.config";
36
+ storage?: _xyo_network_archivist_model.ArchivistStorage;
37
+ storeParentReads?: boolean;
38
+ }, "schema"> & {
39
+ schema: "network.xyo.archivist.config";
40
+ }, "schema"> & {
41
+ schema: string;
42
+ };
43
+ ephemeralQueryAccountEnabled?: boolean;
44
+ moduleIdentifierTransformers?: _xyo_network_module_model.ModuleIdentifierTransformer[];
45
+ }, ArchivistModuleEventData, {
46
+ schema: string;
47
+ } & _xyo_network_payload_model.PayloadFields>>;
48
+ protected allHandler(): Promise<PayloadWithMeta[]>;
49
+ protected getHandler(hashes: Hash[]): Promise<PayloadWithMeta[]>;
50
+ protected nextHandler(options?: ArchivistNextOptions): Promise<PayloadWithMeta[]>;
51
+ }
52
+
53
+ export { ViewArchivist, type ViewArchivistConfig, ViewArchivistConfigSchema, type ViewArchivistParams };
package/package.json CHANGED
@@ -12,48 +12,29 @@
12
12
  "dependencies": {
13
13
  "@xylabs/assert": "^3.6.12",
14
14
  "@xylabs/hex": "^3.6.12",
15
- "@xyo-network/archivist-abstract": "^2.111.3",
16
- "@xyo-network/archivist-model": "^2.111.3",
17
- "@xyo-network/module-model": "^2.111.3",
18
- "@xyo-network/payload-model": "^2.111.3"
15
+ "@xyo-network/archivist-abstract": "^3.0.0",
16
+ "@xyo-network/archivist-model": "^3.0.0",
17
+ "@xyo-network/module-model": "^3.0.0",
18
+ "@xyo-network/payload-model": "^3.0.0"
19
19
  },
20
20
  "devDependencies": {
21
- "@xylabs/ts-scripts-yarn3": "^3.15.14",
22
- "@xylabs/tsconfig": "^3.15.14",
23
- "@xyo-network/archivist-memory": "^2.111.3",
24
- "@xyo-network/node-memory": "^2.111.3",
25
- "@xyo-network/payload-builder": "^2.111.3",
21
+ "@xylabs/ts-scripts-yarn3": "next",
22
+ "@xylabs/tsconfig": "next",
23
+ "@xyo-network/archivist-memory": "^3.0.0",
24
+ "@xyo-network/node-memory": "^3.0.0",
25
+ "@xyo-network/payload-builder": "^3.0.0",
26
26
  "typescript": "^5.5.4"
27
27
  },
28
28
  "description": "Primary SDK for using XYO Protocol 2.0",
29
- "types": "dist/node/index.d.ts",
29
+ "types": "dist/neutral/index.d.ts",
30
30
  "exports": {
31
31
  ".": {
32
- "browser": {
33
- "require": {
34
- "types": "./dist/browser/index.d.cts",
35
- "default": "./dist/browser/index.cjs"
36
- },
37
- "import": {
38
- "types": "./dist/browser/index.d.mts",
39
- "default": "./dist/browser/index.mjs"
40
- }
41
- },
42
- "node": {
43
- "require": {
44
- "types": "./dist/node/index.d.cts",
45
- "default": "./dist/node/index.cjs"
46
- },
47
- "import": {
48
- "types": "./dist/node/index.d.mts",
49
- "default": "./dist/node/index.mjs"
50
- }
51
- }
32
+ "types": "./dist/neutral/index.d.ts",
33
+ "default": "./dist/neutral/index.mjs"
52
34
  },
53
35
  "./package.json": "./package.json"
54
36
  },
55
- "main": "dist/node/index.cjs",
56
- "module": "dist/node/index.mjs",
37
+ "module": "dist/neutral/index.mjs",
57
38
  "homepage": "https://xyo.network",
58
39
  "license": "LGPL-3.0-only",
59
40
  "publishConfig": {
@@ -64,6 +45,6 @@
64
45
  "url": "https://github.com/XYOracleNetwork/sdk-xyo-client-js.git"
65
46
  },
66
47
  "sideEffects": false,
67
- "version": "2.111.3",
48
+ "version": "3.0.0",
68
49
  "type": "module"
69
50
  }
package/xy.config.ts ADDED
@@ -0,0 +1,12 @@
1
+ import { XyTsupConfig } from '@xylabs/ts-scripts-yarn3'
2
+ const config: XyTsupConfig = {
3
+ compile: {
4
+ browser: {},
5
+ neutral: {
6
+ src: true,
7
+ },
8
+ node: {},
9
+ },
10
+ }
11
+
12
+ export default config
@@ -1,46 +0,0 @@
1
- import { Hash } from '@xylabs/hex';
2
- import { AbstractArchivist } from '@xyo-network/archivist-abstract';
3
- import { ArchivistConfig, ArchivistInstance, ArchivistModuleEventData, ArchivistNextOptions } from '@xyo-network/archivist-model';
4
- import { AnyConfigSchema, ModuleIdentifier, ModuleInstance, ModuleParams } from '@xyo-network/module-model';
5
- import { PayloadWithMeta, Schema } from '@xyo-network/payload-model';
6
- export declare const ViewArchivistConfigSchema: "network.xyo.archivist.view.config";
7
- export type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema;
8
- export type ViewArchivistConfig = ArchivistConfig<{
9
- originArchivist?: ModuleIdentifier;
10
- }, ViewArchivistConfigSchema>;
11
- export type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>;
12
- export declare class ViewArchivist<TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData> extends AbstractArchivist<TParams, TEventData> implements ArchivistInstance, ModuleInstance {
13
- static readonly configSchemas: Schema[];
14
- static readonly defaultConfigSchema: Schema;
15
- static readonly labels: {
16
- ModuleLimitationLabelName: string;
17
- };
18
- private _originArchivistInstance?;
19
- get originArchivist(): string;
20
- get queries(): string[];
21
- originArchivistInstance(): Promise<ArchivistInstance<import("@xylabs/object").BaseParamsFields & {
22
- account?: import("@xyo-network/account-model").AccountInstance | "random";
23
- addToResolvers?: boolean;
24
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
25
- allowNameResolution?: boolean;
26
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
27
- parents?: import("@xyo-network/archivist-model").ArchivistParents;
28
- requireAllParents?: boolean;
29
- schema: "network.xyo.archivist.config";
30
- storage?: import("@xyo-network/archivist-model").ArchivistStorage;
31
- storeParentReads?: boolean;
32
- }, "schema"> & {
33
- schema: "network.xyo.archivist.config";
34
- }, "schema"> & {
35
- schema: string;
36
- };
37
- ephemeralQueryAccountEnabled?: boolean;
38
- moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
39
- }, ArchivistModuleEventData, {
40
- schema: string;
41
- } & import("@xyo-network/payload-model").PayloadFields>>;
42
- protected allHandler(): Promise<PayloadWithMeta[]>;
43
- protected getHandler(hashes: Hash[]): Promise<PayloadWithMeta[]>;
44
- protected nextHandler(options?: ArchivistNextOptions): Promise<PayloadWithMeta[]>;
45
- }
46
- //# sourceMappingURL=ViewArchivist.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ViewArchivist.d.ts","sourceRoot":"","sources":["../../src/ViewArchivist.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAEL,eAAe,EAEf,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EAGrB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACL,eAAe,EAEf,gBAAgB,EAChB,cAAc,EAEd,YAAY,EACb,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEpE,eAAO,MAAM,yBAAyB,qCAA+C,CAAA;AACrF,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAC/C;IACE,eAAe,CAAC,EAAE,gBAAgB,CAAA;CACnC,EACD,yBAAyB,CAC1B,CAAA;AAED,MAAM,MAAM,mBAAmB,CAAC,OAAO,SAAS,eAAe,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,mBAAmB,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,CAAA;AAEpJ,qBACa,aAAa,CACxB,OAAO,SAAS,mBAAmB,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC,GAAG,mBAAmB,EAC/F,UAAU,SAAS,wBAAwB,GAAG,wBAAwB,CAEtE,SAAQ,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAC7C,YAAW,iBAAiB,EAAE,cAAc;IAC5C,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAsD;IACtG,gBAAyB,mBAAmB,EAAE,MAAM,CAA4B;IAChF,gBAAyB,MAAM;;MAAmC;IAElE,OAAO,CAAC,wBAAwB,CAAC,CAAmB;IAEpD,IAAI,eAAe,WAElB;IAED,IAAa,OAAO,aAEnB;IAEK,uBAAuB;;;;;;;;;;;;;;;;;;;;;cAMJ,UAAU,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;cAIxC,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;cAItD,WAAW,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;CAGjG"}
@@ -1,46 +0,0 @@
1
- import { Hash } from '@xylabs/hex';
2
- import { AbstractArchivist } from '@xyo-network/archivist-abstract';
3
- import { ArchivistConfig, ArchivistInstance, ArchivistModuleEventData, ArchivistNextOptions } from '@xyo-network/archivist-model';
4
- import { AnyConfigSchema, ModuleIdentifier, ModuleInstance, ModuleParams } from '@xyo-network/module-model';
5
- import { PayloadWithMeta, Schema } from '@xyo-network/payload-model';
6
- export declare const ViewArchivistConfigSchema: "network.xyo.archivist.view.config";
7
- export type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema;
8
- export type ViewArchivistConfig = ArchivistConfig<{
9
- originArchivist?: ModuleIdentifier;
10
- }, ViewArchivistConfigSchema>;
11
- export type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>;
12
- export declare class ViewArchivist<TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData> extends AbstractArchivist<TParams, TEventData> implements ArchivistInstance, ModuleInstance {
13
- static readonly configSchemas: Schema[];
14
- static readonly defaultConfigSchema: Schema;
15
- static readonly labels: {
16
- ModuleLimitationLabelName: string;
17
- };
18
- private _originArchivistInstance?;
19
- get originArchivist(): string;
20
- get queries(): string[];
21
- originArchivistInstance(): Promise<ArchivistInstance<import("@xylabs/object").BaseParamsFields & {
22
- account?: import("@xyo-network/account-model").AccountInstance | "random";
23
- addToResolvers?: boolean;
24
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
25
- allowNameResolution?: boolean;
26
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
27
- parents?: import("@xyo-network/archivist-model").ArchivistParents;
28
- requireAllParents?: boolean;
29
- schema: "network.xyo.archivist.config";
30
- storage?: import("@xyo-network/archivist-model").ArchivistStorage;
31
- storeParentReads?: boolean;
32
- }, "schema"> & {
33
- schema: "network.xyo.archivist.config";
34
- }, "schema"> & {
35
- schema: string;
36
- };
37
- ephemeralQueryAccountEnabled?: boolean;
38
- moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
39
- }, ArchivistModuleEventData, {
40
- schema: string;
41
- } & import("@xyo-network/payload-model").PayloadFields>>;
42
- protected allHandler(): Promise<PayloadWithMeta[]>;
43
- protected getHandler(hashes: Hash[]): Promise<PayloadWithMeta[]>;
44
- protected nextHandler(options?: ArchivistNextOptions): Promise<PayloadWithMeta[]>;
45
- }
46
- //# sourceMappingURL=ViewArchivist.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ViewArchivist.d.ts","sourceRoot":"","sources":["../../src/ViewArchivist.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAEL,eAAe,EAEf,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EAGrB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACL,eAAe,EAEf,gBAAgB,EAChB,cAAc,EAEd,YAAY,EACb,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEpE,eAAO,MAAM,yBAAyB,qCAA+C,CAAA;AACrF,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAC/C;IACE,eAAe,CAAC,EAAE,gBAAgB,CAAA;CACnC,EACD,yBAAyB,CAC1B,CAAA;AAED,MAAM,MAAM,mBAAmB,CAAC,OAAO,SAAS,eAAe,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,mBAAmB,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,CAAA;AAEpJ,qBACa,aAAa,CACxB,OAAO,SAAS,mBAAmB,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC,GAAG,mBAAmB,EAC/F,UAAU,SAAS,wBAAwB,GAAG,wBAAwB,CAEtE,SAAQ,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAC7C,YAAW,iBAAiB,EAAE,cAAc;IAC5C,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAsD;IACtG,gBAAyB,mBAAmB,EAAE,MAAM,CAA4B;IAChF,gBAAyB,MAAM;;MAAmC;IAElE,OAAO,CAAC,wBAAwB,CAAC,CAAmB;IAEpD,IAAI,eAAe,WAElB;IAED,IAAa,OAAO,aAEnB;IAEK,uBAAuB;;;;;;;;;;;;;;;;;;;;;cAMJ,UAAU,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;cAIxC,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;cAItD,WAAW,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;CAGjG"}
@@ -1,46 +0,0 @@
1
- import { Hash } from '@xylabs/hex';
2
- import { AbstractArchivist } from '@xyo-network/archivist-abstract';
3
- import { ArchivistConfig, ArchivistInstance, ArchivistModuleEventData, ArchivistNextOptions } from '@xyo-network/archivist-model';
4
- import { AnyConfigSchema, ModuleIdentifier, ModuleInstance, ModuleParams } from '@xyo-network/module-model';
5
- import { PayloadWithMeta, Schema } from '@xyo-network/payload-model';
6
- export declare const ViewArchivistConfigSchema: "network.xyo.archivist.view.config";
7
- export type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema;
8
- export type ViewArchivistConfig = ArchivistConfig<{
9
- originArchivist?: ModuleIdentifier;
10
- }, ViewArchivistConfigSchema>;
11
- export type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>;
12
- export declare class ViewArchivist<TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData> extends AbstractArchivist<TParams, TEventData> implements ArchivistInstance, ModuleInstance {
13
- static readonly configSchemas: Schema[];
14
- static readonly defaultConfigSchema: Schema;
15
- static readonly labels: {
16
- ModuleLimitationLabelName: string;
17
- };
18
- private _originArchivistInstance?;
19
- get originArchivist(): string;
20
- get queries(): string[];
21
- originArchivistInstance(): Promise<ArchivistInstance<import("@xylabs/object").BaseParamsFields & {
22
- account?: import("@xyo-network/account-model").AccountInstance | "random";
23
- addToResolvers?: boolean;
24
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
25
- allowNameResolution?: boolean;
26
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
27
- parents?: import("@xyo-network/archivist-model").ArchivistParents;
28
- requireAllParents?: boolean;
29
- schema: "network.xyo.archivist.config";
30
- storage?: import("@xyo-network/archivist-model").ArchivistStorage;
31
- storeParentReads?: boolean;
32
- }, "schema"> & {
33
- schema: "network.xyo.archivist.config";
34
- }, "schema"> & {
35
- schema: string;
36
- };
37
- ephemeralQueryAccountEnabled?: boolean;
38
- moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
39
- }, ArchivistModuleEventData, {
40
- schema: string;
41
- } & import("@xyo-network/payload-model").PayloadFields>>;
42
- protected allHandler(): Promise<PayloadWithMeta[]>;
43
- protected getHandler(hashes: Hash[]): Promise<PayloadWithMeta[]>;
44
- protected nextHandler(options?: ArchivistNextOptions): Promise<PayloadWithMeta[]>;
45
- }
46
- //# sourceMappingURL=ViewArchivist.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ViewArchivist.d.ts","sourceRoot":"","sources":["../../src/ViewArchivist.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAEL,eAAe,EAEf,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EAGrB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACL,eAAe,EAEf,gBAAgB,EAChB,cAAc,EAEd,YAAY,EACb,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEpE,eAAO,MAAM,yBAAyB,qCAA+C,CAAA;AACrF,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAC/C;IACE,eAAe,CAAC,EAAE,gBAAgB,CAAA;CACnC,EACD,yBAAyB,CAC1B,CAAA;AAED,MAAM,MAAM,mBAAmB,CAAC,OAAO,SAAS,eAAe,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,mBAAmB,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,CAAA;AAEpJ,qBACa,aAAa,CACxB,OAAO,SAAS,mBAAmB,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC,GAAG,mBAAmB,EAC/F,UAAU,SAAS,wBAAwB,GAAG,wBAAwB,CAEtE,SAAQ,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAC7C,YAAW,iBAAiB,EAAE,cAAc;IAC5C,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAsD;IACtG,gBAAyB,mBAAmB,EAAE,MAAM,CAA4B;IAChF,gBAAyB,MAAM;;MAAmC;IAElE,OAAO,CAAC,wBAAwB,CAAC,CAAmB;IAEpD,IAAI,eAAe,WAElB;IAED,IAAa,OAAO,aAEnB;IAEK,uBAAuB;;;;;;;;;;;;;;;;;;;;;cAMJ,UAAU,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;cAIxC,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;cAItD,WAAW,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;CAGjG"}
@@ -1,86 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/index.ts
22
- var src_exports = {};
23
- __export(src_exports, {
24
- ViewArchivist: () => ViewArchivist,
25
- ViewArchivistConfigSchema: () => ViewArchivistConfigSchema
26
- });
27
- module.exports = __toCommonJS(src_exports);
28
-
29
- // src/ViewArchivist.ts
30
- var import_assert = require("@xylabs/assert");
31
- var import_archivist_abstract = require("@xyo-network/archivist-abstract");
32
- var import_archivist_model = require("@xyo-network/archivist-model");
33
- var import_module_model = require("@xyo-network/module-model");
34
- function _ts_decorate(decorators, target, key, desc) {
35
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
36
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
37
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
38
- return c > 3 && r && Object.defineProperty(target, key, r), r;
39
- }
40
- __name(_ts_decorate, "_ts_decorate");
41
- var ViewArchivistConfigSchema = "network.xyo.archivist.view.config";
42
- var ViewArchivist = class extends import_archivist_abstract.AbstractArchivist {
43
- static {
44
- __name(this, "ViewArchivist");
45
- }
46
- static configSchemas = [
47
- ...super.configSchemas,
48
- ViewArchivistConfigSchema
49
- ];
50
- static defaultConfigSchema = ViewArchivistConfigSchema;
51
- static labels = {
52
- ...import_module_model.ModuleLimitationViewLabel
53
- };
54
- _originArchivistInstance;
55
- get originArchivist() {
56
- return (0, import_assert.assertEx)(this.config.originArchivist, () => "originArchivist not configured");
57
- }
58
- get queries() {
59
- return [
60
- import_archivist_model.ArchivistGetQuerySchema,
61
- import_archivist_model.ArchivistAllQuerySchema,
62
- import_archivist_model.ArchivistNextQuerySchema,
63
- ...super.queries
64
- ];
65
- }
66
- async originArchivistInstance() {
67
- this._originArchivistInstance = this._originArchivistInstance ?? (0, import_assert.assertEx)(await this.resolve(this.originArchivist, {
68
- identity: import_archivist_model.isArchivistInstance,
69
- required: true
70
- }));
71
- return this._originArchivistInstance;
72
- }
73
- async allHandler() {
74
- return await (await this.originArchivistInstance()).all?.() ?? [];
75
- }
76
- async getHandler(hashes) {
77
- return await (await this.originArchivistInstance()).get(hashes);
78
- }
79
- async nextHandler(options) {
80
- return await (await this.originArchivistInstance()).next?.(options) ?? [];
81
- }
82
- };
83
- ViewArchivist = _ts_decorate([
84
- (0, import_module_model.labeledCreatableModuleFactory)()
85
- ], ViewArchivist);
86
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/ViewArchivist.ts"],"sourcesContent":["export * from './ViewArchivist.ts'\n","import { assertEx } from '@xylabs/assert'\nimport { Hash } from '@xylabs/hex'\nimport { AbstractArchivist } from '@xyo-network/archivist-abstract'\nimport {\n ArchivistAllQuerySchema,\n ArchivistConfig,\n ArchivistGetQuerySchema,\n ArchivistInstance,\n ArchivistModuleEventData,\n ArchivistNextOptions,\n ArchivistNextQuerySchema,\n isArchivistInstance,\n} from '@xyo-network/archivist-model'\nimport {\n AnyConfigSchema,\n labeledCreatableModuleFactory,\n ModuleIdentifier,\n ModuleInstance,\n ModuleLimitationViewLabel,\n ModuleParams,\n} from '@xyo-network/module-model'\nimport { PayloadWithMeta, Schema } from '@xyo-network/payload-model'\n\nexport const ViewArchivistConfigSchema = 'network.xyo.archivist.view.config' as const\nexport type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema\n\nexport type ViewArchivistConfig = ArchivistConfig<\n {\n originArchivist?: ModuleIdentifier\n },\n ViewArchivistConfigSchema\n>\n\nexport type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>\n\n@labeledCreatableModuleFactory()\nexport class ViewArchivist<\n TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams,\n TEventData extends ArchivistModuleEventData = ArchivistModuleEventData,\n>\n extends AbstractArchivist<TParams, TEventData>\n implements ArchivistInstance, ModuleInstance {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, ViewArchivistConfigSchema]\n static override readonly defaultConfigSchema: Schema = ViewArchivistConfigSchema\n static override readonly labels = { ...ModuleLimitationViewLabel }\n\n private _originArchivistInstance?: ArchivistInstance\n\n get originArchivist() {\n return assertEx(this.config.originArchivist, () => 'originArchivist not configured')\n }\n\n override get queries() {\n return [ArchivistGetQuerySchema, ArchivistAllQuerySchema, ArchivistNextQuerySchema, ...super.queries]\n }\n\n async originArchivistInstance() {\n this._originArchivistInstance\n = this._originArchivistInstance ?? assertEx(await this.resolve(this.originArchivist, { identity: isArchivistInstance, required: true }))\n return this._originArchivistInstance\n }\n\n protected override async allHandler(): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).all?.()) ?? []\n }\n\n protected override async getHandler(hashes: Hash[]): Promise<PayloadWithMeta[]> {\n return await (await this.originArchivistInstance()).get(hashes)\n }\n\n protected override async nextHandler(options?: ArchivistNextOptions): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).next?.(options)) ?? []\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;ACAA,oBAAyB;AAEzB,gCAAkC;AAClC,6BASO;AACP,0BAOO;;;;;;;;AAGA,IAAMA,4BAA4B;AAalC,IAAMC,gBAAN,cAIGC,4CAAAA;SAAAA;;;EAER,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeH;;EAC5E,OAAyBI,sBAA8BJ;EACvD,OAAyBK,SAAS;IAAE,GAAGC;EAA0B;EAEzDC;EAER,IAAIC,kBAAkB;AACpB,eAAOC,wBAAS,KAAKC,OAAOF,iBAAiB,MAAM,gCAAA;EACrD;EAEA,IAAaG,UAAU;AACrB,WAAO;MAACC;MAAyBC;MAAyBC;SAA6B,MAAMH;;EAC/F;EAEA,MAAMI,0BAA0B;AAC9B,SAAKR,2BACD,KAAKA,gCAA4BE,wBAAS,MAAM,KAAKO,QAAQ,KAAKR,iBAAiB;MAAES,UAAUC;MAAqBC,UAAU;IAAK,CAAA,CAAA;AACvI,WAAO,KAAKZ;EACd;EAEA,MAAyBa,aAAyC;AAChE,WAAQ,OAAO,MAAM,KAAKL,wBAAuB,GAAIM,MAAG,KAAS,CAAA;EACnE;EAEA,MAAyBC,WAAWC,QAA4C;AAC9E,WAAO,OAAO,MAAM,KAAKR,wBAAuB,GAAIS,IAAID,MAAAA;EAC1D;EAEA,MAAyBE,YAAYC,SAA4D;AAC/F,WAAQ,OAAO,MAAM,KAAKX,wBAAuB,GAAIY,OAAOD,OAAAA,KAAa,CAAA;EAC3E;AACF;;;;","names":["ViewArchivistConfigSchema","ViewArchivist","AbstractArchivist","configSchemas","defaultConfigSchema","labels","ModuleLimitationViewLabel","_originArchivistInstance","originArchivist","assertEx","config","queries","ArchivistGetQuerySchema","ArchivistAllQuerySchema","ArchivistNextQuerySchema","originArchivistInstance","resolve","identity","isArchivistInstance","required","allHandler","all","getHandler","hashes","get","nextHandler","options","next"]}
@@ -1,2 +0,0 @@
1
- export * from './ViewArchivist.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './ViewArchivist.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './ViewArchivist.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,65 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
-
4
- // src/ViewArchivist.ts
5
- import { assertEx } from "@xylabs/assert";
6
- import { AbstractArchivist } from "@xyo-network/archivist-abstract";
7
- import { ArchivistAllQuerySchema, ArchivistGetQuerySchema, ArchivistNextQuerySchema, isArchivistInstance } from "@xyo-network/archivist-model";
8
- import { labeledCreatableModuleFactory, ModuleLimitationViewLabel } from "@xyo-network/module-model";
9
- function _ts_decorate(decorators, target, key, desc) {
10
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
11
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
12
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
13
- return c > 3 && r && Object.defineProperty(target, key, r), r;
14
- }
15
- __name(_ts_decorate, "_ts_decorate");
16
- var ViewArchivistConfigSchema = "network.xyo.archivist.view.config";
17
- var ViewArchivist = class extends AbstractArchivist {
18
- static {
19
- __name(this, "ViewArchivist");
20
- }
21
- static configSchemas = [
22
- ...super.configSchemas,
23
- ViewArchivistConfigSchema
24
- ];
25
- static defaultConfigSchema = ViewArchivistConfigSchema;
26
- static labels = {
27
- ...ModuleLimitationViewLabel
28
- };
29
- _originArchivistInstance;
30
- get originArchivist() {
31
- return assertEx(this.config.originArchivist, () => "originArchivist not configured");
32
- }
33
- get queries() {
34
- return [
35
- ArchivistGetQuerySchema,
36
- ArchivistAllQuerySchema,
37
- ArchivistNextQuerySchema,
38
- ...super.queries
39
- ];
40
- }
41
- async originArchivistInstance() {
42
- this._originArchivistInstance = this._originArchivistInstance ?? assertEx(await this.resolve(this.originArchivist, {
43
- identity: isArchivistInstance,
44
- required: true
45
- }));
46
- return this._originArchivistInstance;
47
- }
48
- async allHandler() {
49
- return await (await this.originArchivistInstance()).all?.() ?? [];
50
- }
51
- async getHandler(hashes) {
52
- return await (await this.originArchivistInstance()).get(hashes);
53
- }
54
- async nextHandler(options) {
55
- return await (await this.originArchivistInstance()).next?.(options) ?? [];
56
- }
57
- };
58
- ViewArchivist = _ts_decorate([
59
- labeledCreatableModuleFactory()
60
- ], ViewArchivist);
61
- export {
62
- ViewArchivist,
63
- ViewArchivistConfigSchema
64
- };
65
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/ViewArchivist.ts"],"sourcesContent":["import { assertEx } from '@xylabs/assert'\nimport { Hash } from '@xylabs/hex'\nimport { AbstractArchivist } from '@xyo-network/archivist-abstract'\nimport {\n ArchivistAllQuerySchema,\n ArchivistConfig,\n ArchivistGetQuerySchema,\n ArchivistInstance,\n ArchivistModuleEventData,\n ArchivistNextOptions,\n ArchivistNextQuerySchema,\n isArchivistInstance,\n} from '@xyo-network/archivist-model'\nimport {\n AnyConfigSchema,\n labeledCreatableModuleFactory,\n ModuleIdentifier,\n ModuleInstance,\n ModuleLimitationViewLabel,\n ModuleParams,\n} from '@xyo-network/module-model'\nimport { PayloadWithMeta, Schema } from '@xyo-network/payload-model'\n\nexport const ViewArchivistConfigSchema = 'network.xyo.archivist.view.config' as const\nexport type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema\n\nexport type ViewArchivistConfig = ArchivistConfig<\n {\n originArchivist?: ModuleIdentifier\n },\n ViewArchivistConfigSchema\n>\n\nexport type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>\n\n@labeledCreatableModuleFactory()\nexport class ViewArchivist<\n TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams,\n TEventData extends ArchivistModuleEventData = ArchivistModuleEventData,\n>\n extends AbstractArchivist<TParams, TEventData>\n implements ArchivistInstance, ModuleInstance {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, ViewArchivistConfigSchema]\n static override readonly defaultConfigSchema: Schema = ViewArchivistConfigSchema\n static override readonly labels = { ...ModuleLimitationViewLabel }\n\n private _originArchivistInstance?: ArchivistInstance\n\n get originArchivist() {\n return assertEx(this.config.originArchivist, () => 'originArchivist not configured')\n }\n\n override get queries() {\n return [ArchivistGetQuerySchema, ArchivistAllQuerySchema, ArchivistNextQuerySchema, ...super.queries]\n }\n\n async originArchivistInstance() {\n this._originArchivistInstance\n = this._originArchivistInstance ?? assertEx(await this.resolve(this.originArchivist, { identity: isArchivistInstance, required: true }))\n return this._originArchivistInstance\n }\n\n protected override async allHandler(): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).all?.()) ?? []\n }\n\n protected override async getHandler(hashes: Hash[]): Promise<PayloadWithMeta[]> {\n return await (await this.originArchivistInstance()).get(hashes)\n }\n\n protected override async nextHandler(options?: ArchivistNextOptions): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).next?.(options)) ?? []\n }\n}\n"],"mappings":";;;;AAAA,SAASA,gBAAgB;AAEzB,SAASC,yBAAyB;AAClC,SACEC,yBAEAC,yBAIAC,0BACAC,2BACK;AACP,SAEEC,+BAGAC,iCAEK;;;;;;;;AAGA,IAAMC,4BAA4B;AAalC,IAAMC,gBAAN,cAIGC,kBAAAA;SAAAA;;;EAER,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeH;;EAC5E,OAAyBI,sBAA8BJ;EACvD,OAAyBK,SAAS;IAAE,GAAGC;EAA0B;EAEzDC;EAER,IAAIC,kBAAkB;AACpB,WAAOC,SAAS,KAAKC,OAAOF,iBAAiB,MAAM,gCAAA;EACrD;EAEA,IAAaG,UAAU;AACrB,WAAO;MAACC;MAAyBC;MAAyBC;SAA6B,MAAMH;;EAC/F;EAEA,MAAMI,0BAA0B;AAC9B,SAAKR,2BACD,KAAKA,4BAA4BE,SAAS,MAAM,KAAKO,QAAQ,KAAKR,iBAAiB;MAAES,UAAUC;MAAqBC,UAAU;IAAK,CAAA,CAAA;AACvI,WAAO,KAAKZ;EACd;EAEA,MAAyBa,aAAyC;AAChE,WAAQ,OAAO,MAAM,KAAKL,wBAAuB,GAAIM,MAAG,KAAS,CAAA;EACnE;EAEA,MAAyBC,WAAWC,QAA4C;AAC9E,WAAO,OAAO,MAAM,KAAKR,wBAAuB,GAAIS,IAAID,MAAAA;EAC1D;EAEA,MAAyBE,YAAYC,SAA4D;AAC/F,WAAQ,OAAO,MAAM,KAAKX,wBAAuB,GAAIY,OAAOD,OAAAA,KAAa,CAAA;EAC3E;AACF;;;;","names":["assertEx","AbstractArchivist","ArchivistAllQuerySchema","ArchivistGetQuerySchema","ArchivistNextQuerySchema","isArchivistInstance","labeledCreatableModuleFactory","ModuleLimitationViewLabel","ViewArchivistConfigSchema","ViewArchivist","AbstractArchivist","configSchemas","defaultConfigSchema","labels","ModuleLimitationViewLabel","_originArchivistInstance","originArchivist","assertEx","config","queries","ArchivistGetQuerySchema","ArchivistAllQuerySchema","ArchivistNextQuerySchema","originArchivistInstance","resolve","identity","isArchivistInstance","required","allHandler","all","getHandler","hashes","get","nextHandler","options","next"]}
@@ -1,46 +0,0 @@
1
- import { Hash } from '@xylabs/hex';
2
- import { AbstractArchivist } from '@xyo-network/archivist-abstract';
3
- import { ArchivistConfig, ArchivistInstance, ArchivistModuleEventData, ArchivistNextOptions } from '@xyo-network/archivist-model';
4
- import { AnyConfigSchema, ModuleIdentifier, ModuleInstance, ModuleParams } from '@xyo-network/module-model';
5
- import { PayloadWithMeta, Schema } from '@xyo-network/payload-model';
6
- export declare const ViewArchivistConfigSchema: "network.xyo.archivist.view.config";
7
- export type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema;
8
- export type ViewArchivistConfig = ArchivistConfig<{
9
- originArchivist?: ModuleIdentifier;
10
- }, ViewArchivistConfigSchema>;
11
- export type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>;
12
- export declare class ViewArchivist<TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData> extends AbstractArchivist<TParams, TEventData> implements ArchivistInstance, ModuleInstance {
13
- static readonly configSchemas: Schema[];
14
- static readonly defaultConfigSchema: Schema;
15
- static readonly labels: {
16
- ModuleLimitationLabelName: string;
17
- };
18
- private _originArchivistInstance?;
19
- get originArchivist(): string;
20
- get queries(): string[];
21
- originArchivistInstance(): Promise<ArchivistInstance<import("@xylabs/object").BaseParamsFields & {
22
- account?: import("@xyo-network/account-model").AccountInstance | "random";
23
- addToResolvers?: boolean;
24
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
25
- allowNameResolution?: boolean;
26
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
27
- parents?: import("@xyo-network/archivist-model").ArchivistParents;
28
- requireAllParents?: boolean;
29
- schema: "network.xyo.archivist.config";
30
- storage?: import("@xyo-network/archivist-model").ArchivistStorage;
31
- storeParentReads?: boolean;
32
- }, "schema"> & {
33
- schema: "network.xyo.archivist.config";
34
- }, "schema"> & {
35
- schema: string;
36
- };
37
- ephemeralQueryAccountEnabled?: boolean;
38
- moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
39
- }, ArchivistModuleEventData, {
40
- schema: string;
41
- } & import("@xyo-network/payload-model").PayloadFields>>;
42
- protected allHandler(): Promise<PayloadWithMeta[]>;
43
- protected getHandler(hashes: Hash[]): Promise<PayloadWithMeta[]>;
44
- protected nextHandler(options?: ArchivistNextOptions): Promise<PayloadWithMeta[]>;
45
- }
46
- //# sourceMappingURL=ViewArchivist.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ViewArchivist.d.ts","sourceRoot":"","sources":["../../src/ViewArchivist.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAEL,eAAe,EAEf,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EAGrB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACL,eAAe,EAEf,gBAAgB,EAChB,cAAc,EAEd,YAAY,EACb,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEpE,eAAO,MAAM,yBAAyB,qCAA+C,CAAA;AACrF,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAC/C;IACE,eAAe,CAAC,EAAE,gBAAgB,CAAA;CACnC,EACD,yBAAyB,CAC1B,CAAA;AAED,MAAM,MAAM,mBAAmB,CAAC,OAAO,SAAS,eAAe,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,mBAAmB,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,CAAA;AAEpJ,qBACa,aAAa,CACxB,OAAO,SAAS,mBAAmB,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC,GAAG,mBAAmB,EAC/F,UAAU,SAAS,wBAAwB,GAAG,wBAAwB,CAEtE,SAAQ,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAC7C,YAAW,iBAAiB,EAAE,cAAc;IAC5C,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAsD;IACtG,gBAAyB,mBAAmB,EAAE,MAAM,CAA4B;IAChF,gBAAyB,MAAM;;MAAmC;IAElE,OAAO,CAAC,wBAAwB,CAAC,CAAmB;IAEpD,IAAI,eAAe,WAElB;IAED,IAAa,OAAO,aAEnB;IAEK,uBAAuB;;;;;;;;;;;;;;;;;;;;;cAMJ,UAAU,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;cAIxC,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;cAItD,WAAW,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;CAGjG"}
@@ -1,46 +0,0 @@
1
- import { Hash } from '@xylabs/hex';
2
- import { AbstractArchivist } from '@xyo-network/archivist-abstract';
3
- import { ArchivistConfig, ArchivistInstance, ArchivistModuleEventData, ArchivistNextOptions } from '@xyo-network/archivist-model';
4
- import { AnyConfigSchema, ModuleIdentifier, ModuleInstance, ModuleParams } from '@xyo-network/module-model';
5
- import { PayloadWithMeta, Schema } from '@xyo-network/payload-model';
6
- export declare const ViewArchivistConfigSchema: "network.xyo.archivist.view.config";
7
- export type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema;
8
- export type ViewArchivistConfig = ArchivistConfig<{
9
- originArchivist?: ModuleIdentifier;
10
- }, ViewArchivistConfigSchema>;
11
- export type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>;
12
- export declare class ViewArchivist<TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData> extends AbstractArchivist<TParams, TEventData> implements ArchivistInstance, ModuleInstance {
13
- static readonly configSchemas: Schema[];
14
- static readonly defaultConfigSchema: Schema;
15
- static readonly labels: {
16
- ModuleLimitationLabelName: string;
17
- };
18
- private _originArchivistInstance?;
19
- get originArchivist(): string;
20
- get queries(): string[];
21
- originArchivistInstance(): Promise<ArchivistInstance<import("@xylabs/object").BaseParamsFields & {
22
- account?: import("@xyo-network/account-model").AccountInstance | "random";
23
- addToResolvers?: boolean;
24
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
25
- allowNameResolution?: boolean;
26
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
27
- parents?: import("@xyo-network/archivist-model").ArchivistParents;
28
- requireAllParents?: boolean;
29
- schema: "network.xyo.archivist.config";
30
- storage?: import("@xyo-network/archivist-model").ArchivistStorage;
31
- storeParentReads?: boolean;
32
- }, "schema"> & {
33
- schema: "network.xyo.archivist.config";
34
- }, "schema"> & {
35
- schema: string;
36
- };
37
- ephemeralQueryAccountEnabled?: boolean;
38
- moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
39
- }, ArchivistModuleEventData, {
40
- schema: string;
41
- } & import("@xyo-network/payload-model").PayloadFields>>;
42
- protected allHandler(): Promise<PayloadWithMeta[]>;
43
- protected getHandler(hashes: Hash[]): Promise<PayloadWithMeta[]>;
44
- protected nextHandler(options?: ArchivistNextOptions): Promise<PayloadWithMeta[]>;
45
- }
46
- //# sourceMappingURL=ViewArchivist.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ViewArchivist.d.ts","sourceRoot":"","sources":["../../src/ViewArchivist.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAEL,eAAe,EAEf,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EAGrB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACL,eAAe,EAEf,gBAAgB,EAChB,cAAc,EAEd,YAAY,EACb,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEpE,eAAO,MAAM,yBAAyB,qCAA+C,CAAA;AACrF,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAC/C;IACE,eAAe,CAAC,EAAE,gBAAgB,CAAA;CACnC,EACD,yBAAyB,CAC1B,CAAA;AAED,MAAM,MAAM,mBAAmB,CAAC,OAAO,SAAS,eAAe,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,mBAAmB,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,CAAA;AAEpJ,qBACa,aAAa,CACxB,OAAO,SAAS,mBAAmB,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC,GAAG,mBAAmB,EAC/F,UAAU,SAAS,wBAAwB,GAAG,wBAAwB,CAEtE,SAAQ,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAC7C,YAAW,iBAAiB,EAAE,cAAc;IAC5C,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAsD;IACtG,gBAAyB,mBAAmB,EAAE,MAAM,CAA4B;IAChF,gBAAyB,MAAM;;MAAmC;IAElE,OAAO,CAAC,wBAAwB,CAAC,CAAmB;IAEpD,IAAI,eAAe,WAElB;IAED,IAAa,OAAO,aAEnB;IAEK,uBAAuB;;;;;;;;;;;;;;;;;;;;;cAMJ,UAAU,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;cAIxC,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;cAItD,WAAW,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;CAGjG"}
@@ -1,46 +0,0 @@
1
- import { Hash } from '@xylabs/hex';
2
- import { AbstractArchivist } from '@xyo-network/archivist-abstract';
3
- import { ArchivistConfig, ArchivistInstance, ArchivistModuleEventData, ArchivistNextOptions } from '@xyo-network/archivist-model';
4
- import { AnyConfigSchema, ModuleIdentifier, ModuleInstance, ModuleParams } from '@xyo-network/module-model';
5
- import { PayloadWithMeta, Schema } from '@xyo-network/payload-model';
6
- export declare const ViewArchivistConfigSchema: "network.xyo.archivist.view.config";
7
- export type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema;
8
- export type ViewArchivistConfig = ArchivistConfig<{
9
- originArchivist?: ModuleIdentifier;
10
- }, ViewArchivistConfigSchema>;
11
- export type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>;
12
- export declare class ViewArchivist<TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData> extends AbstractArchivist<TParams, TEventData> implements ArchivistInstance, ModuleInstance {
13
- static readonly configSchemas: Schema[];
14
- static readonly defaultConfigSchema: Schema;
15
- static readonly labels: {
16
- ModuleLimitationLabelName: string;
17
- };
18
- private _originArchivistInstance?;
19
- get originArchivist(): string;
20
- get queries(): string[];
21
- originArchivistInstance(): Promise<ArchivistInstance<import("@xylabs/object").BaseParamsFields & {
22
- account?: import("@xyo-network/account-model").AccountInstance | "random";
23
- addToResolvers?: boolean;
24
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
25
- allowNameResolution?: boolean;
26
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
27
- parents?: import("@xyo-network/archivist-model").ArchivistParents;
28
- requireAllParents?: boolean;
29
- schema: "network.xyo.archivist.config";
30
- storage?: import("@xyo-network/archivist-model").ArchivistStorage;
31
- storeParentReads?: boolean;
32
- }, "schema"> & {
33
- schema: "network.xyo.archivist.config";
34
- }, "schema"> & {
35
- schema: string;
36
- };
37
- ephemeralQueryAccountEnabled?: boolean;
38
- moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
39
- }, ArchivistModuleEventData, {
40
- schema: string;
41
- } & import("@xyo-network/payload-model").PayloadFields>>;
42
- protected allHandler(): Promise<PayloadWithMeta[]>;
43
- protected getHandler(hashes: Hash[]): Promise<PayloadWithMeta[]>;
44
- protected nextHandler(options?: ArchivistNextOptions): Promise<PayloadWithMeta[]>;
45
- }
46
- //# sourceMappingURL=ViewArchivist.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ViewArchivist.d.ts","sourceRoot":"","sources":["../../src/ViewArchivist.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAEL,eAAe,EAEf,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EAGrB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACL,eAAe,EAEf,gBAAgB,EAChB,cAAc,EAEd,YAAY,EACb,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEpE,eAAO,MAAM,yBAAyB,qCAA+C,CAAA;AACrF,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAC/C;IACE,eAAe,CAAC,EAAE,gBAAgB,CAAA;CACnC,EACD,yBAAyB,CAC1B,CAAA;AAED,MAAM,MAAM,mBAAmB,CAAC,OAAO,SAAS,eAAe,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,mBAAmB,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,CAAA;AAEpJ,qBACa,aAAa,CACxB,OAAO,SAAS,mBAAmB,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC,GAAG,mBAAmB,EAC/F,UAAU,SAAS,wBAAwB,GAAG,wBAAwB,CAEtE,SAAQ,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAC7C,YAAW,iBAAiB,EAAE,cAAc;IAC5C,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAsD;IACtG,gBAAyB,mBAAmB,EAAE,MAAM,CAA4B;IAChF,gBAAyB,MAAM;;MAAmC;IAElE,OAAO,CAAC,wBAAwB,CAAC,CAAmB;IAEpD,IAAI,eAAe,WAElB;IAED,IAAa,OAAO,aAEnB;IAEK,uBAAuB;;;;;;;;;;;;;;;;;;;;;cAMJ,UAAU,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;cAIxC,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;cAItD,WAAW,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;CAGjG"}
@@ -1,86 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
7
- var __export = (target, all) => {
8
- for (var name in all)
9
- __defProp(target, name, { get: all[name], enumerable: true });
10
- };
11
- var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from))
14
- if (!__hasOwnProp.call(to, key) && key !== except)
15
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
- }
17
- return to;
18
- };
19
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
-
21
- // src/index.ts
22
- var src_exports = {};
23
- __export(src_exports, {
24
- ViewArchivist: () => ViewArchivist,
25
- ViewArchivistConfigSchema: () => ViewArchivistConfigSchema
26
- });
27
- module.exports = __toCommonJS(src_exports);
28
-
29
- // src/ViewArchivist.ts
30
- var import_assert = require("@xylabs/assert");
31
- var import_archivist_abstract = require("@xyo-network/archivist-abstract");
32
- var import_archivist_model = require("@xyo-network/archivist-model");
33
- var import_module_model = require("@xyo-network/module-model");
34
- function _ts_decorate(decorators, target, key, desc) {
35
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
36
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
37
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
38
- return c > 3 && r && Object.defineProperty(target, key, r), r;
39
- }
40
- __name(_ts_decorate, "_ts_decorate");
41
- var ViewArchivistConfigSchema = "network.xyo.archivist.view.config";
42
- var ViewArchivist = class extends import_archivist_abstract.AbstractArchivist {
43
- static {
44
- __name(this, "ViewArchivist");
45
- }
46
- static configSchemas = [
47
- ...super.configSchemas,
48
- ViewArchivistConfigSchema
49
- ];
50
- static defaultConfigSchema = ViewArchivistConfigSchema;
51
- static labels = {
52
- ...import_module_model.ModuleLimitationViewLabel
53
- };
54
- _originArchivistInstance;
55
- get originArchivist() {
56
- return (0, import_assert.assertEx)(this.config.originArchivist, () => "originArchivist not configured");
57
- }
58
- get queries() {
59
- return [
60
- import_archivist_model.ArchivistGetQuerySchema,
61
- import_archivist_model.ArchivistAllQuerySchema,
62
- import_archivist_model.ArchivistNextQuerySchema,
63
- ...super.queries
64
- ];
65
- }
66
- async originArchivistInstance() {
67
- this._originArchivistInstance = this._originArchivistInstance ?? (0, import_assert.assertEx)(await this.resolve(this.originArchivist, {
68
- identity: import_archivist_model.isArchivistInstance,
69
- required: true
70
- }));
71
- return this._originArchivistInstance;
72
- }
73
- async allHandler() {
74
- return await (await this.originArchivistInstance()).all?.() ?? [];
75
- }
76
- async getHandler(hashes) {
77
- return await (await this.originArchivistInstance()).get(hashes);
78
- }
79
- async nextHandler(options) {
80
- return await (await this.originArchivistInstance()).next?.(options) ?? [];
81
- }
82
- };
83
- ViewArchivist = _ts_decorate([
84
- (0, import_module_model.labeledCreatableModuleFactory)()
85
- ], ViewArchivist);
86
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/ViewArchivist.ts"],"sourcesContent":["export * from './ViewArchivist.ts'\n","import { assertEx } from '@xylabs/assert'\nimport { Hash } from '@xylabs/hex'\nimport { AbstractArchivist } from '@xyo-network/archivist-abstract'\nimport {\n ArchivistAllQuerySchema,\n ArchivistConfig,\n ArchivistGetQuerySchema,\n ArchivistInstance,\n ArchivistModuleEventData,\n ArchivistNextOptions,\n ArchivistNextQuerySchema,\n isArchivistInstance,\n} from '@xyo-network/archivist-model'\nimport {\n AnyConfigSchema,\n labeledCreatableModuleFactory,\n ModuleIdentifier,\n ModuleInstance,\n ModuleLimitationViewLabel,\n ModuleParams,\n} from '@xyo-network/module-model'\nimport { PayloadWithMeta, Schema } from '@xyo-network/payload-model'\n\nexport const ViewArchivistConfigSchema = 'network.xyo.archivist.view.config' as const\nexport type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema\n\nexport type ViewArchivistConfig = ArchivistConfig<\n {\n originArchivist?: ModuleIdentifier\n },\n ViewArchivistConfigSchema\n>\n\nexport type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>\n\n@labeledCreatableModuleFactory()\nexport class ViewArchivist<\n TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams,\n TEventData extends ArchivistModuleEventData = ArchivistModuleEventData,\n>\n extends AbstractArchivist<TParams, TEventData>\n implements ArchivistInstance, ModuleInstance {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, ViewArchivistConfigSchema]\n static override readonly defaultConfigSchema: Schema = ViewArchivistConfigSchema\n static override readonly labels = { ...ModuleLimitationViewLabel }\n\n private _originArchivistInstance?: ArchivistInstance\n\n get originArchivist() {\n return assertEx(this.config.originArchivist, () => 'originArchivist not configured')\n }\n\n override get queries() {\n return [ArchivistGetQuerySchema, ArchivistAllQuerySchema, ArchivistNextQuerySchema, ...super.queries]\n }\n\n async originArchivistInstance() {\n this._originArchivistInstance\n = this._originArchivistInstance ?? assertEx(await this.resolve(this.originArchivist, { identity: isArchivistInstance, required: true }))\n return this._originArchivistInstance\n }\n\n protected override async allHandler(): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).all?.()) ?? []\n }\n\n protected override async getHandler(hashes: Hash[]): Promise<PayloadWithMeta[]> {\n return await (await this.originArchivistInstance()).get(hashes)\n }\n\n protected override async nextHandler(options?: ArchivistNextOptions): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).next?.(options)) ?? []\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;ACAA,oBAAyB;AAEzB,gCAAkC;AAClC,6BASO;AACP,0BAOO;;;;;;;;AAGA,IAAMA,4BAA4B;AAalC,IAAMC,gBAAN,cAIGC,4CAAAA;SAAAA;;;EAER,OAAyBC,gBAA0B;OAAI,MAAMA;IAAeH;;EAC5E,OAAyBI,sBAA8BJ;EACvD,OAAyBK,SAAS;IAAE,GAAGC;EAA0B;EAEzDC;EAER,IAAIC,kBAAkB;AACpB,eAAOC,wBAAS,KAAKC,OAAOF,iBAAiB,MAAM,gCAAA;EACrD;EAEA,IAAaG,UAAU;AACrB,WAAO;MAACC;MAAyBC;MAAyBC;SAA6B,MAAMH;;EAC/F;EAEA,MAAMI,0BAA0B;AAC9B,SAAKR,2BACD,KAAKA,gCAA4BE,wBAAS,MAAM,KAAKO,QAAQ,KAAKR,iBAAiB;MAAES,UAAUC;MAAqBC,UAAU;IAAK,CAAA,CAAA;AACvI,WAAO,KAAKZ;EACd;EAEA,MAAyBa,aAAyC;AAChE,WAAQ,OAAO,MAAM,KAAKL,wBAAuB,GAAIM,MAAG,KAAS,CAAA;EACnE;EAEA,MAAyBC,WAAWC,QAA4C;AAC9E,WAAO,OAAO,MAAM,KAAKR,wBAAuB,GAAIS,IAAID,MAAAA;EAC1D;EAEA,MAAyBE,YAAYC,SAA4D;AAC/F,WAAQ,OAAO,MAAM,KAAKX,wBAAuB,GAAIY,OAAOD,OAAAA,KAAa,CAAA;EAC3E;AACF;;;;","names":["ViewArchivistConfigSchema","ViewArchivist","AbstractArchivist","configSchemas","defaultConfigSchema","labels","ModuleLimitationViewLabel","_originArchivistInstance","originArchivist","assertEx","config","queries","ArchivistGetQuerySchema","ArchivistAllQuerySchema","ArchivistNextQuerySchema","originArchivistInstance","resolve","identity","isArchivistInstance","required","allHandler","all","getHandler","hashes","get","nextHandler","options","next"]}
@@ -1,2 +0,0 @@
1
- export * from './ViewArchivist.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './ViewArchivist.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,46 +0,0 @@
1
- import { Hash } from '@xylabs/hex';
2
- import { AbstractArchivist } from '@xyo-network/archivist-abstract';
3
- import { ArchivistConfig, ArchivistInstance, ArchivistModuleEventData, ArchivistNextOptions } from '@xyo-network/archivist-model';
4
- import { AnyConfigSchema, ModuleIdentifier, ModuleInstance, ModuleParams } from '@xyo-network/module-model';
5
- import { PayloadWithMeta, Schema } from '@xyo-network/payload-model';
6
- export declare const ViewArchivistConfigSchema: "network.xyo.archivist.view.config";
7
- export type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema;
8
- export type ViewArchivistConfig = ArchivistConfig<{
9
- originArchivist?: ModuleIdentifier;
10
- }, ViewArchivistConfigSchema>;
11
- export type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>;
12
- export declare class ViewArchivist<TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData> extends AbstractArchivist<TParams, TEventData> implements ArchivistInstance, ModuleInstance {
13
- static readonly configSchemas: Schema[];
14
- static readonly defaultConfigSchema: Schema;
15
- static readonly labels: {
16
- ModuleLimitationLabelName: string;
17
- };
18
- private _originArchivistInstance?;
19
- get originArchivist(): string;
20
- get queries(): string[];
21
- originArchivistInstance(): Promise<ArchivistInstance<import("@xylabs/object").BaseParamsFields & {
22
- account?: import("@xyo-network/account-model").AccountInstance | "random";
23
- addToResolvers?: boolean;
24
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
25
- allowNameResolution?: boolean;
26
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
27
- parents?: import("@xyo-network/archivist-model").ArchivistParents;
28
- requireAllParents?: boolean;
29
- schema: "network.xyo.archivist.config";
30
- storage?: import("@xyo-network/archivist-model").ArchivistStorage;
31
- storeParentReads?: boolean;
32
- }, "schema"> & {
33
- schema: "network.xyo.archivist.config";
34
- }, "schema"> & {
35
- schema: string;
36
- };
37
- ephemeralQueryAccountEnabled?: boolean;
38
- moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
39
- }, ArchivistModuleEventData, {
40
- schema: string;
41
- } & import("@xyo-network/payload-model").PayloadFields>>;
42
- protected allHandler(): Promise<PayloadWithMeta[]>;
43
- protected getHandler(hashes: Hash[]): Promise<PayloadWithMeta[]>;
44
- protected nextHandler(options?: ArchivistNextOptions): Promise<PayloadWithMeta[]>;
45
- }
46
- //# sourceMappingURL=ViewArchivist.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ViewArchivist.d.ts","sourceRoot":"","sources":["../../src/ViewArchivist.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAEL,eAAe,EAEf,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EAGrB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACL,eAAe,EAEf,gBAAgB,EAChB,cAAc,EAEd,YAAY,EACb,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEpE,eAAO,MAAM,yBAAyB,qCAA+C,CAAA;AACrF,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAC/C;IACE,eAAe,CAAC,EAAE,gBAAgB,CAAA;CACnC,EACD,yBAAyB,CAC1B,CAAA;AAED,MAAM,MAAM,mBAAmB,CAAC,OAAO,SAAS,eAAe,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,mBAAmB,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,CAAA;AAEpJ,qBACa,aAAa,CACxB,OAAO,SAAS,mBAAmB,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC,GAAG,mBAAmB,EAC/F,UAAU,SAAS,wBAAwB,GAAG,wBAAwB,CAEtE,SAAQ,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAC7C,YAAW,iBAAiB,EAAE,cAAc;IAC5C,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAsD;IACtG,gBAAyB,mBAAmB,EAAE,MAAM,CAA4B;IAChF,gBAAyB,MAAM;;MAAmC;IAElE,OAAO,CAAC,wBAAwB,CAAC,CAAmB;IAEpD,IAAI,eAAe,WAElB;IAED,IAAa,OAAO,aAEnB;IAEK,uBAAuB;;;;;;;;;;;;;;;;;;;;;cAMJ,UAAU,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;cAIxC,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;cAItD,WAAW,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;CAGjG"}
@@ -1,46 +0,0 @@
1
- import { Hash } from '@xylabs/hex';
2
- import { AbstractArchivist } from '@xyo-network/archivist-abstract';
3
- import { ArchivistConfig, ArchivistInstance, ArchivistModuleEventData, ArchivistNextOptions } from '@xyo-network/archivist-model';
4
- import { AnyConfigSchema, ModuleIdentifier, ModuleInstance, ModuleParams } from '@xyo-network/module-model';
5
- import { PayloadWithMeta, Schema } from '@xyo-network/payload-model';
6
- export declare const ViewArchivistConfigSchema: "network.xyo.archivist.view.config";
7
- export type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema;
8
- export type ViewArchivistConfig = ArchivistConfig<{
9
- originArchivist?: ModuleIdentifier;
10
- }, ViewArchivistConfigSchema>;
11
- export type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>;
12
- export declare class ViewArchivist<TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData> extends AbstractArchivist<TParams, TEventData> implements ArchivistInstance, ModuleInstance {
13
- static readonly configSchemas: Schema[];
14
- static readonly defaultConfigSchema: Schema;
15
- static readonly labels: {
16
- ModuleLimitationLabelName: string;
17
- };
18
- private _originArchivistInstance?;
19
- get originArchivist(): string;
20
- get queries(): string[];
21
- originArchivistInstance(): Promise<ArchivistInstance<import("@xylabs/object").BaseParamsFields & {
22
- account?: import("@xyo-network/account-model").AccountInstance | "random";
23
- addToResolvers?: boolean;
24
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
25
- allowNameResolution?: boolean;
26
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
27
- parents?: import("@xyo-network/archivist-model").ArchivistParents;
28
- requireAllParents?: boolean;
29
- schema: "network.xyo.archivist.config";
30
- storage?: import("@xyo-network/archivist-model").ArchivistStorage;
31
- storeParentReads?: boolean;
32
- }, "schema"> & {
33
- schema: "network.xyo.archivist.config";
34
- }, "schema"> & {
35
- schema: string;
36
- };
37
- ephemeralQueryAccountEnabled?: boolean;
38
- moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
39
- }, ArchivistModuleEventData, {
40
- schema: string;
41
- } & import("@xyo-network/payload-model").PayloadFields>>;
42
- protected allHandler(): Promise<PayloadWithMeta[]>;
43
- protected getHandler(hashes: Hash[]): Promise<PayloadWithMeta[]>;
44
- protected nextHandler(options?: ArchivistNextOptions): Promise<PayloadWithMeta[]>;
45
- }
46
- //# sourceMappingURL=ViewArchivist.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ViewArchivist.d.ts","sourceRoot":"","sources":["../../src/ViewArchivist.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAEL,eAAe,EAEf,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EAGrB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACL,eAAe,EAEf,gBAAgB,EAChB,cAAc,EAEd,YAAY,EACb,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEpE,eAAO,MAAM,yBAAyB,qCAA+C,CAAA;AACrF,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAC/C;IACE,eAAe,CAAC,EAAE,gBAAgB,CAAA;CACnC,EACD,yBAAyB,CAC1B,CAAA;AAED,MAAM,MAAM,mBAAmB,CAAC,OAAO,SAAS,eAAe,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,mBAAmB,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,CAAA;AAEpJ,qBACa,aAAa,CACxB,OAAO,SAAS,mBAAmB,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC,GAAG,mBAAmB,EAC/F,UAAU,SAAS,wBAAwB,GAAG,wBAAwB,CAEtE,SAAQ,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAC7C,YAAW,iBAAiB,EAAE,cAAc;IAC5C,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAsD;IACtG,gBAAyB,mBAAmB,EAAE,MAAM,CAA4B;IAChF,gBAAyB,MAAM;;MAAmC;IAElE,OAAO,CAAC,wBAAwB,CAAC,CAAmB;IAEpD,IAAI,eAAe,WAElB;IAED,IAAa,OAAO,aAEnB;IAEK,uBAAuB;;;;;;;;;;;;;;;;;;;;;cAMJ,UAAU,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;cAIxC,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;cAItD,WAAW,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;CAGjG"}
@@ -1,46 +0,0 @@
1
- import { Hash } from '@xylabs/hex';
2
- import { AbstractArchivist } from '@xyo-network/archivist-abstract';
3
- import { ArchivistConfig, ArchivistInstance, ArchivistModuleEventData, ArchivistNextOptions } from '@xyo-network/archivist-model';
4
- import { AnyConfigSchema, ModuleIdentifier, ModuleInstance, ModuleParams } from '@xyo-network/module-model';
5
- import { PayloadWithMeta, Schema } from '@xyo-network/payload-model';
6
- export declare const ViewArchivistConfigSchema: "network.xyo.archivist.view.config";
7
- export type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema;
8
- export type ViewArchivistConfig = ArchivistConfig<{
9
- originArchivist?: ModuleIdentifier;
10
- }, ViewArchivistConfigSchema>;
11
- export type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>;
12
- export declare class ViewArchivist<TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams, TEventData extends ArchivistModuleEventData = ArchivistModuleEventData> extends AbstractArchivist<TParams, TEventData> implements ArchivistInstance, ModuleInstance {
13
- static readonly configSchemas: Schema[];
14
- static readonly defaultConfigSchema: Schema;
15
- static readonly labels: {
16
- ModuleLimitationLabelName: string;
17
- };
18
- private _originArchivistInstance?;
19
- get originArchivist(): string;
20
- get queries(): string[];
21
- originArchivistInstance(): Promise<ArchivistInstance<import("@xylabs/object").BaseParamsFields & {
22
- account?: import("@xyo-network/account-model").AccountInstance | "random";
23
- addToResolvers?: boolean;
24
- additionalSigners?: import("@xyo-network/account-model").AccountInstance[];
25
- allowNameResolution?: boolean;
26
- config: import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & import("@xyo-network/payload-model").SchemaFields & import("@xyo-network/payload-model").PayloadFields & Omit<import("@xyo-network/module-model").ArchivingModuleConfig & import("@xyo-network/module-model").ModuleConfigFields & {
27
- parents?: import("@xyo-network/archivist-model").ArchivistParents;
28
- requireAllParents?: boolean;
29
- schema: "network.xyo.archivist.config";
30
- storage?: import("@xyo-network/archivist-model").ArchivistStorage;
31
- storeParentReads?: boolean;
32
- }, "schema"> & {
33
- schema: "network.xyo.archivist.config";
34
- }, "schema"> & {
35
- schema: string;
36
- };
37
- ephemeralQueryAccountEnabled?: boolean;
38
- moduleIdentifierTransformers?: import("@xyo-network/module-model").ModuleIdentifierTransformer[];
39
- }, ArchivistModuleEventData, {
40
- schema: string;
41
- } & import("@xyo-network/payload-model").PayloadFields>>;
42
- protected allHandler(): Promise<PayloadWithMeta[]>;
43
- protected getHandler(hashes: Hash[]): Promise<PayloadWithMeta[]>;
44
- protected nextHandler(options?: ArchivistNextOptions): Promise<PayloadWithMeta[]>;
45
- }
46
- //# sourceMappingURL=ViewArchivist.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ViewArchivist.d.ts","sourceRoot":"","sources":["../../src/ViewArchivist.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAA;AACnE,OAAO,EAEL,eAAe,EAEf,iBAAiB,EACjB,wBAAwB,EACxB,oBAAoB,EAGrB,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACL,eAAe,EAEf,gBAAgB,EAChB,cAAc,EAEd,YAAY,EACb,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAEpE,eAAO,MAAM,yBAAyB,qCAA+C,CAAA;AACrF,MAAM,MAAM,yBAAyB,GAAG,OAAO,yBAAyB,CAAA;AAExE,MAAM,MAAM,mBAAmB,GAAG,eAAe,CAC/C;IACE,eAAe,CAAC,EAAE,gBAAgB,CAAA;CACnC,EACD,yBAAyB,CAC1B,CAAA;AAED,MAAM,MAAM,mBAAmB,CAAC,OAAO,SAAS,eAAe,CAAC,mBAAmB,CAAC,GAAG,eAAe,CAAC,mBAAmB,CAAC,IAAI,YAAY,CAAC,OAAO,CAAC,CAAA;AAEpJ,qBACa,aAAa,CACxB,OAAO,SAAS,mBAAmB,CAAC,eAAe,CAAC,mBAAmB,CAAC,CAAC,GAAG,mBAAmB,EAC/F,UAAU,SAAS,wBAAwB,GAAG,wBAAwB,CAEtE,SAAQ,iBAAiB,CAAC,OAAO,EAAE,UAAU,CAC7C,YAAW,iBAAiB,EAAE,cAAc;IAC5C,gBAAyB,aAAa,EAAE,MAAM,EAAE,CAAsD;IACtG,gBAAyB,mBAAmB,EAAE,MAAM,CAA4B;IAChF,gBAAyB,MAAM;;MAAmC;IAElE,OAAO,CAAC,wBAAwB,CAAC,CAAmB;IAEpD,IAAI,eAAe,WAElB;IAED,IAAa,OAAO,aAEnB;IAEK,uBAAuB;;;;;;;;;;;;;;;;;;;;;cAMJ,UAAU,IAAI,OAAO,CAAC,eAAe,EAAE,CAAC;cAIxC,UAAU,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;cAItD,WAAW,CAAC,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;CAGjG"}
@@ -1,97 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __reflectGet = Reflect.get;
8
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
10
- var __export = (target, all) => {
11
- for (var name in all)
12
- __defProp(target, name, { get: all[name], enumerable: true });
13
- };
14
- var __copyProps = (to, from, except, desc) => {
15
- if (from && typeof from === "object" || typeof from === "function") {
16
- for (let key of __getOwnPropNames(from))
17
- if (!__hasOwnProp.call(to, key) && key !== except)
18
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
- }
20
- return to;
21
- };
22
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
24
- var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
25
-
26
- // src/index.ts
27
- var src_exports = {};
28
- __export(src_exports, {
29
- ViewArchivist: () => ViewArchivist,
30
- ViewArchivistConfigSchema: () => ViewArchivistConfigSchema
31
- });
32
- module.exports = __toCommonJS(src_exports);
33
-
34
- // src/ViewArchivist.ts
35
- var import_assert = require("@xylabs/assert");
36
- var import_archivist_abstract = require("@xyo-network/archivist-abstract");
37
- var import_archivist_model = require("@xyo-network/archivist-model");
38
- var import_module_model = require("@xyo-network/module-model");
39
- function _ts_decorate(decorators, target, key, desc) {
40
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
41
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
42
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
43
- return c > 3 && r && Object.defineProperty(target, key, r), r;
44
- }
45
- __name(_ts_decorate, "_ts_decorate");
46
- var ViewArchivistConfigSchema = "network.xyo.archivist.view.config";
47
- var _ViewArchivist = class _ViewArchivist extends import_archivist_abstract.AbstractArchivist {
48
- _originArchivistInstance;
49
- get originArchivist() {
50
- return (0, import_assert.assertEx)(this.config.originArchivist, () => "originArchivist not configured");
51
- }
52
- get queries() {
53
- return [
54
- import_archivist_model.ArchivistGetQuerySchema,
55
- import_archivist_model.ArchivistAllQuerySchema,
56
- import_archivist_model.ArchivistNextQuerySchema,
57
- ...super.queries
58
- ];
59
- }
60
- async originArchivistInstance() {
61
- this._originArchivistInstance = this._originArchivistInstance ?? (0, import_assert.assertEx)(await this.resolve(this.originArchivist, {
62
- identity: import_archivist_model.isArchivistInstance,
63
- required: true
64
- }));
65
- return this._originArchivistInstance;
66
- }
67
- async allHandler() {
68
- var _a, _b;
69
- return await ((_b = (_a = await this.originArchivistInstance()).all) == null ? void 0 : _b.call(_a)) ?? [];
70
- }
71
- async getHandler(hashes) {
72
- return await (await this.originArchivistInstance()).get(hashes);
73
- }
74
- async nextHandler(options) {
75
- var _a, _b;
76
- return await ((_b = (_a = await this.originArchivistInstance()).next) == null ? void 0 : _b.call(_a, options)) ?? [];
77
- }
78
- };
79
- __name(_ViewArchivist, "ViewArchivist");
80
- __publicField(_ViewArchivist, "configSchemas", [
81
- ...__superGet(_ViewArchivist, _ViewArchivist, "configSchemas"),
82
- ViewArchivistConfigSchema
83
- ]);
84
- __publicField(_ViewArchivist, "defaultConfigSchema", ViewArchivistConfigSchema);
85
- __publicField(_ViewArchivist, "labels", {
86
- ...import_module_model.ModuleLimitationViewLabel
87
- });
88
- var ViewArchivist = _ViewArchivist;
89
- ViewArchivist = _ts_decorate([
90
- (0, import_module_model.labeledCreatableModuleFactory)()
91
- ], ViewArchivist);
92
- // Annotate the CommonJS export names for ESM import in node:
93
- 0 && (module.exports = {
94
- ViewArchivist,
95
- ViewArchivistConfigSchema
96
- });
97
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/ViewArchivist.ts"],"sourcesContent":["export * from './ViewArchivist.ts'\n","import { assertEx } from '@xylabs/assert'\nimport { Hash } from '@xylabs/hex'\nimport { AbstractArchivist } from '@xyo-network/archivist-abstract'\nimport {\n ArchivistAllQuerySchema,\n ArchivistConfig,\n ArchivistGetQuerySchema,\n ArchivistInstance,\n ArchivistModuleEventData,\n ArchivistNextOptions,\n ArchivistNextQuerySchema,\n isArchivistInstance,\n} from '@xyo-network/archivist-model'\nimport {\n AnyConfigSchema,\n labeledCreatableModuleFactory,\n ModuleIdentifier,\n ModuleInstance,\n ModuleLimitationViewLabel,\n ModuleParams,\n} from '@xyo-network/module-model'\nimport { PayloadWithMeta, Schema } from '@xyo-network/payload-model'\n\nexport const ViewArchivistConfigSchema = 'network.xyo.archivist.view.config' as const\nexport type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema\n\nexport type ViewArchivistConfig = ArchivistConfig<\n {\n originArchivist?: ModuleIdentifier\n },\n ViewArchivistConfigSchema\n>\n\nexport type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>\n\n@labeledCreatableModuleFactory()\nexport class ViewArchivist<\n TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams,\n TEventData extends ArchivistModuleEventData = ArchivistModuleEventData,\n>\n extends AbstractArchivist<TParams, TEventData>\n implements ArchivistInstance, ModuleInstance {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, ViewArchivistConfigSchema]\n static override readonly defaultConfigSchema: Schema = ViewArchivistConfigSchema\n static override readonly labels = { ...ModuleLimitationViewLabel }\n\n private _originArchivistInstance?: ArchivistInstance\n\n get originArchivist() {\n return assertEx(this.config.originArchivist, () => 'originArchivist not configured')\n }\n\n override get queries() {\n return [ArchivistGetQuerySchema, ArchivistAllQuerySchema, ArchivistNextQuerySchema, ...super.queries]\n }\n\n async originArchivistInstance() {\n this._originArchivistInstance\n = this._originArchivistInstance ?? assertEx(await this.resolve(this.originArchivist, { identity: isArchivistInstance, required: true }))\n return this._originArchivistInstance\n }\n\n protected override async allHandler(): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).all?.()) ?? []\n }\n\n protected override async getHandler(hashes: Hash[]): Promise<PayloadWithMeta[]> {\n return await (await this.originArchivistInstance()).get(hashes)\n }\n\n protected override async nextHandler(options?: ArchivistNextOptions): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).next?.(options)) ?? []\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;ACAA,oBAAyB;AAEzB,gCAAkC;AAClC,6BASO;AACP,0BAOO;;;;;;;;AAGA,IAAMA,4BAA4B;AAalC,IAAMC,iBAAN,MAAMA,uBAIHC,4CAAAA;EAMAC;EAER,IAAIC,kBAAkB;AACpB,eAAOC,wBAAS,KAAKC,OAAOF,iBAAiB,MAAM,gCAAA;EACrD;EAEA,IAAaG,UAAU;AACrB,WAAO;MAACC;MAAyBC;MAAyBC;SAA6B,MAAMH;;EAC/F;EAEA,MAAMI,0BAA0B;AAC9B,SAAKR,2BACD,KAAKA,gCAA4BE,wBAAS,MAAM,KAAKO,QAAQ,KAAKR,iBAAiB;MAAES,UAAUC;MAAqBC,UAAU;IAAK,CAAA,CAAA;AACvI,WAAO,KAAKZ;EACd;EAEA,MAAyBa,aAAyC;;AAChE,WAAQ,QAAO,iBAAM,KAAKL,wBAAuB,GAAIM,QAAtC,gCAAkD,CAAA;EACnE;EAEA,MAAyBC,WAAWC,QAA4C;AAC9E,WAAO,OAAO,MAAM,KAAKR,wBAAuB,GAAIS,IAAID,MAAAA;EAC1D;EAEA,MAAyBE,YAAYC,SAA4D;;AAC/F,WAAQ,QAAO,iBAAM,KAAKX,wBAAuB,GAAIY,SAAtC,4BAA6CD,aAAa,CAAA;EAC3E;AACF;AAjCUpB;AAER,cANWD,gBAMcuB,iBAA0B;KAAI,2CAAMA;EAAexB;;AAC5E,cAPWC,gBAOcwB,uBAA8BzB;AACvD,cARWC,gBAQcyB,UAAS;EAAE,GAAGC;AAA0B;AAR5D,IAAM1B,gBAAN;;;;","names":["ViewArchivistConfigSchema","ViewArchivist","AbstractArchivist","_originArchivistInstance","originArchivist","assertEx","config","queries","ArchivistGetQuerySchema","ArchivistAllQuerySchema","ArchivistNextQuerySchema","originArchivistInstance","resolve","identity","isArchivistInstance","required","allHandler","all","getHandler","hashes","get","nextHandler","options","next","configSchemas","defaultConfigSchema","labels","ModuleLimitationViewLabel"]}
@@ -1,2 +0,0 @@
1
- export * from './ViewArchivist.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './ViewArchivist.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './ViewArchivist.ts';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,71 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getProtoOf = Object.getPrototypeOf;
3
- var __reflectGet = Reflect.get;
4
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
7
- var __superGet = (cls, obj, key) => __reflectGet(__getProtoOf(cls), key, obj);
8
-
9
- // src/ViewArchivist.ts
10
- import { assertEx } from "@xylabs/assert";
11
- import { AbstractArchivist } from "@xyo-network/archivist-abstract";
12
- import { ArchivistAllQuerySchema, ArchivistGetQuerySchema, ArchivistNextQuerySchema, isArchivistInstance } from "@xyo-network/archivist-model";
13
- import { labeledCreatableModuleFactory, ModuleLimitationViewLabel } from "@xyo-network/module-model";
14
- function _ts_decorate(decorators, target, key, desc) {
15
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
16
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
17
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
18
- return c > 3 && r && Object.defineProperty(target, key, r), r;
19
- }
20
- __name(_ts_decorate, "_ts_decorate");
21
- var ViewArchivistConfigSchema = "network.xyo.archivist.view.config";
22
- var _ViewArchivist = class _ViewArchivist extends AbstractArchivist {
23
- _originArchivistInstance;
24
- get originArchivist() {
25
- return assertEx(this.config.originArchivist, () => "originArchivist not configured");
26
- }
27
- get queries() {
28
- return [
29
- ArchivistGetQuerySchema,
30
- ArchivistAllQuerySchema,
31
- ArchivistNextQuerySchema,
32
- ...super.queries
33
- ];
34
- }
35
- async originArchivistInstance() {
36
- this._originArchivistInstance = this._originArchivistInstance ?? assertEx(await this.resolve(this.originArchivist, {
37
- identity: isArchivistInstance,
38
- required: true
39
- }));
40
- return this._originArchivistInstance;
41
- }
42
- async allHandler() {
43
- var _a, _b;
44
- return await ((_b = (_a = await this.originArchivistInstance()).all) == null ? void 0 : _b.call(_a)) ?? [];
45
- }
46
- async getHandler(hashes) {
47
- return await (await this.originArchivistInstance()).get(hashes);
48
- }
49
- async nextHandler(options) {
50
- var _a, _b;
51
- return await ((_b = (_a = await this.originArchivistInstance()).next) == null ? void 0 : _b.call(_a, options)) ?? [];
52
- }
53
- };
54
- __name(_ViewArchivist, "ViewArchivist");
55
- __publicField(_ViewArchivist, "configSchemas", [
56
- ...__superGet(_ViewArchivist, _ViewArchivist, "configSchemas"),
57
- ViewArchivistConfigSchema
58
- ]);
59
- __publicField(_ViewArchivist, "defaultConfigSchema", ViewArchivistConfigSchema);
60
- __publicField(_ViewArchivist, "labels", {
61
- ...ModuleLimitationViewLabel
62
- });
63
- var ViewArchivist = _ViewArchivist;
64
- ViewArchivist = _ts_decorate([
65
- labeledCreatableModuleFactory()
66
- ], ViewArchivist);
67
- export {
68
- ViewArchivist,
69
- ViewArchivistConfigSchema
70
- };
71
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/ViewArchivist.ts"],"sourcesContent":["import { assertEx } from '@xylabs/assert'\nimport { Hash } from '@xylabs/hex'\nimport { AbstractArchivist } from '@xyo-network/archivist-abstract'\nimport {\n ArchivistAllQuerySchema,\n ArchivistConfig,\n ArchivistGetQuerySchema,\n ArchivistInstance,\n ArchivistModuleEventData,\n ArchivistNextOptions,\n ArchivistNextQuerySchema,\n isArchivistInstance,\n} from '@xyo-network/archivist-model'\nimport {\n AnyConfigSchema,\n labeledCreatableModuleFactory,\n ModuleIdentifier,\n ModuleInstance,\n ModuleLimitationViewLabel,\n ModuleParams,\n} from '@xyo-network/module-model'\nimport { PayloadWithMeta, Schema } from '@xyo-network/payload-model'\n\nexport const ViewArchivistConfigSchema = 'network.xyo.archivist.view.config' as const\nexport type ViewArchivistConfigSchema = typeof ViewArchivistConfigSchema\n\nexport type ViewArchivistConfig = ArchivistConfig<\n {\n originArchivist?: ModuleIdentifier\n },\n ViewArchivistConfigSchema\n>\n\nexport type ViewArchivistParams<TConfig extends AnyConfigSchema<ViewArchivistConfig> = AnyConfigSchema<ViewArchivistConfig>> = ModuleParams<TConfig>\n\n@labeledCreatableModuleFactory()\nexport class ViewArchivist<\n TParams extends ViewArchivistParams<AnyConfigSchema<ViewArchivistConfig>> = ViewArchivistParams,\n TEventData extends ArchivistModuleEventData = ArchivistModuleEventData,\n>\n extends AbstractArchivist<TParams, TEventData>\n implements ArchivistInstance, ModuleInstance {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, ViewArchivistConfigSchema]\n static override readonly defaultConfigSchema: Schema = ViewArchivistConfigSchema\n static override readonly labels = { ...ModuleLimitationViewLabel }\n\n private _originArchivistInstance?: ArchivistInstance\n\n get originArchivist() {\n return assertEx(this.config.originArchivist, () => 'originArchivist not configured')\n }\n\n override get queries() {\n return [ArchivistGetQuerySchema, ArchivistAllQuerySchema, ArchivistNextQuerySchema, ...super.queries]\n }\n\n async originArchivistInstance() {\n this._originArchivistInstance\n = this._originArchivistInstance ?? assertEx(await this.resolve(this.originArchivist, { identity: isArchivistInstance, required: true }))\n return this._originArchivistInstance\n }\n\n protected override async allHandler(): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).all?.()) ?? []\n }\n\n protected override async getHandler(hashes: Hash[]): Promise<PayloadWithMeta[]> {\n return await (await this.originArchivistInstance()).get(hashes)\n }\n\n protected override async nextHandler(options?: ArchivistNextOptions): Promise<PayloadWithMeta[]> {\n return (await (await this.originArchivistInstance()).next?.(options)) ?? []\n }\n}\n"],"mappings":";;;;;;;;;AAAA,SAASA,gBAAgB;AAEzB,SAASC,yBAAyB;AAClC,SACEC,yBAEAC,yBAIAC,0BACAC,2BACK;AACP,SAEEC,+BAGAC,iCAEK;;;;;;;;AAGA,IAAMC,4BAA4B;AAalC,IAAMC,iBAAN,MAAMA,uBAIHC,kBAAAA;EAMAC;EAER,IAAIC,kBAAkB;AACpB,WAAOC,SAAS,KAAKC,OAAOF,iBAAiB,MAAM,gCAAA;EACrD;EAEA,IAAaG,UAAU;AACrB,WAAO;MAACC;MAAyBC;MAAyBC;SAA6B,MAAMH;;EAC/F;EAEA,MAAMI,0BAA0B;AAC9B,SAAKR,2BACD,KAAKA,4BAA4BE,SAAS,MAAM,KAAKO,QAAQ,KAAKR,iBAAiB;MAAES,UAAUC;MAAqBC,UAAU;IAAK,CAAA,CAAA;AACvI,WAAO,KAAKZ;EACd;EAEA,MAAyBa,aAAyC;;AAChE,WAAQ,QAAO,iBAAM,KAAKL,wBAAuB,GAAIM,QAAtC,gCAAkD,CAAA;EACnE;EAEA,MAAyBC,WAAWC,QAA4C;AAC9E,WAAO,OAAO,MAAM,KAAKR,wBAAuB,GAAIS,IAAID,MAAAA;EAC1D;EAEA,MAAyBE,YAAYC,SAA4D;;AAC/F,WAAQ,QAAO,iBAAM,KAAKX,wBAAuB,GAAIY,SAAtC,4BAA6CD,aAAa,CAAA;EAC3E;AACF;AAjCUpB;AAER,cANWD,gBAMcuB,iBAA0B;KAAI,2CAAMA;EAAexB;;AAC5E,cAPWC,gBAOcwB,uBAA8BzB;AACvD,cARWC,gBAQcyB,UAAS;EAAE,GAAGC;AAA0B;AAR5D,IAAM1B,gBAAN;;;;","names":["assertEx","AbstractArchivist","ArchivistAllQuerySchema","ArchivistGetQuerySchema","ArchivistNextQuerySchema","isArchivistInstance","labeledCreatableModuleFactory","ModuleLimitationViewLabel","ViewArchivistConfigSchema","ViewArchivist","AbstractArchivist","_originArchivistInstance","originArchivist","assertEx","config","queries","ArchivistGetQuerySchema","ArchivistAllQuerySchema","ArchivistNextQuerySchema","originArchivistInstance","resolve","identity","isArchivistInstance","required","allHandler","all","getHandler","hashes","get","nextHandler","options","next","configSchemas","defaultConfigSchema","labels","ModuleLimitationViewLabel"]}