@opensearch-project/opensearch 3.0.0-beta.9 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/api/OpenSearchApi.d.ts +126 -3
  2. package/api/_core/search.d.ts +2 -1
  3. package/api/_core/updateByQueryRethrottle.d.ts +1 -0
  4. package/api/_types/_common.analysis.d.ts +1 -1
  5. package/api/_types/_common.d.ts +19 -14
  6. package/api/_types/_global.d.ts +2 -1
  7. package/api/_types/{cat._common.d.ts → cat.segment_replication.d.ts} +1 -18
  8. package/api/_types/cat.snapshots.d.ts +1 -1
  9. package/api/_types/cluster.stats.d.ts +0 -18
  10. package/api/_types/index.d.ts +233 -0
  11. package/api/_types/indices._common.d.ts +1 -13
  12. package/api/_types/indices.analyze.d.ts +2 -1
  13. package/api/_types/indices.shard_stores.d.ts +2 -2
  14. package/api/_types/indices.stats.d.ts +3 -1
  15. package/api/_types/ingest._common.d.ts +3 -40
  16. package/api/_types/ml._common.d.ts +367 -11
  17. package/api/_types/nodes._common.d.ts +0 -631
  18. package/api/_types/nodes.info.d.ts +30 -25
  19. package/api/_types/nodes.reload_secure_settings.d.ts +8 -4
  20. package/api/_types/nodes.stats.d.ts +634 -4
  21. package/api/_types/nodes.usage.d.ts +1 -7
  22. package/api/cat/aliases.js +1 -1
  23. package/api/cat/allPitSegments.d.ts +2 -2
  24. package/api/cat/allPitSegments.js +6 -6
  25. package/api/cat/clusterManager.js +1 -1
  26. package/api/cat/count.js +5 -5
  27. package/api/cat/fielddata.js +6 -6
  28. package/api/cat/health.js +5 -5
  29. package/api/cat/indices.js +14 -14
  30. package/api/cat/master.js +7 -7
  31. package/api/cat/nodeattrs.js +7 -7
  32. package/api/cat/nodes.d.ts +1 -1
  33. package/api/cat/nodes.js +11 -11
  34. package/api/cat/pendingTasks.js +9 -9
  35. package/api/cat/pitSegments.d.ts +2 -2
  36. package/api/cat/pitSegments.js +6 -6
  37. package/api/cat/plugins.js +8 -8
  38. package/api/cat/recovery.js +8 -8
  39. package/api/cat/repositories.js +8 -8
  40. package/api/cat/segmentReplication.d.ts +2 -2
  41. package/api/cat/segmentReplication.js +18 -17
  42. package/api/cat/segments.js +8 -8
  43. package/api/cat/shards.js +10 -10
  44. package/api/cat/snapshots.js +9 -9
  45. package/api/cat/tasks.js +8 -8
  46. package/api/cat/templates.js +8 -8
  47. package/api/cat/threadPool.js +8 -8
  48. package/api/cluster/getComponentTemplate.d.ts +1 -0
  49. package/api/cluster/getComponentTemplate.js +1 -0
  50. package/api/cluster/reroute.d.ts +1 -2
  51. package/api/cluster/state.d.ts +1 -1
  52. package/api/cluster/stats.d.ts +9 -1
  53. package/api/index.d.ts +58 -2
  54. package/api/indices/addBlock.d.ts +1 -2
  55. package/api/indices/clone.d.ts +2 -3
  56. package/api/indices/close.d.ts +1 -2
  57. package/api/indices/putTemplate.d.ts +1 -1
  58. package/api/indices/rollover.d.ts +2 -3
  59. package/api/indices/shardStores.d.ts +1 -1
  60. package/api/indices/shrink.d.ts +2 -3
  61. package/api/indices/split.d.ts +1 -2
  62. package/api/indices/stats.d.ts +1 -1
  63. package/api/indices/upgrade.d.ts +3 -2
  64. package/api/indices/upgrade.js +0 -1
  65. package/api/ml/_api.js +80 -0
  66. package/api/ml/chunkModel.d.ts +37 -0
  67. package/api/ml/chunkModel.js +53 -0
  68. package/api/ml/createConnector.d.ts +1 -1
  69. package/api/ml/createMemory.d.ts +36 -0
  70. package/api/ml/createMemory.js +47 -0
  71. package/api/ml/createMessage.d.ts +42 -0
  72. package/api/ml/createMessage.js +50 -0
  73. package/api/ml/createModelMeta.d.ts +46 -0
  74. package/api/ml/createModelMeta.js +47 -0
  75. package/api/ml/deleteMemory.d.ts +31 -0
  76. package/api/ml/deleteMemory.js +49 -0
  77. package/api/ml/getConnector.d.ts +30 -0
  78. package/api/ml/getConnector.js +49 -0
  79. package/api/ml/getMemory.d.ts +36 -0
  80. package/api/ml/getMemory.js +49 -0
  81. package/api/ml/getMessage.d.ts +31 -0
  82. package/api/ml/getMessage.js +55 -0
  83. package/api/ml/getMessageTraces.d.ts +30 -0
  84. package/api/ml/getMessageTraces.js +49 -0
  85. package/api/ml/getModel.d.ts +30 -0
  86. package/api/ml/getModel.js +49 -0
  87. package/api/ml/loadModel.d.ts +33 -0
  88. package/api/ml/loadModel.js +49 -0
  89. package/api/ml/predict.d.ts +40 -0
  90. package/api/ml/predict.js +53 -0
  91. package/api/ml/predictModel.d.ts +36 -0
  92. package/api/ml/predictModel.js +50 -0
  93. package/api/ml/registerModel.d.ts +4 -3
  94. package/api/ml/registerModelMeta.d.ts +46 -0
  95. package/api/ml/registerModelMeta.js +47 -0
  96. package/api/ml/searchConnectors.d.ts +36 -0
  97. package/api/ml/searchConnectors.js +47 -0
  98. package/api/ml/searchMemory.d.ts +36 -0
  99. package/api/ml/searchMemory.js +47 -0
  100. package/api/ml/searchMessage.d.ts +37 -0
  101. package/api/ml/searchMessage.js +50 -0
  102. package/api/ml/searchModelGroup.d.ts +36 -0
  103. package/api/ml/searchModelGroup.js +47 -0
  104. package/api/ml/searchModels.d.ts +3 -2
  105. package/api/ml/searchModels.js +1 -1
  106. package/api/ml/train.d.ts +37 -0
  107. package/api/ml/train.js +50 -0
  108. package/api/ml/trainPredict.d.ts +38 -0
  109. package/api/ml/trainPredict.js +50 -0
  110. package/api/ml/undeployModel.d.ts +8 -1
  111. package/api/ml/undeployModel.js +5 -5
  112. package/api/ml/unloadModel.d.ts +37 -0
  113. package/api/ml/unloadModel.js +49 -0
  114. package/api/ml/updateConnector.d.ts +45 -0
  115. package/api/ml/updateConnector.js +50 -0
  116. package/api/ml/updateMemory.d.ts +35 -0
  117. package/api/ml/updateMemory.js +50 -0
  118. package/api/ml/updateMessage.d.ts +40 -0
  119. package/api/ml/updateMessage.js +50 -0
  120. package/api/ml/updateModel.d.ts +43 -0
  121. package/api/ml/updateModel.js +50 -0
  122. package/api/ml/updateModelGroup.d.ts +40 -0
  123. package/api/ml/updateModelGroup.js +50 -0
  124. package/api/ml/uploadChunk.d.ts +37 -0
  125. package/api/ml/uploadChunk.js +53 -0
  126. package/api/ml/uploadModel.d.ts +41 -0
  127. package/api/ml/uploadModel.js +47 -0
  128. package/api/nodes/info.d.ts +5 -1
  129. package/api/nodes/reloadSecureSettings.d.ts +5 -1
  130. package/api/nodes/stats.d.ts +5 -1
  131. package/api/nodes/usage.d.ts +5 -1
  132. package/api/tasks/cancel.d.ts +1 -1
  133. package/api/tasks/list.d.ts +1 -1
  134. package/index.d.ts +2 -0
  135. package/package.json +1 -1
@@ -124,11 +124,6 @@ export type IndexingSlowlogThresholds = {
124
124
  index?: SlowlogThresholdLevels;
125
125
  }
126
126
 
127
- export type IndexPostUpgradeStatus = {
128
- _shards?: Common.ShardStatistics;
129
- upgraded_indices?: Record<string, UpgradeVersionStatus>;
130
- }
131
-
132
127
  export type IndexRouting = {
133
128
  allocation?: IndexRoutingAllocation;
134
129
  rebalance?: IndexRoutingRebalance;
@@ -235,7 +230,7 @@ export type IndexSettings = {
235
230
  refresh_interval?: Common.Duration;
236
231
  routing?: IndexRouting;
237
232
  routing_partition_size?: Common.StringifiedInteger;
238
- routing_path?: string | string[];
233
+ routing_path?: Common.StringOrStringArray;
239
234
  search?: IndexSettingsSearch;
240
235
  'search.idle.after'?: Common.Duration;
241
236
  settings?: IndexSettings;
@@ -608,13 +603,6 @@ export type TranslogRetention = {
608
603
  size?: Common.HumanReadableByteCount;
609
604
  }
610
605
 
611
- export type UpgradeRequest = {
612
- allow_no_indices?: boolean;
613
- expand_wildcards?: 'all' | 'closed' | 'none' | 'open';
614
- ignore_unavailable?: boolean;
615
- wait_for_completion?: boolean;
616
- }
617
-
618
606
  export type UpgradeStatus = {
619
607
  size_in_bytes?: Common.ByteCount;
620
608
  size_to_upgrade_ancient_in_bytes?: Common.ByteCount;
@@ -14,6 +14,7 @@
14
14
  * modify the API generator.
15
15
  */
16
16
 
17
+ import * as Common from './_common'
17
18
 
18
19
  export type AnalyzeDetail = {
19
20
  analyzer?: AnalyzerDetail;
@@ -54,7 +55,7 @@ export type ExplainAnalyzeToken = {
54
55
  type: string;
55
56
  }
56
57
 
57
- export type TextToAnalyze = string | string[]
58
+ export type TextToAnalyze = Common.StringOrStringArray
58
59
 
59
60
  export type TokenDetail = {
60
61
  name: string;
@@ -34,9 +34,9 @@ export type ShardStoreException = {
34
34
  type: string;
35
35
  }
36
36
 
37
+ export type ShardStoreStatus = 'all' | 'green' | 'red' | 'yellow'
38
+
37
39
  export type ShardStoreWrapper = {
38
40
  stores: ShardStore[];
39
41
  }
40
42
 
41
- export type Status = 'all' | 'green' | 'red' | 'yellow'
42
-
@@ -21,7 +21,9 @@ export type AllIndicesStats = {
21
21
  total: IndexStats;
22
22
  }
23
23
 
24
- export type IndexShardStats = IndexStatsBase & {
24
+ export type IndexShardStats = IndexShardStatsBase & Record<string, any>
25
+
26
+ export type IndexShardStatsBase = IndexStatsBase & {
25
27
  commit?: ShardCommit;
26
28
  retention_leases?: ShardRetentionLeases;
27
29
  routing?: ShardRouting;
@@ -19,7 +19,7 @@ import * as Common from './_common'
19
19
  export type AppendProcessor = ProcessorBase & {
20
20
  allow_duplicates?: boolean;
21
21
  field: Common.Field;
22
- value: Record<string, any>[];
22
+ value: any[];
23
23
  }
24
24
 
25
25
  export type AttachmentProcessor = ProcessorBase & {
@@ -97,16 +97,6 @@ export type DotExpanderProcessor = ProcessorBase & {
97
97
 
98
98
  export type DropProcessor = ProcessorBase & Record<string, any>
99
99
 
100
- export type EnrichProcessor = ProcessorBase & {
101
- field: Common.Field;
102
- ignore_missing?: boolean;
103
- max_matches?: number;
104
- override?: boolean;
105
- policy_name: string;
106
- shape_relation?: Common.GeoShapeRelation;
107
- target_field: Common.Field;
108
- }
109
-
110
100
  export type FailProcessor = ProcessorBase & {
111
101
  message: string;
112
102
  }
@@ -142,31 +132,6 @@ export type GsubProcessor = ProcessorBase & {
142
132
  target_field?: Common.Field;
143
133
  }
144
134
 
145
- export type InferenceConfig = {
146
- classification?: InferenceConfigClassification;
147
- regression?: InferenceConfigRegression;
148
- }
149
-
150
- export type InferenceConfigClassification = {
151
- num_top_classes?: number;
152
- num_top_feature_importance_values?: number;
153
- prediction_field_type?: string;
154
- results_field?: Common.Field;
155
- top_classes_results_field?: Common.Field;
156
- }
157
-
158
- export type InferenceConfigRegression = {
159
- num_top_feature_importance_values?: number;
160
- results_field?: Common.Field;
161
- }
162
-
163
- export type InferenceProcessor = ProcessorBase & {
164
- field_map?: Record<string, Record<string, any>>;
165
- inference_config?: InferenceConfig;
166
- model_id: Common.Id;
167
- target_field?: Common.Field;
168
- }
169
-
170
135
  export type JoinProcessor = ProcessorBase & {
171
136
  field: Common.Field;
172
137
  separator: string;
@@ -236,13 +201,11 @@ export type ProcessorContainer = {
236
201
  dissect?: DissectProcessor;
237
202
  dot_expander?: DotExpanderProcessor;
238
203
  drop?: DropProcessor;
239
- enrich?: EnrichProcessor;
240
204
  fail?: FailProcessor;
241
205
  foreach?: ForeachProcessor;
242
206
  geoip?: GeoIpProcessor;
243
207
  grok?: GrokProcessor;
244
208
  gsub?: GsubProcessor;
245
- inference?: InferenceProcessor;
246
209
  join?: JoinProcessor;
247
210
  json?: JsonProcessor;
248
211
  kv?: KeyValueProcessor;
@@ -287,7 +250,7 @@ export type SetSecurityUserProcessor = ProcessorBase & {
287
250
  properties?: string[];
288
251
  }
289
252
 
290
- export type ShapeType = 'geo_shape' | 'shape'
253
+ export type ShapeType = 'geo_shape' | 'xy_shape'
291
254
 
292
255
  export type SortProcessor = ProcessorBase & {
293
256
  field: Common.Field;
@@ -304,7 +267,7 @@ export type SplitProcessor = ProcessorBase & {
304
267
  }
305
268
 
306
269
  export type TextEmbeddingProcessor = ProcessorBase & {
307
- description?: string;
270
+ batch_size?: number;
308
271
  field_map: Record<string, string>;
309
272
  model_id: Common.Id;
310
273
  }
@@ -15,6 +15,7 @@
15
15
  */
16
16
 
17
17
  import * as Common from './_common'
18
+ import * as Common_Analysis from './_common.analysis'
18
19
 
19
20
  export type Action = {
20
21
  action_type?: string;
@@ -26,6 +27,24 @@ export type Action = {
26
27
  url?: string;
27
28
  }
28
29
 
30
+ export type AdditionalInfo = Record<string, any>
31
+
32
+ export type Algorithm = {
33
+ value?: 'AD_LIBSVM' | 'AGENT' | 'ANOMALY_LOCALIZATION' | 'BATCH_RCF' | 'CONNECTOR' | 'FIT_RCF' | 'KMEANS' | 'LINEAR_REGRESSION' | 'LOCAL_SAMPLE_CALCULATOR' | 'LOGISTIC_REGRESSION' | 'METRICS_CORRELATION' | 'QUESTION_ANSWERING' | 'RCF_SUMMARIZE' | 'REMOTE' | 'SAMPLE_ALGO' | 'SPARSE_ENCODING' | 'SPARSE_TOKENIZE' | 'TEXT_EMBEDDING' | 'TEXT_SIMILARITY';
34
+ }
35
+
36
+ export type BoolQuery = {
37
+ filter?: Filter[];
38
+ must?: Filter[];
39
+ must_not?: Filter;
40
+ should?: Filter[];
41
+ }
42
+
43
+ export type ByteBuffer = {
44
+ array?: string;
45
+ order?: 'BIG_ENDIAN' | 'LITTLE_ENDIAN';
46
+ }
47
+
29
48
  export type ClientConfig = {
30
49
  connection_timeout?: number;
31
50
  max_connection?: number;
@@ -36,6 +55,11 @@ export type ClientConfig = {
36
55
  retry_timeout_seconds?: number;
37
56
  }
38
57
 
58
+ export type ColumnMeta = {
59
+ column_type?: 'BOOLEAN' | 'DOUBLE' | 'INTEGER' | 'STRING';
60
+ name?: Common.Name;
61
+ }
62
+
39
63
  export type Credential = {
40
64
  access_key?: string;
41
65
  secret_key?: string;
@@ -43,6 +67,61 @@ export type Credential = {
43
67
  [key: string]: any;
44
68
  }
45
69
 
70
+ export type Exists = {
71
+ field?: Common.Field;
72
+ }
73
+
74
+ export type Filter = {
75
+ exists?: Exists;
76
+ match?: Match;
77
+ nested?: Nested;
78
+ range?: Range;
79
+ term?: Term;
80
+ terms?: Term;
81
+ }
82
+
83
+ export type GetConnectorResponse = {
84
+ actions?: Action[];
85
+ created_time?: number;
86
+ description?: string;
87
+ last_updated_time?: number;
88
+ name?: Common.Name;
89
+ parameters?: Parameters;
90
+ protocol?: 'aws_sigv4' | 'http';
91
+ version?: Common.VersionString;
92
+ }
93
+
94
+ export type GetMemoryResponse = Memory | {
95
+ memories?: Memory[];
96
+ next_token?: number;
97
+ }
98
+
99
+ export type GetMessageResponse = Message | {
100
+ messages?: Message[];
101
+ }
102
+
103
+ export type GetMessageTracesResponse = {
104
+ traces?: Message[];
105
+ }
106
+
107
+ export type Guardrails = {
108
+ index_name?: Common.IndexName;
109
+ input_guardrail?: GuardrailsInputOutput;
110
+ model_id?: string;
111
+ output_guardrail?: GuardrailsInputOutput;
112
+ regex?: Record<string, any>;
113
+ response_filter?: string;
114
+ response_validation_regex?: string;
115
+ source_fields?: Common.Fields;
116
+ stop_words?: Common_Analysis.StopWords;
117
+ type?: 'local_regex' | 'model';
118
+ }
119
+
120
+ export type GuardrailsInputOutput = {
121
+ model_id?: string;
122
+ response_validation_regex?: string;
123
+ }
124
+
46
125
  export type Headers = {
47
126
  content_type?: string;
48
127
  [key: string]: any;
@@ -53,13 +132,73 @@ export type HitsTotal = {
53
132
  value: number;
54
133
  }
55
134
 
135
+ export type InferenceResults = {
136
+ output?: Output[];
137
+ }
138
+
139
+ export type InputQuery = {
140
+ _source?: string[];
141
+ query?: Query;
142
+ size?: number;
143
+ }
144
+
145
+ export type Key = {
146
+ gt?: number;
147
+ gte?: number;
148
+ lt?: number;
149
+ lte?: number;
150
+ }
151
+
56
152
  export type LLM = {
57
153
  model_id?: string;
58
154
  parameters?: Parameters;
59
155
  }
60
156
 
157
+ export type Match = {
158
+ description?: string;
159
+ [key: string]: any;
160
+ }
161
+
162
+ export type MatchAllQuery = Record<string, any>
163
+
61
164
  export type Memory = {
165
+ additional_info?: AdditionalInfo;
166
+ create_time?: string;
167
+ memory_id?: Common.Name;
168
+ name?: Common.Name;
62
169
  type?: string;
170
+ updated_time?: string;
171
+ user?: string;
172
+ }
173
+
174
+ export type Message = {
175
+ additional_info?: AdditionalInfo;
176
+ create_time?: string;
177
+ input?: undefined | string;
178
+ memory_id?: Common.Name;
179
+ message_id?: Common.Name;
180
+ origin?: undefined | string;
181
+ parent_message_id?: undefined | string;
182
+ prompt_template?: undefined | string;
183
+ response?: undefined | string;
184
+ trace_number?: number;
185
+ }
186
+
187
+ export type Model = {
188
+ algorithm?: string;
189
+ created_time?: number;
190
+ is_hidden?: boolean;
191
+ last_registered_time?: number;
192
+ last_updated_time?: number;
193
+ model_config?: ModelConfig;
194
+ model_content_hash_value?: string;
195
+ model_content_size_in_bytes?: number;
196
+ model_format?: Common.ModelFormat;
197
+ model_group_id?: string;
198
+ model_state: 'DEPLOYED' | 'DEPLOYING' | 'DEPLOY_FAILED' | 'PARTIALLY_DEPLOYED' | 'REGISTERED' | 'REGISTERING' | 'UNDEPLOYED';
199
+ model_version?: string;
200
+ name?: string;
201
+ total_chunks?: number;
63
202
  }
64
203
 
65
204
  export type ModelConfig = {
@@ -70,12 +209,13 @@ export type ModelConfig = {
70
209
  }
71
210
 
72
211
  export type ModelGroup = {
73
- access: string;
212
+ access: 'private' | 'public' | 'restricted';
74
213
  created_time?: number;
75
214
  description: string;
76
215
  last_updated_time?: number;
77
216
  latest_version: number;
78
217
  name: string;
218
+ owner?: Owner;
79
219
  }
80
220
 
81
221
  export type ModelGroupRegistration = {
@@ -83,15 +223,95 @@ export type ModelGroupRegistration = {
83
223
  status: string;
84
224
  }
85
225
 
226
+ export type Nested = {
227
+ boost?: number;
228
+ ignore_unmapped?: boolean;
229
+ path?: Common.Field;
230
+ query?: Query;
231
+ score_mode?: 'avg' | 'max' | 'min' | 'none' | 'sum';
232
+ }
233
+
234
+ export type Output = {
235
+ byte_buffer?: ByteBuffer;
236
+ data: number[];
237
+ data_type?: 'BOOLEAN' | 'FLOAT16' | 'FLOAT32' | 'FLOAT64' | 'INT32' | 'INT64' | 'INT8' | 'STRING' | 'UINT8' | 'UNKNOWN';
238
+ name?: string;
239
+ shape?: number[];
240
+ }
241
+
242
+ export type Owner = {
243
+ backend_roles?: string[];
244
+ custom_attribute_names?: string[];
245
+ name: Common.Name;
246
+ roles?: string[];
247
+ user_requested_tenant?: undefined | string;
248
+ }
249
+
250
+ export type OwnerNameKeyword = {
251
+ boost?: number;
252
+ value?: Common.FieldValue;
253
+ }
254
+
86
255
  export type Parameters = Record<string, any>
87
256
 
88
- export type SearchModelsHits = {
89
- hits: SearchModelsHitsHit[];
90
- max_score?: number;
257
+ export type PredictionResult = {
258
+ column_metas?: ColumnMeta[];
259
+ rows?: Rows[];
260
+ }
261
+
262
+ export type PredictModelOutput = {
263
+ byte_buffer?: ByteBuffer;
264
+ data: number[];
265
+ data_type?: 'BOOLEAN' | 'FLOAT16' | 'FLOAT32' | 'FLOAT64' | 'INT32' | 'INT64' | 'INT8' | 'STRING' | 'UINT8' | 'UNKNOWN';
266
+ name?: string;
267
+ shape?: number[];
268
+ }
269
+
270
+ export type PredictModelResponse = {
271
+ inference_results?: PredictModelResult[];
272
+ }
273
+
274
+ export type PredictModelResult = {
275
+ output?: PredictModelOutput[];
276
+ }
277
+
278
+ export type PredictResponse = {
279
+ inference_results?: InferenceResults[];
280
+ prediction_result?: PredictionResult;
281
+ status?: Status;
282
+ }
283
+
284
+ export type Query = {
285
+ bool?: BoolQuery;
286
+ match?: Match;
287
+ match_all?: MatchAllQuery;
288
+ term?: Term;
289
+ }
290
+
291
+ export type Range = {
292
+ k1?: Key;
293
+ k2?: Key;
294
+ k3?: Key;
295
+ }
296
+
297
+ export type RateLimiter = {
298
+ limit: number;
299
+ unit: 'DAYS' | 'HOURS' | 'MICROSECONDS' | 'MILLISECONDS' | 'MINUTES' | 'NANOSECONDS' | 'SECONDS';
300
+ }
301
+
302
+ export type Rows = {
303
+ values?: Values[];
304
+ }
305
+
306
+ export type SearchConnectorsResponse = SearchResponse
307
+
308
+ export type SearchHits = {
309
+ hits: SearchHitsHit[];
310
+ max_score?: undefined | number;
91
311
  total: HitsTotal;
92
312
  }
93
313
 
94
- export type SearchModelsHitsHit = {
314
+ export type SearchHitsHit = {
95
315
  _id?: Common.Id;
96
316
  _index?: Common.IndexName;
97
317
  _primary_term?: number;
@@ -100,45 +320,129 @@ export type SearchModelsHitsHit = {
100
320
  _source?: Source;
101
321
  _version?: Common.VersionNumber;
102
322
  model_id?: Common.Name;
323
+ sort?: number[];
103
324
  }
104
325
 
105
- export type SearchModelsResponse = {
326
+ export type SearchMemoryResponse = SearchResponse
327
+
328
+ export type SearchMessageResponse = SearchResponse
329
+
330
+ export type SearchModelGroupsResponse = SearchResponse
331
+
332
+ export type SearchModelsResponse = SearchResponse
333
+
334
+ export type SearchResponse = {
106
335
  _shards?: Common.ShardStatistics;
107
- hits: SearchModelsHits;
336
+ hits: SearchHits;
108
337
  timed_out?: boolean;
109
338
  took?: number;
110
339
  }
111
340
 
341
+ export type Sort = {
342
+ _id?: SortOrder;
343
+ _index?: SortOrder;
344
+ _score?: SortOrder;
345
+ _seq_no?: SortOrder;
346
+ algorithm?: SortOrder;
347
+ auto_redeploy_retry_times?: SortOrder;
348
+ chunk_number?: SortOrder;
349
+ created_time?: SortOrder;
350
+ current_worker_node_count?: SortOrder;
351
+ deploy_to_all_nodes?: SortOrder;
352
+ is_hidden?: SortOrder;
353
+ last_registered_time?: SortOrder;
354
+ last_updated_time?: SortOrder;
355
+ model_content_hash_value?: SortOrder;
356
+ model_content_size_in_bytes?: SortOrder;
357
+ model_format?: SortOrder;
358
+ model_group_id?: SortOrder;
359
+ model_state?: SortOrder;
360
+ model_version?: SortOrder;
361
+ planning_worker_node_count?: SortOrder;
362
+ planning_worker_nodes?: SortOrder;
363
+ total_chunks?: SortOrder;
364
+ }
365
+
366
+ export type SortMemory = {
367
+ _id?: SortOrder;
368
+ _index?: SortOrder;
369
+ _score?: SortOrder;
370
+ _seq_no?: SortOrder;
371
+ additional_info?: SortOrder;
372
+ application_time?: SortOrder;
373
+ create_time?: SortOrder;
374
+ updated_time?: SortOrder;
375
+ user?: SortOrder;
376
+ }
377
+
378
+ export type SortMessage = {
379
+ _id?: SortOrder;
380
+ _index?: SortOrder;
381
+ _score?: SortOrder;
382
+ _seq_no?: SortOrder;
383
+ additional_info?: SortOrder;
384
+ create_time?: SortOrder;
385
+ memory_id?: SortOrder;
386
+ origin?: SortOrder;
387
+ parent_message_id?: SortOrder;
388
+ trace_number?: SortOrder;
389
+ }
390
+
391
+ export type SortOrder = {
392
+ order?: 'asc' | 'desc';
393
+ }
394
+
112
395
  export type Source = {
396
+ access?: 'private' | 'public' | 'restricted';
397
+ actions?: Action[];
398
+ additional_info?: AdditionalInfo;
113
399
  algorithm?: string;
400
+ application_type?: undefined | string;
114
401
  auto_redeploy_retry_times?: number;
402
+ backend_roles?: string[];
115
403
  chunk_number?: number;
116
404
  connector_id?: string;
405
+ create_time?: string;
117
406
  created_time?: number;
118
407
  current_worker_node_count?: number;
119
408
  deploy_to_all_nodes?: boolean;
120
409
  description?: string;
410
+ input?: undefined | string;
121
411
  is_hidden?: boolean;
122
412
  last_deployed_time?: number;
123
413
  last_registered_time?: number;
124
414
  last_updated_time?: number;
415
+ latest_version?: number;
416
+ memory_id?: Common.Name;
125
417
  model_config?: ModelConfig;
126
418
  model_content_hash_value?: string;
127
419
  model_content_size_in_bytes?: number;
128
- model_format?: string;
420
+ model_format?: Common.ModelFormat;
129
421
  model_group_id?: string;
130
422
  model_id?: Common.Name;
131
- model_state?: 'DEPLOYED' | 'DEPLOYING' | 'DEPLOY_FAILED' | 'PARTIALLY_DEPLOYED' | 'REGISTERED' | 'REGISTERING';
423
+ model_state?: 'DEPLOYED' | 'DEPLOYING' | 'DEPLOY_FAILED' | 'PARTIALLY_DEPLOYED' | 'REGISTERED' | 'REGISTERING' | 'UNDEPLOYED';
132
424
  model_task_type?: string;
133
425
  model_version?: string;
134
- name?: string;
426
+ name?: Common.Name;
427
+ origin?: undefined | string;
428
+ owner?: Owner;
429
+ parameters?: Parameters;
430
+ parent_message_id?: undefined | string;
135
431
  planning_worker_node_count?: number;
136
432
  planning_worker_nodes?: Common.NodeIds[];
433
+ prompt_template?: undefined | string;
434
+ protocol?: 'aws_sigv4' | 'http';
435
+ response?: undefined | string;
137
436
  total_chunks?: number;
437
+ trace_number?: undefined | string;
438
+ updated_time?: string;
138
439
  url?: string;
440
+ user?: string;
139
441
  version?: Common.VersionString;
140
442
  }
141
443
 
444
+ export type Status = 'CANCELLED' | 'COMPLETED' | 'COMPLETED_WITH_ERROR' | 'CREATED' | 'FAILED' | 'RUNNING'
445
+
142
446
  export type Task = {
143
447
  create_time?: number;
144
448
  error?: string;
@@ -146,12 +450,20 @@ export type Task = {
146
450
  is_async?: boolean;
147
451
  last_update_time?: number;
148
452
  model_id?: string;
149
- state: 'CANCELLED' | 'COMPLETED' | 'COMPLETED_WITH_ERROR' | 'CREATED' | 'FAILED' | 'RUNNING';
453
+ state: 'CANCELLED' | 'CANCELLING' | 'COMPLETED' | 'COMPLETED_WITH_ERROR' | 'CREATED' | 'EXPIRED' | 'FAILED' | 'RUNNING';
150
454
  task_id?: string;
151
455
  task_type?: 'DEPLOY_MODEL' | 'REGISTER_MODEL';
152
456
  worker_node?: Common.NodeIds[];
153
457
  }
154
458
 
459
+ export type Term = {
460
+ _id?: Common.Id[];
461
+ algorithm?: Algorithm;
462
+ model_id?: Common.Name;
463
+ name?: OwnerNameKeyword;
464
+ 'owner.name.keyword'?: OwnerNameKeyword;
465
+ }
466
+
155
467
  export type ToolItems = {
156
468
  name?: string;
157
469
  parameters?: Parameters;
@@ -159,6 +471,22 @@ export type ToolItems = {
159
471
  [key: string]: any;
160
472
  }
161
473
 
474
+ export type TrainParameters = {
475
+ centroids?: number;
476
+ distance_type?: 'COSINE' | 'EUCLIDEAN' | 'L1';
477
+ iterations?: number;
478
+ }
479
+
480
+ export type TrainPredictResponse = {
481
+ prediction_result?: PredictionResult;
482
+ status: Status;
483
+ }
484
+
485
+ export type TrainResponse = {
486
+ model_id?: Common.Name;
487
+ status: Status;
488
+ }
489
+
162
490
  export type UndeployModelNode = {
163
491
  stats?: UndeployModelNodeStats;
164
492
  }
@@ -167,3 +495,31 @@ export type UndeployModelNodeStats = Record<string, any>
167
495
 
168
496
  export type UndeployModelResponse = Record<string, UndeployModelNode>
169
497
 
498
+ export type UnloadModelNode = {
499
+ stats?: UnloadModelNodeStats;
500
+ }
501
+
502
+ export type UnloadModelNodeStats = Record<string, any>
503
+
504
+ export type UnloadModelResponse = Record<string, UnloadModelNode>
505
+
506
+ export type UpdateModelGroupResponse = {
507
+ status?: string;
508
+ }
509
+
510
+ export type UpdateModelResponse = {
511
+ _id?: Common.Id;
512
+ _index: Common.IndexName;
513
+ _primary_term?: number;
514
+ _seq_no?: Common.SequenceNumber;
515
+ _shards?: Common.ShardStatistics;
516
+ _version?: Common.VersionNumber;
517
+ forced_refresh?: boolean;
518
+ result?: Common.Result;
519
+ }
520
+
521
+ export type Values = {
522
+ column_type?: 'BOOLEAN' | 'DOUBLE' | 'INTEGER' | 'STRING';
523
+ value?: number;
524
+ }
525
+