Skip to content

Commit

Permalink
Updated endpoints to 8.11
Browse files Browse the repository at this point in the history
  • Loading branch information
ezimuel committed Jan 22, 2024
1 parent 03e8aae commit 8625d9b
Show file tree
Hide file tree
Showing 20 changed files with 1,715 additions and 232 deletions.
2 changes: 1 addition & 1 deletion cpanfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ requires "File::Util::Tempdir" => "0";
requires "HTTP::Headers" => "0";
requires "HTTP::Parser::XS" => "0";
requires "HTTP::Request" => "0";
requires "HTTP::Tiny" => "0.076";
requires "HTTP::Tiny" => "0.088";
requires "IO::Compress::Deflate" => "0";
requires "IO::Compress::Gzip" => "0";
requires "IO::Uncompress::Unzip" => "0";
Expand Down
2 changes: 1 addition & 1 deletion lib/Search/Elasticsearch.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ use Moo 2.001000 ();
use Search::Elasticsearch::Util qw(parse_params load_plugin);
use namespace::clean;

our $VERSION = '8.00';
our $VERSION = '8.12';

my %Default_Plugins = (
client => [ 'Search::Elasticsearch::Client', '8_0::Direct' ],
Expand Down
2 changes: 1 addition & 1 deletion lib/Search/Elasticsearch/Async.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package Search::Elasticsearch::Async;

our $VERSION = '8.00';
our $VERSION = '8.12';
use Search::Elasticsearch 8.00;
use Promises 0.93 ();
use parent 'Search::Elasticsearch';
Expand Down
2 changes: 1 addition & 1 deletion lib/Search/Elasticsearch/Client/7_0.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package Search::Elasticsearch::Client::7_0;

our $VERSION='8.00';
our $VERSION='8.12';
use Search::Elasticsearch 8.00 ();

1;
Expand Down
4 changes: 2 additions & 2 deletions lib/Search/Elasticsearch/Client/7_0/Async.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

package Search::Elasticsearch::Client::7_0::Async;

our $VERSION='8.00';
use Search::Elasticsearch::Client::7_0 7.00 ();
our $VERSION='8.12';
use Search::Elasticsearch::Client::7_0 8.12 ();

1;

Expand Down
2 changes: 1 addition & 1 deletion lib/Search/Elasticsearch/Client/8_0.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

package Search::Elasticsearch::Client::8_0;

our $VERSION='8.00';
our $VERSION='8.12';
use Search::Elasticsearch 8.00 ();

1;
Expand Down
4 changes: 2 additions & 2 deletions lib/Search/Elasticsearch/Client/8_0/Async.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

package Search::Elasticsearch::Client::8_0::Async;

our $VERSION='8.00';
use Search::Elasticsearch::Client::8_0 8.00 ();
our $VERSION='8.12';
use Search::Elasticsearch::Client::8_0 8.12 ();

1;

Expand Down
18 changes: 18 additions & 0 deletions lib/Search/Elasticsearch/Client/8_0/Direct.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,39 @@ has 'autoscaling' => ( is => 'lazy', init_arg => undef );
has 'cat' => ( is => 'lazy', init_arg => undef );
has 'ccr' => ( is => 'lazy', init_arg => undef );
has 'cluster' => ( is => 'lazy', init_arg => undef );
has 'connector' => ( is => 'lazy', init_arg => undef );
has 'dangling_indices' => ( is => 'lazy', init_arg => undef );
has 'enrich' => ( is => 'lazy', init_arg => undef );
has 'eql' => ( is => 'lazy', init_arg => undef );
has 'esql' => ( is => 'lazy', init_arg => undef );
has 'features' => ( is => 'lazy', init_arg => undef );
has 'fleet' => ( is => 'lazy', init_arg => undef );
has 'graph' => ( is => 'lazy', init_arg => undef );
has 'ilm' => ( is => 'lazy', init_arg => undef );
has 'indices' => ( is => 'lazy', init_arg => undef );
has 'inference' => ( is => 'lazy', init_arg => undef );
has 'ingest' => ( is => 'lazy', init_arg => undef );
has 'license' => ( is => 'lazy', init_arg => undef );
has 'logstash' => ( is => 'lazy', init_arg => undef );
has 'migration' => ( is => 'lazy', init_arg => undef );
has 'ml' => ( is => 'lazy', init_arg => undef );
has 'monitoring' => ( is => 'lazy', init_arg => undef );
has 'nodes' => ( is => 'lazy', init_arg => undef );
has 'profiling' => ( is => 'lazy', init_arg => undef );
has 'query_ruleset' => ( is => 'lazy', init_arg => undef );
has 'rollup' => ( is => 'lazy', init_arg => undef );
has 'searchable_snapshots' => ( is => 'lazy', init_arg => undef );
has 'search_application' => ( is => 'lazy', init_arg => undef );
has 'security' => ( is => 'lazy', init_arg => undef );
has 'shutdown' => ( is => 'lazy', init_arg => undef );
has 'simulate' => ( is => 'lazy', init_arg => undef );
has 'snapshot' => ( is => 'lazy', init_arg => undef );
has 'slm' => ( is => 'lazy', init_arg => undef );
has 'sql' => ( is => 'lazy', init_arg => undef );
has 'ssl' => ( is => 'lazy', init_arg => undef );
has 'synonyms' => ( is => 'lazy', init_arg => undef );
has 'tasks' => ( is => 'lazy', init_arg => undef );
has 'text_structure' => ( is => 'lazy', init_arg => undef );
has 'transform' => ( is => 'lazy', init_arg => undef );
has 'watcher' => ( is => 'lazy', init_arg => undef );
has 'xpack' => ( is => 'lazy', init_arg => undef );
Expand Down Expand Up @@ -90,30 +99,39 @@ sub _build_async_search { shift->_build_namespace('AsyncSearch') }
sub _build_cat { shift->_build_namespace('Cat') }
sub _build_ccr { shift->_build_namespace('CCR') }
sub _build_cluster { shift->_build_namespace('Cluster') }
sub _build_connector { shift->_build_namespace('Connector') }
sub _build_dangling_indices { shift->_build_namespace('DanglingIndices') }
sub _build_enrich { shift->_build_namespace('Enrich') }
sub _build_eql { shift->_build_namespace('Eql') }
sub _build_esql { shift->_build_namespace('Esql') }
sub _build_features { shift->_build_namespace('Features') }
sub _build_fleet { shift->_build_namespace('Fleet') }
sub _build_graph { shift->_build_namespace('Graph') }
sub _build_ilm { shift->_build_namespace('ILM') }
sub _build_indices { shift->_build_namespace('Indices') }
sub _build_inference { shift->_build_namespace('Inference') }
sub _build_ingest { shift->_build_namespace('Ingest') }
sub _build_license { shift->_build_namespace('License') }
sub _build_logstash { shift->_build_namespace('Logstash') }
sub _build_migration { shift->_build_namespace('Migration') }
sub _build_ml { shift->_build_namespace('ML') }
sub _build_monitoring { shift->_build_namespace('Monitoring') }
sub _build_nodes { shift->_build_namespace('Nodes') }
sub _build_profiling { shift->_build_namespace('Profiling') }
sub _build_query_ruleset { shift->_build_namespace('QueryRuleset') }
sub _build_rollup { shift->_build_namespace('Rollup') }
sub _build_searchable_snapshots { shift->_build_namespace('SearchableSnapshots') }
sub _build_search_application { shift->_build_namespace('SearchApplication') }
sub _build_security { shift->_build_namespace('Security') }
sub _build_shutdown { shift->_build_namespace('Shutdown') }
sub _build_simulate { shift->_build_namespace('Simulate') }
sub _build_snapshot { shift->_build_namespace('Snapshot') }
sub _build_slm { shift->_build_namespace('Slm') }
sub _build_sql { shift->_build_namespace('SQL') }
sub _build_ssl { shift->_build_namespace('SSL') }
sub _build_synonyms { shift->_build_namespace('Synonyms') }
sub _build_tasks { shift->_build_namespace('Tasks') }
sub _build_text_structure { shift->_build_namespace('TextStructure') }
sub _build_transform { shift->_build_namespace('Transform') }
sub _build_watcher { shift->_build_namespace('Watcher') }
sub _build_xpack { shift->_build_namespace('XPack') }
Expand Down
59 changes: 59 additions & 0 deletions lib/Search/Elasticsearch/Client/8_0/Direct/Connector.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

package Search::Elasticsearch::Client::8_0::Direct::Connector;

use Moo;
with 'Search::Elasticsearch::Client::8_0::Role::API';
with 'Search::Elasticsearch::Role::Client::Direct';
__PACKAGE__->_install_api('connector');

1;

__END__
# ABSTRACT: A client for create and manage Elastic connectors
=head1 DESCRIPTION
The connector and sync jobs API provides a convenient way to create
and manage Elastic connectors and sync jobs in an internal index.
This API provides an alternative to relying solely on Kibana UI
for connector and sync job management. The API comes with a set of
validations and assertions to ensure that the state representation
in the internal index remains valid.
The full documentation for Eql feature is available here:
L<https://www.elastic.co/guide/en/elasticsearch/reference/master/connector-apis.html>
It does L<Search::Elasticsearch::Role::Client::Direct>.
=head1 METHODS
=head2 C<put()>
$response = $e->connector->put(
connector_id => "my-connector",
body => {
index_name => "search-google-drive",
name => "My Connector",
service_type => "google_drive"
}
);
The C<put()> method create a connector.
53 changes: 53 additions & 0 deletions lib/Search/Elasticsearch/Client/8_0/Direct/Esql.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

package Search::Elasticsearch::Client::8_0::Direct::Esql;

use Moo;
with 'Search::Elasticsearch::Client::8_0::Role::API';
with 'Search::Elasticsearch::Role::Client::Direct';
use namespace::clean;

__PACKAGE__->_install_api('esql');

1;

__END__
# ABSTRACT: The Elasticsearch Query Language (ES|QL) provides a
powerful way to filter, transform, and analyze data stored in
Elasticsearch, and in the future in other runtimes.
It is designed to be easy to learn and use, by end users,
SRE teams, application developers, and administrators.
=head2 DESCRIPTION
The full documentation for ES|QL feature is available here:
L<https://www.elastic.co/guide/en/elasticsearch/reference/master/esql-apis.html>
=head1 FOLLOW METHODS
=head2 C<follow()>
my $response = $es->esql->query(
'body' => {
'query' => 'FROM sample_data'
}
);
An introduction to Elasticsearch Query Language is available here:
L<https://www.elastic.co/guide/en/elasticsearch/reference/current/esql.html>
54 changes: 54 additions & 0 deletions lib/Search/Elasticsearch/Client/8_0/Direct/Inference.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

package Search::Elasticsearch::Client::8_0::Direct::Inference;

use Moo;
with 'Search::Elasticsearch::Client::8_0::Role::API';
with 'Search::Elasticsearch::Role::Client::Direct';
use namespace::clean;

__PACKAGE__->_install_api('inference');

1;

__END__
# ABSTRACT: The inference APIs enable you to use certain services,
such as ELSER, OpenAI, or Hugging Face, in your cluster.
=head2 DESCRIPTION
The full documentation for Inference is available here:
L<https://www.elastic.co/guide/en/elasticsearch/reference/current/inference-apis.html>
=head1 FOLLOW METHODS
=head2 C<follow()>
my $response = $es->inference->put_model(
'task_type' => 'sparse_embedding',
'model_id' => 'my-elser-model',
'body' => {
'service' => 'elser',
'service_settings' => {
'num_allocations' => 1,
'num_threads' => 1
},
'task_settings' => {}
}
);
43 changes: 43 additions & 0 deletions lib/Search/Elasticsearch/Client/8_0/Direct/Profiling.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

package Search::Elasticsearch::Client::8_0::Direct::Profiling;

use Moo;
with 'Search::Elasticsearch::Client::8_0::Role::API';
with 'Search::Elasticsearch::Role::Client::Direct';
use namespace::clean;

__PACKAGE__->_install_api('profiling');

1;

__END__
# ABSTRACT: The Profile API returns basic information about
the status of Universal Profiling.
=head2 DESCRIPTION
The full documentation for Universal Profiling is available here:
L<https://www.elastic.co/guide/en/observability/current/universal-profiling.html>
=head1 FOLLOW METHODS
=head2 C<follow()>
my $response = $es->profiling->status();
Loading

0 comments on commit 8625d9b

Please sign in to comment.