elasticsearch-serverless 0.1.0 → 0.1.0.20231031.pre

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '09c1daf34377a8e2d94926ebbb2e3e7b69d646683b65f05a4b2a3beda0f71648'
4
- data.tar.gz: 1ecb7093b7846cbd4c61ad5486d5c2ffe31914c3452af49e12b1721b7cc372c9
3
+ metadata.gz: 2c9b9517cbe9ed2b4dff59ac559f8e0b91e820479ad486ed6fc4397ae970033c
4
+ data.tar.gz: 0342a7ee417d26b506af13093f6e3194fb5d3433e8091579ade28b8389c0042c
5
5
  SHA512:
6
- metadata.gz: 70ca28dcabaec5aa170c618d3122c26e1754af25741d7af5e25596f386c9a07c26639d72971150f0e9967b5c36f4f89de14616199bd047ca1736e2dd28af1cd5
7
- data.tar.gz: f0b6a9542e3e83647e1378866d0053e3cf3fa2530ea292e49963337272ac5af0ac399af7d85db7a15d233eba7850dacce44170cef79fa958bec85f734f9cee87
6
+ metadata.gz: 546f51170bd9756ef58ad11e98d8e6ba7c2ffc5f897c095779c3beff85ed084c712aebdf5ae7fb0373dcc09985fad6d1bc7443931912c2213a02ac58573f1aaa
7
+ data.tar.gz: 4aee469710a57647663b34301f48893185ab035ed1c260577e788d67a4405c2ab31bd322495ffaac9cd7f452d71c64b749bef04aa9caeb6efe8b7e66e8936a3f
@@ -26,8 +26,6 @@ module ElasticsearchServerless
26
26
  #
27
27
  # @option arguments [String] :name Index or template name (*Required*)
28
28
  # @option arguments [Boolean] :create If +true+, this request cannot replace or update existing index templates.
29
- # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
30
- # @option arguments [String] :cause User defined reason for creating/updating the index template
31
29
  # @option arguments [Hash] :headers Custom HTTP headers
32
30
  # @option arguments [Hash] :body request body
33
31
  #
@@ -24,10 +24,12 @@ module ElasticsearchServerless
24
24
  module Actions
25
25
  # Simulate matching the given index name against the index templates in the system
26
26
  #
27
- # @option arguments [String] :name Name of the index to simulate (*Required*)
27
+ # @option arguments [String] :name Index or template name to simulate (*Required*)
28
+ # @option arguments [Boolean] :create If +true+, the template passed in the body is only used if no existing templates match the same index patterns. If +false+, the simulation uses the template with the highest priority. Note that the template is not permanently added or updated in either case; it is only used for the simulation.
28
29
  # @option arguments [Time] :master_timeout Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Server default: 30s.
29
30
  # @option arguments [Boolean] :include_defaults If true, returns all relevant default configurations for the index template.
30
31
  # @option arguments [Hash] :headers Custom HTTP headers
32
+ # @option arguments [Hash] :body request body
31
33
  #
32
34
  # @see https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-simulate-index.html
33
35
  #
@@ -37,7 +39,7 @@ module ElasticsearchServerless
37
39
  arguments = arguments.clone
38
40
  headers = arguments.delete(:headers) || {}
39
41
 
40
- body = nil
42
+ body = arguments.delete(:body)
41
43
 
42
44
  _name = arguments.delete(:name)
43
45
 
@@ -19,7 +19,7 @@ require 'elasticsearch-serverless/api/response'
19
19
  require 'elasticsearch-serverless/api/utils'
20
20
 
21
21
  # Require everything in /api
22
- Dir["#{File.dirname(__FILE__)}/api/**/*.rb"].each { |f| require f }
22
+ Dir["#{File.dirname(__FILE__)}/api/**/*.rb"].each { |f| require f}
23
23
 
24
24
  module ElasticsearchServerless
25
25
  module API
@@ -61,7 +61,6 @@ module ElasticsearchServerless
61
61
  :cluster,
62
62
  :enrich,
63
63
  :eql,
64
- :esql,
65
64
  :graph,
66
65
  :indices,
67
66
  :ingest,
@@ -82,7 +81,7 @@ module ElasticsearchServerless
82
81
  module_name = if UPPERCASE_APIS.include?(name)
83
82
  name.upcase
84
83
  else
85
- name.split('_').map(&:capitalize).join
84
+ name.split("_").map(&:capitalize).join
86
85
  end
87
86
  class_name = "#{module_name}Client"
88
87
 
@@ -95,6 +94,6 @@ module ElasticsearchServerless
95
94
  end
96
95
  end
97
96
  # TODO: If there are more aliases, make this dynamic and add them to constant
98
- alias ml machine_learning
97
+ alias :ml :machine_learning
99
98
  end
100
99
  end
@@ -16,7 +16,7 @@
16
16
  # under the License.
17
17
 
18
18
  module ElasticsearchServerless
19
- API_VERSION = '2023-10-31'.freeze
20
- CLIENT_VERSION = '0.1.0'.freeze
21
- VERSION = CLIENT_VERSION
19
+ API_VERSION = '2023-10-31'
20
+ CLIENT_VERSION = '0.1.0'
21
+ VERSION = "#{CLIENT_VERSION}.#{API_VERSION.split('-').join}.pre".freeze
22
22
  end
@@ -53,7 +53,7 @@ module ElasticsearchServerless
53
53
  'Authorization' => "ApiKey #{api_key}",
54
54
  'Elastic-Api-Version' => ElasticsearchServerless::API_VERSION,
55
55
  user_agent: user_agent
56
- }
56
+ },
57
57
  },
58
58
  compression: true
59
59
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticsearch-serverless
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.0.20231031.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Briano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-06-11 00:00:00.000000000 Z
11
+ date: 2023-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: elastic-transport
@@ -124,7 +124,6 @@ files:
124
124
  - lib/elasticsearch-serverless/api/eql/get.rb
125
125
  - lib/elasticsearch-serverless/api/eql/get_status.rb
126
126
  - lib/elasticsearch-serverless/api/eql/search.rb
127
- - lib/elasticsearch-serverless/api/esql/query.rb
128
127
  - lib/elasticsearch-serverless/api/exists.rb
129
128
  - lib/elasticsearch-serverless/api/exists_source.rb
130
129
  - lib/elasticsearch-serverless/api/explain.rb
@@ -311,7 +310,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
311
310
  - !ruby/object:Gem::Version
312
311
  version: '0'
313
312
  requirements: []
314
- rubygems_version: 3.5.9
313
+ rubygems_version: 3.5.3
315
314
  signing_key:
316
315
  specification_version: 4
317
316
  summary: Elasticsearch Serverless Client
@@ -1,57 +0,0 @@
1
- # Licensed to Elasticsearch B.V. under one or more contributor
2
- # license agreements. See the NOTICE file distributed with
3
- # this work for additional information regarding copyright
4
- # ownership. Elasticsearch B.V. licenses this file to you under
5
- # the Apache License, Version 2.0 (the "License"); you may
6
- # not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing,
12
- # software distributed under the License is distributed on an
13
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
- # KIND, either express or implied. See the License for the
15
- # specific language governing permissions and limitations
16
- # under the License.
17
- #
18
- # Auto generated from commit f284cc16f4d4b4289bc679aa1529bb504190fe80
19
- # @see https://github.com/elastic/elasticsearch-specification
20
- #
21
- module ElasticsearchServerless
22
- module API
23
- module Esql
24
- module Actions
25
- # Executes an ESQL request
26
- # This functionality is Experimental and may be changed or removed
27
- # completely in a future release. Elastic will take a best effort approach
28
- # to fix any issues, but experimental features are not subject to the
29
- # support SLA of official GA features.
30
- #
31
- # @option arguments [String] :format A short version of the Accept header, e.g. json, yaml.
32
- # @option arguments [String] :delimiter The character to use between values within a CSV row. Only valid for the CSV format.
33
- # @option arguments [Hash] :headers Custom HTTP headers
34
- # @option arguments [Hash] :body request body
35
- #
36
- # @see https://www.elastic.co/guide/en/elasticsearch/reference/current/esql-rest.html
37
- #
38
- def query(arguments = {})
39
- raise ArgumentError, "Required argument 'body' missing" unless arguments[:body]
40
-
41
- arguments = arguments.clone
42
- headers = arguments.delete(:headers) || {}
43
-
44
- body = arguments.delete(:body)
45
-
46
- method = ElasticsearchServerless::API::HTTP_POST
47
- path = "_query"
48
- params = Utils.process_params(arguments)
49
-
50
- ElasticsearchServerless::API::Response.new(
51
- perform_request(method, path, params, body, headers)
52
- )
53
- end
54
- end
55
- end
56
- end
57
- end