@sebspark/opensearch 2.1.0 → 3.0.1

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,16 +1,12 @@
1
- import { API, Types, Client } from '@opensearch-project/opensearch';
1
+ import { API, Client, Types } from "@opensearch-project/opensearch";
2
2
 
3
- type DeepPartial<T> = {
4
- [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
5
- };
6
- type NestedPaths<T, Prefix extends string = ''> = T extends object ? {
7
- [K in keyof T & string]: `${Prefix}${Prefix extends '' ? '' : '.'}${K}` | NestedPaths<T[K], `${Prefix}${Prefix extends '' ? '' : '.'}${K}`>;
8
- }[keyof T & string] : never;
9
- type NestedLeafPaths<T, Prefix extends string = ''> = T extends object ? {
10
- [K in keyof T & string]: NestedLeafPaths<T[K], `${Prefix}${Prefix extends '' ? '' : '.'}${K}`>;
11
- }[keyof T & string] : Prefix;
3
+ //#region src/types/utilityTypes.d.ts
4
+ type DeepPartial<T> = { [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P] };
5
+ type NestedPaths<T, Prefix extends string = ''> = T extends object ? { [K in keyof T & string]: `${Prefix}${Prefix extends '' ? '' : '.'}${K}` | NestedPaths<T[K], `${Prefix}${Prefix extends '' ? '' : '.'}${K}`> }[keyof T & string] : never;
6
+ type NestedLeafPaths<T, Prefix extends string = ''> = T extends object ? { [K in keyof T & string]: NestedLeafPaths<T[K], `${Prefix}${Prefix extends '' ? '' : '.'}${K}`> }[keyof T & string] : Prefix;
12
7
  type Primitive = string | number | boolean;
13
-
8
+ //#endregion
9
+ //#region src/types/common.d.ts
14
10
  /**
15
11
  * Defines all possible field value types in OpenSearch.
16
12
  */
@@ -23,421 +19,423 @@ type Property = Types.Common_Mapping.Property;
23
19
  * Defines an OpenSearch index mapping.
24
20
  */
25
21
  type TypeMapping = Omit<Types.Common_Mapping.TypeMapping, 'properties'> & {
26
- properties: Record<string, Property>;
22
+ properties: Record<string, Property>;
27
23
  };
28
24
  /**
29
25
  * Defines an OpenSearch index mapping configuration.
30
26
  */
31
27
  type IndicesCreateRequestBody = Omit<API.Indices_Create_RequestBody, 'mappings'> & {
32
- mappings: TypeMapping;
28
+ mappings: TypeMapping;
33
29
  };
34
30
  /**
35
31
  * Defines an OpenSearch index with body required.
36
32
  */
37
33
  type IndexDefinition = Omit<API.Indices_Create_Request, 'body'> & {
38
- body: IndicesCreateRequestBody;
34
+ body: IndicesCreateRequestBody;
39
35
  };
40
36
  /**
41
37
  * Converts OpenSearch field definitions into TypeScript types.
42
38
  */
43
39
  type MapOpenSearchTypes<T> = T extends Property ? T['type'] extends 'keyword' | 'text' ? string : T['type'] extends 'integer' | 'long' | 'short' | 'byte' | 'float' | 'double' ? number : T['type'] extends 'boolean' ? boolean : T['type'] extends 'date' | 'date_nanos' ? Date : T['type'] extends 'object' | 'nested' ? T extends {
44
- properties: Record<string, Property>;
45
- } ? {
46
- [K in keyof T['properties']]: MapOpenSearchTypes<T['properties'][K]>;
47
- } : never : never : T extends Record<string, Property> ? {
48
- [K in keyof T]: MapOpenSearchTypes<T[K]>;
49
- } : never;
40
+ properties: Record<string, Property>;
41
+ } ? { [K in keyof T['properties']]: MapOpenSearchTypes<T['properties'][K]> } : T extends {
42
+ dynamic: 'true';
43
+ } ? Record<string, unknown> : never : never : T extends Record<string, Property> ? { [K in keyof T]: MapOpenSearchTypes<T[K]> } : never;
50
44
  type MapQueryProperties<T extends IndexDefinition> = T extends {
51
- body: {
52
- mappings: {
53
- properties: infer P;
54
- };
45
+ body: {
46
+ mappings: {
47
+ properties: infer P;
55
48
  };
49
+ };
56
50
  } ? MapOpenSearchTypes<P> : never;
57
51
  type Indices = Client['indices'];
58
52
  type TransportRequestOptions = Parameters<Indices['exists']>[1];
59
53
  interface TransportRequestPromise<T> extends Promise<T> {
60
- abort: () => void;
61
- finally(onFinally?: (() => void) | undefined | null): Promise<T>;
54
+ abort: () => void;
55
+ finally(onFinally?: (() => void) | undefined | null): Promise<T>;
62
56
  }
63
57
  type Sort<T> = SortOptions<T> | SortOptions<T>[];
64
58
  type SortOptions<T> = '_score' | '_doc' | {
65
- _doc?: Types.Common.ScoreSort;
66
- _geo_distance?: Types.Common.GeoDistanceSort;
67
- _score?: Types.Common.ScoreSort;
68
- _script?: Types.Common.ScriptSort;
59
+ _doc?: Types.Common.ScoreSort;
60
+ _geo_distance?: Types.Common.GeoDistanceSort;
61
+ _score?: Types.Common.ScoreSort;
62
+ _script?: Types.Common.ScriptSort;
69
63
  } | Record<NestedPaths<T>, Types.Common.FieldSort>;
70
64
  type BuiltinKeys = '_id' | '_index';
71
-
72
- type DocumentFor<T extends IndexDefinition> = {
73
- [P in keyof T['body']['mappings']['properties']]: MapOpenSearchTypes<T['body']['mappings']['properties'][P]>;
74
- };
75
-
65
+ //#endregion
66
+ //#region src/types/documents.d.ts
67
+ type DocumentFor<T extends IndexDefinition> = { [P in keyof T['body']['mappings']['properties']]?: MapOpenSearchTypes<T['body']['mappings']['properties'][P]> };
68
+ //#endregion
69
+ //#region src/types/bulk.d.ts
76
70
  type CreateOperation<T extends IndexDefinition> = Omit<WriteOperation<T>, '_id'> & {
77
- _id: Types.Common.Id;
71
+ _id: Types.Common.Id;
78
72
  };
79
73
  type DeleteOperation<T extends IndexDefinition> = OperationBase<T>;
80
74
  type IndexOperation<T extends IndexDefinition> = WriteOperation<T>;
81
75
  type UpdateOperation<T extends IndexDefinition> = Omit<Types.Core_Bulk.UpdateOperation, '_index' | '_id'> & {
82
- _id: Types.Common.Id;
83
- _index?: T['index'];
76
+ _id: Types.Common.Id;
77
+ _index?: T['index'];
84
78
  };
85
79
  type WriteOperation<T extends IndexDefinition> = Omit<Types.Core_Bulk.WriteOperation, '_index'> & {
86
- _index?: T['index'];
80
+ _index?: T['index'];
87
81
  };
88
82
  type OperationBase<T extends IndexDefinition> = Omit<Types.Core_Bulk.OperationBase, '_index'> & {
89
- _index?: T['index'];
83
+ _index?: T['index'];
90
84
  };
91
85
  type OperationContainer<T extends IndexDefinition> = {
92
- create?: CreateOperation<T>;
93
- delete?: DeleteOperation<T>;
94
- index?: IndexOperation<T>;
95
- update?: UpdateOperation<T>;
86
+ create?: CreateOperation<T>;
87
+ delete?: DeleteOperation<T>;
88
+ index?: IndexOperation<T>;
89
+ update?: UpdateOperation<T>;
96
90
  };
97
91
  type UpdateAction<T extends IndexDefinition> = Omit<Types.Core_Bulk.UpdateAction, 'doc' | 'upsert'> & ({
98
- doc: DeepPartial<DocumentFor<T>>;
99
- upsert?: DocumentFor<T>;
92
+ doc: DeepPartial<DocumentFor<T>>;
93
+ upsert?: DocumentFor<T>;
100
94
  } | {
101
- doc?: DeepPartial<DocumentFor<T>>;
102
- upsert: DocumentFor<T>;
95
+ doc?: DeepPartial<DocumentFor<T>>;
96
+ upsert: DocumentFor<T>;
103
97
  });
104
98
  type BulkRequest<T extends IndexDefinition> = Omit<API.Bulk_Request, 'index' | 'body' | '_source_excludes' | '_source_includes'> & {
105
- index: T['index'];
106
- body: BulkRequestBody<T>;
107
- _source_excludes?: NestedLeafPaths<T> | Types.Common.Fields;
108
- _source_includes?: NestedLeafPaths<T> | Types.Common.Fields;
99
+ index: T['index'];
100
+ body: BulkRequestBody<T>;
101
+ _source_excludes?: NestedLeafPaths<T> | Types.Common.Fields;
102
+ _source_includes?: NestedLeafPaths<T> | Types.Common.Fields;
109
103
  };
110
104
  type BulkRequestBody<T extends IndexDefinition> = (OperationContainer<T> | UpdateAction<T> | DocumentFor<T>)[];
111
105
  type ResponseItem<T extends IndexDefinition> = Omit<Types.Core_Bulk.ResponseItem, '_index'> & {
112
- _index: T['index'];
106
+ _index: T['index'];
113
107
  };
114
108
  type CustomOperation = string;
115
109
  type BulkOperation = 'index' | 'update' | 'delete' | 'create' | CustomOperation;
116
110
  type BulkResponseBody<T extends IndexDefinition> = Omit<API.Bulk_ResponseBody, 'items'> & {
117
- items: Record<BulkOperation, ResponseItem<T>>[];
111
+ items: Record<BulkOperation, ResponseItem<T>>[];
118
112
  };
119
113
  type BulkResponse<T extends IndexDefinition> = Omit<API.Bulk_ResponseBody, 'body'> & {
120
- body: BulkResponseBody<T>;
114
+ body: BulkResponseBody<T>;
121
115
  };
122
-
116
+ //#endregion
117
+ //#region src/types/queries.d.ts
123
118
  type BoolQuery<T> = Omit<Types.Common_QueryDsl.BoolQuery, 'must' | 'should' | 'filter' | 'must_not'> & {
124
- must?: QueryContainer<T>[];
125
- should?: QueryContainer<T>[];
126
- filter?: QueryContainer<T>[];
127
- must_not?: QueryContainer<T>[];
119
+ must?: QueryContainer<T>[];
120
+ should?: QueryContainer<T>[];
121
+ filter?: QueryContainer<T>[];
122
+ must_not?: QueryContainer<T>[];
128
123
  };
129
124
  type BoostingQuery<T> = Omit<Types.Common_QueryDsl.BoostingQuery, 'positive' | 'negative'> & {
130
- positive: QueryContainer<T>;
131
- negative: QueryContainer<T>;
125
+ positive: QueryContainer<T>;
126
+ negative: QueryContainer<T>;
132
127
  };
133
128
  type CombinedFieldsQuery<T> = Omit<Types.Common_QueryDsl.CombinedFieldsQuery, 'fields'> & {
134
- fields: NestedPaths<T>[];
129
+ fields: NestedPaths<T>[];
135
130
  };
136
131
  type CommonTermsQuery = Types.Common_QueryDsl.CommonTermsQuery;
137
132
  type ConstantScoreQuery<T> = Omit<Types.Common_QueryDsl.ConstantScoreQuery, 'filter'> & {
138
- filter: QueryContainer<T>;
133
+ filter: QueryContainer<T>;
139
134
  };
140
135
  type DecayFunction = Types.Common_QueryDsl.DecayFunction;
141
136
  type DecayFunctionBase = Types.Common_QueryDsl.DecayFunctionBase;
142
137
  type DisMaxQuery<T> = Omit<Types.Common_QueryDsl.DisMaxQuery, 'queries'> & {
143
- queries: QueryContainer<T>[];
138
+ queries: QueryContainer<T>[];
144
139
  };
145
140
  type DistanceFeatureQuery<T> = Omit<Types.Common_QueryDsl.DistanceFeatureQuery, 'field'> & {
146
- field: NestedPaths<T>;
141
+ field: NestedPaths<T>;
147
142
  };
148
143
  type ExistsQuery<T> = Omit<Types.Common_QueryDsl.ExistsQuery, 'field'> & {
149
- field: NestedPaths<T>;
144
+ field: NestedPaths<T>;
150
145
  };
151
146
  type FieldAndFormat<T> = Omit<Types.Common_QueryDsl.FieldAndFormat, 'field'> & {
152
- field: NestedPaths<T>;
147
+ field: NestedPaths<T>;
153
148
  };
154
- type FieldQuery<T, K> = Partial<Record<NestedLeafPaths<T> | BuiltinKeys, K>>;
149
+ type FieldQuery<T, K$1> = Partial<Record<NestedLeafPaths<T> | BuiltinKeys, K$1>>;
155
150
  type FieldValueFactorScoreFunction<T> = Omit<Types.Common_QueryDsl.FieldValueFactorScoreFunction, 'field'> & {
156
- field: NestedPaths<T>;
151
+ field: NestedPaths<T>;
157
152
  };
158
153
  type FunctionBoostMode = Types.Common_QueryDsl.FunctionBoostMode;
159
154
  type FunctionScoreQuery<T> = Omit<Types.Common_QueryDsl.FunctionScoreQuery, 'query'> & {
160
- query?: QueryContainer<T> | undefined;
155
+ query?: QueryContainer<T> | undefined;
161
156
  };
162
157
  type FuzzyQuery = Types.Common_QueryDsl.FuzzyQuery;
163
158
  type GeoBoundingBoxQuery = Types.Common_QueryDsl.GeoBoundingBoxQuery;
164
159
  type GeoDistanceQuery = Types.Common_QueryDsl.GeoDistanceQuery;
165
160
  type GeoExecution = Types.Common_QueryDsl.GeoExecution;
166
161
  type GeoPolygonQuery<T> = Omit<Types.Common_QueryDsl.GeoPolygonQuery, 'field'> & {
167
- field: NestedPaths<T>;
162
+ field: NestedPaths<T>;
168
163
  };
169
164
  type GeoShapeQuery<T> = Omit<Types.Common_QueryDsl.GeoShapeQuery, 'ignore_unmapped' | 'field'> & {
170
- field: NestedPaths<T>;
165
+ field: NestedPaths<T>;
171
166
  };
172
167
  type GeoValidationMethod = Types.Common_QueryDsl.GeoValidationMethod;
173
168
  type HasChildQuery<T> = Omit<Types.Common_QueryDsl.HasChildQuery, 'query'> & {
174
- query: QueryContainer<T>;
169
+ query: QueryContainer<T>;
175
170
  };
176
171
  type HasParentQuery<T> = Omit<Types.Common_QueryDsl.HasParentQuery, 'query'> & {
177
- query: QueryContainer<T>;
172
+ query: QueryContainer<T>;
178
173
  };
179
174
  type HybridQuery<T> = Omit<Types.Common_QueryDsl.HybridQuery, 'queries'> & {
180
- queries?: QueryContainer<T>[];
175
+ queries?: QueryContainer<T>[];
181
176
  };
182
177
  type IdsQuery = Types.Common_QueryDsl.IdsQuery;
183
178
  type IntervalsQuery = Types.Common_QueryDsl.IntervalsQuery;
184
179
  type KnnQuery<T> = Omit<Types.Common_QueryDsl.KnnQuery, 'filter'> & {
185
- filter?: QueryContainer<T>[];
180
+ filter?: QueryContainer<T>[];
186
181
  };
187
182
  type Like = Types.Common_QueryDsl.Like;
188
183
  type LikeDocument = Types.Common_QueryDsl.LikeDocument;
189
184
  type MatchAllQuery = Types.Common_QueryDsl.MatchAllQuery;
190
185
  type MatchBoolPrefixQuery<T> = Omit<Types.Common_QueryDsl.MatchBoolPrefixQuery, 'query' | 'fields'> & {
191
- fields: NestedPaths<T>[];
192
- query: string;
186
+ fields: NestedPaths<T>[];
187
+ query: string;
193
188
  };
194
189
  type MatchNoneQuery = Types.Common_QueryDsl.MatchNoneQuery;
195
190
  type MatchPhrasePrefixQuery<T> = Omit<Types.Common_QueryDsl.MatchPhrasePrefixQuery, 'query' | 'field'> & {
196
- field: NestedPaths<T>;
197
- query: string;
191
+ field: NestedPaths<T>;
192
+ query: string;
198
193
  };
199
194
  type MatchPhraseQuery<T> = Omit<Types.Common_QueryDsl.MatchPhraseQuery, 'query' | 'field'> & {
200
- field: NestedPaths<T>;
201
- query: string;
195
+ field: NestedPaths<T>;
196
+ query: string;
202
197
  };
203
198
  type MatchQuery = FieldValue | Types.Common_QueryDsl.MatchQuery;
204
199
  type MoreLikeThisQuery<T> = Omit<Types.Common_QueryDsl.MoreLikeThisQuery, 'fields'> & {
205
- fields?: NestedPaths<T>[];
200
+ fields?: NestedPaths<T>[];
206
201
  };
207
202
  type MultiMatchQuery<T> = Omit<Types.Common_QueryDsl.MultiMatchQuery, 'fields'> & {
208
- fields?: NestedPaths<T>[];
203
+ fields?: NestedPaths<T>[];
209
204
  };
210
205
  type NestedQuery<T> = Omit<Types.Common_QueryDsl.NestedQuery, 'query' | 'path'> & {
211
- path: NestedPaths<T>;
212
- query: QueryContainer<T>;
206
+ path: NestedPaths<T>;
207
+ query: QueryContainer<T>;
213
208
  };
214
209
  type NeuralQuery<T> = Omit<Types.Common_QueryDsl.NeuralQuery, 'filter'> & {
215
- filter?: QueryContainer<T>;
210
+ filter?: QueryContainer<T>;
216
211
  };
217
212
  type NumberRangeQueryParameters<T> = Omit<Types.Common_QueryDsl.NumberRangeQueryParameters, 'field'> & {
218
- field: NestedPaths<T>;
213
+ field: NestedPaths<T>;
219
214
  };
220
215
  type ParentIdQuery = Types.Common_QueryDsl.ParentIdQuery;
221
216
  type PercolateQuery<T> = Omit<Types.Common_QueryDsl.PercolateQuery, 'field'> & {
222
- field: NestedPaths<T>;
217
+ field: NestedPaths<T>;
223
218
  };
224
219
  type PinnedQuery = Types.Common_QueryDsl.PinnedQuery;
225
220
  type PrefixQuery<T> = Omit<Types.Common_QueryDsl.PrefixQuery, 'value' | 'field'> & {
226
- field: NestedPaths<T>;
227
- value: MapOpenSearchTypes<T>;
221
+ field: NestedPaths<T>;
222
+ value: MapOpenSearchTypes<T>;
228
223
  };
229
224
  type QueryContainer<T> = Omit<Types.Common_QueryDsl.QueryContainer, 'bool' | 'boosting' | 'combined_fields' | 'common' | 'constant_score' | 'dis_max' | 'distance_feature' | 'exists' | 'function_score' | 'fuzzy' | 'geo_bounding_box' | 'geo_distance' | 'geo_polygon' | 'geo_shape' | 'has_child' | 'has_parent' | 'hybrid' | 'ids' | 'intervals' | 'knn' | 'match' | 'match_all' | 'match_bool_prefix' | 'match_none' | 'match_phrase' | 'match_phrase_prefix' | 'more_like_this' | 'multi_match' | 'nested' | 'neural' | 'parent_id' | 'percolate' | 'pinned' | 'prefix' | 'query_string' | 'range' | 'rank_feature' | 'regexp' | 'script' | 'script_score' | 'simple_query_string' | 'span_containing' | 'span_first' | 'span_multi' | 'span_near' | 'span_not' | 'span_or' | 'span_term' | 'span_within' | 'term' | 'terms' | 'terms_set' | 'type' | 'wildcard' | 'wrapper' | 'xy_shape'> & {
230
- bool?: BoolQuery<T>;
231
- boosting?: BoostingQuery<T>;
232
- combined_fields?: CombinedFieldsQuery<T>;
233
- common?: FieldQuery<T, Types.Common_QueryDsl.CommonTermsQuery>;
234
- constant_score?: ConstantScoreQuery<T>;
235
- dis_max?: DisMaxQuery<T>;
236
- distance_feature?: DistanceFeatureQuery<T>;
237
- exists?: ExistsQuery<T>;
238
- function_score?: FunctionScoreQuery<T>;
239
- fuzzy?: FieldQuery<T, Types.Common_QueryDsl.FuzzyQuery>;
240
- geo_bounding_box?: GeoBoundingBoxQuery;
241
- geo_distance?: GeoDistanceQuery;
242
- geo_polygon?: GeoPolygonQuery<T>;
243
- geo_shape?: GeoShapeQuery<T>;
244
- has_child?: HasChildQuery<T>;
245
- has_parent?: HasParentQuery<T>;
246
- hybrid?: HybridQuery<T>;
247
- ids?: IdsQuery;
248
- intervals?: FieldQuery<T, IntervalsQuery>;
249
- knn?: FieldQuery<T, KnnQuery<T>>;
250
- match?: FieldQuery<T, MatchQuery>;
251
- match_all?: MatchAllQuery;
252
- match_bool_prefix?: FieldQuery<T, MatchBoolPrefixQuery<T>>;
253
- match_none?: MatchNoneQuery;
254
- match_phrase?: FieldQuery<T, MatchPhraseQuery<T>>;
255
- match_phrase_prefix?: FieldQuery<T, MatchPhrasePrefixQuery<T>>;
256
- more_like_this?: MoreLikeThisQuery<T>;
257
- multi_match?: MultiMatchQuery<T>;
258
- nested?: NestedQuery<T>;
259
- neural?: FieldQuery<T, NeuralQuery<T>>;
260
- parent_id?: ParentIdQuery;
261
- percolate?: PercolateQuery<T>;
262
- pinned?: PinnedQuery;
263
- prefix?: FieldQuery<T, PrefixQuery<T>>;
264
- query_string?: QueryStringQuery;
265
- range?: FieldQuery<T, RangeQuery<T>>;
266
- rank_feature?: RankFeatureQuery;
267
- regexp?: FieldQuery<T, RegexpQuery<T>>;
268
- script?: ScriptQuery;
269
- script_score?: ScriptScoreQuery<T>;
270
- simple_query_string?: SimpleQueryStringQuery<T>;
271
- span_containing?: SpanContainingQuery<T>;
272
- span_first?: SpanFirstQuery<T>;
273
- span_multi?: SpanMultiTermQuery<T>;
274
- span_near?: SpanNearQuery<T>;
275
- span_not?: SpanNotQuery<T>;
276
- span_or?: SpanOrQuery<T>;
277
- span_term?: FieldQuery<T, SpanTermQuery<T>>;
278
- span_within?: SpanWithinQuery<T>;
279
- term?: FieldQuery<T, TermQuery<T>>;
280
- terms?: TermsQuery<T>;
281
- terms_set?: FieldQuery<T, TermsSetQuery<T>>;
282
- type?: TypeQuery;
283
- wildcard?: FieldQuery<T, WildcardQuery<T>>;
284
- wrapper?: WrapperQuery;
285
- xy_shape?: XyShapeQuery<T>;
225
+ bool?: BoolQuery<T>;
226
+ boosting?: BoostingQuery<T>;
227
+ combined_fields?: CombinedFieldsQuery<T>;
228
+ common?: FieldQuery<T, Types.Common_QueryDsl.CommonTermsQuery>;
229
+ constant_score?: ConstantScoreQuery<T>;
230
+ dis_max?: DisMaxQuery<T>;
231
+ distance_feature?: DistanceFeatureQuery<T>;
232
+ exists?: ExistsQuery<T>;
233
+ function_score?: FunctionScoreQuery<T>;
234
+ fuzzy?: FieldQuery<T, Types.Common_QueryDsl.FuzzyQuery>;
235
+ geo_bounding_box?: GeoBoundingBoxQuery;
236
+ geo_distance?: GeoDistanceQuery;
237
+ geo_polygon?: GeoPolygonQuery<T>;
238
+ geo_shape?: GeoShapeQuery<T>;
239
+ has_child?: HasChildQuery<T>;
240
+ has_parent?: HasParentQuery<T>;
241
+ hybrid?: HybridQuery<T>;
242
+ ids?: IdsQuery;
243
+ intervals?: FieldQuery<T, IntervalsQuery>;
244
+ knn?: FieldQuery<T, KnnQuery<T>>;
245
+ match?: FieldQuery<T, MatchQuery>;
246
+ match_all?: MatchAllQuery;
247
+ match_bool_prefix?: FieldQuery<T, MatchBoolPrefixQuery<T>>;
248
+ match_none?: MatchNoneQuery;
249
+ match_phrase?: FieldQuery<T, MatchPhraseQuery<T>>;
250
+ match_phrase_prefix?: FieldQuery<T, MatchPhrasePrefixQuery<T>>;
251
+ more_like_this?: MoreLikeThisQuery<T>;
252
+ multi_match?: MultiMatchQuery<T>;
253
+ nested?: NestedQuery<T>;
254
+ neural?: FieldQuery<T, NeuralQuery<T>>;
255
+ parent_id?: ParentIdQuery;
256
+ percolate?: PercolateQuery<T>;
257
+ pinned?: PinnedQuery;
258
+ prefix?: FieldQuery<T, PrefixQuery<T>>;
259
+ query_string?: QueryStringQuery;
260
+ range?: FieldQuery<T, RangeQuery<T>>;
261
+ rank_feature?: RankFeatureQuery;
262
+ regexp?: FieldQuery<T, RegexpQuery<T>>;
263
+ script?: ScriptQuery;
264
+ script_score?: ScriptScoreQuery<T>;
265
+ simple_query_string?: SimpleQueryStringQuery<T>;
266
+ span_containing?: SpanContainingQuery<T>;
267
+ span_first?: SpanFirstQuery<T>;
268
+ span_multi?: SpanMultiTermQuery<T>;
269
+ span_near?: SpanNearQuery<T>;
270
+ span_not?: SpanNotQuery<T>;
271
+ span_or?: SpanOrQuery<T>;
272
+ span_term?: FieldQuery<T, SpanTermQuery<T>>;
273
+ span_within?: SpanWithinQuery<T>;
274
+ term?: FieldQuery<T, TermQuery<T>>;
275
+ terms?: TermsQuery<T>;
276
+ terms_set?: FieldQuery<T, TermsSetQuery<T>>;
277
+ type?: TypeQuery;
278
+ wildcard?: FieldQuery<T, WildcardQuery<T>>;
279
+ wrapper?: WrapperQuery;
280
+ xy_shape?: XyShapeQuery<T>;
286
281
  };
287
282
  type QueryStringQuery = Types.Common_QueryDsl.QueryStringQuery;
288
283
  type RangeQuery<T> = Omit<Types.Common_QueryDsl.RangeQuery, 'field'> & {
289
- field: NestedPaths<T>;
284
+ field: NestedPaths<T>;
290
285
  };
291
286
  type RankFeatureQuery = Types.Common_QueryDsl.RankFeatureQuery;
292
287
  type RegexpQuery<T> = Omit<Types.Common_QueryDsl.RegexpQuery, 'value' | 'field'> & {
293
- field: NestedPaths<T>;
294
- value: MapOpenSearchTypes<T>;
288
+ field: NestedPaths<T>;
289
+ value: MapOpenSearchTypes<T>;
295
290
  };
296
291
  type ScriptQuery = Types.Common_QueryDsl.ScriptQuery;
297
292
  type ScriptScoreQuery<T> = Omit<Types.Common_QueryDsl.ScriptScoreQuery, 'query'> & {
298
- query?: QueryContainer<T>;
293
+ query?: QueryContainer<T>;
299
294
  };
300
295
  type SimpleQueryStringQuery<T> = Omit<Types.Common_QueryDsl.SimpleQueryStringQuery, 'fields'> & {
301
- fields: NestedLeafPaths<T>[];
296
+ fields: NestedLeafPaths<T>[];
302
297
  };
303
298
  type SpanQuery<T> = Omit<Types.Common_QueryDsl.SpanQuery, 'field_masking_span' | 'span_containing' | 'span_first' | 'span_multi' | 'span_near' | 'span_not' | 'span_or' | 'span_term' | 'span_within'> & {
304
- field_masking_span?: SpanFieldMaskingQuery<T>;
305
- span_containing?: SpanContainingQuery<T>;
306
- span_first?: SpanFirstQuery<T>;
307
- span_multi?: SpanMultiTermQuery<T>;
308
- span_near?: SpanNearQuery<T>;
309
- span_not?: SpanNotQuery<T>;
310
- span_or?: SpanOrQuery<T>;
311
- span_term?: Record<NestedPaths<T>, SpanTermQuery<T>>;
312
- span_within?: SpanWithinQuery<T>;
299
+ field_masking_span?: SpanFieldMaskingQuery<T>;
300
+ span_containing?: SpanContainingQuery<T>;
301
+ span_first?: SpanFirstQuery<T>;
302
+ span_multi?: SpanMultiTermQuery<T>;
303
+ span_near?: SpanNearQuery<T>;
304
+ span_not?: SpanNotQuery<T>;
305
+ span_or?: SpanOrQuery<T>;
306
+ span_term?: Record<NestedPaths<T>, SpanTermQuery<T>>;
307
+ span_within?: SpanWithinQuery<T>;
313
308
  };
314
309
  type SpanContainingQuery<T> = Omit<Types.Common_QueryDsl.SpanContainingQuery, 'big' | 'little'> & {
315
- big: SpanQuery<T>;
316
- little: SpanQuery<T>;
310
+ big: SpanQuery<T>;
311
+ little: SpanQuery<T>;
317
312
  };
318
313
  type SpanFieldMaskingQuery<T> = Omit<Types.Common_QueryDsl.SpanFieldMaskingQuery, 'field' | 'query'> & {
319
- field: NestedPaths<T>;
320
- query: SpanQuery<T>;
314
+ field: NestedPaths<T>;
315
+ query: SpanQuery<T>;
321
316
  };
322
317
  type SpanFirstQuery<T> = Omit<Types.Common_QueryDsl.SpanFirstQuery, 'match'> & {
323
- match: SpanQuery<T>;
318
+ match: SpanQuery<T>;
324
319
  };
325
320
  type SpanMultiTermQuery<T> = Omit<Types.Common_QueryDsl.SpanMultiTermQuery, 'match'> & {
326
- match: QueryContainer<T>;
321
+ match: QueryContainer<T>;
327
322
  };
328
323
  type SpanNearQuery<T> = Omit<Types.Common_QueryDsl.SpanNearQuery, 'clauses'> & {
329
- clauses: SpanQuery<T>[];
324
+ clauses: SpanQuery<T>[];
330
325
  };
331
326
  type SpanNotQuery<T> = Omit<Types.Common_QueryDsl.SpanNotQuery, 'include' | 'exclude'> & {
332
- include: SpanQuery<T>;
333
- exclude: SpanQuery<T>;
327
+ include: SpanQuery<T>;
328
+ exclude: SpanQuery<T>;
334
329
  };
335
330
  type SpanOrQuery<T> = Omit<Types.Common_QueryDsl.SpanOrQuery, 'clauses'> & {
336
- clauses: SpanQuery<T>[];
331
+ clauses: SpanQuery<T>[];
337
332
  };
338
333
  type SpanTermQuery<T> = Omit<Types.Common_QueryDsl.SpanTermQuery, 'value' | 'field'> & {
339
- field: NestedPaths<T>;
340
- value: MapOpenSearchTypes<T>;
334
+ field: NestedPaths<T>;
335
+ value: MapOpenSearchTypes<T>;
341
336
  };
342
337
  type SpanWithinQuery<T> = Omit<Types.Common_QueryDsl.SpanWithinQuery, 'big' | 'little'> & {
343
- big: SpanQuery<T>;
344
- little: SpanQuery<T>;
338
+ big: SpanQuery<T>;
339
+ little: SpanQuery<T>;
345
340
  };
346
341
  type TermQuery<T> = Omit<Types.Common_QueryDsl.TermQuery, 'value' | 'field'> & {
347
- field: NestedPaths<T>;
348
- value: MapOpenSearchTypes<T>;
342
+ field: NestedPaths<T>;
343
+ value: MapOpenSearchTypes<T>;
349
344
  };
350
345
  type TermsQuery<T> = Omit<Types.Common_QueryDsl.TermsQuery, 'terms' | 'field'> & {
351
- field: NestedPaths<T>;
352
- terms: FieldValue[];
346
+ field: NestedPaths<T>;
347
+ terms: FieldValue[];
353
348
  };
354
349
  type TermsSetQuery<T> = Omit<Types.Common_QueryDsl.TermsSetQuery, 'terms' | 'field'> & {
355
- field: NestedPaths<T>;
356
- terms: FieldValue[];
350
+ field: NestedPaths<T>;
351
+ terms: FieldValue[];
357
352
  };
358
353
  type TypeQuery = Types.Common_QueryDsl.TypeQuery;
359
354
  type WildcardQuery<T> = Omit<Types.Common_QueryDsl.WildcardQuery, 'value' | 'field'> & {
360
- field: NestedPaths<T>;
361
- value: MapOpenSearchTypes<T>;
355
+ field: NestedPaths<T>;
356
+ value: MapOpenSearchTypes<T>;
362
357
  };
363
358
  type WrapperQuery = Types.Common_QueryDsl.WrapperQuery;
364
359
  type XyShapeQuery<T> = Omit<Types.Common_QueryDsl.XyShapeQuery, 'field'> & {
365
- field: NestedPaths<T>;
360
+ field: NestedPaths<T>;
366
361
  };
367
-
362
+ //#endregion
363
+ //#region src/types/core_search.d.ts
368
364
  type FieldCollapse<T> = Omit<Types.Core_Search.FieldCollapse, 'field'> & {
369
- field: NestedPaths<T>;
365
+ field: NestedPaths<T>;
370
366
  };
371
367
  type Highlight<T> = Omit<Types.Core_Search.Highlight, 'fields'> & {
372
- fields: FieldQuery<T, Types.Core_Search.HighlightField>;
368
+ fields: FieldQuery<T, Types.Core_Search.HighlightField>;
373
369
  };
374
370
  type Hit<T extends IndexDefinition> = Omit<Types.Core_Search.Hit, '_source'> & {
375
- _source: DocumentFor<T>;
371
+ _source: DocumentFor<T>;
376
372
  };
377
373
  type HitsMetadata<T extends IndexDefinition> = Omit<Types.Core_Search.HitsMetadata, 'hits'> & {
378
- hits: Hit<T>[];
374
+ hits: Hit<T>[];
379
375
  };
380
376
  type SourceConfig<T> = boolean | SourceFilter<T>;
381
377
  type SourceFilter<T> = NestedPaths<T>[] | {
382
- excludes?: NestedPaths<T>[];
383
- includes?: NestedPaths<T>[];
378
+ excludes?: NestedPaths<T>[];
379
+ includes?: NestedPaths<T>[];
384
380
  };
385
-
381
+ //#endregion
382
+ //#region src/types/search.d.ts
386
383
  type SearchRequest<T extends IndexDefinition> = Omit<API.Search_Request, 'body' | 'index'> & {
387
- index: T['index'];
388
- body: SearchRequestBody<T>;
384
+ index: T['index'];
385
+ body: SearchRequestBody<T>;
389
386
  };
390
387
  type SearchRequestBody<T extends IndexDefinition> = Omit<API.Search_RequestBody, 'query' | 'collapse' | 'highlight' | 'sort' | '_source'> & {
391
- query?: QueryContainer<MapQueryProperties<T>>;
392
- collapse?: FieldCollapse<MapQueryProperties<T>>;
393
- highlight?: Highlight<MapQueryProperties<T>>;
394
- sort?: Sort<MapQueryProperties<T>>;
395
- _source?: SourceConfig<MapQueryProperties<T>>;
388
+ query?: QueryContainer<MapQueryProperties<T>>;
389
+ collapse?: FieldCollapse<MapQueryProperties<T>>;
390
+ highlight?: Highlight<MapQueryProperties<T>>;
391
+ sort?: Sort<MapQueryProperties<T>>;
392
+ _source?: SourceConfig<MapQueryProperties<T>>;
396
393
  };
397
394
  type SearchResponse<T extends IndexDefinition> = Omit<API.Search_Response, 'body'> & {
398
- body: SearchResponseBody<T>;
395
+ body: SearchResponseBody<T>;
399
396
  };
400
397
  type SearchResponseBody<T extends IndexDefinition> = Omit<API.Search_ResponseBody, 'hits'> & {
401
- hits: HitsMetadata<T>;
398
+ hits: HitsMetadata<T>;
402
399
  };
403
-
400
+ //#endregion
401
+ //#region src/types/indx.d.ts
404
402
  interface IndexRequest<T> extends Omit<API.Index_Request, 'body' | 'index'> {
405
- index: T extends {
406
- index: infer I;
407
- } ? I : never;
408
- body: T extends {
409
- body: {
410
- mappings: {
411
- properties: infer P;
412
- };
413
- };
414
- } ? MapOpenSearchTypes<P> : never;
415
- }
416
- interface IndexResponse extends API.Index_Response {
403
+ index: T extends {
404
+ index: infer I;
405
+ } ? I : never;
406
+ body: T extends {
407
+ body: {
408
+ mappings: {
409
+ properties: infer P;
410
+ };
411
+ };
412
+ } ? MapOpenSearchTypes<P> : never;
417
413
  }
414
+ interface IndexResponse extends API.Index_Response {}
418
415
  type IndicesExistsRequest<T extends IndexDefinition> = Omit<API.Indices_Exists_Request, 'index'> & {
419
- index: Extract<T['index'], string>;
416
+ index: Extract<T['index'], string>;
420
417
  };
421
-
418
+ //#endregion
419
+ //#region src/client.d.ts
422
420
  type TypedIndices = Omit<Indices, 'exists'> & {
423
- exists<T extends IndexDefinition>(params: IndicesExistsRequest<T>, options?: TransportRequestOptions): TransportRequestPromise<API.Indices_Exists_Response>;
421
+ exists<T extends IndexDefinition>(params: IndicesExistsRequest<T>, options?: TransportRequestOptions): TransportRequestPromise<API.Indices_Exists_Response>;
424
422
  };
425
- /**
426
- * ✅ Constructor type that ensures `new OpenSearchClient()` works.
427
- * - This type is necessary because `OpenSearchClient` is actually a function (not a class).
428
- */
429
- type OpenSearchClientConstructor = new (...args: ConstructorParameters<typeof Client>) => OpenSearchClient;
430
423
  /**
431
424
  * ✅ Custom interface that extends `Client`, but replaces the `search()` method signature.
432
425
  * - Uses `Omit<Client, "search">` to remove `search()` from `Client`.
433
426
  * - Defines a new `search<T>()` method with stricter type safety.
434
427
  */
435
428
  interface OpenSearchClient extends Omit<Client, 'search' | 'index' | 'bulk' | 'indices'> {
436
- search<T extends IndexDefinition>(params: SearchRequest<T>, options?: TransportRequestOptions): TransportRequestPromise<SearchResponse<T>>;
437
- index<T extends IndexDefinition>(params: IndexRequest<T>, options?: TransportRequestOptions): TransportRequestPromise<API.Index_Response>;
438
- bulk<T extends IndexDefinition>(params: BulkRequest<T>, options?: TransportRequestOptions): TransportRequestPromise<BulkResponse<T>>;
439
- indices: TypedIndices;
429
+ search<T extends IndexDefinition>(params: SearchRequest<T>, options?: TransportRequestOptions): TransportRequestPromise<SearchResponse<T>>;
430
+ index<T extends IndexDefinition>(params: IndexRequest<T>, options?: TransportRequestOptions): TransportRequestPromise<API.Index_Response>;
431
+ bulk<T extends IndexDefinition>(params: BulkRequest<T>, options?: TransportRequestOptions): TransportRequestPromise<BulkResponse<T>>;
432
+ indices: TypedIndices;
440
433
  }
434
+ /**
435
+ * ✅ Constructor type that ensures `new OpenSearchClient()` works.
436
+ * - This type is necessary because `OpenSearchClient` is actually a function (not a class).
437
+ */
438
+ type OpenSearchClientConstructor = new (...args: ConstructorParameters<typeof Client>) => OpenSearchClient;
441
439
  /**
442
440
  * ✅ A function that behaves like a class constructor.
443
441
  * - Instantiates a new `Client` internally.
@@ -445,7 +443,8 @@ interface OpenSearchClient extends Omit<Client, 'search' | 'index' | 'bulk' | 'i
445
443
  * - The `as unknown as` trick ensures `new OpenSearchClient()` is valid.
446
444
  */
447
445
  declare const OpenSearchClient: OpenSearchClientConstructor;
448
-
446
+ //#endregion
447
+ //#region src/helpers.d.ts
449
448
  type IdFunction<T extends IndexDefinition> = (doc: DocumentFor<T>) => Types.Common.Id;
450
449
  /**
451
450
  * Constructs a bulk request payload for indexing documents.
@@ -499,5 +498,6 @@ declare function bulkUpdate<T extends IndexDefinition>(index: T['index'], update
499
498
  * @returns A BulkRequest payload for delete operations.
500
499
  */
501
500
  declare function bulkDelete<T extends IndexDefinition>(index: T['index'], ids: Types.Common.Id[]): BulkRequest<T>;
502
-
503
- export { type BoolQuery, type BoostingQuery, type BulkRequest, type BulkResponse, type CombinedFieldsQuery, type CommonTermsQuery, type ConstantScoreQuery, type DecayFunction, type DecayFunctionBase, type DeepPartial, type DisMaxQuery, type DistanceFeatureQuery, type DocumentFor, type ExistsQuery, type FieldAndFormat, type FieldQuery, type FieldValueFactorScoreFunction, type FunctionBoostMode, type FunctionScoreQuery, type FuzzyQuery, type GeoBoundingBoxQuery, type GeoDistanceQuery, type GeoExecution, type GeoPolygonQuery, type GeoShapeQuery, type GeoValidationMethod, type HasChildQuery, type HasParentQuery, type HybridQuery, type IdFunction, type IdsQuery, type IndexDefinition, type IndexRequest, type IndexResponse, type IndicesCreateRequestBody, type IntervalsQuery, type KnnQuery, type Like, type LikeDocument, type MatchAllQuery, type MatchBoolPrefixQuery, type MatchNoneQuery, type MatchPhrasePrefixQuery, type MatchPhraseQuery, type MatchQuery, type MoreLikeThisQuery, type MultiMatchQuery, type NestedQuery, type NeuralQuery, type NumberRangeQueryParameters, OpenSearchClient, type ParentIdQuery, type PercolateQuery, type PinnedQuery, type PrefixQuery, type Primitive, type Property, type QueryContainer, type QueryStringQuery, type RangeQuery, type RankFeatureQuery, type RegexpQuery, type ScriptQuery, type ScriptScoreQuery, type SearchRequest, type SearchResponse, type SimpleQueryStringQuery, type SpanContainingQuery, type SpanFieldMaskingQuery, type SpanFirstQuery, type SpanMultiTermQuery, type SpanNearQuery, type SpanNotQuery, type SpanOrQuery, type SpanQuery, type SpanTermQuery, type SpanWithinQuery, type TermQuery, type TermsQuery, type TermsSetQuery, type TypeMapping, type TypeQuery, type UpdateAction, type WildcardQuery, type WrapperQuery, type XyShapeQuery, bulkCreate, bulkDelete, bulkIndex, bulkUpdate };
501
+ //#endregion
502
+ export { BoolQuery, BoostingQuery, type BulkRequest, type BulkResponse, CombinedFieldsQuery, CommonTermsQuery, ConstantScoreQuery, DecayFunction, DecayFunctionBase, type DeepPartial, DisMaxQuery, DistanceFeatureQuery, type DocumentFor, ExistsQuery, FieldAndFormat, FieldQuery, FieldValueFactorScoreFunction, FunctionBoostMode, FunctionScoreQuery, FuzzyQuery, GeoBoundingBoxQuery, GeoDistanceQuery, GeoExecution, GeoPolygonQuery, GeoShapeQuery, GeoValidationMethod, HasChildQuery, HasParentQuery, HybridQuery, IdFunction, IdsQuery, type IndexDefinition, type IndexRequest, type IndexResponse, type IndicesCreateRequestBody, IntervalsQuery, KnnQuery, Like, LikeDocument, MatchAllQuery, MatchBoolPrefixQuery, MatchNoneQuery, MatchPhrasePrefixQuery, MatchPhraseQuery, MatchQuery, MoreLikeThisQuery, MultiMatchQuery, NestedQuery, NeuralQuery, NumberRangeQueryParameters, OpenSearchClient, ParentIdQuery, PercolateQuery, PinnedQuery, PrefixQuery, type Primitive, type Property, QueryContainer, QueryStringQuery, RangeQuery, RankFeatureQuery, RegexpQuery, ScriptQuery, ScriptScoreQuery, type SearchRequest, type SearchResponse, SimpleQueryStringQuery, SpanContainingQuery, SpanFieldMaskingQuery, SpanFirstQuery, SpanMultiTermQuery, SpanNearQuery, SpanNotQuery, SpanOrQuery, SpanQuery, SpanTermQuery, SpanWithinQuery, TermQuery, TermsQuery, TermsSetQuery, type TypeMapping, TypeQuery, type UpdateAction, WildcardQuery, WrapperQuery, XyShapeQuery, bulkCreate, bulkDelete, bulkIndex, bulkUpdate };
503
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/types/utilityTypes.ts","../src/types/common.ts","../src/types/documents.ts","../src/types/bulk.ts","../src/types/queries.ts","../src/types/core_search.ts","../src/types/search.ts","../src/types/indx.ts","../src/client.ts","../src/helpers.ts"],"sourcesContent":[],"mappings":";;;KAAY,+BACE,KAAK,EAAE,oBAAoB,YAAY,EAAE,MAAM,EAAE;AADnD,KAIA,WAJW,CAAA,CAAA,EAAA,eAAA,MAAA,GAAA,EAAA,CAAA,GAIkC,CAJlC,SAAA,MAAA,GAAA,QACT,MAKI,CALJ,GAAA,MAAA,GAAA,GAMD,MANC,GAMQ,MANR,SAAA,EAAA,GAAA,EAAA,GAAA,GAAA,GAMuC,CANvC,EAAA,GAOJ,WAPI,CAOQ,CAPR,CAOU,CAPV,CAAA,EAAA,GAOiB,MAPjB,GAO0B,MAP1B,SAAA,EAAA,GAAA,EAAA,GAAA,GAAA,GAOyD,CAPzD,EAAA,CAAA,EAAK,CAA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xCK,CSwCO,CTxCP,CAAA;;;;;;;;;AAcR;;;;ACnBY,iBQiEI,URjES,CAAM,UQiEM,eRjEW,CAAA,CAAA,KAAA,EQkEvC,CRlEuC,CAAA,OAAA,CAAA,EAAA,OAAA,EQmErC,YRnEqC,CQmExB,CRnEwB,CAAA,EAAA,EAAA,IAAA,EQoExC,URpEwC,CQoE7B,CRpE6B,CAAA,CAAA,EQqE7C,WRrE6C,CQqEjC,CRrEiC,CAAA;AAKhD;AAKA;;;;;;AAUA;;;;;AAUY,iBQ8DI,UR9DW,CAAA,UQ8DU,eR9DV,CAAA,CAAA,KAAA,EQ+DlB,CR/DkB,CAAA,OAAA,CAAA,EAAA,GAAA,EQgEpB,KAAA,CAAM,MAAA,CAAO,ERhEO,EAAA,CAAA,EQiExB,WRjEwB,CQiEZ,CRjEY,CAAA"}
package/dist/index.mjs ADDED
@@ -0,0 +1,99 @@
1
+ import { Client } from "@opensearch-project/opensearch";
2
+
3
+ //#region src/client.ts
4
+ /**
5
+ * ✅ A function that behaves like a class constructor.
6
+ * - Instantiates a new `Client` internally.
7
+ * - Casts the instance to `OpenSearchClient` so TypeScript recognizes the new `search<T>()` signature.
8
+ * - The `as unknown as` trick ensures `new OpenSearchClient()` is valid.
9
+ */
10
+ const OpenSearchClient = function(...args) {
11
+ return new Client(...args);
12
+ };
13
+
14
+ //#endregion
15
+ //#region src/helpers.ts
16
+ /**
17
+ * Constructs a bulk request payload for indexing documents.
18
+ *
19
+ * For each document in the provided array, this helper creates a two‑line bulk operation:
20
+ * 1. An action object for an index operation. If an id generator is provided, its result is used as _id.
21
+ * 2. The document itself.
22
+ *
23
+ * @param index - The name of the index.
24
+ * @param docs - An array of documents to insert.
25
+ * @param idFn - Optional function that returns an _id for a given document.
26
+ * @returns A BulkRequest payload for insert operations.
27
+ */
28
+ function bulkIndex(index, docs, idFn) {
29
+ return {
30
+ index,
31
+ body: docs.flatMap((doc) => {
32
+ return [{ index: idFn ? { _id: idFn(doc) } : {} }, doc];
33
+ })
34
+ };
35
+ }
36
+ /**
37
+ * Constructs a bulk request payload for creating documents.
38
+ *
39
+ * For each document in the provided array, this helper creates a two‑line bulk operation:
40
+ * 1. An action object for a create operation with a generated _id.
41
+ * 2. The document itself.
42
+ *
43
+ * @param index - The name of the index.
44
+ * @param docs - An array of documents to create.
45
+ * @param idFn - A function that returns a unique _id for each document.
46
+ * @returns A BulkRequest payload for create operations.
47
+ */
48
+ function bulkCreate(index, docs, idFn) {
49
+ return {
50
+ index,
51
+ body: docs.flatMap((doc) => {
52
+ return [{ create: { _id: idFn(doc) } }, doc];
53
+ })
54
+ };
55
+ }
56
+ /**
57
+ * Constructs a bulk request payload for update operations.
58
+ *
59
+ * This helper takes an array of update actions (of type UpdateAction<T>),
60
+ * splits each into its action metadata and payload (with the `doc` and/or `upsert` properties),
61
+ * and returns a BulkRequest payload formatted as a flat array.
62
+ *
63
+ * @param index - The name of the index.
64
+ * @param updates - An array of update actions.
65
+ * @param idFn - A function that returns a unique _id for each document.
66
+ * @returns A BulkRequest payload for update operations.
67
+ */
68
+ function bulkUpdate(index, updates, idFn) {
69
+ return {
70
+ index,
71
+ body: updates.flatMap((update) => {
72
+ return [{ update: { _id: idFn(update.doc || update.upsert) } }, update];
73
+ })
74
+ };
75
+ }
76
+ /**
77
+ * Constructs a bulk request payload for deleting documents.
78
+ *
79
+ * For each document in the provided array, this helper creates a single‑line bulk operation:
80
+ * { delete: { _id: <id> } }
81
+ * The provided id generator function is used to compute the _id for each document.
82
+ *
83
+ * @param index - The name of the index.
84
+ * @param docs - An array of documents to delete.
85
+ * @param idFn - A function that returns the _id for a given document.
86
+ * @returns A BulkRequest payload for delete operations.
87
+ */
88
+ function bulkDelete(index, ids) {
89
+ return {
90
+ index,
91
+ body: ids.map((_id) => {
92
+ return { delete: { _id } };
93
+ })
94
+ };
95
+ }
96
+
97
+ //#endregion
98
+ export { OpenSearchClient, bulkCreate, bulkDelete, bulkIndex, bulkUpdate };
99
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":["OpenSearchClient: OpenSearchClientConstructor"],"sources":["../src/client.ts","../src/helpers.ts"],"sourcesContent":["import { type API, Client } from '@opensearch-project/opensearch'\nimport type {\n BulkRequest,\n BulkResponse,\n IndexDefinition,\n IndexRequest,\n SearchRequest,\n SearchResponse,\n} from './types'\nimport type {\n Indices,\n TransportRequestOptions,\n TransportRequestPromise,\n} from './types/common'\nimport type { IndicesExistsRequest } from './types/indx'\n\ntype TypedIndices = Omit<Indices, 'exists'> & {\n exists<T extends IndexDefinition>(\n params: IndicesExistsRequest<T>,\n options?: TransportRequestOptions\n ): TransportRequestPromise<API.Indices_Exists_Response>\n}\n\n/**\n * ✅ Custom interface that extends `Client`, but replaces the `search()` method signature.\n * - Uses `Omit<Client, \"search\">` to remove `search()` from `Client`.\n * - Defines a new `search<T>()` method with stricter type safety.\n */\nexport interface OpenSearchClient\n extends Omit<Client, 'search' | 'index' | 'bulk' | 'indices'> {\n search<T extends IndexDefinition>(\n params: SearchRequest<T>,\n options?: TransportRequestOptions\n ): TransportRequestPromise<SearchResponse<T>>\n\n index<T extends IndexDefinition>(\n params: IndexRequest<T>,\n options?: TransportRequestOptions\n ): TransportRequestPromise<API.Index_Response>\n\n bulk<T extends IndexDefinition>(\n params: BulkRequest<T>,\n options?: TransportRequestOptions\n ): TransportRequestPromise<BulkResponse<T>>\n\n indices: TypedIndices\n}\n\n/**\n * ✅ Constructor type that ensures `new OpenSearchClient()` works.\n * - This type is necessary because `OpenSearchClient` is actually a function (not a class).\n */\ntype OpenSearchClientConstructor = new (\n ...args: ConstructorParameters<typeof Client>\n) => OpenSearchClient\n\n/**\n * ✅ A function that behaves like a class constructor.\n * - Instantiates a new `Client` internally.\n * - Casts the instance to `OpenSearchClient` so TypeScript recognizes the new `search<T>()` signature.\n * - The `as unknown as` trick ensures `new OpenSearchClient()` is valid.\n */\nexport const OpenSearchClient: OpenSearchClientConstructor = function (\n this: Client,\n ...args: ConstructorParameters<typeof Client>\n) {\n const clientInstance = new Client(...args)\n return clientInstance as unknown as OpenSearchClient\n} as unknown as {\n new (...args: ConstructorParameters<typeof Client>): OpenSearchClient\n}\n","import type { Types } from '@opensearch-project/opensearch'\nimport type {\n BulkRequest,\n CreateOperation,\n DeleteOperation,\n IndexOperation,\n UpdateAction,\n UpdateOperation,\n} from './types/bulk'\nimport type { IndexDefinition } from './types/common'\nimport type { DocumentFor } from './types/documents'\n\nexport type IdFunction<T extends IndexDefinition> = (\n doc: DocumentFor<T>\n) => Types.Common.Id\n\n/**\n * Constructs a bulk request payload for indexing documents.\n *\n * For each document in the provided array, this helper creates a two‑line bulk operation:\n * 1. An action object for an index operation. If an id generator is provided, its result is used as _id.\n * 2. The document itself.\n *\n * @param index - The name of the index.\n * @param docs - An array of documents to insert.\n * @param idFn - Optional function that returns an _id for a given document.\n * @returns A BulkRequest payload for insert operations.\n */\nexport function bulkIndex<T extends IndexDefinition>(\n index: T['index'],\n docs: DocumentFor<T>[],\n idFn?: IdFunction<T>\n): BulkRequest<T> {\n const body = docs.flatMap((doc) => {\n const op: IndexOperation<T> = idFn ? { _id: idFn(doc) } : {}\n return [{ index: op }, doc]\n })\n return { index, body }\n}\n\n/**\n * Constructs a bulk request payload for creating documents.\n *\n * For each document in the provided array, this helper creates a two‑line bulk operation:\n * 1. An action object for a create operation with a generated _id.\n * 2. The document itself.\n *\n * @param index - The name of the index.\n * @param docs - An array of documents to create.\n * @param idFn - A function that returns a unique _id for each document.\n * @returns A BulkRequest payload for create operations.\n */\nexport function bulkCreate<T extends IndexDefinition>(\n index: T['index'],\n docs: DocumentFor<T>[],\n idFn: IdFunction<T>\n): BulkRequest<T> {\n const body = docs.flatMap((doc) => {\n const op: CreateOperation<T> = { _id: idFn(doc) }\n return [{ create: op }, doc]\n })\n return { index, body }\n}\n\n/**\n * Constructs a bulk request payload for update operations.\n *\n * This helper takes an array of update actions (of type UpdateAction<T>),\n * splits each into its action metadata and payload (with the `doc` and/or `upsert` properties),\n * and returns a BulkRequest payload formatted as a flat array.\n *\n * @param index - The name of the index.\n * @param updates - An array of update actions.\n * @param idFn - A function that returns a unique _id for each document.\n * @returns A BulkRequest payload for update operations.\n */\nexport function bulkUpdate<T extends IndexDefinition>(\n index: T['index'],\n updates: UpdateAction<T>[],\n idFn: IdFunction<T>\n): BulkRequest<T> {\n const body = updates.flatMap((update) => {\n const op: UpdateOperation<T> = {\n _id: idFn((update.doc as DocumentFor<T>) || update.upsert),\n }\n return [{ update: op }, update]\n })\n\n return { index, body }\n}\n\n/**\n * Constructs a bulk request payload for deleting documents.\n *\n * For each document in the provided array, this helper creates a single‑line bulk operation:\n * { delete: { _id: <id> } }\n * The provided id generator function is used to compute the _id for each document.\n *\n * @param index - The name of the index.\n * @param docs - An array of documents to delete.\n * @param idFn - A function that returns the _id for a given document.\n * @returns A BulkRequest payload for delete operations.\n */\nexport function bulkDelete<T extends IndexDefinition>(\n index: T['index'],\n ids: Types.Common.Id[]\n): BulkRequest<T> {\n const body = ids.map((_id) => {\n const op: DeleteOperation<T> = { _id }\n return { delete: op }\n })\n return { index, body }\n}\n"],"mappings":";;;;;;;;;AA8DA,MAAaA,mBAAgD,SAE3D,GAAG,MACH;AAEA,QADuB,IAAI,OAAO,GAAG,KAAK;;;;;;;;;;;;;;;;;ACtC5C,SAAgB,UACd,OACA,MACA,MACgB;AAKhB,QAAO;EAAE;EAAO,MAJH,KAAK,SAAS,QAAQ;AAEjC,UAAO,CAAC,EAAE,OADoB,OAAO,EAAE,KAAK,KAAK,IAAI,EAAE,GAAG,EAAE,EACvC,EAAE,IAAI;IAC3B;EACoB;;;;;;;;;;;;;;AAexB,SAAgB,WACd,OACA,MACA,MACgB;AAKhB,QAAO;EAAE;EAAO,MAJH,KAAK,SAAS,QAAQ;AAEjC,UAAO,CAAC,EAAE,QADqB,EAAE,KAAK,KAAK,IAAI,EAAE,EAC3B,EAAE,IAAI;IAC5B;EACoB;;;;;;;;;;;;;;AAexB,SAAgB,WACd,OACA,SACA,MACgB;AAQhB,QAAO;EAAE;EAAO,MAPH,QAAQ,SAAS,WAAW;AAIvC,UAAO,CAAC,EAAE,QAHqB,EAC7B,KAAK,KAAM,OAAO,OAA0B,OAAO,OAAO,EAC3D,EACqB,EAAE,OAAO;IAC/B;EAEoB;;;;;;;;;;;;;;AAexB,SAAgB,WACd,OACA,KACgB;AAKhB,QAAO;EAAE;EAAO,MAJH,IAAI,KAAK,QAAQ;AAE5B,UAAO,EAAE,QADsB,EAAE,KAAK,EACjB;IACrB;EACoB"}
package/package.json CHANGED
@@ -1,15 +1,21 @@
1
1
  {
2
2
  "name": "@sebspark/opensearch",
3
- "version": "2.1.0",
3
+ "version": "3.0.1",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
6
+ "main": "dist/index.mjs",
7
+ "types": "dist/index.d.mts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.mts",
11
+ "import": "./dist/index.mjs"
12
+ }
13
+ },
8
14
  "files": [
9
15
  "dist"
10
16
  ],
11
17
  "scripts": {
12
- "build": "tsup src/index.ts --config ./tsup.config.ts",
18
+ "build": "spark-build src/index.ts",
13
19
  "dev": "tsc --watch --noEmit",
14
20
  "lint": "biome check .",
15
21
  "test": "vitest run --passWithNoTests --coverage",
package/dist/index.js DELETED
@@ -1,46 +0,0 @@
1
- // src/client.ts
2
- import { Client } from "@opensearch-project/opensearch";
3
- var OpenSearchClient = function(...args) {
4
- const clientInstance = new Client(...args);
5
- return clientInstance;
6
- };
7
-
8
- // src/helpers.ts
9
- function bulkIndex(index, docs, idFn) {
10
- const body = docs.flatMap((doc) => {
11
- const op = idFn ? { _id: idFn(doc) } : {};
12
- return [{ index: op }, doc];
13
- });
14
- return { index, body };
15
- }
16
- function bulkCreate(index, docs, idFn) {
17
- const body = docs.flatMap((doc) => {
18
- const op = { _id: idFn(doc) };
19
- return [{ create: op }, doc];
20
- });
21
- return { index, body };
22
- }
23
- function bulkUpdate(index, updates, idFn) {
24
- const body = updates.flatMap((update) => {
25
- const op = {
26
- _id: idFn(update.doc || update.upsert)
27
- };
28
- return [{ update: op }, update];
29
- });
30
- return { index, body };
31
- }
32
- function bulkDelete(index, ids) {
33
- const body = ids.map((_id) => {
34
- const op = { _id };
35
- return { delete: op };
36
- });
37
- return { index, body };
38
- }
39
- export {
40
- OpenSearchClient,
41
- bulkCreate,
42
- bulkDelete,
43
- bulkIndex,
44
- bulkUpdate
45
- };
46
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/client.ts","../src/helpers.ts"],"sourcesContent":["import { type API, Client } from '@opensearch-project/opensearch'\nimport type {\n BulkRequest,\n BulkResponse,\n IndexDefinition,\n IndexRequest,\n SearchRequest,\n SearchResponse,\n} from './types'\nimport type {\n Indices,\n TransportRequestOptions,\n TransportRequestPromise,\n} from './types/common'\nimport type { IndicesExistsRequest } from './types/indx'\n\ntype TypedIndices = Omit<Indices, 'exists'> & {\n exists<T extends IndexDefinition>(\n params: IndicesExistsRequest<T>,\n options?: TransportRequestOptions\n ): TransportRequestPromise<API.Indices_Exists_Response>\n}\n\n/**\n * ✅ Custom interface that extends `Client`, but replaces the `search()` method signature.\n * - Uses `Omit<Client, \"search\">` to remove `search()` from `Client`.\n * - Defines a new `search<T>()` method with stricter type safety.\n */\nexport interface OpenSearchClient\n extends Omit<Client, 'search' | 'index' | 'bulk' | 'indices'> {\n search<T extends IndexDefinition>(\n params: SearchRequest<T>,\n options?: TransportRequestOptions\n ): TransportRequestPromise<SearchResponse<T>>\n\n index<T extends IndexDefinition>(\n params: IndexRequest<T>,\n options?: TransportRequestOptions\n ): TransportRequestPromise<API.Index_Response>\n\n bulk<T extends IndexDefinition>(\n params: BulkRequest<T>,\n options?: TransportRequestOptions\n ): TransportRequestPromise<BulkResponse<T>>\n\n indices: TypedIndices\n}\n\n/**\n * ✅ Constructor type that ensures `new OpenSearchClient()` works.\n * - This type is necessary because `OpenSearchClient` is actually a function (not a class).\n */\ntype OpenSearchClientConstructor = new (\n ...args: ConstructorParameters<typeof Client>\n) => OpenSearchClient\n\n/**\n * ✅ A function that behaves like a class constructor.\n * - Instantiates a new `Client` internally.\n * - Casts the instance to `OpenSearchClient` so TypeScript recognizes the new `search<T>()` signature.\n * - The `as unknown as` trick ensures `new OpenSearchClient()` is valid.\n */\nexport const OpenSearchClient: OpenSearchClientConstructor = function (\n this: Client,\n ...args: ConstructorParameters<typeof Client>\n) {\n const clientInstance = new Client(...args)\n return clientInstance as unknown as OpenSearchClient\n} as unknown as {\n new (...args: ConstructorParameters<typeof Client>): OpenSearchClient\n}\n","import type { Types } from '@opensearch-project/opensearch'\nimport type {\n BulkRequest,\n CreateOperation,\n DeleteOperation,\n IndexOperation,\n UpdateAction,\n UpdateOperation,\n} from './types/bulk'\nimport type { IndexDefinition } from './types/common'\nimport type { DocumentFor } from './types/documents'\n\nexport type IdFunction<T extends IndexDefinition> = (\n doc: DocumentFor<T>\n) => Types.Common.Id\n\n/**\n * Constructs a bulk request payload for indexing documents.\n *\n * For each document in the provided array, this helper creates a two‑line bulk operation:\n * 1. An action object for an index operation. If an id generator is provided, its result is used as _id.\n * 2. The document itself.\n *\n * @param index - The name of the index.\n * @param docs - An array of documents to insert.\n * @param idFn - Optional function that returns an _id for a given document.\n * @returns A BulkRequest payload for insert operations.\n */\nexport function bulkIndex<T extends IndexDefinition>(\n index: T['index'],\n docs: DocumentFor<T>[],\n idFn?: IdFunction<T>\n): BulkRequest<T> {\n const body = docs.flatMap((doc) => {\n const op: IndexOperation<T> = idFn ? { _id: idFn(doc) } : {}\n return [{ index: op }, doc]\n })\n return { index, body }\n}\n\n/**\n * Constructs a bulk request payload for creating documents.\n *\n * For each document in the provided array, this helper creates a two‑line bulk operation:\n * 1. An action object for a create operation with a generated _id.\n * 2. The document itself.\n *\n * @param index - The name of the index.\n * @param docs - An array of documents to create.\n * @param idFn - A function that returns a unique _id for each document.\n * @returns A BulkRequest payload for create operations.\n */\nexport function bulkCreate<T extends IndexDefinition>(\n index: T['index'],\n docs: DocumentFor<T>[],\n idFn: IdFunction<T>\n): BulkRequest<T> {\n const body = docs.flatMap((doc) => {\n const op: CreateOperation<T> = { _id: idFn(doc) }\n return [{ create: op }, doc]\n })\n return { index, body }\n}\n\n/**\n * Constructs a bulk request payload for update operations.\n *\n * This helper takes an array of update actions (of type UpdateAction<T>),\n * splits each into its action metadata and payload (with the `doc` and/or `upsert` properties),\n * and returns a BulkRequest payload formatted as a flat array.\n *\n * @param index - The name of the index.\n * @param updates - An array of update actions.\n * @param idFn - A function that returns a unique _id for each document.\n * @returns A BulkRequest payload for update operations.\n */\nexport function bulkUpdate<T extends IndexDefinition>(\n index: T['index'],\n updates: UpdateAction<T>[],\n idFn: IdFunction<T>\n): BulkRequest<T> {\n const body = updates.flatMap((update) => {\n const op: UpdateOperation<T> = {\n _id: idFn((update.doc as DocumentFor<T>) || update.upsert),\n }\n return [{ update: op }, update]\n })\n\n return { index, body }\n}\n\n/**\n * Constructs a bulk request payload for deleting documents.\n *\n * For each document in the provided array, this helper creates a single‑line bulk operation:\n * { delete: { _id: <id> } }\n * The provided id generator function is used to compute the _id for each document.\n *\n * @param index - The name of the index.\n * @param docs - An array of documents to delete.\n * @param idFn - A function that returns the _id for a given document.\n * @returns A BulkRequest payload for delete operations.\n */\nexport function bulkDelete<T extends IndexDefinition>(\n index: T['index'],\n ids: Types.Common.Id[]\n): BulkRequest<T> {\n const body = ids.map((_id) => {\n const op: DeleteOperation<T> = { _id }\n return { delete: op }\n })\n return { index, body }\n}\n"],"mappings":";AAAA,SAAmB,cAAc;AA8D1B,IAAM,mBAAgD,YAExD,MACH;AACA,QAAM,iBAAiB,IAAI,OAAO,GAAG,IAAI;AACzC,SAAO;AACT;;;ACxCO,SAAS,UACd,OACA,MACA,MACgB;AAChB,QAAM,OAAO,KAAK,QAAQ,CAAC,QAAQ;AACjC,UAAM,KAAwB,OAAO,EAAE,KAAK,KAAK,GAAG,EAAE,IAAI,CAAC;AAC3D,WAAO,CAAC,EAAE,OAAO,GAAG,GAAG,GAAG;AAAA,EAC5B,CAAC;AACD,SAAO,EAAE,OAAO,KAAK;AACvB;AAcO,SAAS,WACd,OACA,MACA,MACgB;AAChB,QAAM,OAAO,KAAK,QAAQ,CAAC,QAAQ;AACjC,UAAM,KAAyB,EAAE,KAAK,KAAK,GAAG,EAAE;AAChD,WAAO,CAAC,EAAE,QAAQ,GAAG,GAAG,GAAG;AAAA,EAC7B,CAAC;AACD,SAAO,EAAE,OAAO,KAAK;AACvB;AAcO,SAAS,WACd,OACA,SACA,MACgB;AAChB,QAAM,OAAO,QAAQ,QAAQ,CAAC,WAAW;AACvC,UAAM,KAAyB;AAAA,MAC7B,KAAK,KAAM,OAAO,OAA0B,OAAO,MAAM;AAAA,IAC3D;AACA,WAAO,CAAC,EAAE,QAAQ,GAAG,GAAG,MAAM;AAAA,EAChC,CAAC;AAED,SAAO,EAAE,OAAO,KAAK;AACvB;AAcO,SAAS,WACd,OACA,KACgB;AAChB,QAAM,OAAO,IAAI,IAAI,CAAC,QAAQ;AAC5B,UAAM,KAAyB,EAAE,IAAI;AACrC,WAAO,EAAE,QAAQ,GAAG;AAAA,EACtB,CAAC;AACD,SAAO,EAAE,OAAO,KAAK;AACvB;","names":[]}