Skip to content

Commit

Permalink
Auto-generated code for main (#2522)
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine authored Dec 5, 2024
1 parent 6447fc1 commit a4315a9
Show file tree
Hide file tree
Showing 122 changed files with 3,130 additions and 25,672 deletions.
8 changes: 6 additions & 2 deletions docs/doc_examples/0bee07a581c5776e068f6f4efad5a399.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@

[source, js]
----
const response = await client.esql.asyncQuery({
format: "json",
const response = await client.transport.request({
method: "POST",
path: "/_query/async",
querystring: {
format: "json",
},
body: {
query:
"\n FROM my-index-000001,cluster_one:my-index-000001,cluster_two:my-index*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ",
Expand Down
5 changes: 3 additions & 2 deletions docs/doc_examples/0dfde6a9d953822fd4b3aa0121ddd8fb.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

[source, js]
----
const response = await client.searchApplication.renderQuery({
name: "my-app",
const response = await client.transport.request({
method: "POST",
path: "/_application/search_application/my-app/_render_query",
body: {
params: {
query_string: "my first query",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const response = await client.searchApplication.put({
script: {
lang: "mustache",
source:
'\n {\n "query": {\n "bool": {\n "must": [\n {{#query}}\n \n {{/query}}\n ],\n "filter": {{#toJson}}_es_filters{{/toJson}}\n }\n },\n "_source": {\n "includes": ["title", "plot"]\n },\n "highlight": {\n "fields": {\n "title": { "fragment_size": 0 },\n "plot": { "fragment_size": 200 }\n }\n },\n "aggs": {{#toJson}}_es_aggs{{/toJson}},\n "from": {{from}},\n "size": {{size}},\n "sort": {{#toJson}}_es_sort_fields{{/toJson}}\n }\n ',
'\n {\n "query": {\n "bool": {\n "must": [\n {{#query}}\n {{/query}}\n ],\n "filter": {{#toJson}}_es_filters{{/toJson}}\n }\n },\n "_source": {\n "includes": ["title", "plot"]\n },\n "highlight": {\n "fields": {\n "title": { "fragment_size": 0 },\n "plot": { "fragment_size": 200 }\n }\n },\n "aggs": {{#toJson}}_es_aggs{{/toJson}},\n "from": {{from}},\n "size": {{size}},\n "sort": {{#toJson}}_es_sort_fields{{/toJson}}\n }\n ',
params: {
query: "",
_es_filters: {},
Expand Down
4 changes: 3 additions & 1 deletion docs/doc_examples/19c00c6b29bc7dbc5e92b3668da2da93.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

[source, js]
----
const response = await client.simulate.ingest({
const response = await client.transport.request({
method: "POST",
path: "/_ingest/_simulate",
body: {
docs: [
{
Expand Down
4 changes: 3 additions & 1 deletion docs/doc_examples/2a1eece9a59ac1773edcf0a932c26de0.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

[source, js]
----
const response = await client.security.oidcLogout({
const response = await client.transport.request({
method: "POST",
path: "/_security/oidc/logout",
body: {
token:
"dGhpcyBpcyBub3QgYSByZWFsIHRva2VuIGJ1dCBpdCBpcyBvbmx5IHRlc3QgZGF0YS4gZG8gbm90IHRyeSB0byByZWFkIHRva2VuIQ==",
Expand Down
10 changes: 6 additions & 4 deletions docs/doc_examples/2afdf0d83724953aa2875b5fb37d60cc.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@

[source, js]
----
const response = await client.esql.asyncQueryGet({
id: "FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
wait_for_completion_timeout: "30s",
body: null,
const response = await client.transport.request({
method: "GET",
path: "/_query/async/FmNJRUZ1YWZCU3dHY1BIOUhaenVSRkEaaXFlZ3h4c1RTWFNocDdnY2FSaERnUTozNDE=",
querystring: {
wait_for_completion_timeout: "30s",
},
});
console.log(response);
----
4 changes: 3 additions & 1 deletion docs/doc_examples/3f1fe5f5f99b98d0891f38003e10b636.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

[source, js]
----
const response = await client.esql.asyncQuery({
const response = await client.transport.request({
method: "POST",
path: "/_query/async",
body: {
query:
"\n FROM library\n | EVAL year = DATE_TRUNC(1 YEARS, release_date)\n | STATS MAX(page_count) BY year\n | SORT year\n | LIMIT 5\n ",
Expand Down
6 changes: 3 additions & 3 deletions docs/doc_examples/405511f7c1f12cc0a227b4563fe7b2e2.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

[source, js]
----
const response = await client.esql.asyncQueryGet({
id: "FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
body: null,
const response = await client.transport.request({
method: "GET",
path: "/_query/async/FkpMRkJGS1gzVDRlM3g4ZzMyRGlLbkEaTXlJZHdNT09TU2VTZVBoNDM3cFZMUToxMDM=",
});
console.log(response);
----
6 changes: 3 additions & 3 deletions docs/doc_examples/4b91ad7c9b44e07db4a4e81390f19ad3.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

[source, js]
----
const response = await client.inference.streamInference({
task_type: "completion",
inference_id: "openai-completion",
const response = await client.transport.request({
method: "POST",
path: "/_inference/completion/openai-completion/_stream",
body: {
input: "What is Elastic?",
},
Expand Down
4 changes: 3 additions & 1 deletion docs/doc_examples/57dc15e5ad663c342fd5c1d86fcd1b29.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

[source, js]
----
const response = await client.security.oidcPrepareAuthentication({
const response = await client.transport.request({
method: "POST",
path: "/_security/oidc/prepare",
body: {
realm: "oidc1",
state: "lGYK0EcSLjqH6pkT5EVZjC6eIW5YCGgywj2sxROO",
Expand Down
8 changes: 6 additions & 2 deletions docs/doc_examples/5bba213a7f543190139d1a69ab2ed076.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@

[source, js]
----
const response = await client.esql.asyncQuery({
format: "json",
const response = await client.transport.request({
method: "POST",
path: "/_query/async",
querystring: {
format: "json",
},
body: {
query:
"\n FROM cluster_one:my-index*,cluster_two:logs*\n | STATS COUNT(http.response.status_code) BY user.id\n | LIMIT 2\n ",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const response = await client.searchApplication.put({
script: {
lang: "mustache",
source:
'\n {\n "query": {\n "bool": {\n "must": [\n {{#query}}\n \n {{/query}}\n ],\n "filter": {{#toJson}}_es_filters{{/toJson}}\n }\n },\n "_source": {\n "includes": ["title", "plot"]\n },\n "aggs": {{#toJson}}_es_aggs{{/toJson}},\n "from": {{from}},\n "size": {{size}},\n "sort": {{#toJson}}_es_sort_fields{{/toJson}}\n }\n ',
'\n {\n "query": {\n "bool": {\n "must": [\n {{#query}}\n {{/query}}\n ],\n "filter": {{#toJson}}_es_filters{{/toJson}}\n }\n },\n "_source": {\n "includes": ["title", "plot"]\n },\n "aggs": {{#toJson}}_es_aggs{{/toJson}},\n "from": {{from}},\n "size": {{size}},\n "sort": {{#toJson}}_es_sort_fields{{/toJson}}\n }\n ',
params: {
query: "",
_es_filters: {},
Expand Down
4 changes: 3 additions & 1 deletion docs/doc_examples/6f3b723bf6179b96c3413597ed7f49e1.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

[source, js]
----
const response = await client.security.bulkUpdateApiKeys({
const response = await client.transport.request({
method: "POST",
path: "/_security/api_key/_bulk_update",
body: {
ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"],
},
Expand Down
4 changes: 3 additions & 1 deletion docs/doc_examples/77518e8c6198acfe77c0934fd2fe65cb.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

[source, js]
----
const response = await client.textStructure.findMessageStructure({
const response = await client.transport.request({
method: "POST",
path: "/_text_structure/find_message_structure",
body: {
messages: [
"[2024-03-05T10:52:36,256][INFO ][o.a.l.u.VectorUtilPanamaProvider] [laptop] Java vector incubator API enabled; uses preferredBitSize=128",
Expand Down
11 changes: 11 additions & 0 deletions docs/doc_examples/7ba29f0be2297b54a640b0a17d7ef5ca.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples

[source, js]
----
const response = await client.transport.request({
method: "DELETE",
path: "/_ingest/ip_location/database/my-database-id",
});
console.log(response);
----
4 changes: 3 additions & 1 deletion docs/doc_examples/80dd7f5882c59b9c1c90e8351937441f.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

[source, js]
----
const response = await client.security.bulkUpdateApiKeys({
const response = await client.transport.request({
method: "POST",
path: "/_security/api_key/_bulk_update",
body: {
ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"],
role_descriptors: {
Expand Down
17 changes: 17 additions & 0 deletions docs/doc_examples/91e106a2affbc8df32cd940684a779ed.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples

[source, js]
----
const response = await client.transport.request({
method: "PUT",
path: "/_ingest/ip_location/database/my-database-1",
body: {
name: "GeoIP2-Domain",
maxmind: {
account_id: "1234567",
},
},
});
console.log(response);
----
11 changes: 11 additions & 0 deletions docs/doc_examples/99fb82d49ac477e6a9dfdd71f9465374.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples

[source, js]
----
const response = await client.transport.request({
method: "DELETE",
path: "/_ingest/ip_location/database/example-database-id",
});
console.log(response);
----
6 changes: 3 additions & 3 deletions docs/doc_examples/9afa0844883b7471883aa378a8dd10b4.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

[source, js]
----
const response = await client.searchApplication.postBehavioralAnalyticsEvent({
collection_name: "my_analytics_collection",
event_type: "search_click",
const response = await client.transport.request({
method: "POST",
path: "/_application/analytics/my_analytics_collection/event/search_click",
body: {
session: {
id: "1797ca95-91c9-4e2e-b1bd-9c38e6f386a9",
Expand Down
4 changes: 3 additions & 1 deletion docs/doc_examples/9c01db07c9ac395b6370e3b33965c21f.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

[source, js]
----
const response = await client.security.oidcAuthenticate({
const response = await client.transport.request({
method: "POST",
path: "/_security/oidc/authenticate",
body: {
redirect_uri:
"https://oidc-kibana.elastic.co:5603/api/security/oidc/callback?code=jtI3Ntt8v3_XvcLzCFGq&state=4dbrihtIAt3wBTwo6DxK-vdk-sSyDBV8Yf0AjdkdT5I",
Expand Down
5 changes: 3 additions & 2 deletions docs/doc_examples/a162eb50853331c80596f5994e9d1c38.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

[source, js]
----
const response = await client.searchApplication.renderQuery({
name: "my_search_application",
const response = await client.transport.request({
method: "POST",
path: "/_application/search_application/my_search_application/_render_query",
body: {
params: {
query_string: "rock climbing",
Expand Down
6 changes: 3 additions & 3 deletions docs/doc_examples/b0bddf2ffaa83049b195829c06b875cd.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@

[source, js]
----
const response = await client.searchApplication.renderQuery({
name: "my_search_application",
body: null,
const response = await client.transport.request({
method: "POST",
path: "/_application/search_application/my_search_application/_render_query",
});
console.log(response);
----
11 changes: 7 additions & 4 deletions docs/doc_examples/b62eaa20c4e0e48134a6d1d1b3c30b26.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,13 @@ const response = await client.bulk({
});
console.log(response);
const response1 = await client.textStructure.findFieldStructure({
index: "test-logs",
field: "message",
body: null,
const response1 = await client.transport.request({
method: "GET",
path: "/_text_structure/find_field_structure",
querystring: {
index: "test-logs",
field: "message",
},
});
console.log(response1);
----
4 changes: 3 additions & 1 deletion docs/doc_examples/bcdfaa4487747249699a86a0dcd22f5e.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

[source, js]
----
const response = await client.simulate.ingest({
const response = await client.transport.request({
method: "POST",
path: "/_ingest/_simulate",
body: {
docs: [
{
Expand Down
4 changes: 3 additions & 1 deletion docs/doc_examples/c580990a70028bb49cca8a6bde86bbf6.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

[source, js]
----
const response = await client.security.bulkUpdateApiKeys({
const response = await client.transport.request({
method: "POST",
path: "/_security/api_key/_bulk_update",
body: {
ids: ["VuaCfGcBCdbkQm-e5aOx", "H3_AhoIBA9hmeQJdg7ij"],
role_descriptors: {},
Expand Down
4 changes: 3 additions & 1 deletion docs/doc_examples/ccc613951c61f0b17e1ed8a2d3ae54a2.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

[source, js]
----
const response = await client.simulate.ingest({
const response = await client.transport.request({
method: "POST",
path: "/_ingest/_simulate",
body: {
docs: [
{
Expand Down
4 changes: 3 additions & 1 deletion docs/doc_examples/d35c8cf7a98b3f112e1de8797ec6689d.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

[source, js]
----
const response = await client.security.oidcPrepareAuthentication({
const response = await client.transport.request({
method: "POST",
path: "/_security/oidc/prepare",
body: {
iss: "http://127.0.0.1:8080",
login_hint: "this_is_an_opaque_string",
Expand Down
15 changes: 15 additions & 0 deletions docs/doc_examples/d4df39f72d3a3b80cd4042f6a21c3f19.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples

[source, js]
----
const response = await client.transport.request({
method: "PUT",
path: "/_ingest/ip_location/database/my-database-2",
body: {
name: "standard_location",
ipinfo: {},
},
});
console.log(response);
----
11 changes: 11 additions & 0 deletions docs/doc_examples/d8c053ee26c1533ce936ec81101d8e1b.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// This file is autogenerated, DO NOT EDIT
// Use `node scripts/generate-docs-examples.js` to generate the docs examples

[source, js]
----
const response = await client.transport.request({
method: "GET",
path: "/_ingest/ip_location/database/my-database-id",
});
console.log(response);
----
5 changes: 4 additions & 1 deletion docs/doc_examples/dd71b0c9f9197684ff29c61062c55660.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

[source, js]
----
const response = await client.security.getSettings();
const response = await client.transport.request({
method: "GET",
path: "/_security/settings",
});
console.log(response);
----
4 changes: 3 additions & 1 deletion docs/doc_examples/e3019fd5f23458ae49ad9854c97d321c.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

[source, js]
----
const response = await client.security.oidcPrepareAuthentication({
const response = await client.transport.request({
method: "POST",
path: "/_security/oidc/prepare",
body: {
realm: "oidc1",
},
Expand Down
4 changes: 3 additions & 1 deletion docs/doc_examples/e4b38973c74037335378d8480f1ce894.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

[source, js]
----
const response = await client.simulate.ingest({
const response = await client.transport.request({
method: "POST",
path: "/_ingest/_simulate",
body: {
docs: [
{
Expand Down
Loading

0 comments on commit a4315a9

Please sign in to comment.