@webiny/api-opensearch 0.0.0-unstable.e6f0dc8ca7 → 0.0.0-unstable.eb81deee7e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client.js +30 -63
- package/client.js.map +1 -1
- package/cursors.js +20 -32
- package/cursors.js.map +1 -1
- package/exports/api/opensearch.d.ts +6 -1
- package/exports/api/opensearch.js +6 -3
- package/features/OpenSearchClient/abstraction.d.ts +3 -3
- package/features/OpenSearchClient/abstraction.js +2 -1
- package/features/OpenSearchClient/abstraction.js.map +1 -1
- package/features/OpenSearchClient/feature.d.ts +2 -1
- package/features/OpenSearchClient/feature.js +9 -6
- package/features/OpenSearchClient/feature.js.map +1 -1
- package/features/OpenSearchClientFactory/OpenSearchClientFactory.js +8 -9
- package/features/OpenSearchClientFactory/OpenSearchClientFactory.js.map +1 -1
- package/features/OpenSearchClientFactory/abstraction.js +2 -1
- package/features/OpenSearchClientFactory/abstraction.js.map +1 -1
- package/features/OpenSearchClientFactory/feature.js +6 -5
- package/features/OpenSearchClientFactory/feature.js.map +1 -1
- package/features/OpenSearchField/OpenSearchField.d.ts +18 -0
- package/features/OpenSearchField/OpenSearchField.js +49 -0
- package/features/OpenSearchField/OpenSearchField.js.map +1 -0
- package/features/OpenSearchField/OpenSearchFieldFactory.d.ts +9 -0
- package/features/OpenSearchField/OpenSearchFieldFactory.js +14 -0
- package/features/OpenSearchField/OpenSearchFieldFactory.js.map +1 -0
- package/features/OpenSearchField/abstractions/OpenSearchField.d.ts +35 -0
- package/features/OpenSearchField/abstractions/OpenSearchField.js +6 -0
- package/features/OpenSearchField/abstractions/OpenSearchField.js.map +1 -0
- package/features/OpenSearchField/abstractions/OpenSearchFieldFactory.d.ts +8 -0
- package/features/OpenSearchField/abstractions/OpenSearchFieldFactory.js +5 -0
- package/features/OpenSearchField/abstractions/OpenSearchFieldFactory.js.map +1 -0
- package/features/OpenSearchField/feature.d.ts +4 -0
- package/features/OpenSearchField/feature.js +11 -0
- package/features/OpenSearchField/feature.js.map +1 -0
- package/features/OpenSearchIndex/OpenSearchIndexRegistry.d.ts +12 -0
- package/features/OpenSearchIndex/OpenSearchIndexRegistry.js +30 -0
- package/features/OpenSearchIndex/OpenSearchIndexRegistry.js.map +1 -0
- package/features/OpenSearchIndex/abstractions/OpenSearchIndex.d.ts +9 -0
- package/features/OpenSearchIndex/abstractions/OpenSearchIndex.js +5 -0
- package/features/OpenSearchIndex/abstractions/OpenSearchIndex.js.map +1 -0
- package/features/OpenSearchIndex/abstractions/OpenSearchIndexRegistry.d.ts +9 -0
- package/features/OpenSearchIndex/abstractions/OpenSearchIndexRegistry.js +5 -0
- package/features/OpenSearchIndex/abstractions/OpenSearchIndexRegistry.js.map +1 -0
- package/features/OpenSearchIndex/feature.d.ts +4 -0
- package/features/OpenSearchIndex/feature.js +11 -0
- package/features/OpenSearchIndex/feature.js.map +1 -0
- package/features/OpenSearchQueryBuilderOperator/OpenSearchQueryBuilderOperatorRegistry.d.ts +12 -0
- package/features/OpenSearchQueryBuilderOperator/OpenSearchQueryBuilderOperatorRegistry.js +28 -0
- package/features/OpenSearchQueryBuilderOperator/OpenSearchQueryBuilderOperatorRegistry.js.map +1 -0
- package/features/OpenSearchQueryBuilderOperator/abstractions/OpenSearchQueryBuilderOperator.d.ts +11 -0
- package/features/OpenSearchQueryBuilderOperator/abstractions/OpenSearchQueryBuilderOperator.js +5 -0
- package/features/OpenSearchQueryBuilderOperator/abstractions/OpenSearchQueryBuilderOperator.js.map +1 -0
- package/features/OpenSearchQueryBuilderOperator/abstractions/OpenSearchQueryBuilderOperatorRegistry.d.ts +10 -0
- package/features/OpenSearchQueryBuilderOperator/abstractions/OpenSearchQueryBuilderOperatorRegistry.js +5 -0
- package/features/OpenSearchQueryBuilderOperator/abstractions/OpenSearchQueryBuilderOperatorRegistry.js.map +1 -0
- package/features/OpenSearchQueryBuilderOperator/feature.d.ts +4 -0
- package/features/OpenSearchQueryBuilderOperator/feature.js +41 -0
- package/features/OpenSearchQueryBuilderOperator/feature.js.map +1 -0
- package/features/OpenSearchQueryBuilderOperator/operators/AndIn.d.ts +9 -0
- package/features/OpenSearchQueryBuilderOperator/operators/AndIn.js +28 -0
- package/features/OpenSearchQueryBuilderOperator/operators/AndIn.js.map +1 -0
- package/features/OpenSearchQueryBuilderOperator/operators/Between.d.ts +9 -0
- package/features/OpenSearchQueryBuilderOperator/operators/Between.js +27 -0
- package/features/OpenSearchQueryBuilderOperator/operators/Between.js.map +1 -0
- package/features/OpenSearchQueryBuilderOperator/operators/Contains.d.ts +9 -0
- package/features/OpenSearchQueryBuilderOperator/operators/Contains.js +27 -0
- package/features/OpenSearchQueryBuilderOperator/operators/Contains.js.map +1 -0
- package/features/OpenSearchQueryBuilderOperator/operators/Equal.d.ts +9 -0
- package/features/OpenSearchQueryBuilderOperator/operators/Equal.js +34 -0
- package/features/OpenSearchQueryBuilderOperator/operators/Equal.js.map +1 -0
- package/features/OpenSearchQueryBuilderOperator/operators/GreaterThan.d.ts +9 -0
- package/features/OpenSearchQueryBuilderOperator/operators/GreaterThan.js +23 -0
- package/features/OpenSearchQueryBuilderOperator/operators/GreaterThan.js.map +1 -0
- package/features/OpenSearchQueryBuilderOperator/operators/GreaterThanOrEqual.d.ts +9 -0
- package/features/OpenSearchQueryBuilderOperator/operators/GreaterThanOrEqual.js +23 -0
- package/features/OpenSearchQueryBuilderOperator/operators/GreaterThanOrEqual.js.map +1 -0
- package/features/OpenSearchQueryBuilderOperator/operators/In.d.ts +9 -0
- package/features/OpenSearchQueryBuilderOperator/operators/In.js +24 -0
- package/features/OpenSearchQueryBuilderOperator/operators/In.js.map +1 -0
- package/features/OpenSearchQueryBuilderOperator/operators/LesserThan.d.ts +9 -0
- package/features/OpenSearchQueryBuilderOperator/operators/LesserThan.js +23 -0
- package/features/OpenSearchQueryBuilderOperator/operators/LesserThan.js.map +1 -0
- package/features/OpenSearchQueryBuilderOperator/operators/LesserThanOrEqual.d.ts +9 -0
- package/features/OpenSearchQueryBuilderOperator/operators/LesserThanOrEqual.js +23 -0
- package/features/OpenSearchQueryBuilderOperator/operators/LesserThanOrEqual.js.map +1 -0
- package/features/OpenSearchQueryBuilderOperator/operators/Not.d.ts +9 -0
- package/features/OpenSearchQueryBuilderOperator/operators/Not.js +38 -0
- package/features/OpenSearchQueryBuilderOperator/operators/Not.js.map +1 -0
- package/features/OpenSearchQueryBuilderOperator/operators/NotBetween.d.ts +9 -0
- package/features/OpenSearchQueryBuilderOperator/operators/NotBetween.js +27 -0
- package/features/OpenSearchQueryBuilderOperator/operators/NotBetween.js.map +1 -0
- package/features/OpenSearchQueryBuilderOperator/operators/NotContains.d.ts +9 -0
- package/features/OpenSearchQueryBuilderOperator/operators/NotContains.js +27 -0
- package/features/OpenSearchQueryBuilderOperator/operators/NotContains.js.map +1 -0
- package/features/OpenSearchQueryBuilderOperator/operators/NotIn.d.ts +9 -0
- package/features/OpenSearchQueryBuilderOperator/operators/NotIn.js +24 -0
- package/features/OpenSearchQueryBuilderOperator/operators/NotIn.js.map +1 -0
- package/features/OpenSearchQueryBuilderOperator/operators/NotStartsWith.d.ts +9 -0
- package/features/OpenSearchQueryBuilderOperator/operators/NotStartsWith.js +22 -0
- package/features/OpenSearchQueryBuilderOperator/operators/NotStartsWith.js.map +1 -0
- package/features/OpenSearchQueryBuilderOperator/operators/StartsWith.d.ts +9 -0
- package/features/OpenSearchQueryBuilderOperator/operators/StartsWith.js +22 -0
- package/features/OpenSearchQueryBuilderOperator/operators/StartsWith.js.map +1 -0
- package/index.d.ts +2 -10
- package/index.js +3 -30
- package/indexConfiguration/base.js +25 -26
- package/indexConfiguration/base.js.map +1 -1
- package/indexConfiguration/common.js +39 -41
- package/indexConfiguration/common.js.map +1 -1
- package/indexConfiguration/index.js +0 -2
- package/indexPrefix.js +2 -3
- package/indexPrefix.js.map +1 -1
- package/indices.d.ts +2 -8
- package/indices.js +1 -20
- package/limit.js +5 -27
- package/limit.js.map +1 -1
- package/normalize.js +50 -49
- package/normalize.js.map +1 -1
- package/operations/OpenSearchCatHealth.js +24 -25
- package/operations/OpenSearchCatHealth.js.map +1 -1
- package/operations/OpenSearchCatNodes.js +22 -23
- package/operations/OpenSearchCatNodes.js.map +1 -1
- package/operations/index.js +0 -2
- package/operations/stripConnectionFromException.js +11 -14
- package/operations/stripConnectionFromException.js.map +1 -1
- package/operations/types.js +6 -5
- package/operations/types.js.map +1 -1
- package/package.json +12 -14
- package/registerOpenSearchCore.d.ts +3 -0
- package/registerOpenSearchCore.js +20 -0
- package/registerOpenSearchCore.js.map +1 -0
- package/sharedIndex.js +2 -3
- package/sharedIndex.js.map +1 -1
- package/sort.d.ts +2 -2
- package/sort.js +30 -59
- package/sort.js.map +1 -1
- package/testing/createBlankQuery.d.ts +2 -0
- package/testing/createBlankQuery.js +9 -0
- package/testing/createBlankQuery.js.map +1 -0
- package/testing/createTestOpenSearchClient.d.ts +11 -0
- package/testing/createTestOpenSearchClient.js +162 -0
- package/testing/createTestOpenSearchClient.js.map +1 -0
- package/testing/index.d.ts +4 -0
- package/testing/index.js +4 -0
- package/testing/registerOpenSearchCoreForTests.d.ts +1 -0
- package/testing/registerOpenSearchCoreForTests.js +9 -0
- package/testing/registerOpenSearchCoreForTests.js.map +1 -0
- package/testing/setupTestIndexManager.d.ts +13 -0
- package/testing/setupTestIndexManager.js +26 -0
- package/testing/setupTestIndexManager.js.map +1 -0
- package/types.d.ts +0 -8
- package/types.js +5 -65
- package/types.js.map +1 -1
- package/utils/createIndex.d.ts +2 -2
- package/utils/createIndex.js +52 -80
- package/utils/createIndex.js.map +1 -1
- package/utils/index.js +0 -2
- package/utils/waitUntilHealthy/UnhealthyClusterError.js +8 -7
- package/utils/waitUntilHealthy/UnhealthyClusterError.js.map +1 -1
- package/utils/waitUntilHealthy/WaitUntilHealthy.js +111 -141
- package/utils/waitUntilHealthy/WaitUntilHealthy.js.map +1 -1
- package/utils/waitUntilHealthy/WaitingHealthyClusterAbortedError.js +8 -7
- package/utils/waitUntilHealthy/WaitingHealthyClusterAbortedError.js.map +1 -1
- package/utils/waitUntilHealthy/index.js +0 -2
- package/utils/waitUntilHealthy/reason/ClusterHealthReason.js +9 -10
- package/utils/waitUntilHealthy/reason/ClusterHealthReason.js.map +1 -1
- package/utils/waitUntilHealthy/reason/IReason.js +0 -3
- package/utils/waitUntilHealthy/reason/MemoryReason.js +9 -10
- package/utils/waitUntilHealthy/reason/MemoryReason.js.map +1 -1
- package/utils/waitUntilHealthy/reason/ProcessorReason.js +9 -10
- package/utils/waitUntilHealthy/reason/ProcessorReason.js.map +1 -1
- package/utils/waitUntilHealthy/reason/index.js +0 -2
- package/where.d.ts +4 -4
- package/where.js +43 -76
- package/where.js.map +1 -1
- package/db/entity.d.ts +0 -7
- package/db/entity.js +0 -20
- package/db/entity.js.map +0 -1
- package/db/index.d.ts +0 -3
- package/db/index.js +0 -5
- package/db/index.js.map +0 -1
- package/db/table.d.ts +0 -7
- package/db/table.js +0 -17
- package/db/table.js.map +0 -1
- package/db/types.d.ts +0 -6
- package/db/types.js +0 -3
- package/db/types.js.map +0 -1
- package/exports/api/opensearch.js.map +0 -1
- package/features/OpenSearchClient/OpenSearchClient.d.ts +0 -12
- package/features/OpenSearchClient/OpenSearchClient.js +0 -16
- package/features/OpenSearchClient/OpenSearchClient.js.map +0 -1
- package/features/OpenSearchContext/OpenSearchContext.d.ts +0 -8
- package/features/OpenSearchContext/OpenSearchContext.js +0 -13
- package/features/OpenSearchContext/OpenSearchContext.js.map +0 -1
- package/features/OpenSearchContext/abstraction.d.ts +0 -14
- package/features/OpenSearchContext/abstraction.js +0 -4
- package/features/OpenSearchContext/abstraction.js.map +0 -1
- package/features/OpenSearchContext/feature.d.ts +0 -5
- package/features/OpenSearchContext/feature.js +0 -13
- package/features/OpenSearchContext/feature.js.map +0 -1
- package/index.js.map +0 -1
- package/indexConfiguration/index.js.map +0 -1
- package/indices.js.map +0 -1
- package/operations/index.js.map +0 -1
- package/operators.d.ts +0 -6
- package/operators.js +0 -9
- package/operators.js.map +0 -1
- package/plugins/definition/OpenSearchBodyModifierPlugin.d.ts +0 -13
- package/plugins/definition/OpenSearchBodyModifierPlugin.js +0 -18
- package/plugins/definition/OpenSearchBodyModifierPlugin.js.map +0 -1
- package/plugins/definition/OpenSearchFieldPlugin.d.ts +0 -81
- package/plugins/definition/OpenSearchFieldPlugin.js +0 -69
- package/plugins/definition/OpenSearchFieldPlugin.js.map +0 -1
- package/plugins/definition/OpenSearchIndexPlugin.d.ts +0 -10
- package/plugins/definition/OpenSearchIndexPlugin.js +0 -17
- package/plugins/definition/OpenSearchIndexPlugin.js.map +0 -1
- package/plugins/definition/OpenSearchQueryBuilderOperatorPlugin.d.ts +0 -10
- package/plugins/definition/OpenSearchQueryBuilderOperatorPlugin.js +0 -9
- package/plugins/definition/OpenSearchQueryBuilderOperatorPlugin.js.map +0 -1
- package/plugins/definition/OpenSearchQueryModifierPlugin.d.ts +0 -14
- package/plugins/definition/OpenSearchQueryModifierPlugin.js +0 -18
- package/plugins/definition/OpenSearchQueryModifierPlugin.js.map +0 -1
- package/plugins/definition/OpenSearchSortModifierPlugin.d.ts +0 -13
- package/plugins/definition/OpenSearchSortModifierPlugin.js +0 -18
- package/plugins/definition/OpenSearchSortModifierPlugin.js.map +0 -1
- package/plugins/definition/index.d.ts +0 -6
- package/plugins/definition/index.js +0 -8
- package/plugins/definition/index.js.map +0 -1
- package/plugins/index.d.ts +0 -2
- package/plugins/index.js +0 -4
- package/plugins/index.js.map +0 -1
- package/plugins/operator/andIn.d.ts +0 -7
- package/plugins/operator/andIn.js +0 -35
- package/plugins/operator/andIn.js.map +0 -1
- package/plugins/operator/between.d.ts +0 -7
- package/plugins/operator/between.js +0 -32
- package/plugins/operator/between.js.map +0 -1
- package/plugins/operator/contains.d.ts +0 -7
- package/plugins/operator/contains.js +0 -24
- package/plugins/operator/contains.js.map +0 -1
- package/plugins/operator/equal.d.ts +0 -7
- package/plugins/operator/equal.js +0 -50
- package/plugins/operator/equal.js.map +0 -1
- package/plugins/operator/gt.d.ts +0 -7
- package/plugins/operator/gt.js +0 -22
- package/plugins/operator/gt.js.map +0 -1
- package/plugins/operator/gte.d.ts +0 -7
- package/plugins/operator/gte.js +0 -22
- package/plugins/operator/gte.js.map +0 -1
- package/plugins/operator/in.d.ts +0 -7
- package/plugins/operator/in.js +0 -29
- package/plugins/operator/in.js.map +0 -1
- package/plugins/operator/index.d.ts +0 -15
- package/plugins/operator/index.js +0 -17
- package/plugins/operator/index.js.map +0 -1
- package/plugins/operator/lt.d.ts +0 -7
- package/plugins/operator/lt.js +0 -22
- package/plugins/operator/lt.js.map +0 -1
- package/plugins/operator/lte.d.ts +0 -7
- package/plugins/operator/lte.js +0 -22
- package/plugins/operator/lte.js.map +0 -1
- package/plugins/operator/not.d.ts +0 -7
- package/plugins/operator/not.js +0 -44
- package/plugins/operator/not.js.map +0 -1
- package/plugins/operator/notBetween.d.ts +0 -7
- package/plugins/operator/notBetween.js +0 -32
- package/plugins/operator/notBetween.js.map +0 -1
- package/plugins/operator/notContains.d.ts +0 -7
- package/plugins/operator/notContains.js +0 -24
- package/plugins/operator/notContains.js.map +0 -1
- package/plugins/operator/notIn.d.ts +0 -7
- package/plugins/operator/notIn.js +0 -27
- package/plugins/operator/notIn.js.map +0 -1
- package/plugins/operator/notStartsWith.d.ts +0 -7
- package/plugins/operator/notStartsWith.js +0 -23
- package/plugins/operator/notStartsWith.js.map +0 -1
- package/plugins/operator/startsWith.d.ts +0 -7
- package/plugins/operator/startsWith.js +0 -23
- package/plugins/operator/startsWith.js.map +0 -1
- package/utils/index.js.map +0 -1
- package/utils/waitUntilHealthy/index.js.map +0 -1
- package/utils/waitUntilHealthy/reason/IReason.js.map +0 -1
- package/utils/waitUntilHealthy/reason/index.js.map +0 -1
package/plugins/operator/in.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { OpenSearchQueryBuilderOperatorPlugin } from "../../plugins/definition/OpenSearchQueryBuilderOperatorPlugin.js";
|
|
2
|
-
import type { OpenSearchBoolQueryConfig, OpenSearchQueryBuilderArgsPlugin } from "../../types.js";
|
|
3
|
-
export declare class OpenSearchQueryBuilderOperatorInPlugin extends OpenSearchQueryBuilderOperatorPlugin {
|
|
4
|
-
name: string;
|
|
5
|
-
getOperator(): string;
|
|
6
|
-
apply(query: OpenSearchBoolQueryConfig, params: OpenSearchQueryBuilderArgsPlugin): void;
|
|
7
|
-
}
|
package/plugins/operator/in.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { OpenSearchQueryBuilderOperatorPlugin } from "../definition/OpenSearchQueryBuilderOperatorPlugin.js";
|
|
2
|
-
export class OpenSearchQueryBuilderOperatorInPlugin extends OpenSearchQueryBuilderOperatorPlugin {
|
|
3
|
-
name = "opensearch.queryBuilder.operator.in.default";
|
|
4
|
-
getOperator() {
|
|
5
|
-
return "in";
|
|
6
|
-
}
|
|
7
|
-
apply(query, params) {
|
|
8
|
-
const {
|
|
9
|
-
value: values,
|
|
10
|
-
path,
|
|
11
|
-
basePath,
|
|
12
|
-
name
|
|
13
|
-
} = params;
|
|
14
|
-
const isArray = Array.isArray(values);
|
|
15
|
-
if (isArray === false || values.length === 0) {
|
|
16
|
-
throw new Error(`You cannot filter field "${name}" with "in" operator and not send an array of values.`);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// Only use ".keyword" if all of the provided values are strings.
|
|
20
|
-
const useBasePath = values.some(value => typeof value !== "string");
|
|
21
|
-
query.filter.push({
|
|
22
|
-
terms: {
|
|
23
|
-
[useBasePath ? basePath : path]: values
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
//# sourceMappingURL=in.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["OpenSearchQueryBuilderOperatorPlugin","OpenSearchQueryBuilderOperatorInPlugin","name","getOperator","apply","query","params","value","values","path","basePath","isArray","Array","length","Error","useBasePath","some","filter","push","terms"],"sources":["in.ts"],"sourcesContent":["import { OpenSearchQueryBuilderOperatorPlugin } from \"~/plugins/definition/OpenSearchQueryBuilderOperatorPlugin.js\";\nimport type { OpenSearchBoolQueryConfig, OpenSearchQueryBuilderArgsPlugin } from \"~/types.js\";\n\nexport class OpenSearchQueryBuilderOperatorInPlugin extends OpenSearchQueryBuilderOperatorPlugin {\n public override name = \"opensearch.queryBuilder.operator.in.default\";\n\n public getOperator(): string {\n return \"in\";\n }\n\n public apply(query: OpenSearchBoolQueryConfig, params: OpenSearchQueryBuilderArgsPlugin): void {\n const { value: values, path, basePath, name } = params;\n const isArray = Array.isArray(values);\n if (isArray === false || values.length === 0) {\n throw new Error(\n `You cannot filter field \"${name}\" with \"in\" operator and not send an array of values.`\n );\n }\n\n // Only use \".keyword\" if all of the provided values are strings.\n const useBasePath = values.some(\n (value: string | number | boolean | null | undefined) => typeof value !== \"string\"\n );\n\n query.filter.push({\n terms: {\n [useBasePath ? basePath : path]: values\n }\n });\n }\n}\n"],"mappings":"AAAA,SAASA,oCAAoC;AAG7C,OAAO,MAAMC,sCAAsC,SAASD,oCAAoC,CAAC;EAC7EE,IAAI,GAAG,6CAA6C;EAE7DC,WAAWA,CAAA,EAAW;IACzB,OAAO,IAAI;EACf;EAEOC,KAAKA,CAACC,KAAgC,EAAEC,MAAwC,EAAQ;IAC3F,MAAM;MAAEC,KAAK,EAAEC,MAAM;MAAEC,IAAI;MAAEC,QAAQ;MAAER;IAAK,CAAC,GAAGI,MAAM;IACtD,MAAMK,OAAO,GAAGC,KAAK,CAACD,OAAO,CAACH,MAAM,CAAC;IACrC,IAAIG,OAAO,KAAK,KAAK,IAAIH,MAAM,CAACK,MAAM,KAAK,CAAC,EAAE;MAC1C,MAAM,IAAIC,KAAK,CACX,4BAA4BZ,IAAI,uDACpC,CAAC;IACL;;IAEA;IACA,MAAMa,WAAW,GAAGP,MAAM,CAACQ,IAAI,CAC1BT,KAAmD,IAAK,OAAOA,KAAK,KAAK,QAC9E,CAAC;IAEDF,KAAK,CAACY,MAAM,CAACC,IAAI,CAAC;MACdC,KAAK,EAAE;QACH,CAACJ,WAAW,GAAGL,QAAQ,GAAGD,IAAI,GAAGD;MACrC;IACJ,CAAC,CAAC;EACN;AACJ","ignoreList":[]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export * from "./between.js";
|
|
2
|
-
export * from "./contains.js";
|
|
3
|
-
export * from "./equal.js";
|
|
4
|
-
export * from "./gt.js";
|
|
5
|
-
export * from "./gte.js";
|
|
6
|
-
export * from "./andIn.js";
|
|
7
|
-
export * from "./in.js";
|
|
8
|
-
export * from "./lt.js";
|
|
9
|
-
export * from "./lte.js";
|
|
10
|
-
export * from "./not.js";
|
|
11
|
-
export * from "./notBetween.js";
|
|
12
|
-
export * from "./notContains.js";
|
|
13
|
-
export * from "./notIn.js";
|
|
14
|
-
export * from "./startsWith.js";
|
|
15
|
-
export * from "./notStartsWith.js";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export * from "./between.js";
|
|
2
|
-
export * from "./contains.js";
|
|
3
|
-
export * from "./equal.js";
|
|
4
|
-
export * from "./gt.js";
|
|
5
|
-
export * from "./gte.js";
|
|
6
|
-
export * from "./andIn.js";
|
|
7
|
-
export * from "./in.js";
|
|
8
|
-
export * from "./lt.js";
|
|
9
|
-
export * from "./lte.js";
|
|
10
|
-
export * from "./not.js";
|
|
11
|
-
export * from "./notBetween.js";
|
|
12
|
-
export * from "./notContains.js";
|
|
13
|
-
export * from "./notIn.js";
|
|
14
|
-
export * from "./startsWith.js";
|
|
15
|
-
export * from "./notStartsWith.js";
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./between.js\";\nexport * from \"./contains.js\";\nexport * from \"./equal.js\";\nexport * from \"./gt.js\";\nexport * from \"./gte.js\";\nexport * from \"./andIn.js\";\nexport * from \"./in.js\";\nexport * from \"./lt.js\";\nexport * from \"./lte.js\";\nexport * from \"./not.js\";\nexport * from \"./notBetween.js\";\nexport * from \"./notContains.js\";\nexport * from \"./notIn.js\";\nexport * from \"./startsWith.js\";\nexport * from \"./notStartsWith.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
package/plugins/operator/lt.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { OpenSearchQueryBuilderOperatorPlugin } from "../../plugins/definition/OpenSearchQueryBuilderOperatorPlugin.js";
|
|
2
|
-
import type { OpenSearchBoolQueryConfig, OpenSearchQueryBuilderArgsPlugin } from "../../types.js";
|
|
3
|
-
export declare class OpenSearchQueryBuilderOperatorLesserThanPlugin extends OpenSearchQueryBuilderOperatorPlugin {
|
|
4
|
-
name: string;
|
|
5
|
-
getOperator(): string;
|
|
6
|
-
apply(query: OpenSearchBoolQueryConfig, params: OpenSearchQueryBuilderArgsPlugin): void;
|
|
7
|
-
}
|
package/plugins/operator/lt.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { OpenSearchQueryBuilderOperatorPlugin } from "../definition/OpenSearchQueryBuilderOperatorPlugin.js";
|
|
2
|
-
export class OpenSearchQueryBuilderOperatorLesserThanPlugin extends OpenSearchQueryBuilderOperatorPlugin {
|
|
3
|
-
name = "opensearch.queryBuilder.operator.lesserThan.default";
|
|
4
|
-
getOperator() {
|
|
5
|
-
return "lt";
|
|
6
|
-
}
|
|
7
|
-
apply(query, params) {
|
|
8
|
-
const {
|
|
9
|
-
value,
|
|
10
|
-
basePath
|
|
11
|
-
} = params;
|
|
12
|
-
query.filter.push({
|
|
13
|
-
range: {
|
|
14
|
-
[basePath]: {
|
|
15
|
-
lt: value
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
//# sourceMappingURL=lt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["OpenSearchQueryBuilderOperatorPlugin","OpenSearchQueryBuilderOperatorLesserThanPlugin","name","getOperator","apply","query","params","value","basePath","filter","push","range","lt"],"sources":["lt.ts"],"sourcesContent":["import { OpenSearchQueryBuilderOperatorPlugin } from \"~/plugins/definition/OpenSearchQueryBuilderOperatorPlugin.js\";\nimport type { OpenSearchBoolQueryConfig, OpenSearchQueryBuilderArgsPlugin } from \"~/types.js\";\n\nexport class OpenSearchQueryBuilderOperatorLesserThanPlugin extends OpenSearchQueryBuilderOperatorPlugin {\n public override name = \"opensearch.queryBuilder.operator.lesserThan.default\";\n\n public getOperator(): string {\n return \"lt\";\n }\n\n public apply(query: OpenSearchBoolQueryConfig, params: OpenSearchQueryBuilderArgsPlugin): void {\n const { value, basePath } = params;\n query.filter.push({\n range: {\n [basePath]: {\n lt: value\n }\n }\n });\n }\n}\n"],"mappings":"AAAA,SAASA,oCAAoC;AAG7C,OAAO,MAAMC,8CAA8C,SAASD,oCAAoC,CAAC;EACrFE,IAAI,GAAG,qDAAqD;EAErEC,WAAWA,CAAA,EAAW;IACzB,OAAO,IAAI;EACf;EAEOC,KAAKA,CAACC,KAAgC,EAAEC,MAAwC,EAAQ;IAC3F,MAAM;MAAEC,KAAK;MAAEC;IAAS,CAAC,GAAGF,MAAM;IAClCD,KAAK,CAACI,MAAM,CAACC,IAAI,CAAC;MACdC,KAAK,EAAE;QACH,CAACH,QAAQ,GAAG;UACRI,EAAE,EAAEL;QACR;MACJ;IACJ,CAAC,CAAC;EACN;AACJ","ignoreList":[]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { OpenSearchQueryBuilderOperatorPlugin } from "../../plugins/definition/OpenSearchQueryBuilderOperatorPlugin.js";
|
|
2
|
-
import type { OpenSearchBoolQueryConfig, OpenSearchQueryBuilderArgsPlugin } from "../../types.js";
|
|
3
|
-
export declare class OpenSearchQueryBuilderOperatorLesserThanOrEqualToPlugin extends OpenSearchQueryBuilderOperatorPlugin {
|
|
4
|
-
name: string;
|
|
5
|
-
getOperator(): string;
|
|
6
|
-
apply(query: OpenSearchBoolQueryConfig, params: OpenSearchQueryBuilderArgsPlugin): void;
|
|
7
|
-
}
|
package/plugins/operator/lte.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { OpenSearchQueryBuilderOperatorPlugin } from "../definition/OpenSearchQueryBuilderOperatorPlugin.js";
|
|
2
|
-
export class OpenSearchQueryBuilderOperatorLesserThanOrEqualToPlugin extends OpenSearchQueryBuilderOperatorPlugin {
|
|
3
|
-
name = "opensearch.queryBuilder.operator.lesserThanOrEqualTo.default";
|
|
4
|
-
getOperator() {
|
|
5
|
-
return "lte";
|
|
6
|
-
}
|
|
7
|
-
apply(query, params) {
|
|
8
|
-
const {
|
|
9
|
-
value,
|
|
10
|
-
basePath
|
|
11
|
-
} = params;
|
|
12
|
-
query.filter.push({
|
|
13
|
-
range: {
|
|
14
|
-
[basePath]: {
|
|
15
|
-
lte: value
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
//# sourceMappingURL=lte.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["OpenSearchQueryBuilderOperatorPlugin","OpenSearchQueryBuilderOperatorLesserThanOrEqualToPlugin","name","getOperator","apply","query","params","value","basePath","filter","push","range","lte"],"sources":["lte.ts"],"sourcesContent":["import { OpenSearchQueryBuilderOperatorPlugin } from \"~/plugins/definition/OpenSearchQueryBuilderOperatorPlugin.js\";\nimport type { OpenSearchBoolQueryConfig, OpenSearchQueryBuilderArgsPlugin } from \"~/types.js\";\n\nexport class OpenSearchQueryBuilderOperatorLesserThanOrEqualToPlugin extends OpenSearchQueryBuilderOperatorPlugin {\n public override name = \"opensearch.queryBuilder.operator.lesserThanOrEqualTo.default\";\n\n public getOperator(): string {\n return \"lte\";\n }\n\n public apply(query: OpenSearchBoolQueryConfig, params: OpenSearchQueryBuilderArgsPlugin): void {\n const { value, basePath } = params;\n query.filter.push({\n range: {\n [basePath]: {\n lte: value\n }\n }\n });\n }\n}\n"],"mappings":"AAAA,SAASA,oCAAoC;AAG7C,OAAO,MAAMC,uDAAuD,SAASD,oCAAoC,CAAC;EAC9FE,IAAI,GAAG,8DAA8D;EAE9EC,WAAWA,CAAA,EAAW;IACzB,OAAO,KAAK;EAChB;EAEOC,KAAKA,CAACC,KAAgC,EAAEC,MAAwC,EAAQ;IAC3F,MAAM;MAAEC,KAAK;MAAEC;IAAS,CAAC,GAAGF,MAAM;IAClCD,KAAK,CAACI,MAAM,CAACC,IAAI,CAAC;MACdC,KAAK,EAAE;QACH,CAACH,QAAQ,GAAG;UACRI,GAAG,EAAEL;QACT;MACJ;IACJ,CAAC,CAAC;EACN;AACJ","ignoreList":[]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { OpenSearchQueryBuilderOperatorPlugin } from "../../plugins/definition/OpenSearchQueryBuilderOperatorPlugin.js";
|
|
2
|
-
import type { OpenSearchBoolQueryConfig, OpenSearchQueryBuilderArgsPlugin } from "../../types.js";
|
|
3
|
-
export declare class OpenSearchQueryBuilderOperatorNotPlugin extends OpenSearchQueryBuilderOperatorPlugin {
|
|
4
|
-
name: string;
|
|
5
|
-
getOperator(): string;
|
|
6
|
-
apply(query: OpenSearchBoolQueryConfig, params: OpenSearchQueryBuilderArgsPlugin): void;
|
|
7
|
-
}
|
package/plugins/operator/not.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { OpenSearchQueryBuilderOperatorPlugin } from "../definition/OpenSearchQueryBuilderOperatorPlugin.js";
|
|
2
|
-
export class OpenSearchQueryBuilderOperatorNotPlugin extends OpenSearchQueryBuilderOperatorPlugin {
|
|
3
|
-
name = "opensearch.queryBuilder.operator.not.default";
|
|
4
|
-
getOperator() {
|
|
5
|
-
return "not";
|
|
6
|
-
}
|
|
7
|
-
apply(query, params) {
|
|
8
|
-
const {
|
|
9
|
-
value,
|
|
10
|
-
path,
|
|
11
|
-
basePath
|
|
12
|
-
} = params;
|
|
13
|
-
if (value === null || value === undefined) {
|
|
14
|
-
query.filter.push({
|
|
15
|
-
exists: {
|
|
16
|
-
field: path
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
const typeOf = typeof value;
|
|
22
|
-
if (typeOf === "boolean") {
|
|
23
|
-
query.filter.push({
|
|
24
|
-
bool: {
|
|
25
|
-
must_not: {
|
|
26
|
-
term: {
|
|
27
|
-
[path]: value
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
const useBasePath = typeOf !== "string";
|
|
35
|
-
const valuePath = useBasePath ? basePath : path;
|
|
36
|
-
query.must_not.push({
|
|
37
|
-
term: {
|
|
38
|
-
[valuePath]: value
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
//# sourceMappingURL=not.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["OpenSearchQueryBuilderOperatorPlugin","OpenSearchQueryBuilderOperatorNotPlugin","name","getOperator","apply","query","params","value","path","basePath","undefined","filter","push","exists","field","typeOf","bool","must_not","term","useBasePath","valuePath"],"sources":["not.ts"],"sourcesContent":["import { OpenSearchQueryBuilderOperatorPlugin } from \"~/plugins/definition/OpenSearchQueryBuilderOperatorPlugin.js\";\nimport type { OpenSearchBoolQueryConfig, OpenSearchQueryBuilderArgsPlugin } from \"~/types.js\";\n\nexport class OpenSearchQueryBuilderOperatorNotPlugin extends OpenSearchQueryBuilderOperatorPlugin {\n public override name = \"opensearch.queryBuilder.operator.not.default\";\n\n public getOperator(): string {\n return \"not\";\n }\n\n public apply(query: OpenSearchBoolQueryConfig, params: OpenSearchQueryBuilderArgsPlugin): void {\n const { value, path, basePath } = params;\n\n if (value === null || value === undefined) {\n query.filter.push({\n exists: {\n field: path\n }\n });\n return;\n }\n\n const typeOf = typeof value;\n\n if (typeOf === \"boolean\") {\n query.filter.push({\n bool: {\n must_not: {\n term: {\n [path]: value\n }\n }\n }\n });\n return;\n }\n\n const useBasePath = typeOf !== \"string\";\n const valuePath = useBasePath ? basePath : path;\n query.must_not.push({\n term: {\n [valuePath]: value\n }\n });\n }\n}\n"],"mappings":"AAAA,SAASA,oCAAoC;AAG7C,OAAO,MAAMC,uCAAuC,SAASD,oCAAoC,CAAC;EAC9EE,IAAI,GAAG,8CAA8C;EAE9DC,WAAWA,CAAA,EAAW;IACzB,OAAO,KAAK;EAChB;EAEOC,KAAKA,CAACC,KAAgC,EAAEC,MAAwC,EAAQ;IAC3F,MAAM;MAAEC,KAAK;MAAEC,IAAI;MAAEC;IAAS,CAAC,GAAGH,MAAM;IAExC,IAAIC,KAAK,KAAK,IAAI,IAAIA,KAAK,KAAKG,SAAS,EAAE;MACvCL,KAAK,CAACM,MAAM,CAACC,IAAI,CAAC;QACdC,MAAM,EAAE;UACJC,KAAK,EAAEN;QACX;MACJ,CAAC,CAAC;MACF;IACJ;IAEA,MAAMO,MAAM,GAAG,OAAOR,KAAK;IAE3B,IAAIQ,MAAM,KAAK,SAAS,EAAE;MACtBV,KAAK,CAACM,MAAM,CAACC,IAAI,CAAC;QACdI,IAAI,EAAE;UACFC,QAAQ,EAAE;YACNC,IAAI,EAAE;cACF,CAACV,IAAI,GAAGD;YACZ;UACJ;QACJ;MACJ,CAAC,CAAC;MACF;IACJ;IAEA,MAAMY,WAAW,GAAGJ,MAAM,KAAK,QAAQ;IACvC,MAAMK,SAAS,GAAGD,WAAW,GAAGV,QAAQ,GAAGD,IAAI;IAC/CH,KAAK,CAACY,QAAQ,CAACL,IAAI,CAAC;MAChBM,IAAI,EAAE;QACF,CAACE,SAAS,GAAGb;MACjB;IACJ,CAAC,CAAC;EACN;AACJ","ignoreList":[]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { OpenSearchQueryBuilderOperatorPlugin } from "../../plugins/definition/OpenSearchQueryBuilderOperatorPlugin.js";
|
|
2
|
-
import type { OpenSearchBoolQueryConfig, OpenSearchQueryBuilderArgsPlugin } from "../../types.js";
|
|
3
|
-
export declare class OpenSearchQueryBuilderOperatorNotBetweenPlugin extends OpenSearchQueryBuilderOperatorPlugin {
|
|
4
|
-
name: string;
|
|
5
|
-
getOperator(): string;
|
|
6
|
-
apply(query: OpenSearchBoolQueryConfig, params: OpenSearchQueryBuilderArgsPlugin): void;
|
|
7
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { OpenSearchQueryBuilderOperatorPlugin } from "../definition/OpenSearchQueryBuilderOperatorPlugin.js";
|
|
2
|
-
export class OpenSearchQueryBuilderOperatorNotBetweenPlugin extends OpenSearchQueryBuilderOperatorPlugin {
|
|
3
|
-
name = "opensearch.queryBuilder.operator.notBetween.default";
|
|
4
|
-
getOperator() {
|
|
5
|
-
return "not_between";
|
|
6
|
-
}
|
|
7
|
-
apply(query, params) {
|
|
8
|
-
const {
|
|
9
|
-
value,
|
|
10
|
-
basePath,
|
|
11
|
-
name
|
|
12
|
-
} = params;
|
|
13
|
-
if (Array.isArray(value) === false) {
|
|
14
|
-
throw new Error(`You cannot filter field path "${name}" with "not_between" query and not send an array of values.`);
|
|
15
|
-
} else if (value.length !== 2) {
|
|
16
|
-
throw new Error(`You must pass 2 values in the array for field path "${name}" filtering.`);
|
|
17
|
-
}
|
|
18
|
-
// we take gte first because it should be a lesser value than lte, eg [5, 10]
|
|
19
|
-
// 6 >= gte && 6 <= lte === true which in this case it means that record will not match
|
|
20
|
-
const [gte, lte] = value;
|
|
21
|
-
query.must_not.push({
|
|
22
|
-
range: {
|
|
23
|
-
[basePath]: {
|
|
24
|
-
lte,
|
|
25
|
-
gte
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
//# sourceMappingURL=notBetween.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["OpenSearchQueryBuilderOperatorPlugin","OpenSearchQueryBuilderOperatorNotBetweenPlugin","name","getOperator","apply","query","params","value","basePath","Array","isArray","Error","length","gte","lte","must_not","push","range"],"sources":["notBetween.ts"],"sourcesContent":["import { OpenSearchQueryBuilderOperatorPlugin } from \"~/plugins/definition/OpenSearchQueryBuilderOperatorPlugin.js\";\nimport type { OpenSearchBoolQueryConfig, OpenSearchQueryBuilderArgsPlugin } from \"~/types.js\";\n\nexport class OpenSearchQueryBuilderOperatorNotBetweenPlugin extends OpenSearchQueryBuilderOperatorPlugin {\n public override name = \"opensearch.queryBuilder.operator.notBetween.default\";\n\n public getOperator(): string {\n return \"not_between\";\n }\n\n public apply(query: OpenSearchBoolQueryConfig, params: OpenSearchQueryBuilderArgsPlugin): void {\n const { value, basePath, name } = params;\n if (Array.isArray(value) === false) {\n throw new Error(\n `You cannot filter field path \"${name}\" with \"not_between\" query and not send an array of values.`\n );\n } else if (value.length !== 2) {\n throw new Error(\n `You must pass 2 values in the array for field path \"${name}\" filtering.`\n );\n }\n // we take gte first because it should be a lesser value than lte, eg [5, 10]\n // 6 >= gte && 6 <= lte === true which in this case it means that record will not match\n const [gte, lte] = value;\n query.must_not.push({\n range: {\n [basePath]: {\n lte,\n gte\n }\n }\n });\n }\n}\n"],"mappings":"AAAA,SAASA,oCAAoC;AAG7C,OAAO,MAAMC,8CAA8C,SAASD,oCAAoC,CAAC;EACrFE,IAAI,GAAG,qDAAqD;EAErEC,WAAWA,CAAA,EAAW;IACzB,OAAO,aAAa;EACxB;EAEOC,KAAKA,CAACC,KAAgC,EAAEC,MAAwC,EAAQ;IAC3F,MAAM;MAAEC,KAAK;MAAEC,QAAQ;MAAEN;IAAK,CAAC,GAAGI,MAAM;IACxC,IAAIG,KAAK,CAACC,OAAO,CAACH,KAAK,CAAC,KAAK,KAAK,EAAE;MAChC,MAAM,IAAII,KAAK,CACX,iCAAiCT,IAAI,6DACzC,CAAC;IACL,CAAC,MAAM,IAAIK,KAAK,CAACK,MAAM,KAAK,CAAC,EAAE;MAC3B,MAAM,IAAID,KAAK,CACX,uDAAuDT,IAAI,cAC/D,CAAC;IACL;IACA;IACA;IACA,MAAM,CAACW,GAAG,EAAEC,GAAG,CAAC,GAAGP,KAAK;IACxBF,KAAK,CAACU,QAAQ,CAACC,IAAI,CAAC;MAChBC,KAAK,EAAE;QACH,CAACT,QAAQ,GAAG;UACRM,GAAG;UACHD;QACJ;MACJ;IACJ,CAAC,CAAC;EACN;AACJ","ignoreList":[]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { OpenSearchQueryBuilderOperatorPlugin } from "../../plugins/definition/OpenSearchQueryBuilderOperatorPlugin.js";
|
|
2
|
-
import type { OpenSearchBoolQueryConfig, OpenSearchQueryBuilderArgsPlugin } from "../../types.js";
|
|
3
|
-
export declare class OpenSearchQueryBuilderOperatorNotContainsPlugin extends OpenSearchQueryBuilderOperatorPlugin {
|
|
4
|
-
name: string;
|
|
5
|
-
getOperator(): string;
|
|
6
|
-
apply(query: OpenSearchBoolQueryConfig, params: OpenSearchQueryBuilderArgsPlugin): void;
|
|
7
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { OpenSearchQueryBuilderOperatorPlugin } from "../definition/OpenSearchQueryBuilderOperatorPlugin.js";
|
|
2
|
-
import { normalizeValueWithAsterisk } from "../../normalize.js";
|
|
3
|
-
export class OpenSearchQueryBuilderOperatorNotContainsPlugin extends OpenSearchQueryBuilderOperatorPlugin {
|
|
4
|
-
name = "opensearch.queryBuilder.operator.notContains.default";
|
|
5
|
-
getOperator() {
|
|
6
|
-
return "not_contains";
|
|
7
|
-
}
|
|
8
|
-
apply(query, params) {
|
|
9
|
-
const {
|
|
10
|
-
value,
|
|
11
|
-
basePath
|
|
12
|
-
} = params;
|
|
13
|
-
query.must_not.push({
|
|
14
|
-
query_string: {
|
|
15
|
-
allow_leading_wildcard: true,
|
|
16
|
-
fields: [basePath],
|
|
17
|
-
query: normalizeValueWithAsterisk(value),
|
|
18
|
-
default_operator: "and"
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
//# sourceMappingURL=notContains.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["OpenSearchQueryBuilderOperatorPlugin","normalizeValueWithAsterisk","OpenSearchQueryBuilderOperatorNotContainsPlugin","name","getOperator","apply","query","params","value","basePath","must_not","push","query_string","allow_leading_wildcard","fields","default_operator"],"sources":["notContains.ts"],"sourcesContent":["import { OpenSearchQueryBuilderOperatorPlugin } from \"~/plugins/definition/OpenSearchQueryBuilderOperatorPlugin.js\";\nimport { normalizeValueWithAsterisk } from \"~/normalize.js\";\nimport type { OpenSearchBoolQueryConfig, OpenSearchQueryBuilderArgsPlugin } from \"~/types.js\";\n\nexport class OpenSearchQueryBuilderOperatorNotContainsPlugin extends OpenSearchQueryBuilderOperatorPlugin {\n public override name = \"opensearch.queryBuilder.operator.notContains.default\";\n\n public getOperator(): string {\n return \"not_contains\";\n }\n\n public apply(query: OpenSearchBoolQueryConfig, params: OpenSearchQueryBuilderArgsPlugin): void {\n const { value, basePath } = params;\n query.must_not.push({\n query_string: {\n allow_leading_wildcard: true,\n fields: [basePath],\n query: normalizeValueWithAsterisk(value),\n default_operator: \"and\"\n }\n });\n }\n}\n"],"mappings":"AAAA,SAASA,oCAAoC;AAC7C,SAASC,0BAA0B;AAGnC,OAAO,MAAMC,+CAA+C,SAASF,oCAAoC,CAAC;EACtFG,IAAI,GAAG,sDAAsD;EAEtEC,WAAWA,CAAA,EAAW;IACzB,OAAO,cAAc;EACzB;EAEOC,KAAKA,CAACC,KAAgC,EAAEC,MAAwC,EAAQ;IAC3F,MAAM;MAAEC,KAAK;MAAEC;IAAS,CAAC,GAAGF,MAAM;IAClCD,KAAK,CAACI,QAAQ,CAACC,IAAI,CAAC;MAChBC,YAAY,EAAE;QACVC,sBAAsB,EAAE,IAAI;QAC5BC,MAAM,EAAE,CAACL,QAAQ,CAAC;QAClBH,KAAK,EAAEL,0BAA0B,CAACO,KAAK,CAAC;QACxCO,gBAAgB,EAAE;MACtB;IACJ,CAAC,CAAC;EACN;AACJ","ignoreList":[]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { OpenSearchQueryBuilderOperatorPlugin } from "../../plugins/definition/OpenSearchQueryBuilderOperatorPlugin.js";
|
|
2
|
-
import type { OpenSearchBoolQueryConfig, OpenSearchQueryBuilderArgsPlugin } from "../../types.js";
|
|
3
|
-
export declare class OpenSearchQueryBuilderOperatorNotInPlugin extends OpenSearchQueryBuilderOperatorPlugin {
|
|
4
|
-
name: string;
|
|
5
|
-
getOperator(): string;
|
|
6
|
-
apply(query: OpenSearchBoolQueryConfig, params: OpenSearchQueryBuilderArgsPlugin): void;
|
|
7
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { OpenSearchQueryBuilderOperatorPlugin } from "../definition/OpenSearchQueryBuilderOperatorPlugin.js";
|
|
2
|
-
export class OpenSearchQueryBuilderOperatorNotInPlugin extends OpenSearchQueryBuilderOperatorPlugin {
|
|
3
|
-
name = "opensearch.queryBuilder.operator.notIn.default";
|
|
4
|
-
getOperator() {
|
|
5
|
-
return "not_in";
|
|
6
|
-
}
|
|
7
|
-
apply(query, params) {
|
|
8
|
-
const {
|
|
9
|
-
value: values,
|
|
10
|
-
path,
|
|
11
|
-
basePath,
|
|
12
|
-
name
|
|
13
|
-
} = params;
|
|
14
|
-
const isArray = Array.isArray(values);
|
|
15
|
-
if (isArray === false || values.length === 0) {
|
|
16
|
-
throw new Error(`You cannot filter field "${name}" with "not_in" operator and not send an array of values.`);
|
|
17
|
-
}
|
|
18
|
-
const useBasePath = values.some(value => typeof value !== "string");
|
|
19
|
-
query.must_not.push({
|
|
20
|
-
terms: {
|
|
21
|
-
[useBasePath ? basePath : path]: values
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
//# sourceMappingURL=notIn.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["OpenSearchQueryBuilderOperatorPlugin","OpenSearchQueryBuilderOperatorNotInPlugin","name","getOperator","apply","query","params","value","values","path","basePath","isArray","Array","length","Error","useBasePath","some","must_not","push","terms"],"sources":["notIn.ts"],"sourcesContent":["import { OpenSearchQueryBuilderOperatorPlugin } from \"~/plugins/definition/OpenSearchQueryBuilderOperatorPlugin.js\";\nimport type { OpenSearchBoolQueryConfig, OpenSearchQueryBuilderArgsPlugin } from \"~/types.js\";\n\nexport class OpenSearchQueryBuilderOperatorNotInPlugin extends OpenSearchQueryBuilderOperatorPlugin {\n public override name = \"opensearch.queryBuilder.operator.notIn.default\";\n\n public getOperator(): string {\n return \"not_in\";\n }\n\n public apply(query: OpenSearchBoolQueryConfig, params: OpenSearchQueryBuilderArgsPlugin): void {\n const { value: values, path, basePath, name } = params;\n const isArray = Array.isArray(values);\n if (isArray === false || values.length === 0) {\n throw new Error(\n `You cannot filter field \"${name}\" with \"not_in\" operator and not send an array of values.`\n );\n }\n\n const useBasePath = values.some(\n (value: string | number | boolean | null | undefined) => typeof value !== \"string\"\n );\n\n query.must_not.push({\n terms: {\n [useBasePath ? basePath : path]: values\n }\n });\n }\n}\n"],"mappings":"AAAA,SAASA,oCAAoC;AAG7C,OAAO,MAAMC,yCAAyC,SAASD,oCAAoC,CAAC;EAChFE,IAAI,GAAG,gDAAgD;EAEhEC,WAAWA,CAAA,EAAW;IACzB,OAAO,QAAQ;EACnB;EAEOC,KAAKA,CAACC,KAAgC,EAAEC,MAAwC,EAAQ;IAC3F,MAAM;MAAEC,KAAK,EAAEC,MAAM;MAAEC,IAAI;MAAEC,QAAQ;MAAER;IAAK,CAAC,GAAGI,MAAM;IACtD,MAAMK,OAAO,GAAGC,KAAK,CAACD,OAAO,CAACH,MAAM,CAAC;IACrC,IAAIG,OAAO,KAAK,KAAK,IAAIH,MAAM,CAACK,MAAM,KAAK,CAAC,EAAE;MAC1C,MAAM,IAAIC,KAAK,CACX,4BAA4BZ,IAAI,2DACpC,CAAC;IACL;IAEA,MAAMa,WAAW,GAAGP,MAAM,CAACQ,IAAI,CAC1BT,KAAmD,IAAK,OAAOA,KAAK,KAAK,QAC9E,CAAC;IAEDF,KAAK,CAACY,QAAQ,CAACC,IAAI,CAAC;MAChBC,KAAK,EAAE;QACH,CAACJ,WAAW,GAAGL,QAAQ,GAAGD,IAAI,GAAGD;MACrC;IACJ,CAAC,CAAC;EACN;AACJ","ignoreList":[]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { OpenSearchQueryBuilderOperatorPlugin } from "../../plugins/definition/OpenSearchQueryBuilderOperatorPlugin.js";
|
|
2
|
-
import type { OpenSearchBoolQueryConfig, OpenSearchQueryBuilderArgsPlugin } from "../../types.js";
|
|
3
|
-
export declare class OpenSearchQueryBuilderOperatorNotStartsWithPlugin extends OpenSearchQueryBuilderOperatorPlugin {
|
|
4
|
-
name: string;
|
|
5
|
-
getOperator(): string;
|
|
6
|
-
apply(query: OpenSearchBoolQueryConfig, params: OpenSearchQueryBuilderArgsPlugin): void;
|
|
7
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { OpenSearchQueryBuilderOperatorPlugin } from "../definition/OpenSearchQueryBuilderOperatorPlugin.js";
|
|
2
|
-
export class OpenSearchQueryBuilderOperatorNotStartsWithPlugin extends OpenSearchQueryBuilderOperatorPlugin {
|
|
3
|
-
name = "opensearch.queryBuilder.operator.notStartsWith.default";
|
|
4
|
-
getOperator() {
|
|
5
|
-
return "not_startsWith";
|
|
6
|
-
}
|
|
7
|
-
apply(query, params) {
|
|
8
|
-
const {
|
|
9
|
-
value,
|
|
10
|
-
basePath
|
|
11
|
-
} = params;
|
|
12
|
-
if (value === "" || value === null || value === undefined) {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
query.must_not.push({
|
|
16
|
-
match_phrase_prefix: {
|
|
17
|
-
[basePath]: value
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
//# sourceMappingURL=notStartsWith.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["OpenSearchQueryBuilderOperatorPlugin","OpenSearchQueryBuilderOperatorNotStartsWithPlugin","name","getOperator","apply","query","params","value","basePath","undefined","must_not","push","match_phrase_prefix"],"sources":["notStartsWith.ts"],"sourcesContent":["import { OpenSearchQueryBuilderOperatorPlugin } from \"~/plugins/definition/OpenSearchQueryBuilderOperatorPlugin.js\";\nimport type { OpenSearchBoolQueryConfig, OpenSearchQueryBuilderArgsPlugin } from \"~/types.js\";\n\nexport class OpenSearchQueryBuilderOperatorNotStartsWithPlugin extends OpenSearchQueryBuilderOperatorPlugin {\n public override name = \"opensearch.queryBuilder.operator.notStartsWith.default\";\n\n public getOperator(): string {\n return \"not_startsWith\";\n }\n\n public apply(query: OpenSearchBoolQueryConfig, params: OpenSearchQueryBuilderArgsPlugin): void {\n const { value, basePath } = params;\n if (value === \"\" || value === null || value === undefined) {\n return;\n }\n query.must_not.push({\n match_phrase_prefix: {\n [basePath]: value\n }\n });\n }\n}\n"],"mappings":"AAAA,SAASA,oCAAoC;AAG7C,OAAO,MAAMC,iDAAiD,SAASD,oCAAoC,CAAC;EACxFE,IAAI,GAAG,wDAAwD;EAExEC,WAAWA,CAAA,EAAW;IACzB,OAAO,gBAAgB;EAC3B;EAEOC,KAAKA,CAACC,KAAgC,EAAEC,MAAwC,EAAQ;IAC3F,MAAM;MAAEC,KAAK;MAAEC;IAAS,CAAC,GAAGF,MAAM;IAClC,IAAIC,KAAK,KAAK,EAAE,IAAIA,KAAK,KAAK,IAAI,IAAIA,KAAK,KAAKE,SAAS,EAAE;MACvD;IACJ;IACAJ,KAAK,CAACK,QAAQ,CAACC,IAAI,CAAC;MAChBC,mBAAmB,EAAE;QACjB,CAACJ,QAAQ,GAAGD;MAChB;IACJ,CAAC,CAAC;EACN;AACJ","ignoreList":[]}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { OpenSearchQueryBuilderOperatorPlugin } from "../../plugins/definition/OpenSearchQueryBuilderOperatorPlugin.js";
|
|
2
|
-
import type { OpenSearchBoolQueryConfig, OpenSearchQueryBuilderArgsPlugin } from "../../types.js";
|
|
3
|
-
export declare class OpenSearchQueryBuilderOperatorStartsWithPlugin extends OpenSearchQueryBuilderOperatorPlugin {
|
|
4
|
-
name: string;
|
|
5
|
-
getOperator(): string;
|
|
6
|
-
apply(query: OpenSearchBoolQueryConfig, params: OpenSearchQueryBuilderArgsPlugin): void;
|
|
7
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { OpenSearchQueryBuilderOperatorPlugin } from "../definition/OpenSearchQueryBuilderOperatorPlugin.js";
|
|
2
|
-
export class OpenSearchQueryBuilderOperatorStartsWithPlugin extends OpenSearchQueryBuilderOperatorPlugin {
|
|
3
|
-
name = "opensearch.queryBuilder.operator.startsWith.default";
|
|
4
|
-
getOperator() {
|
|
5
|
-
return "startsWith";
|
|
6
|
-
}
|
|
7
|
-
apply(query, params) {
|
|
8
|
-
const {
|
|
9
|
-
value,
|
|
10
|
-
basePath
|
|
11
|
-
} = params;
|
|
12
|
-
if (value === "" || value === null || value === undefined) {
|
|
13
|
-
return;
|
|
14
|
-
}
|
|
15
|
-
query.filter.push({
|
|
16
|
-
match_phrase_prefix: {
|
|
17
|
-
[basePath]: value
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
//# sourceMappingURL=startsWith.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["OpenSearchQueryBuilderOperatorPlugin","OpenSearchQueryBuilderOperatorStartsWithPlugin","name","getOperator","apply","query","params","value","basePath","undefined","filter","push","match_phrase_prefix"],"sources":["startsWith.ts"],"sourcesContent":["import { OpenSearchQueryBuilderOperatorPlugin } from \"~/plugins/definition/OpenSearchQueryBuilderOperatorPlugin.js\";\nimport type { OpenSearchBoolQueryConfig, OpenSearchQueryBuilderArgsPlugin } from \"~/types.js\";\n\nexport class OpenSearchQueryBuilderOperatorStartsWithPlugin extends OpenSearchQueryBuilderOperatorPlugin {\n public override name = \"opensearch.queryBuilder.operator.startsWith.default\";\n\n public getOperator(): string {\n return \"startsWith\";\n }\n\n public apply(query: OpenSearchBoolQueryConfig, params: OpenSearchQueryBuilderArgsPlugin): void {\n const { value, basePath } = params;\n if (value === \"\" || value === null || value === undefined) {\n return;\n }\n query.filter.push({\n match_phrase_prefix: {\n [basePath]: value\n }\n });\n }\n}\n"],"mappings":"AAAA,SAASA,oCAAoC;AAG7C,OAAO,MAAMC,8CAA8C,SAASD,oCAAoC,CAAC;EACrFE,IAAI,GAAG,qDAAqD;EAErEC,WAAWA,CAAA,EAAW;IACzB,OAAO,YAAY;EACvB;EAEOC,KAAKA,CAACC,KAAgC,EAAEC,MAAwC,EAAQ;IAC3F,MAAM;MAAEC,KAAK;MAAEC;IAAS,CAAC,GAAGF,MAAM;IAClC,IAAIC,KAAK,KAAK,EAAE,IAAIA,KAAK,KAAK,IAAI,IAAIA,KAAK,KAAKE,SAAS,EAAE;MACvD;IACJ;IACAJ,KAAK,CAACK,MAAM,CAACC,IAAI,CAAC;MACdC,mBAAmB,EAAE;QACjB,CAACJ,QAAQ,GAAGD;MAChB;IACJ,CAAC,CAAC;EACN;AACJ","ignoreList":[]}
|
package/utils/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./waitUntilHealthy/index.js\";\nexport * from \"./createIndex.js\";\n"],"mappings":"AAAA;AACA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./WaitingHealthyClusterAbortedError.js\";\nexport * from \"./UnhealthyClusterError.js\";\nexport * from \"./WaitUntilHealthy.js\";\nexport * from \"./reason/index.js\";\n"],"mappings":"AAAA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["IReason.ts"],"sourcesContent":["export interface IReason {\n name: string;\n description?: string;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./ClusterHealthReason.js\";\nexport * from \"./MemoryReason.js\";\nexport * from \"./ProcessorReason.js\";\n"],"mappings":"AAAA;AACA;AACA","ignoreList":[]}
|