@opensearch-project/opensearch 3.0.0-beta.9 → 3.0.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 (82) hide show
  1. package/api/OpenSearchApi.d.ts +34 -0
  2. package/api/_core/search.d.ts +1 -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 +15 -5
  6. package/api/_types/_global.d.ts +2 -1
  7. package/api/_types/cluster.stats.d.ts +0 -18
  8. package/api/_types/indices._common.d.ts +1 -13
  9. package/api/_types/indices.analyze.d.ts +2 -1
  10. package/api/_types/indices.shard_stores.d.ts +2 -2
  11. package/api/_types/indices.stats.d.ts +3 -1
  12. package/api/_types/ml._common.d.ts +209 -8
  13. package/api/_types/nodes._common.d.ts +0 -631
  14. package/api/_types/nodes.info.d.ts +16 -23
  15. package/api/_types/nodes.reload_secure_settings.d.ts +8 -4
  16. package/api/_types/nodes.stats.d.ts +634 -4
  17. package/api/_types/nodes.usage.d.ts +1 -7
  18. package/api/cat/aliases.js +1 -1
  19. package/api/cat/allPitSegments.js +6 -6
  20. package/api/cat/clusterManager.js +1 -1
  21. package/api/cat/count.js +5 -5
  22. package/api/cat/fielddata.js +6 -6
  23. package/api/cat/health.js +5 -5
  24. package/api/cat/indices.js +14 -14
  25. package/api/cat/master.js +7 -7
  26. package/api/cat/nodeattrs.js +7 -7
  27. package/api/cat/nodes.js +11 -11
  28. package/api/cat/pendingTasks.js +9 -9
  29. package/api/cat/pitSegments.js +6 -6
  30. package/api/cat/plugins.js +8 -8
  31. package/api/cat/recovery.js +8 -8
  32. package/api/cat/repositories.js +8 -8
  33. package/api/cat/segmentReplication.js +18 -17
  34. package/api/cat/segments.js +8 -8
  35. package/api/cat/shards.js +10 -10
  36. package/api/cat/snapshots.js +9 -9
  37. package/api/cat/tasks.js +8 -8
  38. package/api/cat/templates.js +8 -8
  39. package/api/cat/threadPool.js +8 -8
  40. package/api/cluster/getComponentTemplate.d.ts +1 -0
  41. package/api/cluster/getComponentTemplate.js +1 -0
  42. package/api/cluster/reroute.d.ts +1 -2
  43. package/api/cluster/state.d.ts +1 -1
  44. package/api/cluster/stats.d.ts +9 -1
  45. package/api/index.d.ts +16 -0
  46. package/api/indices/addBlock.d.ts +1 -2
  47. package/api/indices/clone.d.ts +2 -3
  48. package/api/indices/close.d.ts +1 -2
  49. package/api/indices/putTemplate.d.ts +1 -1
  50. package/api/indices/rollover.d.ts +2 -3
  51. package/api/indices/shardStores.d.ts +1 -1
  52. package/api/indices/shrink.d.ts +2 -3
  53. package/api/indices/split.d.ts +1 -2
  54. package/api/indices/stats.d.ts +1 -1
  55. package/api/indices/upgrade.d.ts +3 -2
  56. package/api/indices/upgrade.js +0 -1
  57. package/api/ml/_api.js +20 -0
  58. package/api/ml/createConnector.d.ts +1 -1
  59. package/api/ml/getConnector.d.ts +30 -0
  60. package/api/ml/getConnector.js +49 -0
  61. package/api/ml/predict.d.ts +40 -0
  62. package/api/ml/predict.js +53 -0
  63. package/api/ml/searchConnectors.d.ts +36 -0
  64. package/api/ml/searchConnectors.js +47 -0
  65. package/api/ml/searchModelGroup.d.ts +36 -0
  66. package/api/ml/searchModelGroup.js +47 -0
  67. package/api/ml/searchModels.d.ts +3 -2
  68. package/api/ml/train.d.ts +37 -0
  69. package/api/ml/train.js +50 -0
  70. package/api/ml/trainPredict.d.ts +38 -0
  71. package/api/ml/trainPredict.js +50 -0
  72. package/api/ml/updateConnector.d.ts +45 -0
  73. package/api/ml/updateConnector.js +50 -0
  74. package/api/ml/updateModelGroup.d.ts +40 -0
  75. package/api/ml/updateModelGroup.js +50 -0
  76. package/api/nodes/info.d.ts +5 -1
  77. package/api/nodes/reloadSecureSettings.d.ts +5 -1
  78. package/api/nodes/stats.d.ts +5 -1
  79. package/api/nodes/usage.d.ts +5 -1
  80. package/api/tasks/cancel.d.ts +1 -1
  81. package/api/tasks/list.d.ts +1 -1
  82. package/package.json +1 -1
@@ -693,6 +693,18 @@ export default class OpenSearchAPI {
693
693
  };
694
694
 
695
695
  ml: {
696
+ predict (params: API.Ml_Predict_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_Predict_Response>;
697
+ predict (params: API.Ml_Predict_Request, callback: callbackFn<API.Ml_Predict_Response>): TransportRequestCallback;
698
+ predict (params: API.Ml_Predict_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_Predict_Response>): TransportRequestCallback;
699
+
700
+ trainPredict (params: API.Ml_TrainPredict_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_TrainPredict_Response>;
701
+ trainPredict (params: API.Ml_TrainPredict_Request, callback: callbackFn<API.Ml_TrainPredict_Response>): TransportRequestCallback;
702
+ trainPredict (params: API.Ml_TrainPredict_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_TrainPredict_Response>): TransportRequestCallback;
703
+
704
+ train (params: API.Ml_Train_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_Train_Response>;
705
+ train (params: API.Ml_Train_Request, callback: callbackFn<API.Ml_Train_Response>): TransportRequestCallback;
706
+ train (params: API.Ml_Train_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_Train_Response>): TransportRequestCallback;
707
+
696
708
  registerAgents (params?: API.Ml_RegisterAgents_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_RegisterAgents_Response>;
697
709
  registerAgents (callback: callbackFn<API.Ml_RegisterAgents_Response>): TransportRequestCallback;
698
710
  registerAgents (params: API.Ml_RegisterAgents_Request, callback: callbackFn<API.Ml_RegisterAgents_Response>): TransportRequestCallback;
@@ -707,15 +719,33 @@ export default class OpenSearchAPI {
707
719
  createConnector (params: API.Ml_CreateConnector_Request, callback: callbackFn<API.Ml_CreateConnector_Response>): TransportRequestCallback;
708
720
  createConnector (params: API.Ml_CreateConnector_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_CreateConnector_Response>): TransportRequestCallback;
709
721
 
722
+ searchConnectors (params?: API.Ml_SearchConnectors_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_SearchConnectors_Response>;
723
+ searchConnectors (callback: callbackFn<API.Ml_SearchConnectors_Response>): TransportRequestCallback;
724
+ searchConnectors (params: API.Ml_SearchConnectors_Request, callback: callbackFn<API.Ml_SearchConnectors_Response>): TransportRequestCallback;
725
+ searchConnectors (params: API.Ml_SearchConnectors_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_SearchConnectors_Response>): TransportRequestCallback;
726
+
710
727
  deleteConnector (params: API.Ml_DeleteConnector_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_DeleteConnector_Response>;
711
728
  deleteConnector (params: API.Ml_DeleteConnector_Request, callback: callbackFn<API.Ml_DeleteConnector_Response>): TransportRequestCallback;
712
729
  deleteConnector (params: API.Ml_DeleteConnector_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_DeleteConnector_Response>): TransportRequestCallback;
713
730
 
731
+ getConnector (params: API.Ml_GetConnector_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_GetConnector_Response>;
732
+ getConnector (params: API.Ml_GetConnector_Request, callback: callbackFn<API.Ml_GetConnector_Response>): TransportRequestCallback;
733
+ getConnector (params: API.Ml_GetConnector_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_GetConnector_Response>): TransportRequestCallback;
734
+
735
+ updateConnector (params: API.Ml_UpdateConnector_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_UpdateConnector_Response>;
736
+ updateConnector (params: API.Ml_UpdateConnector_Request, callback: callbackFn<API.Ml_UpdateConnector_Response>): TransportRequestCallback;
737
+ updateConnector (params: API.Ml_UpdateConnector_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_UpdateConnector_Response>): TransportRequestCallback;
738
+
714
739
  registerModelGroup (params?: API.Ml_RegisterModelGroup_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_RegisterModelGroup_Response>;
715
740
  registerModelGroup (callback: callbackFn<API.Ml_RegisterModelGroup_Response>): TransportRequestCallback;
716
741
  registerModelGroup (params: API.Ml_RegisterModelGroup_Request, callback: callbackFn<API.Ml_RegisterModelGroup_Response>): TransportRequestCallback;
717
742
  registerModelGroup (params: API.Ml_RegisterModelGroup_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_RegisterModelGroup_Response>): TransportRequestCallback;
718
743
 
744
+ searchModelGroup (params?: API.Ml_SearchModelGroup_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_SearchModelGroup_Response>;
745
+ searchModelGroup (callback: callbackFn<API.Ml_SearchModelGroup_Response>): TransportRequestCallback;
746
+ searchModelGroup (params: API.Ml_SearchModelGroup_Request, callback: callbackFn<API.Ml_SearchModelGroup_Response>): TransportRequestCallback;
747
+ searchModelGroup (params: API.Ml_SearchModelGroup_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_SearchModelGroup_Response>): TransportRequestCallback;
748
+
719
749
  deleteModelGroup (params: API.Ml_DeleteModelGroup_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_DeleteModelGroup_Response>;
720
750
  deleteModelGroup (params: API.Ml_DeleteModelGroup_Request, callback: callbackFn<API.Ml_DeleteModelGroup_Response>): TransportRequestCallback;
721
751
  deleteModelGroup (params: API.Ml_DeleteModelGroup_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_DeleteModelGroup_Response>): TransportRequestCallback;
@@ -724,6 +754,10 @@ export default class OpenSearchAPI {
724
754
  getModelGroup (params: API.Ml_GetModelGroup_Request, callback: callbackFn<API.Ml_GetModelGroup_Response>): TransportRequestCallback;
725
755
  getModelGroup (params: API.Ml_GetModelGroup_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_GetModelGroup_Response>): TransportRequestCallback;
726
756
 
757
+ updateModelGroup (params: API.Ml_UpdateModelGroup_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_UpdateModelGroup_Response>;
758
+ updateModelGroup (params: API.Ml_UpdateModelGroup_Request, callback: callbackFn<API.Ml_UpdateModelGroup_Response>): TransportRequestCallback;
759
+ updateModelGroup (params: API.Ml_UpdateModelGroup_Request, options: TransportRequestOptions, callback: callbackFn<API.Ml_UpdateModelGroup_Response>): TransportRequestCallback;
760
+
727
761
  registerModel (params?: API.Ml_RegisterModel_Request, options?: TransportRequestOptions): TransportRequestPromise<API.Ml_RegisterModel_Response>;
728
762
  registerModel (callback: callbackFn<API.Ml_RegisterModel_Response>): TransportRequestCallback;
729
763
  registerModel (params: API.Ml_RegisterModel_Request, callback: callbackFn<API.Ml_RegisterModel_Response>): TransportRequestCallback;
@@ -57,7 +57,7 @@ export interface Search_Request extends Global.Params {
57
57
  search_type?: Common.SearchType;
58
58
  seq_no_primary_term?: boolean;
59
59
  size?: number;
60
- sort?: string | string[];
60
+ sort?: Common.StringOrStringArray;
61
61
  stats?: string[];
62
62
  stored_fields?: Common.Fields;
63
63
  suggest_field?: Common.Field;
@@ -29,6 +29,7 @@ export interface UpdateByQueryRethrottle_Response extends ApiResponse {
29
29
  }
30
30
 
31
31
  export type UpdateByQueryRethrottle_ResponseBody = {
32
+ node_failures?: Common.ErrorCause[];
32
33
  nodes: Record<string, Core_UpdateByQueryRethrottle.UpdateByQueryRethrottleNode>;
33
34
  }
34
35
 
@@ -556,7 +556,7 @@ export type StopTokenFilter = TokenFilterBase & {
556
556
  type: 'stop';
557
557
  }
558
558
 
559
- export type StopWords = string | string[]
559
+ export type StopWords = Common.StringOrStringArray
560
560
 
561
561
  export type SynonymFormat = 'solr' | 'wordnet'
562
562
 
@@ -153,6 +153,8 @@ export type Duration = string
153
153
 
154
154
  export type DurationLarge = string
155
155
 
156
+ export type DurationValueUnitMicros = UnitMicros
157
+
156
158
  export type DurationValueUnitMillis = UnitMillis
157
159
 
158
160
  export type DurationValueUnitNanos = UnitNanos
@@ -283,7 +285,7 @@ export type HourAndMinute = {
283
285
  minute: number[];
284
286
  }
285
287
 
286
- export type HttpHeaders = Record<string, string | string[]>
288
+ export type HttpHeaders = Record<string, StringOrStringArray>
287
289
 
288
290
  export type HumanReadableByteCount = string
289
291
 
@@ -578,7 +580,7 @@ export type RemoteStoreUploadRefreshSizeLagStats = {
578
580
  export type RemoteStoreUploadStats = {
579
581
  max_refresh_time_lag?: Duration;
580
582
  max_refresh_time_lag_in_millis: DurationValueUnitMillis;
581
- pressure: RemoteStoreUploadPressureStats;
583
+ pressure?: RemoteStoreUploadPressureStats;
582
584
  refresh_size_lag: RemoteStoreUploadRefreshSizeLagStats;
583
585
  total_time_spent?: Duration;
584
586
  total_time_spent_in_millis: DurationValueUnitMillis;
@@ -624,7 +626,7 @@ export type Retries = {
624
626
 
625
627
  export type Routing = string
626
628
 
627
- export type RoutingInQueryString = string | string[]
629
+ export type RoutingInQueryString = StringOrStringArray
628
630
 
629
631
  export type RrfRank = RankBase & {
630
632
  rank_constant?: number;
@@ -707,8 +709,12 @@ export type SearchStats = {
707
709
  export type SearchType = 'dfs_query_then_fetch' | 'query_then_fetch'
708
710
 
709
711
  export type SegmentReplicationStats = {
712
+ max_bytes_behind: HumanReadableByteCount;
713
+ max_replication_lag: Duration;
714
+ total_bytes_behind: HumanReadableByteCount;
715
+ } | {
710
716
  max_bytes_behind: ByteCount;
711
- max_replication_lag: ByteCount;
717
+ max_replication_lag: DurationValueUnitMillis;
712
718
  total_bytes_behind: ByteCount;
713
719
  }
714
720
 
@@ -722,7 +728,7 @@ export type SegmentsStats = {
722
728
  index_writer_max_memory_in_bytes?: ByteCount;
723
729
  index_writer_memory?: HumanReadableByteCount;
724
730
  index_writer_memory_in_bytes: ByteCount;
725
- max_unsafe_auto_id_timestamp: number;
731
+ max_unsafe_auto_id_timestamp: EpochTimeUnitMillis;
726
732
  memory?: HumanReadableByteCount;
727
733
  memory_in_bytes: ByteCount;
728
734
  norms_memory?: HumanReadableByteCount;
@@ -821,6 +827,8 @@ export type StringifiedLong = number | string
821
827
 
822
828
  export type StringifiedVersionNumber = VersionNumber | string
823
829
 
830
+ export type StringOrStringArray = string | string[]
831
+
824
832
  export type SuggestMode = 'always' | 'missing' | 'popular'
825
833
 
826
834
  export type TaskFailure = {
@@ -874,6 +882,8 @@ export type uint = number
874
882
 
875
883
  export type ulong = number
876
884
 
885
+ export type UnitMicros = number
886
+
877
887
  export type UnitMillis = number
878
888
 
879
889
  export type UnitNanos = number
@@ -14,10 +14,11 @@
14
14
  * modify the API generator.
15
15
  */
16
16
 
17
+ import * as Common from './_common'
17
18
 
18
19
  export type Params = {
19
20
  error_trace?: boolean;
20
- filter_path?: string | string[];
21
+ filter_path?: Common.StringOrStringArray;
21
22
  human?: boolean;
22
23
  pretty?: boolean;
23
24
  source?: string;
@@ -15,7 +15,6 @@
15
15
  */
16
16
 
17
17
  import * as Common from './_common'
18
- import * as Nodes_Common from './nodes._common'
19
18
 
20
19
  export type CharFilterTypes = {
21
20
  analyzer_types: FieldTypes[];
@@ -191,19 +190,11 @@ export type ClusterShardMetrics = {
191
190
  export type FieldTypes = {
192
191
  count: number;
193
192
  index_count: number;
194
- indexed_vector_count?: number;
195
- indexed_vector_dim_max?: number;
196
- indexed_vector_dim_min?: number;
197
193
  name: Common.Name;
198
- script_count?: number;
199
194
  }
200
195
 
201
196
  export type FieldTypesMappings = {
202
197
  field_types: FieldTypes[];
203
- total_deduplicated_field_count?: number;
204
- total_deduplicated_mapping_size?: Common.HumanReadableByteCount;
205
- total_deduplicated_mapping_size_in_bytes?: Common.ByteCount;
206
- total_field_count?: number;
207
198
  }
208
199
 
209
200
  export type IndexingPressure = {
@@ -256,12 +247,3 @@ export type OperatingSystemMemoryInfo = {
256
247
  used_percent: Common.PercentageNumber;
257
248
  }
258
249
 
259
- export type StatsResponseBase = Nodes_Common.NodesResponseBase & {
260
- cluster_name: Common.Name;
261
- cluster_uuid: Common.Uuid;
262
- indices?: ClusterIndices;
263
- nodes?: ClusterNodes;
264
- status: Common.HealthStatus;
265
- timestamp: number;
266
- }
267
-
@@ -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;
@@ -26,6 +26,22 @@ export type Action = {
26
26
  url?: string;
27
27
  }
28
28
 
29
+ export type Algorithm = {
30
+ 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';
31
+ }
32
+
33
+ export type BoolQuery = {
34
+ filter?: Filter[];
35
+ must?: Filter[];
36
+ must_not?: Filter;
37
+ should?: Filter[];
38
+ }
39
+
40
+ export type ByteBuffer = {
41
+ array?: string;
42
+ order?: 'BIG_ENDIAN' | 'LITTLE_ENDIAN';
43
+ }
44
+
29
45
  export type ClientConfig = {
30
46
  connection_timeout?: number;
31
47
  max_connection?: number;
@@ -36,6 +52,11 @@ export type ClientConfig = {
36
52
  retry_timeout_seconds?: number;
37
53
  }
38
54
 
55
+ export type ColumnMeta = {
56
+ column_type?: 'BOOLEAN' | 'DOUBLE' | 'INTEGER' | 'STRING';
57
+ name?: Common.Name;
58
+ }
59
+
39
60
  export type Credential = {
40
61
  access_key?: string;
41
62
  secret_key?: string;
@@ -43,6 +64,30 @@ export type Credential = {
43
64
  [key: string]: any;
44
65
  }
45
66
 
67
+ export type Exists = {
68
+ field?: Common.Field;
69
+ }
70
+
71
+ export type Filter = {
72
+ exists?: Exists;
73
+ match?: Match;
74
+ nested?: Nested;
75
+ range?: Range;
76
+ term?: Term;
77
+ terms?: Term;
78
+ }
79
+
80
+ export type GetConnectorResponse = {
81
+ actions?: Action[];
82
+ created_time?: number;
83
+ description?: string;
84
+ last_updated_time?: number;
85
+ name?: Common.Name;
86
+ parameters?: Parameters;
87
+ protocol?: 'aws_sigv4' | 'http';
88
+ version?: Common.VersionString;
89
+ }
90
+
46
91
  export type Headers = {
47
92
  content_type?: string;
48
93
  [key: string]: any;
@@ -53,11 +98,34 @@ export type HitsTotal = {
53
98
  value: number;
54
99
  }
55
100
 
101
+ export type InferenceResults = {
102
+ output?: Output[];
103
+ }
104
+
105
+ export type InputQuery = {
106
+ _source?: string[];
107
+ query?: Query;
108
+ size?: number;
109
+ }
110
+
111
+ export type Key = {
112
+ gt?: number;
113
+ gte?: number;
114
+ lt?: number;
115
+ lte?: number;
116
+ }
117
+
56
118
  export type LLM = {
57
119
  model_id?: string;
58
120
  parameters?: Parameters;
59
121
  }
60
122
 
123
+ export type Match = {
124
+ description?: string;
125
+ }
126
+
127
+ export type MatchAllQuery = Record<string, any>
128
+
61
129
  export type Memory = {
62
130
  type?: string;
63
131
  }
@@ -70,12 +138,13 @@ export type ModelConfig = {
70
138
  }
71
139
 
72
140
  export type ModelGroup = {
73
- access: string;
141
+ access: 'private' | 'public' | 'restricted';
74
142
  created_time?: number;
75
143
  description: string;
76
144
  last_updated_time?: number;
77
145
  latest_version: number;
78
146
  name: string;
147
+ owner?: Owner;
79
148
  }
80
149
 
81
150
  export type ModelGroupRegistration = {
@@ -83,15 +152,73 @@ export type ModelGroupRegistration = {
83
152
  status: string;
84
153
  }
85
154
 
155
+ export type Nested = {
156
+ boost?: number;
157
+ ignore_unmapped?: boolean;
158
+ path?: Common.Field;
159
+ query?: Query;
160
+ score_mode?: 'avg' | 'max' | 'min' | 'none' | 'sum';
161
+ }
162
+
163
+ export type Output = {
164
+ byte_buffer?: ByteBuffer;
165
+ data: number[];
166
+ data_type?: 'BOOLEAN' | 'FLOAT16' | 'FLOAT32' | 'FLOAT64' | 'INT32' | 'INT64' | 'INT8' | 'STRING' | 'UINT8' | 'UNKNOWN';
167
+ name?: string;
168
+ shape?: number[];
169
+ }
170
+
171
+ export type Owner = {
172
+ backend_roles?: string[];
173
+ custom_attribute_names?: string[];
174
+ name: Common.Name;
175
+ roles?: string[];
176
+ user_requested_tenant?: undefined | string;
177
+ }
178
+
179
+ export type OwnerNameKeyword = {
180
+ boost?: number;
181
+ value?: Common.FieldValue;
182
+ }
183
+
86
184
  export type Parameters = Record<string, any>
87
185
 
88
- export type SearchModelsHits = {
89
- hits: SearchModelsHitsHit[];
186
+ export type PredictionResult = {
187
+ column_metas?: ColumnMeta[];
188
+ rows?: Rows[];
189
+ }
190
+
191
+ export type PredictResponse = {
192
+ inference_results?: InferenceResults[];
193
+ prediction_result?: PredictionResult;
194
+ status?: Status;
195
+ }
196
+
197
+ export type Query = {
198
+ bool?: BoolQuery;
199
+ match_all?: MatchAllQuery;
200
+ term?: Term;
201
+ }
202
+
203
+ export type Range = {
204
+ k1?: Key;
205
+ k2?: Key;
206
+ k3?: Key;
207
+ }
208
+
209
+ export type Rows = {
210
+ values?: Values[];
211
+ }
212
+
213
+ export type SearchConnectorsResponse = SearchResponse
214
+
215
+ export type SearchHits = {
216
+ hits: SearchHitsHit[];
90
217
  max_score?: number;
91
218
  total: HitsTotal;
92
219
  }
93
220
 
94
- export type SearchModelsHitsHit = {
221
+ export type SearchHitsHit = {
95
222
  _id?: Common.Id;
96
223
  _index?: Common.IndexName;
97
224
  _primary_term?: number;
@@ -102,16 +229,52 @@ export type SearchModelsHitsHit = {
102
229
  model_id?: Common.Name;
103
230
  }
104
231
 
105
- export type SearchModelsResponse = {
232
+ export type SearchModelGroupsResponse = SearchResponse
233
+
234
+ export type SearchModelsResponse = SearchResponse
235
+
236
+ export type SearchResponse = {
106
237
  _shards?: Common.ShardStatistics;
107
- hits: SearchModelsHits;
238
+ hits: SearchHits;
108
239
  timed_out?: boolean;
109
240
  took?: number;
110
241
  }
111
242
 
243
+ export type Sort = {
244
+ _id?: SortOrder;
245
+ _index?: SortOrder;
246
+ _score?: SortOrder;
247
+ _seq_no?: SortOrder;
248
+ algorithm?: SortOrder;
249
+ auto_redeploy_retry_times?: SortOrder;
250
+ chunk_number?: SortOrder;
251
+ created_time?: SortOrder;
252
+ current_worker_node_count?: SortOrder;
253
+ deploy_to_all_nodes?: SortOrder;
254
+ is_hidden?: SortOrder;
255
+ last_registered_time?: SortOrder;
256
+ last_updated_time?: SortOrder;
257
+ model_content_hash_value?: SortOrder;
258
+ model_content_size_in_bytes?: SortOrder;
259
+ model_format?: SortOrder;
260
+ model_group_id?: SortOrder;
261
+ model_state?: SortOrder;
262
+ model_version?: SortOrder;
263
+ planning_worker_node_count?: SortOrder;
264
+ planning_worker_nodes?: SortOrder;
265
+ total_chunks?: SortOrder;
266
+ }
267
+
268
+ export type SortOrder = {
269
+ order?: 'asc' | 'desc';
270
+ }
271
+
112
272
  export type Source = {
273
+ access?: 'private' | 'public' | 'restricted';
274
+ actions?: Action[];
113
275
  algorithm?: string;
114
276
  auto_redeploy_retry_times?: number;
277
+ backend_roles?: string[];
115
278
  chunk_number?: number;
116
279
  connector_id?: string;
117
280
  created_time?: number;
@@ -122,23 +285,29 @@ export type Source = {
122
285
  last_deployed_time?: number;
123
286
  last_registered_time?: number;
124
287
  last_updated_time?: number;
288
+ latest_version?: number;
125
289
  model_config?: ModelConfig;
126
290
  model_content_hash_value?: string;
127
291
  model_content_size_in_bytes?: number;
128
292
  model_format?: string;
129
293
  model_group_id?: string;
130
294
  model_id?: Common.Name;
131
- model_state?: 'DEPLOYED' | 'DEPLOYING' | 'DEPLOY_FAILED' | 'PARTIALLY_DEPLOYED' | 'REGISTERED' | 'REGISTERING';
295
+ model_state?: 'DEPLOYED' | 'DEPLOYING' | 'DEPLOY_FAILED' | 'PARTIALLY_DEPLOYED' | 'REGISTERED' | 'REGISTERING' | 'UNDEPLOYED';
132
296
  model_task_type?: string;
133
297
  model_version?: string;
134
298
  name?: string;
299
+ owner?: Owner;
300
+ parameters?: Parameters;
135
301
  planning_worker_node_count?: number;
136
302
  planning_worker_nodes?: Common.NodeIds[];
303
+ protocol?: 'aws_sigv4' | 'http';
137
304
  total_chunks?: number;
138
305
  url?: string;
139
306
  version?: Common.VersionString;
140
307
  }
141
308
 
309
+ export type Status = 'CANCELLED' | 'COMPLETED' | 'COMPLETED_WITH_ERROR' | 'CREATED' | 'FAILED' | 'RUNNING'
310
+
142
311
  export type Task = {
143
312
  create_time?: number;
144
313
  error?: string;
@@ -146,12 +315,19 @@ export type Task = {
146
315
  is_async?: boolean;
147
316
  last_update_time?: number;
148
317
  model_id?: string;
149
- state: 'CANCELLED' | 'COMPLETED' | 'COMPLETED_WITH_ERROR' | 'CREATED' | 'FAILED' | 'RUNNING';
318
+ state: 'CANCELLED' | 'CANCELLING' | 'COMPLETED' | 'COMPLETED_WITH_ERROR' | 'CREATED' | 'EXPIRED' | 'FAILED' | 'RUNNING';
150
319
  task_id?: string;
151
320
  task_type?: 'DEPLOY_MODEL' | 'REGISTER_MODEL';
152
321
  worker_node?: Common.NodeIds[];
153
322
  }
154
323
 
324
+ export type Term = {
325
+ _id?: Common.Id[];
326
+ algorithm?: Algorithm;
327
+ model_id?: Common.Name;
328
+ 'owner.name.keyword'?: OwnerNameKeyword;
329
+ }
330
+
155
331
  export type ToolItems = {
156
332
  name?: string;
157
333
  parameters?: Parameters;
@@ -159,6 +335,22 @@ export type ToolItems = {
159
335
  [key: string]: any;
160
336
  }
161
337
 
338
+ export type TrainParameters = {
339
+ centroids?: number;
340
+ distance_type?: 'COSINE' | 'EUCLIDEAN' | 'L1';
341
+ iterations?: number;
342
+ }
343
+
344
+ export type TrainPredictResponse = {
345
+ prediction_result?: PredictionResult;
346
+ status: Status;
347
+ }
348
+
349
+ export type TrainResponse = {
350
+ model_id?: Common.Name;
351
+ status: Status;
352
+ }
353
+
162
354
  export type UndeployModelNode = {
163
355
  stats?: UndeployModelNodeStats;
164
356
  }
@@ -167,3 +359,12 @@ export type UndeployModelNodeStats = Record<string, any>
167
359
 
168
360
  export type UndeployModelResponse = Record<string, UndeployModelNode>
169
361
 
362
+ export type UpdateModelGroupResponse = {
363
+ status?: string;
364
+ }
365
+
366
+ export type Values = {
367
+ column_type?: 'BOOLEAN' | 'DOUBLE' | 'INTEGER' | 'STRING';
368
+ value?: number;
369
+ }
370
+