@xyo-network/diviner-jsonpath-aggregate-memory 7.2.3 → 7.3.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.
@@ -1,3 +1,2 @@
1
- export * from './Diviner.ts';
2
- export * from './jsonpath/index.ts';
1
+ export * from '@xyo-network/diviner-jsonpath-aggregate/memory';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,qBAAqB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,gDAAgD,CAAA"}
@@ -1,113 +1,3 @@
1
- // src/Diviner.ts
2
- import { assertEx } from "@ariestools/sdk";
3
- import { JsonPathAggregateDivinerConfigSchema } from "@xyo-network/diviner-jsonpath-aggregate-model";
4
- import { AbstractDiviner } from "@xyo-network/sdk/diviner-abstract";
5
- import {
6
- BoundWitnessSchema,
7
- combinationsByBoundwitness,
8
- PayloadBuilder as PayloadBuilder2,
9
- PayloadSchema
10
- } from "@xyo-network/sdk-protocol";
11
- import { combinationsBySchema } from "@xyo-network/sdk-protocol/payload-utils";
12
-
13
- // src/jsonpath/jsonPathToTransformersDictionary.ts
14
- import { toPayloadTransformer } from "@xyo-network/diviner-jsonpath-memory";
15
- var jsonPathToTransformersDictionary = (schemaTransforms) => {
16
- return Object.fromEntries(
17
- Object.entries(schemaTransforms).map(([schema, jsonPathTransformerExpressions]) => {
18
- const transformers = jsonPathTransformerExpressions.map(toPayloadTransformer);
19
- return [schema, transformers];
20
- })
21
- );
22
- };
23
-
24
- // src/jsonpath/reducePayloads.ts
25
- import { exists } from "@ariestools/sdk";
26
- import { PayloadBuilder } from "@xyo-network/sdk-protocol";
27
- var reducePayloads = async (payloads, payloadTransformers, destinationSchema, excludeSources = false) => {
28
- const payloadFields = payloads.filter(exists).flatMap((payload) => {
29
- const transformers = payloadTransformers[payload.schema];
30
- return transformers ? transformers.map((transform) => transform(payload)) : [];
31
- });
32
- const baseObject = excludeSources ? {} : { sources: await PayloadBuilder.dataHashes(payloads) };
33
- return new PayloadBuilder({ schema: destinationSchema }).fields(Object.assign(baseObject, ...payloadFields)).build();
34
- };
35
- var reducePayloadsArray = async (payloadsArray, payloadTransformers, destinationSchema, excludeSources = false) => {
36
- return await Promise.all(
37
- payloadsArray.map(async (payloads) => {
38
- return await reducePayloads(payloads, payloadTransformers, destinationSchema, excludeSources);
39
- })
40
- );
41
- };
42
-
43
- // src/Diviner.ts
44
- var moduleName = "JsonPathAggregateDiviner";
45
- var JsonPathAggregateDiviner = class extends AbstractDiviner {
46
- static configSchemas = [...super.configSchemas, JsonPathAggregateDivinerConfigSchema];
47
- static defaultConfigSchema = JsonPathAggregateDivinerConfigSchema;
48
- _transforms;
49
- _payloadTransformers;
50
- _transformableSchemas;
51
- /**
52
- * The schema to use for the destination payloads
53
- */
54
- get destinationSchema() {
55
- return this.config.destinationSchema ?? PayloadSchema;
56
- }
57
- /**
58
- * Dictionary of schemas to payload transformers
59
- */
60
- get payloadTransformers() {
61
- this._payloadTransformers ??= jsonPathToTransformersDictionary(this.schemaTransforms);
62
- return this._payloadTransformers;
63
- }
64
- /**
65
- * The dictionary of schemas to JSON Path transform expressions
66
- */
67
- get schemaTransforms() {
68
- return assertEx(this.config?.schemaTransforms, () => `${moduleName}: Missing config.schemaTransforms section`);
69
- }
70
- /**
71
- * List of transformable schemas for this diviner
72
- */
73
- get transformableSchemas() {
74
- this._transformableSchemas ??= Object.keys(this.schemaTransforms);
75
- return this._transformableSchemas;
76
- }
77
- async divineHandler(payloads) {
78
- if (!payloads) return [];
79
- const strippedPayloads = payloads.map((payload) => {
80
- const p = { ...payload };
81
- return PayloadBuilder2.omitStorageMeta(p);
82
- });
83
- const combinations = this.transformableSchemas.includes(BoundWitnessSchema) ? await combinationsByBoundwitness(strippedPayloads) : await combinationsBySchema(strippedPayloads, this.transformableSchemas);
84
- return await Promise.all(
85
- combinations.map((combination) => {
86
- return reducePayloads(combination, this.payloadTransformers, this.destinationSchema, this.config.excludeSources ?? false);
87
- })
88
- );
89
- }
90
- /**
91
- * Identifies if a payload is one that is transformed by this diviner
92
- * @param x The candidate payload
93
- * @returns True if the payload is one transformed by this diviner, false otherwise
94
- */
95
- isTransformablePayload = (x) => {
96
- return this.transformableSchemas.includes(x?.schema);
97
- };
98
- /**
99
- * Identifies if a schema is one that is transformed by this diviner
100
- * @param schema The candidate schema
101
- * @returns True if this schema is one transformed by this diviner, false otherwise
102
- */
103
- isTransformableSchema = (schema) => {
104
- return typeof schema === "string" ? this.transformableSchemas.includes(schema) : false;
105
- };
106
- };
107
- export {
108
- JsonPathAggregateDiviner,
109
- jsonPathToTransformersDictionary,
110
- reducePayloads,
111
- reducePayloadsArray
112
- };
1
+ // src/index.ts
2
+ export * from "@xyo-network/diviner-jsonpath-aggregate/memory";
113
3
  //# sourceMappingURL=index.mjs.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/Diviner.ts", "../../src/jsonpath/jsonPathToTransformersDictionary.ts", "../../src/jsonpath/reducePayloads.ts"],
4
- "sourcesContent": ["import { assertEx } from '@ariestools/sdk'\nimport type {\n JsonPathAggregateDivinerParams,\n PayloadTransformer,\n SchemaToJsonPathTransformExpressionsDictionary,\n SchemaToPayloadTransformersDictionary,\n} from '@xyo-network/diviner-jsonpath-aggregate-model'\nimport { JsonPathAggregateDivinerConfigSchema } from '@xyo-network/diviner-jsonpath-aggregate-model'\nimport { AbstractDiviner } from '@xyo-network/sdk/diviner-abstract'\nimport type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/sdk/diviner-model'\nimport type { Payload, Schema } from '@xyo-network/sdk-protocol'\nimport {\n BoundWitnessSchema, combinationsByBoundwitness, PayloadBuilder, PayloadSchema,\n} from '@xyo-network/sdk-protocol'\nimport { combinationsBySchema } from '@xyo-network/sdk-protocol/payload-utils'\n\nimport { jsonPathToTransformersDictionary, reducePayloads } from './jsonpath/index.ts'\n\nconst moduleName = 'JsonPathAggregateDiviner'\n\nexport class JsonPathAggregateDiviner<\n TParams extends JsonPathAggregateDivinerParams = JsonPathAggregateDivinerParams,\n TIn extends Payload = Payload,\n TOut extends Payload = Payload,\n TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<\n DivinerInstance<TParams, TIn, TOut>,\n TIn,\n TOut\n >,\n> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {\n static override readonly configSchemas: Schema[] = [...super.configSchemas, JsonPathAggregateDivinerConfigSchema]\n static override readonly defaultConfigSchema: Schema = JsonPathAggregateDivinerConfigSchema\n\n protected _transforms: PayloadTransformer[] | undefined\n\n private _payloadTransformers: SchemaToPayloadTransformersDictionary | undefined\n private _transformableSchemas: string[] | undefined\n\n /**\n * The schema to use for the destination payloads\n */\n protected get destinationSchema(): Schema {\n return this.config.destinationSchema ?? PayloadSchema\n }\n\n /**\n * Dictionary of schemas to payload transformers\n */\n protected get payloadTransformers(): SchemaToPayloadTransformersDictionary {\n this._payloadTransformers ??= jsonPathToTransformersDictionary(this.schemaTransforms)\n return this._payloadTransformers\n }\n\n /**\n * The dictionary of schemas to JSON Path transform expressions\n */\n protected get schemaTransforms(): SchemaToJsonPathTransformExpressionsDictionary {\n return assertEx(this.config?.schemaTransforms, () => `${moduleName}: Missing config.schemaTransforms section`)\n }\n\n /**\n * List of transformable schemas for this diviner\n */\n protected get transformableSchemas(): string[] {\n this._transformableSchemas ??= Object.keys(this.schemaTransforms)\n return this._transformableSchemas\n }\n\n protected override async divineHandler(payloads?: TIn[]): Promise<TOut[]> {\n if (!payloads) return []\n const strippedPayloads = payloads.map((payload) => {\n const p = { ...payload }\n return PayloadBuilder.omitStorageMeta(p)\n })\n const combinations\n = this.transformableSchemas.includes(BoundWitnessSchema)\n ? await combinationsByBoundwitness(strippedPayloads)\n : await combinationsBySchema(strippedPayloads, this.transformableSchemas)\n return await Promise.all(\n combinations.map((combination) => {\n return reducePayloads<TOut>(combination, this.payloadTransformers, this.destinationSchema, this.config.excludeSources ?? false)\n }),\n )\n }\n\n /**\n * Identifies if a payload is one that is transformed by this diviner\n * @param x The candidate payload\n * @returns True if the payload is one transformed by this diviner, false otherwise\n */\n protected isTransformablePayload = (x: Payload): boolean => {\n return this.transformableSchemas.includes(x?.schema)\n }\n\n /**\n * Identifies if a schema is one that is transformed by this diviner\n * @param schema The candidate schema\n * @returns True if this schema is one transformed by this diviner, false otherwise\n */\n protected isTransformableSchema = (schema?: string | null): boolean => {\n return typeof schema === 'string' ? this.transformableSchemas.includes(schema) : false\n }\n}\n", "import type { SchemaToJsonPathTransformExpressionsDictionary, SchemaToPayloadTransformersDictionary } from '@xyo-network/diviner-jsonpath-aggregate-model'\nimport { toPayloadTransformer } from '@xyo-network/diviner-jsonpath-memory'\n\n/**\n * Materializes the JSON-path expressions into memoized functions by converting a\n * dictionary of schema to JSON Path transform expressions to a dictionary\n * of schema to payload transformers\n * @param schemaTransforms The schema transforms to convert\n * @returns A dictionary of schema to payload transformers\n */\nexport const jsonPathToTransformersDictionary = (\n schemaTransforms: SchemaToJsonPathTransformExpressionsDictionary,\n): SchemaToPayloadTransformersDictionary => {\n return Object.fromEntries(\n Object.entries(schemaTransforms).map(([schema, jsonPathTransformerExpressions]) => {\n const transformers = jsonPathTransformerExpressions.map(toPayloadTransformer)\n return [schema, transformers]\n }),\n )\n}\n", "import { exists } from '@ariestools/sdk'\nimport type { SchemaToPayloadTransformersDictionary } from '@xyo-network/diviner-jsonpath-aggregate-model'\nimport type {\n Payload, Schema, WithoutSchema,\n} from '@xyo-network/sdk-protocol'\nimport { PayloadBuilder } from '@xyo-network/sdk-protocol'\n\n/**\n * Reduces the payloads to a single payload using the supplied transformers\n * @param payloads The payloads to reduce\n * @param payloadTransformers The transformers to use to convert the payloads to the destination payload\n * @param destinationSchema The schema of the destination payload\n * @param excludeSources Exclude the source hashes from the destination payload\n * @returns The reduced payload\n */\nexport const reducePayloads = async <T extends Payload = Payload>(\n payloads: Payload[],\n payloadTransformers: SchemaToPayloadTransformersDictionary,\n destinationSchema: Schema,\n excludeSources = false,\n): Promise<T> => {\n // Use the payload transformers to convert the fields from the source payloads to the destination fields\n const payloadFields = payloads.filter(exists).flatMap<WithoutSchema<Payload>[]>((payload) => {\n // Find the transformers for this payload\n const transformers = payloadTransformers[payload.schema]\n // If transformers exist, apply them to the payload otherwise return an empty array\n return transformers ? transformers.map(transform => transform(payload)) : []\n })\n // Include all the sources for reference\n const baseObject = excludeSources ? {} : { sources: await PayloadBuilder.dataHashes(payloads) }\n // Build and return the payload\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return new PayloadBuilder<T>({ schema: destinationSchema }).fields(Object.assign(baseObject, ...payloadFields)).build()\n}\n\n/**\n * Reduces the arrays of payload arrays to an array of payloads using the supplied transformers\n * @param payloadsArray The arrays of payloads to reduce\n * @param payloadTransformers The transformers to use to convert the payloads to the destination payloads\n * @param excludeSources Exclude the source hashes from the destination payload\n * @returns The reduced payloads\n */\nexport const reducePayloadsArray = async <T extends Payload = Payload>(\n payloadsArray: Payload[][],\n payloadTransformers: SchemaToPayloadTransformersDictionary,\n destinationSchema: Schema,\n excludeSources = false,\n): Promise<T[]> => {\n return await Promise.all(\n payloadsArray.map(async (payloads) => {\n return await reducePayloads<T>(payloads, payloadTransformers, destinationSchema, excludeSources)\n }),\n )\n}\n"],
5
- "mappings": ";AAAA,SAAS,gBAAgB;AAOzB,SAAS,4CAA4C;AACrD,SAAS,uBAAuB;AAGhC;AAAA,EACE;AAAA,EAAoB;AAAA,EAA4B,kBAAAA;AAAA,EAAgB;AAAA,OAC3D;AACP,SAAS,4BAA4B;;;ACbrC,SAAS,4BAA4B;AAS9B,IAAM,mCAAmC,CAC9C,qBAC0C;AAC1C,SAAO,OAAO;AAAA,IACZ,OAA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F,WAAO,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA,EAKA,IAAc,mBAAmE;AAC/E,WAAO,SAAS,KAAK,QAAQ,kBAAkB,MAAM,GAAG,UAAU,2CAA2C;AAAA,EAC/G;AAAA;AAAA;AAAA;AAAA,EAKA,IAAc,uBAAiC;AAC7C,SAAK,0BAA0B,OAAO,KAAK,KAAK,gBAAgB;AAChE,WAAO,KAAK;AAAA,EACd;AAAA,EAEA,MAAyB,cAAc,UAAmC;AACxE,QAAI,CAAC,SAAU,QAAO,CAAC;AACvB,UAAM,mBAAmB,SAAS,IAAI,CAAC,YAAY;AACjD,YAAM,IAAI,EAAE,GAAG,QAAQ;AACvB,aAAOC,gBAAe,gBAAgB,CAAC;AAAA,IACzC,CAAC;AACD,UAAM,eACF,KAAK,qBAAqB,SAAS,kBAAkB,IACnD,MAAM,2BAA2B,gBAAgB,IACjD,MAAM,qBAAqB,kBAAkB,KAAK,oBAAoB;AAC5E,WAAO,MAAM,QAAQ;AAAA,MACnB,aAAa,IAAI,CAAC,gBAAgB;AAChC,eAAO,eAAqB,aAAa,KAAK,qBAAqB,KAAK,mBAAmB,KAAK,OAAO,kBAAkB,KAAK;AAAA,MAChI,CAAC;AAAA,IACH;AAAA,EACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOU,yBAAyB,CAAC,MAAwB;AAC1D,WAAO,KAAK,qBAAqB,SAAS,GAAG,MAAM;AAAA,EACrD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOU,wBAAwB,CAAC,WAAoC;AACrE,WAAO,OAAO,WAAW,WAAW,KAAK,qBAAqB,SAAS,MAAM,IAAI;AAAA,EACnF;AACF;",
6
- "names": ["PayloadBuilder", "PayloadBuilder"]
3
+ "sources": ["../../src/index.ts"],
4
+ "sourcesContent": ["// Compatibility shim: this package re-exports from @xyo-network/diviner-jsonpath-aggregate/memory.\nexport * from '@xyo-network/diviner-jsonpath-aggregate/memory'\n"],
5
+ "mappings": ";AACA,cAAc;",
6
+ "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xyo-network/diviner-jsonpath-aggregate-memory",
3
- "version": "7.2.3",
3
+ "version": "7.3.0",
4
4
  "description": "Primary SDK for using XYO Protocol 2.0",
5
5
  "homepage": "https://xyo.network",
6
6
  "bugs": {
@@ -34,33 +34,24 @@
34
34
  "README.md"
35
35
  ],
36
36
  "dependencies": {
37
- "@xyo-network/diviner-jsonpath-memory": "~7.2.3",
38
- "@xyo-network/diviner-jsonpath-aggregate-model": "~7.2.3",
39
- "@xyo-network/sdk": "~7.2.3"
37
+ "@xyo-network/diviner-jsonpath-aggregate": "~7.3.0"
40
38
  },
41
39
  "devDependencies": {
42
- "@ariestools/sdk": "~8.1.6",
43
- "@ariestools/toolchain": "~8.7.26",
44
- "@ariestools/tsconfig": "~8.7.26",
45
- "@ariestools/vitest-extended": "~8.0.3",
40
+ "@ariestools/sdk": "~8.1.9",
41
+ "@ariestools/toolchain": "~9.1.1",
42
+ "@ariestools/tsconfig": "~9.1.1",
46
43
  "@opentelemetry/api": "~1.9.1",
47
- "@xyo-network/sdk-protocol": "~7.2.3",
48
- "eslint": "~10.8.0",
44
+ "@xyo-network/sdk-protocol": "~7.3.1",
45
+ "eslint": "~10.9.0",
49
46
  "eslint-import-resolver-typescript": "~4.4.5",
50
47
  "typescript": "~6.0.3",
51
- "vite": "~8.1.5",
52
- "vitest": "~4.1.10",
53
- "zod": "~4.4.3",
54
- "@xyo-network/diviner-jsonpath-model": "~7.2.3"
55
- },
56
- "peerDependencies": {
57
- "@ariestools/sdk": "^8.1",
58
- "@xyo-network/sdk-protocol": "^7.2"
48
+ "zod": "~4.4.3"
59
49
  },
60
50
  "engines": {
61
51
  "node": "^24"
62
52
  },
63
53
  "publishConfig": {
64
54
  "access": "public"
65
- }
55
+ },
56
+ "deprecated": "Use @xyo-network/diviner-jsonpath-aggregate/memory instead. This package is a compatibility shim only and will not receive further updates."
66
57
  }
@@ -1,41 +0,0 @@
1
- import type { JsonPathAggregateDivinerParams, PayloadTransformer, SchemaToJsonPathTransformExpressionsDictionary, SchemaToPayloadTransformersDictionary } from '@xyo-network/diviner-jsonpath-aggregate-model';
2
- import { AbstractDiviner } from '@xyo-network/sdk/diviner-abstract';
3
- import type { DivinerInstance, DivinerModuleEventData } from '@xyo-network/sdk/diviner-model';
4
- import type { Payload, Schema } from '@xyo-network/sdk-protocol';
5
- export declare class JsonPathAggregateDiviner<TParams extends JsonPathAggregateDivinerParams = JsonPathAggregateDivinerParams, TIn extends Payload = Payload, TOut extends Payload = Payload, TEventData extends DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut> = DivinerModuleEventData<DivinerInstance<TParams, TIn, TOut>, TIn, TOut>> extends AbstractDiviner<TParams, TIn, TOut, TEventData> {
6
- static readonly configSchemas: Schema[];
7
- static readonly defaultConfigSchema: Schema;
8
- protected _transforms: PayloadTransformer[] | undefined;
9
- private _payloadTransformers;
10
- private _transformableSchemas;
11
- /**
12
- * The schema to use for the destination payloads
13
- */
14
- protected get destinationSchema(): Schema;
15
- /**
16
- * Dictionary of schemas to payload transformers
17
- */
18
- protected get payloadTransformers(): SchemaToPayloadTransformersDictionary;
19
- /**
20
- * The dictionary of schemas to JSON Path transform expressions
21
- */
22
- protected get schemaTransforms(): SchemaToJsonPathTransformExpressionsDictionary;
23
- /**
24
- * List of transformable schemas for this diviner
25
- */
26
- protected get transformableSchemas(): string[];
27
- protected divineHandler(payloads?: TIn[]): Promise<TOut[]>;
28
- /**
29
- * Identifies if a payload is one that is transformed by this diviner
30
- * @param x The candidate payload
31
- * @returns True if the payload is one transformed by this diviner, false otherwise
32
- */
33
- protected isTransformablePayload: (x: Payload) => boolean;
34
- /**
35
- * Identifies if a schema is one that is transformed by this diviner
36
- * @param schema The candidate schema
37
- * @returns True if this schema is one transformed by this diviner, false otherwise
38
- */
39
- protected isTransformableSchema: (schema?: string | null) => boolean;
40
- }
41
- //# sour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G;IACH,SAAS,KAAK,oBAAoB,IAAI,MAAM,EAAE,CAG7C;cAEwB,aAAa,CAAC,QAAQ,CAAC,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAiBzE;;;;OAIG;IACH,SAAS,CAAC,sBAAsB,GAAI,GAAG,OAAO,KAAG,OAAO,CAEvD;IAED;;;;OAIG;IACH,SAAS,CAAC,qBAAqB,GAAI,SAAS,MAAM,GAAG,IAAI,KAAG,OAAO,CAElE;CACF"}
@@ -1,3 +0,0 @@
1
- export * from './jsonPathToTransformersDictionary.ts';
2
- export * from './reducePayloads.ts';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/jsonpath/index.ts"],"names":[],"mappings":"AAAA,cAAc,uCAAuC,CAAA;AACrD,cAAc,qBAAqB,CAAA"}
@@ -1,10 +0,0 @@
1
- import type { SchemaToJsonPathTransformExpressionsDictionary, SchemaToPayloadTransformersDictionary } from '@xyo-network/diviner-jsonpath-aggregate-model';
2
- /**
3
- * Materializes the JSON-path expressions into memoized functions by converting a
4
- * dictionary of schema to JSON Path transform expressions to a dictionary
5
- * of schema to payload transformers
6
- * @param schemaTransforms The schema transforms to convert
7
- * @returns A dictionary of schema to payload transformers
8
- */
9
- export declare const jsonPathToTransformersDictionary: (schemaTransforms: SchemaToJsonPathTransformExpressionsDictionary) => SchemaToPayloadTransformersDictionary;
10
- //# sourceMappingURL=jsonPathToTransformersDictionary.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"jsonPathToTransformersDictionary.d.ts","sourceRoot":"","sources":["../../../src/jsonpath/jsonPathToTransformersDictionary.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8CAA8C,EAAE,qCAAqC,EAAE,MAAM,+CAA+C,CAAA;AAG1J;;;;;;GAMG;AACH,eAAO,MAAM,gCAAgC,GAC3C,kBAAkB,8CAA8C,KAC/D,qCAOF,CAAA"}
@@ -1,20 +0,0 @@
1
- import type { SchemaToPayloadTransformersDictionary } from '@xyo-network/diviner-jsonpath-aggregate-model';
2
- import type { Payload, Schema } from '@xyo-network/sdk-protocol';
3
- /**
4
- * Reduces the payloads to a single payload using the supplied transformers
5
- * @param payloads The payloads to reduce
6
- * @param payloadTransformers The transformers to use to convert the payloads to the destination payload
7
- * @param destinationSchema The schema of the destination payload
8
- * @param excludeSources Exclude the source hashes from the destination payload
9
- * @returns The reduced payload
10
- */
11
- export declare const reducePayloads: <T extends Payload = Payload>(payloads: Payload[], payloadTransformers: SchemaToPayloadTransformersDictionary, destinationSchema: Schema, excludeSources?: boolean) => Promise<T>;
12
- /**
13
- * Reduces the arrays of payload arrays to an array of payloads using the supplied transformers
14
- * @param payloadsArray The arrays of payloads to reduce
15
- * @param payloadTransformers The transformers to use to convert the payloads to the destination payloads
16
- * @param excludeSources Exclude the source hashes from the destination payload
17
- * @returns The reduced payloads
18
- */
19
- export declare const reducePayloadsArray: <T extends Payload = Payload>(payloadsArray: Payload[][], payloadTransformers: SchemaToPayloadTransformersDictionary, destinationSchema: Schema, excludeSources?: boolean) => Promise<T[]>;
20
- //# sourceMappingURL=reducePayloads.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reducePayloads.d.ts","sourceRoot":"","sources":["../../../src/jsonpath/reducePayloads.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,+CAA+C,CAAA;AAC1G,OAAO,KAAK,EACV,OAAO,EAAE,MAAM,EAChB,MAAM,2BAA2B,CAAA;AAGlC;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,GAAU,CAAC,SAAS,OAAO,GAAG,OAAO,EAC9D,UAAU,OAAO,EAAE,EACnB,qBAAqB,qCAAqC,EAC1D,mBAAmB,MAAM,EACzB,wBAAsB,KACrB,OAAO,CAAC,CAAC,CAcX,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,GAAU,CAAC,SAAS,OAAO,GAAG,OAAO,EACnE,eAAe,OAAO,EAAE,EAAE,EAC1B,qBAAqB,qCAAqC,EAC1D,mBAAmB,MAAM,EACzB,wBAAsB,KACrB,OAAO,CAAC,CAAC,EAAE,CAMb,CAAA"}