@webiny/api-elasticsearch 5.42.0-beta.0 → 5.42.0-beta.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/api-elasticsearch",
3
- "version": "5.42.0-beta.0",
3
+ "version": "5.42.0-beta.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/webiny/webiny-js.git",
@@ -13,16 +13,16 @@
13
13
  "license": "MIT",
14
14
  "dependencies": {
15
15
  "@elastic/elasticsearch": "7.12.0",
16
- "@webiny/api": "5.42.0-beta.0",
17
- "@webiny/error": "5.42.0-beta.0",
18
- "@webiny/plugins": "5.42.0-beta.0",
19
- "@webiny/utils": "5.42.0-beta.0",
16
+ "@webiny/api": "5.42.0-beta.2",
17
+ "@webiny/error": "5.42.0-beta.2",
18
+ "@webiny/plugins": "5.42.0-beta.2",
19
+ "@webiny/utils": "5.42.0-beta.2",
20
20
  "aws-elasticsearch-connector": "9.2.0",
21
21
  "elastic-ts": "0.12.0"
22
22
  },
23
23
  "devDependencies": {
24
- "@webiny/cli": "5.42.0-beta.0",
25
- "@webiny/project-utils": "5.42.0-beta.0",
24
+ "@webiny/cli": "5.42.0-beta.2",
25
+ "@webiny/project-utils": "5.42.0-beta.2",
26
26
  "rimraf": "6.0.1",
27
27
  "ttypescript": "1.5.15",
28
28
  "typescript": "4.9.5"
@@ -35,5 +35,5 @@
35
35
  "build": "yarn webiny run build",
36
36
  "watch": "yarn webiny run watch"
37
37
  },
38
- "gitHead": "ebf90f62ed3f28114ffdb012b7e5f80988af53d3"
38
+ "gitHead": "fcabc160eaa6f598a6970d87ca6365a86ee4703f"
39
39
  }
package/types.d.ts CHANGED
@@ -115,6 +115,9 @@ export interface ElasticsearchIndexRequestBodyMappingsDynamicTemplate {
115
115
  [key: string]: any;
116
116
  };
117
117
  }
118
+ export interface ElasticsearchIndexRequestBodySettingsTotalFields {
119
+ limit?: number;
120
+ }
118
121
  interface ElasticsearchIndexRequestBodySettings {
119
122
  analysis?: {
120
123
  [key: string]: any;
@@ -172,6 +175,7 @@ interface ElasticsearchIndexRequestBodySettings {
172
175
  default_pipeline?: string;
173
176
  final_pipeline?: string;
174
177
  hidden?: boolean;
178
+ total_fields?: ElasticsearchIndexRequestBodySettingsTotalFields;
175
179
  [key: string]: any;
176
180
  }
177
181
  export interface ElasticsearchIndexRequestBody {
package/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["_elasticsearch","require","_elasticTs","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get"],"sources":["types.ts"],"sourcesContent":["import { ApiResponse, Client } from \"@elastic/elasticsearch\";\nimport { BoolQueryConfig, PrimitiveValue, Query as esQuery } from \"elastic-ts\";\nimport { Context, GenericRecord } from \"@webiny/api/types\";\n/**\n * Re-export some dep lib types.\n */\nexport * from \"elastic-ts\";\nexport { ApiResponse };\n\nexport interface ElasticsearchContext extends Context {\n elasticsearch: Client;\n}\n\n/**\n * To simplify our plugins, we say that query contains arrays of objects, not single objects.\n * And that they all are defined as empty arrays at the start.\n */\nexport interface ElasticsearchBoolQueryConfig extends BoolQueryConfig {\n must: esQuery[];\n filter: esQuery[];\n should: esQuery[];\n must_not: esQuery[];\n}\n\n/**\n * Definitions of possible Elasticsearch operators.\n *\n * @category Elasticsearch\n */\nexport type ElasticsearchQueryOperator =\n | \"eq\"\n | \"not\"\n | \"in\"\n | \"not_in\"\n | \"contains\"\n | \"not_contains\"\n | \"between\"\n | \"not_between\"\n | \"gt\"\n | \"gte\"\n | \"lt\"\n | \"lte\"\n | string;\n\n/**\n * Definition for arguments of the ElasticsearchQueryBuilderOperatorPlugin.apply method.\n *\n * @see ElasticsearchQueryBuilderOperatorPlugin.apply\n *\n * @category Plugin\n * @category Elasticsearch\n */\nexport interface ElasticsearchQueryBuilderArgsPlugin {\n /**\n * Name of the field.\n */\n name: string;\n /**\n * A full path to the field. Including the \".keyword\" if it is added.\n */\n path: string;\n /**\n * A path to the field, plain.\n */\n basePath: string;\n /**\n * Value to apply.\n */\n value: any;\n /**\n * Is path containing the \".keyword\"\n */\n keyword: boolean;\n}\n\n/**\n * Elasticsearch responses.\n */\nexport interface ElasticsearchSearchResponseHit<T> {\n _index: string;\n _type: string;\n _id: string;\n _score: number | null;\n _source: T;\n sort: PrimitiveValue[];\n}\nexport interface ElasticsearchSearchResponseAggregationBucket<T> {\n key: T;\n doc_count: number;\n}\n\nexport interface ElasticsearchSearchResponseBodyHits<T> {\n hits: ElasticsearchSearchResponseHit<T>[];\n total: {\n value: number;\n };\n}\n\nexport interface ElasticsearchSearchResponseBodyAggregations<T> {\n [key: string]: {\n buckets: ElasticsearchSearchResponseAggregationBucket<T>[];\n };\n}\n\nexport interface ElasticsearchSearchResponseBody<T> {\n hits: ElasticsearchSearchResponseBodyHits<T>;\n aggregations: ElasticsearchSearchResponseBodyAggregations<T>;\n}\n\nexport interface ElasticsearchSearchResponse<T = GenericRecord> {\n body: ElasticsearchSearchResponseBody<T>;\n}\n\nexport interface ElasticsearchIndexRequestBodyMappingsDynamicTemplate {\n [key: string]: {\n path_match?: string;\n path_unmatch?: string;\n match_mapping_type?: string;\n match?: string;\n unmatch?: string;\n mapping?: {\n numeric_detection?: boolean;\n date_detection?: boolean;\n type?:\n | \"string\"\n | \"date\"\n | \"binary\"\n | \"boolean\"\n | \"object\"\n | \"ip\"\n | \"geo\"\n | \"long\"\n | \"integer\"\n | \"short\"\n | \"byte\"\n | \"double\"\n | \"float\"\n | \"half_float\"\n | \"scaled_float\"\n | \"unsigned_long\"\n | string;\n search_analyzer?: string;\n analyzer?: string;\n fields?: {\n [key: string]:\n | {\n type: string;\n search_analyzer?: string;\n analyzer?: string;\n ignore_above?: number;\n [key: string]: any;\n }\n | undefined;\n };\n [key: string]: any;\n };\n [key: string]: any;\n };\n}\n\ninterface ElasticsearchIndexRequestBodySettings {\n analysis?: {\n [key: string]: any;\n };\n number_of_shards?: number;\n number_of_routing_shards?: number;\n codec?: string;\n routing_partition_size?: number;\n soft_deletes?: {\n enabled?: boolean;\n retention_lease?: {\n period?: string;\n };\n };\n load_fixed_bitset_filters_eagerly?: boolean;\n shard?: {\n check_on_startup?: boolean | \"checksum\";\n };\n number_of_replicas?: number;\n auto_expand_replicas?: string | \"all\" | false;\n search?: {\n idle?: {\n after?: string;\n };\n };\n refresh_interval?: string;\n max_result_window?: number;\n max_inner_result_window?: number;\n max_rescore_window?: number;\n max_docvalue_fields_search?: number;\n max_script_fields?: number;\n max_ngram_diff?: number;\n max_shingle_diff?: number;\n max_refresh_listeners?: number;\n analyze?: {\n max_token_count?: number;\n };\n highlight?: {\n max_analyzed_offset?: number;\n };\n max_terms_count?: number;\n max_regex_length?: number;\n query?: {\n default_field?: string;\n };\n routing?: {\n allocation?: {\n enable?: \"all\" | \"primaries\" | \"new_primaries\" | \"none\";\n };\n rebalance?: {\n enable?: \"all\" | \"primaries\" | \"new_primaries\" | \"none\";\n };\n };\n gc_deletes?: string;\n default_pipeline?: string;\n final_pipeline?: string;\n hidden?: boolean;\n [key: string]: any;\n}\n\nexport interface ElasticsearchIndexRequestBody {\n settings?: {\n index?: Partial<ElasticsearchIndexRequestBodySettings>;\n };\n mappings: {\n numeric_detection?: boolean;\n dynamic_templates?: ElasticsearchIndexRequestBodyMappingsDynamicTemplate[];\n properties?: {\n [key: string]: {\n analyzer?: string;\n type?: string;\n normalizer?: string;\n index?: string;\n fields?: {\n [key: string]: {\n type: string;\n ignore_above?: number;\n search_analyzer?: string;\n analyzer?: string;\n [key: string]: any;\n };\n };\n [key: string]: any;\n };\n };\n [key: string]: any;\n };\n aliases?: {\n [key: string]: {\n filter?: {\n [key: string]: any;\n };\n index_routing?: string;\n is_hidden?: boolean;\n is_write_index?: boolean;\n routing?: string;\n search_routing?: string;\n };\n };\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAMA,IAAAC,UAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,UAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,UAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,UAAA,CAAAI,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"names":["_elasticsearch","require","_elasticTs","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get"],"sources":["types.ts"],"sourcesContent":["import { ApiResponse, Client } from \"@elastic/elasticsearch\";\nimport { BoolQueryConfig, PrimitiveValue, Query as esQuery } from \"elastic-ts\";\nimport { Context, GenericRecord } from \"@webiny/api/types\";\n/**\n * Re-export some dep lib types.\n */\nexport * from \"elastic-ts\";\nexport { ApiResponse };\n\nexport interface ElasticsearchContext extends Context {\n elasticsearch: Client;\n}\n\n/**\n * To simplify our plugins, we say that query contains arrays of objects, not single objects.\n * And that they all are defined as empty arrays at the start.\n */\nexport interface ElasticsearchBoolQueryConfig extends BoolQueryConfig {\n must: esQuery[];\n filter: esQuery[];\n should: esQuery[];\n must_not: esQuery[];\n}\n\n/**\n * Definitions of possible Elasticsearch operators.\n *\n * @category Elasticsearch\n */\nexport type ElasticsearchQueryOperator =\n | \"eq\"\n | \"not\"\n | \"in\"\n | \"not_in\"\n | \"contains\"\n | \"not_contains\"\n | \"between\"\n | \"not_between\"\n | \"gt\"\n | \"gte\"\n | \"lt\"\n | \"lte\"\n | string;\n\n/**\n * Definition for arguments of the ElasticsearchQueryBuilderOperatorPlugin.apply method.\n *\n * @see ElasticsearchQueryBuilderOperatorPlugin.apply\n *\n * @category Plugin\n * @category Elasticsearch\n */\nexport interface ElasticsearchQueryBuilderArgsPlugin {\n /**\n * Name of the field.\n */\n name: string;\n /**\n * A full path to the field. Including the \".keyword\" if it is added.\n */\n path: string;\n /**\n * A path to the field, plain.\n */\n basePath: string;\n /**\n * Value to apply.\n */\n value: any;\n /**\n * Is path containing the \".keyword\"\n */\n keyword: boolean;\n}\n\n/**\n * Elasticsearch responses.\n */\nexport interface ElasticsearchSearchResponseHit<T> {\n _index: string;\n _type: string;\n _id: string;\n _score: number | null;\n _source: T;\n sort: PrimitiveValue[];\n}\nexport interface ElasticsearchSearchResponseAggregationBucket<T> {\n key: T;\n doc_count: number;\n}\n\nexport interface ElasticsearchSearchResponseBodyHits<T> {\n hits: ElasticsearchSearchResponseHit<T>[];\n total: {\n value: number;\n };\n}\n\nexport interface ElasticsearchSearchResponseBodyAggregations<T> {\n [key: string]: {\n buckets: ElasticsearchSearchResponseAggregationBucket<T>[];\n };\n}\n\nexport interface ElasticsearchSearchResponseBody<T> {\n hits: ElasticsearchSearchResponseBodyHits<T>;\n aggregations: ElasticsearchSearchResponseBodyAggregations<T>;\n}\n\nexport interface ElasticsearchSearchResponse<T = GenericRecord> {\n body: ElasticsearchSearchResponseBody<T>;\n}\n\nexport interface ElasticsearchIndexRequestBodyMappingsDynamicTemplate {\n [key: string]: {\n path_match?: string;\n path_unmatch?: string;\n match_mapping_type?: string;\n match?: string;\n unmatch?: string;\n mapping?: {\n numeric_detection?: boolean;\n date_detection?: boolean;\n type?:\n | \"string\"\n | \"date\"\n | \"binary\"\n | \"boolean\"\n | \"object\"\n | \"ip\"\n | \"geo\"\n | \"long\"\n | \"integer\"\n | \"short\"\n | \"byte\"\n | \"double\"\n | \"float\"\n | \"half_float\"\n | \"scaled_float\"\n | \"unsigned_long\"\n | string;\n search_analyzer?: string;\n analyzer?: string;\n fields?: {\n [key: string]:\n | {\n type: string;\n search_analyzer?: string;\n analyzer?: string;\n ignore_above?: number;\n [key: string]: any;\n }\n | undefined;\n };\n [key: string]: any;\n };\n [key: string]: any;\n };\n}\n\nexport interface ElasticsearchIndexRequestBodySettingsTotalFields {\n limit?: number;\n}\n\ninterface ElasticsearchIndexRequestBodySettings {\n analysis?: {\n [key: string]: any;\n };\n number_of_shards?: number;\n number_of_routing_shards?: number;\n codec?: string;\n routing_partition_size?: number;\n soft_deletes?: {\n enabled?: boolean;\n retention_lease?: {\n period?: string;\n };\n };\n load_fixed_bitset_filters_eagerly?: boolean;\n shard?: {\n check_on_startup?: boolean | \"checksum\";\n };\n number_of_replicas?: number;\n auto_expand_replicas?: string | \"all\" | false;\n search?: {\n idle?: {\n after?: string;\n };\n };\n refresh_interval?: string;\n max_result_window?: number;\n max_inner_result_window?: number;\n max_rescore_window?: number;\n max_docvalue_fields_search?: number;\n max_script_fields?: number;\n max_ngram_diff?: number;\n max_shingle_diff?: number;\n max_refresh_listeners?: number;\n analyze?: {\n max_token_count?: number;\n };\n highlight?: {\n max_analyzed_offset?: number;\n };\n max_terms_count?: number;\n max_regex_length?: number;\n query?: {\n default_field?: string;\n };\n routing?: {\n allocation?: {\n enable?: \"all\" | \"primaries\" | \"new_primaries\" | \"none\";\n };\n rebalance?: {\n enable?: \"all\" | \"primaries\" | \"new_primaries\" | \"none\";\n };\n };\n gc_deletes?: string;\n default_pipeline?: string;\n final_pipeline?: string;\n hidden?: boolean;\n total_fields?: ElasticsearchIndexRequestBodySettingsTotalFields;\n [key: string]: any;\n}\n\nexport interface ElasticsearchIndexRequestBody {\n settings?: {\n index?: Partial<ElasticsearchIndexRequestBodySettings>;\n };\n mappings: {\n numeric_detection?: boolean;\n dynamic_templates?: ElasticsearchIndexRequestBodyMappingsDynamicTemplate[];\n properties?: {\n [key: string]: {\n analyzer?: string;\n type?: string;\n normalizer?: string;\n index?: string;\n fields?: {\n [key: string]: {\n type: string;\n ignore_above?: number;\n search_analyzer?: string;\n analyzer?: string;\n [key: string]: any;\n };\n };\n [key: string]: any;\n };\n };\n [key: string]: any;\n };\n aliases?: {\n [key: string]: {\n filter?: {\n [key: string]: any;\n };\n index_routing?: string;\n is_hidden?: boolean;\n is_write_index?: boolean;\n routing?: string;\n search_routing?: string;\n };\n };\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAMA,IAAAC,UAAA,GAAAD,OAAA;AAAAE,MAAA,CAAAC,IAAA,CAAAF,UAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,UAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,UAAA,CAAAI,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}