diff --git a/.github/workflows/bundler.yml b/.github/workflows/bundler.yml index d40f16884..9d02f3fd7 100644 --- a/.github/workflows/bundler.yml +++ b/.github/workflows/bundler.yml @@ -33,7 +33,7 @@ jobs: - name: Use Node.js 14.x uses: actions/setup-node@v3 with: - node-version: 14.x + node-version: 18.x # NPM started understanding yarn.lock file starting from v7 - name: Update NPM diff --git a/.github/workflows/compatibility.yml b/.github/workflows/compatibility.yml index 8a86df0e9..7f190fd6a 100644 --- a/.github/workflows/compatibility.yml +++ b/.github/workflows/compatibility.yml @@ -53,7 +53,7 @@ jobs: - name: Use Node.js 16.x uses: actions/setup-node@v3 with: - node-version: 16.x + node-version: 18.x - name: Install run: | diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index c27468d97..9534eef52 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: - node-version: [12.x] + node-version: [18.x] steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/gh_pages.yml b/.github/workflows/gh_pages.yml index 99f89b0cc..00da11109 100644 --- a/.github/workflows/gh_pages.yml +++ b/.github/workflows/gh_pages.yml @@ -11,7 +11,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - ruby-version: 16.x + node-version: 18.x - name: Install Tools run: | sudo apt install -y jq diff --git a/.github/workflows/integration-unreleased.yml b/.github/workflows/integration-unreleased.yml index 34a07a6ee..5cf140213 100644 --- a/.github/workflows/integration-unreleased.yml +++ b/.github/workflows/integration-unreleased.yml @@ -19,10 +19,10 @@ jobs: fail-fast: false matrix: entry: - - { node_version: '16.x', opensearch_ref: '1.x', jdk_version: '11' } - - { node_version: '16.x', opensearch_ref: '2.0', jdk_version: '17' } - - { node_version: '16.x', opensearch_ref: '2.x', jdk_version: '17' } - - { node_version: '16.x', opensearch_ref: 'main', jdk_version: '17' } + - { node_version: '18.x', opensearch_ref: '1.x', jdk_version: '11' } + - { node_version: '18.x', opensearch_ref: '2.0', jdk_version: '17' } + - { node_version: '18.x', opensearch_ref: '2.x', jdk_version: '17' } + - { node_version: '18.x', opensearch_ref: 'main', jdk_version: '17' } steps: - name: Checkout OpenSearch uses: actions/checkout@v3 @@ -36,7 +36,6 @@ jobs: working-directory: opensearch run: echo key=`git log -1 --format='%H'` >> $GITHUB_OUTPUT - - name: Restore cached build id: cache-restore uses: actions/cache/restore@v3 @@ -108,4 +107,4 @@ jobs: with: name: opensearch-logs-${{ matrix.entry.opensearch_ref }}-js-${{ matrix.entry.node_version }} path: | - opensearch/distribution/archives/linux-tar/build/distributions/**/logs/* \ No newline at end of file + opensearch/distribution/archives/linux-tar/build/distributions/**/logs/* diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 86163836f..6568cfe48 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -20,7 +20,7 @@ jobs: strategy: matrix: - node-version: [10.x, 12.x, 14.x, 16.x, 18.x] + node-version: [18.x, 20.x, 22.x] env: SECURE_INTEGRATION: false @@ -69,7 +69,7 @@ jobs: strategy: matrix: - node-version: [10.x, 12.x, 14.x, 16.x, 18.x] + node-version: [18.x, 20.x, 22.x] env: SECURE_INTEGRATION: true diff --git a/.github/workflows/license.yml b/.github/workflows/license.yml index c9774ad67..b23437917 100644 --- a/.github/workflows/license.yml +++ b/.github/workflows/license.yml @@ -9,7 +9,7 @@ jobs: strategy: matrix: - node-version: [12.x] + node-version: [18.x] steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index e4330aca7..2dbccf976 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -18,7 +18,7 @@ jobs: strategy: matrix: - node-version: [10.x, 12.x, 14.x, 16.x, 18.x] + node-version: [18.x, 20.x, 22.x] os: [ubuntu-latest, windows-latest, macOS-13] steps: diff --git a/.gitignore b/.gitignore index 6de610f52..ccafacef3 100644 --- a/.gitignore +++ b/.gitignore @@ -48,11 +48,6 @@ jspm_packages #Jetbrains editor folder .idea -# opensearch repo or binary files -opensearch* -!opensearch_dashboards* -!opensearchDashboards* - # documentation docs/ diff --git a/.npmignore b/.npmignore deleted file mode 100644 index 6b2e0368a..000000000 --- a/.npmignore +++ /dev/null @@ -1,77 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* - -# Runtime data -pids -*.pid -*.seed - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# coverage output -coverage.lcov - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules -jspm_packages - -# Optional npm cache directory -.npm - -# Optional REPL history -.node_repl_history - -# mac files -.DS_Store - -# vim swap files -*.swp - -package-lock.json - -# opensearch repo or binary files -opensearch* -!opensearch_dashboards* -!opensearchDashboards* - -# Generated typings, we don't commit them -# because we should copy them in the main .d.ts file -api/generated.d.ts - -# Ignore doc folder -docs - -# Ignore test folder -test - -# Ignore scripts folder -scripts - -# ci configuration -.ci -.travis.yml -certs -.github -CODE_OF_CONDUCT.md -CONTRIBUTING.md - -# CANARY-PACKAGE - diff --git a/CHANGELOG.md b/CHANGELOG.md index 7853b5421..3ae96581c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,9 +2,21 @@ Inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) + ## [Unreleased] ### Added ### Dependencies +### Changed +### Deprecated +### Removed +### Fixed +### Security + +## [3.0.0] +### Added +- Added missing API functions and modules. +- Added missing request and response types. +### Dependencies - Bumps `micromatch` from 4.0.7 to 4.0.8 - Bumps `debug` from 4.3.6 to 4.3.7 - Bumps `simple-statistics` from 7.8.4 to 7.8.5 @@ -12,8 +24,15 @@ Inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Bumps `@types/node` from 22.5.0 to 22.5.4 - Bumps `aws4` from 1.13.1 to 1.13.2 ### Changed +- All API functions are now generated from the OpenSearch API specification. +- API request and response types are now generated from the OpenSearch API specification. +- Overhauled API codebase and break it into smaller, more manageable files for better readability and maintainability. ### Deprecated +- Support for snake_cased API function aliases have been deprecated to conform to JavaScript naming conventions. ### Removed +- Removed support for API param aliases. That is, the API functions now only accept params with the exact names specified in the OpenSearch API specification. +- Removed support for overriding HTTP methods in API functions. +- Removed support for Node.js 10 through 16. The minimum supported Node.js version is now 18. ### Fixed ### Security diff --git a/UPGRADING.md b/UPGRADING.md new file mode 100644 index 000000000..03c2c2dff --- /dev/null +++ b/UPGRADING.md @@ -0,0 +1,62 @@ + +* [Upgrading The Opensearch JavaScript Client](#upgrading-the-opensearch-javascript-client) + * [Upgrading from 2.x to 3.x](#upgrading-from-2x-to-3x) + * [Breaking Changes](#breaking-changes) + * [Removed camelCase params:](#removed-camelcase-params-) + * [Removed overridden HTTP methods:](#removed-overridden-http-methods-) + * [Changes in Request and Response types:](#changes-in-request-and-response-types-) + * [Deprecations](#deprecations) + + +# Upgrading The Opensearch JavaScript Client +## Upgrading from 2.x to 3.x +Starting from 3.x, the API functions and modules in opensearch-js are generated from the [OpenSearch REST API specification](https://github.com/opensearch-project/opensearch-api-specification/). While the vast majority of the API remains the same, there are some breaking changes that may require updating your application when upgrading from 2.x to 3.x. +### Breaking Changes + +#### Removed camelCase params: +Every API function now only accepts parameters matching the OpenSearch API Spec, which are also what the OpenSearch server expects. In previous versions, some API functions would convert camelCase parameters to snake_case before sending them to the server. This is no longer the case. For example, the client now only accepts `filter_path` as a parameter, and passing `filterPath` will result in an error from the server. + + +#### Removed overridden HTTP methods: +The 3.x client no longer allows overriding the HTTP method for API functions. In previous versions, some API functions let you pass `method` as a parameter to the API functions to override the default HTTP method. Now, `method` will be considered a querystring param, and using it will likely result in an error. If you need to send a custom request, you should use the `client.http` namespace. + +In 2.x: +```ts +// Forcing a GET request even though the API function defaults to POST for search request with a body +client.search({ method: 'GET', body: { query: { match: { director: 'miller' } } } }); +``` + +In 3.x: +```ts +// Use the `client.http` namespace to send a custom request to achieve the same effect +client.http.get({ path: '/_search', body: { query: { match: { director: 'miller' } } } }); +``` + + +#### Changes in Request and Response types: +The biggest improvement in 3.x is the addition of all the request and response types for each API function. This means that you can now see the exact shape of the request and response objects for each API function. This is especially useful for TypeScript users, as it provides a better developer experience. However, previously handwritten request and response types have been replaced by those generated from the spec, so you may need to update your code to match the new types: + +In 2.x: +```ts +import { Client, type opensearchtypes, type RequestParams } from '@opensearch-project/opensearch'; + +const client = new Client({ node: 'http://localhost:9200' }); + +const searchRequest: RequestParams.Search = { body: { query: { match: { director: 'miller' } } } }; +const searchResponse = (await client.search(searchBody)).body as opensearchtypes.SearchResponse; +``` + +In 3.x: +```ts +import { Client, type API } from '@opensearch-project/opensearch'; + +const client = new Client({ node: 'http://localhost:9200' }); + +const searchRequest: API.Search_Request = { body: { query: { match: { director: 'miller' } } } }; +const searchResponse = (await client.search(searchBody)).body; +// Note that the response type is now inferred, and you don't need to cast with `as API.Search_ResponseBody` +``` + +### Deprecations + +- **snake_case API modules and functions**: In 3.x, all API modules and functions are now in camelCase, comforming to the naming convention of Javascript. The snake_case aliases are still available but are deprecated and will be removed in a future version. \ No newline at end of file diff --git a/api/OpenSearchAPI.d.ts b/api/OpenSearchAPI.d.ts new file mode 100644 index 000000000..a4a67f624 --- /dev/null +++ b/api/OpenSearchAPI.d.ts @@ -0,0 +1,1404 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Global from './_types/_global'; +import * as API from './index'; +import { + ApiError, + ApiResponse, + TransportRequestOptions, + TransportRequestCallback, + TransportRequestPromise, +} from '../lib/Transport'; + +declare type callbackFn = (err: ApiError, result: TResponse) => void; + +declare interface HttpRequest { + path: string; + querystring?: Global.Params; + headers?: Record; + body?: Record | Record[] | string; +} + +export default class OpenSearchAPI { + cat: { + help (params?: API.Cat_Help_Request, options?: TransportRequestOptions): TransportRequestPromise; + help (callback: callbackFn): TransportRequestCallback; + help (params: API.Cat_Help_Request, callback: callbackFn): TransportRequestCallback; + help (params: API.Cat_Help_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + aliases (params?: API.Cat_Aliases_Request, options?: TransportRequestOptions): TransportRequestPromise; + aliases (callback: callbackFn): TransportRequestCallback; + aliases (params: API.Cat_Aliases_Request, callback: callbackFn): TransportRequestCallback; + aliases (params: API.Cat_Aliases_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + allocation (params?: API.Cat_Allocation_Request, options?: TransportRequestOptions): TransportRequestPromise; + allocation (callback: callbackFn): TransportRequestCallback; + allocation (params: API.Cat_Allocation_Request, callback: callbackFn): TransportRequestCallback; + allocation (params: API.Cat_Allocation_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + clusterManager (params?: API.Cat_ClusterManager_Request, options?: TransportRequestOptions): TransportRequestPromise; + clusterManager (callback: callbackFn): TransportRequestCallback; + clusterManager (params: API.Cat_ClusterManager_Request, callback: callbackFn): TransportRequestCallback; + clusterManager (params: API.Cat_ClusterManager_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + count (params?: API.Cat_Count_Request, options?: TransportRequestOptions): TransportRequestPromise; + count (callback: callbackFn): TransportRequestCallback; + count (params: API.Cat_Count_Request, callback: callbackFn): TransportRequestCallback; + count (params: API.Cat_Count_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + fielddata (params?: API.Cat_Fielddata_Request, options?: TransportRequestOptions): TransportRequestPromise; + fielddata (callback: callbackFn): TransportRequestCallback; + fielddata (params: API.Cat_Fielddata_Request, callback: callbackFn): TransportRequestCallback; + fielddata (params: API.Cat_Fielddata_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + health (params?: API.Cat_Health_Request, options?: TransportRequestOptions): TransportRequestPromise; + health (callback: callbackFn): TransportRequestCallback; + health (params: API.Cat_Health_Request, callback: callbackFn): TransportRequestCallback; + health (params: API.Cat_Health_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + indices (params?: API.Cat_Indices_Request, options?: TransportRequestOptions): TransportRequestPromise; + indices (callback: callbackFn): TransportRequestCallback; + indices (params: API.Cat_Indices_Request, callback: callbackFn): TransportRequestCallback; + indices (params: API.Cat_Indices_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + master (params?: API.Cat_Master_Request, options?: TransportRequestOptions): TransportRequestPromise; + master (callback: callbackFn): TransportRequestCallback; + master (params: API.Cat_Master_Request, callback: callbackFn): TransportRequestCallback; + master (params: API.Cat_Master_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + nodeattrs (params?: API.Cat_Nodeattrs_Request, options?: TransportRequestOptions): TransportRequestPromise; + nodeattrs (callback: callbackFn): TransportRequestCallback; + nodeattrs (params: API.Cat_Nodeattrs_Request, callback: callbackFn): TransportRequestCallback; + nodeattrs (params: API.Cat_Nodeattrs_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + nodes (params?: API.Cat_Nodes_Request, options?: TransportRequestOptions): TransportRequestPromise; + nodes (callback: callbackFn): TransportRequestCallback; + nodes (params: API.Cat_Nodes_Request, callback: callbackFn): TransportRequestCallback; + nodes (params: API.Cat_Nodes_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + pendingTasks (params?: API.Cat_PendingTasks_Request, options?: TransportRequestOptions): TransportRequestPromise; + pendingTasks (callback: callbackFn): TransportRequestCallback; + pendingTasks (params: API.Cat_PendingTasks_Request, callback: callbackFn): TransportRequestCallback; + pendingTasks (params: API.Cat_PendingTasks_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + pitSegments (params?: API.Cat_PitSegments_Request, options?: TransportRequestOptions): TransportRequestPromise; + pitSegments (callback: callbackFn): TransportRequestCallback; + pitSegments (params: API.Cat_PitSegments_Request, callback: callbackFn): TransportRequestCallback; + pitSegments (params: API.Cat_PitSegments_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + allPitSegments (params?: API.Cat_AllPitSegments_Request, options?: TransportRequestOptions): TransportRequestPromise; + allPitSegments (callback: callbackFn): TransportRequestCallback; + allPitSegments (params: API.Cat_AllPitSegments_Request, callback: callbackFn): TransportRequestCallback; + allPitSegments (params: API.Cat_AllPitSegments_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + plugins (params?: API.Cat_Plugins_Request, options?: TransportRequestOptions): TransportRequestPromise; + plugins (callback: callbackFn): TransportRequestCallback; + plugins (params: API.Cat_Plugins_Request, callback: callbackFn): TransportRequestCallback; + plugins (params: API.Cat_Plugins_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + recovery (params?: API.Cat_Recovery_Request, options?: TransportRequestOptions): TransportRequestPromise; + recovery (callback: callbackFn): TransportRequestCallback; + recovery (params: API.Cat_Recovery_Request, callback: callbackFn): TransportRequestCallback; + recovery (params: API.Cat_Recovery_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + repositories (params?: API.Cat_Repositories_Request, options?: TransportRequestOptions): TransportRequestPromise; + repositories (callback: callbackFn): TransportRequestCallback; + repositories (params: API.Cat_Repositories_Request, callback: callbackFn): TransportRequestCallback; + repositories (params: API.Cat_Repositories_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + segmentReplication (params?: API.Cat_SegmentReplication_Request, options?: TransportRequestOptions): TransportRequestPromise; + segmentReplication (callback: callbackFn): TransportRequestCallback; + segmentReplication (params: API.Cat_SegmentReplication_Request, callback: callbackFn): TransportRequestCallback; + segmentReplication (params: API.Cat_SegmentReplication_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + segments (params?: API.Cat_Segments_Request, options?: TransportRequestOptions): TransportRequestPromise; + segments (callback: callbackFn): TransportRequestCallback; + segments (params: API.Cat_Segments_Request, callback: callbackFn): TransportRequestCallback; + segments (params: API.Cat_Segments_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + shards (params?: API.Cat_Shards_Request, options?: TransportRequestOptions): TransportRequestPromise; + shards (callback: callbackFn): TransportRequestCallback; + shards (params: API.Cat_Shards_Request, callback: callbackFn): TransportRequestCallback; + shards (params: API.Cat_Shards_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + snapshots (params?: API.Cat_Snapshots_Request, options?: TransportRequestOptions): TransportRequestPromise; + snapshots (callback: callbackFn): TransportRequestCallback; + snapshots (params: API.Cat_Snapshots_Request, callback: callbackFn): TransportRequestCallback; + snapshots (params: API.Cat_Snapshots_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + tasks (params?: API.Cat_Tasks_Request, options?: TransportRequestOptions): TransportRequestPromise; + tasks (callback: callbackFn): TransportRequestCallback; + tasks (params: API.Cat_Tasks_Request, callback: callbackFn): TransportRequestCallback; + tasks (params: API.Cat_Tasks_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + templates (params?: API.Cat_Templates_Request, options?: TransportRequestOptions): TransportRequestPromise; + templates (callback: callbackFn): TransportRequestCallback; + templates (params: API.Cat_Templates_Request, callback: callbackFn): TransportRequestCallback; + templates (params: API.Cat_Templates_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + threadPool (params?: API.Cat_ThreadPool_Request, options?: TransportRequestOptions): TransportRequestPromise; + threadPool (callback: callbackFn): TransportRequestCallback; + threadPool (params: API.Cat_ThreadPool_Request, callback: callbackFn): TransportRequestCallback; + threadPool (params: API.Cat_ThreadPool_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + + cluster: { + allocationExplain (params?: API.Cluster_AllocationExplain_Request, options?: TransportRequestOptions): TransportRequestPromise; + allocationExplain (callback: callbackFn): TransportRequestCallback; + allocationExplain (params: API.Cluster_AllocationExplain_Request, callback: callbackFn): TransportRequestCallback; + allocationExplain (params: API.Cluster_AllocationExplain_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteDecommissionAwareness (params?: API.Cluster_DeleteDecommissionAwareness_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteDecommissionAwareness (callback: callbackFn): TransportRequestCallback; + deleteDecommissionAwareness (params: API.Cluster_DeleteDecommissionAwareness_Request, callback: callbackFn): TransportRequestCallback; + deleteDecommissionAwareness (params: API.Cluster_DeleteDecommissionAwareness_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getDecommissionAwareness (params: API.Cluster_GetDecommissionAwareness_Request, options?: TransportRequestOptions): TransportRequestPromise; + getDecommissionAwareness (params: API.Cluster_GetDecommissionAwareness_Request, callback: callbackFn): TransportRequestCallback; + getDecommissionAwareness (params: API.Cluster_GetDecommissionAwareness_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + putDecommissionAwareness (params: API.Cluster_PutDecommissionAwareness_Request, options?: TransportRequestOptions): TransportRequestPromise; + putDecommissionAwareness (params: API.Cluster_PutDecommissionAwareness_Request, callback: callbackFn): TransportRequestCallback; + putDecommissionAwareness (params: API.Cluster_PutDecommissionAwareness_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + health (params?: API.Cluster_Health_Request, options?: TransportRequestOptions): TransportRequestPromise; + health (callback: callbackFn): TransportRequestCallback; + health (params: API.Cluster_Health_Request, callback: callbackFn): TransportRequestCallback; + health (params: API.Cluster_Health_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + pendingTasks (params?: API.Cluster_PendingTasks_Request, options?: TransportRequestOptions): TransportRequestPromise; + pendingTasks (callback: callbackFn): TransportRequestCallback; + pendingTasks (params: API.Cluster_PendingTasks_Request, callback: callbackFn): TransportRequestCallback; + pendingTasks (params: API.Cluster_PendingTasks_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + reroute (params?: API.Cluster_Reroute_Request, options?: TransportRequestOptions): TransportRequestPromise; + reroute (callback: callbackFn): TransportRequestCallback; + reroute (params: API.Cluster_Reroute_Request, callback: callbackFn): TransportRequestCallback; + reroute (params: API.Cluster_Reroute_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getWeightedRouting (params: API.Cluster_GetWeightedRouting_Request, options?: TransportRequestOptions): TransportRequestPromise; + getWeightedRouting (params: API.Cluster_GetWeightedRouting_Request, callback: callbackFn): TransportRequestCallback; + getWeightedRouting (params: API.Cluster_GetWeightedRouting_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + putWeightedRouting (params: API.Cluster_PutWeightedRouting_Request, options?: TransportRequestOptions): TransportRequestPromise; + putWeightedRouting (params: API.Cluster_PutWeightedRouting_Request, callback: callbackFn): TransportRequestCallback; + putWeightedRouting (params: API.Cluster_PutWeightedRouting_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteWeightedRouting (params?: API.Cluster_DeleteWeightedRouting_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteWeightedRouting (callback: callbackFn): TransportRequestCallback; + deleteWeightedRouting (params: API.Cluster_DeleteWeightedRouting_Request, callback: callbackFn): TransportRequestCallback; + deleteWeightedRouting (params: API.Cluster_DeleteWeightedRouting_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getSettings (params?: API.Cluster_GetSettings_Request, options?: TransportRequestOptions): TransportRequestPromise; + getSettings (callback: callbackFn): TransportRequestCallback; + getSettings (params: API.Cluster_GetSettings_Request, callback: callbackFn): TransportRequestCallback; + getSettings (params: API.Cluster_GetSettings_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + putSettings (params: API.Cluster_PutSettings_Request, options?: TransportRequestOptions): TransportRequestPromise; + putSettings (params: API.Cluster_PutSettings_Request, callback: callbackFn): TransportRequestCallback; + putSettings (params: API.Cluster_PutSettings_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + state (params?: API.Cluster_State_Request, options?: TransportRequestOptions): TransportRequestPromise; + state (callback: callbackFn): TransportRequestCallback; + state (params: API.Cluster_State_Request, callback: callbackFn): TransportRequestCallback; + state (params: API.Cluster_State_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + stats (params?: API.Cluster_Stats_Request, options?: TransportRequestOptions): TransportRequestPromise; + stats (callback: callbackFn): TransportRequestCallback; + stats (params: API.Cluster_Stats_Request, callback: callbackFn): TransportRequestCallback; + stats (params: API.Cluster_Stats_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteVotingConfigExclusions (params?: API.Cluster_DeleteVotingConfigExclusions_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteVotingConfigExclusions (callback: callbackFn): TransportRequestCallback; + deleteVotingConfigExclusions (params: API.Cluster_DeleteVotingConfigExclusions_Request, callback: callbackFn): TransportRequestCallback; + deleteVotingConfigExclusions (params: API.Cluster_DeleteVotingConfigExclusions_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + postVotingConfigExclusions (params?: API.Cluster_PostVotingConfigExclusions_Request, options?: TransportRequestOptions): TransportRequestPromise; + postVotingConfigExclusions (callback: callbackFn): TransportRequestCallback; + postVotingConfigExclusions (params: API.Cluster_PostVotingConfigExclusions_Request, callback: callbackFn): TransportRequestCallback; + postVotingConfigExclusions (params: API.Cluster_PostVotingConfigExclusions_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getComponentTemplate (params?: API.Cluster_GetComponentTemplate_Request, options?: TransportRequestOptions): TransportRequestPromise; + getComponentTemplate (callback: callbackFn): TransportRequestCallback; + getComponentTemplate (params: API.Cluster_GetComponentTemplate_Request, callback: callbackFn): TransportRequestCallback; + getComponentTemplate (params: API.Cluster_GetComponentTemplate_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteComponentTemplate (params: API.Cluster_DeleteComponentTemplate_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteComponentTemplate (params: API.Cluster_DeleteComponentTemplate_Request, callback: callbackFn): TransportRequestCallback; + deleteComponentTemplate (params: API.Cluster_DeleteComponentTemplate_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + existsComponentTemplate (params: API.Cluster_ExistsComponentTemplate_Request, options?: TransportRequestOptions): TransportRequestPromise; + existsComponentTemplate (params: API.Cluster_ExistsComponentTemplate_Request, callback: callbackFn): TransportRequestCallback; + existsComponentTemplate (params: API.Cluster_ExistsComponentTemplate_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + putComponentTemplate (params: API.Cluster_PutComponentTemplate_Request, options?: TransportRequestOptions): TransportRequestPromise; + putComponentTemplate (params: API.Cluster_PutComponentTemplate_Request, callback: callbackFn): TransportRequestCallback; + putComponentTemplate (params: API.Cluster_PutComponentTemplate_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + remoteInfo (params?: API.Cluster_RemoteInfo_Request, options?: TransportRequestOptions): TransportRequestPromise; + remoteInfo (callback: callbackFn): TransportRequestCallback; + remoteInfo (params: API.Cluster_RemoteInfo_Request, callback: callbackFn): TransportRequestCallback; + remoteInfo (params: API.Cluster_RemoteInfo_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + + danglingIndices: { + listDanglingIndices (params?: API.DanglingIndices_ListDanglingIndices_Request, options?: TransportRequestOptions): TransportRequestPromise; + listDanglingIndices (callback: callbackFn): TransportRequestCallback; + listDanglingIndices (params: API.DanglingIndices_ListDanglingIndices_Request, callback: callbackFn): TransportRequestCallback; + listDanglingIndices (params: API.DanglingIndices_ListDanglingIndices_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteDanglingIndex (params: API.DanglingIndices_DeleteDanglingIndex_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteDanglingIndex (params: API.DanglingIndices_DeleteDanglingIndex_Request, callback: callbackFn): TransportRequestCallback; + deleteDanglingIndex (params: API.DanglingIndices_DeleteDanglingIndex_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + importDanglingIndex (params: API.DanglingIndices_ImportDanglingIndex_Request, options?: TransportRequestOptions): TransportRequestPromise; + importDanglingIndex (params: API.DanglingIndices_ImportDanglingIndex_Request, callback: callbackFn): TransportRequestCallback; + importDanglingIndex (params: API.DanglingIndices_ImportDanglingIndex_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + + indices: { + getAlias (params?: API.Indices_GetAlias_Request, options?: TransportRequestOptions): TransportRequestPromise; + getAlias (callback: callbackFn): TransportRequestCallback; + getAlias (params: API.Indices_GetAlias_Request, callback: callbackFn): TransportRequestCallback; + getAlias (params: API.Indices_GetAlias_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + putAlias (params?: API.Indices_PutAlias_Request, options?: TransportRequestOptions): TransportRequestPromise; + putAlias (callback: callbackFn): TransportRequestCallback; + putAlias (params: API.Indices_PutAlias_Request, callback: callbackFn): TransportRequestCallback; + putAlias (params: API.Indices_PutAlias_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + existsAlias (params: API.Indices_ExistsAlias_Request, options?: TransportRequestOptions): TransportRequestPromise; + existsAlias (params: API.Indices_ExistsAlias_Request, callback: callbackFn): TransportRequestCallback; + existsAlias (params: API.Indices_ExistsAlias_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + updateAliases (params: API.Indices_UpdateAliases_Request, options?: TransportRequestOptions): TransportRequestPromise; + updateAliases (params: API.Indices_UpdateAliases_Request, callback: callbackFn): TransportRequestCallback; + updateAliases (params: API.Indices_UpdateAliases_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + analyze (params?: API.Indices_Analyze_Request, options?: TransportRequestOptions): TransportRequestPromise; + analyze (callback: callbackFn): TransportRequestCallback; + analyze (params: API.Indices_Analyze_Request, callback: callbackFn): TransportRequestCallback; + analyze (params: API.Indices_Analyze_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + clearCache (params?: API.Indices_ClearCache_Request, options?: TransportRequestOptions): TransportRequestPromise; + clearCache (callback: callbackFn): TransportRequestCallback; + clearCache (params: API.Indices_ClearCache_Request, callback: callbackFn): TransportRequestCallback; + clearCache (params: API.Indices_ClearCache_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getDataStream (params?: API.Indices_GetDataStream_Request, options?: TransportRequestOptions): TransportRequestPromise; + getDataStream (callback: callbackFn): TransportRequestCallback; + getDataStream (params: API.Indices_GetDataStream_Request, callback: callbackFn): TransportRequestCallback; + getDataStream (params: API.Indices_GetDataStream_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + dataStreamsStats (params?: API.Indices_DataStreamsStats_Request, options?: TransportRequestOptions): TransportRequestPromise; + dataStreamsStats (callback: callbackFn): TransportRequestCallback; + dataStreamsStats (params: API.Indices_DataStreamsStats_Request, callback: callbackFn): TransportRequestCallback; + dataStreamsStats (params: API.Indices_DataStreamsStats_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteDataStream (params: API.Indices_DeleteDataStream_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteDataStream (params: API.Indices_DeleteDataStream_Request, callback: callbackFn): TransportRequestCallback; + deleteDataStream (params: API.Indices_DeleteDataStream_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + createDataStream (params: API.Indices_CreateDataStream_Request, options?: TransportRequestOptions): TransportRequestPromise; + createDataStream (params: API.Indices_CreateDataStream_Request, callback: callbackFn): TransportRequestCallback; + createDataStream (params: API.Indices_CreateDataStream_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + flush (params?: API.Indices_Flush_Request, options?: TransportRequestOptions): TransportRequestPromise; + flush (callback: callbackFn): TransportRequestCallback; + flush (params: API.Indices_Flush_Request, callback: callbackFn): TransportRequestCallback; + flush (params: API.Indices_Flush_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + forcemerge (params?: API.Indices_Forcemerge_Request, options?: TransportRequestOptions): TransportRequestPromise; + forcemerge (callback: callbackFn): TransportRequestCallback; + forcemerge (params: API.Indices_Forcemerge_Request, callback: callbackFn): TransportRequestCallback; + forcemerge (params: API.Indices_Forcemerge_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getIndexTemplate (params?: API.Indices_GetIndexTemplate_Request, options?: TransportRequestOptions): TransportRequestPromise; + getIndexTemplate (callback: callbackFn): TransportRequestCallback; + getIndexTemplate (params: API.Indices_GetIndexTemplate_Request, callback: callbackFn): TransportRequestCallback; + getIndexTemplate (params: API.Indices_GetIndexTemplate_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + simulateTemplate (params?: API.Indices_SimulateTemplate_Request, options?: TransportRequestOptions): TransportRequestPromise; + simulateTemplate (callback: callbackFn): TransportRequestCallback; + simulateTemplate (params: API.Indices_SimulateTemplate_Request, callback: callbackFn): TransportRequestCallback; + simulateTemplate (params: API.Indices_SimulateTemplate_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + simulateIndexTemplate (params: API.Indices_SimulateIndexTemplate_Request, options?: TransportRequestOptions): TransportRequestPromise; + simulateIndexTemplate (params: API.Indices_SimulateIndexTemplate_Request, callback: callbackFn): TransportRequestCallback; + simulateIndexTemplate (params: API.Indices_SimulateIndexTemplate_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteIndexTemplate (params: API.Indices_DeleteIndexTemplate_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteIndexTemplate (params: API.Indices_DeleteIndexTemplate_Request, callback: callbackFn): TransportRequestCallback; + deleteIndexTemplate (params: API.Indices_DeleteIndexTemplate_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + existsIndexTemplate (params: API.Indices_ExistsIndexTemplate_Request, options?: TransportRequestOptions): TransportRequestPromise; + existsIndexTemplate (params: API.Indices_ExistsIndexTemplate_Request, callback: callbackFn): TransportRequestCallback; + existsIndexTemplate (params: API.Indices_ExistsIndexTemplate_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + putIndexTemplate (params: API.Indices_PutIndexTemplate_Request, options?: TransportRequestOptions): TransportRequestPromise; + putIndexTemplate (params: API.Indices_PutIndexTemplate_Request, callback: callbackFn): TransportRequestCallback; + putIndexTemplate (params: API.Indices_PutIndexTemplate_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getMapping (params?: API.Indices_GetMapping_Request, options?: TransportRequestOptions): TransportRequestPromise; + getMapping (callback: callbackFn): TransportRequestCallback; + getMapping (params: API.Indices_GetMapping_Request, callback: callbackFn): TransportRequestCallback; + getMapping (params: API.Indices_GetMapping_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getFieldMapping (params: API.Indices_GetFieldMapping_Request, options?: TransportRequestOptions): TransportRequestPromise; + getFieldMapping (params: API.Indices_GetFieldMapping_Request, callback: callbackFn): TransportRequestCallback; + getFieldMapping (params: API.Indices_GetFieldMapping_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + recovery (params?: API.Indices_Recovery_Request, options?: TransportRequestOptions): TransportRequestPromise; + recovery (callback: callbackFn): TransportRequestCallback; + recovery (params: API.Indices_Recovery_Request, callback: callbackFn): TransportRequestCallback; + recovery (params: API.Indices_Recovery_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + refresh (params?: API.Indices_Refresh_Request, options?: TransportRequestOptions): TransportRequestPromise; + refresh (callback: callbackFn): TransportRequestCallback; + refresh (params: API.Indices_Refresh_Request, callback: callbackFn): TransportRequestCallback; + refresh (params: API.Indices_Refresh_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + resolveIndex (params: API.Indices_ResolveIndex_Request, options?: TransportRequestOptions): TransportRequestPromise; + resolveIndex (params: API.Indices_ResolveIndex_Request, callback: callbackFn): TransportRequestCallback; + resolveIndex (params: API.Indices_ResolveIndex_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + segments (params?: API.Indices_Segments_Request, options?: TransportRequestOptions): TransportRequestPromise; + segments (callback: callbackFn): TransportRequestCallback; + segments (params: API.Indices_Segments_Request, callback: callbackFn): TransportRequestCallback; + segments (params: API.Indices_Segments_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getSettings (params?: API.Indices_GetSettings_Request, options?: TransportRequestOptions): TransportRequestPromise; + getSettings (callback: callbackFn): TransportRequestCallback; + getSettings (params: API.Indices_GetSettings_Request, callback: callbackFn): TransportRequestCallback; + getSettings (params: API.Indices_GetSettings_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + putSettings (params: API.Indices_PutSettings_Request, options?: TransportRequestOptions): TransportRequestPromise; + putSettings (params: API.Indices_PutSettings_Request, callback: callbackFn): TransportRequestCallback; + putSettings (params: API.Indices_PutSettings_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + shardStores (params?: API.Indices_ShardStores_Request, options?: TransportRequestOptions): TransportRequestPromise; + shardStores (callback: callbackFn): TransportRequestCallback; + shardStores (params: API.Indices_ShardStores_Request, callback: callbackFn): TransportRequestCallback; + shardStores (params: API.Indices_ShardStores_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + stats (params?: API.Indices_Stats_Request, options?: TransportRequestOptions): TransportRequestPromise; + stats (callback: callbackFn): TransportRequestCallback; + stats (params: API.Indices_Stats_Request, callback: callbackFn): TransportRequestCallback; + stats (params: API.Indices_Stats_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getTemplate (params?: API.Indices_GetTemplate_Request, options?: TransportRequestOptions): TransportRequestPromise; + getTemplate (callback: callbackFn): TransportRequestCallback; + getTemplate (params: API.Indices_GetTemplate_Request, callback: callbackFn): TransportRequestCallback; + getTemplate (params: API.Indices_GetTemplate_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteTemplate (params: API.Indices_DeleteTemplate_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteTemplate (params: API.Indices_DeleteTemplate_Request, callback: callbackFn): TransportRequestCallback; + deleteTemplate (params: API.Indices_DeleteTemplate_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + existsTemplate (params: API.Indices_ExistsTemplate_Request, options?: TransportRequestOptions): TransportRequestPromise; + existsTemplate (params: API.Indices_ExistsTemplate_Request, callback: callbackFn): TransportRequestCallback; + existsTemplate (params: API.Indices_ExistsTemplate_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + putTemplate (params: API.Indices_PutTemplate_Request, options?: TransportRequestOptions): TransportRequestPromise; + putTemplate (params: API.Indices_PutTemplate_Request, callback: callbackFn): TransportRequestCallback; + putTemplate (params: API.Indices_PutTemplate_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getUpgrade (params?: API.Indices_GetUpgrade_Request, options?: TransportRequestOptions): TransportRequestPromise; + getUpgrade (callback: callbackFn): TransportRequestCallback; + getUpgrade (params: API.Indices_GetUpgrade_Request, callback: callbackFn): TransportRequestCallback; + getUpgrade (params: API.Indices_GetUpgrade_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + upgrade (params?: API.Indices_Upgrade_Request, options?: TransportRequestOptions): TransportRequestPromise; + upgrade (callback: callbackFn): TransportRequestCallback; + upgrade (params: API.Indices_Upgrade_Request, callback: callbackFn): TransportRequestCallback; + upgrade (params: API.Indices_Upgrade_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + validateQuery (params?: API.Indices_ValidateQuery_Request, options?: TransportRequestOptions): TransportRequestPromise; + validateQuery (callback: callbackFn): TransportRequestCallback; + validateQuery (params: API.Indices_ValidateQuery_Request, callback: callbackFn): TransportRequestCallback; + validateQuery (params: API.Indices_ValidateQuery_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + rollover (params: API.Indices_Rollover_Request, options?: TransportRequestOptions): TransportRequestPromise; + rollover (params: API.Indices_Rollover_Request, callback: callbackFn): TransportRequestCallback; + rollover (params: API.Indices_Rollover_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + delete (params: API.Indices_Delete_Request, options?: TransportRequestOptions): TransportRequestPromise; + delete (params: API.Indices_Delete_Request, callback: callbackFn): TransportRequestCallback; + delete (params: API.Indices_Delete_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + get (params: API.Indices_Get_Request, options?: TransportRequestOptions): TransportRequestPromise; + get (params: API.Indices_Get_Request, callback: callbackFn): TransportRequestCallback; + get (params: API.Indices_Get_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + exists (params: API.Indices_Exists_Request, options?: TransportRequestOptions): TransportRequestPromise; + exists (params: API.Indices_Exists_Request, callback: callbackFn): TransportRequestCallback; + exists (params: API.Indices_Exists_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + create (params: API.Indices_Create_Request, options?: TransportRequestOptions): TransportRequestPromise; + create (params: API.Indices_Create_Request, callback: callbackFn): TransportRequestCallback; + create (params: API.Indices_Create_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteAlias (params: API.Indices_DeleteAlias_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteAlias (params: API.Indices_DeleteAlias_Request, callback: callbackFn): TransportRequestCallback; + deleteAlias (params: API.Indices_DeleteAlias_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + addBlock (params: API.Indices_AddBlock_Request, options?: TransportRequestOptions): TransportRequestPromise; + addBlock (params: API.Indices_AddBlock_Request, callback: callbackFn): TransportRequestCallback; + addBlock (params: API.Indices_AddBlock_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + clone (params: API.Indices_Clone_Request, options?: TransportRequestOptions): TransportRequestPromise; + clone (params: API.Indices_Clone_Request, callback: callbackFn): TransportRequestCallback; + clone (params: API.Indices_Clone_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + close (params: API.Indices_Close_Request, options?: TransportRequestOptions): TransportRequestPromise; + close (params: API.Indices_Close_Request, callback: callbackFn): TransportRequestCallback; + close (params: API.Indices_Close_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + putMapping (params: API.Indices_PutMapping_Request, options?: TransportRequestOptions): TransportRequestPromise; + putMapping (params: API.Indices_PutMapping_Request, callback: callbackFn): TransportRequestCallback; + putMapping (params: API.Indices_PutMapping_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + open (params: API.Indices_Open_Request, options?: TransportRequestOptions): TransportRequestPromise; + open (params: API.Indices_Open_Request, callback: callbackFn): TransportRequestCallback; + open (params: API.Indices_Open_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + shrink (params: API.Indices_Shrink_Request, options?: TransportRequestOptions): TransportRequestPromise; + shrink (params: API.Indices_Shrink_Request, callback: callbackFn): TransportRequestCallback; + shrink (params: API.Indices_Shrink_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + split (params: API.Indices_Split_Request, options?: TransportRequestOptions): TransportRequestPromise; + split (params: API.Indices_Split_Request, callback: callbackFn): TransportRequestCallback; + split (params: API.Indices_Split_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + + ingest: { + getPipeline (params?: API.Ingest_GetPipeline_Request, options?: TransportRequestOptions): TransportRequestPromise; + getPipeline (callback: callbackFn): TransportRequestCallback; + getPipeline (params: API.Ingest_GetPipeline_Request, callback: callbackFn): TransportRequestCallback; + getPipeline (params: API.Ingest_GetPipeline_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + simulate (params: API.Ingest_Simulate_Request, options?: TransportRequestOptions): TransportRequestPromise; + simulate (params: API.Ingest_Simulate_Request, callback: callbackFn): TransportRequestCallback; + simulate (params: API.Ingest_Simulate_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deletePipeline (params: API.Ingest_DeletePipeline_Request, options?: TransportRequestOptions): TransportRequestPromise; + deletePipeline (params: API.Ingest_DeletePipeline_Request, callback: callbackFn): TransportRequestCallback; + deletePipeline (params: API.Ingest_DeletePipeline_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + putPipeline (params: API.Ingest_PutPipeline_Request, options?: TransportRequestOptions): TransportRequestPromise; + putPipeline (params: API.Ingest_PutPipeline_Request, callback: callbackFn): TransportRequestCallback; + putPipeline (params: API.Ingest_PutPipeline_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + processorGrok (params?: API.Ingest_ProcessorGrok_Request, options?: TransportRequestOptions): TransportRequestPromise; + processorGrok (callback: callbackFn): TransportRequestCallback; + processorGrok (params: API.Ingest_ProcessorGrok_Request, callback: callbackFn): TransportRequestCallback; + processorGrok (params: API.Ingest_ProcessorGrok_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + + knn: { + stats (params?: API.Knn_Stats_Request, options?: TransportRequestOptions): TransportRequestPromise; + stats (callback: callbackFn): TransportRequestCallback; + stats (params: API.Knn_Stats_Request, callback: callbackFn): TransportRequestCallback; + stats (params: API.Knn_Stats_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + searchModels (params?: API.Knn_SearchModels_Request, options?: TransportRequestOptions): TransportRequestPromise; + searchModels (callback: callbackFn): TransportRequestCallback; + searchModels (params: API.Knn_SearchModels_Request, callback: callbackFn): TransportRequestCallback; + searchModels (params: API.Knn_SearchModels_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + trainModel (params: API.Knn_TrainModel_Request, options?: TransportRequestOptions): TransportRequestPromise; + trainModel (params: API.Knn_TrainModel_Request, callback: callbackFn): TransportRequestCallback; + trainModel (params: API.Knn_TrainModel_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteModel (params: API.Knn_DeleteModel_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteModel (params: API.Knn_DeleteModel_Request, callback: callbackFn): TransportRequestCallback; + deleteModel (params: API.Knn_DeleteModel_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getModel (params: API.Knn_GetModel_Request, options?: TransportRequestOptions): TransportRequestPromise; + getModel (params: API.Knn_GetModel_Request, callback: callbackFn): TransportRequestCallback; + getModel (params: API.Knn_GetModel_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + warmup (params: API.Knn_Warmup_Request, options?: TransportRequestOptions): TransportRequestPromise; + warmup (params: API.Knn_Warmup_Request, callback: callbackFn): TransportRequestCallback; + warmup (params: API.Knn_Warmup_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + + ml: { + registerModelGroup (params?: API.Ml_RegisterModelGroup_Request, options?: TransportRequestOptions): TransportRequestPromise; + registerModelGroup (callback: callbackFn): TransportRequestCallback; + registerModelGroup (params: API.Ml_RegisterModelGroup_Request, callback: callbackFn): TransportRequestCallback; + registerModelGroup (params: API.Ml_RegisterModelGroup_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteModelGroup (params: API.Ml_DeleteModelGroup_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteModelGroup (params: API.Ml_DeleteModelGroup_Request, callback: callbackFn): TransportRequestCallback; + deleteModelGroup (params: API.Ml_DeleteModelGroup_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getModelGroup (params: API.Ml_GetModelGroup_Request, options?: TransportRequestOptions): TransportRequestPromise; + getModelGroup (params: API.Ml_GetModelGroup_Request, callback: callbackFn): TransportRequestCallback; + getModelGroup (params: API.Ml_GetModelGroup_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + registerModel (params?: API.Ml_RegisterModel_Request, options?: TransportRequestOptions): TransportRequestPromise; + registerModel (callback: callbackFn): TransportRequestCallback; + registerModel (params: API.Ml_RegisterModel_Request, callback: callbackFn): TransportRequestCallback; + registerModel (params: API.Ml_RegisterModel_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + searchModels (params?: API.Ml_SearchModels_Request, options?: TransportRequestOptions): TransportRequestPromise; + searchModels (callback: callbackFn): TransportRequestCallback; + searchModels (params: API.Ml_SearchModels_Request, callback: callbackFn): TransportRequestCallback; + searchModels (params: API.Ml_SearchModels_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteModel (params: API.Ml_DeleteModel_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteModel (params: API.Ml_DeleteModel_Request, callback: callbackFn): TransportRequestCallback; + deleteModel (params: API.Ml_DeleteModel_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getTask (params: API.Ml_GetTask_Request, options?: TransportRequestOptions): TransportRequestPromise; + getTask (params: API.Ml_GetTask_Request, callback: callbackFn): TransportRequestCallback; + getTask (params: API.Ml_GetTask_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + + nodes: { + info (params?: API.Nodes_Info_Request, options?: TransportRequestOptions): TransportRequestPromise; + info (callback: callbackFn): TransportRequestCallback; + info (params: API.Nodes_Info_Request, callback: callbackFn): TransportRequestCallback; + info (params: API.Nodes_Info_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + hotThreads (params?: API.Nodes_HotThreads_Request, options?: TransportRequestOptions): TransportRequestPromise; + hotThreads (callback: callbackFn): TransportRequestCallback; + hotThreads (params: API.Nodes_HotThreads_Request, callback: callbackFn): TransportRequestCallback; + hotThreads (params: API.Nodes_HotThreads_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + reloadSecureSettings (params?: API.Nodes_ReloadSecureSettings_Request, options?: TransportRequestOptions): TransportRequestPromise; + reloadSecureSettings (callback: callbackFn): TransportRequestCallback; + reloadSecureSettings (params: API.Nodes_ReloadSecureSettings_Request, callback: callbackFn): TransportRequestCallback; + reloadSecureSettings (params: API.Nodes_ReloadSecureSettings_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + stats (params?: API.Nodes_Stats_Request, options?: TransportRequestOptions): TransportRequestPromise; + stats (callback: callbackFn): TransportRequestCallback; + stats (params: API.Nodes_Stats_Request, callback: callbackFn): TransportRequestCallback; + stats (params: API.Nodes_Stats_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + usage (params?: API.Nodes_Usage_Request, options?: TransportRequestOptions): TransportRequestPromise; + usage (callback: callbackFn): TransportRequestCallback; + usage (params: API.Nodes_Usage_Request, callback: callbackFn): TransportRequestCallback; + usage (params: API.Nodes_Usage_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + + notifications: { + listChannels (params?: API.Notifications_ListChannels_Request, options?: TransportRequestOptions): TransportRequestPromise; + listChannels (callback: callbackFn): TransportRequestCallback; + listChannels (params: API.Notifications_ListChannels_Request, callback: callbackFn): TransportRequestCallback; + listChannels (params: API.Notifications_ListChannels_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteConfigs (params: API.Notifications_DeleteConfigs_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteConfigs (params: API.Notifications_DeleteConfigs_Request, callback: callbackFn): TransportRequestCallback; + deleteConfigs (params: API.Notifications_DeleteConfigs_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getConfigs (params?: API.Notifications_GetConfigs_Request, options?: TransportRequestOptions): TransportRequestPromise; + getConfigs (callback: callbackFn): TransportRequestCallback; + getConfigs (params: API.Notifications_GetConfigs_Request, callback: callbackFn): TransportRequestCallback; + getConfigs (params: API.Notifications_GetConfigs_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + createConfig (params: API.Notifications_CreateConfig_Request, options?: TransportRequestOptions): TransportRequestPromise; + createConfig (params: API.Notifications_CreateConfig_Request, callback: callbackFn): TransportRequestCallback; + createConfig (params: API.Notifications_CreateConfig_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteConfig (params: API.Notifications_DeleteConfig_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteConfig (params: API.Notifications_DeleteConfig_Request, callback: callbackFn): TransportRequestCallback; + deleteConfig (params: API.Notifications_DeleteConfig_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getConfig (params: API.Notifications_GetConfig_Request, options?: TransportRequestOptions): TransportRequestPromise; + getConfig (params: API.Notifications_GetConfig_Request, callback: callbackFn): TransportRequestCallback; + getConfig (params: API.Notifications_GetConfig_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + updateConfig (params: API.Notifications_UpdateConfig_Request, options?: TransportRequestOptions): TransportRequestPromise; + updateConfig (params: API.Notifications_UpdateConfig_Request, callback: callbackFn): TransportRequestCallback; + updateConfig (params: API.Notifications_UpdateConfig_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + sendTest (params: API.Notifications_SendTest_Request, options?: TransportRequestOptions): TransportRequestPromise; + sendTest (params: API.Notifications_SendTest_Request, callback: callbackFn): TransportRequestCallback; + sendTest (params: API.Notifications_SendTest_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + listFeatures (params?: API.Notifications_ListFeatures_Request, options?: TransportRequestOptions): TransportRequestPromise; + listFeatures (callback: callbackFn): TransportRequestCallback; + listFeatures (params: API.Notifications_ListFeatures_Request, callback: callbackFn): TransportRequestCallback; + listFeatures (params: API.Notifications_ListFeatures_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + + ppl: { + query (params: API.Ppl_Query_Request, options?: TransportRequestOptions): TransportRequestPromise; + query (params: API.Ppl_Query_Request, callback: callbackFn): TransportRequestCallback; + query (params: API.Ppl_Query_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + explain (params: API.Ppl_Explain_Request, options?: TransportRequestOptions): TransportRequestPromise; + explain (params: API.Ppl_Explain_Request, callback: callbackFn): TransportRequestCallback; + explain (params: API.Ppl_Explain_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getStats (params?: API.Ppl_GetStats_Request, options?: TransportRequestOptions): TransportRequestPromise; + getStats (callback: callbackFn): TransportRequestCallback; + getStats (params: API.Ppl_GetStats_Request, callback: callbackFn): TransportRequestCallback; + getStats (params: API.Ppl_GetStats_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + postStats (params: API.Ppl_PostStats_Request, options?: TransportRequestOptions): TransportRequestPromise; + postStats (params: API.Ppl_PostStats_Request, callback: callbackFn): TransportRequestCallback; + postStats (params: API.Ppl_PostStats_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + + remoteStore: { + restore (params: API.RemoteStore_Restore_Request, options?: TransportRequestOptions): TransportRequestPromise; + restore (params: API.RemoteStore_Restore_Request, callback: callbackFn): TransportRequestCallback; + restore (params: API.RemoteStore_Restore_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + + rollups: { + delete (params: API.Rollups_Delete_Request, options?: TransportRequestOptions): TransportRequestPromise; + delete (params: API.Rollups_Delete_Request, callback: callbackFn): TransportRequestCallback; + delete (params: API.Rollups_Delete_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + get (params: API.Rollups_Get_Request, options?: TransportRequestOptions): TransportRequestPromise; + get (params: API.Rollups_Get_Request, callback: callbackFn): TransportRequestCallback; + get (params: API.Rollups_Get_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + put (params: API.Rollups_Put_Request, options?: TransportRequestOptions): TransportRequestPromise; + put (params: API.Rollups_Put_Request, callback: callbackFn): TransportRequestCallback; + put (params: API.Rollups_Put_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + explain (params: API.Rollups_Explain_Request, options?: TransportRequestOptions): TransportRequestPromise; + explain (params: API.Rollups_Explain_Request, callback: callbackFn): TransportRequestCallback; + explain (params: API.Rollups_Explain_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + start (params: API.Rollups_Start_Request, options?: TransportRequestOptions): TransportRequestPromise; + start (params: API.Rollups_Start_Request, callback: callbackFn): TransportRequestCallback; + start (params: API.Rollups_Start_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + stop (params: API.Rollups_Stop_Request, options?: TransportRequestOptions): TransportRequestPromise; + stop (params: API.Rollups_Stop_Request, callback: callbackFn): TransportRequestCallback; + stop (params: API.Rollups_Stop_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + + searchPipeline: { + get (params?: API.SearchPipeline_Get_Request, options?: TransportRequestOptions): TransportRequestPromise; + get (callback: callbackFn): TransportRequestCallback; + get (params: API.SearchPipeline_Get_Request, callback: callbackFn): TransportRequestCallback; + get (params: API.SearchPipeline_Get_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + delete (params: API.SearchPipeline_Delete_Request, options?: TransportRequestOptions): TransportRequestPromise; + delete (params: API.SearchPipeline_Delete_Request, callback: callbackFn): TransportRequestCallback; + delete (params: API.SearchPipeline_Delete_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + put (params: API.SearchPipeline_Put_Request, options?: TransportRequestOptions): TransportRequestPromise; + put (params: API.SearchPipeline_Put_Request, callback: callbackFn): TransportRequestCallback; + put (params: API.SearchPipeline_Put_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + + security: { + getSslinfo (params?: API.Security_GetSslinfo_Request, options?: TransportRequestOptions): TransportRequestPromise; + getSslinfo (callback: callbackFn): TransportRequestCallback; + getSslinfo (params: API.Security_GetSslinfo_Request, callback: callbackFn): TransportRequestCallback; + getSslinfo (params: API.Security_GetSslinfo_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + configUpgradeCheck (params?: API.Security_ConfigUpgradeCheck_Request, options?: TransportRequestOptions): TransportRequestPromise; + configUpgradeCheck (callback: callbackFn): TransportRequestCallback; + configUpgradeCheck (params: API.Security_ConfigUpgradeCheck_Request, callback: callbackFn): TransportRequestCallback; + configUpgradeCheck (params: API.Security_ConfigUpgradeCheck_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + configUpgradePerform (params?: API.Security_ConfigUpgradePerform_Request, options?: TransportRequestOptions): TransportRequestPromise; + configUpgradePerform (callback: callbackFn): TransportRequestCallback; + configUpgradePerform (params: API.Security_ConfigUpgradePerform_Request, callback: callbackFn): TransportRequestCallback; + configUpgradePerform (params: API.Security_ConfigUpgradePerform_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getAccountDetails (params?: API.Security_GetAccountDetails_Request, options?: TransportRequestOptions): TransportRequestPromise; + getAccountDetails (callback: callbackFn): TransportRequestCallback; + getAccountDetails (params: API.Security_GetAccountDetails_Request, callback: callbackFn): TransportRequestCallback; + getAccountDetails (params: API.Security_GetAccountDetails_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + changePassword (params: API.Security_ChangePassword_Request, options?: TransportRequestOptions): TransportRequestPromise; + changePassword (params: API.Security_ChangePassword_Request, callback: callbackFn): TransportRequestCallback; + changePassword (params: API.Security_ChangePassword_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getActionGroups (params?: API.Security_GetActionGroups_Request, options?: TransportRequestOptions): TransportRequestPromise; + getActionGroups (callback: callbackFn): TransportRequestCallback; + getActionGroups (params: API.Security_GetActionGroups_Request, callback: callbackFn): TransportRequestCallback; + getActionGroups (params: API.Security_GetActionGroups_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + patchActionGroups (params: API.Security_PatchActionGroups_Request, options?: TransportRequestOptions): TransportRequestPromise; + patchActionGroups (params: API.Security_PatchActionGroups_Request, callback: callbackFn): TransportRequestCallback; + patchActionGroups (params: API.Security_PatchActionGroups_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteActionGroup (params: API.Security_DeleteActionGroup_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteActionGroup (params: API.Security_DeleteActionGroup_Request, callback: callbackFn): TransportRequestCallback; + deleteActionGroup (params: API.Security_DeleteActionGroup_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getActionGroup (params: API.Security_GetActionGroup_Request, options?: TransportRequestOptions): TransportRequestPromise; + getActionGroup (params: API.Security_GetActionGroup_Request, callback: callbackFn): TransportRequestCallback; + getActionGroup (params: API.Security_GetActionGroup_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + patchActionGroup (params: API.Security_PatchActionGroup_Request, options?: TransportRequestOptions): TransportRequestPromise; + patchActionGroup (params: API.Security_PatchActionGroup_Request, callback: callbackFn): TransportRequestCallback; + patchActionGroup (params: API.Security_PatchActionGroup_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + createActionGroup (params: API.Security_CreateActionGroup_Request, options?: TransportRequestOptions): TransportRequestPromise; + createActionGroup (params: API.Security_CreateActionGroup_Request, callback: callbackFn): TransportRequestCallback; + createActionGroup (params: API.Security_CreateActionGroup_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getAllowlist (params?: API.Security_GetAllowlist_Request, options?: TransportRequestOptions): TransportRequestPromise; + getAllowlist (callback: callbackFn): TransportRequestCallback; + getAllowlist (params: API.Security_GetAllowlist_Request, callback: callbackFn): TransportRequestCallback; + getAllowlist (params: API.Security_GetAllowlist_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + patchAllowlist (params: API.Security_PatchAllowlist_Request, options?: TransportRequestOptions): TransportRequestPromise; + patchAllowlist (params: API.Security_PatchAllowlist_Request, callback: callbackFn): TransportRequestCallback; + patchAllowlist (params: API.Security_PatchAllowlist_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + createAllowlist (params: API.Security_CreateAllowlist_Request, options?: TransportRequestOptions): TransportRequestPromise; + createAllowlist (params: API.Security_CreateAllowlist_Request, callback: callbackFn): TransportRequestCallback; + createAllowlist (params: API.Security_CreateAllowlist_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getAuditConfiguration (params?: API.Security_GetAuditConfiguration_Request, options?: TransportRequestOptions): TransportRequestPromise; + getAuditConfiguration (callback: callbackFn): TransportRequestCallback; + getAuditConfiguration (params: API.Security_GetAuditConfiguration_Request, callback: callbackFn): TransportRequestCallback; + getAuditConfiguration (params: API.Security_GetAuditConfiguration_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + patchAuditConfiguration (params: API.Security_PatchAuditConfiguration_Request, options?: TransportRequestOptions): TransportRequestPromise; + patchAuditConfiguration (params: API.Security_PatchAuditConfiguration_Request, callback: callbackFn): TransportRequestCallback; + patchAuditConfiguration (params: API.Security_PatchAuditConfiguration_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + updateAuditConfiguration (params: API.Security_UpdateAuditConfiguration_Request, options?: TransportRequestOptions): TransportRequestPromise; + updateAuditConfiguration (params: API.Security_UpdateAuditConfiguration_Request, callback: callbackFn): TransportRequestCallback; + updateAuditConfiguration (params: API.Security_UpdateAuditConfiguration_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + authtoken (params?: API.Security_Authtoken_Request, options?: TransportRequestOptions): TransportRequestPromise; + authtoken (callback: callbackFn): TransportRequestCallback; + authtoken (params: API.Security_Authtoken_Request, callback: callbackFn): TransportRequestCallback; + authtoken (params: API.Security_Authtoken_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + flushCache (params?: API.Security_FlushCache_Request, options?: TransportRequestOptions): TransportRequestPromise; + flushCache (callback: callbackFn): TransportRequestCallback; + flushCache (params: API.Security_FlushCache_Request, callback: callbackFn): TransportRequestCallback; + flushCache (params: API.Security_FlushCache_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + generateOboToken (params: API.Security_GenerateOboToken_Request, options?: TransportRequestOptions): TransportRequestPromise; + generateOboToken (params: API.Security_GenerateOboToken_Request, callback: callbackFn): TransportRequestCallback; + generateOboToken (params: API.Security_GenerateOboToken_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getUsers (params?: API.Security_GetUsers_Request, options?: TransportRequestOptions): TransportRequestPromise; + getUsers (callback: callbackFn): TransportRequestCallback; + getUsers (params: API.Security_GetUsers_Request, callback: callbackFn): TransportRequestCallback; + getUsers (params: API.Security_GetUsers_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + patchUsers (params: API.Security_PatchUsers_Request, options?: TransportRequestOptions): TransportRequestPromise; + patchUsers (params: API.Security_PatchUsers_Request, callback: callbackFn): TransportRequestCallback; + patchUsers (params: API.Security_PatchUsers_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteUser (params: API.Security_DeleteUser_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteUser (params: API.Security_DeleteUser_Request, callback: callbackFn): TransportRequestCallback; + deleteUser (params: API.Security_DeleteUser_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getUser (params: API.Security_GetUser_Request, options?: TransportRequestOptions): TransportRequestPromise; + getUser (params: API.Security_GetUser_Request, callback: callbackFn): TransportRequestCallback; + getUser (params: API.Security_GetUser_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + patchUser (params: API.Security_PatchUser_Request, options?: TransportRequestOptions): TransportRequestPromise; + patchUser (params: API.Security_PatchUser_Request, callback: callbackFn): TransportRequestCallback; + patchUser (params: API.Security_PatchUser_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + createUser (params: API.Security_CreateUser_Request, options?: TransportRequestOptions): TransportRequestPromise; + createUser (params: API.Security_CreateUser_Request, callback: callbackFn): TransportRequestCallback; + createUser (params: API.Security_CreateUser_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + generateUserToken (params: API.Security_GenerateUserToken_Request, options?: TransportRequestOptions): TransportRequestPromise; + generateUserToken (params: API.Security_GenerateUserToken_Request, callback: callbackFn): TransportRequestCallback; + generateUserToken (params: API.Security_GenerateUserToken_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + migrate (params?: API.Security_Migrate_Request, options?: TransportRequestOptions): TransportRequestPromise; + migrate (callback: callbackFn): TransportRequestCallback; + migrate (params: API.Security_Migrate_Request, callback: callbackFn): TransportRequestCallback; + migrate (params: API.Security_Migrate_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getDistinguishedNames (params?: API.Security_GetDistinguishedNames_Request, options?: TransportRequestOptions): TransportRequestPromise; + getDistinguishedNames (callback: callbackFn): TransportRequestCallback; + getDistinguishedNames (params: API.Security_GetDistinguishedNames_Request, callback: callbackFn): TransportRequestCallback; + getDistinguishedNames (params: API.Security_GetDistinguishedNames_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + patchDistinguishedNames (params: API.Security_PatchDistinguishedNames_Request, options?: TransportRequestOptions): TransportRequestPromise; + patchDistinguishedNames (params: API.Security_PatchDistinguishedNames_Request, callback: callbackFn): TransportRequestCallback; + patchDistinguishedNames (params: API.Security_PatchDistinguishedNames_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteDistinguishedName (params: API.Security_DeleteDistinguishedName_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteDistinguishedName (params: API.Security_DeleteDistinguishedName_Request, callback: callbackFn): TransportRequestCallback; + deleteDistinguishedName (params: API.Security_DeleteDistinguishedName_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getDistinguishedName (params: API.Security_GetDistinguishedName_Request, options?: TransportRequestOptions): TransportRequestPromise; + getDistinguishedName (params: API.Security_GetDistinguishedName_Request, callback: callbackFn): TransportRequestCallback; + getDistinguishedName (params: API.Security_GetDistinguishedName_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + patchDistinguishedName (params: API.Security_PatchDistinguishedName_Request, options?: TransportRequestOptions): TransportRequestPromise; + patchDistinguishedName (params: API.Security_PatchDistinguishedName_Request, callback: callbackFn): TransportRequestCallback; + patchDistinguishedName (params: API.Security_PatchDistinguishedName_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + updateDistinguishedName (params: API.Security_UpdateDistinguishedName_Request, options?: TransportRequestOptions): TransportRequestPromise; + updateDistinguishedName (params: API.Security_UpdateDistinguishedName_Request, callback: callbackFn): TransportRequestCallback; + updateDistinguishedName (params: API.Security_UpdateDistinguishedName_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getPermissionsInfo (params?: API.Security_GetPermissionsInfo_Request, options?: TransportRequestOptions): TransportRequestPromise; + getPermissionsInfo (callback: callbackFn): TransportRequestCallback; + getPermissionsInfo (params: API.Security_GetPermissionsInfo_Request, callback: callbackFn): TransportRequestCallback; + getPermissionsInfo (params: API.Security_GetPermissionsInfo_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getRoles (params?: API.Security_GetRoles_Request, options?: TransportRequestOptions): TransportRequestPromise; + getRoles (callback: callbackFn): TransportRequestCallback; + getRoles (params: API.Security_GetRoles_Request, callback: callbackFn): TransportRequestCallback; + getRoles (params: API.Security_GetRoles_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + patchRoles (params: API.Security_PatchRoles_Request, options?: TransportRequestOptions): TransportRequestPromise; + patchRoles (params: API.Security_PatchRoles_Request, callback: callbackFn): TransportRequestCallback; + patchRoles (params: API.Security_PatchRoles_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteRole (params: API.Security_DeleteRole_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteRole (params: API.Security_DeleteRole_Request, callback: callbackFn): TransportRequestCallback; + deleteRole (params: API.Security_DeleteRole_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getRole (params: API.Security_GetRole_Request, options?: TransportRequestOptions): TransportRequestPromise; + getRole (params: API.Security_GetRole_Request, callback: callbackFn): TransportRequestCallback; + getRole (params: API.Security_GetRole_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + patchRole (params: API.Security_PatchRole_Request, options?: TransportRequestOptions): TransportRequestPromise; + patchRole (params: API.Security_PatchRole_Request, callback: callbackFn): TransportRequestCallback; + patchRole (params: API.Security_PatchRole_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + createRole (params: API.Security_CreateRole_Request, options?: TransportRequestOptions): TransportRequestPromise; + createRole (params: API.Security_CreateRole_Request, callback: callbackFn): TransportRequestCallback; + createRole (params: API.Security_CreateRole_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getRoleMappings (params?: API.Security_GetRoleMappings_Request, options?: TransportRequestOptions): TransportRequestPromise; + getRoleMappings (callback: callbackFn): TransportRequestCallback; + getRoleMappings (params: API.Security_GetRoleMappings_Request, callback: callbackFn): TransportRequestCallback; + getRoleMappings (params: API.Security_GetRoleMappings_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + patchRoleMappings (params: API.Security_PatchRoleMappings_Request, options?: TransportRequestOptions): TransportRequestPromise; + patchRoleMappings (params: API.Security_PatchRoleMappings_Request, callback: callbackFn): TransportRequestCallback; + patchRoleMappings (params: API.Security_PatchRoleMappings_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteRoleMapping (params: API.Security_DeleteRoleMapping_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteRoleMapping (params: API.Security_DeleteRoleMapping_Request, callback: callbackFn): TransportRequestCallback; + deleteRoleMapping (params: API.Security_DeleteRoleMapping_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getRoleMapping (params: API.Security_GetRoleMapping_Request, options?: TransportRequestOptions): TransportRequestPromise; + getRoleMapping (params: API.Security_GetRoleMapping_Request, callback: callbackFn): TransportRequestCallback; + getRoleMapping (params: API.Security_GetRoleMapping_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + patchRoleMapping (params: API.Security_PatchRoleMapping_Request, options?: TransportRequestOptions): TransportRequestPromise; + patchRoleMapping (params: API.Security_PatchRoleMapping_Request, callback: callbackFn): TransportRequestCallback; + patchRoleMapping (params: API.Security_PatchRoleMapping_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + createRoleMapping (params: API.Security_CreateRoleMapping_Request, options?: TransportRequestOptions): TransportRequestPromise; + createRoleMapping (params: API.Security_CreateRoleMapping_Request, callback: callbackFn): TransportRequestCallback; + createRoleMapping (params: API.Security_CreateRoleMapping_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getConfiguration (params?: API.Security_GetConfiguration_Request, options?: TransportRequestOptions): TransportRequestPromise; + getConfiguration (callback: callbackFn): TransportRequestCallback; + getConfiguration (params: API.Security_GetConfiguration_Request, callback: callbackFn): TransportRequestCallback; + getConfiguration (params: API.Security_GetConfiguration_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + patchConfiguration (params: API.Security_PatchConfiguration_Request, options?: TransportRequestOptions): TransportRequestPromise; + patchConfiguration (params: API.Security_PatchConfiguration_Request, callback: callbackFn): TransportRequestCallback; + patchConfiguration (params: API.Security_PatchConfiguration_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + updateConfiguration (params: API.Security_UpdateConfiguration_Request, options?: TransportRequestOptions): TransportRequestPromise; + updateConfiguration (params: API.Security_UpdateConfiguration_Request, callback: callbackFn): TransportRequestCallback; + updateConfiguration (params: API.Security_UpdateConfiguration_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getCertificates (params?: API.Security_GetCertificates_Request, options?: TransportRequestOptions): TransportRequestPromise; + getCertificates (callback: callbackFn): TransportRequestCallback; + getCertificates (params: API.Security_GetCertificates_Request, callback: callbackFn): TransportRequestCallback; + getCertificates (params: API.Security_GetCertificates_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + reloadHttpCertificates (params?: API.Security_ReloadHttpCertificates_Request, options?: TransportRequestOptions): TransportRequestPromise; + reloadHttpCertificates (callback: callbackFn): TransportRequestCallback; + reloadHttpCertificates (params: API.Security_ReloadHttpCertificates_Request, callback: callbackFn): TransportRequestCallback; + reloadHttpCertificates (params: API.Security_ReloadHttpCertificates_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + reloadTransportCertificates (params?: API.Security_ReloadTransportCertificates_Request, options?: TransportRequestOptions): TransportRequestPromise; + reloadTransportCertificates (callback: callbackFn): TransportRequestCallback; + reloadTransportCertificates (params: API.Security_ReloadTransportCertificates_Request, callback: callbackFn): TransportRequestCallback; + reloadTransportCertificates (params: API.Security_ReloadTransportCertificates_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getTenancyConfig (params?: API.Security_GetTenancyConfig_Request, options?: TransportRequestOptions): TransportRequestPromise; + getTenancyConfig (callback: callbackFn): TransportRequestCallback; + getTenancyConfig (params: API.Security_GetTenancyConfig_Request, callback: callbackFn): TransportRequestCallback; + getTenancyConfig (params: API.Security_GetTenancyConfig_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + createUpdateTenancyConfig (params: API.Security_CreateUpdateTenancyConfig_Request, options?: TransportRequestOptions): TransportRequestPromise; + createUpdateTenancyConfig (params: API.Security_CreateUpdateTenancyConfig_Request, callback: callbackFn): TransportRequestCallback; + createUpdateTenancyConfig (params: API.Security_CreateUpdateTenancyConfig_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getTenants (params?: API.Security_GetTenants_Request, options?: TransportRequestOptions): TransportRequestPromise; + getTenants (callback: callbackFn): TransportRequestCallback; + getTenants (params: API.Security_GetTenants_Request, callback: callbackFn): TransportRequestCallback; + getTenants (params: API.Security_GetTenants_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + patchTenants (params: API.Security_PatchTenants_Request, options?: TransportRequestOptions): TransportRequestPromise; + patchTenants (params: API.Security_PatchTenants_Request, callback: callbackFn): TransportRequestCallback; + patchTenants (params: API.Security_PatchTenants_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteTenant (params: API.Security_DeleteTenant_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteTenant (params: API.Security_DeleteTenant_Request, callback: callbackFn): TransportRequestCallback; + deleteTenant (params: API.Security_DeleteTenant_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getTenant (params: API.Security_GetTenant_Request, options?: TransportRequestOptions): TransportRequestPromise; + getTenant (params: API.Security_GetTenant_Request, callback: callbackFn): TransportRequestCallback; + getTenant (params: API.Security_GetTenant_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + patchTenant (params: API.Security_PatchTenant_Request, options?: TransportRequestOptions): TransportRequestPromise; + patchTenant (params: API.Security_PatchTenant_Request, callback: callbackFn): TransportRequestCallback; + patchTenant (params: API.Security_PatchTenant_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + createTenant (params: API.Security_CreateTenant_Request, options?: TransportRequestOptions): TransportRequestPromise; + createTenant (params: API.Security_CreateTenant_Request, callback: callbackFn): TransportRequestCallback; + createTenant (params: API.Security_CreateTenant_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getUsersLegacy (params?: API.Security_GetUsersLegacy_Request, options?: TransportRequestOptions): TransportRequestPromise; + getUsersLegacy (callback: callbackFn): TransportRequestCallback; + getUsersLegacy (params: API.Security_GetUsersLegacy_Request, callback: callbackFn): TransportRequestCallback; + getUsersLegacy (params: API.Security_GetUsersLegacy_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteUserLegacy (params: API.Security_DeleteUserLegacy_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteUserLegacy (params: API.Security_DeleteUserLegacy_Request, callback: callbackFn): TransportRequestCallback; + deleteUserLegacy (params: API.Security_DeleteUserLegacy_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getUserLegacy (params: API.Security_GetUserLegacy_Request, options?: TransportRequestOptions): TransportRequestPromise; + getUserLegacy (params: API.Security_GetUserLegacy_Request, callback: callbackFn): TransportRequestCallback; + getUserLegacy (params: API.Security_GetUserLegacy_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + createUserLegacy (params: API.Security_CreateUserLegacy_Request, options?: TransportRequestOptions): TransportRequestPromise; + createUserLegacy (params: API.Security_CreateUserLegacy_Request, callback: callbackFn): TransportRequestCallback; + createUserLegacy (params: API.Security_CreateUserLegacy_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + generateUserTokenLegacy (params: API.Security_GenerateUserTokenLegacy_Request, options?: TransportRequestOptions): TransportRequestPromise; + generateUserTokenLegacy (params: API.Security_GenerateUserTokenLegacy_Request, callback: callbackFn): TransportRequestCallback; + generateUserTokenLegacy (params: API.Security_GenerateUserTokenLegacy_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + validate (params?: API.Security_Validate_Request, options?: TransportRequestOptions): TransportRequestPromise; + validate (callback: callbackFn): TransportRequestCallback; + validate (params: API.Security_Validate_Request, callback: callbackFn): TransportRequestCallback; + validate (params: API.Security_Validate_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + authinfo (params?: API.Security_Authinfo_Request, options?: TransportRequestOptions): TransportRequestPromise; + authinfo (callback: callbackFn): TransportRequestCallback; + authinfo (params: API.Security_Authinfo_Request, callback: callbackFn): TransportRequestCallback; + authinfo (params: API.Security_Authinfo_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getDashboardsInfo (params?: API.Security_GetDashboardsInfo_Request, options?: TransportRequestOptions): TransportRequestPromise; + getDashboardsInfo (callback: callbackFn): TransportRequestCallback; + getDashboardsInfo (params: API.Security_GetDashboardsInfo_Request, callback: callbackFn): TransportRequestCallback; + getDashboardsInfo (params: API.Security_GetDashboardsInfo_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + postDashboardsInfo (params?: API.Security_PostDashboardsInfo_Request, options?: TransportRequestOptions): TransportRequestPromise; + postDashboardsInfo (callback: callbackFn): TransportRequestCallback; + postDashboardsInfo (params: API.Security_PostDashboardsInfo_Request, callback: callbackFn): TransportRequestCallback; + postDashboardsInfo (params: API.Security_PostDashboardsInfo_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + health (params?: API.Security_Health_Request, options?: TransportRequestOptions): TransportRequestPromise; + health (callback: callbackFn): TransportRequestCallback; + health (params: API.Security_Health_Request, callback: callbackFn): TransportRequestCallback; + health (params: API.Security_Health_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + tenantInfo (params?: API.Security_TenantInfo_Request, options?: TransportRequestOptions): TransportRequestPromise; + tenantInfo (callback: callbackFn): TransportRequestCallback; + tenantInfo (params: API.Security_TenantInfo_Request, callback: callbackFn): TransportRequestCallback; + tenantInfo (params: API.Security_TenantInfo_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + whoAmI (params?: API.Security_WhoAmI_Request, options?: TransportRequestOptions): TransportRequestPromise; + whoAmI (callback: callbackFn): TransportRequestCallback; + whoAmI (params: API.Security_WhoAmI_Request, callback: callbackFn): TransportRequestCallback; + whoAmI (params: API.Security_WhoAmI_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + whoAmIProtected (params?: API.Security_WhoAmIProtected_Request, options?: TransportRequestOptions): TransportRequestPromise; + whoAmIProtected (callback: callbackFn): TransportRequestCallback; + whoAmIProtected (params: API.Security_WhoAmIProtected_Request, callback: callbackFn): TransportRequestCallback; + whoAmIProtected (params: API.Security_WhoAmIProtected_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + + snapshot: { + getRepository (params?: API.Snapshot_GetRepository_Request, options?: TransportRequestOptions): TransportRequestPromise; + getRepository (callback: callbackFn): TransportRequestCallback; + getRepository (params: API.Snapshot_GetRepository_Request, callback: callbackFn): TransportRequestCallback; + getRepository (params: API.Snapshot_GetRepository_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + status (params?: API.Snapshot_Status_Request, options?: TransportRequestOptions): TransportRequestPromise; + status (callback: callbackFn): TransportRequestCallback; + status (params: API.Snapshot_Status_Request, callback: callbackFn): TransportRequestCallback; + status (params: API.Snapshot_Status_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteRepository (params: API.Snapshot_DeleteRepository_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteRepository (params: API.Snapshot_DeleteRepository_Request, callback: callbackFn): TransportRequestCallback; + deleteRepository (params: API.Snapshot_DeleteRepository_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + createRepository (params: API.Snapshot_CreateRepository_Request, options?: TransportRequestOptions): TransportRequestPromise; + createRepository (params: API.Snapshot_CreateRepository_Request, callback: callbackFn): TransportRequestCallback; + createRepository (params: API.Snapshot_CreateRepository_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + cleanupRepository (params: API.Snapshot_CleanupRepository_Request, options?: TransportRequestOptions): TransportRequestPromise; + cleanupRepository (params: API.Snapshot_CleanupRepository_Request, callback: callbackFn): TransportRequestCallback; + cleanupRepository (params: API.Snapshot_CleanupRepository_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + verifyRepository (params: API.Snapshot_VerifyRepository_Request, options?: TransportRequestOptions): TransportRequestPromise; + verifyRepository (params: API.Snapshot_VerifyRepository_Request, callback: callbackFn): TransportRequestCallback; + verifyRepository (params: API.Snapshot_VerifyRepository_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + delete (params: API.Snapshot_Delete_Request, options?: TransportRequestOptions): TransportRequestPromise; + delete (params: API.Snapshot_Delete_Request, callback: callbackFn): TransportRequestCallback; + delete (params: API.Snapshot_Delete_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + get (params: API.Snapshot_Get_Request, options?: TransportRequestOptions): TransportRequestPromise; + get (params: API.Snapshot_Get_Request, callback: callbackFn): TransportRequestCallback; + get (params: API.Snapshot_Get_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + create (params: API.Snapshot_Create_Request, options?: TransportRequestOptions): TransportRequestPromise; + create (params: API.Snapshot_Create_Request, callback: callbackFn): TransportRequestCallback; + create (params: API.Snapshot_Create_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + clone (params: API.Snapshot_Clone_Request, options?: TransportRequestOptions): TransportRequestPromise; + clone (params: API.Snapshot_Clone_Request, callback: callbackFn): TransportRequestCallback; + clone (params: API.Snapshot_Clone_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + restore (params: API.Snapshot_Restore_Request, options?: TransportRequestOptions): TransportRequestPromise; + restore (params: API.Snapshot_Restore_Request, callback: callbackFn): TransportRequestCallback; + restore (params: API.Snapshot_Restore_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + + sql: { + settings (params: API.Sql_Settings_Request, options?: TransportRequestOptions): TransportRequestPromise; + settings (params: API.Sql_Settings_Request, callback: callbackFn): TransportRequestCallback; + settings (params: API.Sql_Settings_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + query (params: API.Sql_Query_Request, options?: TransportRequestOptions): TransportRequestPromise; + query (params: API.Sql_Query_Request, callback: callbackFn): TransportRequestCallback; + query (params: API.Sql_Query_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + explain (params: API.Sql_Explain_Request, options?: TransportRequestOptions): TransportRequestPromise; + explain (params: API.Sql_Explain_Request, callback: callbackFn): TransportRequestCallback; + explain (params: API.Sql_Explain_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + close (params: API.Sql_Close_Request, options?: TransportRequestOptions): TransportRequestPromise; + close (params: API.Sql_Close_Request, callback: callbackFn): TransportRequestCallback; + close (params: API.Sql_Close_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getStats (params?: API.Sql_GetStats_Request, options?: TransportRequestOptions): TransportRequestPromise; + getStats (callback: callbackFn): TransportRequestCallback; + getStats (params: API.Sql_GetStats_Request, callback: callbackFn): TransportRequestCallback; + getStats (params: API.Sql_GetStats_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + postStats (params: API.Sql_PostStats_Request, options?: TransportRequestOptions): TransportRequestPromise; + postStats (params: API.Sql_PostStats_Request, callback: callbackFn): TransportRequestCallback; + postStats (params: API.Sql_PostStats_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + + tasks: { + list (params?: API.Tasks_List_Request, options?: TransportRequestOptions): TransportRequestPromise; + list (callback: callbackFn): TransportRequestCallback; + list (params: API.Tasks_List_Request, callback: callbackFn): TransportRequestCallback; + list (params: API.Tasks_List_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + cancel (params?: API.Tasks_Cancel_Request, options?: TransportRequestOptions): TransportRequestPromise; + cancel (callback: callbackFn): TransportRequestCallback; + cancel (params: API.Tasks_Cancel_Request, callback: callbackFn): TransportRequestCallback; + cancel (params: API.Tasks_Cancel_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + get (params: API.Tasks_Get_Request, options?: TransportRequestOptions): TransportRequestPromise; + get (params: API.Tasks_Get_Request, callback: callbackFn): TransportRequestCallback; + get (params: API.Tasks_Get_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + + transforms: { + search (params?: API.Transforms_Search_Request, options?: TransportRequestOptions): TransportRequestPromise; + search (callback: callbackFn): TransportRequestCallback; + search (params: API.Transforms_Search_Request, callback: callbackFn): TransportRequestCallback; + search (params: API.Transforms_Search_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + preview (params?: API.Transforms_Preview_Request, options?: TransportRequestOptions): TransportRequestPromise; + preview (callback: callbackFn): TransportRequestCallback; + preview (params: API.Transforms_Preview_Request, callback: callbackFn): TransportRequestCallback; + preview (params: API.Transforms_Preview_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + delete (params: API.Transforms_Delete_Request, options?: TransportRequestOptions): TransportRequestPromise; + delete (params: API.Transforms_Delete_Request, callback: callbackFn): TransportRequestCallback; + delete (params: API.Transforms_Delete_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + get (params: API.Transforms_Get_Request, options?: TransportRequestOptions): TransportRequestPromise; + get (params: API.Transforms_Get_Request, callback: callbackFn): TransportRequestCallback; + get (params: API.Transforms_Get_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + put (params: API.Transforms_Put_Request, options?: TransportRequestOptions): TransportRequestPromise; + put (params: API.Transforms_Put_Request, callback: callbackFn): TransportRequestCallback; + put (params: API.Transforms_Put_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + explain (params: API.Transforms_Explain_Request, options?: TransportRequestOptions): TransportRequestPromise; + explain (params: API.Transforms_Explain_Request, callback: callbackFn): TransportRequestCallback; + explain (params: API.Transforms_Explain_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + start (params: API.Transforms_Start_Request, options?: TransportRequestOptions): TransportRequestPromise; + start (params: API.Transforms_Start_Request, callback: callbackFn): TransportRequestCallback; + start (params: API.Transforms_Start_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + stop (params: API.Transforms_Stop_Request, options?: TransportRequestOptions): TransportRequestPromise; + stop (params: API.Transforms_Stop_Request, callback: callbackFn): TransportRequestCallback; + stop (params: API.Transforms_Stop_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + + + http: { + connect (params: HttpRequest, options?: TransportRequestOptions): TransportRequestPromise; + connect (params: HttpRequest, callback: callbackFn): TransportRequestCallback; + connect (params: HttpRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + delete (params: HttpRequest, options?: TransportRequestOptions): TransportRequestPromise; + delete (params: HttpRequest, callback: callbackFn): TransportRequestCallback; + delete (params: HttpRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + get (params: HttpRequest, options?: TransportRequestOptions): TransportRequestPromise; + get (params: HttpRequest, callback: callbackFn): TransportRequestCallback; + get (params: HttpRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + head (params: HttpRequest, options?: TransportRequestOptions): TransportRequestPromise; + head (params: HttpRequest, callback: callbackFn): TransportRequestCallback; + head (params: HttpRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + options (params: HttpRequest, options?: TransportRequestOptions): TransportRequestPromise; + options (params: HttpRequest, callback: callbackFn): TransportRequestCallback; + options (params: HttpRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + patch (params: HttpRequest, options?: TransportRequestOptions): TransportRequestPromise; + patch (params: HttpRequest, callback: callbackFn): TransportRequestCallback; + patch (params: HttpRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + post (params: HttpRequest, options?: TransportRequestOptions): TransportRequestPromise; + post (params: HttpRequest, callback: callbackFn): TransportRequestCallback; + post (params: HttpRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + put (params: HttpRequest, options?: TransportRequestOptions): TransportRequestPromise; + put (params: HttpRequest, callback: callbackFn): TransportRequestCallback; + put (params: HttpRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + trace (params: HttpRequest, options?: TransportRequestOptions): TransportRequestPromise; + trace (params: HttpRequest, callback: callbackFn): TransportRequestCallback; + trace (params: HttpRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + }; + + info (params?: API.Info_Request, options?: TransportRequestOptions): TransportRequestPromise; + info (callback: callbackFn): TransportRequestCallback; + info (params: API.Info_Request, callback: callbackFn): TransportRequestCallback; + info (params: API.Info_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + ping (params?: API.Ping_Request, options?: TransportRequestOptions): TransportRequestPromise; + ping (callback: callbackFn): TransportRequestCallback; + ping (params: API.Ping_Request, callback: callbackFn): TransportRequestCallback; + ping (params: API.Ping_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + bulk (params: API.Bulk_Request, options?: TransportRequestOptions): TransportRequestPromise; + bulk (params: API.Bulk_Request, callback: callbackFn): TransportRequestCallback; + bulk (params: API.Bulk_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + count (params?: API.Count_Request, options?: TransportRequestOptions): TransportRequestPromise; + count (callback: callbackFn): TransportRequestCallback; + count (params: API.Count_Request, callback: callbackFn): TransportRequestCallback; + count (params: API.Count_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteByQueryRethrottle (params: API.DeleteByQueryRethrottle_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteByQueryRethrottle (params: API.DeleteByQueryRethrottle_Request, callback: callbackFn): TransportRequestCallback; + deleteByQueryRethrottle (params: API.DeleteByQueryRethrottle_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + fieldCaps (params?: API.FieldCaps_Request, options?: TransportRequestOptions): TransportRequestPromise; + fieldCaps (callback: callbackFn): TransportRequestCallback; + fieldCaps (params: API.FieldCaps_Request, callback: callbackFn): TransportRequestCallback; + fieldCaps (params: API.FieldCaps_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + mget (params: API.Mget_Request, options?: TransportRequestOptions): TransportRequestPromise; + mget (params: API.Mget_Request, callback: callbackFn): TransportRequestCallback; + mget (params: API.Mget_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + msearch (params: API.Msearch_Request, options?: TransportRequestOptions): TransportRequestPromise; + msearch (params: API.Msearch_Request, callback: callbackFn): TransportRequestCallback; + msearch (params: API.Msearch_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + msearchTemplate (params: API.MsearchTemplate_Request, options?: TransportRequestOptions): TransportRequestPromise; + msearchTemplate (params: API.MsearchTemplate_Request, callback: callbackFn): TransportRequestCallback; + msearchTemplate (params: API.MsearchTemplate_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + mtermvectors (params?: API.Mtermvectors_Request, options?: TransportRequestOptions): TransportRequestPromise; + mtermvectors (callback: callbackFn): TransportRequestCallback; + mtermvectors (params: API.Mtermvectors_Request, callback: callbackFn): TransportRequestCallback; + mtermvectors (params: API.Mtermvectors_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + rankEval (params: API.RankEval_Request, options?: TransportRequestOptions): TransportRequestPromise; + rankEval (params: API.RankEval_Request, callback: callbackFn): TransportRequestCallback; + rankEval (params: API.RankEval_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + reindex (params: API.Reindex_Request, options?: TransportRequestOptions): TransportRequestPromise; + reindex (params: API.Reindex_Request, callback: callbackFn): TransportRequestCallback; + reindex (params: API.Reindex_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + reindexRethrottle (params: API.ReindexRethrottle_Request, options?: TransportRequestOptions): TransportRequestPromise; + reindexRethrottle (params: API.ReindexRethrottle_Request, callback: callbackFn): TransportRequestCallback; + reindexRethrottle (params: API.ReindexRethrottle_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + renderSearchTemplate (params?: API.RenderSearchTemplate_Request, options?: TransportRequestOptions): TransportRequestPromise; + renderSearchTemplate (callback: callbackFn): TransportRequestCallback; + renderSearchTemplate (params: API.RenderSearchTemplate_Request, callback: callbackFn): TransportRequestCallback; + renderSearchTemplate (params: API.RenderSearchTemplate_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getScriptContext (params?: API.GetScriptContext_Request, options?: TransportRequestOptions): TransportRequestPromise; + getScriptContext (callback: callbackFn): TransportRequestCallback; + getScriptContext (params: API.GetScriptContext_Request, callback: callbackFn): TransportRequestCallback; + getScriptContext (params: API.GetScriptContext_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getScriptLanguages (params?: API.GetScriptLanguages_Request, options?: TransportRequestOptions): TransportRequestPromise; + getScriptLanguages (callback: callbackFn): TransportRequestCallback; + getScriptLanguages (params: API.GetScriptLanguages_Request, callback: callbackFn): TransportRequestCallback; + getScriptLanguages (params: API.GetScriptLanguages_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteScript (params: API.DeleteScript_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteScript (params: API.DeleteScript_Request, callback: callbackFn): TransportRequestCallback; + deleteScript (params: API.DeleteScript_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getScript (params: API.GetScript_Request, options?: TransportRequestOptions): TransportRequestPromise; + getScript (params: API.GetScript_Request, callback: callbackFn): TransportRequestCallback; + getScript (params: API.GetScript_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + putScript (params: API.PutScript_Request, options?: TransportRequestOptions): TransportRequestPromise; + putScript (params: API.PutScript_Request, callback: callbackFn): TransportRequestCallback; + putScript (params: API.PutScript_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + scriptsPainlessExecute (params?: API.ScriptsPainlessExecute_Request, options?: TransportRequestOptions): TransportRequestPromise; + scriptsPainlessExecute (callback: callbackFn): TransportRequestCallback; + scriptsPainlessExecute (params: API.ScriptsPainlessExecute_Request, callback: callbackFn): TransportRequestCallback; + scriptsPainlessExecute (params: API.ScriptsPainlessExecute_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + search (params?: API.Search_Request, options?: TransportRequestOptions): TransportRequestPromise; + search (callback: callbackFn): TransportRequestCallback; + search (params: API.Search_Request, callback: callbackFn): TransportRequestCallback; + search (params: API.Search_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + searchShards (params?: API.SearchShards_Request, options?: TransportRequestOptions): TransportRequestPromise; + searchShards (callback: callbackFn): TransportRequestCallback; + searchShards (params: API.SearchShards_Request, callback: callbackFn): TransportRequestCallback; + searchShards (params: API.SearchShards_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deletePit (params?: API.DeletePit_Request, options?: TransportRequestOptions): TransportRequestPromise; + deletePit (callback: callbackFn): TransportRequestCallback; + deletePit (params: API.DeletePit_Request, callback: callbackFn): TransportRequestCallback; + deletePit (params: API.DeletePit_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteAllPits (params?: API.DeleteAllPits_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteAllPits (callback: callbackFn): TransportRequestCallback; + deleteAllPits (params: API.DeleteAllPits_Request, callback: callbackFn): TransportRequestCallback; + deleteAllPits (params: API.DeleteAllPits_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getAllPits (params?: API.GetAllPits_Request, options?: TransportRequestOptions): TransportRequestPromise; + getAllPits (callback: callbackFn): TransportRequestCallback; + getAllPits (params: API.GetAllPits_Request, callback: callbackFn): TransportRequestCallback; + getAllPits (params: API.GetAllPits_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + clearScroll (params?: API.ClearScroll_Request, options?: TransportRequestOptions): TransportRequestPromise; + clearScroll (callback: callbackFn): TransportRequestCallback; + clearScroll (params: API.ClearScroll_Request, callback: callbackFn): TransportRequestCallback; + clearScroll (params: API.ClearScroll_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + scroll (params?: API.Scroll_Request, options?: TransportRequestOptions): TransportRequestPromise; + scroll (callback: callbackFn): TransportRequestCallback; + scroll (params: API.Scroll_Request, callback: callbackFn): TransportRequestCallback; + scroll (params: API.Scroll_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + searchTemplate (params: API.SearchTemplate_Request, options?: TransportRequestOptions): TransportRequestPromise; + searchTemplate (params: API.SearchTemplate_Request, callback: callbackFn): TransportRequestCallback; + searchTemplate (params: API.SearchTemplate_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + updateByQueryRethrottle (params: API.UpdateByQueryRethrottle_Request, options?: TransportRequestOptions): TransportRequestPromise; + updateByQueryRethrottle (params: API.UpdateByQueryRethrottle_Request, callback: callbackFn): TransportRequestCallback; + updateByQueryRethrottle (params: API.UpdateByQueryRethrottle_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + create (params: API.Create_Request, options?: TransportRequestOptions): TransportRequestPromise; + create (params: API.Create_Request, callback: callbackFn): TransportRequestCallback; + create (params: API.Create_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + deleteByQuery (params: API.DeleteByQuery_Request, options?: TransportRequestOptions): TransportRequestPromise; + deleteByQuery (params: API.DeleteByQuery_Request, callback: callbackFn): TransportRequestCallback; + deleteByQuery (params: API.DeleteByQuery_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + index (params: API.Index_Request, options?: TransportRequestOptions): TransportRequestPromise; + index (params: API.Index_Request, callback: callbackFn): TransportRequestCallback; + index (params: API.Index_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + delete (params: API.Delete_Request, options?: TransportRequestOptions): TransportRequestPromise; + delete (params: API.Delete_Request, callback: callbackFn): TransportRequestCallback; + delete (params: API.Delete_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + get (params: API.Get_Request, options?: TransportRequestOptions): TransportRequestPromise; + get (params: API.Get_Request, callback: callbackFn): TransportRequestCallback; + get (params: API.Get_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + exists (params: API.Exists_Request, options?: TransportRequestOptions): TransportRequestPromise; + exists (params: API.Exists_Request, callback: callbackFn): TransportRequestCallback; + exists (params: API.Exists_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + explain (params: API.Explain_Request, options?: TransportRequestOptions): TransportRequestPromise; + explain (params: API.Explain_Request, callback: callbackFn): TransportRequestCallback; + explain (params: API.Explain_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + createPit (params: API.CreatePit_Request, options?: TransportRequestOptions): TransportRequestPromise; + createPit (params: API.CreatePit_Request, callback: callbackFn): TransportRequestCallback; + createPit (params: API.CreatePit_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + getSource (params: API.GetSource_Request, options?: TransportRequestOptions): TransportRequestPromise; + getSource (params: API.GetSource_Request, callback: callbackFn): TransportRequestCallback; + getSource (params: API.GetSource_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + existsSource (params: API.ExistsSource_Request, options?: TransportRequestOptions): TransportRequestPromise; + existsSource (params: API.ExistsSource_Request, callback: callbackFn): TransportRequestCallback; + existsSource (params: API.ExistsSource_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + termvectors (params: API.Termvectors_Request, options?: TransportRequestOptions): TransportRequestPromise; + termvectors (params: API.Termvectors_Request, callback: callbackFn): TransportRequestCallback; + termvectors (params: API.Termvectors_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + updateByQuery (params: API.UpdateByQuery_Request, options?: TransportRequestOptions): TransportRequestPromise; + updateByQuery (params: API.UpdateByQuery_Request, callback: callbackFn): TransportRequestCallback; + updateByQuery (params: API.UpdateByQuery_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + + update (params: API.Update_Request, options?: TransportRequestOptions): TransportRequestPromise; + update (params: API.Update_Request, callback: callbackFn): TransportRequestCallback; + update (params: API.Update_Request, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback; + +} \ No newline at end of file diff --git a/api/OpenSearchAPI.js b/api/OpenSearchAPI.js new file mode 100644 index 000000000..4e9a4ac6a --- /dev/null +++ b/api/OpenSearchAPI.js @@ -0,0 +1,173 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { kConfigErr } = require('./utils') +const kApiModules = Symbol('api modules') + +class OpenSearchAPI { + constructor (opts) { + this[kConfigErr] = opts.ConfigurationError + this[kApiModules] = { + cat: new(require('./cat/_api'))(this), + cluster: new(require('./cluster/_api'))(this), + danglingIndices: new(require('./danglingIndices/_api'))(this), + http: new(require('./http/_api'))(this), + indices: new(require('./indices/_api'))(this), + ingest: new(require('./ingest/_api'))(this), + knn: new(require('./knn/_api'))(this), + ml: new(require('./ml/_api'))(this), + nodes: new(require('./nodes/_api'))(this), + notifications: new(require('./notifications/_api'))(this), + ppl: new(require('./ppl/_api'))(this), + remoteStore: new(require('./remoteStore/_api'))(this), + rollups: new(require('./rollups/_api'))(this), + searchPipeline: new(require('./searchPipeline/_api'))(this), + security: new(require('./security/_api'))(this), + snapshot: new(require('./snapshot/_api'))(this), + sql: new(require('./sql/_api'))(this), + tasks: new(require('./tasks/_api'))(this), + transforms: new(require('./transforms/_api'))(this), + } + + // Setup Root API Functions + /** @namespace API-Core */ + this.bulk = require('./_core/bulk').bind(this) + this.clearScroll = require('./_core/clearScroll').bind(this) + this.count = require('./_core/count').bind(this) + this.create = require('./_core/create').bind(this) + this.createPit = require('./_core/createPit').bind(this) + this.delete = require('./_core/delete').bind(this) + this.deleteAllPits = require('./_core/deleteAllPits').bind(this) + this.deleteByQuery = require('./_core/deleteByQuery').bind(this) + this.deleteByQueryRethrottle = require('./_core/deleteByQueryRethrottle').bind(this) + this.deletePit = require('./_core/deletePit').bind(this) + this.deleteScript = require('./_core/deleteScript').bind(this) + this.exists = require('./_core/exists').bind(this) + this.existsSource = require('./_core/existsSource').bind(this) + this.explain = require('./_core/explain').bind(this) + this.fieldCaps = require('./_core/fieldCaps').bind(this) + this.get = require('./_core/get').bind(this) + this.getAllPits = require('./_core/getAllPits').bind(this) + this.getScript = require('./_core/getScript').bind(this) + this.getScriptContext = require('./_core/getScriptContext').bind(this) + this.getScriptLanguages = require('./_core/getScriptLanguages').bind(this) + this.getSource = require('./_core/getSource').bind(this) + this.index = require('./_core/index').bind(this) + this.info = require('./_core/info').bind(this) + this.mget = require('./_core/mget').bind(this) + this.msearch = require('./_core/msearch').bind(this) + this.msearchTemplate = require('./_core/msearchTemplate').bind(this) + this.mtermvectors = require('./_core/mtermvectors').bind(this) + this.ping = require('./_core/ping').bind(this) + this.putScript = require('./_core/putScript').bind(this) + this.rankEval = require('./_core/rankEval').bind(this) + this.reindex = require('./_core/reindex').bind(this) + this.reindexRethrottle = require('./_core/reindexRethrottle').bind(this) + this.renderSearchTemplate = require('./_core/renderSearchTemplate').bind(this) + this.scriptsPainlessExecute = require('./_core/scriptsPainlessExecute').bind(this) + this.scroll = require('./_core/scroll').bind(this) + this.search = require('./_core/search').bind(this) + this.searchShards = require('./_core/searchShards').bind(this) + this.searchTemplate = require('./_core/searchTemplate').bind(this) + this.termvectors = require('./_core/termvectors').bind(this) + this.update = require('./_core/update').bind(this) + this.updateByQuery = require('./_core/updateByQuery').bind(this) + this.updateByQueryRethrottle = require('./_core/updateByQueryRethrottle').bind(this) + + // Deprecated: Use clearScroll instead. + this.clear_scroll = require('./_core/clearScroll').bind(this) + // Deprecated: Use createPit instead. + this.create_pit = require('./_core/createPit').bind(this) + // Deprecated: Use deleteAllPits instead. + this.delete_all_pits = require('./_core/deleteAllPits').bind(this) + // Deprecated: Use deleteByQuery instead. + this.delete_by_query = require('./_core/deleteByQuery').bind(this) + // Deprecated: Use deleteByQueryRethrottle instead. + this.delete_by_query_rethrottle = require('./_core/deleteByQueryRethrottle').bind(this) + // Deprecated: Use deletePit instead. + this.delete_pit = require('./_core/deletePit').bind(this) + // Deprecated: Use deleteScript instead. + this.delete_script = require('./_core/deleteScript').bind(this) + // Deprecated: Use existsSource instead. + this.exists_source = require('./_core/existsSource').bind(this) + // Deprecated: Use fieldCaps instead. + this.field_caps = require('./_core/fieldCaps').bind(this) + // Deprecated: Use getAllPits instead. + this.get_all_pits = require('./_core/getAllPits').bind(this) + // Deprecated: Use getScript instead. + this.get_script = require('./_core/getScript').bind(this) + // Deprecated: Use getScriptContext instead. + this.get_script_context = require('./_core/getScriptContext').bind(this) + // Deprecated: Use getScriptLanguages instead. + this.get_script_languages = require('./_core/getScriptLanguages').bind(this) + // Deprecated: Use getSource instead. + this.get_source = require('./_core/getSource').bind(this) + // Deprecated: Use msearchTemplate instead. + this.msearch_template = require('./_core/msearchTemplate').bind(this) + // Deprecated: Use putScript instead. + this.put_script = require('./_core/putScript').bind(this) + // Deprecated: Use rankEval instead. + this.rank_eval = require('./_core/rankEval').bind(this) + // Deprecated: Use reindexRethrottle instead. + this.reindex_rethrottle = require('./_core/reindexRethrottle').bind(this) + // Deprecated: Use renderSearchTemplate instead. + this.render_search_template = require('./_core/renderSearchTemplate').bind(this) + // Deprecated: Use scriptsPainlessExecute instead. + this.scripts_painless_execute = require('./_core/scriptsPainlessExecute').bind(this) + // Deprecated: Use searchShards instead. + this.search_shards = require('./_core/searchShards').bind(this) + // Deprecated: Use searchTemplate instead. + this.search_template = require('./_core/searchTemplate').bind(this) + // Deprecated: Use updateByQuery instead. + this.update_by_query = require('./_core/updateByQuery').bind(this) + // Deprecated: Use updateByQueryRethrottle instead. + this.update_by_query_rethrottle = require('./_core/updateByQueryRethrottle').bind(this) + + // Setup API Modules + Object.defineProperties(this, { + cat: { get() { return this[kApiModules].cat } }, + cluster: { get() { return this[kApiModules].cluster } }, + danglingIndices: { get() { return this[kApiModules].danglingIndices } }, + http: { get() { return this[kApiModules].http } }, + indices: { get() { return this[kApiModules].indices } }, + ingest: { get() { return this[kApiModules].ingest } }, + knn: { get() { return this[kApiModules].knn } }, + ml: { get() { return this[kApiModules].ml } }, + nodes: { get() { return this[kApiModules].nodes } }, + notifications: { get() { return this[kApiModules].notifications } }, + ppl: { get() { return this[kApiModules].ppl } }, + remoteStore: { get() { return this[kApiModules].remoteStore } }, + rollups: { get() { return this[kApiModules].rollups } }, + searchPipeline: { get() { return this[kApiModules].searchPipeline } }, + security: { get() { return this[kApiModules].security } }, + snapshot: { get() { return this[kApiModules].snapshot } }, + sql: { get() { return this[kApiModules].sql } }, + tasks: { get() { return this[kApiModules].tasks } }, + transforms: { get() { return this[kApiModules].transforms } }, + + // Deprecated: Use danglingIndices instead. + dangling_indices: { get() { return this[kApiModules].danglingIndices } }, + // Deprecated: Use remoteStore instead. + remote_store: { get() { return this[kApiModules].remoteStore } }, + // Deprecated: Use searchPipeline instead. + search_pipeline: { get() { return this[kApiModules].searchPipeline } }, + }) + } +} + +module.exports = OpenSearchAPI; diff --git a/api/_core/bulk.d.ts b/api/_core/bulk.d.ts new file mode 100644 index 000000000..ccbaa1abc --- /dev/null +++ b/api/_core/bulk.d.ts @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Core_Search from '../_types/_core.search' +import * as Common from '../_types/_common' +import * as Core_Bulk from '../_types/_core.bulk' + +export interface Bulk_Request extends Global.Params { + _source?: Core_Search.SourceConfigParam; + _source_excludes?: Common.Fields; + _source_includes?: Common.Fields; + body: Bulk_RequestBody; + index?: Common.IndexName; + pipeline?: string; + refresh?: Common.Refresh; + require_alias?: boolean; + routing?: Common.Routing; + timeout?: Common.Duration; + type?: string; + wait_for_active_shards?: Common.WaitForActiveShards; +} + +export type Bulk_RequestBody = Core_Bulk.OperationContainer | Core_Bulk.UpdateAction | Record[] + +export interface Bulk_Response extends ApiResponse { + body: Bulk_ResponseBody; +} + +export interface Bulk_ResponseBody { + errors: boolean; + ingest_took?: number; + items: Record[]; + took: number; +} + diff --git a/api/_core/bulk.js b/api/_core/bulk.js new file mode 100644 index 000000000..ab2003991 --- /dev/null +++ b/api/_core/bulk.js @@ -0,0 +1,59 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Allows to perform multiple index/update/delete operations in a single request. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/document-apis/bulk/ - bulk} + * + * @memberOf API-Core + * + * @param {object} params + * @param {string} [params._source] - `true` or `false` to return the `_source` field or not, or a list of fields to return. + * @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude from the response. + * @param {string} [params._source_includes] - A comma-separated list of source fields to include in the response. + * @param {string} [params.pipeline] - ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter. + * @param {string} [params.refresh] - If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`. + * @param {boolean} [params.require_alias=false] - If `true`, the request's actions must target an index alias. + * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.timeout] - Period each action waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. + * @param {string} [params.type] - Default document type for items which don't provide one. + * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). + * @param {string} [params.index] - Name of the data stream, index, or index alias to perform bulk actions on. + * @param {array} params.body - The operation definition and data (action-data pairs), separated by newlines + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function bulkFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_bulk'].filter(c => c).join('').replace('//', '/'); + const method = index == null ? 'POST' : 'PUT'; + + return this.transport.request({ method, path, querystring, bulkBody: body }, options, callback); +} + +module.exports = bulkFunc; diff --git a/api/_core/clearScroll.d.ts b/api/_core/clearScroll.d.ts new file mode 100644 index 000000000..96d9b5d27 --- /dev/null +++ b/api/_core/clearScroll.d.ts @@ -0,0 +1,38 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface ClearScroll_Request extends Global.Params { + body?: ClearScroll_RequestBody; + scroll_id?: Common.ScrollIds; +} + +export interface ClearScroll_RequestBody { + scroll_id?: Common.ScrollIds; +} + +export interface ClearScroll_Response extends ApiResponse { + body: ClearScroll_ResponseBody; +} + +export interface ClearScroll_ResponseBody { + num_freed: number; + succeeded: boolean; +} + diff --git a/api/_core/clearScroll.js b/api/_core/clearScroll.js new file mode 100644 index 000000000..d61b930b4 --- /dev/null +++ b/api/_core/clearScroll.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Explicitly clears the search context for a scroll. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/scroll/ - clear_scroll} + * + * @memberOf API-Core + * + * @param {object} [params] + * @param {string} [params.scroll_id] DEPRECATED - Comma-separated list of scroll IDs to clear. To clear all scroll IDs, use `_all`. + * @param {object} [params.body] - Comma-separated list of scroll IDs to clear if none was specified via the scroll_id parameter + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function clearScrollFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, scroll_id, ...querystring } = params; + scroll_id = parsePathParam(scroll_id); + + const path = ['/_search/scroll/', scroll_id].filter(c => c).join('').replace('//', '/'); + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = clearScrollFunc; diff --git a/api/_core/count.d.ts b/api/_core/count.d.ts new file mode 100644 index 000000000..5a8f8cc16 --- /dev/null +++ b/api/_core/count.d.ts @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common_QueryDsl from '../_types/_common.query_dsl' +import * as Common from '../_types/_common' + +export interface Count_Request extends Global.Params { + allow_no_indices?: boolean; + analyze_wildcard?: boolean; + analyzer?: string; + body?: Count_RequestBody; + default_operator?: Common_QueryDsl.Operator; + df?: string; + expand_wildcards?: Common.ExpandWildcards; + ignore_throttled?: boolean; + ignore_unavailable?: boolean; + index?: Common.Indices; + lenient?: boolean; + min_score?: number; + preference?: string; + q?: string; + routing?: Common.Routing; + terminate_after?: number; +} + +export interface Count_RequestBody { + query?: Common_QueryDsl.QueryContainer; +} + +export interface Count_Response extends ApiResponse { + body: Count_ResponseBody; +} + +export interface Count_ResponseBody { + _shards: Common.ShardStatistics; + count: number; +} + diff --git a/api/_core/count.js b/api/_core/count.js new file mode 100644 index 000000000..1f3f3dea6 --- /dev/null +++ b/api/_core/count.js @@ -0,0 +1,63 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns number of documents matching a query. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/count/ - count} + * + * @memberOf API-Core + * + * @param {object} [params] + * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. + * @param {boolean} [params.analyze_wildcard=false] - If `true`, wildcard and prefix queries are analyzed. This parameter can only be used when the `q` query string parameter is specified. + * @param {string} [params.analyzer] - Analyzer to use for the query string. This parameter can only be used when the `q` query string parameter is specified. + * @param {string} [params.default_operator] - The default operator for query string query: `AND` or `OR`. This parameter can only be used when the `q` query string parameter is specified. + * @param {string} [params.df] - Field to use as default where no field prefix is given in the query string. This parameter can only be used when the `q` query string parameter is specified. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. + * @param {boolean} [params.ignore_throttled] - If `true`, concrete, expanded or aliased indices are ignored when frozen. + * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. + * @param {boolean} [params.lenient] - If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. + * @param {number} [params.min_score] - Sets the minimum `_score` value that documents must have to be included in the result. + * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. + * @param {string} [params.q] - Query in the Lucene query string syntax. + * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {number} [params.terminate_after] - Maximum number of documents to collect for each shard. If a query reaches this limit, OpenSearch terminates the query early. OpenSearch collects documents before sorting. + * @param {string} [params.index] - Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (`*`). To search all data streams and indices, omit this parameter or use `*` or `_all`. + * @param {object} [params.body] - Query to restrict the results specified with the Query DSL (optional) + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function countFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_count'].filter(c => c).join('').replace('//', '/'); + const method = body ? 'POST' : 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = countFunc; diff --git a/api/_core/create.d.ts b/api/_core/create.d.ts new file mode 100644 index 000000000..09507a36c --- /dev/null +++ b/api/_core/create.d.ts @@ -0,0 +1,41 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Create_Request extends Global.Params { + body: Create_RequestBody; + id: Common.Id; + index: Common.IndexName; + pipeline?: string; + refresh?: Common.Refresh; + routing?: Common.Routing; + timeout?: Common.Duration; + version?: Common.VersionNumber; + version_type?: Common.VersionType; + wait_for_active_shards?: Common.WaitForActiveShards; +} + +export type Create_RequestBody = Record + +export interface Create_Response extends ApiResponse { + body: Create_ResponseBody; +} + +export type Create_ResponseBody = Common.WriteResponseBase + diff --git a/api/_core/create.js b/api/_core/create.js new file mode 100644 index 000000000..1cc8d54e8 --- /dev/null +++ b/api/_core/create.js @@ -0,0 +1,62 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Creates a new document in the index. + +Returns a 409 response when a document with a same ID already exists in the index. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/document-apis/index-document/ - create} + * + * @memberOf API-Core + * + * @param {object} params + * @param {string} [params.pipeline] - ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter. + * @param {string} [params.refresh] - If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`. + * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.timeout] - Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. + * @param {number} [params.version] - Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. + * @param {string} [params.version_type] - Specific version type: `external`, `external_gte`. + * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). + * @param {string} params.id - Unique identifier for the document. + * @param {string} params.index - Name of the data stream or index to target. If the target doesn't exist and matches the name or wildcard (`*`) pattern of an index template with a `data_stream` definition, this request creates the data stream. If the target doesn't exist and doesn't match a data stream template, this request creates the index. + * @param {object} params.body - The document + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function createFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, id, index, ...querystring } = params; + id = parsePathParam(id); + index = parsePathParam(index); + + const path = '/' + index + '/_create/' + id; + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = createFunc; diff --git a/api/_core/createPit.d.ts b/api/_core/createPit.d.ts new file mode 100644 index 000000000..7dee1a66f --- /dev/null +++ b/api/_core/createPit.d.ts @@ -0,0 +1,40 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Core_Common from '../_types/_core._common' + +export interface CreatePit_Request extends Global.Params { + allow_partial_pit_creation?: boolean; + expand_wildcards?: Common.ExpandWildcards; + index: string[]; + keep_alive?: Common.Duration; + preference?: string; + routing?: string[]; +} + +export interface CreatePit_Response extends ApiResponse { + body: CreatePit_ResponseBody; +} + +export interface CreatePit_ResponseBody { + _shards?: Core_Common.ShardStatistics; + creation_time?: number; + pit_id?: string; +} + diff --git a/api/_core/createPit.js b/api/_core/createPit.js new file mode 100644 index 000000000..dc671c0bc --- /dev/null +++ b/api/_core/createPit.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Creates point in time context. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/point-in-time-api/#create-a-pit - create_pit} + * + * @memberOf API-Core + * + * @param {object} params + * @param {boolean} [params.allow_partial_pit_creation] - Allow if point in time can be created with partial failures. + * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {string} [params.keep_alive] - Specify the keep alive for point in time. + * @param {string} [params.preference=random] - Specify the node or shard the operation should be performed on. + * @param {array} [params.routing] - Comma-separated list of specific routing values. + * @param {array} params.index - Comma-separated list of indices; use `_all` or empty string to perform the operation on all indices. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function createPitFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = '/' + index + '/_search/point_in_time'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = createPitFunc; diff --git a/api/_core/delete.d.ts b/api/_core/delete.d.ts new file mode 100644 index 000000000..f645cf79a --- /dev/null +++ b/api/_core/delete.d.ts @@ -0,0 +1,39 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Delete_Request extends Global.Params { + id: Common.Id; + if_primary_term?: number; + if_seq_no?: Common.SequenceNumber; + index: Common.IndexName; + refresh?: Common.Refresh; + routing?: Common.Routing; + timeout?: Common.Duration; + version?: Common.VersionNumber; + version_type?: Common.VersionType; + wait_for_active_shards?: Common.WaitForActiveShards; +} + +export interface Delete_Response extends ApiResponse { + body: Delete_ResponseBody; +} + +export type Delete_ResponseBody = Common.WriteResponseBase + diff --git a/api/_core/delete.js b/api/_core/delete.js new file mode 100644 index 000000000..57e36831b --- /dev/null +++ b/api/_core/delete.js @@ -0,0 +1,60 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Removes a document from the index. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/document-apis/delete-document/ - delete} + * + * @memberOf API-Core + * + * @param {object} params + * @param {number} [params.if_primary_term] - Only perform the operation if the document has this primary term. + * @param {number} [params.if_seq_no] - Only perform the operation if the document has this sequence number. + * @param {string} [params.refresh] - If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`. + * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.timeout] - Period to wait for active shards. + * @param {number} [params.version] - Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. + * @param {string} [params.version_type] - Specific version type: `external`, `external_gte`. + * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). + * @param {string} params.id - Unique identifier for the document. + * @param {string} params.index - Name of the target index. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + + let { body, id, index, ...querystring } = params; + id = parsePathParam(id); + index = parsePathParam(index); + + const path = '/' + index + '/_doc/' + id; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteFunc; diff --git a/api/_core/deleteAllPits.d.ts b/api/_core/deleteAllPits.d.ts new file mode 100644 index 000000000..271d8ee2d --- /dev/null +++ b/api/_core/deleteAllPits.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Core_Common from '../_types/_core._common' + +export type DeleteAllPits_Request = Global.Params & Record + +export interface DeleteAllPits_Response extends ApiResponse { + body: DeleteAllPits_ResponseBody; +} + +export interface DeleteAllPits_ResponseBody { + pits?: Core_Common.PitsDetailsDeleteAll[]; +} + diff --git a/api/_core/deleteAllPits.js b/api/_core/deleteAllPits.js new file mode 100644 index 000000000..a02111c40 --- /dev/null +++ b/api/_core/deleteAllPits.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Deletes all active point in time searches. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/point-in-time-api/#delete-pits - delete_all_pits} + * + * @memberOf API-Core + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteAllPitsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_search/point_in_time/_all'; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteAllPitsFunc; diff --git a/api/_core/deleteByQuery.d.ts b/api/_core/deleteByQuery.d.ts new file mode 100644 index 000000000..42ab27676 --- /dev/null +++ b/api/_core/deleteByQuery.d.ts @@ -0,0 +1,88 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Common_QueryDsl from '../_types/_common.query_dsl' + +export interface DeleteByQuery_Request extends Global.Params { + _source?: string[]; + _source_excludes?: string[]; + _source_includes?: string[]; + allow_no_indices?: boolean; + analyze_wildcard?: boolean; + analyzer?: string; + body: DeleteByQuery_RequestBody; + conflicts?: Common.Conflicts; + default_operator?: Common_QueryDsl.Operator; + df?: string; + expand_wildcards?: Common.ExpandWildcards; + from?: number; + ignore_unavailable?: boolean; + index: Common.Indices; + lenient?: boolean; + max_docs?: number; + preference?: string; + q?: string; + refresh?: boolean; + request_cache?: boolean; + requests_per_second?: number; + routing?: Common.Routing; + scroll?: Common.Duration; + scroll_size?: number; + search_timeout?: Common.Duration; + search_type?: Common.SearchType; + size?: number; + slices?: Common.Slices; + sort?: string[]; + stats?: string[]; + terminate_after?: number; + timeout?: Common.Duration; + version?: boolean; + wait_for_active_shards?: Common.WaitForActiveShards; + wait_for_completion?: boolean; +} + +export interface DeleteByQuery_RequestBody { + max_docs?: number; + query?: Common_QueryDsl.QueryContainer; + slice?: Common.SlicedScroll; +} + +export interface DeleteByQuery_Response extends ApiResponse { + body: DeleteByQuery_ResponseBody; +} + +export interface DeleteByQuery_ResponseBody { + batches?: number; + deleted?: number; + failures?: Common.BulkIndexByScrollFailure[]; + noops?: number; + requests_per_second?: number; + retries?: Common.Retries; + slice_id?: number; + task?: Common.TaskId; + throttled?: Common.Duration; + throttled_millis?: Common.DurationValueUnitMillis; + throttled_until?: Common.Duration; + throttled_until_millis?: Common.DurationValueUnitMillis; + timed_out?: boolean; + took?: Common.DurationValueUnitMillis; + total?: number; + version_conflicts?: number; +} + diff --git a/api/_core/deleteByQuery.js b/api/_core/deleteByQuery.js new file mode 100644 index 000000000..5a343dd85 --- /dev/null +++ b/api/_core/deleteByQuery.js @@ -0,0 +1,83 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Deletes documents matching the provided query. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/document-apis/delete-by-query/ - delete_by_query} + * + * @memberOf API-Core + * + * @param {object} params + * @param {array} [params._source] - True or false to return the _source field or not, or a list of fields to return. + * @param {array} [params._source_excludes] - List of fields to exclude from the returned _source field. + * @param {array} [params._source_includes] - List of fields to extract and return from the _source field. + * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. + * @param {boolean} [params.analyze_wildcard=false] - If `true`, wildcard and prefix queries are analyzed. + * @param {string} [params.analyzer] - Analyzer to use for the query string. + * @param {string} [params.conflicts] - What to do if delete by query hits version conflicts: `abort` or `proceed`. + * @param {string} [params.default_operator] - The default operator for query string query: `AND` or `OR`. + * @param {string} [params.df] - Field to use as default where no field prefix is given in the query string. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + * @param {number} [params.from=0] - Starting offset. + * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. + * @param {boolean} [params.lenient] - If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. + * @param {number} [params.max_docs] - Maximum number of documents to process. Defaults to all documents. + * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. + * @param {string} [params.q] - Query in the Lucene query string syntax. + * @param {boolean} [params.refresh] - If `true`, OpenSearch refreshes all shards involved in the delete by query after the request completes. + * @param {boolean} [params.request_cache] - If `true`, the request cache is used for this request. Defaults to the index-level setting. + * @param {number} [params.requests_per_second=0] - The throttle for this request in sub-requests per second. + * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.scroll] - Period to retain the search context for scrolling. + * @param {number} [params.scroll_size=100] - Size of the scroll request that powers the operation. + * @param {string} [params.search_timeout] - Explicit timeout for each search request. Defaults to no timeout. + * @param {string} [params.search_type] - The type of the search operation. Available options: `query_then_fetch`, `dfs_query_then_fetch`. + * @param {integer} [params.size] - Deprecated, please use `max_docs` instead. + * @param {string} [params.slices] - The number of slices this task should be divided into. + * @param {array} [params.sort] - A comma-separated list of : pairs. + * @param {array} [params.stats] - Specific `tag` of the request for logging and statistical purposes. + * @param {number} [params.terminate_after] - Maximum number of documents to collect for each shard. If a query reaches this limit, OpenSearch terminates the query early. OpenSearch collects documents before sorting. Use with caution. OpenSearch applies this parameter to each shard handling the request. When possible, let OpenSearch perform early termination automatically. Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. + * @param {string} [params.timeout] - Period each deletion request waits for active shards. + * @param {boolean} [params.version] - If `true`, returns the document version as part of a hit. + * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). + * @param {boolean} [params.wait_for_completion=true] - If `true`, the request blocks until the operation is complete. + * @param {string} params.index - Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (`*`). To search all data streams or indices, omit this parameter or use `*` or `_all`. + * @param {object} params.body - The search definition using the Query DSL + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteByQueryFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = '/' + index + '/_delete_by_query'; + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteByQueryFunc; diff --git a/api/_core/deleteByQueryRethrottle.d.ts b/api/_core/deleteByQueryRethrottle.d.ts new file mode 100644 index 000000000..8afec3d6c --- /dev/null +++ b/api/_core/deleteByQueryRethrottle.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Tasks_Common from '../_types/tasks._common' + +export interface DeleteByQueryRethrottle_Request extends Global.Params { + requests_per_second?: number; + task_id: Common.TaskId; +} + +export interface DeleteByQueryRethrottle_Response extends ApiResponse { + body: DeleteByQueryRethrottle_ResponseBody; +} + +export type DeleteByQueryRethrottle_ResponseBody = Tasks_Common.TaskListResponseBase + diff --git a/api/_core/deleteByQueryRethrottle.js b/api/_core/deleteByQueryRethrottle.js new file mode 100644 index 000000000..c46fb595b --- /dev/null +++ b/api/_core/deleteByQueryRethrottle.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Changes the number of requests per second for a particular Delete By Query operation. + *
See Also: {@link https://opensearch.org/docs/latest - delete_by_query_rethrottle} + * + * @memberOf API-Core + * + * @param {object} params + * @param {number} [params.requests_per_second] - The throttle for this request in sub-requests per second. + * @param {string} params.task_id - The ID for the task. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteByQueryRethrottleFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.task_id == null) return handleMissingParam('task_id', this, callback); + + let { body, task_id, ...querystring } = params; + task_id = parsePathParam(task_id); + + const path = '/_delete_by_query/' + task_id + '/_rethrottle'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteByQueryRethrottleFunc; diff --git a/api/_core/deletePit.d.ts b/api/_core/deletePit.d.ts new file mode 100644 index 000000000..973c61adb --- /dev/null +++ b/api/_core/deletePit.d.ts @@ -0,0 +1,36 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Core_Common from '../_types/_core._common' + +export interface DeletePit_Request extends Global.Params { + body?: DeletePit_RequestBody; +} + +export interface DeletePit_RequestBody { + pit_id: string[]; +} + +export interface DeletePit_Response extends ApiResponse { + body: DeletePit_ResponseBody; +} + +export interface DeletePit_ResponseBody { + pits?: Core_Common.DeletedPit[]; +} + diff --git a/api/_core/deletePit.js b/api/_core/deletePit.js new file mode 100644 index 000000000..5ecbf67ad --- /dev/null +++ b/api/_core/deletePit.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Deletes one or more point in time searches based on the IDs passed. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/point-in-time-api/#delete-pits - delete_pit} + * + * @memberOf API-Core + * + * @param {object} [params] + * @param {object} [params.body] - The point-in-time ids to be deleted + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deletePitFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_search/point_in_time'; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deletePitFunc; diff --git a/api/_core/deleteScript.d.ts b/api/_core/deleteScript.d.ts new file mode 100644 index 000000000..3c28250f6 --- /dev/null +++ b/api/_core/deleteScript.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface DeleteScript_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + id: Common.Id; + master_timeout?: Common.Duration; + timeout?: Common.Duration; +} + +export interface DeleteScript_Response extends ApiResponse { + body: DeleteScript_ResponseBody; +} + +export type DeleteScript_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/_core/deleteScript.js b/api/_core/deleteScript.js new file mode 100644 index 000000000..537b204bf --- /dev/null +++ b/api/_core/deleteScript.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Deletes a script. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/script-apis/delete-script/ - delete_script} + * + * @memberOf API-Core + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {string} params.id - Identifier for the stored script or search template. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteScriptFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + + let { body, id, ...querystring } = params; + id = parsePathParam(id); + + const path = '/_scripts/' + id; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteScriptFunc; diff --git a/api/_core/exists.d.ts b/api/_core/exists.d.ts new file mode 100644 index 000000000..2f3e8c59e --- /dev/null +++ b/api/_core/exists.d.ts @@ -0,0 +1,42 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Core_Search from '../_types/_core.search' +import * as Common from '../_types/_common' + +export interface Exists_Request extends Global.Params { + _source?: Core_Search.SourceConfigParam; + _source_excludes?: Common.Fields; + _source_includes?: Common.Fields; + id: Common.Id; + index: Common.IndexName; + preference?: string; + realtime?: boolean; + refresh?: boolean; + routing?: Common.Routing; + stored_fields?: Common.Fields; + version?: Common.VersionNumber; + version_type?: Common.VersionType; +} + +export interface Exists_Response extends ApiResponse { + body: Exists_ResponseBody; +} + +export type Exists_ResponseBody = Record + diff --git a/api/_core/exists.js b/api/_core/exists.js new file mode 100644 index 000000000..50ade1aca --- /dev/null +++ b/api/_core/exists.js @@ -0,0 +1,62 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Returns information about whether a document exists in an index. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/document-apis/get-documents/ - exists} + * + * @memberOf API-Core + * + * @param {object} params + * @param {string} [params._source] - `true` or `false` to return the `_source` field or not, or a list of fields to return. + * @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude in the response. + * @param {string} [params._source_includes] - A comma-separated list of source fields to include in the response. + * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. + * @param {boolean} [params.realtime] - If `true`, the request is real-time as opposed to near-real-time. + * @param {boolean} [params.refresh] - If `true`, OpenSearch refreshes all shards involved in the delete by query after the request completes. + * @param {string} [params.routing] - Target the specified primary shard. + * @param {string} [params.stored_fields] - List of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the `_source` parameter defaults to false. + * @param {number} [params.version] - Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. + * @param {string} [params.version_type] - Specific version type: `external`, `external_gte`. + * @param {string} params.id - Identifier of the document. + * @param {string} params.index - Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`). + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function existsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + + let { body, id, index, ...querystring } = params; + id = parsePathParam(id); + index = parsePathParam(index); + + const path = '/' + index + '/_doc/' + id; + const method = 'HEAD'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = existsFunc; diff --git a/api/_core/existsSource.d.ts b/api/_core/existsSource.d.ts new file mode 100644 index 000000000..94c73664e --- /dev/null +++ b/api/_core/existsSource.d.ts @@ -0,0 +1,41 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Core_Search from '../_types/_core.search' +import * as Common from '../_types/_common' + +export interface ExistsSource_Request extends Global.Params { + _source?: Core_Search.SourceConfigParam; + _source_excludes?: Common.Fields; + _source_includes?: Common.Fields; + id: Common.Id; + index: Common.IndexName; + preference?: string; + realtime?: boolean; + refresh?: boolean; + routing?: Common.Routing; + version?: Common.VersionNumber; + version_type?: Common.VersionType; +} + +export interface ExistsSource_Response extends ApiResponse { + body: ExistsSource_ResponseBody; +} + +export type ExistsSource_ResponseBody = Record + diff --git a/api/_core/existsSource.js b/api/_core/existsSource.js new file mode 100644 index 000000000..307f1d22d --- /dev/null +++ b/api/_core/existsSource.js @@ -0,0 +1,61 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Returns information about whether a document source exists in an index. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/document-apis/get-documents/ - exists_source} + * + * @memberOf API-Core + * + * @param {object} params + * @param {string} [params._source] - `true` or `false` to return the `_source` field or not, or a list of fields to return. + * @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude in the response. + * @param {string} [params._source_includes] - A comma-separated list of source fields to include in the response. + * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. + * @param {boolean} [params.realtime] - If true, the request is real-time as opposed to near-real-time. + * @param {boolean} [params.refresh] - If `true`, OpenSearch refreshes all shards involved in the delete by query after the request completes. + * @param {string} [params.routing] - Target the specified primary shard. + * @param {number} [params.version] - Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. + * @param {string} [params.version_type] - Specific version type: `external`, `external_gte`. + * @param {string} params.id - Identifier of the document. + * @param {string} params.index - Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`). + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function existsSourceFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + + let { body, id, index, ...querystring } = params; + id = parsePathParam(id); + index = parsePathParam(index); + + const path = '/' + index + '/_source/' + id; + const method = 'HEAD'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = existsSourceFunc; diff --git a/api/_core/explain.d.ts b/api/_core/explain.d.ts new file mode 100644 index 000000000..e7117aa5f --- /dev/null +++ b/api/_core/explain.d.ts @@ -0,0 +1,57 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Core_Search from '../_types/_core.search' +import * as Common from '../_types/_common' +import * as Common_QueryDsl from '../_types/_common.query_dsl' +import * as Core_Explain from '../_types/_core.explain' + +export interface Explain_Request extends Global.Params { + _source?: Core_Search.SourceConfigParam; + _source_excludes?: Common.Fields; + _source_includes?: Common.Fields; + analyze_wildcard?: boolean; + analyzer?: string; + body?: Explain_RequestBody; + default_operator?: Common_QueryDsl.Operator; + df?: string; + id: Common.Id; + index: Common.IndexName; + lenient?: boolean; + preference?: string; + q?: string; + routing?: Common.Routing; + stored_fields?: Common.Fields; +} + +export interface Explain_RequestBody { + query?: Common_QueryDsl.QueryContainer; +} + +export interface Explain_Response extends ApiResponse { + body: Explain_ResponseBody; +} + +export interface Explain_ResponseBody { + _id: Common.Id; + _index: Common.IndexName; + explanation?: Core_Explain.ExplanationDetail; + get?: Common.InlineGet; + matched: boolean; +} + diff --git a/api/_core/explain.js b/api/_core/explain.js new file mode 100644 index 000000000..a52503559 --- /dev/null +++ b/api/_core/explain.js @@ -0,0 +1,65 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Returns information about why a specific matches (or doesn't match) a query. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/explain/ - explain} + * + * @memberOf API-Core + * + * @param {object} params + * @param {string} [params._source] - True or false to return the `_source` field or not, or a list of fields to return. + * @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude from the response. + * @param {string} [params._source_includes] - A comma-separated list of source fields to include in the response. + * @param {boolean} [params.analyze_wildcard=false] - If `true`, wildcard and prefix queries are analyzed. + * @param {string} [params.analyzer] - Analyzer to use for the query string. This parameter can only be used when the `q` query string parameter is specified. + * @param {string} [params.default_operator] - The default operator for query string query: `AND` or `OR`. + * @param {string} [params.df=_all] - Field to use as default where no field prefix is given in the query string. + * @param {boolean} [params.lenient] - If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. + * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. + * @param {string} [params.q] - Query in the Lucene query string syntax. + * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.stored_fields] - A comma-separated list of stored fields to return in the response. + * @param {string} params.id - Defines the document ID. + * @param {string} params.index - Index names used to limit the request. Only a single index name can be provided to this parameter. + * @param {object} [params.body] - The query definition using the Query DSL + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function explainFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + + let { body, id, index, ...querystring } = params; + id = parsePathParam(id); + index = parsePathParam(index); + + const path = '/' + index + '/_explain/' + id; + const method = body ? 'POST' : 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = explainFunc; diff --git a/api/_core/fieldCaps.d.ts b/api/_core/fieldCaps.d.ts new file mode 100644 index 000000000..b8919816d --- /dev/null +++ b/api/_core/fieldCaps.d.ts @@ -0,0 +1,48 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Common_QueryDsl from '../_types/_common.query_dsl' +import * as Common_Mapping from '../_types/_common.mapping' +import * as Core_FieldCaps from '../_types/_core.field_caps' + +export interface FieldCaps_Request extends Global.Params { + allow_no_indices?: boolean; + body?: FieldCaps_RequestBody; + expand_wildcards?: Common.ExpandWildcards; + fields?: Common.Fields; + ignore_unavailable?: boolean; + include_unmapped?: boolean; + index?: Common.Indices; +} + +export interface FieldCaps_RequestBody { + fields?: Common.Fields; + index_filter?: Common_QueryDsl.QueryContainer; + runtime_mappings?: Common_Mapping.RuntimeFields; +} + +export interface FieldCaps_Response extends ApiResponse { + body: FieldCaps_ResponseBody; +} + +export interface FieldCaps_ResponseBody { + fields: Record>; + indices: Common.Indices; +} + diff --git a/api/_core/fieldCaps.js b/api/_core/fieldCaps.js new file mode 100644 index 000000000..b297617de --- /dev/null +++ b/api/_core/fieldCaps.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns the information about the capabilities of fields among multiple indices. + *
See Also: {@link https://opensearch.org/docs/latest/field-types/supported-field-types/alias/#using-aliases-in-field-capabilities-api-operations - field_caps} + * + * @memberOf API-Core + * + * @param {object} [params] + * @param {boolean} [params.allow_no_indices] - If false, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with foo but no index starts with bar. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. + * @param {string} [params.fields] - Comma-separated list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported. + * @param {boolean} [params.ignore_unavailable] - If `true`, missing or closed indices are not included in the response. + * @param {boolean} [params.include_unmapped=false] - If true, unmapped fields are included in the response. + * @param {string} [params.index] - Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indices, omit this parameter or use * or _all. + * @param {object} [params.body] - An index filter specified with the Query DSL + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function fieldCapsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_field_caps'].filter(c => c).join('').replace('//', '/'); + const method = body ? 'POST' : 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = fieldCapsFunc; diff --git a/api/_core/get.d.ts b/api/_core/get.d.ts new file mode 100644 index 000000000..0693d0d9d --- /dev/null +++ b/api/_core/get.d.ts @@ -0,0 +1,43 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Core_Search from '../_types/_core.search' +import * as Common from '../_types/_common' +import * as Core_Get from '../_types/_core.get' + +export interface Get_Request extends Global.Params { + _source?: Core_Search.SourceConfigParam; + _source_excludes?: Common.Fields; + _source_includes?: Common.Fields; + id: Common.Id; + index: Common.IndexName; + preference?: string; + realtime?: boolean; + refresh?: boolean; + routing?: Common.Routing; + stored_fields?: Common.Fields; + version?: Common.VersionNumber; + version_type?: Common.VersionType; +} + +export interface Get_Response extends ApiResponse { + body: Get_ResponseBody; +} + +export type Get_ResponseBody = Core_Get.GetResult + diff --git a/api/_core/get.js b/api/_core/get.js new file mode 100644 index 000000000..190364e60 --- /dev/null +++ b/api/_core/get.js @@ -0,0 +1,62 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Returns a document. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/document-apis/get-documents/ - get} + * + * @memberOf API-Core + * + * @param {object} params + * @param {string} [params._source] - True or false to return the _source field or not, or a list of fields to return. + * @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude in the response. + * @param {string} [params._source_includes] - A comma-separated list of source fields to include in the response. + * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. + * @param {boolean} [params.realtime] - If `true`, the request is real-time as opposed to near-real-time. + * @param {boolean} [params.refresh] - If true, OpenSearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes. + * @param {string} [params.routing] - Target the specified primary shard. + * @param {string} [params.stored_fields] - List of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the `_source` parameter defaults to false. + * @param {number} [params.version] - Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. + * @param {string} [params.version_type] - Specific version type: internal, external, external_gte. + * @param {string} params.id - Unique identifier of the document. + * @param {string} params.index - Name of the index that contains the document. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + + let { body, id, index, ...querystring } = params; + id = parsePathParam(id); + index = parsePathParam(index); + + const path = '/' + index + '/_doc/' + id; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getFunc; diff --git a/api/_core/getAllPits.d.ts b/api/_core/getAllPits.d.ts new file mode 100644 index 000000000..7040ff7dd --- /dev/null +++ b/api/_core/getAllPits.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Core_Common from '../_types/_core._common' + +export type GetAllPits_Request = Global.Params & Record + +export interface GetAllPits_Response extends ApiResponse { + body: GetAllPits_ResponseBody; +} + +export interface GetAllPits_ResponseBody { + pits?: Core_Common.PitDetail[]; +} + diff --git a/api/_core/getAllPits.js b/api/_core/getAllPits.js new file mode 100644 index 000000000..39d7a10ca --- /dev/null +++ b/api/_core/getAllPits.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Lists all active point in time searches. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/point-in-time-api/#list-all-pits - get_all_pits} + * + * @memberOf API-Core + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getAllPitsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_search/point_in_time/_all'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getAllPitsFunc; diff --git a/api/_core/getScript.d.ts b/api/_core/getScript.d.ts new file mode 100644 index 000000000..3cc41db19 --- /dev/null +++ b/api/_core/getScript.d.ts @@ -0,0 +1,36 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface GetScript_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + id: Common.Id; + master_timeout?: Common.Duration; +} + +export interface GetScript_Response extends ApiResponse { + body: GetScript_ResponseBody; +} + +export interface GetScript_ResponseBody { + _id: Common.Id; + found: boolean; + script?: Common.StoredScript; +} + diff --git a/api/_core/getScript.js b/api/_core/getScript.js new file mode 100644 index 000000000..9e9f2db42 --- /dev/null +++ b/api/_core/getScript.js @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Returns a script. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/script-apis/get-stored-script/ - get_script} + * + * @memberOf API-Core + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Specify timeout for connection to master + * @param {string} params.id - Identifier for the stored script or search template. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getScriptFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + + let { body, id, ...querystring } = params; + id = parsePathParam(id); + + const path = '/_scripts/' + id; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getScriptFunc; diff --git a/api/_core/getScriptContext.d.ts b/api/_core/getScriptContext.d.ts new file mode 100644 index 000000000..0ca9318b0 --- /dev/null +++ b/api/_core/getScriptContext.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Core_GetScriptContext from '../_types/_core.get_script_context' + +export type GetScriptContext_Request = Global.Params & Record + +export interface GetScriptContext_Response extends ApiResponse { + body: GetScriptContext_ResponseBody; +} + +export interface GetScriptContext_ResponseBody { + contexts: Core_GetScriptContext.Context[]; +} + diff --git a/api/_core/getScriptContext.js b/api/_core/getScriptContext.js new file mode 100644 index 000000000..77df7d364 --- /dev/null +++ b/api/_core/getScriptContext.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns all script contexts. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/script-apis/get-script-contexts/ - get_script_context} + * + * @memberOf API-Core + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getScriptContextFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_script_context'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getScriptContextFunc; diff --git a/api/_core/getScriptLanguages.d.ts b/api/_core/getScriptLanguages.d.ts new file mode 100644 index 000000000..2e11a1a14 --- /dev/null +++ b/api/_core/getScriptLanguages.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Core_GetScriptLanguages from '../_types/_core.get_script_languages' + +export type GetScriptLanguages_Request = Global.Params & Record + +export interface GetScriptLanguages_Response extends ApiResponse { + body: GetScriptLanguages_ResponseBody; +} + +export interface GetScriptLanguages_ResponseBody { + language_contexts: Core_GetScriptLanguages.LanguageContext[]; + types_allowed: string[]; +} + diff --git a/api/_core/getScriptLanguages.js b/api/_core/getScriptLanguages.js new file mode 100644 index 000000000..49872bbc3 --- /dev/null +++ b/api/_core/getScriptLanguages.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns available script types, languages and contexts. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/script-apis/get-script-language/ - get_script_languages} + * + * @memberOf API-Core + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getScriptLanguagesFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_script_language'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getScriptLanguagesFunc; diff --git a/api/_core/getSource.d.ts b/api/_core/getSource.d.ts new file mode 100644 index 000000000..77573b3e5 --- /dev/null +++ b/api/_core/getSource.d.ts @@ -0,0 +1,41 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Core_Search from '../_types/_core.search' +import * as Common from '../_types/_common' + +export interface GetSource_Request extends Global.Params { + _source?: Core_Search.SourceConfigParam; + _source_excludes?: Common.Fields; + _source_includes?: Common.Fields; + id: Common.Id; + index: Common.IndexName; + preference?: string; + realtime?: boolean; + refresh?: boolean; + routing?: Common.Routing; + version?: Common.VersionNumber; + version_type?: Common.VersionType; +} + +export interface GetSource_Response extends ApiResponse { + body: GetSource_ResponseBody; +} + +export type GetSource_ResponseBody = Record + diff --git a/api/_core/getSource.js b/api/_core/getSource.js new file mode 100644 index 000000000..2c490a7d4 --- /dev/null +++ b/api/_core/getSource.js @@ -0,0 +1,61 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Returns the source of a document. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/document-apis/get-documents/ - get_source} + * + * @memberOf API-Core + * + * @param {object} params + * @param {string} [params._source] - True or false to return the _source field or not, or a list of fields to return. + * @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude in the response. + * @param {string} [params._source_includes] - A comma-separated list of source fields to include in the response. + * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. + * @param {boolean} [params.realtime] - Boolean) If true, the request is real-time as opposed to near-real-time. + * @param {boolean} [params.refresh] - If true, OpenSearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes. + * @param {string} [params.routing] - Target the specified primary shard. + * @param {number} [params.version] - Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. + * @param {string} [params.version_type] - Specific version type: internal, external, external_gte. + * @param {string} params.id - Unique identifier of the document. + * @param {string} params.index - Name of the index that contains the document. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getSourceFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + + let { body, id, index, ...querystring } = params; + id = parsePathParam(id); + index = parsePathParam(index); + + const path = '/' + index + '/_source/' + id; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getSourceFunc; diff --git a/api/_core/index.d.ts b/api/_core/index.d.ts new file mode 100644 index 000000000..c6f2493ce --- /dev/null +++ b/api/_core/index.d.ts @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Index_Request extends Global.Params { + body: Index_RequestBody; + id?: Common.Id; + if_primary_term?: number; + if_seq_no?: Common.SequenceNumber; + index: Common.IndexName; + op_type?: Common.OpType; + pipeline?: string; + refresh?: Common.Refresh; + require_alias?: boolean; + routing?: Common.Routing; + timeout?: Common.Duration; + version?: Common.VersionNumber; + version_type?: Common.VersionType; + wait_for_active_shards?: Common.WaitForActiveShards; +} + +export type Index_RequestBody = Record + +export interface Index_Response extends ApiResponse { + body: Index_ResponseBody; +} + +export type Index_ResponseBody = Common.WriteResponseBase + diff --git a/api/_core/index.js b/api/_core/index.js new file mode 100644 index 000000000..a193019c1 --- /dev/null +++ b/api/_core/index.js @@ -0,0 +1,63 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Creates or updates a document in an index. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/document-apis/index-document/ - index} + * + * @memberOf API-Core + * + * @param {object} params + * @param {number} [params.if_primary_term] - Only perform the operation if the document has this primary term. + * @param {number} [params.if_seq_no] - Only perform the operation if the document has this sequence number. + * @param {string} [params.op_type] - Set to create to only index the document if it does not already exist (put if absent). If a document with the specified `_id` already exists, the indexing operation will fail. Same as using the `/_create` endpoint. Valid values: `index`, `create`. If document id is specified, it defaults to `index`. Otherwise, it defaults to `create`. + * @param {string} [params.pipeline] - ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter. + * @param {string} [params.refresh] - If `true`, OpenSearch refreshes the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` do nothing with refreshes. Valid values: `true`, `false`, `wait_for`. + * @param {boolean} [params.require_alias=false] - If `true`, the destination must be an index alias. + * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.timeout] - Period the request waits for the following operations: automatic index creation, dynamic mapping updates, waiting for active shards. + * @param {number} [params.version] - Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed. + * @param {string} [params.version_type] - Specific version type: `external`, `external_gte`. + * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). + * @param {string} params.index - Name of the data stream or index to target. + * @param {string} [params.id] - Unique identifier for the document. + * @param {object} params.body - The document + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function indexFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, index, id, ...querystring } = params; + index = parsePathParam(index); + id = parsePathParam(id); + + const path = ['/', index, '/_doc/', id].filter(c => c).join('').replace('//', '/'); + const method = id == null ? 'POST' : 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = indexFunc; diff --git a/api/_core/info.d.ts b/api/_core/info.d.ts new file mode 100644 index 000000000..b2d26e5ea --- /dev/null +++ b/api/_core/info.d.ts @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export type Info_Request = Global.Params & Record + +export interface Info_Response extends ApiResponse { + body: Info_ResponseBody; +} + +export interface Info_ResponseBody { + cluster_name: Common.Name; + cluster_uuid: Common.Uuid; + name: Common.Name; + tagline: string; + version: Common.OpenSearchVersionInfo; +} + diff --git a/api/_core/info.js b/api/_core/info.js new file mode 100644 index 000000000..81f460a97 --- /dev/null +++ b/api/_core/info.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns basic information about the cluster. + *
See Also: {@link https://opensearch.org/docs/latest - info} + * + * @memberOf API-Core + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function infoFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = infoFunc; diff --git a/api/_core/mget.d.ts b/api/_core/mget.d.ts new file mode 100644 index 000000000..ebc0fc65f --- /dev/null +++ b/api/_core/mget.d.ts @@ -0,0 +1,48 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Core_Search from '../_types/_core.search' +import * as Common from '../_types/_common' +import * as Core_Mget from '../_types/_core.mget' + +export interface Mget_Request extends Global.Params { + _source?: Core_Search.SourceConfigParam; + _source_excludes?: Common.Fields; + _source_includes?: Common.Fields; + body: Mget_RequestBody; + index?: Common.IndexName; + preference?: string; + realtime?: boolean; + refresh?: boolean; + routing?: Common.Routing; + stored_fields?: Common.Fields; +} + +export interface Mget_RequestBody { + docs?: Core_Mget.Operation[]; + ids?: Common.Ids; +} + +export interface Mget_Response extends ApiResponse { + body: Mget_ResponseBody; +} + +export interface Mget_ResponseBody { + docs: Core_Mget.ResponseItem[]; +} + diff --git a/api/_core/mget.js b/api/_core/mget.js new file mode 100644 index 000000000..2cd3ddfb2 --- /dev/null +++ b/api/_core/mget.js @@ -0,0 +1,57 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Allows to get multiple documents in one request. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/document-apis/multi-get/ - mget} + * + * @memberOf API-Core + * + * @param {object} params + * @param {string} [params._source] - True or false to return the `_source` field or not, or a list of fields to return. + * @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude from the response. You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter. + * @param {string} [params._source_includes] - A comma-separated list of source fields to include in the response. If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter. If the `_source` parameter is `false`, this parameter is ignored. + * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. + * @param {boolean} [params.realtime] - If `true`, the request is real-time as opposed to near-real-time. + * @param {boolean} [params.refresh] - If `true`, the request refreshes relevant shards before retrieving documents. + * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.stored_fields] - If `true`, retrieves the document fields stored in the index rather than the document `_source`. + * @param {string} [params.index] - Name of the index to retrieve documents from when `ids` are specified, or when a document in the `docs` array does not specify an index. + * @param {object} params.body - Document identifiers; can be either `docs` (containing full document information) or `ids` (when index is provided in the URL. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function mgetFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_mget'].filter(c => c).join('').replace('//', '/'); + const method = body ? 'POST' : 'GET'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = mgetFunc; diff --git a/api/_core/msearch.d.ts b/api/_core/msearch.d.ts new file mode 100644 index 000000000..7e88423fc --- /dev/null +++ b/api/_core/msearch.d.ts @@ -0,0 +1,41 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Core_Msearch from '../_types/_core.msearch' + +export interface Msearch_Request extends Global.Params { + body: Msearch_RequestBody; + ccs_minimize_roundtrips?: boolean; + index?: Common.Indices; + max_concurrent_searches?: number; + max_concurrent_shard_requests?: number; + pre_filter_shard_size?: number; + rest_total_hits_as_int?: boolean; + search_type?: Common.SearchType; + typed_keys?: boolean; +} + +export type Msearch_RequestBody = Core_Msearch.RequestItem[] + +export interface Msearch_Response extends ApiResponse { + body: Msearch_ResponseBody; +} + +export type Msearch_ResponseBody = Core_Msearch.MultiSearchResult + diff --git a/api/_core/msearch.js b/api/_core/msearch.js new file mode 100644 index 000000000..28283b223 --- /dev/null +++ b/api/_core/msearch.js @@ -0,0 +1,56 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Allows to execute several search operations in one request. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/multi-search/ - msearch} + * + * @memberOf API-Core + * + * @param {object} params + * @param {boolean} [params.ccs_minimize_roundtrips=true] - If true, network roundtrips between the coordinating node and remote clusters are minimized for cross-cluster search requests. + * @param {number} [params.max_concurrent_searches] - Maximum number of concurrent searches the multi search API can execute. + * @param {number} [params.max_concurrent_shard_requests=5] - Maximum number of concurrent shard requests that each sub-search request executes per node. + * @param {number} [params.pre_filter_shard_size] - Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint. + * @param {boolean} [params.rest_total_hits_as_int=false] - If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object. + * @param {string} [params.search_type] - Indicates whether global term and document frequencies should be used when scoring returned documents. + * @param {boolean} [params.typed_keys] - Specifies whether aggregation and suggester names should be prefixed by their respective types in the response. + * @param {string} [params.index] - Comma-separated list of data streams, indices, and index aliases to search. + * @param {array} params.body - The request definitions (metadata-search request definition pairs), separated by newlines + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function msearchFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_msearch'].filter(c => c).join('').replace('//', '/'); + const method = body ? 'POST' : 'GET'; + + return this.transport.request({ method, path, querystring, bulkBody: body }, options, callback); +} + +module.exports = msearchFunc; diff --git a/api/_core/msearchTemplate.d.ts b/api/_core/msearchTemplate.d.ts new file mode 100644 index 000000000..eed44c15c --- /dev/null +++ b/api/_core/msearchTemplate.d.ts @@ -0,0 +1,40 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Core_MsearchTemplate from '../_types/_core.msearch_template' +import * as Core_Msearch from '../_types/_core.msearch' + +export interface MsearchTemplate_Request extends Global.Params { + body: MsearchTemplate_RequestBody; + ccs_minimize_roundtrips?: boolean; + index?: Common.Indices; + max_concurrent_searches?: number; + rest_total_hits_as_int?: boolean; + search_type?: Common.SearchType; + typed_keys?: boolean; +} + +export type MsearchTemplate_RequestBody = Core_MsearchTemplate.RequestItem[] + +export interface MsearchTemplate_Response extends ApiResponse { + body: MsearchTemplate_ResponseBody; +} + +export type MsearchTemplate_ResponseBody = Core_Msearch.MultiSearchResult + diff --git a/api/_core/msearchTemplate.js b/api/_core/msearchTemplate.js new file mode 100644 index 000000000..ea0596db0 --- /dev/null +++ b/api/_core/msearchTemplate.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Allows to execute several search template operations in one request. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/search-template/ - msearch_template} + * + * @memberOf API-Core + * + * @param {object} params + * @param {boolean} [params.ccs_minimize_roundtrips=true] - If `true`, network round-trips are minimized for cross-cluster search requests. + * @param {number} [params.max_concurrent_searches] - Maximum number of concurrent searches the API can run. + * @param {boolean} [params.rest_total_hits_as_int=false] - If `true`, the response returns `hits.total` as an integer. If `false`, it returns `hits.total` as an object. + * @param {string} [params.search_type] - The type of the search operation. Available options: `query_then_fetch`, `dfs_query_then_fetch`. + * @param {boolean} [params.typed_keys] - If `true`, the response prefixes aggregation and suggester names with their respective types. + * @param {string} [params.index] - Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (`*`). To search all data streams and indices, omit this parameter or use `*`. + * @param {array} params.body - The request definitions (metadata-search request definition pairs), separated by newlines + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function msearchTemplateFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_msearch/template'].filter(c => c).join('').replace('//', '/'); + const method = body ? 'POST' : 'GET'; + + return this.transport.request({ method, path, querystring, bulkBody: body }, options, callback); +} + +module.exports = msearchTemplateFunc; diff --git a/api/_core/mtermvectors.d.ts b/api/_core/mtermvectors.d.ts new file mode 100644 index 000000000..e6803a950 --- /dev/null +++ b/api/_core/mtermvectors.d.ts @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Core_Mtermvectors from '../_types/_core.mtermvectors' + +export interface Mtermvectors_Request extends Global.Params { + body?: Mtermvectors_RequestBody; + field_statistics?: boolean; + fields?: Common.Fields; + ids?: Common.Id[]; + index?: Common.IndexName; + offsets?: boolean; + payloads?: boolean; + positions?: boolean; + preference?: string; + realtime?: boolean; + routing?: Common.Routing; + term_statistics?: boolean; + version?: Common.VersionNumber; + version_type?: Common.VersionType; +} + +export interface Mtermvectors_RequestBody { + docs?: Core_Mtermvectors.Operation[]; + ids?: Common.Id[]; +} + +export interface Mtermvectors_Response extends ApiResponse { + body: Mtermvectors_ResponseBody; +} + +export interface Mtermvectors_ResponseBody { + docs: Core_Mtermvectors.TermVectorsResult[]; +} + diff --git a/api/_core/mtermvectors.js b/api/_core/mtermvectors.js new file mode 100644 index 000000000..33c8db0e7 --- /dev/null +++ b/api/_core/mtermvectors.js @@ -0,0 +1,61 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns multiple termvectors in one request. + *
See Also: {@link https://opensearch.org/docs/latest - mtermvectors} + * + * @memberOf API-Core + * + * @param {object} [params] + * @param {boolean} [params.field_statistics=true] - If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies. + * @param {string} [params.fields] - Comma-separated list or wildcard expressions of fields to include in the statistics. Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters. + * @param {array} [params.ids] - A comma-separated list of documents ids. You must define ids as parameter or set "ids" or "docs" in the request body + * @param {boolean} [params.offsets=true] - If `true`, the response includes term offsets. + * @param {boolean} [params.payloads=true] - If `true`, the response includes term payloads. + * @param {boolean} [params.positions=true] - If `true`, the response includes term positions. + * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. + * @param {boolean} [params.realtime=true] - If true, the request is real-time as opposed to near-real-time. + * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {boolean} [params.term_statistics=false] - If true, the response includes term frequency and document frequency. + * @param {number} [params.version] - If `true`, returns the document version as part of a hit. + * @param {string} [params.version_type] - Specific version type. + * @param {string} [params.index] - Name of the index that contains the documents. + * @param {object} [params.body] - Define ids, documents, parameters or a list of parameters per document here. You must at least provide a list of document ids. See documentation. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function mtermvectorsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_mtermvectors'].filter(c => c).join('').replace('//', '/'); + const method = body ? 'POST' : 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = mtermvectorsFunc; diff --git a/api/_core/ping.d.ts b/api/_core/ping.d.ts new file mode 100644 index 000000000..821efdce7 --- /dev/null +++ b/api/_core/ping.d.ts @@ -0,0 +1,27 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export type Ping_Request = Global.Params & Record + +export interface Ping_Response extends ApiResponse { + body: Ping_ResponseBody; +} + +export type Ping_ResponseBody = Record + diff --git a/api/_core/ping.js b/api/_core/ping.js new file mode 100644 index 000000000..93cb5f38d --- /dev/null +++ b/api/_core/ping.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns whether the cluster is running. + *
See Also: {@link https://opensearch.org/docs/latest - ping} + * + * @memberOf API-Core + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function pingFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/'; + const method = 'HEAD'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = pingFunc; diff --git a/api/_core/putScript.d.ts b/api/_core/putScript.d.ts new file mode 100644 index 000000000..deb7751a2 --- /dev/null +++ b/api/_core/putScript.d.ts @@ -0,0 +1,39 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface PutScript_Request extends Global.Params { + body: PutScript_RequestBody; + cluster_manager_timeout?: Common.Duration; + context?: Common.Name; + id: Common.Id; + master_timeout?: Common.Duration; + timeout?: Common.Duration; +} + +export interface PutScript_RequestBody { + script: Common.StoredScript; +} + +export interface PutScript_Response extends ApiResponse { + body: PutScript_ResponseBody; +} + +export type PutScript_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/_core/putScript.js b/api/_core/putScript.js new file mode 100644 index 000000000..d637baa04 --- /dev/null +++ b/api/_core/putScript.js @@ -0,0 +1,55 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Creates or updates a script. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/script-apis/create-stored-script/ - put_script} + * + * @memberOf API-Core + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {string} params.id - Identifier for the stored script or search template. Must be unique within the cluster. + * @param {string} [params.context] - Context in which the script or search template should run. To prevent errors, the API immediately compiles the script or template in this context. + * @param {object} params.body - The document + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function putScriptFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, id, context, ...querystring } = params; + id = parsePathParam(id); + context = parsePathParam(context); + + const path = ['/_scripts/', id, '/', context].filter(c => c).join('').replace('//', '/'); + const method = context == null ? 'POST' : 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = putScriptFunc; diff --git a/api/_core/rankEval.d.ts b/api/_core/rankEval.d.ts new file mode 100644 index 000000000..108e9e6b3 --- /dev/null +++ b/api/_core/rankEval.d.ts @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Core_RankEval from '../_types/_core.rank_eval' + +export interface RankEval_Request extends Global.Params { + allow_no_indices?: boolean; + body: RankEval_RequestBody; + expand_wildcards?: Common.ExpandWildcards; + ignore_unavailable?: boolean; + index?: Common.Indices; + search_type?: string; +} + +export interface RankEval_RequestBody { + metric?: Core_RankEval.RankEvalMetric; + requests: Core_RankEval.RankEvalRequestItem[]; +} + +export interface RankEval_Response extends ApiResponse { + body: RankEval_ResponseBody; +} + +export interface RankEval_ResponseBody { + details: Record; + failures: Record>; + metric_score: number; +} + diff --git a/api/_core/rankEval.js b/api/_core/rankEval.js new file mode 100644 index 000000000..6dc692503 --- /dev/null +++ b/api/_core/rankEval.js @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Allows to evaluate the quality of ranked search results over a set of typical search queries. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/rank-eval/ - rank_eval} + * + * @memberOf API-Core + * + * @param {object} params + * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. + * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {boolean} [params.ignore_unavailable] - If `true`, missing or closed indices are not included in the response. + * @param {string} [params.search_type] - Search operation type + * @param {string} [params.index] - Comma-separated list of data streams, indices, and index aliases used to limit the request. Wildcard (`*`) expressions are supported. To target all data streams and indices in a cluster, omit this parameter or use `_all` or `*`. + * @param {object} params.body - The ranking evaluation search definition, including search requests, document ratings and ranking metric definition. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function rankEvalFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_rank_eval'].filter(c => c).join('').replace('//', '/'); + const method = body ? 'POST' : 'GET'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = rankEvalFunc; diff --git a/api/_core/reindex.d.ts b/api/_core/reindex.d.ts new file mode 100644 index 000000000..57c506c69 --- /dev/null +++ b/api/_core/reindex.d.ts @@ -0,0 +1,65 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Core_Reindex from '../_types/_core.reindex' + +export interface Reindex_Request extends Global.Params { + body: Reindex_RequestBody; + max_docs?: number; + refresh?: boolean; + requests_per_second?: number; + scroll?: Common.Duration; + slices?: Common.Slices; + timeout?: Common.Duration; + wait_for_active_shards?: Common.WaitForActiveShards; + wait_for_completion?: boolean; +} + +export interface Reindex_RequestBody { + conflicts?: Common.Conflicts; + dest: Core_Reindex.Destination; + max_docs?: number; + script?: Common.Script; + size?: number; + source: Core_Reindex.Source; +} + +export interface Reindex_Response extends ApiResponse { + body: Reindex_ResponseBody; +} + +export interface Reindex_ResponseBody { + batches?: number; + created?: number; + deleted?: number; + failures?: Common.BulkIndexByScrollFailure[]; + noops?: number; + requests_per_second?: number; + retries?: Common.Retries; + slice_id?: number; + task?: Common.TaskId; + throttled_millis?: Common.EpochTimeUnitMillis; + throttled_until_millis?: Common.EpochTimeUnitMillis; + timed_out?: boolean; + took?: Common.DurationValueUnitMillis; + total?: number; + updated?: number; + version_conflicts?: number; +} + diff --git a/api/_core/reindex.js b/api/_core/reindex.js new file mode 100644 index 000000000..ac87022d9 --- /dev/null +++ b/api/_core/reindex.js @@ -0,0 +1,57 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Allows to copy documents from one index to another, optionally filtering the source +documents by a query, changing the destination index settings, or fetching the +documents from a remote cluster. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/reindex-data/ - reindex} + * + * @memberOf API-Core + * + * @param {object} params + * @param {integer} [params.max_docs] - Maximum number of documents to process. By default, all documents. + * @param {boolean} [params.refresh] - If `true`, the request refreshes affected shards to make this operation visible to search. + * @param {number} [params.requests_per_second=0] - The throttle for this request in sub-requests per second. Defaults to no throttle. + * @param {string} [params.scroll] - Specifies how long a consistent view of the index should be maintained for scrolled search. + * @param {string} [params.slices] - The number of slices this task should be divided into. Defaults to 1 slice, meaning the task isn't sliced into subtasks. + * @param {string} [params.timeout] - Period each indexing waits for automatic index creation, dynamic mapping updates, and waiting for active shards. + * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). + * @param {boolean} [params.wait_for_completion=true] - If `true`, the request blocks until the operation is complete. + * @param {object} params.body - The search definition using the Query DSL and the prototype for the index request. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function reindexFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_reindex'; + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = reindexFunc; diff --git a/api/_core/reindexRethrottle.d.ts b/api/_core/reindexRethrottle.d.ts new file mode 100644 index 000000000..8eeb2d274 --- /dev/null +++ b/api/_core/reindexRethrottle.d.ts @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Core_ReindexRethrottle from '../_types/_core.reindex_rethrottle' + +export interface ReindexRethrottle_Request extends Global.Params { + requests_per_second?: number; + task_id: Common.Id; +} + +export interface ReindexRethrottle_Response extends ApiResponse { + body: ReindexRethrottle_ResponseBody; +} + +export interface ReindexRethrottle_ResponseBody { + nodes: Record; +} + diff --git a/api/_core/reindexRethrottle.js b/api/_core/reindexRethrottle.js new file mode 100644 index 000000000..a43376f96 --- /dev/null +++ b/api/_core/reindexRethrottle.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Changes the number of requests per second for a particular Reindex operation. + *
See Also: {@link https://opensearch.org/docs/latest - reindex_rethrottle} + * + * @memberOf API-Core + * + * @param {object} params + * @param {number} [params.requests_per_second] - The throttle for this request in sub-requests per second. + * @param {string} params.task_id - Identifier for the task. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function reindexRethrottleFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.task_id == null) return handleMissingParam('task_id', this, callback); + + let { body, task_id, ...querystring } = params; + task_id = parsePathParam(task_id); + + const path = '/_reindex/' + task_id + '/_rethrottle'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = reindexRethrottleFunc; diff --git a/api/_core/renderSearchTemplate.d.ts b/api/_core/renderSearchTemplate.d.ts new file mode 100644 index 000000000..b95a63f03 --- /dev/null +++ b/api/_core/renderSearchTemplate.d.ts @@ -0,0 +1,39 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface RenderSearchTemplate_Request extends Global.Params { + body?: RenderSearchTemplate_RequestBody; + id?: Common.Id; +} + +export interface RenderSearchTemplate_RequestBody { + file?: string; + params?: Record>; + source?: string; +} + +export interface RenderSearchTemplate_Response extends ApiResponse { + body: RenderSearchTemplate_ResponseBody; +} + +export interface RenderSearchTemplate_ResponseBody { + template_output: Record>; +} + diff --git a/api/_core/renderSearchTemplate.js b/api/_core/renderSearchTemplate.js new file mode 100644 index 000000000..89f3e0a43 --- /dev/null +++ b/api/_core/renderSearchTemplate.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Allows to use the Mustache language to pre-render a search definition. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/search-template/ - render_search_template} + * + * @memberOf API-Core + * + * @param {object} [params] + * @param {string} [params.id] - ID of the search template to render. If no `source` is specified, this or the `id` request body parameter is required. + * @param {object} [params.body] - The search definition template and its params + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function renderSearchTemplateFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, id, ...querystring } = params; + id = parsePathParam(id); + + const path = ['/_render/template/', id].filter(c => c).join('').replace('//', '/'); + const method = body ? 'POST' : 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = renderSearchTemplateFunc; diff --git a/api/_core/scriptsPainlessExecute.d.ts b/api/_core/scriptsPainlessExecute.d.ts new file mode 100644 index 000000000..519307550 --- /dev/null +++ b/api/_core/scriptsPainlessExecute.d.ts @@ -0,0 +1,39 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Core_ScriptsPainlessExecute from '../_types/_core.scripts_painless_execute' +import * as Common from '../_types/_common' + +export interface ScriptsPainlessExecute_Request extends Global.Params { + body?: ScriptsPainlessExecute_RequestBody; +} + +export interface ScriptsPainlessExecute_RequestBody { + context?: string; + context_setup?: Core_ScriptsPainlessExecute.PainlessContextSetup; + script?: Common.InlineScript; +} + +export interface ScriptsPainlessExecute_Response extends ApiResponse { + body: ScriptsPainlessExecute_ResponseBody; +} + +export interface ScriptsPainlessExecute_ResponseBody { + result: Record; +} + diff --git a/api/_core/scriptsPainlessExecute.js b/api/_core/scriptsPainlessExecute.js new file mode 100644 index 000000000..b0f8258fb --- /dev/null +++ b/api/_core/scriptsPainlessExecute.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Allows an arbitrary script to be executed and a result to be returned. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/script-apis/exec-script/ - scripts_painless_execute} + * + * @memberOf API-Core + * + * @param {object} [params] + * @param {object} [params.body] - The script to execute + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function scriptsPainlessExecuteFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_scripts/painless/_execute'; + const method = body ? 'POST' : 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = scriptsPainlessExecuteFunc; diff --git a/api/_core/scroll.d.ts b/api/_core/scroll.d.ts new file mode 100644 index 000000000..8cfc2f2d7 --- /dev/null +++ b/api/_core/scroll.d.ts @@ -0,0 +1,39 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Core_Search from '../_types/_core.search' + +export interface Scroll_Request extends Global.Params { + body?: Scroll_RequestBody; + rest_total_hits_as_int?: boolean; + scroll?: Common.Duration; + scroll_id?: Common.ScrollId; +} + +export interface Scroll_RequestBody { + scroll?: Common.Duration; + scroll_id: Common.ScrollId; +} + +export interface Scroll_Response extends ApiResponse { + body: Scroll_ResponseBody; +} + +export type Scroll_ResponseBody = Core_Search.ResponseBody + diff --git a/api/_core/scroll.js b/api/_core/scroll.js new file mode 100644 index 000000000..982d2b76b --- /dev/null +++ b/api/_core/scroll.js @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Allows to retrieve a large numbers of results from a single search request. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/scroll/#path-and-http-methods - scroll} + * + * @memberOf API-Core + * + * @param {object} [params] + * @param {boolean} [params.rest_total_hits_as_int=false] - If true, the API response's hit.total property is returned as an integer. If false, the API response's hit.total property is returned as an object. + * @param {string} [params.scroll] - Period to retain the search context for scrolling. + * @param {string} [params.scroll_id] DEPRECATED - The scroll ID + * @param {object} [params.body] - The scroll ID if not passed by URL or query parameter. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function scrollFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, scroll_id, ...querystring } = params; + scroll_id = parsePathParam(scroll_id); + + const path = ['/_search/scroll/', scroll_id].filter(c => c).join('').replace('//', '/'); + const method = body ? 'POST' : 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = scrollFunc; diff --git a/api/_core/search.d.ts b/api/_core/search.d.ts new file mode 100644 index 000000000..b48c5f443 --- /dev/null +++ b/api/_core/search.d.ts @@ -0,0 +1,117 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Core_Search from '../_types/_core.search' +import * as Common from '../_types/_common' +import * as Common_QueryDsl from '../_types/_common.query_dsl' +import * as Common_Aggregations from '../_types/_common.aggregations' +import * as Common_Mapping from '../_types/_common.mapping' + +export interface Search_Request extends Global.Params { + _source?: Core_Search.SourceConfigParam; + _source_excludes?: Common.Fields; + _source_includes?: Common.Fields; + allow_no_indices?: boolean; + allow_partial_search_results?: boolean; + analyze_wildcard?: boolean; + analyzer?: string; + batched_reduce_size?: number; + body?: Search_RequestBody; + cancel_after_time_interval?: Common.Duration; + ccs_minimize_roundtrips?: boolean; + default_operator?: Common_QueryDsl.Operator; + df?: string; + docvalue_fields?: Common.Fields; + expand_wildcards?: Common.ExpandWildcards; + explain?: boolean; + from?: number; + ignore_throttled?: boolean; + ignore_unavailable?: boolean; + include_named_queries_score?: boolean; + index?: Common.Indices; + lenient?: boolean; + max_concurrent_shard_requests?: number; + phase_took?: boolean; + pre_filter_shard_size?: number; + preference?: string; + q?: string; + request_cache?: boolean; + rest_total_hits_as_int?: boolean; + routing?: Common.Routing; + scroll?: Common.Duration; + search_pipeline?: string; + search_type?: Common.SearchType; + seq_no_primary_term?: boolean; + size?: number; + sort?: string | string[]; + stats?: string[]; + stored_fields?: Common.Fields; + suggest_field?: Common.Field; + suggest_mode?: Common.SuggestMode; + suggest_size?: number; + suggest_text?: string; + terminate_after?: number; + timeout?: Common.Duration; + track_scores?: boolean; + track_total_hits?: Core_Search.TrackHits; + typed_keys?: boolean; + version?: boolean; +} + +export interface Search_RequestBody { + _source?: Core_Search.SourceConfig; + aggregations?: Record; + collapse?: Core_Search.FieldCollapse; + docvalue_fields?: Common_QueryDsl.FieldAndFormat[]; + explain?: boolean; + ext?: Record>; + fields?: Common_QueryDsl.FieldAndFormat[]; + from?: number; + highlight?: Core_Search.Highlight; + indices_boost?: Record[]; + knn?: Common.KnnQuery | Common.KnnQuery[]; + min_score?: number; + pit?: Core_Search.PointInTimeReference; + post_filter?: Common_QueryDsl.QueryContainer; + profile?: boolean; + query?: Common_QueryDsl.QueryContainer; + rank?: Common.RankContainer; + rescore?: Core_Search.Rescore | Core_Search.Rescore[]; + runtime_mappings?: Common_Mapping.RuntimeFields; + script_fields?: Record; + search_after?: Common.SortResults; + seq_no_primary_term?: boolean; + size?: number; + slice?: Common.SlicedScroll; + sort?: Common.Sort; + stats?: string[]; + stored_fields?: Common.Fields; + suggest?: Core_Search.Suggester; + terminate_after?: number; + timeout?: string; + track_scores?: boolean; + track_total_hits?: Core_Search.TrackHits; + version?: boolean; +} + +export interface Search_Response extends ApiResponse { + body: Search_ResponseBody; +} + +export type Search_ResponseBody = Core_Search.ResponseBody + diff --git a/api/_core/search.js b/api/_core/search.js new file mode 100644 index 000000000..8d59c9165 --- /dev/null +++ b/api/_core/search.js @@ -0,0 +1,95 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns results matching a query. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/search/ - search} + * + * @memberOf API-Core + * + * @param {object} [params] + * @param {string} [params._source] - Indicates which source fields are returned for matching documents. These fields are returned in the `hits._source` property of the search response. Valid values are: `true` to return the entire document source; `false` to not return the document source; `` to return the source fields that are specified as a comma-separated list (supports wildcard (`*`) patterns). + * @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude from the response. You can also use this parameter to exclude fields from the subset specified in `_source_includes` query parameter. If the `_source` parameter is `false`, this parameter is ignored. + * @param {string} [params._source_includes] - A comma-separated list of source fields to include in the response. If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the `_source_excludes` query parameter. If the `_source` parameter is `false`, this parameter is ignored. + * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. + * @param {boolean} [params.allow_partial_search_results=true] - If true, returns partial results if there are shard request timeouts or shard failures. If false, returns an error with no partial results. + * @param {boolean} [params.analyze_wildcard=false] - If true, wildcard and prefix queries are analyzed. This parameter can only be used when the q query string parameter is specified. + * @param {string} [params.analyzer] - Analyzer to use for the query string. This parameter can only be used when the q query string parameter is specified. + * @param {number} [params.batched_reduce_size=512] - The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. + * @param {string} [params.cancel_after_time_interval] - The time after which the search request will be canceled. Request-level parameter takes precedence over `cancel_after_time_interval` cluster setting. + * @param {boolean} [params.ccs_minimize_roundtrips=true] - If true, network round-trips between the coordinating node and the remote clusters are minimized when executing cross-cluster search (CCS) requests. + * @param {string} [params.default_operator] - The default operator for query string query: AND or OR. This parameter can only be used when the `q` query string parameter is specified. + * @param {string} [params.df] - Field to use as default where no field prefix is given in the query string. This parameter can only be used when the q query string parameter is specified. + * @param {string} [params.docvalue_fields] - A comma-separated list of fields to return as the docvalue representation for each hit. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. + * @param {boolean} [params.explain] - If `true`, returns detailed information about score computation as part of a hit. + * @param {number} [params.from=0] - Starting document offset. Needs to be non-negative. By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters. To page through more hits, use the `search_after` parameter. + * @param {boolean} [params.ignore_throttled] - If `true`, concrete, expanded or aliased indices will be ignored when frozen. + * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. + * @param {boolean} [params.include_named_queries_score=false] - Indicates whether hit.matched_queries should be rendered as a map that includes the name of the matched query associated with its score (true) or as an array containing the name of the matched queries (false) + * @param {boolean} [params.lenient] - If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. This parameter can only be used when the `q` query string parameter is specified. + * @param {number} [params.max_concurrent_shard_requests=5] - Defines the number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests. + * @param {boolean} [params.phase_took=false] - Indicates whether to return phase-level `took` time values in the response. + * @param {number} [params.pre_filter_shard_size] - Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method (if date filters are mandatory to match but the shard bounds and the query are disjoint). When unspecified, the pre-filter phase is executed if any of these conditions is met: the request targets more than 128 shards; the request targets one or more read-only index; the primary sort of the query targets an indexed field. + * @param {string} [params.preference=random] - Nodes and shards used for the search. By default, OpenSearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness. Valid values are: `_only_local` to run the search only on shards on the local node; `_local` to, if possible, run the search on shards on the local node, or if not, select shards using the default method; `_only_nodes:,` to run the search on only the specified nodes IDs, where, if suitable shards exist on more than one selected node, use shards on those nodes using the default method, or if none of the specified nodes are available, select shards from any available node using the default method; `_prefer_nodes:,` to if possible, run the search on the specified nodes IDs, or if not, select shards using the default method; `_shards:,` to run the search only on the specified shards; `` (any string that does not start with `_`) to route searches with the same `` to the same shards in the same order. + * @param {string} [params.q] - Query in the Lucene query string syntax using query parameter search. Query parameter searches do not support the full OpenSearch Query DSL but are handy for testing. + * @param {boolean} [params.request_cache] - If `true`, the caching of search results is enabled for requests where `size` is `0`. Defaults to index level settings. + * @param {boolean} [params.rest_total_hits_as_int=false] - Indicates whether `hits.total` should be rendered as an integer or an object in the rest search response. + * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.scroll] - Period to retain the search context for scrolling. See Scroll search results. By default, this value cannot exceed `1d` (24 hours). You can change this limit using the `search.max_keep_alive` cluster-level setting. + * @param {string} [params.search_pipeline] - Customizable sequence of processing stages applied to search queries. + * @param {string} [params.search_type] - How distributed term frequencies are calculated for relevance scoring. + * @param {boolean} [params.seq_no_primary_term] - If `true`, returns sequence number and primary term of the last modification of each hit. + * @param {number} [params.size=10] - Defines the number of hits to return. By default, you cannot page through more than 10,000 hits using the `from` and `size` parameters. To page through more hits, use the `search_after` parameter. + * @param {string} [params.sort] - A comma-separated list of : pairs. + * @param {array} [params.stats] - Specific `tag` of the request for logging and statistical purposes. + * @param {string} [params.stored_fields] - A comma-separated list of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the `_source` parameter defaults to `false`. You can pass `_source: true` to return both source fields and stored fields in the search response. + * @param {string} [params.suggest_field] - Specifies which field to use for suggestions. + * @param {string} [params.suggest_mode] - Specifies the suggest mode. This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified. + * @param {number} [params.suggest_size] - Number of suggestions to return. This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified. + * @param {string} [params.suggest_text] - The source text for which the suggestions should be returned. This parameter can only be used when the `suggest_field` and `suggest_text` query string parameters are specified. + * @param {number} [params.terminate_after] - Maximum number of documents to collect for each shard. If a query reaches this limit, OpenSearch terminates the query early. OpenSearch collects documents before sorting. Use with caution. OpenSearch applies this parameter to each shard handling the request. When possible, let OpenSearch perform early termination automatically. Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. If set to `0` (default), the query does not terminate early. + * @param {string} [params.timeout] - Specifies the period of time to wait for a response from each shard. If no response is received before the timeout expires, the request fails and returns an error. + * @param {boolean} [params.track_scores] - If `true`, calculate and return document scores, even if the scores are not used for sorting. + * @param {string} [params.track_total_hits] - Number of hits matching the query to count accurately. If `true`, the exact number of hits is returned at the cost of some performance. If `false`, the response does not include the total number of hits matching the query. + * @param {boolean} [params.typed_keys] - If `true`, aggregation and suggester names are be prefixed by their respective types in the response. + * @param {boolean} [params.version] - If `true`, returns document version as part of a hit. + * @param {string} [params.index] - Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (`*`). To search all data streams and indices, omit this parameter or use `*` or `_all`. + * @param {object} [params.body] - The search definition using the Query DSL + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function searchFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_search'].filter(c => c).join('').replace('//', '/'); + const method = body ? 'POST' : 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = searchFunc; diff --git a/api/_core/searchShards.d.ts b/api/_core/searchShards.d.ts new file mode 100644 index 000000000..af3e980fc --- /dev/null +++ b/api/_core/searchShards.d.ts @@ -0,0 +1,41 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Core_SearchShards from '../_types/_core.search_shards' + +export interface SearchShards_Request extends Global.Params { + allow_no_indices?: boolean; + expand_wildcards?: Common.ExpandWildcards; + ignore_unavailable?: boolean; + index?: Common.Indices; + local?: boolean; + preference?: string; + routing?: Common.Routing; +} + +export interface SearchShards_Response extends ApiResponse { + body: SearchShards_ResponseBody; +} + +export interface SearchShards_ResponseBody { + indices: Record; + nodes: Record; + shards: Common.NodeShard[][]; +} + diff --git a/api/_core/searchShards.js b/api/_core/searchShards.js new file mode 100644 index 000000000..542da6e53 --- /dev/null +++ b/api/_core/searchShards.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns information about the indices and shards that a search request would be executed against. + *
See Also: {@link https://opensearch.org/docs/latest - search_shards} + * + * @memberOf API-Core + * + * @param {object} [params] + * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. + * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. + * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. + * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.index] - Returns the indices and shards that a search request would be executed against. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function searchShardsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_search_shards'].filter(c => c).join('').replace('//', '/'); + const method = body ? 'POST' : 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = searchShardsFunc; diff --git a/api/_core/searchTemplate.d.ts b/api/_core/searchTemplate.d.ts new file mode 100644 index 000000000..cfb9b9dfd --- /dev/null +++ b/api/_core/searchTemplate.d.ts @@ -0,0 +1,69 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Common_Aggregations from '../_types/_common.aggregations' +import * as Core_Search from '../_types/_core.search' + +export interface SearchTemplate_Request extends Global.Params { + allow_no_indices?: boolean; + body: SearchTemplate_RequestBody; + ccs_minimize_roundtrips?: boolean; + expand_wildcards?: Common.ExpandWildcards; + explain?: boolean; + ignore_throttled?: boolean; + ignore_unavailable?: boolean; + index?: Common.Indices; + preference?: string; + profile?: boolean; + rest_total_hits_as_int?: boolean; + routing?: Common.Routing; + scroll?: Common.Duration; + search_type?: Common.SearchType; + typed_keys?: boolean; +} + +export interface SearchTemplate_RequestBody { + explain?: boolean; + id?: Common.Id; + params?: Record>; + profile?: boolean; + source?: string; +} + +export interface SearchTemplate_Response extends ApiResponse { + body: SearchTemplate_ResponseBody; +} + +export interface SearchTemplate_ResponseBody { + _clusters?: Common.ClusterStatistics; + _scroll_id?: Common.ScrollId; + _shards: Common.ShardStatistics; + aggregations?: Record; + fields?: Record>; + hits: Core_Search.HitsMetadata; + max_score?: number; + num_reduce_phases?: number; + pit_id?: Common.Id; + profile?: Core_Search.Profile; + suggest?: Record; + terminated_early?: boolean; + timed_out: boolean; + took: number; +} + diff --git a/api/_core/searchTemplate.js b/api/_core/searchTemplate.js new file mode 100644 index 000000000..13f8bbae3 --- /dev/null +++ b/api/_core/searchTemplate.js @@ -0,0 +1,62 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Allows to use the Mustache language to pre-render a search definition. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/search-template/ - search_template} + * + * @memberOf API-Core + * + * @param {object} params + * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. + * @param {boolean} [params.ccs_minimize_roundtrips=true] - If `true`, network round-trips are minimized for cross-cluster search requests. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + * @param {boolean} [params.explain] - If `true`, the response includes additional details about score computation as part of a hit. + * @param {boolean} [params.ignore_throttled] - If `true`, specified concrete, expanded, or aliased indices are not included in the response when throttled. + * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. + * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. + * @param {boolean} [params.profile] - If `true`, the query execution is profiled. + * @param {boolean} [params.rest_total_hits_as_int=false] - If true, hits.total are rendered as an integer in the response. + * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.scroll] - Specifies how long a consistent view of the index should be maintained for scrolled search. + * @param {string} [params.search_type] - The type of the search operation. + * @param {boolean} [params.typed_keys] - If `true`, the response prefixes aggregation and suggester names with their respective types. + * @param {string} [params.index] - Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (*). + * @param {object} params.body - The search definition template and its params + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function searchTemplateFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_search/template'].filter(c => c).join('').replace('//', '/'); + const method = body ? 'POST' : 'GET'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = searchTemplateFunc; diff --git a/api/_core/termvectors.d.ts b/api/_core/termvectors.d.ts new file mode 100644 index 000000000..158382d4b --- /dev/null +++ b/api/_core/termvectors.d.ts @@ -0,0 +1,57 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Core_Termvectors from '../_types/_core.termvectors' + +export interface Termvectors_Request extends Global.Params { + body?: Termvectors_RequestBody; + field_statistics?: boolean; + fields?: Common.Fields; + id?: Common.Id; + index: Common.IndexName; + offsets?: boolean; + payloads?: boolean; + positions?: boolean; + preference?: string; + realtime?: boolean; + routing?: Common.Routing; + term_statistics?: boolean; + version?: Common.VersionNumber; + version_type?: Common.VersionType; +} + +export interface Termvectors_RequestBody { + doc?: Record; + filter?: Core_Termvectors.Filter; + per_field_analyzer?: Record; +} + +export interface Termvectors_Response extends ApiResponse { + body: Termvectors_ResponseBody; +} + +export interface Termvectors_ResponseBody { + _id: Common.Id; + _index: Common.IndexName; + _version: Common.VersionNumber; + found: boolean; + term_vectors?: Record; + took: number; +} + diff --git a/api/_core/termvectors.js b/api/_core/termvectors.js new file mode 100644 index 000000000..054198da0 --- /dev/null +++ b/api/_core/termvectors.js @@ -0,0 +1,63 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Returns information and statistics about terms in the fields of a particular document. + *
See Also: {@link https://opensearch.org/docs/latest - termvectors} + * + * @memberOf API-Core + * + * @param {object} params + * @param {boolean} [params.field_statistics=true] - If `true`, the response includes the document count, sum of document frequencies, and sum of total term frequencies. + * @param {string} [params.fields] - Comma-separated list or wildcard expressions of fields to include in the statistics. Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters. + * @param {boolean} [params.offsets=true] - If `true`, the response includes term offsets. + * @param {boolean} [params.payloads=true] - If `true`, the response includes term payloads. + * @param {boolean} [params.positions=true] - If `true`, the response includes term positions. + * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. + * @param {boolean} [params.realtime=true] - If true, the request is real-time as opposed to near-real-time. + * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {boolean} [params.term_statistics=false] - If `true`, the response includes term frequency and document frequency. + * @param {number} [params.version] - If `true`, returns the document version as part of a hit. + * @param {string} [params.version_type] - Specific version type. + * @param {string} params.index - Name of the index that contains the document. + * @param {string} [params.id] - Unique identifier of the document. + * @param {object} [params.body] - Define parameters and or supply a document to get termvectors for. See documentation. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function termvectorsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + + let { body, index, id, ...querystring } = params; + index = parsePathParam(index); + id = parsePathParam(id); + + const path = ['/', index, '/_termvectors/', id].filter(c => c).join('').replace('//', '/'); + const method = body ? 'POST' : 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = termvectorsFunc; diff --git a/api/_core/update.d.ts b/api/_core/update.d.ts new file mode 100644 index 000000000..fc75e570f --- /dev/null +++ b/api/_core/update.d.ts @@ -0,0 +1,56 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Core_Search from '../_types/_core.search' +import * as Common from '../_types/_common' +import * as Core_Update from '../_types/_core.update' + +export interface Update_Request extends Global.Params { + _source?: Core_Search.SourceConfigParam; + _source_excludes?: Common.Fields; + _source_includes?: Common.Fields; + body: Update_RequestBody; + id: Common.Id; + if_primary_term?: number; + if_seq_no?: Common.SequenceNumber; + index: Common.IndexName; + lang?: string; + refresh?: Common.Refresh; + require_alias?: boolean; + retry_on_conflict?: number; + routing?: Common.Routing; + timeout?: Common.Duration; + wait_for_active_shards?: Common.WaitForActiveShards; +} + +export interface Update_RequestBody { + _source?: Core_Search.SourceConfig; + detect_noop?: boolean; + doc?: Record; + doc_as_upsert?: boolean; + script?: Common.Script; + scripted_upsert?: boolean; + upsert?: Record; +} + +export interface Update_Response extends ApiResponse { + body: Update_ResponseBody; +} + +export type Update_ResponseBody = Core_Update.UpdateWriteResponseBase + diff --git a/api/_core/update.js b/api/_core/update.js new file mode 100644 index 000000000..1171d2031 --- /dev/null +++ b/api/_core/update.js @@ -0,0 +1,65 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Updates a document with a script or partial document. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/document-apis/update-document/ - update} + * + * @memberOf API-Core + * + * @param {object} params + * @param {string} [params._source] - Set to false to disable source retrieval. You can also specify a comma-separated list of the fields you want to retrieve. + * @param {string} [params._source_excludes] - Specify the source fields you want to exclude. + * @param {string} [params._source_includes] - Specify the source fields you want to retrieve. + * @param {number} [params.if_primary_term] - Only perform the operation if the document has this primary term. + * @param {number} [params.if_seq_no] - Only perform the operation if the document has this sequence number. + * @param {string} [params.lang=painless] - The script language. + * @param {string} [params.refresh] - If 'true', OpenSearch refreshes the affected shards to make this operation visible to search, if 'wait_for' then wait for a refresh to make this operation visible to search, if 'false' do nothing with refreshes. + * @param {boolean} [params.require_alias=false] - If true, the destination must be an index alias. + * @param {number} [params.retry_on_conflict=0] - Specify how many times should the operation be retried when a conflict occurs. + * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.timeout] - Period to wait for dynamic mapping updates and active shards. This guarantees OpenSearch waits for at least the timeout before failing. The actual wait time could be longer, particularly when multiple waits occur. + * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operations. Set to 'all' or any positive integer up to the total number of shards in the index (number_of_replicas+1). Defaults to 1 meaning the primary shard. + * @param {string} params.id - Document ID + * @param {string} params.index - The name of the index + * @param {object} params.body - The request definition requires either `script` or partial `doc` + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function updateFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, id, index, ...querystring } = params; + id = parsePathParam(id); + index = parsePathParam(index); + + const path = '/' + index + '/_update/' + id; + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = updateFunc; diff --git a/api/_core/updateByQuery.d.ts b/api/_core/updateByQuery.d.ts new file mode 100644 index 000000000..d4d8deb44 --- /dev/null +++ b/api/_core/updateByQuery.d.ts @@ -0,0 +1,91 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Common_QueryDsl from '../_types/_common.query_dsl' + +export interface UpdateByQuery_Request extends Global.Params { + _source?: string[]; + _source_excludes?: string[]; + _source_includes?: string[]; + allow_no_indices?: boolean; + analyze_wildcard?: boolean; + analyzer?: string; + body?: UpdateByQuery_RequestBody; + conflicts?: Common.Conflicts; + default_operator?: Common_QueryDsl.Operator; + df?: string; + expand_wildcards?: Common.ExpandWildcards; + from?: number; + ignore_unavailable?: boolean; + index: Common.Indices; + lenient?: boolean; + max_docs?: number; + pipeline?: string; + preference?: string; + q?: string; + refresh?: boolean; + request_cache?: boolean; + requests_per_second?: number; + routing?: Common.Routing; + scroll?: Common.Duration; + scroll_size?: number; + search_timeout?: Common.Duration; + search_type?: Common.SearchType; + size?: number; + slices?: Common.Slices; + sort?: string[]; + stats?: string[]; + terminate_after?: number; + timeout?: Common.Duration; + version?: boolean; + wait_for_active_shards?: Common.WaitForActiveShards; + wait_for_completion?: boolean; +} + +export interface UpdateByQuery_RequestBody { + conflicts?: Common.Conflicts; + max_docs?: number; + query?: Common_QueryDsl.QueryContainer; + script?: Common.Script; + slice?: Common.SlicedScroll; +} + +export interface UpdateByQuery_Response extends ApiResponse { + body: UpdateByQuery_ResponseBody; +} + +export interface UpdateByQuery_ResponseBody { + batches?: number; + deleted?: number; + failures?: Common.BulkIndexByScrollFailure[]; + noops?: number; + requests_per_second?: number; + retries?: Common.Retries; + task?: Common.TaskId; + throttled?: Common.Duration; + throttled_millis?: Common.DurationValueUnitMillis; + throttled_until?: Common.Duration; + throttled_until_millis?: Common.DurationValueUnitMillis; + timed_out?: boolean; + took?: Common.DurationValueUnitMillis; + total?: number; + updated?: number; + version_conflicts?: number; +} + diff --git a/api/_core/updateByQuery.js b/api/_core/updateByQuery.js new file mode 100644 index 000000000..b48061936 --- /dev/null +++ b/api/_core/updateByQuery.js @@ -0,0 +1,85 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Performs an update on every document in the index without changing the source, +for example to pick up a mapping change. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/document-apis/update-by-query/ - update_by_query} + * + * @memberOf API-Core + * + * @param {object} params + * @param {array} [params._source] - True or false to return the _source field or not, or a list of fields to return. + * @param {array} [params._source_excludes] - List of fields to exclude from the returned _source field. + * @param {array} [params._source_includes] - List of fields to extract and return from the _source field. + * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. + * @param {boolean} [params.analyze_wildcard=false] - If `true`, wildcard and prefix queries are analyzed. + * @param {string} [params.analyzer] - Analyzer to use for the query string. + * @param {string} [params.conflicts] - What to do if update by query hits version conflicts: `abort` or `proceed`. + * @param {string} [params.default_operator] - The default operator for query string query: `AND` or `OR`. + * @param {string} [params.df] - Field to use as default where no field prefix is given in the query string. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + * @param {number} [params.from=0] - Starting offset. + * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. + * @param {boolean} [params.lenient] - If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. + * @param {number} [params.max_docs] - Maximum number of documents to process. Defaults to all documents. + * @param {string} [params.pipeline] - ID of the pipeline to use to preprocess incoming documents. If the index has a default ingest pipeline specified, then setting the value to `_none` disables the default ingest pipeline for this request. If a final pipeline is configured it will always run, regardless of the value of this parameter. + * @param {string} [params.preference=random] - Specifies the node or shard the operation should be performed on. Random by default. + * @param {string} [params.q] - Query in the Lucene query string syntax. + * @param {boolean} [params.refresh] - If `true`, OpenSearch refreshes affected shards to make the operation visible to search. + * @param {boolean} [params.request_cache] - If `true`, the request cache is used for this request. + * @param {number} [params.requests_per_second=0] - The throttle for this request in sub-requests per second. + * @param {string} [params.routing] - Custom value used to route operations to a specific shard. + * @param {string} [params.scroll] - Period to retain the search context for scrolling. + * @param {number} [params.scroll_size=100] - Size of the scroll request that powers the operation. + * @param {string} [params.search_timeout] - Explicit timeout for each search request. + * @param {string} [params.search_type] - The type of the search operation. Available options: `query_then_fetch`, `dfs_query_then_fetch`. + * @param {integer} [params.size] - Deprecated, please use `max_docs` instead. + * @param {string} [params.slices] - The number of slices this task should be divided into. + * @param {array} [params.sort] - A comma-separated list of : pairs. + * @param {array} [params.stats] - Specific `tag` of the request for logging and statistical purposes. + * @param {number} [params.terminate_after] - Maximum number of documents to collect for each shard. If a query reaches this limit, OpenSearch terminates the query early. OpenSearch collects documents before sorting. Use with caution. OpenSearch applies this parameter to each shard handling the request. When possible, let OpenSearch perform early termination automatically. Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. + * @param {string} [params.timeout] - Period each update request waits for the following operations: dynamic mapping updates, waiting for active shards. + * @param {boolean} [params.version] - If `true`, returns the document version as part of a hit. + * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). + * @param {boolean} [params.wait_for_completion=true] - If `true`, the request blocks until the operation is complete. + * @param {string} params.index - Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (`*`). To search all data streams or indices, omit this parameter or use `*` or `_all`. + * @param {object} [params.body] - The search definition using the Query DSL + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function updateByQueryFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = '/' + index + '/_update_by_query'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = updateByQueryFunc; diff --git a/api/_core/updateByQueryRethrottle.d.ts b/api/_core/updateByQueryRethrottle.d.ts new file mode 100644 index 000000000..001677a08 --- /dev/null +++ b/api/_core/updateByQueryRethrottle.d.ts @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Core_UpdateByQueryRethrottle from '../_types/_core.update_by_query_rethrottle' + +export interface UpdateByQueryRethrottle_Request extends Global.Params { + requests_per_second?: number; + task_id: Common.Id; +} + +export interface UpdateByQueryRethrottle_Response extends ApiResponse { + body: UpdateByQueryRethrottle_ResponseBody; +} + +export interface UpdateByQueryRethrottle_ResponseBody { + nodes: Record; +} + diff --git a/api/_core/updateByQueryRethrottle.js b/api/_core/updateByQueryRethrottle.js new file mode 100644 index 000000000..53277998d --- /dev/null +++ b/api/_core/updateByQueryRethrottle.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Changes the number of requests per second for a particular Update By Query operation. + *
See Also: {@link https://opensearch.org/docs/latest - update_by_query_rethrottle} + * + * @memberOf API-Core + * + * @param {object} params + * @param {number} [params.requests_per_second] - The throttle for this request in sub-requests per second. + * @param {string} params.task_id - The ID for the task. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function updateByQueryRethrottleFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.task_id == null) return handleMissingParam('task_id', this, callback); + + let { body, task_id, ...querystring } = params; + task_id = parsePathParam(task_id); + + const path = '/_update_by_query/' + task_id + '/_rethrottle'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = updateByQueryRethrottleFunc; diff --git a/api/_types/_common.aggregations.d.ts b/api/_types/_common.aggregations.d.ts new file mode 100644 index 000000000..663ddfd60 --- /dev/null +++ b/api/_types/_common.aggregations.d.ts @@ -0,0 +1,1457 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common_QueryDsl from './_common.query_dsl' +import * as Common from './_common' +import * as Core_Search from './_core.search' + +export type AdjacencyMatrixAggregate = MultiBucketAggregateBaseAdjacencyMatrixBucket & Record + +export interface AdjacencyMatrixAggregation extends BucketAggregationBase { + filters?: Record; +} + +export interface AdjacencyMatrixBucket extends MultiBucketBase { + key: string; +} + +export type Aggregate = CardinalityAggregate | HdrPercentilesAggregate | HdrPercentileRanksAggregate | TDigestPercentilesAggregate | TDigestPercentileRanksAggregate | PercentilesBucketAggregate | MedianAbsoluteDeviationAggregate | MinAggregate | MaxAggregate | SumAggregate | AvgAggregate | WeightedAvgAggregate | ValueCountAggregate | SimpleValueAggregate | DerivativeAggregate | BucketMetricValueAggregate | StatsAggregate | StatsBucketAggregate | ExtendedStatsAggregate | ExtendedStatsBucketAggregate | GeoBoundsAggregate | GeoCentroidAggregate | HistogramAggregate | DateHistogramAggregate | AutoDateHistogramAggregate | VariableWidthHistogramAggregate | StringTermsAggregate | LongTermsAggregate | DoubleTermsAggregate | UnmappedTermsAggregate | LongRareTermsAggregate | StringRareTermsAggregate | UnmappedRareTermsAggregate | MultiTermsAggregate | MissingAggregate | NestedAggregate | ReverseNestedAggregate | GlobalAggregate | FilterAggregate | ChildrenAggregate | ParentAggregate | SamplerAggregate | UnmappedSamplerAggregate | GeoHashGridAggregate | GeoTileGridAggregate | GeoHexGridAggregate | RangeAggregate | DateRangeAggregate | GeoDistanceAggregate | IpRangeAggregate | IpPrefixAggregate | FiltersAggregate | AdjacencyMatrixAggregate | SignificantLongTermsAggregate | SignificantStringTermsAggregate | UnmappedSignificantTermsAggregate | CompositeAggregate | FrequentItemSetsAggregate | ScriptedMetricAggregate | TopHitsAggregate | InferenceAggregate | StringStatsAggregate | BoxPlotAggregate | TopMetricsAggregate | TTestAggregate | RateAggregate | CumulativeCardinalityAggregate | MatrixStatsAggregate | GeoLineAggregate + +export interface AggregateBase { + meta?: Common.Metadata; +} + +export type AggregateOrder = Record | Record[] + +export interface Aggregation { + meta?: Common.Metadata; + name?: string; +} + +export interface AggregationContainer { + adjacency_matrix?: AdjacencyMatrixAggregation; + aggregations?: Record; + auto_date_histogram?: AutoDateHistogramAggregation; + avg?: AverageAggregation; + avg_bucket?: AverageBucketAggregation; + boxplot?: BoxplotAggregation; + bucket_correlation?: BucketCorrelationAggregation; + bucket_count_ks_test?: BucketKsAggregation; + bucket_script?: BucketScriptAggregation; + bucket_selector?: BucketSelectorAggregation; + bucket_sort?: BucketSortAggregation; + cardinality?: CardinalityAggregation; + categorize_text?: CategorizeTextAggregation; + children?: ChildrenAggregation; + composite?: CompositeAggregation; + cumulative_cardinality?: CumulativeCardinalityAggregation; + cumulative_sum?: CumulativeSumAggregation; + date_histogram?: DateHistogramAggregation; + date_range?: DateRangeAggregation; + derivative?: DerivativeAggregation; + diversified_sampler?: DiversifiedSamplerAggregation; + extended_stats?: ExtendedStatsAggregation; + extended_stats_bucket?: ExtendedStatsBucketAggregation; + filter?: Common_QueryDsl.QueryContainer; + filters?: FiltersAggregation; + frequent_item_sets?: FrequentItemSetsAggregation; + geo_bounds?: GeoBoundsAggregation; + geo_centroid?: GeoCentroidAggregation; + geo_distance?: GeoDistanceAggregation; + geo_line?: GeoLineAggregation; + geohash_grid?: GeoHashGridAggregation; + geohex_grid?: GeohexGridAggregation; + geotile_grid?: GeoTileGridAggregation; + global?: GlobalAggregation; + histogram?: HistogramAggregation; + inference?: InferenceAggregation; + ip_prefix?: IpPrefixAggregation; + ip_range?: IpRangeAggregation; + line?: GeoLineAggregation; + matrix_stats?: MatrixStatsAggregation; + max?: MaxAggregation; + max_bucket?: MaxBucketAggregation; + median_absolute_deviation?: MedianAbsoluteDeviationAggregation; + meta?: Common.Metadata; + min?: MinAggregation; + min_bucket?: MinBucketAggregation; + missing?: MissingAggregation; + moving_avg?: MovingAverageAggregation; + moving_fn?: MovingFunctionAggregation; + moving_percentiles?: MovingPercentilesAggregation; + multi_terms?: MultiTermsAggregation; + nested?: NestedAggregation; + normalize?: NormalizeAggregation; + parent?: ParentAggregation; + percentile_ranks?: PercentileRanksAggregation; + percentiles?: PercentilesAggregation; + percentiles_bucket?: PercentilesBucketAggregation; + range?: RangeAggregation; + rare_terms?: RareTermsAggregation; + rate?: RateAggregation; + reverse_nested?: ReverseNestedAggregation; + sampler?: SamplerAggregation; + scripted_metric?: ScriptedMetricAggregation; + serial_diff?: SerialDifferencingAggregation; + significant_terms?: SignificantTermsAggregation; + significant_text?: SignificantTextAggregation; + stats?: StatsAggregation; + stats_bucket?: StatsBucketAggregation; + string_stats?: StringStatsAggregation; + sum?: SumAggregation; + sum_bucket?: SumBucketAggregation; + t_test?: TTestAggregation; + terms?: TermsAggregation; + top_hits?: TopHitsAggregation; + top_metrics?: TopMetricsAggregation; + value_count?: ValueCountAggregation; + variable_width_histogram?: VariableWidthHistogramAggregation; + weighted_avg?: WeightedAverageAggregation; +} + +export interface AggregationRange { + from?: undefined | number | string; + key?: string; + to?: undefined | number | string; +} + +export interface ArrayPercentilesItem { + key: string; + value: undefined | number | string; + value_as_string?: string; +} + +export interface AutoDateHistogramAggregate extends MultiBucketAggregateBaseDateHistogramBucket { + interval: Common.DurationLarge; +} + +export interface AutoDateHistogramAggregation extends BucketAggregationBase { + buckets?: number; + field?: Common.Field; + format?: string; + minimum_interval?: MinimumInterval; + missing?: Common.DateTime; + offset?: string; + params?: Record>; + script?: Common.Script; + time_zone?: Common.TimeZone; +} + +export type AverageAggregation = FormatMetricAggregationBase & Record + +export type AverageBucketAggregation = PipelineAggregationBase & Record + +export type AvgAggregate = SingleMetricAggregateBase & Record + +export interface BoxPlotAggregate extends AggregateBase { + lower: number; + lower_as_string?: string; + max: number; + max_as_string?: string; + min: number; + min_as_string?: string; + q1: number; + q1_as_string?: string; + q2: number; + q2_as_string?: string; + q3: number; + q3_as_string?: string; + upper: number; + upper_as_string?: string; +} + +export interface BoxplotAggregation extends MetricAggregationBase { + compression?: number; +} + +export type BucketAggregationBase = Aggregation & Record + +export interface BucketCorrelationAggregation extends BucketPathAggregation { + function: BucketCorrelationFunction; +} + +export interface BucketCorrelationFunction { + count_correlation: BucketCorrelationFunctionCountCorrelation; +} + +export interface BucketCorrelationFunctionCountCorrelation { + indicator: BucketCorrelationFunctionCountCorrelationIndicator; +} + +export interface BucketCorrelationFunctionCountCorrelationIndicator { + doc_count: number; + expectations: number[]; + fractions?: number[]; +} + +export interface BucketKsAggregation extends BucketPathAggregation { + alternative?: string[]; + fractions?: number[]; + sampling_method?: string; +} + +export interface BucketMetricValueAggregate extends SingleMetricAggregateBase { + keys: string[]; +} + +export interface BucketPathAggregation extends Aggregation { + buckets_path?: BucketsPath; +} + +export type BucketsAdjacencyMatrixBucket = Record | AdjacencyMatrixBucket[] + +export type BucketsCompositeBucket = Record | CompositeBucket[] + +export interface BucketScriptAggregation extends PipelineAggregationBase { + script?: Common.Script; +} + +export type BucketsDateHistogramBucket = Record | DateHistogramBucket[] + +export type BucketsDoubleTermsBucket = Record | DoubleTermsBucket[] + +export interface BucketSelectorAggregation extends PipelineAggregationBase { + script?: Common.Script; +} + +export type BucketsFiltersBucket = Record | FiltersBucket[] + +export type BucketsFrequentItemSetsBucket = Record | FrequentItemSetsBucket[] + +export type BucketsGeoHashGridBucket = Record | GeoHashGridBucket[] + +export type BucketsGeoHexGridBucket = Record | GeoHexGridBucket[] + +export type BucketsGeoTileGridBucket = Record | GeoTileGridBucket[] + +export type BucketsHistogramBucket = Record | HistogramBucket[] + +export type BucketsIpPrefixBucket = Record | IpPrefixBucket[] + +export type BucketsIpRangeBucket = Record | IpRangeBucket[] + +export type BucketsLongRareTermsBucket = Record | LongRareTermsBucket[] + +export type BucketsLongTermsBucket = Record | LongTermsBucket[] + +export type BucketsMultiTermsBucket = Record | MultiTermsBucket[] + +export interface BucketSortAggregation extends Aggregation { + from?: number; + gap_policy?: GapPolicy; + size?: number; + sort?: Common.Sort; +} + +export type BucketsPath = string | string[] | Record + +export type BucketsQueryContainer = Record | Common_QueryDsl.QueryContainer[] + +export type BucketsRangeBucket = Record | RangeBucket[] + +export type BucketsSignificantLongTermsBucket = Record | SignificantLongTermsBucket[] + +export type BucketsSignificantStringTermsBucket = Record | SignificantStringTermsBucket[] + +export type BucketsStringRareTermsBucket = Record | StringRareTermsBucket[] + +export type BucketsStringTermsBucket = Record | StringTermsBucket[] + +export type BucketsVariableWidthHistogramBucket = Record | VariableWidthHistogramBucket[] + +export type BucketsVoid = Record | Common.Void[] + +export type CalendarInterval = 'day' | 'hour' | 'minute' | 'month' | 'quarter' | 'second' | 'week' | 'year' + +export interface CardinalityAggregate extends AggregateBase { + value: number; +} + +export interface CardinalityAggregation extends MetricAggregationBase { + execution_hint?: CardinalityExecutionMode; + precision_threshold?: number; + rehash?: boolean; +} + +export type CardinalityExecutionMode = 'direct' | 'global_ordinals' | 'save_memory_heuristic' | 'save_time_heuristic' | 'segment_ordinals' + +export interface CategorizeTextAggregation extends Aggregation { + categorization_analyzer?: CategorizeTextAnalyzer; + categorization_filters?: string[]; + field: Common.Field; + max_matched_tokens?: number; + max_unique_tokens?: number; + min_doc_count?: number; + shard_min_doc_count?: number; + shard_size?: number; + similarity_threshold?: number; + size?: number; +} + +export type CategorizeTextAnalyzer = string | CustomCategorizeTextAnalyzer + +export type ChildrenAggregate = SingleBucketAggregateBase & Record + +export interface ChildrenAggregation extends BucketAggregationBase { + type?: Common.RelationName; +} + +export interface ChiSquareHeuristic { + background_is_superset: boolean; + include_negatives: boolean; +} + +export interface ClassificationInferenceOptions { + num_top_classes?: number; + num_top_feature_importance_values?: number; + prediction_field_type?: string; + results_field?: string; + top_classes_results_field?: string; +} + +export interface CompositeAggregate extends MultiBucketAggregateBaseCompositeBucket { + after_key?: CompositeAggregateKey; +} + +export type CompositeAggregateKey = Record + +export interface CompositeAggregation extends BucketAggregationBase { + after?: CompositeAggregateKey; + size?: number; + sources?: Record[]; +} + +export interface CompositeAggregationBase { + field?: Common.Field; + missing_bucket?: boolean; + missing_order?: MissingOrder; + order?: Common.SortOrder; + script?: Common.Script; + value_type?: ValueType; +} + +export interface CompositeAggregationSource { + date_histogram?: CompositeDateHistogramAggregation; + geotile_grid?: CompositeGeoTileGridAggregation; + histogram?: CompositeHistogramAggregation; + terms?: CompositeTermsAggregation; +} + +export interface CompositeBucket extends MultiBucketBase { + key: CompositeAggregateKey; +} + +export interface CompositeDateHistogramAggregation extends CompositeAggregationBase { + calendar_interval?: Common.DurationLarge; + fixed_interval?: Common.DurationLarge; + format?: string; + offset?: Common.Duration; + time_zone?: Common.TimeZone; +} + +export interface CompositeGeoTileGridAggregation extends CompositeAggregationBase { + bounds?: Common.GeoBounds; + precision?: number; +} + +export interface CompositeHistogramAggregation extends CompositeAggregationBase { + interval: number; +} + +export type CompositeTermsAggregation = CompositeAggregationBase & Record + +export interface CumulativeCardinalityAggregate extends AggregateBase { + value: number; + value_as_string?: string; +} + +export type CumulativeCardinalityAggregation = PipelineAggregationBase & Record + +export type CumulativeSumAggregation = PipelineAggregationBase & Record + +export interface CustomCategorizeTextAnalyzer { + char_filter?: string[]; + filter?: string[]; + tokenizer?: string; +} + +export type DateHistogramAggregate = MultiBucketAggregateBaseDateHistogramBucket & Record + +export interface DateHistogramAggregation extends BucketAggregationBase { + calendar_interval?: CalendarInterval; + extended_bounds?: ExtendedBoundsFieldDateMath; + field?: Common.Field; + fixed_interval?: Common.Duration; + format?: string; + hard_bounds?: ExtendedBoundsFieldDateMath; + interval?: Common.Duration; + keyed?: boolean; + min_doc_count?: number; + missing?: Common.DateTime; + offset?: Common.Duration; + order?: AggregateOrder; + params?: Record>; + script?: Common.Script; + time_zone?: Common.TimeZone; +} + +export interface DateHistogramBucket extends MultiBucketBase { + key: Common.EpochTimeUnitMillis; + key_as_string?: string; +} + +export type DateRangeAggregate = RangeAggregate & Record + +export interface DateRangeAggregation extends BucketAggregationBase { + field?: Common.Field; + format?: string; + keyed?: boolean; + missing?: Missing; + ranges?: DateRangeExpression[]; + time_zone?: Common.TimeZone; +} + +export interface DateRangeExpression { + from?: FieldDateMath; + key?: string; + to?: FieldDateMath; +} + +export interface DerivativeAggregate extends SingleMetricAggregateBase { + normalized_value?: number; + normalized_value_as_string?: string; +} + +export type DerivativeAggregation = PipelineAggregationBase & Record + +export interface DiversifiedSamplerAggregation extends BucketAggregationBase { + execution_hint?: SamplerAggregationExecutionHint; + field?: Common.Field; + max_docs_per_value?: number; + script?: Common.Script; + shard_size?: number; +} + +export type DoubleTermsAggregate = TermsAggregateBaseDoubleTermsBucket & Record + +export interface DoubleTermsBucket extends TermsBucketBase { + key: number; + key_as_string?: string; +} + +export interface EwmaModelSettings { + alpha?: number; +} + +export interface EwmaMovingAverageAggregation extends MovingAverageAggregationBase { + model: 'ewma'; + settings: EwmaModelSettings; +} + +export interface ExtendedBoundsdouble { + max: number; + min: number; +} + +export interface ExtendedBoundsFieldDateMath { + max: FieldDateMath; + min: FieldDateMath; +} + +export interface ExtendedStatsAggregate extends StatsAggregate { + std_deviation: undefined | number | string; + std_deviation_as_string?: string; + std_deviation_bounds?: StandardDeviationBounds; + std_deviation_bounds_as_string?: StandardDeviationBoundsAsString; + std_deviation_population: undefined | number | string; + std_deviation_sampling: undefined | number | string; + sum_of_squares: undefined | number | string; + sum_of_squares_as_string?: string; + variance: undefined | number | string; + variance_as_string?: string; + variance_population: undefined | number | string; + variance_population_as_string?: string; + variance_sampling: undefined | number | string; + variance_sampling_as_string?: string; +} + +export interface ExtendedStatsAggregation extends FormatMetricAggregationBase { + sigma?: number; +} + +export type ExtendedStatsBucketAggregate = ExtendedStatsAggregate & Record + +export interface ExtendedStatsBucketAggregation extends PipelineAggregationBase { + sigma?: number; +} + +export type FieldDateMath = Common.DateMath | number + +export type FilterAggregate = SingleBucketAggregateBase & Record + +export type FiltersAggregate = MultiBucketAggregateBaseFiltersBucket & Record + +export interface FiltersAggregation extends BucketAggregationBase { + filters?: BucketsQueryContainer; + keyed?: boolean; + other_bucket?: boolean; + other_bucket_key?: string; +} + +export type FiltersBucket = MultiBucketBase & Record + +export interface FormatMetricAggregationBase extends MetricAggregationBase { + format?: string; +} + +export interface FormattableMetricAggregation extends MetricAggregationBase { + format?: string; +} + +export type FrequentItemSetsAggregate = MultiBucketAggregateBaseFrequentItemSetsBucket & Record + +export interface FrequentItemSetsAggregation { + fields: FrequentItemSetsField[]; + filter?: Common_QueryDsl.QueryContainer; + minimum_set_size?: number; + minimum_support?: number; + size?: number; +} + +export interface FrequentItemSetsBucket extends MultiBucketBase { + key: Record; + support: number; +} + +export interface FrequentItemSetsField { + exclude?: TermsExclude; + field: Common.Field; + include?: TermsInclude; +} + +export type GapPolicy = 'insert_zeros' | 'keep_values' | 'skip' + +export interface GeoBoundsAggregate extends AggregateBase { + bounds?: Common.GeoBounds; +} + +export interface GeoBoundsAggregation extends MetricAggregationBase { + wrap_longitude?: boolean; +} + +export interface GeoCentroidAggregate extends AggregateBase { + count: number; + location?: Common.GeoLocation; +} + +export interface GeoCentroidAggregation extends MetricAggregationBase { + count?: number; + location?: Common.GeoLocation; +} + +export type GeoDistanceAggregate = RangeAggregate & Record + +export interface GeoDistanceAggregation extends BucketAggregationBase { + distance_type?: Common.GeoDistanceType; + field?: Common.Field; + origin?: Common.GeoLocation; + ranges?: AggregationRange[]; + unit?: Common.DistanceUnit; +} + +export type GeoHashGridAggregate = MultiBucketAggregateBaseGeoHashGridBucket & Record + +export interface GeoHashGridAggregation extends BucketAggregationBase { + bounds?: Common.GeoBounds; + field?: Common.Field; + precision?: Common.GeoHashPrecision; + shard_size?: number; + size?: number; +} + +export interface GeoHashGridBucket extends MultiBucketBase { + key: Common.GeoHash; +} + +export type GeoHexGridAggregate = MultiBucketAggregateBaseGeoHexGridBucket & Record + +export interface GeohexGridAggregation extends BucketAggregationBase { + bounds?: Common.GeoBounds; + field: Common.Field; + precision?: number; + shard_size?: number; + size?: number; +} + +export interface GeoHexGridBucket extends MultiBucketBase { + key: Common.GeoHexCell; +} + +export interface GeoLineAggregate extends AggregateBase { + geometry: Common.GeoLine; + properties: Record; + type: string; +} + +export interface GeoLineAggregation { + include_sort?: boolean; + point: GeoLinePoint; + size?: number; + sort: GeoLineSort; + sort_order?: Common.SortOrder; +} + +export interface GeoLinePoint { + field: Common.Field; +} + +export interface GeoLineSort { + field: Common.Field; +} + +export type GeoTileGridAggregate = MultiBucketAggregateBaseGeoTileGridBucket & Record + +export interface GeoTileGridAggregation extends BucketAggregationBase { + bounds?: Common.GeoBounds; + field?: Common.Field; + precision?: Common.GeoTilePrecision; + shard_size?: number; + size?: number; +} + +export interface GeoTileGridBucket extends MultiBucketBase { + key: Common.GeoTile; +} + +export type GlobalAggregate = SingleBucketAggregateBase & Record + +export type GlobalAggregation = BucketAggregationBase & Record + +export interface GoogleNormalizedDistanceHeuristic { + background_is_superset?: boolean; +} + +export interface HdrMethod { + number_of_significant_value_digits?: number; +} + +export type HdrPercentileRanksAggregate = PercentilesAggregateBase & Record + +export type HdrPercentilesAggregate = PercentilesAggregateBase & Record + +export type HistogramAggregate = MultiBucketAggregateBaseHistogramBucket & Record + +export interface HistogramAggregation extends BucketAggregationBase { + extended_bounds?: ExtendedBoundsdouble; + field?: Common.Field; + format?: string; + hard_bounds?: ExtendedBoundsdouble; + interval?: number; + keyed?: boolean; + min_doc_count?: number; + missing?: number; + offset?: number; + order?: AggregateOrder; + script?: Common.Script; +} + +export interface HistogramBucket extends MultiBucketBase { + key: number; + key_as_string?: string; +} + +export interface HoltLinearModelSettings { + alpha?: number; + beta?: number; +} + +export interface HoltMovingAverageAggregation extends MovingAverageAggregationBase { + model: 'holt'; + settings: HoltLinearModelSettings; +} + +export interface HoltWintersModelSettings { + alpha?: number; + beta?: number; + gamma?: number; + pad?: boolean; + period?: number; + type?: HoltWintersType; +} + +export interface HoltWintersMovingAverageAggregation extends MovingAverageAggregationBase { + model: 'holt_winters'; + settings: HoltWintersModelSettings; +} + +export type HoltWintersType = 'add' | 'mult' + +export interface InferenceAggregate extends AggregateBase { + feature_importance?: InferenceFeatureImportance[]; + top_classes?: InferenceTopClassEntry[]; + value?: Common.FieldValue; + warning?: string; +} + +export interface InferenceAggregation extends PipelineAggregationBase { + inference_config?: InferenceConfigContainer; + model_id: Common.Name; +} + +export interface InferenceClassImportance { + class_name: string; + importance: number; +} + +export interface InferenceConfigContainer { + classification?: ClassificationInferenceOptions; + regression?: RegressionInferenceOptions; +} + +export interface InferenceFeatureImportance { + classes?: InferenceClassImportance[]; + feature_name: string; + importance?: number; +} + +export interface InferenceTopClassEntry { + class_name: Common.FieldValue; + class_probability: number; + class_score: number; +} + +export type IpPrefixAggregate = MultiBucketAggregateBaseIpPrefixBucket & Record + +export interface IpPrefixAggregation extends BucketAggregationBase { + append_prefix_length?: boolean; + field: Common.Field; + is_ipv6?: boolean; + keyed?: boolean; + min_doc_count?: number; + prefix_length: number; +} + +export interface IpPrefixBucket extends MultiBucketBase { + is_ipv6: boolean; + key: string; + netmask?: string; + prefix_length: number; +} + +export type IpRangeAggregate = MultiBucketAggregateBaseIpRangeBucket & Record + +export interface IpRangeAggregation extends BucketAggregationBase { + field?: Common.Field; + ranges?: IpRangeAggregationRange[]; +} + +export interface IpRangeAggregationRange { + from?: undefined | string; + mask?: string; + to?: undefined | string; +} + +export interface IpRangeBucket extends MultiBucketBase { + from?: string; + key?: string; + to?: string; +} + +export type KeyedPercentiles = Record + +export interface LinearMovingAverageAggregation extends MovingAverageAggregationBase { + model: 'linear'; + settings: Common.EmptyObject; +} + +export type LongRareTermsAggregate = MultiBucketAggregateBaseLongRareTermsBucket & Record + +export interface LongRareTermsBucket extends MultiBucketBase { + key: number; + key_as_string?: string; +} + +export type LongTermsAggregate = TermsAggregateBaseLongTermsBucket & Record + +export interface LongTermsBucket extends TermsBucketBase { + key: number; + key_as_string?: string; +} + +export interface MatrixAggregation extends Aggregation { + fields?: Common.Fields; + missing?: Record; +} + +export interface MatrixStatsAggregate extends AggregateBase { + doc_count: number; + fields?: MatrixStatsFields[]; +} + +export interface MatrixStatsAggregation extends MatrixAggregation { + mode?: Common.SortMode; +} + +export interface MatrixStatsFields { + correlation: Record; + count: number; + covariance: Record; + kurtosis: number; + mean: number; + name: Common.Field; + skewness: number; + variance: number; +} + +export type MaxAggregate = SingleMetricAggregateBase & Record + +export type MaxAggregation = FormatMetricAggregationBase & Record + +export type MaxBucketAggregation = PipelineAggregationBase & Record + +export type MedianAbsoluteDeviationAggregate = SingleMetricAggregateBase & Record + +export interface MedianAbsoluteDeviationAggregation extends FormatMetricAggregationBase { + compression?: number; +} + +export interface MetricAggregationBase { + field?: Common.Field; + missing?: Missing; + script?: Common.Script; +} + +export type MinAggregate = SingleMetricAggregateBase & Record + +export type MinAggregation = FormatMetricAggregationBase & Record + +export type MinBucketAggregation = PipelineAggregationBase & Record + +export type MinimumInterval = 'day' | 'hour' | 'minute' | 'month' | 'second' | 'year' + +export type Missing = string | number | number | boolean + +export type MissingAggregate = SingleBucketAggregateBase & Record + +export interface MissingAggregation extends BucketAggregationBase { + field?: Common.Field; + missing?: Missing; +} + +export type MissingOrder = 'default' | 'first' | 'last' + +export type MovingAverageAggregation = LinearMovingAverageAggregation | SimpleMovingAverageAggregation | EwmaMovingAverageAggregation | HoltMovingAverageAggregation | HoltWintersMovingAverageAggregation + +export interface MovingAverageAggregationBase extends PipelineAggregationBase { + minimize?: boolean; + predict?: number; + window?: number; +} + +export interface MovingFunctionAggregation extends PipelineAggregationBase { + script?: string; + shift?: number; + window?: number; +} + +export interface MovingPercentilesAggregation extends PipelineAggregationBase { + keyed?: boolean; + shift?: number; + window?: number; +} + +export interface MultiBucketAggregateBaseAdjacencyMatrixBucket extends AggregateBase { + buckets: BucketsAdjacencyMatrixBucket; +} + +export interface MultiBucketAggregateBaseCompositeBucket extends AggregateBase { + buckets: BucketsCompositeBucket; +} + +export interface MultiBucketAggregateBaseDateHistogramBucket extends AggregateBase { + buckets: BucketsDateHistogramBucket; +} + +export interface MultiBucketAggregateBaseDoubleTermsBucket extends AggregateBase { + buckets: BucketsDoubleTermsBucket; +} + +export interface MultiBucketAggregateBaseFiltersBucket extends AggregateBase { + buckets: BucketsFiltersBucket; +} + +export interface MultiBucketAggregateBaseFrequentItemSetsBucket extends AggregateBase { + buckets: BucketsFrequentItemSetsBucket; +} + +export interface MultiBucketAggregateBaseGeoHashGridBucket extends AggregateBase { + buckets: BucketsGeoHashGridBucket; +} + +export interface MultiBucketAggregateBaseGeoHexGridBucket extends AggregateBase { + buckets: BucketsGeoHexGridBucket; +} + +export interface MultiBucketAggregateBaseGeoTileGridBucket extends AggregateBase { + buckets: BucketsGeoTileGridBucket; +} + +export interface MultiBucketAggregateBaseHistogramBucket extends AggregateBase { + buckets: BucketsHistogramBucket; +} + +export interface MultiBucketAggregateBaseIpPrefixBucket extends AggregateBase { + buckets: BucketsIpPrefixBucket; +} + +export interface MultiBucketAggregateBaseIpRangeBucket extends AggregateBase { + buckets: BucketsIpRangeBucket; +} + +export interface MultiBucketAggregateBaseLongRareTermsBucket extends AggregateBase { + buckets: BucketsLongRareTermsBucket; +} + +export interface MultiBucketAggregateBaseLongTermsBucket extends AggregateBase { + buckets: BucketsLongTermsBucket; +} + +export interface MultiBucketAggregateBaseMultiTermsBucket extends AggregateBase { + buckets: BucketsMultiTermsBucket; +} + +export interface MultiBucketAggregateBaseRangeBucket extends AggregateBase { + buckets: BucketsRangeBucket; +} + +export interface MultiBucketAggregateBaseSignificantLongTermsBucket extends AggregateBase { + buckets: BucketsSignificantLongTermsBucket; +} + +export interface MultiBucketAggregateBaseSignificantStringTermsBucket extends AggregateBase { + buckets: BucketsSignificantStringTermsBucket; +} + +export interface MultiBucketAggregateBaseStringRareTermsBucket extends AggregateBase { + buckets: BucketsStringRareTermsBucket; +} + +export interface MultiBucketAggregateBaseStringTermsBucket extends AggregateBase { + buckets: BucketsStringTermsBucket; +} + +export interface MultiBucketAggregateBaseVariableWidthHistogramBucket extends AggregateBase { + buckets: BucketsVariableWidthHistogramBucket; +} + +export interface MultiBucketAggregateBaseVoid extends AggregateBase { + buckets: BucketsVoid; +} + +export interface MultiBucketBase { + doc_count: number; +} + +export interface MultiTermLookup { + field: Common.Field; + missing?: Missing; +} + +export type MultiTermsAggregate = TermsAggregateBaseMultiTermsBucket & Record + +export interface MultiTermsAggregation extends BucketAggregationBase { + collect_mode?: TermsAggregationCollectMode; + min_doc_count?: number; + order?: AggregateOrder; + shard_min_doc_count?: number; + shard_size?: number; + show_term_doc_count_error?: boolean; + size?: number; + terms: MultiTermLookup[]; +} + +export interface MultiTermsBucket extends MultiBucketBase { + doc_count_error_upper_bound?: number; + key: Common.FieldValue[]; + key_as_string?: string; +} + +export interface MutualInformationHeuristic { + background_is_superset?: boolean; + include_negatives?: boolean; +} + +export type NestedAggregate = SingleBucketAggregateBase & Record + +export interface NestedAggregation extends BucketAggregationBase { + path?: Common.Field; +} + +export interface NormalizeAggregation extends PipelineAggregationBase { + method?: NormalizeMethod; +} + +export type NormalizeMethod = 'mean' | 'percent_of_sum' | 'rescale_0_1' | 'rescale_0_100' | 'softmax' | 'z-score' + +export type ParentAggregate = SingleBucketAggregateBase & Record + +export interface ParentAggregation extends BucketAggregationBase { + type?: Common.RelationName; +} + +export type PercentageScoreHeuristic = Record + +export interface PercentileRanksAggregation extends FormatMetricAggregationBase { + hdr?: HdrMethod; + keyed?: boolean; + tdigest?: TDigest; + values?: number[] | undefined | string; +} + +export type Percentiles = KeyedPercentiles | ArrayPercentilesItem[] + +export interface PercentilesAggregateBase extends AggregateBase { + values: Percentiles; +} + +export interface PercentilesAggregation extends FormatMetricAggregationBase { + hdr?: HdrMethod; + keyed?: boolean; + percents?: number[]; + tdigest?: TDigest; +} + +export type PercentilesBucketAggregate = PercentilesAggregateBase & Record + +export interface PercentilesBucketAggregation extends PipelineAggregationBase { + percents?: number[]; +} + +export interface PipelineAggregationBase extends BucketPathAggregation { + format?: string; + gap_policy?: GapPolicy; +} + +export type RangeAggregate = MultiBucketAggregateBaseRangeBucket & Record + +export interface RangeAggregation extends BucketAggregationBase { + field?: Common.Field; + format?: string; + keyed?: boolean; + missing?: number; + ranges?: AggregationRange[]; + script?: Common.Script; +} + +export interface RangeBucket extends MultiBucketBase { + from?: number; + from_as_string?: string; + key?: string; + to?: number; + to_as_string?: string; +} + +export interface RareTermsAggregation extends BucketAggregationBase { + exclude?: TermsExclude; + field?: Common.Field; + include?: TermsInclude; + max_doc_count?: number; + missing?: Missing; + precision?: number; + value_type?: string; +} + +export interface RateAggregate extends AggregateBase { + value: number; + value_as_string?: string; +} + +export interface RateAggregation extends FormatMetricAggregationBase { + mode?: RateMode; + unit?: CalendarInterval; +} + +export type RateMode = 'sum' | 'value_count' + +export interface RegressionInferenceOptions { + num_top_feature_importance_values?: number; + results_field?: Common.Field; +} + +export type ReverseNestedAggregate = SingleBucketAggregateBase & Record + +export interface ReverseNestedAggregation extends BucketAggregationBase { + path?: Common.Field; +} + +export type SamplerAggregate = SingleBucketAggregateBase & Record + +export interface SamplerAggregation extends BucketAggregationBase { + shard_size?: number; +} + +export type SamplerAggregationExecutionHint = 'bytes_hash' | 'global_ordinals' | 'map' + +export interface ScriptedHeuristic { + script: Common.Script; +} + +export interface ScriptedMetricAggregate extends AggregateBase { + value: Record; +} + +export interface ScriptedMetricAggregation extends MetricAggregationBase { + combine_script?: Common.Script; + init_script?: Common.Script; + map_script?: Common.Script; + params?: Record>; + reduce_script?: Common.Script; +} + +export interface SerialDifferencingAggregation extends PipelineAggregationBase { + lag?: number; +} + +export type SignificantLongTermsAggregate = SignificantTermsAggregateBaseSignificantLongTermsBucket & Record + +export interface SignificantLongTermsBucket extends SignificantTermsBucketBase { + key: number; + key_as_string?: string; +} + +export type SignificantStringTermsAggregate = SignificantTermsAggregateBaseSignificantStringTermsBucket & Record + +export interface SignificantStringTermsBucket extends SignificantTermsBucketBase { + key: string; +} + +export interface SignificantTermsAggregateBaseSignificantLongTermsBucket extends MultiBucketAggregateBaseSignificantLongTermsBucket { + bg_count?: number; + doc_count?: number; +} + +export interface SignificantTermsAggregateBaseSignificantStringTermsBucket extends MultiBucketAggregateBaseSignificantStringTermsBucket { + bg_count?: number; + doc_count?: number; +} + +export interface SignificantTermsAggregateBaseVoid extends MultiBucketAggregateBaseVoid { + bg_count?: number; + doc_count?: number; +} + +export interface SignificantTermsAggregation extends BucketAggregationBase { + background_filter?: Common_QueryDsl.QueryContainer; + chi_square?: ChiSquareHeuristic; + exclude?: TermsExclude; + execution_hint?: TermsAggregationExecutionHint; + field?: Common.Field; + gnd?: GoogleNormalizedDistanceHeuristic; + include?: TermsInclude; + jlh?: Common.EmptyObject; + min_doc_count?: number; + mutual_information?: MutualInformationHeuristic; + percentage?: PercentageScoreHeuristic; + script_heuristic?: ScriptedHeuristic; + shard_min_doc_count?: number; + shard_size?: number; + size?: number; +} + +export interface SignificantTermsBucketBase extends MultiBucketBase { + bg_count: number; + score: number; +} + +export interface SignificantTextAggregation extends BucketAggregationBase { + background_filter?: Common_QueryDsl.QueryContainer; + chi_square?: ChiSquareHeuristic; + exclude?: TermsExclude; + execution_hint?: TermsAggregationExecutionHint; + field?: Common.Field; + filter_duplicate_text?: boolean; + gnd?: GoogleNormalizedDistanceHeuristic; + include?: TermsInclude; + jlh?: Common.EmptyObject; + min_doc_count?: number; + mutual_information?: MutualInformationHeuristic; + percentage?: PercentageScoreHeuristic; + script_heuristic?: ScriptedHeuristic; + shard_min_doc_count?: number; + shard_size?: number; + size?: number; + source_fields?: Common.Fields; +} + +export interface SimpleMovingAverageAggregation extends MovingAverageAggregationBase { + model: 'simple'; + settings: Common.EmptyObject; +} + +export type SimpleValueAggregate = SingleMetricAggregateBase & Record + +export interface SingleBucketAggregateBase extends AggregateBase { + doc_count: number; +} + +export interface SingleMetricAggregateBase extends AggregateBase { + value: undefined | number | string; + value_as_string?: string; +} + +export interface StandardDeviationBounds { + lower: undefined | number | string; + lower_population: undefined | number | string; + lower_sampling: undefined | number | string; + upper: undefined | number | string; + upper_population: undefined | number | string; + upper_sampling: undefined | number | string; +} + +export interface StandardDeviationBoundsAsString { + lower: string; + lower_population: string; + lower_sampling: string; + upper: string; + upper_population: string; + upper_sampling: string; +} + +export interface StatsAggregate extends AggregateBase { + avg: undefined | number | string; + avg_as_string?: string; + count: number; + max: undefined | number | string; + max_as_string?: string; + min: undefined | number | string; + min_as_string?: string; + sum: number; + sum_as_string?: string; +} + +export type StatsAggregation = FormatMetricAggregationBase & Record + +export type StatsBucketAggregate = StatsAggregate & Record + +export type StatsBucketAggregation = PipelineAggregationBase & Record + +export type StringRareTermsAggregate = MultiBucketAggregateBaseStringRareTermsBucket & Record + +export interface StringRareTermsBucket extends MultiBucketBase { + key: string; +} + +export interface StringStatsAggregate extends AggregateBase { + avg_length: undefined | number | string; + avg_length_as_string?: string; + count: number; + distribution?: undefined | Record | string; + entropy: undefined | number | string; + max_length: undefined | number | string; + max_length_as_string?: string; + min_length: undefined | number | string; + min_length_as_string?: string; +} + +export interface StringStatsAggregation extends MetricAggregationBase { + show_distribution?: boolean; +} + +export type StringTermsAggregate = TermsAggregateBaseStringTermsBucket & Record + +export interface StringTermsBucket extends TermsBucketBase { + key: Common.FieldValue; +} + +export type SumAggregate = SingleMetricAggregateBase & Record + +export type SumAggregation = FormatMetricAggregationBase & Record + +export type SumBucketAggregation = PipelineAggregationBase & Record + +export interface TDigest { + compression?: number; +} + +export type TDigestPercentileRanksAggregate = PercentilesAggregateBase & Record + +export type TDigestPercentilesAggregate = PercentilesAggregateBase & Record + +export interface TermsAggregateBaseDoubleTermsBucket extends MultiBucketAggregateBaseDoubleTermsBucket { + doc_count_error_upper_bound?: number; + sum_other_doc_count?: number; +} + +export interface TermsAggregateBaseLongTermsBucket extends MultiBucketAggregateBaseLongTermsBucket { + doc_count_error_upper_bound?: number; + sum_other_doc_count?: number; +} + +export interface TermsAggregateBaseMultiTermsBucket extends MultiBucketAggregateBaseMultiTermsBucket { + doc_count_error_upper_bound?: number; + sum_other_doc_count?: number; +} + +export interface TermsAggregateBaseStringTermsBucket extends MultiBucketAggregateBaseStringTermsBucket { + doc_count_error_upper_bound?: number; + sum_other_doc_count?: number; +} + +export interface TermsAggregateBaseVoid extends MultiBucketAggregateBaseVoid { + doc_count_error_upper_bound?: number; + sum_other_doc_count?: number; +} + +export interface TermsAggregation extends BucketAggregationBase { + collect_mode?: TermsAggregationCollectMode; + exclude?: TermsExclude; + execution_hint?: TermsAggregationExecutionHint; + field?: Common.Field; + format?: string; + include?: TermsInclude; + min_doc_count?: number; + missing?: Missing; + missing_bucket?: boolean; + missing_order?: MissingOrder; + order?: AggregateOrder; + script?: Common.Script; + shard_size?: number; + show_term_doc_count_error?: boolean; + size?: number; + value_type?: string; +} + +export type TermsAggregationCollectMode = 'breadth_first' | 'depth_first' + +export type TermsAggregationExecutionHint = 'global_ordinals' | 'global_ordinals_hash' | 'global_ordinals_low_cardinality' | 'map' + +export interface TermsBucketBase extends MultiBucketBase { + doc_count_error?: number; +} + +export type TermsExclude = string | string[] + +export type TermsInclude = string | string[] | TermsPartition + +export interface TermsPartition { + num_partitions: number; + partition: number; +} + +export interface TestPopulation { + field: Common.Field; + filter?: Common_QueryDsl.QueryContainer; + script?: Common.Script; +} + +export interface TopHitsAggregate extends AggregateBase { + hits: Core_Search.HitsMetadata; +} + +export interface TopHitsAggregation extends MetricAggregationBase { + _source?: Core_Search.SourceConfig; + docvalue_fields?: Common.Fields; + explain?: boolean; + from?: number; + highlight?: Core_Search.Highlight; + script_fields?: Record; + seq_no_primary_term?: boolean; + size?: number; + sort?: Common.Sort; + stored_fields?: Common.Fields; + track_scores?: boolean; + version?: boolean; +} + +export interface TopMetrics { + metrics: Record; + sort: Common.FieldValue[]; +} + +export interface TopMetricsAggregate extends AggregateBase { + top: TopMetrics[]; +} + +export interface TopMetricsAggregation extends MetricAggregationBase { + metrics?: TopMetricsValue | TopMetricsValue[]; + size?: number; + sort?: Common.Sort; +} + +export interface TopMetricsValue { + field: Common.Field; +} + +export interface TTestAggregate extends AggregateBase { + value: undefined | number | string; + value_as_string?: string; +} + +export interface TTestAggregation extends Aggregation { + a?: TestPopulation; + b?: TestPopulation; + type?: TTestType; +} + +export type TTestType = 'heteroscedastic' | 'homoscedastic' | 'paired' + +export type UnmappedRareTermsAggregate = MultiBucketAggregateBaseVoid & Record + +export type UnmappedSamplerAggregate = SingleBucketAggregateBase & Record + +export type UnmappedSignificantTermsAggregate = SignificantTermsAggregateBaseVoid & Record + +export type UnmappedTermsAggregate = TermsAggregateBaseVoid & Record + +export type ValueCountAggregate = SingleMetricAggregateBase & Record + +export type ValueCountAggregation = FormattableMetricAggregation & Record + +export type ValueType = 'boolean' | 'date' | 'date_nanos' | 'double' | 'geo_point' | 'ip' | 'long' | 'number' | 'numeric' | 'string' + +export type VariableWidthHistogramAggregate = MultiBucketAggregateBaseVariableWidthHistogramBucket & Record + +export interface VariableWidthHistogramAggregation { + buckets?: number; + field?: Common.Field; + initial_buffer?: number; + shard_size?: number; +} + +export interface VariableWidthHistogramBucket extends MultiBucketBase { + key: number; + key_as_string?: string; + max: number; + max_as_string?: string; + min: number; + min_as_string?: string; +} + +export interface WeightedAverageAggregation extends Aggregation { + format?: string; + value?: WeightedAverageValue; + value_type?: ValueType; + weight?: WeightedAverageValue; +} + +export interface WeightedAverageValue { + field?: Common.Field; + missing?: number; + script?: Common.Script; +} + +export type WeightedAvgAggregate = SingleMetricAggregateBase & Record + diff --git a/api/_types/_common.analysis.d.ts b/api/_types/_common.analysis.d.ts new file mode 100644 index 000000000..3151a7b55 --- /dev/null +++ b/api/_types/_common.analysis.d.ts @@ -0,0 +1,644 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export type Analyzer = CustomAnalyzer | FingerprintAnalyzer | KeywordAnalyzer | LanguageAnalyzer | NoriAnalyzer | PatternAnalyzer | SimpleAnalyzer | StandardAnalyzer | StopAnalyzer | WhitespaceAnalyzer | IcuAnalyzer | KuromojiAnalyzer | SnowballAnalyzer | DutchAnalyzer + +export interface AsciiFoldingTokenFilter extends TokenFilterBase { + preserve_original?: Common.Stringifiedboolean; + type: 'asciifolding'; +} + +export type CharFilter = string | CharFilterDefinition + +export interface CharFilterBase { + version?: Common.VersionString; +} + +export type CharFilterDefinition = HtmlStripCharFilter | MappingCharFilter | PatternReplaceCharFilter | IcuNormalizationCharFilter | KuromojiIterationMarkCharFilter + +export interface CharGroupTokenizer extends TokenizerBase { + max_token_length?: number; + tokenize_on_chars: string[]; + type: 'char_group'; +} + +export interface CommonGramsTokenFilter extends TokenFilterBase { + common_words?: string[]; + common_words_path?: string; + ignore_case?: boolean; + query_mode?: boolean; + type: 'common_grams'; +} + +export interface CompoundWordTokenFilterBase extends TokenFilterBase { + hyphenation_patterns_path?: string; + max_subword_size?: number; + min_subword_size?: number; + min_word_size?: number; + only_longest_match?: boolean; + word_list?: string[]; + word_list_path?: string; +} + +export interface ConditionTokenFilter extends TokenFilterBase { + filter: string[]; + script: Common.Script; + type: 'condition'; +} + +export interface CustomAnalyzer { + char_filter?: string[]; + filter?: string[]; + position_increment_gap?: number; + position_offset_gap?: number; + tokenizer: string; + type: 'custom'; +} + +export interface CustomNormalizer { + char_filter?: string[]; + filter?: string[]; + type: 'custom'; +} + +export type DelimitedPayloadEncoding = 'float' | 'identity' | 'int' + +export interface DelimitedPayloadTokenFilter extends TokenFilterBase { + delimiter?: string; + encoding?: DelimitedPayloadEncoding; + type: 'delimited_payload'; +} + +export interface DictionaryDecompounderTokenFilter extends CompoundWordTokenFilterBase { + type: 'dictionary_decompounder'; +} + +export interface DutchAnalyzer { + stopwords?: StopWords; + type: 'dutch'; +} + +export type EdgeNGramSide = 'back' | 'front' + +export interface EdgeNGramTokenFilter extends TokenFilterBase { + max_gram?: number; + min_gram?: number; + preserve_original?: Common.Stringifiedboolean; + side?: EdgeNGramSide; + type: 'edge_ngram'; +} + +export interface EdgeNGramTokenizer extends TokenizerBase { + custom_token_chars?: string; + max_gram: number; + min_gram: number; + token_chars: TokenChar[]; + type: 'edge_ngram'; +} + +export interface ElisionTokenFilter extends TokenFilterBase { + articles?: string[]; + articles_case?: Common.Stringifiedboolean; + articles_path?: string; + type: 'elision'; +} + +export interface FingerprintAnalyzer { + max_output_size: number; + preserve_original: boolean; + separator: string; + stopwords?: StopWords; + stopwords_path?: string; + type: 'fingerprint'; + version?: Common.VersionString; +} + +export interface FingerprintTokenFilter extends TokenFilterBase { + max_output_size?: number; + separator?: string; + type: 'fingerprint'; +} + +export interface HtmlStripCharFilter extends CharFilterBase { + type: 'html_strip'; +} + +export interface HunspellTokenFilter extends TokenFilterBase { + dedup?: boolean; + dictionary?: string; + locale: string; + longest_only?: boolean; + type: 'hunspell'; +} + +export interface HyphenationDecompounderTokenFilter extends CompoundWordTokenFilterBase { + type: 'hyphenation_decompounder'; +} + +export interface IcuAnalyzer { + method: IcuNormalizationType; + mode: IcuNormalizationMode; + type: 'icu_analyzer'; +} + +export type IcuCollationAlternate = 'non-ignorable' | 'shifted' + +export type IcuCollationCaseFirst = 'lower' | 'upper' + +export type IcuCollationDecomposition = 'identical' | 'no' + +export type IcuCollationStrength = 'identical' | 'primary' | 'quaternary' | 'secondary' | 'tertiary' + +export interface IcuCollationTokenFilter extends TokenFilterBase { + alternate?: IcuCollationAlternate; + caseFirst?: IcuCollationCaseFirst; + caseLevel?: boolean; + country?: string; + decomposition?: IcuCollationDecomposition; + hiraganaQuaternaryMode?: boolean; + language?: string; + numeric?: boolean; + rules?: string; + strength?: IcuCollationStrength; + type: 'icu_collation'; + variableTop?: string; + variant?: string; +} + +export interface IcuFoldingTokenFilter extends TokenFilterBase { + type: 'icu_folding'; + unicode_set_filter: string; +} + +export interface IcuNormalizationCharFilter extends CharFilterBase { + mode?: IcuNormalizationMode; + name?: IcuNormalizationType; + type: 'icu_normalizer'; +} + +export type IcuNormalizationMode = 'compose' | 'decompose' + +export interface IcuNormalizationTokenFilter extends TokenFilterBase { + name: IcuNormalizationType; + type: 'icu_normalizer'; +} + +export type IcuNormalizationType = 'nfc' | 'nfkc' | 'nfkc_cf' + +export interface IcuTokenizer extends TokenizerBase { + rule_files: string; + type: 'icu_tokenizer'; +} + +export type IcuTransformDirection = 'forward' | 'reverse' + +export interface IcuTransformTokenFilter extends TokenFilterBase { + dir?: IcuTransformDirection; + id: string; + type: 'icu_transform'; +} + +export type KeepTypesMode = 'exclude' | 'include' + +export interface KeepTypesTokenFilter extends TokenFilterBase { + mode?: KeepTypesMode; + type: 'keep_types'; + types?: string[]; +} + +export interface KeepWordsTokenFilter extends TokenFilterBase { + keep_words?: string[]; + keep_words_case?: boolean; + keep_words_path?: string; + type: 'keep'; +} + +export interface KeywordAnalyzer { + type: 'keyword'; + version?: Common.VersionString; +} + +export interface KeywordMarkerTokenFilter extends TokenFilterBase { + ignore_case?: boolean; + keywords?: string[]; + keywords_path?: string; + keywords_pattern?: string; + type: 'keyword_marker'; +} + +export interface KeywordTokenizer extends TokenizerBase { + buffer_size: number; + type: 'keyword'; +} + +export interface KStemTokenFilter extends TokenFilterBase { + type: 'kstem'; +} + +export interface KuromojiAnalyzer { + mode: KuromojiTokenizationMode; + type: 'kuromoji'; + user_dictionary?: string; +} + +export interface KuromojiIterationMarkCharFilter extends CharFilterBase { + normalize_kana: boolean; + normalize_kanji: boolean; + type: 'kuromoji_iteration_mark'; +} + +export interface KuromojiPartOfSpeechTokenFilter extends TokenFilterBase { + stoptags: string[]; + type: 'kuromoji_part_of_speech'; +} + +export interface KuromojiReadingFormTokenFilter extends TokenFilterBase { + type: 'kuromoji_readingform'; + use_romaji: boolean; +} + +export interface KuromojiStemmerTokenFilter extends TokenFilterBase { + minimum_length: number; + type: 'kuromoji_stemmer'; +} + +export type KuromojiTokenizationMode = 'extended' | 'normal' | 'search' + +export interface KuromojiTokenizer extends TokenizerBase { + discard_compound_token?: boolean; + discard_punctuation?: boolean; + mode: KuromojiTokenizationMode; + nbest_cost?: number; + nbest_examples?: string; + type: 'kuromoji_tokenizer'; + user_dictionary?: string; + user_dictionary_rules?: string[]; +} + +export type Language = 'Arabic' | 'Armenian' | 'Basque' | 'Brazilian' | 'Bulgarian' | 'Catalan' | 'Chinese' | 'Cjk' | 'Czech' | 'Danish' | 'Dutch' | 'English' | 'Estonian' | 'Finnish' | 'French' | 'Galician' | 'German' | 'Greek' | 'Hindi' | 'Hungarian' | 'Indonesian' | 'Irish' | 'Italian' | 'Latvian' | 'Norwegian' | 'Persian' | 'Portuguese' | 'Romanian' | 'Russian' | 'Sorani' | 'Spanish' | 'Swedish' | 'Thai' | 'Turkish' + +export interface LanguageAnalyzer { + language: Language; + stem_exclusion: string[]; + stopwords?: StopWords; + stopwords_path?: string; + type: 'language'; + version?: Common.VersionString; +} + +export interface LengthTokenFilter extends TokenFilterBase { + max?: number; + min?: number; + type: 'length'; +} + +export interface LetterTokenizer extends TokenizerBase { + type: 'letter'; +} + +export interface LimitTokenCountTokenFilter extends TokenFilterBase { + consume_all_tokens?: boolean; + max_token_count?: Common.Stringifiedinteger; + type: 'limit'; +} + +export interface LowercaseNormalizer { + type: 'lowercase'; +} + +export interface LowercaseTokenFilter extends TokenFilterBase { + language?: string; + type: 'lowercase'; +} + +export interface LowercaseTokenizer extends TokenizerBase { + type: 'lowercase'; +} + +export interface MappingCharFilter extends CharFilterBase { + mappings?: string[]; + mappings_path?: string; + type: 'mapping'; +} + +export interface MultiplexerTokenFilter extends TokenFilterBase { + filters: string[]; + preserve_original?: Common.Stringifiedboolean; + type: 'multiplexer'; +} + +export interface NGramTokenFilter extends TokenFilterBase { + max_gram?: number; + min_gram?: number; + preserve_original?: Common.Stringifiedboolean; + type: 'ngram'; +} + +export interface NGramTokenizer extends TokenizerBase { + custom_token_chars?: string; + max_gram: number; + min_gram: number; + token_chars: TokenChar[]; + type: 'ngram'; +} + +export interface NoriAnalyzer { + decompound_mode?: NoriDecompoundMode; + stoptags?: string[]; + type: 'nori'; + user_dictionary?: string; + version?: Common.VersionString; +} + +export type NoriDecompoundMode = 'discard' | 'mixed' | 'none' + +export interface NoriPartOfSpeechTokenFilter extends TokenFilterBase { + stoptags?: string[]; + type: 'nori_part_of_speech'; +} + +export interface NoriTokenizer extends TokenizerBase { + decompound_mode?: NoriDecompoundMode; + discard_punctuation?: boolean; + type: 'nori_tokenizer'; + user_dictionary?: string; + user_dictionary_rules?: string[]; +} + +export type Normalizer = LowercaseNormalizer | CustomNormalizer + +export interface PathHierarchyTokenizer extends TokenizerBase { + buffer_size: Common.Stringifiedinteger; + delimiter: string; + replacement?: string; + reverse: Common.Stringifiedboolean; + skip: Common.Stringifiedinteger; + type: 'path_hierarchy'; +} + +export interface PatternAnalyzer { + flags?: string; + lowercase?: boolean; + pattern: string; + stopwords?: StopWords; + type: 'pattern'; + version?: Common.VersionString; +} + +export interface PatternCaptureTokenFilter extends TokenFilterBase { + patterns: string[]; + preserve_original?: Common.Stringifiedboolean; + type: 'pattern_capture'; +} + +export interface PatternReplaceCharFilter extends CharFilterBase { + flags?: string; + pattern: string; + replacement?: string; + type: 'pattern_replace'; +} + +export interface PatternReplaceTokenFilter extends TokenFilterBase { + all?: boolean; + flags?: string; + pattern: string; + replacement?: string; + type: 'pattern_replace'; +} + +export interface PatternTokenizer extends TokenizerBase { + flags?: string; + group?: number; + pattern?: string; + type: 'pattern'; +} + +export type PhoneticEncoder = 'beider_morse' | 'caverphone1' | 'caverphone2' | 'cologne' | 'daitch_mokotoff' | 'double_metaphone' | 'haasephonetik' | 'koelnerphonetik' | 'metaphone' | 'nysiis' | 'refined_soundex' | 'soundex' + +export type PhoneticLanguage = 'any' | 'common' | 'cyrillic' | 'english' | 'french' | 'german' | 'hebrew' | 'hungarian' | 'polish' | 'romanian' | 'russian' | 'spanish' + +export type PhoneticNameType = 'ashkenazi' | 'generic' | 'sephardic' + +export type PhoneticRuleType = 'approx' | 'exact' + +export interface PhoneticTokenFilter extends TokenFilterBase { + encoder: PhoneticEncoder; + languageset: PhoneticLanguage[]; + max_code_len?: number; + name_type: PhoneticNameType; + replace?: boolean; + rule_type: PhoneticRuleType; + type: 'phonetic'; +} + +export interface PorterStemTokenFilter extends TokenFilterBase { + type: 'porter_stem'; +} + +export interface PredicateTokenFilter extends TokenFilterBase { + script: Common.Script; + type: 'predicate_token_filter'; +} + +export interface RemoveDuplicatesTokenFilter extends TokenFilterBase { + type: 'remove_duplicates'; +} + +export interface ReverseTokenFilter extends TokenFilterBase { + type: 'reverse'; +} + +export interface ShingleTokenFilter extends TokenFilterBase { + filler_token?: string; + max_shingle_size?: number | string; + min_shingle_size?: number | string; + output_unigrams?: boolean; + output_unigrams_if_no_shingles?: boolean; + token_separator?: string; + type: 'shingle'; +} + +export interface SimpleAnalyzer { + type: 'simple'; + version?: Common.VersionString; +} + +export interface SnowballAnalyzer { + language: SnowballLanguage; + stopwords?: StopWords; + type: 'snowball'; + version?: Common.VersionString; +} + +export type SnowballLanguage = 'Armenian' | 'Basque' | 'Catalan' | 'Danish' | 'Dutch' | 'English' | 'Finnish' | 'French' | 'German' | 'German2' | 'Hungarian' | 'Italian' | 'Kp' | 'Lovins' | 'Norwegian' | 'Porter' | 'Portuguese' | 'Romanian' | 'Russian' | 'Spanish' | 'Swedish' | 'Turkish' + +export interface SnowballTokenFilter extends TokenFilterBase { + language: SnowballLanguage; + type: 'snowball'; +} + +export interface StandardAnalyzer { + max_token_length?: number; + stopwords?: StopWords; + type: 'standard'; +} + +export interface StandardTokenizer extends TokenizerBase { + max_token_length?: number; + type: 'standard'; +} + +export interface StemmerOverrideTokenFilter extends TokenFilterBase { + rules?: string[]; + rules_path?: string; + type: 'stemmer_override'; +} + +export interface StemmerTokenFilter extends TokenFilterBase { + language?: string; + type: 'stemmer'; +} + +export interface StopAnalyzer { + stopwords?: StopWords; + stopwords_path?: string; + type: 'stop'; + version?: Common.VersionString; +} + +export interface StopTokenFilter extends TokenFilterBase { + ignore_case?: boolean; + remove_trailing?: boolean; + stopwords?: StopWords; + stopwords_path?: string; + type: 'stop'; +} + +export type StopWords = string | string[] + +export type SynonymFormat = 'solr' | 'wordnet' + +export interface SynonymGraphTokenFilter extends TokenFilterBase { + expand?: boolean; + format?: SynonymFormat; + lenient?: boolean; + synonyms?: string[]; + synonyms_path?: string; + tokenizer?: string; + type: 'synonym_graph'; + updateable?: boolean; +} + +export interface SynonymTokenFilter extends TokenFilterBase { + expand?: boolean; + format?: SynonymFormat; + lenient?: boolean; + synonyms?: string[]; + synonyms_path?: string; + tokenizer?: string; + type: 'synonym'; + updateable?: boolean; +} + +export type TokenChar = 'custom' | 'digit' | 'letter' | 'punctuation' | 'symbol' | 'whitespace' + +export type TokenFilter = string | TokenFilterDefinition + +export interface TokenFilterBase { + version?: Common.VersionString; +} + +export type TokenFilterDefinition = AsciiFoldingTokenFilter | CommonGramsTokenFilter | ConditionTokenFilter | DelimitedPayloadTokenFilter | EdgeNGramTokenFilter | ElisionTokenFilter | FingerprintTokenFilter | HunspellTokenFilter | HyphenationDecompounderTokenFilter | KeepTypesTokenFilter | KeepWordsTokenFilter | KeywordMarkerTokenFilter | KStemTokenFilter | LengthTokenFilter | LimitTokenCountTokenFilter | LowercaseTokenFilter | MultiplexerTokenFilter | NGramTokenFilter | NoriPartOfSpeechTokenFilter | PatternCaptureTokenFilter | PatternReplaceTokenFilter | PorterStemTokenFilter | PredicateTokenFilter | RemoveDuplicatesTokenFilter | ReverseTokenFilter | ShingleTokenFilter | SnowballTokenFilter | StemmerOverrideTokenFilter | StemmerTokenFilter | StopTokenFilter | SynonymGraphTokenFilter | SynonymTokenFilter | TrimTokenFilter | TruncateTokenFilter | UniqueTokenFilter | UppercaseTokenFilter | WordDelimiterGraphTokenFilter | WordDelimiterTokenFilter | KuromojiStemmerTokenFilter | KuromojiReadingFormTokenFilter | KuromojiPartOfSpeechTokenFilter | IcuTokenizer | IcuCollationTokenFilter | IcuFoldingTokenFilter | IcuNormalizationTokenFilter | IcuTransformTokenFilter | PhoneticTokenFilter | DictionaryDecompounderTokenFilter + +export type Tokenizer = string | TokenizerDefinition + +export interface TokenizerBase { + version?: Common.VersionString; +} + +export type TokenizerDefinition = CharGroupTokenizer | EdgeNGramTokenizer | KeywordTokenizer | LetterTokenizer | LowercaseTokenizer | NGramTokenizer | NoriTokenizer | PathHierarchyTokenizer | StandardTokenizer | UaxEmailUrlTokenizer | WhitespaceTokenizer | KuromojiTokenizer | PatternTokenizer | IcuTokenizer + +export interface TrimTokenFilter extends TokenFilterBase { + type: 'trim'; +} + +export interface TruncateTokenFilter extends TokenFilterBase { + length?: number; + type: 'truncate'; +} + +export interface UaxEmailUrlTokenizer extends TokenizerBase { + max_token_length?: number; + type: 'uax_url_email'; +} + +export interface UniqueTokenFilter extends TokenFilterBase { + only_on_same_position?: boolean; + type: 'unique'; +} + +export interface UppercaseTokenFilter extends TokenFilterBase { + type: 'uppercase'; +} + +export interface WhitespaceAnalyzer { + type: 'whitespace'; + version?: Common.VersionString; +} + +export interface WhitespaceTokenizer extends TokenizerBase { + max_token_length?: number; + type: 'whitespace'; +} + +export interface WordDelimiterGraphTokenFilter extends TokenFilterBase { + adjust_offsets?: boolean; + catenate_all?: boolean; + catenate_numbers?: boolean; + catenate_words?: boolean; + generate_number_parts?: boolean; + generate_word_parts?: boolean; + ignore_keywords?: boolean; + preserve_original?: Common.Stringifiedboolean; + protected_words?: string[]; + protected_words_path?: string; + split_on_case_change?: boolean; + split_on_numerics?: boolean; + stem_english_possessive?: boolean; + type: 'word_delimiter_graph'; + type_table?: string[]; + type_table_path?: string; +} + +export interface WordDelimiterTokenFilter extends TokenFilterBase { + catenate_all?: boolean; + catenate_numbers?: boolean; + catenate_words?: boolean; + generate_number_parts?: boolean; + generate_word_parts?: boolean; + preserve_original?: Common.Stringifiedboolean; + protected_words?: string[]; + protected_words_path?: string; + split_on_case_change?: boolean; + split_on_numerics?: boolean; + stem_english_possessive?: boolean; + type: 'word_delimiter'; + type_table?: string[]; + type_table_path?: string; +} + diff --git a/api/_types/_common.d.ts b/api/_types/_common.d.ts new file mode 100644 index 000000000..1720d3e9d --- /dev/null +++ b/api/_types/_common.d.ts @@ -0,0 +1,872 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common_QueryDsl from './_common.query_dsl' +import * as Indices_Stats from './indices.stats' +import * as Cluster_AllocationExplain from './cluster.allocation_explain' + +export interface AcknowledgedResponseBase { + acknowledged: boolean; +} + +export type ActionStatusOptions = 'failure' | 'simulated' | 'success' | 'throttled' + +export interface BaseNode { + attributes: Record; + host: Host; + ip: Ip; + name: Name; + roles?: NodeRoles; + transport_address: TransportAddress; +} + +export interface BulkIndexByScrollFailure { + cause: ErrorCause; + id: Id; + index: IndexName; + status: number; + type: string; +} + +export interface BulkStats { + avg_size?: ByteSize; + avg_size_in_bytes: number; + avg_time?: Duration; + avg_time_in_millis: DurationValueUnitMillis; + total_operations: number; + total_size?: ByteSize; + total_size_in_bytes: number; + total_time?: Duration; + total_time_in_millis: DurationValueUnitMillis; +} + +export type byte = number + +export type Bytes = 'b' | 'g' | 'gb' | 'k' | 'kb' | 'm' | 'mb' | 'p' | 'pb' | 't' | 'tb' + +export type ByteSize = number | string + +export interface ClusterDetails { + _shards?: ShardStatistics; + failures?: ShardFailure[]; + indices: string; + status: ClusterSearchStatus; + timed_out: boolean; + took?: DurationValueUnitMillis; +} + +export type ClusterSearchStatus = 'failed' | 'partial' | 'running' | 'skipped' | 'successful' + +export interface ClusterStatistics { + details?: Record; + failed: number; + partial: number; + running: number; + skipped: number; + successful: number; + total: number; +} + +export interface CompletionStats { + fields?: Record; + size?: ByteSize; + size_in_bytes: number; +} + +export type Conflicts = 'abort' | 'proceed' + +export interface CoordsGeoBounds { + bottom: number; + left: number; + right: number; + top: number; +} + +export type DataStreamName = string + +export type DataStreamNames = DataStreamName | DataStreamName[] + +export type DateFormat = string + +export type DateMath = string + +export type DateTime = string | EpochTimeUnitMillis + +export type DFIIndependenceMeasure = 'chisquared' | 'saturated' | 'standardized' + +export type DFRAfterEffect = 'b' | 'l' | 'no' + +export type DFRBasicModel = 'be' | 'd' | 'g' | 'if' | 'in' | 'ine' | 'p' + +export type Distance = string + +export type DistanceUnit = 'cm' | 'ft' | 'in' | 'km' | 'm' | 'mi' | 'mm' | 'nmi' | 'yd' + +export interface DocStats { + count: number; + deleted?: number; +} + +export interface DocStatus { + '1xx'?: number; + '2xx'?: number; + '3xx'?: number; + '4xx'?: number; + '5xx'?: number; +} + +export type Duration = string + +export type DurationLarge = string + +export type DurationValueUnitMillis = UnitMillis & Record + +export type DurationValueUnitNanos = UnitNanos & Record + +export type EmptyObject = Record + +export type EpochTimeUnitMillis = UnitMillis & Record + +export type EpochTimeUnitSeconds = UnitSeconds & Record + +export interface ErrorCause { + caused_by?: ErrorCause; + reason?: string; + root_cause?: ErrorCause[]; + stack_trace?: string; + suppressed?: ErrorCause[]; + type: string; + [key: string]: any | Record; +} + +export interface ErrorResponseBase { + error: ErrorCause; + status: number; +} + +export type ExpandWildcard = 'all' | 'closed' | 'hidden' | 'none' | 'open' + +export type ExpandWildcards = ExpandWildcard | ExpandWildcard[] + +export type Field = string + +export interface FielddataStats { + evictions?: number; + fields?: Record; + memory_size?: ByteSize; + memory_size_in_bytes: number; +} + +export interface FieldMemoryUsage { + memory_size?: ByteSize; + memory_size_in_bytes: number; +} + +export type Fields = Field | Field[] + +export interface FieldSizeUsage { + size?: ByteSize; + size_in_bytes: number; +} + +export type FieldValue = boolean | undefined | number | Record | string + +export interface FlushStats { + periodic: number; + total: number; + total_time?: Duration; + total_time_in_millis: DurationValueUnitMillis; +} + +export type Fuzziness = string | number + +export type GeoBounds = CoordsGeoBounds | TopLeftBottomRightGeoBounds | TopRightBottomLeftGeoBounds | WktGeoBounds + +export interface GeoDistanceSort { + distance_type?: GeoDistanceType; + ignore_unmapped?: boolean; + mode?: SortMode; + order?: SortOrder; + unit?: DistanceUnit; +} + +export type GeoDistanceType = 'arc' | 'plane' + +export type GeoHash = string + +export interface GeoHashLocation { + geohash: GeoHash; +} + +export type GeoHashPrecision = number | string + +export type GeoHexCell = string + +export interface GeoLine { + coordinates: number[][]; + type: string; +} + +export type GeoLocation = LatLonGeoLocation | GeoHashLocation | number[] | string + +export type GeoShapeRelation = 'contains' | 'disjoint' | 'intersects' | 'within' + +export type GeoTile = string + +export type GeoTilePrecision = number + +export interface GetStats { + current: number; + exists_time?: Duration; + exists_time_in_millis: DurationValueUnitMillis; + exists_total: number; + missing_time?: Duration; + missing_time_in_millis: DurationValueUnitMillis; + missing_total: number; + time?: Duration; + time_in_millis: DurationValueUnitMillis; + total: number; +} + +export type HealthStatus = 'green' | 'red' | 'yellow' + +export type HealthStatusCapitalized = 'GREEN' | 'RED' | 'YELLOW' + +export type Host = string + +export interface HourAndMinute { + hour: number[]; + minute: number[]; +} + +export type HttpHeaders = Record + +export type IBDistribution = 'll' | 'spl' + +export type IBLambda = 'df' | 'ttf' + +export type Id = string + +export type Ids = Id | Id[] + +export type IndexAlias = string + +export interface IndexingStats { + delete_current: number; + delete_time?: Duration; + delete_time_in_millis: DurationValueUnitMillis; + delete_total: number; + doc_status?: DocStatus; + index_current: number; + index_failed: number; + index_time?: Duration; + index_time_in_millis: DurationValueUnitMillis; + index_total: number; + is_throttled: boolean; + noop_update_total: number; + throttle_time?: Duration; + throttle_time_in_millis: DurationValueUnitMillis; + types?: Record; + write_load?: number; +} + +export type IndexName = string + +export type Indices = IndexName | IndexName[] + +export interface IndicesResponseBase extends AcknowledgedResponseBase { + _shards?: ShardStatistics; +} + +export interface InlineGet { + _primary_term?: number; + _routing?: Routing; + _seq_no?: SequenceNumber; + _source?: Record; + fields?: Record>; + found: boolean; +} + +export interface InlineGetDictUserDefined { + _primary_term?: number; + _routing?: Routing; + _seq_no?: SequenceNumber; + _source?: Record; + fields?: Record>; + found: boolean; +} + +export interface InlineScript extends ScriptBase { + lang?: ScriptLanguage; + options?: Record; + source: string; +} + +export type Ip = string + +export interface KnnQuery { + boost?: number; + field: Field; + filter?: Common_QueryDsl.QueryContainer | Common_QueryDsl.QueryContainer[]; + k: number; + num_candidates: number; + query_vector?: QueryVector; + query_vector_builder?: QueryVectorBuilder; + similarity?: number; +} + +export interface LatLonGeoLocation { + lat: number; + lon: number; +} + +export type Level = 'cluster' | 'indices' | 'shards' + +export interface MergesStats { + current: number; + current_docs: number; + current_size?: string; + current_size_in_bytes: number; + total: number; + total_auto_throttle?: string; + total_auto_throttle_in_bytes: number; + total_docs: number; + total_size?: string; + total_size_in_bytes: number; + total_stopped_time?: Duration; + total_stopped_time_in_millis: DurationValueUnitMillis; + total_throttled_time?: Duration; + total_throttled_time_in_millis: DurationValueUnitMillis; + total_time?: Duration; + total_time_in_millis: DurationValueUnitMillis; + unreferenced_file_cleanups_performed?: number; +} + +export type Metadata = Record + +export type Metrics = string | string[] + +export type MinimumShouldMatch = number | string + +export type MultiTermQueryRewrite = string + +export type Name = string + +export type Names = Name | Name[] + +export interface NestedSortValue { + filter?: Common_QueryDsl.QueryContainer; + max_children?: number; + nested?: NestedSortValue; + path: Field; +} + +export interface NodeAttributes { + attributes: Record; + ephemeral_id: Id; + external_id?: string; + id?: NodeId; + name: NodeName; + roles?: NodeRoles; + transport_address: TransportAddress; +} + +export type NodeId = string + +export type NodeIds = NodeId | NodeId[] + +export type NodeName = string + +export type NodeRole = 'client' | 'cluster_manager' | 'coordinating_only' | 'data' | 'data_cold' | 'data_content' | 'data_frozen' | 'data_hot' | 'data_warm' | 'ingest' | 'master' | 'ml' | 'remote_cluster_client' | 'transform' | 'voting_only' + +export type NodeRoles = NodeRole[] + +export interface NodeShard { + allocation_id?: Record; + index: IndexName; + node?: NodeName; + primary: boolean; + recovery_source?: Record; + relocating_node?: NodeId | undefined; + relocation_failure_info?: RelocationFailureInfo; + shard: number; + state: Indices_Stats.ShardRoutingState; + unassigned_info?: Cluster_AllocationExplain.UnassignedInformation; +} + +export interface NodeStatistics { + failed: number; + failures?: ErrorCause[]; + successful: number; + total: number; +} + +export type Normalization = 'h1' | 'h2' | 'h3' | 'no' | 'z' + +export interface OpenSearchVersionInfo { + build_date: DateTime; + build_flavor?: string; + build_hash: string; + build_snapshot: boolean; + build_type: string; + distribution: string; + lucene_version: VersionString; + minimum_index_compatibility_version: VersionString; + minimum_wire_compatibility_version: VersionString; + number: string; +} + +export type OpType = 'create' | 'index' + +export type Password = string + +export type Percentage = string | number + +export interface PhaseTook { + can_match: uint; + dfs_pre_query: uint; + dfs_query: uint; + expand: uint; + fetch: uint; + query: uint; +} + +export type PipelineName = string + +export type PipeSeparatedFlagsSimpleQueryStringFlag = Common_QueryDsl.SimpleQueryStringFlag | string + +export interface PluginStats { + classname: string; + custom_foldername?: undefined | string; + description: string; + extended_plugins: string[]; + has_native_controller: boolean; + java_version: VersionString; + licensed?: boolean; + name: Name; + opensearch_version: VersionString; + version: VersionString; +} + +export interface QueryCacheStats { + cache_count: number; + cache_size: number; + evictions: number; + hit_count: number; + memory_size?: ByteSize; + memory_size_in_bytes: number; + miss_count: number; + total_count: number; +} + +export type QueryVector = number[] + +export interface QueryVectorBuilder { + text_embedding?: TextEmbedding; +} + +export type RankBase = Record + +export interface RankContainer { + rrf?: RrfRank; +} + +export interface RecoveryStats { + current_as_source: number; + current_as_target: number; + throttle_time?: Duration; + throttle_time_in_millis: DurationValueUnitMillis; +} + +export type Refresh = 'false' | 'true' | 'wait_for' + +export interface RefreshStats { + external_total: number; + external_total_time_in_millis: DurationValueUnitMillis; + listeners: number; + total: number; + total_time?: Duration; + total_time_in_millis: DurationValueUnitMillis; +} + +export type RelationName = string + +export interface RelocationFailureInfo { + failed_attempts: number; +} + +export interface RemoteStoreDownloadStats { + total_download_size: RemoteStoreUploadDownloadStats; + total_time_spent_in_millis: DurationValueUnitMillis; +} + +export interface RemoteStoreStats { + download: RemoteStoreDownloadStats; + upload: RemoteStoreUploadStats; +} + +export interface RemoteStoreTranslogStats { + upload: RemoteStoreTranslogUploadStats; +} + +export interface RemoteStoreTranslogUploadStats { + total_upload_size: RemoteStoreTranslogUploadTotalUploadSizeStats; + total_uploads: RemoteStoreTranslogUploadTotalUploadsStats; +} + +export interface RemoteStoreTranslogUploadTotalUploadSizeStats { + failed_bytes: ByteSize; + started_bytes: ByteSize; + succeeded_bytes: ByteSize; +} + +export interface RemoteStoreTranslogUploadTotalUploadsStats { + failed: number; + started: number; + succeeded: number; +} + +export interface RemoteStoreUploadDownloadStats { + failed_bytes: ByteSize; + started_bytes: ByteSize; + succeeded_bytes: ByteSize; +} + +export interface RemoteStoreUploadPressureStats { + total_rejections: number; +} + +export interface RemoteStoreUploadRefreshSizeLagStats { + max_bytes: ByteSize; + total_bytes: ByteSize; +} + +export interface RemoteStoreUploadStats { + max_refresh_time_lag_in_millis: DurationValueUnitMillis; + pressure: RemoteStoreUploadPressureStats; + refresh_size_lag: RemoteStoreUploadRefreshSizeLagStats; + total_time_spent_in_millis: DurationValueUnitMillis; + total_upload_size: RemoteStoreUploadDownloadStats; +} + +export interface RequestCacheStats { + evictions: number; + hit_count: number; + memory_size?: string; + memory_size_in_bytes: number; + miss_count: number; +} + +export interface RequestStats { + current?: number; + time_in_millis?: DurationValueUnitMillis; + total?: number; +} + +export type Result = 'created' | 'deleted' | 'noop' | 'not_found' | 'updated' + +export interface Retries { + bulk: number; + search: number; +} + +export type Routing = string + +export interface RrfRank extends RankBase { + rank_constant?: number; + window_size?: number; +} + +export type ScheduleTimeOfDay = string | HourAndMinute + +export interface ScoreSort { + order?: SortOrder; +} + +export type Script = InlineScript | StoredScriptId + +export interface ScriptBase { + params?: Record; +} + +export interface ScriptField { + ignore_failure?: boolean; + script: Script; +} + +export type ScriptLanguage = 'expression' | 'java' | 'mustache' | 'painless' + +export interface ScriptSort { + mode?: SortMode; + nested?: NestedSortValue; + order?: SortOrder; + script: Script; + type?: ScriptSortType; +} + +export type ScriptSortType = 'number' | 'string' | 'version' + +export type ScrollId = string + +export type ScrollIds = ScrollId | ScrollId[] + +export interface SearchStats { + concurrent_avg_slice_count?: number; + concurrent_query_current?: number; + concurrent_query_time?: Duration; + concurrent_query_time_in_millis?: DurationValueUnitMillis; + concurrent_query_total?: number; + fetch_current: number; + fetch_time?: Duration; + fetch_time_in_millis: DurationValueUnitMillis; + fetch_total: number; + groups?: Record; + open_contexts?: number; + point_in_time_current?: number; + point_in_time_time?: Duration; + point_in_time_time_in_millis?: DurationValueUnitMillis; + point_in_time_total?: number; + query_current: number; + query_time?: Duration; + query_time_in_millis: DurationValueUnitMillis; + query_total: number; + request?: Record; + scroll_current: number; + scroll_time?: Duration; + scroll_time_in_millis: DurationValueUnitMillis; + scroll_total: number; + search_idle_reactivate_count_total?: number; + suggest_current: number; + suggest_time?: Duration; + suggest_time_in_millis: DurationValueUnitMillis; + suggest_total: number; +} + +export type SearchType = 'dfs_query_then_fetch' | 'query_then_fetch' + +export interface SegmentReplicationStats { + max_bytes_behind: ByteSize; + max_replication_lag: ByteSize; + total_bytes_behind: ByteSize; +} + +export interface SegmentsStats { + count: number; + doc_values_memory?: ByteSize; + doc_values_memory_in_bytes: number; + file_sizes: Record; + fixed_bit_set?: ByteSize; + fixed_bit_set_memory_in_bytes: number; + index_writer_max_memory_in_bytes?: number; + index_writer_memory?: ByteSize; + index_writer_memory_in_bytes: number; + max_unsafe_auto_id_timestamp: number; + memory?: ByteSize; + memory_in_bytes: number; + norms_memory?: ByteSize; + norms_memory_in_bytes: number; + points_memory?: ByteSize; + points_memory_in_bytes: number; + remote_store?: RemoteStoreStats; + segment_replication?: SegmentReplicationStats; + stored_fields_memory_in_bytes: number; + stored_memory?: ByteSize; + term_vectors_memory_in_bytes: number; + term_vectory_memory?: ByteSize; + terms_memory?: ByteSize; + terms_memory_in_bytes: number; + version_map_memory?: ByteSize; + version_map_memory_in_bytes: number; +} + +export type SequenceNumber = number + +export interface ShardFailure { + index?: IndexName; + node?: string; + reason: ErrorCause; + shard: number; + status?: string; +} + +export interface ShardsOperationResponseBase { + _shards: ShardStatistics; +} + +export interface ShardStatistics { + failed: uint; + failures?: ShardFailure[]; + skipped?: uint; + successful: uint; + total: uint; +} + +export type short = number + +export interface SlicedScroll { + field?: Field; + id: Id; + max: number; +} + +export type Slices = number | SlicesCalculation + +export type SlicesCalculation = 'auto' + +export type Sort = SortCombinations | SortCombinations[] + +export type SortCombinations = Field | SortOptions + +export type SortMode = 'avg' | 'max' | 'median' | 'min' | 'sum' + +export interface SortOptions { + _doc?: ScoreSort; + _geo_distance?: GeoDistanceSort; + _score?: ScoreSort; + _script?: ScriptSort; +} + +export type SortOrder = 'asc' | 'desc' + +export type SortResults = FieldValue[] + +export interface StoredScript { + lang: ScriptLanguage; + options?: Record; + source: string; +} + +export interface StoredScriptId extends ScriptBase { + id: Id; +} + +export interface StoreStats { + reserved?: ByteSize; + reserved_in_bytes: number; + size?: ByteSize; + size_in_bytes: number; + total_data_set_size?: ByteSize; + total_data_set_size_in_bytes?: number; +} + +export type Stringifiedboolean = boolean | string + +export type StringifiedEpochTimeUnitMillis = EpochTimeUnitMillis | string + +export type StringifiedEpochTimeUnitSeconds = EpochTimeUnitSeconds | string + +export type Stringifiedinteger = number | string + +export type StringifiedVersionNumber = VersionNumber | string + +export type SuggestMode = 'always' | 'missing' | 'popular' + +export interface TaskFailure { + node_id: NodeId; + reason: ErrorCause; + status: string; + task_id: number; +} + +export type TaskId = string | number + +export interface TextEmbedding { + model_id: string; + model_text: string; +} + +export type TimeOfDay = string + +export type TimeUnit = 'd' | 'h' | 'm' | 'micros' | 'ms' | 'nanos' | 's' + +export type TimeZone = string + +export interface TopLeftBottomRightGeoBounds { + bottom_right: GeoLocation; + top_left: GeoLocation; +} + +export interface TopRightBottomLeftGeoBounds { + bottom_left: GeoLocation; + top_right: GeoLocation; +} + +export interface TranslogStats { + earliest_last_modified_age: number; + operations: number; + remote_store?: RemoteStoreTranslogStats; + size?: string; + size_in_bytes: number; + uncommitted_operations: number; + uncommitted_size?: string; + uncommitted_size_in_bytes: number; +} + +export type TransportAddress = string + +export type Type = string + +export type uint = number + +export type ulong = number + +export type UnitMillis = number + +export type UnitNanos = number + +export type UnitSeconds = number + +export type Username = string + +export type Uuid = string + +export type VersionNumber = number + +export type VersionString = string + +export type VersionType = 'external' | 'external_gte' | 'force' | 'internal' + +export type Void = Record + +export type WaitForActiveShardOptions = 'all' | 'index-setting' + +export type WaitForActiveShards = number | WaitForActiveShardOptions + +export type WaitForEvents = 'high' | 'immediate' | 'languid' | 'low' | 'normal' | 'urgent' + +export interface WarmerStats { + current: number; + total: number; + total_time?: Duration; + total_time_in_millis: DurationValueUnitMillis; +} + +export interface WktGeoBounds { + wkt: string; +} + +export interface WriteResponseBase { + _id: Id; + _index: IndexName; + _primary_term: number; + _seq_no: SequenceNumber; + _shards: ShardStatistics; + _type?: Type; + _version: VersionNumber; + forced_refresh?: boolean; + result: Result; +} + diff --git a/api/_types/_common.mapping.d.ts b/api/_types/_common.mapping.d.ts new file mode 100644 index 000000000..fa5b0e31e --- /dev/null +++ b/api/_types/_common.mapping.d.ts @@ -0,0 +1,520 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Indices_Common from './indices._common' +import * as Common from './_common' + +export interface AggregateMetricDoubleProperty extends PropertyBase { + default_metric: string; + metrics: string[]; + time_series_metric?: TimeSeriesMetricType; + type: 'aggregate_metric_double'; +} + +export interface AllField { + analyzer: string; + enabled: boolean; + omit_norms: boolean; + search_analyzer: string; + similarity: string; + store: boolean; + store_term_vector_offsets: boolean; + store_term_vector_payloads: boolean; + store_term_vector_positions: boolean; + store_term_vectors: boolean; +} + +export interface BinaryProperty extends DocValuesPropertyBase { + type: 'binary'; +} + +export interface BooleanProperty extends DocValuesPropertyBase { + boost?: number; + fielddata?: Indices_Common.NumericFielddata; + index?: boolean; + null_value?: boolean; + type: 'boolean'; +} + +export interface ByteNumberProperty extends NumberPropertyBase { + null_value?: Common.byte; + type: 'byte'; +} + +export interface CompletionProperty extends DocValuesPropertyBase { + analyzer?: string; + contexts?: SuggestContext[]; + max_input_length?: number; + preserve_position_increments?: boolean; + preserve_separators?: boolean; + search_analyzer?: string; + type: 'completion'; +} + +export interface ConstantKeywordProperty extends PropertyBase { + type: 'constant_keyword'; + value?: Record; +} + +export interface CorePropertyBase extends PropertyBase { + copy_to?: Common.Fields; + similarity?: string; + store?: boolean; +} + +export interface DataStreamTimestamp { + enabled: boolean; +} + +export interface DateNanosProperty extends DocValuesPropertyBase { + boost?: number; + format?: string; + ignore_malformed?: boolean; + index?: boolean; + null_value?: Common.DateTime; + precision_step?: number; + type: 'date_nanos'; +} + +export interface DateProperty extends DocValuesPropertyBase { + boost?: number; + fielddata?: Indices_Common.NumericFielddata; + format?: string; + ignore_malformed?: boolean; + index?: boolean; + locale?: string; + null_value?: Common.DateTime; + precision_step?: number; + type: 'date'; +} + +export interface DateRangeProperty extends RangePropertyBase { + format?: string; + type: 'date_range'; +} + +export interface DenseVectorIndexOptions { + ef_construction: number; + m: number; + type: string; +} + +export interface DenseVectorProperty extends PropertyBase { + dims: number; + index?: boolean; + index_options?: DenseVectorIndexOptions; + similarity?: string; + type: 'dense_vector'; +} + +export interface DocValuesPropertyBase extends CorePropertyBase { + doc_values?: boolean; +} + +export interface DoubleNumberProperty extends NumberPropertyBase { + null_value?: number; + type: 'double'; +} + +export interface DoubleRangeProperty extends RangePropertyBase { + type: 'double_range'; +} + +export type DynamicMapping = 'false' | 'strict' | 'strict_allow_templates' | 'true' + +export interface DynamicProperty extends DocValuesPropertyBase { + analyzer?: string; + boost?: number; + coerce?: boolean; + eager_global_ordinals?: boolean; + enabled?: boolean; + format?: string; + ignore_malformed?: boolean; + index?: boolean; + index_options?: IndexOptions; + index_phrases?: boolean; + index_prefixes?: TextIndexPrefixes; + locale?: string; + norms?: boolean; + null_value?: Common.FieldValue; + on_script_error?: OnScriptError; + position_increment_gap?: number; + precision_step?: number; + script?: Common.Script; + search_analyzer?: string; + search_quote_analyzer?: string; + term_vector?: TermVectorOption; + time_series_metric?: TimeSeriesMetricType; + type: '{dynamic_property}'; +} + +export interface DynamicTemplate { + mapping?: Property; + match?: string; + match_mapping_type?: string; + match_pattern?: MatchType; + path_match?: string; + path_unmatch?: string; + unmatch?: string; +} + +export interface FieldAliasProperty extends PropertyBase { + path?: Common.Field; + type: 'alias'; +} + +export interface FieldMapping { + full_name: string; + mapping: Record; +} + +export interface FieldNamesField { + enabled: boolean; +} + +export interface FlattenedProperty extends PropertyBase { + boost?: number; + depth_limit?: number; + doc_values?: boolean; + eager_global_ordinals?: boolean; + index?: boolean; + index_options?: IndexOptions; + null_value?: string; + similarity?: string; + split_queries_on_whitespace?: boolean; + type: 'flattened'; +} + +export interface FloatNumberProperty extends NumberPropertyBase { + null_value?: number; + type: 'float'; +} + +export interface FloatRangeProperty extends RangePropertyBase { + type: 'float_range'; +} + +export type GeoOrientation = 'left' | 'right' + +export interface GeoPointProperty extends DocValuesPropertyBase { + ignore_malformed?: boolean; + ignore_z_value?: boolean; + null_value?: Common.GeoLocation; + type: 'geo_point'; +} + +export interface GeoShapeProperty extends DocValuesPropertyBase { + coerce?: boolean; + ignore_malformed?: boolean; + ignore_z_value?: boolean; + orientation?: GeoOrientation; + strategy?: GeoStrategy; + type: 'geo_shape'; +} + +export type GeoStrategy = 'recursive' | 'term' + +export interface HalfFloatNumberProperty extends NumberPropertyBase { + null_value?: number; + type: 'half_float'; +} + +export interface HistogramProperty extends PropertyBase { + ignore_malformed?: boolean; + type: 'histogram'; +} + +export interface IndexField { + enabled: boolean; +} + +export type IndexOptions = 'docs' | 'freqs' | 'offsets' | 'positions' + +export interface IntegerNumberProperty extends NumberPropertyBase { + null_value?: number; + type: 'integer'; +} + +export interface IntegerRangeProperty extends RangePropertyBase { + type: 'integer_range'; +} + +export interface IpProperty extends DocValuesPropertyBase { + boost?: number; + ignore_malformed?: boolean; + index?: boolean; + null_value?: string; + on_script_error?: OnScriptError; + script?: Common.Script; + time_series_dimension?: boolean; + type: 'ip'; +} + +export interface IpRangeProperty extends RangePropertyBase { + type: 'ip_range'; +} + +export interface JoinProperty extends PropertyBase { + eager_global_ordinals?: boolean; + relations?: Record; + type: 'join'; +} + +export interface KeywordProperty extends DocValuesPropertyBase { + boost?: number; + eager_global_ordinals?: boolean; + index?: boolean; + index_options?: IndexOptions; + normalizer?: string; + norms?: boolean; + null_value?: string; + split_queries_on_whitespace?: boolean; + time_series_dimension?: boolean; + type: 'keyword'; +} + +export interface LongNumberProperty extends NumberPropertyBase { + null_value?: number; + type: 'long'; +} + +export interface LongRangeProperty extends RangePropertyBase { + type: 'long_range'; +} + +export interface MatchOnlyTextProperty { + copy_to?: Common.Fields; + fields?: Record; + meta?: Record; + type: 'match_only_text'; +} + +export type MatchType = 'regex' | 'simple' + +export interface Murmur3HashProperty extends DocValuesPropertyBase { + type: 'murmur3'; +} + +export interface NestedProperty extends CorePropertyBase { + enabled?: boolean; + include_in_parent?: boolean; + include_in_root?: boolean; + type: 'nested'; +} + +export interface NumberPropertyBase extends DocValuesPropertyBase { + boost?: number; + coerce?: boolean; + ignore_malformed?: boolean; + index?: boolean; + on_script_error?: OnScriptError; + script?: Common.Script; + time_series_dimension?: boolean; + time_series_metric?: TimeSeriesMetricType; +} + +export interface ObjectProperty extends CorePropertyBase { + enabled?: boolean; + type?: 'object'; +} + +export type OnScriptError = 'continue' | 'fail' + +export interface PercolatorProperty extends PropertyBase { + type: 'percolator'; +} + +export interface PointProperty extends DocValuesPropertyBase { + ignore_malformed?: boolean; + ignore_z_value?: boolean; + null_value?: string; + type: 'point'; +} + +export type Property = BinaryProperty | BooleanProperty | DynamicProperty | JoinProperty | KeywordProperty | MatchOnlyTextProperty | PercolatorProperty | RankFeatureProperty | RankFeaturesProperty | SearchAsYouTypeProperty | TextProperty | VersionProperty | WildcardProperty | DateNanosProperty | DateProperty | AggregateMetricDoubleProperty | DenseVectorProperty | SparseVectorProperty | FlattenedProperty | NestedProperty | ObjectProperty | CompletionProperty | ConstantKeywordProperty | FieldAliasProperty | HistogramProperty | IpProperty | Murmur3HashProperty | TokenCountProperty | GeoPointProperty | GeoShapeProperty | PointProperty | ShapeProperty | ByteNumberProperty | DoubleNumberProperty | FloatNumberProperty | HalfFloatNumberProperty | IntegerNumberProperty | LongNumberProperty | ScaledFloatNumberProperty | ShortNumberProperty | UnsignedLongNumberProperty | DateRangeProperty | DoubleRangeProperty | FloatRangeProperty | IntegerRangeProperty | IpRangeProperty | LongRangeProperty + +export interface PropertyBase { + dynamic?: DynamicMapping; + fields?: Record; + ignore_above?: number; + meta?: Record; + properties?: Record; +} + +export interface RangePropertyBase extends DocValuesPropertyBase { + boost?: number; + coerce?: boolean; + index?: boolean; +} + +export interface RankFeatureProperty extends PropertyBase { + positive_score_impact?: boolean; + type: 'rank_feature'; +} + +export interface RankFeaturesProperty extends PropertyBase { + type: 'rank_features'; +} + +export interface RoutingField { + required: boolean; +} + +export interface RuntimeField { + fetch_fields?: RuntimeFieldFetchFields[]; + format?: string; + input_field?: Common.Field; + script?: Common.Script; + target_field?: Common.Field; + target_index?: Common.IndexName; + type: RuntimeFieldType; +} + +export interface RuntimeFieldFetchFields { + field: Common.Field; + format?: string; +} + +export type RuntimeFields = Record + +export type RuntimeFieldType = 'boolean' | 'date' | 'double' | 'geo_point' | 'ip' | 'keyword' | 'long' | 'lookup' + +export interface ScaledFloatNumberProperty extends NumberPropertyBase { + null_value?: number; + scaling_factor?: number; + type: 'scaled_float'; +} + +export interface SearchAsYouTypeProperty extends CorePropertyBase { + analyzer?: string; + index?: boolean; + index_options?: IndexOptions; + max_shingle_size?: number; + norms?: boolean; + search_analyzer?: string; + search_quote_analyzer?: string; + term_vector?: TermVectorOption; + type: 'search_as_you_type'; +} + +export interface ShapeProperty extends DocValuesPropertyBase { + coerce?: boolean; + ignore_malformed?: boolean; + ignore_z_value?: boolean; + orientation?: GeoOrientation; + type: 'shape'; +} + +export interface ShortNumberProperty extends NumberPropertyBase { + null_value?: Common.short; + type: 'short'; +} + +export interface SizeField { + enabled: boolean; +} + +export interface SourceField { + compress?: boolean; + compress_threshold?: string; + enabled?: boolean; + excludes?: string[]; + includes?: string[]; + mode?: SourceFieldMode; +} + +export type SourceFieldMode = 'disabled' | 'stored' | 'synthetic' + +export interface SparseVectorProperty extends PropertyBase { + type: 'sparse_vector'; +} + +export interface SuggestContext { + name: Common.Name; + path?: Common.Field; + precision?: number | string; + type: string; +} + +export type TermVectorOption = 'no' | 'with_offsets' | 'with_positions' | 'with_positions_offsets' | 'with_positions_offsets_payloads' | 'with_positions_payloads' | 'yes' + +export interface TextIndexPrefixes { + max_chars: number; + min_chars: number; +} + +export interface TextProperty extends CorePropertyBase { + analyzer?: string; + boost?: number; + eager_global_ordinals?: boolean; + fielddata?: boolean; + fielddata_frequency_filter?: Indices_Common.FielddataFrequencyFilter; + index?: boolean; + index_options?: IndexOptions; + index_phrases?: boolean; + index_prefixes?: TextIndexPrefixes; + norms?: boolean; + position_increment_gap?: number; + search_analyzer?: string; + search_quote_analyzer?: string; + term_vector?: TermVectorOption; + type: 'text'; +} + +export type TimeSeriesMetricType = 'counter' | 'gauge' | 'histogram' | 'position' | 'summary' + +export interface TokenCountProperty extends DocValuesPropertyBase { + analyzer?: string; + boost?: number; + enable_position_increments?: boolean; + index?: boolean; + null_value?: number; + type: 'token_count'; +} + +export interface TypeMapping { + _data_stream_timestamp?: DataStreamTimestamp; + _field_names?: FieldNamesField; + _meta?: Common.Metadata; + _routing?: RoutingField; + _size?: SizeField; + _source?: SourceField; + all_field?: AllField; + date_detection?: boolean; + dynamic?: DynamicMapping; + dynamic_date_formats?: string[]; + dynamic_templates?: Record[]; + enabled?: boolean; + index_field?: IndexField; + numeric_detection?: boolean; + properties?: Record; + runtime?: Record; +} + +export interface UnsignedLongNumberProperty extends NumberPropertyBase { + null_value?: Common.ulong; + type: 'unsigned_long'; +} + +export interface VersionProperty extends DocValuesPropertyBase { + type: 'version'; +} + +export interface WildcardProperty extends DocValuesPropertyBase { + null_value?: string; + type: 'wildcard'; +} + diff --git a/api/_types/_common.query_dsl.d.ts b/api/_types/_common.query_dsl.d.ts new file mode 100644 index 000000000..8fcc61bdb --- /dev/null +++ b/api/_types/_common.query_dsl.d.ts @@ -0,0 +1,728 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' +import * as Core_Search from './_core.search' +import * as Common_Analysis from './_common.analysis' + +export interface BoolQuery extends QueryBase { + filter?: QueryContainer | QueryContainer[]; + minimum_should_match?: Common.MinimumShouldMatch; + must?: QueryContainer | QueryContainer[]; + must_not?: QueryContainer | QueryContainer[]; + should?: QueryContainer | QueryContainer[]; +} + +export interface BoostingQuery extends QueryBase { + negative: QueryContainer; + negative_boost: number; + positive: QueryContainer; +} + +export type ChildScoreMode = 'avg' | 'max' | 'min' | 'none' | 'sum' + +export type CombinedFieldsOperator = 'and' | 'or' + +export interface CombinedFieldsQuery extends QueryBase { + auto_generate_synonyms_phrase_query?: boolean; + fields: Common.Field[]; + minimum_should_match?: Common.MinimumShouldMatch; + operator?: CombinedFieldsOperator; + query: string; + zero_terms_query?: CombinedFieldsZeroTerms; +} + +export type CombinedFieldsZeroTerms = 'all' | 'none' + +export interface CommonTermsQuery extends QueryBase { + analyzer?: string; + cutoff_frequency?: number; + high_freq_operator?: Operator; + low_freq_operator?: Operator; + minimum_should_match?: Common.MinimumShouldMatch; + query: string; +} + +export interface ConstantScoreQuery extends QueryBase { + filter: QueryContainer; +} + +export type DateDecayFunction = DecayFunctionBase & Record + +export type DateDistanceFeatureQuery = DistanceFeatureQueryBaseDateMathDuration & Record + +export interface DateRangeQuery extends RangeQueryBase { + format?: Common.DateFormat; + from?: Common.DateMath | undefined; + gt?: Common.DateMath; + gte?: Common.DateMath; + lt?: Common.DateMath; + lte?: Common.DateMath; + time_zone?: Common.TimeZone; + to?: Common.DateMath | undefined; +} + +export type DecayFunction = DateDecayFunction | NumericDecayFunction | GeoDecayFunction + +export interface DecayFunctionBase { + multi_value_mode?: MultiValueMode; +} + +export interface DisMaxQuery extends QueryBase { + queries: QueryContainer[]; + tie_breaker?: number; +} + +export type DistanceFeatureQuery = GeoDistanceFeatureQuery | DateDistanceFeatureQuery + +export interface DistanceFeatureQueryBaseDateMathDuration extends QueryBase { + field: Common.Field; + origin: Common.DateMath; + pivot: Common.Duration; +} + +export interface DistanceFeatureQueryBaseGeoLocationDistance extends QueryBase { + field: Common.Field; + origin: Common.GeoLocation; + pivot: Common.Distance; +} + +export interface ExistsQuery extends QueryBase { + field: Common.Field; +} + +export interface FieldAndFormat { + field: Common.Field; + format?: string; + include_unmapped?: boolean; +} + +export type FieldValueFactorModifier = 'ln' | 'ln1p' | 'ln2p' | 'log' | 'log1p' | 'log2p' | 'none' | 'reciprocal' | 'sqrt' | 'square' + +export interface FieldValueFactorScoreFunction { + factor?: number; + field: Common.Field; + missing?: number; + modifier?: FieldValueFactorModifier; +} + +export type FunctionBoostMode = 'avg' | 'max' | 'min' | 'multiply' | 'replace' | 'sum' + +export interface FunctionScoreContainer { + exp?: DecayFunction; + field_value_factor?: FieldValueFactorScoreFunction; + filter?: QueryContainer; + gauss?: DecayFunction; + linear?: DecayFunction; + random_score?: RandomScoreFunction; + script_score?: ScriptScoreFunction; + weight?: number; +} + +export type FunctionScoreMode = 'avg' | 'first' | 'max' | 'min' | 'multiply' | 'sum' + +export interface FunctionScoreQuery extends QueryBase { + boost_mode?: FunctionBoostMode; + functions?: FunctionScoreContainer[]; + max_boost?: number; + min_score?: number; + query?: QueryContainer; + score_mode?: FunctionScoreMode; +} + +export interface FuzzyQuery extends QueryBase { + fuzziness?: Common.Fuzziness; + max_expansions?: number; + prefix_length?: number; + rewrite?: Common.MultiTermQueryRewrite; + transpositions?: boolean; + value: string | number | boolean; +} + +export interface GeoBoundingBoxQuery extends QueryBase { + ignore_unmapped?: boolean; + type?: GeoExecution; + validation_method?: GeoValidationMethod; +} + +export type GeoDecayFunction = DecayFunctionBase & Record + +export type GeoDistanceFeatureQuery = DistanceFeatureQueryBaseGeoLocationDistance & Record + +export interface GeoDistanceQuery extends QueryBase { + distance: Common.Distance; + distance_type?: Common.GeoDistanceType; + field: Record; + ignore_unmapped?: boolean; + validation_method?: GeoValidationMethod; +} + +export type GeoExecution = 'indexed' | 'memory' + +export interface GeoPolygonQuery extends QueryBase { + ignore_unmapped?: boolean; + validation_method?: GeoValidationMethod; +} + +export interface GeoShapeQuery extends QueryBase { + ignore_unmapped?: boolean; +} + +export type GeoValidationMethod = 'coerce' | 'ignore_malformed' | 'strict' + +export interface HasChildQuery extends QueryBase { + ignore_unmapped?: boolean; + inner_hits?: Core_Search.InnerHits; + max_children?: number; + min_children?: number; + query: QueryContainer; + score_mode?: ChildScoreMode; + type: Common.RelationName; +} + +export interface HasParentQuery extends QueryBase { + ignore_unmapped?: boolean; + inner_hits?: Core_Search.InnerHits; + parent_type: Common.RelationName; + query: QueryContainer; + score?: boolean; +} + +export interface IdsQuery extends QueryBase { + values?: Common.Ids; +} + +export interface IntervalsAllOf { + filter?: IntervalsFilter; + intervals: IntervalsContainer[]; + max_gaps?: number; + ordered?: boolean; +} + +export interface IntervalsAnyOf { + filter?: IntervalsFilter; + intervals: IntervalsContainer[]; +} + +export interface IntervalsContainer { + all_of?: IntervalsAllOf; + any_of?: IntervalsAnyOf; + fuzzy?: IntervalsFuzzy; + match?: IntervalsMatch; + prefix?: IntervalsPrefix; + wildcard?: IntervalsWildcard; +} + +export interface IntervalsFilter { + after?: IntervalsContainer; + before?: IntervalsContainer; + contained_by?: IntervalsContainer; + containing?: IntervalsContainer; + not_contained_by?: IntervalsContainer; + not_containing?: IntervalsContainer; + not_overlapping?: IntervalsContainer; + overlapping?: IntervalsContainer; + script?: Common.Script; +} + +export interface IntervalsFuzzy { + analyzer?: string; + fuzziness?: Common.Fuzziness; + prefix_length?: number; + term: string; + transpositions?: boolean; + use_field?: Common.Field; +} + +export interface IntervalsMatch { + analyzer?: string; + filter?: IntervalsFilter; + max_gaps?: number; + ordered?: boolean; + query: string; + use_field?: Common.Field; +} + +export interface IntervalsPrefix { + analyzer?: string; + prefix: string; + use_field?: Common.Field; +} + +export interface IntervalsQuery extends QueryBase { + all_of?: IntervalsAllOf; + any_of?: IntervalsAnyOf; + fuzzy?: IntervalsFuzzy; + match?: IntervalsMatch; + prefix?: IntervalsPrefix; + wildcard?: IntervalsWildcard; +} + +export interface IntervalsWildcard { + analyzer?: string; + pattern: string; + use_field?: Common.Field; +} + +export type Like = string | LikeDocument + +export interface LikeDocument { + _id?: Common.Id; + _index?: Common.IndexName; + doc?: Record; + fields?: Common.Field[]; + per_field_analyzer?: Record; + routing?: Common.Routing; + version?: Common.VersionNumber; + version_type?: Common.VersionType; +} + +export type MatchAllQuery = QueryBase & Record + +export interface MatchBoolPrefixQuery extends QueryBase { + analyzer?: string; + fuzziness?: Common.Fuzziness; + fuzzy_rewrite?: Common.MultiTermQueryRewrite; + fuzzy_transpositions?: boolean; + max_expansions?: number; + minimum_should_match?: Common.MinimumShouldMatch; + operator?: Operator; + prefix_length?: number; + query: string; +} + +export type MatchNoneQuery = QueryBase & Record + +export interface MatchPhrasePrefixQuery extends QueryBase { + analyzer?: string; + max_expansions?: number; + query: string; + slop?: number; + zero_terms_query?: ZeroTermsQuery; +} + +export interface MatchPhraseQuery extends QueryBase { + analyzer?: string; + query: string; + slop?: number; + zero_terms_query?: ZeroTermsQuery; +} + +export interface MatchQuery extends QueryBase { + analyzer?: string; + auto_generate_synonyms_phrase_query?: boolean; + cutoff_frequency?: number; + fuzziness?: Common.Fuzziness; + fuzzy_rewrite?: Common.MultiTermQueryRewrite; + fuzzy_transpositions?: boolean; + lenient?: boolean; + max_expansions?: number; + minimum_should_match?: Common.MinimumShouldMatch; + operator?: Operator; + prefix_length?: number; + query: string | number | boolean; + zero_terms_query?: ZeroTermsQuery; +} + +export interface MoreLikeThisQuery extends QueryBase { + analyzer?: string; + boost_terms?: number; + fail_on_unsupported_field?: boolean; + fields?: Common.Field[]; + include?: boolean; + like: Like | Like[]; + max_doc_freq?: number; + max_query_terms?: number; + max_word_length?: number; + min_doc_freq?: number; + min_term_freq?: number; + min_word_length?: number; + minimum_should_match?: Common.MinimumShouldMatch; + per_field_analyzer?: Record; + routing?: Common.Routing; + stop_words?: Common_Analysis.StopWords; + unlike?: Like | Like[]; + version?: Common.VersionNumber; + version_type?: Common.VersionType; +} + +export interface MultiMatchQuery extends QueryBase { + analyzer?: string; + auto_generate_synonyms_phrase_query?: boolean; + cutoff_frequency?: number; + fields?: Common.Fields; + fuzziness?: Common.Fuzziness; + fuzzy_rewrite?: Common.MultiTermQueryRewrite; + fuzzy_transpositions?: boolean; + lenient?: boolean; + max_expansions?: number; + minimum_should_match?: Common.MinimumShouldMatch; + operator?: Operator; + prefix_length?: number; + query: string; + slop?: number; + tie_breaker?: number; + type?: TextQueryType; + zero_terms_query?: ZeroTermsQuery; +} + +export type MultiValueMode = 'avg' | 'max' | 'min' | 'sum' + +export interface NestedQuery extends QueryBase { + ignore_unmapped?: boolean; + inner_hits?: Core_Search.InnerHits; + path: Common.Field; + query: QueryContainer; + score_mode?: ChildScoreMode; +} + +export interface NumberRangeQuery extends RangeQueryBase { + from?: undefined | number | string; + gt?: number; + gte?: number; + lt?: number; + lte?: number; + to?: undefined | number | string; +} + +export type NumericDecayFunction = DecayFunctionBase & Record + +export type Operator = 'and' | 'or' + +export interface ParentIdQuery extends QueryBase { + id?: Common.Id; + ignore_unmapped?: boolean; + type?: Common.RelationName; +} + +export interface PercolateQuery extends QueryBase { + document?: Record; + documents?: Record[]; + field: Common.Field; + id?: Common.Id; + index?: Common.IndexName; + name?: string; + preference?: string; + routing?: Common.Routing; + version?: Common.VersionNumber; +} + +export interface PinnedDoc { + _id: Common.Id; + _index: Common.IndexName; +} + +export type PinnedQuery = QueryBase & Record + +export interface PrefixQuery extends QueryBase { + case_insensitive?: boolean; + rewrite?: Common.MultiTermQueryRewrite; + value: string; +} + +export interface QueryBase { + _name?: string; + boost?: number; +} + +export interface QueryContainer { + bool?: BoolQuery; + boosting?: BoostingQuery; + combined_fields?: CombinedFieldsQuery; + common?: Record; + constant_score?: ConstantScoreQuery; + dis_max?: DisMaxQuery; + distance_feature?: DistanceFeatureQuery; + exists?: ExistsQuery; + field_masking_span?: SpanFieldMaskingQuery; + function_score?: FunctionScoreQuery; + fuzzy?: Record; + geo_bounding_box?: GeoBoundingBoxQuery; + geo_distance?: GeoDistanceQuery; + geo_polygon?: GeoPolygonQuery; + geo_shape?: GeoShapeQuery; + has_child?: HasChildQuery; + has_parent?: HasParentQuery; + ids?: IdsQuery; + intervals?: Record; + match?: Record; + match_all?: MatchAllQuery; + match_bool_prefix?: Record; + match_none?: MatchNoneQuery; + match_phrase?: Record; + match_phrase_prefix?: Record; + more_like_this?: MoreLikeThisQuery; + multi_match?: MultiMatchQuery; + nested?: NestedQuery; + parent_id?: ParentIdQuery; + percolate?: PercolateQuery; + pinned?: PinnedQuery; + prefix?: Record; + query_string?: QueryStringQuery; + range?: Record; + rank_feature?: RankFeatureQuery; + regexp?: Record; + rule_query?: RuleQuery; + script?: ScriptQuery; + script_score?: ScriptScoreQuery; + shape?: ShapeQuery; + simple_query_string?: SimpleQueryStringQuery; + span_containing?: SpanContainingQuery; + span_first?: SpanFirstQuery; + span_multi?: SpanMultiTermQuery; + span_near?: SpanNearQuery; + span_not?: SpanNotQuery; + span_or?: SpanOrQuery; + span_term?: Record; + span_within?: SpanWithinQuery; + term?: Record; + terms?: TermsQuery; + terms_set?: Record; + text_expansion?: Record; + type?: TypeQuery; + weighted_tokens?: Record; + wildcard?: Record; + wrapper?: WrapperQuery; +} + +export interface QueryStringQuery extends QueryBase { + allow_leading_wildcard?: boolean; + analyze_wildcard?: boolean; + analyzer?: string; + auto_generate_synonyms_phrase_query?: boolean; + default_field?: Common.Field; + default_operator?: Operator; + enable_position_increments?: boolean; + escape?: boolean; + fields?: Common.Field[]; + fuzziness?: Common.Fuzziness; + fuzzy_max_expansions?: number; + fuzzy_prefix_length?: number; + fuzzy_rewrite?: Common.MultiTermQueryRewrite; + fuzzy_transpositions?: boolean; + lenient?: boolean; + max_determinized_states?: number; + minimum_should_match?: Common.MinimumShouldMatch; + phrase_slop?: number; + query: string; + quote_analyzer?: string; + quote_field_suffix?: string; + rewrite?: Common.MultiTermQueryRewrite; + tie_breaker?: number; + time_zone?: Common.TimeZone; + type?: TextQueryType; +} + +export interface RandomScoreFunction { + field?: Common.Field; + seed?: number | string; +} + +export type RangeQuery = DateRangeQuery | NumberRangeQuery + +export interface RangeQueryBase extends QueryBase { + relation?: RangeRelation; +} + +export type RangeRelation = 'contains' | 'intersects' | 'within' + +export type RankFeatureFunction = Record + +export type RankFeatureFunctionLinear = RankFeatureFunction & Record + +export interface RankFeatureFunctionLogarithm extends RankFeatureFunction { + scaling_factor: number; +} + +export interface RankFeatureFunctionSaturation extends RankFeatureFunction { + pivot?: number; +} + +export interface RankFeatureFunctionSigmoid extends RankFeatureFunction { + exponent: number; + pivot: number; +} + +export interface RankFeatureQuery extends QueryBase { + field: Common.Field; + linear?: RankFeatureFunctionLinear; + log?: RankFeatureFunctionLogarithm; + saturation?: RankFeatureFunctionSaturation; + sigmoid?: RankFeatureFunctionSigmoid; +} + +export interface RegexpQuery extends QueryBase { + case_insensitive?: boolean; + flags?: string; + max_determinized_states?: number; + rewrite?: Common.MultiTermQueryRewrite; + value: string; +} + +export interface RuleQuery extends QueryBase { + match_criteria: Record; + organic: QueryContainer; + ruleset_id: Common.Id; +} + +export interface ScriptQuery extends QueryBase { + script: Common.Script; +} + +export interface ScriptScoreFunction { + script: Common.Script; +} + +export interface ScriptScoreQuery extends QueryBase { + min_score?: number; + query: QueryContainer; + script: Common.Script; +} + +export interface ShapeQuery extends QueryBase { + ignore_unmapped?: boolean; +} + +export type SimpleQueryStringFlag = 'ALL' | 'AND' | 'ESCAPE' | 'FUZZY' | 'NEAR' | 'NONE' | 'NOT' | 'OR' | 'PHRASE' | 'PRECEDENCE' | 'PREFIX' | 'SLOP' | 'WHITESPACE' + +export type SimpleQueryStringFlags = Common.PipeSeparatedFlagsSimpleQueryStringFlag & Record + +export interface SimpleQueryStringQuery extends QueryBase { + analyze_wildcard?: boolean; + analyzer?: string; + auto_generate_synonyms_phrase_query?: boolean; + default_operator?: Operator; + fields?: Common.Field[]; + flags?: SimpleQueryStringFlags; + fuzzy_max_expansions?: number; + fuzzy_prefix_length?: number; + fuzzy_transpositions?: boolean; + lenient?: boolean; + minimum_should_match?: Common.MinimumShouldMatch; + query: string; + quote_field_suffix?: string; +} + +export interface SpanContainingQuery extends QueryBase { + big: SpanQuery; + little: SpanQuery; +} + +export interface SpanFieldMaskingQuery extends QueryBase { + field: Common.Field; + query: SpanQuery; +} + +export interface SpanFirstQuery extends QueryBase { + end: number; + match: SpanQuery; +} + +export type SpanGapQuery = Record + +export interface SpanMultiTermQuery extends QueryBase { + match: QueryContainer; +} + +export interface SpanNearQuery extends QueryBase { + clauses: SpanQuery[]; + in_order?: boolean; + slop?: number; +} + +export interface SpanNotQuery extends QueryBase { + dist?: number; + exclude: SpanQuery; + include: SpanQuery; + post?: number; + pre?: number; +} + +export interface SpanOrQuery extends QueryBase { + clauses: SpanQuery[]; +} + +export interface SpanQuery { + field_masking_span?: SpanFieldMaskingQuery; + span_containing?: SpanContainingQuery; + span_first?: SpanFirstQuery; + span_gap?: SpanGapQuery; + span_multi?: SpanMultiTermQuery; + span_near?: SpanNearQuery; + span_not?: SpanNotQuery; + span_or?: SpanOrQuery; + span_term?: Record; + span_within?: SpanWithinQuery; +} + +export interface SpanTermQuery extends QueryBase { + value: string; +} + +export interface SpanWithinQuery extends QueryBase { + big: SpanQuery; + little: SpanQuery; +} + +export interface TermQuery extends QueryBase { + case_insensitive?: boolean; + value: Common.FieldValue; +} + +export type TermsQuery = QueryBase & Record + +export interface TermsSetQuery extends QueryBase { + minimum_should_match_field?: Common.Field; + minimum_should_match_script?: Common.Script; + terms: string[]; +} + +export interface TextExpansionQuery extends QueryBase { + model_id: string; + model_text: string; + pruning_config?: TokenPruningConfig; +} + +export type TextQueryType = 'best_fields' | 'bool_prefix' | 'cross_fields' | 'most_fields' | 'phrase' | 'phrase_prefix' + +export interface TokenPruningConfig { + only_score_pruned_tokens?: boolean; + tokens_freq_ratio_threshold?: number; + tokens_weight_threshold?: number; +} + +export interface TypeQuery extends QueryBase { + value: string; +} + +export interface WeightedTokensQuery extends QueryBase { + pruning_config?: TokenPruningConfig; + tokens: Record; +} + +export interface WildcardQuery extends QueryBase { + case_insensitive?: boolean; + rewrite?: Common.MultiTermQueryRewrite; + value?: string; + wildcard?: string; +} + +export interface WrapperQuery extends QueryBase { + query: string; +} + +export type ZeroTermsQuery = 'all' | 'none' + diff --git a/api/_types/_core._common.d.ts b/api/_types/_core._common.d.ts new file mode 100644 index 000000000..5905675e0 --- /dev/null +++ b/api/_types/_core._common.d.ts @@ -0,0 +1,40 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export interface DeletedPit { + pit_id?: string; + successful?: boolean; +} + +export interface PitDetail { + creation_time?: number; + keep_alive?: number; + pit_id?: string; +} + +export interface PitsDetailsDeleteAll { + pit_id?: string; + successful?: boolean; +} + +export interface ShardStatistics { + failed?: number; + skipped?: number; + successful?: number; + total?: number; +} + diff --git a/api/_types/_core.bulk.d.ts b/api/_types/_core.bulk.d.ts new file mode 100644 index 000000000..2545b249f --- /dev/null +++ b/api/_types/_core.bulk.d.ts @@ -0,0 +1,78 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' +import * as Core_Search from './_core.search' + +export type CreateOperation = WriteOperation & Record + +export type DeleteOperation = OperationBase & Record + +export type IndexOperation = WriteOperation & Record + +export interface OperationBase { + _id?: Common.Id; + _index?: Common.IndexName; + if_primary_term?: number; + if_seq_no?: Common.SequenceNumber; + routing?: Common.Routing; + version?: Common.VersionNumber; + version_type?: Common.VersionType; +} + +export interface OperationContainer { + create?: CreateOperation; + delete?: DeleteOperation; + index?: IndexOperation; + update?: UpdateOperation; +} + +export interface ResponseItem { + _id?: undefined | string; + _index: string; + _primary_term?: number; + _seq_no?: Common.SequenceNumber; + _shards?: Common.ShardStatistics; + _type?: string; + _version?: Common.VersionNumber; + error?: Common.ErrorCause; + forced_refresh?: boolean; + get?: Common.InlineGetDictUserDefined; + result?: string; + status: number; +} + +export interface UpdateAction { + _source?: Core_Search.SourceConfig; + detect_noop?: boolean; + doc?: Record; + doc_as_upsert?: boolean; + script?: Common.Script; + scripted_upsert?: boolean; + upsert?: Record; +} + +export interface UpdateOperation extends OperationBase { + require_alias?: boolean; + retry_on_conflict?: number; +} + +export interface WriteOperation extends OperationBase { + dynamic_templates?: Record; + pipeline?: string; + require_alias?: boolean; +} + diff --git a/api/_types/_core.explain.d.ts b/api/_types/_core.explain.d.ts new file mode 100644 index 000000000..b1639ca6c --- /dev/null +++ b/api/_types/_core.explain.d.ts @@ -0,0 +1,29 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export interface Explanation { + description: string; + details: ExplanationDetail[]; + value: number; +} + +export interface ExplanationDetail { + description: string; + details?: ExplanationDetail[]; + value: number; +} + diff --git a/api/_types/_core.field_caps.d.ts b/api/_types/_core.field_caps.d.ts new file mode 100644 index 000000000..8ccbb8928 --- /dev/null +++ b/api/_types/_core.field_caps.d.ts @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' +import * as Common_Mapping from './_common.mapping' + +export interface FieldCapability { + aggregatable: boolean; + indices?: Common.Indices; + meta?: Common.Metadata; + metadata_field?: boolean; + metric_conflicts_indices?: Common.IndexName[]; + non_aggregatable_indices?: Common.Indices; + non_dimension_indices?: Common.IndexName[]; + non_searchable_indices?: Common.Indices; + searchable: boolean; + time_series_dimension?: boolean; + time_series_metric?: Common_Mapping.TimeSeriesMetricType; + type: string; +} + diff --git a/api/_types/_core.get.d.ts b/api/_types/_core.get.d.ts new file mode 100644 index 000000000..221c7e1ac --- /dev/null +++ b/api/_types/_core.get.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface GetResult { + _id: Common.Id; + _index: Common.IndexName; + _primary_term?: number; + _routing?: string; + _seq_no?: Common.SequenceNumber; + _source?: Record; + _type?: Common.Type; + _version?: Common.VersionNumber; + fields?: Record>; + found: boolean; +} + diff --git a/api/_types/_core.get_script_context.d.ts b/api/_types/_core.get_script_context.d.ts new file mode 100644 index 000000000..a7af06aa3 --- /dev/null +++ b/api/_types/_core.get_script_context.d.ts @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface Context { + methods: ContextMethod[]; + name: Common.Name; +} + +export interface ContextMethod { + name: Common.Name; + params: ContextMethodParam[]; + return_type: string; +} + +export interface ContextMethodParam { + name: Common.Name; + type: string; +} + diff --git a/api/_types/_core.get_script_languages.d.ts b/api/_types/_core.get_script_languages.d.ts new file mode 100644 index 000000000..4641bac6f --- /dev/null +++ b/api/_types/_core.get_script_languages.d.ts @@ -0,0 +1,23 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface LanguageContext { + contexts: string[]; + language: Common.ScriptLanguage; +} + diff --git a/api/_types/_core.mget.d.ts b/api/_types/_core.mget.d.ts new file mode 100644 index 000000000..6ac0e6ed5 --- /dev/null +++ b/api/_types/_core.mget.d.ts @@ -0,0 +1,38 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' +import * as Core_Search from './_core.search' +import * as Core_Get from './_core.get' + +export interface MultiGetError { + _id: Common.Id; + _index: Common.IndexName; + error: Common.ErrorCause; +} + +export interface Operation { + _id: Common.Id; + _index?: Common.IndexName; + _source?: Core_Search.SourceConfig; + routing?: Common.Routing; + stored_fields?: Common.Fields; + version?: Common.VersionNumber; + version_type?: Common.VersionType; +} + +export type ResponseItem = Core_Get.GetResult | MultiGetError + diff --git a/api/_types/_core.msearch.d.ts b/api/_types/_core.msearch.d.ts new file mode 100644 index 000000000..91ed86092 --- /dev/null +++ b/api/_types/_core.msearch.d.ts @@ -0,0 +1,83 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Core_Search from './_core.search' +import * as Common_Aggregations from './_common.aggregations' +import * as Common_QueryDsl from './_common.query_dsl' +import * as Common from './_common' +import * as Common_Mapping from './_common.mapping' + +export interface MultisearchBody { + _source?: Core_Search.SourceConfig; + aggregations?: Record; + collapse?: Core_Search.FieldCollapse; + docvalue_fields?: Common_QueryDsl.FieldAndFormat[]; + explain?: boolean; + ext?: Record>; + fields?: Common_QueryDsl.FieldAndFormat[]; + from?: number; + highlight?: Core_Search.Highlight; + indices_boost?: Record[]; + knn?: Common.KnnQuery | Common.KnnQuery[]; + min_score?: number; + pit?: Core_Search.PointInTimeReference; + post_filter?: Common_QueryDsl.QueryContainer; + profile?: boolean; + query?: Common_QueryDsl.QueryContainer; + rescore?: Core_Search.Rescore | Core_Search.Rescore[]; + runtime_mappings?: Common_Mapping.RuntimeFields; + script_fields?: Record; + search_after?: Common.SortResults; + seq_no_primary_term?: boolean; + size?: number; + sort?: Common.Sort; + stats?: string[]; + stored_fields?: Common.Fields; + suggest?: Core_Search.Suggester; + terminate_after?: number; + timeout?: string; + track_scores?: boolean; + track_total_hits?: Core_Search.TrackHits; + version?: boolean; +} + +export interface MultisearchHeader { + allow_no_indices?: boolean; + allow_partial_search_results?: boolean; + ccs_minimize_roundtrips?: boolean; + expand_wildcards?: Common.ExpandWildcards; + ignore_throttled?: boolean; + ignore_unavailable?: boolean; + index?: Common.Indices; + preference?: string; + request_cache?: boolean; + routing?: Common.Routing; + search_type?: Common.SearchType; +} + +export interface MultiSearchItem extends Core_Search.ResponseBody { + status?: number; +} + +export interface MultiSearchResult { + responses: ResponseItem[]; + took: number; +} + +export type RequestItem = MultisearchHeader | MultisearchBody + +export type ResponseItem = MultiSearchItem | Common.ErrorResponseBase + diff --git a/api/_types/_core.msearch_template.d.ts b/api/_types/_core.msearch_template.d.ts new file mode 100644 index 000000000..529dc3bd8 --- /dev/null +++ b/api/_types/_core.msearch_template.d.ts @@ -0,0 +1,29 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Core_Msearch from './_core.msearch' +import * as Common from './_common' + +export type RequestItem = Core_Msearch.MultisearchHeader | TemplateConfig + +export interface TemplateConfig { + explain?: boolean; + id?: Common.Id; + params?: Record>; + profile?: boolean; + source?: string; +} + diff --git a/api/_types/_core.mtermvectors.d.ts b/api/_types/_core.mtermvectors.d.ts new file mode 100644 index 000000000..89a392775 --- /dev/null +++ b/api/_types/_core.mtermvectors.d.ts @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' +import * as Core_Termvectors from './_core.termvectors' + +export interface Operation { + _id: Common.Id; + _index?: Common.IndexName; + doc?: Record; + field_statistics?: boolean; + fields?: Common.Fields; + filter?: Core_Termvectors.Filter; + offsets?: boolean; + payloads?: boolean; + positions?: boolean; + routing?: Common.Routing; + term_statistics?: boolean; + version?: Common.VersionNumber; + version_type?: Common.VersionType; +} + +export interface TermVectorsResult { + _id: Common.Id; + _index: Common.IndexName; + _version?: Common.VersionNumber; + error?: Common.ErrorCause; + found?: boolean; + term_vectors?: Record; + took?: number; +} + diff --git a/api/_types/_core.rank_eval.d.ts b/api/_types/_core.rank_eval.d.ts new file mode 100644 index 000000000..60c277f0c --- /dev/null +++ b/api/_types/_core.rank_eval.d.ts @@ -0,0 +1,93 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' +import * as Common_QueryDsl from './_common.query_dsl' + +export interface DocumentRating { + _id: Common.Id; + _index: Common.IndexName; + rating: number; +} + +export interface RankEvalHit { + _id: Common.Id; + _index: Common.IndexName; + _score: number; +} + +export interface RankEvalHitItem { + hit: RankEvalHit; + rating?: undefined | number | string; +} + +export interface RankEvalMetric { + dcg?: RankEvalMetricDiscountedCumulativeGain; + expected_reciprocal_rank?: RankEvalMetricExpectedReciprocalRank; + mean_reciprocal_rank?: RankEvalMetricMeanReciprocalRank; + precision?: RankEvalMetricPrecision; + recall?: RankEvalMetricRecall; +} + +export interface RankEvalMetricBase { + k?: number; +} + +export interface RankEvalMetricDetail { + hits: RankEvalHitItem[]; + metric_details: Record>>; + metric_score: number; + unrated_docs: UnratedDocument[]; +} + +export interface RankEvalMetricDiscountedCumulativeGain extends RankEvalMetricBase { + normalize?: boolean; +} + +export interface RankEvalMetricExpectedReciprocalRank extends RankEvalMetricBase { + maximum_relevance: number; +} + +export type RankEvalMetricMeanReciprocalRank = RankEvalMetricRatingThreshold & Record + +export interface RankEvalMetricPrecision extends RankEvalMetricRatingThreshold { + ignore_unlabeled?: boolean; +} + +export interface RankEvalMetricRatingThreshold extends RankEvalMetricBase { + relevant_rating_threshold?: number; +} + +export type RankEvalMetricRecall = RankEvalMetricRatingThreshold & Record + +export interface RankEvalQuery { + query: Common_QueryDsl.QueryContainer; + size?: number; +} + +export interface RankEvalRequestItem { + id: Common.Id; + params?: Record>; + ratings: DocumentRating[]; + request?: RankEvalQuery; + template_id?: Common.Id; +} + +export interface UnratedDocument { + _id: Common.Id; + _index: Common.IndexName; +} + diff --git a/api/_types/_core.reindex.d.ts b/api/_types/_core.reindex.d.ts new file mode 100644 index 000000000..c7a285a6c --- /dev/null +++ b/api/_types/_core.reindex.d.ts @@ -0,0 +1,48 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' +import * as Common_QueryDsl from './_common.query_dsl' +import * as Common_Mapping from './_common.mapping' + +export interface Destination { + index: Common.IndexName; + op_type?: Common.OpType; + pipeline?: string; + routing?: Common.Routing; + version_type?: Common.VersionType; +} + +export interface RemoteSource { + connect_timeout?: Common.Duration; + headers?: Record; + host: Common.Host; + password?: Common.Password; + socket_timeout?: Common.Duration; + username?: Common.Username; +} + +export interface Source { + _source?: Common.Fields; + index: Common.Indices; + query?: Common_QueryDsl.QueryContainer; + remote?: RemoteSource; + runtime_mappings?: Common_Mapping.RuntimeFields; + size?: number; + slice?: Common.SlicedScroll; + sort?: Common.Sort; +} + diff --git a/api/_types/_core.reindex_rethrottle.d.ts b/api/_types/_core.reindex_rethrottle.d.ts new file mode 100644 index 000000000..4fdd88a41 --- /dev/null +++ b/api/_types/_core.reindex_rethrottle.d.ts @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface ReindexNode extends Common.BaseNode { + tasks: Record; +} + +export interface ReindexStatus { + batches: number; + created: number; + deleted: number; + noops: number; + requests_per_second: number; + retries: Common.Retries; + throttled?: Common.Duration; + throttled_millis: Common.DurationValueUnitMillis; + throttled_until?: Common.Duration; + throttled_until_millis: Common.DurationValueUnitMillis; + total: number; + updated: number; + version_conflicts: number; +} + +export interface ReindexTask { + action: string; + cancellable: boolean; + description: string; + headers: Common.HttpHeaders; + id: number; + node: Common.Name; + running_time_in_nanos: Common.DurationValueUnitNanos; + start_time_in_millis: Common.EpochTimeUnitMillis; + status: ReindexStatus; + type: string; +} + diff --git a/api/_types/_core.scripts_painless_execute.d.ts b/api/_types/_core.scripts_painless_execute.d.ts new file mode 100644 index 000000000..23a8cb3df --- /dev/null +++ b/api/_types/_core.scripts_painless_execute.d.ts @@ -0,0 +1,25 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' +import * as Common_QueryDsl from './_common.query_dsl' + +export interface PainlessContextSetup { + document: Record; + index: Common.IndexName; + query: Common_QueryDsl.QueryContainer; +} + diff --git a/api/_types/_core.search.d.ts b/api/_types/_core.search.d.ts new file mode 100644 index 000000000..3a676d973 --- /dev/null +++ b/api/_types/_core.search.d.ts @@ -0,0 +1,383 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' +import * as Common_QueryDsl from './_common.query_dsl' +import * as Common_Analysis from './_common.analysis' +import * as Core_Explain from './_core.explain' +import * as Common_Aggregations from './_common.aggregations' + +export interface AggregationBreakdown { + build_aggregation: number; + build_aggregation_count: number; + build_leaf_collector: number; + build_leaf_collector_count: number; + collect: number; + collect_count: number; + initialize: number; + initialize_count: number; + post_collection?: number; + post_collection_count?: number; + reduce: number; + reduce_count: number; +} + +export interface AggregationProfile { + breakdown: AggregationBreakdown; + children?: AggregationProfile[]; + debug?: AggregationProfileDebug; + description: string; + time_in_nanos: Common.DurationValueUnitNanos; + type: string; +} + +export interface AggregationProfileDebug { + built_buckets?: number; + chars_fetched?: number; + collect_analyzed_count?: number; + collect_analyzed_ns?: number; + collection_strategy?: string; + deferred_aggregators?: string[]; + delegate?: string; + delegate_debug?: AggregationProfileDebug; + empty_collectors_used?: number; + extract_count?: number; + extract_ns?: number; + filters?: AggregationProfileDelegateDebugFilter[]; + has_filter?: boolean; + map_reducer?: string; + numeric_collectors_used?: number; + ordinals_collectors_overhead_too_high?: number; + ordinals_collectors_used?: number; + result_strategy?: string; + segments_collected?: number; + segments_counted?: number; + segments_with_deleted_docs?: number; + segments_with_doc_count_field?: number; + segments_with_multi_valued_ords?: number; + segments_with_single_valued_ords?: number; + string_hashing_collectors_used?: number; + surviving_buckets?: number; + total_buckets?: number; + values_fetched?: number; +} + +export interface AggregationProfileDelegateDebugFilter { + query?: string; + results_from_metadata?: number; + segments_counted_in_constant_time?: number; + specialized_for?: string; +} + +export type BoundaryScanner = 'chars' | 'sentence' | 'word' + +export interface Collector { + children?: Collector[]; + name: string; + reason: string; + time_in_nanos: Common.DurationValueUnitNanos; +} + +export interface CompletionSuggest extends SuggestBase { + options: CompletionSuggestOption | CompletionSuggestOption[]; +} + +export interface CompletionSuggestOption { + _id?: string; + _index?: Common.IndexName; + _routing?: Common.Routing; + _score?: number; + _source?: Record; + collate_match?: boolean; + contexts?: Record; + fields?: Record>; + score?: number; + text: string; +} + +export type Context = string | Common.GeoLocation + +export interface FetchProfile { + breakdown: FetchProfileBreakdown; + children?: FetchProfile[]; + debug?: FetchProfileDebug; + description: string; + time_in_nanos: Common.DurationValueUnitNanos; + type: string; +} + +export interface FetchProfileBreakdown { + load_source?: number; + load_source_count?: number; + load_stored_fields?: number; + load_stored_fields_count?: number; + next_reader?: number; + next_reader_count?: number; + process?: number; + process_count?: number; +} + +export interface FetchProfileDebug { + fast_path?: number; + stored_fields?: string[]; +} + +export interface FieldCollapse { + collapse?: FieldCollapse; + field: Common.Field; + inner_hits?: InnerHits | InnerHits[]; + max_concurrent_group_searches?: number; +} + +export interface Highlight extends HighlightBase { + encoder?: HighlighterEncoder; + fields: Record; +} + +export interface HighlightBase { + boundary_chars?: string; + boundary_max_scan?: number; + boundary_scanner?: BoundaryScanner; + boundary_scanner_locale?: string; + force_source?: boolean; + fragment_size?: number; + fragmenter?: HighlighterFragmenter; + highlight_filter?: boolean; + highlight_query?: Common_QueryDsl.QueryContainer; + max_analyzed_offset?: number; + max_fragment_length?: number; + no_match_size?: number; + number_of_fragments?: number; + options?: Record>; + order?: HighlighterOrder; + phrase_limit?: number; + post_tags?: string[]; + pre_tags?: string[]; + require_field_match?: boolean; + tags_schema?: HighlighterTagsSchema; + type?: HighlighterType; +} + +export type HighlighterEncoder = 'default' | 'html' + +export type HighlighterFragmenter = 'simple' | 'span' + +export type HighlighterOrder = 'score' + +export type HighlighterTagsSchema = 'styled' + +export type HighlighterType = 'fvh' | 'plain' | 'unified' + +export interface HighlightField extends HighlightBase { + analyzer?: Common_Analysis.Analyzer; + fragment_offset?: number; + matched_fields?: Common.Fields; +} + +export interface Hit { + _explanation?: Core_Explain.Explanation; + _id: Common.Id; + _ignored?: string[]; + _index: Common.IndexName; + _nested?: NestedIdentity; + _node?: string; + _primary_term?: number; + _routing?: string; + _score?: undefined | number | string; + _seq_no?: Common.SequenceNumber; + _shard?: string; + _source?: Record; + _type?: Common.Type; + _version?: Common.VersionNumber; + fields?: Record>; + highlight?: Record; + ignored_field_values?: Record; + inner_hits?: Record; + matched_queries?: string[]; + sort?: Common.SortResults; +} + +export interface HitsMetadata { + hits: Hit[]; + max_score?: undefined | number | string; + total?: TotalHits | number; +} + +export interface InnerHits { + _source?: SourceConfig; + collapse?: FieldCollapse; + docvalue_fields?: Common_QueryDsl.FieldAndFormat[]; + explain?: boolean; + fields?: Common.Fields; + from?: number; + highlight?: Highlight; + ignore_unmapped?: boolean; + name?: Common.Name; + script_fields?: Record; + seq_no_primary_term?: boolean; + size?: number; + sort?: Common.Sort; + stored_field?: Common.Fields; + track_scores?: boolean; + version?: boolean; +} + +export interface InnerHitsResult { + hits: HitsMetadata; +} + +export interface NestedIdentity { + _nested?: NestedIdentity; + field: Common.Field; + offset: number; +} + +export interface PhraseSuggest extends SuggestBase { + options: PhraseSuggestOption | PhraseSuggestOption[]; +} + +export interface PhraseSuggestOption { + collate_match?: boolean; + highlighted?: string; + score: number; + text: string; +} + +export interface PointInTimeReference { + id: Common.Id; + keep_alive?: Common.Duration; +} + +export interface Profile { + shards: ShardProfile[]; +} + +export interface QueryBreakdown { + advance: number; + advance_count: number; + build_scorer: number; + build_scorer_count: number; + compute_max_score: number; + compute_max_score_count: number; + create_weight: number; + create_weight_count: number; + match: number; + match_count: number; + next_doc: number; + next_doc_count: number; + score: number; + score_count: number; + set_min_competitive_score: number; + set_min_competitive_score_count: number; + shallow_advance: number; + shallow_advance_count: number; +} + +export interface QueryProfile { + breakdown: QueryBreakdown; + children?: QueryProfile[]; + description: string; + time_in_nanos: Common.DurationValueUnitNanos; + type: string; +} + +export interface Rescore { + query: RescoreQuery; + window_size?: number; +} + +export interface RescoreQuery { + query_weight?: number; + rescore_query: Common_QueryDsl.QueryContainer; + rescore_query_weight?: number; + score_mode?: ScoreMode; +} + +export interface ResponseBody { + _clusters?: Common.ClusterStatistics; + _scroll_id?: Common.ScrollId; + _shards: Common.ShardStatistics; + aggregations?: Record; + fields?: Record>; + hits: HitsMetadata; + max_score?: number; + num_reduce_phases?: number; + phase_took?: Common.PhaseTook; + pit_id?: Common.Id; + profile?: Profile; + suggest?: Record; + terminated_early?: boolean; + timed_out: boolean; + took: number; +} + +export type ScoreMode = 'avg' | 'max' | 'min' | 'multiply' | 'total' + +export interface SearchProfile { + collector: Collector[]; + query: QueryProfile[]; + rewrite_time: number; +} + +export interface ShardProfile { + aggregations: AggregationProfile[]; + fetch?: FetchProfile; + id: string; + searches: SearchProfile[]; +} + +export type SourceConfig = boolean | Common.Field[] | SourceFilter + +export type SourceConfigParam = boolean | Common.Fields + +export interface SourceFilter { + excludes?: Common.Fields; + includes?: Common.Fields; +} + +export type Suggest = CompletionSuggest | PhraseSuggest | TermSuggest + +export interface SuggestBase { + length: number; + offset: number; + text: string; +} + +export interface Suggester { + text?: string; +} + +export interface TermSuggest extends SuggestBase { + options: TermSuggestOption | TermSuggestOption[]; +} + +export interface TermSuggestOption { + collate_match?: boolean; + freq: number; + highlighted?: string; + score: number; + text: string; +} + +export interface TotalHits { + relation: TotalHitsRelation; + value: number; +} + +export type TotalHitsRelation = 'eq' | 'gte' + +export type TrackHits = boolean | number + diff --git a/api/_types/_core.search_shards.d.ts b/api/_types/_core.search_shards.d.ts new file mode 100644 index 000000000..14dd4f715 --- /dev/null +++ b/api/_types/_core.search_shards.d.ts @@ -0,0 +1,24 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' +import * as Common_QueryDsl from './_common.query_dsl' + +export interface ShardStoreIndex { + aliases?: Common.Name[]; + filter?: Common_QueryDsl.QueryContainer; +} + diff --git a/api/_types/_core.termvectors.d.ts b/api/_types/_core.termvectors.d.ts new file mode 100644 index 000000000..9f2f9ae41 --- /dev/null +++ b/api/_types/_core.termvectors.d.ts @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export interface FieldStatistics { + doc_count: number; + sum_doc_freq: number; + sum_ttf: number; +} + +export interface Filter { + max_doc_freq?: number; + max_num_terms?: number; + max_term_freq?: number; + max_word_length?: number; + min_doc_freq?: number; + min_term_freq?: number; + min_word_length?: number; +} + +export interface Term { + doc_freq?: number; + score?: number; + term_freq: number; + tokens?: Token[]; + ttf?: number; +} + +export interface TermVector { + field_statistics: FieldStatistics; + terms: Record; +} + +export interface Token { + end_offset?: number; + payload?: string; + position: number; + start_offset?: number; +} + diff --git a/api/_types/_core.update.d.ts b/api/_types/_core.update.d.ts new file mode 100644 index 000000000..14a0c64bf --- /dev/null +++ b/api/_types/_core.update.d.ts @@ -0,0 +1,22 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface UpdateWriteResponseBase extends Common.WriteResponseBase { + get?: Common.InlineGet; +} + diff --git a/api/_types/_core.update_by_query_rethrottle.d.ts b/api/_types/_core.update_by_query_rethrottle.d.ts new file mode 100644 index 000000000..632f5dfa8 --- /dev/null +++ b/api/_types/_core.update_by_query_rethrottle.d.ts @@ -0,0 +1,23 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' +import * as Tasks_Common from './tasks._common' + +export interface UpdateByQueryRethrottleNode extends Common.BaseNode { + tasks: Record; +} + diff --git a/api/_types/_global.d.ts b/api/_types/_global.d.ts new file mode 100644 index 000000000..e0c3c4417 --- /dev/null +++ b/api/_types/_global.d.ts @@ -0,0 +1,25 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export interface Params { + error_trace?: boolean; + filter_path?: string | string[]; + human?: boolean; + pretty?: boolean; + source?: string; +} + diff --git a/api/_types/cat._common.d.ts b/api/_types/cat._common.d.ts new file mode 100644 index 000000000..77be2a789 --- /dev/null +++ b/api/_types/cat._common.d.ts @@ -0,0 +1,62 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export interface CatPitSegmentsRecord { + committed?: string; + compound?: string; + 'docs.count'?: string; + 'docs.deleted'?: string; + generation?: string; + index?: string; + ip?: string; + prirep?: string; + searchable?: string; + segment?: string; + shard?: string; + size?: string; + 'size.memory'?: string; + version?: string; +} + +export interface CatSegmentReplicationRecord { + bytes?: string; + bytes_behind?: string; + bytes_fetched?: string; + bytes_percent?: string; + bytes_total?: string; + checkpoints_behind?: string; + current_lag?: string; + file_diff_stage_time_taken?: string; + files?: string; + files_fetched?: string; + files_percent?: string; + files_total?: string; + finalize_replication_stage_time_taken?: string; + get_checkpoint_info_stage_time_taken?: string; + get_files_stage_time_taken?: string; + last_completed_lag?: string; + rejected_requests?: string; + replicating_stage_time_taken?: string; + shardId?: string; + stage?: string; + start_time?: string; + stop_time?: string; + target_host?: string; + target_node?: string; + time?: string; +} + diff --git a/api/_types/cat.aliases.d.ts b/api/_types/cat.aliases.d.ts new file mode 100644 index 000000000..9d69d35b4 --- /dev/null +++ b/api/_types/cat.aliases.d.ts @@ -0,0 +1,27 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface AliasesRecord { + alias?: string; + filter?: string; + index?: Common.IndexName; + is_write_index?: string; + 'routing.index'?: string; + 'routing.search'?: string; +} + diff --git a/api/_types/cat.allocation.d.ts b/api/_types/cat.allocation.d.ts new file mode 100644 index 000000000..7d2c64df7 --- /dev/null +++ b/api/_types/cat.allocation.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface AllocationRecord { + 'disk.avail'?: Common.ByteSize | undefined; + 'disk.indices'?: Common.ByteSize | undefined; + 'disk.percent'?: Common.Percentage | undefined; + 'disk.total'?: Common.ByteSize | undefined; + 'disk.used'?: Common.ByteSize | undefined; + host?: Common.Host | undefined; + ip?: Common.Ip | undefined; + node?: string; + shards?: string; +} + diff --git a/api/_types/cat.cluster_manager.d.ts b/api/_types/cat.cluster_manager.d.ts new file mode 100644 index 000000000..19f1f830e --- /dev/null +++ b/api/_types/cat.cluster_manager.d.ts @@ -0,0 +1,24 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export interface ClusterManagerRecord { + host?: string; + id?: string; + ip?: string; + node?: string; +} + diff --git a/api/_types/cat.count.d.ts b/api/_types/cat.count.d.ts new file mode 100644 index 000000000..c3b2a0637 --- /dev/null +++ b/api/_types/cat.count.d.ts @@ -0,0 +1,24 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface CountRecord { + count?: string; + epoch?: Common.StringifiedEpochTimeUnitSeconds; + timestamp?: Common.TimeOfDay; +} + diff --git a/api/_types/cat.fielddata.d.ts b/api/_types/cat.fielddata.d.ts new file mode 100644 index 000000000..b3f3e7741 --- /dev/null +++ b/api/_types/cat.fielddata.d.ts @@ -0,0 +1,26 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export interface FielddataRecord { + field?: string; + host?: string; + id?: string; + ip?: string; + node?: string; + size?: string; +} + diff --git a/api/_types/cat.health.d.ts b/api/_types/cat.health.d.ts new file mode 100644 index 000000000..5097f26dc --- /dev/null +++ b/api/_types/cat.health.d.ts @@ -0,0 +1,37 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface HealthRecord { + active_shards_percent?: string; + cluster?: string; + discovered_cluster_manager?: string; + discovered_master?: string; + epoch?: Common.StringifiedEpochTimeUnitSeconds; + init?: string; + max_task_wait_time?: string; + 'node.data'?: string; + 'node.total'?: string; + pending_tasks?: string; + pri?: string; + relo?: string; + shards?: string; + status?: string; + timestamp?: Common.TimeOfDay; + unassign?: string; +} + diff --git a/api/_types/cat.indices.d.ts b/api/_types/cat.indices.d.ts new file mode 100644 index 000000000..e84078e16 --- /dev/null +++ b/api/_types/cat.indices.d.ts @@ -0,0 +1,161 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export interface IndicesRecord { + 'bulk.avg_size_in_bytes'?: string; + 'bulk.avg_time'?: string; + 'bulk.total_operations'?: string; + 'bulk.total_size_in_bytes'?: string; + 'bulk.total_time'?: string; + 'completion.size'?: string; + 'creation.date'?: string; + 'creation.date.string'?: string; + 'docs.count'?: undefined | string; + 'docs.deleted'?: undefined | string; + 'fielddata.evictions'?: string; + 'fielddata.memory_size'?: string; + 'flush.total'?: string; + 'flush.total_time'?: string; + 'get.current'?: string; + 'get.exists_time'?: string; + 'get.exists_total'?: string; + 'get.missing_time'?: string; + 'get.missing_total'?: string; + 'get.time'?: string; + 'get.total'?: string; + health?: string; + index?: string; + 'indexing.delete_current'?: string; + 'indexing.delete_time'?: string; + 'indexing.delete_total'?: string; + 'indexing.index_current'?: string; + 'indexing.index_failed'?: string; + 'indexing.index_time'?: string; + 'indexing.index_total'?: string; + 'memory.total'?: string; + 'merges.current'?: string; + 'merges.current_docs'?: string; + 'merges.current_size'?: string; + 'merges.total'?: string; + 'merges.total_docs'?: string; + 'merges.total_size'?: string; + 'merges.total_time'?: string; + pri?: string; + 'pri.bulk.avg_size_in_bytes'?: string; + 'pri.bulk.avg_time'?: string; + 'pri.bulk.total_operations'?: string; + 'pri.bulk.total_size_in_bytes'?: string; + 'pri.bulk.total_time'?: string; + 'pri.completion.size'?: string; + 'pri.fielddata.evictions'?: string; + 'pri.fielddata.memory_size'?: string; + 'pri.flush.total'?: string; + 'pri.flush.total_time'?: string; + 'pri.get.current'?: string; + 'pri.get.exists_time'?: string; + 'pri.get.exists_total'?: string; + 'pri.get.missing_time'?: string; + 'pri.get.missing_total'?: string; + 'pri.get.time'?: string; + 'pri.get.total'?: string; + 'pri.indexing.delete_current'?: string; + 'pri.indexing.delete_time'?: string; + 'pri.indexing.delete_total'?: string; + 'pri.indexing.index_current'?: string; + 'pri.indexing.index_failed'?: string; + 'pri.indexing.index_time'?: string; + 'pri.indexing.index_total'?: string; + 'pri.memory.total'?: string; + 'pri.merges.current'?: string; + 'pri.merges.current_docs'?: string; + 'pri.merges.current_size'?: string; + 'pri.merges.total'?: string; + 'pri.merges.total_docs'?: string; + 'pri.merges.total_size'?: string; + 'pri.merges.total_time'?: string; + 'pri.query_cache.evictions'?: string; + 'pri.query_cache.memory_size'?: string; + 'pri.refresh.external_time'?: string; + 'pri.refresh.external_total'?: string; + 'pri.refresh.listeners'?: string; + 'pri.refresh.time'?: string; + 'pri.refresh.total'?: string; + 'pri.request_cache.evictions'?: string; + 'pri.request_cache.hit_count'?: string; + 'pri.request_cache.memory_size'?: string; + 'pri.request_cache.miss_count'?: string; + 'pri.search.fetch_current'?: string; + 'pri.search.fetch_time'?: string; + 'pri.search.fetch_total'?: string; + 'pri.search.open_contexts'?: string; + 'pri.search.query_current'?: string; + 'pri.search.query_time'?: string; + 'pri.search.query_total'?: string; + 'pri.search.scroll_current'?: string; + 'pri.search.scroll_time'?: string; + 'pri.search.scroll_total'?: string; + 'pri.segments.count'?: string; + 'pri.segments.fixed_bitset_memory'?: string; + 'pri.segments.index_writer_memory'?: string; + 'pri.segments.memory'?: string; + 'pri.segments.version_map_memory'?: string; + 'pri.store.size'?: undefined | string; + 'pri.suggest.current'?: string; + 'pri.suggest.time'?: string; + 'pri.suggest.total'?: string; + 'pri.warmer.current'?: string; + 'pri.warmer.total'?: string; + 'pri.warmer.total_time'?: string; + 'query_cache.evictions'?: string; + 'query_cache.memory_size'?: string; + 'refresh.external_time'?: string; + 'refresh.external_total'?: string; + 'refresh.listeners'?: string; + 'refresh.time'?: string; + 'refresh.total'?: string; + rep?: string; + 'request_cache.evictions'?: string; + 'request_cache.hit_count'?: string; + 'request_cache.memory_size'?: string; + 'request_cache.miss_count'?: string; + 'search.fetch_current'?: string; + 'search.fetch_time'?: string; + 'search.fetch_total'?: string; + 'search.open_contexts'?: string; + 'search.query_current'?: string; + 'search.query_time'?: string; + 'search.query_total'?: string; + 'search.scroll_current'?: string; + 'search.scroll_time'?: string; + 'search.scroll_total'?: string; + 'search.throttled'?: string; + 'segments.count'?: string; + 'segments.fixed_bitset_memory'?: string; + 'segments.index_writer_memory'?: string; + 'segments.memory'?: string; + 'segments.version_map_memory'?: string; + status?: string; + 'store.size'?: undefined | string; + 'suggest.current'?: string; + 'suggest.time'?: string; + 'suggest.total'?: string; + uuid?: string; + 'warmer.current'?: string; + 'warmer.total'?: string; + 'warmer.total_time'?: string; +} + diff --git a/api/_types/cat.master.d.ts b/api/_types/cat.master.d.ts new file mode 100644 index 000000000..c88eb332e --- /dev/null +++ b/api/_types/cat.master.d.ts @@ -0,0 +1,24 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export interface MasterRecord { + host?: string; + id?: string; + ip?: string; + node?: string; +} + diff --git a/api/_types/cat.nodeattrs.d.ts b/api/_types/cat.nodeattrs.d.ts new file mode 100644 index 000000000..52b2a3613 --- /dev/null +++ b/api/_types/cat.nodeattrs.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export interface NodeAttributesRecord { + attr?: string; + host?: string; + id?: string; + ip?: string; + node?: string; + pid?: string; + port?: string; + value?: string; +} + diff --git a/api/_types/cat.nodes.d.ts b/api/_types/cat.nodes.d.ts new file mode 100644 index 000000000..8a5340d22 --- /dev/null +++ b/api/_types/cat.nodes.d.ts @@ -0,0 +1,119 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface NodesRecord { + build?: string; + 'bulk.avg_size_in_bytes'?: string; + 'bulk.avg_time'?: string; + 'bulk.total_operations'?: string; + 'bulk.total_size_in_bytes'?: string; + 'bulk.total_time'?: string; + cluster_manager?: string; + 'completion.size'?: string; + cpu?: string; + 'disk.avail'?: Common.ByteSize; + 'disk.total'?: Common.ByteSize; + 'disk.used'?: Common.ByteSize; + 'disk.used_percent'?: Common.Percentage; + 'fielddata.evictions'?: string; + 'fielddata.memory_size'?: string; + 'file_desc.current'?: string; + 'file_desc.max'?: string; + 'file_desc.percent'?: Common.Percentage; + flavor?: string; + 'flush.total'?: string; + 'flush.total_time'?: string; + 'get.current'?: string; + 'get.exists_time'?: string; + 'get.exists_total'?: string; + 'get.missing_time'?: string; + 'get.missing_total'?: string; + 'get.time'?: string; + 'get.total'?: string; + 'heap.current'?: string; + 'heap.max'?: string; + 'heap.percent'?: Common.Percentage; + http_address?: string; + id?: Common.Id; + 'indexing.delete_current'?: string; + 'indexing.delete_time'?: string; + 'indexing.delete_total'?: string; + 'indexing.index_current'?: string; + 'indexing.index_failed'?: string; + 'indexing.index_time'?: string; + 'indexing.index_total'?: string; + ip?: string; + jdk?: string; + load_15m?: string; + load_1m?: string; + load_5m?: string; + master?: string; + 'merges.current'?: string; + 'merges.current_docs'?: string; + 'merges.current_size'?: string; + 'merges.total'?: string; + 'merges.total_docs'?: string; + 'merges.total_size'?: string; + 'merges.total_time'?: string; + name?: Common.Name; + 'node.role'?: string; + 'node.roles'?: string; + pid?: string; + port?: string; + 'query_cache.evictions'?: string; + 'query_cache.hit_count'?: string; + 'query_cache.memory_size'?: string; + 'query_cache.miss_count'?: string; + 'ram.current'?: string; + 'ram.max'?: string; + 'ram.percent'?: Common.Percentage; + 'refresh.external_time'?: string; + 'refresh.external_total'?: string; + 'refresh.listeners'?: string; + 'refresh.time'?: string; + 'refresh.total'?: string; + 'request_cache.evictions'?: string; + 'request_cache.hit_count'?: string; + 'request_cache.memory_size'?: string; + 'request_cache.miss_count'?: string; + 'script.cache_evictions'?: string; + 'script.compilation_limit_triggered'?: string; + 'script.compilations'?: string; + 'search.fetch_current'?: string; + 'search.fetch_time'?: string; + 'search.fetch_total'?: string; + 'search.open_contexts'?: string; + 'search.query_current'?: string; + 'search.query_time'?: string; + 'search.query_total'?: string; + 'search.scroll_current'?: string; + 'search.scroll_time'?: string; + 'search.scroll_total'?: string; + 'segments.count'?: string; + 'segments.fixed_bitset_memory'?: string; + 'segments.index_writer_memory'?: string; + 'segments.memory'?: string; + 'segments.version_map_memory'?: string; + 'suggest.current'?: string; + 'suggest.time'?: string; + 'suggest.total'?: string; + type?: string; + uptime?: string; + version?: Common.VersionString; +} + diff --git a/api/_types/cat.pending_tasks.d.ts b/api/_types/cat.pending_tasks.d.ts new file mode 100644 index 000000000..96726b194 --- /dev/null +++ b/api/_types/cat.pending_tasks.d.ts @@ -0,0 +1,24 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export interface PendingTasksRecord { + insertOrder?: string; + priority?: string; + source?: string; + timeInQueue?: string; +} + diff --git a/api/_types/cat.plugins.d.ts b/api/_types/cat.plugins.d.ts new file mode 100644 index 000000000..860b21d91 --- /dev/null +++ b/api/_types/cat.plugins.d.ts @@ -0,0 +1,27 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface PluginsRecord { + component?: string; + description?: string; + id?: Common.NodeId; + name?: Common.Name; + type?: string; + version?: Common.VersionString; +} + diff --git a/api/_types/cat.recovery.d.ts b/api/_types/cat.recovery.d.ts new file mode 100644 index 000000000..233ee551e --- /dev/null +++ b/api/_types/cat.recovery.d.ts @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface RecoveryRecord { + bytes?: string; + bytes_percent?: Common.Percentage; + bytes_recovered?: string; + bytes_total?: string; + files?: string; + files_percent?: Common.Percentage; + files_recovered?: string; + files_total?: string; + index?: Common.IndexName; + repository?: string; + shard?: string; + snapshot?: string; + source_host?: string; + source_node?: string; + stage?: string; + start_time?: Common.DateTime; + start_time_millis?: Common.EpochTimeUnitMillis; + stop_time?: Common.DateTime; + stop_time_millis?: Common.EpochTimeUnitMillis; + target_host?: string; + target_node?: string; + time?: Common.Duration; + translog_ops?: string; + translog_ops_percent?: Common.Percentage; + translog_ops_recovered?: string; + type?: string; +} + diff --git a/api/_types/cat.repositories.d.ts b/api/_types/cat.repositories.d.ts new file mode 100644 index 000000000..54d114e59 --- /dev/null +++ b/api/_types/cat.repositories.d.ts @@ -0,0 +1,22 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export interface RepositoriesRecord { + id?: string; + type?: string; +} + diff --git a/api/_types/cat.segments.d.ts b/api/_types/cat.segments.d.ts new file mode 100644 index 000000000..30af8d6ae --- /dev/null +++ b/api/_types/cat.segments.d.ts @@ -0,0 +1,36 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface SegmentsRecord { + committed?: string; + compound?: string; + 'docs.count'?: string; + 'docs.deleted'?: string; + generation?: string; + id?: Common.NodeId; + index?: Common.IndexName; + ip?: string; + prirep?: string; + searchable?: string; + segment?: string; + shard?: string; + size?: Common.ByteSize; + 'size.memory'?: Common.ByteSize; + version?: Common.VersionString; +} + diff --git a/api/_types/cat.shards.d.ts b/api/_types/cat.shards.d.ts new file mode 100644 index 000000000..228647410 --- /dev/null +++ b/api/_types/cat.shards.d.ts @@ -0,0 +1,96 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export interface ShardsRecord { + 'bulk.avg_size_in_bytes'?: string; + 'bulk.avg_time'?: string; + 'bulk.total_operations'?: string; + 'bulk.total_size_in_bytes'?: string; + 'bulk.total_time'?: string; + 'completion.size'?: string; + docs?: undefined | string; + 'fielddata.evictions'?: string; + 'fielddata.memory_size'?: string; + 'flush.total'?: string; + 'flush.total_time'?: string; + 'get.current'?: string; + 'get.exists_time'?: string; + 'get.exists_total'?: string; + 'get.missing_time'?: string; + 'get.missing_total'?: string; + 'get.time'?: string; + 'get.total'?: string; + id?: string; + index?: string; + 'indexing.delete_current'?: string; + 'indexing.delete_time'?: string; + 'indexing.delete_total'?: string; + 'indexing.index_current'?: string; + 'indexing.index_failed'?: string; + 'indexing.index_time'?: string; + 'indexing.index_total'?: string; + ip?: undefined | string; + 'merges.current'?: string; + 'merges.current_docs'?: string; + 'merges.current_size'?: string; + 'merges.total'?: string; + 'merges.total_docs'?: string; + 'merges.total_size'?: string; + 'merges.total_time'?: string; + node?: undefined | string; + 'path.data'?: string; + 'path.state'?: string; + prirep?: string; + 'query_cache.evictions'?: string; + 'query_cache.memory_size'?: string; + 'recoverysource.type'?: string; + 'refresh.external_time'?: string; + 'refresh.external_total'?: string; + 'refresh.listeners'?: string; + 'refresh.time'?: string; + 'refresh.total'?: string; + 'search.fetch_current'?: string; + 'search.fetch_time'?: string; + 'search.fetch_total'?: string; + 'search.open_contexts'?: string; + 'search.query_current'?: string; + 'search.query_time'?: string; + 'search.query_total'?: string; + 'search.scroll_current'?: string; + 'search.scroll_time'?: string; + 'search.scroll_total'?: string; + 'segments.count'?: string; + 'segments.fixed_bitset_memory'?: string; + 'segments.index_writer_memory'?: string; + 'segments.memory'?: string; + 'segments.version_map_memory'?: string; + 'seq_no.global_checkpoint'?: string; + 'seq_no.local_checkpoint'?: string; + 'seq_no.max'?: string; + shard?: string; + state?: string; + store?: undefined | string; + sync_id?: string; + 'unassigned.at'?: string; + 'unassigned.details'?: string; + 'unassigned.for'?: string; + 'unassigned.reason'?: string; + 'warmer.current'?: string; + 'warmer.total'?: string; + 'warmer.total_time'?: string; +} + diff --git a/api/_types/cat.snapshots.d.ts b/api/_types/cat.snapshots.d.ts new file mode 100644 index 000000000..76260d4ae --- /dev/null +++ b/api/_types/cat.snapshots.d.ts @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface SnapshotsRecord { + duration?: Common.Duration; + end_epoch?: Common.StringifiedEpochTimeUnitSeconds; + end_time?: Common.TimeOfDay; + failed_shards?: string; + id?: string; + indices?: string; + reason?: string; + repository?: string; + start_epoch?: Common.StringifiedEpochTimeUnitSeconds; + start_time?: Common.ScheduleTimeOfDay; + status?: string; + successful_shards?: string; + total_shards?: string; +} + diff --git a/api/_types/cat.tasks.d.ts b/api/_types/cat.tasks.d.ts new file mode 100644 index 000000000..d21bf6825 --- /dev/null +++ b/api/_types/cat.tasks.d.ts @@ -0,0 +1,37 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface TasksRecord { + action?: string; + description?: string; + id?: Common.Id; + ip?: string; + node?: string; + node_id?: Common.NodeId; + parent_task_id?: string; + port?: string; + running_time?: string; + running_time_ns?: string; + start_time?: string; + task_id?: Common.Id; + timestamp?: string; + type?: string; + version?: Common.VersionString; + x_opaque_id?: string; +} + diff --git a/api/_types/cat.templates.d.ts b/api/_types/cat.templates.d.ts new file mode 100644 index 000000000..f1b459b4c --- /dev/null +++ b/api/_types/cat.templates.d.ts @@ -0,0 +1,26 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface TemplatesRecord { + composed_of?: string; + index_patterns?: string; + name?: Common.Name; + order?: string; + version?: Common.VersionString | undefined; +} + diff --git a/api/_types/cat.thread_pool.d.ts b/api/_types/cat.thread_pool.d.ts new file mode 100644 index 000000000..3f02f37a1 --- /dev/null +++ b/api/_types/cat.thread_pool.d.ts @@ -0,0 +1,41 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface ThreadPoolRecord { + active?: string; + completed?: string; + core?: undefined | string; + ephemeral_node_id?: string; + host?: string; + ip?: string; + keep_alive?: undefined | string; + largest?: string; + max?: undefined | string; + name?: string; + node_id?: Common.NodeId; + node_name?: string; + pid?: string; + pool_size?: string; + port?: string; + queue?: string; + queue_size?: string; + rejected?: string; + size?: undefined | string; + type?: string; +} + diff --git a/api/_types/cluster._common.d.ts b/api/_types/cluster._common.d.ts new file mode 100644 index 000000000..60f256631 --- /dev/null +++ b/api/_types/cluster._common.d.ts @@ -0,0 +1,40 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' +import * as Indices_Common from './indices._common' +import * as Common_Mapping from './_common.mapping' + +export interface ComponentTemplate { + component_template: ComponentTemplateNode; + name: Common.Name; +} + +export interface ComponentTemplateNode { + _meta?: Common.Metadata; + template: ComponentTemplateSummary; + version?: Common.VersionNumber; +} + +export interface ComponentTemplateSummary { + _meta?: Common.Metadata; + aliases?: Record; + lifecycle?: Indices_Common.DataStreamLifecycleWithRollover; + mappings?: Common_Mapping.TypeMapping; + settings?: Record; + version?: Common.VersionNumber; +} + diff --git a/api/_types/cluster.allocation_explain.d.ts b/api/_types/cluster.allocation_explain.d.ts new file mode 100644 index 000000000..ad0aca098 --- /dev/null +++ b/api/_types/cluster.allocation_explain.d.ts @@ -0,0 +1,98 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface AllocationDecision { + decider: string; + decision: AllocationExplainDecision; + explanation: string; +} + +export type AllocationExplainDecision = 'ALWAYS' | 'NO' | 'THROTTLE' | 'YES' + +export interface AllocationStore { + allocation_id: string; + found: boolean; + in_sync: boolean; + matching_size_in_bytes: number; + matching_sync_id: boolean; + store_exception: string; +} + +export interface ClusterInfo { + nodes: Record; + reserved_sizes: ReservedSize[]; + shard_data_set_sizes?: Record; + shard_paths: Record; + shard_sizes: Record; +} + +export interface CurrentNode { + attributes: Record; + id: Common.Id; + name: Common.Name; + transport_address: Common.TransportAddress; + weight_ranking: number; +} + +export type Decision = 'allocation_delayed' | 'awaiting_info' | 'no' | 'no_attempt' | 'no_valid_shard_copy' | 'throttled' | 'worse_balance' | 'yes' + +export interface DiskUsage { + free_bytes: number; + free_disk_percent: number; + path: string; + total_bytes: number; + used_bytes: number; + used_disk_percent: number; +} + +export interface NodeAllocationExplanation { + deciders: AllocationDecision[]; + node_attributes: Record; + node_decision: Decision; + node_id: Common.Id; + node_name: Common.Name; + store?: AllocationStore; + transport_address: Common.TransportAddress; + weight_ranking: number; +} + +export interface NodeDiskUsage { + least_available: DiskUsage; + most_available: DiskUsage; + node_name: Common.Name; +} + +export interface ReservedSize { + node_id: Common.Id; + path: string; + shards: string[]; + total: number; +} + +export interface UnassignedInformation { + allocation_status?: string; + at: Common.DateTime; + delayed?: boolean; + details?: string; + failed_allocation_attempts?: number; + last_allocation_status?: string; + reason: UnassignedInformationReason; +} + +export type UnassignedInformationReason = 'ALLOCATION_FAILED' | 'CLUSTER_RECOVERED' | 'DANGLING_INDEX_IMPORTED' | 'EXISTING_INDEX_RESTORED' | 'FORCED_EMPTY_PRIMARY' | 'INDEX_CREATED' | 'INDEX_REOPENED' | 'MANUAL_ALLOCATION' | 'NEW_INDEX_RESTORED' | 'NODE_LEFT' | 'PRIMARY_FAILED' | 'REALLOCATED_REPLICA' | 'REINITIALIZED' | 'REPLICA_ADDED' | 'REROUTE_CANCELLED' + diff --git a/api/_types/cluster.health.d.ts b/api/_types/cluster.health.d.ts new file mode 100644 index 000000000..412fc21ba --- /dev/null +++ b/api/_types/cluster.health.d.ts @@ -0,0 +1,61 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface HealthResponseBody { + active_primary_shards: number; + active_shards: number; + active_shards_percent_as_number: Common.Percentage; + cluster_name: Common.Name; + delayed_unassigned_shards: number; + indices?: Record; + initializing_shards: number; + number_of_data_nodes: number; + number_of_in_flight_fetch: number; + number_of_nodes: number; + number_of_pending_tasks: number; + relocating_shards: number; + status: Common.HealthStatus; + task_max_waiting_in_queue?: Common.Duration; + task_max_waiting_in_queue_millis: Common.DurationValueUnitMillis; + timed_out: boolean; + unassigned_shards: number; +} + +export interface IndexHealthStats { + active_primary_shards: number; + active_shards: number; + initializing_shards: number; + number_of_replicas: number; + number_of_shards: number; + relocating_shards: number; + shards?: Record; + status: Common.HealthStatus; + unassigned_shards: number; +} + +export type Level = 'awareness_attributes' | 'cluster' | 'indices' | 'shards' + +export interface ShardHealthStats { + active_shards: number; + initializing_shards: number; + primary_active: boolean; + relocating_shards: number; + status: Common.HealthStatus; + unassigned_shards: number; +} + diff --git a/api/_types/cluster.pending_tasks.d.ts b/api/_types/cluster.pending_tasks.d.ts new file mode 100644 index 000000000..4c939c379 --- /dev/null +++ b/api/_types/cluster.pending_tasks.d.ts @@ -0,0 +1,27 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface PendingTask { + executing: boolean; + insert_order: number; + priority: string; + source: string; + time_in_queue?: Common.Duration; + time_in_queue_millis: Common.DurationValueUnitMillis; +} + diff --git a/api/_types/cluster.remote_info.d.ts b/api/_types/cluster.remote_info.d.ts new file mode 100644 index 000000000..2df0d1f4f --- /dev/null +++ b/api/_types/cluster.remote_info.d.ts @@ -0,0 +1,41 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export type ClusterRemoteInfo = ClusterRemoteSniffInfo | ClusterRemoteProxyInfo + +export interface ClusterRemoteProxyInfo { + connected: boolean; + initial_connect_timeout: Common.Duration; + max_proxy_socket_connections: number; + mode: 'proxy'; + num_proxy_sockets_connected: number; + proxy_address: string; + server_name: string; + skip_unavailable: boolean; +} + +export interface ClusterRemoteSniffInfo { + connected: boolean; + initial_connect_timeout: Common.Duration; + max_connections_per_cluster: number; + mode: 'sniff'; + num_nodes_connected: number; + seeds: string[]; + skip_unavailable: boolean; +} + diff --git a/api/_types/cluster.reroute.d.ts b/api/_types/cluster.reroute.d.ts new file mode 100644 index 000000000..a6bfc2939 --- /dev/null +++ b/api/_types/cluster.reroute.d.ts @@ -0,0 +1,74 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface Command { + allocate_empty_primary?: CommandAllocatePrimaryAction; + allocate_replica?: CommandAllocateReplicaAction; + allocate_stale_primary?: CommandAllocatePrimaryAction; + cancel?: CommandCancelAction; + move?: CommandMoveAction; +} + +export interface CommandAllocatePrimaryAction { + accept_data_loss: boolean; + index: Common.IndexName; + node: string; + shard: number; +} + +export interface CommandAllocateReplicaAction { + index: Common.IndexName; + node: string; + shard: number; +} + +export interface CommandCancelAction { + allow_primary?: boolean; + index: Common.IndexName; + node: string; + shard: number; +} + +export interface CommandMoveAction { + from_node: string; + index: Common.IndexName; + shard: number; + to_node: string; +} + +export interface RerouteDecision { + decider: string; + decision: string; + explanation: string; +} + +export interface RerouteExplanation { + command: string; + decisions: RerouteDecision[]; + parameters: RerouteParameters; +} + +export interface RerouteParameters { + allow_primary: boolean; + from_node?: Common.NodeName; + index: Common.IndexName; + node: Common.NodeName; + shard: number; + to_node?: Common.NodeName; +} + diff --git a/api/_types/cluster.state.d.ts b/api/_types/cluster.state.d.ts new file mode 100644 index 000000000..a4b2be435 --- /dev/null +++ b/api/_types/cluster.state.d.ts @@ -0,0 +1,19 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export type Metric = '_all' | 'blocks' | 'cluster_manager_node' | 'master_node' | 'metadata' | 'nodes' | 'routing_nodes' | 'routing_table' | 'version' + diff --git a/api/_types/cluster.stats.d.ts b/api/_types/cluster.stats.d.ts new file mode 100644 index 000000000..1481336c0 --- /dev/null +++ b/api/_types/cluster.stats.d.ts @@ -0,0 +1,268 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' +import * as Nodes_Common from './nodes._common' + +export interface CharFilterTypes { + analyzer_types: FieldTypes[]; + built_in_analyzers: FieldTypes[]; + built_in_char_filters: FieldTypes[]; + built_in_filters: FieldTypes[]; + built_in_tokenizers: FieldTypes[]; + char_filter_types: FieldTypes[]; + filter_types: FieldTypes[]; + tokenizer_types: FieldTypes[]; +} + +export interface ClusterFileSystem { + available_in_bytes: number; + free_in_bytes: number; + total_in_bytes: number; +} + +export interface ClusterIndices { + analysis: CharFilterTypes; + completion: Common.CompletionStats; + count: number; + docs: Common.DocStats; + fielddata: Common.FielddataStats; + mappings: FieldTypesMappings; + query_cache: Common.QueryCacheStats; + segments: Common.SegmentsStats; + shards: ClusterIndicesShards; + store: Common.StoreStats; + versions?: IndicesVersions[]; +} + +export interface ClusterIndicesShards { + index?: ClusterIndicesShardsIndex; + primaries?: number; + replication?: number; + total?: number; +} + +export interface ClusterIndicesShardsIndex { + primaries: ClusterShardMetrics; + replication: ClusterShardMetrics; + shards: ClusterShardMetrics; +} + +export interface ClusterIngest { + number_of_pipelines: number; + processor_stats: Record; +} + +export interface ClusterJvm { + max_uptime_in_millis: Common.DurationValueUnitMillis; + mem: ClusterJvmMemory; + threads: number; + versions: ClusterJvmVersion[]; +} + +export interface ClusterJvmMemory { + heap_max_in_bytes: number; + heap_used_in_bytes: number; +} + +export interface ClusterJvmVersion { + bundled_jdk: boolean; + count: number; + using_bundled_jdk: boolean; + version: Common.VersionString; + vm_name: string; + vm_vendor: string; + vm_version: Common.VersionString; +} + +export interface ClusterNetworkTypes { + http_types: Record; + transport_types: Record; +} + +export interface ClusterNodeCount { + coordinating_only: number; + data: number; + data_cold: number; + data_content: number; + data_frozen?: number; + data_hot: number; + data_warm: number; + ingest: number; + master: number; + ml: number; + remote_cluster_client: number; + total: number; + transform: number; + voting_only: number; +} + +export interface ClusterNodes { + count: ClusterNodeCount; + discovery_types: Record; + fs: ClusterFileSystem; + indexing_pressure: IndexingPressure; + ingest: ClusterIngest; + jvm: ClusterJvm; + network_types: ClusterNetworkTypes; + os: ClusterOperatingSystem; + packaging_types: NodePackagingType[]; + plugins: Common.PluginStats[]; + process: ClusterProcess; + versions: Common.VersionString[]; +} + +export interface ClusterOperatingSystem { + allocated_processors: number; + architectures?: ClusterOperatingSystemArchitecture[]; + available_processors: number; + mem: OperatingSystemMemoryInfo; + names: ClusterOperatingSystemName[]; + pretty_names: ClusterOperatingSystemPrettyName[]; +} + +export interface ClusterOperatingSystemArchitecture { + arch: string; + count: number; +} + +export interface ClusterOperatingSystemName { + count: number; + name: Common.Name; +} + +export interface ClusterOperatingSystemPrettyName { + count: number; + pretty_name: Common.Name; +} + +export interface ClusterProcess { + cpu: ClusterProcessCpu; + open_file_descriptors: ClusterProcessOpenFileDescriptors; +} + +export interface ClusterProcessCpu { + percent: number; +} + +export interface ClusterProcessOpenFileDescriptors { + avg: number; + max: number; + min: number; +} + +export interface ClusterProcessor { + count: number; + current: number; + failed: number; + time?: Common.Duration; + time_in_millis: Common.DurationValueUnitMillis; +} + +export interface ClusterShardMetrics { + avg: number; + max: number; + min: number; +} + +export interface FieldTypes { + count: number; + index_count: number; + indexed_vector_count?: number; + indexed_vector_dim_max?: number; + indexed_vector_dim_min?: number; + name: Common.Name; + script_count?: number; +} + +export interface FieldTypesMappings { + field_types: FieldTypes[]; + runtime_field_types?: RuntimeFieldTypes[]; + total_deduplicated_field_count?: number; + total_deduplicated_mapping_size?: Common.ByteSize; + total_deduplicated_mapping_size_in_bytes?: number; + total_field_count?: number; +} + +export interface IndexingPressure { + memory: IndexingPressureMemory; +} + +export interface IndexingPressureMemory { + current: IndexingPressureMemorySummary; + limit_in_bytes: number; + total: IndexingPressureMemorySummary; +} + +export interface IndexingPressureMemorySummary { + all_in_bytes: number; + combined_coordinating_and_primary_in_bytes: number; + coordinating_in_bytes: number; + coordinating_rejections?: number; + primary_in_bytes: number; + primary_rejections?: number; + replica_in_bytes: number; + replica_rejections?: number; +} + +export interface IndicesVersions { + index_count: number; + primary_shard_count: number; + total_primary_bytes: number; + version: Common.VersionString; +} + +export interface NodePackagingType { + count: number; + flavor: string; + type: string; +} + +export interface OperatingSystemMemoryInfo { + adjusted_total_in_bytes?: number; + free_in_bytes: number; + free_percent: number; + total_in_bytes: number; + used_in_bytes: number; + used_percent: number; +} + +export interface RuntimeFieldTypes { + chars_max: number; + chars_total: number; + count: number; + doc_max: number; + doc_total: number; + index_count: number; + lang: string[]; + lines_max: number; + lines_total: number; + name: Common.Name; + scriptless_count: number; + shadowed_count: number; + source_max: number; + source_total: number; +} + +export interface StatsResponseBase extends Nodes_Common.NodesResponseBase { + cluster_name: Common.Name; + cluster_uuid: Common.Uuid; + indices: ClusterIndices; + nodes: ClusterNodes; + status: Common.HealthStatus; + timestamp: number; +} + diff --git a/api/_types/dangling_indices.list_dangling_indices.d.ts b/api/_types/dangling_indices.list_dangling_indices.d.ts new file mode 100644 index 000000000..ca2d9203e --- /dev/null +++ b/api/_types/dangling_indices.list_dangling_indices.d.ts @@ -0,0 +1,26 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface DanglingIndex { + creation_date?: Common.DateTime; + creation_date_millis: Common.EpochTimeUnitMillis; + index_name: string; + index_uuid: string; + node_ids: Common.Ids; +} + diff --git a/api/_types/indices._common.d.ts b/api/_types/indices._common.d.ts new file mode 100644 index 000000000..f50626d9d --- /dev/null +++ b/api/_types/indices._common.d.ts @@ -0,0 +1,500 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common_QueryDsl from './_common.query_dsl' +import * as Common from './_common' +import * as Common_Analysis from './_common.analysis' +import * as Common_Mapping from './_common.mapping' + +export interface Alias { + filter?: Common_QueryDsl.QueryContainer; + index_routing?: Common.Routing; + is_hidden?: boolean; + is_write_index?: boolean; + routing?: Common.Routing; + search_routing?: Common.Routing; +} + +export interface AliasDefinition { + filter?: Common_QueryDsl.QueryContainer; + index_routing?: string; + is_hidden?: boolean; + is_write_index?: boolean; + routing?: string; + search_routing?: string; +} + +export interface CacheQueries { + enabled: boolean; +} + +export interface DataStream { + _meta?: Common.Metadata; + allow_custom_routing?: boolean; + generation: number; + hidden?: boolean; + ilm_policy?: Common.Name; + indices: DataStreamIndex[]; + lifecycle?: DataStreamLifecycleWithRollover; + name: Common.DataStreamName; + next_generation_managed_by?: ManagedBy; + prefer_ilm?: boolean; + replicated?: boolean; + status: Common.HealthStatusCapitalized; + system?: boolean; + template: Common.Name; + timestamp_field: DataStreamTimestampField; +} + +export interface DataStreamIndex { + ilm_policy?: Common.Name; + index_name: Common.IndexName; + index_uuid: Common.Uuid; + managed_by?: ManagedBy; + prefer_ilm?: boolean; +} + +export interface DataStreamLifecycle { + data_retention?: Common.Duration; + downsampling?: DataStreamLifecycleDownsampling; +} + +export interface DataStreamLifecycleDownsampling { + rounds: DownsamplingRound[]; +} + +export interface DataStreamLifecycleRolloverConditions { + max_age?: string; + max_docs?: number; + max_primary_shard_docs?: number; + max_primary_shard_size?: Common.ByteSize; + max_size?: Common.ByteSize; + min_age?: Common.Duration; + min_docs?: number; + min_primary_shard_docs?: number; + min_primary_shard_size?: Common.ByteSize; + min_size?: Common.ByteSize; +} + +export interface DataStreamLifecycleWithRollover { + data_retention?: Common.Duration; + downsampling?: DataStreamLifecycleDownsampling; + rollover?: DataStreamLifecycleRolloverConditions; +} + +export interface DataStreamTimestampField { + name: Common.Field; +} + +export interface DownsampleConfig { + fixed_interval: Common.DurationLarge; +} + +export interface DownsamplingRound { + after: Common.Duration; + config: DownsampleConfig; +} + +export interface FielddataFrequencyFilter { + max: number; + min: number; + min_segment_size: number; +} + +export type IndexCheckOnStartup = 'checksum' | 'false' | 'true' + +export interface IndexingPressure { + memory: IndexingPressureMemory; +} + +export interface IndexingPressureMemory { + limit?: number; +} + +export interface IndexingSlowlogSettings { + level?: string; + reformat?: boolean; + source?: number; + threshold?: IndexingSlowlogThresholds; +} + +export interface IndexingSlowlogThresholds { + index?: SlowlogThresholdLevels; +} + +export interface IndexRouting { + allocation?: IndexRoutingAllocation; + rebalance?: IndexRoutingRebalance; +} + +export interface IndexRoutingAllocation { + disk?: IndexRoutingAllocationDisk; + enable?: IndexRoutingAllocationOptions; + include?: IndexRoutingAllocationInclude; + initial_recovery?: IndexRoutingAllocationInitialRecovery; +} + +export interface IndexRoutingAllocationDisk { + threshold_enabled?: boolean | string; +} + +export interface IndexRoutingAllocationInclude { + _id?: Common.Id; + _tier_preference?: string; +} + +export interface IndexRoutingAllocationInitialRecovery { + _id?: Common.Id; +} + +export type IndexRoutingAllocationOptions = 'all' | 'new_primaries' | 'none' | 'primaries' + +export interface IndexRoutingRebalance { + enable: IndexRoutingRebalanceOptions; +} + +export type IndexRoutingRebalanceOptions = 'all' | 'none' | 'primaries' | 'replicas' + +export interface IndexSegmentSort { + field?: Common.Fields; + missing?: SegmentSortMissing | SegmentSortMissing[]; + mode?: SegmentSortMode | SegmentSortMode[]; + order?: SegmentSortOrder | SegmentSortOrder[]; +} + +export interface IndexSettingBlocks { + metadata?: Common.Stringifiedboolean; + read?: Common.Stringifiedboolean; + read_only?: Common.Stringifiedboolean; + read_only_allow_delete?: Common.Stringifiedboolean; + write?: Common.Stringifiedboolean; +} + +export interface IndexSettings { + analysis?: IndexSettingsAnalysis; + analyze?: SettingsAnalyze; + auto_expand_replicas?: string; + blocks?: IndexSettingBlocks; + check_on_startup?: IndexCheckOnStartup; + codec?: string; + creation_date?: Common.StringifiedEpochTimeUnitMillis; + creation_date_string?: Common.DateTime; + default_pipeline?: Common.PipelineName; + final_pipeline?: Common.PipelineName; + format?: string | number; + gc_deletes?: Common.Duration; + hidden?: boolean | string; + highlight?: SettingsHighlight; + index?: IndexSettings; + indexing_pressure?: IndexingPressure; + 'indexing.slowlog'?: IndexingSlowlogSettings; + lifecycle?: IndexSettingsLifecycle; + load_fixed_bitset_filters_eagerly?: boolean; + mapping?: MappingLimitSettings; + max_docvalue_fields_search?: number; + max_inner_result_window?: number; + max_ngram_diff?: number; + max_refresh_listeners?: number; + max_regex_length?: number; + max_rescore_window?: number; + max_result_window?: number; + max_script_fields?: number; + max_shingle_diff?: number; + max_slices_per_scroll?: number; + max_terms_count?: number; + merge?: Merge; + mode?: string; + number_of_replicas?: number | string; + number_of_routing_shards?: number; + number_of_shards?: number | string; + priority?: number | string; + provided_name?: Common.Name; + queries?: Queries; + query_string?: SettingsQueryString; + refresh_interval?: Common.Duration; + routing?: IndexRouting; + routing_partition_size?: Common.Stringifiedinteger; + routing_path?: string | string[]; + search?: SettingsSearch; + settings?: IndexSettings; + similarity?: SettingsSimilarity; + soft_deletes?: SoftDeletes; + sort?: IndexSegmentSort; + store?: Storage; + time_series?: IndexSettingsTimeSeries; + top_metrics_max_size?: number; + translog?: Translog; + uuid?: Common.Uuid; + verified_before_close?: boolean | string; + version?: IndexVersioning; +} + +export interface IndexSettingsAnalysis { + analyzer?: Record; + char_filter?: Record; + filter?: Record; + normalizer?: Record; + tokenizer?: Record; +} + +export interface IndexSettingsLifecycle { + indexing_complete?: Common.Stringifiedboolean; + name: Common.Name; + origination_date?: number; + parse_origination_date?: boolean; + rollover_alias?: string; + step?: IndexSettingsLifecycleStep; +} + +export interface IndexSettingsLifecycleStep { + wait_time_threshold?: Common.Duration; +} + +export interface IndexSettingsTimeSeries { + end_time?: Common.DateTime; + start_time?: Common.DateTime; +} + +export interface IndexState { + aliases?: Record; + data_stream?: Common.DataStreamName; + defaults?: IndexSettings; + lifecycle?: DataStreamLifecycle; + mappings?: Common_Mapping.TypeMapping; + settings?: IndexSettings; +} + +export interface IndexTemplate { + _meta?: Common.Metadata; + allow_auto_create?: boolean; + composed_of?: Common.Name[]; + data_stream?: IndexTemplateDataStreamConfiguration; + index_patterns: Common.Names; + priority?: number; + template?: IndexTemplateSummary; + version?: Common.VersionNumber; +} + +export interface IndexTemplateDataStreamConfiguration { + allow_custom_routing?: boolean; + hidden?: boolean; + timestamp_field?: DataStreamTimestampField; +} + +export interface IndexTemplateSummary { + aliases?: Record; + lifecycle?: DataStreamLifecycleWithRollover; + mappings?: Common_Mapping.TypeMapping; + settings?: IndexSettings; +} + +export interface IndexVersioning { + created?: Common.VersionString; + created_string?: string; +} + +export type ManagedBy = 'Data stream lifecycle' | 'Index Lifecycle Management' | 'Unmanaged' + +export interface MappingLimitSettings { + coerce?: boolean; + depth?: MappingLimitSettingsDepth; + dimension_fields?: MappingLimitSettingsDimensionFields; + field_name_length?: MappingLimitSettingsFieldNameLength; + ignore_malformed?: boolean; + nested_fields?: MappingLimitSettingsNestedFields; + nested_objects?: MappingLimitSettingsNestedObjects; + total_fields?: MappingLimitSettingsTotalFields; +} + +export interface MappingLimitSettingsDepth { + limit?: number; +} + +export interface MappingLimitSettingsDimensionFields { + limit?: number; +} + +export interface MappingLimitSettingsFieldNameLength { + limit?: number; +} + +export interface MappingLimitSettingsNestedFields { + limit?: number; +} + +export interface MappingLimitSettingsNestedObjects { + limit?: number; +} + +export interface MappingLimitSettingsTotalFields { + limit?: number; +} + +export interface Merge { + scheduler?: MergeScheduler; +} + +export interface MergeScheduler { + max_merge_count?: Common.Stringifiedinteger; + max_thread_count?: Common.Stringifiedinteger; +} + +export interface NumericFielddata { + format: NumericFielddataFormat; +} + +export type NumericFielddataFormat = 'array' | 'disabled' + +export interface Queries { + cache?: CacheQueries; +} + +export interface RetentionLease { + period: Common.Duration; +} + +export interface SearchIdle { + after?: Common.Duration; +} + +export type SegmentSortMissing = '_first' | '_last' + +export type SegmentSortMode = 'max' | 'min' + +export type SegmentSortOrder = 'asc' | 'desc' + +export interface SettingsAnalyze { + max_token_count?: Common.Stringifiedinteger; +} + +export interface SettingsHighlight { + max_analyzed_offset?: number; +} + +export interface SettingsQueryString { + lenient: Common.Stringifiedboolean; +} + +export interface SettingsSearch { + idle?: SearchIdle; + slowlog?: SlowlogSettings; +} + +export interface SettingsSimilarity { + bm25?: SettingsSimilarityBm25; + dfi?: SettingsSimilarityDfi; + dfr?: SettingsSimilarityDfr; + ib?: SettingsSimilarityIb; + lmd?: SettingsSimilarityLmd; + lmj?: SettingsSimilarityLmj; + scripted_tfidf?: SettingsSimilarityScriptedTfidf; +} + +export interface SettingsSimilarityBm25 { + b: number; + discount_overlaps: boolean; + k1: number; + type: 'BM25'; +} + +export interface SettingsSimilarityDfi { + independence_measure: Common.DFIIndependenceMeasure; + type: 'DFI'; +} + +export interface SettingsSimilarityDfr { + after_effect: Common.DFRAfterEffect; + basic_model: Common.DFRBasicModel; + normalization: Common.Normalization; + type: 'DFR'; +} + +export interface SettingsSimilarityIb { + distribution: Common.IBDistribution; + lambda: Common.IBLambda; + normalization: Common.Normalization; + type: 'IB'; +} + +export interface SettingsSimilarityLmd { + mu: number; + type: 'LMDirichlet'; +} + +export interface SettingsSimilarityLmj { + lambda: number; + type: 'LMJelinekMercer'; +} + +export interface SettingsSimilarityScriptedTfidf { + script: Common.Script; + type: 'scripted'; +} + +export interface SlowlogSettings { + level?: string; + reformat?: boolean; + source?: number; + threshold?: SlowlogThresholds; +} + +export interface SlowlogThresholdLevels { + debug?: Common.Duration; + info?: Common.Duration; + trace?: Common.Duration; + warn?: Common.Duration; +} + +export interface SlowlogThresholds { + fetch?: SlowlogThresholdLevels; + query?: SlowlogThresholdLevels; +} + +export interface SoftDeletes { + enabled?: boolean; + retention_lease?: RetentionLease; +} + +export interface Storage { + allow_mmap?: boolean; + type: StorageType; +} + +export type StorageType = 'fs' | 'hybridfs' | 'mmapfs' | 'niofs' + +export interface TemplateMapping { + aliases: Record; + index_patterns: Common.Name[]; + mappings: Common_Mapping.TypeMapping; + order: number; + settings: Record>; + version?: Common.VersionNumber; +} + +export interface Translog { + durability?: TranslogDurability; + flush_threshold_size?: Common.ByteSize; + retention?: TranslogRetention; + sync_interval?: Common.Duration; +} + +export type TranslogDurability = 'async' | 'request' + +export interface TranslogRetention { + age?: Common.Duration; + size?: Common.ByteSize; +} + diff --git a/api/_types/indices.add_block.d.ts b/api/_types/indices.add_block.d.ts new file mode 100644 index 000000000..ba6701302 --- /dev/null +++ b/api/_types/indices.add_block.d.ts @@ -0,0 +1,25 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export type IndicesBlockOptions = 'metadata' | 'read' | 'read_only' | 'write' + +export interface IndicesBlockStatus { + blocked: boolean; + name: Common.IndexName; +} + diff --git a/api/_types/indices.analyze.d.ts b/api/_types/indices.analyze.d.ts new file mode 100644 index 000000000..905bd2f4e --- /dev/null +++ b/api/_types/indices.analyze.d.ts @@ -0,0 +1,63 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export interface AnalyzeDetail { + analyzer?: AnalyzerDetail; + charfilters?: CharFilterDetail[]; + custom_analyzer: boolean; + tokenfilters?: TokenDetail[]; + tokenizer?: TokenDetail; +} + +export interface AnalyzerDetail { + name: string; + tokens: ExplainAnalyzeToken[]; +} + +export interface AnalyzeToken { + end_offset: number; + position: number; + positionLength?: number; + start_offset: number; + token: string; + type: string; +} + +export interface CharFilterDetail { + filtered_text: string[]; + name: string; +} + +export interface ExplainAnalyzeToken { + bytes: string; + end_offset: number; + keyword?: boolean; + position: number; + positionLength: number; + start_offset: number; + termFrequency: number; + token: string; + type: string; +} + +export type TextToAnalyze = string | string[] + +export interface TokenDetail { + name: string; + tokens: ExplainAnalyzeToken[]; +} + diff --git a/api/_types/indices.close.d.ts b/api/_types/indices.close.d.ts new file mode 100644 index 000000000..21182757e --- /dev/null +++ b/api/_types/indices.close.d.ts @@ -0,0 +1,27 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface CloseIndexResult { + closed: boolean; + shards?: Record; +} + +export interface CloseShardResult { + failures: Common.ShardFailure[]; +} + diff --git a/api/_types/indices.data_streams_stats.d.ts b/api/_types/indices.data_streams_stats.d.ts new file mode 100644 index 000000000..f6b73d24d --- /dev/null +++ b/api/_types/indices.data_streams_stats.d.ts @@ -0,0 +1,26 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface DataStreamsStatsItem { + backing_indices: number; + data_stream: Common.Name; + maximum_timestamp: Common.EpochTimeUnitMillis; + store_size?: Common.ByteSize; + store_size_bytes: number; +} + diff --git a/api/_types/indices.get_alias.d.ts b/api/_types/indices.get_alias.d.ts new file mode 100644 index 000000000..41239bf51 --- /dev/null +++ b/api/_types/indices.get_alias.d.ts @@ -0,0 +1,22 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Indices_Common from './indices._common' + +export interface IndexAliases { + aliases: Record; +} + diff --git a/api/_types/indices.get_field_mapping.d.ts b/api/_types/indices.get_field_mapping.d.ts new file mode 100644 index 000000000..12be03517 --- /dev/null +++ b/api/_types/indices.get_field_mapping.d.ts @@ -0,0 +1,22 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common_Mapping from './_common.mapping' + +export interface TypeFieldMappings { + mappings: Record; +} + diff --git a/api/_types/indices.get_index_template.d.ts b/api/_types/indices.get_index_template.d.ts new file mode 100644 index 000000000..fd5e64240 --- /dev/null +++ b/api/_types/indices.get_index_template.d.ts @@ -0,0 +1,24 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Indices_Common from './indices._common' +import * as Common from './_common' + +export interface IndexTemplateItem { + index_template: Indices_Common.IndexTemplate; + name: Common.Name; +} + diff --git a/api/_types/indices.get_mapping.d.ts b/api/_types/indices.get_mapping.d.ts new file mode 100644 index 000000000..6ef944930 --- /dev/null +++ b/api/_types/indices.get_mapping.d.ts @@ -0,0 +1,23 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common_Mapping from './_common.mapping' + +export interface IndexMappingRecord { + item?: Common_Mapping.TypeMapping; + mappings: Common_Mapping.TypeMapping; +} + diff --git a/api/_types/indices.put_index_template.d.ts b/api/_types/indices.put_index_template.d.ts new file mode 100644 index 000000000..735d47554 --- /dev/null +++ b/api/_types/indices.put_index_template.d.ts @@ -0,0 +1,26 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Indices_Common from './indices._common' +import * as Common_Mapping from './_common.mapping' + +export interface IndexTemplateMapping { + aliases?: Record; + lifecycle?: Indices_Common.DataStreamLifecycle; + mappings?: Common_Mapping.TypeMapping; + settings?: Indices_Common.IndexSettings; +} + diff --git a/api/_types/indices.recovery.d.ts b/api/_types/indices.recovery.d.ts new file mode 100644 index 000000000..3b59e2cc1 --- /dev/null +++ b/api/_types/indices.recovery.d.ts @@ -0,0 +1,117 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface FileDetails { + length: number; + name: string; + recovered: number; +} + +export interface RecoveryBytes { + percent: Common.Percentage; + recovered?: Common.ByteSize; + recovered_from_snapshot?: Common.ByteSize; + recovered_from_snapshot_in_bytes?: Common.ByteSize; + recovered_in_bytes: Common.ByteSize; + reused?: Common.ByteSize; + reused_in_bytes: Common.ByteSize; + total?: Common.ByteSize; + total_in_bytes: Common.ByteSize; +} + +export interface RecoveryFiles { + details?: FileDetails[]; + percent: Common.Percentage; + recovered: number; + reused: number; + total: number; +} + +export interface RecoveryIndexStatus { + bytes?: RecoveryBytes; + files: RecoveryFiles; + size: RecoveryBytes; + source_throttle_time?: Common.Duration; + source_throttle_time_in_millis: Common.DurationValueUnitMillis; + target_throttle_time?: Common.Duration; + target_throttle_time_in_millis: Common.DurationValueUnitMillis; + total_time?: Common.Duration; + total_time_in_millis: Common.DurationValueUnitMillis; +} + +export interface RecoveryOrigin { + bootstrap_new_history_uuid?: boolean; + host?: Common.Host; + hostname?: string; + id?: Common.Id; + index?: Common.IndexName; + ip?: Common.Ip; + name?: Common.Name; + repository?: Common.Name; + restoreUUID?: Common.Uuid; + snapshot?: Common.Name; + transport_address?: Common.TransportAddress; + version?: Common.VersionString; +} + +export interface RecoveryStartStatus { + check_index_time?: Common.Duration; + check_index_time_in_millis: Common.DurationValueUnitMillis; + total_time?: Common.Duration; + total_time_in_millis: Common.DurationValueUnitMillis; +} + +export interface RecoveryStatus { + shards: ShardRecovery[]; +} + +export interface ShardRecovery { + id: number; + index: RecoveryIndexStatus; + primary: boolean; + source: RecoveryOrigin; + stage: string; + start?: RecoveryStartStatus; + start_time?: Common.DateTime; + start_time_in_millis: Common.EpochTimeUnitMillis; + stop_time?: Common.DateTime; + stop_time_in_millis?: Common.EpochTimeUnitMillis; + target: RecoveryOrigin; + total_time?: Common.Duration; + total_time_in_millis: Common.DurationValueUnitMillis; + translog: TranslogStatus; + type: string; + verify_index: VerifyIndex; +} + +export interface TranslogStatus { + percent: Common.Percentage; + recovered: number; + total: number; + total_on_start: number; + total_time?: Common.Duration; + total_time_in_millis: Common.DurationValueUnitMillis; +} + +export interface VerifyIndex { + check_index_time?: Common.Duration; + check_index_time_in_millis: Common.DurationValueUnitMillis; + total_time?: Common.Duration; + total_time_in_millis: Common.DurationValueUnitMillis; +} + diff --git a/api/_types/indices.resolve_index.d.ts b/api/_types/indices.resolve_index.d.ts new file mode 100644 index 000000000..176c9d8c1 --- /dev/null +++ b/api/_types/indices.resolve_index.d.ts @@ -0,0 +1,36 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface ResolveIndexAliasItem { + indices: Common.Indices; + name: Common.Name; +} + +export interface ResolveIndexDataStreamsItem { + backing_indices: Common.Indices; + name: Common.DataStreamName; + timestamp_field: Common.Field; +} + +export interface ResolveIndexItem { + aliases?: string[]; + attributes: string[]; + data_stream?: Common.DataStreamName; + name: Common.Name; +} + diff --git a/api/_types/indices.rollover.d.ts b/api/_types/indices.rollover.d.ts new file mode 100644 index 000000000..552fa035d --- /dev/null +++ b/api/_types/indices.rollover.d.ts @@ -0,0 +1,36 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface RolloverConditions { + max_age?: Common.Duration; + max_age_millis?: Common.DurationValueUnitMillis; + max_docs?: number; + max_primary_shard_docs?: number; + max_primary_shard_size?: Common.ByteSize; + max_primary_shard_size_bytes?: number; + max_size?: Common.ByteSize; + max_size_bytes?: number; + min_age?: Common.Duration; + min_docs?: number; + min_primary_shard_docs?: number; + min_primary_shard_size?: Common.ByteSize; + min_primary_shard_size_bytes?: number; + min_size?: Common.ByteSize; + min_size_bytes?: number; +} + diff --git a/api/_types/indices.segments.d.ts b/api/_types/indices.segments.d.ts new file mode 100644 index 000000000..245f54f4a --- /dev/null +++ b/api/_types/indices.segments.d.ts @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface IndexSegment { + shards: Record; +} + +export interface Segment { + attributes: Record; + committed: boolean; + compound: boolean; + deleted_docs: number; + generation: number; + num_docs: number; + search: boolean; + size_in_bytes: number; + version: Common.VersionString; +} + +export interface ShardSegmentRouting { + node: string; + primary: boolean; + state: string; +} + +export interface ShardsSegment { + num_committed_segments: number; + num_search_segments: number; + routing: ShardSegmentRouting; + segments: Record; +} + diff --git a/api/_types/indices.shard_stores.d.ts b/api/_types/indices.shard_stores.d.ts new file mode 100644 index 000000000..89dcb6527 --- /dev/null +++ b/api/_types/indices.shard_stores.d.ts @@ -0,0 +1,41 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface IndicesShardStores { + shards: Record; +} + +export interface ShardStore { + allocation: ShardStoreAllocation; + allocation_id?: Common.Id; + store_exception?: ShardStoreException; +} + +export type ShardStoreAllocation = 'primary' | 'replica' | 'unused' + +export interface ShardStoreException { + reason: string; + type: string; +} + +export type ShardStoreStatus = 'all' | 'green' | 'red' | 'yellow' + +export interface ShardStoreWrapper { + stores: ShardStore[]; +} + diff --git a/api/_types/indices.simulate_template.d.ts b/api/_types/indices.simulate_template.d.ts new file mode 100644 index 000000000..544d9e747 --- /dev/null +++ b/api/_types/indices.simulate_template.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' +import * as Indices_Common from './indices._common' +import * as Common_Mapping from './_common.mapping' + +export interface Overlapping { + index_patterns: string[]; + name: Common.Name; +} + +export interface Template { + aliases: Record; + mappings: Common_Mapping.TypeMapping; + settings: Indices_Common.IndexSettings; +} + diff --git a/api/_types/indices.stats.d.ts b/api/_types/indices.stats.d.ts new file mode 100644 index 000000000..a784f82c8 --- /dev/null +++ b/api/_types/indices.stats.d.ts @@ -0,0 +1,150 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export type IndexMetadataState = 'close' | 'open' + +export interface IndexStats { + bulk?: Common.BulkStats; + completion?: Common.CompletionStats; + docs?: Common.DocStats; + fielddata?: Common.FielddataStats; + flush?: Common.FlushStats; + get?: Common.GetStats; + indexing?: Common.IndexingStats; + indices?: IndicesStats; + merges?: Common.MergesStats; + query_cache?: Common.QueryCacheStats; + recovery?: Common.RecoveryStats; + refresh?: Common.RefreshStats; + request_cache?: Common.RequestCacheStats; + search?: Common.SearchStats; + segments?: Common.SegmentsStats; + shard_stats?: ShardsTotalStats; + store?: Common.StoreStats; + translog?: Common.TranslogStats; + warmer?: Common.WarmerStats; +} + +export interface IndicesStats { + health?: Common.HealthStatus; + primaries?: IndexStats; + shards?: Record; + status?: IndexMetadataState; + total?: IndexStats; + uuid?: Common.Uuid; +} + +export interface MappingStats { + total_count: number; + total_estimated_overhead?: Common.ByteSize; + total_estimated_overhead_in_bytes: number; +} + +export interface ShardCommit { + generation: number; + id: Common.Id; + num_docs: number; + user_data: Record; +} + +export interface ShardFileSizeInfo { + average_size_in_bytes?: number; + count?: number; + description: string; + max_size_in_bytes?: number; + min_size_in_bytes?: number; + size_in_bytes: number; +} + +export interface ShardLease { + id: Common.Id; + retaining_seq_no: Common.SequenceNumber; + source: string; + timestamp: number; +} + +export interface ShardPath { + data_path: string; + is_custom_data_path: boolean; + state_path: string; +} + +export interface ShardQueryCache { + cache_count: number; + cache_size: number; + evictions: number; + hit_count: number; + memory_size_in_bytes: number; + miss_count: number; + total_count: number; +} + +export interface ShardRetentionLeases { + leases: ShardLease[]; + primary_term: number; + version: Common.VersionNumber; +} + +export interface ShardRouting { + node: string; + primary: boolean; + relocating_node?: undefined | string; + state: ShardRoutingState; +} + +export type ShardRoutingState = 'INITIALIZING' | 'RELOCATING' | 'STARTED' | 'UNASSIGNED' + +export interface ShardSequenceNumber { + global_checkpoint: number; + local_checkpoint: number; + max_seq_no: Common.SequenceNumber; +} + +export interface ShardStats { + bulk?: Common.BulkStats; + commit?: ShardCommit; + completion?: Common.CompletionStats; + docs?: Common.DocStats; + fielddata?: Common.FielddataStats; + flush?: Common.FlushStats; + get?: Common.GetStats; + indexing?: Common.IndexingStats; + indices?: IndicesStats; + mappings?: MappingStats; + merges?: Common.MergesStats; + query_cache?: ShardQueryCache; + recovery?: Common.RecoveryStats; + refresh?: Common.RefreshStats; + request_cache?: Common.RequestCacheStats; + retention_leases?: ShardRetentionLeases; + routing?: ShardRouting; + search?: Common.SearchStats; + segments?: Common.SegmentsStats; + seq_no?: ShardSequenceNumber; + shard_path?: ShardPath; + shard_stats?: ShardsTotalStats; + shards?: Record>; + store?: Common.StoreStats; + translog?: Common.TranslogStats; + warmer?: Common.WarmerStats; +} + +export interface ShardsTotalStats { + total_count: number; +} + diff --git a/api/_types/indices.update_aliases.d.ts b/api/_types/indices.update_aliases.d.ts new file mode 100644 index 000000000..0991aaeac --- /dev/null +++ b/api/_types/indices.update_aliases.d.ts @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' +import * as Common_QueryDsl from './_common.query_dsl' + +export interface Action { + add?: AddAction; + remove?: RemoveAction; + remove_index?: RemoveIndexAction; +} + +export interface AddAction { + alias?: Common.IndexAlias; + aliases?: Common.IndexAlias | Common.IndexAlias[]; + filter?: Common_QueryDsl.QueryContainer; + index?: Common.IndexName; + index_routing?: Common.Routing; + indices?: Common.Indices; + is_hidden?: boolean; + is_write_index?: boolean; + must_exist?: boolean; + routing?: Common.Routing; + search_routing?: Common.Routing; +} + +export interface RemoveAction { + alias?: Common.IndexAlias; + aliases?: Common.IndexAlias | Common.IndexAlias[]; + index?: Common.IndexName; + indices?: Common.Indices; + must_exist?: boolean; +} + +export interface RemoveIndexAction { + index?: Common.IndexName; + indices?: Common.Indices; + must_exist?: boolean; +} + diff --git a/api/_types/indices.validate_query.d.ts b/api/_types/indices.validate_query.d.ts new file mode 100644 index 000000000..2b5380f77 --- /dev/null +++ b/api/_types/indices.validate_query.d.ts @@ -0,0 +1,25 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface IndicesValidationExplanation { + error?: string; + explanation?: string; + index: Common.IndexName; + valid: boolean; +} + diff --git a/api/_types/ingest._common.d.ts b/api/_types/ingest._common.d.ts new file mode 100644 index 000000000..c5f4bdff3 --- /dev/null +++ b/api/_types/ingest._common.d.ts @@ -0,0 +1,339 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface AppendProcessor extends ProcessorBase { + allow_duplicates?: boolean; + field: Common.Field; + value: Record[]; +} + +export interface AttachmentProcessor extends ProcessorBase { + field: Common.Field; + ignore_missing?: boolean; + indexed_chars?: number; + indexed_chars_field?: Common.Field; + properties?: string[]; + resource_name?: string; + target_field?: Common.Field; +} + +export interface BytesProcessor extends ProcessorBase { + field: Common.Field; + ignore_missing?: boolean; + target_field?: Common.Field; +} + +export interface CircleProcessor extends ProcessorBase { + error_distance: number; + field: Common.Field; + ignore_missing?: boolean; + shape_type: ShapeType; + target_field?: Common.Field; +} + +export interface ConvertProcessor extends ProcessorBase { + field: Common.Field; + ignore_missing?: boolean; + target_field?: Common.Field; + type: ConvertType; +} + +export type ConvertType = 'auto' | 'boolean' | 'double' | 'float' | 'integer' | 'long' | 'string' + +export interface CsvProcessor extends ProcessorBase { + empty_value?: Record; + field: Common.Field; + ignore_missing?: boolean; + quote?: string; + separator?: string; + target_fields: Common.Fields; + trim?: boolean; +} + +export interface DateIndexNameProcessor extends ProcessorBase { + date_formats: string[]; + date_rounding: string; + field: Common.Field; + index_name_format?: string; + index_name_prefix?: string; + locale?: string; + timezone?: string; +} + +export interface DateProcessor extends ProcessorBase { + field: Common.Field; + formats: string[]; + locale?: string; + target_field?: Common.Field; + timezone?: string; +} + +export interface DissectProcessor extends ProcessorBase { + append_separator?: string; + field: Common.Field; + ignore_missing?: boolean; + pattern: string; +} + +export interface DotExpanderProcessor extends ProcessorBase { + field: Common.Field; + path?: string; +} + +export type DropProcessor = ProcessorBase & Record + +export interface EnrichProcessor extends ProcessorBase { + field: Common.Field; + ignore_missing?: boolean; + max_matches?: number; + override?: boolean; + policy_name: string; + shape_relation?: Common.GeoShapeRelation; + target_field: Common.Field; +} + +export interface FailProcessor extends ProcessorBase { + message: string; +} + +export interface ForeachProcessor extends ProcessorBase { + field: Common.Field; + ignore_missing?: boolean; + processor: ProcessorContainer; +} + +export interface GeoIpProcessor extends ProcessorBase { + database_file?: string; + field: Common.Field; + first_only?: boolean; + ignore_missing?: boolean; + properties?: string[]; + target_field?: Common.Field; +} + +export interface GrokProcessor extends ProcessorBase { + field: Common.Field; + ignore_missing?: boolean; + pattern_definitions?: Record; + patterns: string[]; + trace_match?: boolean; +} + +export interface GsubProcessor extends ProcessorBase { + field: Common.Field; + ignore_missing?: boolean; + pattern: string; + replacement: string; + target_field?: Common.Field; +} + +export interface InferenceConfig { + classification?: InferenceConfigClassification; + regression?: InferenceConfigRegression; +} + +export interface InferenceConfigClassification { + num_top_classes?: number; + num_top_feature_importance_values?: number; + prediction_field_type?: string; + results_field?: Common.Field; + top_classes_results_field?: Common.Field; +} + +export interface InferenceConfigRegression { + num_top_feature_importance_values?: number; + results_field?: Common.Field; +} + +export interface InferenceProcessor extends ProcessorBase { + field_map?: Record>; + inference_config?: InferenceConfig; + model_id: Common.Id; + target_field?: Common.Field; +} + +export interface JoinProcessor extends ProcessorBase { + field: Common.Field; + separator: string; + target_field?: Common.Field; +} + +export interface JsonProcessor extends ProcessorBase { + add_to_root?: boolean; + add_to_root_conflict_strategy?: JsonProcessorConflictStrategy; + allow_duplicate_keys?: boolean; + field: Common.Field; + target_field?: Common.Field; +} + +export type JsonProcessorConflictStrategy = 'merge' | 'replace' + +export interface KeyValueProcessor extends ProcessorBase { + exclude_keys?: string[]; + field: Common.Field; + field_split: string; + ignore_missing?: boolean; + include_keys?: string[]; + prefix?: string; + strip_brackets?: boolean; + target_field?: Common.Field; + trim_key?: string; + trim_value?: string; + value_split: string; +} + +export interface LowercaseProcessor extends ProcessorBase { + field: Common.Field; + ignore_missing?: boolean; + target_field?: Common.Field; +} + +export interface Pipeline { + _meta?: Common.Metadata; + description?: string; + on_failure?: ProcessorContainer[]; + processors?: ProcessorContainer[]; + version?: Common.VersionNumber; +} + +export interface PipelineProcessor extends ProcessorBase { + ignore_missing_pipeline?: boolean; + name: Common.Name; +} + +export interface ProcessorBase { + description?: string; + if?: string; + ignore_failure?: boolean; + on_failure?: ProcessorContainer[]; + tag?: string; +} + +export interface ProcessorContainer { + append?: AppendProcessor; + attachment?: AttachmentProcessor; + bytes?: BytesProcessor; + circle?: CircleProcessor; + convert?: ConvertProcessor; + csv?: CsvProcessor; + date?: DateProcessor; + date_index_name?: DateIndexNameProcessor; + dissect?: DissectProcessor; + dot_expander?: DotExpanderProcessor; + drop?: DropProcessor; + enrich?: EnrichProcessor; + fail?: FailProcessor; + foreach?: ForeachProcessor; + geoip?: GeoIpProcessor; + grok?: GrokProcessor; + gsub?: GsubProcessor; + inference?: InferenceProcessor; + join?: JoinProcessor; + json?: JsonProcessor; + kv?: KeyValueProcessor; + lowercase?: LowercaseProcessor; + pipeline?: PipelineProcessor; + remove?: RemoveProcessor; + rename?: RenameProcessor; + script?: Common.Script; + set?: SetProcessor; + set_security_user?: SetSecurityUserProcessor; + sort?: SortProcessor; + split?: SplitProcessor; + text_embedding?: TextEmbeddingProcessor; + trim?: TrimProcessor; + uppercase?: UppercaseProcessor; + urldecode?: UrlDecodeProcessor; + user_agent?: UserAgentProcessor; +} + +export interface RemoveProcessor extends ProcessorBase { + field: Common.Fields; + ignore_missing?: boolean; +} + +export interface RenameProcessor extends ProcessorBase { + field: Common.Field; + ignore_missing?: boolean; + target_field: Common.Field; +} + +export interface SetProcessor extends ProcessorBase { + copy_from?: Common.Field; + field: Common.Field; + ignore_empty_value?: boolean; + media_type?: string; + override?: boolean; + value?: Record; +} + +export interface SetSecurityUserProcessor extends ProcessorBase { + field: Common.Field; + properties?: string[]; +} + +export type ShapeType = 'geo_shape' | 'shape' + +export interface SortProcessor extends ProcessorBase { + field: Common.Field; + order?: Common.SortOrder; + target_field?: Common.Field; +} + +export interface SplitProcessor extends ProcessorBase { + field: Common.Field; + ignore_missing?: boolean; + preserve_trailing?: boolean; + separator: string; + target_field?: Common.Field; +} + +export interface TextEmbeddingProcessor extends ProcessorBase { + description?: string; + field_map: Record; + model_id: Common.Id; +} + +export interface TrimProcessor extends ProcessorBase { + field: Common.Field; + ignore_missing?: boolean; + target_field?: Common.Field; +} + +export interface UppercaseProcessor extends ProcessorBase { + field: Common.Field; + ignore_missing?: boolean; + target_field?: Common.Field; +} + +export interface UrlDecodeProcessor extends ProcessorBase { + field: Common.Field; + ignore_missing?: boolean; + target_field?: Common.Field; +} + +export interface UserAgentProcessor extends ProcessorBase { + field: Common.Field; + ignore_missing?: boolean; + options?: UserAgentProperty[]; + regex_file?: string; + target_field?: Common.Field; +} + +export type UserAgentProperty = 'BUILD' | 'DEVICE' | 'MAJOR' | 'MINOR' | 'NAME' | 'OS' | 'OS_MAJOR' | 'OS_MINOR' | 'OS_NAME' | 'PATCH' + diff --git a/api/_types/ingest.simulate.d.ts b/api/_types/ingest.simulate.d.ts new file mode 100644 index 000000000..5e5929530 --- /dev/null +++ b/api/_types/ingest.simulate.d.ts @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface Document { + _id?: Common.Id; + _index?: Common.IndexName; + _source: Record; +} + +export interface DocumentSimulation { + _id: Common.Id; + _index: Common.IndexName; + _ingest: Ingest; + _routing?: string; + _source: Record>; + _version?: Common.StringifiedVersionNumber; + _version_type?: Common.VersionType; +} + +export interface Ingest { + pipeline?: Common.Name; + timestamp: Common.DateTime; +} + +export interface PipelineSimulation { + doc?: DocumentSimulation; + processor_results?: PipelineSimulation[]; + processor_type?: string; + status?: Common.ActionStatusOptions; + tag?: string; +} + diff --git a/api/_types/knn._common.d.ts b/api/_types/knn._common.d.ts new file mode 100644 index 000000000..2528f6ddc --- /dev/null +++ b/api/_types/knn._common.d.ts @@ -0,0 +1,23 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export type DefaultOperator = 'AND' | 'OR' + +export type SearchType = 'dfs_query_then_fetch' | 'query_then_fetch' + +export type SuggestMode = 'always' | 'missing' | 'popular' + diff --git a/api/_types/ml._common.d.ts b/api/_types/ml._common.d.ts new file mode 100644 index 000000000..2cf0b55fa --- /dev/null +++ b/api/_types/ml._common.d.ts @@ -0,0 +1,68 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface HitsTotal { + relation: string; + value: number; +} + +export interface ModelGroup { + access: string; + created_time?: number; + description: string; + last_updated_time?: number; + latest_version: number; + name: string; +} + +export interface ModelGroupRegistration { + model_group_id: string; + status: string; +} + +export interface SearchModelsHits { + hits: SearchModelsHitsHit[]; + total: HitsTotal; +} + +export interface SearchModelsHitsHit { + _id: string; + _index?: string; + model_id: string; +} + +export interface SearchModelsQuery { + query: Record; + size: number; +} + +export interface SearchModelsResponse { + hits: SearchModelsHits; +} + +export interface Task { + create_time?: number; + function_name?: string; + is_async?: boolean; + last_update_time?: number; + model_id?: string; + state: 'CANCELLED' | 'COMPLETED' | 'COMPLETED_WITH_ERROR' | 'CREATED' | 'FAILED' | 'RUNNING'; + task_type?: 'DEPLOY_MODEL'; + worker_node?: Common.NodeIds[]; +} + diff --git a/api/_types/nodes._common.d.ts b/api/_types/nodes._common.d.ts new file mode 100644 index 000000000..4b55362ff --- /dev/null +++ b/api/_types/nodes._common.d.ts @@ -0,0 +1,612 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' +import * as Indices_Stats from './indices.stats' + +export interface AdaptiveSelection { + avg_queue_size?: number; + avg_response_time?: Common.Duration; + avg_response_time_ns?: number; + avg_service_time?: Common.Duration; + avg_service_time_ns?: number; + outgoing_searches?: number; + rank?: string; +} + +export interface Breaker { + estimated_size?: string; + estimated_size_in_bytes?: number; + limit_size?: string; + limit_size_in_bytes?: number; + overhead?: number; + tripped?: number; +} + +export interface Cgroup { + cpu?: CgroupCpu; + cpuacct?: CpuAcct; + memory?: CgroupMemory; +} + +export interface CgroupCpu { + cfs_period_micros?: number; + cfs_quota_micros?: number; + control_group?: string; + stat?: CgroupCpuStat; +} + +export interface CgroupCpuStat { + number_of_elapsed_periods?: number; + number_of_times_throttled?: number; + time_throttled_nanos?: Common.DurationValueUnitNanos; +} + +export interface CgroupMemory { + control_group?: string; + limit_in_bytes?: string; + usage_in_bytes?: string; +} + +export interface Client { + agent?: string; + closed_time_millis?: number; + id?: number; + last_request_time_millis?: number; + last_uri?: string; + local_address?: string; + opened_time_millis?: number; + remote_address?: string; + request_count?: number; + request_size_bytes?: number; + x_opaque_id?: string; +} + +export interface ClusterAppliedStats { + recordings?: Recording[]; +} + +export interface ClusterStateOverallStats { + failed_count?: number; + total_time_in_millis?: Common.DurationValueUnitMillis; + update_count?: number; +} + +export interface ClusterStateQueue { + committed?: number; + pending?: number; + total?: number; +} + +export interface ClusterStateStats { + overall?: ClusterStateOverallStats; +} + +export interface ClusterStateUpdate { + commit_time?: Common.Duration; + commit_time_millis?: Common.DurationValueUnitMillis; + completion_time?: Common.Duration; + completion_time_millis?: Common.DurationValueUnitMillis; + computation_time?: Common.Duration; + computation_time_millis?: Common.DurationValueUnitMillis; + context_construction_time?: Common.Duration; + context_construction_time_millis?: Common.DurationValueUnitMillis; + count: number; + master_apply_time?: Common.Duration; + master_apply_time_millis?: Common.DurationValueUnitMillis; + notification_time?: Common.Duration; + notification_time_millis?: Common.DurationValueUnitMillis; + publication_time?: Common.Duration; + publication_time_millis?: Common.DurationValueUnitMillis; +} + +export interface Context { + cache_evictions?: number; + compilation_limit_triggered?: number; + compilations?: number; + context?: string; +} + +export interface Cpu { + load_average?: Record; + percent?: number; + sys?: Common.Duration; + sys_in_millis?: Common.DurationValueUnitMillis; + total?: Common.Duration; + total_in_millis?: Common.DurationValueUnitMillis; + user?: Common.Duration; + user_in_millis?: Common.DurationValueUnitMillis; +} + +export interface CpuAcct { + control_group?: string; + usage_nanos?: Common.DurationValueUnitNanos; +} + +export interface DataPathStats { + available?: string; + available_in_bytes?: number; + cache_reserved_in_bytes?: number; + disk_queue?: string; + disk_read_size?: string; + disk_read_size_in_bytes?: number; + disk_reads?: number; + disk_write_size?: string; + disk_write_size_in_bytes?: number; + disk_writes?: number; + free?: string; + free_in_bytes?: number; + mount?: string; + path?: string; + total?: string; + total_in_bytes?: number; + type?: string; +} + +export interface Discovery { + cluster_applier_stats?: ClusterAppliedStats; + cluster_state_queue?: ClusterStateQueue; + cluster_state_stats?: ClusterStateStats; + cluster_state_update?: Record; + published_cluster_states?: PublishedClusterStates; + serialized_cluster_states?: SerializedClusterState; +} + +export interface ExtendedMemoryStats extends MemoryStats { + free_percent?: number; + used_percent?: number; +} + +export interface FileSystem { + data?: DataPathStats[]; + io_stats?: IoStats; + timestamp?: number; + total?: FileSystemTotal; +} + +export interface FileSystemTotal { + available?: string; + available_in_bytes?: number; + cache_reserved_in_bytes?: number; + free?: string; + free_in_bytes?: number; + total?: string; + total_in_bytes?: number; +} + +export interface GarbageCollector { + collectors?: Record; +} + +export interface GarbageCollectorTotal { + collection_count?: number; + collection_time?: string; + collection_time_in_millis?: number; +} + +export interface Http { + clients?: Client[]; + current_open?: number; + total_opened?: number; +} + +export interface IndexingPressure { + memory?: IndexingPressureMemory; +} + +export interface IndexingPressureMemory { + current?: PressureMemory; + limit?: Common.ByteSize; + limit_in_bytes?: number; + total?: PressureMemory; +} + +export interface Ingest { + pipelines?: Record; + total?: IngestTotal; +} + +export interface IngestTotal { + count?: number; + current?: number; + failed?: number; + processors?: Record[]; + time_in_millis?: Common.DurationValueUnitMillis; +} + +export interface IoStatDevice { + device_name?: string; + operations?: number; + read_kilobytes?: number; + read_operations?: number; + write_kilobytes?: number; + write_operations?: number; +} + +export interface IoStats { + devices?: IoStatDevice[]; + total?: IoStatDevice; +} + +export interface Jvm { + buffer_pools?: Record; + classes?: JvmClasses; + gc?: GarbageCollector; + mem?: JvmMemoryStats; + threads?: JvmThreads; + timestamp?: number; + uptime?: string; + uptime_in_millis?: number; +} + +export interface JvmClasses { + current_loaded_count?: number; + total_loaded_count?: number; + total_unloaded_count?: number; +} + +export interface JvmMemoryStats { + heap_committed_in_bytes?: number; + heap_max_in_bytes?: number; + heap_used_in_bytes?: number; + heap_used_percent?: number; + non_heap_committed_in_bytes?: number; + non_heap_used_in_bytes?: number; + pools?: Record; +} + +export interface JvmThreads { + count?: number; + peak_count?: number; +} + +export interface KeyedProcessor { + stats?: Processor; + type?: string; +} + +export interface LastGcStats { + max_in_bytes?: number; + usage_percent?: number; + used_in_bytes?: number; +} + +export interface MemoryStats { + adjusted_total_in_bytes?: number; + free_in_bytes?: number; + resident?: string; + resident_in_bytes?: number; + share?: string; + share_in_bytes?: number; + total_in_bytes?: number; + total_virtual?: string; + total_virtual_in_bytes?: number; + used_in_bytes?: number; +} + +export interface NodeBufferPool { + count?: number; + total_capacity?: string; + total_capacity_in_bytes?: number; + used?: string; + used_in_bytes?: number; +} + +export interface NodeReloadError { + name: Common.Name; + reload_exception?: Common.ErrorCause; +} + +export type NodeReloadResult = Stats | NodeReloadError + +export interface NodesResponseBase { + _nodes?: Common.NodeStatistics; +} + +export interface OperatingSystem { + cgroup?: Cgroup; + cpu?: Cpu; + mem?: ExtendedMemoryStats; + swap?: MemoryStats; + timestamp?: number; +} + +export interface Pool { + last_gc_stats?: LastGcStats; + max_in_bytes?: number; + peak_max_in_bytes?: number; + peak_used_in_bytes?: number; + used_in_bytes?: number; +} + +export interface PressureMemory { + all?: Common.ByteSize; + all_in_bytes?: number; + combined_coordinating_and_primary?: Common.ByteSize; + combined_coordinating_and_primary_in_bytes?: number; + coordinating?: Common.ByteSize; + coordinating_in_bytes?: number; + coordinating_rejections?: number; + primary?: Common.ByteSize; + primary_in_bytes?: number; + primary_rejections?: number; + replica?: Common.ByteSize; + replica_in_bytes?: number; + replica_rejections?: number; +} + +export interface Process { + cpu?: Cpu; + max_file_descriptors?: number; + mem?: MemoryStats; + open_file_descriptors?: number; + timestamp?: number; +} + +export interface Processor { + count?: number; + current?: number; + failed?: number; + time_in_millis?: Common.DurationValueUnitMillis; +} + +export interface PublishedClusterStates { + compatible_diffs?: number; + full_states?: number; + incompatible_diffs?: number; +} + +export interface Recording { + cumulative_execution_count?: number; + cumulative_execution_time?: Common.Duration; + cumulative_execution_time_millis?: Common.DurationValueUnitMillis; + name?: string; +} + +export type SampleType = 'block' | 'cpu' | 'wait' + +export interface ScriptCache { + cache_evictions?: number; + compilation_limit_triggered?: number; + compilations?: number; + context?: string; +} + +export interface Scripting { + cache_evictions?: number; + compilation_limit_triggered?: number; + compilations?: number; + compilations_history?: Record; + contexts?: Context[]; +} + +export interface SerializedClusterState { + diffs?: SerializedClusterStateDetail; + full_states?: SerializedClusterStateDetail; +} + +export interface SerializedClusterStateDetail { + compressed_size?: string; + compressed_size_in_bytes?: number; + count?: number; + uncompressed_size?: string; + uncompressed_size_in_bytes?: number; +} + +export interface ShardAdmissionControlStats { + global_cpu_usage?: UsageStats; + global_io_usage?: UsageStats; +} + +export type ShardCachesStats = Record + +export interface ShardCacheStats { + evictions?: number; + hit_count?: number; + item_count?: number; + miss_count?: number; + size_in_bytes?: number; + store_name?: string; +} + +export interface ShardClusterManagerThrottlingStats { + stats?: ShardClusterManagerThrottlingStatsDetail; +} + +export interface ShardClusterManagerThrottlingStatsDetail { + throttled_tasks_per_task_type?: Record; + total_throttled_tasks?: number; +} + +export interface ShardIndexingPressureStats { + enabled?: boolean; + enforced?: boolean; + stats?: Record; + total_rejections_breakup_shadow_mode?: TotalRejectionsBreakupShadowMode; +} + +export type ShardRepositoriesStats = any[] + +export type ShardResourceUsageStats = Record + +export interface ShardResourceUsageStatsDetail { + cpu_utilization_percent?: Common.Percentage; + io_usage_stats?: ShardResourceUsageStatsIoUsageStats; + memory_utilization_percent?: Common.Percentage; + timestamp?: number; +} + +export interface ShardResourceUsageStatsIoUsageStats { + max_io_utilization_percent?: Common.Percentage; +} + +export type ShardSearchBackpressureMode = 'disabled' | 'enforced' | 'monitor_only' + +export interface ShardSearchBackpressureStats { + mode?: ShardSearchBackpressureMode; + search_shard_task?: ShardSearchBackpressureTaskStats; + search_task?: ShardSearchBackpressureTaskStats; +} + +export interface ShardSearchBackpressureTaskCancellationStats { + cancellation_count?: number; + cancellation_limit_reached_count?: number; +} + +export interface ShardSearchBackpressureTaskResourceTrackerCpuUsageTrackerStats { + cancellation_count?: number; + current_avg_millis?: Common.DurationValueUnitMillis; + current_max_millis?: Common.DurationValueUnitMillis; +} + +export interface ShardSearchBackpressureTaskResourceTrackerElapsedTimeTrackerStats { + cancellation_count?: number; + current_avg_millis?: Common.DurationValueUnitMillis; + current_max_millis?: Common.DurationValueUnitMillis; +} + +export interface ShardSearchBackpressureTaskResourceTrackerHeapUsageTrackerStats { + cancellation_count?: number; + current_avg_bytes?: number; + current_max_bytes?: number; + rolling_avg_bytes?: number; +} + +export interface ShardSearchBackpressureTaskResourceTrackerStats { + cpu_usage_tracker?: ShardSearchBackpressureTaskResourceTrackerCpuUsageTrackerStats; + elapsed_time_tracker?: ShardSearchBackpressureTaskResourceTrackerElapsedTimeTrackerStats; + heap_usage_tracker?: ShardSearchBackpressureTaskResourceTrackerHeapUsageTrackerStats; +} + +export interface ShardSearchBackpressureTaskStats { + cancellation_stats?: ShardSearchBackpressureTaskCancellationStats; + completion_count?: number; + resource_tracker_stats?: ShardSearchBackpressureTaskResourceTrackerStats; +} + +export interface ShardSearchPipelineStats { + pipelines?: Record; + total_request?: ShardSearchPipelineTotalStats; + total_response?: ShardSearchPipelineTotalStats; +} + +export interface ShardSearchPipelineTotalStats { + count?: number; + current?: number; + failed?: number; + time_in_millis?: Common.DurationValueUnitMillis; +} + +export interface ShardSegmentReplicationBackpressureStats { + total_rejected_requests?: number; +} + +export interface ShardTaskCancellationStats { + search_shard_task?: ShardTaskCancellationStatsDetail; +} + +export interface ShardTaskCancellationStatsDetail { + current_count_post_cancel?: number; + total_count_post_cancel?: number; +} + +export interface ShardWeightedRoutingStats { + stats?: ShardWeightedRoutingStatsDetail; +} + +export interface ShardWeightedRoutingStatsDetail { + fail_open_count?: number; +} + +export interface Stats { + adaptive_selection?: Record; + admission_control?: ShardAdmissionControlStats; + attributes?: Record; + breakers?: Record; + caches?: ShardCachesStats; + cluster_manager_throttling?: ShardClusterManagerThrottlingStats; + discovery?: Discovery; + fs?: FileSystem; + host?: Common.Host; + http?: Http; + indexing_pressure?: IndexingPressure; + indices?: Indices_Stats.ShardStats; + ingest?: Ingest; + ip?: Common.Ip | Common.Ip[]; + jvm?: Jvm; + name?: Common.Name; + os?: OperatingSystem; + process?: Process; + repositories?: ShardRepositoriesStats; + resource_usage_stats?: ShardResourceUsageStats; + roles?: Common.NodeRoles; + script?: Scripting; + script_cache?: Record; + search_backpressure?: ShardSearchBackpressureStats; + search_pipeline?: ShardSearchPipelineStats; + segment_replication_backpressure?: ShardSegmentReplicationBackpressureStats; + shard_indexing_pressure?: ShardIndexingPressureStats; + task_cancellation?: ShardTaskCancellationStats; + thread_pool?: Record; + timestamp?: number; + transport?: Transport; + transport_address?: Common.TransportAddress; + weighted_routing?: ShardWeightedRoutingStats; +} + +export interface ThreadCount { + active?: number; + completed?: number; + largest?: number; + queue?: number; + rejected?: number; + threads?: number; + total_wait_time_in_nanos?: number; +} + +export interface TotalRejectionsBreakupShadowMode { + no_successful_request_limits?: number; + node_limits?: number; + throughput_degradation_limits?: number; +} + +export interface Transport { + inbound_handling_time_histogram?: TransportHistogram[]; + outbound_handling_time_histogram?: TransportHistogram[]; + rx_count?: number; + rx_size?: string; + rx_size_in_bytes?: number; + server_open?: number; + total_outbound_connections?: number; + tx_count?: number; + tx_size?: string; + tx_size_in_bytes?: number; +} + +export interface TransportHistogram { + count?: number; + ge_millis?: number; + lt_millis?: number; +} + +export interface TransportUsageStats { + rejection_count?: Record; +} + +export interface UsageStats { + transport?: TransportUsageStats; +} + diff --git a/api/_types/nodes.info.d.ts b/api/_types/nodes.info.d.ts new file mode 100644 index 000000000..9118f91ee --- /dev/null +++ b/api/_types/nodes.info.d.ts @@ -0,0 +1,339 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' +import * as Indices_Common from './indices._common' +import * as Nodes_Common from './nodes._common' + +export interface DeprecationIndexing { + enabled: boolean | string; +} + +export type Metric = '_all' | 'aggregations' | 'http' | 'indices' | 'ingest' | 'jvm' | 'os' | 'plugins' | 'process' | 'search_pipelines' | 'settings' | 'thread_pool' | 'transport' + +export interface NodeInfo { + aggregations?: Record; + attributes: Record; + build_flavor?: string; + build_hash: string; + build_type: string; + host: Common.Host; + http?: NodeInfoHttp; + ingest?: NodeInfoIngest; + ip: Common.Ip; + jvm?: NodeJvmInfo; + modules?: Common.PluginStats[]; + name: Common.Name; + network?: NodeInfoNetwork; + os?: NodeOperatingSystemInfo; + plugins?: Common.PluginStats[]; + process?: NodeProcessInfo; + roles: Common.NodeRoles; + search_pipelines?: NodeInfoSearchPipelines; + settings?: NodeInfoSettings; + thread_pool?: Record; + total_indexing_buffer?: number; + total_indexing_buffer_in_bytes?: Common.ByteSize; + transport?: NodeInfoTransport; + transport_address: Common.TransportAddress; + version: Common.VersionString; +} + +export interface NodeInfoAction { + destructive_requires_name: string; +} + +export interface NodeInfoAggregation { + types: string[]; +} + +export interface NodeInfoBootstrap { + memory_lock: string; +} + +export interface NodeInfoClient { + type: string; +} + +export interface NodeInfoDiscovery { + seed_hosts?: string; + type?: string; +} + +export interface NodeInfoHttp { + bound_address: string[]; + max_content_length?: Common.ByteSize; + max_content_length_in_bytes: number; + publish_address: string; +} + +export interface NodeInfoIngest { + processors: NodeInfoIngestProcessor[]; +} + +export interface NodeInfoIngestDownloader { + enabled: string; +} + +export interface NodeInfoIngestInfo { + downloader: NodeInfoIngestDownloader; +} + +export interface NodeInfoIngestProcessor { + type: string; +} + +export interface NodeInfoJvmMemory { + direct_max?: Common.ByteSize; + direct_max_in_bytes: number; + heap_init?: Common.ByteSize; + heap_init_in_bytes: number; + heap_max?: Common.ByteSize; + heap_max_in_bytes: number; + non_heap_init?: Common.ByteSize; + non_heap_init_in_bytes: number; + non_heap_max?: Common.ByteSize; + non_heap_max_in_bytes: number; +} + +export interface NodeInfoMemory { + total: string; + total_in_bytes: number; +} + +export interface NodeInfoNetwork { + primary_interface: NodeInfoNetworkInterface; + refresh_interval: number; +} + +export interface NodeInfoNetworkInterface { + address: string; + mac_address: string; + name: Common.Name; +} + +export interface NodeInfoOSCPU { + cache_size: string; + cache_size_in_bytes: number; + cores_per_socket: number; + mhz: number; + model: string; + total_cores: number; + total_sockets: number; + vendor: string; +} + +export interface NodeInfoPath { + data?: string[]; + home: string; + logs: string; + repo?: string[]; +} + +export interface NodeInfoRepositories { + url: NodeInfoRepositoriesUrl; +} + +export interface NodeInfoRepositoriesUrl { + allowed_urls: string; +} + +export interface NodeInfoScript { + allowed_types: string; + disable_max_compilations_rate: string; +} + +export interface NodeInfoSearch { + remote: NodeInfoSearchRemote; +} + +export interface NodeInfoSearchPipelines { + request_processors: NodeInfoIngestProcessor[]; + response_processors: NodeInfoIngestProcessor[]; +} + +export interface NodeInfoSearchRemote { + connect: string; +} + +export interface NodeInfoSettings { + action?: NodeInfoAction; + bootstrap?: NodeInfoBootstrap; + client: NodeInfoClient; + cluster: NodeInfoSettingsCluster; + discovery?: NodeInfoDiscovery; + http: NodeInfoSettingsHttp; + index?: NodeInfoSettingsIndex; + ingest?: NodeInfoSettingsIngest; + network?: NodeInfoSettingsNetwork; + node: NodeInfoSettingsNode; + path: NodeInfoPath; + plugins?: NodeInfoSettingsPlugins; + repositories?: NodeInfoRepositories; + script?: NodeInfoScript; + search?: NodeInfoSearch; + transport: NodeInfoSettingsTransport; +} + +export interface NodeInfoSettingsCluster { + deprecation_indexing?: DeprecationIndexing; + election?: NodeInfoSettingsClusterElection; + initial_cluster_manager_nodes?: string; + initial_master_nodes?: string; + name: Common.Name; + routing?: Indices_Common.IndexRouting; +} + +export interface NodeInfoSettingsClusterElection { + strategy: Common.Name; +} + +export interface NodeInfoSettingsHttp { + compression?: boolean | string; + port?: number | string; + type: string; + 'type.default'?: string; +} + +export interface NodeInfoSettingsIndex { + store?: NodeInfoSettingsIndexStore; +} + +export interface NodeInfoSettingsIndexHybrid { + mmap?: NodeInfoSettingsIndexStoreMmap; +} + +export interface NodeInfoSettingsIndexStore { + hybrid?: NodeInfoSettingsIndexHybrid; +} + +export interface NodeInfoSettingsIndexStoreMmap { + extensions?: string[]; +} + +export interface NodeInfoSettingsIngest { + append?: NodeInfoIngestInfo; + attachment?: NodeInfoIngestInfo; + bytes?: NodeInfoIngestInfo; + circle?: NodeInfoIngestInfo; + convert?: NodeInfoIngestInfo; + csv?: NodeInfoIngestInfo; + date?: NodeInfoIngestInfo; + date_index_name?: NodeInfoIngestInfo; + dissect?: NodeInfoIngestInfo; + dot_expander?: NodeInfoIngestInfo; + drop?: NodeInfoIngestInfo; + enrich?: NodeInfoIngestInfo; + fail?: NodeInfoIngestInfo; + foreach?: NodeInfoIngestInfo; + geoip?: NodeInfoIngestInfo; + grok?: NodeInfoIngestInfo; + gsub?: NodeInfoIngestInfo; + inference?: NodeInfoIngestInfo; + join?: NodeInfoIngestInfo; + json?: NodeInfoIngestInfo; + kv?: NodeInfoIngestInfo; + lowercase?: NodeInfoIngestInfo; + pipeline?: NodeInfoIngestInfo; + remove?: NodeInfoIngestInfo; + rename?: NodeInfoIngestInfo; + script?: NodeInfoIngestInfo; + set?: NodeInfoIngestInfo; + set_security_user?: NodeInfoIngestInfo; + sort?: NodeInfoIngestInfo; + split?: NodeInfoIngestInfo; + trim?: NodeInfoIngestInfo; + uppercase?: NodeInfoIngestInfo; + urldecode?: NodeInfoIngestInfo; + user_agent?: NodeInfoIngestInfo; +} + +export interface NodeInfoSettingsNetwork { + host: Common.Host; +} + +export interface NodeInfoSettingsNode { + attr: NodeInfoShardIndexingPressureEnabled; + max_local_storage_nodes?: string; + name: Common.Name; +} + +export type NodeInfoSettingsPlugins = Record + +export interface NodeInfoSettingsTransport { + type: string; + 'type.default'?: string; +} + +export interface NodeInfoShardIndexingPressureEnabled { + shard_indexing_pressure_enabled: string; +} + +export interface NodeInfoTransport { + bound_address: string[]; + profiles: Record; + publish_address: string; +} + +export interface NodeJvmInfo { + bundled_jdk: boolean; + gc_collectors: string[]; + input_arguments: string[]; + mem: NodeInfoJvmMemory; + memory_pools: string[]; + pid: number; + start_time_in_millis: Common.EpochTimeUnitMillis; + using_bundled_jdk?: boolean; + using_compressed_ordinary_object_pointers?: boolean | string; + version: Common.VersionString; + vm_name: Common.Name; + vm_vendor: string; + vm_version: Common.VersionString; +} + +export interface NodeOperatingSystemInfo { + allocated_processors?: number; + arch: string; + available_processors: number; + cpu?: NodeInfoOSCPU; + mem?: NodeInfoMemory; + name: Common.Name; + pretty_name: Common.Name; + refresh_interval_in_millis: Common.DurationValueUnitMillis; + swap?: NodeInfoMemory; + version: Common.VersionString; +} + +export interface NodeProcessInfo { + id: number; + mlockall: boolean; + refresh_interval_in_millis: Common.DurationValueUnitMillis; +} + +export interface NodeThreadPoolInfo { + core?: number; + keep_alive?: Common.Duration; + max?: number; + queue_size: number; + size?: number; + type: string; +} + +export interface ResponseBase extends Nodes_Common.NodesResponseBase { + cluster_name: Common.Name; + nodes: Record; +} + diff --git a/api/_types/nodes.reload_secure_settings.d.ts b/api/_types/nodes.reload_secure_settings.d.ts new file mode 100644 index 000000000..e61bd180e --- /dev/null +++ b/api/_types/nodes.reload_secure_settings.d.ts @@ -0,0 +1,24 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Nodes_Common from './nodes._common' +import * as Common from './_common' + +export interface ResponseBase extends Nodes_Common.NodesResponseBase { + cluster_name: Common.Name; + nodes: Record; +} + diff --git a/api/_types/nodes.stats.d.ts b/api/_types/nodes.stats.d.ts new file mode 100644 index 000000000..0ea76c74a --- /dev/null +++ b/api/_types/nodes.stats.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Nodes_Common from './nodes._common' +import * as Common from './_common' + +export type IndexMetric = '_all' | 'completion' | 'docs' | 'fielddata' | 'flush' | 'get' | 'indexing' | 'merge' | 'query_cache' | 'recovery' | 'refresh' | 'request_cache' | 'search' | 'segments' | 'store' | 'suggest' | 'translog' | 'warmer' + +export type Metric = '_all' | 'adaptive_selection' | 'admission_control' | 'breaker' | 'caches' | 'cluster_manager_throttling' | 'discovery' | 'file_cache' | 'fs' | 'http' | 'indexing_pressure' | 'indices' | 'ingest' | 'jvm' | 'os' | 'process' | 'repositories' | 'resource_usage_stats' | 'script' | 'script_cache' | 'search_backpressure' | 'search_pipeline' | 'segment_replication_backpressure' | 'shard_indexing_pressure' | 'task_cancellation' | 'thread_pool' | 'transport' | 'weighted_routing' + +export interface ResponseBase extends Nodes_Common.NodesResponseBase { + cluster_name?: Common.Name; + nodes: Record; +} + diff --git a/api/_types/nodes.usage.d.ts b/api/_types/nodes.usage.d.ts new file mode 100644 index 000000000..dab961418 --- /dev/null +++ b/api/_types/nodes.usage.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' +import * as Nodes_Common from './nodes._common' + +export type Metric = '_all' | 'rest_actions' + +export interface NodeUsage { + aggregations: Record>; + rest_actions: Record; + since: Common.EpochTimeUnitMillis; + timestamp: Common.EpochTimeUnitMillis; +} + +export interface ResponseBase extends Nodes_Common.NodesResponseBase { + cluster_name: Common.Name; + nodes: Record; +} + diff --git a/api/_types/notifications._common.d.ts b/api/_types/notifications._common.d.ts new file mode 100644 index 000000000..4ccc8638c --- /dev/null +++ b/api/_types/notifications._common.d.ts @@ -0,0 +1,157 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export interface Chime { + url: string; +} + +export interface DeleteConfigsResponse { + delete_response_list?: DeleteResponseList; +} + +export type DeleteResponseList = Record + +export interface DeliveryStatus { + status_code?: string; + status_text?: string; +} + +export interface Email { + email_account_id: string; + recipient_list?: RecipientListItem[]; +} + +export type EmailEncryptionMethod = 'none' | 'ssl' | 'start_tls' + +export interface EmailGroup { + email_group_id_list?: string[]; + recipient_list: RecipientListItem[]; +} + +export interface EmailRecipientStatus { + delivery_status?: DeliveryStatus; + recipient?: string; +} + +export interface EventSource { + reference_id?: string; + severity?: SeverityType; + tags?: string[]; + title?: string; +} + +export interface EventStatus { + config_id?: string; + config_name?: string; + config_type?: NotificationConfigType; + delivery_status?: DeliveryStatus; + email_recipient_status?: EmailRecipientStatus[]; +} + +export interface GetConfigsResponse { + config_list?: NotificationsConfigsOutputItem[]; + start_index?: number; + total_hit_relation?: TotalHitRelation; + total_hits?: number; +} + +export type HeaderParamsMap = Record + +export type HttpMethodType = 'PATCH' | 'POST' | 'PUT' + +export interface MicrosoftTeamsItem { + url: string; +} + +export interface NotificationChannel { + config_id?: string; + config_type?: NotificationConfigType; + description?: string; + is_enabled?: boolean; + name?: string; +} + +export type NotificationConfigType = 'chime' | 'email' | 'email_group' | 'microsoft_teams' | 'ses_account' | 'slack' | 'smtp_account' | 'sns' | 'webhook' + +export interface NotificationsConfig { + config: NotificationsConfigItem; + config_id?: string; +} + +export interface NotificationsConfigItem { + chime?: Chime; + config_type: NotificationConfigType; + description?: string; + email?: Email; + email_group?: EmailGroup; + is_enabled?: boolean; + microsoft_teams?: MicrosoftTeamsItem; + name: string; + ses_account?: SesAccount; + slack?: SlackItem; + smtp_account?: SmtpAccount; + sns?: SnsItem; + webhook?: Webhook; +} + +export interface NotificationsConfigsOutputItem { + config?: NotificationsConfigItem; + config_id?: string; + created_time_ms?: number; + last_updated_time_ms?: number; +} + +export type NotificationsPluginFeaturesMap = Record + +export interface RecipientListItem { + recipient?: string; +} + +export type RestStatus = 'accepted' | 'continue' | 'created' | 'found' | 'moved_permanently' | 'multi_status' | 'multiple_choices' | 'no_content' | 'non_authoritative_information' | 'not_modified' | 'ok' | 'partial_content' | 'reset_content' | 'see_other' | 'switching_protocols' | 'temporary_redirect' | 'use_proxy' + +export interface SesAccount { + from_address: string; + region: string; + role_arn?: string; +} + +export type SeverityType = 'critical' | 'high' | 'info' + +export interface SlackItem { + url: string; +} + +export interface SmtpAccount { + from_address: string; + host: string; + method: EmailEncryptionMethod; + port: number; +} + +export interface SnsItem { + role_arn?: string; + topic_arn: string; +} + +export type TotalHitRelation = 'eq' | 'gte' + +export interface Webhook { + header_params?: HeaderParamsMap; + method?: HttpMethodType; + url: string; +} + diff --git a/api/_types/remote_store._common.d.ts b/api/_types/remote_store._common.d.ts new file mode 100644 index 000000000..41b6c56a7 --- /dev/null +++ b/api/_types/remote_store._common.d.ts @@ -0,0 +1,29 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export interface RemoteStoreRestoreInfo { + indices?: string[]; + shards?: RemoteStoreRestoreShardsInfo; + snapshot?: string; +} + +export interface RemoteStoreRestoreShardsInfo { + failed?: number; + successful?: number; + total?: number; +} + diff --git a/api/_types/rollups._common.d.ts b/api/_types/rollups._common.d.ts new file mode 100644 index 000000000..e9c509dbe --- /dev/null +++ b/api/_types/rollups._common.d.ts @@ -0,0 +1,125 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export interface Continuous { + failure_reason?: string; + next_window_end_time?: number; + next_window_start_time?: number; + stats?: Stats; + status?: string; +} + +export interface Cron { + expression?: string; + timezone?: string; +} + +export interface DateHistogramDimension { + calendar_interval?: string; + fixed_interval?: string; + source_field?: string; + target_field?: string; + timezone?: string; +} + +export interface DimensionsConfigItem { + date_histogram?: DateHistogramDimension; + histogram?: HistogramDimension; + terms?: TermsDimension; +} + +export interface Explain { + continuous?: Continuous; + last_updated_time?: number; + rollup_id?: string; +} + +export interface ExplainEntities { + item?: Explain; +} + +export interface HistogramDimension { + interval?: string; + source_field?: string; + target_field?: string; +} + +export interface Interval { + cron?: Cron[] | Cron; + period?: number; + schedule_delay?: number; + start_time?: number; + unit?: string; +} + +export interface MetricsConfigItem { + metrics?: MetricsConfigMetrics[]; + source_field?: string; + target_field?: string; +} + +export interface MetricsConfigMetrics { + avg?: Record; + max?: Record; + min?: Record; + sum?: Record; + value_count?: Record; +} + +export interface Rollup { + continuous?: boolean; + delay?: number; + description?: string; + dimensions?: DimensionsConfigItem[]; + enabled?: boolean; + enabled_time?: number; + error_notification?: string; + last_updated_time?: number; + metadata_id?: string; + metrics?: MetricsConfigItem[]; + page_size?: number; + rollup_id?: string; + schedule?: Schedule; + schema_version?: number; + source_index?: string; + target_index?: string; +} + +export interface RollupEntity { + _id?: string; + _primaryTerm?: number; + _seqNo?: number; + rollup?: Rollup; +} + +export interface Schedule { + interval?: Interval; +} + +export interface Stats { + documents_processed?: number; + index_time_in_ms?: number; + pages_processed?: number; + rollups_indexed?: number; + search_time_in_ms?: number; +} + +export interface TermsDimension { + source_field?: string; + target_field?: string; +} + diff --git a/api/_types/search_pipeline._common.d.ts b/api/_types/search_pipeline._common.d.ts new file mode 100644 index 000000000..cd2dd4980 --- /dev/null +++ b/api/_types/search_pipeline._common.d.ts @@ -0,0 +1,152 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export interface FilterQueryRequestProcessor { + description?: string; + ignore_failure?: boolean; + query?: UserDefinedObjectStructure; + tag?: string; +} + +export type NeuralFieldMap = Record + +export interface NeuralQueryEnricherRequestProcessor { + default_model_id?: string; + description?: string; + neural_field_default_id?: NeuralFieldMap; + tag?: string; +} + +export interface NormalizationPhaseResultsProcessor { + combination?: ScoreCombination; + description?: string; + ignore_failure?: boolean; + normalization?: ScoreNormalization; + tag?: string; +} + +export interface OversampleRequestProcessor { + content_prefix?: string; + description?: string; + ignore_failure?: boolean; + sample_factor: number; + tag?: string; +} + +export interface PhaseResultsProcessor { + 'normalization-processor': NormalizationPhaseResultsProcessor; +} + +export type RequestProcessor = { + filter_query: FilterQueryRequestProcessor; +} | { + neural_query_enricher: NeuralQueryEnricherRequestProcessor; +} | { + script: SearchScriptRequestProcessor; +} | { + oversample: OversampleRequestProcessor; +} + +export interface ScoreCombination { + parameters?: number[]; + technique?: ScoreCombinationTechnique; +} + +export type ScoreCombinationTechnique = 'arithmetic_mean' | 'geometric_mean' | 'harmonic_mean' + +export interface ScoreNormalization { + technique?: ScoreNormalizationTechnique; +} + +export type ScoreNormalizationTechnique = 'l2' | 'min_max' + +export type SearchPipelineMap = Record + +export interface SearchPipelineStructure { + phase_results_processors?: PhaseResultsProcessor[]; + request_processors?: RequestProcessor[]; + response_processors?: RequestProcessor[]; + version?: number; +} + +export interface SearchScriptRequestProcessor { + description?: string; + ignore_failure?: boolean; + lang?: string; + source: string; + tag?: string; +} + +export interface UserDefinedObjectStructure { + bool?: any; + boosting?: any; + combined_fields?: any; + constant_score?: any; + dis_max?: any; + distance_feature?: any; + exists?: any; + field_masking_span?: any; + function_score?: any; + fuzzy?: UserDefinedValueMap; + geo_bounding_box?: any; + geo_distance?: any; + geo_polygon?: any; + geo_shape?: any; + has_child?: any; + has_parent?: any; + ids?: any; + intervals?: UserDefinedValueMap; + knn?: any; + match?: UserDefinedValueMap; + match_all?: any; + match_bool_prefix?: UserDefinedValueMap; + match_none?: any; + match_phrase?: UserDefinedValueMap; + match_phrase_prefix?: UserDefinedValueMap; + more_like_this?: any; + multi_match?: any; + nested?: any; + parent_id?: any; + percolate?: any; + pinned?: any; + prefix?: UserDefinedValueMap; + query_string?: any; + range?: UserDefinedValueMap; + rank_feature?: any; + regexp?: UserDefinedValueMap; + script?: any; + script_score?: any; + shape?: any; + simple_query_string?: any; + span_containing?: any; + span_first?: any; + span_multi?: any; + span_near?: any; + span_not?: any; + span_or?: any; + span_term?: UserDefinedValueMap; + span_within?: any; + term?: UserDefinedValueMap; + terms?: any; + terms_set?: UserDefinedValueMap; + wildcard?: UserDefinedValueMap; + wrapper?: any; +} + +export interface UserDefinedValueMap { +} + diff --git a/api/_types/security._common.d.ts b/api/_types/security._common.d.ts new file mode 100644 index 000000000..a328f9bdf --- /dev/null +++ b/api/_types/security._common.d.ts @@ -0,0 +1,335 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export interface AccountDetails { + backend_roles?: string[]; + custom_attribute_names?: string[]; + is_hidden?: boolean; + is_internal_user?: boolean; + is_reserved?: boolean; + roles?: string[]; + tenants?: UserTenants; + user_name?: string; + user_requested_tenant?: string; +} + +export interface ActionGroup { + allowed_actions?: string[]; + description?: string; + hidden?: boolean; + reserved?: boolean; + static?: boolean; + type?: string; +} + +export type ActionGroupsMap = Record + +export interface AllowConfig { + enabled?: boolean; + requests?: Record; +} + +export interface AllowListConfig { + config?: AllowConfig; +} + +export interface AuditConfig { + audit?: AuditLogsConfig; + compliance?: ComplianceConfig; + enabled?: boolean; +} + +export interface AuditConfigWithReadOnly { + _readonly?: string[]; + config?: AuditConfig; +} + +export interface AuditLogsConfig { + disabled_rest_categories?: string[]; + disabled_transport_categories?: string[]; + enable_rest?: boolean; + enable_transport?: boolean; + exclude_sensitive_headers?: boolean; + ignore_requests?: string[]; + ignore_users?: string[]; + log_request_body?: boolean; + resolve_bulk_requests?: boolean; + resolve_indices?: boolean; +} + +export interface AuthInfo { + backend_roles?: any[]; + custom_attribute_names?: any[]; + peer_certificates?: number; + principal?: string; + remote_address?: string; + roles?: any[]; + size_of_backendroles?: string; + size_of_custom_attributes?: string; + size_of_user?: string; + sso_logout_url?: string; + tenants?: Record; + user?: string; + user_name?: string; + user_requested_tenant?: string; +} + +export interface BadRequest { + message?: string; + status?: '400'; +} + +export interface CertificatesDetail { + issuer_dn?: string; + not_after?: string; + not_before?: string; + san?: string; + subject_dn?: string; +} + +export interface ChangePasswordRequestContent { + current_password: string; + password: string; +} + +export interface ComplianceConfig { + enabled?: boolean; + external_config?: boolean; + internal_config?: boolean; + read_ignore_users?: string[]; + read_metadata_only?: boolean; + read_watched_fields?: any; + write_ignore_users?: string[]; + write_log_diffs?: boolean; + write_metadata_only?: boolean; + write_watched_indices?: string[]; +} + +export interface ConfigUpgradePayload { + config?: any[]; +} + +export interface CreateTenantParams { + description?: string; +} + +export interface DashboardsInfo { + default_tenant?: string; + multitenancy_enabled?: boolean; + not_fail_on_forbidden_enabled?: boolean; + opensearch_dashboards_index?: string; + opensearch_dashboards_mt_enabled?: boolean; + opensearch_dashboards_server_user?: string; + password_validation_error_message?: string; + password_validation_regex?: string; + private_tenant_enabled?: boolean; + sign_in_options?: any[]; + user_name?: string; +} + +export interface DistinguishedNames { + nodes_dn?: string[]; +} + +export type DistinguishedNamesMap = Record + +export interface DynamicConfig { + dynamic?: DynamicOptions; +} + +export interface DynamicOptions { + authc?: any; + authFailureListeners?: any; + authz?: any; + disableIntertransportAuth?: boolean; + disableRestAuth?: boolean; + doNotFailOnForbidden?: boolean; + doNotFailOnForbiddenEmpty?: boolean; + filteredAliasMode?: string; + hostsResolverMode?: string; + http?: any; + kibana?: any; + multiRolespanEnabled?: boolean; + respectRequestIndicesOptions?: boolean; +} + +export interface GenerateOBOToken { + authenticationToken?: string; + durationSeconds?: string; + user?: string; +} + +export interface GetCertificates { + http_certificates_list?: CertificatesDetail[]; + transport_certificates_list?: CertificatesDetail[]; +} + +export interface HealthInfo { + message?: string; + mode?: string; + status?: string; +} + +export interface IndexPermission { + allowed_actions?: string[]; + dls?: string; + fls?: string[]; + index_patterns?: string[]; + masked_fields?: string[]; +} + +export interface InternalServerError { + error?: string; +} + +export interface MethodNotImplemented { + message?: string; + status?: '501'; +} + +export interface MultiTenancyConfig { + default_tenant?: string; + multitenancy_enabled?: boolean; + private_tenant_enabled?: boolean; + sign_in_options?: string[]; +} + +export interface OBOToken { + description: string; + duration?: string; + service?: string; +} + +export interface Ok { + message?: string; + status?: '200'; +} + +export interface PatchOperation { + op: string; + path: string; + value?: Record; +} + +export interface PermissionsInfo { + disabled_endpoints?: Record; + has_api_access?: boolean; + user?: string; + user_name?: string; +} + +export interface Role { + cluster_permissions?: string[]; + description?: string; + hidden?: boolean; + index_permissions?: IndexPermission[]; + reserved?: boolean; + static?: boolean; + tenant_permissions?: TenantPermission[]; +} + +export interface RoleMapping { + and_backend_roles?: string[]; + backend_roles?: string[]; + description?: string; + hidden?: boolean; + hosts?: string[]; + reserved?: boolean; + users?: string[]; +} + +export type RoleMappings = Record + +export type RolesMap = Record + +export interface SSLInfo { + local_certificates_list?: any[]; + peer_certificates?: number; + peer_certificates_list?: any[]; + principal?: string; + ssl_cipher?: string; + ssl_openssl_available?: boolean; + ssl_openssl_non_available_cause?: string; + ssl_openssl_supports_hostname_validation?: boolean; + ssl_openssl_supports_key_manager_factory?: boolean; + ssl_openssl_version?: string; + ssl_openssl_version_string?: string; + ssl_protocol?: string; + ssl_provider_http?: string; + ssl_provider_transport_client?: string; + ssl_provider_transport_server?: string; +} + +export interface Tenant { + description?: string; + hidden?: boolean; + reserved?: boolean; + static?: boolean; +} + +export type TenantInfo = Record + +export interface TenantPermission { + allowed_actions?: string[]; + tenant_patterns?: string[]; +} + +export type TenantsMap = Record + +export interface Unauthorized { + message?: string; + status?: '403'; +} + +export interface UpgradeCheck { + status?: string; + upgradeActions?: Record; + upgradeAvailable?: boolean; +} + +export interface UpgradePerform { + status?: string; + upgrades?: Record; +} + +export interface User { + attributes?: UserAttributes; + backend_roles?: string[]; + description?: string; + hash?: string; + hidden?: boolean; + opendistro_security_roles?: string[]; + reserved?: boolean; + static?: boolean; +} + +export type UserAttributes = Record + +export type UsersMap = Record + +export interface UserTenants { + admin?: boolean; + admin_tenant?: boolean; + global_tenant?: boolean; +} + +export interface WhoAmI { + dn?: string; + is_admin?: string; + is_node_certificate_request?: string; +} + diff --git a/api/_types/snapshot._common.d.ts b/api/_types/snapshot._common.d.ts new file mode 100644 index 000000000..3ce38b8b8 --- /dev/null +++ b/api/_types/snapshot._common.d.ts @@ -0,0 +1,135 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface FileCountSnapshotStats { + file_count: number; + size_in_bytes: number; +} + +export interface IndexDetails { + max_segments_per_shard: number; + shard_count: number; + size?: Common.ByteSize; + size_in_bytes: number; +} + +export interface InfoFeatureState { + feature_name: string; + indices: Common.Indices; +} + +export interface Repository { + settings: RepositorySettings; + type: string; + uuid?: Common.Uuid; +} + +export interface RepositorySettings { + chunk_size?: string; + compress?: string | boolean; + concurrent_streams?: string | number; + location: string; + read_only?: string | boolean; +} + +export interface ShardsStats { + done: number; + failed: number; + finalizing: number; + initializing: number; + started: number; + total: number; +} + +export type ShardsStatsStage = 'DONE' | 'FAILURE' | 'FINALIZE' | 'INIT' | 'STARTED' + +export interface ShardsStatsSummary { + incremental: ShardsStatsSummaryItem; + start_time_in_millis: Common.EpochTimeUnitMillis; + time?: Common.Duration; + time_in_millis: Common.DurationValueUnitMillis; + total: ShardsStatsSummaryItem; +} + +export interface ShardsStatsSummaryItem { + file_count: number; + size_in_bytes: number; +} + +export interface SnapshotIndexStats { + shards: Record; + shards_stats: ShardsStats; + stats: SnapshotStats; +} + +export interface SnapshotInfo { + data_streams: string[]; + duration?: Common.Duration; + duration_in_millis?: Common.DurationValueUnitMillis; + end_time?: Common.DateTime; + end_time_in_millis?: Common.EpochTimeUnitMillis; + failures?: SnapshotShardFailure[]; + feature_states?: InfoFeatureState[]; + include_global_state?: boolean; + index_details?: Record; + indices?: Common.IndexName[]; + metadata?: Common.Metadata; + reason?: string; + repository?: Common.Name; + shards?: Common.ShardStatistics; + snapshot: Common.Name; + start_time?: Common.DateTime; + start_time_in_millis?: Common.EpochTimeUnitMillis; + state?: string; + uuid: Common.Uuid; + version?: Common.VersionString; + version_id?: Common.VersionNumber; +} + +export interface SnapshotShardFailure { + index: Common.IndexName; + node_id?: Common.Id; + reason: string; + shard_id: Common.Id; + status: string; +} + +export interface SnapshotShardsStatus { + stage: ShardsStatsStage; + stats: ShardsStatsSummary; +} + +export interface SnapshotStats { + incremental: FileCountSnapshotStats; + start_time_in_millis: Common.EpochTimeUnitMillis; + time?: Common.Duration; + time_in_millis: Common.DurationValueUnitMillis; + total: FileCountSnapshotStats; +} + +export interface Status { + include_global_state: boolean; + indices: Record; + repository: string; + shards_stats: ShardsStats; + snapshot: string; + state: string; + stats: SnapshotStats; + uuid: Common.Uuid; +} + diff --git a/api/_types/snapshot.cleanup_repository.d.ts b/api/_types/snapshot.cleanup_repository.d.ts new file mode 100644 index 000000000..693b809db --- /dev/null +++ b/api/_types/snapshot.cleanup_repository.d.ts @@ -0,0 +1,22 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export interface CleanupRepositoryResults { + deleted_blobs: number; + deleted_bytes: number; +} + diff --git a/api/_types/snapshot.get.d.ts b/api/_types/snapshot.get.d.ts new file mode 100644 index 000000000..0644614c6 --- /dev/null +++ b/api/_types/snapshot.get.d.ts @@ -0,0 +1,25 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' +import * as Snapshot_Common from './snapshot._common' + +export interface SnapshotResponseItem { + error?: Common.ErrorCause; + repository: Common.Name; + snapshots?: Snapshot_Common.SnapshotInfo[]; +} + diff --git a/api/_types/snapshot.restore.d.ts b/api/_types/snapshot.restore.d.ts new file mode 100644 index 000000000..a36c3bcdf --- /dev/null +++ b/api/_types/snapshot.restore.d.ts @@ -0,0 +1,24 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface SnapshotRestore { + indices: Common.IndexName[]; + shards: Common.ShardStatistics; + snapshot: string; +} + diff --git a/api/_types/snapshot.verify_repository.d.ts b/api/_types/snapshot.verify_repository.d.ts new file mode 100644 index 000000000..12de712ba --- /dev/null +++ b/api/_types/snapshot.verify_repository.d.ts @@ -0,0 +1,22 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export interface CompactNodeInfo { + name: Common.Name; +} + diff --git a/api/_types/sql._common.d.ts b/api/_types/sql._common.d.ts new file mode 100644 index 000000000..96744b8a9 --- /dev/null +++ b/api/_types/sql._common.d.ts @@ -0,0 +1,118 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + + +export interface Cursor { + keep_alive?: string; +} + +export interface Explain { + fetch_size?: number; + filter?: Record; + query?: string; +} + +export interface ExplainBody { + children?: ExplainBody[]; + description?: Record; + name?: string; +} + +export interface ExplainResponse { + root?: ExplainBody; +} + +export interface Plugins { + ppl?: Ppl; + query?: PluginsQuery; + sql?: Sql; +} + +export interface PluginsQuery { + memory_limit?: string; + size_limit?: string | number; +} + +export interface Ppl { + enabled?: boolean | string; +} + +export interface Query { + fetch_size?: number; + filter?: Record; + query?: string; +} + +export interface QueryResponse { + cursor?: string; + datarows?: any[][]; + schema?: Record[]; + size?: number; + status?: number; + total?: number; +} + +export interface Sql { + cursor?: Cursor; + enabled?: boolean | string; + slowlog?: number | string; +} + +export interface SqlClose { + cursor?: string; +} + +export interface SqlCloseResponse { + succeeded?: boolean; +} + +export interface SqlSettings { + transient?: Transient; +} + +export interface SqlSettingsPlain { + transient?: TransientPlain; +} + +export interface SqlSettingsResponse { + acknowledged?: boolean; + persistent?: Record; + transient?: Transient; +} + +export interface Stats { + cluster_name?: Record; + end_time?: Record; + execution_time?: Record; + index?: Record; + query?: Record; + start_time?: string; + user?: Record; +} + +export interface Transient { + plugins?: Plugins; +} + +export interface TransientPlain { + 'plugins.ppl.enabled'?: boolean; + 'plugins.query.memory_limit'?: string; + 'plugins.query.size_limit'?: number; + 'plugins.sql.cursor.keep_alive'?: string; + 'plugins.sql.enabled'?: boolean; + 'plugins.sql.slowlog'?: number; +} + diff --git a/api/_types/tasks._common.d.ts b/api/_types/tasks._common.d.ts new file mode 100644 index 000000000..b7c73a7a4 --- /dev/null +++ b/api/_types/tasks._common.d.ts @@ -0,0 +1,59 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common from './_common' + +export type GroupBy = 'nodes' | 'none' | 'parents' + +export interface NodeTasks { + attributes?: Record; + host?: Common.Host; + ip?: Common.Ip; + name?: Common.NodeId; + roles?: string[]; + tasks: Record; + transport_address?: Common.TransportAddress; +} + +export interface ParentTaskInfo extends TaskInfo { + children?: TaskInfo[]; +} + +export interface TaskInfo { + action: string; + cancellable: boolean; + cancelled?: boolean; + description?: string; + headers: Record; + id: number; + node: Common.NodeId; + parent_task_id?: Common.TaskId; + running_time?: Common.Duration; + running_time_in_nanos: Common.DurationValueUnitNanos; + start_time_in_millis: Common.EpochTimeUnitMillis; + status?: Record; + type: string; +} + +export type TaskInfos = TaskInfo[] | Record + +export interface TaskListResponseBase { + node_failures?: Common.ErrorCause[]; + nodes?: Record; + task_failures?: Common.TaskFailure[]; + tasks?: TaskInfos; +} + diff --git a/api/_types/transforms._common.d.ts b/api/_types/transforms._common.d.ts new file mode 100644 index 000000000..f4226c745 --- /dev/null +++ b/api/_types/transforms._common.d.ts @@ -0,0 +1,131 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import * as Common_QueryDsl from './_common.query_dsl' + +export interface ContinuousStats { + documents_behind?: Record; + last_timestamp?: number; +} + +export interface DateHistogramGroup { + calendar_interval?: string; + fixed_interval?: string; + source_field?: string; + target_field?: string; + timezone?: string; +} + +export interface Explain { + metadata_id?: string; + transform_metadata?: TransformMetadata; +} + +export type ExplainResponse = Record + +export interface ExplainStats { + documents_indexed?: number; + documents_processed?: number; + index_time_in_millis?: number; + pages_processed?: number; + search_time_in_millis?: number; +} + +export interface GroupsConfigItem { + date_histogram?: DateHistogramGroup; + histogram?: HistogramGroup; + terms?: TermsGroup; +} + +export interface HistogramGroup { + interval?: string; + source_field?: string; + target_field?: string; +} + +export interface MetricsConfigItem { + metrics?: MetricsConfigMetrics[]; + source_field?: string; + target_field?: string; +} + +export interface MetricsConfigMetrics { + avg?: Record; + max?: Record; + min?: Record; + sum?: Record; + value_count?: Record; +} + +export interface Preview { + documents?: Record[]; +} + +export interface Schedule { + interval: ScheduleInterval; +} + +export interface ScheduleInterval { + period?: number; + start_time?: number; + unit?: string; +} + +export interface TermsGroup { + source_field?: string; + target_field?: string; +} + +export interface Transform { + aggregations?: MetricsConfigItem[]; + continuous?: boolean; + data_selection_query?: Common_QueryDsl.QueryContainer; + description?: string; + enabled?: boolean; + enabled_at?: number; + groups?: GroupsConfigItem[]; + metadata_id?: string; + page_size?: number; + roles?: string[]; + schedule?: Schedule; + schema_version?: number; + source_index?: string; + target_index?: string; + transform_id?: string; + updated_at?: string; +} + +export interface TransformEntity { + _id?: string; + _primaryTerm?: number; + _seqNo?: number; + transform?: Transform; +} + +export interface TransformMetadata { + continuous_stats?: ContinuousStats; + failure_reason?: string; + last_updated_at?: number; + stats?: ExplainStats; + status?: string; + transform_id?: string; +} + +export interface TransformsResponse { + total_transforms?: number; + transforms?: TransformEntity[]; +} + diff --git a/api/api/bulk.js b/api/api/bulk.js deleted file mode 100644 index 3fb5a1401..000000000 --- a/api/api/bulk.js +++ /dev/null @@ -1,130 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'wait_for_active_shards', - 'refresh', - 'routing', - 'timeout', - 'type', - '_source', - '_source_excludes', - '_source_exclude', - '_source_includes', - '_source_include', - 'pipeline', - 'require_alias', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - waitForActiveShards: 'wait_for_active_shards', - _sourceExcludes: '_source_excludes', - _sourceExclude: '_source_exclude', - _sourceIncludes: '_source_includes', - _sourceInclude: '_source_include', - requireAlias: 'require_alias', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * The bulk operation lets you add, update, or delete many documents in a single request. - * Compared to individual OpenSearch indexing requests, the bulk operation has significant performance benefits. - * Whenever practical, we recommend batching indexing operations into bulk requests. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/document-apis/bulk/|OpenSearch - Bulk} - * - * @memberOf API-Document - * - * @param {Object} params - * @param {Object[]} params.body - {@link https://opensearch.org/docs/latest/api-reference/document-apis/bulk/#request-body|Request Body} - * @param {string} [params.index] - Specifying the index means you don’t need to include it in the request body. - * @param {string} [params.pipeline] - The pipeline ID for preprocessing documents. - * @param {string} [params.routing] - Routes the request to the specified shard. - * @param {string} [params.refresh=false] - If true, OpenSearch refreshes shards to make the operation visible to searching. Valid options are 'true', 'false', and 'wait_for', which tells OpenSearch to wait for a refresh before executing the operation. - * @param {string} [params.timeout=1m] - How long to wait for a response from the cluster. - * @param {string} [params.wait_for_active_shards] - The number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the operation to succeed. - * @param {boolean} [params.require_alias=false] - Specifies whether the target index must be an index alias. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/document-apis/bulk/#response|Bulk Response} - */ -function bulkApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - // check required url components - if (params.type != null && params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: index'); - return handleError(err, callback); - } - - let { method, body, index, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null) { - if (method == null) method = 'POST'; - path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_bulk'; - } else if (index != null) { - if (method == null) method = 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_bulk'; - } else { - if (method == null) method = 'POST'; - path = '/' + '_bulk'; - } - - // build request object - const request = { - method, - path, - bulkBody: body, - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = bulkApi; diff --git a/api/api/cat.js b/api/api/cat.js deleted file mode 100644 index 84e2c3d7e..000000000 --- a/api/api/cat.js +++ /dev/null @@ -1,933 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -/** @namespace API-CAT */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'format', - 'local', - 'h', - 'help', - 's', - 'v', - 'expand_wildcards', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', - 'bytes', - 'cluster_manager_timeout', - 'master_timeout', - 'fields', - 'time', - 'ts', - 'health', - 'pri', - 'include_unloaded_segments', - 'allow_no_match', - 'allow_no_datafeeds', - 'allow_no_jobs', - 'from', - 'size', - 'full_id', - 'include_bootstrap', - 'active_only', - 'detailed', - 'index', - 'ignore_unavailable', - 'nodes', - 'actions', - 'parent_task_id', - 'pri', -]; -const snakeCase = { - expandWildcards: 'expand_wildcards', - errorTrace: 'error_trace', - filterPath: 'filter_path', - clusterManagerTimeout: 'cluster_manager_timeout', - masterTimeout: 'master_timeout', - includeUnloadedSegments: 'include_unloaded_segments', - allowNoMatch: 'allow_no_match', - allowNoDatafeeds: 'allow_no_datafeeds', - allowNoJobs: 'allow_no_jobs', - fullId: 'full_id', - includeBootstrap: 'include_bootstrap', - activeOnly: 'active_only', - ignoreUnavailable: 'ignore_unavailable', - parentTaskId: 'parent_task_id', -}; - -function CatApi(transport, ConfigurationError) { - this.transport = transport; - this[kConfigurationError] = ConfigurationError; -} - -/** - * The CAT aliases operation lists the mapping of aliases to indices, plus routing and filtering information. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-aliases/ OpenSearch - CAT aliases} - * - * @memberOf API-CAT - * - * @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: - * @param {string} [params.name] - To limit the information to specific aliases, provide the alias names seperated by commas. - * @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node. - * @param {string} [params.expand_wildcards=open] - Expands wildcard expressions to concrete indices. Combine multiple values with commas. Supported values are 'all', 'open', 'closed', 'hidden', and 'none'. Default is 'open'. - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-aliases/#response CAT aliases Response} - */ -CatApi.prototype.aliases = function catAliasesApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, name, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (name != null) { - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'aliases' + '/' + encodeURIComponent(name); - } else { - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'aliases'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * The CAT allocation operation lists the allocation of disk space for indices and the number of shards on each node. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-allocation/ OpenSearch - CAT allocation} - * - * @memberOf API-CAT - * - * @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: - * @param {string} [params.node_id] - To limit the information to specific nodes, provide the node names seperated by commas. - * @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node. - * @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. - * @param {string} [params.bytes] - Specify the units for byte size. For example, '7kb' or '6gb'. - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-allocation/#response CAT allocation Response} - */ -CatApi.prototype.allocation = function catAllocationApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, nodeId, node_id, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if ((node_id || nodeId) != null) { - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'allocation' + '/' + encodeURIComponent(node_id || nodeId); - } else { - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'allocation'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * The CAT count operation lists the number of documents in your cluster. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-count/ OpenSearch - CAT count} - * - * @memberOf API-CAT - * - * @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: - * @param {string} [params.index] - To see the number of documents in specific indices or aliases, provide the index/alias names seperated by commas. - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-count/#response CAT count Response} - */ -CatApi.prototype.count = function catCountApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null) { - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'count' + '/' + encodeURIComponent(index); - } else { - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'count'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * The CAT fielddata operation lists the memory size used by each field per node. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-field-data/ OpenSearch - CAT fielddata} - * - * @memberOf API-CAT - * - * @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: - * @param {string} [params.fields] - To limit the information to specific fields, provide the field names seperated by commas. - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-field-data/#response CAT fielddata Response} - */ -CatApi.prototype.fielddata = function catFielddataApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, fields, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (fields != null) { - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'fielddata' + '/' + encodeURIComponent(fields); - } else { - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'fielddata'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * The CAT health operation lists the status of the cluster, how long the cluster has been up, the number of nodes, - * and other useful information that helps you analyze the health of your cluster. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-health/ OpenSearch - CAT health} - * - * @memberOf API-CAT - * - * @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: - * @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'. - * @param {boolean} [params.ts=true] - If true, returns HH:MM:SS and Unix epoch timestamps. - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-health/#response CAT health Response} - */ -CatApi.prototype.health = function catHealthApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'health'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * See the available operations in the CAT API - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/index OpenSearch - CAT} - * - * @memberOf API-CAT - * - * @param {Object} params - (ignored) - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -CatApi.prototype.help = function catHelpApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_cat'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * The CAT indices operation lists information related to indices—how much disk space they are using, how many shards they have, their health status, and so on. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-indices/ OpenSearch - CAT indices} - * - * @memberOf API-CAT - * - * @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: - * @param {string} [params.index] - To limit the information to specific indices, provide the index names seperated by commas. - * @param {string} [params.bytes] - Specify the units for byte size. For example, '7kb' or '6gb'. - * @param {string} [params.health] - Limit indices based on their health status. Supported values are 'green', 'yellow', and 'red'. - * @param {boolean} [params.include_unloaded_segments=false] - Whether to include information from segments not loaded into memory. - * @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. - * @param {boolean} [params.pri=false] - Whether to return information only from the primary shards. - * @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'. - * @param {string} [params.expand_wildcards=open] - Expands wildcard expressions to concrete indices. Combine multiple values with commas. Supported values are 'all', 'open', 'closed', 'hidden', and 'none'. - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-indices/#response CAT indices Response} - */ -CatApi.prototype.indices = function catIndicesApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null) { - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'indices' + '/' + encodeURIComponent(index); - } else { - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'indices'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * The CAT cluster manager operation lists information that helps identify the elected cluster manager node. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/ OpenSearch - CAT cluster manager} - * - * @memberOf API-CAT - * - * @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/#response CAT cluster manager Response} - */ -CatApi.prototype.cluster_manager = function catClusterManagerApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'cluster_manager'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * // TODO: delete CatApi.prototype.master when it is removed from OpenSearch - * @deprecated use CatApi.prototype.cluster_manager instead - */ -CatApi.prototype.master = function catMasterApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'master'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * The CAT nodeattrs operation lists the attributes of custom nodes. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-nodeattrs/ OpenSearch - CAT aliases} - * - * @memberOf API-CAT - * - * @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: - * @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node. - * @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-nodeattrs/#response CAT nodeattrs Response} - */ -CatApi.prototype.nodeattrs = function catNodeattrsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'nodeattrs'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * The CAT nodes operation lists node-level information, including node roles and load metrics. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-nodes/ OpenSearch - CAT nodes} - * - * @memberOf API-CAT - * - * @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: - * @param {string} [params.bytes] - Specify the units for byte size. For example, '7kb' or '6gb'. - * @param {boolean} [params.full_id=false] - If true, return the full node ID. If false, return the shortened node ID. - * @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster_manager node. - * @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. - * @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'. - * @param {boolean} [params.include_unloaded_segments=false] - Whether to include information from segments not loaded into memory. - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-nodes/#response CAT nodes Response} - */ -CatApi.prototype.nodes = function catNodesApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'nodes'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * The CAT pending tasks operation lists the progress of all pending tasks, including task priority and time in queue. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/ OpenSearch - CAT pending tasks} - * - * @memberOf API-CAT - * - * @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: - * @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster_manager node. - * @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. - * @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'. - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/#response CAT pending tasks Response} - */ -CatApi.prototype.pendingTasks = function catPendingTasksApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'pending_tasks'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * The CAT plugins operation lists the names, components, and versions of the installed plugins. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-plugins/ OpenSearch - CAT plugins} - * - * @memberOf API-CAT - * - * @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: - * @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster_manager node. - * @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-plugins/#response CAT plugins Response} - */ -CatApi.prototype.plugins = function catPluginsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'plugins'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * The CAT recovery operation lists all completed and ongoing index and shard recoveries. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-recovery/ OpenSearch - CAT recovery} - * - * @memberOf API-CAT - * - * @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: - * @param {string} [params.bytes] - Specify the units for byte size. For example, '7kb' or '6gb'. - * @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'. - * @param {boolean} [params.active_only=false] - Whether to only include ongoing shard recoveries. - * @param {boolean} [params.detailed=false] - Whether to only include ongoing shard recoveries. - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-recovery/#response CAT recovery Response} - */ -CatApi.prototype.recovery = function catRecoveryApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null) { - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'recovery' + '/' + encodeURIComponent(index); - } else { - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'recovery'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * The CAT repositories operation lists all completed and ongoing index and shard recoveries. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-repositories/ OpenSearch - CAT repositories} - * - * @memberOf API-CAT - * - * @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: - * @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster_manager node. - * @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-repositories/#response CAT repositories Response} - */ -CatApi.prototype.repositories = function catRepositoriesApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'repositories'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * The cat segments operation lists Lucene segment-level information for each index. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-segments/ OpenSearch - CAT segments} - * - * @memberOf API-CAT - * - * @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: - * @param {string} [params.index] - To see only the information about segments of specific indices, provide the index names seperated by commas. - * @param {string} [params.bytes] - Specify the units for byte size. For example, '7kb' or '6gb'. - * @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-segments/#response CAT segments Response} - */ -CatApi.prototype.segments = function catSegmentsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null) { - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'segments' + '/' + encodeURIComponent(index); - } else { - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'segments'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * The CAT shards operation lists the state of all primary and replica shards and how they are distributed. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-shards/ OpenSearch - CAT shards} - * - * @memberOf API-CAT - * - * @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: - * @param {string} [params.index] - To see only the information about shards of specific indices, provide the index names seperated by commas. - * @param {string} [params.bytes] - Specify the units for byte size. For example, '7kb' or '6gb'. - * @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster_manager node. - * @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. - * @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'. - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-shards/#response CAT shards Response} - */ -CatApi.prototype.shards = function catShardsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null) { - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'shards' + '/' + encodeURIComponent(index); - } else { - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'shards'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * The CAT snapshots operation lists all snapshots for a repository. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-snapshots/ OpenSearch - CAT snapshots} - * - * @memberOf API-CAT - * - * @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: - * @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. - * @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'. - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-snapshots/#response CAT snapshots Response} - */ -CatApi.prototype.snapshots = function catSnapshotsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, repository, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (repository != null) { - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'snapshots' + '/' + encodeURIComponent(repository); - } else { - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'snapshots'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * The CAT tasks operation lists the progress of all tasks currently running on your cluster. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-tasks/ OpenSearch - CAT tasks} - * - * @memberOf API-CAT - * - * @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: - * @param {string} [params.nodes] - A comma-separated list of node IDs or names to limit the returned information. Use '_local' to return information from the node you’re connecting to, specify the node name to get information from specific nodes, or keep the parameter empty to get information from all nodes. - * @param {string} [params.time] - Specify the units for time. For example, '5d' or '7h'. - * @param {boolean} [params.detailed=false] - Returns detailed task information. - * @param {string} [params.parent_task_id] - Returns tasks with a specified parent task ID (node_id:task_number). Keep empty or set to -1 to return all. - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-tasks/#response CAT tasks Response} - */ -CatApi.prototype.tasks = function catTasksApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'tasks'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * The CAT templates operation lists the names, patterns, order numbers, and version numbers of index templates. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-templates/ OpenSearch - CAT templates} - * - * @memberOf API-CAT - * - * @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: - * @param {boolean} [params.name] - If you want to limit it to a specific template or pattern, provide the template name or pattern. - * @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node. - * @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-templates/#response CAT templates Response} - */ -CatApi.prototype.templates = function catTemplatesApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, name, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (name != null) { - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'templates' + '/' + encodeURIComponent(name); - } else { - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'templates'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * The CAT thread pool operation lists the active, queued, and rejected threads of different thread pools on each node. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-thread-pool/ OpenSearch - CAT thread pool} - * - * @memberOf API-CAT - * - * @param {Object} params - Accepts {@link https://opensearch.org/docs/latest/api-reference/cat/index#optional-query-parameters - common CAT parameters} along with the following unique parameters: - * @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node. - * @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/cat/cat-thread-pool/#response CAT thread pool Response} - */ -CatApi.prototype.threadPool = function catThreadPoolApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, threadPoolPatterns, thread_pool_patterns, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if ((thread_pool_patterns || threadPoolPatterns) != null) { - if (method == null) method = 'GET'; - path = - '/' + - '_cat' + - '/' + - 'thread_pool' + - '/' + - encodeURIComponent(thread_pool_patterns || threadPoolPatterns); - } else { - if (method == null) method = 'GET'; - path = '/' + '_cat' + '/' + 'thread_pool'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -Object.defineProperties(CatApi.prototype, { - pending_tasks: { - get() { - return this.pendingTasks; - }, - }, - thread_pool: { - get() { - return this.threadPool; - }, - }, -}); - -module.exports = CatApi; diff --git a/api/api/clear_scroll.js b/api/api/clear_scroll.js deleted file mode 100644 index 07128d4d0..000000000 --- a/api/api/clear_scroll.js +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path']; -const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }; - -/** - * Close the search context when you’re done scrolling, because the scroll operation continues to consume computing resources until the timeout. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/scroll/ OpenSearch - Scroll } - * - * @memberOf API-Search - * - * @param {Object} params - * @param {string} [params.scroll_id] The ID of the scroll to be terminated. Use `_all` to close all open scroll contexts. - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -function clearScrollApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, scrollId, scroll_id, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if ((scroll_id || scrollId) != null) { - if (method == null) method = 'DELETE'; - path = '/' + '_search' + '/' + 'scroll' + '/' + encodeURIComponent(scroll_id || scrollId); - } else { - if (method == null) method = 'DELETE'; - path = '/' + '_search' + '/' + 'scroll'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = clearScrollApi; diff --git a/api/api/cluster.js b/api/api/cluster.js deleted file mode 100644 index 89379796f..000000000 --- a/api/api/cluster.js +++ /dev/null @@ -1,814 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -/** @namespace API-Cluster */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'include_yes_decisions', - 'include_disk_info', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', - 'timeout', - 'cluster_manager_timeout', - 'master_timeout', - 'wait_for_removal', - 'local', - 'flat_settings', - 'include_defaults', - 'expand_wildcards', - 'level', - 'wait_for_active_shards', - 'wait_for_nodes', - 'wait_for_events', - 'wait_for_no_relocating_shards', - 'wait_for_no_initializing_shards', - 'wait_for_status', - 'node_ids', - 'node_names', - 'create', - 'dry_run', - 'explain', - 'retry_failed', - 'metric', - 'wait_for_metadata_version', - 'wait_for_timeout', - 'ignore_unavailable', - 'allow_no_indices', -]; -const snakeCase = { - includeYesDecisions: 'include_yes_decisions', - includeDiskInfo: 'include_disk_info', - errorTrace: 'error_trace', - filterPath: 'filter_path', - clusterManagerTimeout: 'cluster_manager_timeout', - masterTimeout: 'master_timeout', - waitForRemoval: 'wait_for_removal', - flatSettings: 'flat_settings', - includeDefaults: 'include_defaults', - expandWildcards: 'expand_wildcards', - waitForActiveShards: 'wait_for_active_shards', - waitForNodes: 'wait_for_nodes', - waitForEvents: 'wait_for_events', - waitForNoRelocatingShards: 'wait_for_no_relocating_shards', - waitForNoInitializingShards: 'wait_for_no_initializing_shards', - waitForStatus: 'wait_for_status', - nodeIds: 'node_ids', - nodeNames: 'node_names', - dryRun: 'dry_run', - retryFailed: 'retry_failed', - waitForMetadataVersion: 'wait_for_metadata_version', - waitForTimeout: 'wait_for_timeout', - ignoreUnavailable: 'ignore_unavailable', - allowNoIndices: 'allow_no_indices', -}; - -function ClusterApi(transport, ConfigurationError) { - this.transport = transport; - this[kConfigurationError] = ConfigurationError; -} - -/** - * The most basic cluster allocation explain request finds an unassigned shard and explains why it can’t be allocated to a node. If you add some options, you can instead get information on a specific shard, including why OpenSearch assigned it to its current node. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-allocation/ OpenSearch - Cluster allocation explain} - * - * @memberOf API-Cluster - * - * @param {Object} params - * @param {boolean} [params.include_yes_decisions=false] - OpenSearch makes a series of yes or no decisions when trying to allocate a shard to a node. If this parameter is true, OpenSearch includes the (generally more numerous) “yes” decisions in its response. - * @param {boolean} [params.include_disk_info=false] - Whether to include information about disk usage in the response. - * @param {Object} [params.body] - * @param {string} [params.body.current_node] - If you only want an explanation if the shard happens to be on a particular node, specify that node name here. - * @param {string} [params.body.index] - The name of the shard’s index. - * @param {boolean} [params.body.primary] - Whether to provide an explanation for the primary shard (true) or its first replica (false), which share the same shard ID. - * @param {number} [params.body.shard] - The shard ID that you want an explanation for. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/cluster-allocation/#response Cluster allocation explain Response} - */ -ClusterApi.prototype.allocationExplain = function clusterAllocationExplainApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + '_cluster' + '/' + 'allocation' + '/' + 'explain'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Delete Component Template(s) - * - * @memberOf API-Cluster - * - * @param {Object} params - * @param {string} [params.name] The name of the component template to be deleted. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -ClusterApi.prototype.deleteComponentTemplate = function clusterDeleteComponentTemplateApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.name == null) { - const err = new this[kConfigurationError]('Missing required parameter: name'); - return handleError(err, callback); - } - - let { method, body, name, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'DELETE'; - path = '/' + '_component_template' + '/' + encodeURIComponent(name); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Clears cluster voting config exclusions. - * - * @memberOf API-Cluster - * - * @param {Object} params - * @param {boolean} [params.wait_for_removal] Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -ClusterApi.prototype.deleteVotingConfigExclusions = function clusterDeleteVotingConfigExclusionsApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'DELETE'; - path = '/' + '_cluster' + '/' + 'voting_config_exclusions'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Information about whether a particular component template exist - * - * @memberOf API-Cluster - * - * @param {Object} params - * @param {boolean} [params.name] Name of the template - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -ClusterApi.prototype.existsComponentTemplate = function clusterExistsComponentTemplateApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.name == null) { - const err = new this[kConfigurationError]('Missing required parameter: name'); - return handleError(err, callback); - } - - let { method, body, name, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'HEAD'; - path = '/' + '_component_template' + '/' + encodeURIComponent(name); - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns one or more component templates - * - * @memberOf API-Cluster - * - * @param {Object} params - * @param {string | string[]} [params.name] Name(s) of the template(s) - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -ClusterApi.prototype.getComponentTemplate = function clusterGetComponentTemplateApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, name, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (name != null) { - if (method == null) method = 'GET'; - path = '/' + '_component_template' + '/' + encodeURIComponent(name); - } else { - if (method == null) method = 'GET'; - path = '/' + '_component_template'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Get Cluster Settings - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-settings/ OpenSearch - Cluster Settings} - * @memberOf API-Cluster - * - * @param {Object} params - * ç - * @param {boolean} [params.include_defaults] Whether to include default settings as part of the response. This parameter is useful for identifying the names and current values of settings you want to update. - * @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -ClusterApi.prototype.getSettings = function clusterGetSettingsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_cluster' + '/' + 'settings'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * The most basic cluster health request returns a simple status of the health of your cluster. OpenSearch expresses cluster health in three colors: green, yellow, and red. A green status means all primary shards and their replicas are allocated to nodes. A yellow status means all primary shards are allocated to nodes, but some replicas aren’t. A red status means at least one primary shard is not allocated to any node. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-health/ OpenSearch - Cluster Health} - * @memberOf API-Cluster - * - * @param {Object} params - * @param {} [params.index] - To get the status of a specific index, provide the index name. - * @param {string} [params.expand_wildcards=open] - Expands wildcard expressions to concrete indices. Combine multiple values with commas. Supported values are 'all', 'open', 'closed', 'hidden', and 'none'. - * @param {string} [params.level=cluster] - The level of detail for returned health information. Supported values are 'cluster', 'indices', and 'shards'. - * @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node. - * @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. - * @param {string} [params.timeout=30s] - The amount of time to wait for a response from the cluster. - * @param {string} [params.wait_for_active_shards=0] - Wait until the specified number of shards is active before returning a response. 'all' for all shards - * @param {string} [params.wait_for_nodes] - Wait for N number of nodes. Use 12 for exact match, >12 and <12 for range. - * @param {string} [params.wait_for_events] - Wait until all currently queued events with the given priority are processed. Supported values are 'immediate', 'urgent', 'high', 'normal', 'low', and 'languid'. - * @param {boolean} [params.wait_for_no_relocating_shards=false] - Whether to wait until there are no relocating shards in the cluster. - * @param {boolean} [params.wait_for_no_initializing_shards=false] - Whether to wait until there are no initializing shards in the cluster. - * @param {string} [params.wait_for_status] - Wait until the cluster health reaches the specified status or better. Supported values are 'green', 'yellow', and 'red'. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/cluster-health/#response Cluster Health Response} - */ -ClusterApi.prototype.health = function clusterHealthApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null) { - if (method == null) method = 'GET'; - path = '/' + '_cluster' + '/' + 'health' + '/' + encodeURIComponent(index); - } else { - if (method == null) method = 'GET'; - path = '/' + '_cluster' + '/' + 'health'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Get a list of any cluster-level changes - * @memberOf API-Cluster - * - * @param {Object} params - * @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node. - * @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -ClusterApi.prototype.pendingTasks = function clusterPendingTasksApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_cluster' + '/' + 'pending_tasks'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Updates the cluster voting config exclusions by node ids or node names. - * @memberOf API-Cluster - * - * @param {Object} params - * @param {string} [params.node_names] - A comma-separated list of the persistent ids of the nodes to exclude from the voting configuration. If specified, you may not also specify node_names. - * @param {string} [params.node_ids] - A comma-separated list of the names of the nodes to exclude from the voting configuration. If specified, you may not also specify node_ids. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -ClusterApi.prototype.postVotingConfigExclusions = function clusterPostVotingConfigExclusionsApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'POST'; - path = '/' + '_cluster' + '/' + 'voting_config_exclusions'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Creates or updates a component template - * - * @memberOf API-Cluster - * - * @param {Object} params - * @param {string} params.name - The name of the component template. - * @param {object} params.body - The template definition. - * @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. - * @param {boolean} [params.create=false] - Whether the index template should only be added if new or can also replace an existing one. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -ClusterApi.prototype.putComponentTemplate = function clusterPutComponentTemplateApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.name == null) { - const err = new this[kConfigurationError]('Missing required parameter: name'); - return handleError(err, callback); - } - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, name, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'PUT'; - path = '/' + '_component_template' + '/' + encodeURIComponent(name); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Updates the cluster settings. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-settings/ OpenSearch - Cluster Settings} - * @memberOf API-Cluster - * - * @param {Object} params - * @param {boolean} [params.flat_settings] Whether to return settings in the flat form, which can improve readability, especially for heavily nested settings. - * @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. - * @param {string} [params.timeout=30s] - The amount of time to wait for a response from the cluster. - * @param {object} params.body - The settings to be updated. Can be either 'transient' or 'persistent' (survives cluster restart). - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -ClusterApi.prototype.putSettings = function clusterPutSettingsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'PUT'; - path = '/' + '_cluster' + '/' + 'settings'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * This operation provides connection information for any remote OpenSearch clusters that you’ve configured for the local cluster, such as the remote cluster alias, connection mode (sniff or proxy), IP addresses for seed nodes, and timeout settings. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/remote-info/ OpenSearch - Remote cluster information} - * @memberOf API-Cluster - * - * @param {Object} params - (Unused) - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/remote-info/#response Remote cluster information } - */ -ClusterApi.prototype.remoteInfo = function clusterRemoteInfoApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_remote' + '/' + 'info'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Allows to manually change the allocation of individual shards in the cluster. - * - * @memberOf API-Cluster - * - * @param {Object} params - * @param {object} [params.body] - The definition of 'commands' to perform ('move', 'cancel', 'allocate') - * @param {boolean} [params.dry_run] - Simulate the operation only and return the resulting state - * @param {boolean} [params.explain] - Return an explanation of why the commands can or cannot be executed - * @param {boolean} [params.retry_failed] - Retries allocation of shards that are blocked due to too many subsequent allocation failures - * @param {string | string[]} [params.metric] - Limit the information returned to the specified metrics. Defaults to all but metadata (options: _all, blocks, metadata, nodes, routing_table, cluster_manager_node, version) - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -ClusterApi.prototype.reroute = function clusterRerouteApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'POST'; - path = '/' + '_cluster' + '/' + 'reroute'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Get comprehensive information about the state of the cluster. - * - * @memberOf API-Cluster - * - * @param {Object} params - * @param {string | string[]} [params.metric] - Limit the information returned to the specified metrics. Defaults to all but metadata (options: _all, blocks, metadata, nodes, routing_table, cluster_manager_node, version). - * @param {string | string[]} [params.index] - List of index names; use '_all' or empty string to perform the operation on all indices. - * @param {boolean} [params.local=false] - Whether to return information from the local node only instead of from the cluster manager node. - * @param {string} [params.cluster_manager_timeout=30s] - The amount of time to wait for a connection to the cluster manager node. - * @param {boolean} [params.flat_settings=false] - Whether to return settings in the flat form, which can improve readability, especially for heavily nested settings. - * @param {number} [params.wait_for_metadata_version] - Wait for the metadata version to be equal or greater than the specified metadata version. - * @param {string} [params.wait_for_timeout=30s] - The maximum time to wait for wait_for_metadata_version before timing out - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards=open] - Expands wildcard expressions to concrete indices. Combine multiple values with commas. Supported values are 'all', 'open', 'closed', 'hidden', and 'none'. Default is 'open'. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -ClusterApi.prototype.state = function clusterStateApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required url components - if (params.index != null && params.metric == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: metric'); - return handleError(err, callback); - } - - let { method, body, metric, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (metric != null && index != null) { - if (method == null) method = 'GET'; - path = - '/' + - '_cluster' + - '/' + - 'state' + - '/' + - encodeURIComponent(metric) + - '/' + - encodeURIComponent(index); - } else if (metric != null) { - if (method == null) method = 'GET'; - path = '/' + '_cluster' + '/' + 'state' + '/' + encodeURIComponent(metric); - } else { - if (method == null) method = 'GET'; - path = '/' + '_cluster' + '/' + 'state'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * The CAT aliases operation lists the mapping of aliases to indices, plus routing and filtering information. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-stats/ OpenSearch - Cluster stats} - * - * @memberOf API-Cluster - * - * @param {Object} params - * @param {string | string[]} [params.node_id] - A comma-separated list of node IDs or names to limit the returned information; use '_local' to return information from the node you're connecting to, leave empty to get information from all nodes. - * - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/cluster-stats/#response Cluster stats Response} - */ - -ClusterApi.prototype.stats = function clusterStatsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, nodeId, node_id, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if ((node_id || nodeId) != null) { - if (method == null) method = 'GET'; - path = - '/' + - '_cluster' + - '/' + - 'stats' + - '/' + - 'nodes' + - '/' + - encodeURIComponent(node_id || nodeId); - } else { - if (method == null) method = 'GET'; - path = '/' + '_cluster' + '/' + 'stats'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -Object.defineProperties(ClusterApi.prototype, { - allocation_explain: { - get() { - return this.allocationExplain; - }, - }, - delete_component_template: { - get() { - return this.deleteComponentTemplate; - }, - }, - delete_voting_config_exclusions: { - get() { - return this.deleteVotingConfigExclusions; - }, - }, - exists_component_template: { - get() { - return this.existsComponentTemplate; - }, - }, - get_component_template: { - get() { - return this.getComponentTemplate; - }, - }, - get_settings: { - get() { - return this.getSettings; - }, - }, - pending_tasks: { - get() { - return this.pendingTasks; - }, - }, - post_voting_config_exclusions: { - get() { - return this.postVotingConfigExclusions; - }, - }, - put_component_template: { - get() { - return this.putComponentTemplate; - }, - }, - put_settings: { - get() { - return this.putSettings; - }, - }, - remote_info: { - get() { - return this.remoteInfo; - }, - }, -}); - -module.exports = ClusterApi; diff --git a/api/api/count.js b/api/api/count.js deleted file mode 100644 index c436297b4..000000000 --- a/api/api/count.js +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -/** @namespace API-Count */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'ignore_unavailable', - 'ignore_throttled', - 'allow_no_indices', - 'expand_wildcards', - 'min_score', - 'preference', - 'routing', - 'q', - 'analyzer', - 'analyze_wildcard', - 'default_operator', - 'df', - 'lenient', - 'terminate_after', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - ignoreUnavailable: 'ignore_unavailable', - ignoreThrottled: 'ignore_throttled', - allowNoIndices: 'allow_no_indices', - expandWildcards: 'expand_wildcards', - minScore: 'min_score', - analyzeWildcard: 'analyze_wildcard', - defaultOperator: 'default_operator', - terminateAfter: 'terminate_after', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * The count API gives you quick access to the number of documents that match a query. You can also use it to check the document count of an index, data stream, or cluster. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/count/ OpenSearch - Bulk} - * - * @memberOf API-Count - * - * @param {Object} params - * @param {boolean} [params.allow_no_indices=false] - If false, the request returns an error if any wildcard expression or index alias targets any closed or missing indices. - * @param {string} [params.analyzer] - The analyzer to use in the query string. - * @param {boolean} [params.analyze_wildcard=false] - Specifies whether to analyze wildcard and prefix queries. - * @param {string} [params.default_operator='OR'] - Indicates whether the default operator for a string query should be 'AND' or 'OR'. - * @param {string} [params.df] - The default field in case a field prefix is not provided in the query string. - * @param {string} [params.expand_wildcards=open] - Expands wildcard expressions to concrete indices. Combine multiple values with commas. Supported values are 'all', 'open', 'closed', 'hidden', and 'none'. - * @param {boolean} [params.ignore_unavailable=false] - Specifies whether to include missing or closed indices in the response. - * @param {boolean} [params.lenient=false] - Specifies whether OpenSearch should accept requests if queries have format errors (for example, querying a text field for an integer). - * @param {number} [params.min_score] - Include only documents with a minimum '_score' value in the result. - * @param {string} [params.routing] - Value used to route the operation to a specific shard. - * @param {string} [params.preference] - Specifies which shard or node OpenSearch should perform the count operation on. - * @param {number} [params.terminate_after] - The maximum number of documents OpenSearch should process before terminating the request. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/count/#response Count Response} - */ - -function countApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required url components - if (params.type != null && params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: index'); - return handleError(err, callback); - } - - let { method, body, index, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_count'; - } else if (index != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_count'; - } else { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + '_count'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = countApi; diff --git a/api/api/create.js b/api/api/create.js deleted file mode 100644 index 32d234466..000000000 --- a/api/api/create.js +++ /dev/null @@ -1,131 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'wait_for_active_shards', - 'refresh', - 'routing', - 'timeout', - 'version', - 'version_type', - 'pipeline', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - waitForActiveShards: 'wait_for_active_shards', - versionType: 'version_type', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Adds a document with a predefined ID to an index. - *
See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/index-document/ OpenSearch - Index Document} - * - * @memberOf API-Document - * - * @param {Object} params - * @param {string} params.index - Name of the index. - * @param {string} params.id - A unique identifier to attach to the document. - * @param {Object} params.body - The content of the document. - * @param {number} [params.if_seq_no] - Only perform the index operation if the document has the specified sequence number. - * @param {number} [params.if_primary_term] - Only perform the index operation if the document has the specified primary term. - * @param {string} [params.pipeline] - Route the index operation to a certain pipeline. - * @param {string} [params.routing] - value used to assign the index operation to a specific shard. - * @param {string} [params.refresh=false] - If true, OpenSearch refreshes shards to make the operation visible to searching. Valid options are 'true', 'false', and 'wait_for', which tells OpenSearch to wait for a refresh before executing the operation. - * @param {string} [params.timeout=1m] - How long to wait for a response from the cluster. - * @param {number} [params.version] - The document’s version number. - * @param {number} [params.version_type] - Specific version type (options: 'external' and 'external_gte') - * @param {string} [params.wait_for_active_shards] - The number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the operation to succeed. - * @param {boolean} [params.require_alias=false] - Specifies whether the target index must be an index alias. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/index-document/#response Index Response} - */ -function createApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, id, index, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null && id != null) { - if (method == null) method = 'PUT'; - path = - '/' + - encodeURIComponent(index) + - '/' + - encodeURIComponent(type) + - '/' + - encodeURIComponent(id) + - '/' + - '_create'; - } else { - if (method == null) method = 'PUT'; - path = '/' + encodeURIComponent(index) + '/' + '_create' + '/' + encodeURIComponent(id); - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = createApi; diff --git a/api/api/create_pit.js b/api/api/create_pit.js deleted file mode 100644 index 9665fc44b..000000000 --- a/api/api/create_pit.js +++ /dev/null @@ -1,88 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -/** @namespace API-PIT */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'allow_partial_pit_creation', - 'keep_alive', - 'preference', - 'routing', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - allowPartialPitCreation: 'allow_partial_pit_creation', - keepAlive: 'keep_alive', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Creates a point in time. - *
See Also: {@link https://opensearch.org/docs/latest/opensearch/point-in-time-api#create-a-pit|Opensearch - Create a PIT} - * @memberOf API-PIT - * - * @param {Object} params - * @param {string} params.index - The name(s) of the target index(es) for the PIT. May contain a comma-separated list or a wildcard index pattern. - * @param {string} params.keep_alive - The amount of time to keep the PIT - * @param {string} [params.preference=random] - The node or the shard used to perform the search. - * @param {string} [params.routing] - Specifies to route search requests to a specific shard. - * @param {string} [params.expand_wildcards=open] - The type of index that can match the wildcard pattern. Supports comma-separated values. - * @param {string} [params.allow_partial_pit_creation=false] - Specifies whether to create a PIT with partial failures. - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/opensearch/point-in-time-api#sample-response|Create PIT Response} - */ - -function createPitApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params['index'] == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - - if (params['keep_alive'] == null) { - const err = new this[kConfigurationError]('Missing required parameter: keep_alive'); - return handleError(err, callback); - } - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_search' + '/' + 'point_in_time'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = createPitApi; diff --git a/api/api/dangling_indices.js b/api/api/dangling_indices.js deleted file mode 100644 index 4647a8400..000000000 --- a/api/api/dangling_indices.js +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -/** @namespace API-Dangling-Indices */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'accept_data_loss', - 'timeout', - 'cluster_manager_timeout', - 'master_timeout', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - acceptDataLoss: 'accept_data_loss', - clusterManagerTimeout: 'cluster_manager_timeout', - masterTimeout: 'master_timeout', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -function DanglingIndicesApi(transport, ConfigurationError) { - this.transport = transport; - this[kConfigurationError] = ConfigurationError; -} - -/** - * Deletes the specified dangling index - *
See also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/ OpenSearch - Dangling Indexes} - * @memberOf API-Dangling-Indices - * - * @param {Object} params - * @param {string} params.index_uuid - The UUID of the dangling index - * @param {boolean} [params.accept_data_loss] - Must be set to true in order to delete the dangling index - * @param {string} [params.timeout=30s] - Explicit operation timeout - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -DanglingIndicesApi.prototype.deleteDanglingIndex = function danglingIndicesDeleteDanglingIndexApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.index_uuid == null && params.indexUuid == null) { - const err = new this[kConfigurationError]( - 'Missing required parameter: index_uuid or indexUuid' - ); - return handleError(err, callback); - } - - let { method, body, indexUuid, index_uuid, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'DELETE'; - path = '/' + '_dangling' + '/' + encodeURIComponent(index_uuid || indexUuid); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Imports the specified dangling index - *
See also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/ OpenSearch - Dangling Indexes} - * @memberOf API-Dangling-Indices - * - * @param {Object} params - * @param {string} params.index_uuid - The UUID of the dangling index - * @param {boolean} [params.accept_data_loss] - Must be set to true in order to delete the dangling index - * @param {string} [params.timeout=30s] - Explicit operation timeout - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -DanglingIndicesApi.prototype.importDanglingIndex = function danglingIndicesImportDanglingIndexApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.index_uuid == null && params.indexUuid == null) { - const err = new this[kConfigurationError]( - 'Missing required parameter: index_uuid or indexUuid' - ); - return handleError(err, callback); - } - - let { method, body, indexUuid, index_uuid, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'POST'; - path = '/' + '_dangling' + '/' + encodeURIComponent(index_uuid || indexUuid); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Retrieve all dangling indices. - *
See also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/ OpenSearch - Dangling Indexes} - * @memberOf API-Dangling-Indices - * - * @param {Object} params - (Unused) - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -DanglingIndicesApi.prototype.listDanglingIndices = function danglingIndicesListDanglingIndicesApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_dangling'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -Object.defineProperties(DanglingIndicesApi.prototype, { - delete_dangling_index: { - get() { - return this.deleteDanglingIndex; - }, - }, - import_dangling_index: { - get() { - return this.importDanglingIndex; - }, - }, - list_dangling_indices: { - get() { - return this.listDanglingIndices; - }, - }, -}); - -module.exports = DanglingIndicesApi; diff --git a/api/api/delete.js b/api/api/delete.js deleted file mode 100644 index dbdfde11d..000000000 --- a/api/api/delete.js +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'wait_for_active_shards', - 'refresh', - 'routing', - 'timeout', - 'if_seq_no', - 'if_primary_term', - 'version', - 'version_type', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - waitForActiveShards: 'wait_for_active_shards', - ifSeqNo: 'if_seq_no', - ifPrimaryTerm: 'if_primary_term', - versionType: 'version_type', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Delete a document - *
See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/update-document/ OpenSearch - Update Document} - * - * @memberOf API-Document - * - * @param {Object} params - * @param {string} params.index - Name of the index. - * @param {string} params.id - A unique identifier to attach to the document. - * @param {number} [params.if_seq_no] - Only perform the delete operation if the document has the specified sequence number. - * @param {number} [params.if_primary_term] - Only perform the delete operation if the document has the specified primary term. - * @param {string} [params.routing] - Value used to assign the index operation to a specific shard. - * @param {string} [params.refresh=false] - If true, OpenSearch refreshes shards to make the operation visible to searching. Valid options are 'true', 'false', and 'wait_for', which tells OpenSearch to wait for a refresh before executing the operation. - * @param {string} [params.timeout=1m] - How long to wait for a response from the cluster. - * @param {string} [params.wait_for_active_shards] - The number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the operation to succeed. - * @param {number} [params.version] - The document’s version number. - * @param {number} [params.version_type] - Specific version type (options: 'external' and 'external_gte') - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/update-document/#response Update Response} - */ -function deleteApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - - let { method, body, id, index, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null && id != null) { - if (method == null) method = 'DELETE'; - path = - '/' + - encodeURIComponent(index) + - '/' + - encodeURIComponent(type) + - '/' + - encodeURIComponent(id); - } else { - if (method == null) method = 'DELETE'; - path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id); - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = deleteApi; diff --git a/api/api/delete_all_pits.js b/api/api/delete_all_pits.js deleted file mode 100644 index dcb582f48..000000000 --- a/api/api/delete_all_pits.js +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path']; -const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }; - -/** - * Deletes all PITs in the OpenSearch cluster. The Delete All PITs API deletes only local PITs or mixed PITs (PITs created in both local and remote clusters). It does not delete fully remote PITs. - *
See Also: {@link https://opensearch.org/docs/latest/opensearch/point-in-time-api#delete-pits|Opensearch - Delete PITs} - * @memberOf API-PIT - * - * @param {Object} params - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/opensearch/point-in-time-api#sample-response-2|Delete all PITs Response} - */ -function deleteAllPitsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'DELETE'; - path = '/' + '_search' + '/' + 'point_in_time' + '/' + '_all'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = deleteAllPitsApi; diff --git a/api/api/delete_by_query.js b/api/api/delete_by_query.js deleted file mode 100644 index 17f46adc5..000000000 --- a/api/api/delete_by_query.js +++ /dev/null @@ -1,192 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'analyzer', - 'analyze_wildcard', - 'default_operator', - 'df', - 'from', - 'ignore_unavailable', - 'allow_no_indices', - 'conflicts', - 'expand_wildcards', - 'lenient', - 'preference', - 'q', - 'routing', - 'scroll', - 'search_type', - 'search_timeout', - 'size', - 'max_docs', - 'sort', - '_source', - '_source_excludes', - '_source_exclude', - '_source_includes', - '_source_include', - 'terminate_after', - 'stats', - 'version', - 'request_cache', - 'refresh', - 'timeout', - 'wait_for_active_shards', - 'scroll_size', - 'wait_for_completion', - 'requests_per_second', - 'slices', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - analyzeWildcard: 'analyze_wildcard', - defaultOperator: 'default_operator', - ignoreUnavailable: 'ignore_unavailable', - allowNoIndices: 'allow_no_indices', - expandWildcards: 'expand_wildcards', - searchType: 'search_type', - searchTimeout: 'search_timeout', - maxDocs: 'max_docs', - _sourceExcludes: '_source_excludes', - _sourceExclude: '_source_exclude', - _sourceIncludes: '_source_includes', - _sourceInclude: '_source_include', - terminateAfter: 'terminate_after', - requestCache: 'request_cache', - waitForActiveShards: 'wait_for_active_shards', - scrollSize: 'scroll_size', - waitForCompletion: 'wait_for_completion', - requestsPerSecond: 'requests_per_second', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Deletes documents matching the provided query. - *
See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/delete-by-query/ OpenSearch - Delete by query} - * - * @memberOf API-Document - * - * @param {Object} params - * @param {string} params.index - A comma-separated list of index names to search; use '_all' or empty string to perform the operation on all indices - * @param {Object} params.body - The search definition using the Query DSL - * @param {string} [params.analyzer] - The analyzer to use for the query string - * @param {boolean} [params.analyze_wildcard=false] - Specify whether wildcard and prefix queries should be analyzed - * @param {string} [params.default_operator=OR] - The default operator for query string query (options: AND, OR) - * @param {string} [params.df] - The field to use as default where no field prefix is given in the query string - * @param {number} [params.from=0] - Starting offset - * @param {boolean} [params.ignore_unavailable=false] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices=true] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes '_all' string or when no indices have been specified) - * @param {string} [params.conflicts] - What to do when the delete-by-query hits version conflicts? (options: abort, proceed) - * @param {string} [params.expand_wildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * @param {boolean} [params.lenient=false] - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - * @param {string} [params.preference] - Specify the node or shard the operation should be performed on (default: random) - * @param {string} [params.q] - Query in the Lucene query string syntax - * @param {string} [params.routing] - A comma-separated list of specific routing values - * @param {string} [params.scroll] - Specify how long a consistent view of the index should be maintained for scrolled search - * @param {string} [params.search_type] - Search operation type (options: query_then_fetch, dfs_query_then_fetch) - * @param {string} [params.search_timeout] - Explicit timeout for each search request. Defaults to no timeout. - * @param {number} [params.size] - Deprecated, please use 'max_docs' instead - * @param {number} [params.max_docs] - Maximum number of documents to process (default: all documents) - * @param {string} [params.sort] - A comma-separated list of : pairs - * @param {string} [params._source] - True or false to return the _source field or not, or a list of fields to return - * @param {string} [params._source_excludes] - A list of fields to exclude from the returned _source field - * @param {string} [params._source_includes] - A list of fields to extract and return from the _source field - * @param {number} [params.terminate_after] - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. - * @param {string} [params.stats] - Specific 'tag' of the request for logging and statistical purposes - * @param {boolean} [params.version] - Specify whether to return document version as part of a hit - * @param {boolean} [params.request_cache] - Specify if request cache should be used for this request or not, defaults to index level setting - * @param {boolean} [params.refresh=false] - Should the effected indexes be refreshed? - * @param {string} [params.timeout=1m] - time each individual bulk request should wait for shards that are unavailable. - * @param {string} [params.wait_for_active_shards=1] - Sets the number of shard copies that must be active before proceeding with the delete-by-query operation. 1 means the primary shard only. Set to 'all' for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) - * @param {number} [params.scroll_size=1000] - Size on the scroll request powering the delete-by-query - * @param {boolean} [params.wait_for_completion] - Should the request should block until the delete-by-query is complete. - * @param {number} [params.requests_per_second=-1] - The throttle for this request in sub-requests per second. -1 means no throttle. - * @param {string} [params.slices=1] - The number of slices this task should be divided into. 1 means the task isn't sliced into subtasks. Can be set to 'auto'. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/delete-by-query/#response Delete by query Response} - */ -function deleteByQueryApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - // check required url components - if (params.type != null && params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: index'); - return handleError(err, callback); - } - - let { method, body, index, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null) { - if (method == null) method = 'POST'; - path = - '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_delete_by_query'; - } else { - if (method == null) method = 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_delete_by_query'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = deleteByQueryApi; diff --git a/api/api/delete_by_query_rethrottle.js b/api/api/delete_by_query_rethrottle.js deleted file mode 100644 index 654f8b526..000000000 --- a/api/api/delete_by_query_rethrottle.js +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'requests_per_second', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - requestsPerSecond: 'requests_per_second', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Changes the number of requests per second for a particular Delete By Query operation. - * - * @memberOf API-Document - * - * @param {Object} params - * @param {string} params.task_id - The task id to rethrottle - * @param {number} params.requests_per_second - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -function deleteByQueryRethrottleApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.task_id == null && params.taskId == null) { - const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId'); - return handleError(err, callback); - } - if (params.requests_per_second == null && params.requestsPerSecond == null) { - const err = new this[kConfigurationError]( - 'Missing required parameter: requests_per_second or requestsPerSecond' - ); - return handleError(err, callback); - } - - let { method, body, taskId, task_id, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'POST'; - path = - '/' + '_delete_by_query' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = deleteByQueryRethrottleApi; diff --git a/api/api/delete_pit.js b/api/api/delete_pit.js deleted file mode 100644 index 52e3e8ff1..000000000 --- a/api/api/delete_pit.js +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path']; -const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }; - -/** - * Deletes one or several PITs. PITs are automatically deleted when the keep_alive time period elapses. However, to deallocate resources, you can delete a PIT using the Delete PIT API. - *
See Also: {@link https://opensearch.org/docs/latest/opensearch/point-in-time-api#delete-pits|Opensearch - Delete PITs} - * @memberOf API-PIT - * - * @param {Object} params - * @param {Object} params.body - * @param {string[]} params.body.pit_id - The PIT IDs of the PITs to be deleted. - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/opensearch/point-in-time-api#sample-response-2|Delete PIT Response} - */ -function deletePitApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params['body'] == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'DELETE'; - path = '/' + '_search' + '/' + 'point_in_time'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = deletePitApi; diff --git a/api/api/delete_script.js b/api/api/delete_script.js deleted file mode 100644 index ac0c89314..000000000 --- a/api/api/delete_script.js +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'timeout', - 'cluster_manager_timeout', - 'master_timeout', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - clusterManagerTimeout: 'cluster_manager_timeout', - masterTimeout: 'master_timeout', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Delete a stored script. - * @memberOf API-Script - * - * @param {Object} params - * @param {string} params.id - Stored script or search template name - * @param {string} [params.timeout=30s] - Explicit operation timeout - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -function deleteScriptApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - - let { method, body, id, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'DELETE'; - path = '/' + '_scripts' + '/' + encodeURIComponent(id); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = deleteScriptApi; diff --git a/api/api/exists.js b/api/api/exists.js deleted file mode 100644 index 224ad591f..000000000 --- a/api/api/exists.js +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'stored_fields', - 'preference', - 'realtime', - 'refresh', - 'routing', - '_source', - '_source_excludes', - '_source_exclude', - '_source_includes', - '_source_include', - 'version', - 'version_type', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - storedFields: 'stored_fields', - _sourceExcludes: '_source_excludes', - _sourceExclude: '_source_exclude', - _sourceIncludes: '_source_includes', - _sourceInclude: '_source_include', - versionType: 'version_type', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Check whether a document exists - *
See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/get-documents/ OpenSearch - Get Document} - * - * @memberOf API-Document - * - * @param {Object} params - * @param {string} params.index - Name of the index. - * @param {string} params.id - Document ID. - * @param {string} [params.preference] - Specifies a preference of which shard to retrieve results from. Available options are '_local', which tells the operation to retrieve results from a locally allocated shard replica, and a custom string value assigned to a specific shard replica. By default, OpenSearch executes get document operations on random shards. - * @param {boolean} [params.realtime=true] - Specifies whether the operation should run in realtime. If false, the operation waits for the index to refresh to analyze the source to retrieve data, which makes the operation near-realtime. - * @param {boolean} [params.refresh=false] - If true, OpenSearch refreshes shards to make the get operation available to search results. Valid options are 'true', 'false', and 'wait_for', which tells OpenSearch to wait for a refresh before executing the operation. - * @param {string} [params.routing] - A value used to route the operation to a specific shard. - * @param {boolean} [params.stored_fields=false] - Whether the get operation should retrieve fields stored in the index. - * @param {string} [params._source=true] - Whether to include the '_source' field in the response body. - * @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude in the query response. - * @param {string} [params._source_includes] - A comma-separated list of source fields to include in the query response. - * @param {number} [params.version] - The document’s version number. - * @param {number} [params.version_type] - Specific version type (options: 'external' and 'external_gte') - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/get-documents/#response Get Response} - */ -function existsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - - let { method, body, id, index, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null && id != null) { - if (method == null) method = 'HEAD'; - path = - '/' + - encodeURIComponent(index) + - '/' + - encodeURIComponent(type) + - '/' + - encodeURIComponent(id); - } else { - if (method == null) method = 'HEAD'; - path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id); - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = existsApi; diff --git a/api/api/exists_source.js b/api/api/exists_source.js deleted file mode 100644 index 41999e7be..000000000 --- a/api/api/exists_source.js +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -/** - * Check whether a document source exists - *
See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/get-documents/ OpenSearch - Get Document} - * - * @memberOf API-Document - * - * @param {Object} params - * @param {string} params.index - Name of the index. - * @param {string} params.id - Document ID. - * @param {string} [params.preference] - Specifies a preference of which shard to retrieve results from. Available options are '_local', which tells the operation to retrieve results from a locally allocated shard replica, and a custom string value assigned to a specific shard replica. By default, OpenSearch executes get document operations on random shards. - * @param {boolean} [params.realtime=true] - Specifies whether the operation should run in realtime. If false, the operation waits for the index to refresh to analyze the source to retrieve data, which makes the operation near-realtime. - * @param {boolean} [params.refresh=false] - If true, OpenSearch refreshes shards to make the get operation available to search results. Valid options are 'true', 'false', and 'wait_for', which tells OpenSearch to wait for a refresh before executing the operation. - * @param {string} [params.routing] - A value used to route the operation to a specific shard. - * @param {boolean} [params.stored_fields=false] - Whether the get operation should retrieve fields stored in the index. - * @param {string} [params._source=true] - Whether to include the '_source' field in the response body. - * @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude in the query response. - * @param {string} [params._source_includes] - A comma-separated list of source fields to include in the query response. - * @param {number} [params.version] - The document’s version number. - * @param {number} [params.version_type] - Specific version type (options: 'external' and 'external_gte') - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/get-documents/#response Get Response} - */ -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'preference', - 'realtime', - 'refresh', - 'routing', - '_source', - '_source_excludes', - '_source_exclude', - '_source_includes', - '_source_include', - 'version', - 'version_type', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - _sourceExcludes: '_source_excludes', - _sourceExclude: '_source_exclude', - _sourceIncludes: '_source_includes', - _sourceInclude: '_source_include', - versionType: 'version_type', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -function existsSourceApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - - // check required url components - if (params.id != null && (params.type == null || params.index == null)) { - const err = new this[kConfigurationError]('Missing required parameter of the url: type, index'); - return handleError(err, callback); - } else if (params.type != null && params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: index'); - return handleError(err, callback); - } - - let { method, body, id, index, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null && id != null) { - if (method == null) method = 'HEAD'; - path = - '/' + - encodeURIComponent(index) + - '/' + - encodeURIComponent(type) + - '/' + - encodeURIComponent(id) + - '/' + - '_source'; - } else { - if (method == null) method = 'HEAD'; - path = '/' + encodeURIComponent(index) + '/' + '_source' + '/' + encodeURIComponent(id); - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = existsSourceApi; diff --git a/api/api/explain.js b/api/api/explain.js deleted file mode 100644 index 656b8fb41..000000000 --- a/api/api/explain.js +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'analyze_wildcard', - 'analyzer', - 'default_operator', - 'df', - 'stored_fields', - 'lenient', - 'preference', - 'q', - 'routing', - '_source', - '_source_excludes', - '_source_exclude', - '_source_includes', - '_source_include', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - analyzeWildcard: 'analyze_wildcard', - defaultOperator: 'default_operator', - storedFields: 'stored_fields', - _sourceExcludes: '_source_excludes', - _sourceExclude: '_source_exclude', - _sourceIncludes: '_source_includes', - _sourceInclude: '_source_include', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Returns information about why a specific matches (or doesn't match) a query. - *
See also: {@link https://opensearch.org/docs/latest/api-reference/explain/ OpenSearch - Explain} - * @memberOf API-Search - * - * @param {Object} params - * @param {string} [params.id] - The document ID - * @param {string} [params.index] - The name of the index - * @param {Object} [params.body] - The query definition using the Query DSL - * @param {string} [params.analyzer] - The analyzer to use for the query string - * @param {boolean} [params.analyze_wildcard=false] - Specify whether wildcard and prefix queries should be analyzed - * @param {string} [params.default_operator=OR] - The default operator for query string query (options: AND, OR) - * @param {string} [params.df] - The default field for query string query (default: _all) - * @param {string} [params.stored_fields] - A comma-separated list of stored fields to return in the response - * @param {boolean} [params.lenient] - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - * @param {string} [params.preference] - Specify the node or shard the operation should be performed on (default: random) - * @param {string} [params.q] - Query in the Lucene query string syntax - * @param {string} [params.routing] - Specific routing value - * @param {string} [params._source=true] - Whether to include the '_source' field in the response body. - * @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude in the query response. - * @param {string} [params._source_includes] - A comma-separated list of source fields to include in the query response. - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -function explainApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - - let { method, body, id, index, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null && id != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = - '/' + - encodeURIComponent(index) + - '/' + - encodeURIComponent(type) + - '/' + - encodeURIComponent(id) + - '/' + - '_explain'; - } else { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_explain' + '/' + encodeURIComponent(id); - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = explainApi; diff --git a/api/api/features.js b/api/api/features.js deleted file mode 100644 index 155ea1eb3..000000000 --- a/api/api/features.js +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -/** @namespace API-Features */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'cluster_manager_timeout', - 'master_timeout', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - clusterManagerTimeout: 'cluster_manager_timeout', - masterTimeout: 'master_timeout', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -function FeaturesApi(transport, ConfigurationError) { - this.transport = transport; - this[kConfigurationError] = ConfigurationError; -} - -/** - * Gets a list of features - * @memberOf API-Features - * - * @param {Object} params - * @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -FeaturesApi.prototype.getFeatures = function featuresGetFeaturesApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_features'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Resets the internal state of features, usually by deleting system indices - * @memberOf API-Features - * - * @param {Object} params - (Unused) - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -FeaturesApi.prototype.resetFeatures = function featuresResetFeaturesApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'POST'; - path = '/' + '_features' + '/' + '_reset'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -Object.defineProperties(FeaturesApi.prototype, { - get_features: { - get() { - return this.getFeatures; - }, - }, - reset_features: { - get() { - return this.resetFeatures; - }, - }, -}); - -module.exports = FeaturesApi; diff --git a/api/api/field_caps.js b/api/api/field_caps.js deleted file mode 100644 index 5c6ff0137..000000000 --- a/api/api/field_caps.js +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'fields', - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards', - 'include_unmapped', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - ignoreUnavailable: 'ignore_unavailable', - allowNoIndices: 'allow_no_indices', - expandWildcards: 'expand_wildcards', - includeUnmapped: 'include_unmapped', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Returns the information about the capabilities of fields among multiple indices. - *
See also: {@link https://opensearch.org/docs/latest/opensearch/supported-field-types/alias/#using-aliases-in-field-capabilities-api-operations OpenSearch - Alias} - * @memberOf API-Index - * - * @param {Object} params - * @param {string} [params.index] - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - * @param {string} [params.fields] - A comma-separated list of field names - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * @param {boolean} [params.include_unmapped] - Indicates whether unmapped fields should be included in the response. - * @param {Object} [params.body] - An index filter specified with the Query DSL - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -function fieldCapsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_field_caps'; - } else { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + '_field_caps'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = fieldCapsApi; diff --git a/api/api/get.js b/api/api/get.js deleted file mode 100644 index 20ff721f6..000000000 --- a/api/api/get.js +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'stored_fields', - 'preference', - 'realtime', - 'refresh', - 'routing', - '_source', - '_source_excludes', - '_source_exclude', - '_source_includes', - '_source_include', - 'version', - 'version_type', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - storedFields: 'stored_fields', - _sourceExcludes: '_source_excludes', - _sourceExclude: '_source_exclude', - _sourceIncludes: '_source_includes', - _sourceInclude: '_source_include', - versionType: 'version_type', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Retrieve a document - *
See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/get-documents/ OpenSearch - Get Document} - * - * @memberOf API-Document - * - * @param {Object} params - * @param {string} params.index - Name of the index. - * @param {string} params.id - Document ID. - * @param {string} [params.preference] - Specifies a preference of which shard to retrieve results from. Available options are '_local', which tells the operation to retrieve results from a locally allocated shard replica, and a custom string value assigned to a specific shard replica. By default, OpenSearch executes get document operations on random shards. - * @param {boolean} [params.realtime=true] - Specifies whether the operation should run in realtime. If false, the operation waits for the index to refresh to analyze the source to retrieve data, which makes the operation near-realtime. - * @param {boolean} [params.refresh=false] - If true, OpenSearch refreshes shards to make the get operation available to search results. Valid options are 'true', 'false', and 'wait_for', which tells OpenSearch to wait for a refresh before executing the operation. - * @param {string} [params.routing] - A value used to route the operation to a specific shard. - * @param {boolean} [params.stored_fields=false] - Whether the get operation should retrieve fields stored in the index. - * @param {string} [params._source=true] - Whether to include the '_source' field in the response body. - * @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude in the query response. - * @param {string} [params._source_includes] - A comma-separated list of source fields to include in the query response. - * @param {number} [params.version] - The document’s version number. - * @param {number} [params.version_type] - Specific version type (options: 'external' and 'external_gte') - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/get-documents/#response Get Response} - */ -function getApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - - let { method, body, id, index, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null && id != null) { - if (method == null) method = 'GET'; - path = - '/' + - encodeURIComponent(index) + - '/' + - encodeURIComponent(type) + - '/' + - encodeURIComponent(id); - } else { - if (method == null) method = 'GET'; - path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id); - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = getApi; diff --git a/api/api/get_all_pits.js b/api/api/get_all_pits.js deleted file mode 100644 index 4819c4c4a..000000000 --- a/api/api/get_all_pits.js +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path']; -const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }; - -/** - * Returns all PITs in the OpenSearch cluster. - *
See Also: {@link https://opensearch.org/docs/latest/opensearch/point-in-time-api#list-all-pits|Opensearch - List all PITs} - * @memberOf API-PIT - * - * @param {Object} params - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/opensearch/point-in-time-api#sample-response-1|List all PITs Response} - */ -function getAllPitsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_search' + '/' + 'point_in_time' + '/' + '_all'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = getAllPitsApi; diff --git a/api/api/get_script.js b/api/api/get_script.js deleted file mode 100644 index 454fa3564..000000000 --- a/api/api/get_script.js +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -/** @namespace API-Script */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'cluster_manager_timeout', - 'master_timeout', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - clusterManagerTimeout: 'cluster_manager_timeout', - masterTimeout: 'master_timeout', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Retrieves a stored script. - *
See also: {@link https://opensearch.org/docs/latest/api-reference/script-apis/get-stored-script/ OpenSearch - Get Stored Script} - * @memberOf API-Script - * - * @param {Object} params - * @param {string} params.id - Stored script or search template name - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -function getScriptApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - - let { method, body, id, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_scripts' + '/' + encodeURIComponent(id); - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = getScriptApi; diff --git a/api/api/get_script_context.js b/api/api/get_script_context.js deleted file mode 100644 index 6958aca28..000000000 --- a/api/api/get_script_context.js +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path']; -const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }; - -/** - * Retrieves all contexts for stored scripts. - *
See also: {@link https://opensearch.org/docs/latest/api-reference/script-apis/get-script-contexts/ OpenSearch - Get stored script contexts} - * @memberOf API-Script - * - * @param {Object} params - (Unused) - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -function getScriptContextApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_script_context'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = getScriptContextApi; diff --git a/api/api/get_script_languages.js b/api/api/get_script_languages.js deleted file mode 100644 index 923c6dd52..000000000 --- a/api/api/get_script_languages.js +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path']; -const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }; - -/** - * The get script language API operation retrieves all supported script languages and their contexts. - *
See also: {@link https://opensearch.org/docs/latest/api-reference/script-apis/get-script-language/ OpenSearch - Get script language} - * @memberOf API-Script - * - * @param {Object} params - (Unused) - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -function getScriptLanguagesApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_script_language'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = getScriptLanguagesApi; diff --git a/api/api/get_source.js b/api/api/get_source.js deleted file mode 100644 index 2084b1f26..000000000 --- a/api/api/get_source.js +++ /dev/null @@ -1,133 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'preference', - 'realtime', - 'refresh', - 'routing', - '_source', - '_source_excludes', - '_source_exclude', - '_source_includes', - '_source_include', - 'version', - 'version_type', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - _sourceExcludes: '_source_excludes', - _sourceExclude: '_source_exclude', - _sourceIncludes: '_source_includes', - _sourceInclude: '_source_include', - versionType: 'version_type', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Retrieve the source of a document - *
See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/get-documents/ OpenSearch - Get Document} - * - * @memberOf API-Document - * - * @param {Object} params - * @param {string} params.index - Name of the index. - * @param {string} params.id - Document ID. - * @param {string} [params.preference] - Specifies a preference of which shard to retrieve results from. Available options are '_local', which tells the operation to retrieve results from a locally allocated shard replica, and a custom string value assigned to a specific shard replica. By default, OpenSearch executes get document operations on random shards. - * @param {boolean} [params.realtime=true] - Specifies whether the operation should run in realtime. If false, the operation waits for the index to refresh to analyze the source to retrieve data, which makes the operation near-realtime. - * @param {boolean} [params.refresh=false] - If true, OpenSearch refreshes shards to make the get operation available to search results. Valid options are 'true', 'false', and 'wait_for', which tells OpenSearch to wait for a refresh before executing the operation. - * @param {string} [params.routing] - A value used to route the operation to a specific shard. - * @param {boolean} [params.stored_fields=false] - Whether the get operation should retrieve fields stored in the index. - * @param {string} [params._source=true] - Whether to include the '_source' field in the response body. - * @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude in the query response. - * @param {string} [params._source_includes] - A comma-separated list of source fields to include in the query response. - * @param {number} [params.version] - The document’s version number. - * @param {number} [params.version_type] - Specific version type (options: 'external' and 'external_gte') - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/get-documents/#response Get Response} - */ -function getSourceApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - - let { method, body, id, index, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null && id != null) { - if (method == null) method = 'GET'; - path = - '/' + - encodeURIComponent(index) + - '/' + - encodeURIComponent(type) + - '/' + - encodeURIComponent(id) + - '/' + - '_source'; - } else { - if (method == null) method = 'GET'; - path = '/' + encodeURIComponent(index) + '/' + '_source' + '/' + encodeURIComponent(id); - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = getSourceApi; diff --git a/api/api/http.js b/api/api/http.js deleted file mode 100644 index 4ed677761..000000000 --- a/api/api/http.js +++ /dev/null @@ -1,213 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -'use strict'; - -/** @namespace API-HTTP */ - -const { normalizeArguments, kConfigurationError } = require('../utils'); - -function HttpApi(transport, ConfigurationError) { - this.transport = transport; - this[kConfigurationError] = ConfigurationError; -} - -HttpApi.prototype.request = function (method, params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - if (Array.isArray(params.body)) { - const { path, querystring, headers, body } = params; - params = { path, querystring, headers, bulkBody: body }; - } - options = options || {}; - options.headers = params.headers || options.headers; - return this.transport.request({ ...params, method }, options, callback); -}; - -/** - * Make a customized CONNECT request. - * - * @memberOf API-HTTP - * - * @param {Object} params - * @param {Object} params.path - The URL of the request - * @param {Object} [params.querystring] - The querystring parameters - * @param {Object} [params.headers] - The request headers - * @param {Object} [params.body] - The request body - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -HttpApi.prototype.connect = function (params, options, callback) { - return this.request('CONNECT', params, options, callback); -}; - -/** - * Make a customized DELETE request. - * - * @memberOf API-HTTP - * - * @param {Object} params - * @param {Object} params.path - The URL of the request - * @param {Object} [params.querystring] - The querystring parameters - * @param {Object} [params.headers] - The request headers - * @param {Object} [params.body] - The request body - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -HttpApi.prototype.delete = function (params, options, callback) { - return this.request('DELETE', params, options, callback); -}; - -/** - * Make a customized GET request. - * - * @memberOf API-HTTP - * - * @param {Object} params - * @param {Object} params.path - The URL of the request - * @param {Object} [params.querystring] - The querystring parameters - * @param {Object} [params.headers] - The request headers - * @param {Object} [params.body] - The request body - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -HttpApi.prototype.get = function (params, options, callback) { - return this.request('GET', params, options, callback); -}; - -/** - * Make a customized HEAD request. - * - * @memberOf API-HTTP - * - * @param {Object} params - * @param {Object} params.path - The URL of the request - * @param {Object} [params.querystring] - The querystring parameters - * @param {Object} [params.headers] - The request headers - * @param {Object} [params.body] - The request body - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -HttpApi.prototype.head = function (params, options, callback) { - return this.request('HEAD', params, options, callback); -}; - -/** - * Make a customized OPTIONS request. - * - * @memberOf API-HTTP - * - * @param {Object} params - * @param {Object} params.path - The URL of the request - * @param {Object} [params.querystring] - The querystring parameters - * @param {Object} [params.headers] - The request headers - * @param {Object} [params.body] - The request body - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -HttpApi.prototype.options = function (params, options, callback) { - return this.request('OPTIONS', params, options, callback); -}; - -/** - * Make a customized PATCH request. - * - * @memberOf API-HTTP - * - * @param {Object} params - * @param {Object} params.path - The URL of the request - * @param {Object} [params.querystring] - The querystring parameters - * @param {Object} [params.headers] - The request headers - * @param {Object} [params.body] - The request body - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -HttpApi.prototype.patch = function (params, options, callback) { - return this.request('PATCH', params, options, callback); -}; - -/** - * Make a customized POST request. - * - * @memberOf API-HTTP - * - * @param {Object} params - * @param {Object} params.path - The URL of the request - * @param {Object} [params.querystring] - The querystring parameters - * @param {Object} [params.headers] - The request headers - * @param {Object} [params.body] - The request body - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -HttpApi.prototype.post = function (params, options, callback) { - return this.request('POST', params, options, callback); -}; - -/** - * Make a customized PUT request. - * - * @memberOf API-HTTP - * - * @param {Object} params - * @param {Object} params.path - The URL of the request - * @param {Object} [params.querystring] - The querystring parameters - * @param {Object} [params.headers] - The request headers - * @param {Object} [params.body] - The request body - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -HttpApi.prototype.put = function (params, options, callback) { - return this.request('PUT', params, options, callback); -}; - -/** - * Make a customized TRACE request. - * - * @memberOf API-HTTP - * - * @param {Object} params - * @param {Object} params.path - The URL of the request - * @param {Object} [params.querystring] - The querystring parameters - * @param {Object} [params.headers] - The request headers - * @param {Object} [params.body] - The request body - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -HttpApi.prototype.trace = function (params, options, callback) { - return this.request('TRACE', params, options, callback); -}; - -module.exports = HttpApi; diff --git a/api/api/index.js b/api/api/index.js deleted file mode 100644 index 03bcab2b7..000000000 --- a/api/api/index.js +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -/** @namespace API-Document */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'wait_for_active_shards', - 'op_type', - 'refresh', - 'routing', - 'timeout', - 'version', - 'version_type', - 'if_seq_no', - 'if_primary_term', - 'pipeline', - 'require_alias', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - waitForActiveShards: 'wait_for_active_shards', - opType: 'op_type', - versionType: 'version_type', - ifSeqNo: 'if_seq_no', - ifPrimaryTerm: 'if_primary_term', - requireAlias: 'require_alias', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Adds a document to an index. - *
See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/index-document/ OpenSearch - Index Document} - * - * @memberOf API-Document - * - * @param {Object} params - * @param {string} params.index - Name of the index. - * @param {Object} params.body - The content of the document. - * @param {string} [params.id] - A unique identifier to attach to the document. - * @param {number} [params.if_seq_no] - Only perform the index operation if the document has the specified sequence number. - * @param {number} [params.if_primary_term] - Only perform the index operation if the document has the specified primary term. - * @param {string} [params.pipeline] - Route the index operation to a certain pipeline. - * @param {string} [params.routing] - value used to assign the index operation to a specific shard. - * @param {string} [params.refresh=false] - If true, OpenSearch refreshes shards to make the operation visible to searching. Valid options are 'true', 'false', and 'wait_for', which tells OpenSearch to wait for a refresh before executing the operation. - * @param {string} [params.timeout=1m] - How long to wait for a response from the cluster. - * @param {number} [params.version] - The document’s version number. - * @param {number} [params.version_type] - Specific version type (options: 'external' and 'external_gte') - * @param {string} [params.wait_for_active_shards] - The number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the operation to succeed. - * @param {boolean} [params.require_alias=false] - Specifies whether the target index must be an index alias. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/index-document/#response Index Response} - */ - -function indexApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, id, index, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null && id != null) { - if (method == null) method = 'PUT'; - path = - '/' + - encodeURIComponent(index) + - '/' + - encodeURIComponent(type) + - '/' + - encodeURIComponent(id); - } else if (index != null && id != null) { - if (method == null) method = 'PUT'; - path = '/' + encodeURIComponent(index) + '/' + '_doc' + '/' + encodeURIComponent(id); - } else if (index != null && type != null) { - if (method == null) method = 'POST'; - path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type); - } else { - if (method == null) method = 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_doc'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = indexApi; diff --git a/api/api/indices.js b/api/api/indices.js deleted file mode 100644 index eff491db9..000000000 --- a/api/api/indices.js +++ /dev/null @@ -1,2541 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/** @namespace API-Index */ - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'cluster_manager_timeout', - 'timeout', - 'master_timeout', - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', - 'index', - 'fielddata', - 'fields', - 'query', - 'request', - 'wait_for_active_shards', - 'run_expensive_tasks', - 'flush', - 'local', - 'flat_settings', - 'include_defaults', - 'force', - 'wait_if_ongoing', - 'max_num_segments', - 'only_expunge_deletes', - 'create', - 'cause', - 'write_index_only', - 'preserve_existing', - 'order', - 'detailed', - 'active_only', - 'dry_run', - 'verbose', - 'status', - 'copy_settings', - 'completion_fields', - 'fielddata_fields', - 'groups', - 'level', - 'types', - 'include_segment_file_sizes', - 'include_unloaded_segments', - 'forbid_closed_indices', - 'wait_for_completion', - 'only_ancient_segments', - 'explain', - 'q', - 'analyzer', - 'analyze_wildcard', - 'default_operator', - 'df', - 'lenient', - 'rewrite', - 'all_shards', -]; -const snakeCase = { - clusterManagerTimeout: 'cluster_manager_timeout', - masterTimeout: 'master_timeout', - ignoreUnavailable: 'ignore_unavailable', - allowNoIndices: 'allow_no_indices', - expandWildcards: 'expand_wildcards', - errorTrace: 'error_trace', - filterPath: 'filter_path', - waitForActiveShards: 'wait_for_active_shards', - runExpensiveTasks: 'run_expensive_tasks', - flatSettings: 'flat_settings', - includeDefaults: 'include_defaults', - waitIfOngoing: 'wait_if_ongoing', - maxNumSegments: 'max_num_segments', - onlyExpungeDeletes: 'only_expunge_deletes', - writeIndexOnly: 'write_index_only', - preserveExisting: 'preserve_existing', - activeOnly: 'active_only', - dryRun: 'dry_run', - copySettings: 'copy_settings', - completionFields: 'completion_fields', - fielddataFields: 'fielddata_fields', - includeSegmentFileSizes: 'include_segment_file_sizes', - includeUnloadedSegments: 'include_unloaded_segments', - forbidClosedIndices: 'forbid_closed_indices', - waitForCompletion: 'wait_for_completion', - onlyAncientSegments: 'only_ancient_segments', - analyzeWildcard: 'analyze_wildcard', - defaultOperator: 'default_operator', - allShards: 'all_shards', -}; - -function IndicesApi(transport, ConfigurationError) { - this.transport = transport; - this[kConfigurationError] = ConfigurationError; -} - -/** - * Adds a block to an index. - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.index - A comma separated list of indices to add a block to - * @param {string} params.block - The block to add (one of read, write, read_only or metadata) - * @param {string} [params.timeout] - Explicit operation timeout - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.addBlock = function indicesAddBlockApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - if (params.block == null) { - const err = new this[kConfigurationError]('Missing required parameter: block'); - return handleError(err, callback); - } - - // check required url components - if (params.block != null && params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: index'); - return handleError(err, callback); - } - - let { method, body, index, block, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'PUT'; - path = '/' + encodeURIComponent(index) + '/' + '_block' + '/' + encodeURIComponent(block); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Performs the analysis process on a text and return the tokens breakdown of the text. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/analyze-apis/perform-text-analysis/ OpenSearch - Perform text analysis} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} [params.index] - The name of the index to scope the operation - * @param {Object} [params.body] - Define analyzer/tokenizer parameters and the text on which the analysis should be performed - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.analyze = function indicesAnalyzeApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_analyze'; - } else { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + '_analyze'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Clears all or specific caches for one or more indices. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/clear-index-cache/ OpenSearch - Clear index or data stream cache} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} [params.index] - A comma-separated list of index name to limit the operation - * @param {boolean} [params.fielddata] - Clear field data - * @param {string} [params.fields] - A comma-separated list of fields to clear when using the `fielddata` parameter (default: all) - * @param {boolean} [params.query] - Clear query caches - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * @param {boolean} [params.request] - Clear request cache - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.clearCache = function indicesClearCacheApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null) { - if (method == null) method = 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_cache' + '/' + 'clear'; - } else { - if (method == null) method = 'POST'; - path = '/' + '_cache' + '/' + 'clear'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Clones an index - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/clone/ OpenSearch - Clone Index} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.index - The name of the source index to clone - * @param {string} params.target - The name of the target index to clone into - * @param {string} [params.timeout] - Explicit operation timeout - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * @param {string} [params.wait_for_active_shards] - Set the number of active shards to wait for on the cloned index before the operation returns. - * @param {Object} [params.body] - The configuration for the target index (`settings` and `aliases`) - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.clone = function indicesCloneApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - if (params.target == null) { - const err = new this[kConfigurationError]('Missing required parameter: target'); - return handleError(err, callback); - } - - // check required url components - if (params.target != null && params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: index'); - return handleError(err, callback); - } - - let { method, body, index, target, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'PUT'; - path = '/' + encodeURIComponent(index) + '/' + '_clone' + '/' + encodeURIComponent(target); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Closes an index. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/close-index/ OpenSearch - Close Index} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.index - A comma separated list of indices to close - * @param {string} [params.timeout] - Explicit operation timeout - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * @param {string} [params.wait_for_active_shards] - Sets the number of active shards to wait for before the operation returns. Set to `index-setting` to wait according to the index setting `index.write.wait_for_active_shards`, or `all` to wait for all shards, or an integer. Defaults to `0`. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.close = function indicesCloseApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_close'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Creates an index - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/create-index/ OpenSearch - Create Index} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.index - Name of the index. - * @param {Object} [params.body] - The configuration for the index (`settings` and `mappings`) - * @param {string} [params.wait_for_active_shards] - Set the number of active shards to wait for before the operation returns. - * @param {string} [params.timeout] - Explicit operation timeout - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.create = function indicesCreateApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'PUT'; - path = '/' + encodeURIComponent(index); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Deletes an index. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/delete-index/ OpenSearch - Delete Index} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.index - A comma-separated list of indices to delete; use `_all` or `*` string to delete all indices - * @param {string} [params.timeout] - Explicit operation timeout - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * @param {boolean} [params.ignore_unavailable=false] - Ignore unavailable indexes - * @param {boolean} [params.allow_no_indices=false] - Ignore if a wildcard expression resolves to no concrete indices - * @param {string} [params.expand_wildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (options: open, closed, hidden, none, all) - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.delete = function indicesDeleteApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'DELETE'; - path = '/' + encodeURIComponent(index); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Deletes an alias. - *
See Also: {@link https://opensearch.org/docs/latest/opensearch/index-alias/ OpenSearch - Index Aliases} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.index - A comma-separated list of index names (supports wildcards); use `_all` for all indices - * @param {string} params.name - A comma-separated list of aliases to delete (supports wildcards); use `_all` to delete all aliases for the specified indices. - * @param {string} [params.timeout] - Explicit timestamp for the document - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.deleteAlias = function indicesDeleteAliasApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - if (params.name == null) { - const err = new this[kConfigurationError]('Missing required parameter: name'); - return handleError(err, callback); - } - - // check required url components - if (params.name != null && params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: index'); - return handleError(err, callback); - } - - let { method, body, index, name, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && name != null) { - if (method == null) method = 'DELETE'; - path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name); - } else { - if (method == null) method = 'DELETE'; - path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name); - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Deletes an index template. - *
See Also: {@link https://opensearch.org/docs/latest/opensearch/index-templates/ OpenSearch - Index Templates} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.name - The name of the template - * @param {string} [params.timeout] - Explicit operation timeout - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.deleteIndexTemplate = function indicesDeleteIndexTemplateApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.name == null) { - const err = new this[kConfigurationError]('Missing required parameter: name'); - return handleError(err, callback); - } - - let { method, body, name, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'DELETE'; - path = '/' + '_index_template' + '/' + encodeURIComponent(name); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Deletes an index template (Deprecated. Use IndicesApi#deleteIndexTemplate instead) - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.name - The name of the template - * @param {string} [params.timeout] - Explicit operation timeout - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.deleteTemplate = function indicesDeleteTemplateApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.name == null) { - const err = new this[kConfigurationError]('Missing required parameter: name'); - return handleError(err, callback); - } - - let { method, body, name, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'DELETE'; - path = '/' + '_template' + '/' + encodeURIComponent(name); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -// TODO: Remove. Experimental feature added in ES 7.15 -IndicesApi.prototype.diskUsage = function indicesDiskUsageApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_disk_usage'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns information about whether a particular index exists. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/exists/ OpenSearch - Index Exists} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.index - A comma-separated list of index names - * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster_manager node - * @param {boolean} [params.ignore_unavailable=false] - Ignore unavailable indexes - * @param {boolean} [params.allow_no_indices=false] - Ignore if a wildcard expression resolves to no concrete indices - * @param {string} [params.expand_wildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (options: open, closed, hidden, none, all) - * @param {boolean} [params.flat_settings=false] - Return settings in flat format - * @param {boolean} [params.include_defaults] - Whether to return all default setting for each of the indices. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.exists = function indicesExistsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'HEAD'; - path = '/' + encodeURIComponent(index); - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns information about whether a particular alias exists. - *
See Also: {@link https://opensearch.org/docs/latest/opensearch/index-alias/ OpenSearch - Index Aliases} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.name - A comma-separated list of alias names to return - * @param {string} [params.index] - A comma-separated list of index names to filter aliases - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster_manager node - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.existsAlias = function indicesExistsAliasApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.name == null) { - const err = new this[kConfigurationError]('Missing required parameter: name'); - return handleError(err, callback); - } - - let { method, body, name, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && name != null) { - if (method == null) method = 'HEAD'; - path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name); - } else { - if (method == null) method = 'HEAD'; - path = '/' + '_alias' + '/' + encodeURIComponent(name); - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns information about whether a particular index template exists. - *
See Also: {@link https://opensearch.org/docs/latest/opensearch/index-templates/ OpenSearch - Index Templates} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.name - The name of the template - * @param {boolean} [params.flat_settings=false] - Return settings in flat format - * @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node - * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster_manager node - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.existsIndexTemplate = function indicesExistsIndexTemplateApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.name == null) { - const err = new this[kConfigurationError]('Missing required parameter: name'); - return handleError(err, callback); - } - - let { method, body, name, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'HEAD'; - path = '/' + '_index_template' + '/' + encodeURIComponent(name); - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns information about whether a particular index template exists. (Deprecated. Use IndicesApi#existsIndexTemplate instead) - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.name - The comma separated names of the index templates - * @param {boolean} [params.flat_settings=false] - Return settings in flat format - * @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node - * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster_manager node - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.existsTemplate = function indicesExistsTemplateApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.name == null) { - const err = new this[kConfigurationError]('Missing required parameter: name'); - return handleError(err, callback); - } - - let { method, body, name, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'HEAD'; - path = '/' + '_template' + '/' + encodeURIComponent(name); - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -// TODO: Remove. Experimental feature added in ES 7.15 -IndicesApi.prototype.fieldUsageStats = function indicesFieldUsageStatsApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + encodeURIComponent(index) + '/' + '_field_usage_stats'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Performs the flush operation on one or more indices. - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} [params.index] - A comma-separated list of index names; use `_all` or empty string for all indices - * @param {boolean} [params.force] - Whether a flush should be forced even if it is not necessarily needed ie. if no changes will be committed to the index. This is useful if transaction log IDs should be incremented even if no uncommitted changes are present. (This setting can be considered as internal) - * @param {boolean} [params.wait_if_ongoing=true] - If set to true the flush operation will block until the flush can be executed if another flush operation is already executing. If set to false the flush will be skipped iff if another flush operation is already running. - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.flush = function indicesFlushApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_flush'; - } else { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + '_flush'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Performs the force merge operation on one or more indices. - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} [params.index] - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - * @param {boolean} [params.flush=true] - Specify whether the index should be flushed after performing the operation - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * @param {number} [params.max_num_segments] - The number of segments the index should be merged into (default: dynamic) - * @param {boolean} [params.only_expunge_deletes] - Specify whether the operation should only expunge deleted documents - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.forcemerge = function indicesForcemergeApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null) { - if (method == null) method = 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_forcemerge'; - } else { - if (method == null) method = 'POST'; - path = '/' + '_forcemerge'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns information about one or more indices. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/get-index/ OpenSearch - Get Index} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.index - A comma-separated list of index names - * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster_manager node - * @param {boolean} [params.ignore_unavailable=false] - Ignore unavailable indexes - * @param {boolean} [params.allow_no_indices=false] - Ignore if a wildcard expression resolves to no concrete indices - * @param {string} [params.expand_wildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (options: open, closed, hidden, none, all) - * @param {boolean} [params.flat_settings=false] - Return settings in flat format - * @param {boolean} [params.include_defaults] - Whether to return all default setting for each of the indices. - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.get = function indicesGetApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + encodeURIComponent(index); - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns an alias. - *
See Also: {@link https://opensearch.org/docs/latest/opensearch/index-alias/ OpenSearch - Index Aliases} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} [params.name] - A comma-separated list of alias names to return - * @param {string} [params.index] - A comma-separated list of index names to filter aliases - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster_manager node - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.getAlias = function indicesGetAliasApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, name, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && name != null) { - if (method == null) method = 'GET'; - path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name); - } else if (name != null) { - if (method == null) method = 'GET'; - path = '/' + '_alias' + '/' + encodeURIComponent(name); - } else if (index != null) { - if (method == null) method = 'GET'; - path = '/' + encodeURIComponent(index) + '/' + '_alias'; - } else { - if (method == null) method = 'GET'; - path = '/' + '_alias'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns mapping for one or more fields. - *
See Also: {@link https://opensearch.org/docs/latest/opensearch/mappings/ OpenSearch - Mapping} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.fields - A comma-separated list of fields - * @param {string} [params.index] - A comma-separated list of index names - * @param {boolean} [params.include_defaults] - Whether the default mapping values should be returned as well - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster_manager node - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.getFieldMapping = function indicesGetFieldMappingApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.fields == null) { - const err = new this[kConfigurationError]('Missing required parameter: fields'); - return handleError(err, callback); - } - - let { method, body, fields, index, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null && fields != null) { - if (method == null) method = 'GET'; - path = - '/' + - encodeURIComponent(index) + - '/' + - '_mapping' + - '/' + - encodeURIComponent(type) + - '/' + - 'field' + - '/' + - encodeURIComponent(fields); - } else if (index != null && fields != null) { - if (method == null) method = 'GET'; - path = - '/' + - encodeURIComponent(index) + - '/' + - '_mapping' + - '/' + - 'field' + - '/' + - encodeURIComponent(fields); - } else if (type != null && fields != null) { - if (method == null) method = 'GET'; - path = - '/' + - '_mapping' + - '/' + - encodeURIComponent(type) + - '/' + - 'field' + - '/' + - encodeURIComponent(fields); - } else { - if (method == null) method = 'GET'; - path = '/' + '_mapping' + '/' + 'field' + '/' + encodeURIComponent(fields); - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns an index template. - *
See Also: {@link https://opensearch.org/docs/latest/opensearch/index-templates/ OpenSearch - Index Templates} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} [params.name] - The comma separated names of the index templates - * @param {boolean} [params.flat_setting=false] - Return settings in flat format - * @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node - * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster_manager node - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.getIndexTemplate = function indicesGetIndexTemplateApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, name, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (name != null) { - if (method == null) method = 'GET'; - path = '/' + '_index_template' + '/' + encodeURIComponent(name); - } else { - if (method == null) method = 'GET'; - path = '/' + '_index_template'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns mappings for one or more indices. - *
See Also: {@link https://opensearch.org/docs/latest/opensearch/mappings/ OpenSearch - Mapping} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} [params.index] - A comma-separated list of index names - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster_manager node (Deprecated) - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.getMapping = function indicesGetMappingApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, index, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null) { - if (method == null) method = 'GET'; - path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type); - } else if (index != null) { - if (method == null) method = 'GET'; - path = '/' + encodeURIComponent(index) + '/' + '_mapping'; - } else if (type != null) { - if (method == null) method = 'GET'; - path = '/' + '_mapping' + '/' + encodeURIComponent(type); - } else { - if (method == null) method = 'GET'; - path = '/' + '_mapping'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns settings for one or more indices. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/get-settings/ OpenSearch - Get Settings} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} [params.index] - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - * @param {string} [params.name] - The name of the settings that should be included - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * @param {boolean} [params.flat_settings=false] - Return settings in flat format - * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster_manager node - * @param {boolean} [params.include_defaults] - Whether to return all default setting for each of the indices. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.getSettings = function indicesGetSettingsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, index, name, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && name != null) { - if (method == null) method = 'GET'; - path = '/' + encodeURIComponent(index) + '/' + '_settings' + '/' + encodeURIComponent(name); - } else if (index != null) { - if (method == null) method = 'GET'; - path = '/' + encodeURIComponent(index) + '/' + '_settings'; - } else if (name != null) { - if (method == null) method = 'GET'; - path = '/' + '_settings' + '/' + encodeURIComponent(name); - } else { - if (method == null) method = 'GET'; - path = '/' + '_settings'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns an index template. (Deprecated. Use IndicesApi#getIndexTemplate instead) - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} [params.name] - The comma separated names of the index templates - * @param {boolean} [params.flat_settings=false] - Return settings in flat format - * @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node - * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster_manager node - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.getTemplate = function indicesGetTemplateApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, name, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (name != null) { - if (method == null) method = 'GET'; - path = '/' + '_template' + '/' + encodeURIComponent(name); - } else { - if (method == null) method = 'GET'; - path = '/' + '_template'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns a progress status of current upgrade. - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.getUpgrade = function indicesGetUpgradeApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + encodeURIComponent(index) + '/' + '_upgrade'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * ROpens an index. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/open-index/ OpenSearch - Open Index} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.index - A comma separated list of indices to open - * @param {string} [params.timeout] - Explicit operation timeout - * @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * @param {string} [params.wait_for_active_shards] - Sets the number of active shards to wait for before the operation returns. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.open = function indicesOpenApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_open'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Creates or updates an alias. - *
See Also: {@link https://opensearch.org/docs/latest/opensearch/index-alias/ OpenSearch - Index Aliases} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.index - A comma-separated list of index names the alias should point to (supports wildcards); use `_all` to perform the operation on all indices. - * @param {string} params.name - The name of the alias to be created or updated - * @param {string} [params.timeout] - Explicit timestamp for the document - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * @param {Object} [params.body] - The settings for the alias, such as `routing` or `filter` - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.putAlias = function indicesPutAliasApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - if (params.name == null) { - const err = new this[kConfigurationError]('Missing required parameter: name'); - return handleError(err, callback); - } - - // check required url components - if (params.name != null && params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: index'); - return handleError(err, callback); - } - - let { method, body, index, name, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && name != null) { - if (method == null) method = 'PUT'; - path = '/' + encodeURIComponent(index) + '/' + '_alias' + '/' + encodeURIComponent(name); - } else { - if (method == null) method = 'PUT'; - path = '/' + encodeURIComponent(index) + '/' + '_aliases' + '/' + encodeURIComponent(name); - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Creates or updates an index template. - *
See Also: {@link https://opensearch.org/docs/latest/opensearch/index-templates/ OpenSearch - Index Templates} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.name - The name of the template - * @param {Object} params.body - The template definition - * @param {boolean} [params.create] - Whether the index template should only be added if new or can also replace an existing one - * @param {string} [params.cause] - User defined reason for creating/updating the index template - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.putIndexTemplate = function indicesPutIndexTemplateApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.name == null) { - const err = new this[kConfigurationError]('Missing required parameter: name'); - return handleError(err, callback); - } - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, name, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'PUT'; - path = '/' + '_index_template' + '/' + encodeURIComponent(name); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Updates index mappings. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/put-mapping/ OpenSearch - Create or Update Mapping} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. - * @param {Object} params.body - The mapping definition - * @param {string} [params.timeout] - Explicit operation timeout - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * @param {boolean} [params.write_index_only] - When true, applies mappings only to the write index of an alias or data stream - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.putMapping = function indicesPutMappingApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, index, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null) { - if (method == null) method = 'PUT'; - path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mapping'; - } else if (index != null && type != null) { - if (method == null) method = 'PUT'; - path = '/' + encodeURIComponent(index) + '/' + '_mapping' + '/' + encodeURIComponent(type); - } else if (index != null && type != null) { - if (method == null) method = 'PUT'; - path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mappings'; - } else if (index != null && type != null) { - if (method == null) method = 'PUT'; - path = '/' + encodeURIComponent(index) + '/' + '_mappings' + '/' + encodeURIComponent(type); - } else if (index != null) { - if (method == null) method = 'PUT'; - path = '/' + encodeURIComponent(index) + '/' + '_mapping'; - } else if (type != null) { - if (method == null) method = 'PUT'; - path = '/' + '_mappings' + '/' + encodeURIComponent(type); - } else if (index != null) { - if (method == null) method = 'PUT'; - path = '/' + encodeURIComponent(index) + '/' + '_mappings'; - } else { - if (method == null) method = 'PUT'; - path = '/' + '_mapping' + '/' + encodeURIComponent(type); - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Updates the index settings. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/update-settings/ OpenSearch - Update Settings} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {Object} params.body - The index settings to be updated - * @param {string} [params.index] - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * @param {string} [params.timeout] - Explicit operation timeout - * @param {boolean} [params.preserve_existing=false] - Whether to update existing settings. If set to `true` existing settings on an index remain unchanged - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * @param {boolean} [params.flat_settings=false] - Return settings in flat format - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.putSettings = function indicesPutSettingsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null) { - if (method == null) method = 'PUT'; - path = '/' + encodeURIComponent(index) + '/' + '_settings'; - } else { - if (method == null) method = 'PUT'; - path = '/' + '_settings'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Creates or updates an index template. (Deprecated. Use IndicesApi#putIndexTemplate instead) - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.name - The name of the template - * @param {Object} params.body - The template definition - * @param {number} [params.order] - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers) - * @param {boolean} [params.create] - Whether the index template should only be added if new or can also replace an existing one - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.putTemplate = function indicesPutTemplateApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.name == null) { - const err = new this[kConfigurationError]('Missing required parameter: name'); - return handleError(err, callback); - } - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, name, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'PUT'; - path = '/' + '_template' + '/' + encodeURIComponent(name); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns information about ongoing index shard recoveries. - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} [params.index] - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - * @param {boolean} [params.detailed] - Whether to display detailed information about shard recovery - * @param {boolean} [params.active_only] - Display only those recoveries that are currently on-going - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.recovery = function indicesRecoveryApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null) { - if (method == null) method = 'GET'; - path = '/' + encodeURIComponent(index) + '/' + '_recovery'; - } else { - if (method == null) method = 'GET'; - path = '/' + '_recovery'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Performs the refresh operation in one or more indices. - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} [params.index] - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.refresh = function indicesRefreshApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_refresh'; - } else { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + '_refresh'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns information about any matching indices, aliases, and data streams - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} [params.name] - A comma-separated list of names or wildcard expressions - * @param {string} [params.expand_wildcards=open] - Whether wildcard expressions should get expanded to open or closed indices (options: open, closed, hidden, none, all) - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.resolveIndex = function indicesResolveIndexApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.name == null) { - const err = new this[kConfigurationError]('Missing required parameter: name'); - return handleError(err, callback); - } - - let { method, body, name, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_resolve' + '/' + 'index' + '/' + encodeURIComponent(name); - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Updates an alias to point to a new index when the existing index is considered to be too large or too old. - *
See Also: {@link https://opensearch.org/docs/latest/opensearch/data-streams/#step-5-rollover-a-data-stream OpenSearch - Rollover a data stream} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.alias - The name of the alias to rollover - * @param {string} [params.new_index] - The name of the rollover index - * @param {string} [params.timeout] - Explicit operation timeout - * @param {boolean} [params.dry_run=false] - If set to true the rollover action will only be validated but not actually performed even if a condition matches. - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * @param {string} [params.wait_for_active_shards] - Set the number of active shards to wait for on the newly created rollover index before the operation returns. - * @param {Object} [params.body] - The conditions that needs to be met for executing rollover - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.rollover = function indicesRolloverApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.alias == null) { - const err = new this[kConfigurationError]('Missing required parameter: alias'); - return handleError(err, callback); - } - - // check required url components - if ((params.new_index != null || params.newIndex != null) && params.alias == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: alias'); - return handleError(err, callback); - } - - let { method, body, alias, newIndex, new_index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (alias != null && (new_index || newIndex) != null) { - if (method == null) method = 'POST'; - path = - '/' + - encodeURIComponent(alias) + - '/' + - '_rollover' + - '/' + - encodeURIComponent(new_index || newIndex); - } else { - if (method == null) method = 'POST'; - path = '/' + encodeURIComponent(alias) + '/' + '_rollover'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Provides low-level information about segments in a Lucene index. - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} [params.index] - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * @param {boolean} [params.verbose] - Includes detailed memory usage by Lucene. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.segments = function indicesSegmentsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null) { - if (method == null) method = 'GET'; - path = '/' + encodeURIComponent(index) + '/' + '_segments'; - } else { - if (method == null) method = 'GET'; - path = '/' + '_segments'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Provides store information for shard copies of indices. - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} [params.index] - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - * @param {string} [params.status] - A comma-separated list of statuses used to filter on shards to get store information for (options: green, yellow, red, all) - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.shardStores = function indicesShardStoresApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null) { - if (method == null) method = 'GET'; - path = '/' + encodeURIComponent(index) + '/' + '_shard_stores'; - } else { - if (method == null) method = 'GET'; - path = '/' + '_shard_stores'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Allow to shrink an existing index into a new index with fewer primary shards. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/shrink-index/ OpenSearch - Shrink Index} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.index - The name of the source index to shrink - * @param {string} params.target - The name of the target index to shrink into - * @param {boolean} [params.copy_settings] - whether or not to copy settings from the source index (defaults to false) - * @param {string} [params.timeout] - Explicit operation timeout - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * @param {string} [params.wait_for_active_shards] - Set the number of active shards to wait for on the shrunken index before the operation returns. - * @param {Object} [params.body] - The configuration for the target index (`settings` and `aliases`) - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.shrink = function indicesShrinkApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - if (params.target == null) { - const err = new this[kConfigurationError]('Missing required parameter: target'); - return handleError(err, callback); - } - - // check required url components - if (params.target != null && params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: index'); - return handleError(err, callback); - } - - let { method, body, index, target, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'PUT'; - path = '/' + encodeURIComponent(index) + '/' + '_shrink' + '/' + encodeURIComponent(target); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Simulate matching the given index name against the index templates in the system - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.name - The name of the index (it must be a concrete index name) - * @param {Object} [params.body] - New index template definition, which will be included in the simulation, as if it already exists in the system - * @param {boolean} [params.create] - Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one - * @param {string} [params.cause] - User defined reason for dry-run creating the new template for simulation purposes - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.simulateIndexTemplate = function indicesSimulateIndexTemplateApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.name == null) { - const err = new this[kConfigurationError]('Missing required parameter: name'); - return handleError(err, callback); - } - - let { method, body, name, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'POST'; - path = '/' + '_index_template' + '/' + '_simulate_index' + '/' + encodeURIComponent(name); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Simulate resolving the given template name or body (Deprecated. Use IndicesApi#simulateIndexTemplate instead) - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} [params.name] - The name of the index template - * @param {boolean} [params.create] - Whether the index template we optionally defined in the body should only be dry-run added if new or can also replace an existing one - * @param {string} [params.cause] - User defined reason for dry-run creating the new template for simulation purposes - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * @param {Object} [params.body] - New index template definition to be simulated, if no index template name is specified - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.simulateTemplate = function indicesSimulateTemplateApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, name, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (name != null) { - if (method == null) method = 'POST'; - path = '/' + '_index_template' + '/' + '_simulate' + '/' + encodeURIComponent(name); - } else { - if (method == null) method = 'POST'; - path = '/' + '_index_template' + '/' + '_simulate'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Allows you to split an existing index into a new index with more primary shards. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/split/ OpenSearch - Split Index} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.index - The name of the source index to split - * @param {string} params.target - The name of the target index to split into - * @param {boolean} [params.copy_settings] - whether or not to copy settings from the source index (defaults to false) - * @param {string} [params.timeout] - Explicit operation timeout - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * @param {string} [params.wait_for_active_shards] - Set the number of active shards to wait for on the shrunken index before the operation returns. - * @param {Object} [params.body] - The configuration for the target index (`settings` and `aliases`) - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.split = function indicesSplitApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - if (params.target == null) { - const err = new this[kConfigurationError]('Missing required parameter: target'); - return handleError(err, callback); - } - - // check required url components - if (params.target != null && params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: index'); - return handleError(err, callback); - } - - let { method, body, index, target, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'PUT'; - path = '/' + encodeURIComponent(index) + '/' + '_split' + '/' + encodeURIComponent(target); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Provides statistics on operations happening in an index. - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} [params.metric] - Limit the information returned the specific metrics. (options: _all, completion, docs, fielddata, query_cache, flush, get, indexing, merge, request_cache, refresh, search, segments, store, warmer, suggest) - * @param {string} [params.index] - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - * @param {string} [params.completion_fields] - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) - * @param {string} [params.fielddata_fields] - A comma-separated list of fields for `fielddata` index metric (supports wildcards) - * @param {string} [params.fields] - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) - * @param {string} [params.groups] - A comma-separated list of search groups for `search` index metric - * @param {string} [params.level] - Return stats aggregated at cluster, index or shard level (options: cluster, indices, shards) - * @param {string} [params.types] - A comma-separated list of document types for the `indexing` index metric - * @param {boolean} [params.include_segment_file_sizes] - Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) - * @param {boolean} [params.include_unloaded_segments] - If set to true segment stats will include stats for segments that are not currently loaded into memory - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * @param {boolean} [params.forbid_closed_indices] - If set to false stats will also collected from closed indices if explicitly specified or if expand_wildcards expands to closed indices - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.stats = function indicesStatsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, metric, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && metric != null) { - if (method == null) method = 'GET'; - path = '/' + encodeURIComponent(index) + '/' + '_stats' + '/' + encodeURIComponent(metric); - } else if (metric != null) { - if (method == null) method = 'GET'; - path = '/' + '_stats' + '/' + encodeURIComponent(metric); - } else if (index != null) { - if (method == null) method = 'GET'; - path = '/' + encodeURIComponent(index) + '/' + '_stats'; - } else { - if (method == null) method = 'GET'; - path = '/' + '_stats'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Update an alias. - *
See Also: {@link https://opensearch.org/docs/latest/opensearch/index-alias/ OpenSearch - Index Aliases} - * - * @memberOf API-Index - * - * @param {Object} params - * @param {Object} params.body - The definition of `actions` to perform - * @param {string} [params.timeout] - Request timeout - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.updateAliases = function indicesUpdateAliasesApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'POST'; - path = '/' + '_aliases'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Upgrades to the current version of Lucene. - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} [params.index] - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.wait_for_completion=false] - Specify whether the request should block until the all segments are upgraded - * @param {boolean} [params.only_ancient_segments] - If true, only ancient (an older Lucene major release) segments will be upgraded - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.upgrade = function indicesUpgradeApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_upgrade'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Allows a user to validate a potentially expensive query without executing it. - * - * @memberOf API-Index - * - * @param {Object} params - * @param {string} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices - * @param {boolean} [params.explain] - Return detailed information about the error - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * @param {string} [params.q] - Query in the Lucene query string syntax - * @param {string} [params.analyzer] - The analyzer to use for the query string - * @param {boolean} [params.analyze_wildcard=false] - Specify whether wildcard and prefix queries should be analyzed - * @param {string} [params.default_operator=OR] - The default operator for query string query (options: AND, OR) - * @param {string} [params.df] - The field to use as default where no field prefix is given in the query string - * @param {boolean} [params.lenient] - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - * @param {boolean} [params.rewrite] - Provide a more detailed explanation showing the actual Lucene query that will be executed. - * @param {boolean} [params.all_shards] - Execute validation on all shards instead of one random shard per index - * @param {Object} [params.body] - The query definition specified with the Query DSL - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IndicesApi.prototype.validateQuery = function indicesValidateQueryApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required url components - if (params.type != null && params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: index'); - return handleError(err, callback); - } - - let { method, body, index, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = - '/' + - encodeURIComponent(index) + - '/' + - encodeURIComponent(type) + - '/' + - '_validate' + - '/' + - 'query'; - } else if (index != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_validate' + '/' + 'query'; - } else { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + '_validate' + '/' + 'query'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -Object.defineProperties(IndicesApi.prototype, { - add_block: { - get() { - return this.addBlock; - }, - }, - clear_cache: { - get() { - return this.clearCache; - }, - }, - delete_alias: { - get() { - return this.deleteAlias; - }, - }, - delete_index_template: { - get() { - return this.deleteIndexTemplate; - }, - }, - delete_template: { - get() { - return this.deleteTemplate; - }, - }, - disk_usage: { - get() { - return this.diskUsage; - }, - }, - exists_alias: { - get() { - return this.existsAlias; - }, - }, - exists_index_template: { - get() { - return this.existsIndexTemplate; - }, - }, - exists_template: { - get() { - return this.existsTemplate; - }, - }, - field_usage_stats: { - get() { - return this.fieldUsageStats; - }, - }, - get_alias: { - get() { - return this.getAlias; - }, - }, - get_field_mapping: { - get() { - return this.getFieldMapping; - }, - }, - get_index_template: { - get() { - return this.getIndexTemplate; - }, - }, - get_mapping: { - get() { - return this.getMapping; - }, - }, - get_settings: { - get() { - return this.getSettings; - }, - }, - get_template: { - get() { - return this.getTemplate; - }, - }, - get_upgrade: { - get() { - return this.getUpgrade; - }, - }, - put_alias: { - get() { - return this.putAlias; - }, - }, - put_index_template: { - get() { - return this.putIndexTemplate; - }, - }, - put_mapping: { - get() { - return this.putMapping; - }, - }, - put_settings: { - get() { - return this.putSettings; - }, - }, - put_template: { - get() { - return this.putTemplate; - }, - }, - resolve_index: { - get() { - return this.resolveIndex; - }, - }, - shard_stores: { - get() { - return this.shardStores; - }, - }, - simulate_index_template: { - get() { - return this.simulateIndexTemplate; - }, - }, - simulate_template: { - get() { - return this.simulateTemplate; - }, - }, - update_aliases: { - get() { - return this.updateAliases; - }, - }, - validate_query: { - get() { - return this.validateQuery; - }, - }, -}); - -module.exports = IndicesApi; diff --git a/api/api/info.js b/api/api/info.js deleted file mode 100644 index 1eec14383..000000000 --- a/api/api/info.js +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path']; -const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }; - -/** - * Returns basic information about the cluster. - * - * @memberOf API-Cluster - * - * @param {Object} params - (Unused) - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -function infoApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = infoApi; diff --git a/api/api/ingest.js b/api/api/ingest.js deleted file mode 100644 index 70c303c3b..000000000 --- a/api/api/ingest.js +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -/** @namespace API-Ingest */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'cluster_manager_timeout', - 'master_timeout', - 'timeout', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', - 'summary', - 'verbose', -]; -const snakeCase = { - clusterManagerTimeout: 'cluster_manager_timeout', - masterTimeout: 'master_timeout', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -function IngestApi(transport, ConfigurationError) { - this.transport = transport; - this[kConfigurationError] = ConfigurationError; -} - -/** - * Deletes a pipeline. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/ingest-apis/delete-ingest/ OpenSearch - Delete a pipeline} - * - * @memberOf API-Ingest - * - * @param {Object} params - * @param {string} params.id - Pipeline ID - * @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node - * @param {string} [params.timeout] - Explicit operation timeout - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/ingest-apis/delete-ingest/#response Delete Pipeline Response} - */ -IngestApi.prototype.deletePipeline = function ingestDeletePipelineApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - - let { method, body, id, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'DELETE'; - path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns statistical information about geoip databases - * - * @memberOf API-Ingest - * - * @param {Object} params - (Unused) - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IngestApi.prototype.geoIpStats = function ingestGeoIpStatsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_ingest' + '/' + 'geoip' + '/' + 'stats'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns a pipeline. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/ingest-apis/get-ingest/ OpenSearch - Get pipeline} - * - * @memberOf API-Ingest - * - * @param {Object} params - * @param {string} [params.id] - Comma separated list of pipeline ids. Wildcards supported - * @param {boolean} [params.summary=false] - Return pipelines without their definitions - * @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/ingest-apis/get-ingest/#response Get Pipeline Response} - */ -IngestApi.prototype.getPipeline = function ingestGetPipelineApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, id, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (id != null) { - if (method == null) method = 'GET'; - path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id); - } else { - if (method == null) method = 'GET'; - path = '/' + '_ingest' + '/' + 'pipeline'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns a list of the built-in patterns. - * - * @memberOf API-Ingest - * - * @param {Object} params - (Unused) - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IngestApi.prototype.processorGrok = function ingestProcessorGrokApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_ingest' + '/' + 'processor' + '/' + 'grok'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Creates or updates a pipeline. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/ OpenSearch - Create/Update pipeline} - * - * @memberOf API-Ingest - * - * @param {Object} params - * @param {string} params.id - Pipeline ID - * @param {Object} params.body - Ingest definition - * @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node - * @param {string} [params.timeout] - Explicit operation timeout - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/#response Create/Update Pipeline Response} - */ -IngestApi.prototype.putPipeline = function ingestPutPipelineApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, id, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'PUT'; - path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Allows to simulate a pipeline with example documents. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/ingest-apis/simulate-ingest/ OpenSearch - Simulate Pipeline} - * - * @memberOf API-Ingest - * - * @param {Object} params - * @param {string} [params.id] - Pipeline ID - * @param {boolean} [params.verbose] - Verbose mode. Display data output for each processor in executed pipeline - * @param {Object} params.body - Simulate definition - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -IngestApi.prototype.simulate = function ingestSimulateApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, id, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (id != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + '_ingest' + '/' + 'pipeline' + '/' + encodeURIComponent(id) + '/' + '_simulate'; - } else { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + '_ingest' + '/' + 'pipeline' + '/' + '_simulate'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -Object.defineProperties(IngestApi.prototype, { - delete_pipeline: { - get() { - return this.deletePipeline; - }, - }, - geo_ip_stats: { - get() { - return this.geoIpStats; - }, - }, - get_pipeline: { - get() { - return this.getPipeline; - }, - }, - processor_grok: { - get() { - return this.processorGrok; - }, - }, - put_pipeline: { - get() { - return this.putPipeline; - }, - }, -}); - -module.exports = IngestApi; diff --git a/api/api/mget.js b/api/api/mget.js deleted file mode 100644 index 344ffd655..000000000 --- a/api/api/mget.js +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'stored_fields', - 'preference', - 'realtime', - 'refresh', - 'routing', - '_source', - '_source_excludes', - '_source_exclude', - '_source_includes', - '_source_include', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - storedFields: 'stored_fields', - _sourceExcludes: '_source_excludes', - _sourceExclude: '_source_exclude', - _sourceIncludes: '_source_includes', - _sourceInclude: '_source_include', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Retrieve multiple documents - *
See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/multi-get/ OpenSearch - Multi-get Document} - * - * @memberOf API-Document - * - * @param {Object} params - * @param {string} params.index - Name of the index. - * @param {string} params.id - Document ID. - * @param {string} params.body - {@link https://opensearch.org/docs/2.4/api-reference/document-apis/multi-get/#request-body Multi-get Request Body} - * @param {string} [params.preference] - Specifies a preference of which shard to retrieve results from. Available options are '_local', which tells the operation to retrieve results from a locally allocated shard replica, and a custom string value assigned to a specific shard replica. By default, OpenSearch executes get document operations on random shards. - * @param {boolean} [params.realtime=true] - Specifies whether the operation should run in realtime. If false, the operation waits for the index to refresh to analyze the source to retrieve data, which makes the operation near-realtime. - * @param {boolean} [params.refresh=false] - If true, OpenSearch refreshes shards to make the get operation available to search results. Valid options are 'true', 'false', and 'wait_for', which tells OpenSearch to wait for a refresh before executing the operation. - * @param {string} [params.routing] - A value used to route the operation to a specific shard. - * @param {boolean} [params.stored_fields=false] - Whether the get operation should retrieve fields stored in the index. - * @param {string} [params._source=true] - Whether to include the '_source' field in the response body. - * @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude in the query response. - * @param {string} [params._source_includes] - A comma-separated list of source fields to include in the query response. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/multi-get/#response Multi-get Response} - */ -function mgetApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - // check required url components - if (params.type != null && params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: index'); - return handleError(err, callback); - } - - let { method, body, index, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mget'; - } else if (index != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_mget'; - } else { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + '_mget'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = mgetApi; diff --git a/api/api/msearch.js b/api/api/msearch.js deleted file mode 100644 index 06e3e4c75..000000000 --- a/api/api/msearch.js +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'search_type', - 'max_concurrent_searches', - 'typed_keys', - 'pre_filter_shard_size', - 'max_concurrent_shard_requests', - 'rest_total_hits_as_int', - 'ccs_minimize_roundtrips', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - searchType: 'search_type', - maxConcurrentSearches: 'max_concurrent_searches', - typedKeys: 'typed_keys', - preFilterShardSize: 'pre_filter_shard_size', - maxConcurrentShardRequests: 'max_concurrent_shard_requests', - restTotalHitsAsInt: 'rest_total_hits_as_int', - ccsMinimizeRoundtrips: 'ccs_minimize_roundtrips', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Allows to execute several search operations in one request. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/multi-search/ OpenSearch - Multi-Search} - * - * @memberOf API-Search - * - * @param {Object} params - * @param {string} params.index - A comma-separated list of index names to use as default - * @param {Object} params.body - The request definitions (metadata-search request definition pairs), separated by newlines - * @param {string} [params.search_type] - Search operation type (options: query_then_fetch, dfs_query_then_fetch) - * @param {number} [params.max_concurrent_searches] - Controls the maximum number of concurrent searches the multi search api will execute - * @param {boolean} [params.typed_keys] - Specify whether aggregation and suggester names should be prefixed by their respective types in the response - * @param {number} [params.pre_filter_shard_size] - A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. - * @param {number} [params.max_concurrent_shard_requests] - The number of concurrent shard requests each sub search executes concurrently per node. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests - * @param {boolean} [params.rest_total_hits_as_int] - Indicates whether hits.total should be rendered as an integer or an object in the rest search response - * @param {boolean} [params.ccs_minimize_roundtrips] - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/multi-search/#response Multi-search Response} - */ -function msearchApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - // check required url components - if (params.type != null && params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: index'); - return handleError(err, callback); - } - - let { method, body, index, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_msearch'; - } else if (index != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_msearch'; - } else { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + '_msearch'; - } - - // build request object - const request = { - method, - path, - bulkBody: body, - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = msearchApi; diff --git a/api/api/msearch_template.js b/api/api/msearch_template.js deleted file mode 100644 index 89313e660..000000000 --- a/api/api/msearch_template.js +++ /dev/null @@ -1,126 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'search_type', - 'typed_keys', - 'max_concurrent_searches', - 'rest_total_hits_as_int', - 'ccs_minimize_roundtrips', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - searchType: 'search_type', - typedKeys: 'typed_keys', - maxConcurrentSearches: 'max_concurrent_searches', - restTotalHitsAsInt: 'rest_total_hits_as_int', - ccsMinimizeRoundtrips: 'ccs_minimize_roundtrips', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Allows to execute several search template operations in one request. - * - * @memberOf API-Search - * - * @param {Object} params - * @param {string} params.index - A comma-separated list of index names to use as default - * @param {Object} params.body - The request definitions (metadata-search request definition pairs), separated by newlines - * @param {string} [params.search_type] - Search operation type (options: query_then_fetch, dfs_query_then_fetch) - * @param {boolean} [params.typed_keys] - Specify whether aggregation and suggester names should be prefixed by their respective types in the response - * @param {number} [params.max_concurrent_searches] - Controls the maximum number of concurrent searches the multi search api will execute - * @param {boolean} [params.rest_total_hits_as_int] - Indicates whether hits.total should be rendered as an integer or an object in the rest search response - * @param {boolean} [params.ccs_minimize_roundtrips] - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -function msearchTemplateApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - // check required url components - if (params.type != null && params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: index'); - return handleError(err, callback); - } - - let { method, body, index, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = - '/' + - encodeURIComponent(index) + - '/' + - encodeURIComponent(type) + - '/' + - '_msearch' + - '/' + - 'template'; - } else if (index != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_msearch' + '/' + 'template'; - } else { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + '_msearch' + '/' + 'template'; - } - - // build request object - const request = { - method, - path, - bulkBody: body, - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = msearchTemplateApi; diff --git a/api/api/mtermvectors.js b/api/api/mtermvectors.js deleted file mode 100644 index 134b0c424..000000000 --- a/api/api/mtermvectors.js +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'ids', - 'term_statistics', - 'field_statistics', - 'fields', - 'offsets', - 'positions', - 'payloads', - 'preference', - 'routing', - 'realtime', - 'version', - 'version_type', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - termStatistics: 'term_statistics', - fieldStatistics: 'field_statistics', - versionType: 'version_type', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -function mtermvectorsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required url components - if (params.type != null && params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: index'); - return handleError(err, callback); - } - - let { method, body, index, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_mtermvectors'; - } else if (index != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_mtermvectors'; - } else { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + '_mtermvectors'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = mtermvectorsApi; diff --git a/api/api/nodes.js b/api/api/nodes.js deleted file mode 100644 index c6cb83a9c..000000000 --- a/api/api/nodes.js +++ /dev/null @@ -1,496 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -/** @namespace API-Nodes */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', - 'interval', - 'snapshots', - 'threads', - 'ignore_idle_threads', - 'type', - 'timeout', - 'flat_settings', - 'completion_fields', - 'fielddata_fields', - 'fields', - 'groups', - 'level', - 'types', - 'include_segment_file_sizes', - 'include_unloaded_segments', -]; -const snakeCase = { - errorTrace: 'error_trace', - filterPath: 'filter_path', - ignoreIdleThreads: 'ignore_idle_threads', - flatSettings: 'flat_settings', - completionFields: 'completion_fields', - fielddataFields: 'fielddata_fields', - includeSegmentFileSizes: 'include_segment_file_sizes', - includeUnloadedSegments: 'include_unloaded_segments', -}; - -function NodesApi(transport, ConfigurationError) { - this.transport = transport; - this[kConfigurationError] = ConfigurationError; -} - -NodesApi.prototype.clearMeteringArchive = function nodesClearMeteringArchiveApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.node_id == null && params.nodeId == null) { - const err = new this[kConfigurationError]('Missing required parameter: node_id or nodeId'); - return handleError(err, callback); - } - if (params.max_archive_version == null && params.maxArchiveVersion == null) { - const err = new this[kConfigurationError]( - 'Missing required parameter: max_archive_version or maxArchiveVersion' - ); - return handleError(err, callback); - } - - // check required url components - if ( - (params.max_archive_version != null || params.maxArchiveVersion != null) && - params.node_id == null && - params.nodeId == null - ) { - const err = new this[kConfigurationError]('Missing required parameter of the url: node_id'); - return handleError(err, callback); - } - - let { method, body, nodeId, node_id, maxArchiveVersion, max_archive_version, ...querystring } = - params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'DELETE'; - path = - '/' + - '_nodes' + - '/' + - encodeURIComponent(node_id || nodeId) + - '/' + - '_repositories_metering' + - '/' + - encodeURIComponent(max_archive_version || maxArchiveVersion); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -NodesApi.prototype.getMeteringInfo = function nodesGetMeteringInfoApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.node_id == null && params.nodeId == null) { - const err = new this[kConfigurationError]('Missing required parameter: node_id or nodeId'); - return handleError(err, callback); - } - - let { method, body, nodeId, node_id, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = - '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + '_repositories_metering'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns information about hot threads on each node in the cluster. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-hot-threads/ OpenSearch - Nodes Hot Threads} - * @memberOf API-Nodes - * - * @param {Object} params - * @param {string} [params.node_id] - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - * @param {string} [params.interval] - The interval for the second sampling of threads - * @param {number} [params.snapshots] - Number of samples of thread stacktrace (default: 10) - * @param {number} [params.threads] - Specify the number of threads to provide information for (default: 3) - * @param {boolean} [params.ignore_idle_threads] - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue (default: true) - * @param {string} [params.type] - The type to sample (default: cpu) (options: cpu, wait, block) - * @param {string} [params.timeout] - Explicit operation timeout - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -NodesApi.prototype.hotThreads = function nodesHotThreadsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, nodeId, node_id, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if ((node_id || nodeId) != null) { - if (method == null) method = 'GET'; - path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hot_threads'; - } else if ((node_id || nodeId) != null) { - if (method == null) method = 'GET'; - path = - '/' + - '_cluster' + - '/' + - 'nodes' + - '/' + - encodeURIComponent(node_id || nodeId) + - '/' + - 'hotthreads'; - } else if ((node_id || nodeId) != null) { - if (method == null) method = 'GET'; - path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'hotthreads'; - } else if ((node_id || nodeId) != null) { - if (method == null) method = 'GET'; - path = - '/' + - '_cluster' + - '/' + - 'nodes' + - '/' + - encodeURIComponent(node_id || nodeId) + - '/' + - 'hot_threads'; - } else { - if (method == null) method = 'GET'; - path = '/' + '_nodes' + '/' + 'hot_threads'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns information about hot threads on each node in the cluster. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-info/ OpenSearch - Nodes Info} - * @memberOf API-Nodes - * - * @param {Object} params - * @param {string} [params.node_id] - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - * @param {string} [params.metric] - A comma-separated list of metrics you wish returned. Leave empty to return all. (options: settings, os, process, jvm, thread_pool, transport, http, plugins, ingest) - * @param {boolean} [params.flat_settings] - Return settings in flat format (default: false) - * @param {string} [params.timeout] - Explicit operation timeout - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -NodesApi.prototype.info = function nodesInfoApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, nodeId, node_id, metric, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if ((node_id || nodeId) != null && metric != null) { - if (method == null) method = 'GET'; - path = - '/' + - '_nodes' + - '/' + - encodeURIComponent(node_id || nodeId) + - '/' + - encodeURIComponent(metric); - } else if ((node_id || nodeId) != null) { - if (method == null) method = 'GET'; - path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId); - } else if (metric != null) { - if (method == null) method = 'GET'; - path = '/' + '_nodes' + '/' + encodeURIComponent(metric); - } else { - if (method == null) method = 'GET'; - path = '/' + '_nodes'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Reloads secure settings. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-reload-secure/ OpenSearch - Nodes Reload Security Settings} - * @memberOf API-Nodes - * - * @param {Object} params - * @param {string} [params.node_id] - A comma-separated list of node IDs to span the reload/reinit call. Should stay empty because reloading usually involves all cluster nodes. - * @param {string} [params.timeout] - Explicit operation timeout - * @param {Object} [params.body] - An object containing the password for the opensearch keystore - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -NodesApi.prototype.reloadSecureSettings = function nodesReloadSecureSettingsApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, nodeId, node_id, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if ((node_id || nodeId) != null) { - if (method == null) method = 'POST'; - path = - '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'reload_secure_settings'; - } else { - if (method == null) method = 'POST'; - path = '/' + '_nodes' + '/' + 'reload_secure_settings'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns statistical information about nodes in the cluster. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-stats/ OpenSearch - Nodes Stats} - * @memberOf API-Nodes - * - * @param {Object} params - * @param {string} [params.node_id] - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - * @param {string} [params.metric] - Limit the information returned to the specified metrics (options: _all, breaker, fs, http, indices, jvm, os, process, thread_pool, transport, discovery, indexing_pressure) - * @param {string} [params.index_metric] - Limit the information returned for `indices` metric to the specific index metrics. Isn't used if `indices` (or `all`) metric isn't specified. (options: _all, completion, docs, fielddata, query_cache, flush, get, indexing, merge, request_cache, refresh, search, segments, store, warmer, suggest) - * @param {string} [params.completion_fields] - A comma-separated list of fields for `fielddata` and `suggest` index metric (supports wildcards) - * @param {string} [params.fielddata_fields] - A comma-separated list of fields for `fielddata` index metric (supports wildcards) - * @param {string} [params.fields] - A comma-separated list of fields for `fielddata` and `completion` index metric (supports wildcards) - * @param {boolean} [params.groups] - A comma-separated list of search groups for `search` index metric - * @param {string} [params.level] - Return indices stats aggregated at index, node or shard level (options: indices, node, shards) - * @param {string} [params.types] - A comma-separated list of document types for the `indexing` index metric - * @param {string} [params.timeout] - Explicit operation timeout - * @param {boolean} [params.include_segment_file_sizes] - Whether to report the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested) - * @param {boolean} [params.include_unloaded_segments] - If set to true segment stats will include stats for segments that are not currently loaded into memory - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -NodesApi.prototype.stats = function nodesStatsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, nodeId, node_id, metric, indexMetric, index_metric, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if ((node_id || nodeId) != null && metric != null && (index_metric || indexMetric) != null) { - if (method == null) method = 'GET'; - path = - '/' + - '_nodes' + - '/' + - encodeURIComponent(node_id || nodeId) + - '/' + - 'stats' + - '/' + - encodeURIComponent(metric) + - '/' + - encodeURIComponent(index_metric || indexMetric); - } else if ((node_id || nodeId) != null && metric != null) { - if (method == null) method = 'GET'; - path = - '/' + - '_nodes' + - '/' + - encodeURIComponent(node_id || nodeId) + - '/' + - 'stats' + - '/' + - encodeURIComponent(metric); - } else if (metric != null && (index_metric || indexMetric) != null) { - if (method == null) method = 'GET'; - path = - '/' + - '_nodes' + - '/' + - 'stats' + - '/' + - encodeURIComponent(metric) + - '/' + - encodeURIComponent(index_metric || indexMetric); - } else if ((node_id || nodeId) != null) { - if (method == null) method = 'GET'; - path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'stats'; - } else if (metric != null) { - if (method == null) method = 'GET'; - path = '/' + '_nodes' + '/' + 'stats' + '/' + encodeURIComponent(metric); - } else { - if (method == null) method = 'GET'; - path = '/' + '_nodes' + '/' + 'stats'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns low-level information about REST actions usage on nodes. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-usage/ OpenSearch - Nodes Usage} - * @memberOf API-Nodes - * - * @param {Object} params - * @param {string} [params.node_id] - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - * @param {string} [params.metric] - Limit the information returned to the specified metrics (options: _all, rest_actions) - * @param {string} [params.timeout] - Explicit operation timeout - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -NodesApi.prototype.usage = function nodesUsageApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, nodeId, node_id, metric, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if ((node_id || nodeId) != null && metric != null) { - if (method == null) method = 'GET'; - path = - '/' + - '_nodes' + - '/' + - encodeURIComponent(node_id || nodeId) + - '/' + - 'usage' + - '/' + - encodeURIComponent(metric); - } else if ((node_id || nodeId) != null) { - if (method == null) method = 'GET'; - path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'usage'; - } else if (metric != null) { - if (method == null) method = 'GET'; - path = '/' + '_nodes' + '/' + 'usage' + '/' + encodeURIComponent(metric); - } else { - if (method == null) method = 'GET'; - path = '/' + '_nodes' + '/' + 'usage'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -Object.defineProperties(NodesApi.prototype, { - clear_metering_archive: { - get() { - return this.clearMeteringArchive; - }, - }, - get_metering_info: { - get() { - return this.getMeteringInfo; - }, - }, - hot_threads: { - get() { - return this.hotThreads; - }, - }, - reload_secure_settings: { - get() { - return this.reloadSecureSettings; - }, - }, -}); - -module.exports = NodesApi; diff --git a/api/api/ping.js b/api/api/ping.js deleted file mode 100644 index 0c617f26c..000000000 --- a/api/api/ping.js +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path']; -const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }; - -/** - * Returns whether the cluster is running. - * - * @memberOf API-Cluster - * - * @param {Object} params - (Unused) - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -function pingApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'HEAD'; - path = '/'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = pingApi; diff --git a/api/api/put_script.js b/api/api/put_script.js deleted file mode 100644 index e2c8453fe..000000000 --- a/api/api/put_script.js +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'cluster_manager_timeout', - 'timeout', - 'master_timeout', - 'context', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - clusterManagerTimeout: 'cluster_manager_timeout', - masterTimeout: 'master_timeout', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Creates or updates a script. - *
See also: {@link https://opensearch.org/docs/latest/api-reference/script-apis/create-stored-script/ OpenSearch - Create or update stored script} - * @memberOf API-Script - * - * @param {Object} params - * @param {string} params.id - Stored script or search template name - * @param {string} params.body - The script - * @param {string} [params.context] - Context in which the script or search template is to run. To prevent errors, the API immediately compiles the script or template in this context. - * @param {string} [params.timeout=30s] - Explicit operation timeout - * @param {string} [params.cluster_manager_timeout] - Specify timeout for connection to cluster_manager - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -function putScriptApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - // check required url components - if (params.context != null && params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: id'); - return handleError(err, callback); - } - - let { method, body, id, context, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (id != null && context != null) { - if (method == null) method = 'PUT'; - path = '/' + '_scripts' + '/' + encodeURIComponent(id) + '/' + encodeURIComponent(context); - } else { - if (method == null) method = 'PUT'; - path = '/' + '_scripts' + '/' + encodeURIComponent(id); - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = putScriptApi; diff --git a/api/api/rank_eval.js b/api/api/rank_eval.js deleted file mode 100644 index 0648fcce9..000000000 --- a/api/api/rank_eval.js +++ /dev/null @@ -1,107 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards', - 'search_type', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - ignoreUnavailable: 'ignore_unavailable', - allowNoIndices: 'allow_no_indices', - expandWildcards: 'expand_wildcards', - searchType: 'search_type', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Allows to evaluate the quality of ranked search results over a set of typical search queries - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/rank-eval/ OpenSearch - Ranking evaluation} - * - * @memberOf API-Search - * - * @param {Object} params - * @param {string} [params.index] - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices - * @param {Object} params.body - The ranking evaluation search definition, including search requests, document ratings and ranking metric definition - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * @param {string} [params.search_type] - Search operation type (options: query_then_fetch, dfs_query_then_fetch) - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/rank-eval/#sample-response Ranking Evaluation Response} - */ -function rankEvalApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_rank_eval'; - } else { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + '_rank_eval'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = rankEvalApi; diff --git a/api/api/reindex.js b/api/api/reindex.js deleted file mode 100644 index ffbc66de5..000000000 --- a/api/api/reindex.js +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'refresh', - 'timeout', - 'wait_for_active_shards', - 'wait_for_completion', - 'requests_per_second', - 'scroll', - 'slices', - 'max_docs', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - waitForActiveShards: 'wait_for_active_shards', - waitForCompletion: 'wait_for_completion', - requestsPerSecond: 'requests_per_second', - maxDocs: 'max_docs', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Copy all or a subset of your data from a source index into a destination index. - *
See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/reindex/ OpenSearch - Reindex Document} - * - * @memberOf API-Document - * - * @param {Object} params - * @param {Object} params.body The search definition using the Query DSL and the prototype for the index request. - * @param {boolean} [params.refresh=false] Should the affected indexes be refreshed? - * @param {string} [params.timeout=30s] Time each individual bulk request should wait for shards that are unavailable. - * @param {string} [params.wait_for_active_shards] Sets the number of shard copies that must be active before proceeding with the reindex operation. Defaults to 1, meaning the primary shard only. Set to `all` for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) - * @param {boolean} [params.wait_for_completion=false] Should the request should block until the reindex is complete. - * @param {number} [params.requests_per_second=-1] The throttle to set on this request in sub-requests per second. -1 means no throttle. - * @param {string} [params.scroll=5m] Control how long to keep the search context alive - * @param {number|string} [params.slices=1] The number of slices this task should be divided into. 1 means the task isn't sliced into subtasks. Can be set to `auto`. - * @param {number} [params.max_docs] Maximum number of documents to process (default: all documents) - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/reindex/#response Reindex Document Response} - */ -function reindexApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'POST'; - path = '/' + '_reindex'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = reindexApi; diff --git a/api/api/reindex_rethrottle.js b/api/api/reindex_rethrottle.js deleted file mode 100644 index dfab5d02c..000000000 --- a/api/api/reindex_rethrottle.js +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'requests_per_second', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - requestsPerSecond: 'requests_per_second', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Changes the number of requests per second for a particular Reindex operation. - * - * @memberOf API-Document - * - * @param {Object} params - * @param {string} params.task_id - The task id to rethrottle - * @param {number} params.requests_per_second - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -function reindexRethrottleApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.task_id == null && params.taskId == null) { - const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId'); - return handleError(err, callback); - } - if (params.requests_per_second == null && params.requestsPerSecond == null) { - const err = new this[kConfigurationError]( - 'Missing required parameter: requests_per_second or requestsPerSecond' - ); - return handleError(err, callback); - } - - let { method, body, taskId, task_id, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'POST'; - path = '/' + '_reindex' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = reindexRethrottleApi; diff --git a/api/api/render_search_template.js b/api/api/render_search_template.js deleted file mode 100644 index 6353ef760..000000000 --- a/api/api/render_search_template.js +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path']; -const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }; - -/** - * Allows to use the Mustache language to pre-render a search definition. - * - * @memberOf API-Search - * - * @param {Object} params - * @param {string} [params.id] - The id of the stored search template - * @param {Object} [params.body] - The search definition template and its params - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -function renderSearchTemplateApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, id, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (id != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + '_render' + '/' + 'template' + '/' + encodeURIComponent(id); - } else { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + '_render' + '/' + 'template'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = renderSearchTemplateApi; diff --git a/api/api/rollups.js b/api/api/rollups.js deleted file mode 100644 index b18660c8a..000000000 --- a/api/api/rollups.js +++ /dev/null @@ -1,249 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -/* - * This file was generated from OpenSearch API Spec. Do not edit it - * manually. If you want to make changes, either update the spec or - * the API generator. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { - handleError, - encodePathParam, - normalizeArguments, - kConfigurationError, -} = require('../utils'); - -/** @namespace API-Rollups */ - -function RollupsApi(transport, ConfigurationError) { - this.transport = transport; - this[kConfigurationError] = ConfigurationError; -} -/** - * Delete index rollup. - *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#delete-an-index-rollup-job - rollups.delete} - * - * @memberOf API-Rollups - * - * @param {object} params - * @param {string} params.id - Rollup to access - * - * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -RollupsApi.prototype.delete = function (params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - - let { method, body, id, ...querystring } = params; - id = encodePathParam(id); - - let path = ['_plugins', '_rollup', 'jobs', id].filter((c) => c != null).join('/'); - method = 'DELETE'; - body = body || ''; - - return this.transport.request({ method, path, querystring, body }, options, callback); -}; - -/** - * Get an index rollup. - *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#get-an-index-rollup-job - rollups.get} - * - * @memberOf API-Rollups - * - * @param {object} params - * @param {string} params.id - Rollup to access - * - * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -RollupsApi.prototype.get = function (params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - - let { method, body, id, ...querystring } = params; - id = encodePathParam(id); - - let path = ['_plugins', '_rollup', 'jobs', id].filter((c) => c != null).join('/'); - method = 'GET'; - body = body || ''; - - return this.transport.request({ method, path, querystring, body }, options, callback); -}; - -/** - * Create or update index rollup. - *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#create-or-update-an-index-rollup-job - rollups.put} - * - * @memberOf API-Rollups - * - * @param {object} params - * @param {number} [params.if_seq_no] - Only perform the operation if the document has this sequence number. - * @param {number} [params.if_primary_term] - Only perform the operation if the document has this primary term. - * @param {string} params.id - Rollup to access - * @param {object} [params.body] - * - * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -RollupsApi.prototype.put = function (params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - - let { method, body, id, ...querystring } = params; - id = encodePathParam(id); - - let path = ['_plugins', '_rollup', 'jobs', id].filter((c) => c != null).join('/'); - method = 'PUT'; - body = body || ''; - - return this.transport.request({ method, path, querystring, body }, options, callback); -}; - -/** - * Get a rollup's current status. - *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#explain-an-index-rollup-job - rollups.explain} - * - * @memberOf API-Rollups - * - * @param {object} params - * @param {string} params.id - Rollup to access - * - * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -RollupsApi.prototype.explain = function (params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - - let { method, body, id, ...querystring } = params; - id = encodePathParam(id); - - let path = ['_plugins', '_rollup', 'jobs', id, '_explain'].filter((c) => c != null).join('/'); - method = 'GET'; - body = body || ''; - - return this.transport.request({ method, path, querystring, body }, options, callback); -}; - -/** - * Start rollup. - *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#start-or-stop-an-index-rollup-job - rollups.start} - * - * @memberOf API-Rollups - * - * @param {object} params - * @param {string} params.id - Rollup to access - * - * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -RollupsApi.prototype.start = function (params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - - let { method, body, id, ...querystring } = params; - id = encodePathParam(id); - - let path = ['_plugins', '_rollup', 'jobs', id, '_start'].filter((c) => c != null).join('/'); - method = 'POST'; - body = body || ''; - - return this.transport.request({ method, path, querystring, body }, options, callback); -}; - -/** - * Stop rollup. - *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#start-or-stop-an-index-rollup-job - rollups.stop} - * - * @memberOf API-Rollups - * - * @param {object} params - * @param {string} params.id - Rollup to access - * - * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -RollupsApi.prototype.stop = function (params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - - let { method, body, id, ...querystring } = params; - id = encodePathParam(id); - - let path = ['_plugins', '_rollup', 'jobs', id, '_stop'].filter((c) => c != null).join('/'); - method = 'POST'; - body = body || ''; - - return this.transport.request({ method, path, querystring, body }, options, callback); -}; - -module.exports = RollupsApi; diff --git a/api/api/scripts_painless_execute.js b/api/api/scripts_painless_execute.js deleted file mode 100644 index 9ec8a894b..000000000 --- a/api/api/scripts_painless_execute.js +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path']; -const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }; - -/** - * Execute Painless script - *
See also: {@link https://opensearch.org/docs/latest/api-reference/script-apis/exec-script/ OpenSearch - Execute Painless script} - * @memberOf API-Script - * - * @param {Object} params - * @param {string} params.body - The painless script - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -function scriptsPainlessExecuteApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + '_scripts' + '/' + 'painless' + '/' + '_execute'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = scriptsPainlessExecuteApi; diff --git a/api/api/scroll.js b/api/api/scroll.js deleted file mode 100644 index 045b22dbe..000000000 --- a/api/api/scroll.js +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'scroll', - 'scroll_id', - 'rest_total_hits_as_int', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - scrollId: 'scroll_id', - restTotalHitsAsInt: 'rest_total_hits_as_int', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Allows to retrieve a large numbers of results from a single search request. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/scroll/ OpenSearch - Scroll } - * - * @memberOf API-Search - * - * @param {Object} params - * @param {string} [params.scroll_id] - The scroll ID *Deprecated* - * @param {string} [params.scroll] - Specify how long a consistent view of the index should be maintained for scrolled search - * @param {boolean} [params.rest_total_hits_as_int] - Indicates whether hits.total should be rendered as an integer or an object in the rest search response - * @param {Object} [params.body] - The scroll ID if not passed by URL or query parameter. - * - * @param {Object} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -function scrollApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, scrollId, scroll_id, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if ((scroll_id || scrollId) != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + '_search' + '/' + 'scroll' + '/' + encodeURIComponent(scroll_id || scrollId); - } else { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + '_search' + '/' + 'scroll'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = scrollApi; diff --git a/api/api/search.js b/api/api/search.js deleted file mode 100644 index fd4a75ea3..000000000 --- a/api/api/search.js +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -/** @namespace API-Search */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'analyzer', - 'analyze_wildcard', - 'ccs_minimize_roundtrips', - 'default_operator', - 'df', - 'explain', - 'stored_fields', - 'docvalue_fields', - 'from', - 'ignore_unavailable', - 'ignore_throttled', - 'allow_no_indices', - 'expand_wildcards', - 'lenient', - 'preference', - 'q', - 'routing', - 'scroll', - 'search_pipeline', - 'search_type', - 'size', - 'sort', - '_source', - '_source_excludes', - '_source_exclude', - '_source_includes', - '_source_include', - 'terminate_after', - 'stats', - 'suggest_field', - 'suggest_mode', - 'suggest_size', - 'suggest_text', - 'timeout', - 'track_scores', - 'track_total_hits', - 'allow_partial_search_results', - 'typed_keys', - 'version', - 'seq_no_primary_term', - 'request_cache', - 'batched_reduce_size', - 'max_concurrent_shard_requests', - 'pre_filter_shard_size', - 'rest_total_hits_as_int', - 'min_compatible_shard_node', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - analyzeWildcard: 'analyze_wildcard', - ccsMinimizeRoundtrips: 'ccs_minimize_roundtrips', - defaultOperator: 'default_operator', - storedFields: 'stored_fields', - docvalueFields: 'docvalue_fields', - ignoreUnavailable: 'ignore_unavailable', - ignoreThrottled: 'ignore_throttled', - allowNoIndices: 'allow_no_indices', - expandWildcards: 'expand_wildcards', - searchPipeline: 'search_pipeline', - searchType: 'search_type', - _sourceExcludes: '_source_excludes', - _sourceExclude: '_source_exclude', - _sourceIncludes: '_source_includes', - _sourceInclude: '_source_include', - terminateAfter: 'terminate_after', - suggestField: 'suggest_field', - suggestMode: 'suggest_mode', - suggestSize: 'suggest_size', - suggestText: 'suggest_text', - trackScores: 'track_scores', - trackTotalHits: 'track_total_hits', - allowPartialSearchResults: 'allow_partial_search_results', - typedKeys: 'typed_keys', - seqNoPrimaryTerm: 'seq_no_primary_term', - requestCache: 'request_cache', - batchedReduceSize: 'batched_reduce_size', - maxConcurrentShardRequests: 'max_concurrent_shard_requests', - preFilterShardSize: 'pre_filter_shard_size', - restTotalHitsAsInt: 'rest_total_hits_as_int', - minCompatibleShardNode: 'min_compatible_shard_node', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Allows to execute several search operations in one request. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/search/ OpenSearch - Search} - * - * @memberOf API-Search - * - * @param {Object} params - * @param {string} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices - * @param {string} [params.analyzer] - The analyzer to use for the query string - * @param {boolean} [params.analyze_wildcard] - Specify whether wildcard and prefix queries should be analyzed (default: false) - * @param {boolean} [params.ccs_minimize_roundtrips] - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution - * @param {string} [params.default_operator] - The default operator for query string query (AND or OR) (options: AND, OR) - * @param {string} [params.df] - The field to use as default where no field prefix is given in the query string - * @param {boolean} [params.explain] - Specify whether to return detailed information about score computation as part of a hit - * @param {string} [params.stored_fields] - A comma-separated list of stored fields to return as part of a hit - * @param {string} [params.docvalue_fields] - A comma-separated list of fields to return as the docvalue representation of a field for each hit - * @param {number} [params.from] - Starting offset (default: 0) - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.ignore_throttled] - Whether specified concrete, expanded or aliased indices should be ignored when throttled - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * @param {boolean} [params.lenient] - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - * @param {string} [params.preference] - Specify the node or shard the operation should be performed on (default: random) - * @param {string} [params.q] - Query in the Lucene query string syntax - * @param {string} [params.routing] - A comma-separated list of specific routing values - * @param {string} [params.scroll] - Specify how long a consistent view of the index should be maintained for scrolled search - * @param {string} [params.search_pipeline] - Customizable sequence of processing stages applied to search queries. - * @param {string} [params.search_type] - Search operation type (options: query_then_fetch, dfs_query_then_fetch) - * @param {number} [params.size] - Number of hits to return (default: 10) - * @param {string} [params.sort] - A comma-separated list of : pairs - * @param {string} [params._source] - True or false to return the _source field or not, or a list of fields to return - * @param {string} [params._source_excludes] - A list of fields to exclude from the returned _source field - * @param {string} [params._source_includes] - A list of fields to extract and return from the _source field - * @param {number} [params.terminate_after] - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. - * @param {string} [params.stats] - Specific 'tag' of the request for logging and statistical purposes - * @param {string} [params.suggest_field] - Specify which field to use for suggestions - * @param {string} [params.suggest_mode] - Specify suggest mode (options: missing, popular, always) - * @param {number} [params.suggest_size] - How many suggestions to return in response - * @param {string} [params.suggest_text] - The source text for which the suggestions should be returned - * @param {string} [params.timeout] - Explicit operation timeout - * @param {boolean} [params.track_scores] - Whether to calculate and return scores even if they are not used for sorting - * @param {boolean} [params.track_total_hits] - Indicate if the number of documents that match the query should be tracked - * @param {boolean} [params.allow_partial_search_results] - Indicate if an error should be returned if there is a partial search failure or timeout - * @param {boolean} [params.typed_keys] - Specify whether aggregation and suggester names should be prefixed by their respective types in the response - * @param {boolean} [params.version] - Specify whether to return document version as part of a hit - * @param {boolean} [params.seq_no_primary_term] - Specify whether to return sequence number and primary term of the last modification of each hit - * @param {boolean} [params.request_cache] - Specify if request cache should be used for this request or not, defaults to index level setting - * @param {number} [params.batched_reduce_size] - The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. - * @param {number} [params.max_concurrent_shard_requests] - The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests - * @param {number} [params.pre_filter_shard_size] - A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. - * @param {boolean} [params.rest_total_hits_as_int] - Indicates whether hits.total should be rendered as an integer or an object in the rest search response - * @param {string} [params.min_compatible_shard_node] - The minimum compatible version that all shards involved in search should have for this request to be successful - * @param {Object} [params.body] - The search definition using the Query DSL - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/latest/api-reference/search/#response-body Search Response} - */ -function searchApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required url components - if (params.type != null && params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: index'); - return handleError(err, callback); - } - - let { method, body, index, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_search'; - } else if (index != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_search'; - } else { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + '_search'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = searchApi; diff --git a/api/api/search_shards.js b/api/api/search_shards.js deleted file mode 100644 index 5190463c9..000000000 --- a/api/api/search_shards.js +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'preference', - 'routing', - 'local', - 'ignore_unavailable', - 'allow_no_indices', - 'expand_wildcards', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - ignoreUnavailable: 'ignore_unavailable', - allowNoIndices: 'allow_no_indices', - expandWildcards: 'expand_wildcards', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Returns information about the indices and shards that a search request would be executed against. - * - * @memberOf API-Search - * - * @param {Object} params - * @param {string} [params.index] - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices - * @param {string} [params.preference] - Specify the node or shard the operation should be performed on (default: random) - * @param {string} [params.routing] - Specific routing value - * @param {boolean} [params.local] - Return local information, do not retrieve the state from cluster_manager node (default: false) - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -function searchShardsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_search_shards'; - } else { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + '_search_shards'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = searchShardsApi; diff --git a/api/api/search_template.js b/api/api/search_template.js deleted file mode 100644 index c45c6ef16..000000000 --- a/api/api/search_template.js +++ /dev/null @@ -1,145 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'ignore_unavailable', - 'ignore_throttled', - 'allow_no_indices', - 'expand_wildcards', - 'preference', - 'routing', - 'scroll', - 'search_type', - 'explain', - 'profile', - 'typed_keys', - 'rest_total_hits_as_int', - 'ccs_minimize_roundtrips', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - ignoreUnavailable: 'ignore_unavailable', - ignoreThrottled: 'ignore_throttled', - allowNoIndices: 'allow_no_indices', - expandWildcards: 'expand_wildcards', - searchType: 'search_type', - typedKeys: 'typed_keys', - restTotalHitsAsInt: 'rest_total_hits_as_int', - ccsMinimizeRoundtrips: 'ccs_minimize_roundtrips', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Allows to use the Mustache language to pre-render a search definition. - * - * @memberOf API-Search - * - * @param {Object} params - * @param {string} params.index - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices - * @param {Object} params.body - The search definition template and its params - * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.ignore_throttled] - Whether specified concrete, expanded or aliased indices should be ignored when throttled - * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) - * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * @param {string} [params.preference] - Specify the node or shard the operation should be performed on (default: random) - * @param {string} [params.routing] - A comma-separated list of specific routing values - * @param {string} [params.scroll] - Specify how long a consistent view of the index should be maintained for scrolled search - * @param {string} [params.search_type] - Search operation type (options: query_then_fetch, dfs_query_then_fetch) - * @param {boolean} [params.explain] - Specify whether to return detailed information about score computation as part of a hit - * @param {boolean} [params.profile] - Specify whether to profile the query execution - * @param {boolean} [params.typed_keys] - Specify whether aggregation and suggester names should be prefixed by their respective types in the response - * @param {boolean} [params.rest_total_hits_as_int] - Indicates whether hits.total should be rendered as an integer or an object in the rest search response - * @param {boolean} [params.ccs_minimize_roundtrips] - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -function searchTemplateApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - // check required url components - if (params.type != null && params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: index'); - return handleError(err, callback); - } - - let { method, body, index, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = - '/' + - encodeURIComponent(index) + - '/' + - encodeURIComponent(type) + - '/' + - '_search' + - '/' + - 'template'; - } else if (index != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_search' + '/' + 'template'; - } else { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + '_search' + '/' + 'template'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = searchTemplateApi; diff --git a/api/api/security.js b/api/api/security.js deleted file mode 100644 index 1a8c31f2e..000000000 --- a/api/api/security.js +++ /dev/null @@ -1,1954 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -'use strict'; - -/** @namespace API-Security */ - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { - handleError, - snakeCaseKeys, - encodePathParam, - normalizeArguments, - kConfigurationError, -} = require('../utils'); -const snakeCase = {}; - -function SecurityApi(transport, ConfigurationError) { - this.transport = transport; - this[kConfigurationError] = ConfigurationError; -} - -/** - * Changes the password for the current user. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#change-password - Security - Change Password} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {Object} params.body - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.changePassword = function securityChangePasswordApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'api', 'account'].filter((c) => c != null).join('/'); - method = method || 'PUT'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Creates or replaces the specified action group. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#create-action-group - Security - Create Action Group} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {string} params.action_group - The name of the action group to create or replace - * @param {Object} params.body - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.createActionGroup = function securityCreateActionGroupApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.actionGroup == null && params.action_group == null) { - const err = new this[kConfigurationError]('Missing required parameter: action_group'); - return handleError(err, callback); - } - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, actionGroup, action_group, ...querystring } = params; - - action_group = encodePathParam(actionGroup, action_group); - - let path = ['', '_plugins', '_security', 'api', 'actiongroups', action_group] - .filter((c) => c != null) - .join('/'); - method = method || 'PUT'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Creates or replaces the specified role. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#create-role - Security - Create Role} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {string} params.role - * @param {Object} params.body - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.createRole = function securityCreateRoleApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.role == null) { - const err = new this[kConfigurationError]('Missing required parameter: role'); - return handleError(err, callback); - } - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, role, ...querystring } = params; - - role = encodePathParam(role); - - let path = ['', '_plugins', '_security', 'api', 'roles', role].filter((c) => c != null).join('/'); - method = method || 'PUT'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Creates or replaces the specified role mapping. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#create-role-mapping - Security - Create Role Mapping} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {string} params.role - * @param {Object} params.body - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.createRoleMapping = function securityCreateRoleMappingApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.role == null) { - const err = new this[kConfigurationError]('Missing required parameter: role'); - return handleError(err, callback); - } - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, role, ...querystring } = params; - - role = encodePathParam(role); - - let path = ['', '_plugins', '_security', 'api', 'rolesmapping', role] - .filter((c) => c != null) - .join('/'); - method = method || 'PUT'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Creates or replaces the specified tenant. - *
See Also: {@link https://opensearch.org/docs/2.7/security/access-control/api/#create-tenant - Security - Create Tenant} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {string} params.tenant - * @param {Object} params.body - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.createTenant = function securityCreateTenantApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.tenant == null) { - const err = new this[kConfigurationError]('Missing required parameter: tenant'); - return handleError(err, callback); - } - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, tenant, ...querystring } = params; - - tenant = encodePathParam(tenant); - - let path = ['', '_plugins', '_security', 'api', 'tenants', tenant] - .filter((c) => c != null) - .join('/'); - method = method || 'PUT'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Creates or replaces the specified user. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#create-user - Security - Create User} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {string} params.username - * @param {Object} params.body - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.createUser = function securityCreateUserApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.username == null) { - const err = new this[kConfigurationError]('Missing required parameter: username'); - return handleError(err, callback); - } - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, username, ...querystring } = params; - - username = encodePathParam(username); - - let path = ['', '_plugins', '_security', 'api', 'internalusers', username] - .filter((c) => c != null) - .join('/'); - method = method || 'PUT'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Delete a specified action group. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#delete-action-group - Security - Delete Action Group} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {string} params.action_group - Action group to delete. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.deleteActionGroup = function securityDeleteActionGroupApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.actionGroup == null && params.action_group == null) { - const err = new this[kConfigurationError]('Missing required parameter: action_group'); - return handleError(err, callback); - } - - let { method, body, actionGroup, action_group, ...querystring } = params; - - action_group = encodePathParam(actionGroup, action_group); - - let path = ['', '_plugins', '_security', 'api', 'actiongroups', action_group] - .filter((c) => c != null) - .join('/'); - method = method || 'DELETE'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Deletes all distinguished names in the specified cluster’s or node’s allow list. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#delete-distinguished-names - Security - Delete Distinguished Names} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {string} params.cluster_name - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.deleteDistinguishedNames = function securityDeleteDistinguishedNamesApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.clusterName == null && params.cluster_name == null) { - const err = new this[kConfigurationError]('Missing required parameter: cluster_name'); - return handleError(err, callback); - } - - let { method, body, clusterName, cluster_name, ...querystring } = params; - - cluster_name = encodePathParam(clusterName, cluster_name); - - let path = ['', '_plugins', '_security', 'api', 'nodesdn', cluster_name] - .filter((c) => c != null) - .join('/'); - method = method || 'DELETE'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Delete the specified role. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#delete-role - Security - Delete Role} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {string} params.role - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.deleteRole = function securityDeleteRoleApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.role == null) { - const err = new this[kConfigurationError]('Missing required parameter: role'); - return handleError(err, callback); - } - - let { method, body, role, ...querystring } = params; - - role = encodePathParam(role); - - let path = ['', '_plugins', '_security', 'api', 'roles', role].filter((c) => c != null).join('/'); - method = method || 'DELETE'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Deletes the specified role mapping. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#delete-role-mapping - Security - Delete Role Mapping} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {string} params.role - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.deleteRoleMapping = function securityDeleteRoleMappingApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.role == null) { - const err = new this[kConfigurationError]('Missing required parameter: role'); - return handleError(err, callback); - } - - let { method, body, role, ...querystring } = params; - - role = encodePathParam(role); - - let path = ['', '_plugins', '_security', 'api', 'rolesmapping', role] - .filter((c) => c != null) - .join('/'); - method = method || 'DELETE'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Delete the specified tenant. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#delete-action-group - Security - Delete Tenant} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {string} params.tenant - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.deleteTenant = function securityDeleteTenantApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.tenant == null) { - const err = new this[kConfigurationError]('Missing required parameter: tenant'); - return handleError(err, callback); - } - - let { method, body, tenant, ...querystring } = params; - - tenant = encodePathParam(tenant); - - let path = ['', '_plugins', '_security', 'api', 'tenants', tenant] - .filter((c) => c != null) - .join('/'); - method = method || 'DELETE'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Delete the specified user. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#delete-user - Security - Delete User} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {string} params.username - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.deleteUser = function securityDeleteUserApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.username == null) { - const err = new this[kConfigurationError]('Missing required parameter: username'); - return handleError(err, callback); - } - - let { method, body, username, ...querystring } = params; - - username = encodePathParam(username); - - let path = ['', '_plugins', '_security', 'api', 'internalusers', username] - .filter((c) => c != null) - .join('/'); - method = method || 'DELETE'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Flushes the Security plugin user, authentication, and authorization cache. - *
See Also: {@link https://opensearch.org/docs/2.7/security/access-control/api/#flush-cache - Security - Flush Cache} - * - * @memberOf API-Security - * - * @param {Object} params - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.flushCache = function securityFlushCacheApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'api', 'cache'].filter((c) => c != null).join('/'); - method = method || 'DELETE'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Returns account details for the current user. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-account-details - Security - Get Account Details} - * - * @memberOf API-Security - * - * @param {Object} params - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.getAccountDetails = function securityGetAccountDetailsApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'api', 'account'].filter((c) => c != null).join('/'); - method = method || 'GET'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Retrieves one action group. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-action-group - Security - Get Action Group} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {string} params.action_group - Action group to retrieve. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.getActionGroup = function securityGetActionGroupApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.actionGroup == null && params.action_group == null) { - const err = new this[kConfigurationError]('Missing required parameter: action_group'); - return handleError(err, callback); - } - - let { method, body, actionGroup, action_group, ...querystring } = params; - - action_group = encodePathParam(actionGroup, action_group); - - let path = ['', '_plugins', '_security', 'api', 'actiongroups', action_group] - .filter((c) => c != null) - .join('/'); - method = method || 'GET'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Retrieves all action groups. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-action-groups - Security - Get Action Groups} - * - * @memberOf API-Security - * - * @param {Object} params - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.getActionGroups = function securityGetActionGroupsApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'api', 'actiongroups'] - .filter((c) => c != null) - .join('/'); - method = method || 'GET'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Retrieves the audit configuration. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#audit-logs - Security - Get Audit Configuration} - * - * @memberOf API-Security - * - * @param {Object} params - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.getAuditConfiguration = function securityGetAuditConfigurationApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'api', 'audit'].filter((c) => c != null).join('/'); - method = method || 'GET'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Retrieves the cluster’s security certificates. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-certificates - Security - Get Certificates} - * - * @memberOf API-Security - * - * @param {Object} params - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.getCertificates = function securityGetCertificatesApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'api', 'ssl', 'certs'] - .filter((c) => c != null) - .join('/'); - method = method || 'GET'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Returns the current Security plugin configuration in JSON format. - *
See Also: {@link https://opensearch.org/docs/2.7/security/access-control/api/#get-configuration - Security - Get Configuration} - * - * @memberOf API-Security - * - * @param {Object} params - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.getConfiguration = function securityGetConfigurationApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'api', 'securityconfig'] - .filter((c) => c != null) - .join('/'); - method = method || 'GET'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Retrieves all distinguished names in the allow list. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-distinguished-names - Security - Get Distinguished Names} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {string} [params.cluster_name] - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.getDistinguishedNames = function securityGetDistinguishedNamesApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, clusterName, cluster_name, ...querystring } = params; - - cluster_name = encodePathParam(clusterName, cluster_name); - - let path = ['', '_plugins', '_security', 'api', 'nodesdn', cluster_name] - .filter((c) => c != null) - .join('/'); - method = method || 'GET'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Retrieves one role. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-role - Security - Get Role} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {string} params.role - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.getRole = function securityGetRoleApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.role == null) { - const err = new this[kConfigurationError]('Missing required parameter: role'); - return handleError(err, callback); - } - - let { method, body, role, ...querystring } = params; - - role = encodePathParam(role); - - let path = ['', '_plugins', '_security', 'api', 'roles', role].filter((c) => c != null).join('/'); - method = method || 'GET'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Retrieves one role mapping. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-role-mapping - Security - Get Role Mapping} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {string} params.role - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.getRoleMapping = function securityGetRoleMappingApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.role == null) { - const err = new this[kConfigurationError]('Missing required parameter: role'); - return handleError(err, callback); - } - - let { method, body, role, ...querystring } = params; - - role = encodePathParam(role); - - let path = ['', '_plugins', '_security', 'api', 'rolesmapping', role] - .filter((c) => c != null) - .join('/'); - method = method || 'GET'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Retrieves all role mappings. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-role-mappings - Security - Get Role Mappings} - * - * @memberOf API-Security - * - * @param {Object} params - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.getRoleMappings = function securityGetRoleMappingsApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'api', 'rolesmapping'] - .filter((c) => c != null) - .join('/'); - method = method || 'GET'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Retrieves all roles. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-roles - Security - Get Roles} - * - * @memberOf API-Security - * - * @param {Object} params - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.getRoles = function securityGetRolesApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'api', 'roles'].filter((c) => c != null).join('/'); - method = method || 'GET'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Retrieves one tenant. - *
See Also: {@link https://opensearch.org/docs/2.7/security/access-control/api/#get-tenant - Security - Get Tenant} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {string} params.tenant - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.getTenant = function securityGetTenantApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.tenant == null) { - const err = new this[kConfigurationError]('Missing required parameter: tenant'); - return handleError(err, callback); - } - - let { method, body, tenant, ...querystring } = params; - - tenant = encodePathParam(tenant); - - let path = ['', '_plugins', '_security', 'api', 'tenants', tenant] - .filter((c) => c != null) - .join('/'); - method = method || 'GET'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Retrieves all tenants. - *
See Also: {@link https://opensearch.org/docs/2.7/security/access-control/api/#get-tenants - Security - Get Tenants} - * - * @memberOf API-Security - * - * @param {Object} params - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.getTenants = function securityGetTenantsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'api', 'tenants'].filter((c) => c != null).join('/'); - method = method || 'GET'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Retrieve one internal user. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-user - Security - Get User} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {string} params.username - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.getUser = function securityGetUserApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.username == null) { - const err = new this[kConfigurationError]('Missing required parameter: username'); - return handleError(err, callback); - } - - let { method, body, username, ...querystring } = params; - - username = encodePathParam(username); - - let path = ['', '_plugins', '_security', 'api', 'internalusers', username] - .filter((c) => c != null) - .join('/'); - method = method || 'GET'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Retrieve all internal users. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-users - Security - Get Users} - * - * @memberOf API-Security - * - * @param {Object} params - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.getUsers = function securityGetUsersApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'api', 'internalusers'] - .filter((c) => c != null) - .join('/'); - method = method || 'GET'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Checks to see if the Security plugin is up and running. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#health-check - Security - Health} - * - * @memberOf API-Security - * - * @param {Object} params - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.health = function securityHealthApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'health'].filter((c) => c != null).join('/'); - method = method || 'GET'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Updates individual attributes of an action group. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-action-group - Security - Patch Action Group} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {string} params.action_group - * @param {Object} params.body - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.patchActionGroup = function securityPatchActionGroupApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.actionGroup == null && params.action_group == null) { - const err = new this[kConfigurationError]('Missing required parameter: action_group'); - return handleError(err, callback); - } - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, actionGroup, action_group, ...querystring } = params; - - action_group = encodePathParam(actionGroup, action_group); - - let path = ['', '_plugins', '_security', 'api', 'actiongroups', action_group] - .filter((c) => c != null) - .join('/'); - method = method || 'PATCH'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Creates, updates, or deletes multiple action groups in a single call. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-action-groups - Security - Patch Action Groups} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {Object} params.body - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.patchActionGroups = function securityPatchActionGroupsApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'api', 'actiongroups'] - .filter((c) => c != null) - .join('/'); - method = method || 'PATCH'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * A PATCH call is used to update specified fields in the audit configuration. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#audit-logs - Security - Patch Audit Configuration} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {Object} params.body - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.patchAuditConfiguration = function securityPatchAuditConfigurationApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'api', 'audit'].filter((c) => c != null).join('/'); - method = method || 'PATCH'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * A PATCH call is used to update the existing configuration using the REST API. - *
See Also: {@link https://opensearch.org/docs/2.7/security/access-control/api/#patch-configuration - Security - Patch Configuration} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {Object} params.body - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.patchConfiguration = function securityPatchConfigurationApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'api', 'securityconfig'] - .filter((c) => c != null) - .join('/'); - method = method || 'PATCH'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Bulk update of distinguished names. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#update-all-distinguished-names - Security - Patch Distinguished Names} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {Object} params.body - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.patchDistinguishedNames = function securityPatchDistinguishedNamesApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'api', 'nodesdn'].filter((c) => c != null).join('/'); - method = method || 'PATCH'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Updates individual attributes of a role. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-role - Security - Patch Role} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {string} params.role - * @param {Object} params.body - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.patchRole = function securityPatchRoleApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.role == null) { - const err = new this[kConfigurationError]('Missing required parameter: role'); - return handleError(err, callback); - } - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, role, ...querystring } = params; - - role = encodePathParam(role); - - let path = ['', '_plugins', '_security', 'api', 'roles', role].filter((c) => c != null).join('/'); - method = method || 'PATCH'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Updates individual attributes of a role mapping. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-role-mapping - Security - Patch Role Mapping} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {string} params.role - * @param {Object} params.body - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.patchRoleMapping = function securityPatchRoleMappingApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.role == null) { - const err = new this[kConfigurationError]('Missing required parameter: role'); - return handleError(err, callback); - } - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, role, ...querystring } = params; - - role = encodePathParam(role); - - let path = ['', '_plugins', '_security', 'api', 'rolesmapping', role] - .filter((c) => c != null) - .join('/'); - method = method || 'PATCH'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Creates or updates multiple role mappings in a single call. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-role-mappings - Security - Patch Role Mappings} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {Object} params.body - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.patchRoleMappings = function securityPatchRoleMappingsApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'api', 'rolesmapping'] - .filter((c) => c != null) - .join('/'); - method = method || 'PATCH'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Creates, updates, or deletes multiple roles in a single call. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-roles - Security - Patch Roles} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {Object} params.body - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.patchRoles = function securityPatchRolesApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'api', 'roles'].filter((c) => c != null).join('/'); - method = method || 'PATCH'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Add, delete, or modify a single tenant. - *
See Also: {@link https://opensearch.org/docs/2.7/security/access-control/api/#patch-tenant - Security - Patch Tenant} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {string} params.tenant - * @param {Object} params.body - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.patchTenant = function securityPatchTenantApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.tenant == null) { - const err = new this[kConfigurationError]('Missing required parameter: tenant'); - return handleError(err, callback); - } - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, tenant, ...querystring } = params; - - tenant = encodePathParam(tenant); - - let path = ['', '_plugins', '_security', 'api', 'tenants', tenant] - .filter((c) => c != null) - .join('/'); - method = method || 'PATCH'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Add, delete, or modify multiple tenants in a single call. - *
See Also: {@link https://opensearch.org/docs/2.7/security/access-control/api/#patch-tenants - Security - Patch Tenants} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {Object} params.body - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.patchTenants = function securityPatchTenantsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'api', 'tenants'].filter((c) => c != null).join('/'); - method = method || 'PATCH'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Updates individual attributes of an internal user. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-user - Security - Patch User} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {string} params.username - * @param {Object} params.body - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.patchUser = function securityPatchUserApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.username == null) { - const err = new this[kConfigurationError]('Missing required parameter: username'); - return handleError(err, callback); - } - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, username, ...querystring } = params; - - username = encodePathParam(username); - - let path = ['', '_plugins', '_security', 'api', 'internalusers', username] - .filter((c) => c != null) - .join('/'); - method = method || 'PATCH'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Creates, updates, or deletes multiple internal users in a single call. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-users - Security - Patch Users} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {Object} params.body - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.patchUsers = function securityPatchUsersApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'api', 'internalusers'] - .filter((c) => c != null) - .join('/'); - method = method || 'PATCH'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Reload HTTP layer communication certificates. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#reload-http-certificates - Security - Reload Http Certificates} - * - * @memberOf API-Security - * - * @param {Object} params - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.reloadHttpCertificates = function securityReloadHttpCertificatesApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'api', 'ssl', 'http', 'reloadcerts'] - .filter((c) => c != null) - .join('/'); - method = method || 'PUT'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Reload transport layer communication certificates. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#reload-transport-certificates - Security - Reload Transport Certificates} - * - * @memberOf API-Security - * - * @param {Object} params - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.reloadTransportCertificates = function securityReloadTransportCertificatesApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'api', 'ssl', 'transport', 'reloadcerts'] - .filter((c) => c != null) - .join('/'); - method = method || 'PUT'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Updates the audit configuration. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#audit-logs - Security - Update Audit Configuration} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {Object} params.body - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.updateAuditConfiguration = function securityUpdateAuditConfigurationApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'api', 'audit', 'config'] - .filter((c) => c != null) - .join('/'); - method = method || 'PUT'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Adds or updates the existing configuration using the REST API. - *
See Also: {@link https://opensearch.org/docs/2.7/security/access-control/api/#update-configuration - Security - Update Configuration} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {Object} params.body - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.updateConfiguration = function securityUpdateConfigurationApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, ...querystring } = params; - - let path = ['', '_plugins', '_security', 'api', 'securityconfig', 'config'] - .filter((c) => c != null) - .join('/'); - method = method || 'PUT'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -/** - * Adds or updates the specified distinguished names in the cluster’s or node’s allow list. - *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#update-distinguished-names - Security - Update Distinguished Names} - * - * @memberOf API-Security - * - * @param {Object} params - * @param {string} params.cluster_name - * @param {Object} [params.body] - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SecurityApi.prototype.updateDistinguishedNames = function securityUpdateDistinguishedNamesApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.clusterName == null && params.cluster_name == null) { - const err = new this[kConfigurationError]('Missing required parameter: cluster_name'); - return handleError(err, callback); - } - - let { method, body, clusterName, cluster_name, ...querystring } = params; - - cluster_name = encodePathParam(clusterName, cluster_name); - - let path = ['', '_plugins', '_security', 'api', 'nodesdn', cluster_name] - .filter((c) => c != null) - .join('/'); - method = method || 'PUT'; - body = body || ''; - querystring = snakeCaseKeys(null, snakeCase, querystring); - - return this.transport.request({ method, path, body, querystring }, options, callback); -}; - -Object.defineProperties(SecurityApi.prototype, { - change_password: { - get() { - return this.changePassword; - }, - }, - create_action_group: { - get() { - return this.createActionGroup; - }, - }, - create_role: { - get() { - return this.createRole; - }, - }, - create_role_mapping: { - get() { - return this.createRoleMapping; - }, - }, - create_tenant: { - get() { - return this.createTenant; - }, - }, - create_user: { - get() { - return this.createUser; - }, - }, - delete_action_group: { - get() { - return this.deleteActionGroup; - }, - }, - delete_distinguished_names: { - get() { - return this.deleteDistinguishedNames; - }, - }, - delete_role: { - get() { - return this.deleteRole; - }, - }, - delete_role_mapping: { - get() { - return this.deleteRoleMapping; - }, - }, - delete_tenant: { - get() { - return this.deleteTenant; - }, - }, - delete_user: { - get() { - return this.deleteUser; - }, - }, - flush_cache: { - get() { - return this.flushCache; - }, - }, - get_account_details: { - get() { - return this.getAccountDetails; - }, - }, - get_action_group: { - get() { - return this.getActionGroup; - }, - }, - get_action_groups: { - get() { - return this.getActionGroups; - }, - }, - get_audit_configuration: { - get() { - return this.getAuditConfiguration; - }, - }, - get_certificates: { - get() { - return this.getCertificates; - }, - }, - get_configuration: { - get() { - return this.getConfiguration; - }, - }, - get_distinguished_names: { - get() { - return this.getDistinguishedNames; - }, - }, - get_role: { - get() { - return this.getRole; - }, - }, - get_role_mapping: { - get() { - return this.getRoleMapping; - }, - }, - get_role_mappings: { - get() { - return this.getRoleMappings; - }, - }, - get_roles: { - get() { - return this.getRoles; - }, - }, - get_tenant: { - get() { - return this.getTenant; - }, - }, - get_tenants: { - get() { - return this.getTenants; - }, - }, - get_user: { - get() { - return this.getUser; - }, - }, - get_users: { - get() { - return this.getUsers; - }, - }, - patch_action_group: { - get() { - return this.patchActionGroup; - }, - }, - patch_action_groups: { - get() { - return this.patchActionGroups; - }, - }, - patch_audit_configuration: { - get() { - return this.patchAuditConfiguration; - }, - }, - patch_configuration: { - get() { - return this.patchConfiguration; - }, - }, - patch_distinguished_names: { - get() { - return this.patchDistinguishedNames; - }, - }, - patch_role: { - get() { - return this.patchRole; - }, - }, - patch_role_mapping: { - get() { - return this.patchRoleMapping; - }, - }, - patch_role_mappings: { - get() { - return this.patchRoleMappings; - }, - }, - patch_roles: { - get() { - return this.patchRoles; - }, - }, - patch_tenant: { - get() { - return this.patchTenant; - }, - }, - patch_tenants: { - get() { - return this.patchTenants; - }, - }, - patch_user: { - get() { - return this.patchUser; - }, - }, - patch_users: { - get() { - return this.patchUsers; - }, - }, - reload_http_certificates: { - get() { - return this.reloadHttpCertificates; - }, - }, - reload_transport_certificates: { - get() { - return this.reloadTransportCertificates; - }, - }, - update_audit_configuration: { - get() { - return this.updateAuditConfiguration; - }, - }, - update_configuration: { - get() { - return this.updateConfiguration; - }, - }, - update_distinguished_names: { - get() { - return this.updateDistinguishedNames; - }, - }, -}); -module.exports = SecurityApi; diff --git a/api/api/shutdown.js b/api/api/shutdown.js deleted file mode 100644 index 6f1d5e213..000000000 --- a/api/api/shutdown.js +++ /dev/null @@ -1,149 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path']; -const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }; - -function ShutdownApi(transport, ConfigurationError) { - this.transport = transport; - this[kConfigurationError] = ConfigurationError; -} - -// TODO: Remove. Added in ES 7.15 -ShutdownApi.prototype.deleteNode = function shutdownDeleteNodeApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.node_id == null && params.nodeId == null) { - const err = new this[kConfigurationError]('Missing required parameter: node_id or nodeId'); - return handleError(err, callback); - } - - let { method, body, nodeId, node_id, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'DELETE'; - path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'shutdown'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -// TODO: Remove. Added in ES 7.15 -ShutdownApi.prototype.getNode = function shutdownGetNodeApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, nodeId, node_id, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if ((node_id || nodeId) != null) { - if (method == null) method = 'GET'; - path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'shutdown'; - } else { - if (method == null) method = 'GET'; - path = '/' + '_nodes' + '/' + 'shutdown'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -// TODO: Remove. Added in ES 7.15 -ShutdownApi.prototype.putNode = function shutdownPutNodeApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.node_id == null && params.nodeId == null) { - const err = new this[kConfigurationError]('Missing required parameter: node_id or nodeId'); - return handleError(err, callback); - } - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, nodeId, node_id, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'PUT'; - path = '/' + '_nodes' + '/' + encodeURIComponent(node_id || nodeId) + '/' + 'shutdown'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -Object.defineProperties(ShutdownApi.prototype, { - delete_node: { - get() { - return this.deleteNode; - }, - }, - get_node: { - get() { - return this.getNode; - }, - }, - put_node: { - get() { - return this.putNode; - }, - }, -}); - -module.exports = ShutdownApi; diff --git a/api/api/snapshot.js b/api/api/snapshot.js deleted file mode 100644 index aa5c2b18f..000000000 --- a/api/api/snapshot.js +++ /dev/null @@ -1,782 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -/** @namespace API-Snapshot */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'cluster_manager_timeout', - 'master_timeout', - 'timeout', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', - 'wait_for_completion', - 'verify', - 'ignore_unavailable', - 'index_details', - 'include_repository', - 'verbose', - 'local', - 'blob_count', - 'concurrency', - 'read_node_count', - 'early_read_node_count', - 'seed', - 'rare_action_probability', - 'max_blob_size', - 'max_total_data_size', - 'detailed', - 'rarely_abort_writes', -]; -const snakeCase = { - clusterManagerTimeout: 'cluster_manager_timeout', - masterTimeout: 'master_timeout', - errorTrace: 'error_trace', - filterPath: 'filter_path', - waitForCompletion: 'wait_for_completion', - ignoreUnavailable: 'ignore_unavailable', - indexDetails: 'index_details', - includeRepository: 'include_repository', - blobCount: 'blob_count', - readNodeCount: 'read_node_count', - earlyReadNodeCount: 'early_read_node_count', - rareActionProbability: 'rare_action_probability', - maxBlobSize: 'max_blob_size', - maxTotalDataSize: 'max_total_data_size', - rarelyAbortWrites: 'rarely_abort_writes', -}; - -function SnapshotApi(transport, ConfigurationError) { - this.transport = transport; - this[kConfigurationError] = ConfigurationError; -} - -/** - * Removes stale data from repository. - * - * @memberOf API-Snapshot - * - * @param {Object} params - * @param {string} params.repository - A repository name - * @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node - * @param {string} [params.timeout] - Explicit operation timeout - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SnapshotApi.prototype.cleanupRepository = function snapshotCleanupRepositoryApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.repository == null) { - const err = new this[kConfigurationError]('Missing required parameter: repository'); - return handleError(err, callback); - } - - let { method, body, repository, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'POST'; - path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_cleanup'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Clones indices from one snapshot into another snapshot in the same repository. - * - * @memberOf API-Snapshot - * - * @param {Object} params - * @param {string} params.repository - A repository name - * @param {string} params.snapshot - The name of the snapshot to clone from - * @param {Object} params.body - The snapshot clone definition - * @param {string} [params.target_snapshot] - The name of the cloned snapshot to create - * @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SnapshotApi.prototype.clone = function snapshotCloneApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.repository == null) { - const err = new this[kConfigurationError]('Missing required parameter: repository'); - return handleError(err, callback); - } - if (params.snapshot == null) { - const err = new this[kConfigurationError]('Missing required parameter: snapshot'); - return handleError(err, callback); - } - if (params.target_snapshot == null && params.targetSnapshot == null) { - const err = new this[kConfigurationError]( - 'Missing required parameter: target_snapshot or targetSnapshot' - ); - return handleError(err, callback); - } - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - // check required url components - if ( - (params.target_snapshot != null || params.targetSnapshot != null) && - (params.snapshot == null || params.repository == null) - ) { - const err = new this[kConfigurationError]( - 'Missing required parameter of the url: snapshot, repository' - ); - return handleError(err, callback); - } else if (params.snapshot != null && params.repository == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: repository'); - return handleError(err, callback); - } - - let { method, body, repository, snapshot, targetSnapshot, target_snapshot, ...querystring } = - params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'PUT'; - path = - '/' + - '_snapshot' + - '/' + - encodeURIComponent(repository) + - '/' + - encodeURIComponent(snapshot) + - '/' + - '_clone' + - '/' + - encodeURIComponent(target_snapshot || targetSnapshot); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Creates a snapshot in a repository. - * - * @memberOf API-Snapshot - * - * @param {Object} params - * @param {string} params.repository - A repository name - * @param {string} params.snapshot - A snapshot name - * @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node - * @param {boolean} [params.wait_for_completion] - Should this request wait until the operation has completed before returning - * @param {Object} [params.body] - The snapshot definition - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SnapshotApi.prototype.create = function snapshotCreateApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.repository == null) { - const err = new this[kConfigurationError]('Missing required parameter: repository'); - return handleError(err, callback); - } - if (params.snapshot == null) { - const err = new this[kConfigurationError]('Missing required parameter: snapshot'); - return handleError(err, callback); - } - - // check required url components - if (params.snapshot != null && params.repository == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: repository'); - return handleError(err, callback); - } - - let { method, body, repository, snapshot, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'PUT'; - path = - '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Creates a repository. - * - * @memberOf API-Snapshot - * - * @param {Object} params - * @param {string} params.repository - A repository name - * @param {Object} params.body - The repository definition - * @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node - * @param {string} [params.timeout] - Explicit operation timeout - * @param {boolean} [params.verify] - Whether to verify the repository after creation - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SnapshotApi.prototype.createRepository = function snapshotCreateRepositoryApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.repository == null) { - const err = new this[kConfigurationError]('Missing required parameter: repository'); - return handleError(err, callback); - } - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, repository, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'PUT'; - path = '/' + '_snapshot' + '/' + encodeURIComponent(repository); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Deletes a snapshot. - * - * @memberOf API-Snapshot - * - * @param {Object} params - * @param {string} [params.repository] - A repository name - * @param {string} [params.snapshot] - A snapshot name - * @param {string} [params.master_timeout] - (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node - * @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SnapshotApi.prototype.delete = function snapshotDeleteApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.repository == null) { - const err = new this[kConfigurationError]('Missing required parameter: repository'); - return handleError(err, callback); - } - if (params.snapshot == null) { - const err = new this[kConfigurationError]('Missing required parameter: snapshot'); - return handleError(err, callback); - } - - // check required url components - if (params.snapshot != null && params.repository == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: repository'); - return handleError(err, callback); - } - - let { method, body, repository, snapshot, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'DELETE'; - path = - '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Deletes a repository. - * - * @memberOf API-Snapshot - * - * @param {Object} params - * @param {string} [params.repository] - Name of the snapshot repository to unregister. Wildcard (`*`) patterns are supported. - * @param {string} [params.master_timeout] - (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node - * @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node - * @param {string} [params.timeout] - Explicit operation timeout - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SnapshotApi.prototype.deleteRepository = function snapshotDeleteRepositoryApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.repository == null) { - const err = new this[kConfigurationError]('Missing required parameter: repository'); - return handleError(err, callback); - } - - let { method, body, repository, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'DELETE'; - path = '/' + '_snapshot' + '/' + encodeURIComponent(repository); - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns information about a snapshot. - * - * @memberOf API-Snapshot - * - * @param {Object} params - * @param {string} [params.repository] - A repository name - * @param {string} [params.snapshot] - A comma-separated list of snapshot names - * @param {string} [params.master_timeout] - (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node - * @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node - * @param {boolean} [params.ignore_unavailable] - Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown - * @param {boolean} [params.index_details] - Whether to include details of each index in the snapshot, if those details are available. Defaults to false. - * @param {boolean} [params.include_repository] - Whether to include the repository name in the snapshot info. Defaults to true. - * @param {boolean} [params.verbose] - Whether to show verbose snapshot info or only show the basic info found in the repository index blob - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SnapshotApi.prototype.get = function snapshotGetApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.repository == null) { - const err = new this[kConfigurationError]('Missing required parameter: repository'); - return handleError(err, callback); - } - if (params.snapshot == null) { - const err = new this[kConfigurationError]('Missing required parameter: snapshot'); - return handleError(err, callback); - } - - // check required url components - if (params.snapshot != null && params.repository == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: repository'); - return handleError(err, callback); - } - - let { method, body, repository, snapshot, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = - '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + encodeURIComponent(snapshot); - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns information about a snapshot. - * - * @memberOf API-Snapshot - * - * @param {Object} params - * @param {string} [params.repository] - A comma-separated list of repository names - * @param {string} [params.master_timeout] - (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to cluster_manager node - * @param {boolean} [params.local] - Return local information, do not retrieve the state from cluster_manager node (default: false) - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SnapshotApi.prototype.getRepository = function snapshotGetRepositoryApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, repository, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (repository != null) { - if (method == null) method = 'GET'; - path = '/' + '_snapshot' + '/' + encodeURIComponent(repository); - } else { - if (method == null) method = 'GET'; - path = '/' + '_snapshot'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Analyzes a repository for correctness and performance - * - * @memberOf API-Snapshot - * - * @param {Object} params - * @param {string} [params.repository] - A repository name - * @param {number} [params.blob_count] - Number of blobs to create during the test. Defaults to 100. - * @param {number} [params.concurrency] - Number of operations to run concurrently during the test. Defaults to 10. - * @param {number} [params.read_node_count] - Number of nodes on which to read a blob after writing. Defaults to 10. - * @param {number} [params.early_read_node_count] - Number of nodes on which to perform an early read on a blob, i.e. before writing has completed. Early reads are rare actions so the 'rare_action_probability' parameter is also relevant. Defaults to 2. - * @param {number} [params.seed] - Seed for the random number generator used to create the test workload. Defaults to a random value. - * @param {number} [params.rare_action_probability] - Probability of taking a rare action such as an early read or an overwrite. Defaults to 0.02. - * @param {string} [params.max_blob_size] - Maximum size of a blob to create during the test, e.g '1gb' or '100mb'. Defaults to '10mb'. - * @param {string} [params.max_total_data_size] - Maximum total size of all blobs to create during the test, e.g '1tb' or '100gb'. Defaults to '1gb'. - * @param {string} [params.timeout] - Explicit operation timeout. Defaults to '30s'. - * @param {boolean} [params.detailed] - Whether to return detailed results or a summary. Defaults to 'false' so that only the summary is returned. - * @param {boolean} [params.rarely_abort_writes] - Whether to rarely abort writes before they complete. Defaults to 'true'. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SnapshotApi.prototype.repositoryAnalyze = function snapshotRepositoryAnalyzeApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.repository == null) { - const err = new this[kConfigurationError]('Missing required parameter: repository'); - return handleError(err, callback); - } - - let { method, body, repository, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'POST'; - path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_analyze'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Restores a snapshot. - * - * @memberOf API-Snapshot - * - * @param {Object} params - * @param {string} [params.repository] - A repository name - * @param {string} [params.snapshot] - A snapshot name - * @param {string} [params.master_timeout] - (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node - * @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node - * @param {boolean} [params.wait_for_completion] - Should this request wait until the operation has completed before returning - * @param {Object} [params.body] - Details of what to restore - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SnapshotApi.prototype.restore = function snapshotRestoreApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.repository == null) { - const err = new this[kConfigurationError]('Missing required parameter: repository'); - return handleError(err, callback); - } - if (params.snapshot == null) { - const err = new this[kConfigurationError]('Missing required parameter: snapshot'); - return handleError(err, callback); - } - - // check required url components - if (params.snapshot != null && params.repository == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: repository'); - return handleError(err, callback); - } - - let { method, body, repository, snapshot, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'POST'; - path = - '/' + - '_snapshot' + - '/' + - encodeURIComponent(repository) + - '/' + - encodeURIComponent(snapshot) + - '/' + - '_restore'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns information about the status of a snapshot. - * - * @memberOf API-Snapshot - * - * @param {Object} params - * @param {string} [params.repository] - A repository name - * @param {string} [params.snapshot] - A comma-separated list of snapshot names - * @param {string} [params.master_timeout] - (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node - * @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node - * @param {boolean} [params.ignore_unavailable] - Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SnapshotApi.prototype.status = function snapshotStatusApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required url components - if (params.snapshot != null && params.repository == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: repository'); - return handleError(err, callback); - } - - let { method, body, repository, snapshot, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (repository != null && snapshot != null) { - if (method == null) method = 'GET'; - path = - '/' + - '_snapshot' + - '/' + - encodeURIComponent(repository) + - '/' + - encodeURIComponent(snapshot) + - '/' + - '_status'; - } else if (repository != null) { - if (method == null) method = 'GET'; - path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_status'; - } else { - if (method == null) method = 'GET'; - path = '/' + '_snapshot' + '/' + '_status'; - } - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Verifies a repository. - * - * @memberOf API-Snapshot - * - * @param {Object} params - * @param {string} [params.repository] - A repository name - * @param {string} [params.master_timeout] - (DEPRECATED: use cluster_manager_timeout instead) Explicit operation timeout for connection to master node - * @param {string} [params.cluster_manager_timeout] - Explicit operation timeout for connection to cluster_manager node - * @param {string} [params.timeout] - Explicit operation timeout - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -SnapshotApi.prototype.verifyRepository = function snapshotVerifyRepositoryApi( - params, - options, - callback -) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.repository == null) { - const err = new this[kConfigurationError]('Missing required parameter: repository'); - return handleError(err, callback); - } - - let { method, body, repository, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'POST'; - path = '/' + '_snapshot' + '/' + encodeURIComponent(repository) + '/' + '_verify'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -Object.defineProperties(SnapshotApi.prototype, { - cleanup_repository: { - get() { - return this.cleanupRepository; - }, - }, - create_repository: { - get() { - return this.createRepository; - }, - }, - delete_repository: { - get() { - return this.deleteRepository; - }, - }, - get_repository: { - get() { - return this.getRepository; - }, - }, - repository_analyze: { - get() { - return this.repositoryAnalyze; - }, - }, - verify_repository: { - get() { - return this.verifyRepository; - }, - }, -}); - -module.exports = SnapshotApi; diff --git a/api/api/tasks.js b/api/api/tasks.js deleted file mode 100644 index a57df45cf..000000000 --- a/api/api/tasks.js +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -/** @namespace API-Tasks */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'nodes', - 'actions', - 'parent_task_id', - 'wait_for_completion', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', - 'timeout', - 'detailed', - 'group_by', -]; -const snakeCase = { - parentTaskId: 'parent_task_id', - waitForCompletion: 'wait_for_completion', - errorTrace: 'error_trace', - filterPath: 'filter_path', - groupBy: 'group_by', -}; - -function TasksApi(transport, ConfigurationError) { - this.transport = transport; - this[kConfigurationError] = ConfigurationError; -} - -/** - * Cancels a task, if it can be cancelled through an API. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/tasks/#task-canceling OpenSearch - Task Cancelling} - * - * @memberOf API-Tasks - * - * @param {Object} params - * @param {string} [params.task_id] - Cancel the task with specified task id (node_id:task_number) - * @param {string} [params.nodes] - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - * @param {string} [params.actions] - A comma-separated list of actions that should be cancelled. Leave empty to cancel all. - * @param {string} [params.parent_task_id] - Cancel tasks with specified parent task id (node_id:task_number). Set to -1 to cancel all. - * @param {boolean} [params.wait_for_completion] - Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -TasksApi.prototype.cancel = function tasksCancelApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, taskId, task_id, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if ((task_id || taskId) != null) { - if (method == null) method = 'POST'; - path = '/' + '_tasks' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_cancel'; - } else { - if (method == null) method = 'POST'; - path = '/' + '_tasks' + '/' + '_cancel'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns information about a task. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/tasks OpenSearch - Tasks} - * - * @memberOf API-Tasks - * - * @param {Object} params - * @param {string} [params.task_id] - Return the task with specified id (node_id:task_number) - * @param {boolean} [params.wait_for_completion] - Wait for the matching tasks to complete (default: false) - * @param {string} [params.timeout] - Explicit operation timeoutompletion] - Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -TasksApi.prototype.get = function tasksGetApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.task_id == null && params.taskId == null) { - const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId'); - return handleError(err, callback); - } - - let { method, body, taskId, task_id, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_tasks' + '/' + encodeURIComponent(task_id || taskId); - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -/** - * Returns a list of tasks. - *
See Also: {@link https://opensearch.org/docs/latest/api-reference/tasks OpenSearch - Tasks} - * - * @memberOf API-Tasks - * - * @param {Object} params - * @param {string} [params.nodes] - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes - * @param {string} [params.actions] - A comma-separated list of actions that should be returned. Leave empty to return all. - * @param {boolean} [params.detailed] - Return detailed task information (default: false) - * @param {string} [params.parent_task_id] - Return tasks with specified parent task id (node_id:task_number). Set to -1 to return all. - * @param {boolean} [params.wait_for_completion] - Wait for the matching tasks to complete (default: false) - * @param {string} [params.group_by] - Group tasks by nodes or parent/child relationships (options: nodes, parents, none) - * @param {string} [params.timeout] - Explicit operation timeout - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -TasksApi.prototype.list = function tasksListApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'GET'; - path = '/' + '_tasks'; - - // build request object - const request = { - method, - path, - body: null, - querystring, - }; - - return this.transport.request(request, options, callback); -}; - -module.exports = TasksApi; diff --git a/api/api/terms_enum.js b/api/api/terms_enum.js deleted file mode 100644 index 847f3229f..000000000 --- a/api/api/terms_enum.js +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = ['pretty', 'human', 'error_trace', 'source', 'filter_path']; -const snakeCase = { errorTrace: 'error_trace', filterPath: 'filter_path' }; - -// TODO: Remove. Added in ES 7.14 -function termsEnumApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - - let { method, body, index, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_terms_enum'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = termsEnumApi; diff --git a/api/api/termvectors.js b/api/api/termvectors.js deleted file mode 100644 index e08c623b3..000000000 --- a/api/api/termvectors.js +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'term_statistics', - 'field_statistics', - 'fields', - 'offsets', - 'positions', - 'payloads', - 'preference', - 'routing', - 'realtime', - 'version', - 'version_type', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - termStatistics: 'term_statistics', - fieldStatistics: 'field_statistics', - versionType: 'version_type', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Returns information and statistics about terms in the fields of a particular document. - * - * @memberOf API-Document - * - * @param {Object} params - * @param {string} params.index - The index in which the document resides. - * @param {string} [params.id] - The id of the document, when not specified a doc param should be supplied. - * @param {boolean} [params.term_statistics] - Specifies if total term frequency and document frequency should be returned. - * @param {boolean} [params.field_statistics] - Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. - * @param {string} [params.fields] - A comma-separated list of fields to return. - * @param {boolean} [params.offsets] - Specifies if term offsets should be returned. - * @param {boolean} [params.positions] - Specifies if term positions should be returned. - * @param {boolean} [params.payloads] - Specifies if term payloads should be returned. - * @param {string} [params.preference] - Specify the node or shard the operation should be performed on (default: random). - * @param {string} [params.routing] - Specific routing value. - * @param {boolean} [params.realtime] - Specifies if request is real-time as opposed to near-real-time (default: true). - * @param {number} [params.version] - Explicit version number for concurrency control - * @param {string} [params.version_type] - Specific version type (options: internal, external, external_gte, force) - * @param {Object} [params.body] - Define parameters and or supply a document to get termvectors for. See documentation. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -function termvectorsApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - - let { method, body, index, id, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null && id != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = - '/' + - encodeURIComponent(index) + - '/' + - encodeURIComponent(type) + - '/' + - encodeURIComponent(id) + - '/' + - '_termvectors'; - } else if (index != null && id != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_termvectors' + '/' + encodeURIComponent(id); - } else if (index != null && type != null) { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_termvectors'; - } else { - if (method == null) method = body == null ? 'GET' : 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_termvectors'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = termvectorsApi; diff --git a/api/api/transforms.js b/api/api/transforms.js deleted file mode 100644 index 007138530..000000000 --- a/api/api/transforms.js +++ /dev/null @@ -1,304 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -/* - * This file was generated from OpenSearch API Spec. Do not edit it - * manually. If you want to make changes, either update the spec or - * the API generator. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { - handleError, - encodePathParam, - normalizeArguments, - kConfigurationError, -} = require('../utils'); - -/** @namespace API-Transforms */ - -function TransformsApi(transport, ConfigurationError) { - this.transport = transport; - this[kConfigurationError] = ConfigurationError; -} - -/** - * Returns the details of all transform jobs. - *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#get-a-transform-jobs-details - transforms.search} - * - * @memberOf API-Transforms - * - * @param {object} [params] - * @param {number} [params.size] - Specifies the number of transforms to return. Default is 10. - * @param {number} [params.from] - The starting transform to return. Default is 0. - * @param {string} [params.search] - The search term to use to filter results. - * @param {string} [params.sortField] - The field to sort results with. - * @param {string} [params.sortDirection] - Specifies the direction to sort results in. Can be ASC or DESC. Default is ASC. - * - * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -TransformsApi.prototype.search = function (params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - - let path = ['_plugins', '_transform'].filter((c) => c != null).join('/'); - method = 'GET'; - body = body || ''; - - return this.transport.request({ method, path, querystring, body }, options, callback); -}; - -/** - * Returns a preview of what a transformed index would look like. - *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#preview-a-transform-jobs-results - transforms.preview} - * - * @memberOf API-Transforms - * - * @param {object} [params] - (Unused) - * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -TransformsApi.prototype.preview = function (params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - let { method, body, ...querystring } = params; - - let path = ['_plugins', '_transform', '_preview'].filter((c) => c != null).join('/'); - method = 'GET'; - body = body || ''; - - return this.transport.request({ method, path, querystring, body }, options, callback); -}; - -/** - * Delete an index transform. - *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#delete-a-transform-job - transforms.delete} - * - * @memberOf API-Transforms - * - * @param {object} params - * @param {string} params.id - Transform to delete - * - * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -TransformsApi.prototype.delete = function (params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - - let { method, body, id, ...querystring } = params; - id = encodePathParam(id); - - let path = ['_plugins', '_transform', id].filter((c) => c != null).join('/'); - method = 'DELETE'; - body = body || ''; - - return this.transport.request({ method, path, querystring, body }, options, callback); -}; - -/** - * Returns the status and metadata of a transform job. - *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#get-a-transform-jobs-details - transforms.get} - * - * @memberOf API-Transforms - * - * @param {object} params - * @param {string} params.id - Transform to access - * - * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -TransformsApi.prototype.get = function (params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - - let { method, body, id, ...querystring } = params; - id = encodePathParam(id); - - let path = ['_plugins', '_transform', id].filter((c) => c != null).join('/'); - method = 'GET'; - body = body || ''; - - return this.transport.request({ method, path, querystring, body }, options, callback); -}; - -/** - * Create an index transform, or update a transform if if_seq_no and if_primary_term are provided. - *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#create-a-transform-job - transforms.put} - * - * @memberOf API-Transforms - * - * @param {object} params - * @param {number} [params.if_seq_no] - Only perform the operation if the document has this sequence number. - * @param {number} [params.if_primary_term] - Only perform the operation if the document has this primary term. - * @param {string} params.id - Transform to create/update - * @param {object} [params.body] - * - * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -TransformsApi.prototype.put = function (params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - - let { method, body, id, ...querystring } = params; - id = encodePathParam(id); - - let path = ['_plugins', '_transform', id].filter((c) => c != null).join('/'); - method = 'PUT'; - body = body || ''; - - return this.transport.request({ method, path, querystring, body }, options, callback); -}; - -/** - * Returns the status and metadata of a transform job. - *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#get-the-status-of-a-transform-job - transforms.explain} - * - * @memberOf API-Transforms - * - * @param {object} params - * @param {string} params.id - Transform to explain - * - * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -TransformsApi.prototype.explain = function (params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - - let { method, body, id, ...querystring } = params; - id = encodePathParam(id); - - let path = ['_plugins', '_transform', id, '_explain'].filter((c) => c != null).join('/'); - method = 'GET'; - body = body || ''; - - return this.transport.request({ method, path, querystring, body }, options, callback); -}; - -/** - * Start transform. - *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#start-a-transform-job - transforms.start} - * - * @memberOf API-Transforms - * - * @param {object} params - * @param {string} params.id - Transform to start - * - * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -TransformsApi.prototype.start = function (params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - - let { method, body, id, ...querystring } = params; - id = encodePathParam(id); - - let path = ['_plugins', '_transform', id, '_start'].filter((c) => c != null).join('/'); - method = 'POST'; - body = body || ''; - - return this.transport.request({ method, path, querystring, body }, options, callback); -}; - -/** - * stop transform. - *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#stop-a-transform-job - transforms.stop} - * - * @memberOf API-Transforms - * - * @param {object} params - * @param {string} params.id - Transform to stop - * - * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} - * @param {function} [callback] - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -TransformsApi.prototype.stop = function (params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - - let { method, body, id, ...querystring } = params; - id = encodePathParam(id); - - let path = ['_plugins', '_transform', id, '_stop'].filter((c) => c != null).join('/'); - method = 'POST'; - body = body || ''; - - return this.transport.request({ method, path, querystring, body }, options, callback); -}; - -module.exports = TransformsApi; diff --git a/api/api/update.js b/api/api/update.js deleted file mode 100644 index 8f8f361b1..000000000 --- a/api/api/update.js +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'wait_for_active_shards', - '_source', - '_source_excludes', - '_source_exclude', - '_source_includes', - '_source_include', - 'lang', - 'refresh', - 'retry_on_conflict', - 'routing', - 'timeout', - 'if_seq_no', - 'if_primary_term', - 'require_alias', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - waitForActiveShards: 'wait_for_active_shards', - _sourceExcludes: '_source_excludes', - _sourceExclude: '_source_exclude', - _sourceIncludes: '_source_includes', - _sourceInclude: '_source_include', - retryOnConflict: 'retry_on_conflict', - ifSeqNo: 'if_seq_no', - ifPrimaryTerm: 'if_primary_term', - requireAlias: 'require_alias', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Update an existing document - *
See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/update-document/ OpenSearch - Update Document} - * - * @memberOf API-Document - * - * @param {Object} params - * @param {string} params.index - Name of the index. - * @param {string} params.id - A unique identifier to attach to the document. - * @param {Object} params.body - The request definition requires either `script` or partial `doc`. - * @param {number} [params.if_seq_no] - Only perform the update operation if the document has the specified sequence number. - * @param {number} [params.if_primary_term] - Only perform the update operation if the document has the specified primary term. - * @param {string} [params.lang=painless] - Language of the script. - * @param {string} [params.routing] - Value used to assign the index operation to a specific shard. - * @param {string} [params._source=true] - Whether to include the '_source' field in the response body. - * @param {string} [params._source_excludes] - A comma-separated list of source fields to exclude in the query response. - * @param {string} [params._source_includes] - A comma-separated list of source fields to include in the query response. - * @param {string} [params.refresh=false] - If true, OpenSearch refreshes shards to make the operation visible to searching. Valid options are 'true', 'false', and 'wait_for', which tells OpenSearch to wait for a refresh before executing the operation. - * @param {number} [params.retry_on_conflict=0] - The amount of times OpenSearch should retry the operation if there’s a document conflict. - * @param {string} [params.timeout=1m] - How long to wait for a response from the cluster. - * @param {string} [params.wait_for_active_shards] - The number of active shards that must be available before OpenSearch processes the request. Default is 1 (only the primary shard). Set to all or a positive integer. Values greater than 1 require replicas. For example, if you specify a value of 3, the index must have two replicas distributed across two additional nodes for the operation to succeed. - * @param {boolean} [params.require_alias=false] - Specifies whether the target index must be an index alias. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/update-document/#response Update Response} - */ -function updateApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.id == null) { - const err = new this[kConfigurationError]('Missing required parameter: id'); - return handleError(err, callback); - } - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - if (params.body == null) { - const err = new this[kConfigurationError]('Missing required parameter: body'); - return handleError(err, callback); - } - - let { method, body, id, index, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null && id != null) { - if (method == null) method = 'POST'; - path = - '/' + - encodeURIComponent(index) + - '/' + - encodeURIComponent(type) + - '/' + - encodeURIComponent(id) + - '/' + - '_update'; - } else { - if (method == null) method = 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_update' + '/' + encodeURIComponent(id); - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = updateApi; diff --git a/api/api/update_by_query.js b/api/api/update_by_query.js deleted file mode 100644 index 682516d61..000000000 --- a/api/api/update_by_query.js +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'analyzer', - 'analyze_wildcard', - 'default_operator', - 'df', - 'from', - 'ignore_unavailable', - 'allow_no_indices', - 'conflicts', - 'expand_wildcards', - 'lenient', - 'pipeline', - 'preference', - 'q', - 'routing', - 'scroll', - 'search_type', - 'search_timeout', - 'size', - 'max_docs', - 'sort', - '_source', - '_source_excludes', - '_source_exclude', - '_source_includes', - '_source_include', - 'terminate_after', - 'stats', - 'version', - 'version_type', - 'request_cache', - 'refresh', - 'timeout', - 'wait_for_active_shards', - 'scroll_size', - 'wait_for_completion', - 'requests_per_second', - 'slices', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - analyzeWildcard: 'analyze_wildcard', - defaultOperator: 'default_operator', - ignoreUnavailable: 'ignore_unavailable', - allowNoIndices: 'allow_no_indices', - expandWildcards: 'expand_wildcards', - searchType: 'search_type', - searchTimeout: 'search_timeout', - maxDocs: 'max_docs', - _sourceExcludes: '_source_excludes', - _sourceExclude: '_source_exclude', - _sourceIncludes: '_source_includes', - _sourceInclude: '_source_include', - terminateAfter: 'terminate_after', - versionType: 'version_type', - requestCache: 'request_cache', - waitForActiveShards: 'wait_for_active_shards', - scrollSize: 'scroll_size', - waitForCompletion: 'wait_for_completion', - requestsPerSecond: 'requests_per_second', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Run a script to update all documents that match the query. - *
See Also: {@link https://opensearch.org/docs/2.4/api-reference/document-apis/update-by-query/ OpenSearch - Update by query} - * - * @memberOf API-Document - * - * @param {Object} params - * @param {string} params.index - A comma-separated list of index names to search; use '_all' or empty string to perform the operation on all indices - * @param {Object} [params.body] - The search definition using the Query DSL - * @param {string} [params.analyzer] - The analyzer to use for the query string - * @param {boolean} [params.analyze_wildcard=false] - Specify whether wildcard and prefix queries should be analyzed (default: false) - * @param {string} [params.default_operator=OR] - The default operator for query string query (options: AND, OR) - * @param {string} [params.df] - The field to use as default where no field prefix is given in the query string - * @param {number} [params.from=0] - Starting offset - * @param {boolean} [params.ignore_unavailable=false] - Whether specified concrete indices should be ignored when unavailable (missing or closed) - * @param {boolean} [params.allow_no_indices=true] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes '_all' string or when no indices have been specified) - * @param {string} [params.conflicts=abort] - What to do when the update by query hits version conflicts? (options: abort, proceed) - * @param {string} [params.expand_wildcards=open] - Whether to expand wildcard expression to concrete indices that are open, closed or both. (options: open, closed, hidden, none, all) - * @param {boolean} [params.lenient=false] - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored - * @param {string} [params.pipeline] - Ingest pipeline to set on index requests made by this action. (default: none) - * @param {string} [params.preference] - Specify the node or shard the operation should be performed on (default: random) - * @param {string} [params.q] - Query in the Lucene query string syntax - * @param {string} [params.routing] - A comma-separated list of specific routing values - * @param {string} [params.scroll] - Specify how long a consistent view of the index should be maintained for scrolled search - * @param {string} [params.search_type=query_then_fetch] - Search operation type (options: query_then_fetch, dfs_query_then_fetch) - * @param {string} [params.search_timeout] - Explicit timeout for each search request. Defaults to no timeout. - * @param {number} [params.size] - Deprecated, please use 'max_docs' instead - * @param {number} [params.max_docs] - Maximum number of documents to process (default: all documents) - * @param {string} [params.sort] - A comma-separated list of : pairs - * @param {string} [params._source] - True or false to return the _source field or not, or a list of fields to return - * @param {string} [params._source_excludes] - A list of fields to exclude from the returned _source field - * @param {string} [params._source_includes] - A list of fields to extract and return from the _source field - * @param {number} [params.terminate_after] - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. - * @param {string} [params.stats] - Specific 'tag' of the request for logging and statistical purposes - * @param {boolean} [params.version] - Specify whether to return document version as part of a hit - * @param {boolean} [params.version_type] - Should the document increment the version number (internal) on hit or not (reindex) - * @param {boolean} [params.request_cache] - Specify if request cache should be used for this request or not, defaults to index level setting - * @param {boolean} [params.refresh=false] - Should the affected indexes be refreshed? - * @param {string} [params.timeout] - Time each individual bulk request should wait for shards that are unavailable. - * @param {string} [params.wait_for_active_shards=1] - Sets the number of shard copies that must be active before proceeding with the update by query operation. 1 means the primary shard only. Set to 'all' for all shard copies, otherwise set to any non-negative value less than or equal to the total number of copies for the shard (number of replicas + 1) - * @param {number} [params.scroll_size=1000] - Size on the scroll request powering the update by query - * @param {boolean} [params.wait_for_completion=true] - Should the request should block until the update by query operation is complete. - * @param {number} [params.requests_per_second=-1] - The throttle to set on this request in sub-requests per second. -1 means no throttle. - * @param {string} [params.slices=1] - The number of slices this task should be divided into. 1 means the task isn't sliced into subtasks. Can be set to 'auto'. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} {@link https://opensearch.org/docs/2.4/api-reference/document-apis/update-by-query/#response Update by query Response} - */ -function updateByQueryApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter: index'); - return handleError(err, callback); - } - - // check required url components - if (params.type != null && params.index == null) { - const err = new this[kConfigurationError]('Missing required parameter of the url: index'); - return handleError(err, callback); - } - - let { method, body, index, type, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (index != null && type != null) { - if (method == null) method = 'POST'; - path = - '/' + encodeURIComponent(index) + '/' + encodeURIComponent(type) + '/' + '_update_by_query'; - } else { - if (method == null) method = 'POST'; - path = '/' + encodeURIComponent(index) + '/' + '_update_by_query'; - } - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = updateByQueryApi; diff --git a/api/api/update_by_query_rethrottle.js b/api/api/update_by_query_rethrottle.js deleted file mode 100644 index 24e295904..000000000 --- a/api/api/update_by_query_rethrottle.js +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -/* eslint camelcase: 0 */ -/* eslint no-unused-vars: 0 */ - -const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils'); -const acceptedQuerystring = [ - 'requests_per_second', - 'pretty', - 'human', - 'error_trace', - 'source', - 'filter_path', -]; -const snakeCase = { - requestsPerSecond: 'requests_per_second', - errorTrace: 'error_trace', - filterPath: 'filter_path', -}; - -/** - * Changes the number of requests per second for a particular Update By Query operation. - * - * @memberOf API-Document - * - * @param {Object} params - * @param {string} params.task_id - The task id to rethrottle - * @param {number} params.requests_per_second - The throttle to set on this request in floating sub-requests per second. -1 means set no throttle. - * - * @param {Object} options - Options for {@link Transport#request} - * @param {function} callback - Callback that handles errors and response - * - * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} - */ -function updateByQueryRethrottleApi(params, options, callback) { - [params, options, callback] = normalizeArguments(params, options, callback); - - // check required parameters - if (params.task_id == null && params.taskId == null) { - const err = new this[kConfigurationError]('Missing required parameter: task_id or taskId'); - return handleError(err, callback); - } - if (params.requests_per_second == null && params.requestsPerSecond == null) { - const err = new this[kConfigurationError]( - 'Missing required parameter: requests_per_second or requestsPerSecond' - ); - return handleError(err, callback); - } - - let { method, body, taskId, task_id, ...querystring } = params; - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring); - - let path = ''; - if (method == null) method = 'POST'; - path = - '/' + '_update_by_query' + '/' + encodeURIComponent(task_id || taskId) + '/' + '_rethrottle'; - - // build request object - const request = { - method, - path, - body: body || '', - querystring, - }; - - return this.transport.request(request, options, callback); -} - -module.exports = updateByQueryRethrottleApi; diff --git a/api/cat/_api.js b/api/cat/_api.js new file mode 100644 index 000000000..cf5492002 --- /dev/null +++ b/api/cat/_api.js @@ -0,0 +1,61 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Cat */ + +function CatApi(bindObj) { + this.aliases = require('./aliases').bind(bindObj); + this.allocation = require('./allocation').bind(bindObj); + this.allPitSegments = require('./allPitSegments').bind(bindObj); + this.clusterManager = require('./clusterManager').bind(bindObj); + this.count = require('./count').bind(bindObj); + this.fielddata = require('./fielddata').bind(bindObj); + this.health = require('./health').bind(bindObj); + this.help = require('./help').bind(bindObj); + this.indices = require('./indices').bind(bindObj); + this.master = require('./master').bind(bindObj); + this.nodeattrs = require('./nodeattrs').bind(bindObj); + this.nodes = require('./nodes').bind(bindObj); + this.pendingTasks = require('./pendingTasks').bind(bindObj); + this.pitSegments = require('./pitSegments').bind(bindObj); + this.plugins = require('./plugins').bind(bindObj); + this.recovery = require('./recovery').bind(bindObj); + this.repositories = require('./repositories').bind(bindObj); + this.segmentReplication = require('./segmentReplication').bind(bindObj); + this.segments = require('./segments').bind(bindObj); + this.shards = require('./shards').bind(bindObj); + this.snapshots = require('./snapshots').bind(bindObj); + this.tasks = require('./tasks').bind(bindObj); + this.templates = require('./templates').bind(bindObj); + this.threadPool = require('./threadPool').bind(bindObj); + + // Deprecated: Use allPitSegments instead. + this.all_pit_segments = require('./allPitSegments').bind(bindObj); + // Deprecated: Use clusterManager instead. + this.cluster_manager = require('./clusterManager').bind(bindObj); + // Deprecated: Use pendingTasks instead. + this.pending_tasks = require('./pendingTasks').bind(bindObj); + // Deprecated: Use pitSegments instead. + this.pit_segments = require('./pitSegments').bind(bindObj); + // Deprecated: Use segmentReplication instead. + this.segment_replication = require('./segmentReplication').bind(bindObj); + // Deprecated: Use threadPool instead. + this.thread_pool = require('./threadPool').bind(bindObj); +} + +module.exports = CatApi; diff --git a/api/cat/aliases.d.ts b/api/cat/aliases.d.ts new file mode 100644 index 000000000..0918c29bf --- /dev/null +++ b/api/cat/aliases.d.ts @@ -0,0 +1,38 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cat_Aliases from '../_types/cat.aliases' + +export interface Cat_Aliases_Request extends Global.Params { + expand_wildcards?: Common.ExpandWildcards; + format?: string; + h?: string[]; + help?: boolean; + local?: boolean; + name?: Common.Names; + s?: string[]; + v?: boolean; +} + +export interface Cat_Aliases_Response extends ApiResponse { + body: Cat_Aliases_ResponseBody; +} + +export type Cat_Aliases_ResponseBody = Cat_Aliases.AliasesRecord[] + diff --git a/api/cat/aliases.js b/api/cat/aliases.js new file mode 100644 index 000000000..48bb5a178 --- /dev/null +++ b/api/cat/aliases.js @@ -0,0 +1,55 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Shows information about currently configured aliases to indices including filter and routing infos. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-aliases/ - cat.aliases} + * + * @memberOf API-Cat + * + * @param {object} [params] + * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {boolean} [params.help=false] - Return help information. + * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster-manager node. + * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {boolean} [params.v=false] - Verbose mode. Display column headers. + * @param {string} [params.name] - A comma-separated list of aliases to retrieve. Supports wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function aliasesFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = ['/_cat/aliases/', name].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = aliasesFunc; diff --git a/api/cat/allPitSegments.d.ts b/api/cat/allPitSegments.d.ts new file mode 100644 index 000000000..87e364a7b --- /dev/null +++ b/api/cat/allPitSegments.d.ts @@ -0,0 +1,36 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cat_Common from '../_types/cat._common' + +export interface Cat_AllPitSegments_Request extends Global.Params { + bytes?: Common.Bytes; + format?: string; + h?: string[]; + help?: boolean; + s?: string[]; + v?: boolean; +} + +export interface Cat_AllPitSegments_Response extends ApiResponse { + body: Cat_AllPitSegments_ResponseBody; +} + +export type Cat_AllPitSegments_ResponseBody = Cat_Common.CatPitSegmentsRecord[] + diff --git a/api/cat/allPitSegments.js b/api/cat/allPitSegments.js new file mode 100644 index 000000000..f1713e275 --- /dev/null +++ b/api/cat/allPitSegments.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Lists all active point-in-time segments. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/point-in-time-api/ - cat.all_pit_segments} + * + * @memberOf API-Cat + * + * @param {object} [params] + * @param {string} [params.bytes] - The unit in which to display byte values. + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {boolean} [params.help=false] - Return help information. + * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {boolean} [params.v=false] - Verbose mode. Display column headers. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function allPitSegmentsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_cat/pit_segments/_all'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = allPitSegmentsFunc; diff --git a/api/cat/allocation.d.ts b/api/cat/allocation.d.ts new file mode 100644 index 000000000..ad32879da --- /dev/null +++ b/api/cat/allocation.d.ts @@ -0,0 +1,40 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cat_Allocation from '../_types/cat.allocation' + +export interface Cat_Allocation_Request extends Global.Params { + bytes?: Common.Bytes; + cluster_manager_timeout?: Common.Duration; + format?: string; + h?: string[]; + help?: boolean; + local?: boolean; + master_timeout?: Common.Duration; + node_id?: Common.NodeIds; + s?: string[]; + v?: boolean; +} + +export interface Cat_Allocation_Response extends ApiResponse { + body: Cat_Allocation_ResponseBody; +} + +export type Cat_Allocation_ResponseBody = Cat_Allocation.AllocationRecord[] + diff --git a/api/cat/allocation.js b/api/cat/allocation.js new file mode 100644 index 000000000..b3c44e5f2 --- /dev/null +++ b/api/cat/allocation.js @@ -0,0 +1,57 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Provides a snapshot of how many shards are allocated to each data node and how much disk space they are using. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-allocation/ - cat.allocation} + * + * @memberOf API-Cat + * + * @param {object} [params] + * @param {string} [params.bytes] - The unit used to display byte values. + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {boolean} [params.help=false] - Return help information. + * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Operation timeout for connection to master node. + * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {boolean} [params.v=false] - Verbose mode. Display column headers. + * @param {string} [params.node_id] - Comma-separated list of node identifiers or names used to limit the returned information. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function allocationFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, node_id, ...querystring } = params; + node_id = parsePathParam(node_id); + + const path = ['/_cat/allocation/', node_id].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = allocationFunc; diff --git a/api/cat/clusterManager.d.ts b/api/cat/clusterManager.d.ts new file mode 100644 index 000000000..9366f3258 --- /dev/null +++ b/api/cat/clusterManager.d.ts @@ -0,0 +1,38 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cat_ClusterManager from '../_types/cat.cluster_manager' + +export interface Cat_ClusterManager_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + format?: string; + h?: string[]; + help?: boolean; + local?: boolean; + master_timeout?: Common.Duration; + s?: string[]; + v?: boolean; +} + +export interface Cat_ClusterManager_Response extends ApiResponse { + body: Cat_ClusterManager_ResponseBody; +} + +export type Cat_ClusterManager_ResponseBody = Cat_ClusterManager.ClusterManagerRecord[] + diff --git a/api/cat/clusterManager.js b/api/cat/clusterManager.js new file mode 100644 index 000000000..0be599a76 --- /dev/null +++ b/api/cat/clusterManager.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns information about the cluster-manager node. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/ - cat.cluster_manager} + * + * @memberOf API-Cat + * + * @param {object} [params] + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {boolean} [params.help=false] - Return help information. + * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Operation timeout for connection to master node. + * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {boolean} [params.v=false] - Verbose mode. Display column headers. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function clusterManagerFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_cat/cluster_manager'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = clusterManagerFunc; diff --git a/api/cat/count.d.ts b/api/cat/count.d.ts new file mode 100644 index 000000000..de359a3b8 --- /dev/null +++ b/api/cat/count.d.ts @@ -0,0 +1,36 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cat_Count from '../_types/cat.count' + +export interface Cat_Count_Request extends Global.Params { + format?: string; + h?: string[]; + help?: boolean; + index?: Common.Indices; + s?: string[]; + v?: boolean; +} + +export interface Cat_Count_Response extends ApiResponse { + body: Cat_Count_ResponseBody; +} + +export type Cat_Count_ResponseBody = Cat_Count.CountRecord[] + diff --git a/api/cat/count.js b/api/cat/count.js new file mode 100644 index 000000000..f68c0fc47 --- /dev/null +++ b/api/cat/count.js @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Provides quick access to the document count of the entire cluster, or individual indices. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-count/ - cat.count} + * + * @memberOf API-Cat + * + * @param {object} [params] + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {boolean} [params.help=false] - Return help information. + * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {boolean} [params.v=false] - Verbose mode. Display column headers. + * @param {string} [params.index] - Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function countFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/_cat/count/', index].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = countFunc; diff --git a/api/cat/fielddata.d.ts b/api/cat/fielddata.d.ts new file mode 100644 index 000000000..920256052 --- /dev/null +++ b/api/cat/fielddata.d.ts @@ -0,0 +1,37 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cat_Fielddata from '../_types/cat.fielddata' + +export interface Cat_Fielddata_Request extends Global.Params { + bytes?: Common.Bytes; + fields?: Common.Fields; + format?: string; + h?: string[]; + help?: boolean; + s?: string[]; + v?: boolean; +} + +export interface Cat_Fielddata_Response extends ApiResponse { + body: Cat_Fielddata_ResponseBody; +} + +export type Cat_Fielddata_ResponseBody = Cat_Fielddata.FielddataRecord[] + diff --git a/api/cat/fielddata.js b/api/cat/fielddata.js new file mode 100644 index 000000000..ac1df734b --- /dev/null +++ b/api/cat/fielddata.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Shows how much heap memory is currently being used by fielddata on every data node in the cluster. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-field-data/ - cat.fielddata} + * + * @memberOf API-Cat + * + * @param {object} [params] + * @param {string} [params.bytes] - The unit used to display byte values. + * @param {string} [params.fields] - Comma-separated list of fields used to limit returned information. To retrieve all fields, omit this parameter. + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {boolean} [params.help=false] - Return help information. + * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {boolean} [params.v=false] - Verbose mode. Display column headers. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function fielddataFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, fields, ...querystring } = params; + fields = parsePathParam(fields); + + const path = ['/_cat/fielddata/', fields].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = fielddataFunc; diff --git a/api/cat/health.d.ts b/api/cat/health.d.ts new file mode 100644 index 000000000..b2132dd86 --- /dev/null +++ b/api/cat/health.d.ts @@ -0,0 +1,37 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cat_Health from '../_types/cat.health' + +export interface Cat_Health_Request extends Global.Params { + format?: string; + h?: string[]; + help?: boolean; + s?: string[]; + time?: Common.TimeUnit; + ts?: boolean; + v?: boolean; +} + +export interface Cat_Health_Response extends ApiResponse { + body: Cat_Health_ResponseBody; +} + +export type Cat_Health_ResponseBody = Cat_Health.HealthRecord[] + diff --git a/api/cat/health.js b/api/cat/health.js new file mode 100644 index 000000000..c932cfe1c --- /dev/null +++ b/api/cat/health.js @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns a concise representation of the cluster health. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-health/ - cat.health} + * + * @memberOf API-Cat + * + * @param {object} [params] + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {boolean} [params.help=false] - Return help information. + * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {string} [params.time] - The unit used to display time values. + * @param {boolean} [params.ts=true] - If true, returns `HH:MM:SS` and Unix epoch timestamps. + * @param {boolean} [params.v=false] - Verbose mode. Display column headers. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function healthFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_cat/health'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = healthFunc; diff --git a/api/cat/help.d.ts b/api/cat/help.d.ts new file mode 100644 index 000000000..9c98ea885 --- /dev/null +++ b/api/cat/help.d.ts @@ -0,0 +1,27 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export type Cat_Help_Request = Global.Params & Record + +export interface Cat_Help_Response extends ApiResponse { + body: Cat_Help_ResponseBody; +} + +export type Cat_Help_ResponseBody = Record + diff --git a/api/cat/help.js b/api/cat/help.js new file mode 100644 index 000000000..a05d51f88 --- /dev/null +++ b/api/cat/help.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns help for the Cat APIs. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/index/ - cat.help} + * + * @memberOf API-Cat + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function helpFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_cat'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = helpFunc; diff --git a/api/cat/indices.d.ts b/api/cat/indices.d.ts new file mode 100644 index 000000000..4c23dfedb --- /dev/null +++ b/api/cat/indices.d.ts @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cat_Indices from '../_types/cat.indices' + +export interface Cat_Indices_Request extends Global.Params { + bytes?: Common.Bytes; + cluster_manager_timeout?: Common.Duration; + expand_wildcards?: Common.ExpandWildcards; + format?: string; + h?: string[]; + health?: Common.HealthStatus; + help?: boolean; + include_unloaded_segments?: boolean; + index?: Common.Indices; + local?: boolean; + master_timeout?: Common.Duration; + pri?: boolean; + s?: string[]; + time?: Common.TimeUnit; + v?: boolean; +} + +export interface Cat_Indices_Response extends ApiResponse { + body: Cat_Indices_ResponseBody; +} + +export type Cat_Indices_ResponseBody = Cat_Indices.IndicesRecord[] + diff --git a/api/cat/indices.js b/api/cat/indices.js new file mode 100644 index 000000000..eb82db649 --- /dev/null +++ b/api/cat/indices.js @@ -0,0 +1,62 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns information about indices: number of primaries and replicas, document counts, disk size, ... + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-indices/ - cat.indices} + * + * @memberOf API-Cat + * + * @param {object} [params] + * @param {string} [params.bytes] - The unit used to display byte values. + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.expand_wildcards] - The type of index that wildcard patterns can match. + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {string} [params.health] - The health status used to limit returned indices. By default, the response includes indices of any health status. + * @param {boolean} [params.help=false] - Return help information. + * @param {boolean} [params.include_unloaded_segments=false] - If true, the response includes information from segments that are not loaded into memory. + * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Operation timeout for connection to master node. + * @param {boolean} [params.pri=false] - If true, the response only includes information from primary shards. + * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {string} [params.time] - The unit used to display time values. + * @param {boolean} [params.v=false] - Verbose mode. Display column headers. + * @param {string} [params.index] - Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function indicesFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/_cat/indices/', index].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = indicesFunc; diff --git a/api/cat/master.d.ts b/api/cat/master.d.ts new file mode 100644 index 000000000..72782ce8f --- /dev/null +++ b/api/cat/master.d.ts @@ -0,0 +1,38 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cat_Master from '../_types/cat.master' + +export interface Cat_Master_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + format?: string; + h?: string[]; + help?: boolean; + local?: boolean; + master_timeout?: Common.Duration; + s?: string[]; + v?: boolean; +} + +export interface Cat_Master_Response extends ApiResponse { + body: Cat_Master_ResponseBody; +} + +export type Cat_Master_ResponseBody = Cat_Master.MasterRecord[] + diff --git a/api/cat/master.js b/api/cat/master.js new file mode 100644 index 000000000..8ae12c44b --- /dev/null +++ b/api/cat/master.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns information about the cluster-manager node. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-cluster_manager/ - cat.master} + * + * @memberOf API-Cat + * + * @param {object} [params] + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {boolean} [params.help=false] - Return help information. + * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Operation timeout for connection to master node. + * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {boolean} [params.v=false] - Verbose mode. Display column headers. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function masterFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_cat/master'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = masterFunc; diff --git a/api/cat/nodeattrs.d.ts b/api/cat/nodeattrs.d.ts new file mode 100644 index 000000000..90fc371a9 --- /dev/null +++ b/api/cat/nodeattrs.d.ts @@ -0,0 +1,38 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cat_Nodeattrs from '../_types/cat.nodeattrs' + +export interface Cat_Nodeattrs_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + format?: string; + h?: string[]; + help?: boolean; + local?: boolean; + master_timeout?: Common.Duration; + s?: string[]; + v?: boolean; +} + +export interface Cat_Nodeattrs_Response extends ApiResponse { + body: Cat_Nodeattrs_ResponseBody; +} + +export type Cat_Nodeattrs_ResponseBody = Cat_Nodeattrs.NodeAttributesRecord[] + diff --git a/api/cat/nodeattrs.js b/api/cat/nodeattrs.js new file mode 100644 index 000000000..02eecd3c5 --- /dev/null +++ b/api/cat/nodeattrs.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns information about custom node attributes. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-nodeattrs/ - cat.nodeattrs} + * + * @memberOf API-Cat + * + * @param {object} [params] + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {boolean} [params.help=false] - Return help information. + * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Operation timeout for connection to master node. + * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {boolean} [params.v=false] - Verbose mode. Display column headers. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function nodeattrsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_cat/nodeattrs'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = nodeattrsFunc; diff --git a/api/cat/nodes.d.ts b/api/cat/nodes.d.ts new file mode 100644 index 000000000..d7eeca57c --- /dev/null +++ b/api/cat/nodes.d.ts @@ -0,0 +1,41 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cat_Nodes from '../_types/cat.nodes' + +export interface Cat_Nodes_Request extends Global.Params { + bytes?: Common.Bytes; + cluster_manager_timeout?: Common.Duration; + format?: string; + full_id?: boolean | string; + h?: string[]; + help?: boolean; + local?: boolean; + master_timeout?: Common.Duration; + s?: string[]; + time?: Common.TimeUnit; + v?: boolean; +} + +export interface Cat_Nodes_Response extends ApiResponse { + body: Cat_Nodes_ResponseBody; +} + +export type Cat_Nodes_ResponseBody = Cat_Nodes.NodesRecord[] + diff --git a/api/cat/nodes.js b/api/cat/nodes.js new file mode 100644 index 000000000..6b3bc9ae3 --- /dev/null +++ b/api/cat/nodes.js @@ -0,0 +1,57 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns basic statistics about performance of cluster nodes. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-nodes/ - cat.nodes} + * + * @memberOf API-Cat + * + * @param {object} [params] + * @param {string} [params.bytes] - The unit used to display byte values. + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {string} [params.full_id=false] - If `true`, return the full node ID. If `false`, return the shortened node ID. + * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {boolean} [params.help=false] - Return help information. + * @param {boolean} [params.local=false] DEPRECATED - Return local information, do not retrieve the state from cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Operation timeout for connection to master node. + * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {string} [params.time] - The unit in which to display time values. + * @param {boolean} [params.v=false] - Verbose mode. Display column headers. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function nodesFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_cat/nodes'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = nodesFunc; diff --git a/api/cat/pendingTasks.d.ts b/api/cat/pendingTasks.d.ts new file mode 100644 index 000000000..c07cc7ad7 --- /dev/null +++ b/api/cat/pendingTasks.d.ts @@ -0,0 +1,39 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cat_PendingTasks from '../_types/cat.pending_tasks' + +export interface Cat_PendingTasks_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + format?: string; + h?: string[]; + help?: boolean; + local?: boolean; + master_timeout?: Common.Duration; + s?: string[]; + time?: Common.TimeUnit; + v?: boolean; +} + +export interface Cat_PendingTasks_Response extends ApiResponse { + body: Cat_PendingTasks_ResponseBody; +} + +export type Cat_PendingTasks_ResponseBody = Cat_PendingTasks.PendingTasksRecord[] + diff --git a/api/cat/pendingTasks.js b/api/cat/pendingTasks.js new file mode 100644 index 000000000..45cd214d1 --- /dev/null +++ b/api/cat/pendingTasks.js @@ -0,0 +1,55 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns a concise representation of the cluster pending tasks. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-pending-tasks/ - cat.pending_tasks} + * + * @memberOf API-Cat + * + * @param {object} [params] + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {boolean} [params.help=false] - Return help information. + * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Operation timeout for connection to master node. + * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {string} [params.time] - The unit in which to display time values. + * @param {boolean} [params.v=false] - Verbose mode. Display column headers. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function pendingTasksFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_cat/pending_tasks'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = pendingTasksFunc; diff --git a/api/cat/pitSegments.d.ts b/api/cat/pitSegments.d.ts new file mode 100644 index 000000000..377f3f135 --- /dev/null +++ b/api/cat/pitSegments.d.ts @@ -0,0 +1,41 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cat_Common from '../_types/cat._common' + +export interface Cat_PitSegments_Request extends Global.Params { + body?: Cat_PitSegments_RequestBody; + bytes?: Common.Bytes; + format?: string; + h?: string[]; + help?: boolean; + s?: string[]; + v?: boolean; +} + +export interface Cat_PitSegments_RequestBody { + pit_id: string[]; +} + +export interface Cat_PitSegments_Response extends ApiResponse { + body: Cat_PitSegments_ResponseBody; +} + +export type Cat_PitSegments_ResponseBody = Cat_Common.CatPitSegmentsRecord[] + diff --git a/api/cat/pitSegments.js b/api/cat/pitSegments.js new file mode 100644 index 000000000..f93aa0739 --- /dev/null +++ b/api/cat/pitSegments.js @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * List segments for one or several PITs. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/point-in-time-api/ - cat.pit_segments} + * + * @memberOf API-Cat + * + * @param {object} [params] + * @param {string} [params.bytes] - The unit in which to display byte values. + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {boolean} [params.help=false] - Return help information. + * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {boolean} [params.v=false] - Verbose mode. Display column headers. + * @param {object} [params.body] + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function pitSegmentsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_cat/pit_segments'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = pitSegmentsFunc; diff --git a/api/cat/plugins.d.ts b/api/cat/plugins.d.ts new file mode 100644 index 000000000..70250f47a --- /dev/null +++ b/api/cat/plugins.d.ts @@ -0,0 +1,38 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cat_Plugins from '../_types/cat.plugins' + +export interface Cat_Plugins_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + format?: string; + h?: string[]; + help?: boolean; + local?: boolean; + master_timeout?: Common.Duration; + s?: string[]; + v?: boolean; +} + +export interface Cat_Plugins_Response extends ApiResponse { + body: Cat_Plugins_ResponseBody; +} + +export type Cat_Plugins_ResponseBody = Cat_Plugins.PluginsRecord[] + diff --git a/api/cat/plugins.js b/api/cat/plugins.js new file mode 100644 index 000000000..79ce2b2d6 --- /dev/null +++ b/api/cat/plugins.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns information about installed plugins across nodes node. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-plugins/ - cat.plugins} + * + * @memberOf API-Cat + * + * @param {object} [params] + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {boolean} [params.help=false] - Return help information. + * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Operation timeout for connection to master node. + * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {boolean} [params.v=false] - Verbose mode. Display column headers. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function pluginsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_cat/plugins'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = pluginsFunc; diff --git a/api/cat/recovery.d.ts b/api/cat/recovery.d.ts new file mode 100644 index 000000000..f38cff916 --- /dev/null +++ b/api/cat/recovery.d.ts @@ -0,0 +1,40 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cat_Recovery from '../_types/cat.recovery' + +export interface Cat_Recovery_Request extends Global.Params { + active_only?: boolean; + bytes?: Common.Bytes; + detailed?: boolean; + format?: string; + h?: string[]; + help?: boolean; + index?: Common.Indices; + s?: string[]; + time?: Common.TimeUnit; + v?: boolean; +} + +export interface Cat_Recovery_Response extends ApiResponse { + body: Cat_Recovery_ResponseBody; +} + +export type Cat_Recovery_ResponseBody = Cat_Recovery.RecoveryRecord[] + diff --git a/api/cat/recovery.js b/api/cat/recovery.js new file mode 100644 index 000000000..743335f6b --- /dev/null +++ b/api/cat/recovery.js @@ -0,0 +1,57 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns information about index shard recoveries, both on-going completed. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-plugins/ - cat.recovery} + * + * @memberOf API-Cat + * + * @param {object} [params] + * @param {boolean} [params.active_only=false] - If `true`, the response only includes ongoing shard recoveries. + * @param {string} [params.bytes] - The unit used to display byte values. + * @param {boolean} [params.detailed=false] - If `true`, the response includes detailed information about shard recoveries. + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {boolean} [params.help=false] - Return help information. + * @param {string} [params.index] - A comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. + * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {string} [params.time] - The unit in which to display time values. + * @param {boolean} [params.v=false] - Verbose mode. Display column headers. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function recoveryFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/_cat/recovery/', index].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = recoveryFunc; diff --git a/api/cat/repositories.d.ts b/api/cat/repositories.d.ts new file mode 100644 index 000000000..8de62a7b7 --- /dev/null +++ b/api/cat/repositories.d.ts @@ -0,0 +1,38 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cat_Repositories from '../_types/cat.repositories' + +export interface Cat_Repositories_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + format?: string; + h?: string[]; + help?: boolean; + local?: boolean; + master_timeout?: Common.Duration; + s?: string[]; + v?: boolean; +} + +export interface Cat_Repositories_Response extends ApiResponse { + body: Cat_Repositories_ResponseBody; +} + +export type Cat_Repositories_ResponseBody = Cat_Repositories.RepositoriesRecord[] + diff --git a/api/cat/repositories.js b/api/cat/repositories.js new file mode 100644 index 000000000..395d9706a --- /dev/null +++ b/api/cat/repositories.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns information about snapshot repositories registered in the cluster. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-repositories/ - cat.repositories} + * + * @memberOf API-Cat + * + * @param {object} [params] + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {boolean} [params.help=false] - Return help information. + * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Operation timeout for connection to master node. + * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {boolean} [params.v=false] - Verbose mode. Display column headers. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function repositoriesFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_cat/repositories'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = repositoriesFunc; diff --git a/api/cat/segmentReplication.d.ts b/api/cat/segmentReplication.d.ts new file mode 100644 index 000000000..46fbcac7c --- /dev/null +++ b/api/cat/segmentReplication.d.ts @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cat_Common from '../_types/cat._common' + +export interface Cat_SegmentReplication_Request extends Global.Params { + active_only?: boolean; + allow_no_indices?: boolean; + bytes?: Common.Bytes; + completed_only?: boolean; + detailed?: boolean; + expand_wildcards?: Common.ExpandWildcards; + format?: string; + h?: string[]; + help?: boolean; + ignore_throttled?: boolean; + ignore_unavailable?: boolean; + index?: string[]; + s?: string[]; + shards?: string[]; + time?: Common.TimeUnit; + timeout?: Common.Duration; + v?: boolean; +} + +export interface Cat_SegmentReplication_Response extends ApiResponse { + body: Cat_SegmentReplication_ResponseBody; +} + +export type Cat_SegmentReplication_ResponseBody = Cat_Common.CatSegmentReplicationRecord[] + diff --git a/api/cat/segmentReplication.js b/api/cat/segmentReplication.js new file mode 100644 index 000000000..d3322d6d1 --- /dev/null +++ b/api/cat/segmentReplication.js @@ -0,0 +1,64 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns information about both on-going and latest completed Segment Replication events. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-segment-replication/ - cat.segment_replication} + * + * @memberOf API-Cat + * + * @param {object} [params] + * @param {boolean} [params.active_only=false] - If `true`, the response only includes ongoing segment replication events. + * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). + * @param {string} [params.bytes] - The unit in which to display byte values. + * @param {boolean} [params.completed_only=false] - If `true`, the response only includes latest completed segment replication events. + * @param {boolean} [params.detailed=false] - If `true`, the response includes detailed information about segment replications. + * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {boolean} [params.help=false] - Return help information. + * @param {boolean} [params.ignore_throttled] - Whether specified concrete, expanded or aliased indices should be ignored when throttled. + * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed). + * @param {array} [params.index] - Comma-separated list or wildcard expression of index names to limit the returned information. + * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {array} [params.shards] - Comma-separated list of shards to display. + * @param {string} [params.time] - The unit in which to display time values. + * @param {string} [params.timeout] - Operation timeout. + * @param {boolean} [params.v=false] - Verbose mode. Display column headers. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function segmentReplicationFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/_cat/segment_replication/', index].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = segmentReplicationFunc; diff --git a/api/cat/segments.d.ts b/api/cat/segments.d.ts new file mode 100644 index 000000000..c6a9fa7f0 --- /dev/null +++ b/api/cat/segments.d.ts @@ -0,0 +1,39 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cat_Segments from '../_types/cat.segments' + +export interface Cat_Segments_Request extends Global.Params { + bytes?: Common.Bytes; + cluster_manager_timeout?: Common.Duration; + format?: string; + h?: string[]; + help?: boolean; + index?: Common.Indices; + master_timeout?: Common.Duration; + s?: string[]; + v?: boolean; +} + +export interface Cat_Segments_Response extends ApiResponse { + body: Cat_Segments_ResponseBody; +} + +export type Cat_Segments_ResponseBody = Cat_Segments.SegmentsRecord[] + diff --git a/api/cat/segments.js b/api/cat/segments.js new file mode 100644 index 000000000..7f16229f7 --- /dev/null +++ b/api/cat/segments.js @@ -0,0 +1,56 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Provides low-level information about the segments in the shards of an index. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-segments/ - cat.segments} + * + * @memberOf API-Cat + * + * @param {object} [params] + * @param {string} [params.bytes] - The unit used to display byte values. + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {boolean} [params.help=false] - Return help information. + * @param {string} [params.master_timeout] DEPRECATED - Operation timeout for connection to master node. + * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {boolean} [params.v=false] - Verbose mode. Display column headers. + * @param {string} [params.index] - A comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function segmentsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/_cat/segments/', index].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = segmentsFunc; diff --git a/api/cat/shards.d.ts b/api/cat/shards.d.ts new file mode 100644 index 000000000..78b4fca1f --- /dev/null +++ b/api/cat/shards.d.ts @@ -0,0 +1,41 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cat_Shards from '../_types/cat.shards' + +export interface Cat_Shards_Request extends Global.Params { + bytes?: Common.Bytes; + cluster_manager_timeout?: Common.Duration; + format?: string; + h?: string[]; + help?: boolean; + index?: Common.Indices; + local?: boolean; + master_timeout?: Common.Duration; + s?: string[]; + time?: Common.TimeUnit; + v?: boolean; +} + +export interface Cat_Shards_Response extends ApiResponse { + body: Cat_Shards_ResponseBody; +} + +export type Cat_Shards_ResponseBody = Cat_Shards.ShardsRecord[] + diff --git a/api/cat/shards.js b/api/cat/shards.js new file mode 100644 index 000000000..0c086d2a7 --- /dev/null +++ b/api/cat/shards.js @@ -0,0 +1,58 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Provides a detailed view of shard allocation on nodes. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-shards/ - cat.shards} + * + * @memberOf API-Cat + * + * @param {object} [params] + * @param {string} [params.bytes] - The unit used to display byte values. + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {boolean} [params.help=false] - Return help information. + * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Operation timeout for connection to master node. + * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {string} [params.time] - The unit in which to display time values. + * @param {boolean} [params.v=false] - Verbose mode. Display column headers. + * @param {string} [params.index] - A comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function shardsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/_cat/shards/', index].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = shardsFunc; diff --git a/api/cat/snapshots.d.ts b/api/cat/snapshots.d.ts new file mode 100644 index 000000000..0c4f06451 --- /dev/null +++ b/api/cat/snapshots.d.ts @@ -0,0 +1,40 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cat_Snapshots from '../_types/cat.snapshots' + +export interface Cat_Snapshots_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + format?: string; + h?: string[]; + help?: boolean; + ignore_unavailable?: boolean; + master_timeout?: Common.Duration; + repository?: Common.Names; + s?: string[]; + time?: Common.TimeUnit; + v?: boolean; +} + +export interface Cat_Snapshots_Response extends ApiResponse { + body: Cat_Snapshots_ResponseBody; +} + +export type Cat_Snapshots_ResponseBody = Cat_Snapshots.SnapshotsRecord[] + diff --git a/api/cat/snapshots.js b/api/cat/snapshots.js new file mode 100644 index 000000000..c456c63ac --- /dev/null +++ b/api/cat/snapshots.js @@ -0,0 +1,57 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns all snapshots in a specific repository. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-snapshots/ - cat.snapshots} + * + * @memberOf API-Cat + * + * @param {object} [params] + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {boolean} [params.help=false] - Return help information. + * @param {boolean} [params.ignore_unavailable=false] - If `true`, the response does not include information from unavailable snapshots. + * @param {string} [params.master_timeout] DEPRECATED - Operation timeout for connection to master node. + * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {string} [params.time] - The unit in which to display time values. + * @param {boolean} [params.v=false] - Verbose mode. Display column headers. + * @param {string} [params.repository] - A comma-separated list of snapshot repositories used to limit the request. Accepts wildcard expressions. `_all` returns all repositories. If any repository fails during the request, OpenSearch returns an error. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function snapshotsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, repository, ...querystring } = params; + repository = parsePathParam(repository); + + const path = ['/_cat/snapshots/', repository].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = snapshotsFunc; diff --git a/api/cat/tasks.d.ts b/api/cat/tasks.d.ts new file mode 100644 index 000000000..c1985c4f3 --- /dev/null +++ b/api/cat/tasks.d.ts @@ -0,0 +1,40 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cat_Tasks from '../_types/cat.tasks' + +export interface Cat_Tasks_Request extends Global.Params { + actions?: string[]; + detailed?: boolean; + format?: string; + h?: string[]; + help?: boolean; + nodes?: string[]; + parent_task_id?: string; + s?: string[]; + time?: Common.TimeUnit; + v?: boolean; +} + +export interface Cat_Tasks_Response extends ApiResponse { + body: Cat_Tasks_ResponseBody; +} + +export type Cat_Tasks_ResponseBody = Cat_Tasks.TasksRecord[] + diff --git a/api/cat/tasks.js b/api/cat/tasks.js new file mode 100644 index 000000000..b5cdbe8a0 --- /dev/null +++ b/api/cat/tasks.js @@ -0,0 +1,56 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns information about the tasks currently executing on one or more nodes in the cluster. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-tasks/ - cat.tasks} + * + * @memberOf API-Cat + * + * @param {object} [params] + * @param {array} [params.actions] - The task action names, which are used to limit the response. + * @param {boolean} [params.detailed=false] - If `true`, the response includes detailed information about shard recoveries. + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {boolean} [params.help=false] - Return help information. + * @param {array} [params.nodes] - Comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. + * @param {string} [params.parent_task_id] - The parent task identifier, which is used to limit the response. + * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {string} [params.time] - The unit in which to display time values. + * @param {boolean} [params.v=false] - Verbose mode. Display column headers. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function tasksFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_cat/tasks'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = tasksFunc; diff --git a/api/cat/templates.d.ts b/api/cat/templates.d.ts new file mode 100644 index 000000000..b95d79d71 --- /dev/null +++ b/api/cat/templates.d.ts @@ -0,0 +1,39 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cat_Templates from '../_types/cat.templates' + +export interface Cat_Templates_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + format?: string; + h?: string[]; + help?: boolean; + local?: boolean; + master_timeout?: Common.Duration; + name?: Common.Name; + s?: string[]; + v?: boolean; +} + +export interface Cat_Templates_Response extends ApiResponse { + body: Cat_Templates_ResponseBody; +} + +export type Cat_Templates_ResponseBody = Cat_Templates.TemplatesRecord[] + diff --git a/api/cat/templates.js b/api/cat/templates.js new file mode 100644 index 000000000..032eab612 --- /dev/null +++ b/api/cat/templates.js @@ -0,0 +1,56 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns information about existing templates. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-templates/ - cat.templates} + * + * @memberOf API-Cat + * + * @param {object} [params] + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {boolean} [params.help=false] - Return help information. + * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Operation timeout for connection to master node. + * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {boolean} [params.v=false] - Verbose mode. Display column headers. + * @param {string} [params.name] - The name of the template to return. Accepts wildcard expressions. If omitted, all templates are returned. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function templatesFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = ['/_cat/templates/', name].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = templatesFunc; diff --git a/api/cat/threadPool.d.ts b/api/cat/threadPool.d.ts new file mode 100644 index 000000000..e948de362 --- /dev/null +++ b/api/cat/threadPool.d.ts @@ -0,0 +1,40 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cat_ThreadPool from '../_types/cat.thread_pool' + +export interface Cat_ThreadPool_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + format?: string; + h?: string[]; + help?: boolean; + local?: boolean; + master_timeout?: Common.Duration; + s?: string[]; + size?: number; + thread_pool_patterns?: Common.Names; + v?: boolean; +} + +export interface Cat_ThreadPool_Response extends ApiResponse { + body: Cat_ThreadPool_ResponseBody; +} + +export type Cat_ThreadPool_ResponseBody = Cat_ThreadPool.ThreadPoolRecord[] + diff --git a/api/cat/threadPool.js b/api/cat/threadPool.js new file mode 100644 index 000000000..f7d126349 --- /dev/null +++ b/api/cat/threadPool.js @@ -0,0 +1,58 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns cluster-wide thread pool statistics per node. +By default the active, queue and rejected statistics are returned for all thread pools. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cat/cat-thread-pool/ - cat.thread_pool} + * + * @memberOf API-Cat + * + * @param {object} [params] + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {array} [params.h] - Comma-separated list of column names to display. + * @param {boolean} [params.help=false] - Return help information. + * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Operation timeout for connection to master node. + * @param {array} [params.s] - Comma-separated list of column names or column aliases to sort by. + * @param {integer} [params.size] - The multiplier in which to display values. + * @param {boolean} [params.v=false] - Verbose mode. Display column headers. + * @param {string} [params.thread_pool_patterns] - A comma-separated list of thread pool names used to limit the request. Accepts wildcard expressions. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function threadPoolFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, thread_pool_patterns, ...querystring } = params; + thread_pool_patterns = parsePathParam(thread_pool_patterns); + + const path = ['/_cat/thread_pool/', thread_pool_patterns].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = threadPoolFunc; diff --git a/api/cluster/_api.js b/api/cluster/_api.js new file mode 100644 index 000000000..00268d829 --- /dev/null +++ b/api/cluster/_api.js @@ -0,0 +1,80 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Cluster */ + +function ClusterApi(bindObj) { + this.allocationExplain = require('./allocationExplain').bind(bindObj); + this.deleteComponentTemplate = require('./deleteComponentTemplate').bind(bindObj); + this.deleteDecommissionAwareness = require('./deleteDecommissionAwareness').bind(bindObj); + this.deleteVotingConfigExclusions = require('./deleteVotingConfigExclusions').bind(bindObj); + this.deleteWeightedRouting = require('./deleteWeightedRouting').bind(bindObj); + this.existsComponentTemplate = require('./existsComponentTemplate').bind(bindObj); + this.getComponentTemplate = require('./getComponentTemplate').bind(bindObj); + this.getDecommissionAwareness = require('./getDecommissionAwareness').bind(bindObj); + this.getSettings = require('./getSettings').bind(bindObj); + this.getWeightedRouting = require('./getWeightedRouting').bind(bindObj); + this.health = require('./health').bind(bindObj); + this.pendingTasks = require('./pendingTasks').bind(bindObj); + this.postVotingConfigExclusions = require('./postVotingConfigExclusions').bind(bindObj); + this.putComponentTemplate = require('./putComponentTemplate').bind(bindObj); + this.putDecommissionAwareness = require('./putDecommissionAwareness').bind(bindObj); + this.putSettings = require('./putSettings').bind(bindObj); + this.putWeightedRouting = require('./putWeightedRouting').bind(bindObj); + this.remoteInfo = require('./remoteInfo').bind(bindObj); + this.reroute = require('./reroute').bind(bindObj); + this.state = require('./state').bind(bindObj); + this.stats = require('./stats').bind(bindObj); + + // Deprecated: Use allocationExplain instead. + this.allocation_explain = require('./allocationExplain').bind(bindObj); + // Deprecated: Use deleteComponentTemplate instead. + this.delete_component_template = require('./deleteComponentTemplate').bind(bindObj); + // Deprecated: Use deleteDecommissionAwareness instead. + this.delete_decommission_awareness = require('./deleteDecommissionAwareness').bind(bindObj); + // Deprecated: Use deleteVotingConfigExclusions instead. + this.delete_voting_config_exclusions = require('./deleteVotingConfigExclusions').bind(bindObj); + // Deprecated: Use deleteWeightedRouting instead. + this.delete_weighted_routing = require('./deleteWeightedRouting').bind(bindObj); + // Deprecated: Use existsComponentTemplate instead. + this.exists_component_template = require('./existsComponentTemplate').bind(bindObj); + // Deprecated: Use getComponentTemplate instead. + this.get_component_template = require('./getComponentTemplate').bind(bindObj); + // Deprecated: Use getDecommissionAwareness instead. + this.get_decommission_awareness = require('./getDecommissionAwareness').bind(bindObj); + // Deprecated: Use getSettings instead. + this.get_settings = require('./getSettings').bind(bindObj); + // Deprecated: Use getWeightedRouting instead. + this.get_weighted_routing = require('./getWeightedRouting').bind(bindObj); + // Deprecated: Use pendingTasks instead. + this.pending_tasks = require('./pendingTasks').bind(bindObj); + // Deprecated: Use postVotingConfigExclusions instead. + this.post_voting_config_exclusions = require('./postVotingConfigExclusions').bind(bindObj); + // Deprecated: Use putComponentTemplate instead. + this.put_component_template = require('./putComponentTemplate').bind(bindObj); + // Deprecated: Use putDecommissionAwareness instead. + this.put_decommission_awareness = require('./putDecommissionAwareness').bind(bindObj); + // Deprecated: Use putSettings instead. + this.put_settings = require('./putSettings').bind(bindObj); + // Deprecated: Use putWeightedRouting instead. + this.put_weighted_routing = require('./putWeightedRouting').bind(bindObj); + // Deprecated: Use remoteInfo instead. + this.remote_info = require('./remoteInfo').bind(bindObj); +} + +module.exports = ClusterApi; diff --git a/api/cluster/allocationExplain.d.ts b/api/cluster/allocationExplain.d.ts new file mode 100644 index 000000000..017db1c38 --- /dev/null +++ b/api/cluster/allocationExplain.d.ts @@ -0,0 +1,66 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cluster_AllocationExplain from '../_types/cluster.allocation_explain' + +export interface Cluster_AllocationExplain_Request extends Global.Params { + body?: Cluster_AllocationExplain_RequestBody; + include_disk_info?: boolean; + include_yes_decisions?: boolean; +} + +export interface Cluster_AllocationExplain_RequestBody { + current_node?: string; + index?: Common.IndexName; + primary?: boolean; + shard?: number; +} + +export interface Cluster_AllocationExplain_Response extends ApiResponse { + body: Cluster_AllocationExplain_ResponseBody; +} + +export interface Cluster_AllocationExplain_ResponseBody { + allocate_explanation?: string; + allocation_delay?: Common.Duration; + allocation_delay_in_millis?: Common.DurationValueUnitMillis; + can_allocate?: Cluster_AllocationExplain.Decision; + can_move_to_other_node?: Cluster_AllocationExplain.Decision; + can_rebalance_cluster?: Cluster_AllocationExplain.Decision; + can_rebalance_cluster_decisions?: Cluster_AllocationExplain.AllocationDecision[]; + can_rebalance_to_other_node?: Cluster_AllocationExplain.Decision; + can_remain_decisions?: Cluster_AllocationExplain.AllocationDecision[]; + can_remain_on_current_node?: Cluster_AllocationExplain.Decision; + cluster_info?: Cluster_AllocationExplain.ClusterInfo; + configured_delay?: Common.Duration; + configured_delay_in_millis?: Common.DurationValueUnitMillis; + current_node?: Cluster_AllocationExplain.CurrentNode; + current_state: string; + index: Common.IndexName; + move_explanation?: string; + node_allocation_decisions?: Cluster_AllocationExplain.NodeAllocationExplanation[]; + note?: string; + primary: boolean; + rebalance_explanation?: string; + remaining_delay?: Common.Duration; + remaining_delay_in_millis?: Common.DurationValueUnitMillis; + shard: number; + unassigned_info?: Cluster_AllocationExplain.UnassignedInformation; +} + diff --git a/api/cluster/allocationExplain.js b/api/cluster/allocationExplain.js new file mode 100644 index 000000000..2652de58e --- /dev/null +++ b/api/cluster/allocationExplain.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Provides explanations for shard allocations in the cluster. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-allocation/ - cluster.allocation_explain} + * + * @memberOf API-Cluster + * + * @param {object} [params] + * @param {boolean} [params.include_disk_info=false] - If true, returns information about disk usage and shard sizes. + * @param {boolean} [params.include_yes_decisions=false] - If true, returns YES decisions in explanation. + * @param {object} [params.body] - The index, shard, and primary flag to explain. Empty means 'explain the first unassigned shard' + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function allocationExplainFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_cluster/allocation/explain'; + const method = body ? 'POST' : 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = allocationExplainFunc; diff --git a/api/cluster/deleteComponentTemplate.d.ts b/api/cluster/deleteComponentTemplate.d.ts new file mode 100644 index 000000000..e144ce471 --- /dev/null +++ b/api/cluster/deleteComponentTemplate.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Cluster_DeleteComponentTemplate_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + master_timeout?: Common.Duration; + name: Common.Name; + timeout?: Common.Duration; +} + +export interface Cluster_DeleteComponentTemplate_Response extends ApiResponse { + body: Cluster_DeleteComponentTemplate_ResponseBody; +} + +export type Cluster_DeleteComponentTemplate_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/cluster/deleteComponentTemplate.js b/api/cluster/deleteComponentTemplate.js new file mode 100644 index 000000000..08add382f --- /dev/null +++ b/api/cluster/deleteComponentTemplate.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Deletes a component template. + *
See Also: {@link https://opensearch.org/docs/latest - cluster.delete_component_template} + * + * @memberOf API-Cluster + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {string} params.name - Name of the component template to delete. Wildcard (*) expressions are supported. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteComponentTemplateFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.name == null) return handleMissingParam('name', this, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = '/_component_template/' + name; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteComponentTemplateFunc; diff --git a/api/cluster/deleteDecommissionAwareness.d.ts b/api/cluster/deleteDecommissionAwareness.d.ts new file mode 100644 index 000000000..ee279a2cc --- /dev/null +++ b/api/cluster/deleteDecommissionAwareness.d.ts @@ -0,0 +1,27 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export type Cluster_DeleteDecommissionAwareness_Request = Global.Params & Record + +export interface Cluster_DeleteDecommissionAwareness_Response extends ApiResponse { + body: Cluster_DeleteDecommissionAwareness_ResponseBody; +} + +export type Cluster_DeleteDecommissionAwareness_ResponseBody = Record + diff --git a/api/cluster/deleteDecommissionAwareness.js b/api/cluster/deleteDecommissionAwareness.js new file mode 100644 index 000000000..d40c60478 --- /dev/null +++ b/api/cluster/deleteDecommissionAwareness.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Delete any existing decommission. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-decommission/#example-decommissioning-and-recommissioning-a-zone - cluster.delete_decommission_awareness} + * + * @memberOf API-Cluster + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteDecommissionAwarenessFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_cluster/decommission/awareness'; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteDecommissionAwarenessFunc; diff --git a/api/cluster/deleteVotingConfigExclusions.d.ts b/api/cluster/deleteVotingConfigExclusions.d.ts new file mode 100644 index 000000000..b44af7a25 --- /dev/null +++ b/api/cluster/deleteVotingConfigExclusions.d.ts @@ -0,0 +1,29 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface Cluster_DeleteVotingConfigExclusions_Request extends Global.Params { + wait_for_removal?: boolean; +} + +export interface Cluster_DeleteVotingConfigExclusions_Response extends ApiResponse { + body: Cluster_DeleteVotingConfigExclusions_ResponseBody; +} + +export type Cluster_DeleteVotingConfigExclusions_ResponseBody = Record + diff --git a/api/cluster/deleteVotingConfigExclusions.js b/api/cluster/deleteVotingConfigExclusions.js new file mode 100644 index 000000000..27480bd76 --- /dev/null +++ b/api/cluster/deleteVotingConfigExclusions.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Clears cluster voting config exclusions. + *
See Also: {@link https://opensearch.org/docs/latest - cluster.delete_voting_config_exclusions} + * + * @memberOf API-Cluster + * + * @param {object} [params] + * @param {boolean} [params.wait_for_removal=true] - Specifies whether to wait for all excluded nodes to be removed from the cluster before clearing the voting configuration exclusions list. Defaults to true, meaning that all excluded nodes must be removed from the cluster before this API takes any action. If set to false then the voting configuration exclusions list is cleared even if some excluded nodes are still in the cluster. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteVotingConfigExclusionsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_cluster/voting_config_exclusions'; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteVotingConfigExclusionsFunc; diff --git a/api/cluster/deleteWeightedRouting.d.ts b/api/cluster/deleteWeightedRouting.d.ts new file mode 100644 index 000000000..dda305c10 --- /dev/null +++ b/api/cluster/deleteWeightedRouting.d.ts @@ -0,0 +1,27 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export type Cluster_DeleteWeightedRouting_Request = Global.Params & Record + +export interface Cluster_DeleteWeightedRouting_Response extends ApiResponse { + body: Cluster_DeleteWeightedRouting_ResponseBody; +} + +export type Cluster_DeleteWeightedRouting_ResponseBody = Record + diff --git a/api/cluster/deleteWeightedRouting.js b/api/cluster/deleteWeightedRouting.js new file mode 100644 index 000000000..48e85d989 --- /dev/null +++ b/api/cluster/deleteWeightedRouting.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Delete weighted shard routing weights. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-awareness/#example-deleting-weights - cluster.delete_weighted_routing} + * + * @memberOf API-Cluster + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteWeightedRoutingFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_cluster/routing/awareness/weights'; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteWeightedRoutingFunc; diff --git a/api/cluster/existsComponentTemplate.d.ts b/api/cluster/existsComponentTemplate.d.ts new file mode 100644 index 000000000..7ca241523 --- /dev/null +++ b/api/cluster/existsComponentTemplate.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Cluster_ExistsComponentTemplate_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + local?: boolean; + master_timeout?: Common.Duration; + name: Common.Name; +} + +export interface Cluster_ExistsComponentTemplate_Response extends ApiResponse { + body: Cluster_ExistsComponentTemplate_ResponseBody; +} + +export type Cluster_ExistsComponentTemplate_ResponseBody = Record + diff --git a/api/cluster/existsComponentTemplate.js b/api/cluster/existsComponentTemplate.js new file mode 100644 index 000000000..e42445ccb --- /dev/null +++ b/api/cluster/existsComponentTemplate.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Returns information about whether a particular component template exist. + *
See Also: {@link https://opensearch.org/docs/latest - cluster.exists_component_template} + * + * @memberOf API-Cluster + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {boolean} [params.local=false] - If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} params.name - Name of the component template to check existence of. Wildcard (*) expressions are supported. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function existsComponentTemplateFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.name == null) return handleMissingParam('name', this, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = '/_component_template/' + name; + const method = 'HEAD'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = existsComponentTemplateFunc; diff --git a/api/cluster/getComponentTemplate.d.ts b/api/cluster/getComponentTemplate.d.ts new file mode 100644 index 000000000..98c00d850 --- /dev/null +++ b/api/cluster/getComponentTemplate.d.ts @@ -0,0 +1,36 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cluster_Common from '../_types/cluster._common' + +export interface Cluster_GetComponentTemplate_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + local?: boolean; + master_timeout?: Common.Duration; + name?: Common.Name; +} + +export interface Cluster_GetComponentTemplate_Response extends ApiResponse { + body: Cluster_GetComponentTemplate_ResponseBody; +} + +export interface Cluster_GetComponentTemplate_ResponseBody { + component_templates: Cluster_Common.ComponentTemplate[]; +} + diff --git a/api/cluster/getComponentTemplate.js b/api/cluster/getComponentTemplate.js new file mode 100644 index 000000000..f318d1f12 --- /dev/null +++ b/api/cluster/getComponentTemplate.js @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns one or more component templates. + *
See Also: {@link https://opensearch.org/docs/latest - cluster.get_component_template} + * + * @memberOf API-Cluster + * + * @param {object} [params] + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. If `false`, information is retrieved from the master node. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.name] - Name of the component template to retrieve. Wildcard (`*`) expressions are supported. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getComponentTemplateFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = ['/_component_template/', name].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getComponentTemplateFunc; diff --git a/api/cluster/getDecommissionAwareness.d.ts b/api/cluster/getDecommissionAwareness.d.ts new file mode 100644 index 000000000..a59f579e5 --- /dev/null +++ b/api/cluster/getDecommissionAwareness.d.ts @@ -0,0 +1,29 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface Cluster_GetDecommissionAwareness_Request extends Global.Params { + awareness_attribute_name: string; +} + +export interface Cluster_GetDecommissionAwareness_Response extends ApiResponse { + body: Cluster_GetDecommissionAwareness_ResponseBody; +} + +export type Cluster_GetDecommissionAwareness_ResponseBody = Record + diff --git a/api/cluster/getDecommissionAwareness.js b/api/cluster/getDecommissionAwareness.js new file mode 100644 index 000000000..df7e60204 --- /dev/null +++ b/api/cluster/getDecommissionAwareness.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Get details and status of decommissioned attribute. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-decommission/#example-getting-zone-decommission-status - cluster.get_decommission_awareness} + * + * @memberOf API-Cluster + * + * @param {object} params + * @param {string} params.awareness_attribute_name - Awareness attribute name. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getDecommissionAwarenessFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.awareness_attribute_name == null) return handleMissingParam('awareness_attribute_name', this, callback); + + let { body, awareness_attribute_name, ...querystring } = params; + awareness_attribute_name = parsePathParam(awareness_attribute_name); + + const path = '/_cluster/decommission/awareness/' + awareness_attribute_name + '/_status'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getDecommissionAwarenessFunc; diff --git a/api/cluster/getSettings.d.ts b/api/cluster/getSettings.d.ts new file mode 100644 index 000000000..f8b539a79 --- /dev/null +++ b/api/cluster/getSettings.d.ts @@ -0,0 +1,38 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Cluster_GetSettings_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + flat_settings?: boolean; + include_defaults?: boolean; + master_timeout?: Common.Duration; + timeout?: Common.Duration; +} + +export interface Cluster_GetSettings_Response extends ApiResponse { + body: Cluster_GetSettings_ResponseBody; +} + +export interface Cluster_GetSettings_ResponseBody { + defaults?: Record>; + persistent: Record>; + transient: Record>; +} + diff --git a/api/cluster/getSettings.js b/api/cluster/getSettings.js new file mode 100644 index 000000000..0c23ccbf5 --- /dev/null +++ b/api/cluster/getSettings.js @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns cluster settings. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-settings/ - cluster.get_settings} + * + * @memberOf API-Cluster + * + * @param {object} [params] + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {boolean} [params.flat_settings=false] - If `true`, returns settings in flat format. + * @param {boolean} [params.include_defaults=false] - If `true`, returns default cluster settings from the local node. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getSettingsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_cluster/settings'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getSettingsFunc; diff --git a/api/cluster/getWeightedRouting.d.ts b/api/cluster/getWeightedRouting.d.ts new file mode 100644 index 000000000..5114c747e --- /dev/null +++ b/api/cluster/getWeightedRouting.d.ts @@ -0,0 +1,29 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface Cluster_GetWeightedRouting_Request extends Global.Params { + attribute: string; +} + +export interface Cluster_GetWeightedRouting_Response extends ApiResponse { + body: Cluster_GetWeightedRouting_ResponseBody; +} + +export type Cluster_GetWeightedRouting_ResponseBody = Record + diff --git a/api/cluster/getWeightedRouting.js b/api/cluster/getWeightedRouting.js new file mode 100644 index 000000000..b811cda5a --- /dev/null +++ b/api/cluster/getWeightedRouting.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Fetches weighted shard routing weights. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-awareness/#example-getting-weights-for-all-zones - cluster.get_weighted_routing} + * + * @memberOf API-Cluster + * + * @param {object} params + * @param {string} params.attribute - Awareness attribute name. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getWeightedRoutingFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.attribute == null) return handleMissingParam('attribute', this, callback); + + let { body, attribute, ...querystring } = params; + attribute = parsePathParam(attribute); + + const path = '/_cluster/routing/awareness/' + attribute + '/weights'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getWeightedRoutingFunc; diff --git a/api/cluster/health.d.ts b/api/cluster/health.d.ts new file mode 100644 index 000000000..3c3147652 --- /dev/null +++ b/api/cluster/health.d.ts @@ -0,0 +1,44 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cluster_Health from '../_types/cluster.health' + +export interface Cluster_Health_Request extends Global.Params { + awareness_attribute?: string; + cluster_manager_timeout?: Common.Duration; + expand_wildcards?: Common.ExpandWildcards; + index?: Common.Indices; + level?: Cluster_Health.Level; + local?: boolean; + master_timeout?: Common.Duration; + timeout?: Common.Duration; + wait_for_active_shards?: Common.WaitForActiveShards; + wait_for_events?: Common.WaitForEvents; + wait_for_no_initializing_shards?: boolean; + wait_for_no_relocating_shards?: boolean; + wait_for_nodes?: string | number; + wait_for_status?: Common.HealthStatus; +} + +export interface Cluster_Health_Response extends ApiResponse { + body: Cluster_Health_ResponseBody; +} + +export type Cluster_Health_ResponseBody = Cluster_Health.HealthResponseBody + diff --git a/api/cluster/health.js b/api/cluster/health.js new file mode 100644 index 000000000..fecdcb75d --- /dev/null +++ b/api/cluster/health.js @@ -0,0 +1,61 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns basic information about the health of the cluster. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-health/ - cluster.health} + * + * @memberOf API-Cluster + * + * @param {object} [params] + * @param {string} [params.awareness_attribute] - The awareness attribute for which the health is required. + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {string} [params.level] - Can be one of cluster, indices or shards. Controls the details level of the health information returned. + * @param {boolean} [params.local=false] - If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {string} [params.wait_for_active_shards] - A number controlling to how many active shards to wait for, all to wait for all shards in the cluster to be active, or 0 to not wait. + * @param {string} [params.wait_for_events] - Can be one of immediate, urgent, high, normal, low, languid. Wait until all currently queued events with the given priority are processed. + * @param {boolean} [params.wait_for_no_initializing_shards] - A boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard initializations. Defaults to false, which means it will not wait for initializing shards. + * @param {boolean} [params.wait_for_no_relocating_shards] - A boolean value which controls whether to wait (until the timeout provided) for the cluster to have no shard relocations. Defaults to false, which means it will not wait for relocating shards. + * @param {string} [params.wait_for_nodes] - The request waits until the specified number N of nodes is available. It also accepts >=N, <=N, >N and yellow > red. By default, will not wait for any status. + * @param {string} [params.index] - Comma-separated list of data streams, indices, and index aliases used to limit the request. Wildcard expressions (*) are supported. To target all data streams and indices in a cluster, omit this parameter or use `_all` or `*`. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function healthFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/_cluster/health/', index].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = healthFunc; diff --git a/api/cluster/pendingTasks.d.ts b/api/cluster/pendingTasks.d.ts new file mode 100644 index 000000000..5fb8a5733 --- /dev/null +++ b/api/cluster/pendingTasks.d.ts @@ -0,0 +1,35 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cluster_PendingTasks from '../_types/cluster.pending_tasks' + +export interface Cluster_PendingTasks_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + local?: boolean; + master_timeout?: Common.Duration; +} + +export interface Cluster_PendingTasks_Response extends ApiResponse { + body: Cluster_PendingTasks_ResponseBody; +} + +export interface Cluster_PendingTasks_ResponseBody { + tasks: Cluster_PendingTasks.PendingTask[]; +} + diff --git a/api/cluster/pendingTasks.js b/api/cluster/pendingTasks.js new file mode 100644 index 000000000..2bd676206 --- /dev/null +++ b/api/cluster/pendingTasks.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns a list of any cluster-level changes (e.g. create index, update mapping, +allocate or fail shard) which have not yet been executed. + *
See Also: {@link https://opensearch.org/docs/latest - cluster.pending_tasks} + * + * @memberOf API-Cluster + * + * @param {object} [params] + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. If `false`, information is retrieved from the master node. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function pendingTasksFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_cluster/pending_tasks'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = pendingTasksFunc; diff --git a/api/cluster/postVotingConfigExclusions.d.ts b/api/cluster/postVotingConfigExclusions.d.ts new file mode 100644 index 000000000..2c9637d11 --- /dev/null +++ b/api/cluster/postVotingConfigExclusions.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Cluster_PostVotingConfigExclusions_Request extends Global.Params { + node_ids?: Common.Ids; + node_names?: Common.Names; + timeout?: Common.Duration; +} + +export interface Cluster_PostVotingConfigExclusions_Response extends ApiResponse { + body: Cluster_PostVotingConfigExclusions_ResponseBody; +} + +export type Cluster_PostVotingConfigExclusions_ResponseBody = Record + diff --git a/api/cluster/postVotingConfigExclusions.js b/api/cluster/postVotingConfigExclusions.js new file mode 100644 index 000000000..67dd43157 --- /dev/null +++ b/api/cluster/postVotingConfigExclusions.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Updates the cluster voting config exclusions by node ids or node names. + *
See Also: {@link https://opensearch.org/docs/latest - cluster.post_voting_config_exclusions} + * + * @memberOf API-Cluster + * + * @param {object} [params] + * @param {string} [params.node_ids] - A comma-separated list of the persistent ids of the nodes to exclude from the voting configuration. If specified, you may not also specify node_names. + * @param {string} [params.node_names] - A comma-separated list of the names of the nodes to exclude from the voting configuration. If specified, you may not also specify node_ids. + * @param {string} [params.timeout] - When adding a voting configuration exclusion, the API waits for the specified nodes to be excluded from the voting configuration before returning. If the timeout expires before the appropriate condition is satisfied, the request fails and returns an error. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function postVotingConfigExclusionsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_cluster/voting_config_exclusions'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = postVotingConfigExclusionsFunc; diff --git a/api/cluster/putComponentTemplate.d.ts b/api/cluster/putComponentTemplate.d.ts new file mode 100644 index 000000000..21522e685 --- /dev/null +++ b/api/cluster/putComponentTemplate.d.ts @@ -0,0 +1,43 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_Common from '../_types/indices._common' + +export interface Cluster_PutComponentTemplate_Request extends Global.Params { + body: Cluster_PutComponentTemplate_RequestBody; + cluster_manager_timeout?: Common.Duration; + create?: boolean; + master_timeout?: Common.Duration; + name: Common.Name; + timeout?: Common.Duration; +} + +export interface Cluster_PutComponentTemplate_RequestBody { + _meta?: Common.Metadata; + allow_auto_create?: boolean; + template: Indices_Common.IndexState; + version?: Common.VersionNumber; +} + +export interface Cluster_PutComponentTemplate_Response extends ApiResponse { + body: Cluster_PutComponentTemplate_ResponseBody; +} + +export type Cluster_PutComponentTemplate_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/cluster/putComponentTemplate.js b/api/cluster/putComponentTemplate.js new file mode 100644 index 000000000..9a9b0d0ef --- /dev/null +++ b/api/cluster/putComponentTemplate.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Creates or updates a component template. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-templates/#use-component-templates-to-create-an-index-template - cluster.put_component_template} + * + * @memberOf API-Cluster + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {boolean} [params.create=false] - If `true`, this request cannot replace or update existing component templates. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.timeout] - Operation timeout. + * @param {string} params.name - Name of the component template to create. OpenSearch includes the following built-in component templates: `logs-mappings`; 'logs-settings`; `metrics-mappings`; `metrics-settings`;`synthetics-mapping`; `synthetics-settings`. OpenSearch Agent uses these templates to configure backing indices for its data streams. If you use OpenSearch Agent and want to overwrite one of these templates, set the `version` for your replacement template higher than the current version. If you don't use OpenSearch Agent and want to disable all built-in component and index templates, set `stack.templates.enabled` to `false` using the cluster update settings API. + * @param {object} params.body - The template definition + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function putComponentTemplateFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.name == null) return handleMissingParam('name', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = '/_component_template/' + name; + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = putComponentTemplateFunc; diff --git a/api/cluster/putDecommissionAwareness.d.ts b/api/cluster/putDecommissionAwareness.d.ts new file mode 100644 index 000000000..560323e8c --- /dev/null +++ b/api/cluster/putDecommissionAwareness.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface Cluster_PutDecommissionAwareness_Request extends Global.Params { + awareness_attribute_name: string; + awareness_attribute_value: string; +} + +export interface Cluster_PutDecommissionAwareness_Response extends ApiResponse { + body: Cluster_PutDecommissionAwareness_ResponseBody; +} + +export type Cluster_PutDecommissionAwareness_ResponseBody = Record + diff --git a/api/cluster/putDecommissionAwareness.js b/api/cluster/putDecommissionAwareness.js new file mode 100644 index 000000000..6c6ca4fc0 --- /dev/null +++ b/api/cluster/putDecommissionAwareness.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Decommissions an awareness attribute. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-decommission/#example-decommissioning-and-recommissioning-a-zone - cluster.put_decommission_awareness} + * + * @memberOf API-Cluster + * + * @param {object} params + * @param {string} params.awareness_attribute_name - Awareness attribute name. + * @param {string} params.awareness_attribute_value - Awareness attribute value. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function putDecommissionAwarenessFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.awareness_attribute_name == null) return handleMissingParam('awareness_attribute_name', this, callback); + if (params.awareness_attribute_value == null) return handleMissingParam('awareness_attribute_value', this, callback); + + let { body, awareness_attribute_name, awareness_attribute_value, ...querystring } = params; + awareness_attribute_name = parsePathParam(awareness_attribute_name); + awareness_attribute_value = parsePathParam(awareness_attribute_value); + + const path = '/_cluster/decommission/awareness/' + awareness_attribute_name + '/' + awareness_attribute_value; + const method = 'PUT'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = putDecommissionAwarenessFunc; diff --git a/api/cluster/putSettings.d.ts b/api/cluster/putSettings.d.ts new file mode 100644 index 000000000..3c3d8ae7a --- /dev/null +++ b/api/cluster/putSettings.d.ts @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Cluster_PutSettings_Request extends Global.Params { + body: Cluster_PutSettings_RequestBody; + cluster_manager_timeout?: Common.Duration; + flat_settings?: boolean; + master_timeout?: Common.Duration; + timeout?: Common.Duration; +} + +export interface Cluster_PutSettings_RequestBody { + persistent?: { +}; + transient?: { +}; +} + +export interface Cluster_PutSettings_Response extends ApiResponse { + body: Cluster_PutSettings_ResponseBody; +} + +export interface Cluster_PutSettings_ResponseBody { + acknowledged: boolean; + persistent: { +}; + transient: { +}; +} + diff --git a/api/cluster/putSettings.js b/api/cluster/putSettings.js new file mode 100644 index 000000000..eb3aed375 --- /dev/null +++ b/api/cluster/putSettings.js @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Updates the cluster settings. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-settings/ - cluster.put_settings} + * + * @memberOf API-Cluster + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {boolean} [params.flat_settings=false] - Return settings in flat format. + * @param {string} [params.master_timeout] DEPRECATED - Explicit operation timeout for connection to master node + * @param {string} [params.timeout] - Explicit operation timeout + * @param {object} params.body - The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart). + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function putSettingsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_cluster/settings'; + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = putSettingsFunc; diff --git a/api/cluster/putWeightedRouting.d.ts b/api/cluster/putWeightedRouting.d.ts new file mode 100644 index 000000000..1f73a95bb --- /dev/null +++ b/api/cluster/putWeightedRouting.d.ts @@ -0,0 +1,29 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface Cluster_PutWeightedRouting_Request extends Global.Params { + attribute: string; +} + +export interface Cluster_PutWeightedRouting_Response extends ApiResponse { + body: Cluster_PutWeightedRouting_ResponseBody; +} + +export type Cluster_PutWeightedRouting_ResponseBody = Record + diff --git a/api/cluster/putWeightedRouting.js b/api/cluster/putWeightedRouting.js new file mode 100644 index 000000000..c704a8576 --- /dev/null +++ b/api/cluster/putWeightedRouting.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Updates weighted shard routing weights. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-awareness/#example-weighted-round-robin-search - cluster.put_weighted_routing} + * + * @memberOf API-Cluster + * + * @param {object} params + * @param {string} params.attribute - Awareness attribute name. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function putWeightedRoutingFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.attribute == null) return handleMissingParam('attribute', this, callback); + + let { body, attribute, ...querystring } = params; + attribute = parsePathParam(attribute); + + const path = '/_cluster/routing/awareness/' + attribute + '/weights'; + const method = 'PUT'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = putWeightedRoutingFunc; diff --git a/api/cluster/remoteInfo.d.ts b/api/cluster/remoteInfo.d.ts new file mode 100644 index 000000000..786b03165 --- /dev/null +++ b/api/cluster/remoteInfo.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Cluster_RemoteInfo from '../_types/cluster.remote_info' + +export type Cluster_RemoteInfo_Request = Global.Params & Record + +export interface Cluster_RemoteInfo_Response extends ApiResponse { + body: Cluster_RemoteInfo_ResponseBody; +} + +export type Cluster_RemoteInfo_ResponseBody = Record + diff --git a/api/cluster/remoteInfo.js b/api/cluster/remoteInfo.js new file mode 100644 index 000000000..840f70c18 --- /dev/null +++ b/api/cluster/remoteInfo.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns the information about configured remote clusters. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/remote-info/ - cluster.remote_info} + * + * @memberOf API-Cluster + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function remoteInfoFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_remote/info'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = remoteInfoFunc; diff --git a/api/cluster/reroute.d.ts b/api/cluster/reroute.d.ts new file mode 100644 index 000000000..26ac81953 --- /dev/null +++ b/api/cluster/reroute.d.ts @@ -0,0 +1,46 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cluster_Reroute from '../_types/cluster.reroute' + +export interface Cluster_Reroute_Request extends Global.Params { + body?: Cluster_Reroute_RequestBody; + cluster_manager_timeout?: Common.Duration; + dry_run?: boolean; + explain?: boolean; + master_timeout?: Common.Duration; + metric?: Common.Metrics; + retry_failed?: boolean; + timeout?: Common.Duration; +} + +export interface Cluster_Reroute_RequestBody { + commands?: Cluster_Reroute.Command[]; +} + +export interface Cluster_Reroute_Response extends ApiResponse { + body: Cluster_Reroute_ResponseBody; +} + +export interface Cluster_Reroute_ResponseBody { + acknowledged: boolean; + explanations?: Cluster_Reroute.RerouteExplanation[]; + state?: Record; +} + diff --git a/api/cluster/reroute.js b/api/cluster/reroute.js new file mode 100644 index 000000000..36b7e8212 --- /dev/null +++ b/api/cluster/reroute.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Allows to manually change the allocation of individual shards in the cluster. + *
See Also: {@link https://opensearch.org/docs/latest - cluster.reroute} + * + * @memberOf API-Cluster + * + * @param {object} [params] + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {boolean} [params.dry_run] - If true, then the request simulates the operation only and returns the resulting state. + * @param {boolean} [params.explain] - If true, then the response contains an explanation of why the commands can or cannot be executed. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.metric] - Limits the information returned to the specified metrics. + * @param {boolean} [params.retry_failed] - If true, then retries allocation of shards that are blocked due to too many subsequent allocation failures. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {object} [params.body] - The definition of `commands` to perform (`move`, `cancel`, `allocate`) + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function rerouteFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_cluster/reroute'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = rerouteFunc; diff --git a/api/cluster/state.d.ts b/api/cluster/state.d.ts new file mode 100644 index 000000000..e9f7e3834 --- /dev/null +++ b/api/cluster/state.d.ts @@ -0,0 +1,41 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cluster_State from '../_types/cluster.state' + +export interface Cluster_State_Request extends Global.Params { + allow_no_indices?: boolean; + cluster_manager_timeout?: Common.Duration; + expand_wildcards?: Common.ExpandWildcards; + flat_settings?: boolean; + ignore_unavailable?: boolean; + index?: Common.Indices; + local?: boolean; + master_timeout?: Common.Duration; + metric?: Cluster_State.Metric[]; + wait_for_metadata_version?: Common.VersionNumber; + wait_for_timeout?: Common.Duration; +} + +export interface Cluster_State_Response extends ApiResponse { + body: Cluster_State_ResponseBody; +} + +export type Cluster_State_ResponseBody = Record + diff --git a/api/cluster/state.js b/api/cluster/state.js new file mode 100644 index 000000000..9d2ad67eb --- /dev/null +++ b/api/cluster/state.js @@ -0,0 +1,59 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns a comprehensive information about the state of the cluster. + *
See Also: {@link https://opensearch.org/docs/latest - cluster.state} + * + * @memberOf API-Cluster + * + * @param {object} [params] + * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {boolean} [params.flat_settings=false] - Return settings in flat format. + * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Specify timeout for connection to master + * @param {number} [params.wait_for_metadata_version] - Wait for the metadata version to be equal or greater than the specified metadata version + * @param {string} [params.wait_for_timeout] - The maximum time to wait for wait_for_metadata_version before timing out + * @param {array} [params.metric] - Limit the information returned to the specified metrics + * @param {string} [params.index] - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function stateFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, metric, index, ...querystring } = params; + metric = parsePathParam(metric); + index = parsePathParam(index); + + const path = ['/_cluster/state/', metric, '/', index].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = stateFunc; diff --git a/api/cluster/stats.d.ts b/api/cluster/stats.d.ts new file mode 100644 index 000000000..632079ba1 --- /dev/null +++ b/api/cluster/stats.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Cluster_Stats from '../_types/cluster.stats' + +export interface Cluster_Stats_Request extends Global.Params { + flat_settings?: boolean; + node_id?: Common.NodeIds; + timeout?: Common.Duration; +} + +export interface Cluster_Stats_Response extends ApiResponse { + body: Cluster_Stats_ResponseBody; +} + +export type Cluster_Stats_ResponseBody = Cluster_Stats.StatsResponseBase + diff --git a/api/cluster/stats.js b/api/cluster/stats.js new file mode 100644 index 000000000..b2af4b0dd --- /dev/null +++ b/api/cluster/stats.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns high-level overview of cluster statistics. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-stats/ - cluster.stats} + * + * @memberOf API-Cluster + * + * @param {object} [params] + * @param {boolean} [params.flat_settings=false] - If `true`, returns settings in flat format. + * @param {string} [params.timeout] - Period to wait for each node to respond. If a node does not respond before its timeout expires, the response does not include its stats. However, timed out nodes are included in the response's `_nodes.failed` property. Defaults to no timeout. + * @param {string} [params.node_id] - Comma-separated list of node filters used to limit returned information. Defaults to all nodes in the cluster. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function statsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, node_id, ...querystring } = params; + node_id = parsePathParam(node_id); + + const path = ['/_cluster/stats/nodes/', node_id].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = statsFunc; diff --git a/api/danglingIndices/_api.js b/api/danglingIndices/_api.js new file mode 100644 index 000000000..f575bf65c --- /dev/null +++ b/api/danglingIndices/_api.js @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Dangling-Indices */ + +function DanglingindicesApi(bindObj) { + this.deleteDanglingIndex = require('./deleteDanglingIndex').bind(bindObj); + this.importDanglingIndex = require('./importDanglingIndex').bind(bindObj); + this.listDanglingIndices = require('./listDanglingIndices').bind(bindObj); + + // Deprecated: Use deleteDanglingIndex instead. + this.delete_dangling_index = require('./deleteDanglingIndex').bind(bindObj); + // Deprecated: Use importDanglingIndex instead. + this.import_dangling_index = require('./importDanglingIndex').bind(bindObj); + // Deprecated: Use listDanglingIndices instead. + this.list_dangling_indices = require('./listDanglingIndices').bind(bindObj); +} + +module.exports = DanglingindicesApi; diff --git a/api/danglingIndices/deleteDanglingIndex.d.ts b/api/danglingIndices/deleteDanglingIndex.d.ts new file mode 100644 index 000000000..8ff420afe --- /dev/null +++ b/api/danglingIndices/deleteDanglingIndex.d.ts @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface DanglingIndices_DeleteDanglingIndex_Request extends Global.Params { + accept_data_loss: boolean; + cluster_manager_timeout?: Common.Duration; + index_uuid: Common.Uuid; + master_timeout?: Common.Duration; + timeout?: Common.Duration; +} + +export interface DanglingIndices_DeleteDanglingIndex_Response extends ApiResponse { + body: DanglingIndices_DeleteDanglingIndex_ResponseBody; +} + +export type DanglingIndices_DeleteDanglingIndex_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/danglingIndices/deleteDanglingIndex.js b/api/danglingIndices/deleteDanglingIndex.js new file mode 100644 index 000000000..1b6059f1a --- /dev/null +++ b/api/danglingIndices/deleteDanglingIndex.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Deletes the specified dangling index. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/ - dangling_indices.delete_dangling_index} + * + * @memberOf API-Dangling-Indices + * + * @param {object} params + * @param {boolean} params.accept_data_loss - Must be set to true in order to delete the dangling index + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Specify timeout for connection to master + * @param {string} [params.timeout] - Explicit operation timeout + * @param {string} params.index_uuid - The UUID of the dangling index + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteDanglingIndexFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.accept_data_loss == null) return handleMissingParam('accept_data_loss', this, callback); + if (params.index_uuid == null) return handleMissingParam('index_uuid', this, callback); + + let { body, index_uuid, ...querystring } = params; + index_uuid = parsePathParam(index_uuid); + + const path = '/_dangling/' + index_uuid; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteDanglingIndexFunc; diff --git a/api/danglingIndices/importDanglingIndex.d.ts b/api/danglingIndices/importDanglingIndex.d.ts new file mode 100644 index 000000000..cc509e19f --- /dev/null +++ b/api/danglingIndices/importDanglingIndex.d.ts @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface DanglingIndices_ImportDanglingIndex_Request extends Global.Params { + accept_data_loss: boolean; + cluster_manager_timeout?: Common.Duration; + index_uuid: Common.Uuid; + master_timeout?: Common.Duration; + timeout?: Common.Duration; +} + +export interface DanglingIndices_ImportDanglingIndex_Response extends ApiResponse { + body: DanglingIndices_ImportDanglingIndex_ResponseBody; +} + +export type DanglingIndices_ImportDanglingIndex_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/danglingIndices/importDanglingIndex.js b/api/danglingIndices/importDanglingIndex.js new file mode 100644 index 000000000..a5654ba11 --- /dev/null +++ b/api/danglingIndices/importDanglingIndex.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Imports the specified dangling index. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/ - dangling_indices.import_dangling_index} + * + * @memberOf API-Dangling-Indices + * + * @param {object} params + * @param {boolean} params.accept_data_loss - Must be set to true in order to import the dangling index + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Specify timeout for connection to master + * @param {string} [params.timeout] - Explicit operation timeout + * @param {string} params.index_uuid - The UUID of the dangling index + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function importDanglingIndexFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.accept_data_loss == null) return handleMissingParam('accept_data_loss', this, callback); + if (params.index_uuid == null) return handleMissingParam('index_uuid', this, callback); + + let { body, index_uuid, ...querystring } = params; + index_uuid = parsePathParam(index_uuid); + + const path = '/_dangling/' + index_uuid; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = importDanglingIndexFunc; diff --git a/api/danglingIndices/listDanglingIndices.d.ts b/api/danglingIndices/listDanglingIndices.d.ts new file mode 100644 index 000000000..b4e7917a9 --- /dev/null +++ b/api/danglingIndices/listDanglingIndices.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as DanglingIndices_ListDanglingIndices from '../_types/dangling_indices.list_dangling_indices' + +export type DanglingIndices_ListDanglingIndices_Request = Global.Params & Record + +export interface DanglingIndices_ListDanglingIndices_Response extends ApiResponse { + body: DanglingIndices_ListDanglingIndices_ResponseBody; +} + +export interface DanglingIndices_ListDanglingIndices_ResponseBody { + _nodes?: Common.NodeStatistics; + cluster_name?: Common.Name; + dangling_indices: DanglingIndices_ListDanglingIndices.DanglingIndex[]; +} + diff --git a/api/danglingIndices/listDanglingIndices.js b/api/danglingIndices/listDanglingIndices.js new file mode 100644 index 000000000..e6ec780db --- /dev/null +++ b/api/danglingIndices/listDanglingIndices.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns all dangling indices. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/dangling-index/ - dangling_indices.list_dangling_indices} + * + * @memberOf API-Dangling-Indices + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function listDanglingIndicesFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_dangling'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = listDanglingIndicesFunc; diff --git a/api/http/_api.js b/api/http/_api.js new file mode 100644 index 000000000..fdb9abcd7 --- /dev/null +++ b/api/http/_api.js @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Http */ + +function HttpApi(bindObj) { + this.connect = require('./connect').bind(bindObj); + this.delete = require('./delete').bind(bindObj); + this.get = require('./get').bind(bindObj); + this.head = require('./head').bind(bindObj); + this.options = require('./options').bind(bindObj); + this.patch = require('./patch').bind(bindObj); + this.post = require('./post').bind(bindObj); + this.put = require('./put').bind(bindObj); + this.trace = require('./trace').bind(bindObj); + +} + +module.exports = HttpApi; diff --git a/api/http/connect.js b/api/http/connect.js new file mode 100644 index 000000000..2e94c87e0 --- /dev/null +++ b/api/http/connect.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict' + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** +* Make a customized CONNECT request. +* +* @memberOf API-Http +* +* @param {Object} params +* @param {string} params.path - URL of the request +* @param {Object} [params.querystring] - Querystring parameters +* @param {Object} [params.headers] - Request headers +* @param {Object | Object[] | string} [params.body] - Request body +* +* @param {Object} [options] - Options for {@link Transport#request} +* @param {function} [callback] - Callback that handles errors and response +* +* @returns {{abort: function(), then: function(), catch: function()}|Promise|*} +*/ +function connectFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.path == null) return handleMissingParam('path', this, callback); + if (Array.isArray(params.body)) { + const { path, querystring, headers, body } = params; + params = { path, querystring, headers, bulkBody: body }; + } + options = options || {}; + options.headers = params.headers || options.headers; + return this.transport.request({ ...params, method: 'CONNECT' }, options, callback); +} + +module.exports = connectFunc; diff --git a/api/http/delete.js b/api/http/delete.js new file mode 100644 index 000000000..ba8453163 --- /dev/null +++ b/api/http/delete.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict' + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** +* Make a customized DELETE request. +* +* @memberOf API-Http +* +* @param {Object} params +* @param {string} params.path - URL of the request +* @param {Object} [params.querystring] - Querystring parameters +* @param {Object} [params.headers] - Request headers +* @param {Object | Object[] | string} [params.body] - Request body +* +* @param {Object} [options] - Options for {@link Transport#request} +* @param {function} [callback] - Callback that handles errors and response +* +* @returns {{abort: function(), then: function(), catch: function()}|Promise|*} +*/ +function deleteFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.path == null) return handleMissingParam('path', this, callback); + if (Array.isArray(params.body)) { + const { path, querystring, headers, body } = params; + params = { path, querystring, headers, bulkBody: body }; + } + options = options || {}; + options.headers = params.headers || options.headers; + return this.transport.request({ ...params, method: 'DELETE' }, options, callback); +} + +module.exports = deleteFunc; diff --git a/api/http/get.js b/api/http/get.js new file mode 100644 index 000000000..dcdac79b3 --- /dev/null +++ b/api/http/get.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict' + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** +* Make a customized GET request. +* +* @memberOf API-Http +* +* @param {Object} params +* @param {string} params.path - URL of the request +* @param {Object} [params.querystring] - Querystring parameters +* @param {Object} [params.headers] - Request headers +* @param {Object | Object[] | string} [params.body] - Request body +* +* @param {Object} [options] - Options for {@link Transport#request} +* @param {function} [callback] - Callback that handles errors and response +* +* @returns {{abort: function(), then: function(), catch: function()}|Promise|*} +*/ +function getFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.path == null) return handleMissingParam('path', this, callback); + if (Array.isArray(params.body)) { + const { path, querystring, headers, body } = params; + params = { path, querystring, headers, bulkBody: body }; + } + options = options || {}; + options.headers = params.headers || options.headers; + return this.transport.request({ ...params, method: 'GET' }, options, callback); +} + +module.exports = getFunc; diff --git a/api/http/head.js b/api/http/head.js new file mode 100644 index 000000000..4afb3d177 --- /dev/null +++ b/api/http/head.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict' + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** +* Make a customized HEAD request. +* +* @memberOf API-Http +* +* @param {Object} params +* @param {string} params.path - URL of the request +* @param {Object} [params.querystring] - Querystring parameters +* @param {Object} [params.headers] - Request headers +* @param {Object | Object[] | string} [params.body] - Request body +* +* @param {Object} [options] - Options for {@link Transport#request} +* @param {function} [callback] - Callback that handles errors and response +* +* @returns {{abort: function(), then: function(), catch: function()}|Promise|*} +*/ +function headFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.path == null) return handleMissingParam('path', this, callback); + if (Array.isArray(params.body)) { + const { path, querystring, headers, body } = params; + params = { path, querystring, headers, bulkBody: body }; + } + options = options || {}; + options.headers = params.headers || options.headers; + return this.transport.request({ ...params, method: 'HEAD' }, options, callback); +} + +module.exports = headFunc; diff --git a/api/http/options.js b/api/http/options.js new file mode 100644 index 000000000..37859e635 --- /dev/null +++ b/api/http/options.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict' + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** +* Make a customized OPTIONS request. +* +* @memberOf API-Http +* +* @param {Object} params +* @param {string} params.path - URL of the request +* @param {Object} [params.querystring] - Querystring parameters +* @param {Object} [params.headers] - Request headers +* @param {Object | Object[] | string} [params.body] - Request body +* +* @param {Object} [options] - Options for {@link Transport#request} +* @param {function} [callback] - Callback that handles errors and response +* +* @returns {{abort: function(), then: function(), catch: function()}|Promise|*} +*/ +function optionsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.path == null) return handleMissingParam('path', this, callback); + if (Array.isArray(params.body)) { + const { path, querystring, headers, body } = params; + params = { path, querystring, headers, bulkBody: body }; + } + options = options || {}; + options.headers = params.headers || options.headers; + return this.transport.request({ ...params, method: 'OPTIONS' }, options, callback); +} + +module.exports = optionsFunc; diff --git a/api/http/patch.js b/api/http/patch.js new file mode 100644 index 000000000..a94166f02 --- /dev/null +++ b/api/http/patch.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict' + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** +* Make a customized PATCH request. +* +* @memberOf API-Http +* +* @param {Object} params +* @param {string} params.path - URL of the request +* @param {Object} [params.querystring] - Querystring parameters +* @param {Object} [params.headers] - Request headers +* @param {Object | Object[] | string} [params.body] - Request body +* +* @param {Object} [options] - Options for {@link Transport#request} +* @param {function} [callback] - Callback that handles errors and response +* +* @returns {{abort: function(), then: function(), catch: function()}|Promise|*} +*/ +function patchFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.path == null) return handleMissingParam('path', this, callback); + if (Array.isArray(params.body)) { + const { path, querystring, headers, body } = params; + params = { path, querystring, headers, bulkBody: body }; + } + options = options || {}; + options.headers = params.headers || options.headers; + return this.transport.request({ ...params, method: 'PATCH' }, options, callback); +} + +module.exports = patchFunc; diff --git a/api/http/post.js b/api/http/post.js new file mode 100644 index 000000000..814537e01 --- /dev/null +++ b/api/http/post.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict' + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** +* Make a customized POST request. +* +* @memberOf API-Http +* +* @param {Object} params +* @param {string} params.path - URL of the request +* @param {Object} [params.querystring] - Querystring parameters +* @param {Object} [params.headers] - Request headers +* @param {Object | Object[] | string} [params.body] - Request body +* +* @param {Object} [options] - Options for {@link Transport#request} +* @param {function} [callback] - Callback that handles errors and response +* +* @returns {{abort: function(), then: function(), catch: function()}|Promise|*} +*/ +function postFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.path == null) return handleMissingParam('path', this, callback); + if (Array.isArray(params.body)) { + const { path, querystring, headers, body } = params; + params = { path, querystring, headers, bulkBody: body }; + } + options = options || {}; + options.headers = params.headers || options.headers; + return this.transport.request({ ...params, method: 'POST' }, options, callback); +} + +module.exports = postFunc; diff --git a/api/http/put.js b/api/http/put.js new file mode 100644 index 000000000..f227e96cf --- /dev/null +++ b/api/http/put.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict' + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** +* Make a customized PUT request. +* +* @memberOf API-Http +* +* @param {Object} params +* @param {string} params.path - URL of the request +* @param {Object} [params.querystring] - Querystring parameters +* @param {Object} [params.headers] - Request headers +* @param {Object | Object[] | string} [params.body] - Request body +* +* @param {Object} [options] - Options for {@link Transport#request} +* @param {function} [callback] - Callback that handles errors and response +* +* @returns {{abort: function(), then: function(), catch: function()}|Promise|*} +*/ +function putFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.path == null) return handleMissingParam('path', this, callback); + if (Array.isArray(params.body)) { + const { path, querystring, headers, body } = params; + params = { path, querystring, headers, bulkBody: body }; + } + options = options || {}; + options.headers = params.headers || options.headers; + return this.transport.request({ ...params, method: 'PUT' }, options, callback); +} + +module.exports = putFunc; diff --git a/api/http/trace.js b/api/http/trace.js new file mode 100644 index 000000000..032b43aa2 --- /dev/null +++ b/api/http/trace.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict' + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** +* Make a customized TRACE request. +* +* @memberOf API-Http +* +* @param {Object} params +* @param {string} params.path - URL of the request +* @param {Object} [params.querystring] - Querystring parameters +* @param {Object} [params.headers] - Request headers +* @param {Object | Object[] | string} [params.body] - Request body +* +* @param {Object} [options] - Options for {@link Transport#request} +* @param {function} [callback] - Callback that handles errors and response +* +* @returns {{abort: function(), then: function(), catch: function()}|Promise|*} +*/ +function traceFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.path == null) return handleMissingParam('path', this, callback); + if (Array.isArray(params.body)) { + const { path, querystring, headers, body } = params; + params = { path, querystring, headers, bulkBody: body }; + } + options = options || {}; + options.headers = params.headers || options.headers; + return this.transport.request({ ...params, method: 'TRACE' }, options, callback); +} + +module.exports = traceFunc; diff --git a/api/index.d.ts b/api/index.d.ts new file mode 100644 index 000000000..9f54c829b --- /dev/null +++ b/api/index.d.ts @@ -0,0 +1,591 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { Info_Request, Info_Response, Info_ResponseBody } from './_core/info'; +import { Ping_Request, Ping_Response, Ping_ResponseBody } from './_core/ping'; +import { Bulk_Request, Bulk_RequestBody, Bulk_Response, Bulk_ResponseBody } from './_core/bulk'; +import { Count_Request, Count_RequestBody, Count_Response, Count_ResponseBody } from './_core/count'; +import { DeleteByQueryRethrottle_Request, DeleteByQueryRethrottle_Response, DeleteByQueryRethrottle_ResponseBody } from './_core/deleteByQueryRethrottle'; +import { FieldCaps_Request, FieldCaps_RequestBody, FieldCaps_Response, FieldCaps_ResponseBody } from './_core/fieldCaps'; +import { Mget_Request, Mget_RequestBody, Mget_Response, Mget_ResponseBody } from './_core/mget'; +import { Msearch_Request, Msearch_RequestBody, Msearch_Response, Msearch_ResponseBody } from './_core/msearch'; +import { MsearchTemplate_Request, MsearchTemplate_RequestBody, MsearchTemplate_Response, MsearchTemplate_ResponseBody } from './_core/msearchTemplate'; +import { Mtermvectors_Request, Mtermvectors_RequestBody, Mtermvectors_Response, Mtermvectors_ResponseBody } from './_core/mtermvectors'; +import { RankEval_Request, RankEval_RequestBody, RankEval_Response, RankEval_ResponseBody } from './_core/rankEval'; +import { Reindex_Request, Reindex_RequestBody, Reindex_Response, Reindex_ResponseBody } from './_core/reindex'; +import { ReindexRethrottle_Request, ReindexRethrottle_Response, ReindexRethrottle_ResponseBody } from './_core/reindexRethrottle'; +import { RenderSearchTemplate_Request, RenderSearchTemplate_RequestBody, RenderSearchTemplate_Response, RenderSearchTemplate_ResponseBody } from './_core/renderSearchTemplate'; +import { GetScriptContext_Request, GetScriptContext_Response, GetScriptContext_ResponseBody } from './_core/getScriptContext'; +import { GetScriptLanguages_Request, GetScriptLanguages_Response, GetScriptLanguages_ResponseBody } from './_core/getScriptLanguages'; +import { DeleteScript_Request, DeleteScript_Response, DeleteScript_ResponseBody } from './_core/deleteScript'; +import { GetScript_Request, GetScript_Response, GetScript_ResponseBody } from './_core/getScript'; +import { PutScript_Request, PutScript_RequestBody, PutScript_Response, PutScript_ResponseBody } from './_core/putScript'; +import { ScriptsPainlessExecute_Request, ScriptsPainlessExecute_RequestBody, ScriptsPainlessExecute_Response, ScriptsPainlessExecute_ResponseBody } from './_core/scriptsPainlessExecute'; +import { Search_Request, Search_RequestBody, Search_Response, Search_ResponseBody } from './_core/search'; +import { SearchShards_Request, SearchShards_Response, SearchShards_ResponseBody } from './_core/searchShards'; +import { DeletePit_Request, DeletePit_RequestBody, DeletePit_Response, DeletePit_ResponseBody } from './_core/deletePit'; +import { DeleteAllPits_Request, DeleteAllPits_Response, DeleteAllPits_ResponseBody } from './_core/deleteAllPits'; +import { GetAllPits_Request, GetAllPits_Response, GetAllPits_ResponseBody } from './_core/getAllPits'; +import { ClearScroll_Request, ClearScroll_RequestBody, ClearScroll_Response, ClearScroll_ResponseBody } from './_core/clearScroll'; +import { Scroll_Request, Scroll_RequestBody, Scroll_Response, Scroll_ResponseBody } from './_core/scroll'; +import { SearchTemplate_Request, SearchTemplate_RequestBody, SearchTemplate_Response, SearchTemplate_ResponseBody } from './_core/searchTemplate'; +import { UpdateByQueryRethrottle_Request, UpdateByQueryRethrottle_Response, UpdateByQueryRethrottle_ResponseBody } from './_core/updateByQueryRethrottle'; +import { Create_Request, Create_RequestBody, Create_Response, Create_ResponseBody } from './_core/create'; +import { DeleteByQuery_Request, DeleteByQuery_RequestBody, DeleteByQuery_Response, DeleteByQuery_ResponseBody } from './_core/deleteByQuery'; +import { Index_Request, Index_RequestBody, Index_Response, Index_ResponseBody } from './_core/index'; +import { Delete_Request, Delete_Response, Delete_ResponseBody } from './_core/delete'; +import { Get_Request, Get_Response, Get_ResponseBody } from './_core/get'; +import { Exists_Request, Exists_Response, Exists_ResponseBody } from './_core/exists'; +import { Explain_Request, Explain_RequestBody, Explain_Response, Explain_ResponseBody } from './_core/explain'; +import { CreatePit_Request, CreatePit_Response, CreatePit_ResponseBody } from './_core/createPit'; +import { GetSource_Request, GetSource_Response, GetSource_ResponseBody } from './_core/getSource'; +import { ExistsSource_Request, ExistsSource_Response, ExistsSource_ResponseBody } from './_core/existsSource'; +import { Termvectors_Request, Termvectors_RequestBody, Termvectors_Response, Termvectors_ResponseBody } from './_core/termvectors'; +import { UpdateByQuery_Request, UpdateByQuery_RequestBody, UpdateByQuery_Response, UpdateByQuery_ResponseBody } from './_core/updateByQuery'; +import { Update_Request, Update_RequestBody, Update_Response, Update_ResponseBody } from './_core/update'; +import { Indices_GetAlias_Request, Indices_GetAlias_Response, Indices_GetAlias_ResponseBody } from './indices/getAlias'; +import { Indices_PutAlias_Request, Indices_PutAlias_RequestBody, Indices_PutAlias_Response, Indices_PutAlias_ResponseBody } from './indices/putAlias'; +import { Indices_ExistsAlias_Request, Indices_ExistsAlias_Response, Indices_ExistsAlias_ResponseBody } from './indices/existsAlias'; +import { Indices_UpdateAliases_Request, Indices_UpdateAliases_RequestBody, Indices_UpdateAliases_Response, Indices_UpdateAliases_ResponseBody } from './indices/updateAliases'; +import { Indices_Analyze_Request, Indices_Analyze_RequestBody, Indices_Analyze_Response, Indices_Analyze_ResponseBody } from './indices/analyze'; +import { Indices_ClearCache_Request, Indices_ClearCache_Response, Indices_ClearCache_ResponseBody } from './indices/clearCache'; +import { Indices_GetDataStream_Request, Indices_GetDataStream_Response, Indices_GetDataStream_ResponseBody } from './indices/getDataStream'; +import { Indices_DataStreamsStats_Request, Indices_DataStreamsStats_Response, Indices_DataStreamsStats_ResponseBody } from './indices/dataStreamsStats'; +import { Indices_DeleteDataStream_Request, Indices_DeleteDataStream_Response, Indices_DeleteDataStream_ResponseBody } from './indices/deleteDataStream'; +import { Indices_CreateDataStream_Request, Indices_CreateDataStream_RequestBody, Indices_CreateDataStream_Response, Indices_CreateDataStream_ResponseBody } from './indices/createDataStream'; +import { Indices_Flush_Request, Indices_Flush_Response, Indices_Flush_ResponseBody } from './indices/flush'; +import { Indices_Forcemerge_Request, Indices_Forcemerge_Response, Indices_Forcemerge_ResponseBody } from './indices/forcemerge'; +import { Indices_GetIndexTemplate_Request, Indices_GetIndexTemplate_Response, Indices_GetIndexTemplate_ResponseBody } from './indices/getIndexTemplate'; +import { Indices_SimulateTemplate_Request, Indices_SimulateTemplate_Response, Indices_SimulateTemplate_ResponseBody } from './indices/simulateTemplate'; +import { Indices_SimulateIndexTemplate_Request, Indices_SimulateIndexTemplate_RequestBody, Indices_SimulateIndexTemplate_Response, Indices_SimulateIndexTemplate_ResponseBody } from './indices/simulateIndexTemplate'; +import { Indices_DeleteIndexTemplate_Request, Indices_DeleteIndexTemplate_Response, Indices_DeleteIndexTemplate_ResponseBody } from './indices/deleteIndexTemplate'; +import { Indices_ExistsIndexTemplate_Request, Indices_ExistsIndexTemplate_Response, Indices_ExistsIndexTemplate_ResponseBody } from './indices/existsIndexTemplate'; +import { Indices_PutIndexTemplate_Request, Indices_PutIndexTemplate_RequestBody, Indices_PutIndexTemplate_Response, Indices_PutIndexTemplate_ResponseBody } from './indices/putIndexTemplate'; +import { Indices_GetMapping_Request, Indices_GetMapping_Response, Indices_GetMapping_ResponseBody } from './indices/getMapping'; +import { Indices_GetFieldMapping_Request, Indices_GetFieldMapping_Response, Indices_GetFieldMapping_ResponseBody } from './indices/getFieldMapping'; +import { Indices_Recovery_Request, Indices_Recovery_Response, Indices_Recovery_ResponseBody } from './indices/recovery'; +import { Indices_Refresh_Request, Indices_Refresh_Response, Indices_Refresh_ResponseBody } from './indices/refresh'; +import { Indices_ResolveIndex_Request, Indices_ResolveIndex_Response, Indices_ResolveIndex_ResponseBody } from './indices/resolveIndex'; +import { Indices_Segments_Request, Indices_Segments_Response, Indices_Segments_ResponseBody } from './indices/segments'; +import { Indices_GetSettings_Request, Indices_GetSettings_Response, Indices_GetSettings_ResponseBody } from './indices/getSettings'; +import { Indices_PutSettings_Request, Indices_PutSettings_Response, Indices_PutSettings_ResponseBody } from './indices/putSettings'; +import { Indices_ShardStores_Request, Indices_ShardStores_Response, Indices_ShardStores_ResponseBody } from './indices/shardStores'; +import { Indices_Stats_Request, Indices_Stats_Response, Indices_Stats_ResponseBody } from './indices/stats'; +import { Indices_GetTemplate_Request, Indices_GetTemplate_Response, Indices_GetTemplate_ResponseBody } from './indices/getTemplate'; +import { Indices_DeleteTemplate_Request, Indices_DeleteTemplate_Response, Indices_DeleteTemplate_ResponseBody } from './indices/deleteTemplate'; +import { Indices_ExistsTemplate_Request, Indices_ExistsTemplate_Response, Indices_ExistsTemplate_ResponseBody } from './indices/existsTemplate'; +import { Indices_PutTemplate_Request, Indices_PutTemplate_RequestBody, Indices_PutTemplate_Response, Indices_PutTemplate_ResponseBody } from './indices/putTemplate'; +import { Indices_GetUpgrade_Request, Indices_GetUpgrade_Response, Indices_GetUpgrade_ResponseBody } from './indices/getUpgrade'; +import { Indices_Upgrade_Request, Indices_Upgrade_Response, Indices_Upgrade_ResponseBody } from './indices/upgrade'; +import { Indices_ValidateQuery_Request, Indices_ValidateQuery_RequestBody, Indices_ValidateQuery_Response, Indices_ValidateQuery_ResponseBody } from './indices/validateQuery'; +import { Indices_Rollover_Request, Indices_Rollover_RequestBody, Indices_Rollover_Response, Indices_Rollover_ResponseBody } from './indices/rollover'; +import { Indices_Delete_Request, Indices_Delete_Response, Indices_Delete_ResponseBody } from './indices/delete'; +import { Indices_Get_Request, Indices_Get_Response, Indices_Get_ResponseBody } from './indices/get'; +import { Indices_Exists_Request, Indices_Exists_Response, Indices_Exists_ResponseBody } from './indices/exists'; +import { Indices_Create_Request, Indices_Create_RequestBody, Indices_Create_Response, Indices_Create_ResponseBody } from './indices/create'; +import { Indices_DeleteAlias_Request, Indices_DeleteAlias_Response, Indices_DeleteAlias_ResponseBody } from './indices/deleteAlias'; +import { Indices_AddBlock_Request, Indices_AddBlock_Response, Indices_AddBlock_ResponseBody } from './indices/addBlock'; +import { Indices_Clone_Request, Indices_Clone_RequestBody, Indices_Clone_Response, Indices_Clone_ResponseBody } from './indices/clone'; +import { Indices_Close_Request, Indices_Close_Response, Indices_Close_ResponseBody } from './indices/close'; +import { Indices_PutMapping_Request, Indices_PutMapping_RequestBody, Indices_PutMapping_Response, Indices_PutMapping_ResponseBody } from './indices/putMapping'; +import { Indices_Open_Request, Indices_Open_Response, Indices_Open_ResponseBody } from './indices/open'; +import { Indices_Shrink_Request, Indices_Shrink_RequestBody, Indices_Shrink_Response, Indices_Shrink_ResponseBody } from './indices/shrink'; +import { Indices_Split_Request, Indices_Split_RequestBody, Indices_Split_Response, Indices_Split_ResponseBody } from './indices/split'; +import { Cat_Help_Request, Cat_Help_Response, Cat_Help_ResponseBody } from './cat/help'; +import { Cat_Aliases_Request, Cat_Aliases_Response, Cat_Aliases_ResponseBody } from './cat/aliases'; +import { Cat_Allocation_Request, Cat_Allocation_Response, Cat_Allocation_ResponseBody } from './cat/allocation'; +import { Cat_ClusterManager_Request, Cat_ClusterManager_Response, Cat_ClusterManager_ResponseBody } from './cat/clusterManager'; +import { Cat_Count_Request, Cat_Count_Response, Cat_Count_ResponseBody } from './cat/count'; +import { Cat_Fielddata_Request, Cat_Fielddata_Response, Cat_Fielddata_ResponseBody } from './cat/fielddata'; +import { Cat_Health_Request, Cat_Health_Response, Cat_Health_ResponseBody } from './cat/health'; +import { Cat_Indices_Request, Cat_Indices_Response, Cat_Indices_ResponseBody } from './cat/indices'; +import { Cat_Master_Request, Cat_Master_Response, Cat_Master_ResponseBody } from './cat/master'; +import { Cat_Nodeattrs_Request, Cat_Nodeattrs_Response, Cat_Nodeattrs_ResponseBody } from './cat/nodeattrs'; +import { Cat_Nodes_Request, Cat_Nodes_Response, Cat_Nodes_ResponseBody } from './cat/nodes'; +import { Cat_PendingTasks_Request, Cat_PendingTasks_Response, Cat_PendingTasks_ResponseBody } from './cat/pendingTasks'; +import { Cat_PitSegments_Request, Cat_PitSegments_RequestBody, Cat_PitSegments_Response, Cat_PitSegments_ResponseBody } from './cat/pitSegments'; +import { Cat_AllPitSegments_Request, Cat_AllPitSegments_Response, Cat_AllPitSegments_ResponseBody } from './cat/allPitSegments'; +import { Cat_Plugins_Request, Cat_Plugins_Response, Cat_Plugins_ResponseBody } from './cat/plugins'; +import { Cat_Recovery_Request, Cat_Recovery_Response, Cat_Recovery_ResponseBody } from './cat/recovery'; +import { Cat_Repositories_Request, Cat_Repositories_Response, Cat_Repositories_ResponseBody } from './cat/repositories'; +import { Cat_SegmentReplication_Request, Cat_SegmentReplication_Response, Cat_SegmentReplication_ResponseBody } from './cat/segmentReplication'; +import { Cat_Segments_Request, Cat_Segments_Response, Cat_Segments_ResponseBody } from './cat/segments'; +import { Cat_Shards_Request, Cat_Shards_Response, Cat_Shards_ResponseBody } from './cat/shards'; +import { Cat_Snapshots_Request, Cat_Snapshots_Response, Cat_Snapshots_ResponseBody } from './cat/snapshots'; +import { Cat_Tasks_Request, Cat_Tasks_Response, Cat_Tasks_ResponseBody } from './cat/tasks'; +import { Cat_Templates_Request, Cat_Templates_Response, Cat_Templates_ResponseBody } from './cat/templates'; +import { Cat_ThreadPool_Request, Cat_ThreadPool_Response, Cat_ThreadPool_ResponseBody } from './cat/threadPool'; +import { Cluster_AllocationExplain_Request, Cluster_AllocationExplain_RequestBody, Cluster_AllocationExplain_Response, Cluster_AllocationExplain_ResponseBody } from './cluster/allocationExplain'; +import { Cluster_DeleteDecommissionAwareness_Request, Cluster_DeleteDecommissionAwareness_Response, Cluster_DeleteDecommissionAwareness_ResponseBody } from './cluster/deleteDecommissionAwareness'; +import { Cluster_GetDecommissionAwareness_Request, Cluster_GetDecommissionAwareness_Response, Cluster_GetDecommissionAwareness_ResponseBody } from './cluster/getDecommissionAwareness'; +import { Cluster_PutDecommissionAwareness_Request, Cluster_PutDecommissionAwareness_Response, Cluster_PutDecommissionAwareness_ResponseBody } from './cluster/putDecommissionAwareness'; +import { Cluster_Health_Request, Cluster_Health_Response, Cluster_Health_ResponseBody } from './cluster/health'; +import { Cluster_PendingTasks_Request, Cluster_PendingTasks_Response, Cluster_PendingTasks_ResponseBody } from './cluster/pendingTasks'; +import { Cluster_Reroute_Request, Cluster_Reroute_RequestBody, Cluster_Reroute_Response, Cluster_Reroute_ResponseBody } from './cluster/reroute'; +import { Cluster_GetWeightedRouting_Request, Cluster_GetWeightedRouting_Response, Cluster_GetWeightedRouting_ResponseBody } from './cluster/getWeightedRouting'; +import { Cluster_PutWeightedRouting_Request, Cluster_PutWeightedRouting_Response, Cluster_PutWeightedRouting_ResponseBody } from './cluster/putWeightedRouting'; +import { Cluster_DeleteWeightedRouting_Request, Cluster_DeleteWeightedRouting_Response, Cluster_DeleteWeightedRouting_ResponseBody } from './cluster/deleteWeightedRouting'; +import { Cluster_GetSettings_Request, Cluster_GetSettings_Response, Cluster_GetSettings_ResponseBody } from './cluster/getSettings'; +import { Cluster_PutSettings_Request, Cluster_PutSettings_RequestBody, Cluster_PutSettings_Response, Cluster_PutSettings_ResponseBody } from './cluster/putSettings'; +import { Cluster_State_Request, Cluster_State_Response, Cluster_State_ResponseBody } from './cluster/state'; +import { Cluster_Stats_Request, Cluster_Stats_Response, Cluster_Stats_ResponseBody } from './cluster/stats'; +import { Cluster_DeleteVotingConfigExclusions_Request, Cluster_DeleteVotingConfigExclusions_Response, Cluster_DeleteVotingConfigExclusions_ResponseBody } from './cluster/deleteVotingConfigExclusions'; +import { Cluster_PostVotingConfigExclusions_Request, Cluster_PostVotingConfigExclusions_Response, Cluster_PostVotingConfigExclusions_ResponseBody } from './cluster/postVotingConfigExclusions'; +import { Cluster_GetComponentTemplate_Request, Cluster_GetComponentTemplate_Response, Cluster_GetComponentTemplate_ResponseBody } from './cluster/getComponentTemplate'; +import { Cluster_DeleteComponentTemplate_Request, Cluster_DeleteComponentTemplate_Response, Cluster_DeleteComponentTemplate_ResponseBody } from './cluster/deleteComponentTemplate'; +import { Cluster_ExistsComponentTemplate_Request, Cluster_ExistsComponentTemplate_Response, Cluster_ExistsComponentTemplate_ResponseBody } from './cluster/existsComponentTemplate'; +import { Cluster_PutComponentTemplate_Request, Cluster_PutComponentTemplate_RequestBody, Cluster_PutComponentTemplate_Response, Cluster_PutComponentTemplate_ResponseBody } from './cluster/putComponentTemplate'; +import { Cluster_RemoteInfo_Request, Cluster_RemoteInfo_Response, Cluster_RemoteInfo_ResponseBody } from './cluster/remoteInfo'; +import { DanglingIndices_ListDanglingIndices_Request, DanglingIndices_ListDanglingIndices_Response, DanglingIndices_ListDanglingIndices_ResponseBody } from './danglingIndices/listDanglingIndices'; +import { DanglingIndices_DeleteDanglingIndex_Request, DanglingIndices_DeleteDanglingIndex_Response, DanglingIndices_DeleteDanglingIndex_ResponseBody } from './danglingIndices/deleteDanglingIndex'; +import { DanglingIndices_ImportDanglingIndex_Request, DanglingIndices_ImportDanglingIndex_Response, DanglingIndices_ImportDanglingIndex_ResponseBody } from './danglingIndices/importDanglingIndex'; +import { Ingest_GetPipeline_Request, Ingest_GetPipeline_Response, Ingest_GetPipeline_ResponseBody } from './ingest/getPipeline'; +import { Ingest_Simulate_Request, Ingest_Simulate_RequestBody, Ingest_Simulate_Response, Ingest_Simulate_ResponseBody } from './ingest/simulate'; +import { Ingest_DeletePipeline_Request, Ingest_DeletePipeline_Response, Ingest_DeletePipeline_ResponseBody } from './ingest/deletePipeline'; +import { Ingest_PutPipeline_Request, Ingest_PutPipeline_RequestBody, Ingest_PutPipeline_Response, Ingest_PutPipeline_ResponseBody } from './ingest/putPipeline'; +import { Ingest_ProcessorGrok_Request, Ingest_ProcessorGrok_Response, Ingest_ProcessorGrok_ResponseBody } from './ingest/processorGrok'; +import { Nodes_Info_Request, Nodes_Info_Response, Nodes_Info_ResponseBody } from './nodes/info'; +import { Nodes_HotThreads_Request, Nodes_HotThreads_Response, Nodes_HotThreads_ResponseBody } from './nodes/hotThreads'; +import { Nodes_ReloadSecureSettings_Request, Nodes_ReloadSecureSettings_RequestBody, Nodes_ReloadSecureSettings_Response, Nodes_ReloadSecureSettings_ResponseBody } from './nodes/reloadSecureSettings'; +import { Nodes_Stats_Request, Nodes_Stats_Response, Nodes_Stats_ResponseBody } from './nodes/stats'; +import { Nodes_Usage_Request, Nodes_Usage_Response, Nodes_Usage_ResponseBody } from './nodes/usage'; +import { Security_GetSslinfo_Request, Security_GetSslinfo_Response, Security_GetSslinfo_ResponseBody } from './security/getSslinfo'; +import { Security_ConfigUpgradeCheck_Request, Security_ConfigUpgradeCheck_Response, Security_ConfigUpgradeCheck_ResponseBody } from './security/configUpgradeCheck'; +import { Security_ConfigUpgradePerform_Request, Security_ConfigUpgradePerform_Response, Security_ConfigUpgradePerform_ResponseBody } from './security/configUpgradePerform'; +import { Security_GetAccountDetails_Request, Security_GetAccountDetails_Response, Security_GetAccountDetails_ResponseBody } from './security/getAccountDetails'; +import { Security_ChangePassword_Request, Security_ChangePassword_Response, Security_ChangePassword_ResponseBody } from './security/changePassword'; +import { Security_GetActionGroups_Request, Security_GetActionGroups_Response, Security_GetActionGroups_ResponseBody } from './security/getActionGroups'; +import { Security_PatchActionGroups_Request, Security_PatchActionGroups_RequestBody, Security_PatchActionGroups_Response, Security_PatchActionGroups_ResponseBody } from './security/patchActionGroups'; +import { Security_DeleteActionGroup_Request, Security_DeleteActionGroup_Response, Security_DeleteActionGroup_ResponseBody } from './security/deleteActionGroup'; +import { Security_GetActionGroup_Request, Security_GetActionGroup_Response, Security_GetActionGroup_ResponseBody } from './security/getActionGroup'; +import { Security_PatchActionGroup_Request, Security_PatchActionGroup_RequestBody, Security_PatchActionGroup_Response, Security_PatchActionGroup_ResponseBody } from './security/patchActionGroup'; +import { Security_CreateActionGroup_Request, Security_CreateActionGroup_Response, Security_CreateActionGroup_ResponseBody } from './security/createActionGroup'; +import { Security_GetAllowlist_Request, Security_GetAllowlist_Response, Security_GetAllowlist_ResponseBody } from './security/getAllowlist'; +import { Security_PatchAllowlist_Request, Security_PatchAllowlist_RequestBody, Security_PatchAllowlist_Response, Security_PatchAllowlist_ResponseBody } from './security/patchAllowlist'; +import { Security_CreateAllowlist_Request, Security_CreateAllowlist_Response, Security_CreateAllowlist_ResponseBody } from './security/createAllowlist'; +import { Security_GetAuditConfiguration_Request, Security_GetAuditConfiguration_Response, Security_GetAuditConfiguration_ResponseBody } from './security/getAuditConfiguration'; +import { Security_PatchAuditConfiguration_Request, Security_PatchAuditConfiguration_RequestBody, Security_PatchAuditConfiguration_Response, Security_PatchAuditConfiguration_ResponseBody } from './security/patchAuditConfiguration'; +import { Security_UpdateAuditConfiguration_Request, Security_UpdateAuditConfiguration_Response, Security_UpdateAuditConfiguration_ResponseBody } from './security/updateAuditConfiguration'; +import { Security_Authtoken_Request, Security_Authtoken_Response, Security_Authtoken_ResponseBody } from './security/authtoken'; +import { Security_FlushCache_Request, Security_FlushCache_Response, Security_FlushCache_ResponseBody } from './security/flushCache'; +import { Security_GenerateOboToken_Request, Security_GenerateOboToken_Response, Security_GenerateOboToken_ResponseBody } from './security/generateOboToken'; +import { Security_GetUsers_Request, Security_GetUsers_Response, Security_GetUsers_ResponseBody } from './security/getUsers'; +import { Security_PatchUsers_Request, Security_PatchUsers_RequestBody, Security_PatchUsers_Response, Security_PatchUsers_ResponseBody } from './security/patchUsers'; +import { Security_DeleteUser_Request, Security_DeleteUser_Response, Security_DeleteUser_ResponseBody } from './security/deleteUser'; +import { Security_GetUser_Request, Security_GetUser_Response, Security_GetUser_ResponseBody } from './security/getUser'; +import { Security_PatchUser_Request, Security_PatchUser_RequestBody, Security_PatchUser_Response, Security_PatchUser_ResponseBody } from './security/patchUser'; +import { Security_CreateUser_Request, Security_CreateUser_Response, Security_CreateUser_ResponseBody } from './security/createUser'; +import { Security_GenerateUserToken_Request, Security_GenerateUserToken_Response, Security_GenerateUserToken_ResponseBody } from './security/generateUserToken'; +import { Security_Migrate_Request, Security_Migrate_Response, Security_Migrate_ResponseBody } from './security/migrate'; +import { Security_GetDistinguishedNames_Request, Security_GetDistinguishedNames_Response, Security_GetDistinguishedNames_ResponseBody } from './security/getDistinguishedNames'; +import { Security_PatchDistinguishedNames_Request, Security_PatchDistinguishedNames_RequestBody, Security_PatchDistinguishedNames_Response, Security_PatchDistinguishedNames_ResponseBody } from './security/patchDistinguishedNames'; +import { Security_DeleteDistinguishedName_Request, Security_DeleteDistinguishedName_Response, Security_DeleteDistinguishedName_ResponseBody } from './security/deleteDistinguishedName'; +import { Security_GetDistinguishedName_Request, Security_GetDistinguishedName_Response, Security_GetDistinguishedName_ResponseBody } from './security/getDistinguishedName'; +import { Security_PatchDistinguishedName_Request, Security_PatchDistinguishedName_Response, Security_PatchDistinguishedName_ResponseBody } from './security/patchDistinguishedName'; +import { Security_UpdateDistinguishedName_Request, Security_UpdateDistinguishedName_Response, Security_UpdateDistinguishedName_ResponseBody } from './security/updateDistinguishedName'; +import { Security_GetPermissionsInfo_Request, Security_GetPermissionsInfo_Response, Security_GetPermissionsInfo_ResponseBody } from './security/getPermissionsInfo'; +import { Security_GetRoles_Request, Security_GetRoles_Response, Security_GetRoles_ResponseBody } from './security/getRoles'; +import { Security_PatchRoles_Request, Security_PatchRoles_RequestBody, Security_PatchRoles_Response, Security_PatchRoles_ResponseBody } from './security/patchRoles'; +import { Security_DeleteRole_Request, Security_DeleteRole_Response, Security_DeleteRole_ResponseBody } from './security/deleteRole'; +import { Security_GetRole_Request, Security_GetRole_Response, Security_GetRole_ResponseBody } from './security/getRole'; +import { Security_PatchRole_Request, Security_PatchRole_RequestBody, Security_PatchRole_Response, Security_PatchRole_ResponseBody } from './security/patchRole'; +import { Security_CreateRole_Request, Security_CreateRole_Response, Security_CreateRole_ResponseBody } from './security/createRole'; +import { Security_GetRoleMappings_Request, Security_GetRoleMappings_Response, Security_GetRoleMappings_ResponseBody } from './security/getRoleMappings'; +import { Security_PatchRoleMappings_Request, Security_PatchRoleMappings_RequestBody, Security_PatchRoleMappings_Response, Security_PatchRoleMappings_ResponseBody } from './security/patchRoleMappings'; +import { Security_DeleteRoleMapping_Request, Security_DeleteRoleMapping_Response, Security_DeleteRoleMapping_ResponseBody } from './security/deleteRoleMapping'; +import { Security_GetRoleMapping_Request, Security_GetRoleMapping_Response, Security_GetRoleMapping_ResponseBody } from './security/getRoleMapping'; +import { Security_PatchRoleMapping_Request, Security_PatchRoleMapping_RequestBody, Security_PatchRoleMapping_Response, Security_PatchRoleMapping_ResponseBody } from './security/patchRoleMapping'; +import { Security_CreateRoleMapping_Request, Security_CreateRoleMapping_Response, Security_CreateRoleMapping_ResponseBody } from './security/createRoleMapping'; +import { Security_GetConfiguration_Request, Security_GetConfiguration_Response, Security_GetConfiguration_ResponseBody } from './security/getConfiguration'; +import { Security_PatchConfiguration_Request, Security_PatchConfiguration_RequestBody, Security_PatchConfiguration_Response, Security_PatchConfiguration_ResponseBody } from './security/patchConfiguration'; +import { Security_UpdateConfiguration_Request, Security_UpdateConfiguration_Response, Security_UpdateConfiguration_ResponseBody } from './security/updateConfiguration'; +import { Security_GetCertificates_Request, Security_GetCertificates_Response, Security_GetCertificates_ResponseBody } from './security/getCertificates'; +import { Security_ReloadHttpCertificates_Request, Security_ReloadHttpCertificates_Response, Security_ReloadHttpCertificates_ResponseBody } from './security/reloadHttpCertificates'; +import { Security_ReloadTransportCertificates_Request, Security_ReloadTransportCertificates_Response, Security_ReloadTransportCertificates_ResponseBody } from './security/reloadTransportCertificates'; +import { Security_GetTenancyConfig_Request, Security_GetTenancyConfig_Response, Security_GetTenancyConfig_ResponseBody } from './security/getTenancyConfig'; +import { Security_CreateUpdateTenancyConfig_Request, Security_CreateUpdateTenancyConfig_RequestBody, Security_CreateUpdateTenancyConfig_Response, Security_CreateUpdateTenancyConfig_ResponseBody } from './security/createUpdateTenancyConfig'; +import { Security_GetTenants_Request, Security_GetTenants_Response, Security_GetTenants_ResponseBody } from './security/getTenants'; +import { Security_PatchTenants_Request, Security_PatchTenants_RequestBody, Security_PatchTenants_Response, Security_PatchTenants_ResponseBody } from './security/patchTenants'; +import { Security_DeleteTenant_Request, Security_DeleteTenant_Response, Security_DeleteTenant_ResponseBody } from './security/deleteTenant'; +import { Security_GetTenant_Request, Security_GetTenant_Response, Security_GetTenant_ResponseBody } from './security/getTenant'; +import { Security_PatchTenant_Request, Security_PatchTenant_RequestBody, Security_PatchTenant_Response, Security_PatchTenant_ResponseBody } from './security/patchTenant'; +import { Security_CreateTenant_Request, Security_CreateTenant_Response, Security_CreateTenant_ResponseBody } from './security/createTenant'; +import { Security_GetUsersLegacy_Request, Security_GetUsersLegacy_Response, Security_GetUsersLegacy_ResponseBody } from './security/getUsersLegacy'; +import { Security_DeleteUserLegacy_Request, Security_DeleteUserLegacy_Response, Security_DeleteUserLegacy_ResponseBody } from './security/deleteUserLegacy'; +import { Security_GetUserLegacy_Request, Security_GetUserLegacy_Response, Security_GetUserLegacy_ResponseBody } from './security/getUserLegacy'; +import { Security_CreateUserLegacy_Request, Security_CreateUserLegacy_Response, Security_CreateUserLegacy_ResponseBody } from './security/createUserLegacy'; +import { Security_GenerateUserTokenLegacy_Request, Security_GenerateUserTokenLegacy_Response, Security_GenerateUserTokenLegacy_ResponseBody } from './security/generateUserTokenLegacy'; +import { Security_Validate_Request, Security_Validate_Response, Security_Validate_ResponseBody } from './security/validate'; +import { Security_Authinfo_Request, Security_Authinfo_Response, Security_Authinfo_ResponseBody } from './security/authinfo'; +import { Security_GetDashboardsInfo_Request, Security_GetDashboardsInfo_Response, Security_GetDashboardsInfo_ResponseBody } from './security/getDashboardsInfo'; +import { Security_PostDashboardsInfo_Request, Security_PostDashboardsInfo_Response, Security_PostDashboardsInfo_ResponseBody } from './security/postDashboardsInfo'; +import { Security_Health_Request, Security_Health_Response, Security_Health_ResponseBody } from './security/health'; +import { Security_TenantInfo_Request, Security_TenantInfo_Response, Security_TenantInfo_ResponseBody } from './security/tenantInfo'; +import { Security_WhoAmI_Request, Security_WhoAmI_Response, Security_WhoAmI_ResponseBody } from './security/whoAmI'; +import { Security_WhoAmIProtected_Request, Security_WhoAmIProtected_Response, Security_WhoAmIProtected_ResponseBody } from './security/whoAmIProtected'; +import { Knn_Stats_Request, Knn_Stats_Response, Knn_Stats_ResponseBody } from './knn/stats'; +import { Knn_SearchModels_Request, Knn_SearchModels_RequestBody, Knn_SearchModels_Response, Knn_SearchModels_ResponseBody } from './knn/searchModels'; +import { Knn_TrainModel_Request, Knn_TrainModel_RequestBody, Knn_TrainModel_Response, Knn_TrainModel_ResponseBody } from './knn/trainModel'; +import { Knn_DeleteModel_Request, Knn_DeleteModel_Response, Knn_DeleteModel_ResponseBody } from './knn/deleteModel'; +import { Knn_GetModel_Request, Knn_GetModel_Response, Knn_GetModel_ResponseBody } from './knn/getModel'; +import { Knn_Warmup_Request, Knn_Warmup_Response, Knn_Warmup_ResponseBody } from './knn/warmup'; +import { Ml_RegisterModelGroup_Request, Ml_RegisterModelGroup_RequestBody, Ml_RegisterModelGroup_Response, Ml_RegisterModelGroup_ResponseBody } from './ml/registerModelGroup'; +import { Ml_DeleteModelGroup_Request, Ml_DeleteModelGroup_Response, Ml_DeleteModelGroup_ResponseBody } from './ml/deleteModelGroup'; +import { Ml_GetModelGroup_Request, Ml_GetModelGroup_Response, Ml_GetModelGroup_ResponseBody } from './ml/getModelGroup'; +import { Ml_RegisterModel_Request, Ml_RegisterModel_RequestBody, Ml_RegisterModel_Response, Ml_RegisterModel_ResponseBody } from './ml/registerModel'; +import { Ml_SearchModels_Request, Ml_SearchModels_Response, Ml_SearchModels_ResponseBody } from './ml/searchModels'; +import { Ml_DeleteModel_Request, Ml_DeleteModel_Response, Ml_DeleteModel_ResponseBody } from './ml/deleteModel'; +import { Ml_GetTask_Request, Ml_GetTask_Response, Ml_GetTask_ResponseBody } from './ml/getTask'; +import { Notifications_ListChannels_Request, Notifications_ListChannels_Response, Notifications_ListChannels_ResponseBody } from './notifications/listChannels'; +import { Notifications_DeleteConfigs_Request, Notifications_DeleteConfigs_Response, Notifications_DeleteConfigs_ResponseBody } from './notifications/deleteConfigs'; +import { Notifications_GetConfigs_Request, Notifications_GetConfigs_RequestBody, Notifications_GetConfigs_Response, Notifications_GetConfigs_ResponseBody } from './notifications/getConfigs'; +import { Notifications_CreateConfig_Request, Notifications_CreateConfig_Response, Notifications_CreateConfig_ResponseBody } from './notifications/createConfig'; +import { Notifications_DeleteConfig_Request, Notifications_DeleteConfig_Response, Notifications_DeleteConfig_ResponseBody } from './notifications/deleteConfig'; +import { Notifications_GetConfig_Request, Notifications_GetConfig_Response, Notifications_GetConfig_ResponseBody } from './notifications/getConfig'; +import { Notifications_UpdateConfig_Request, Notifications_UpdateConfig_Response, Notifications_UpdateConfig_ResponseBody } from './notifications/updateConfig'; +import { Notifications_SendTest_Request, Notifications_SendTest_Response, Notifications_SendTest_ResponseBody } from './notifications/sendTest'; +import { Notifications_ListFeatures_Request, Notifications_ListFeatures_Response, Notifications_ListFeatures_ResponseBody } from './notifications/listFeatures'; +import { Ppl_Query_Request, Ppl_Query_Response, Ppl_Query_ResponseBody } from './ppl/query'; +import { Ppl_Explain_Request, Ppl_Explain_Response, Ppl_Explain_ResponseBody } from './ppl/explain'; +import { Ppl_GetStats_Request, Ppl_GetStats_Response, Ppl_GetStats_ResponseBody } from './ppl/getStats'; +import { Ppl_PostStats_Request, Ppl_PostStats_Response, Ppl_PostStats_ResponseBody } from './ppl/postStats'; +import { Sql_Settings_Request, Sql_Settings_RequestBody, Sql_Settings_Response, Sql_Settings_ResponseBody } from './sql/settings'; +import { Sql_Query_Request, Sql_Query_Response, Sql_Query_ResponseBody } from './sql/query'; +import { Sql_Explain_Request, Sql_Explain_Response, Sql_Explain_ResponseBody } from './sql/explain'; +import { Sql_Close_Request, Sql_Close_Response, Sql_Close_ResponseBody } from './sql/close'; +import { Sql_GetStats_Request, Sql_GetStats_Response, Sql_GetStats_ResponseBody } from './sql/getStats'; +import { Sql_PostStats_Request, Sql_PostStats_Response, Sql_PostStats_ResponseBody } from './sql/postStats'; +import { Rollups_Delete_Request, Rollups_Delete_Response, Rollups_Delete_ResponseBody } from './rollups/delete'; +import { Rollups_Get_Request, Rollups_Get_Response, Rollups_Get_ResponseBody } from './rollups/get'; +import { Rollups_Put_Request, Rollups_Put_Response, Rollups_Put_ResponseBody } from './rollups/put'; +import { Rollups_Explain_Request, Rollups_Explain_Response, Rollups_Explain_ResponseBody } from './rollups/explain'; +import { Rollups_Start_Request, Rollups_Start_Response, Rollups_Start_ResponseBody } from './rollups/start'; +import { Rollups_Stop_Request, Rollups_Stop_Response, Rollups_Stop_ResponseBody } from './rollups/stop'; +import { Transforms_Search_Request, Transforms_Search_Response, Transforms_Search_ResponseBody } from './transforms/search'; +import { Transforms_Preview_Request, Transforms_Preview_Response, Transforms_Preview_ResponseBody } from './transforms/preview'; +import { Transforms_Delete_Request, Transforms_Delete_Response, Transforms_Delete_ResponseBody } from './transforms/delete'; +import { Transforms_Get_Request, Transforms_Get_Response, Transforms_Get_ResponseBody } from './transforms/get'; +import { Transforms_Put_Request, Transforms_Put_Response, Transforms_Put_ResponseBody } from './transforms/put'; +import { Transforms_Explain_Request, Transforms_Explain_Response, Transforms_Explain_ResponseBody } from './transforms/explain'; +import { Transforms_Start_Request, Transforms_Start_Response, Transforms_Start_ResponseBody } from './transforms/start'; +import { Transforms_Stop_Request, Transforms_Stop_Response, Transforms_Stop_ResponseBody } from './transforms/stop'; +import { RemoteStore_Restore_Request, RemoteStore_Restore_RequestBody, RemoteStore_Restore_Response, RemoteStore_Restore_ResponseBody } from './remoteStore/restore'; +import { SearchPipeline_Get_Request, SearchPipeline_Get_Response, SearchPipeline_Get_ResponseBody } from './searchPipeline/get'; +import { SearchPipeline_Delete_Request, SearchPipeline_Delete_Response, SearchPipeline_Delete_ResponseBody } from './searchPipeline/delete'; +import { SearchPipeline_Put_Request, SearchPipeline_Put_Response, SearchPipeline_Put_ResponseBody } from './searchPipeline/put'; +import { Snapshot_GetRepository_Request, Snapshot_GetRepository_Response, Snapshot_GetRepository_ResponseBody } from './snapshot/getRepository'; +import { Snapshot_Status_Request, Snapshot_Status_Response, Snapshot_Status_ResponseBody } from './snapshot/status'; +import { Snapshot_DeleteRepository_Request, Snapshot_DeleteRepository_Response, Snapshot_DeleteRepository_ResponseBody } from './snapshot/deleteRepository'; +import { Snapshot_CreateRepository_Request, Snapshot_CreateRepository_RequestBody, Snapshot_CreateRepository_Response, Snapshot_CreateRepository_ResponseBody } from './snapshot/createRepository'; +import { Snapshot_CleanupRepository_Request, Snapshot_CleanupRepository_Response, Snapshot_CleanupRepository_ResponseBody } from './snapshot/cleanupRepository'; +import { Snapshot_VerifyRepository_Request, Snapshot_VerifyRepository_Response, Snapshot_VerifyRepository_ResponseBody } from './snapshot/verifyRepository'; +import { Snapshot_Delete_Request, Snapshot_Delete_Response, Snapshot_Delete_ResponseBody } from './snapshot/delete'; +import { Snapshot_Get_Request, Snapshot_Get_Response, Snapshot_Get_ResponseBody } from './snapshot/get'; +import { Snapshot_Create_Request, Snapshot_Create_RequestBody, Snapshot_Create_Response, Snapshot_Create_ResponseBody } from './snapshot/create'; +import { Snapshot_Clone_Request, Snapshot_Clone_RequestBody, Snapshot_Clone_Response, Snapshot_Clone_ResponseBody } from './snapshot/clone'; +import { Snapshot_Restore_Request, Snapshot_Restore_RequestBody, Snapshot_Restore_Response, Snapshot_Restore_ResponseBody } from './snapshot/restore'; +import { Tasks_List_Request, Tasks_List_Response, Tasks_List_ResponseBody } from './tasks/list'; +import { Tasks_Cancel_Request, Tasks_Cancel_Response, Tasks_Cancel_ResponseBody } from './tasks/cancel'; +import { Tasks_Get_Request, Tasks_Get_Response, Tasks_Get_ResponseBody } from './tasks/get'; + +export { + Info_Request, Info_Response, Info_ResponseBody, + Ping_Request, Ping_Response, Ping_ResponseBody, + Bulk_Request, Bulk_RequestBody, Bulk_Response, Bulk_ResponseBody, + Count_Request, Count_RequestBody, Count_Response, Count_ResponseBody, + DeleteByQueryRethrottle_Request, DeleteByQueryRethrottle_Response, DeleteByQueryRethrottle_ResponseBody, + FieldCaps_Request, FieldCaps_RequestBody, FieldCaps_Response, FieldCaps_ResponseBody, + Mget_Request, Mget_RequestBody, Mget_Response, Mget_ResponseBody, + Msearch_Request, Msearch_RequestBody, Msearch_Response, Msearch_ResponseBody, + MsearchTemplate_Request, MsearchTemplate_RequestBody, MsearchTemplate_Response, MsearchTemplate_ResponseBody, + Mtermvectors_Request, Mtermvectors_RequestBody, Mtermvectors_Response, Mtermvectors_ResponseBody, + RankEval_Request, RankEval_RequestBody, RankEval_Response, RankEval_ResponseBody, + Reindex_Request, Reindex_RequestBody, Reindex_Response, Reindex_ResponseBody, + ReindexRethrottle_Request, ReindexRethrottle_Response, ReindexRethrottle_ResponseBody, + RenderSearchTemplate_Request, RenderSearchTemplate_RequestBody, RenderSearchTemplate_Response, RenderSearchTemplate_ResponseBody, + GetScriptContext_Request, GetScriptContext_Response, GetScriptContext_ResponseBody, + GetScriptLanguages_Request, GetScriptLanguages_Response, GetScriptLanguages_ResponseBody, + DeleteScript_Request, DeleteScript_Response, DeleteScript_ResponseBody, + GetScript_Request, GetScript_Response, GetScript_ResponseBody, + PutScript_Request, PutScript_RequestBody, PutScript_Response, PutScript_ResponseBody, + ScriptsPainlessExecute_Request, ScriptsPainlessExecute_RequestBody, ScriptsPainlessExecute_Response, ScriptsPainlessExecute_ResponseBody, + Search_Request, Search_RequestBody, Search_Response, Search_ResponseBody, + SearchShards_Request, SearchShards_Response, SearchShards_ResponseBody, + DeletePit_Request, DeletePit_RequestBody, DeletePit_Response, DeletePit_ResponseBody, + DeleteAllPits_Request, DeleteAllPits_Response, DeleteAllPits_ResponseBody, + GetAllPits_Request, GetAllPits_Response, GetAllPits_ResponseBody, + ClearScroll_Request, ClearScroll_RequestBody, ClearScroll_Response, ClearScroll_ResponseBody, + Scroll_Request, Scroll_RequestBody, Scroll_Response, Scroll_ResponseBody, + SearchTemplate_Request, SearchTemplate_RequestBody, SearchTemplate_Response, SearchTemplate_ResponseBody, + UpdateByQueryRethrottle_Request, UpdateByQueryRethrottle_Response, UpdateByQueryRethrottle_ResponseBody, + Create_Request, Create_RequestBody, Create_Response, Create_ResponseBody, + DeleteByQuery_Request, DeleteByQuery_RequestBody, DeleteByQuery_Response, DeleteByQuery_ResponseBody, + Index_Request, Index_RequestBody, Index_Response, Index_ResponseBody, + Delete_Request, Delete_Response, Delete_ResponseBody, + Get_Request, Get_Response, Get_ResponseBody, + Exists_Request, Exists_Response, Exists_ResponseBody, + Explain_Request, Explain_RequestBody, Explain_Response, Explain_ResponseBody, + CreatePit_Request, CreatePit_Response, CreatePit_ResponseBody, + GetSource_Request, GetSource_Response, GetSource_ResponseBody, + ExistsSource_Request, ExistsSource_Response, ExistsSource_ResponseBody, + Termvectors_Request, Termvectors_RequestBody, Termvectors_Response, Termvectors_ResponseBody, + UpdateByQuery_Request, UpdateByQuery_RequestBody, UpdateByQuery_Response, UpdateByQuery_ResponseBody, + Update_Request, Update_RequestBody, Update_Response, Update_ResponseBody, + Indices_GetAlias_Request, Indices_GetAlias_Response, Indices_GetAlias_ResponseBody, + Indices_PutAlias_Request, Indices_PutAlias_RequestBody, Indices_PutAlias_Response, Indices_PutAlias_ResponseBody, + Indices_ExistsAlias_Request, Indices_ExistsAlias_Response, Indices_ExistsAlias_ResponseBody, + Indices_UpdateAliases_Request, Indices_UpdateAliases_RequestBody, Indices_UpdateAliases_Response, Indices_UpdateAliases_ResponseBody, + Indices_Analyze_Request, Indices_Analyze_RequestBody, Indices_Analyze_Response, Indices_Analyze_ResponseBody, + Indices_ClearCache_Request, Indices_ClearCache_Response, Indices_ClearCache_ResponseBody, + Indices_GetDataStream_Request, Indices_GetDataStream_Response, Indices_GetDataStream_ResponseBody, + Indices_DataStreamsStats_Request, Indices_DataStreamsStats_Response, Indices_DataStreamsStats_ResponseBody, + Indices_DeleteDataStream_Request, Indices_DeleteDataStream_Response, Indices_DeleteDataStream_ResponseBody, + Indices_CreateDataStream_Request, Indices_CreateDataStream_RequestBody, Indices_CreateDataStream_Response, Indices_CreateDataStream_ResponseBody, + Indices_Flush_Request, Indices_Flush_Response, Indices_Flush_ResponseBody, + Indices_Forcemerge_Request, Indices_Forcemerge_Response, Indices_Forcemerge_ResponseBody, + Indices_GetIndexTemplate_Request, Indices_GetIndexTemplate_Response, Indices_GetIndexTemplate_ResponseBody, + Indices_SimulateTemplate_Request, Indices_SimulateTemplate_Response, Indices_SimulateTemplate_ResponseBody, + Indices_SimulateIndexTemplate_Request, Indices_SimulateIndexTemplate_RequestBody, Indices_SimulateIndexTemplate_Response, Indices_SimulateIndexTemplate_ResponseBody, + Indices_DeleteIndexTemplate_Request, Indices_DeleteIndexTemplate_Response, Indices_DeleteIndexTemplate_ResponseBody, + Indices_ExistsIndexTemplate_Request, Indices_ExistsIndexTemplate_Response, Indices_ExistsIndexTemplate_ResponseBody, + Indices_PutIndexTemplate_Request, Indices_PutIndexTemplate_RequestBody, Indices_PutIndexTemplate_Response, Indices_PutIndexTemplate_ResponseBody, + Indices_GetMapping_Request, Indices_GetMapping_Response, Indices_GetMapping_ResponseBody, + Indices_GetFieldMapping_Request, Indices_GetFieldMapping_Response, Indices_GetFieldMapping_ResponseBody, + Indices_Recovery_Request, Indices_Recovery_Response, Indices_Recovery_ResponseBody, + Indices_Refresh_Request, Indices_Refresh_Response, Indices_Refresh_ResponseBody, + Indices_ResolveIndex_Request, Indices_ResolveIndex_Response, Indices_ResolveIndex_ResponseBody, + Indices_Segments_Request, Indices_Segments_Response, Indices_Segments_ResponseBody, + Indices_GetSettings_Request, Indices_GetSettings_Response, Indices_GetSettings_ResponseBody, + Indices_PutSettings_Request, Indices_PutSettings_Response, Indices_PutSettings_ResponseBody, + Indices_ShardStores_Request, Indices_ShardStores_Response, Indices_ShardStores_ResponseBody, + Indices_Stats_Request, Indices_Stats_Response, Indices_Stats_ResponseBody, + Indices_GetTemplate_Request, Indices_GetTemplate_Response, Indices_GetTemplate_ResponseBody, + Indices_DeleteTemplate_Request, Indices_DeleteTemplate_Response, Indices_DeleteTemplate_ResponseBody, + Indices_ExistsTemplate_Request, Indices_ExistsTemplate_Response, Indices_ExistsTemplate_ResponseBody, + Indices_PutTemplate_Request, Indices_PutTemplate_RequestBody, Indices_PutTemplate_Response, Indices_PutTemplate_ResponseBody, + Indices_GetUpgrade_Request, Indices_GetUpgrade_Response, Indices_GetUpgrade_ResponseBody, + Indices_Upgrade_Request, Indices_Upgrade_Response, Indices_Upgrade_ResponseBody, + Indices_ValidateQuery_Request, Indices_ValidateQuery_RequestBody, Indices_ValidateQuery_Response, Indices_ValidateQuery_ResponseBody, + Indices_Rollover_Request, Indices_Rollover_RequestBody, Indices_Rollover_Response, Indices_Rollover_ResponseBody, + Indices_Delete_Request, Indices_Delete_Response, Indices_Delete_ResponseBody, + Indices_Get_Request, Indices_Get_Response, Indices_Get_ResponseBody, + Indices_Exists_Request, Indices_Exists_Response, Indices_Exists_ResponseBody, + Indices_Create_Request, Indices_Create_RequestBody, Indices_Create_Response, Indices_Create_ResponseBody, + Indices_DeleteAlias_Request, Indices_DeleteAlias_Response, Indices_DeleteAlias_ResponseBody, + Indices_AddBlock_Request, Indices_AddBlock_Response, Indices_AddBlock_ResponseBody, + Indices_Clone_Request, Indices_Clone_RequestBody, Indices_Clone_Response, Indices_Clone_ResponseBody, + Indices_Close_Request, Indices_Close_Response, Indices_Close_ResponseBody, + Indices_PutMapping_Request, Indices_PutMapping_RequestBody, Indices_PutMapping_Response, Indices_PutMapping_ResponseBody, + Indices_Open_Request, Indices_Open_Response, Indices_Open_ResponseBody, + Indices_Shrink_Request, Indices_Shrink_RequestBody, Indices_Shrink_Response, Indices_Shrink_ResponseBody, + Indices_Split_Request, Indices_Split_RequestBody, Indices_Split_Response, Indices_Split_ResponseBody, + Cat_Help_Request, Cat_Help_Response, Cat_Help_ResponseBody, + Cat_Aliases_Request, Cat_Aliases_Response, Cat_Aliases_ResponseBody, + Cat_Allocation_Request, Cat_Allocation_Response, Cat_Allocation_ResponseBody, + Cat_ClusterManager_Request, Cat_ClusterManager_Response, Cat_ClusterManager_ResponseBody, + Cat_Count_Request, Cat_Count_Response, Cat_Count_ResponseBody, + Cat_Fielddata_Request, Cat_Fielddata_Response, Cat_Fielddata_ResponseBody, + Cat_Health_Request, Cat_Health_Response, Cat_Health_ResponseBody, + Cat_Indices_Request, Cat_Indices_Response, Cat_Indices_ResponseBody, + Cat_Master_Request, Cat_Master_Response, Cat_Master_ResponseBody, + Cat_Nodeattrs_Request, Cat_Nodeattrs_Response, Cat_Nodeattrs_ResponseBody, + Cat_Nodes_Request, Cat_Nodes_Response, Cat_Nodes_ResponseBody, + Cat_PendingTasks_Request, Cat_PendingTasks_Response, Cat_PendingTasks_ResponseBody, + Cat_PitSegments_Request, Cat_PitSegments_RequestBody, Cat_PitSegments_Response, Cat_PitSegments_ResponseBody, + Cat_AllPitSegments_Request, Cat_AllPitSegments_Response, Cat_AllPitSegments_ResponseBody, + Cat_Plugins_Request, Cat_Plugins_Response, Cat_Plugins_ResponseBody, + Cat_Recovery_Request, Cat_Recovery_Response, Cat_Recovery_ResponseBody, + Cat_Repositories_Request, Cat_Repositories_Response, Cat_Repositories_ResponseBody, + Cat_SegmentReplication_Request, Cat_SegmentReplication_Response, Cat_SegmentReplication_ResponseBody, + Cat_Segments_Request, Cat_Segments_Response, Cat_Segments_ResponseBody, + Cat_Shards_Request, Cat_Shards_Response, Cat_Shards_ResponseBody, + Cat_Snapshots_Request, Cat_Snapshots_Response, Cat_Snapshots_ResponseBody, + Cat_Tasks_Request, Cat_Tasks_Response, Cat_Tasks_ResponseBody, + Cat_Templates_Request, Cat_Templates_Response, Cat_Templates_ResponseBody, + Cat_ThreadPool_Request, Cat_ThreadPool_Response, Cat_ThreadPool_ResponseBody, + Cluster_AllocationExplain_Request, Cluster_AllocationExplain_RequestBody, Cluster_AllocationExplain_Response, Cluster_AllocationExplain_ResponseBody, + Cluster_DeleteDecommissionAwareness_Request, Cluster_DeleteDecommissionAwareness_Response, Cluster_DeleteDecommissionAwareness_ResponseBody, + Cluster_GetDecommissionAwareness_Request, Cluster_GetDecommissionAwareness_Response, Cluster_GetDecommissionAwareness_ResponseBody, + Cluster_PutDecommissionAwareness_Request, Cluster_PutDecommissionAwareness_Response, Cluster_PutDecommissionAwareness_ResponseBody, + Cluster_Health_Request, Cluster_Health_Response, Cluster_Health_ResponseBody, + Cluster_PendingTasks_Request, Cluster_PendingTasks_Response, Cluster_PendingTasks_ResponseBody, + Cluster_Reroute_Request, Cluster_Reroute_RequestBody, Cluster_Reroute_Response, Cluster_Reroute_ResponseBody, + Cluster_GetWeightedRouting_Request, Cluster_GetWeightedRouting_Response, Cluster_GetWeightedRouting_ResponseBody, + Cluster_PutWeightedRouting_Request, Cluster_PutWeightedRouting_Response, Cluster_PutWeightedRouting_ResponseBody, + Cluster_DeleteWeightedRouting_Request, Cluster_DeleteWeightedRouting_Response, Cluster_DeleteWeightedRouting_ResponseBody, + Cluster_GetSettings_Request, Cluster_GetSettings_Response, Cluster_GetSettings_ResponseBody, + Cluster_PutSettings_Request, Cluster_PutSettings_RequestBody, Cluster_PutSettings_Response, Cluster_PutSettings_ResponseBody, + Cluster_State_Request, Cluster_State_Response, Cluster_State_ResponseBody, + Cluster_Stats_Request, Cluster_Stats_Response, Cluster_Stats_ResponseBody, + Cluster_DeleteVotingConfigExclusions_Request, Cluster_DeleteVotingConfigExclusions_Response, Cluster_DeleteVotingConfigExclusions_ResponseBody, + Cluster_PostVotingConfigExclusions_Request, Cluster_PostVotingConfigExclusions_Response, Cluster_PostVotingConfigExclusions_ResponseBody, + Cluster_GetComponentTemplate_Request, Cluster_GetComponentTemplate_Response, Cluster_GetComponentTemplate_ResponseBody, + Cluster_DeleteComponentTemplate_Request, Cluster_DeleteComponentTemplate_Response, Cluster_DeleteComponentTemplate_ResponseBody, + Cluster_ExistsComponentTemplate_Request, Cluster_ExistsComponentTemplate_Response, Cluster_ExistsComponentTemplate_ResponseBody, + Cluster_PutComponentTemplate_Request, Cluster_PutComponentTemplate_RequestBody, Cluster_PutComponentTemplate_Response, Cluster_PutComponentTemplate_ResponseBody, + Cluster_RemoteInfo_Request, Cluster_RemoteInfo_Response, Cluster_RemoteInfo_ResponseBody, + DanglingIndices_ListDanglingIndices_Request, DanglingIndices_ListDanglingIndices_Response, DanglingIndices_ListDanglingIndices_ResponseBody, + DanglingIndices_DeleteDanglingIndex_Request, DanglingIndices_DeleteDanglingIndex_Response, DanglingIndices_DeleteDanglingIndex_ResponseBody, + DanglingIndices_ImportDanglingIndex_Request, DanglingIndices_ImportDanglingIndex_Response, DanglingIndices_ImportDanglingIndex_ResponseBody, + Ingest_GetPipeline_Request, Ingest_GetPipeline_Response, Ingest_GetPipeline_ResponseBody, + Ingest_Simulate_Request, Ingest_Simulate_RequestBody, Ingest_Simulate_Response, Ingest_Simulate_ResponseBody, + Ingest_DeletePipeline_Request, Ingest_DeletePipeline_Response, Ingest_DeletePipeline_ResponseBody, + Ingest_PutPipeline_Request, Ingest_PutPipeline_RequestBody, Ingest_PutPipeline_Response, Ingest_PutPipeline_ResponseBody, + Ingest_ProcessorGrok_Request, Ingest_ProcessorGrok_Response, Ingest_ProcessorGrok_ResponseBody, + Nodes_Info_Request, Nodes_Info_Response, Nodes_Info_ResponseBody, + Nodes_HotThreads_Request, Nodes_HotThreads_Response, Nodes_HotThreads_ResponseBody, + Nodes_ReloadSecureSettings_Request, Nodes_ReloadSecureSettings_RequestBody, Nodes_ReloadSecureSettings_Response, Nodes_ReloadSecureSettings_ResponseBody, + Nodes_Stats_Request, Nodes_Stats_Response, Nodes_Stats_ResponseBody, + Nodes_Usage_Request, Nodes_Usage_Response, Nodes_Usage_ResponseBody, + Security_GetSslinfo_Request, Security_GetSslinfo_Response, Security_GetSslinfo_ResponseBody, + Security_ConfigUpgradeCheck_Request, Security_ConfigUpgradeCheck_Response, Security_ConfigUpgradeCheck_ResponseBody, + Security_ConfigUpgradePerform_Request, Security_ConfigUpgradePerform_Response, Security_ConfigUpgradePerform_ResponseBody, + Security_GetAccountDetails_Request, Security_GetAccountDetails_Response, Security_GetAccountDetails_ResponseBody, + Security_ChangePassword_Request, Security_ChangePassword_Response, Security_ChangePassword_ResponseBody, + Security_GetActionGroups_Request, Security_GetActionGroups_Response, Security_GetActionGroups_ResponseBody, + Security_PatchActionGroups_Request, Security_PatchActionGroups_RequestBody, Security_PatchActionGroups_Response, Security_PatchActionGroups_ResponseBody, + Security_DeleteActionGroup_Request, Security_DeleteActionGroup_Response, Security_DeleteActionGroup_ResponseBody, + Security_GetActionGroup_Request, Security_GetActionGroup_Response, Security_GetActionGroup_ResponseBody, + Security_PatchActionGroup_Request, Security_PatchActionGroup_RequestBody, Security_PatchActionGroup_Response, Security_PatchActionGroup_ResponseBody, + Security_CreateActionGroup_Request, Security_CreateActionGroup_Response, Security_CreateActionGroup_ResponseBody, + Security_GetAllowlist_Request, Security_GetAllowlist_Response, Security_GetAllowlist_ResponseBody, + Security_PatchAllowlist_Request, Security_PatchAllowlist_RequestBody, Security_PatchAllowlist_Response, Security_PatchAllowlist_ResponseBody, + Security_CreateAllowlist_Request, Security_CreateAllowlist_Response, Security_CreateAllowlist_ResponseBody, + Security_GetAuditConfiguration_Request, Security_GetAuditConfiguration_Response, Security_GetAuditConfiguration_ResponseBody, + Security_PatchAuditConfiguration_Request, Security_PatchAuditConfiguration_RequestBody, Security_PatchAuditConfiguration_Response, Security_PatchAuditConfiguration_ResponseBody, + Security_UpdateAuditConfiguration_Request, Security_UpdateAuditConfiguration_Response, Security_UpdateAuditConfiguration_ResponseBody, + Security_Authtoken_Request, Security_Authtoken_Response, Security_Authtoken_ResponseBody, + Security_FlushCache_Request, Security_FlushCache_Response, Security_FlushCache_ResponseBody, + Security_GenerateOboToken_Request, Security_GenerateOboToken_Response, Security_GenerateOboToken_ResponseBody, + Security_GetUsers_Request, Security_GetUsers_Response, Security_GetUsers_ResponseBody, + Security_PatchUsers_Request, Security_PatchUsers_RequestBody, Security_PatchUsers_Response, Security_PatchUsers_ResponseBody, + Security_DeleteUser_Request, Security_DeleteUser_Response, Security_DeleteUser_ResponseBody, + Security_GetUser_Request, Security_GetUser_Response, Security_GetUser_ResponseBody, + Security_PatchUser_Request, Security_PatchUser_RequestBody, Security_PatchUser_Response, Security_PatchUser_ResponseBody, + Security_CreateUser_Request, Security_CreateUser_Response, Security_CreateUser_ResponseBody, + Security_GenerateUserToken_Request, Security_GenerateUserToken_Response, Security_GenerateUserToken_ResponseBody, + Security_Migrate_Request, Security_Migrate_Response, Security_Migrate_ResponseBody, + Security_GetDistinguishedNames_Request, Security_GetDistinguishedNames_Response, Security_GetDistinguishedNames_ResponseBody, + Security_PatchDistinguishedNames_Request, Security_PatchDistinguishedNames_RequestBody, Security_PatchDistinguishedNames_Response, Security_PatchDistinguishedNames_ResponseBody, + Security_DeleteDistinguishedName_Request, Security_DeleteDistinguishedName_Response, Security_DeleteDistinguishedName_ResponseBody, + Security_GetDistinguishedName_Request, Security_GetDistinguishedName_Response, Security_GetDistinguishedName_ResponseBody, + Security_PatchDistinguishedName_Request, Security_PatchDistinguishedName_Response, Security_PatchDistinguishedName_ResponseBody, + Security_UpdateDistinguishedName_Request, Security_UpdateDistinguishedName_Response, Security_UpdateDistinguishedName_ResponseBody, + Security_GetPermissionsInfo_Request, Security_GetPermissionsInfo_Response, Security_GetPermissionsInfo_ResponseBody, + Security_GetRoles_Request, Security_GetRoles_Response, Security_GetRoles_ResponseBody, + Security_PatchRoles_Request, Security_PatchRoles_RequestBody, Security_PatchRoles_Response, Security_PatchRoles_ResponseBody, + Security_DeleteRole_Request, Security_DeleteRole_Response, Security_DeleteRole_ResponseBody, + Security_GetRole_Request, Security_GetRole_Response, Security_GetRole_ResponseBody, + Security_PatchRole_Request, Security_PatchRole_RequestBody, Security_PatchRole_Response, Security_PatchRole_ResponseBody, + Security_CreateRole_Request, Security_CreateRole_Response, Security_CreateRole_ResponseBody, + Security_GetRoleMappings_Request, Security_GetRoleMappings_Response, Security_GetRoleMappings_ResponseBody, + Security_PatchRoleMappings_Request, Security_PatchRoleMappings_RequestBody, Security_PatchRoleMappings_Response, Security_PatchRoleMappings_ResponseBody, + Security_DeleteRoleMapping_Request, Security_DeleteRoleMapping_Response, Security_DeleteRoleMapping_ResponseBody, + Security_GetRoleMapping_Request, Security_GetRoleMapping_Response, Security_GetRoleMapping_ResponseBody, + Security_PatchRoleMapping_Request, Security_PatchRoleMapping_RequestBody, Security_PatchRoleMapping_Response, Security_PatchRoleMapping_ResponseBody, + Security_CreateRoleMapping_Request, Security_CreateRoleMapping_Response, Security_CreateRoleMapping_ResponseBody, + Security_GetConfiguration_Request, Security_GetConfiguration_Response, Security_GetConfiguration_ResponseBody, + Security_PatchConfiguration_Request, Security_PatchConfiguration_RequestBody, Security_PatchConfiguration_Response, Security_PatchConfiguration_ResponseBody, + Security_UpdateConfiguration_Request, Security_UpdateConfiguration_Response, Security_UpdateConfiguration_ResponseBody, + Security_GetCertificates_Request, Security_GetCertificates_Response, Security_GetCertificates_ResponseBody, + Security_ReloadHttpCertificates_Request, Security_ReloadHttpCertificates_Response, Security_ReloadHttpCertificates_ResponseBody, + Security_ReloadTransportCertificates_Request, Security_ReloadTransportCertificates_Response, Security_ReloadTransportCertificates_ResponseBody, + Security_GetTenancyConfig_Request, Security_GetTenancyConfig_Response, Security_GetTenancyConfig_ResponseBody, + Security_CreateUpdateTenancyConfig_Request, Security_CreateUpdateTenancyConfig_RequestBody, Security_CreateUpdateTenancyConfig_Response, Security_CreateUpdateTenancyConfig_ResponseBody, + Security_GetTenants_Request, Security_GetTenants_Response, Security_GetTenants_ResponseBody, + Security_PatchTenants_Request, Security_PatchTenants_RequestBody, Security_PatchTenants_Response, Security_PatchTenants_ResponseBody, + Security_DeleteTenant_Request, Security_DeleteTenant_Response, Security_DeleteTenant_ResponseBody, + Security_GetTenant_Request, Security_GetTenant_Response, Security_GetTenant_ResponseBody, + Security_PatchTenant_Request, Security_PatchTenant_RequestBody, Security_PatchTenant_Response, Security_PatchTenant_ResponseBody, + Security_CreateTenant_Request, Security_CreateTenant_Response, Security_CreateTenant_ResponseBody, + Security_GetUsersLegacy_Request, Security_GetUsersLegacy_Response, Security_GetUsersLegacy_ResponseBody, + Security_DeleteUserLegacy_Request, Security_DeleteUserLegacy_Response, Security_DeleteUserLegacy_ResponseBody, + Security_GetUserLegacy_Request, Security_GetUserLegacy_Response, Security_GetUserLegacy_ResponseBody, + Security_CreateUserLegacy_Request, Security_CreateUserLegacy_Response, Security_CreateUserLegacy_ResponseBody, + Security_GenerateUserTokenLegacy_Request, Security_GenerateUserTokenLegacy_Response, Security_GenerateUserTokenLegacy_ResponseBody, + Security_Validate_Request, Security_Validate_Response, Security_Validate_ResponseBody, + Security_Authinfo_Request, Security_Authinfo_Response, Security_Authinfo_ResponseBody, + Security_GetDashboardsInfo_Request, Security_GetDashboardsInfo_Response, Security_GetDashboardsInfo_ResponseBody, + Security_PostDashboardsInfo_Request, Security_PostDashboardsInfo_Response, Security_PostDashboardsInfo_ResponseBody, + Security_Health_Request, Security_Health_Response, Security_Health_ResponseBody, + Security_TenantInfo_Request, Security_TenantInfo_Response, Security_TenantInfo_ResponseBody, + Security_WhoAmI_Request, Security_WhoAmI_Response, Security_WhoAmI_ResponseBody, + Security_WhoAmIProtected_Request, Security_WhoAmIProtected_Response, Security_WhoAmIProtected_ResponseBody, + Knn_Stats_Request, Knn_Stats_Response, Knn_Stats_ResponseBody, + Knn_SearchModels_Request, Knn_SearchModels_RequestBody, Knn_SearchModels_Response, Knn_SearchModels_ResponseBody, + Knn_TrainModel_Request, Knn_TrainModel_RequestBody, Knn_TrainModel_Response, Knn_TrainModel_ResponseBody, + Knn_DeleteModel_Request, Knn_DeleteModel_Response, Knn_DeleteModel_ResponseBody, + Knn_GetModel_Request, Knn_GetModel_Response, Knn_GetModel_ResponseBody, + Knn_Warmup_Request, Knn_Warmup_Response, Knn_Warmup_ResponseBody, + Ml_RegisterModelGroup_Request, Ml_RegisterModelGroup_RequestBody, Ml_RegisterModelGroup_Response, Ml_RegisterModelGroup_ResponseBody, + Ml_DeleteModelGroup_Request, Ml_DeleteModelGroup_Response, Ml_DeleteModelGroup_ResponseBody, + Ml_GetModelGroup_Request, Ml_GetModelGroup_Response, Ml_GetModelGroup_ResponseBody, + Ml_RegisterModel_Request, Ml_RegisterModel_RequestBody, Ml_RegisterModel_Response, Ml_RegisterModel_ResponseBody, + Ml_SearchModels_Request, Ml_SearchModels_Response, Ml_SearchModels_ResponseBody, + Ml_DeleteModel_Request, Ml_DeleteModel_Response, Ml_DeleteModel_ResponseBody, + Ml_GetTask_Request, Ml_GetTask_Response, Ml_GetTask_ResponseBody, + Notifications_ListChannels_Request, Notifications_ListChannels_Response, Notifications_ListChannels_ResponseBody, + Notifications_DeleteConfigs_Request, Notifications_DeleteConfigs_Response, Notifications_DeleteConfigs_ResponseBody, + Notifications_GetConfigs_Request, Notifications_GetConfigs_RequestBody, Notifications_GetConfigs_Response, Notifications_GetConfigs_ResponseBody, + Notifications_CreateConfig_Request, Notifications_CreateConfig_Response, Notifications_CreateConfig_ResponseBody, + Notifications_DeleteConfig_Request, Notifications_DeleteConfig_Response, Notifications_DeleteConfig_ResponseBody, + Notifications_GetConfig_Request, Notifications_GetConfig_Response, Notifications_GetConfig_ResponseBody, + Notifications_UpdateConfig_Request, Notifications_UpdateConfig_Response, Notifications_UpdateConfig_ResponseBody, + Notifications_SendTest_Request, Notifications_SendTest_Response, Notifications_SendTest_ResponseBody, + Notifications_ListFeatures_Request, Notifications_ListFeatures_Response, Notifications_ListFeatures_ResponseBody, + Ppl_Query_Request, Ppl_Query_Response, Ppl_Query_ResponseBody, + Ppl_Explain_Request, Ppl_Explain_Response, Ppl_Explain_ResponseBody, + Ppl_GetStats_Request, Ppl_GetStats_Response, Ppl_GetStats_ResponseBody, + Ppl_PostStats_Request, Ppl_PostStats_Response, Ppl_PostStats_ResponseBody, + Sql_Settings_Request, Sql_Settings_RequestBody, Sql_Settings_Response, Sql_Settings_ResponseBody, + Sql_Query_Request, Sql_Query_Response, Sql_Query_ResponseBody, + Sql_Explain_Request, Sql_Explain_Response, Sql_Explain_ResponseBody, + Sql_Close_Request, Sql_Close_Response, Sql_Close_ResponseBody, + Sql_GetStats_Request, Sql_GetStats_Response, Sql_GetStats_ResponseBody, + Sql_PostStats_Request, Sql_PostStats_Response, Sql_PostStats_ResponseBody, + Rollups_Delete_Request, Rollups_Delete_Response, Rollups_Delete_ResponseBody, + Rollups_Get_Request, Rollups_Get_Response, Rollups_Get_ResponseBody, + Rollups_Put_Request, Rollups_Put_Response, Rollups_Put_ResponseBody, + Rollups_Explain_Request, Rollups_Explain_Response, Rollups_Explain_ResponseBody, + Rollups_Start_Request, Rollups_Start_Response, Rollups_Start_ResponseBody, + Rollups_Stop_Request, Rollups_Stop_Response, Rollups_Stop_ResponseBody, + Transforms_Search_Request, Transforms_Search_Response, Transforms_Search_ResponseBody, + Transforms_Preview_Request, Transforms_Preview_Response, Transforms_Preview_ResponseBody, + Transforms_Delete_Request, Transforms_Delete_Response, Transforms_Delete_ResponseBody, + Transforms_Get_Request, Transforms_Get_Response, Transforms_Get_ResponseBody, + Transforms_Put_Request, Transforms_Put_Response, Transforms_Put_ResponseBody, + Transforms_Explain_Request, Transforms_Explain_Response, Transforms_Explain_ResponseBody, + Transforms_Start_Request, Transforms_Start_Response, Transforms_Start_ResponseBody, + Transforms_Stop_Request, Transforms_Stop_Response, Transforms_Stop_ResponseBody, + RemoteStore_Restore_Request, RemoteStore_Restore_RequestBody, RemoteStore_Restore_Response, RemoteStore_Restore_ResponseBody, + SearchPipeline_Get_Request, SearchPipeline_Get_Response, SearchPipeline_Get_ResponseBody, + SearchPipeline_Delete_Request, SearchPipeline_Delete_Response, SearchPipeline_Delete_ResponseBody, + SearchPipeline_Put_Request, SearchPipeline_Put_Response, SearchPipeline_Put_ResponseBody, + Snapshot_GetRepository_Request, Snapshot_GetRepository_Response, Snapshot_GetRepository_ResponseBody, + Snapshot_Status_Request, Snapshot_Status_Response, Snapshot_Status_ResponseBody, + Snapshot_DeleteRepository_Request, Snapshot_DeleteRepository_Response, Snapshot_DeleteRepository_ResponseBody, + Snapshot_CreateRepository_Request, Snapshot_CreateRepository_RequestBody, Snapshot_CreateRepository_Response, Snapshot_CreateRepository_ResponseBody, + Snapshot_CleanupRepository_Request, Snapshot_CleanupRepository_Response, Snapshot_CleanupRepository_ResponseBody, + Snapshot_VerifyRepository_Request, Snapshot_VerifyRepository_Response, Snapshot_VerifyRepository_ResponseBody, + Snapshot_Delete_Request, Snapshot_Delete_Response, Snapshot_Delete_ResponseBody, + Snapshot_Get_Request, Snapshot_Get_Response, Snapshot_Get_ResponseBody, + Snapshot_Create_Request, Snapshot_Create_RequestBody, Snapshot_Create_Response, Snapshot_Create_ResponseBody, + Snapshot_Clone_Request, Snapshot_Clone_RequestBody, Snapshot_Clone_Response, Snapshot_Clone_ResponseBody, + Snapshot_Restore_Request, Snapshot_Restore_RequestBody, Snapshot_Restore_Response, Snapshot_Restore_ResponseBody, + Tasks_List_Request, Tasks_List_Response, Tasks_List_ResponseBody, + Tasks_Cancel_Request, Tasks_Cancel_Response, Tasks_Cancel_ResponseBody, + Tasks_Get_Request, Tasks_Get_Response, Tasks_Get_ResponseBody, +}; \ No newline at end of file diff --git a/api/index.js b/api/index.js deleted file mode 100644 index cd250e5d2..000000000 --- a/api/index.js +++ /dev/null @@ -1,413 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -const bulkApi = require('./api/bulk'); -const CatApi = require('./api/cat'); -const clearScrollApi = require('./api/clear_scroll'); -const ClusterApi = require('./api/cluster'); -const countApi = require('./api/count'); -const createApi = require('./api/create'); -const createPitApi = require('./api/create_pit'); -const DanglingIndicesApi = require('./api/dangling_indices'); -const deleteApi = require('./api/delete'); -const deleteAllPitsApi = require('./api/delete_all_pits'); -const deleteByQueryApi = require('./api/delete_by_query'); -const deleteByQueryRethrottleApi = require('./api/delete_by_query_rethrottle'); -const deletePitApi = require('./api/delete_pit'); -const deleteScriptApi = require('./api/delete_script'); -const existsApi = require('./api/exists'); -const existsSourceApi = require('./api/exists_source'); -const explainApi = require('./api/explain'); -const FeaturesApi = require('./api/features'); -const fieldCapsApi = require('./api/field_caps'); -const getApi = require('./api/get'); -const getAllPitsApi = require('./api/get_all_pits'); -const getScriptApi = require('./api/get_script'); -const getScriptContextApi = require('./api/get_script_context'); -const getScriptLanguagesApi = require('./api/get_script_languages'); -const getSourceApi = require('./api/get_source'); -const HttpApi = require('./api/http'); -const indexApi = require('./api/index'); -const IndicesApi = require('./api/indices'); -const infoApi = require('./api/info'); -const IngestApi = require('./api/ingest'); -const mgetApi = require('./api/mget'); -const msearchApi = require('./api/msearch'); -const msearchTemplateApi = require('./api/msearch_template'); -const mtermvectorsApi = require('./api/mtermvectors'); -const NodesApi = require('./api/nodes'); -const pingApi = require('./api/ping'); -const putScriptApi = require('./api/put_script'); -const rankEvalApi = require('./api/rank_eval'); -const reindexApi = require('./api/reindex'); -const reindexRethrottleApi = require('./api/reindex_rethrottle'); -const renderSearchTemplateApi = require('./api/render_search_template'); -const RollupsApi = require('./api/rollups'); -const scriptsPainlessExecuteApi = require('./api/scripts_painless_execute'); -const scrollApi = require('./api/scroll'); -const SecurityApi = require('./api/security'); -const searchApi = require('./api/search'); -const searchShardsApi = require('./api/search_shards'); -const searchTemplateApi = require('./api/search_template'); -const ShutdownApi = require('./api/shutdown'); -const SnapshotApi = require('./api/snapshot'); -const TasksApi = require('./api/tasks'); -const termsEnumApi = require('./api/terms_enum'); -const termvectorsApi = require('./api/termvectors'); -const TransformsAPi = require('./api/transforms'); -const updateApi = require('./api/update'); -const updateByQueryApi = require('./api/update_by_query'); -const updateByQueryRethrottleApi = require('./api/update_by_query_rethrottle'); - -const { kConfigurationError } = require('./utils'); -const kCat = Symbol('Cat'); -const kCluster = Symbol('Cluster'); -const kDanglingIndices = Symbol('DanglingIndices'); -const kFeatures = Symbol('Features'); -const kHttp = Symbol('Http'); -const kIndices = Symbol('Indices'); -const kIngest = Symbol('Ingest'); -const kNodes = Symbol('Nodes'); -const kRollups = Symbol('Rollups'); -const kSecurity = Symbol('Security'); -const kShutdown = Symbol('Shutdown'); -const kSnapshot = Symbol('Snapshot'); -const kTasks = Symbol('Tasks'); -const kTransforms = Symbol('Transforms'); - -function OpenSearchAPI(opts) { - this[kConfigurationError] = opts.ConfigurationError; - this[kCat] = null; - this[kCluster] = null; - this[kDanglingIndices] = null; - this[kFeatures] = null; - this[kHttp] = null; - this[kIndices] = null; - this[kIngest] = null; - this[kNodes] = null; - this[kRollups] = null; - this[kSecurity] = null; - this[kShutdown] = null; - this[kSnapshot] = null; - this[kTasks] = null; - this[kTransforms] = null; -} - -OpenSearchAPI.prototype.bulk = bulkApi; -OpenSearchAPI.prototype.clearScroll = clearScrollApi; -OpenSearchAPI.prototype.count = countApi; -OpenSearchAPI.prototype.create = createApi; -OpenSearchAPI.prototype.createPit = createPitApi; -OpenSearchAPI.prototype.delete = deleteApi; -OpenSearchAPI.prototype.deleteAllPits = deleteAllPitsApi; -OpenSearchAPI.prototype.deleteByQuery = deleteByQueryApi; -OpenSearchAPI.prototype.deleteByQueryRethrottle = deleteByQueryRethrottleApi; -OpenSearchAPI.prototype.deletePit = deletePitApi; -OpenSearchAPI.prototype.deleteScript = deleteScriptApi; -OpenSearchAPI.prototype.exists = existsApi; -OpenSearchAPI.prototype.existsSource = existsSourceApi; -OpenSearchAPI.prototype.explain = explainApi; -OpenSearchAPI.prototype.fieldCaps = fieldCapsApi; -OpenSearchAPI.prototype.get = getApi; -OpenSearchAPI.prototype.getAllPits = getAllPitsApi; -OpenSearchAPI.prototype.getScript = getScriptApi; -OpenSearchAPI.prototype.getScriptContext = getScriptContextApi; -OpenSearchAPI.prototype.getScriptLanguages = getScriptLanguagesApi; -OpenSearchAPI.prototype.getSource = getSourceApi; -OpenSearchAPI.prototype.index = indexApi; -OpenSearchAPI.prototype.info = infoApi; -OpenSearchAPI.prototype.mget = mgetApi; -OpenSearchAPI.prototype.msearch = msearchApi; -OpenSearchAPI.prototype.msearchTemplate = msearchTemplateApi; -OpenSearchAPI.prototype.mtermvectors = mtermvectorsApi; -OpenSearchAPI.prototype.ping = pingApi; -OpenSearchAPI.prototype.putScript = putScriptApi; -OpenSearchAPI.prototype.rankEval = rankEvalApi; -OpenSearchAPI.prototype.reindex = reindexApi; -OpenSearchAPI.prototype.reindexRethrottle = reindexRethrottleApi; -OpenSearchAPI.prototype.renderSearchTemplate = renderSearchTemplateApi; -OpenSearchAPI.prototype.scriptsPainlessExecute = scriptsPainlessExecuteApi; -OpenSearchAPI.prototype.scroll = scrollApi; -OpenSearchAPI.prototype.search = searchApi; -OpenSearchAPI.prototype.searchShards = searchShardsApi; -OpenSearchAPI.prototype.searchTemplate = searchTemplateApi; -OpenSearchAPI.prototype.termsEnum = termsEnumApi; -OpenSearchAPI.prototype.termvectors = termvectorsApi; -OpenSearchAPI.prototype.update = updateApi; -OpenSearchAPI.prototype.updateByQuery = updateByQueryApi; -OpenSearchAPI.prototype.updateByQueryRethrottle = updateByQueryRethrottleApi; - -Object.defineProperties(OpenSearchAPI.prototype, { - cat: { - get() { - if (this[kCat] === null) { - this[kCat] = new CatApi(this.transport, this[kConfigurationError]); - } - return this[kCat]; - }, - }, - clear_scroll: { - get() { - return this.clearScroll; - }, - }, - cluster: { - get() { - if (this[kCluster] === null) { - this[kCluster] = new ClusterApi(this.transport, this[kConfigurationError]); - } - return this[kCluster]; - }, - }, - create_pit: { - get() { - return this.createPit; - }, - }, - danglingIndices: { - get() { - if (this[kDanglingIndices] === null) { - this[kDanglingIndices] = new DanglingIndicesApi(this.transport, this[kConfigurationError]); - } - return this[kDanglingIndices]; - }, - }, - dangling_indices: { - get() { - return this.danglingIndices; - }, - }, - delete_all_pits: { - get() { - return this.deleteAllPits; - }, - }, - delete_by_query: { - get() { - return this.deleteByQuery; - }, - }, - delete_by_query_rethrottle: { - get() { - return this.deleteByQueryRethrottle; - }, - }, - delete_pit: { - get() { - return this.deletePit; - }, - }, - delete_script: { - get() { - return this.deleteScript; - }, - }, - exists_source: { - get() { - return this.existsSource; - }, - }, - features: { - get() { - if (this[kFeatures] === null) { - this[kFeatures] = new FeaturesApi(this.transport, this[kConfigurationError]); - } - return this[kFeatures]; - }, - }, - field_caps: { - get() { - return this.fieldCaps; - }, - }, - get_all_pits: { - get() { - return this.getAllPits; - }, - }, - get_script: { - get() { - return this.getScript; - }, - }, - get_script_context: { - get() { - return this.getScriptContext; - }, - }, - get_script_languages: { - get() { - return this.getScriptLanguages; - }, - }, - get_source: { - get() { - return this.getSource; - }, - }, - http: { - get() { - if (this[kHttp] === null) { - this[kHttp] = new HttpApi(this.transport, this[kConfigurationError]); - } - return this[kHttp]; - }, - }, - indices: { - get() { - if (this[kIndices] === null) { - this[kIndices] = new IndicesApi(this.transport, this[kConfigurationError]); - } - return this[kIndices]; - }, - }, - ingest: { - get() { - if (this[kIngest] === null) { - this[kIngest] = new IngestApi(this.transport, this[kConfigurationError]); - } - return this[kIngest]; - }, - }, - msearch_template: { - get() { - return this.msearchTemplate; - }, - }, - nodes: { - get() { - if (this[kNodes] === null) { - this[kNodes] = new NodesApi(this.transport, this[kConfigurationError]); - } - return this[kNodes]; - }, - }, - put_script: { - get() { - return this.putScript; - }, - }, - rank_eval: { - get() { - return this.rankEval; - }, - }, - reindex_rethrottle: { - get() { - return this.reindexRethrottle; - }, - }, - render_search_template: { - get() { - return this.renderSearchTemplate; - }, - }, - rollups: { - get() { - if (this[kRollups] === null) { - this[kRollups] = new RollupsApi(this.transport, this[kConfigurationError]); - } - return this[kRollups]; - }, - }, - scripts_painless_execute: { - get() { - return this.scriptsPainlessExecute; - }, - }, - search_shards: { - get() { - return this.searchShards; - }, - }, - search_template: { - get() { - return this.searchTemplate; - }, - }, - security: { - get() { - if (this[kSecurity] === null) { - this[kSecurity] = new SecurityApi(this.transport, this[kConfigurationError]); - } - return this[kSecurity]; - }, - }, - shutdown: { - get() { - if (this[kShutdown] === null) { - this[kShutdown] = new ShutdownApi(this.transport, this[kConfigurationError]); - } - return this[kShutdown]; - }, - }, - snapshot: { - get() { - if (this[kSnapshot] === null) { - this[kSnapshot] = new SnapshotApi(this.transport, this[kConfigurationError]); - } - return this[kSnapshot]; - }, - }, - tasks: { - get() { - if (this[kTasks] === null) { - this[kTasks] = new TasksApi(this.transport, this[kConfigurationError]); - } - return this[kTasks]; - }, - }, - terms_enum: { - get() { - return this.termsEnum; - }, - }, - transforms: { - get() { - if (this[kTransforms] === null) { - this[kTransforms] = new TransformsAPi(this.transport, this[kConfigurationError]); - } - return this[kTransforms]; - }, - }, - update_by_query: { - get() { - return this.updateByQuery; - }, - }, - update_by_query_rethrottle: { - get() { - return this.updateByQueryRethrottle; - }, - }, -}); - -module.exports = OpenSearchAPI; diff --git a/api/indices/_api.js b/api/indices/_api.js new file mode 100644 index 000000000..bf8817454 --- /dev/null +++ b/api/indices/_api.js @@ -0,0 +1,133 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Indices */ + +function IndicesApi(bindObj) { + this.addBlock = require('./addBlock').bind(bindObj); + this.analyze = require('./analyze').bind(bindObj); + this.clearCache = require('./clearCache').bind(bindObj); + this.clone = require('./clone').bind(bindObj); + this.close = require('./close').bind(bindObj); + this.create = require('./create').bind(bindObj); + this.createDataStream = require('./createDataStream').bind(bindObj); + this.dataStreamsStats = require('./dataStreamsStats').bind(bindObj); + this.delete = require('./delete').bind(bindObj); + this.deleteAlias = require('./deleteAlias').bind(bindObj); + this.deleteDataStream = require('./deleteDataStream').bind(bindObj); + this.deleteIndexTemplate = require('./deleteIndexTemplate').bind(bindObj); + this.deleteTemplate = require('./deleteTemplate').bind(bindObj); + this.exists = require('./exists').bind(bindObj); + this.existsAlias = require('./existsAlias').bind(bindObj); + this.existsIndexTemplate = require('./existsIndexTemplate').bind(bindObj); + this.existsTemplate = require('./existsTemplate').bind(bindObj); + this.flush = require('./flush').bind(bindObj); + this.forcemerge = require('./forcemerge').bind(bindObj); + this.get = require('./get').bind(bindObj); + this.getAlias = require('./getAlias').bind(bindObj); + this.getDataStream = require('./getDataStream').bind(bindObj); + this.getFieldMapping = require('./getFieldMapping').bind(bindObj); + this.getIndexTemplate = require('./getIndexTemplate').bind(bindObj); + this.getMapping = require('./getMapping').bind(bindObj); + this.getSettings = require('./getSettings').bind(bindObj); + this.getTemplate = require('./getTemplate').bind(bindObj); + this.getUpgrade = require('./getUpgrade').bind(bindObj); + this.open = require('./open').bind(bindObj); + this.putAlias = require('./putAlias').bind(bindObj); + this.putIndexTemplate = require('./putIndexTemplate').bind(bindObj); + this.putMapping = require('./putMapping').bind(bindObj); + this.putSettings = require('./putSettings').bind(bindObj); + this.putTemplate = require('./putTemplate').bind(bindObj); + this.recovery = require('./recovery').bind(bindObj); + this.refresh = require('./refresh').bind(bindObj); + this.resolveIndex = require('./resolveIndex').bind(bindObj); + this.rollover = require('./rollover').bind(bindObj); + this.segments = require('./segments').bind(bindObj); + this.shardStores = require('./shardStores').bind(bindObj); + this.shrink = require('./shrink').bind(bindObj); + this.simulateIndexTemplate = require('./simulateIndexTemplate').bind(bindObj); + this.simulateTemplate = require('./simulateTemplate').bind(bindObj); + this.split = require('./split').bind(bindObj); + this.stats = require('./stats').bind(bindObj); + this.updateAliases = require('./updateAliases').bind(bindObj); + this.upgrade = require('./upgrade').bind(bindObj); + this.validateQuery = require('./validateQuery').bind(bindObj); + + // Deprecated: Use addBlock instead. + this.add_block = require('./addBlock').bind(bindObj); + // Deprecated: Use clearCache instead. + this.clear_cache = require('./clearCache').bind(bindObj); + // Deprecated: Use createDataStream instead. + this.create_data_stream = require('./createDataStream').bind(bindObj); + // Deprecated: Use dataStreamsStats instead. + this.data_streams_stats = require('./dataStreamsStats').bind(bindObj); + // Deprecated: Use deleteAlias instead. + this.delete_alias = require('./deleteAlias').bind(bindObj); + // Deprecated: Use deleteDataStream instead. + this.delete_data_stream = require('./deleteDataStream').bind(bindObj); + // Deprecated: Use deleteIndexTemplate instead. + this.delete_index_template = require('./deleteIndexTemplate').bind(bindObj); + // Deprecated: Use deleteTemplate instead. + this.delete_template = require('./deleteTemplate').bind(bindObj); + // Deprecated: Use existsAlias instead. + this.exists_alias = require('./existsAlias').bind(bindObj); + // Deprecated: Use existsIndexTemplate instead. + this.exists_index_template = require('./existsIndexTemplate').bind(bindObj); + // Deprecated: Use existsTemplate instead. + this.exists_template = require('./existsTemplate').bind(bindObj); + // Deprecated: Use getAlias instead. + this.get_alias = require('./getAlias').bind(bindObj); + // Deprecated: Use getDataStream instead. + this.get_data_stream = require('./getDataStream').bind(bindObj); + // Deprecated: Use getFieldMapping instead. + this.get_field_mapping = require('./getFieldMapping').bind(bindObj); + // Deprecated: Use getIndexTemplate instead. + this.get_index_template = require('./getIndexTemplate').bind(bindObj); + // Deprecated: Use getMapping instead. + this.get_mapping = require('./getMapping').bind(bindObj); + // Deprecated: Use getSettings instead. + this.get_settings = require('./getSettings').bind(bindObj); + // Deprecated: Use getTemplate instead. + this.get_template = require('./getTemplate').bind(bindObj); + // Deprecated: Use getUpgrade instead. + this.get_upgrade = require('./getUpgrade').bind(bindObj); + // Deprecated: Use putAlias instead. + this.put_alias = require('./putAlias').bind(bindObj); + // Deprecated: Use putIndexTemplate instead. + this.put_index_template = require('./putIndexTemplate').bind(bindObj); + // Deprecated: Use putMapping instead. + this.put_mapping = require('./putMapping').bind(bindObj); + // Deprecated: Use putSettings instead. + this.put_settings = require('./putSettings').bind(bindObj); + // Deprecated: Use putTemplate instead. + this.put_template = require('./putTemplate').bind(bindObj); + // Deprecated: Use resolveIndex instead. + this.resolve_index = require('./resolveIndex').bind(bindObj); + // Deprecated: Use shardStores instead. + this.shard_stores = require('./shardStores').bind(bindObj); + // Deprecated: Use simulateIndexTemplate instead. + this.simulate_index_template = require('./simulateIndexTemplate').bind(bindObj); + // Deprecated: Use simulateTemplate instead. + this.simulate_template = require('./simulateTemplate').bind(bindObj); + // Deprecated: Use updateAliases instead. + this.update_aliases = require('./updateAliases').bind(bindObj); + // Deprecated: Use validateQuery instead. + this.validate_query = require('./validateQuery').bind(bindObj); +} + +module.exports = IndicesApi; diff --git a/api/indices/addBlock.d.ts b/api/indices/addBlock.d.ts new file mode 100644 index 000000000..091b4c7e4 --- /dev/null +++ b/api/indices/addBlock.d.ts @@ -0,0 +1,42 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Indices_AddBlock from '../_types/indices.add_block' +import * as Common from '../_types/_common' + +export interface Indices_AddBlock_Request extends Global.Params { + allow_no_indices?: boolean; + block: Indices_AddBlock.IndicesBlockOptions; + cluster_manager_timeout?: Common.Duration; + expand_wildcards?: Common.ExpandWildcards; + ignore_unavailable?: boolean; + index: Common.Indices; + master_timeout?: Common.Duration; + timeout?: Common.Duration; +} + +export interface Indices_AddBlock_Response extends ApiResponse { + body: Indices_AddBlock_ResponseBody; +} + +export interface Indices_AddBlock_ResponseBody { + acknowledged: boolean; + indices: Indices_AddBlock.IndicesBlockStatus[]; + shards_acknowledged: boolean; +} + diff --git a/api/indices/addBlock.js b/api/indices/addBlock.js new file mode 100644 index 000000000..fc0d833b7 --- /dev/null +++ b/api/indices/addBlock.js @@ -0,0 +1,58 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Adds a block to an index. + *
See Also: {@link https://opensearch.org/docs/latest - indices.add_block} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {string} [params.master_timeout] DEPRECATED - Specify timeout for connection to master + * @param {string} [params.timeout] - Explicit operation timeout + * @param {string} params.block - The block to add (one of read, write, read_only or metadata) + * @param {string} params.index - A comma separated list of indices to add a block to + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function addBlockFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.block == null) return handleMissingParam('block', this, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + + let { body, block, index, ...querystring } = params; + block = parsePathParam(block); + index = parsePathParam(index); + + const path = '/' + index + '/_block/' + block; + const method = 'PUT'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = addBlockFunc; diff --git a/api/indices/analyze.d.ts b/api/indices/analyze.d.ts new file mode 100644 index 000000000..a0373023e --- /dev/null +++ b/api/indices/analyze.d.ts @@ -0,0 +1,48 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Common_Analysis from '../_types/_common.analysis' +import * as Indices_Analyze from '../_types/indices.analyze' + +export interface Indices_Analyze_Request extends Global.Params { + body?: Indices_Analyze_RequestBody; + index?: Common.IndexName; +} + +export interface Indices_Analyze_RequestBody { + analyzer?: string; + attributes?: string[]; + char_filter?: Common_Analysis.CharFilter[]; + explain?: boolean; + field?: Common.Field; + filter?: Common_Analysis.TokenFilter[]; + normalizer?: string; + text?: Indices_Analyze.TextToAnalyze; + tokenizer?: Common_Analysis.Tokenizer; +} + +export interface Indices_Analyze_Response extends ApiResponse { + body: Indices_Analyze_ResponseBody; +} + +export interface Indices_Analyze_ResponseBody { + detail?: Indices_Analyze.AnalyzeDetail; + tokens?: Indices_Analyze.AnalyzeToken[]; +} + diff --git a/api/indices/analyze.js b/api/indices/analyze.js new file mode 100644 index 000000000..df6d959be --- /dev/null +++ b/api/indices/analyze.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Performs the analysis process on a text and return the tokens breakdown of the text. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/analyze-apis/perform-text-analysis/ - indices.analyze} + * + * @memberOf API-Indices + * + * @param {object} [params] + * @param {string} [params.index] - Index used to derive the analyzer. If specified, the `analyzer` or field parameter overrides this value. If no index is specified or the index does not have a default analyzer, the analyze API uses the standard analyzer. + * @param {object} [params.body] - Define analyzer/tokenizer parameters and the text on which the analysis should be performed + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function analyzeFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_analyze'].filter(c => c).join('').replace('//', '/'); + const method = body ? 'POST' : 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = analyzeFunc; diff --git a/api/indices/clearCache.d.ts b/api/indices/clearCache.d.ts new file mode 100644 index 000000000..8f0fad62c --- /dev/null +++ b/api/indices/clearCache.d.ts @@ -0,0 +1,38 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Indices_ClearCache_Request extends Global.Params { + allow_no_indices?: boolean; + expand_wildcards?: Common.ExpandWildcards; + fielddata?: boolean; + fields?: Common.Fields; + file?: boolean; + ignore_unavailable?: boolean; + index?: Common.Indices; + query?: boolean; + request?: boolean; +} + +export interface Indices_ClearCache_Response extends ApiResponse { + body: Indices_ClearCache_ResponseBody; +} + +export type Indices_ClearCache_ResponseBody = Common.ShardsOperationResponseBase + diff --git a/api/indices/clearCache.js b/api/indices/clearCache.js new file mode 100644 index 000000000..e0d8297d4 --- /dev/null +++ b/api/indices/clearCache.js @@ -0,0 +1,56 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Clears all or specific caches for one or more indices. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/clear-index-cache/ - indices.clear_cache} + * + * @memberOf API-Indices + * + * @param {object} [params] + * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + * @param {boolean} [params.fielddata] - If `true`, clears the fields cache. Use the `fields` parameter to clear the cache of specific fields only. + * @param {string} [params.fields] - Comma-separated list of field names used to limit the `fielddata` parameter. + * @param {boolean} [params.file=false] - If true, clears the unused entries from the file cache on nodes with the Search role. + * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. + * @param {string} [params.index] - Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. + * @param {boolean} [params.query] - If `true`, clears the query cache. + * @param {boolean} [params.request] - If `true`, clears the request cache. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function clearCacheFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_cache/clear'].filter(c => c).join('').replace('//', '/'); + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = clearCacheFunc; diff --git a/api/indices/clone.d.ts b/api/indices/clone.d.ts new file mode 100644 index 000000000..a35182434 --- /dev/null +++ b/api/indices/clone.d.ts @@ -0,0 +1,48 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_Common from '../_types/indices._common' + +export interface Indices_Clone_Request extends Global.Params { + body?: Indices_Clone_RequestBody; + cluster_manager_timeout?: Common.Duration; + index: Common.IndexName; + master_timeout?: Common.Duration; + target: Common.Name; + task_execution_timeout?: Common.Duration; + timeout?: Common.Duration; + wait_for_active_shards?: Common.WaitForActiveShards; + wait_for_completion?: boolean; +} + +export interface Indices_Clone_RequestBody { + aliases?: Record; + settings?: Record>; +} + +export interface Indices_Clone_Response extends ApiResponse { + body: Indices_Clone_ResponseBody; +} + +export interface Indices_Clone_ResponseBody { + acknowledged: boolean; + index: Common.IndexName; + shards_acknowledged: boolean; +} + diff --git a/api/indices/clone.js b/api/indices/clone.js new file mode 100644 index 000000000..d0bbf5931 --- /dev/null +++ b/api/indices/clone.js @@ -0,0 +1,59 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Clones an index. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/clone/ - indices.clone} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.task_execution_timeout] - Explicit task execution timeout, only useful when wait_for_completion is false, defaults to 1h. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). + * @param {boolean} [params.wait_for_completion=true] - Should this request wait until the operation has completed before returning. + * @param {string} params.index - Name of the source index to clone. + * @param {string} params.target - Name of the target index to create. + * @param {object} [params.body] - The configuration for the target index (`settings` and `aliases`) + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function cloneFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + if (params.target == null) return handleMissingParam('target', this, callback); + + let { body, index, target, ...querystring } = params; + index = parsePathParam(index); + target = parsePathParam(target); + + const path = '/' + index + '/_clone/' + target; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = cloneFunc; diff --git a/api/indices/close.d.ts b/api/indices/close.d.ts new file mode 100644 index 000000000..ad24b5dc2 --- /dev/null +++ b/api/indices/close.d.ts @@ -0,0 +1,42 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_Close from '../_types/indices.close' + +export interface Indices_Close_Request extends Global.Params { + allow_no_indices?: boolean; + cluster_manager_timeout?: Common.Duration; + expand_wildcards?: Common.ExpandWildcards; + ignore_unavailable?: boolean; + index: Common.Indices; + master_timeout?: Common.Duration; + timeout?: Common.Duration; + wait_for_active_shards?: Common.WaitForActiveShards; +} + +export interface Indices_Close_Response extends ApiResponse { + body: Indices_Close_ResponseBody; +} + +export interface Indices_Close_ResponseBody { + acknowledged: boolean; + indices: Record; + shards_acknowledged: boolean; +} + diff --git a/api/indices/close.js b/api/indices/close.js new file mode 100644 index 000000000..02fe18a0e --- /dev/null +++ b/api/indices/close.js @@ -0,0 +1,56 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Closes an index. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/close-index/ - indices.close} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). + * @param {string} params.index - Comma-separated list or wildcard expression of index names used to limit the request. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function closeFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = '/' + index + '/_close'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = closeFunc; diff --git a/api/indices/create.d.ts b/api/indices/create.d.ts new file mode 100644 index 000000000..be2134ea1 --- /dev/null +++ b/api/indices/create.d.ts @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_Common from '../_types/indices._common' +import * as Common_Mapping from '../_types/_common.mapping' + +export interface Indices_Create_Request extends Global.Params { + body?: Indices_Create_RequestBody; + cluster_manager_timeout?: Common.Duration; + index: Common.IndexName; + master_timeout?: Common.Duration; + timeout?: Common.Duration; + wait_for_active_shards?: Common.WaitForActiveShards; +} + +export interface Indices_Create_RequestBody { + aliases?: Record; + mappings?: Common_Mapping.TypeMapping; + settings?: Indices_Common.IndexSettings; +} + +export interface Indices_Create_Response extends ApiResponse { + body: Indices_Create_ResponseBody; +} + +export interface Indices_Create_ResponseBody { + acknowledged: boolean; + index: Common.IndexName; + shards_acknowledged: boolean; +} + diff --git a/api/indices/create.js b/api/indices/create.js new file mode 100644 index 000000000..5bb73fbe0 --- /dev/null +++ b/api/indices/create.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Creates an index with optional settings and mappings. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/create-index/ - indices.create} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). + * @param {string} params.index - Name of the index you wish to create. + * @param {object} [params.body] - The configuration for the index (`settings` and `mappings`) + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function createFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = '/' + index; + const method = 'PUT'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = createFunc; diff --git a/api/indices/createDataStream.d.ts b/api/indices/createDataStream.d.ts new file mode 100644 index 000000000..5fcd1704d --- /dev/null +++ b/api/indices/createDataStream.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Indices_CreateDataStream_Request extends Global.Params { + body?: Indices_CreateDataStream_RequestBody; + name: Common.DataStreamName; +} + +export type Indices_CreateDataStream_RequestBody = Record + +export interface Indices_CreateDataStream_Response extends ApiResponse { + body: Indices_CreateDataStream_ResponseBody; +} + +export type Indices_CreateDataStream_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/indices/createDataStream.js b/api/indices/createDataStream.js new file mode 100644 index 000000000..e3ce5f0ba --- /dev/null +++ b/api/indices/createDataStream.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Creates or updates a data stream. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/data-streams/ - indices.create_data_stream} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {string} params.name - Name of the data stream, which must meet the following criteria: Lowercase only; Cannot include `\`, `/`, `*`, `?`, `"`, `<`, `>`, `|`, `,`, `#`, `:`, or a space character; Cannot start with `-`, `_`, `+`, or `.ds-`; Cannot be `.` or `..`; Cannot be longer than 255 bytes. Multi-byte characters count towards this limit faster. + * @param {object} [params.body] - The data stream definition + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function createDataStreamFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.name == null) return handleMissingParam('name', this, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = '/_data_stream/' + name; + const method = 'PUT'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = createDataStreamFunc; diff --git a/api/indices/dataStreamsStats.d.ts b/api/indices/dataStreamsStats.d.ts new file mode 100644 index 000000000..2a8931def --- /dev/null +++ b/api/indices/dataStreamsStats.d.ts @@ -0,0 +1,38 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_DataStreamsStats from '../_types/indices.data_streams_stats' + +export interface Indices_DataStreamsStats_Request extends Global.Params { + name?: Common.Indices; +} + +export interface Indices_DataStreamsStats_Response extends ApiResponse { + body: Indices_DataStreamsStats_ResponseBody; +} + +export interface Indices_DataStreamsStats_ResponseBody { + _shards: Common.ShardStatistics; + backing_indices: number; + data_stream_count: number; + data_streams: Indices_DataStreamsStats.DataStreamsStatsItem[]; + total_store_size_bytes: number; + total_store_sizes?: Common.ByteSize; +} + diff --git a/api/indices/dataStreamsStats.js b/api/indices/dataStreamsStats.js new file mode 100644 index 000000000..6c18001c8 --- /dev/null +++ b/api/indices/dataStreamsStats.js @@ -0,0 +1,48 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Provides statistics on operations happening in a data stream. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/data-streams/ - indices.data_streams_stats} + * + * @memberOf API-Indices + * + * @param {object} [params] + * @param {string} [params.name] - Comma-separated list of data streams used to limit the request. Wildcard expressions (`*`) are supported. To target all data streams in a cluster, omit this parameter or use `*`. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function dataStreamsStatsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = ['/_data_stream/', name, '/_stats'].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = dataStreamsStatsFunc; diff --git a/api/indices/delete.d.ts b/api/indices/delete.d.ts new file mode 100644 index 000000000..ed71002a7 --- /dev/null +++ b/api/indices/delete.d.ts @@ -0,0 +1,36 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Indices_Delete_Request extends Global.Params { + allow_no_indices?: boolean; + cluster_manager_timeout?: Common.Duration; + expand_wildcards?: Common.ExpandWildcards; + ignore_unavailable?: boolean; + index: Common.Indices; + master_timeout?: Common.Duration; + timeout?: Common.Duration; +} + +export interface Indices_Delete_Response extends ApiResponse { + body: Indices_Delete_ResponseBody; +} + +export type Indices_Delete_ResponseBody = Common.IndicesResponseBase + diff --git a/api/indices/delete.js b/api/indices/delete.js new file mode 100644 index 000000000..9f0d7ac4c --- /dev/null +++ b/api/indices/delete.js @@ -0,0 +1,55 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Deletes an index. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/delete-index/ - indices.delete} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {boolean} [params.allow_no_indices=false] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + * @param {boolean} [params.ignore_unavailable=false] - If `false`, the request returns an error if it targets a missing or closed index. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {string} params.index - Comma-separated list of indices to delete. You cannot specify index aliases. By default, this parameter does not support wildcards (`*`) or `_all`. To use wildcards or `_all`, set the `action.destructive_requires_name` cluster setting to `false`. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = '/' + index; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteFunc; diff --git a/api/indices/deleteAlias.d.ts b/api/indices/deleteAlias.d.ts new file mode 100644 index 000000000..973cf23a6 --- /dev/null +++ b/api/indices/deleteAlias.d.ts @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Indices_DeleteAlias_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + index: Common.Indices; + master_timeout?: Common.Duration; + name: Common.Names; + timeout?: Common.Duration; +} + +export interface Indices_DeleteAlias_Response extends ApiResponse { + body: Indices_DeleteAlias_ResponseBody; +} + +export type Indices_DeleteAlias_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/indices/deleteAlias.js b/api/indices/deleteAlias.js new file mode 100644 index 000000000..7cbb62969 --- /dev/null +++ b/api/indices/deleteAlias.js @@ -0,0 +1,55 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Deletes an alias. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-alias/#delete-aliases - indices.delete_alias} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {string} params.index - Comma-separated list of data streams or indices used to limit the request. Supports wildcards (`*`). + * @param {string} params.name - Comma-separated list of aliases to remove. Supports wildcards (`*`). To remove all aliases, use `*` or `_all`. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteAliasFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + if (params.name == null) return handleMissingParam('name', this, callback); + + let { body, index, name, ...querystring } = params; + index = parsePathParam(index); + name = parsePathParam(name); + + const path = '/' + index + '/_alias/' + name; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteAliasFunc; diff --git a/api/indices/deleteDataStream.d.ts b/api/indices/deleteDataStream.d.ts new file mode 100644 index 000000000..6d4fa1ab1 --- /dev/null +++ b/api/indices/deleteDataStream.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Indices_DeleteDataStream_Request extends Global.Params { + name: Common.DataStreamNames; +} + +export interface Indices_DeleteDataStream_Response extends ApiResponse { + body: Indices_DeleteDataStream_ResponseBody; +} + +export type Indices_DeleteDataStream_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/indices/deleteDataStream.js b/api/indices/deleteDataStream.js new file mode 100644 index 000000000..f96bf8a71 --- /dev/null +++ b/api/indices/deleteDataStream.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Deletes a data stream. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/data-streams/ - indices.delete_data_stream} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {string} params.name - Comma-separated list of data streams to delete. Wildcard (`*`) expressions are supported. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteDataStreamFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.name == null) return handleMissingParam('name', this, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = '/_data_stream/' + name; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteDataStreamFunc; diff --git a/api/indices/deleteIndexTemplate.d.ts b/api/indices/deleteIndexTemplate.d.ts new file mode 100644 index 000000000..f08bc9915 --- /dev/null +++ b/api/indices/deleteIndexTemplate.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Indices_DeleteIndexTemplate_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + master_timeout?: Common.Duration; + name: Common.Name; + timeout?: Common.Duration; +} + +export interface Indices_DeleteIndexTemplate_Response extends ApiResponse { + body: Indices_DeleteIndexTemplate_ResponseBody; +} + +export type Indices_DeleteIndexTemplate_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/indices/deleteIndexTemplate.js b/api/indices/deleteIndexTemplate.js new file mode 100644 index 000000000..79907074e --- /dev/null +++ b/api/indices/deleteIndexTemplate.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Deletes an index template. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-templates/#delete-a-template - indices.delete_index_template} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {string} params.name - Name of the index template to delete. Wildcard (*) expressions are supported. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteIndexTemplateFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.name == null) return handleMissingParam('name', this, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = '/_index_template/' + name; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteIndexTemplateFunc; diff --git a/api/indices/deleteTemplate.d.ts b/api/indices/deleteTemplate.d.ts new file mode 100644 index 000000000..ba68c2172 --- /dev/null +++ b/api/indices/deleteTemplate.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Indices_DeleteTemplate_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + master_timeout?: Common.Duration; + name: Common.Name; + timeout?: Common.Duration; +} + +export interface Indices_DeleteTemplate_Response extends ApiResponse { + body: Indices_DeleteTemplate_ResponseBody; +} + +export type Indices_DeleteTemplate_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/indices/deleteTemplate.js b/api/indices/deleteTemplate.js new file mode 100644 index 000000000..3869ca80e --- /dev/null +++ b/api/indices/deleteTemplate.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Deletes an index template. + *
See Also: {@link https://opensearch.org/docs/latest - indices.delete_template} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {string} params.name - The name of the legacy index template to delete. Wildcard (`*`) expressions are supported. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteTemplateFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.name == null) return handleMissingParam('name', this, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = '/_template/' + name; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteTemplateFunc; diff --git a/api/indices/exists.d.ts b/api/indices/exists.d.ts new file mode 100644 index 000000000..7224129f2 --- /dev/null +++ b/api/indices/exists.d.ts @@ -0,0 +1,37 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Indices_Exists_Request extends Global.Params { + allow_no_indices?: boolean; + cluster_manager_timeout?: Common.Duration; + expand_wildcards?: Common.ExpandWildcards; + flat_settings?: boolean; + ignore_unavailable?: boolean; + include_defaults?: boolean; + index: Common.Indices; + local?: boolean; +} + +export interface Indices_Exists_Response extends ApiResponse { + body: Indices_Exists_ResponseBody; +} + +export type Indices_Exists_ResponseBody = Record + diff --git a/api/indices/exists.js b/api/indices/exists.js new file mode 100644 index 000000000..18af4186a --- /dev/null +++ b/api/indices/exists.js @@ -0,0 +1,56 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Returns information about whether a particular index exists. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/exists/ - indices.exists} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {boolean} [params.allow_no_indices=false] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + * @param {boolean} [params.flat_settings=false] - If `true`, returns settings in flat format. + * @param {boolean} [params.ignore_unavailable=false] - If `false`, the request returns an error if it targets a missing or closed index. + * @param {boolean} [params.include_defaults=false] - If `true`, return all default settings in the response. + * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. + * @param {string} params.index - Comma-separated list of data streams, indices, and aliases. Supports wildcards (`*`). + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function existsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = '/' + index; + const method = 'HEAD'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = existsFunc; diff --git a/api/indices/existsAlias.d.ts b/api/indices/existsAlias.d.ts new file mode 100644 index 000000000..d1a96734e --- /dev/null +++ b/api/indices/existsAlias.d.ts @@ -0,0 +1,35 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Indices_ExistsAlias_Request extends Global.Params { + allow_no_indices?: boolean; + expand_wildcards?: Common.ExpandWildcards; + ignore_unavailable?: boolean; + index?: Common.Indices; + local?: boolean; + name: Common.Names; +} + +export interface Indices_ExistsAlias_Response extends ApiResponse { + body: Indices_ExistsAlias_ResponseBody; +} + +export type Indices_ExistsAlias_ResponseBody = Record + diff --git a/api/indices/existsAlias.js b/api/indices/existsAlias.js new file mode 100644 index 000000000..0cbe029de --- /dev/null +++ b/api/indices/existsAlias.js @@ -0,0 +1,55 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Returns information about whether a particular alias exists. + *
See Also: {@link https://opensearch.org/docs/latest - indices.exists_alias} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + * @param {boolean} [params.ignore_unavailable] - If `false`, requests that include a missing data stream or index in the target indices or data streams return an error. + * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. + * @param {string} params.name - Comma-separated list of aliases to check. Supports wildcards (`*`). + * @param {string} [params.index] - Comma-separated list of data streams or indices used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function existsAliasFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.name == null) return handleMissingParam('name', this, callback); + + let { body, name, index, ...querystring } = params; + name = parsePathParam(name); + index = parsePathParam(index); + + const path = ['/', index, '/_alias/', name].filter(c => c).join('').replace('//', '/'); + const method = 'HEAD'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = existsAliasFunc; diff --git a/api/indices/existsIndexTemplate.d.ts b/api/indices/existsIndexTemplate.d.ts new file mode 100644 index 000000000..bbf112cc1 --- /dev/null +++ b/api/indices/existsIndexTemplate.d.ts @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Indices_ExistsIndexTemplate_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + flat_settings?: boolean; + local?: boolean; + master_timeout?: Common.Duration; + name: Common.Name; +} + +export interface Indices_ExistsIndexTemplate_Response extends ApiResponse { + body: Indices_ExistsIndexTemplate_ResponseBody; +} + +export type Indices_ExistsIndexTemplate_ResponseBody = Record + diff --git a/api/indices/existsIndexTemplate.js b/api/indices/existsIndexTemplate.js new file mode 100644 index 000000000..a1fc5b568 --- /dev/null +++ b/api/indices/existsIndexTemplate.js @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Returns information about whether a particular index template exists. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-templates/ - indices.exists_index_template} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {boolean} [params.flat_settings=false] - Return settings in flat format. + * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} params.name - Name of the index template to check existence of. Wildcard (*) expressions are supported. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function existsIndexTemplateFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.name == null) return handleMissingParam('name', this, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = '/_index_template/' + name; + const method = 'HEAD'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = existsIndexTemplateFunc; diff --git a/api/indices/existsTemplate.d.ts b/api/indices/existsTemplate.d.ts new file mode 100644 index 000000000..b1d0b8825 --- /dev/null +++ b/api/indices/existsTemplate.d.ts @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Indices_ExistsTemplate_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + flat_settings?: boolean; + local?: boolean; + master_timeout?: Common.Duration; + name: Common.Names; +} + +export interface Indices_ExistsTemplate_Response extends ApiResponse { + body: Indices_ExistsTemplate_ResponseBody; +} + +export type Indices_ExistsTemplate_ResponseBody = Record + diff --git a/api/indices/existsTemplate.js b/api/indices/existsTemplate.js new file mode 100644 index 000000000..32ac90749 --- /dev/null +++ b/api/indices/existsTemplate.js @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Returns information about whether a particular index template exists. + *
See Also: {@link https://opensearch.org/docs/latest - indices.exists_template} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {boolean} [params.flat_settings=false] - Return settings in flat format. + * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Explicit operation timeout for connection to master node + * @param {string} params.name - The comma separated names of the index templates + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function existsTemplateFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.name == null) return handleMissingParam('name', this, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = '/_template/' + name; + const method = 'HEAD'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = existsTemplateFunc; diff --git a/api/indices/flush.d.ts b/api/indices/flush.d.ts new file mode 100644 index 000000000..4938b910a --- /dev/null +++ b/api/indices/flush.d.ts @@ -0,0 +1,35 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Indices_Flush_Request extends Global.Params { + allow_no_indices?: boolean; + expand_wildcards?: Common.ExpandWildcards; + force?: boolean; + ignore_unavailable?: boolean; + index?: Common.Indices; + wait_if_ongoing?: boolean; +} + +export interface Indices_Flush_Response extends ApiResponse { + body: Indices_Flush_ResponseBody; +} + +export type Indices_Flush_ResponseBody = Common.ShardsOperationResponseBase + diff --git a/api/indices/flush.js b/api/indices/flush.js new file mode 100644 index 000000000..8cb1e5eb8 --- /dev/null +++ b/api/indices/flush.js @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Performs the flush operation on one or more indices. + *
See Also: {@link https://opensearch.org/docs/latest - indices.flush} + * + * @memberOf API-Indices + * + * @param {object} [params] + * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + * @param {boolean} [params.force] - If `true`, the request forces a flush even if there are no changes to commit to the index. + * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. + * @param {boolean} [params.wait_if_ongoing=true] - If `true`, the flush operation blocks until execution when another flush operation is running. If `false`, OpenSearch returns an error if you request a flush when another flush operation is running. + * @param {string} [params.index] - Comma-separated list of data streams, indices, and aliases to flush. Supports wildcards (`*`). To flush all data streams and indices, omit this parameter or use `*` or `_all`. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function flushFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_flush'].filter(c => c).join('').replace('//', '/'); + const method = body ? 'POST' : 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = flushFunc; diff --git a/api/indices/forcemerge.d.ts b/api/indices/forcemerge.d.ts new file mode 100644 index 000000000..bedd047fc --- /dev/null +++ b/api/indices/forcemerge.d.ts @@ -0,0 +1,40 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Indices_Forcemerge_Request extends Global.Params { + allow_no_indices?: boolean; + expand_wildcards?: Common.ExpandWildcards; + flush?: boolean; + ignore_unavailable?: boolean; + index?: Common.Indices; + max_num_segments?: number; + only_expunge_deletes?: boolean; + primary_only?: boolean; + wait_for_completion?: boolean; +} + +export interface Indices_Forcemerge_Response extends ApiResponse { + body: Indices_Forcemerge_ResponseBody; +} + +export interface Indices_Forcemerge_ResponseBody extends Common.ShardsOperationResponseBase { + task?: string; +} + diff --git a/api/indices/forcemerge.js b/api/indices/forcemerge.js new file mode 100644 index 000000000..094fa4ea7 --- /dev/null +++ b/api/indices/forcemerge.js @@ -0,0 +1,56 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Performs the force merge operation on one or more indices. + *
See Also: {@link https://opensearch.org/docs/latest - indices.forcemerge} + * + * @memberOf API-Indices + * + * @param {object} [params] + * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified) + * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {boolean} [params.flush=true] - Specify whether the index should be flushed after performing the operation. + * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed) + * @param {number} [params.max_num_segments] - The number of larger segments into which smaller segments are merged. Set this parameter to 1 to merge all segments into one segment. The default behavior is to perform the merge as necessary. + * @param {boolean} [params.only_expunge_deletes] - Specify whether the operation should only expunge deleted documents + * @param {boolean} [params.primary_only=false] - Specify whether the operation should only perform on primary shards. Defaults to false. + * @param {boolean} [params.wait_for_completion=true] - Should the request wait until the force merge is completed. + * @param {string} [params.index] - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function forcemergeFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_forcemerge'].filter(c => c).join('').replace('//', '/'); + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = forcemergeFunc; diff --git a/api/indices/get.d.ts b/api/indices/get.d.ts new file mode 100644 index 000000000..4204542b7 --- /dev/null +++ b/api/indices/get.d.ts @@ -0,0 +1,39 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_Common from '../_types/indices._common' + +export interface Indices_Get_Request extends Global.Params { + allow_no_indices?: boolean; + cluster_manager_timeout?: Common.Duration; + expand_wildcards?: Common.ExpandWildcards; + flat_settings?: boolean; + ignore_unavailable?: boolean; + include_defaults?: boolean; + index: Common.Indices; + local?: boolean; + master_timeout?: Common.Duration; +} + +export interface Indices_Get_Response extends ApiResponse { + body: Indices_Get_ResponseBody; +} + +export type Indices_Get_ResponseBody = Record + diff --git a/api/indices/get.js b/api/indices/get.js new file mode 100644 index 000000000..7cfbb5b74 --- /dev/null +++ b/api/indices/get.js @@ -0,0 +1,57 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Returns information about one or more indices. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/get-index/ - indices.get} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {boolean} [params.allow_no_indices=false] - If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting foo*,bar* returns an error if an index starts with foo but no index starts with bar. + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.expand_wildcards] - Type of index that wildcard expressions can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as open,hidden. + * @param {boolean} [params.flat_settings=false] - If true, returns settings in flat format. + * @param {boolean} [params.ignore_unavailable=false] - If false, requests that target a missing index return an error. + * @param {boolean} [params.include_defaults=false] - If true, return all default settings in the response. + * @param {boolean} [params.local=false] - If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} params.index - Comma-separated list of data streams, indices, and index aliases used to limit the request. Wildcard expressions (*) are supported. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = '/' + index; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getFunc; diff --git a/api/indices/getAlias.d.ts b/api/indices/getAlias.d.ts new file mode 100644 index 000000000..47439a3a7 --- /dev/null +++ b/api/indices/getAlias.d.ts @@ -0,0 +1,36 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_GetAlias from '../_types/indices.get_alias' + +export interface Indices_GetAlias_Request extends Global.Params { + allow_no_indices?: boolean; + expand_wildcards?: Common.ExpandWildcards; + ignore_unavailable?: boolean; + index?: Common.Indices; + local?: boolean; + name?: Common.Names; +} + +export interface Indices_GetAlias_Response extends ApiResponse { + body: Indices_GetAlias_ResponseBody; +} + +export type Indices_GetAlias_ResponseBody = Record + diff --git a/api/indices/getAlias.js b/api/indices/getAlias.js new file mode 100644 index 000000000..17409f48f --- /dev/null +++ b/api/indices/getAlias.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns an alias. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-alias/ - indices.get_alias} + * + * @memberOf API-Indices + * + * @param {object} [params] + * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. + * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. + * @param {string} [params.name] - Comma-separated list of aliases to retrieve. Supports wildcards (`*`). To retrieve all aliases, omit this parameter or use `*` or `_all`. + * @param {string} [params.index] - Comma-separated list of data streams or indices used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getAliasFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, name, index, ...querystring } = params; + name = parsePathParam(name); + index = parsePathParam(index); + + const path = ['/', index, '/_alias/', name].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getAliasFunc; diff --git a/api/indices/getDataStream.d.ts b/api/indices/getDataStream.d.ts new file mode 100644 index 000000000..eb3864331 --- /dev/null +++ b/api/indices/getDataStream.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_Common from '../_types/indices._common' + +export interface Indices_GetDataStream_Request extends Global.Params { + name?: Common.DataStreamNames; +} + +export interface Indices_GetDataStream_Response extends ApiResponse { + body: Indices_GetDataStream_ResponseBody; +} + +export interface Indices_GetDataStream_ResponseBody { + data_streams: Indices_Common.DataStream[]; +} + diff --git a/api/indices/getDataStream.js b/api/indices/getDataStream.js new file mode 100644 index 000000000..06a7350cf --- /dev/null +++ b/api/indices/getDataStream.js @@ -0,0 +1,48 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns data streams. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/data-streams/ - indices.get_data_stream} + * + * @memberOf API-Indices + * + * @param {object} [params] + * @param {string} [params.name] - Comma-separated list of data stream names used to limit the request. Wildcard (`*`) expressions are supported. If omitted, all data streams are returned. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getDataStreamFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = ['/_data_stream/', name].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getDataStreamFunc; diff --git a/api/indices/getFieldMapping.d.ts b/api/indices/getFieldMapping.d.ts new file mode 100644 index 000000000..153b84ee1 --- /dev/null +++ b/api/indices/getFieldMapping.d.ts @@ -0,0 +1,37 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_GetFieldMapping from '../_types/indices.get_field_mapping' + +export interface Indices_GetFieldMapping_Request extends Global.Params { + allow_no_indices?: boolean; + expand_wildcards?: Common.ExpandWildcards; + fields: Common.Fields; + ignore_unavailable?: boolean; + include_defaults?: boolean; + index?: Common.Indices; + local?: boolean; +} + +export interface Indices_GetFieldMapping_Response extends ApiResponse { + body: Indices_GetFieldMapping_ResponseBody; +} + +export type Indices_GetFieldMapping_ResponseBody = Record + diff --git a/api/indices/getFieldMapping.js b/api/indices/getFieldMapping.js new file mode 100644 index 000000000..b05fc51ac --- /dev/null +++ b/api/indices/getFieldMapping.js @@ -0,0 +1,56 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Returns mapping for one or more fields. + *
See Also: {@link https://opensearch.org/docs/latest/field-types/index/ - indices.get_field_mapping} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. + * @param {boolean} [params.include_defaults] - If `true`, return all default settings in the response. + * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. + * @param {string} params.fields - Comma-separated list or wildcard expression of fields used to limit returned information. + * @param {string} [params.index] - Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getFieldMappingFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.fields == null) return handleMissingParam('fields', this, callback); + + let { body, fields, index, ...querystring } = params; + fields = parsePathParam(fields); + index = parsePathParam(index); + + const path = ['/', index, '/_mapping/field/', fields].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getFieldMappingFunc; diff --git a/api/indices/getIndexTemplate.d.ts b/api/indices/getIndexTemplate.d.ts new file mode 100644 index 000000000..d7147ceb4 --- /dev/null +++ b/api/indices/getIndexTemplate.d.ts @@ -0,0 +1,37 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_GetIndexTemplate from '../_types/indices.get_index_template' + +export interface Indices_GetIndexTemplate_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + flat_settings?: boolean; + local?: boolean; + master_timeout?: Common.Duration; + name?: Common.Name; +} + +export interface Indices_GetIndexTemplate_Response extends ApiResponse { + body: Indices_GetIndexTemplate_ResponseBody; +} + +export interface Indices_GetIndexTemplate_ResponseBody { + index_templates: Indices_GetIndexTemplate.IndexTemplateItem[]; +} + diff --git a/api/indices/getIndexTemplate.js b/api/indices/getIndexTemplate.js new file mode 100644 index 000000000..6847245e9 --- /dev/null +++ b/api/indices/getIndexTemplate.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns an index template. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-templates/ - indices.get_index_template} + * + * @memberOf API-Indices + * + * @param {object} [params] + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {boolean} [params.flat_settings=false] - If true, returns settings in flat format. + * @param {boolean} [params.local=false] - If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.name] - Name of the index template to retrieve. Wildcard (*) expressions are supported. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getIndexTemplateFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = ['/_index_template/', name].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getIndexTemplateFunc; diff --git a/api/indices/getMapping.d.ts b/api/indices/getMapping.d.ts new file mode 100644 index 000000000..242f34714 --- /dev/null +++ b/api/indices/getMapping.d.ts @@ -0,0 +1,37 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_GetMapping from '../_types/indices.get_mapping' + +export interface Indices_GetMapping_Request extends Global.Params { + allow_no_indices?: boolean; + cluster_manager_timeout?: Common.Duration; + expand_wildcards?: Common.ExpandWildcards; + ignore_unavailable?: boolean; + index?: Common.Indices; + local?: boolean; + master_timeout?: Common.Duration; +} + +export interface Indices_GetMapping_Response extends ApiResponse { + body: Indices_GetMapping_ResponseBody; +} + +export type Indices_GetMapping_ResponseBody = Record + diff --git a/api/indices/getMapping.js b/api/indices/getMapping.js new file mode 100644 index 000000000..db70001d0 --- /dev/null +++ b/api/indices/getMapping.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns mappings for one or more indices. + *
See Also: {@link https://opensearch.org/docs/latest/field-types/index/#get-a-mapping - indices.get_mapping} + * + * @memberOf API-Indices + * + * @param {object} [params] + * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. + * @param {string} [params.index] - Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. + * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getMappingFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_mapping'].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getMappingFunc; diff --git a/api/indices/getSettings.d.ts b/api/indices/getSettings.d.ts new file mode 100644 index 000000000..6505a78c6 --- /dev/null +++ b/api/indices/getSettings.d.ts @@ -0,0 +1,40 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_Common from '../_types/indices._common' + +export interface Indices_GetSettings_Request extends Global.Params { + allow_no_indices?: boolean; + cluster_manager_timeout?: Common.Duration; + expand_wildcards?: Common.ExpandWildcards; + flat_settings?: boolean; + ignore_unavailable?: boolean; + include_defaults?: boolean; + index?: Common.Indices; + local?: boolean; + master_timeout?: Common.Duration; + name?: Common.Names; +} + +export interface Indices_GetSettings_Response extends ApiResponse { + body: Indices_GetSettings_ResponseBody; +} + +export type Indices_GetSettings_ResponseBody = Record + diff --git a/api/indices/getSettings.js b/api/indices/getSettings.js new file mode 100644 index 000000000..2d3546543 --- /dev/null +++ b/api/indices/getSettings.js @@ -0,0 +1,58 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns settings for one or more indices. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/get-settings/ - indices.get_settings} + * + * @memberOf API-Indices + * + * @param {object} [params] + * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with foo but no index starts with `bar`. + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. + * @param {boolean} [params.flat_settings=false] - If `true`, returns settings in flat format. + * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. + * @param {boolean} [params.include_defaults=false] - If `true`, return all default settings in the response. + * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. If `false`, information is retrieved from the master node. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.name] - Comma-separated list or wildcard expression of settings to retrieve. + * @param {string} [params.index] - Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getSettingsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, name, index, ...querystring } = params; + name = parsePathParam(name); + index = parsePathParam(index); + + const path = ['/', index, '/_settings/', name].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getSettingsFunc; diff --git a/api/indices/getTemplate.d.ts b/api/indices/getTemplate.d.ts new file mode 100644 index 000000000..93746e935 --- /dev/null +++ b/api/indices/getTemplate.d.ts @@ -0,0 +1,35 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_Common from '../_types/indices._common' + +export interface Indices_GetTemplate_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + flat_settings?: boolean; + local?: boolean; + master_timeout?: Common.Duration; + name?: Common.Names; +} + +export interface Indices_GetTemplate_Response extends ApiResponse { + body: Indices_GetTemplate_ResponseBody; +} + +export type Indices_GetTemplate_ResponseBody = Record + diff --git a/api/indices/getTemplate.js b/api/indices/getTemplate.js new file mode 100644 index 000000000..f31f55820 --- /dev/null +++ b/api/indices/getTemplate.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns an index template. + *
See Also: {@link https://opensearch.org/docs/latest - indices.get_template} + * + * @memberOf API-Indices + * + * @param {object} [params] + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {boolean} [params.flat_settings=false] - If `true`, returns settings in flat format. + * @param {boolean} [params.local=false] - If `true`, the request retrieves information from the local node only. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.name] - Comma-separated list of index template names used to limit the request. Wildcard (`*`) expressions are supported. To return all index templates, omit this parameter or use a value of `_all` or `*`. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getTemplateFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = ['/_template/', name].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getTemplateFunc; diff --git a/api/indices/getUpgrade.d.ts b/api/indices/getUpgrade.d.ts new file mode 100644 index 000000000..59e63a085 --- /dev/null +++ b/api/indices/getUpgrade.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Indices_GetUpgrade_Request extends Global.Params { + allow_no_indices?: boolean; + expand_wildcards?: Common.ExpandWildcards; + ignore_unavailable?: boolean; + index?: string[]; +} + +export interface Indices_GetUpgrade_Response extends ApiResponse { + body: Indices_GetUpgrade_ResponseBody; +} + +export type Indices_GetUpgrade_ResponseBody = Record + diff --git a/api/indices/getUpgrade.js b/api/indices/getUpgrade.js new file mode 100644 index 000000000..939fd9164 --- /dev/null +++ b/api/indices/getUpgrade.js @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * The _upgrade API is no longer useful and will be removed. + *
See Also: {@link https://opensearch.org/docs/latest - indices.get_upgrade} + * + * @memberOf API-Indices + * + * @param {object} [params] + * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). + * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed). + * @param {array} [params.index] - Comma-separated list of indices; use `_all` or empty string to perform the operation on all indices. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getUpgradeFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_upgrade'].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getUpgradeFunc; diff --git a/api/indices/open.d.ts b/api/indices/open.d.ts new file mode 100644 index 000000000..b3871b865 --- /dev/null +++ b/api/indices/open.d.ts @@ -0,0 +1,44 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Indices_Open_Request extends Global.Params { + allow_no_indices?: boolean; + cluster_manager_timeout?: Common.Duration; + expand_wildcards?: Common.ExpandWildcards; + ignore_unavailable?: boolean; + index: Common.Indices; + master_timeout?: Common.Duration; + task_execution_timeout?: Common.Duration; + timeout?: Common.Duration; + wait_for_active_shards?: Common.WaitForActiveShards; + wait_for_completion?: boolean; +} + +export interface Indices_Open_Response extends ApiResponse { + body: Indices_Open_ResponseBody; +} + +export type Indices_Open_ResponseBody = { + task?: Common.TaskId; +} | { + acknowledged: boolean; + shards_acknowledged: boolean; +} + diff --git a/api/indices/open.js b/api/indices/open.js new file mode 100644 index 000000000..6b6dfdda3 --- /dev/null +++ b/api/indices/open.js @@ -0,0 +1,58 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Opens an index. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/open-index/ - indices.open} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.task_execution_timeout] - Explicit task execution timeout, only useful when wait_for_completion is false, defaults to 1h. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). + * @param {boolean} [params.wait_for_completion=true] - Should this request wait until the operation has completed before returning. + * @param {string} params.index - Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (`*`). By default, you must explicitly name the indices you using to limit the request. To limit a request using `_all`, `*`, or other wildcard expressions, change the `action.destructive_requires_name` setting to false. You can update this setting in the `opensearch.yml` file or using the cluster update settings API. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function openFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = '/' + index + '/_open'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = openFunc; diff --git a/api/indices/putAlias.d.ts b/api/indices/putAlias.d.ts new file mode 100644 index 000000000..fc5a6ce49 --- /dev/null +++ b/api/indices/putAlias.d.ts @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Common_QueryDsl from '../_types/_common.query_dsl' + +export interface Indices_PutAlias_Request extends Global.Params { + body?: Indices_PutAlias_RequestBody; + cluster_manager_timeout?: Common.Duration; + index?: Common.Indices; + master_timeout?: Common.Duration; + name?: Common.Name; + timeout?: Common.Duration; +} + +export interface Indices_PutAlias_RequestBody { + alias?: string; + filter?: Common_QueryDsl.QueryContainer; + index?: string; + index_routing?: Common.Routing; + is_hidden?: boolean; + is_write_index?: boolean; + routing?: Common.Routing; + search_routing?: Common.Routing; +} + +export interface Indices_PutAlias_Response extends ApiResponse { + body: Indices_PutAlias_ResponseBody; +} + +export type Indices_PutAlias_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/indices/putAlias.js b/api/indices/putAlias.js new file mode 100644 index 000000000..3e6f4409e --- /dev/null +++ b/api/indices/putAlias.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Creates or updates an alias. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/update-alias/ - indices.put_alias} + * + * @memberOf API-Indices + * + * @param {object} [params] + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {string} [params.name] - Alias to update. If the alias doesn't exist, the request creates it. Index alias names support date math. + * @param {string} [params.index] - Comma-separated list of data streams or indices to add. Supports wildcards (`*`). Wildcard patterns that match both data streams and indices return an error. + * @param {object} [params.body] - The settings for the alias, such as `routing` or `filter` + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function putAliasFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, name, index, ...querystring } = params; + name = parsePathParam(name); + index = parsePathParam(index); + + const path = ['/', index, '/_alias/', name].filter(c => c).join('').replace('//', '/'); + const method = name == null ? 'POST' : 'PUT'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = putAliasFunc; diff --git a/api/indices/putIndexTemplate.d.ts b/api/indices/putIndexTemplate.d.ts new file mode 100644 index 000000000..f48ae13c3 --- /dev/null +++ b/api/indices/putIndexTemplate.d.ts @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_Common from '../_types/indices._common' +import * as Indices_PutIndexTemplate from '../_types/indices.put_index_template' + +export interface Indices_PutIndexTemplate_Request extends Global.Params { + body: Indices_PutIndexTemplate_RequestBody; + cause?: string; + cluster_manager_timeout?: Common.Duration; + create?: boolean; + master_timeout?: Common.Duration; + name: Common.Name; +} + +export interface Indices_PutIndexTemplate_RequestBody { + _meta?: Common.Metadata; + composed_of?: Common.Name[]; + data_stream?: Indices_Common.IndexTemplateDataStreamConfiguration; + index_patterns?: Common.Indices; + priority?: number; + template?: Indices_PutIndexTemplate.IndexTemplateMapping; + version?: Common.VersionNumber; +} + +export interface Indices_PutIndexTemplate_Response extends ApiResponse { + body: Indices_PutIndexTemplate_ResponseBody; +} + +export type Indices_PutIndexTemplate_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/indices/putIndexTemplate.js b/api/indices/putIndexTemplate.js new file mode 100644 index 000000000..14b6113e7 --- /dev/null +++ b/api/indices/putIndexTemplate.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Creates or updates an index template. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-templates/ - indices.put_index_template} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {string} [params.cause=false] - User defined reason for creating/updating the index template. + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {boolean} [params.create=false] - If `true`, this request cannot replace or update existing index templates. + * @param {string} [params.master_timeout] DEPRECATED - Operation timeout for connection to master node. + * @param {string} params.name - Index or template name + * @param {object} params.body - The template definition + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function putIndexTemplateFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.name == null) return handleMissingParam('name', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = '/_index_template/' + name; + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = putIndexTemplateFunc; diff --git a/api/indices/putMapping.d.ts b/api/indices/putMapping.d.ts new file mode 100644 index 000000000..02759cc63 --- /dev/null +++ b/api/indices/putMapping.d.ts @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Common_Mapping from '../_types/_common.mapping' + +export interface Indices_PutMapping_Request extends Global.Params { + allow_no_indices?: boolean; + body: Indices_PutMapping_RequestBody; + cluster_manager_timeout?: Common.Duration; + expand_wildcards?: Common.ExpandWildcards; + ignore_unavailable?: boolean; + index: Common.Indices; + master_timeout?: Common.Duration; + timeout?: Common.Duration; + write_index_only?: boolean; +} + +export interface Indices_PutMapping_RequestBody { + _field_names?: Common_Mapping.FieldNamesField; + _meta?: Common.Metadata; + _routing?: Common_Mapping.RoutingField; + _source?: Common_Mapping.SourceField; + date_detection?: boolean; + dynamic?: Common_Mapping.DynamicMapping; + dynamic_date_formats?: string[]; + dynamic_templates?: Record | Record[]; + numeric_detection?: boolean; + properties?: Record; + runtime?: Common_Mapping.RuntimeFields; +} + +export interface Indices_PutMapping_Response extends ApiResponse { + body: Indices_PutMapping_ResponseBody; +} + +export type Indices_PutMapping_ResponseBody = Common.IndicesResponseBase + diff --git a/api/indices/putMapping.js b/api/indices/putMapping.js new file mode 100644 index 000000000..4b817aab9 --- /dev/null +++ b/api/indices/putMapping.js @@ -0,0 +1,57 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Updates the index mappings. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/put-mapping/ - indices.put_mapping} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {boolean} [params.write_index_only=false] - If `true`, the mappings are applied only to the current write index for the target. + * @param {string} params.index - A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the mapping on all indices. + * @param {object} params.body - The mapping definition + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function putMappingFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = '/' + index + '/_mapping'; + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = putMappingFunc; diff --git a/api/indices/putSettings.d.ts b/api/indices/putSettings.d.ts new file mode 100644 index 000000000..9bd56cc70 --- /dev/null +++ b/api/indices/putSettings.d.ts @@ -0,0 +1,40 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Indices_Common from '../_types/indices._common' +import * as Common from '../_types/_common' + +export interface Indices_PutSettings_Request extends Global.Params { + allow_no_indices?: boolean; + body: Indices_Common.IndexSettings; + cluster_manager_timeout?: Common.Duration; + expand_wildcards?: Common.ExpandWildcards; + flat_settings?: boolean; + ignore_unavailable?: boolean; + index?: Common.Indices; + master_timeout?: Common.Duration; + preserve_existing?: boolean; + timeout?: Common.Duration; +} + +export interface Indices_PutSettings_Response extends ApiResponse { + body: Indices_PutSettings_ResponseBody; +} + +export type Indices_PutSettings_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/indices/putSettings.js b/api/indices/putSettings.js new file mode 100644 index 000000000..2b64fc976 --- /dev/null +++ b/api/indices/putSettings.js @@ -0,0 +1,57 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Updates the index settings. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/update-settings/ - indices.put_settings} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. + * @param {boolean} [params.flat_settings=false] - If `true`, returns settings in flat format. + * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed). + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {boolean} [params.preserve_existing=false] - If `true`, existing index settings remain unchanged. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {string} [params.index] - Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. + * @param {object} params.body - The index settings to be updated. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function putSettingsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_settings'].filter(c => c).join('').replace('//', '/'); + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = putSettingsFunc; diff --git a/api/indices/putTemplate.d.ts b/api/indices/putTemplate.d.ts new file mode 100644 index 000000000..c5c993851 --- /dev/null +++ b/api/indices/putTemplate.d.ts @@ -0,0 +1,46 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_Common from '../_types/indices._common' +import * as Common_Mapping from '../_types/_common.mapping' + +export interface Indices_PutTemplate_Request extends Global.Params { + body: Indices_PutTemplate_RequestBody; + cluster_manager_timeout?: Common.Duration; + create?: boolean; + master_timeout?: Common.Duration; + name: Common.Name; + order?: number; +} + +export interface Indices_PutTemplate_RequestBody { + aliases?: Record; + index_patterns?: string | string[]; + mappings?: Common_Mapping.TypeMapping; + order?: number; + settings?: Record>; + version?: Common.VersionNumber; +} + +export interface Indices_PutTemplate_Response extends ApiResponse { + body: Indices_PutTemplate_ResponseBody; +} + +export type Indices_PutTemplate_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/indices/putTemplate.js b/api/indices/putTemplate.js new file mode 100644 index 000000000..fc7c252b7 --- /dev/null +++ b/api/indices/putTemplate.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Creates or updates an index template. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-templates/ - indices.put_template} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {boolean} [params.create=false] - If true, this request cannot replace or update existing index templates. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {number} [params.order] - Order in which OpenSearch applies this template if index matches multiple templates. Templates with lower 'order' values are merged first. Templates with higher 'order' values are merged later, overriding templates with lower values. + * @param {string} params.name - The name of the template + * @param {object} params.body - The template definition + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function putTemplateFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.name == null) return handleMissingParam('name', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = '/_template/' + name; + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = putTemplateFunc; diff --git a/api/indices/recovery.d.ts b/api/indices/recovery.d.ts new file mode 100644 index 000000000..7236c3bab --- /dev/null +++ b/api/indices/recovery.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_Recovery from '../_types/indices.recovery' + +export interface Indices_Recovery_Request extends Global.Params { + active_only?: boolean; + detailed?: boolean; + index?: Common.Indices; +} + +export interface Indices_Recovery_Response extends ApiResponse { + body: Indices_Recovery_ResponseBody; +} + +export type Indices_Recovery_ResponseBody = Record + diff --git a/api/indices/recovery.js b/api/indices/recovery.js new file mode 100644 index 000000000..001ffa3fc --- /dev/null +++ b/api/indices/recovery.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns information about ongoing index shard recoveries. + *
See Also: {@link https://opensearch.org/docs/latest - indices.recovery} + * + * @memberOf API-Indices + * + * @param {object} [params] + * @param {boolean} [params.active_only=false] - If `true`, the response only includes ongoing shard recoveries. + * @param {boolean} [params.detailed=false] - If `true`, the response includes detailed information about shard recoveries. + * @param {string} [params.index] - Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function recoveryFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_recovery'].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = recoveryFunc; diff --git a/api/indices/refresh.d.ts b/api/indices/refresh.d.ts new file mode 100644 index 000000000..4d891ea19 --- /dev/null +++ b/api/indices/refresh.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Indices_Refresh_Request extends Global.Params { + allow_no_indices?: boolean; + expand_wildcards?: Common.ExpandWildcards; + ignore_unavailable?: boolean; + index?: Common.Indices; +} + +export interface Indices_Refresh_Response extends ApiResponse { + body: Indices_Refresh_ResponseBody; +} + +export type Indices_Refresh_ResponseBody = Common.ShardsOperationResponseBase + diff --git a/api/indices/refresh.js b/api/indices/refresh.js new file mode 100644 index 000000000..8721b8a8a --- /dev/null +++ b/api/indices/refresh.js @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Performs the refresh operation in one or more indices. + *
See Also: {@link https://opensearch.org/docs/latest/tuning-your-cluster/availability-and-recovery/remote-store/index/#refresh-level-and-request-level-durability - indices.refresh} + * + * @memberOf API-Indices + * + * @param {object} [params] + * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. + * @param {string} [params.index] - Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function refreshFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_refresh'].filter(c => c).join('').replace('//', '/'); + const method = body ? 'POST' : 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = refreshFunc; diff --git a/api/indices/resolveIndex.d.ts b/api/indices/resolveIndex.d.ts new file mode 100644 index 000000000..a5117e865 --- /dev/null +++ b/api/indices/resolveIndex.d.ts @@ -0,0 +1,36 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_ResolveIndex from '../_types/indices.resolve_index' + +export interface Indices_ResolveIndex_Request extends Global.Params { + expand_wildcards?: Common.ExpandWildcards; + name: Common.Names; +} + +export interface Indices_ResolveIndex_Response extends ApiResponse { + body: Indices_ResolveIndex_ResponseBody; +} + +export interface Indices_ResolveIndex_ResponseBody { + aliases: Indices_ResolveIndex.ResolveIndexAliasItem[]; + data_streams: Indices_ResolveIndex.ResolveIndexDataStreamsItem[]; + indices: Indices_ResolveIndex.ResolveIndexItem[]; +} + diff --git a/api/indices/resolveIndex.js b/api/indices/resolveIndex.js new file mode 100644 index 000000000..5d75274d4 --- /dev/null +++ b/api/indices/resolveIndex.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Returns information about any matching indices, aliases, and data streams. + *
See Also: {@link https://opensearch.org/docs/latest - indices.resolve_index} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + * @param {string} params.name - Comma-separated name(s) or index pattern(s) of the indices, aliases, and data streams to resolve. Resources on remote clusters can be specified using the ``:`` syntax. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function resolveIndexFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.name == null) return handleMissingParam('name', this, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = '/_resolve/index/' + name; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = resolveIndexFunc; diff --git a/api/indices/rollover.d.ts b/api/indices/rollover.d.ts new file mode 100644 index 000000000..ba9a415de --- /dev/null +++ b/api/indices/rollover.d.ts @@ -0,0 +1,55 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_Common from '../_types/indices._common' +import * as Indices_Rollover from '../_types/indices.rollover' +import * as Common_Mapping from '../_types/_common.mapping' + +export interface Indices_Rollover_Request extends Global.Params { + alias: Common.IndexAlias; + body?: Indices_Rollover_RequestBody; + cluster_manager_timeout?: Common.Duration; + dry_run?: boolean; + master_timeout?: Common.Duration; + new_index?: Common.IndexName; + timeout?: Common.Duration; + wait_for_active_shards?: Common.WaitForActiveShards; +} + +export interface Indices_Rollover_RequestBody { + aliases?: Record; + conditions?: Indices_Rollover.RolloverConditions; + mappings?: Common_Mapping.TypeMapping; + settings?: Record>; +} + +export interface Indices_Rollover_Response extends ApiResponse { + body: Indices_Rollover_ResponseBody; +} + +export interface Indices_Rollover_ResponseBody { + acknowledged: boolean; + conditions: Record; + dry_run: boolean; + new_index: string; + old_index: string; + rolled_over: boolean; + shards_acknowledged: boolean; +} + diff --git a/api/indices/rollover.js b/api/indices/rollover.js new file mode 100644 index 000000000..abc7a87ad --- /dev/null +++ b/api/indices/rollover.js @@ -0,0 +1,58 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Updates an alias to point to a new index when the existing index +is considered to be too large or too old. + *
See Also: {@link https://opensearch.org/docs/latest/dashboards/im-dashboards/rollover/ - indices.rollover} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {boolean} [params.dry_run=false] - If `true`, checks whether the current index satisfies the specified conditions but does not perform a rollover. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to all or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). + * @param {string} params.alias - Name of the data stream or index alias to roll over. + * @param {string} [params.new_index] - Name of the index to create. Supports date math. Data streams do not support this parameter. + * @param {object} [params.body] - The conditions that needs to be met for executing rollover + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function rolloverFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.alias == null) return handleMissingParam('alias', this, callback); + + let { body, alias, new_index, ...querystring } = params; + alias = parsePathParam(alias); + new_index = parsePathParam(new_index); + + const path = ['/', alias, '/_rollover/', new_index].filter(c => c).join('').replace('//', '/'); + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = rolloverFunc; diff --git a/api/indices/segments.d.ts b/api/indices/segments.d.ts new file mode 100644 index 000000000..949fbed4e --- /dev/null +++ b/api/indices/segments.d.ts @@ -0,0 +1,38 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_Segments from '../_types/indices.segments' + +export interface Indices_Segments_Request extends Global.Params { + allow_no_indices?: boolean; + expand_wildcards?: Common.ExpandWildcards; + ignore_unavailable?: boolean; + index?: Common.Indices; + verbose?: boolean; +} + +export interface Indices_Segments_Response extends ApiResponse { + body: Indices_Segments_ResponseBody; +} + +export interface Indices_Segments_ResponseBody { + _shards: Common.ShardStatistics; + indices: Record; +} + diff --git a/api/indices/segments.js b/api/indices/segments.js new file mode 100644 index 000000000..54d36260d --- /dev/null +++ b/api/indices/segments.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Provides low-level information about segments in a Lucene index. + *
See Also: {@link https://opensearch.org/docs/latest - indices.segments} + * + * @memberOf API-Indices + * + * @param {object} [params] + * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. + * @param {boolean} [params.verbose=false] - If `true`, the request returns a verbose response. + * @param {string} [params.index] - Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (`*`). To target all data streams and indices, omit this parameter or use `*` or `_all`. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function segmentsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_segments'].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = segmentsFunc; diff --git a/api/indices/shardStores.d.ts b/api/indices/shardStores.d.ts new file mode 100644 index 000000000..597cc3a57 --- /dev/null +++ b/api/indices/shardStores.d.ts @@ -0,0 +1,37 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_ShardStores from '../_types/indices.shard_stores' + +export interface Indices_ShardStores_Request extends Global.Params { + allow_no_indices?: boolean; + expand_wildcards?: Common.ExpandWildcards; + ignore_unavailable?: boolean; + index?: Common.Indices; + status?: Indices_ShardStores.ShardStoreStatus | Indices_ShardStores.ShardStoreStatus[]; +} + +export interface Indices_ShardStores_Response extends ApiResponse { + body: Indices_ShardStores_ResponseBody; +} + +export interface Indices_ShardStores_ResponseBody { + indices: Record; +} + diff --git a/api/indices/shardStores.js b/api/indices/shardStores.js new file mode 100644 index 000000000..e0946a0a6 --- /dev/null +++ b/api/indices/shardStores.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Provides store information for shard copies of indices. + *
See Also: {@link https://opensearch.org/docs/latest - indices.shard_stores} + * + * @memberOf API-Indices + * + * @param {object} [params] + * @param {boolean} [params.allow_no_indices] - If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. + * @param {boolean} [params.ignore_unavailable] - If true, missing or closed indices are not included in the response. + * @param {string} [params.status] - List of shard health statuses used to limit the request. + * @param {string} [params.index] - List of data streams, indices, and aliases used to limit the request. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function shardStoresFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_shard_stores'].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = shardStoresFunc; diff --git a/api/indices/shrink.d.ts b/api/indices/shrink.d.ts new file mode 100644 index 000000000..70434e236 --- /dev/null +++ b/api/indices/shrink.d.ts @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_Common from '../_types/indices._common' + +export interface Indices_Shrink_Request extends Global.Params { + body?: Indices_Shrink_RequestBody; + cluster_manager_timeout?: Common.Duration; + copy_settings?: boolean; + index: Common.IndexName; + master_timeout?: Common.Duration; + target: Common.IndexName; + task_execution_timeout?: Common.Duration; + timeout?: Common.Duration; + wait_for_active_shards?: Common.WaitForActiveShards; + wait_for_completion?: boolean; +} + +export interface Indices_Shrink_RequestBody { + aliases?: Record; + settings?: Record>; +} + +export interface Indices_Shrink_Response extends ApiResponse { + body: Indices_Shrink_ResponseBody; +} + +export interface Indices_Shrink_ResponseBody { + acknowledged: boolean; + index: Common.IndexName; + shards_acknowledged: boolean; +} + diff --git a/api/indices/shrink.js b/api/indices/shrink.js new file mode 100644 index 000000000..4c6081410 --- /dev/null +++ b/api/indices/shrink.js @@ -0,0 +1,60 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Allow to shrink an existing index into a new index with fewer primary shards. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/shrink-index/ - indices.shrink} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {boolean} [params.copy_settings=false] - whether or not to copy settings from the source index. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.task_execution_timeout] - Explicit task execution timeout, only useful when wait_for_completion is false, defaults to 1h. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). + * @param {boolean} [params.wait_for_completion=true] - Should this request wait until the operation has completed before returning. + * @param {string} params.index - Name of the source index to shrink. + * @param {string} params.target - Name of the target index to create. + * @param {object} [params.body] - The configuration for the target index (`settings` and `aliases`) + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function shrinkFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + if (params.target == null) return handleMissingParam('target', this, callback); + + let { body, index, target, ...querystring } = params; + index = parsePathParam(index); + target = parsePathParam(target); + + const path = '/' + index + '/_shrink/' + target; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = shrinkFunc; diff --git a/api/indices/simulateIndexTemplate.d.ts b/api/indices/simulateIndexTemplate.d.ts new file mode 100644 index 000000000..b2077f6af --- /dev/null +++ b/api/indices/simulateIndexTemplate.d.ts @@ -0,0 +1,48 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_Common from '../_types/indices._common' +import * as Indices_PutIndexTemplate from '../_types/indices.put_index_template' + +export interface Indices_SimulateIndexTemplate_Request extends Global.Params { + body?: Indices_SimulateIndexTemplate_RequestBody; + cause?: string; + cluster_manager_timeout?: Common.Duration; + create?: boolean; + master_timeout?: Common.Duration; + name: Common.Name; +} + +export interface Indices_SimulateIndexTemplate_RequestBody { + _meta?: Common.Metadata; + allow_auto_create?: boolean; + composed_of?: Common.Name[]; + data_stream?: Indices_Common.IndexTemplateDataStreamConfiguration; + index_patterns?: Common.Indices; + priority?: number; + template?: Indices_PutIndexTemplate.IndexTemplateMapping; + version?: Common.VersionNumber; +} + +export interface Indices_SimulateIndexTemplate_Response extends ApiResponse { + body: Indices_SimulateIndexTemplate_ResponseBody; +} + +export type Indices_SimulateIndexTemplate_ResponseBody = Record + diff --git a/api/indices/simulateIndexTemplate.js b/api/indices/simulateIndexTemplate.js new file mode 100644 index 000000000..9e10547cf --- /dev/null +++ b/api/indices/simulateIndexTemplate.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Simulate matching the given index name against the index templates in the system. + *
See Also: {@link https://opensearch.org/docs/latest - indices.simulate_index_template} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {string} [params.cause=false] - User defined reason for dry-run creating the new template for simulation purposes. + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {boolean} [params.create=false] - 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. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} params.name - Index or template name to simulate + * @param {object} [params.body] - New index template definition, which will be included in the simulation, as if it already exists in the system + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function simulateIndexTemplateFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.name == null) return handleMissingParam('name', this, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = '/_index_template/_simulate_index/' + name; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = simulateIndexTemplateFunc; diff --git a/api/indices/simulateTemplate.d.ts b/api/indices/simulateTemplate.d.ts new file mode 100644 index 000000000..bc2602135 --- /dev/null +++ b/api/indices/simulateTemplate.d.ts @@ -0,0 +1,40 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Indices_Common from '../_types/indices._common' +import * as Common from '../_types/_common' +import * as Indices_SimulateTemplate from '../_types/indices.simulate_template' + +export interface Indices_SimulateTemplate_Request extends Global.Params { + body?: Indices_Common.IndexTemplate; + cause?: string; + cluster_manager_timeout?: Common.Duration; + create?: boolean; + master_timeout?: Common.Duration; + name?: Common.Name; +} + +export interface Indices_SimulateTemplate_Response extends ApiResponse { + body: Indices_SimulateTemplate_ResponseBody; +} + +export interface Indices_SimulateTemplate_ResponseBody { + overlapping?: Indices_SimulateTemplate.Overlapping[]; + template: Indices_SimulateTemplate.Template; +} + diff --git a/api/indices/simulateTemplate.js b/api/indices/simulateTemplate.js new file mode 100644 index 000000000..c85869a68 --- /dev/null +++ b/api/indices/simulateTemplate.js @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Simulate resolving the given template name or body. + *
See Also: {@link https://opensearch.org/docs/latest - indices.simulate_template} + * + * @memberOf API-Indices + * + * @param {object} [params] + * @param {string} [params.cause=false] - User defined reason for dry-run creating the new template for simulation purposes. + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {boolean} [params.create=false] - 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. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.name] - Name of the index template to simulate. To test a template configuration before you add it to the cluster, omit this parameter and specify the template configuration in the request body. + * @param {object} [params.body] - New index template definition to be simulated, if no index template name is specified. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function simulateTemplateFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, name, ...querystring } = params; + name = parsePathParam(name); + + const path = ['/_index_template/_simulate/', name].filter(c => c).join('').replace('//', '/'); + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = simulateTemplateFunc; diff --git a/api/indices/split.d.ts b/api/indices/split.d.ts new file mode 100644 index 000000000..5ee31b351 --- /dev/null +++ b/api/indices/split.d.ts @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_Common from '../_types/indices._common' + +export interface Indices_Split_Request extends Global.Params { + body?: Indices_Split_RequestBody; + cluster_manager_timeout?: Common.Duration; + copy_settings?: boolean; + index: Common.IndexName; + master_timeout?: Common.Duration; + target: Common.IndexName; + task_execution_timeout?: Common.Duration; + timeout?: Common.Duration; + wait_for_active_shards?: Common.WaitForActiveShards; + wait_for_completion?: boolean; +} + +export interface Indices_Split_RequestBody { + aliases?: Record; + settings?: { +}; +} + +export interface Indices_Split_Response extends ApiResponse { + body: Indices_Split_ResponseBody; +} + +export interface Indices_Split_ResponseBody { + acknowledged: boolean; + index: Common.IndexName; + shards_acknowledged: boolean; +} + diff --git a/api/indices/split.js b/api/indices/split.js new file mode 100644 index 000000000..82d86d373 --- /dev/null +++ b/api/indices/split.js @@ -0,0 +1,60 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Allows you to split an existing index into a new index with more primary shards. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/split/ - indices.split} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {boolean} [params.copy_settings=false] - whether or not to copy settings from the source index. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.task_execution_timeout] - Explicit task execution timeout, only useful when wait_for_completion is false, defaults to 1h. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {string} [params.wait_for_active_shards] - The number of shard copies that must be active before proceeding with the operation. Set to `all` or any positive integer up to the total number of shards in the index (`number_of_replicas+1`). + * @param {boolean} [params.wait_for_completion=true] - Should this request wait until the operation has completed before returning. + * @param {string} params.index - Name of the source index to split. + * @param {string} params.target - Name of the target index to create. + * @param {object} [params.body] - The configuration for the target index (`settings` and `aliases`) + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function splitFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + if (params.target == null) return handleMissingParam('target', this, callback); + + let { body, index, target, ...querystring } = params; + index = parsePathParam(index); + target = parsePathParam(target); + + const path = '/' + index + '/_split/' + target; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = splitFunc; diff --git a/api/indices/stats.d.ts b/api/indices/stats.d.ts new file mode 100644 index 000000000..a6fd4b1dc --- /dev/null +++ b/api/indices/stats.d.ts @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_Stats from '../_types/indices.stats' + +export interface Indices_Stats_Request extends Global.Params { + completion_fields?: Common.Fields; + expand_wildcards?: Common.ExpandWildcards; + fielddata_fields?: Common.Fields; + fields?: Common.Fields; + forbid_closed_indices?: boolean; + groups?: string | string[]; + include_segment_file_sizes?: boolean; + include_unloaded_segments?: boolean; + index?: Common.Indices; + level?: Common.Level; + metric?: Common.Metrics; +} + +export interface Indices_Stats_Response extends ApiResponse { + body: Indices_Stats_ResponseBody; +} + +export interface Indices_Stats_ResponseBody { + _all: Indices_Stats.IndicesStats; + _shards: Common.ShardStatistics; + indices?: Record; +} + diff --git a/api/indices/stats.js b/api/indices/stats.js new file mode 100644 index 000000000..bbe833251 --- /dev/null +++ b/api/indices/stats.js @@ -0,0 +1,59 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Provides statistics on operations happening in an index. + *
See Also: {@link https://opensearch.org/docs/latest - indices.stats} + * + * @memberOf API-Indices + * + * @param {object} [params] + * @param {string} [params.completion_fields] - Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. + * @param {string} [params.fielddata_fields] - Comma-separated list or wildcard expressions of fields to include in fielddata statistics. + * @param {string} [params.fields] - Comma-separated list or wildcard expressions of fields to include in the statistics. + * @param {boolean} [params.forbid_closed_indices=true] - If true, statistics are not collected from closed indices. + * @param {string} [params.groups] - Comma-separated list of search groups to include in the search statistics. + * @param {boolean} [params.include_segment_file_sizes=false] - If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested). + * @param {boolean} [params.include_unloaded_segments=false] - If true, the response includes information from segments that are not loaded into memory. + * @param {string} [params.level] - Indicates whether statistics are aggregated at the cluster, index, or shard level. + * @param {string} [params.metric] - Limit the information returned the specific metrics. + * @param {string} [params.index] - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function statsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, metric, index, ...querystring } = params; + metric = parsePathParam(metric); + index = parsePathParam(index); + + const path = ['/', index, '/_stats/', metric].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = statsFunc; diff --git a/api/indices/updateAliases.d.ts b/api/indices/updateAliases.d.ts new file mode 100644 index 000000000..31aaee4c9 --- /dev/null +++ b/api/indices/updateAliases.d.ts @@ -0,0 +1,38 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_UpdateAliases from '../_types/indices.update_aliases' + +export interface Indices_UpdateAliases_Request extends Global.Params { + body: Indices_UpdateAliases_RequestBody; + cluster_manager_timeout?: Common.Duration; + master_timeout?: Common.Duration; + timeout?: Common.Duration; +} + +export interface Indices_UpdateAliases_RequestBody { + actions?: Indices_UpdateAliases.Action[]; +} + +export interface Indices_UpdateAliases_Response extends ApiResponse { + body: Indices_UpdateAliases_ResponseBody; +} + +export type Indices_UpdateAliases_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/indices/updateAliases.js b/api/indices/updateAliases.js new file mode 100644 index 000000000..71c5a026c --- /dev/null +++ b/api/indices/updateAliases.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Updates index aliases. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/index-apis/alias/ - indices.update_aliases} + * + * @memberOf API-Indices + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {object} params.body - The definition of `actions` to perform + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function updateAliasesFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_aliases'; + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = updateAliasesFunc; diff --git a/api/indices/upgrade.d.ts b/api/indices/upgrade.d.ts new file mode 100644 index 000000000..6cfa38b6a --- /dev/null +++ b/api/indices/upgrade.d.ts @@ -0,0 +1,35 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Indices_Upgrade_Request extends Global.Params { + allow_no_indices?: boolean; + expand_wildcards?: Common.ExpandWildcards; + ignore_unavailable?: boolean; + index?: string[]; + only_ancient_segments?: boolean; + wait_for_completion?: boolean; +} + +export interface Indices_Upgrade_Response extends ApiResponse { + body: Indices_Upgrade_ResponseBody; +} + +export type Indices_Upgrade_ResponseBody = Record + diff --git a/api/indices/upgrade.js b/api/indices/upgrade.js new file mode 100644 index 000000000..00eeb2a93 --- /dev/null +++ b/api/indices/upgrade.js @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * The _upgrade API is no longer useful and will be removed. + *
See Also: {@link https://opensearch.org/docs/latest - indices.upgrade} + * + * @memberOf API-Indices + * + * @param {object} [params] + * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). + * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed). + * @param {boolean} [params.only_ancient_segments] - If true, only ancient (an older Lucene major release) segments will be upgraded. + * @param {boolean} [params.wait_for_completion=false] - Should this request wait until the operation has completed before returning. + * @param {array} [params.index] - Comma-separated list of indices; use `_all` or empty string to perform the operation on all indices. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function upgradeFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_upgrade'].filter(c => c).join('').replace('//', '/'); + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = upgradeFunc; diff --git a/api/indices/validateQuery.d.ts b/api/indices/validateQuery.d.ts new file mode 100644 index 000000000..3a6e56940 --- /dev/null +++ b/api/indices/validateQuery.d.ts @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common_QueryDsl from '../_types/_common.query_dsl' +import * as Common from '../_types/_common' +import * as Indices_ValidateQuery from '../_types/indices.validate_query' + +export interface Indices_ValidateQuery_Request extends Global.Params { + all_shards?: boolean; + allow_no_indices?: boolean; + analyze_wildcard?: boolean; + analyzer?: string; + body?: Indices_ValidateQuery_RequestBody; + default_operator?: Common_QueryDsl.Operator; + df?: string; + expand_wildcards?: Common.ExpandWildcards; + explain?: boolean; + ignore_unavailable?: boolean; + index?: Common.Indices; + lenient?: boolean; + q?: string; + rewrite?: boolean; +} + +export interface Indices_ValidateQuery_RequestBody { + query?: Common_QueryDsl.QueryContainer; +} + +export interface Indices_ValidateQuery_Response extends ApiResponse { + body: Indices_ValidateQuery_ResponseBody; +} + +export interface Indices_ValidateQuery_ResponseBody { + _shards?: Common.ShardStatistics; + error?: string; + explanations?: Indices_ValidateQuery.IndicesValidationExplanation[]; + valid: boolean; +} + diff --git a/api/indices/validateQuery.js b/api/indices/validateQuery.js new file mode 100644 index 000000000..3153215d5 --- /dev/null +++ b/api/indices/validateQuery.js @@ -0,0 +1,61 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Allows a user to validate a potentially expensive query without executing it. + *
See Also: {@link https://opensearch.org/docs/latest - indices.validate_query} + * + * @memberOf API-Indices + * + * @param {object} [params] + * @param {boolean} [params.all_shards] - If `true`, the validation is executed on all shards instead of one random shard per index. + * @param {boolean} [params.allow_no_indices] - If `false`, the request returns an error if any wildcard expression, index alias, or `_all` value targets only missing or closed indices. This behavior applies even if the request targets other open indices. + * @param {boolean} [params.analyze_wildcard=false] - If `true`, wildcard and prefix queries are analyzed. + * @param {string} [params.analyzer] - Analyzer to use for the query string. This parameter can only be used when the `q` query string parameter is specified. + * @param {string} [params.default_operator] - The default operator for query string query: `AND` or `OR`. + * @param {string} [params.df] - Field to use as default where no field prefix is given in the query string. This parameter can only be used when the `q` query string parameter is specified. + * @param {string} [params.expand_wildcards] - Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`. Valid values are: `all`, `open`, `closed`, `hidden`, `none`. + * @param {boolean} [params.explain] - If `true`, the response returns detailed information if an error has occurred. + * @param {boolean} [params.ignore_unavailable] - If `false`, the request returns an error if it targets a missing or closed index. + * @param {boolean} [params.lenient] - If `true`, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. + * @param {string} [params.q] - Query in the Lucene query string syntax. + * @param {boolean} [params.rewrite] - If `true`, returns a more detailed explanation showing the actual Lucene query that will be executed. + * @param {string} [params.index] - Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (`*`). To search all data streams or indices, omit this parameter or use `*` or `_all`. + * @param {object} [params.body] - The query definition specified with the Query DSL + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function validateQueryFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = ['/', index, '/_validate/query'].filter(c => c).join('').replace('//', '/'); + const method = body ? 'POST' : 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = validateQueryFunc; diff --git a/api/ingest/_api.js b/api/ingest/_api.js new file mode 100644 index 000000000..7aaab6caa --- /dev/null +++ b/api/ingest/_api.js @@ -0,0 +1,38 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Ingest */ + +function IngestApi(bindObj) { + this.deletePipeline = require('./deletePipeline').bind(bindObj); + this.getPipeline = require('./getPipeline').bind(bindObj); + this.processorGrok = require('./processorGrok').bind(bindObj); + this.putPipeline = require('./putPipeline').bind(bindObj); + this.simulate = require('./simulate').bind(bindObj); + + // Deprecated: Use deletePipeline instead. + this.delete_pipeline = require('./deletePipeline').bind(bindObj); + // Deprecated: Use getPipeline instead. + this.get_pipeline = require('./getPipeline').bind(bindObj); + // Deprecated: Use processorGrok instead. + this.processor_grok = require('./processorGrok').bind(bindObj); + // Deprecated: Use putPipeline instead. + this.put_pipeline = require('./putPipeline').bind(bindObj); +} + +module.exports = IngestApi; diff --git a/api/ingest/deletePipeline.d.ts b/api/ingest/deletePipeline.d.ts new file mode 100644 index 000000000..ac8a8ca69 --- /dev/null +++ b/api/ingest/deletePipeline.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Ingest_DeletePipeline_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + id: Common.Id; + master_timeout?: Common.Duration; + timeout?: Common.Duration; +} + +export interface Ingest_DeletePipeline_Response extends ApiResponse { + body: Ingest_DeletePipeline_ResponseBody; +} + +export type Ingest_DeletePipeline_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/ingest/deletePipeline.js b/api/ingest/deletePipeline.js new file mode 100644 index 000000000..28abc345c --- /dev/null +++ b/api/ingest/deletePipeline.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Deletes a pipeline. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/ingest-apis/delete-ingest/ - ingest.delete_pipeline} + * + * @memberOf API-Ingest + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {string} params.id - Pipeline ID or wildcard expression of pipeline IDs used to limit the request. To delete all ingest pipelines in a cluster, use a value of `*`. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deletePipelineFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + + let { body, id, ...querystring } = params; + id = parsePathParam(id); + + const path = '/_ingest/pipeline/' + id; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deletePipelineFunc; diff --git a/api/ingest/getPipeline.d.ts b/api/ingest/getPipeline.d.ts new file mode 100644 index 000000000..b52e757e8 --- /dev/null +++ b/api/ingest/getPipeline.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Ingest_Common from '../_types/ingest._common' + +export interface Ingest_GetPipeline_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + id?: Common.Id; + master_timeout?: Common.Duration; +} + +export interface Ingest_GetPipeline_Response extends ApiResponse { + body: Ingest_GetPipeline_ResponseBody; +} + +export type Ingest_GetPipeline_ResponseBody = Record + diff --git a/api/ingest/getPipeline.js b/api/ingest/getPipeline.js new file mode 100644 index 000000000..1a1298286 --- /dev/null +++ b/api/ingest/getPipeline.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns a pipeline. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/ingest-apis/get-ingest/ - ingest.get_pipeline} + * + * @memberOf API-Ingest + * + * @param {object} [params] + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.id] - Comma-separated list of pipeline IDs to retrieve. Wildcard (`*`) expressions are supported. To get all ingest pipelines, omit this parameter or use `*`. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getPipelineFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, id, ...querystring } = params; + id = parsePathParam(id); + + const path = ['/_ingest/pipeline/', id].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getPipelineFunc; diff --git a/api/ingest/processorGrok.d.ts b/api/ingest/processorGrok.d.ts new file mode 100644 index 000000000..0b94fbbf6 --- /dev/null +++ b/api/ingest/processorGrok.d.ts @@ -0,0 +1,29 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export type Ingest_ProcessorGrok_Request = Global.Params & Record + +export interface Ingest_ProcessorGrok_Response extends ApiResponse { + body: Ingest_ProcessorGrok_ResponseBody; +} + +export interface Ingest_ProcessorGrok_ResponseBody { + patterns: Record; +} + diff --git a/api/ingest/processorGrok.js b/api/ingest/processorGrok.js new file mode 100644 index 000000000..632429384 --- /dev/null +++ b/api/ingest/processorGrok.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns a list of the built-in patterns. + *
See Also: {@link https://opensearch.org/docs/latest - ingest.processor_grok} + * + * @memberOf API-Ingest + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function processorGrokFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_ingest/processor/grok'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = processorGrokFunc; diff --git a/api/ingest/putPipeline.d.ts b/api/ingest/putPipeline.d.ts new file mode 100644 index 000000000..c1f37b551 --- /dev/null +++ b/api/ingest/putPipeline.d.ts @@ -0,0 +1,43 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Ingest_Common from '../_types/ingest._common' + +export interface Ingest_PutPipeline_Request extends Global.Params { + body: Ingest_PutPipeline_RequestBody; + cluster_manager_timeout?: Common.Duration; + id: Common.Id; + master_timeout?: Common.Duration; + timeout?: Common.Duration; +} + +export interface Ingest_PutPipeline_RequestBody { + _meta?: Common.Metadata; + description?: string; + on_failure?: Ingest_Common.ProcessorContainer[]; + processors?: Ingest_Common.ProcessorContainer[]; + version?: Common.VersionNumber; +} + +export interface Ingest_PutPipeline_Response extends ApiResponse { + body: Ingest_PutPipeline_ResponseBody; +} + +export type Ingest_PutPipeline_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/ingest/putPipeline.js b/api/ingest/putPipeline.js new file mode 100644 index 000000000..ab20d94e1 --- /dev/null +++ b/api/ingest/putPipeline.js @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Creates or updates a pipeline. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/ingest-apis/create-update-ingest/ - ingest.put_pipeline} + * + * @memberOf API-Ingest + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {string} params.id - ID of the ingest pipeline to create or update. + * @param {object} params.body - The ingest definition + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function putPipelineFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, id, ...querystring } = params; + id = parsePathParam(id); + + const path = '/_ingest/pipeline/' + id; + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = putPipelineFunc; diff --git a/api/ingest/simulate.d.ts b/api/ingest/simulate.d.ts new file mode 100644 index 000000000..0725b85b7 --- /dev/null +++ b/api/ingest/simulate.d.ts @@ -0,0 +1,41 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Ingest_Simulate from '../_types/ingest.simulate' +import * as Ingest_Common from '../_types/ingest._common' + +export interface Ingest_Simulate_Request extends Global.Params { + body: Ingest_Simulate_RequestBody; + id?: Common.Id; + verbose?: boolean; +} + +export interface Ingest_Simulate_RequestBody { + docs?: Ingest_Simulate.Document[]; + pipeline?: Ingest_Common.Pipeline; +} + +export interface Ingest_Simulate_Response extends ApiResponse { + body: Ingest_Simulate_ResponseBody; +} + +export interface Ingest_Simulate_ResponseBody { + docs: Ingest_Simulate.PipelineSimulation[]; +} + diff --git a/api/ingest/simulate.js b/api/ingest/simulate.js new file mode 100644 index 000000000..b6de086e2 --- /dev/null +++ b/api/ingest/simulate.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Allows to simulate a pipeline with example documents. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/ingest-apis/simulate-ingest/ - ingest.simulate} + * + * @memberOf API-Ingest + * + * @param {object} params + * @param {boolean} [params.verbose=false] - If `true`, the response includes output data for each processor in the executed pipeline. + * @param {string} [params.id] - Pipeline to test. If you don't specify a `pipeline` in the request body, this parameter is required. + * @param {object} params.body - The simulate definition + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function simulateFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, id, ...querystring } = params; + id = parsePathParam(id); + + const path = ['/_ingest/pipeline/', id, '/_simulate'].filter(c => c).join('').replace('//', '/'); + const method = body ? 'POST' : 'GET'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = simulateFunc; diff --git a/api/knn/_api.js b/api/knn/_api.js new file mode 100644 index 000000000..155f469fd --- /dev/null +++ b/api/knn/_api.js @@ -0,0 +1,39 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Knn */ + +function KnnApi(bindObj) { + this.deleteModel = require('./deleteModel').bind(bindObj); + this.getModel = require('./getModel').bind(bindObj); + this.searchModels = require('./searchModels').bind(bindObj); + this.stats = require('./stats').bind(bindObj); + this.trainModel = require('./trainModel').bind(bindObj); + this.warmup = require('./warmup').bind(bindObj); + + // Deprecated: Use deleteModel instead. + this.delete_model = require('./deleteModel').bind(bindObj); + // Deprecated: Use getModel instead. + this.get_model = require('./getModel').bind(bindObj); + // Deprecated: Use searchModels instead. + this.search_models = require('./searchModels').bind(bindObj); + // Deprecated: Use trainModel instead. + this.train_model = require('./trainModel').bind(bindObj); +} + +module.exports = KnnApi; diff --git a/api/knn/deleteModel.d.ts b/api/knn/deleteModel.d.ts new file mode 100644 index 000000000..84932057e --- /dev/null +++ b/api/knn/deleteModel.d.ts @@ -0,0 +1,29 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface Knn_DeleteModel_Request extends Global.Params { + model_id: string; +} + +export interface Knn_DeleteModel_Response extends ApiResponse { + body: Knn_DeleteModel_ResponseBody; +} + +export type Knn_DeleteModel_ResponseBody = Record + diff --git a/api/knn/deleteModel.js b/api/knn/deleteModel.js new file mode 100644 index 000000000..7e599ed49 --- /dev/null +++ b/api/knn/deleteModel.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Used to delete a particular model in the cluster. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/knn/api/#delete-model - knn.delete_model} + * + * @memberOf API-Knn + * + * @param {object} params + * @param {string} params.model_id - The id of the model. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteModelFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.model_id == null) return handleMissingParam('model_id', this, callback); + + let { body, model_id, ...querystring } = params; + model_id = parsePathParam(model_id); + + const path = '/_plugins/_knn/models/' + model_id; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteModelFunc; diff --git a/api/knn/getModel.d.ts b/api/knn/getModel.d.ts new file mode 100644 index 000000000..929e39866 --- /dev/null +++ b/api/knn/getModel.d.ts @@ -0,0 +1,29 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface Knn_GetModel_Request extends Global.Params { + model_id: string; +} + +export interface Knn_GetModel_Response extends ApiResponse { + body: Knn_GetModel_ResponseBody; +} + +export type Knn_GetModel_ResponseBody = Record + diff --git a/api/knn/getModel.js b/api/knn/getModel.js new file mode 100644 index 000000000..175d1cc7f --- /dev/null +++ b/api/knn/getModel.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Used to retrieve information about models present in the cluster. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/knn/api/#get-model - knn.get_model} + * + * @memberOf API-Knn + * + * @param {object} params + * @param {string} params.model_id - The id of the model. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getModelFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.model_id == null) return handleMissingParam('model_id', this, callback); + + let { body, model_id, ...querystring } = params; + model_id = parsePathParam(model_id); + + const path = '/_plugins/_knn/models/' + model_id; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getModelFunc; diff --git a/api/knn/searchModels.d.ts b/api/knn/searchModels.d.ts new file mode 100644 index 000000000..84151af89 --- /dev/null +++ b/api/knn/searchModels.d.ts @@ -0,0 +1,75 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Knn_Common from '../_types/knn._common' +import * as Common from '../_types/_common' + +export interface Knn_SearchModels_Request extends Global.Params { + _source?: string[]; + _source_excludes?: string[]; + _source_includes?: string[]; + allow_no_indices?: boolean; + allow_partial_search_results?: boolean; + analyze_wildcard?: boolean; + analyzer?: string; + batched_reduce_size?: number; + body?: Knn_SearchModels_RequestBody; + ccs_minimize_roundtrips?: boolean; + default_operator?: Knn_Common.DefaultOperator; + df?: string; + docvalue_fields?: string[]; + expand_wildcards?: Common.ExpandWildcards; + explain?: boolean; + from?: number; + ignore_throttled?: boolean; + ignore_unavailable?: boolean; + lenient?: boolean; + max_concurrent_shard_requests?: number; + pre_filter_shard_size?: number; + preference?: string; + q?: string; + request_cache?: boolean; + rest_total_hits_as_int?: boolean; + routing?: string[]; + scroll?: Common.Duration; + search_type?: Knn_Common.SearchType; + seq_no_primary_term?: boolean; + size?: number; + sort?: string[]; + stats?: string[]; + stored_fields?: string[]; + suggest_field?: string; + suggest_mode?: Knn_Common.SuggestMode; + suggest_size?: number; + suggest_text?: string; + terminate_after?: number; + timeout?: Common.Duration; + track_scores?: boolean; + track_total_hits?: boolean; + typed_keys?: boolean; + version?: boolean; +} + +export type Knn_SearchModels_RequestBody = Record + +export interface Knn_SearchModels_Response extends ApiResponse { + body: Knn_SearchModels_ResponseBody; +} + +export type Knn_SearchModels_ResponseBody = Record + diff --git a/api/knn/searchModels.js b/api/knn/searchModels.js new file mode 100644 index 000000000..bf42b642f --- /dev/null +++ b/api/knn/searchModels.js @@ -0,0 +1,89 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Use an OpenSearch query to search for models in the index. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/knn/api/#search-model - knn.search_models} + * + * @memberOf API-Knn + * + * @param {object} [params] + * @param {array} [params._source] - True or false to return the _source field or not, or a list of fields to return. + * @param {array} [params._source_excludes] - List of fields to exclude from the returned _source field. + * @param {array} [params._source_includes] - List of fields to extract and return from the _source field. + * @param {boolean} [params.allow_no_indices] - Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified). + * @param {boolean} [params.allow_partial_search_results=true] - Indicate if an error should be returned if there is a partial search failure or timeout. + * @param {boolean} [params.analyze_wildcard=false] - Specify whether wildcard and prefix queries should be analyzed. + * @param {string} [params.analyzer] - The analyzer to use for the query string. + * @param {integer} [params.batched_reduce_size=512] - The number of shard results that should be reduced at once on the coordinating node. This value should be used as a protection mechanism to reduce the memory overhead per search request if the potential number of shards in the request can be large. + * @param {boolean} [params.ccs_minimize_roundtrips=true] - Indicates whether network round-trips should be minimized as part of cross-cluster search requests execution. + * @param {string} [params.default_operator] - The default operator for query string query (AND or OR). + * @param {string} [params.df] - The field to use as default where no field prefix is given in the query string. + * @param {array} [params.docvalue_fields] - Comma-separated list of fields to return as the docvalue representation of a field for each hit. + * @param {string} [params.expand_wildcards] - Whether to expand wildcard expression to concrete indices that are open, closed or both. + * @param {boolean} [params.explain] - Specify whether to return detailed information about score computation as part of a hit. + * @param {integer} [params.from=0] - Starting offset. + * @param {boolean} [params.ignore_throttled] - Whether specified concrete, expanded or aliased indices should be ignored when throttled. + * @param {boolean} [params.ignore_unavailable] - Whether specified concrete indices should be ignored when unavailable (missing or closed). + * @param {boolean} [params.lenient] - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored. + * @param {integer} [params.max_concurrent_shard_requests=5] - The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests. + * @param {integer} [params.pre_filter_shard_size] - Threshold that enforces a pre-filter round-trip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter round-trip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method ie. if date filters are mandatory to match but the shard bounds and the query are disjoint. + * @param {string} [params.preference=random] - Specify the node or shard the operation should be performed on. + * @param {string} [params.q] - Query in the Lucene query string syntax. + * @param {boolean} [params.request_cache] - Specify if request cache should be used for this request or not, defaults to index level setting. + * @param {boolean} [params.rest_total_hits_as_int=false] - Indicates whether hits.total should be rendered as an integer or an object in the rest search response. + * @param {array} [params.routing] - Comma-separated list of specific routing values. + * @param {string} [params.scroll] - Specify how long a consistent view of the index should be maintained for scrolled search. + * @param {string} [params.search_type] - Search operation type. + * @param {boolean} [params.seq_no_primary_term] - Specify whether to return sequence number and primary term of the last modification of each hit. + * @param {integer} [params.size=10] - Number of hits to return. + * @param {array} [params.sort] - Comma-separated list of : pairs. + * @param {array} [params.stats] - Specific 'tag' of the request for logging and statistical purposes. + * @param {array} [params.stored_fields] - Comma-separated list of stored fields to return. + * @param {string} [params.suggest_field] - Specify which field to use for suggestions. + * @param {string} [params.suggest_mode] - Specify suggest mode. + * @param {integer} [params.suggest_size] - How many suggestions to return in response. + * @param {string} [params.suggest_text] - The source text for which the suggestions should be returned. + * @param {integer} [params.terminate_after] - The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early. + * @param {string} [params.timeout] - Operation timeout. + * @param {boolean} [params.track_scores] - Whether to calculate and return scores even if they are not used for sorting. + * @param {boolean} [params.track_total_hits] - Indicate if the number of documents that match the query should be tracked. + * @param {boolean} [params.typed_keys] - Specify whether aggregation and suggester names should be prefixed by their respective types in the response. + * @param {boolean} [params.version] - Whether to return document version as part of a hit. + * @param {object} [params.body] + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function searchModelsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_knn/models/_search'; + const method = body ? 'POST' : 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = searchModelsFunc; diff --git a/api/knn/stats.d.ts b/api/knn/stats.d.ts new file mode 100644 index 000000000..f6e315b62 --- /dev/null +++ b/api/knn/stats.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Knn_Stats_Request extends Global.Params { + node_id?: string[]; + stat?: 'cache_capacity_reached' | 'circuit_breaker_triggered' | 'eviction_count' | 'faiss_initialized' | 'graph_index_errors' | 'graph_index_requests' | 'graph_memory_usage' | 'graph_memory_usage_percentage' | 'graph_query_errors' | 'graph_query_requests' | 'hit_count' | 'indexing_from_model_degraded' | 'indices_in_cache' | 'knn_query_requests' | 'load_exception_count' | 'load_success_count' | 'miss_count' | 'model_index_status' | 'nmslib_initialized' | 'script_compilation_errors' | 'script_compilations' | 'script_query_errors' | 'script_query_requests' | 'total_load_time' | 'training_errors' | 'training_memory_usage' | 'training_memory_usage_percentage' | 'training_requests'[]; + timeout?: Common.Duration; +} + +export interface Knn_Stats_Response extends ApiResponse { + body: Knn_Stats_ResponseBody; +} + +export type Knn_Stats_ResponseBody = Record + diff --git a/api/knn/stats.js b/api/knn/stats.js new file mode 100644 index 000000000..b80f15da3 --- /dev/null +++ b/api/knn/stats.js @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Provides information about the current status of the k-NN plugin. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/knn/api/#stats - knn.stats} + * + * @memberOf API-Knn + * + * @param {object} [params] + * @param {string} [params.timeout] - Operation timeout. + * @param {array} [params.node_id] - Comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. + * @param {array} [params.stat] - Comma-separated list of stats to retrieve; use `_all` or empty string to retrieve all stats. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function statsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, node_id, stat, ...querystring } = params; + node_id = parsePathParam(node_id); + stat = parsePathParam(stat); + + const path = ['/_plugins/_knn/', node_id, '/stats/', stat].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = statsFunc; diff --git a/api/knn/trainModel.d.ts b/api/knn/trainModel.d.ts new file mode 100644 index 000000000..620f18364 --- /dev/null +++ b/api/knn/trainModel.d.ts @@ -0,0 +1,41 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface Knn_TrainModel_Request extends Global.Params { + body: Knn_TrainModel_RequestBody; + model_id?: string; + preference?: string; +} + +export interface Knn_TrainModel_RequestBody { + description?: string; + dimension: number; + max_training_vector_count?: number; + method: string; + search_size?: number; + training_field: string; + training_index: string; +} + +export interface Knn_TrainModel_Response extends ApiResponse { + body: Knn_TrainModel_ResponseBody; +} + +export type Knn_TrainModel_ResponseBody = Record + diff --git a/api/knn/trainModel.js b/api/knn/trainModel.js new file mode 100644 index 000000000..9e6709e44 --- /dev/null +++ b/api/knn/trainModel.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Create and train a model that can be used for initializing k-NN native library indexes during indexing. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/knn/api/#train-model - knn.train_model} + * + * @memberOf API-Knn + * + * @param {object} params + * @param {string} [params.preference] - Preferred node to execute training. + * @param {string} [params.model_id] - The id of the model. + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function trainModelFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, model_id, ...querystring } = params; + model_id = parsePathParam(model_id); + + const path = ['/_plugins/_knn/models/', model_id, '/_train'].filter(c => c).join('').replace('//', '/'); + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = trainModelFunc; diff --git a/api/knn/warmup.d.ts b/api/knn/warmup.d.ts new file mode 100644 index 000000000..948c71d3e --- /dev/null +++ b/api/knn/warmup.d.ts @@ -0,0 +1,29 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface Knn_Warmup_Request extends Global.Params { + index: string[]; +} + +export interface Knn_Warmup_Response extends ApiResponse { + body: Knn_Warmup_ResponseBody; +} + +export type Knn_Warmup_ResponseBody = Record + diff --git a/api/knn/warmup.js b/api/knn/warmup.js new file mode 100644 index 000000000..d33acf2b7 --- /dev/null +++ b/api/knn/warmup.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Preloads native library files into memory, reducing initial search latency for specified indexes. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/knn/api/#warmup-operation - knn.warmup} + * + * @memberOf API-Knn + * + * @param {object} params + * @param {array} params.index - Comma-separated list of indices; use `_all` or empty string to perform the operation on all indices. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function warmupFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.index == null) return handleMissingParam('index', this, callback); + + let { body, index, ...querystring } = params; + index = parsePathParam(index); + + const path = '/_plugins/_knn/warmup/' + index; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = warmupFunc; diff --git a/api/ml/_api.js b/api/ml/_api.js new file mode 100644 index 000000000..70765af54 --- /dev/null +++ b/api/ml/_api.js @@ -0,0 +1,46 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Ml */ + +function MlApi(bindObj) { + this.deleteModel = require('./deleteModel').bind(bindObj); + this.deleteModelGroup = require('./deleteModelGroup').bind(bindObj); + this.getModelGroup = require('./getModelGroup').bind(bindObj); + this.getTask = require('./getTask').bind(bindObj); + this.registerModel = require('./registerModel').bind(bindObj); + this.registerModelGroup = require('./registerModelGroup').bind(bindObj); + this.searchModels = require('./searchModels').bind(bindObj); + + // Deprecated: Use deleteModel instead. + this.delete_model = require('./deleteModel').bind(bindObj); + // Deprecated: Use deleteModelGroup instead. + this.delete_model_group = require('./deleteModelGroup').bind(bindObj); + // Deprecated: Use getModelGroup instead. + this.get_model_group = require('./getModelGroup').bind(bindObj); + // Deprecated: Use getTask instead. + this.get_task = require('./getTask').bind(bindObj); + // Deprecated: Use registerModel instead. + this.register_model = require('./registerModel').bind(bindObj); + // Deprecated: Use registerModelGroup instead. + this.register_model_group = require('./registerModelGroup').bind(bindObj); + // Deprecated: Use searchModels instead. + this.search_models = require('./searchModels').bind(bindObj); +} + +module.exports = MlApi; diff --git a/api/ml/deleteModel.d.ts b/api/ml/deleteModel.d.ts new file mode 100644 index 000000000..b5abf4c23 --- /dev/null +++ b/api/ml/deleteModel.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Ml_Common from '../_types/ml._common' + +export interface Ml_DeleteModel_Request extends Global.Params { + model_id: string; +} + +export interface Ml_DeleteModel_Response extends ApiResponse { + body: Ml_DeleteModel_ResponseBody; +} + +export type Ml_DeleteModel_ResponseBody = Ml_Common.ModelGroup + diff --git a/api/ml/deleteModel.js b/api/ml/deleteModel.js new file mode 100644 index 000000000..146bf9377 --- /dev/null +++ b/api/ml/deleteModel.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Deletes a model. + *
See Also: {@link undefined - ml.delete_model} + * + * @memberOf API-Ml + * + * @param {object} params + * @param {string} params.model_id + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteModelFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.model_id == null) return handleMissingParam('model_id', this, callback); + + let { body, model_id, ...querystring } = params; + model_id = parsePathParam(model_id); + + const path = '/_plugins/_ml/models/' + model_id; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteModelFunc; diff --git a/api/ml/deleteModelGroup.d.ts b/api/ml/deleteModelGroup.d.ts new file mode 100644 index 000000000..08c6c2778 --- /dev/null +++ b/api/ml/deleteModelGroup.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Ml_Common from '../_types/ml._common' + +export interface Ml_DeleteModelGroup_Request extends Global.Params { + model_group_id: string; +} + +export interface Ml_DeleteModelGroup_Response extends ApiResponse { + body: Ml_DeleteModelGroup_ResponseBody; +} + +export type Ml_DeleteModelGroup_ResponseBody = Ml_Common.ModelGroup + diff --git a/api/ml/deleteModelGroup.js b/api/ml/deleteModelGroup.js new file mode 100644 index 000000000..b2356e22e --- /dev/null +++ b/api/ml/deleteModelGroup.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Deletes a model group. + *
See Also: {@link undefined - ml.delete_model_group} + * + * @memberOf API-Ml + * + * @param {object} params + * @param {string} params.model_group_id + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteModelGroupFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.model_group_id == null) return handleMissingParam('model_group_id', this, callback); + + let { body, model_group_id, ...querystring } = params; + model_group_id = parsePathParam(model_group_id); + + const path = '/_plugins/_ml/model_groups/' + model_group_id; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteModelGroupFunc; diff --git a/api/ml/getModelGroup.d.ts b/api/ml/getModelGroup.d.ts new file mode 100644 index 000000000..00712ba02 --- /dev/null +++ b/api/ml/getModelGroup.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Ml_Common from '../_types/ml._common' + +export interface Ml_GetModelGroup_Request extends Global.Params { + model_group_id: string; +} + +export interface Ml_GetModelGroup_Response extends ApiResponse { + body: Ml_GetModelGroup_ResponseBody; +} + +export type Ml_GetModelGroup_ResponseBody = Ml_Common.ModelGroup + diff --git a/api/ml/getModelGroup.js b/api/ml/getModelGroup.js new file mode 100644 index 000000000..6cc814a7c --- /dev/null +++ b/api/ml/getModelGroup.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Retrieves a model group. + *
See Also: {@link undefined - ml.get_model_group} + * + * @memberOf API-Ml + * + * @param {object} params + * @param {string} params.model_group_id + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getModelGroupFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.model_group_id == null) return handleMissingParam('model_group_id', this, callback); + + let { body, model_group_id, ...querystring } = params; + model_group_id = parsePathParam(model_group_id); + + const path = '/_plugins/_ml/model_groups/' + model_group_id; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getModelGroupFunc; diff --git a/api/ml/getTask.d.ts b/api/ml/getTask.d.ts new file mode 100644 index 000000000..f3e95eb07 --- /dev/null +++ b/api/ml/getTask.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Ml_Common from '../_types/ml._common' + +export interface Ml_GetTask_Request extends Global.Params { + task_id: string; +} + +export interface Ml_GetTask_Response extends ApiResponse { + body: Ml_GetTask_ResponseBody; +} + +export type Ml_GetTask_ResponseBody = Ml_Common.Task + diff --git a/api/ml/getTask.js b/api/ml/getTask.js new file mode 100644 index 000000000..d5a3e8e73 --- /dev/null +++ b/api/ml/getTask.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Retrieves a task. + *
See Also: {@link undefined - ml.get_task} + * + * @memberOf API-Ml + * + * @param {object} params + * @param {string} params.task_id + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getTaskFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.task_id == null) return handleMissingParam('task_id', this, callback); + + let { body, task_id, ...querystring } = params; + task_id = parsePathParam(task_id); + + const path = '/_plugins/_ml/tasks/' + task_id; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getTaskFunc; diff --git a/api/ml/registerModel.d.ts b/api/ml/registerModel.d.ts new file mode 100644 index 000000000..065d500ef --- /dev/null +++ b/api/ml/registerModel.d.ts @@ -0,0 +1,38 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Ml_Common from '../_types/ml._common' + +export interface Ml_RegisterModel_Request extends Global.Params { + body?: Ml_RegisterModel_RequestBody; +} + +export interface Ml_RegisterModel_RequestBody { + description?: string; + model_format: 'ONNX' | 'TORCH_SCRIPT'; + model_group_id?: string; + name: string; + version: string; +} + +export interface Ml_RegisterModel_Response extends ApiResponse { + body: Ml_RegisterModel_ResponseBody; +} + +export type Ml_RegisterModel_ResponseBody = Ml_Common.Task + diff --git a/api/ml/registerModel.js b/api/ml/registerModel.js new file mode 100644 index 000000000..74c255de9 --- /dev/null +++ b/api/ml/registerModel.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Registers a model. + *
See Also: {@link undefined - ml.register_model} + * + * @memberOf API-Ml + * + * @param {object} [params] + * @param {object} [params.body] + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function registerModelFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_ml/models/_register'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = registerModelFunc; diff --git a/api/ml/registerModelGroup.d.ts b/api/ml/registerModelGroup.d.ts new file mode 100644 index 000000000..fa7edf07b --- /dev/null +++ b/api/ml/registerModelGroup.d.ts @@ -0,0 +1,38 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Ml_Common from '../_types/ml._common' + +export interface Ml_RegisterModelGroup_Request extends Global.Params { + body?: Ml_RegisterModelGroup_RequestBody; +} + +export interface Ml_RegisterModelGroup_RequestBody { + access_mode?: 'private' | 'public' | 'restricted'; + add_all_backend_roles?: boolean; + backend_roles?: string[]; + description?: string; + name: string; +} + +export interface Ml_RegisterModelGroup_Response extends ApiResponse { + body: Ml_RegisterModelGroup_ResponseBody; +} + +export type Ml_RegisterModelGroup_ResponseBody = Ml_Common.ModelGroupRegistration + diff --git a/api/ml/registerModelGroup.js b/api/ml/registerModelGroup.js new file mode 100644 index 000000000..b21cd9b8e --- /dev/null +++ b/api/ml/registerModelGroup.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Registers a model group. + *
See Also: {@link undefined - ml.register_model_group} + * + * @memberOf API-Ml + * + * @param {object} [params] + * @param {object} [params.body] + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function registerModelGroupFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_ml/model_groups/_register'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = registerModelGroupFunc; diff --git a/api/ml/searchModels.d.ts b/api/ml/searchModels.d.ts new file mode 100644 index 000000000..43a5b74a2 --- /dev/null +++ b/api/ml/searchModels.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Ml_Common from '../_types/ml._common' + +export interface Ml_SearchModels_Request extends Global.Params { + body?: Ml_Common.SearchModelsQuery; +} + +export interface Ml_SearchModels_Response extends ApiResponse { + body: Ml_SearchModels_ResponseBody; +} + +export type Ml_SearchModels_ResponseBody = Ml_Common.SearchModelsResponse + diff --git a/api/ml/searchModels.js b/api/ml/searchModels.js new file mode 100644 index 000000000..c3db8deac --- /dev/null +++ b/api/ml/searchModels.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Searches for models. + *
See Also: {@link undefined - ml.search_models} + * + * @memberOf API-Ml + * + * @param {object} [params] + * @param {object} [params.body] + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function searchModelsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_ml/models/_search'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = searchModelsFunc; diff --git a/api/new.d.ts b/api/new.d.ts deleted file mode 100644 index 366c3ce03..000000000 --- a/api/new.d.ts +++ /dev/null @@ -1,3194 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -/// - -import { - ClientOptions, - ConnectionPool, - BaseConnectionPool, - CloudConnectionPool, - Connection, - Serializer, - Transport, - errors, - RequestEvent, - ResurrectEvent, - ApiError, - NodeOptions, - events, -} from '../index'; -import Helpers from '../lib/Helpers'; -import { - ApiResponse, - TransportRequestCallback, - TransportRequestPromise, - TransportRequestParams, - TransportRequestOptions, -} from '../lib/Transport'; -import * as T from './types'; - -/** - * We are still working on this type, it will arrive soon. - * If it's critical for you, please open an issue. - * https://github.com/opensearch-project/opensearch-js - */ -type TODO = Record; - -// Extend API -interface ClientExtendsCallbackOptions { - ConfigurationError: errors.ConfigurationError; - makeRequest( - params: TransportRequestParams, - options?: TransportRequestOptions - ): Promise | void; - result: { - body: null; - statusCode: null; - headers: null; - warnings: null; - }; -} -declare type extendsCallback = (options: ClientExtendsCallbackOptions) => any; -// /Extend API - -declare type callbackFn = ( - err: ApiError, - result: ApiResponse -) => void; -declare class Client { - constructor(opts: ClientOptions); - connectionPool: ConnectionPool; - transport: Transport; - serializer: Serializer; - extend(method: string, fn: extendsCallback): void; - extend(method: string, opts: { force: boolean }, fn: extendsCallback): void; - helpers: Helpers; - child(opts?: ClientOptions): Client; - close(callback: Function): void; - close(): Promise; - emit(event: string | symbol, ...args: any[]): boolean; - on(event: 'request', listener: (err: ApiError, meta: RequestEvent) => void): this; - on(event: 'response', listener: (err: ApiError, meta: RequestEvent) => void): this; - on(event: 'sniff', listener: (err: ApiError, meta: RequestEvent) => void): this; - on(event: 'resurrect', listener: (err: null, meta: ResurrectEvent) => void): this; - once(event: 'request', listener: (err: ApiError, meta: RequestEvent) => void): this; - once(event: 'response', listener: (err: ApiError, meta: RequestEvent) => void): this; - once(event: 'sniff', listener: (err: ApiError, meta: RequestEvent) => void): this; - once(event: 'resurrect', listener: (err: null, meta: ResurrectEvent) => void): this; - off(event: string | symbol, listener: (...args: any[]) => void): this; - bulk( - params: T.BulkRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - bulk( - params: T.BulkRequest, - callback: callbackFn - ): TransportRequestCallback; - bulk( - params: T.BulkRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - cat: { - aliases(params?: T.CatAliasesRequest, options?: TransportRequestOptions): TransportRequestPromise> - aliases(callback: callbackFn): TransportRequestCallback - aliases(params: T.CatAliasesRequest, callback: callbackFn): TransportRequestCallback - aliases(params: T.CatAliasesRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - allocation(params?: T.CatAllocationRequest, options?: TransportRequestOptions): TransportRequestPromise> - allocation(callback: callbackFn): TransportRequestCallback - allocation(params: T.CatAllocationRequest, callback: callbackFn): TransportRequestCallback - allocation(params: T.CatAllocationRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - cluster_manager(params?: T.CatClusterManagerRequest, options?: TransportRequestOptions): TransportRequestPromise> - cluster_manager(callback: callbackFn): TransportRequestCallback - cluster_manager(params: T.CatClusterManagerRequest, callback: callbackFn): TransportRequestCallback - cluster_manager(params: T.CatClusterManagerRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - count(params?: T.CatCountRequest, options?: TransportRequestOptions): TransportRequestPromise> - count(callback: callbackFn): TransportRequestCallback - count(params: T.CatCountRequest, callback: callbackFn): TransportRequestCallback - count(params: T.CatCountRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - fielddata(params?: T.CatFielddataRequest, options?: TransportRequestOptions): TransportRequestPromise> - fielddata(callback: callbackFn): TransportRequestCallback - fielddata(params: T.CatFielddataRequest, callback: callbackFn): TransportRequestCallback - fielddata(params: T.CatFielddataRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - health(params?: T.CatHealthRequest, options?: TransportRequestOptions): TransportRequestPromise> - health(callback: callbackFn): TransportRequestCallback - health(params: T.CatHealthRequest, callback: callbackFn): TransportRequestCallback - health(params: T.CatHealthRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - help(params?: T.CatHelpRequest, options?: TransportRequestOptions): TransportRequestPromise> - help(callback: callbackFn): TransportRequestCallback - help(params: T.CatHelpRequest, callback: callbackFn): TransportRequestCallback - help(params: T.CatHelpRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - indices(params?: T.CatIndicesRequest, options?: TransportRequestOptions): TransportRequestPromise> - indices(callback: callbackFn): TransportRequestCallback - indices(params: T.CatIndicesRequest, callback: callbackFn): TransportRequestCallback - indices(params: T.CatIndicesRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - /** - * // TODO: delete cat.master when it is removed from OpenSearch - * @deprecated use cat.cluster_manager instead - */ - master(params?: T.CatMasterRequest, options?: TransportRequestOptions): TransportRequestPromise> - /** - * // TODO: delete cat.master when it is removed from OpenSearch - * @deprecated use cat.cluster_manager instead - */ - master(callback: callbackFn): TransportRequestCallback - /** - * // TODO: delete cat.master when it is removed from OpenSearch - * @deprecated use cat.cluster_manager instead - */ - master(params: T.CatMasterRequest, callback: callbackFn): TransportRequestCallback - /** - * // TODO: delete cat.master when it is removed from OpenSearch - * @deprecated use cat.cluster_manager instead - */ - master(params: T.CatMasterRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - nodeattrs(params?: T.CatNodeAttributesRequest, options?: TransportRequestOptions): TransportRequestPromise> - nodeattrs(callback: callbackFn): TransportRequestCallback - nodeattrs(params: T.CatNodeAttributesRequest, callback: callbackFn): TransportRequestCallback - nodeattrs(params: T.CatNodeAttributesRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - nodes(params?: T.CatNodesRequest, options?: TransportRequestOptions): TransportRequestPromise> - nodes(callback: callbackFn): TransportRequestCallback - nodes(params: T.CatNodesRequest, callback: callbackFn): TransportRequestCallback - nodes(params: T.CatNodesRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - pendingTasks(params?: T.CatPendingTasksRequest, options?: TransportRequestOptions): TransportRequestPromise> - pendingTasks(callback: callbackFn): TransportRequestCallback - pendingTasks(params: T.CatPendingTasksRequest, callback: callbackFn): TransportRequestCallback - pendingTasks(params: T.CatPendingTasksRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - plugins(params?: T.CatPluginsRequest, options?: TransportRequestOptions): TransportRequestPromise> - plugins(callback: callbackFn): TransportRequestCallback - plugins(params: T.CatPluginsRequest, callback: callbackFn): TransportRequestCallback - plugins(params: T.CatPluginsRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - recovery(params?: T.CatRecoveryRequest, options?: TransportRequestOptions): TransportRequestPromise> - recovery(callback: callbackFn): TransportRequestCallback - recovery(params: T.CatRecoveryRequest, callback: callbackFn): TransportRequestCallback - recovery(params: T.CatRecoveryRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - repositories(params?: T.CatRepositoriesRequest, options?: TransportRequestOptions): TransportRequestPromise> - repositories(callback: callbackFn): TransportRequestCallback - repositories(params: T.CatRepositoriesRequest, callback: callbackFn): TransportRequestCallback - repositories(params: T.CatRepositoriesRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - segments(params?: T.CatSegmentsRequest, options?: TransportRequestOptions): TransportRequestPromise> - segments(callback: callbackFn): TransportRequestCallback - segments(params: T.CatSegmentsRequest, callback: callbackFn): TransportRequestCallback - segments(params: T.CatSegmentsRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - shards(params?: T.CatShardsRequest, options?: TransportRequestOptions): TransportRequestPromise> - shards(callback: callbackFn): TransportRequestCallback - shards(params: T.CatShardsRequest, callback: callbackFn): TransportRequestCallback - shards(params: T.CatShardsRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - snapshots(params?: T.CatSnapshotsRequest, options?: TransportRequestOptions): TransportRequestPromise> - snapshots(callback: callbackFn): TransportRequestCallback - snapshots(params: T.CatSnapshotsRequest, callback: callbackFn): TransportRequestCallback - snapshots(params: T.CatSnapshotsRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - tasks(params?: T.CatTasksRequest, options?: TransportRequestOptions): TransportRequestPromise> - tasks(callback: callbackFn): TransportRequestCallback - tasks(params: T.CatTasksRequest, callback: callbackFn): TransportRequestCallback - tasks(params: T.CatTasksRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - templates(params?: T.CatTemplatesRequest, options?: TransportRequestOptions): TransportRequestPromise> - templates(callback: callbackFn): TransportRequestCallback - templates(params: T.CatTemplatesRequest, callback: callbackFn): TransportRequestCallback - templates(params: T.CatTemplatesRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - threadPool(params?: T.CatThreadPoolRequest, options?: TransportRequestOptions): TransportRequestPromise> - threadPool(callback: callbackFn): TransportRequestCallback - threadPool(params: T.CatThreadPoolRequest, callback: callbackFn): TransportRequestCallback - threadPool(params: T.CatThreadPoolRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - } - clearScroll(params?: T.ClearScrollRequest, options?: TransportRequestOptions): TransportRequestPromise> - clearScroll(callback: callbackFn): TransportRequestCallback - clearScroll(params: T.ClearScrollRequest, callback: callbackFn): TransportRequestCallback - clearScroll(params: T.ClearScrollRequest, options: TransportRequestOptions, callback: callbackFn): TransportRequestCallback - cluster: { - allocationExplain( - params?: T.ClusterAllocationExplainRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - allocationExplain( - callback: callbackFn - ): TransportRequestCallback; - allocationExplain( - params: T.ClusterAllocationExplainRequest, - callback: callbackFn - ): TransportRequestCallback; - allocationExplain( - params: T.ClusterAllocationExplainRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deleteComponentTemplate( - params: T.ClusterDeleteComponentTemplateRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteComponentTemplate( - params: T.ClusterDeleteComponentTemplateRequest, - callback: callbackFn - ): TransportRequestCallback; - deleteComponentTemplate( - params: T.ClusterDeleteComponentTemplateRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deleteVotingConfigExclusions( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteVotingConfigExclusions( - callback: callbackFn - ): TransportRequestCallback; - deleteVotingConfigExclusions( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - deleteVotingConfigExclusions( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - existsComponentTemplate( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - existsComponentTemplate( - callback: callbackFn - ): TransportRequestCallback; - existsComponentTemplate( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - existsComponentTemplate( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getComponentTemplate( - params?: T.ClusterGetComponentTemplateRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getComponentTemplate( - callback: callbackFn - ): TransportRequestCallback; - getComponentTemplate( - params: T.ClusterGetComponentTemplateRequest, - callback: callbackFn - ): TransportRequestCallback; - getComponentTemplate( - params: T.ClusterGetComponentTemplateRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getSettings( - params?: T.ClusterGetSettingsRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getSettings( - callback: callbackFn - ): TransportRequestCallback; - getSettings( - params: T.ClusterGetSettingsRequest, - callback: callbackFn - ): TransportRequestCallback; - getSettings( - params: T.ClusterGetSettingsRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - health( - params?: T.ClusterHealthRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - health( - callback: callbackFn - ): TransportRequestCallback; - health( - params: T.ClusterHealthRequest, - callback: callbackFn - ): TransportRequestCallback; - health( - params: T.ClusterHealthRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - pendingTasks( - params?: T.ClusterPendingTasksRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - pendingTasks( - callback: callbackFn - ): TransportRequestCallback; - pendingTasks( - params: T.ClusterPendingTasksRequest, - callback: callbackFn - ): TransportRequestCallback; - pendingTasks( - params: T.ClusterPendingTasksRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - postVotingConfigExclusions( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - postVotingConfigExclusions( - callback: callbackFn - ): TransportRequestCallback; - postVotingConfigExclusions( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - postVotingConfigExclusions( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - putComponentTemplate( - params: T.ClusterPutComponentTemplateRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - putComponentTemplate( - params: T.ClusterPutComponentTemplateRequest, - callback: callbackFn - ): TransportRequestCallback; - putComponentTemplate( - params: T.ClusterPutComponentTemplateRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - putSettings( - params?: T.ClusterPutSettingsRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - putSettings( - callback: callbackFn - ): TransportRequestCallback; - putSettings( - params: T.ClusterPutSettingsRequest, - callback: callbackFn - ): TransportRequestCallback; - putSettings( - params: T.ClusterPutSettingsRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - remoteInfo( - params?: T.ClusterRemoteInfoRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - remoteInfo( - callback: callbackFn - ): TransportRequestCallback; - remoteInfo( - params: T.ClusterRemoteInfoRequest, - callback: callbackFn - ): TransportRequestCallback; - remoteInfo( - params: T.ClusterRemoteInfoRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - reroute( - params?: T.ClusterRerouteRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - reroute( - callback: callbackFn - ): TransportRequestCallback; - reroute( - params: T.ClusterRerouteRequest, - callback: callbackFn - ): TransportRequestCallback; - reroute( - params: T.ClusterRerouteRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - state( - params?: T.ClusterStateRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - state( - callback: callbackFn - ): TransportRequestCallback; - state( - params: T.ClusterStateRequest, - callback: callbackFn - ): TransportRequestCallback; - state( - params: T.ClusterStateRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - stats( - params?: T.ClusterStatsRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - stats( - callback: callbackFn - ): TransportRequestCallback; - stats( - params: T.ClusterStatsRequest, - callback: callbackFn - ): TransportRequestCallback; - stats( - params: T.ClusterStatsRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - }; - count( - params?: T.CountRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - count( - callback: callbackFn - ): TransportRequestCallback; - count( - params: T.CountRequest, - callback: callbackFn - ): TransportRequestCallback; - count( - params: T.CountRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - create( - params: T.CreateRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - create( - params: T.CreateRequest, - callback: callbackFn - ): TransportRequestCallback; - create( - params: T.CreateRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - createPit( - params?: T.PointInTimeCreateRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - createPit( - callback: callbackFn - ): TransportRequestCallback; - createPit( - params: T.PointInTimeCreateRequest, - callback: callbackFn - ): TransportRequestCallback; - createPit( - params: T.PointInTimeCreateRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - danglingIndices: { - deleteDanglingIndex( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteDanglingIndex( - callback: callbackFn - ): TransportRequestCallback; - deleteDanglingIndex( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - deleteDanglingIndex( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - importDanglingIndex( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - importDanglingIndex( - callback: callbackFn - ): TransportRequestCallback; - importDanglingIndex( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - importDanglingIndex( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - listDanglingIndices( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - listDanglingIndices( - callback: callbackFn - ): TransportRequestCallback; - listDanglingIndices( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - listDanglingIndices( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - }; - delete( - params: T.DeleteRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - delete( - params: T.DeleteRequest, - callback: callbackFn - ): TransportRequestCallback; - delete( - params: T.DeleteRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deleteAllPits( - params?: T.PointInTimeDeleteAllRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteAllPits( - callback: callbackFn - ): TransportRequestCallback; - deleteAllPits( - params: T.PointInTimeDeleteAllRequest, - callback: callbackFn - ): TransportRequestCallback; - deleteAllPits( - params: T.PointInTimeDeleteAllRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deleteByQuery( - params: T.DeleteByQueryRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteByQuery( - params: T.DeleteByQueryRequest, - callback: callbackFn - ): TransportRequestCallback; - deleteByQuery( - params: T.DeleteByQueryRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deleteByQueryRethrottle( - params: T.DeleteByQueryRethrottleRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteByQueryRethrottle( - params: T.DeleteByQueryRethrottleRequest, - callback: callbackFn - ): TransportRequestCallback; - deleteByQueryRethrottle( - params: T.DeleteByQueryRethrottleRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deletePit( - params?: T.PointInTimeDeleteRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deletePit( - callback: callbackFn - ): TransportRequestCallback; - deletePit( - params: T.PointInTimeDeleteRequest, - callback: callbackFn - ): TransportRequestCallback; - deletePit( - params: T.PointInTimeDeleteRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deleteScript( - params: T.DeleteScriptRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteScript( - params: T.DeleteScriptRequest, - callback: callbackFn - ): TransportRequestCallback; - deleteScript( - params: T.DeleteScriptRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - exists( - params: T.ExistsRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - exists( - params: T.ExistsRequest, - callback: callbackFn - ): TransportRequestCallback; - exists( - params: T.ExistsRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - existsSource( - params: T.ExistsSourceRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - existsSource( - params: T.ExistsSourceRequest, - callback: callbackFn - ): TransportRequestCallback; - existsSource( - params: T.ExistsSourceRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - explain( - params: T.ExplainRequest, - options?: TransportRequestOptions - ): TransportRequestPromise, TContext>>; - explain( - params: T.ExplainRequest, - callback: callbackFn, TContext> - ): TransportRequestCallback; - explain( - params: T.ExplainRequest, - options: TransportRequestOptions, - callback: callbackFn, TContext> - ): TransportRequestCallback; - features: { - getFeatures( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getFeatures(callback: callbackFn): TransportRequestCallback; - getFeatures( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getFeatures( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - resetFeatures( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - resetFeatures( - callback: callbackFn - ): TransportRequestCallback; - resetFeatures( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - resetFeatures( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - }; - fieldCaps( - params?: T.FieldCapsRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - fieldCaps( - callback: callbackFn - ): TransportRequestCallback; - fieldCaps( - params: T.FieldCapsRequest, - callback: callbackFn - ): TransportRequestCallback; - fieldCaps( - params: T.FieldCapsRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get( - params: T.GetRequest, - options?: TransportRequestOptions - ): TransportRequestPromise, TContext>>; - get( - params: T.GetRequest, - callback: callbackFn, TContext> - ): TransportRequestCallback; - get( - params: T.GetRequest, - options: TransportRequestOptions, - callback: callbackFn, TContext> - ): TransportRequestCallback; - getAllPits( - params?: T.PointInTimeGetAllRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getAllPits( - callback: callbackFn - ): TransportRequestCallback; - getAllPits( - params: T.PointInTimeGetAllRequest, - callback: callbackFn - ): TransportRequestCallback; - getAllPits( - params: T.PointInTimeGetAllRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getScript( - params: T.GetScriptRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getScript( - params: T.GetScriptRequest, - callback: callbackFn - ): TransportRequestCallback; - getScript( - params: T.GetScriptRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getScriptContext( - params?: T.GetScriptContextRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getScriptContext( - callback: callbackFn - ): TransportRequestCallback; - getScriptContext( - params: T.GetScriptContextRequest, - callback: callbackFn - ): TransportRequestCallback; - getScriptContext( - params: T.GetScriptContextRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getScriptLanguages( - params?: T.GetScriptLanguagesRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getScriptLanguages( - callback: callbackFn - ): TransportRequestCallback; - getScriptLanguages( - params: T.GetScriptLanguagesRequest, - callback: callbackFn - ): TransportRequestCallback; - getScriptLanguages( - params: T.GetScriptLanguagesRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getSource( - params?: T.GetSourceRequest, - options?: TransportRequestOptions - ): TransportRequestPromise, TContext>>; - getSource( - callback: callbackFn, TContext> - ): TransportRequestCallback; - getSource( - params: T.GetSourceRequest, - callback: callbackFn, TContext> - ): TransportRequestCallback; - getSource( - params: T.GetSourceRequest, - options: TransportRequestOptions, - callback: callbackFn, TContext> - ): TransportRequestCallback; - index( - params: T.IndexRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - index( - params: T.IndexRequest, - callback: callbackFn - ): TransportRequestCallback; - index( - params: T.IndexRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - indices: { - addBlock( - params: T.IndicesAddBlockRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - addBlock( - params: T.IndicesAddBlockRequest, - callback: callbackFn - ): TransportRequestCallback; - addBlock( - params: T.IndicesAddBlockRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - analyze( - params?: T.IndicesAnalyzeRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - analyze( - callback: callbackFn - ): TransportRequestCallback; - analyze( - params: T.IndicesAnalyzeRequest, - callback: callbackFn - ): TransportRequestCallback; - analyze( - params: T.IndicesAnalyzeRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - clearCache( - params?: T.IndicesClearCacheRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - clearCache( - callback: callbackFn - ): TransportRequestCallback; - clearCache( - params: T.IndicesClearCacheRequest, - callback: callbackFn - ): TransportRequestCallback; - clearCache( - params: T.IndicesClearCacheRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - clone( - params: T.IndicesCloneRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - clone( - params: T.IndicesCloneRequest, - callback: callbackFn - ): TransportRequestCallback; - clone( - params: T.IndicesCloneRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - close( - params: T.IndicesCloseRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - close( - params: T.IndicesCloseRequest, - callback: callbackFn - ): TransportRequestCallback; - close( - params: T.IndicesCloseRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - create( - params: T.IndicesCreateRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - create( - params: T.IndicesCreateRequest, - callback: callbackFn - ): TransportRequestCallback; - create( - params: T.IndicesCreateRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - delete( - params: T.IndicesDeleteRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - delete( - params: T.IndicesDeleteRequest, - callback: callbackFn - ): TransportRequestCallback; - delete( - params: T.IndicesDeleteRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deleteAlias( - params: T.IndicesDeleteAliasRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteAlias( - params: T.IndicesDeleteAliasRequest, - callback: callbackFn - ): TransportRequestCallback; - deleteAlias( - params: T.IndicesDeleteAliasRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deleteIndexTemplate( - params: T.IndicesDeleteIndexTemplateRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteIndexTemplate( - params: T.IndicesDeleteIndexTemplateRequest, - callback: callbackFn - ): TransportRequestCallback; - deleteIndexTemplate( - params: T.IndicesDeleteIndexTemplateRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use deleteIndexTemplate instead */ - deleteTemplate( - params: T.IndicesDeleteTemplateRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - /** @deprecated use deleteIndexTemplate instead */ - deleteTemplate( - params: T.IndicesDeleteTemplateRequest, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use deleteIndexTemplate instead */ - deleteTemplate( - params: T.IndicesDeleteTemplateRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - diskUsage( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - diskUsage(callback: callbackFn): TransportRequestCallback; - diskUsage( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - diskUsage( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - exists( - params: T.IndicesExistsRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - exists( - params: T.IndicesExistsRequest, - callback: callbackFn - ): TransportRequestCallback; - exists( - params: T.IndicesExistsRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - existsAlias( - params: T.IndicesExistsAliasRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - existsAlias( - params: T.IndicesExistsAliasRequest, - callback: callbackFn - ): TransportRequestCallback; - existsAlias( - params: T.IndicesExistsAliasRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - existsIndexTemplate( - params: T.IndicesExistsIndexTemplateRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - existsIndexTemplate( - params: T.IndicesExistsIndexTemplateRequest, - callback: callbackFn - ): TransportRequestCallback; - existsIndexTemplate( - params: T.IndicesExistsIndexTemplateRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use existsIndexTemplate instead */ - existsTemplate( - params: T.IndicesExistsTemplateRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - /** @deprecated use existsIndexTemplate instead */ - existsTemplate( - params: T.IndicesExistsTemplateRequest, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use existsIndexTemplate instead */ - existsTemplate( - params: T.IndicesExistsTemplateRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - fieldUsageStats( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - fieldUsageStats( - callback: callbackFn - ): TransportRequestCallback; - fieldUsageStats( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - fieldUsageStats( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - flush( - params?: T.IndicesFlushRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - flush( - callback: callbackFn - ): TransportRequestCallback; - flush( - params: T.IndicesFlushRequest, - callback: callbackFn - ): TransportRequestCallback; - flush( - params: T.IndicesFlushRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - forcemerge( - params?: T.IndicesForcemergeRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - forcemerge( - callback: callbackFn - ): TransportRequestCallback; - forcemerge( - params: T.IndicesForcemergeRequest, - callback: callbackFn - ): TransportRequestCallback; - forcemerge( - params: T.IndicesForcemergeRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get( - params: T.IndicesGetRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get( - params: T.IndicesGetRequest, - callback: callbackFn - ): TransportRequestCallback; - get( - params: T.IndicesGetRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getAlias( - params?: T.IndicesGetAliasRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getAlias( - callback: callbackFn - ): TransportRequestCallback; - getAlias( - params: T.IndicesGetAliasRequest, - callback: callbackFn - ): TransportRequestCallback; - getAlias( - params: T.IndicesGetAliasRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getFieldMapping( - params: T.IndicesGetFieldMappingRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getFieldMapping( - params: T.IndicesGetFieldMappingRequest, - callback: callbackFn - ): TransportRequestCallback; - getFieldMapping( - params: T.IndicesGetFieldMappingRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getIndexTemplate( - params?: T.IndicesGetIndexTemplateRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getIndexTemplate( - callback: callbackFn - ): TransportRequestCallback; - getIndexTemplate( - params: T.IndicesGetIndexTemplateRequest, - callback: callbackFn - ): TransportRequestCallback; - getIndexTemplate( - params: T.IndicesGetIndexTemplateRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getMapping( - params?: T.IndicesGetMappingRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getMapping( - callback: callbackFn - ): TransportRequestCallback; - getMapping( - params: T.IndicesGetMappingRequest, - callback: callbackFn - ): TransportRequestCallback; - getMapping( - params: T.IndicesGetMappingRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getSettings( - params?: T.IndicesGetSettingsRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getSettings( - callback: callbackFn - ): TransportRequestCallback; - getSettings( - params: T.IndicesGetSettingsRequest, - callback: callbackFn - ): TransportRequestCallback; - getSettings( - params: T.IndicesGetSettingsRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use getIndexTemplate instead */ - getTemplate( - params?: T.IndicesGetTemplateRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - /** @deprecated use getIndexTemplate instead */ - getTemplate( - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use getIndexTemplate instead */ - getTemplate( - params: T.IndicesGetTemplateRequest, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use getIndexTemplate instead */ - getTemplate( - params: T.IndicesGetTemplateRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getUpgrade( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getUpgrade(callback: callbackFn): TransportRequestCallback; - getUpgrade( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getUpgrade( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - open( - params: T.IndicesOpenRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - open( - params: T.IndicesOpenRequest, - callback: callbackFn - ): TransportRequestCallback; - open( - params: T.IndicesOpenRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - putAlias( - params: T.IndicesPutAliasRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - putAlias( - params: T.IndicesPutAliasRequest, - callback: callbackFn - ): TransportRequestCallback; - putAlias( - params: T.IndicesPutAliasRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - putIndexTemplate( - params: T.IndicesPutIndexTemplateRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - putIndexTemplate( - params: T.IndicesPutIndexTemplateRequest, - callback: callbackFn - ): TransportRequestCallback; - putIndexTemplate( - params: T.IndicesPutIndexTemplateRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - putMapping( - params?: T.IndicesPutMappingRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - putMapping( - callback: callbackFn - ): TransportRequestCallback; - putMapping( - params: T.IndicesPutMappingRequest, - callback: callbackFn - ): TransportRequestCallback; - putMapping( - params: T.IndicesPutMappingRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - putSettings( - params?: T.IndicesPutSettingsRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - putSettings( - callback: callbackFn - ): TransportRequestCallback; - putSettings( - params: T.IndicesPutSettingsRequest, - callback: callbackFn - ): TransportRequestCallback; - putSettings( - params: T.IndicesPutSettingsRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use putIndexTemplate instead */ - putTemplate( - params: T.IndicesPutTemplateRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - /** @deprecated use putIndexTemplate instead */ - putTemplate( - params: T.IndicesPutTemplateRequest, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use putIndexTemplate instead */ - putTemplate( - params: T.IndicesPutTemplateRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - recovery( - params?: T.IndicesRecoveryRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - recovery( - callback: callbackFn - ): TransportRequestCallback; - recovery( - params: T.IndicesRecoveryRequest, - callback: callbackFn - ): TransportRequestCallback; - recovery( - params: T.IndicesRecoveryRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - refresh( - params?: T.IndicesRefreshRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - refresh( - callback: callbackFn - ): TransportRequestCallback; - refresh( - params: T.IndicesRefreshRequest, - callback: callbackFn - ): TransportRequestCallback; - refresh( - params: T.IndicesRefreshRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - resolveIndex( - params: T.IndicesResolveIndexRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - resolveIndex( - params: T.IndicesResolveIndexRequest, - callback: callbackFn - ): TransportRequestCallback; - resolveIndex( - params: T.IndicesResolveIndexRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - rollover( - params: T.IndicesRolloverRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - rollover( - params: T.IndicesRolloverRequest, - callback: callbackFn - ): TransportRequestCallback; - rollover( - params: T.IndicesRolloverRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - segments( - params?: T.IndicesSegmentsRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - segments( - callback: callbackFn - ): TransportRequestCallback; - segments( - params: T.IndicesSegmentsRequest, - callback: callbackFn - ): TransportRequestCallback; - segments( - params: T.IndicesSegmentsRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - shardStores( - params?: T.IndicesShardStoresRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - shardStores( - callback: callbackFn - ): TransportRequestCallback; - shardStores( - params: T.IndicesShardStoresRequest, - callback: callbackFn - ): TransportRequestCallback; - shardStores( - params: T.IndicesShardStoresRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - shrink( - params: T.IndicesShrinkRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - shrink( - params: T.IndicesShrinkRequest, - callback: callbackFn - ): TransportRequestCallback; - shrink( - params: T.IndicesShrinkRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - simulateIndexTemplate( - params?: T.IndicesSimulateIndexTemplateRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - simulateIndexTemplate( - callback: callbackFn - ): TransportRequestCallback; - simulateIndexTemplate( - params: T.IndicesSimulateIndexTemplateRequest, - callback: callbackFn - ): TransportRequestCallback; - simulateIndexTemplate( - params: T.IndicesSimulateIndexTemplateRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use simulateIndexTemplate instead */ - simulateTemplate( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - /** @deprecated use simulateIndexTemplate instead */ - simulateTemplate( - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use simulateIndexTemplate instead */ - simulateTemplate( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use simulateIndexTemplate instead */ - simulateTemplate( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - split( - params: T.IndicesSplitRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - split( - params: T.IndicesSplitRequest, - callback: callbackFn - ): TransportRequestCallback; - split( - params: T.IndicesSplitRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - stats( - params?: T.IndicesStatsRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - stats( - callback: callbackFn - ): TransportRequestCallback; - stats( - params: T.IndicesStatsRequest, - callback: callbackFn - ): TransportRequestCallback; - stats( - params: T.IndicesStatsRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - updateAliases( - params?: T.IndicesUpdateAliasesRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - updateAliases( - callback: callbackFn - ): TransportRequestCallback; - updateAliases( - params: T.IndicesUpdateAliasesRequest, - callback: callbackFn - ): TransportRequestCallback; - updateAliases( - params: T.IndicesUpdateAliasesRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - upgrade( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - upgrade(callback: callbackFn): TransportRequestCallback; - upgrade( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - upgrade( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - validateQuery( - params?: T.IndicesValidateQueryRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - validateQuery( - callback: callbackFn - ): TransportRequestCallback; - validateQuery( - params: T.IndicesValidateQueryRequest, - callback: callbackFn - ): TransportRequestCallback; - validateQuery( - params: T.IndicesValidateQueryRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - }; - info( - params?: T.InfoRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - info( - callback: callbackFn - ): TransportRequestCallback; - info( - params: T.InfoRequest, - callback: callbackFn - ): TransportRequestCallback; - info( - params: T.InfoRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - ingest: { - deletePipeline( - params: T.IngestDeletePipelineRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deletePipeline( - params: T.IngestDeletePipelineRequest, - callback: callbackFn - ): TransportRequestCallback; - deletePipeline( - params: T.IngestDeletePipelineRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - geoIpStats( - params?: T.IngestGeoIpStatsRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - geoIpStats( - callback: callbackFn - ): TransportRequestCallback; - geoIpStats( - params: T.IngestGeoIpStatsRequest, - callback: callbackFn - ): TransportRequestCallback; - geoIpStats( - params: T.IngestGeoIpStatsRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getPipeline( - params?: T.IngestGetPipelineRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getPipeline( - callback: callbackFn - ): TransportRequestCallback; - getPipeline( - params: T.IngestGetPipelineRequest, - callback: callbackFn - ): TransportRequestCallback; - getPipeline( - params: T.IngestGetPipelineRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - processorGrok( - params?: T.IngestProcessorGrokRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - processorGrok( - callback: callbackFn - ): TransportRequestCallback; - processorGrok( - params: T.IngestProcessorGrokRequest, - callback: callbackFn - ): TransportRequestCallback; - processorGrok( - params: T.IngestProcessorGrokRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - putPipeline( - params: T.IngestPutPipelineRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - putPipeline( - params: T.IngestPutPipelineRequest, - callback: callbackFn - ): TransportRequestCallback; - putPipeline( - params: T.IngestPutPipelineRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - simulate( - params?: T.IngestSimulatePipelineRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - simulate( - callback: callbackFn - ): TransportRequestCallback; - simulate( - params: T.IngestSimulatePipelineRequest, - callback: callbackFn - ): TransportRequestCallback; - simulate( - params: T.IngestSimulatePipelineRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - }; - mget( - params?: T.MgetRequest, - options?: TransportRequestOptions - ): TransportRequestPromise, TContext>>; - mget( - callback: callbackFn, TContext> - ): TransportRequestCallback; - mget( - params: T.MgetRequest, - callback: callbackFn, TContext> - ): TransportRequestCallback; - mget( - params: T.MgetRequest, - options: TransportRequestOptions, - callback: callbackFn, TContext> - ): TransportRequestCallback; - msearch( - params?: T.MsearchRequest, - options?: TransportRequestOptions - ): TransportRequestPromise, TContext>>; - msearch( - callback: callbackFn, TContext> - ): TransportRequestCallback; - msearch( - params: T.MsearchRequest, - callback: callbackFn, TContext> - ): TransportRequestCallback; - msearch( - params: T.MsearchRequest, - options: TransportRequestOptions, - callback: callbackFn, TContext> - ): TransportRequestCallback; - msearchTemplate( - params?: T.MsearchTemplateRequest, - options?: TransportRequestOptions - ): TransportRequestPromise, TContext>>; - msearchTemplate( - callback: callbackFn, TContext> - ): TransportRequestCallback; - msearchTemplate( - params: T.MsearchTemplateRequest, - callback: callbackFn, TContext> - ): TransportRequestCallback; - msearchTemplate( - params: T.MsearchTemplateRequest, - options: TransportRequestOptions, - callback: callbackFn, TContext> - ): TransportRequestCallback; - mtermvectors( - params?: T.MtermvectorsRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - mtermvectors( - callback: callbackFn - ): TransportRequestCallback; - mtermvectors( - params: T.MtermvectorsRequest, - callback: callbackFn - ): TransportRequestCallback; - mtermvectors( - params: T.MtermvectorsRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - nodes: { - clearMeteringArchive( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - clearMeteringArchive( - callback: callbackFn - ): TransportRequestCallback; - clearMeteringArchive( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - clearMeteringArchive( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getMeteringInfo( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getMeteringInfo( - callback: callbackFn - ): TransportRequestCallback; - getMeteringInfo( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getMeteringInfo( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - hotThreads( - params?: T.NodesHotThreadsRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - hotThreads( - callback: callbackFn - ): TransportRequestCallback; - hotThreads( - params: T.NodesHotThreadsRequest, - callback: callbackFn - ): TransportRequestCallback; - hotThreads( - params: T.NodesHotThreadsRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - info( - params?: T.NodesInfoRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - info( - callback: callbackFn - ): TransportRequestCallback; - info( - params: T.NodesInfoRequest, - callback: callbackFn - ): TransportRequestCallback; - info( - params: T.NodesInfoRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - reloadSecureSettings( - params?: T.NodesReloadSecureSettingsRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - reloadSecureSettings( - callback: callbackFn - ): TransportRequestCallback; - reloadSecureSettings( - params: T.NodesReloadSecureSettingsRequest, - callback: callbackFn - ): TransportRequestCallback; - reloadSecureSettings( - params: T.NodesReloadSecureSettingsRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - stats( - params?: T.NodesStatsRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - stats( - callback: callbackFn - ): TransportRequestCallback; - stats( - params: T.NodesStatsRequest, - callback: callbackFn - ): TransportRequestCallback; - stats( - params: T.NodesStatsRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - usage( - params?: T.NodesUsageRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - usage( - callback: callbackFn - ): TransportRequestCallback; - usage( - params: T.NodesUsageRequest, - callback: callbackFn - ): TransportRequestCallback; - usage( - params: T.NodesUsageRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - }; - ping( - params?: T.PingRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - ping( - callback: callbackFn - ): TransportRequestCallback; - ping( - params: T.PingRequest, - callback: callbackFn - ): TransportRequestCallback; - ping( - params: T.PingRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - putScript( - params: T.PutScriptRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - putScript( - params: T.PutScriptRequest, - callback: callbackFn - ): TransportRequestCallback; - putScript( - params: T.PutScriptRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - rankEval( - params: T.RankEvalRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - rankEval( - params: T.RankEvalRequest, - callback: callbackFn - ): TransportRequestCallback; - rankEval( - params: T.RankEvalRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - reindex( - params?: T.ReindexRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - reindex( - callback: callbackFn - ): TransportRequestCallback; - reindex( - params: T.ReindexRequest, - callback: callbackFn - ): TransportRequestCallback; - reindex( - params: T.ReindexRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - reindexRethrottle( - params: T.ReindexRethrottleRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - reindexRethrottle( - params: T.ReindexRethrottleRequest, - callback: callbackFn - ): TransportRequestCallback; - reindexRethrottle( - params: T.ReindexRethrottleRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - renderSearchTemplate( - params?: T.RenderSearchTemplateRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - renderSearchTemplate( - callback: callbackFn - ): TransportRequestCallback; - renderSearchTemplate( - params: T.RenderSearchTemplateRequest, - callback: callbackFn - ): TransportRequestCallback; - renderSearchTemplate( - params: T.RenderSearchTemplateRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - scriptsPainlessExecute( - params?: T.ScriptsPainlessExecuteRequest, - options?: TransportRequestOptions - ): TransportRequestPromise, TContext>>; - scriptsPainlessExecute( - callback: callbackFn, TContext> - ): TransportRequestCallback; - scriptsPainlessExecute( - params: T.ScriptsPainlessExecuteRequest, - callback: callbackFn, TContext> - ): TransportRequestCallback; - scriptsPainlessExecute( - params: T.ScriptsPainlessExecuteRequest, - options: TransportRequestOptions, - callback: callbackFn, TContext> - ): TransportRequestCallback; - scroll( - params?: T.ScrollRequest, - options?: TransportRequestOptions - ): TransportRequestPromise, TContext>>; - scroll( - callback: callbackFn, TContext> - ): TransportRequestCallback; - scroll( - params: T.ScrollRequest, - callback: callbackFn, TContext> - ): TransportRequestCallback; - scroll( - params: T.ScrollRequest, - options: TransportRequestOptions, - callback: callbackFn, TContext> - ): TransportRequestCallback; - search( - params?: T.SearchRequest, - options?: TransportRequestOptions - ): TransportRequestPromise, TContext>>; - search( - callback: callbackFn, TContext> - ): TransportRequestCallback; - search( - params: T.SearchRequest, - callback: callbackFn, TContext> - ): TransportRequestCallback; - search( - params: T.SearchRequest, - options: TransportRequestOptions, - callback: callbackFn, TContext> - ): TransportRequestCallback; - searchShards( - params?: T.SearchShardsRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - searchShards( - callback: callbackFn - ): TransportRequestCallback; - searchShards( - params: T.SearchShardsRequest, - callback: callbackFn - ): TransportRequestCallback; - searchShards( - params: T.SearchShardsRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - searchTemplate( - params?: T.SearchTemplateRequest, - options?: TransportRequestOptions - ): TransportRequestPromise, TContext>>; - searchTemplate( - callback: callbackFn, TContext> - ): TransportRequestCallback; - searchTemplate( - params: T.SearchTemplateRequest, - callback: callbackFn, TContext> - ): TransportRequestCallback; - searchTemplate( - params: T.SearchTemplateRequest, - options: TransportRequestOptions, - callback: callbackFn, TContext> - ): TransportRequestCallback; - security: { - - changePassword( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - changePassword( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - changePassword( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - createActionGroup( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - createActionGroup( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - createActionGroup( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - createRole( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - createRole( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - createRole( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - createRoleMapping( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - createRoleMapping( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - createRoleMapping( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - createTenant( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - createTenant( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - createTenant( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - createUser( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - createUser( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - createUser( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - deleteActionGroup( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteActionGroup( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - deleteActionGroup( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - deleteDistinguishedNames( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteDistinguishedNames( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - deleteDistinguishedNames( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - deleteRole( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteRole( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - deleteRole( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - deleteRoleMapping( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteRoleMapping( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - deleteRoleMapping( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - deleteTenant( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteTenant( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - deleteTenant( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - deleteUser( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteUser( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - deleteUser( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - flushCache( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - flushCache( - callback: callbackFn - ): TransportRequestCallback; - flushCache( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - flushCache( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - flushCache( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - flushCache( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - flushCache( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getAccountDetails( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getAccountDetails( - callback: callbackFn - ): TransportRequestCallback; - getAccountDetails( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getAccountDetails( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - getAccountDetails( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getAccountDetails( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getAccountDetails( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - getActionGroup( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getActionGroup( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getActionGroup( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getActionGroups( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getActionGroups( - callback: callbackFn - ): TransportRequestCallback; - getActionGroups( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getActionGroups( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - getActionGroups( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getActionGroups( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getActionGroups( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getAuditConfiguration( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getAuditConfiguration( - callback: callbackFn - ): TransportRequestCallback; - getAuditConfiguration( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getAuditConfiguration( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - getAuditConfiguration( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getAuditConfiguration( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getAuditConfiguration( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getCertificates( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getCertificates( - callback: callbackFn - ): TransportRequestCallback; - getCertificates( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getCertificates( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - getCertificates( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getCertificates( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getCertificates( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getConfiguration( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getConfiguration( - callback: callbackFn - ): TransportRequestCallback; - getConfiguration( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getConfiguration( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - getConfiguration( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getConfiguration( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getConfiguration( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getDistinguishedNames( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getDistinguishedNames( - callback: callbackFn - ): TransportRequestCallback; - getDistinguishedNames( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getDistinguishedNames( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - getDistinguishedNames( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getDistinguishedNames( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getDistinguishedNames( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - getRole( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getRole( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getRole( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - getRoleMapping( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getRoleMapping( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getRoleMapping( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getRoleMappings( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getRoleMappings( - callback: callbackFn - ): TransportRequestCallback; - getRoleMappings( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getRoleMappings( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - getRoleMappings( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getRoleMappings( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getRoleMappings( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getRoles( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getRoles( - callback: callbackFn - ): TransportRequestCallback; - getRoles( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getRoles( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - getRoles( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getRoles( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getRoles( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - getTenant( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getTenant( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getTenant( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getTenants( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getTenants( - callback: callbackFn - ): TransportRequestCallback; - getTenants( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getTenants( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - getTenants( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getTenants( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getTenants( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - getUser( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getUser( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getUser( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getUsers( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getUsers( - callback: callbackFn - ): TransportRequestCallback; - getUsers( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getUsers( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - getUsers( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getUsers( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getUsers( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - health( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - health( - callback: callbackFn - ): TransportRequestCallback; - health( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - health( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - health( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - health( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - health( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - patchActionGroup( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - patchActionGroup( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - patchActionGroup( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - patchActionGroups( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - patchActionGroups( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - patchActionGroups( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - patchAuditConfiguration( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - patchAuditConfiguration( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - patchAuditConfiguration( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - patchConfiguration( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - patchConfiguration( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - patchConfiguration( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - patchDistinguishedNames( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - patchDistinguishedNames( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - patchDistinguishedNames( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - patchRole( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - patchRole( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - patchRole( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - patchRoleMapping( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - patchRoleMapping( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - patchRoleMapping( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - patchRoleMappings( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - patchRoleMappings( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - patchRoleMappings( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - patchRoles( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - patchRoles( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - patchRoles( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - patchTenant( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - patchTenant( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - patchTenant( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - patchTenants( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - patchTenants( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - patchTenants( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - patchUser( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - patchUser( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - patchUser( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - patchUsers( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - patchUsers( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - patchUsers( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - reloadHttpCertificates( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - reloadHttpCertificates( - callback: callbackFn - ): TransportRequestCallback; - reloadHttpCertificates( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - reloadHttpCertificates( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - reloadHttpCertificates( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - reloadHttpCertificates( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - reloadHttpCertificates( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - reloadTransportCertificates( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - reloadTransportCertificates( - callback: callbackFn - ): TransportRequestCallback; - reloadTransportCertificates( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - reloadTransportCertificates( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - reloadTransportCertificates( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - reloadTransportCertificates( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - reloadTransportCertificates( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - updateAuditConfiguration( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - updateAuditConfiguration( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - updateAuditConfiguration( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - updateConfiguration( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - updateConfiguration( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - updateConfiguration( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - updateDistinguishedNames( - params: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - updateDistinguishedNames( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - updateDistinguishedNames( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - - }; - shutdown: { - deleteNode( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteNode(callback: callbackFn): TransportRequestCallback; - deleteNode( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - deleteNode( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getNode( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getNode(callback: callbackFn): TransportRequestCallback; - getNode( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - getNode( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - putNode( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - putNode(callback: callbackFn): TransportRequestCallback; - putNode( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - putNode( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - }; - snapshot: { - cleanupRepository( - params: T.SnapshotCleanupRepositoryRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - cleanupRepository( - params: T.SnapshotCleanupRepositoryRequest, - callback: callbackFn - ): TransportRequestCallback; - cleanupRepository( - params: T.SnapshotCleanupRepositoryRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - clone( - params: T.SnapshotCloneRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - clone( - params: T.SnapshotCloneRequest, - callback: callbackFn - ): TransportRequestCallback; - clone( - params: T.SnapshotCloneRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - create( - params: T.SnapshotCreateRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - create( - params: T.SnapshotCreateRequest, - callback: callbackFn - ): TransportRequestCallback; - create( - params: T.SnapshotCreateRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - createRepository( - params: T.SnapshotCreateRepositoryRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - createRepository( - params: T.SnapshotCreateRepositoryRequest, - callback: callbackFn - ): TransportRequestCallback; - createRepository( - params: T.SnapshotCreateRepositoryRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - delete( - params: T.SnapshotDeleteRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - delete( - params: T.SnapshotDeleteRequest, - callback: callbackFn - ): TransportRequestCallback; - delete( - params: T.SnapshotDeleteRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deleteRepository( - params: T.SnapshotDeleteRepositoryRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteRepository( - params: T.SnapshotDeleteRepositoryRequest, - callback: callbackFn - ): TransportRequestCallback; - deleteRepository( - params: T.SnapshotDeleteRepositoryRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get( - params: T.SnapshotGetRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get( - params: T.SnapshotGetRequest, - callback: callbackFn - ): TransportRequestCallback; - get( - params: T.SnapshotGetRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getRepository( - params?: T.SnapshotGetRepositoryRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getRepository( - callback: callbackFn - ): TransportRequestCallback; - getRepository( - params: T.SnapshotGetRepositoryRequest, - callback: callbackFn - ): TransportRequestCallback; - getRepository( - params: T.SnapshotGetRepositoryRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - repositoryAnalyze( - params?: TODO, - options?: TransportRequestOptions - ): TransportRequestPromise>; - repositoryAnalyze( - callback: callbackFn - ): TransportRequestCallback; - repositoryAnalyze( - params: TODO, - callback: callbackFn - ): TransportRequestCallback; - repositoryAnalyze( - params: TODO, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - restore( - params: T.SnapshotRestoreRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - restore( - params: T.SnapshotRestoreRequest, - callback: callbackFn - ): TransportRequestCallback; - restore( - params: T.SnapshotRestoreRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - status( - params?: T.SnapshotStatusRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - status( - callback: callbackFn - ): TransportRequestCallback; - status( - params: T.SnapshotStatusRequest, - callback: callbackFn - ): TransportRequestCallback; - status( - params: T.SnapshotStatusRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - verifyRepository( - params: T.SnapshotVerifyRepositoryRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - verifyRepository( - params: T.SnapshotVerifyRepositoryRequest, - callback: callbackFn - ): TransportRequestCallback; - verifyRepository( - params: T.SnapshotVerifyRepositoryRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - }; - tasks: { - cancel( - params?: T.TaskCancelRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - cancel( - callback: callbackFn - ): TransportRequestCallback; - cancel( - params: T.TaskCancelRequest, - callback: callbackFn - ): TransportRequestCallback; - cancel( - params: T.TaskCancelRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get( - params: T.TaskGetRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get( - params: T.TaskGetRequest, - callback: callbackFn - ): TransportRequestCallback; - get( - params: T.TaskGetRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - list( - params?: T.TaskListRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - list( - callback: callbackFn - ): TransportRequestCallback; - list( - params: T.TaskListRequest, - callback: callbackFn - ): TransportRequestCallback; - list( - params: T.TaskListRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - }; - termsEnum( - params: T.TermsEnumRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - termsEnum( - params: T.TermsEnumRequest, - callback: callbackFn - ): TransportRequestCallback; - termsEnum( - params: T.TermsEnumRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - termvectors( - params: T.TermvectorsRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - termvectors( - params: T.TermvectorsRequest, - callback: callbackFn - ): TransportRequestCallback; - termvectors( - params: T.TermvectorsRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - update( - params: T.UpdateRequest, - options?: TransportRequestOptions - ): TransportRequestPromise, TContext>>; - update( - params: T.UpdateRequest, - callback: callbackFn, TContext> - ): TransportRequestCallback; - update( - params: T.UpdateRequest, - options: TransportRequestOptions, - callback: callbackFn, TContext> - ): TransportRequestCallback; - updateByQuery( - params: T.UpdateByQueryRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - updateByQuery( - params: T.UpdateByQueryRequest, - callback: callbackFn - ): TransportRequestCallback; - updateByQuery( - params: T.UpdateByQueryRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - updateByQueryRethrottle( - params: T.UpdateByQueryRethrottleRequest, - options?: TransportRequestOptions - ): TransportRequestPromise>; - updateByQueryRethrottle( - params: T.UpdateByQueryRethrottleRequest, - callback: callbackFn - ): TransportRequestCallback; - updateByQueryRethrottle( - params: T.UpdateByQueryRethrottleRequest, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; -} - -export * as opensearchtypes from './types'; -export { - Client, - Transport, - ConnectionPool, - BaseConnectionPool, - CloudConnectionPool, - Connection, - Serializer, - events, - errors, - ApiError, - ApiResponse, - RequestEvent, - ResurrectEvent, - ClientOptions, - NodeOptions, - ClientExtendsCallbackOptions, -}; diff --git a/api/nodes/_api.js b/api/nodes/_api.js new file mode 100644 index 000000000..d5f54a304 --- /dev/null +++ b/api/nodes/_api.js @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Nodes */ + +function NodesApi(bindObj) { + this.hotThreads = require('./hotThreads').bind(bindObj); + this.info = require('./info').bind(bindObj); + this.reloadSecureSettings = require('./reloadSecureSettings').bind(bindObj); + this.stats = require('./stats').bind(bindObj); + this.usage = require('./usage').bind(bindObj); + + // Deprecated: Use hotThreads instead. + this.hot_threads = require('./hotThreads').bind(bindObj); + // Deprecated: Use reloadSecureSettings instead. + this.reload_secure_settings = require('./reloadSecureSettings').bind(bindObj); +} + +module.exports = NodesApi; diff --git a/api/nodes/hotThreads.d.ts b/api/nodes/hotThreads.d.ts new file mode 100644 index 000000000..0a3d019a3 --- /dev/null +++ b/api/nodes/hotThreads.d.ts @@ -0,0 +1,37 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Nodes_Common from '../_types/nodes._common' + +export interface Nodes_HotThreads_Request extends Global.Params { + ignore_idle_threads?: boolean; + interval?: Common.Duration; + node_id?: string[]; + snapshots?: number; + threads?: number; + timeout?: Common.Duration; + type?: Nodes_Common.SampleType; +} + +export interface Nodes_HotThreads_Response extends ApiResponse { + body: Nodes_HotThreads_ResponseBody; +} + +export type Nodes_HotThreads_ResponseBody = Record + diff --git a/api/nodes/hotThreads.js b/api/nodes/hotThreads.js new file mode 100644 index 000000000..7122655e5 --- /dev/null +++ b/api/nodes/hotThreads.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns information about hot threads on each node in the cluster. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-hot-threads/ - nodes.hot_threads} + * + * @memberOf API-Nodes + * + * @param {object} [params] + * @param {boolean} [params.ignore_idle_threads=true] - Don't show threads that are in known-idle places, such as waiting on a socket select or pulling from an empty task queue. + * @param {string} [params.interval] - The interval for the second sampling of threads. + * @param {integer} [params.snapshots=10] - Number of samples of thread stacktrace. + * @param {integer} [params.threads=3] - Specify the number of threads to provide information for. + * @param {string} [params.timeout] - Operation timeout. + * @param {string} [params.type] - The type to sample. + * @param {array} [params.node_id] - Comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function hotThreadsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, node_id, ...querystring } = params; + node_id = parsePathParam(node_id); + + const path = ['/_nodes/', node_id, '/hot_threads'].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = hotThreadsFunc; diff --git a/api/nodes/info.d.ts b/api/nodes/info.d.ts new file mode 100644 index 000000000..26472a343 --- /dev/null +++ b/api/nodes/info.d.ts @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Nodes_Info from '../_types/nodes.info' +import * as Common from '../_types/_common' + +export interface Nodes_Info_Request extends Global.Params { + flat_settings?: boolean; + metric?: Nodes_Info.Metric[]; + node_id?: Common.NodeIds; + timeout?: Common.Duration; +} + +export interface Nodes_Info_Response extends ApiResponse { + body: Nodes_Info_ResponseBody; +} + +export type Nodes_Info_ResponseBody = Nodes_Info.ResponseBase + diff --git a/api/nodes/info.js b/api/nodes/info.js new file mode 100644 index 000000000..8097990f1 --- /dev/null +++ b/api/nodes/info.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns information about nodes in the cluster. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-info/ - nodes.info} + * + * @memberOf API-Nodes + * + * @param {object} [params] + * @param {boolean} [params.flat_settings=false] - If true, returns settings in flat format. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {array} [params.metric] - Limits the information returned to the specific metrics. Supports a comma-separated list, such as http,ingest. + * @param {string} [params.node_id] - Comma-separated list of node IDs or names used to limit returned information. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function infoFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, metric, node_id, ...querystring } = params; + metric = parsePathParam(metric); + node_id = parsePathParam(node_id); + + const path = ['/_nodes/', node_id, '/', metric].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = infoFunc; diff --git a/api/nodes/reloadSecureSettings.d.ts b/api/nodes/reloadSecureSettings.d.ts new file mode 100644 index 000000000..2718df961 --- /dev/null +++ b/api/nodes/reloadSecureSettings.d.ts @@ -0,0 +1,37 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Nodes_ReloadSecureSettings from '../_types/nodes.reload_secure_settings' + +export interface Nodes_ReloadSecureSettings_Request extends Global.Params { + body?: Nodes_ReloadSecureSettings_RequestBody; + node_id?: Common.NodeIds; + timeout?: Common.Duration; +} + +export interface Nodes_ReloadSecureSettings_RequestBody { + secure_settings_password?: Common.Password; +} + +export interface Nodes_ReloadSecureSettings_Response extends ApiResponse { + body: Nodes_ReloadSecureSettings_ResponseBody; +} + +export type Nodes_ReloadSecureSettings_ResponseBody = Nodes_ReloadSecureSettings.ResponseBase + diff --git a/api/nodes/reloadSecureSettings.js b/api/nodes/reloadSecureSettings.js new file mode 100644 index 000000000..50b61ec00 --- /dev/null +++ b/api/nodes/reloadSecureSettings.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Reloads secure settings. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-reload-secure/ - nodes.reload_secure_settings} + * + * @memberOf API-Nodes + * + * @param {object} [params] + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {string} [params.node_id] - The names of particular nodes in the cluster to target. + * @param {object} [params.body] - An object containing the password for the opensearch keystore + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function reloadSecureSettingsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, node_id, ...querystring } = params; + node_id = parsePathParam(node_id); + + const path = ['/_nodes/', node_id, '/reload_secure_settings'].filter(c => c).join('').replace('//', '/'); + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = reloadSecureSettingsFunc; diff --git a/api/nodes/stats.d.ts b/api/nodes/stats.d.ts new file mode 100644 index 000000000..9e19042da --- /dev/null +++ b/api/nodes/stats.d.ts @@ -0,0 +1,41 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Nodes_Stats from '../_types/nodes.stats' + +export interface Nodes_Stats_Request extends Global.Params { + completion_fields?: Common.Fields; + fielddata_fields?: Common.Fields; + fields?: Common.Fields; + groups?: string[]; + include_segment_file_sizes?: boolean; + index_metric?: Nodes_Stats.IndexMetric[]; + level?: Common.Level; + metric?: Nodes_Stats.Metric[]; + node_id?: Common.NodeIds; + timeout?: Common.Duration; + types?: string[]; +} + +export interface Nodes_Stats_Response extends ApiResponse { + body: Nodes_Stats_ResponseBody; +} + +export type Nodes_Stats_ResponseBody = Nodes_Stats.ResponseBase + diff --git a/api/nodes/stats.js b/api/nodes/stats.js new file mode 100644 index 000000000..0c2de6bbd --- /dev/null +++ b/api/nodes/stats.js @@ -0,0 +1,60 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns statistical information about nodes in the cluster. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/nodes-apis/nodes-usage/ - nodes.stats} + * + * @memberOf API-Nodes + * + * @param {object} [params] + * @param {string} [params.completion_fields] - Comma-separated list or wildcard expressions of fields to include in fielddata and suggest statistics. + * @param {string} [params.fielddata_fields] - Comma-separated list or wildcard expressions of fields to include in fielddata statistics. + * @param {string} [params.fields] - Comma-separated list or wildcard expressions of fields to include in the statistics. + * @param {array} [params.groups] - Comma-separated list of search groups to include in the search statistics. + * @param {boolean} [params.include_segment_file_sizes=false] - If true, the call reports the aggregated disk usage of each one of the Lucene index files (only applies if segment stats are requested). + * @param {string} [params.level] - Indicates whether statistics are aggregated at the cluster, index, or shard level. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {array} [params.types] - A comma-separated list of document types for the indexing index metric. + * @param {string} [params.node_id] - Comma-separated list of node IDs or names used to limit returned information. + * @param {array} [params.metric] - Limit the information returned to the specified metrics + * @param {array} [params.index_metric] - Limit the information returned for indices metric to the specific index metrics. It can be used only if indices (or all) metric is specified. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function statsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, node_id, metric, index_metric, ...querystring } = params; + node_id = parsePathParam(node_id); + metric = parsePathParam(metric); + index_metric = parsePathParam(index_metric); + + const path = ['/_nodes/', node_id, '/stats/', metric, '/', index_metric].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = statsFunc; diff --git a/api/nodes/usage.d.ts b/api/nodes/usage.d.ts new file mode 100644 index 000000000..c4c59018b --- /dev/null +++ b/api/nodes/usage.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Nodes_Usage from '../_types/nodes.usage' +import * as Common from '../_types/_common' + +export interface Nodes_Usage_Request extends Global.Params { + metric?: Nodes_Usage.Metric[]; + node_id?: Common.NodeIds; + timeout?: Common.Duration; +} + +export interface Nodes_Usage_Response extends ApiResponse { + body: Nodes_Usage_ResponseBody; +} + +export type Nodes_Usage_ResponseBody = Nodes_Usage.ResponseBase + diff --git a/api/nodes/usage.js b/api/nodes/usage.js new file mode 100644 index 000000000..034af8acf --- /dev/null +++ b/api/nodes/usage.js @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns low-level information about REST actions usage on nodes. + *
See Also: {@link https://opensearch.org/docs/latest - nodes.usage} + * + * @memberOf API-Nodes + * + * @param {object} [params] + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {string} [params.node_id] - A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes + * @param {array} [params.metric] - Limits the information returned to the specific metrics. A comma-separated list of the following options: `_all`, `rest_actions`. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function usageFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, node_id, metric, ...querystring } = params; + node_id = parsePathParam(node_id); + metric = parsePathParam(metric); + + const path = ['/_nodes/', node_id, '/usage/', metric].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = usageFunc; diff --git a/api/notifications/_api.js b/api/notifications/_api.js new file mode 100644 index 000000000..4c2c55dce --- /dev/null +++ b/api/notifications/_api.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Notifications */ + +function NotificationsApi(bindObj) { + this.createConfig = require('./createConfig').bind(bindObj); + this.deleteConfig = require('./deleteConfig').bind(bindObj); + this.deleteConfigs = require('./deleteConfigs').bind(bindObj); + this.getConfig = require('./getConfig').bind(bindObj); + this.getConfigs = require('./getConfigs').bind(bindObj); + this.listChannels = require('./listChannels').bind(bindObj); + this.listFeatures = require('./listFeatures').bind(bindObj); + this.sendTest = require('./sendTest').bind(bindObj); + this.updateConfig = require('./updateConfig').bind(bindObj); + + // Deprecated: Use createConfig instead. + this.create_config = require('./createConfig').bind(bindObj); + // Deprecated: Use deleteConfig instead. + this.delete_config = require('./deleteConfig').bind(bindObj); + // Deprecated: Use deleteConfigs instead. + this.delete_configs = require('./deleteConfigs').bind(bindObj); + // Deprecated: Use getConfig instead. + this.get_config = require('./getConfig').bind(bindObj); + // Deprecated: Use getConfigs instead. + this.get_configs = require('./getConfigs').bind(bindObj); + // Deprecated: Use listChannels instead. + this.list_channels = require('./listChannels').bind(bindObj); + // Deprecated: Use listFeatures instead. + this.list_features = require('./listFeatures').bind(bindObj); + // Deprecated: Use sendTest instead. + this.send_test = require('./sendTest').bind(bindObj); + // Deprecated: Use updateConfig instead. + this.update_config = require('./updateConfig').bind(bindObj); +} + +module.exports = NotificationsApi; diff --git a/api/notifications/createConfig.d.ts b/api/notifications/createConfig.d.ts new file mode 100644 index 000000000..872d1d9e7 --- /dev/null +++ b/api/notifications/createConfig.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Notifications_Common from '../_types/notifications._common' + +export interface Notifications_CreateConfig_Request extends Global.Params { + body: Notifications_Common.NotificationsConfig; +} + +export interface Notifications_CreateConfig_Response extends ApiResponse { + body: Notifications_CreateConfig_ResponseBody; +} + +export interface Notifications_CreateConfig_ResponseBody { + config_id?: string; +} + diff --git a/api/notifications/createConfig.js b/api/notifications/createConfig.js new file mode 100644 index 000000000..fa4d40dc9 --- /dev/null +++ b/api/notifications/createConfig.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Create channel configuration. + *
See Also: {@link https://opensearch.org/docs/latest/observing-your-data/notifications/api/#create-channel-configuration - notifications.create_config} + * + * @memberOf API-Notifications + * + * @param {object} params + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function createConfigFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_notifications/configs'; + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = createConfigFunc; diff --git a/api/notifications/deleteConfig.d.ts b/api/notifications/deleteConfig.d.ts new file mode 100644 index 000000000..13a4a2c0e --- /dev/null +++ b/api/notifications/deleteConfig.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Notifications_Common from '../_types/notifications._common' + +export interface Notifications_DeleteConfig_Request extends Global.Params { + config_id: string; +} + +export interface Notifications_DeleteConfig_Response extends ApiResponse { + body: Notifications_DeleteConfig_ResponseBody; +} + +export type Notifications_DeleteConfig_ResponseBody = Notifications_Common.DeleteConfigsResponse + diff --git a/api/notifications/deleteConfig.js b/api/notifications/deleteConfig.js new file mode 100644 index 000000000..da0849af1 --- /dev/null +++ b/api/notifications/deleteConfig.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Delete a channel configuration. + *
See Also: {@link https://opensearch.org/docs/latest/observing-your-data/notifications/api/#delete-channel-configuration - notifications.delete_config} + * + * @memberOf API-Notifications + * + * @param {object} params + * @param {string} params.config_id - The ID of the channel configuration to delete. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteConfigFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.config_id == null) return handleMissingParam('config_id', this, callback); + + let { body, config_id, ...querystring } = params; + config_id = parsePathParam(config_id); + + const path = '/_plugins/_notifications/configs/' + config_id; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteConfigFunc; diff --git a/api/notifications/deleteConfigs.d.ts b/api/notifications/deleteConfigs.d.ts new file mode 100644 index 000000000..c64aad408 --- /dev/null +++ b/api/notifications/deleteConfigs.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Notifications_Common from '../_types/notifications._common' + +export interface Notifications_DeleteConfigs_Request extends Global.Params { + config_id: string; + config_id_list?: string; +} + +export interface Notifications_DeleteConfigs_Response extends ApiResponse { + body: Notifications_DeleteConfigs_ResponseBody; +} + +export type Notifications_DeleteConfigs_ResponseBody = Notifications_Common.DeleteConfigsResponse + diff --git a/api/notifications/deleteConfigs.js b/api/notifications/deleteConfigs.js new file mode 100644 index 000000000..9332fc93b --- /dev/null +++ b/api/notifications/deleteConfigs.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Delete multiple channel configurations. + *
See Also: {@link https://opensearch.org/docs/latest/observing-your-data/notifications/api/#delete-channel-configuration - notifications.delete_configs} + * + * @memberOf API-Notifications + * + * @param {object} params + * @param {string} params.config_id - The ID of the channel configuration to delete. + * @param {string} [params.config_id_list] - A comma-separated list of channel IDs to delete. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteConfigsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.config_id == null) return handleMissingParam('config_id', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_notifications/configs'; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteConfigsFunc; diff --git a/api/notifications/getConfig.d.ts b/api/notifications/getConfig.d.ts new file mode 100644 index 000000000..78322cecd --- /dev/null +++ b/api/notifications/getConfig.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Notifications_Common from '../_types/notifications._common' + +export interface Notifications_GetConfig_Request extends Global.Params { + config_id: string; +} + +export interface Notifications_GetConfig_Response extends ApiResponse { + body: Notifications_GetConfig_ResponseBody; +} + +export type Notifications_GetConfig_ResponseBody = Notifications_Common.GetConfigsResponse + diff --git a/api/notifications/getConfig.js b/api/notifications/getConfig.js new file mode 100644 index 000000000..b8574a3d1 --- /dev/null +++ b/api/notifications/getConfig.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Get a specific channel configuration. + *
See Also: {@link undefined - notifications.get_config} + * + * @memberOf API-Notifications + * + * @param {object} params + * @param {string} params.config_id + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getConfigFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.config_id == null) return handleMissingParam('config_id', this, callback); + + let { body, config_id, ...querystring } = params; + config_id = parsePathParam(config_id); + + const path = '/_plugins/_notifications/configs/' + config_id; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getConfigFunc; diff --git a/api/notifications/getConfigs.d.ts b/api/notifications/getConfigs.d.ts new file mode 100644 index 000000000..51decd55e --- /dev/null +++ b/api/notifications/getConfigs.d.ts @@ -0,0 +1,76 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Notifications_Common from '../_types/notifications._common' + +export interface Notifications_GetConfigs_Request extends Global.Params { + body?: Notifications_GetConfigs_RequestBody; + 'chime.url'?: string; + 'chime.url.keyword'?: string; + config_type?: Notifications_Common.NotificationConfigType; + created_time_ms?: number; + description?: string; + 'description.keyword'?: string; + 'email_group.recipient_list.recipient'?: string; + 'email_group.recipient_list.recipient.keyword'?: string; + 'email.email_account_id'?: string; + 'email.email_group_id_list'?: string; + 'email.recipient_list.recipient'?: string; + 'email.recipient_list.recipient.keyword'?: string; + is_enabled?: boolean; + last_updated_time_ms?: number; + 'microsoft_teams.url'?: string; + 'microsoft_teams.url.keyword'?: string; + name?: string; + 'name.keyword'?: string; + query?: string; + 'ses_account.from_address'?: string; + 'ses_account.from_address.keyword'?: string; + 'ses_account.region'?: string; + 'ses_account.role_arn'?: string; + 'ses_account.role_arn.keyword'?: string; + 'slack.url'?: string; + 'slack.url.keyword'?: string; + 'smtp_account.from_address'?: string; + 'smtp_account.from_address.keyword'?: string; + 'smtp_account.host'?: string; + 'smtp_account.host.keyword'?: string; + 'smtp_account.method'?: string; + 'sns.role_arn'?: string; + 'sns.role_arn.keyword'?: string; + 'sns.topic_arn'?: string; + 'sns.topic_arn.keyword'?: string; + text_query?: string; + 'webhook.url'?: string; + 'webhook.url.keyword'?: string; +} + +export interface Notifications_GetConfigs_RequestBody { + config_id_list?: string[]; + from_index?: number; + max_items?: number; + sort_field?: string; + sort_order?: string; +} + +export interface Notifications_GetConfigs_Response extends ApiResponse { + body: Notifications_GetConfigs_ResponseBody; +} + +export type Notifications_GetConfigs_ResponseBody = Notifications_Common.GetConfigsResponse + diff --git a/api/notifications/getConfigs.js b/api/notifications/getConfigs.js new file mode 100644 index 000000000..89a053185 --- /dev/null +++ b/api/notifications/getConfigs.js @@ -0,0 +1,85 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Get multiple channel configurations with filtering. + *
See Also: {@link https://opensearch.org/docs/latest/observing-your-data/notifications/api/#list-all-notification-configurations - notifications.get_configs} + * + * @memberOf API-Notifications + * + * @param {object} [params] + * @param {string} [params.chime.url] + * @param {string} [params.chime.url.keyword] + * @param {string} [params.config_type] - Type of notification configuration. + * @param {integer} [params.created_time_ms] + * @param {string} [params.description] + * @param {string} [params.description.keyword] + * @param {string} [params.email.email_account_id] + * @param {string} [params.email.email_group_id_list] + * @param {string} [params.email.recipient_list.recipient] + * @param {string} [params.email.recipient_list.recipient.keyword] + * @param {string} [params.email_group.recipient_list.recipient] + * @param {string} [params.email_group.recipient_list.recipient.keyword] + * @param {boolean} [params.is_enabled] + * @param {integer} [params.last_updated_time_ms] + * @param {string} [params.microsoft_teams.url] + * @param {string} [params.microsoft_teams.url.keyword] + * @param {string} [params.name] + * @param {string} [params.name.keyword] + * @param {string} [params.query] + * @param {string} [params.ses_account.from_address] + * @param {string} [params.ses_account.from_address.keyword] + * @param {string} [params.ses_account.region] + * @param {string} [params.ses_account.role_arn] + * @param {string} [params.ses_account.role_arn.keyword] + * @param {string} [params.slack.url] + * @param {string} [params.slack.url.keyword] + * @param {string} [params.smtp_account.from_address] + * @param {string} [params.smtp_account.from_address.keyword] + * @param {string} [params.smtp_account.host] + * @param {string} [params.smtp_account.host.keyword] + * @param {string} [params.smtp_account.method] + * @param {string} [params.sns.role_arn] + * @param {string} [params.sns.role_arn.keyword] + * @param {string} [params.sns.topic_arn] + * @param {string} [params.sns.topic_arn.keyword] + * @param {string} [params.text_query] + * @param {string} [params.webhook.url] + * @param {string} [params.webhook.url.keyword] + * @param {object} [params.body] + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getConfigsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_notifications/configs'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getConfigsFunc; diff --git a/api/notifications/listChannels.d.ts b/api/notifications/listChannels.d.ts new file mode 100644 index 000000000..bf94bed02 --- /dev/null +++ b/api/notifications/listChannels.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Notifications_Common from '../_types/notifications._common' + +export type Notifications_ListChannels_Request = Global.Params & Record + +export interface Notifications_ListChannels_Response extends ApiResponse { + body: Notifications_ListChannels_ResponseBody; +} + +export interface Notifications_ListChannels_ResponseBody { + channel_list?: Notifications_Common.NotificationChannel[]; + start_index?: number; + total_hit_relation?: Notifications_Common.TotalHitRelation; + total_hits?: number; +} + diff --git a/api/notifications/listChannels.js b/api/notifications/listChannels.js new file mode 100644 index 000000000..5744250d0 --- /dev/null +++ b/api/notifications/listChannels.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * List created notification channels. + *
See Also: {@link https://opensearch.org/docs/latest/observing-your-data/notifications/api/#list-all-notification-channels - notifications.list_channels} + * + * @memberOf API-Notifications + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function listChannelsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_notifications/channels'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = listChannelsFunc; diff --git a/api/notifications/listFeatures.d.ts b/api/notifications/listFeatures.d.ts new file mode 100644 index 000000000..abfb5a723 --- /dev/null +++ b/api/notifications/listFeatures.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Notifications_Common from '../_types/notifications._common' + +export type Notifications_ListFeatures_Request = Global.Params & Record + +export interface Notifications_ListFeatures_Response extends ApiResponse { + body: Notifications_ListFeatures_ResponseBody; +} + +export interface Notifications_ListFeatures_ResponseBody { + allowed_config_type_list?: Notifications_Common.NotificationConfigType[]; + plugin_features?: Notifications_Common.NotificationsPluginFeaturesMap; +} + diff --git a/api/notifications/listFeatures.js b/api/notifications/listFeatures.js new file mode 100644 index 000000000..66a15b446 --- /dev/null +++ b/api/notifications/listFeatures.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * List supported channel configurations. + *
See Also: {@link https://opensearch.org/docs/latest/observing-your-data/notifications/api/#list-supported-channel-configurations - notifications.list_features} + * + * @memberOf API-Notifications + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function listFeaturesFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_notifications/features'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = listFeaturesFunc; diff --git a/api/notifications/sendTest.d.ts b/api/notifications/sendTest.d.ts new file mode 100644 index 000000000..ae04f2bef --- /dev/null +++ b/api/notifications/sendTest.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Notifications_Common from '../_types/notifications._common' + +export interface Notifications_SendTest_Request extends Global.Params { + config_id: string; +} + +export interface Notifications_SendTest_Response extends ApiResponse { + body: Notifications_SendTest_ResponseBody; +} + +export interface Notifications_SendTest_ResponseBody { + event_source?: Notifications_Common.EventSource; + status_list?: Notifications_Common.EventStatus[]; +} + diff --git a/api/notifications/sendTest.js b/api/notifications/sendTest.js new file mode 100644 index 000000000..855e9ad15 --- /dev/null +++ b/api/notifications/sendTest.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Send a test notification. + *
See Also: {@link https://opensearch.org/docs/latest/observing-your-data/notifications/api/#send-test-notification - notifications.send_test} + * + * @memberOf API-Notifications + * + * @param {object} params + * @param {string} params.config_id + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function sendTestFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.config_id == null) return handleMissingParam('config_id', this, callback); + + let { body, config_id, ...querystring } = params; + config_id = parsePathParam(config_id); + + const path = '/_plugins/_notifications/feature/test/' + config_id; + const method = body ? 'POST' : 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = sendTestFunc; diff --git a/api/notifications/updateConfig.d.ts b/api/notifications/updateConfig.d.ts new file mode 100644 index 000000000..82d79ee14 --- /dev/null +++ b/api/notifications/updateConfig.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Notifications_Common from '../_types/notifications._common' + +export interface Notifications_UpdateConfig_Request extends Global.Params { + body: Notifications_Common.NotificationsConfig; + config_id: string; +} + +export interface Notifications_UpdateConfig_Response extends ApiResponse { + body: Notifications_UpdateConfig_ResponseBody; +} + +export interface Notifications_UpdateConfig_ResponseBody { + config_id?: string; +} + diff --git a/api/notifications/updateConfig.js b/api/notifications/updateConfig.js new file mode 100644 index 000000000..8d5d05383 --- /dev/null +++ b/api/notifications/updateConfig.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Update channel configuration. + *
See Also: {@link https://opensearch.org/docs/latest/observing-your-data/notifications/api/#update-channel-configuration - notifications.update_config} + * + * @memberOf API-Notifications + * + * @param {object} params + * @param {string} params.config_id + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function updateConfigFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.config_id == null) return handleMissingParam('config_id', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, config_id, ...querystring } = params; + config_id = parsePathParam(config_id); + + const path = '/_plugins/_notifications/configs/' + config_id; + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = updateConfigFunc; diff --git a/api/opensearch_dashboards.d.ts b/api/opensearch_dashboards.d.ts deleted file mode 100644 index 67dbb9756..000000000 --- a/api/opensearch_dashboards.d.ts +++ /dev/null @@ -1,278 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -/// - -import { - ClientOptions, - ConnectionPool, - Serializer, - Transport, - errors, - RequestEvent, - ResurrectEvent, - ApiError -} from '../index' -import Helpers from '../lib/Helpers' -import { - ApiResponse, - TransportRequestPromise, - TransportRequestParams, - TransportRequestOptions -} from '../lib/Transport' -import * as T from './types' - -/** - * We are still working on this type, it will arrive soon. - * If it's critical for you, please open an issue. - * https://github.com/opensearch-project/opensearch-js/issues - */ -type TODO = Record - -// Extend API -interface ClientExtendsCallbackOptions { - ConfigurationError: errors.ConfigurationError, - makeRequest(params: TransportRequestParams, options?: TransportRequestOptions): Promise | void; - result: { - body: null, - statusCode: null, - headers: null, - warnings: null - } -} -declare type extendsCallback = (options: ClientExtendsCallbackOptions) => any; -// /Extend API - -interface OpenSearchDashboardsClient { - connectionPool: ConnectionPool - transport: Transport - serializer: Serializer - extend(method: string, fn: extendsCallback): void - extend(method: string, opts: { force: boolean }, fn: extendsCallback): void; - helpers: Helpers - child(opts?: ClientOptions): OpenSearchDashboardsClient - close(): Promise; - emit(event: string | symbol, ...args: any[]): boolean; - on(event: 'request', listener: (err: ApiError, meta: RequestEvent) => void): this; - on(event: 'response', listener: (err: ApiError, meta: RequestEvent) => void): this; - on(event: 'sniff', listener: (err: ApiError, meta: RequestEvent) => void): this; - on(event: 'resurrect', listener: (err: null, meta: ResurrectEvent) => void): this; - once(event: 'request', listener: (err: ApiError, meta: RequestEvent) => void): this; - once(event: 'response', listener: (err: ApiError, meta: RequestEvent) => void): this; - once(event: 'sniff', listener: (err: ApiError, meta: RequestEvent) => void): this; - once(event: 'resurrect', listener: (err: null, meta: ResurrectEvent) => void): this; - off(event: string | symbol, listener: (...args: any[]) => void): this; - bulk(params: T.BulkRequest, options?: TransportRequestOptions): TransportRequestPromise> - cat: { - aliases(params?: T.CatAliasesRequest, options?: TransportRequestOptions): TransportRequestPromise> - allocation(params?: T.CatAllocationRequest, options?: TransportRequestOptions): TransportRequestPromise> - cluster_manager(params?: T.CatClusterManagerRequest, options?: TransportRequestOptions): TransportRequestPromise> - count(params?: T.CatCountRequest, options?: TransportRequestOptions): TransportRequestPromise> - fielddata(params?: T.CatFielddataRequest, options?: TransportRequestOptions): TransportRequestPromise> - health(params?: T.CatHealthRequest, options?: TransportRequestOptions): TransportRequestPromise> - help(params?: T.CatHelpRequest, options?: TransportRequestOptions): TransportRequestPromise> - indices(params?: T.CatIndicesRequest, options?: TransportRequestOptions): TransportRequestPromise> - /** - * // TODO: delete cat.master when it is removed from OpenSearch - * @deprecated use cat.cluster_manager instead - */ - master(params?: T.CatMasterRequest, options?: TransportRequestOptions): TransportRequestPromise> - nodeattrs(params?: T.CatNodeAttributesRequest, options?: TransportRequestOptions): TransportRequestPromise> - nodes(params?: T.CatNodesRequest, options?: TransportRequestOptions): TransportRequestPromise> - pendingTasks(params?: T.CatPendingTasksRequest, options?: TransportRequestOptions): TransportRequestPromise> - plugins(params?: T.CatPluginsRequest, options?: TransportRequestOptions): TransportRequestPromise> - recovery(params?: T.CatRecoveryRequest, options?: TransportRequestOptions): TransportRequestPromise> - repositories(params?: T.CatRepositoriesRequest, options?: TransportRequestOptions): TransportRequestPromise> - segments(params?: T.CatSegmentsRequest, options?: TransportRequestOptions): TransportRequestPromise> - shards(params?: T.CatShardsRequest, options?: TransportRequestOptions): TransportRequestPromise> - snapshots(params?: T.CatSnapshotsRequest, options?: TransportRequestOptions): TransportRequestPromise> - tasks(params?: T.CatTasksRequest, options?: TransportRequestOptions): TransportRequestPromise> - templates(params?: T.CatTemplatesRequest, options?: TransportRequestOptions): TransportRequestPromise> - threadPool(params?: T.CatThreadPoolRequest, options?: TransportRequestOptions): TransportRequestPromise> - } - clearScroll(params?: T.ClearScrollRequest, options?: TransportRequestOptions): TransportRequestPromise> - cluster: { - allocationExplain(params?: T.ClusterAllocationExplainRequest, options?: TransportRequestOptions): TransportRequestPromise> - deleteComponentTemplate(params: T.ClusterDeleteComponentTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise> - deleteVotingConfigExclusions(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise> - existsComponentTemplate(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise> - getComponentTemplate(params?: T.ClusterGetComponentTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise> - getSettings(params?: T.ClusterGetSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise> - health(params?: T.ClusterHealthRequest, options?: TransportRequestOptions): TransportRequestPromise> - pendingTasks(params?: T.ClusterPendingTasksRequest, options?: TransportRequestOptions): TransportRequestPromise> - postVotingConfigExclusions(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise> - putComponentTemplate(params: T.ClusterPutComponentTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise> - putSettings(params?: T.ClusterPutSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise> - remoteInfo(params?: T.ClusterRemoteInfoRequest, options?: TransportRequestOptions): TransportRequestPromise> - reroute(params?: T.ClusterRerouteRequest, options?: TransportRequestOptions): TransportRequestPromise> - state(params?: T.ClusterStateRequest, options?: TransportRequestOptions): TransportRequestPromise> - stats(params?: T.ClusterStatsRequest, options?: TransportRequestOptions): TransportRequestPromise> - } - count(params?: T.CountRequest, options?: TransportRequestOptions): TransportRequestPromise> - create(params: T.CreateRequest, options?: TransportRequestOptions): TransportRequestPromise> - createPit(params?: T.PointInTimeCreateRequest, options?: TransportRequestOptions): TransportRequestPromise> - danglingIndices: { - deleteDanglingIndex(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise> - importDanglingIndex(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise> - listDanglingIndices(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise> - } - delete(params: T.DeleteRequest, options?: TransportRequestOptions): TransportRequestPromise> - deleteAllPits(params: T.PointInTimeDeleteAllRequest, options?: TransportRequestOptions): TransportRequestPromise> - deleteByQuery(params: T.DeleteByQueryRequest, options?: TransportRequestOptions): TransportRequestPromise> - deleteByQueryRethrottle(params: T.DeleteByQueryRethrottleRequest, options?: TransportRequestOptions): TransportRequestPromise> - deletePit(params: T.PointInTimeDeleteRequest, options?: TransportRequestOptions): TransportRequestPromise> - deleteScript(params: T.DeleteScriptRequest, options?: TransportRequestOptions): TransportRequestPromise> - exists(params: T.ExistsRequest, options?: TransportRequestOptions): TransportRequestPromise> - existsSource(params: T.ExistsSourceRequest, options?: TransportRequestOptions): TransportRequestPromise> - explain(params: T.ExplainRequest, options?: TransportRequestOptions): TransportRequestPromise, TContext>> - features: { - getFeatures(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise> - resetFeatures(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise> - } - fieldCaps(params?: T.FieldCapsRequest, options?: TransportRequestOptions): TransportRequestPromise> - get(params: T.GetRequest, options?: TransportRequestOptions): TransportRequestPromise, TContext>> - getAllPits(params: T.PointInTimeGetAllRequest, options?: TransportRequestOptions): TransportRequestPromise> - getScript(params: T.GetScriptRequest, options?: TransportRequestOptions): TransportRequestPromise> - getScriptContext(params?: T.GetScriptContextRequest, options?: TransportRequestOptions): TransportRequestPromise> - getScriptLanguages(params?: T.GetScriptLanguagesRequest, options?: TransportRequestOptions): TransportRequestPromise> - getSource(params?: T.GetSourceRequest, options?: TransportRequestOptions): TransportRequestPromise, TContext>> - index(params: T.IndexRequest, options?: TransportRequestOptions): TransportRequestPromise> - indices: { - addBlock(params: T.IndicesAddBlockRequest, options?: TransportRequestOptions): TransportRequestPromise> - analyze(params?: T.IndicesAnalyzeRequest, options?: TransportRequestOptions): TransportRequestPromise> - clearCache(params?: T.IndicesClearCacheRequest, options?: TransportRequestOptions): TransportRequestPromise> - clone(params: T.IndicesCloneRequest, options?: TransportRequestOptions): TransportRequestPromise> - close(params: T.IndicesCloseRequest, options?: TransportRequestOptions): TransportRequestPromise> - create(params: T.IndicesCreateRequest, options?: TransportRequestOptions): TransportRequestPromise> - delete(params: T.IndicesDeleteRequest, options?: TransportRequestOptions): TransportRequestPromise> - deleteAlias(params: T.IndicesDeleteAliasRequest, options?: TransportRequestOptions): TransportRequestPromise> - deleteIndexTemplate(params: T.IndicesDeleteIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise> - deleteTemplate(params: T.IndicesDeleteTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise> - diskUsage(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise> - exists(params: T.IndicesExistsRequest, options?: TransportRequestOptions): TransportRequestPromise> - existsAlias(params: T.IndicesExistsAliasRequest, options?: TransportRequestOptions): TransportRequestPromise> - existsIndexTemplate(params: T.IndicesExistsIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise> - existsTemplate(params: T.IndicesExistsTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise> - fieldUsageStats(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise> - flush(params?: T.IndicesFlushRequest, options?: TransportRequestOptions): TransportRequestPromise> - forcemerge(params?: T.IndicesForcemergeRequest, options?: TransportRequestOptions): TransportRequestPromise> - get(params: T.IndicesGetRequest, options?: TransportRequestOptions): TransportRequestPromise> - getAlias(params?: T.IndicesGetAliasRequest, options?: TransportRequestOptions): TransportRequestPromise> - getFieldMapping(params: T.IndicesGetFieldMappingRequest, options?: TransportRequestOptions): TransportRequestPromise> - getIndexTemplate(params?: T.IndicesGetIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise> - getMapping(params?: T.IndicesGetMappingRequest, options?: TransportRequestOptions): TransportRequestPromise> - getSettings(params?: T.IndicesGetSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise> - getTemplate(params?: T.IndicesGetTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise> - getUpgrade(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise> - open(params: T.IndicesOpenRequest, options?: TransportRequestOptions): TransportRequestPromise> - putAlias(params: T.IndicesPutAliasRequest, options?: TransportRequestOptions): TransportRequestPromise> - putIndexTemplate(params: T.IndicesPutIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise> - putMapping(params?: T.IndicesPutMappingRequest, options?: TransportRequestOptions): TransportRequestPromise> - putSettings(params?: T.IndicesPutSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise> - putTemplate(params: T.IndicesPutTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise> - recovery(params?: T.IndicesRecoveryRequest, options?: TransportRequestOptions): TransportRequestPromise> - refresh(params?: T.IndicesRefreshRequest, options?: TransportRequestOptions): TransportRequestPromise> - resolveIndex(params: T.IndicesResolveIndexRequest, options?: TransportRequestOptions): TransportRequestPromise> - rollover(params: T.IndicesRolloverRequest, options?: TransportRequestOptions): TransportRequestPromise> - segments(params?: T.IndicesSegmentsRequest, options?: TransportRequestOptions): TransportRequestPromise> - shardStores(params?: T.IndicesShardStoresRequest, options?: TransportRequestOptions): TransportRequestPromise> - shrink(params: T.IndicesShrinkRequest, options?: TransportRequestOptions): TransportRequestPromise> - simulateIndexTemplate(params?: T.IndicesSimulateIndexTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise> - simulateTemplate(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise> - split(params: T.IndicesSplitRequest, options?: TransportRequestOptions): TransportRequestPromise> - stats(params?: T.IndicesStatsRequest, options?: TransportRequestOptions): TransportRequestPromise> - updateAliases(params?: T.IndicesUpdateAliasesRequest, options?: TransportRequestOptions): TransportRequestPromise> - upgrade(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise> - validateQuery(params?: T.IndicesValidateQueryRequest, options?: TransportRequestOptions): TransportRequestPromise> - } - info(params?: T.InfoRequest, options?: TransportRequestOptions): TransportRequestPromise> - ingest: { - deletePipeline(params: T.IngestDeletePipelineRequest, options?: TransportRequestOptions): TransportRequestPromise> - geoIpStats(params?: T.IngestGeoIpStatsRequest, options?: TransportRequestOptions): TransportRequestPromise> - getPipeline(params?: T.IngestGetPipelineRequest, options?: TransportRequestOptions): TransportRequestPromise> - processorGrok(params?: T.IngestProcessorGrokRequest, options?: TransportRequestOptions): TransportRequestPromise> - putPipeline(params: T.IngestPutPipelineRequest, options?: TransportRequestOptions): TransportRequestPromise> - simulate(params?: T.IngestSimulatePipelineRequest, options?: TransportRequestOptions): TransportRequestPromise> - } - mget(params?: T.MgetRequest, options?: TransportRequestOptions): TransportRequestPromise, TContext>> - msearch(params?: T.MsearchRequest, options?: TransportRequestOptions): TransportRequestPromise, TContext>> - msearchTemplate(params?: T.MsearchTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise, TContext>> - mtermvectors(params?: T.MtermvectorsRequest, options?: TransportRequestOptions): TransportRequestPromise> - nodes: { - clearMeteringArchive(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise> - getMeteringInfo(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise> - hotThreads(params?: T.NodesHotThreadsRequest, options?: TransportRequestOptions): TransportRequestPromise> - info(params?: T.NodesInfoRequest, options?: TransportRequestOptions): TransportRequestPromise> - reloadSecureSettings(params?: T.NodesReloadSecureSettingsRequest, options?: TransportRequestOptions): TransportRequestPromise> - stats(params?: T.NodesStatsRequest, options?: TransportRequestOptions): TransportRequestPromise> - usage(params?: T.NodesUsageRequest, options?: TransportRequestOptions): TransportRequestPromise> - } - ping(params?: T.PingRequest, options?: TransportRequestOptions): TransportRequestPromise> - putScript(params: T.PutScriptRequest, options?: TransportRequestOptions): TransportRequestPromise> - rankEval(params: T.RankEvalRequest, options?: TransportRequestOptions): TransportRequestPromise> - reindex(params?: T.ReindexRequest, options?: TransportRequestOptions): TransportRequestPromise> - reindexRethrottle(params: T.ReindexRethrottleRequest, options?: TransportRequestOptions): TransportRequestPromise> - renderSearchTemplate(params?: T.RenderSearchTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise> - scriptsPainlessExecute(params?: T.ScriptsPainlessExecuteRequest, options?: TransportRequestOptions): TransportRequestPromise, TContext>> - scroll(params?: T.ScrollRequest, options?: TransportRequestOptions): TransportRequestPromise, TContext>> - search(params?: T.SearchRequest, options?: TransportRequestOptions): TransportRequestPromise, TContext>> - searchShards(params?: T.SearchShardsRequest, options?: TransportRequestOptions): TransportRequestPromise> - searchTemplate(params?: T.SearchTemplateRequest, options?: TransportRequestOptions): TransportRequestPromise, TContext>> - shutdown: { - deleteNode(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise> - getNode(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise> - putNode(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise> - } - snapshot: { - cleanupRepository(params: T.SnapshotCleanupRepositoryRequest, options?: TransportRequestOptions): TransportRequestPromise> - clone(params: T.SnapshotCloneRequest, options?: TransportRequestOptions): TransportRequestPromise> - create(params: T.SnapshotCreateRequest, options?: TransportRequestOptions): TransportRequestPromise> - createRepository(params: T.SnapshotCreateRepositoryRequest, options?: TransportRequestOptions): TransportRequestPromise> - delete(params: T.SnapshotDeleteRequest, options?: TransportRequestOptions): TransportRequestPromise> - deleteRepository(params: T.SnapshotDeleteRepositoryRequest, options?: TransportRequestOptions): TransportRequestPromise> - get(params: T.SnapshotGetRequest, options?: TransportRequestOptions): TransportRequestPromise> - getRepository(params?: T.SnapshotGetRepositoryRequest, options?: TransportRequestOptions): TransportRequestPromise> - repositoryAnalyze(params?: TODO, options?: TransportRequestOptions): TransportRequestPromise> - restore(params: T.SnapshotRestoreRequest, options?: TransportRequestOptions): TransportRequestPromise> - status(params?: T.SnapshotStatusRequest, options?: TransportRequestOptions): TransportRequestPromise> - verifyRepository(params: T.SnapshotVerifyRepositoryRequest, options?: TransportRequestOptions): TransportRequestPromise> - } - tasks: { - cancel(params?: T.TaskCancelRequest, options?: TransportRequestOptions): TransportRequestPromise> - get(params: T.TaskGetRequest, options?: TransportRequestOptions): TransportRequestPromise> - list(params?: T.TaskListRequest, options?: TransportRequestOptions): TransportRequestPromise> - } - termsEnum(params: T.TermsEnumRequest, options?: TransportRequestOptions): TransportRequestPromise> - termvectors(params: T.TermvectorsRequest, options?: TransportRequestOptions): TransportRequestPromise> - update(params: T.UpdateRequest, options?: TransportRequestOptions): TransportRequestPromise, TContext>> - updateByQuery(params: T.UpdateByQueryRequest, options?: TransportRequestOptions): TransportRequestPromise> - updateByQueryRethrottle(params: T.UpdateByQueryRethrottleRequest, options?: TransportRequestOptions): TransportRequestPromise> -} - -export { OpenSearchDashboardsClient } diff --git a/api/ppl/_api.js b/api/ppl/_api.js new file mode 100644 index 000000000..51bfbb919 --- /dev/null +++ b/api/ppl/_api.js @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Ppl */ + +function PplApi(bindObj) { + this.explain = require('./explain').bind(bindObj); + this.getStats = require('./getStats').bind(bindObj); + this.postStats = require('./postStats').bind(bindObj); + this.query = require('./query').bind(bindObj); + + // Deprecated: Use getStats instead. + this.get_stats = require('./getStats').bind(bindObj); + // Deprecated: Use postStats instead. + this.post_stats = require('./postStats').bind(bindObj); +} + +module.exports = PplApi; diff --git a/api/ppl/explain.d.ts b/api/ppl/explain.d.ts new file mode 100644 index 000000000..a2a154a15 --- /dev/null +++ b/api/ppl/explain.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Sql_Common from '../_types/sql._common' + +export interface Ppl_Explain_Request extends Global.Params { + body: Sql_Common.Explain; + format?: string; + sanitize?: boolean; +} + +export interface Ppl_Explain_Response extends ApiResponse { + body: Ppl_Explain_ResponseBody; +} + +export type Ppl_Explain_ResponseBody = Sql_Common.ExplainResponse + diff --git a/api/ppl/explain.js b/api/ppl/explain.js new file mode 100644 index 000000000..6989ecce6 --- /dev/null +++ b/api/ppl/explain.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Shows how a query is executed against OpenSearch. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ - ppl.explain} + * + * @memberOf API-Ppl + * + * @param {object} params + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {boolean} [params.sanitize=true] - Specifies whether to escape special characters in the results. + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function explainFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_ppl/_explain'; + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = explainFunc; diff --git a/api/ppl/getStats.d.ts b/api/ppl/getStats.d.ts new file mode 100644 index 000000000..9350ec798 --- /dev/null +++ b/api/ppl/getStats.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface Ppl_GetStats_Request extends Global.Params { + format?: string; + sanitize?: boolean; +} + +export interface Ppl_GetStats_Response extends ApiResponse { + body: Ppl_GetStats_ResponseBody; +} + +export type Ppl_GetStats_ResponseBody = Record + diff --git a/api/ppl/getStats.js b/api/ppl/getStats.js new file mode 100644 index 000000000..5e2cab34b --- /dev/null +++ b/api/ppl/getStats.js @@ -0,0 +1,48 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Collect metrics for the plugin within the interval. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ - ppl.get_stats} + * + * @memberOf API-Ppl + * + * @param {object} [params] + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {boolean} [params.sanitize=true] - Specifies whether to escape special characters in the results. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getStatsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_ppl/stats'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getStatsFunc; diff --git a/api/ppl/postStats.d.ts b/api/ppl/postStats.d.ts new file mode 100644 index 000000000..04abd91cf --- /dev/null +++ b/api/ppl/postStats.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Sql_Common from '../_types/sql._common' + +export interface Ppl_PostStats_Request extends Global.Params { + body: Sql_Common.Stats; + format?: string; + sanitize?: boolean; +} + +export interface Ppl_PostStats_Response extends ApiResponse { + body: Ppl_PostStats_ResponseBody; +} + +export type Ppl_PostStats_ResponseBody = Record + diff --git a/api/ppl/postStats.js b/api/ppl/postStats.js new file mode 100644 index 000000000..2d769d3c2 --- /dev/null +++ b/api/ppl/postStats.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * By a stats endpoint, you are able to collect metrics for the plugin within the interval. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ - ppl.post_stats} + * + * @memberOf API-Ppl + * + * @param {object} params + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {boolean} [params.sanitize=true] - Specifies whether to escape special characters in the results. + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function postStatsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_ppl/stats'; + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = postStatsFunc; diff --git a/api/ppl/query.d.ts b/api/ppl/query.d.ts new file mode 100644 index 000000000..db4c86e8c --- /dev/null +++ b/api/ppl/query.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Sql_Common from '../_types/sql._common' + +export interface Ppl_Query_Request extends Global.Params { + body: Sql_Common.Query; + format?: string; + sanitize?: boolean; +} + +export interface Ppl_Query_Response extends ApiResponse { + body: Ppl_Query_ResponseBody; +} + +export type Ppl_Query_ResponseBody = Sql_Common.QueryResponse + diff --git a/api/ppl/query.js b/api/ppl/query.js new file mode 100644 index 000000000..749e90e2c --- /dev/null +++ b/api/ppl/query.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Send a PPL query to the PPL plugin. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ - ppl.query} + * + * @memberOf API-Ppl + * + * @param {object} params + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {boolean} [params.sanitize=true] - Specifies whether to escape special characters in the results. + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function queryFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_ppl'; + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = queryFunc; diff --git a/api/remoteStore/_api.js b/api/remoteStore/_api.js new file mode 100644 index 000000000..26f1d6a84 --- /dev/null +++ b/api/remoteStore/_api.js @@ -0,0 +1,26 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Remote-Store */ + +function RemotestoreApi(bindObj) { + this.restore = require('./restore').bind(bindObj); + +} + +module.exports = RemotestoreApi; diff --git a/api/remoteStore/restore.d.ts b/api/remoteStore/restore.d.ts new file mode 100644 index 000000000..c21d31f11 --- /dev/null +++ b/api/remoteStore/restore.d.ts @@ -0,0 +1,40 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as RemoteStore_Common from '../_types/remote_store._common' + +export interface RemoteStore_Restore_Request extends Global.Params { + body: RemoteStore_Restore_RequestBody; + cluster_manager_timeout?: Common.Duration; + wait_for_completion?: boolean; +} + +export interface RemoteStore_Restore_RequestBody { + indices: string[]; +} + +export interface RemoteStore_Restore_Response extends ApiResponse { + body: RemoteStore_Restore_ResponseBody; +} + +export interface RemoteStore_Restore_ResponseBody { + accepted?: boolean; + remote_store?: RemoteStore_Common.RemoteStoreRestoreInfo; +} + diff --git a/api/remoteStore/restore.js b/api/remoteStore/restore.js new file mode 100644 index 000000000..99b704c8d --- /dev/null +++ b/api/remoteStore/restore.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Restores from remote store. + *
See Also: {@link https://opensearch.org/docs/latest/opensearch/remote/#restoring-from-a-backup - remote_store.restore} + * + * @memberOf API-Remote-Store + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {boolean} [params.wait_for_completion=false] - Should this request wait until the operation has completed before returning. + * @param {object} params.body - Comma-separated list of index IDs + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function restoreFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_remotestore/_restore'; + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = restoreFunc; diff --git a/api/requestParams.d.ts b/api/requestParams.d.ts deleted file mode 100644 index 1be0ebe25..000000000 --- a/api/requestParams.d.ts +++ /dev/null @@ -1,1838 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -import { RequestBody, RequestNDBody } from '../lib/Transport'; - -export interface Generic { - method?: string; - filter_path?: string | string[]; - pretty?: boolean; - human?: boolean; - error_trace?: boolean; - source?: string; -} -export interface Bulk extends Generic { - index?: string; - _source_exclude?: string | string[]; - _source_include?: string | string[]; - wait_for_active_shards?: string; - refresh?: 'wait_for' | boolean; - routing?: string; - timeout?: string; - _source?: string | string[]; - _source_excludes?: string | string[]; - _source_includes?: string | string[]; - pipeline?: string; - require_alias?: boolean; - body: T; -} - -export interface CatAliases extends Generic { - name?: string | string[]; - format?: string; - local?: boolean; - h?: string | string[]; - help?: boolean; - s?: string | string[]; - v?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; -} - -export interface CatAllocation extends Generic { - node_id?: string | string[]; - format?: string; - bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb'; - local?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - h?: string | string[]; - help?: boolean; - s?: string | string[]; - v?: boolean; -} - -export interface CatCount extends Generic { - index?: string | string[]; - format?: string; - h?: string | string[]; - help?: boolean; - s?: string | string[]; - v?: boolean; -} - -export interface CatFielddata extends Generic { - fields?: string | string[]; - format?: string; - bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb'; - h?: string | string[]; - help?: boolean; - s?: string | string[]; - v?: boolean; -} - -export interface CatHealth extends Generic { - format?: string; - h?: string | string[]; - help?: boolean; - s?: string | string[]; - time?: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos'; - ts?: boolean; - v?: boolean; -} - -export interface CatHelp extends Generic { - help?: boolean; - s?: string | string[]; -} - -export interface CatIndices extends Generic { - index?: string | string[]; - format?: string; - bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb'; - local?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - h?: string | string[]; - health?: 'green' | 'yellow' | 'red'; - help?: boolean; - pri?: boolean; - s?: string | string[]; - time?: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos'; - v?: boolean; - include_unloaded_segments?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; -} - -export interface CatClusterManager extends Generic { - format?: string; - local?: boolean; - cluster_manager_timeout?: string; - h?: string | string[]; - help?: boolean; - s?: string | string[]; - v?: boolean; -} - -/** -* // TODO: delete CatMaster interface when it is removed from OpenSearch -* @deprecated use CatClusterManager instead -*/ -export interface CatMaster extends Generic { - format?: string; - local?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - h?: string | string[]; - help?: boolean; - s?: string | string[]; - v?: boolean; -} - -export interface CatNodeattrs extends Generic { - format?: string; - local?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - h?: string | string[]; - help?: boolean; - s?: string | string[]; - v?: boolean; -} - -export interface CatNodes extends Generic { - bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb'; - format?: string; - full_id?: boolean; - local?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - h?: string | string[]; - help?: boolean; - s?: string | string[]; - time?: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos'; - v?: boolean; - include_unloaded_segments?: boolean; -} - -export interface CatPendingTasks extends Generic { - format?: string; - local?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - h?: string | string[]; - help?: boolean; - s?: string | string[]; - time?: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos'; - v?: boolean; -} - -export interface CatPlugins extends Generic { - format?: string; - local?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - h?: string | string[]; - help?: boolean; - include_bootstrap?: boolean; - s?: string | string[]; - v?: boolean; -} - -export interface CatRecovery extends Generic { - index?: string | string[]; - format?: string; - active_only?: boolean; - bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb'; - detailed?: boolean; - h?: string | string[]; - help?: boolean; - s?: string | string[]; - time?: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos'; - v?: boolean; -} - -export interface CatRepositories extends Generic { - format?: string; - local?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - h?: string | string[]; - help?: boolean; - s?: string | string[]; - v?: boolean; -} - -export interface CatSegments extends Generic { - index?: string | string[]; - format?: string; - bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb'; - h?: string | string[]; - help?: boolean; - s?: string | string[]; - v?: boolean; -} - -export interface CatShards extends Generic { - index?: string | string[]; - format?: string; - bytes?: 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb'; - local?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - h?: string | string[]; - help?: boolean; - s?: string | string[]; - time?: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos'; - v?: boolean; -} - -export interface CatSnapshots extends Generic { - repository?: string | string[]; - format?: string; - ignore_unavailable?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - h?: string | string[]; - help?: boolean; - s?: string | string[]; - time?: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos'; - v?: boolean; -} - -export interface CatTasks extends Generic { - format?: string; - nodes?: string | string[]; - actions?: string | string[]; - detailed?: boolean; - parent_task_id?: string; - h?: string | string[]; - help?: boolean; - s?: string | string[]; - time?: 'd' | 'h' | 'm' | 's' | 'ms' | 'micros' | 'nanos'; - v?: boolean; -} - -export interface CatTemplates extends Generic { - name?: string; - format?: string; - local?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - h?: string | string[]; - help?: boolean; - s?: string | string[]; - v?: boolean; -} - -export interface CatThreadPool extends Generic { - thread_pool_patterns?: string | string[]; - format?: string; - size?: '' | 'k' | 'm' | 'g' | 't' | 'p'; - local?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - h?: string | string[]; - help?: boolean; - s?: string | string[]; - v?: boolean; -} - -export interface ClearScroll extends Generic { - scroll_id?: string | string[]; - body?: T; -} - -export interface ClusterAllocationExplain extends Generic { - include_yes_decisions?: boolean; - include_disk_info?: boolean; - body?: T; -} - -export interface ClusterDeleteComponentTemplate extends Generic { - name: string; - timeout?: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; -} - -export interface ClusterDeleteVotingConfigExclusions extends Generic { - wait_for_removal?: boolean; -} - -export interface ClusterExistsComponentTemplate extends Generic { - name: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - local?: boolean; -} - -export interface ClusterGetComponentTemplate extends Generic { - name?: string | string[]; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - local?: boolean; -} - -export interface ClusterGetSettings extends Generic { - flat_settings?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - timeout?: string; - include_defaults?: boolean; -} - -export interface ClusterHealth extends Generic { - index?: string | string[]; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - level?: 'cluster' | 'indices' | 'shards'; - local?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - timeout?: string; - wait_for_active_shards?: string; - wait_for_nodes?: string; - wait_for_events?: 'immediate' | 'urgent' | 'high' | 'normal' | 'low' | 'languid'; - wait_for_no_relocating_shards?: boolean; - wait_for_no_initializing_shards?: boolean; - wait_for_status?: 'green' | 'yellow' | 'red'; -} - -export interface ClusterPendingTasks extends Generic { - local?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; -} - -export interface ClusterPostVotingConfigExclusions extends Generic { - node_ids?: string; - node_names?: string; - timeout?: string; -} - -export interface ClusterPutComponentTemplate extends Generic { - name: string; - create?: boolean; - timeout?: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - body: T; -} - -export interface ClusterPutSettings extends Generic { - flat_settings?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - timeout?: string; - body: T; -} - -export interface ClusterRemoteInfo extends Generic { } - -export interface ClusterReroute extends Generic { - dry_run?: boolean; - explain?: boolean; - retry_failed?: boolean; - metric?: string | string[]; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - timeout?: string; - body?: T; -} - -export interface ClusterState extends Generic { - index?: string | string[]; - metric?: string | string[]; - local?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - flat_settings?: boolean; - wait_for_metadata_version?: number; - wait_for_timeout?: string; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; -} - -export interface ClusterStats extends Generic { - node_id?: string | string[]; - flat_settings?: boolean; - timeout?: string; -} - -export interface Count extends Generic { - index?: string | string[]; - ignore_unavailable?: boolean; - ignore_throttled?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - min_score?: number; - preference?: string; - routing?: string | string[]; - q?: string; - analyzer?: string; - analyze_wildcard?: boolean; - default_operator?: 'AND' | 'OR'; - df?: string; - lenient?: boolean; - terminate_after?: number; - body?: T; -} - -export interface Create extends Generic { - id: string; - index: string; - wait_for_active_shards?: string; - refresh?: 'wait_for' | boolean; - routing?: string; - timeout?: string; - version?: number; - version_type?: 'internal' | 'external' | 'external_gte'; - pipeline?: string; - body: T; -} - -export interface CreatePit extends Generic { - index: string | string[]; - allow_partial_pit_creation?: boolean; - keep_alive: string; - preference?: string; - routing?: string | string[]; -} - -export interface DanglingIndicesDeleteDanglingIndex extends Generic { - index_uuid: string; - accept_data_loss?: boolean; - timeout?: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; -} - -export interface DanglingIndicesImportDanglingIndex extends Generic { - index_uuid: string; - accept_data_loss?: boolean; - timeout?: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; -} - -export interface DanglingIndicesListDanglingIndices extends Generic { } - -export interface Delete extends Generic { - id: string; - index: string; - wait_for_active_shards?: string; - refresh?: 'wait_for' | boolean; - routing?: string; - timeout?: string; - if_seq_no?: number; - if_primary_term?: number; - version?: number; - version_type?: 'internal' | 'external' | 'external_gte' | 'force'; -} - -export interface DeleteAllPits extends Generic { } - -export interface DeleteByQuery extends Generic { - index: string | string[]; - _source_exclude?: string | string[]; - _source_include?: string | string[]; - analyzer?: string; - analyze_wildcard?: boolean; - default_operator?: 'AND' | 'OR'; - df?: string; - from?: number; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - conflicts?: 'abort' | 'proceed'; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - lenient?: boolean; - preference?: string; - q?: string; - routing?: string | string[]; - scroll?: string; - search_type?: 'query_then_fetch' | 'dfs_query_then_fetch'; - search_timeout?: string; - size?: number; - max_docs?: number; - sort?: string | string[]; - _source?: string | string[]; - _source_excludes?: string | string[]; - _source_includes?: string | string[]; - terminate_after?: number; - stats?: string | string[]; - version?: boolean; - request_cache?: boolean; - refresh?: boolean; - timeout?: string; - wait_for_active_shards?: string; - scroll_size?: number; - wait_for_completion?: boolean; - requests_per_second?: number; - slices?: number | string; - body: T; -} - -export interface DeleteByQueryRethrottle extends Generic { - task_id: string; - requests_per_second: number; -} - -export interface DeletePit extends Generic { - body: T; -} - -export interface DeleteScript extends Generic { - id: string; - timeout?: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; -} - -export interface Exists extends Generic { - id: string; - index: string; - _source_exclude?: string | string[]; - _source_include?: string | string[]; - stored_fields?: string | string[]; - preference?: string; - realtime?: boolean; - refresh?: boolean; - routing?: string; - _source?: string | string[]; - _source_excludes?: string | string[]; - _source_includes?: string | string[]; - version?: number; - version_type?: 'internal' | 'external' | 'external_gte' | 'force'; -} - -export interface ExistsSource extends Generic { - id: string; - index: string; - _source_exclude?: string | string[]; - _source_include?: string | string[]; - preference?: string; - realtime?: boolean; - refresh?: boolean; - routing?: string; - _source?: string | string[]; - _source_excludes?: string | string[]; - _source_includes?: string | string[]; - version?: number; - version_type?: 'internal' | 'external' | 'external_gte' | 'force'; -} - -export interface Explain extends Generic { - id: string; - index: string; - _source_exclude?: string | string[]; - _source_include?: string | string[]; - analyze_wildcard?: boolean; - analyzer?: string; - default_operator?: 'AND' | 'OR'; - df?: string; - stored_fields?: string | string[]; - lenient?: boolean; - preference?: string; - q?: string; - routing?: string; - _source?: string | string[]; - _source_excludes?: string | string[]; - _source_includes?: string | string[]; - body?: T; -} - -export interface FeaturesGetFeatures extends Generic { - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; -} - -export interface FeaturesResetFeatures extends Generic { } - -export interface FieldCaps extends Generic { - index?: string | string[]; - fields?: string | string[]; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - include_unmapped?: boolean; - body?: T; -} - -export interface Get extends Generic { - id: string; - index: string; - _source_exclude?: string | string[]; - _source_include?: string | string[]; - stored_fields?: string | string[]; - preference?: string; - realtime?: boolean; - refresh?: boolean; - routing?: string; - _source?: string | string[]; - _source_excludes?: string | string[]; - _source_includes?: string | string[]; - version?: number; - version_type?: 'internal' | 'external' | 'external_gte' | 'force'; -} - -export interface GetAllPits extends Generic { } - -export interface GetScript extends Generic { - id: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; -} - -export interface GetScriptContext extends Generic { } - -export interface GetScriptLanguages extends Generic { } - -export interface GetSource extends Generic { - id: string; - index: string; - _source_exclude?: string | string[]; - _source_include?: string | string[]; - preference?: string; - realtime?: boolean; - refresh?: boolean; - routing?: string; - _source?: string | string[]; - _source_excludes?: string | string[]; - _source_includes?: string | string[]; - version?: number; - version_type?: 'internal' | 'external' | 'external_gte' | 'force'; -} - -export interface HttpParams extends Generic { - path: string; - querystring?: Record; - headers?: Record; - body?: Record | string | Array>; -} - -export interface Index extends Generic { - id?: string; - index: string; - wait_for_active_shards?: string; - op_type?: 'index' | 'create'; - refresh?: 'wait_for' | boolean; - routing?: string; - timeout?: string; - version?: number; - version_type?: 'internal' | 'external' | 'external_gte'; - if_seq_no?: number; - if_primary_term?: number; - pipeline?: string; - require_alias?: boolean; - body: T; -} - -export interface IndicesAddBlock extends Generic { - index: string | string[]; - block: string; - timeout?: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; -} - -export interface IndicesAnalyze extends Generic { - index?: string; - body?: T; -} - -export interface IndicesClearCache extends Generic { - index?: string | string[]; - fielddata?: boolean; - fields?: string | string[]; - query?: boolean; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - request?: boolean; -} - -export interface IndicesClone extends Generic { - index: string; - target: string; - timeout?: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - wait_for_active_shards?: string; - body?: T; -} - -export interface IndicesClose extends Generic { - index: string | string[]; - timeout?: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - wait_for_active_shards?: string; -} - -export interface IndicesCreate extends Generic { - index: string; - wait_for_active_shards?: string; - timeout?: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - body?: T; -} - -export interface IndicesDelete extends Generic { - index: string | string[]; - timeout?: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; -} - -export interface IndicesDeleteAlias extends Generic { - index: string | string[]; - name: string | string[]; - timeout?: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; -} - -export interface IndicesDeleteIndexTemplate extends Generic { - name: string; - timeout?: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; -} - -export interface IndicesDeleteTemplate extends Generic { - name: string; - timeout?: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; -} - -export interface IndicesDiskUsage extends Generic { - index: string; - run_expensive_tasks?: boolean; - flush?: boolean; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; -} - -export interface IndicesExists extends Generic { - index: string | string[]; - local?: boolean; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - flat_settings?: boolean; - include_defaults?: boolean; -} - -export interface IndicesExistsAlias extends Generic { - name: string | string[]; - index?: string | string[]; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - local?: boolean; -} - -export interface IndicesExistsIndexTemplate extends Generic { - name: string; - flat_settings?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - local?: boolean; -} - -export interface IndicesExistsTemplate extends Generic { - name: string | string[]; - flat_settings?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - local?: boolean; -} - -export interface IndicesFieldUsageStats extends Generic { - index: string; - fields?: string | string[]; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; -} - -export interface IndicesFlush extends Generic { - index?: string | string[]; - force?: boolean; - wait_if_ongoing?: boolean; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; -} - -export interface IndicesForcemerge extends Generic { - index?: string | string[]; - flush?: boolean; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - max_num_segments?: number; - only_expunge_deletes?: boolean; -} - -export interface IndicesGet extends Generic { - index: string | string[]; - local?: boolean; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - flat_settings?: boolean; - include_defaults?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; -} - -export interface IndicesGetAlias extends Generic { - name?: string | string[]; - index?: string | string[]; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - local?: boolean; -} - -export interface IndicesGetFieldMapping extends Generic { - fields: string | string[]; - index?: string | string[]; - include_defaults?: boolean; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - local?: boolean; -} - -export interface IndicesGetIndexTemplate extends Generic { - name?: string | string[]; - flat_settings?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - local?: boolean; -} - -export interface IndicesGetMapping extends Generic { - index?: string | string[]; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - local?: boolean; -} - -export interface IndicesGetSettings extends Generic { - index?: string | string[]; - name?: string | string[]; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - flat_settings?: boolean; - local?: boolean; - include_defaults?: boolean; -} - -export interface IndicesGetTemplate extends Generic { - name?: string | string[]; - flat_settings?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - local?: boolean; -} - -export interface IndicesGetUpgrade extends Generic { - index?: string | string[]; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; -} - -export interface IndicesOpen extends Generic { - index: string | string[]; - timeout?: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - wait_for_active_shards?: string; -} - -export interface IndicesPutAlias extends Generic { - index: string | string[]; - name: string; - timeout?: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - body?: T; -} - -export interface IndicesPutIndexTemplate extends Generic { - name: string; - create?: boolean; - cause?: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - body: T; -} - -export interface IndicesPutMapping extends Generic { - index?: string | string[]; - timeout?: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - write_index_only?: boolean; - body: T; -} - -export interface IndicesPutSettings extends Generic { - index?: string | string[]; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - timeout?: string; - preserve_existing?: boolean; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - flat_settings?: boolean; - body: T; -} - -export interface IndicesPutTemplate extends Generic { - name: string; - order?: number; - create?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - body: T; -} - -export interface IndicesRecovery extends Generic { - index?: string | string[]; - detailed?: boolean; - active_only?: boolean; -} - -export interface IndicesRefresh extends Generic { - index?: string | string[]; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; -} - -export interface IndicesResolveIndex extends Generic { - name: string | string[]; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; -} - -export interface IndicesRollover extends Generic { - alias: string; - new_index?: string; - timeout?: string; - dry_run?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - wait_for_active_shards?: string; - body?: T; -} - -export interface IndicesSegments extends Generic { - index?: string | string[]; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - verbose?: boolean; -} - -export interface IndicesShardStores extends Generic { - index?: string | string[]; - status?: string | string[]; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; -} - -export interface IndicesShrink extends Generic { - index: string; - target: string; - copy_settings?: boolean; - timeout?: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - wait_for_active_shards?: string; - body?: T; -} - -export interface IndicesSimulateIndexTemplate extends Generic { - name: string; - create?: boolean; - cause?: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - body?: T; -} - -export interface IndicesSimulateTemplate extends Generic { - name?: string; - create?: boolean; - cause?: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - body?: T; -} - -export interface IndicesSplit extends Generic { - index: string; - target: string; - copy_settings?: boolean; - timeout?: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - wait_for_active_shards?: string; - body?: T; -} - -export interface IndicesStats extends Generic { - metric?: string | string[]; - index?: string | string[]; - completion_fields?: string | string[]; - fielddata_fields?: string | string[]; - fields?: string | string[]; - groups?: string | string[]; - level?: 'cluster' | 'indices' | 'shards'; - types?: string | string[]; - include_segment_file_sizes?: boolean; - include_unloaded_segments?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - forbid_closed_indices?: boolean; -} - -export interface IndicesUpdateAliases extends Generic { - timeout?: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - body: T; -} - -export interface IndicesUpgrade extends Generic { - index?: string | string[]; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - ignore_unavailable?: boolean; - wait_for_completion?: boolean; - only_ancient_segments?: boolean; -} - -export interface IndicesValidateQuery extends Generic { - index?: string | string[]; - explain?: boolean; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - q?: string; - analyzer?: string; - analyze_wildcard?: boolean; - default_operator?: 'AND' | 'OR'; - df?: string; - lenient?: boolean; - rewrite?: boolean; - all_shards?: boolean; - body?: T; -} - -export interface Info extends Generic { } - -export interface IngestDeletePipeline extends Generic { - id: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - timeout?: string; -} - -export interface IngestGeoIpStats extends Generic { } - -export interface IngestGetPipeline extends Generic { - id?: string; - summary?: boolean; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; -} - -export interface IngestProcessorGrok extends Generic { } - -export interface IngestPutPipeline extends Generic { - id: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - timeout?: string; - body: T; -} - -export interface IngestSimulate extends Generic { - id?: string; - verbose?: boolean; - body: T; -} - -export interface Mget extends Generic { - index?: string; - _source_exclude?: string | string[]; - _source_include?: string | string[]; - stored_fields?: string | string[]; - preference?: string; - realtime?: boolean; - refresh?: boolean; - routing?: string; - _source?: string | string[]; - _source_excludes?: string | string[]; - _source_includes?: string | string[]; - body: T; -} - -export interface Msearch extends Generic { - index?: string | string[]; - search_type?: 'query_then_fetch' | 'dfs_query_then_fetch'; - max_concurrent_searches?: number; - typed_keys?: boolean; - pre_filter_shard_size?: number; - max_concurrent_shard_requests?: number; - rest_total_hits_as_int?: boolean; - ccs_minimize_roundtrips?: boolean; - body: T; -} - -export interface MsearchTemplate extends Generic { - index?: string | string[]; - search_type?: 'query_then_fetch' | 'dfs_query_then_fetch'; - typed_keys?: boolean; - max_concurrent_searches?: number; - rest_total_hits_as_int?: boolean; - ccs_minimize_roundtrips?: boolean; - body: T; -} - -export interface Mtermvectors extends Generic { - index?: string; - ids?: string | string[]; - term_statistics?: boolean; - field_statistics?: boolean; - fields?: string | string[]; - offsets?: boolean; - positions?: boolean; - payloads?: boolean; - preference?: string; - routing?: string; - realtime?: boolean; - version?: number; - version_type?: 'internal' | 'external' | 'external_gte' | 'force'; - body?: T; -} - -export interface NodesClearMeteringArchive extends Generic { - node_id: string | string[]; - max_archive_version: number; -} - -export interface NodesGetMeteringInfo extends Generic { - node_id: string | string[]; -} - -export interface NodesHotThreads extends Generic { - node_id?: string | string[]; - interval?: string; - snapshots?: number; - threads?: number; - ignore_idle_threads?: boolean; - type?: 'cpu' | 'wait' | 'block'; - timeout?: string; -} - -export interface NodesInfo extends Generic { - node_id?: string | string[]; - metric?: string | string[]; - flat_settings?: boolean; - timeout?: string; -} - -export interface NodesReloadSecureSettings extends Generic { - node_id?: string | string[]; - timeout?: string; - body?: T; -} - -export interface NodesStats extends Generic { - node_id?: string | string[]; - metric?: string | string[]; - index_metric?: string | string[]; - completion_fields?: string | string[]; - fielddata_fields?: string | string[]; - fields?: string | string[]; - groups?: boolean; - level?: 'indices' | 'node' | 'shards'; - types?: string | string[]; - timeout?: string; - include_segment_file_sizes?: boolean; - include_unloaded_segments?: boolean; -} - -export interface NodesUsage extends Generic { - node_id?: string | string[]; - metric?: string | string[]; - timeout?: string; -} - -export interface Ping extends Generic { } - -export interface PutScript extends Generic { - id: string; - context?: string; - timeout?: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - body: T; -} - -export interface RankEval extends Generic { - index?: string | string[]; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - search_type?: 'query_then_fetch' | 'dfs_query_then_fetch'; - body: T; -} - -export interface Reindex extends Generic { - refresh?: boolean; - timeout?: string; - wait_for_active_shards?: string; - wait_for_completion?: boolean; - requests_per_second?: number; - scroll?: string; - slices?: number | string; - max_docs?: number; - body: T; -} - -export interface ReindexRethrottle extends Generic { - task_id: string; - requests_per_second: number; -} - -export interface RenderSearchTemplate extends Generic { - id?: string; - body?: T; -} - -export interface ScriptsPainlessExecute extends Generic { - body?: T; -} - -export interface Scroll extends Generic { - scroll_id?: string; - scroll?: string; - rest_total_hits_as_int?: boolean; - body?: T; -} - -export interface Search extends Generic { - index?: string | string[]; - _source_exclude?: string | string[]; - _source_include?: string | string[]; - analyzer?: string; - analyze_wildcard?: boolean; - ccs_minimize_roundtrips?: boolean; - default_operator?: 'AND' | 'OR'; - df?: string; - explain?: boolean; - stored_fields?: string | string[]; - docvalue_fields?: string | string[]; - from?: number; - ignore_unavailable?: boolean; - ignore_throttled?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - lenient?: boolean; - preference?: string; - q?: string; - routing?: string | string[]; - scroll?: string; - search_pipeline?: string; - search_type?: 'query_then_fetch' | 'dfs_query_then_fetch'; - size?: number; - sort?: string | string[]; - _source?: string | string[]; - _source_excludes?: string | string[]; - _source_includes?: string | string[]; - terminate_after?: number; - stats?: string | string[]; - suggest_field?: string; - suggest_mode?: 'missing' | 'popular' | 'always'; - suggest_size?: number; - suggest_text?: string; - timeout?: string; - track_scores?: boolean; - track_total_hits?: boolean; - allow_partial_search_results?: boolean; - typed_keys?: boolean; - version?: boolean; - seq_no_primary_term?: boolean; - request_cache?: boolean; - batched_reduce_size?: number; - max_concurrent_shard_requests?: number; - pre_filter_shard_size?: number; - rest_total_hits_as_int?: boolean; - min_compatible_shard_node?: string; - body?: T; -} - -export interface SearchShards extends Generic { - index?: string | string[]; - preference?: string; - routing?: string; - local?: boolean; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; -} - -export interface SearchTemplate extends Generic { - index?: string | string[]; - ignore_unavailable?: boolean; - ignore_throttled?: boolean; - allow_no_indices?: boolean; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - preference?: string; - routing?: string | string[]; - scroll?: string; - search_type?: 'query_then_fetch' | 'dfs_query_then_fetch'; - explain?: boolean; - profile?: boolean; - typed_keys?: boolean; - rest_total_hits_as_int?: boolean; - ccs_minimize_roundtrips?: boolean; - body: T; -} - -export interface ShutdownDeleteNode extends Generic { - node_id: string; -} - -export interface ShutdownGetNode extends Generic { - node_id?: string; -} - -export interface ShutdownPutNode extends Generic { - node_id: string; - body: T; -} - -export interface SnapshotCleanupRepository extends Generic { - repository: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - timeout?: string; -} - -export interface SnapshotClone extends Generic { - repository: string; - snapshot: string; - target_snapshot: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - body: T; -} - -export interface SnapshotCreate extends Generic { - repository: string; - snapshot: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - wait_for_completion?: boolean; - body?: T; -} - -export interface SnapshotCreateRepository extends Generic { - repository: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - timeout?: string; - verify?: boolean; - body: T; -} - -export interface SnapshotDelete extends Generic { - repository: string; - snapshot: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; -} - -export interface SnapshotDeleteRepository extends Generic { - repository: string | string[]; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - timeout?: string; -} - -export interface SnapshotGet extends Generic { - repository: string; - snapshot: string | string[]; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - ignore_unavailable?: boolean; - index_details?: boolean; - include_repository?: boolean; - verbose?: boolean; -} - -export interface SnapshotGetRepository extends Generic { - repository?: string | string[]; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - local?: boolean; -} - -export interface SnapshotRepositoryAnalyze extends Generic { - repository: string; - blob_count?: number; - concurrency?: number; - read_node_count?: number; - early_read_node_count?: number; - seed?: number; - rare_action_probability?: number; - max_blob_size?: string; - max_total_data_size?: string; - timeout?: string; - detailed?: boolean; - rarely_abort_writes?: boolean; -} - -export interface SnapshotRestore extends Generic { - repository: string; - snapshot: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - wait_for_completion?: boolean; - body?: T; -} - -export interface SnapshotStatus extends Generic { - repository?: string; - snapshot?: string | string[]; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - ignore_unavailable?: boolean; -} - -export interface SnapshotVerifyRepository extends Generic { - repository: string; - cluster_manager_timeout?: string; - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: string; - timeout?: string; -} - -export interface TasksCancel extends Generic { - task_id?: string; - nodes?: string | string[]; - actions?: string | string[]; - parent_task_id?: string; - wait_for_completion?: boolean; -} - -export interface TasksGet extends Generic { - task_id: string; - wait_for_completion?: boolean; - timeout?: string; -} - -export interface TasksList extends Generic { - nodes?: string | string[]; - actions?: string | string[]; - detailed?: boolean; - parent_task_id?: string; - wait_for_completion?: boolean; - group_by?: 'nodes' | 'parents' | 'none'; - timeout?: string; -} - -export interface TermsEnum extends Generic { - index: string | string[]; - body?: T; -} - -export interface Termvectors extends Generic { - index: string; - id?: string; - term_statistics?: boolean; - field_statistics?: boolean; - fields?: string | string[]; - offsets?: boolean; - positions?: boolean; - payloads?: boolean; - preference?: string; - routing?: string; - realtime?: boolean; - version?: number; - version_type?: 'internal' | 'external' | 'external_gte' | 'force'; - body?: T; -} - -export interface Update extends Generic { - id: string; - index: string; - _source_exclude?: string | string[]; - _source_include?: string | string[]; - wait_for_active_shards?: string; - _source?: string | string[]; - _source_excludes?: string | string[]; - _source_includes?: string | string[]; - lang?: string; - refresh?: 'wait_for' | boolean; - retry_on_conflict?: number; - routing?: string; - timeout?: string; - if_seq_no?: number; - if_primary_term?: number; - require_alias?: boolean; - body: T; -} - -export interface UpdateByQuery extends Generic { - index: string | string[]; - _source_exclude?: string | string[]; - _source_include?: string | string[]; - analyzer?: string; - analyze_wildcard?: boolean; - default_operator?: 'AND' | 'OR'; - df?: string; - from?: number; - ignore_unavailable?: boolean; - allow_no_indices?: boolean; - conflicts?: 'abort' | 'proceed'; - expand_wildcards?: 'open' | 'closed' | 'hidden' | 'none' | 'all'; - lenient?: boolean; - pipeline?: string; - preference?: string; - q?: string; - routing?: string | string[]; - scroll?: string; - search_type?: 'query_then_fetch' | 'dfs_query_then_fetch'; - search_timeout?: string; - size?: number; - max_docs?: number; - sort?: string | string[]; - _source?: string | string[]; - _source_excludes?: string | string[]; - _source_includes?: string | string[]; - terminate_after?: number; - stats?: string | string[]; - version?: boolean; - version_type?: boolean; - request_cache?: boolean; - refresh?: boolean; - timeout?: string; - wait_for_active_shards?: string; - scroll_size?: number; - wait_for_completion?: boolean; - requests_per_second?: number; - slices?: number | string; - body?: T; -} - -export interface UpdateByQueryRethrottle extends Generic { - task_id: string; - requests_per_second: number; -} diff --git a/api/rollups/_api.js b/api/rollups/_api.js new file mode 100644 index 000000000..f6acd3dbb --- /dev/null +++ b/api/rollups/_api.js @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Rollups */ + +function RollupsApi(bindObj) { + this.delete = require('./delete').bind(bindObj); + this.explain = require('./explain').bind(bindObj); + this.get = require('./get').bind(bindObj); + this.put = require('./put').bind(bindObj); + this.start = require('./start').bind(bindObj); + this.stop = require('./stop').bind(bindObj); + +} + +module.exports = RollupsApi; diff --git a/api/rollups/delete.d.ts b/api/rollups/delete.d.ts new file mode 100644 index 000000000..0c269889b --- /dev/null +++ b/api/rollups/delete.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Rollups_Delete_Request extends Global.Params { + id: Common.Id; +} + +export interface Rollups_Delete_Response extends ApiResponse { + body: Rollups_Delete_ResponseBody; +} + +export type Rollups_Delete_ResponseBody = Record + diff --git a/api/rollups/delete.js b/api/rollups/delete.js new file mode 100644 index 000000000..9d464bea2 --- /dev/null +++ b/api/rollups/delete.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Delete index rollup. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#delete-an-index-rollup-job - rollups.delete} + * + * @memberOf API-Rollups + * + * @param {object} params + * @param {string} params.id - Rollup to access + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + + let { body, id, ...querystring } = params; + id = parsePathParam(id); + + const path = '/_plugins/_rollup/jobs/' + id; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteFunc; diff --git a/api/rollups/explain.d.ts b/api/rollups/explain.d.ts new file mode 100644 index 000000000..9bf3b0bd4 --- /dev/null +++ b/api/rollups/explain.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Rollups_Common from '../_types/rollups._common' + +export interface Rollups_Explain_Request extends Global.Params { + id: Common.Id; +} + +export interface Rollups_Explain_Response extends ApiResponse { + body: Rollups_Explain_ResponseBody; +} + +export type Rollups_Explain_ResponseBody = Rollups_Common.ExplainEntities + diff --git a/api/rollups/explain.js b/api/rollups/explain.js new file mode 100644 index 000000000..98e6355da --- /dev/null +++ b/api/rollups/explain.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Get a rollup's current status. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#explain-an-index-rollup-job - rollups.explain} + * + * @memberOf API-Rollups + * + * @param {object} params + * @param {string} params.id - Rollup to access + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function explainFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + + let { body, id, ...querystring } = params; + id = parsePathParam(id); + + const path = '/_plugins/_rollup/jobs/' + id + '/_explain'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = explainFunc; diff --git a/api/rollups/get.d.ts b/api/rollups/get.d.ts new file mode 100644 index 000000000..5f2d04c28 --- /dev/null +++ b/api/rollups/get.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Rollups_Common from '../_types/rollups._common' + +export interface Rollups_Get_Request extends Global.Params { + id: Common.Id; +} + +export interface Rollups_Get_Response extends ApiResponse { + body: Rollups_Get_ResponseBody; +} + +export type Rollups_Get_ResponseBody = Rollups_Common.RollupEntity + diff --git a/api/rollups/get.js b/api/rollups/get.js new file mode 100644 index 000000000..14cb34f0f --- /dev/null +++ b/api/rollups/get.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Get an index rollup. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#get-an-index-rollup-job - rollups.get} + * + * @memberOf API-Rollups + * + * @param {object} params + * @param {string} params.id - Rollup to access + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + + let { body, id, ...querystring } = params; + id = parsePathParam(id); + + const path = '/_plugins/_rollup/jobs/' + id; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getFunc; diff --git a/api/rollups/put.d.ts b/api/rollups/put.d.ts new file mode 100644 index 000000000..ce36bfe35 --- /dev/null +++ b/api/rollups/put.d.ts @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Rollups_Common from '../_types/rollups._common' +import * as Common from '../_types/_common' + +export interface Rollups_Put_Request extends Global.Params { + body?: Rollups_Common.RollupEntity; + id: Common.Id; + if_primary_term?: number; + if_seq_no?: Common.SequenceNumber; +} + +export interface Rollups_Put_Response extends ApiResponse { + body: Rollups_Put_ResponseBody; +} + +export type Rollups_Put_ResponseBody = Rollups_Common.RollupEntity + diff --git a/api/rollups/put.js b/api/rollups/put.js new file mode 100644 index 000000000..54cc262d1 --- /dev/null +++ b/api/rollups/put.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Create or update index rollup. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#create-or-update-an-index-rollup-job - rollups.put} + * + * @memberOf API-Rollups + * + * @param {object} params + * @param {number} [params.if_primary_term] - Only perform the operation if the document has this primary term. + * @param {number} [params.if_seq_no] - Only perform the operation if the document has this sequence number. + * @param {string} params.id - Rollup to access + * @param {object} [params.body] + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function putFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + + let { body, id, ...querystring } = params; + id = parsePathParam(id); + + const path = '/_plugins/_rollup/jobs/' + id; + const method = 'PUT'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = putFunc; diff --git a/api/rollups/start.d.ts b/api/rollups/start.d.ts new file mode 100644 index 000000000..417839699 --- /dev/null +++ b/api/rollups/start.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Rollups_Start_Request extends Global.Params { + id: Common.Id; +} + +export interface Rollups_Start_Response extends ApiResponse { + body: Rollups_Start_ResponseBody; +} + +export type Rollups_Start_ResponseBody = Record + diff --git a/api/rollups/start.js b/api/rollups/start.js new file mode 100644 index 000000000..0197add42 --- /dev/null +++ b/api/rollups/start.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Start rollup. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#start-or-stop-an-index-rollup-job - rollups.start} + * + * @memberOf API-Rollups + * + * @param {object} params + * @param {string} params.id - Rollup to access + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function startFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + + let { body, id, ...querystring } = params; + id = parsePathParam(id); + + const path = '/_plugins/_rollup/jobs/' + id + '/_start'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = startFunc; diff --git a/api/rollups/stop.d.ts b/api/rollups/stop.d.ts new file mode 100644 index 000000000..65bc3f935 --- /dev/null +++ b/api/rollups/stop.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Rollups_Stop_Request extends Global.Params { + id: Common.Id; +} + +export interface Rollups_Stop_Response extends ApiResponse { + body: Rollups_Stop_ResponseBody; +} + +export type Rollups_Stop_ResponseBody = Record + diff --git a/api/rollups/stop.js b/api/rollups/stop.js new file mode 100644 index 000000000..bd1eb9cc3 --- /dev/null +++ b/api/rollups/stop.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Stop rollup. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-rollups/rollup-api/#start-or-stop-an-index-rollup-job - rollups.stop} + * + * @memberOf API-Rollups + * + * @param {object} params + * @param {string} params.id - Rollup to access + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function stopFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + + let { body, id, ...querystring } = params; + id = parsePathParam(id); + + const path = '/_plugins/_rollup/jobs/' + id + '/_stop'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = stopFunc; diff --git a/api/searchPipeline/_api.js b/api/searchPipeline/_api.js new file mode 100644 index 000000000..0d82e02f2 --- /dev/null +++ b/api/searchPipeline/_api.js @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Search-Pipeline */ + +function SearchpipelineApi(bindObj) { + this.delete = require('./delete').bind(bindObj); + this.get = require('./get').bind(bindObj); + this.put = require('./put').bind(bindObj); + +} + +module.exports = SearchpipelineApi; diff --git a/api/searchPipeline/delete.d.ts b/api/searchPipeline/delete.d.ts new file mode 100644 index 000000000..cd1391575 --- /dev/null +++ b/api/searchPipeline/delete.d.ts @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface SearchPipeline_Delete_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + id: string; + timeout?: Common.Duration; +} + +export interface SearchPipeline_Delete_Response extends ApiResponse { + body: SearchPipeline_Delete_ResponseBody; +} + +export interface SearchPipeline_Delete_ResponseBody { + acknowledged?: boolean; +} + diff --git a/api/searchPipeline/delete.js b/api/searchPipeline/delete.js new file mode 100644 index 000000000..707b39a60 --- /dev/null +++ b/api/searchPipeline/delete.js @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Deletes the specified search pipeline. + *
See Also: {@link undefined - search_pipeline.delete} + * + * @memberOf API-Search-Pipeline + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.timeout] - Operation timeout. + * @param {string} params.id - Pipeline ID. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + + let { body, id, ...querystring } = params; + id = parsePathParam(id); + + const path = '/_search/pipeline/' + id; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteFunc; diff --git a/api/searchPipeline/get.d.ts b/api/searchPipeline/get.d.ts new file mode 100644 index 000000000..a280093c2 --- /dev/null +++ b/api/searchPipeline/get.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as SearchPipeline_Common from '../_types/search_pipeline._common' + +export interface SearchPipeline_Get_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + id?: string; +} + +export interface SearchPipeline_Get_Response extends ApiResponse { + body: SearchPipeline_Get_ResponseBody; +} + +export type SearchPipeline_Get_ResponseBody = SearchPipeline_Common.SearchPipelineMap + diff --git a/api/searchPipeline/get.js b/api/searchPipeline/get.js new file mode 100644 index 000000000..ba88f2924 --- /dev/null +++ b/api/searchPipeline/get.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Retrieves information about a specified search pipeline. + *
See Also: {@link undefined - search_pipeline.get} + * + * @memberOf API-Search-Pipeline + * + * @param {object} [params] + * @param {string} [params.cluster_manager_timeout] - operation timeout for connection to cluster-manager node. + * @param {string} [params.id] - Comma-separated list of search pipeline ids. Wildcards supported. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, id, ...querystring } = params; + id = parsePathParam(id); + + const path = ['/_search/pipeline/', id].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getFunc; diff --git a/api/searchPipeline/put.d.ts b/api/searchPipeline/put.d.ts new file mode 100644 index 000000000..384524f98 --- /dev/null +++ b/api/searchPipeline/put.d.ts @@ -0,0 +1,36 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as SearchPipeline_Common from '../_types/search_pipeline._common' +import * as Common from '../_types/_common' + +export interface SearchPipeline_Put_Request extends Global.Params { + body: SearchPipeline_Common.SearchPipelineStructure; + cluster_manager_timeout?: Common.Duration; + id: string; + timeout?: Common.Duration; +} + +export interface SearchPipeline_Put_Response extends ApiResponse { + body: SearchPipeline_Put_ResponseBody; +} + +export interface SearchPipeline_Put_ResponseBody { + acknowledged?: boolean; +} + diff --git a/api/searchPipeline/put.js b/api/searchPipeline/put.js new file mode 100644 index 000000000..b9712cd6a --- /dev/null +++ b/api/searchPipeline/put.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Creates or replaces the specified search pipeline. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/search-pipelines/creating-search-pipeline/ - search_pipeline.put} + * + * @memberOf API-Search-Pipeline + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - operation timeout for connection to cluster-manager node. + * @param {string} [params.timeout] - Operation timeout. + * @param {string} params.id - Pipeline ID. + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function putFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, id, ...querystring } = params; + id = parsePathParam(id); + + const path = '/_search/pipeline/' + id; + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = putFunc; diff --git a/api/security/_api.js b/api/security/_api.js new file mode 100644 index 000000000..118b12d7b --- /dev/null +++ b/api/security/_api.js @@ -0,0 +1,237 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Security */ + +function SecurityApi(bindObj) { + this.authinfo = require('./authinfo').bind(bindObj); + this.authtoken = require('./authtoken').bind(bindObj); + this.changePassword = require('./changePassword').bind(bindObj); + this.configUpgradeCheck = require('./configUpgradeCheck').bind(bindObj); + this.configUpgradePerform = require('./configUpgradePerform').bind(bindObj); + this.createActionGroup = require('./createActionGroup').bind(bindObj); + this.createAllowlist = require('./createAllowlist').bind(bindObj); + this.createRole = require('./createRole').bind(bindObj); + this.createRoleMapping = require('./createRoleMapping').bind(bindObj); + this.createTenant = require('./createTenant').bind(bindObj); + this.createUpdateTenancyConfig = require('./createUpdateTenancyConfig').bind(bindObj); + this.createUser = require('./createUser').bind(bindObj); + this.createUserLegacy = require('./createUserLegacy').bind(bindObj); + this.deleteActionGroup = require('./deleteActionGroup').bind(bindObj); + this.deleteDistinguishedName = require('./deleteDistinguishedName').bind(bindObj); + this.deleteRole = require('./deleteRole').bind(bindObj); + this.deleteRoleMapping = require('./deleteRoleMapping').bind(bindObj); + this.deleteTenant = require('./deleteTenant').bind(bindObj); + this.deleteUser = require('./deleteUser').bind(bindObj); + this.deleteUserLegacy = require('./deleteUserLegacy').bind(bindObj); + this.flushCache = require('./flushCache').bind(bindObj); + this.generateOboToken = require('./generateOboToken').bind(bindObj); + this.generateUserToken = require('./generateUserToken').bind(bindObj); + this.generateUserTokenLegacy = require('./generateUserTokenLegacy').bind(bindObj); + this.getAccountDetails = require('./getAccountDetails').bind(bindObj); + this.getActionGroup = require('./getActionGroup').bind(bindObj); + this.getActionGroups = require('./getActionGroups').bind(bindObj); + this.getAllowlist = require('./getAllowlist').bind(bindObj); + this.getAuditConfiguration = require('./getAuditConfiguration').bind(bindObj); + this.getCertificates = require('./getCertificates').bind(bindObj); + this.getConfiguration = require('./getConfiguration').bind(bindObj); + this.getDashboardsInfo = require('./getDashboardsInfo').bind(bindObj); + this.getDistinguishedName = require('./getDistinguishedName').bind(bindObj); + this.getDistinguishedNames = require('./getDistinguishedNames').bind(bindObj); + this.getPermissionsInfo = require('./getPermissionsInfo').bind(bindObj); + this.getRole = require('./getRole').bind(bindObj); + this.getRoleMapping = require('./getRoleMapping').bind(bindObj); + this.getRoleMappings = require('./getRoleMappings').bind(bindObj); + this.getRoles = require('./getRoles').bind(bindObj); + this.getSslinfo = require('./getSslinfo').bind(bindObj); + this.getTenancyConfig = require('./getTenancyConfig').bind(bindObj); + this.getTenant = require('./getTenant').bind(bindObj); + this.getTenants = require('./getTenants').bind(bindObj); + this.getUser = require('./getUser').bind(bindObj); + this.getUserLegacy = require('./getUserLegacy').bind(bindObj); + this.getUsers = require('./getUsers').bind(bindObj); + this.getUsersLegacy = require('./getUsersLegacy').bind(bindObj); + this.health = require('./health').bind(bindObj); + this.migrate = require('./migrate').bind(bindObj); + this.patchActionGroup = require('./patchActionGroup').bind(bindObj); + this.patchActionGroups = require('./patchActionGroups').bind(bindObj); + this.patchAllowlist = require('./patchAllowlist').bind(bindObj); + this.patchAuditConfiguration = require('./patchAuditConfiguration').bind(bindObj); + this.patchConfiguration = require('./patchConfiguration').bind(bindObj); + this.patchDistinguishedName = require('./patchDistinguishedName').bind(bindObj); + this.patchDistinguishedNames = require('./patchDistinguishedNames').bind(bindObj); + this.patchRole = require('./patchRole').bind(bindObj); + this.patchRoleMapping = require('./patchRoleMapping').bind(bindObj); + this.patchRoleMappings = require('./patchRoleMappings').bind(bindObj); + this.patchRoles = require('./patchRoles').bind(bindObj); + this.patchTenant = require('./patchTenant').bind(bindObj); + this.patchTenants = require('./patchTenants').bind(bindObj); + this.patchUser = require('./patchUser').bind(bindObj); + this.patchUsers = require('./patchUsers').bind(bindObj); + this.postDashboardsInfo = require('./postDashboardsInfo').bind(bindObj); + this.reloadHttpCertificates = require('./reloadHttpCertificates').bind(bindObj); + this.reloadTransportCertificates = require('./reloadTransportCertificates').bind(bindObj); + this.tenantInfo = require('./tenantInfo').bind(bindObj); + this.updateAuditConfiguration = require('./updateAuditConfiguration').bind(bindObj); + this.updateConfiguration = require('./updateConfiguration').bind(bindObj); + this.updateDistinguishedName = require('./updateDistinguishedName').bind(bindObj); + this.validate = require('./validate').bind(bindObj); + this.whoAmI = require('./whoAmI').bind(bindObj); + this.whoAmIProtected = require('./whoAmIProtected').bind(bindObj); + + // Deprecated: Use changePassword instead. + this.change_password = require('./changePassword').bind(bindObj); + // Deprecated: Use configUpgradeCheck instead. + this.config_upgrade_check = require('./configUpgradeCheck').bind(bindObj); + // Deprecated: Use configUpgradePerform instead. + this.config_upgrade_perform = require('./configUpgradePerform').bind(bindObj); + // Deprecated: Use createActionGroup instead. + this.create_action_group = require('./createActionGroup').bind(bindObj); + // Deprecated: Use createAllowlist instead. + this.create_allowlist = require('./createAllowlist').bind(bindObj); + // Deprecated: Use createRole instead. + this.create_role = require('./createRole').bind(bindObj); + // Deprecated: Use createRoleMapping instead. + this.create_role_mapping = require('./createRoleMapping').bind(bindObj); + // Deprecated: Use createTenant instead. + this.create_tenant = require('./createTenant').bind(bindObj); + // Deprecated: Use createUpdateTenancyConfig instead. + this.create_update_tenancy_config = require('./createUpdateTenancyConfig').bind(bindObj); + // Deprecated: Use createUser instead. + this.create_user = require('./createUser').bind(bindObj); + // Deprecated: Use createUserLegacy instead. + this.create_user_legacy = require('./createUserLegacy').bind(bindObj); + // Deprecated: Use deleteActionGroup instead. + this.delete_action_group = require('./deleteActionGroup').bind(bindObj); + // Deprecated: Use deleteDistinguishedName instead. + this.delete_distinguished_name = require('./deleteDistinguishedName').bind(bindObj); + // Deprecated: Use deleteRole instead. + this.delete_role = require('./deleteRole').bind(bindObj); + // Deprecated: Use deleteRoleMapping instead. + this.delete_role_mapping = require('./deleteRoleMapping').bind(bindObj); + // Deprecated: Use deleteTenant instead. + this.delete_tenant = require('./deleteTenant').bind(bindObj); + // Deprecated: Use deleteUser instead. + this.delete_user = require('./deleteUser').bind(bindObj); + // Deprecated: Use deleteUserLegacy instead. + this.delete_user_legacy = require('./deleteUserLegacy').bind(bindObj); + // Deprecated: Use flushCache instead. + this.flush_cache = require('./flushCache').bind(bindObj); + // Deprecated: Use generateOboToken instead. + this.generate_obo_token = require('./generateOboToken').bind(bindObj); + // Deprecated: Use generateUserToken instead. + this.generate_user_token = require('./generateUserToken').bind(bindObj); + // Deprecated: Use generateUserTokenLegacy instead. + this.generate_user_token_legacy = require('./generateUserTokenLegacy').bind(bindObj); + // Deprecated: Use getAccountDetails instead. + this.get_account_details = require('./getAccountDetails').bind(bindObj); + // Deprecated: Use getActionGroup instead. + this.get_action_group = require('./getActionGroup').bind(bindObj); + // Deprecated: Use getActionGroups instead. + this.get_action_groups = require('./getActionGroups').bind(bindObj); + // Deprecated: Use getAllowlist instead. + this.get_allowlist = require('./getAllowlist').bind(bindObj); + // Deprecated: Use getAuditConfiguration instead. + this.get_audit_configuration = require('./getAuditConfiguration').bind(bindObj); + // Deprecated: Use getCertificates instead. + this.get_certificates = require('./getCertificates').bind(bindObj); + // Deprecated: Use getConfiguration instead. + this.get_configuration = require('./getConfiguration').bind(bindObj); + // Deprecated: Use getDashboardsInfo instead. + this.get_dashboards_info = require('./getDashboardsInfo').bind(bindObj); + // Deprecated: Use getDistinguishedName instead. + this.get_distinguished_name = require('./getDistinguishedName').bind(bindObj); + // Deprecated: Use getDistinguishedNames instead. + this.get_distinguished_names = require('./getDistinguishedNames').bind(bindObj); + // Deprecated: Use getPermissionsInfo instead. + this.get_permissions_info = require('./getPermissionsInfo').bind(bindObj); + // Deprecated: Use getRole instead. + this.get_role = require('./getRole').bind(bindObj); + // Deprecated: Use getRoleMapping instead. + this.get_role_mapping = require('./getRoleMapping').bind(bindObj); + // Deprecated: Use getRoleMappings instead. + this.get_role_mappings = require('./getRoleMappings').bind(bindObj); + // Deprecated: Use getRoles instead. + this.get_roles = require('./getRoles').bind(bindObj); + // Deprecated: Use getSslinfo instead. + this.get_sslinfo = require('./getSslinfo').bind(bindObj); + // Deprecated: Use getTenancyConfig instead. + this.get_tenancy_config = require('./getTenancyConfig').bind(bindObj); + // Deprecated: Use getTenant instead. + this.get_tenant = require('./getTenant').bind(bindObj); + // Deprecated: Use getTenants instead. + this.get_tenants = require('./getTenants').bind(bindObj); + // Deprecated: Use getUser instead. + this.get_user = require('./getUser').bind(bindObj); + // Deprecated: Use getUserLegacy instead. + this.get_user_legacy = require('./getUserLegacy').bind(bindObj); + // Deprecated: Use getUsers instead. + this.get_users = require('./getUsers').bind(bindObj); + // Deprecated: Use getUsersLegacy instead. + this.get_users_legacy = require('./getUsersLegacy').bind(bindObj); + // Deprecated: Use patchActionGroup instead. + this.patch_action_group = require('./patchActionGroup').bind(bindObj); + // Deprecated: Use patchActionGroups instead. + this.patch_action_groups = require('./patchActionGroups').bind(bindObj); + // Deprecated: Use patchAllowlist instead. + this.patch_allowlist = require('./patchAllowlist').bind(bindObj); + // Deprecated: Use patchAuditConfiguration instead. + this.patch_audit_configuration = require('./patchAuditConfiguration').bind(bindObj); + // Deprecated: Use patchConfiguration instead. + this.patch_configuration = require('./patchConfiguration').bind(bindObj); + // Deprecated: Use patchDistinguishedName instead. + this.patch_distinguished_name = require('./patchDistinguishedName').bind(bindObj); + // Deprecated: Use patchDistinguishedNames instead. + this.patch_distinguished_names = require('./patchDistinguishedNames').bind(bindObj); + // Deprecated: Use patchRole instead. + this.patch_role = require('./patchRole').bind(bindObj); + // Deprecated: Use patchRoleMapping instead. + this.patch_role_mapping = require('./patchRoleMapping').bind(bindObj); + // Deprecated: Use patchRoleMappings instead. + this.patch_role_mappings = require('./patchRoleMappings').bind(bindObj); + // Deprecated: Use patchRoles instead. + this.patch_roles = require('./patchRoles').bind(bindObj); + // Deprecated: Use patchTenant instead. + this.patch_tenant = require('./patchTenant').bind(bindObj); + // Deprecated: Use patchTenants instead. + this.patch_tenants = require('./patchTenants').bind(bindObj); + // Deprecated: Use patchUser instead. + this.patch_user = require('./patchUser').bind(bindObj); + // Deprecated: Use patchUsers instead. + this.patch_users = require('./patchUsers').bind(bindObj); + // Deprecated: Use postDashboardsInfo instead. + this.post_dashboards_info = require('./postDashboardsInfo').bind(bindObj); + // Deprecated: Use reloadHttpCertificates instead. + this.reload_http_certificates = require('./reloadHttpCertificates').bind(bindObj); + // Deprecated: Use reloadTransportCertificates instead. + this.reload_transport_certificates = require('./reloadTransportCertificates').bind(bindObj); + // Deprecated: Use tenantInfo instead. + this.tenant_info = require('./tenantInfo').bind(bindObj); + // Deprecated: Use updateAuditConfiguration instead. + this.update_audit_configuration = require('./updateAuditConfiguration').bind(bindObj); + // Deprecated: Use updateConfiguration instead. + this.update_configuration = require('./updateConfiguration').bind(bindObj); + // Deprecated: Use updateDistinguishedName instead. + this.update_distinguished_name = require('./updateDistinguishedName').bind(bindObj); + // Deprecated: Use whoAmI instead. + this.who_am_i = require('./whoAmI').bind(bindObj); + // Deprecated: Use whoAmIProtected instead. + this.who_am_i_protected = require('./whoAmIProtected').bind(bindObj); +} + +module.exports = SecurityApi; diff --git a/api/security/authinfo.d.ts b/api/security/authinfo.d.ts new file mode 100644 index 000000000..67c884f2c --- /dev/null +++ b/api/security/authinfo.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_Authinfo_Request extends Global.Params { + auth_type?: string; + verbose?: boolean; +} + +export interface Security_Authinfo_Response extends ApiResponse { + body: Security_Authinfo_ResponseBody; +} + +export type Security_Authinfo_ResponseBody = Security_Common.AuthInfo + diff --git a/api/security/authinfo.js b/api/security/authinfo.js new file mode 100644 index 000000000..54f77d79a --- /dev/null +++ b/api/security/authinfo.js @@ -0,0 +1,48 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns the authentication information. + *
See Also: {@link undefined - security.authinfo} + * + * @memberOf API-Security + * + * @param {object} [params] + * @param {string} [params.auth_type] - The type of current authentication request. + * @param {boolean} [params.verbose] - Indicates whether a verbose response should be returned. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function authinfoFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/authinfo'; + const method = body ? 'POST' : 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = authinfoFunc; diff --git a/api/security/authtoken.d.ts b/api/security/authtoken.d.ts new file mode 100644 index 000000000..855186211 --- /dev/null +++ b/api/security/authtoken.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export type Security_Authtoken_Request = Global.Params & Record + +export interface Security_Authtoken_Response extends ApiResponse { + body: Security_Authtoken_ResponseBody; +} + +export type Security_Authtoken_ResponseBody = Security_Common.Ok + diff --git a/api/security/authtoken.js b/api/security/authtoken.js new file mode 100644 index 000000000..f653bf4af --- /dev/null +++ b/api/security/authtoken.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns the authorization token. + *
See Also: {@link undefined - security.authtoken} + * + * @memberOf API-Security + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function authtokenFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/authtoken'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = authtokenFunc; diff --git a/api/security/changePassword.d.ts b/api/security/changePassword.d.ts new file mode 100644 index 000000000..3e19786cf --- /dev/null +++ b/api/security/changePassword.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_ChangePassword_Request extends Global.Params { + body: Security_Common.ChangePasswordRequestContent; +} + +export interface Security_ChangePassword_Response extends ApiResponse { + body: Security_ChangePassword_ResponseBody; +} + +export type Security_ChangePassword_ResponseBody = Security_Common.Ok + diff --git a/api/security/changePassword.js b/api/security/changePassword.js new file mode 100644 index 000000000..3d0ab99a2 --- /dev/null +++ b/api/security/changePassword.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Changes the password for the current user. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#change-password - security.change_password} + * + * @memberOf API-Security + * + * @param {object} params + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function changePasswordFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/account'; + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = changePasswordFunc; diff --git a/api/security/configUpgradeCheck.d.ts b/api/security/configUpgradeCheck.d.ts new file mode 100644 index 000000000..6f89e60cd --- /dev/null +++ b/api/security/configUpgradeCheck.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export type Security_ConfigUpgradeCheck_Request = Global.Params & Record + +export interface Security_ConfigUpgradeCheck_Response extends ApiResponse { + body: Security_ConfigUpgradeCheck_ResponseBody; +} + +export type Security_ConfigUpgradeCheck_ResponseBody = Security_Common.UpgradeCheck + diff --git a/api/security/configUpgradeCheck.js b/api/security/configUpgradeCheck.js new file mode 100644 index 000000000..c001c6bae --- /dev/null +++ b/api/security/configUpgradeCheck.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Check whether or not an upgrade can be performed and what resources can be updated. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#configuration-upgrade-check - security.config_upgrade_check} + * + * @memberOf API-Security + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function configUpgradeCheckFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/_upgrade_check'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = configUpgradeCheckFunc; diff --git a/api/security/configUpgradePerform.d.ts b/api/security/configUpgradePerform.d.ts new file mode 100644 index 000000000..605aa90be --- /dev/null +++ b/api/security/configUpgradePerform.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_ConfigUpgradePerform_Request extends Global.Params { + body?: Security_Common.ConfigUpgradePayload; +} + +export interface Security_ConfigUpgradePerform_Response extends ApiResponse { + body: Security_ConfigUpgradePerform_ResponseBody; +} + +export type Security_ConfigUpgradePerform_ResponseBody = Security_Common.UpgradePerform + diff --git a/api/security/configUpgradePerform.js b/api/security/configUpgradePerform.js new file mode 100644 index 000000000..0ee113156 --- /dev/null +++ b/api/security/configUpgradePerform.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Helps cluster operator upgrade missing defaults and stale default definitions. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#configuration-upgrade - security.config_upgrade_perform} + * + * @memberOf API-Security + * + * @param {object} [params] + * @param {object} [params.body] + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function configUpgradePerformFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/_upgrade_perform'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = configUpgradePerformFunc; diff --git a/api/security/createActionGroup.d.ts b/api/security/createActionGroup.d.ts new file mode 100644 index 000000000..2defe7516 --- /dev/null +++ b/api/security/createActionGroup.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_CreateActionGroup_Request extends Global.Params { + action_group: string; + body: Security_Common.ActionGroup; +} + +export interface Security_CreateActionGroup_Response extends ApiResponse { + body: Security_CreateActionGroup_ResponseBody; +} + +export type Security_CreateActionGroup_ResponseBody = Security_Common.Ok + diff --git a/api/security/createActionGroup.js b/api/security/createActionGroup.js new file mode 100644 index 000000000..6c9784377 --- /dev/null +++ b/api/security/createActionGroup.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Creates or replaces the specified action group. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#create-action-group - security.create_action_group} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.action_group - The name of the action group to create or replace. + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function createActionGroupFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.action_group == null) return handleMissingParam('action_group', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, action_group, ...querystring } = params; + action_group = parsePathParam(action_group); + + const path = '/_plugins/_security/api/actiongroups/' + action_group; + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = createActionGroupFunc; diff --git a/api/security/createAllowlist.d.ts b/api/security/createAllowlist.d.ts new file mode 100644 index 000000000..b9bb2e2a2 --- /dev/null +++ b/api/security/createAllowlist.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_CreateAllowlist_Request extends Global.Params { + body: Security_Common.AllowListConfig; +} + +export interface Security_CreateAllowlist_Response extends ApiResponse { + body: Security_CreateAllowlist_ResponseBody; +} + +export type Security_CreateAllowlist_ResponseBody = Security_Common.AllowListConfig + diff --git a/api/security/createAllowlist.js b/api/security/createAllowlist.js new file mode 100644 index 000000000..8b4315b57 --- /dev/null +++ b/api/security/createAllowlist.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Creates or replaces the allowlisted APIs. Accessible via Super Admin certificate or REST API permission. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#access-control-for-the-api - security.create_allowlist} + * + * @memberOf API-Security + * + * @param {object} params + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function createAllowlistFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/allowlist'; + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = createAllowlistFunc; diff --git a/api/security/createRole.d.ts b/api/security/createRole.d.ts new file mode 100644 index 000000000..f76bdac26 --- /dev/null +++ b/api/security/createRole.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_CreateRole_Request extends Global.Params { + body: Security_Common.Role; + role: string; +} + +export interface Security_CreateRole_Response extends ApiResponse { + body: Security_CreateRole_ResponseBody; +} + +export type Security_CreateRole_ResponseBody = Security_Common.Ok + diff --git a/api/security/createRole.js b/api/security/createRole.js new file mode 100644 index 000000000..c583878a7 --- /dev/null +++ b/api/security/createRole.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Creates or replaces the specified role. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#create-role - security.create_role} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.role + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function createRoleFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.role == null) return handleMissingParam('role', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, role, ...querystring } = params; + role = parsePathParam(role); + + const path = '/_plugins/_security/api/roles/' + role; + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = createRoleFunc; diff --git a/api/security/createRoleMapping.d.ts b/api/security/createRoleMapping.d.ts new file mode 100644 index 000000000..bcf1588f9 --- /dev/null +++ b/api/security/createRoleMapping.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_CreateRoleMapping_Request extends Global.Params { + body: Security_Common.RoleMapping; + role: string; +} + +export interface Security_CreateRoleMapping_Response extends ApiResponse { + body: Security_CreateRoleMapping_ResponseBody; +} + +export type Security_CreateRoleMapping_ResponseBody = Security_Common.Ok + diff --git a/api/security/createRoleMapping.js b/api/security/createRoleMapping.js new file mode 100644 index 000000000..9bceb855c --- /dev/null +++ b/api/security/createRoleMapping.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Creates or replaces the specified role mapping. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#create-role-mapping - security.create_role_mapping} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.role + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function createRoleMappingFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.role == null) return handleMissingParam('role', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, role, ...querystring } = params; + role = parsePathParam(role); + + const path = '/_plugins/_security/api/rolesmapping/' + role; + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = createRoleMappingFunc; diff --git a/api/security/createTenant.d.ts b/api/security/createTenant.d.ts new file mode 100644 index 000000000..e347b6c39 --- /dev/null +++ b/api/security/createTenant.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_CreateTenant_Request extends Global.Params { + body: Security_Common.CreateTenantParams; + tenant: string; +} + +export interface Security_CreateTenant_Response extends ApiResponse { + body: Security_CreateTenant_ResponseBody; +} + +export type Security_CreateTenant_ResponseBody = Security_Common.Ok + diff --git a/api/security/createTenant.js b/api/security/createTenant.js new file mode 100644 index 000000000..1edb41096 --- /dev/null +++ b/api/security/createTenant.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Creates or replaces the specified tenant. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#create-tenant - security.create_tenant} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.tenant + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function createTenantFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.tenant == null) return handleMissingParam('tenant', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, tenant, ...querystring } = params; + tenant = parsePathParam(tenant); + + const path = '/_plugins/_security/api/tenants/' + tenant; + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = createTenantFunc; diff --git a/api/security/createUpdateTenancyConfig.d.ts b/api/security/createUpdateTenancyConfig.d.ts new file mode 100644 index 000000000..7286e5db4 --- /dev/null +++ b/api/security/createUpdateTenancyConfig.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_CreateUpdateTenancyConfig_Request extends Global.Params { + body: Security_CreateUpdateTenancyConfig_RequestBody; +} + +export type Security_CreateUpdateTenancyConfig_RequestBody = Security_Common.MultiTenancyConfig[] + +export interface Security_CreateUpdateTenancyConfig_Response extends ApiResponse { + body: Security_CreateUpdateTenancyConfig_ResponseBody; +} + +export type Security_CreateUpdateTenancyConfig_ResponseBody = Security_Common.MultiTenancyConfig + diff --git a/api/security/createUpdateTenancyConfig.js b/api/security/createUpdateTenancyConfig.js new file mode 100644 index 000000000..c6dfc7842 --- /dev/null +++ b/api/security/createUpdateTenancyConfig.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Creates or replaces the multi-tenancy configuration. Only accessible to admins and users with REST API permissions. + *
See Also: {@link https://opensearch.org/docs/latest/security/multi-tenancy/dynamic-config/#configuring-multi-tenancy-with-the-rest-api - security.create_update_tenancy_config} + * + * @memberOf API-Security + * + * @param {object} params + * @param {array} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function createUpdateTenancyConfigFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/tenancy/config'; + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = createUpdateTenancyConfigFunc; diff --git a/api/security/createUser.d.ts b/api/security/createUser.d.ts new file mode 100644 index 000000000..0bb03c598 --- /dev/null +++ b/api/security/createUser.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_CreateUser_Request extends Global.Params { + body: Security_Common.User; + username: string; +} + +export interface Security_CreateUser_Response extends ApiResponse { + body: Security_CreateUser_ResponseBody; +} + +export type Security_CreateUser_ResponseBody = Security_Common.Ok + diff --git a/api/security/createUser.js b/api/security/createUser.js new file mode 100644 index 000000000..7b7552172 --- /dev/null +++ b/api/security/createUser.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Creates or replaces the specified user. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#create-user - security.create_user} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.username + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function createUserFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.username == null) return handleMissingParam('username', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, username, ...querystring } = params; + username = parsePathParam(username); + + const path = '/_plugins/_security/api/internalusers/' + username; + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = createUserFunc; diff --git a/api/security/createUserLegacy.d.ts b/api/security/createUserLegacy.d.ts new file mode 100644 index 000000000..798ce6a6a --- /dev/null +++ b/api/security/createUserLegacy.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_CreateUserLegacy_Request extends Global.Params { + body: Security_Common.User; + username: string; +} + +export interface Security_CreateUserLegacy_Response extends ApiResponse { + body: Security_CreateUserLegacy_ResponseBody; +} + +export type Security_CreateUserLegacy_ResponseBody = Security_Common.Ok + diff --git a/api/security/createUserLegacy.js b/api/security/createUserLegacy.js new file mode 100644 index 000000000..04cec64cd --- /dev/null +++ b/api/security/createUserLegacy.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Creates or replaces the specified user. Legacy API. + *
See Also: {@link undefined - security.create_user_legacy} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.username + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function createUserLegacyFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.username == null) return handleMissingParam('username', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, username, ...querystring } = params; + username = parsePathParam(username); + + const path = '/_plugins/_security/api/user/' + username; + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = createUserLegacyFunc; diff --git a/api/security/deleteActionGroup.d.ts b/api/security/deleteActionGroup.d.ts new file mode 100644 index 000000000..d28e16e0d --- /dev/null +++ b/api/security/deleteActionGroup.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_DeleteActionGroup_Request extends Global.Params { + action_group: string; +} + +export interface Security_DeleteActionGroup_Response extends ApiResponse { + body: Security_DeleteActionGroup_ResponseBody; +} + +export type Security_DeleteActionGroup_ResponseBody = Security_Common.Ok + diff --git a/api/security/deleteActionGroup.js b/api/security/deleteActionGroup.js new file mode 100644 index 000000000..6d766b69f --- /dev/null +++ b/api/security/deleteActionGroup.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Delete a specified action group. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#delete-action-group - security.delete_action_group} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.action_group - Action group to delete. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteActionGroupFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.action_group == null) return handleMissingParam('action_group', this, callback); + + let { body, action_group, ...querystring } = params; + action_group = parsePathParam(action_group); + + const path = '/_plugins/_security/api/actiongroups/' + action_group; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteActionGroupFunc; diff --git a/api/security/deleteDistinguishedName.d.ts b/api/security/deleteDistinguishedName.d.ts new file mode 100644 index 000000000..1a6f57bd3 --- /dev/null +++ b/api/security/deleteDistinguishedName.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_DeleteDistinguishedName_Request extends Global.Params { + cluster_name: string; +} + +export interface Security_DeleteDistinguishedName_Response extends ApiResponse { + body: Security_DeleteDistinguishedName_ResponseBody; +} + +export type Security_DeleteDistinguishedName_ResponseBody = Security_Common.Ok + diff --git a/api/security/deleteDistinguishedName.js b/api/security/deleteDistinguishedName.js new file mode 100644 index 000000000..e490161de --- /dev/null +++ b/api/security/deleteDistinguishedName.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Deletes all distinguished names in the specified cluster or node allow list. Only accessible to super-admins and with rest-api permissions when enabled. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#delete-distinguished-names - security.delete_distinguished_name} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.cluster_name + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteDistinguishedNameFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.cluster_name == null) return handleMissingParam('cluster_name', this, callback); + + let { body, cluster_name, ...querystring } = params; + cluster_name = parsePathParam(cluster_name); + + const path = '/_plugins/_security/api/nodesdn/' + cluster_name; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteDistinguishedNameFunc; diff --git a/api/security/deleteRole.d.ts b/api/security/deleteRole.d.ts new file mode 100644 index 000000000..cfb434652 --- /dev/null +++ b/api/security/deleteRole.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_DeleteRole_Request extends Global.Params { + role: string; +} + +export interface Security_DeleteRole_Response extends ApiResponse { + body: Security_DeleteRole_ResponseBody; +} + +export type Security_DeleteRole_ResponseBody = Security_Common.Ok + diff --git a/api/security/deleteRole.js b/api/security/deleteRole.js new file mode 100644 index 000000000..390ab9562 --- /dev/null +++ b/api/security/deleteRole.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Delete the specified role. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#delete-role - security.delete_role} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.role + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteRoleFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.role == null) return handleMissingParam('role', this, callback); + + let { body, role, ...querystring } = params; + role = parsePathParam(role); + + const path = '/_plugins/_security/api/roles/' + role; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteRoleFunc; diff --git a/api/security/deleteRoleMapping.d.ts b/api/security/deleteRoleMapping.d.ts new file mode 100644 index 000000000..531e94806 --- /dev/null +++ b/api/security/deleteRoleMapping.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_DeleteRoleMapping_Request extends Global.Params { + role: string; +} + +export interface Security_DeleteRoleMapping_Response extends ApiResponse { + body: Security_DeleteRoleMapping_ResponseBody; +} + +export type Security_DeleteRoleMapping_ResponseBody = Security_Common.Ok + diff --git a/api/security/deleteRoleMapping.js b/api/security/deleteRoleMapping.js new file mode 100644 index 000000000..f63ff39ea --- /dev/null +++ b/api/security/deleteRoleMapping.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Deletes the specified role mapping. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#delete-role-mapping - security.delete_role_mapping} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.role + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteRoleMappingFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.role == null) return handleMissingParam('role', this, callback); + + let { body, role, ...querystring } = params; + role = parsePathParam(role); + + const path = '/_plugins/_security/api/rolesmapping/' + role; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteRoleMappingFunc; diff --git a/api/security/deleteTenant.d.ts b/api/security/deleteTenant.d.ts new file mode 100644 index 000000000..0326614e4 --- /dev/null +++ b/api/security/deleteTenant.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_DeleteTenant_Request extends Global.Params { + tenant: string; +} + +export interface Security_DeleteTenant_Response extends ApiResponse { + body: Security_DeleteTenant_ResponseBody; +} + +export type Security_DeleteTenant_ResponseBody = Security_Common.Ok + diff --git a/api/security/deleteTenant.js b/api/security/deleteTenant.js new file mode 100644 index 000000000..700a2ca6b --- /dev/null +++ b/api/security/deleteTenant.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Delete the specified tenant. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#delete-action-group - security.delete_tenant} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.tenant + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteTenantFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.tenant == null) return handleMissingParam('tenant', this, callback); + + let { body, tenant, ...querystring } = params; + tenant = parsePathParam(tenant); + + const path = '/_plugins/_security/api/tenants/' + tenant; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteTenantFunc; diff --git a/api/security/deleteUser.d.ts b/api/security/deleteUser.d.ts new file mode 100644 index 000000000..14747f366 --- /dev/null +++ b/api/security/deleteUser.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_DeleteUser_Request extends Global.Params { + username: string; +} + +export interface Security_DeleteUser_Response extends ApiResponse { + body: Security_DeleteUser_ResponseBody; +} + +export type Security_DeleteUser_ResponseBody = Security_Common.Ok + diff --git a/api/security/deleteUser.js b/api/security/deleteUser.js new file mode 100644 index 000000000..41d1796a5 --- /dev/null +++ b/api/security/deleteUser.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Delete the specified user. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#delete-user - security.delete_user} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.username + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteUserFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.username == null) return handleMissingParam('username', this, callback); + + let { body, username, ...querystring } = params; + username = parsePathParam(username); + + const path = '/_plugins/_security/api/internalusers/' + username; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteUserFunc; diff --git a/api/security/deleteUserLegacy.d.ts b/api/security/deleteUserLegacy.d.ts new file mode 100644 index 000000000..6be5df5fc --- /dev/null +++ b/api/security/deleteUserLegacy.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_DeleteUserLegacy_Request extends Global.Params { + username: string; +} + +export interface Security_DeleteUserLegacy_Response extends ApiResponse { + body: Security_DeleteUserLegacy_ResponseBody; +} + +export type Security_DeleteUserLegacy_ResponseBody = Security_Common.Ok + diff --git a/api/security/deleteUserLegacy.js b/api/security/deleteUserLegacy.js new file mode 100644 index 000000000..2a5b1a2fd --- /dev/null +++ b/api/security/deleteUserLegacy.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Delete the specified user. Legacy API. + *
See Also: {@link undefined - security.delete_user_legacy} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.username + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteUserLegacyFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.username == null) return handleMissingParam('username', this, callback); + + let { body, username, ...querystring } = params; + username = parsePathParam(username); + + const path = '/_plugins/_security/api/user/' + username; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteUserLegacyFunc; diff --git a/api/security/flushCache.d.ts b/api/security/flushCache.d.ts new file mode 100644 index 000000000..7af03dd1a --- /dev/null +++ b/api/security/flushCache.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export type Security_FlushCache_Request = Global.Params & Record + +export interface Security_FlushCache_Response extends ApiResponse { + body: Security_FlushCache_ResponseBody; +} + +export type Security_FlushCache_ResponseBody = Security_Common.Ok + diff --git a/api/security/flushCache.js b/api/security/flushCache.js new file mode 100644 index 000000000..3f33de039 --- /dev/null +++ b/api/security/flushCache.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Flushes the Security plugin user, authentication, and authorization cache. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#flush-cache - security.flush_cache} + * + * @memberOf API-Security + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function flushCacheFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/cache'; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = flushCacheFunc; diff --git a/api/security/generateOboToken.d.ts b/api/security/generateOboToken.d.ts new file mode 100644 index 000000000..0e6e365b5 --- /dev/null +++ b/api/security/generateOboToken.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_GenerateOboToken_Request extends Global.Params { + body: Security_Common.OBOToken; +} + +export interface Security_GenerateOboToken_Response extends ApiResponse { + body: Security_GenerateOboToken_ResponseBody; +} + +export type Security_GenerateOboToken_ResponseBody = Security_Common.GenerateOBOToken + diff --git a/api/security/generateOboToken.js b/api/security/generateOboToken.js new file mode 100644 index 000000000..b64b8ae31 --- /dev/null +++ b/api/security/generateOboToken.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Generates On-Behalf-Of token for the current user. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/authentication-tokens/#api-endpoint - security.generate_obo_token} + * + * @memberOf API-Security + * + * @param {object} params + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function generateOboTokenFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/generateonbehalfoftoken'; + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = generateOboTokenFunc; diff --git a/api/security/generateUserToken.d.ts b/api/security/generateUserToken.d.ts new file mode 100644 index 000000000..5bc5cc76f --- /dev/null +++ b/api/security/generateUserToken.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_GenerateUserToken_Request extends Global.Params { + username: string; +} + +export interface Security_GenerateUserToken_Response extends ApiResponse { + body: Security_GenerateUserToken_ResponseBody; +} + +export type Security_GenerateUserToken_ResponseBody = Security_Common.Ok + diff --git a/api/security/generateUserToken.js b/api/security/generateUserToken.js new file mode 100644 index 000000000..36330e412 --- /dev/null +++ b/api/security/generateUserToken.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Generates authorization token for the given user. + *
See Also: {@link undefined - security.generate_user_token} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.username + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function generateUserTokenFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.username == null) return handleMissingParam('username', this, callback); + + let { body, username, ...querystring } = params; + username = parsePathParam(username); + + const path = '/_plugins/_security/api/internalusers/' + username + '/authtoken'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = generateUserTokenFunc; diff --git a/api/security/generateUserTokenLegacy.d.ts b/api/security/generateUserTokenLegacy.d.ts new file mode 100644 index 000000000..f7cbac65d --- /dev/null +++ b/api/security/generateUserTokenLegacy.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_GenerateUserTokenLegacy_Request extends Global.Params { + username: string; +} + +export interface Security_GenerateUserTokenLegacy_Response extends ApiResponse { + body: Security_GenerateUserTokenLegacy_ResponseBody; +} + +export type Security_GenerateUserTokenLegacy_ResponseBody = Security_Common.Ok + diff --git a/api/security/generateUserTokenLegacy.js b/api/security/generateUserTokenLegacy.js new file mode 100644 index 000000000..f6c08fcfd --- /dev/null +++ b/api/security/generateUserTokenLegacy.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Generates authorization token for the given user. Legacy API. + *
See Also: {@link undefined - security.generate_user_token_legacy} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.username + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function generateUserTokenLegacyFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.username == null) return handleMissingParam('username', this, callback); + + let { body, username, ...querystring } = params; + username = parsePathParam(username); + + const path = '/_plugins/_security/api/user/' + username + '/authtoken'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = generateUserTokenLegacyFunc; diff --git a/api/security/getAccountDetails.d.ts b/api/security/getAccountDetails.d.ts new file mode 100644 index 000000000..129700e20 --- /dev/null +++ b/api/security/getAccountDetails.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export type Security_GetAccountDetails_Request = Global.Params & Record + +export interface Security_GetAccountDetails_Response extends ApiResponse { + body: Security_GetAccountDetails_ResponseBody; +} + +export type Security_GetAccountDetails_ResponseBody = Security_Common.AccountDetails + diff --git a/api/security/getAccountDetails.js b/api/security/getAccountDetails.js new file mode 100644 index 000000000..b64dbd3a9 --- /dev/null +++ b/api/security/getAccountDetails.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns account details for the current user. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-account-details - security.get_account_details} + * + * @memberOf API-Security + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getAccountDetailsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/account'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getAccountDetailsFunc; diff --git a/api/security/getActionGroup.d.ts b/api/security/getActionGroup.d.ts new file mode 100644 index 000000000..f17fb75a0 --- /dev/null +++ b/api/security/getActionGroup.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_GetActionGroup_Request extends Global.Params { + action_group: string; +} + +export interface Security_GetActionGroup_Response extends ApiResponse { + body: Security_GetActionGroup_ResponseBody; +} + +export type Security_GetActionGroup_ResponseBody = Security_Common.ActionGroupsMap + diff --git a/api/security/getActionGroup.js b/api/security/getActionGroup.js new file mode 100644 index 000000000..0d7be28c4 --- /dev/null +++ b/api/security/getActionGroup.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Retrieves one action group. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-action-group - security.get_action_group} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.action_group - Action group to retrieve. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getActionGroupFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.action_group == null) return handleMissingParam('action_group', this, callback); + + let { body, action_group, ...querystring } = params; + action_group = parsePathParam(action_group); + + const path = '/_plugins/_security/api/actiongroups/' + action_group; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getActionGroupFunc; diff --git a/api/security/getActionGroups.d.ts b/api/security/getActionGroups.d.ts new file mode 100644 index 000000000..2d31cc676 --- /dev/null +++ b/api/security/getActionGroups.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export type Security_GetActionGroups_Request = Global.Params & Record + +export interface Security_GetActionGroups_Response extends ApiResponse { + body: Security_GetActionGroups_ResponseBody; +} + +export type Security_GetActionGroups_ResponseBody = Security_Common.ActionGroupsMap + diff --git a/api/security/getActionGroups.js b/api/security/getActionGroups.js new file mode 100644 index 000000000..cb7d0d0ad --- /dev/null +++ b/api/security/getActionGroups.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Retrieves all action groups. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-action-groups - security.get_action_groups} + * + * @memberOf API-Security + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getActionGroupsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/actiongroups'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getActionGroupsFunc; diff --git a/api/security/getAllowlist.d.ts b/api/security/getAllowlist.d.ts new file mode 100644 index 000000000..1a2d5950a --- /dev/null +++ b/api/security/getAllowlist.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export type Security_GetAllowlist_Request = Global.Params & Record + +export interface Security_GetAllowlist_Response extends ApiResponse { + body: Security_GetAllowlist_ResponseBody; +} + +export type Security_GetAllowlist_ResponseBody = Security_Common.AllowListConfig + diff --git a/api/security/getAllowlist.js b/api/security/getAllowlist.js new file mode 100644 index 000000000..9d639fef4 --- /dev/null +++ b/api/security/getAllowlist.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Retrieves the current list of allowed API accessible to normal user. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#access-control-for-the-api - security.get_allowlist} + * + * @memberOf API-Security + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getAllowlistFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/allowlist'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getAllowlistFunc; diff --git a/api/security/getAuditConfiguration.d.ts b/api/security/getAuditConfiguration.d.ts new file mode 100644 index 000000000..c492a96fa --- /dev/null +++ b/api/security/getAuditConfiguration.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export type Security_GetAuditConfiguration_Request = Global.Params & Record + +export interface Security_GetAuditConfiguration_Response extends ApiResponse { + body: Security_GetAuditConfiguration_ResponseBody; +} + +export type Security_GetAuditConfiguration_ResponseBody = Security_Common.AuditConfigWithReadOnly + diff --git a/api/security/getAuditConfiguration.js b/api/security/getAuditConfiguration.js new file mode 100644 index 000000000..7544aef89 --- /dev/null +++ b/api/security/getAuditConfiguration.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Retrieves the audit configuration. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#audit-logs - security.get_audit_configuration} + * + * @memberOf API-Security + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getAuditConfigurationFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/audit'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getAuditConfigurationFunc; diff --git a/api/security/getCertificates.d.ts b/api/security/getCertificates.d.ts new file mode 100644 index 000000000..dd39889a7 --- /dev/null +++ b/api/security/getCertificates.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export type Security_GetCertificates_Request = Global.Params & Record + +export interface Security_GetCertificates_Response extends ApiResponse { + body: Security_GetCertificates_ResponseBody; +} + +export type Security_GetCertificates_ResponseBody = Security_Common.GetCertificates + diff --git a/api/security/getCertificates.js b/api/security/getCertificates.js new file mode 100644 index 000000000..265801462 --- /dev/null +++ b/api/security/getCertificates.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Retrieves the cluster security certificates. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-certificates - security.get_certificates} + * + * @memberOf API-Security + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getCertificatesFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/ssl/certs'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getCertificatesFunc; diff --git a/api/security/getConfiguration.d.ts b/api/security/getConfiguration.d.ts new file mode 100644 index 000000000..6e0837627 --- /dev/null +++ b/api/security/getConfiguration.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export type Security_GetConfiguration_Request = Global.Params & Record + +export interface Security_GetConfiguration_Response extends ApiResponse { + body: Security_GetConfiguration_ResponseBody; +} + +export type Security_GetConfiguration_ResponseBody = Security_Common.DynamicConfig + diff --git a/api/security/getConfiguration.js b/api/security/getConfiguration.js new file mode 100644 index 000000000..b769754d9 --- /dev/null +++ b/api/security/getConfiguration.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns the current Security plugin configuration in JSON format. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-configuration - security.get_configuration} + * + * @memberOf API-Security + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getConfigurationFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/securityconfig'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getConfigurationFunc; diff --git a/api/security/getDashboardsInfo.d.ts b/api/security/getDashboardsInfo.d.ts new file mode 100644 index 000000000..263d3e8f5 --- /dev/null +++ b/api/security/getDashboardsInfo.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export type Security_GetDashboardsInfo_Request = Global.Params & Record + +export interface Security_GetDashboardsInfo_Response extends ApiResponse { + body: Security_GetDashboardsInfo_ResponseBody; +} + +export type Security_GetDashboardsInfo_ResponseBody = Security_Common.DashboardsInfo + diff --git a/api/security/getDashboardsInfo.js b/api/security/getDashboardsInfo.js new file mode 100644 index 000000000..58b12849a --- /dev/null +++ b/api/security/getDashboardsInfo.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Retrieves the current security-dashboards plugin configuration. + *
See Also: {@link undefined - security.get_dashboards_info} + * + * @memberOf API-Security + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getDashboardsInfoFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/dashboardsinfo'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getDashboardsInfoFunc; diff --git a/api/security/getDistinguishedName.d.ts b/api/security/getDistinguishedName.d.ts new file mode 100644 index 000000000..898a93296 --- /dev/null +++ b/api/security/getDistinguishedName.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_GetDistinguishedName_Request extends Global.Params { + cluster_name: string; + show_all?: boolean; +} + +export interface Security_GetDistinguishedName_Response extends ApiResponse { + body: Security_GetDistinguishedName_ResponseBody; +} + +export type Security_GetDistinguishedName_ResponseBody = Security_Common.DistinguishedNames + diff --git a/api/security/getDistinguishedName.js b/api/security/getDistinguishedName.js new file mode 100644 index 000000000..58a97ad90 --- /dev/null +++ b/api/security/getDistinguishedName.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Retrieves distinguished names. Only accessible to super-admins and with rest-api permissions when enabled. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-distinguished-names - security.get_distinguished_name} + * + * @memberOf API-Security + * + * @param {object} params + * @param {boolean} [params.show_all] + * @param {string} params.cluster_name + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getDistinguishedNameFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.cluster_name == null) return handleMissingParam('cluster_name', this, callback); + + let { body, cluster_name, ...querystring } = params; + cluster_name = parsePathParam(cluster_name); + + const path = '/_plugins/_security/api/nodesdn/' + cluster_name; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getDistinguishedNameFunc; diff --git a/api/security/getDistinguishedNames.d.ts b/api/security/getDistinguishedNames.d.ts new file mode 100644 index 000000000..783104a2c --- /dev/null +++ b/api/security/getDistinguishedNames.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_GetDistinguishedNames_Request extends Global.Params { + show_all?: boolean; +} + +export interface Security_GetDistinguishedNames_Response extends ApiResponse { + body: Security_GetDistinguishedNames_ResponseBody; +} + +export type Security_GetDistinguishedNames_ResponseBody = Security_Common.DistinguishedNamesMap + diff --git a/api/security/getDistinguishedNames.js b/api/security/getDistinguishedNames.js new file mode 100644 index 000000000..596ae50f3 --- /dev/null +++ b/api/security/getDistinguishedNames.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Retrieves distinguished names. Only accessible to super-admins and with rest-api permissions when enabled. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-distinguished-names - security.get_distinguished_names} + * + * @memberOf API-Security + * + * @param {object} [params] + * @param {boolean} [params.show_all] + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getDistinguishedNamesFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/nodesdn'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getDistinguishedNamesFunc; diff --git a/api/security/getPermissionsInfo.d.ts b/api/security/getPermissionsInfo.d.ts new file mode 100644 index 000000000..2323bc62a --- /dev/null +++ b/api/security/getPermissionsInfo.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export type Security_GetPermissionsInfo_Request = Global.Params & Record + +export interface Security_GetPermissionsInfo_Response extends ApiResponse { + body: Security_GetPermissionsInfo_ResponseBody; +} + +export type Security_GetPermissionsInfo_ResponseBody = Security_Common.PermissionsInfo + diff --git a/api/security/getPermissionsInfo.js b/api/security/getPermissionsInfo.js new file mode 100644 index 000000000..9868152db --- /dev/null +++ b/api/security/getPermissionsInfo.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Gets the evaluated REST API permissions for the currently logged in user. + *
See Also: {@link undefined - security.get_permissions_info} + * + * @memberOf API-Security + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getPermissionsInfoFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/permissionsinfo'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getPermissionsInfoFunc; diff --git a/api/security/getRole.d.ts b/api/security/getRole.d.ts new file mode 100644 index 000000000..3ef8d7d0c --- /dev/null +++ b/api/security/getRole.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_GetRole_Request extends Global.Params { + role: string; +} + +export interface Security_GetRole_Response extends ApiResponse { + body: Security_GetRole_ResponseBody; +} + +export type Security_GetRole_ResponseBody = Security_Common.RolesMap + diff --git a/api/security/getRole.js b/api/security/getRole.js new file mode 100644 index 000000000..4dd03e2fc --- /dev/null +++ b/api/security/getRole.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Retrieves one role. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-role - security.get_role} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.role + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getRoleFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.role == null) return handleMissingParam('role', this, callback); + + let { body, role, ...querystring } = params; + role = parsePathParam(role); + + const path = '/_plugins/_security/api/roles/' + role; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getRoleFunc; diff --git a/api/security/getRoleMapping.d.ts b/api/security/getRoleMapping.d.ts new file mode 100644 index 000000000..bc1b57d49 --- /dev/null +++ b/api/security/getRoleMapping.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_GetRoleMapping_Request extends Global.Params { + role: string; +} + +export interface Security_GetRoleMapping_Response extends ApiResponse { + body: Security_GetRoleMapping_ResponseBody; +} + +export type Security_GetRoleMapping_ResponseBody = Security_Common.RoleMappings + diff --git a/api/security/getRoleMapping.js b/api/security/getRoleMapping.js new file mode 100644 index 000000000..cafc07775 --- /dev/null +++ b/api/security/getRoleMapping.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Retrieves one role mapping. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-role-mapping - security.get_role_mapping} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.role + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getRoleMappingFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.role == null) return handleMissingParam('role', this, callback); + + let { body, role, ...querystring } = params; + role = parsePathParam(role); + + const path = '/_plugins/_security/api/rolesmapping/' + role; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getRoleMappingFunc; diff --git a/api/security/getRoleMappings.d.ts b/api/security/getRoleMappings.d.ts new file mode 100644 index 000000000..77165ba77 --- /dev/null +++ b/api/security/getRoleMappings.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export type Security_GetRoleMappings_Request = Global.Params & Record + +export interface Security_GetRoleMappings_Response extends ApiResponse { + body: Security_GetRoleMappings_ResponseBody; +} + +export type Security_GetRoleMappings_ResponseBody = Security_Common.RoleMappings + diff --git a/api/security/getRoleMappings.js b/api/security/getRoleMappings.js new file mode 100644 index 000000000..44799a36d --- /dev/null +++ b/api/security/getRoleMappings.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Retrieves all role mappings. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-role-mappings - security.get_role_mappings} + * + * @memberOf API-Security + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getRoleMappingsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/rolesmapping'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getRoleMappingsFunc; diff --git a/api/security/getRoles.d.ts b/api/security/getRoles.d.ts new file mode 100644 index 000000000..f2a17fa40 --- /dev/null +++ b/api/security/getRoles.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export type Security_GetRoles_Request = Global.Params & Record + +export interface Security_GetRoles_Response extends ApiResponse { + body: Security_GetRoles_ResponseBody; +} + +export type Security_GetRoles_ResponseBody = Security_Common.RolesMap + diff --git a/api/security/getRoles.js b/api/security/getRoles.js new file mode 100644 index 000000000..461da4e74 --- /dev/null +++ b/api/security/getRoles.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Retrieves all roles. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-roles - security.get_roles} + * + * @memberOf API-Security + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getRolesFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/roles'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getRolesFunc; diff --git a/api/security/getSslinfo.d.ts b/api/security/getSslinfo.d.ts new file mode 100644 index 000000000..ab1b5ec9d --- /dev/null +++ b/api/security/getSslinfo.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_GetSslinfo_Request extends Global.Params { + show_dn?: string; +} + +export interface Security_GetSslinfo_Response extends ApiResponse { + body: Security_GetSslinfo_ResponseBody; +} + +export type Security_GetSslinfo_ResponseBody = Security_Common.SSLInfo + diff --git a/api/security/getSslinfo.js b/api/security/getSslinfo.js new file mode 100644 index 000000000..74183cc6b --- /dev/null +++ b/api/security/getSslinfo.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Retrieves the SSL configuration information. + *
See Also: {@link undefined - security.get_sslinfo} + * + * @memberOf API-Security + * + * @param {object} [params] + * @param {string} [params.show_dn] - The domain names from all certificates. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getSslinfoFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_opendistro/_security/sslinfo'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getSslinfoFunc; diff --git a/api/security/getTenancyConfig.d.ts b/api/security/getTenancyConfig.d.ts new file mode 100644 index 000000000..a2b4d902b --- /dev/null +++ b/api/security/getTenancyConfig.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export type Security_GetTenancyConfig_Request = Global.Params & Record + +export interface Security_GetTenancyConfig_Response extends ApiResponse { + body: Security_GetTenancyConfig_ResponseBody; +} + +export type Security_GetTenancyConfig_ResponseBody = Security_Common.MultiTenancyConfig + diff --git a/api/security/getTenancyConfig.js b/api/security/getTenancyConfig.js new file mode 100644 index 000000000..10d865908 --- /dev/null +++ b/api/security/getTenancyConfig.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Retrieves multi-tenancy configuration. Only accessible to admins and users with REST API permissions. + *
See Also: {@link https://opensearch.org/docs/latest/security/multi-tenancy/dynamic-config/#configuring-multi-tenancy-with-the-rest-api - security.get_tenancy_config} + * + * @memberOf API-Security + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getTenancyConfigFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/tenancy/config'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getTenancyConfigFunc; diff --git a/api/security/getTenant.d.ts b/api/security/getTenant.d.ts new file mode 100644 index 000000000..1705168e8 --- /dev/null +++ b/api/security/getTenant.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_GetTenant_Request extends Global.Params { + tenant: string; +} + +export interface Security_GetTenant_Response extends ApiResponse { + body: Security_GetTenant_ResponseBody; +} + +export type Security_GetTenant_ResponseBody = Security_Common.TenantsMap + diff --git a/api/security/getTenant.js b/api/security/getTenant.js new file mode 100644 index 000000000..52aa2b639 --- /dev/null +++ b/api/security/getTenant.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Retrieves one tenant. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-tenant - security.get_tenant} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.tenant + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getTenantFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.tenant == null) return handleMissingParam('tenant', this, callback); + + let { body, tenant, ...querystring } = params; + tenant = parsePathParam(tenant); + + const path = '/_plugins/_security/api/tenants/' + tenant; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getTenantFunc; diff --git a/api/security/getTenants.d.ts b/api/security/getTenants.d.ts new file mode 100644 index 000000000..c60e906b7 --- /dev/null +++ b/api/security/getTenants.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export type Security_GetTenants_Request = Global.Params & Record + +export interface Security_GetTenants_Response extends ApiResponse { + body: Security_GetTenants_ResponseBody; +} + +export type Security_GetTenants_ResponseBody = Security_Common.TenantsMap + diff --git a/api/security/getTenants.js b/api/security/getTenants.js new file mode 100644 index 000000000..37d241c32 --- /dev/null +++ b/api/security/getTenants.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Retrieves all tenants. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-tenants - security.get_tenants} + * + * @memberOf API-Security + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getTenantsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/tenants'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getTenantsFunc; diff --git a/api/security/getUser.d.ts b/api/security/getUser.d.ts new file mode 100644 index 000000000..19195ee9e --- /dev/null +++ b/api/security/getUser.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_GetUser_Request extends Global.Params { + username: string; +} + +export interface Security_GetUser_Response extends ApiResponse { + body: Security_GetUser_ResponseBody; +} + +export type Security_GetUser_ResponseBody = Security_Common.UsersMap + diff --git a/api/security/getUser.js b/api/security/getUser.js new file mode 100644 index 000000000..36dd7c3c7 --- /dev/null +++ b/api/security/getUser.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Retrieve one internal user. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-user - security.get_user} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.username + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getUserFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.username == null) return handleMissingParam('username', this, callback); + + let { body, username, ...querystring } = params; + username = parsePathParam(username); + + const path = '/_plugins/_security/api/internalusers/' + username; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getUserFunc; diff --git a/api/security/getUserLegacy.d.ts b/api/security/getUserLegacy.d.ts new file mode 100644 index 000000000..f6952b494 --- /dev/null +++ b/api/security/getUserLegacy.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_GetUserLegacy_Request extends Global.Params { + username: string; +} + +export interface Security_GetUserLegacy_Response extends ApiResponse { + body: Security_GetUserLegacy_ResponseBody; +} + +export type Security_GetUserLegacy_ResponseBody = Security_Common.UsersMap + diff --git a/api/security/getUserLegacy.js b/api/security/getUserLegacy.js new file mode 100644 index 000000000..b0ed266f8 --- /dev/null +++ b/api/security/getUserLegacy.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Retrieve one user. Legacy API. + *
See Also: {@link undefined - security.get_user_legacy} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.username + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getUserLegacyFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.username == null) return handleMissingParam('username', this, callback); + + let { body, username, ...querystring } = params; + username = parsePathParam(username); + + const path = '/_plugins/_security/api/user/' + username; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getUserLegacyFunc; diff --git a/api/security/getUsers.d.ts b/api/security/getUsers.d.ts new file mode 100644 index 000000000..7f8479c4b --- /dev/null +++ b/api/security/getUsers.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export type Security_GetUsers_Request = Global.Params & Record + +export interface Security_GetUsers_Response extends ApiResponse { + body: Security_GetUsers_ResponseBody; +} + +export type Security_GetUsers_ResponseBody = Security_Common.UsersMap + diff --git a/api/security/getUsers.js b/api/security/getUsers.js new file mode 100644 index 000000000..914be2c25 --- /dev/null +++ b/api/security/getUsers.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Retrieve all internal users. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#get-users - security.get_users} + * + * @memberOf API-Security + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getUsersFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/internalusers'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getUsersFunc; diff --git a/api/security/getUsersLegacy.d.ts b/api/security/getUsersLegacy.d.ts new file mode 100644 index 000000000..f6ecf088d --- /dev/null +++ b/api/security/getUsersLegacy.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export type Security_GetUsersLegacy_Request = Global.Params & Record + +export interface Security_GetUsersLegacy_Response extends ApiResponse { + body: Security_GetUsersLegacy_ResponseBody; +} + +export type Security_GetUsersLegacy_ResponseBody = Security_Common.UsersMap + diff --git a/api/security/getUsersLegacy.js b/api/security/getUsersLegacy.js new file mode 100644 index 000000000..c387beb97 --- /dev/null +++ b/api/security/getUsersLegacy.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Retrieve all internal users. Legacy API. + *
See Also: {@link undefined - security.get_users_legacy} + * + * @memberOf API-Security + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getUsersLegacyFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/user'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getUsersLegacyFunc; diff --git a/api/security/health.d.ts b/api/security/health.d.ts new file mode 100644 index 000000000..807d94810 --- /dev/null +++ b/api/security/health.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_Health_Request extends Global.Params { + mode?: string; +} + +export interface Security_Health_Response extends ApiResponse { + body: Security_Health_ResponseBody; +} + +export type Security_Health_ResponseBody = Security_Common.HealthInfo + diff --git a/api/security/health.js b/api/security/health.js new file mode 100644 index 000000000..0a345bb3c --- /dev/null +++ b/api/security/health.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Checks to see if the Security plugin is up and running. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#health-check - security.health} + * + * @memberOf API-Security + * + * @param {object} [params] + * @param {string} [params.mode] + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function healthFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/health'; + const method = body ? 'POST' : 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = healthFunc; diff --git a/api/security/migrate.d.ts b/api/security/migrate.d.ts new file mode 100644 index 000000000..5964ca73b --- /dev/null +++ b/api/security/migrate.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export type Security_Migrate_Request = Global.Params & Record + +export interface Security_Migrate_Response extends ApiResponse { + body: Security_Migrate_ResponseBody; +} + +export type Security_Migrate_ResponseBody = Security_Common.Ok + diff --git a/api/security/migrate.js b/api/security/migrate.js new file mode 100644 index 000000000..a80ba7d38 --- /dev/null +++ b/api/security/migrate.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Migrates security configuration from v6 to v7. + *
See Also: {@link undefined - security.migrate} + * + * @memberOf API-Security + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function migrateFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/migrate'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = migrateFunc; diff --git a/api/security/patchActionGroup.d.ts b/api/security/patchActionGroup.d.ts new file mode 100644 index 000000000..899eaa901 --- /dev/null +++ b/api/security/patchActionGroup.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_PatchActionGroup_Request extends Global.Params { + action_group: string; + body: Security_PatchActionGroup_RequestBody; +} + +export type Security_PatchActionGroup_RequestBody = Security_Common.PatchOperation[] + +export interface Security_PatchActionGroup_Response extends ApiResponse { + body: Security_PatchActionGroup_ResponseBody; +} + +export type Security_PatchActionGroup_ResponseBody = Security_Common.Ok + diff --git a/api/security/patchActionGroup.js b/api/security/patchActionGroup.js new file mode 100644 index 000000000..7b0eb94bf --- /dev/null +++ b/api/security/patchActionGroup.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Updates individual attributes of an action group. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-action-group - security.patch_action_group} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.action_group + * @param {array} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function patchActionGroupFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.action_group == null) return handleMissingParam('action_group', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, action_group, ...querystring } = params; + action_group = parsePathParam(action_group); + + const path = '/_plugins/_security/api/actiongroups/' + action_group; + const method = 'PATCH'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = patchActionGroupFunc; diff --git a/api/security/patchActionGroups.d.ts b/api/security/patchActionGroups.d.ts new file mode 100644 index 000000000..8da8f5ef6 --- /dev/null +++ b/api/security/patchActionGroups.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_PatchActionGroups_Request extends Global.Params { + body: Security_PatchActionGroups_RequestBody; +} + +export type Security_PatchActionGroups_RequestBody = Security_Common.PatchOperation[] + +export interface Security_PatchActionGroups_Response extends ApiResponse { + body: Security_PatchActionGroups_ResponseBody; +} + +export type Security_PatchActionGroups_ResponseBody = Security_Common.Ok + diff --git a/api/security/patchActionGroups.js b/api/security/patchActionGroups.js new file mode 100644 index 000000000..45cfeb730 --- /dev/null +++ b/api/security/patchActionGroups.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Creates, updates, or deletes multiple action groups in a single call. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-action-groups - security.patch_action_groups} + * + * @memberOf API-Security + * + * @param {object} params + * @param {array} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function patchActionGroupsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/actiongroups'; + const method = 'PATCH'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = patchActionGroupsFunc; diff --git a/api/security/patchAllowlist.d.ts b/api/security/patchAllowlist.d.ts new file mode 100644 index 000000000..69b171e4c --- /dev/null +++ b/api/security/patchAllowlist.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_PatchAllowlist_Request extends Global.Params { + body: Security_PatchAllowlist_RequestBody; +} + +export type Security_PatchAllowlist_RequestBody = Security_Common.PatchOperation[] + +export interface Security_PatchAllowlist_Response extends ApiResponse { + body: Security_PatchAllowlist_ResponseBody; +} + +export type Security_PatchAllowlist_ResponseBody = Security_Common.AllowListConfig + diff --git a/api/security/patchAllowlist.js b/api/security/patchAllowlist.js new file mode 100644 index 000000000..c3f2df2bc --- /dev/null +++ b/api/security/patchAllowlist.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Updates the current list of allowed API accessible to normal user. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#access-control-for-the-api - security.patch_allowlist} + * + * @memberOf API-Security + * + * @param {object} params + * @param {array} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function patchAllowlistFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/allowlist'; + const method = 'PATCH'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = patchAllowlistFunc; diff --git a/api/security/patchAuditConfiguration.d.ts b/api/security/patchAuditConfiguration.d.ts new file mode 100644 index 000000000..8790361bb --- /dev/null +++ b/api/security/patchAuditConfiguration.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_PatchAuditConfiguration_Request extends Global.Params { + body: Security_PatchAuditConfiguration_RequestBody; +} + +export type Security_PatchAuditConfiguration_RequestBody = Security_Common.PatchOperation[] + +export interface Security_PatchAuditConfiguration_Response extends ApiResponse { + body: Security_PatchAuditConfiguration_ResponseBody; +} + +export type Security_PatchAuditConfiguration_ResponseBody = Security_Common.Ok + diff --git a/api/security/patchAuditConfiguration.js b/api/security/patchAuditConfiguration.js new file mode 100644 index 000000000..a8124c645 --- /dev/null +++ b/api/security/patchAuditConfiguration.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * A PATCH call is used to update specified fields in the audit configuration. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#audit-logs - security.patch_audit_configuration} + * + * @memberOf API-Security + * + * @param {object} params + * @param {array} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function patchAuditConfigurationFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/audit'; + const method = 'PATCH'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = patchAuditConfigurationFunc; diff --git a/api/security/patchConfiguration.d.ts b/api/security/patchConfiguration.d.ts new file mode 100644 index 000000000..caec7aaed --- /dev/null +++ b/api/security/patchConfiguration.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_PatchConfiguration_Request extends Global.Params { + body: Security_PatchConfiguration_RequestBody; +} + +export type Security_PatchConfiguration_RequestBody = Security_Common.PatchOperation[] + +export interface Security_PatchConfiguration_Response extends ApiResponse { + body: Security_PatchConfiguration_ResponseBody; +} + +export type Security_PatchConfiguration_ResponseBody = Security_Common.Ok + diff --git a/api/security/patchConfiguration.js b/api/security/patchConfiguration.js new file mode 100644 index 000000000..6fefa92e5 --- /dev/null +++ b/api/security/patchConfiguration.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * A PATCH call is used to update the existing configuration using the REST API. Only accessible by admins and users with rest api access and only when put or patch is enabled. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-configuration - security.patch_configuration} + * + * @memberOf API-Security + * + * @param {object} params + * @param {array} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function patchConfigurationFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/securityconfig'; + const method = 'PATCH'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = patchConfigurationFunc; diff --git a/api/security/patchDistinguishedName.d.ts b/api/security/patchDistinguishedName.d.ts new file mode 100644 index 000000000..43eb44f2b --- /dev/null +++ b/api/security/patchDistinguishedName.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_PatchDistinguishedName_Request extends Global.Params { + body?: Security_Common.PatchOperation; + cluster_name: string; +} + +export interface Security_PatchDistinguishedName_Response extends ApiResponse { + body: Security_PatchDistinguishedName_ResponseBody; +} + +export type Security_PatchDistinguishedName_ResponseBody = Security_Common.Ok + diff --git a/api/security/patchDistinguishedName.js b/api/security/patchDistinguishedName.js new file mode 100644 index 000000000..7a10673a7 --- /dev/null +++ b/api/security/patchDistinguishedName.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Updates a distinguished cluster name for a specific cluster. Only accessible to super-admins and with rest-api permissions when enabled. + *
See Also: {@link undefined - security.patch_distinguished_name} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.cluster_name + * @param {object} [params.body] + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function patchDistinguishedNameFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.cluster_name == null) return handleMissingParam('cluster_name', this, callback); + + let { body, cluster_name, ...querystring } = params; + cluster_name = parsePathParam(cluster_name); + + const path = '/_plugins/_security/api/nodesdn/' + cluster_name; + const method = 'PATCH'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = patchDistinguishedNameFunc; diff --git a/api/security/patchDistinguishedNames.d.ts b/api/security/patchDistinguishedNames.d.ts new file mode 100644 index 000000000..9632f1a90 --- /dev/null +++ b/api/security/patchDistinguishedNames.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_PatchDistinguishedNames_Request extends Global.Params { + body: Security_PatchDistinguishedNames_RequestBody; +} + +export type Security_PatchDistinguishedNames_RequestBody = Security_Common.PatchOperation[] + +export interface Security_PatchDistinguishedNames_Response extends ApiResponse { + body: Security_PatchDistinguishedNames_ResponseBody; +} + +export type Security_PatchDistinguishedNames_ResponseBody = Security_Common.Ok + diff --git a/api/security/patchDistinguishedNames.js b/api/security/patchDistinguishedNames.js new file mode 100644 index 000000000..9bd211b24 --- /dev/null +++ b/api/security/patchDistinguishedNames.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Bulk update of distinguished names. Only accessible to super-admins and with rest-api permissions when enabled. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#update-all-distinguished-names - security.patch_distinguished_names} + * + * @memberOf API-Security + * + * @param {object} params + * @param {array} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function patchDistinguishedNamesFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/nodesdn'; + const method = 'PATCH'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = patchDistinguishedNamesFunc; diff --git a/api/security/patchRole.d.ts b/api/security/patchRole.d.ts new file mode 100644 index 000000000..c451d3675 --- /dev/null +++ b/api/security/patchRole.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_PatchRole_Request extends Global.Params { + body: Security_PatchRole_RequestBody; + role: string; +} + +export type Security_PatchRole_RequestBody = Security_Common.PatchOperation[] + +export interface Security_PatchRole_Response extends ApiResponse { + body: Security_PatchRole_ResponseBody; +} + +export type Security_PatchRole_ResponseBody = Security_Common.Ok + diff --git a/api/security/patchRole.js b/api/security/patchRole.js new file mode 100644 index 000000000..48e0341a2 --- /dev/null +++ b/api/security/patchRole.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Updates individual attributes of a role. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-role - security.patch_role} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.role + * @param {array} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function patchRoleFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.role == null) return handleMissingParam('role', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, role, ...querystring } = params; + role = parsePathParam(role); + + const path = '/_plugins/_security/api/roles/' + role; + const method = 'PATCH'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = patchRoleFunc; diff --git a/api/security/patchRoleMapping.d.ts b/api/security/patchRoleMapping.d.ts new file mode 100644 index 000000000..5434fccee --- /dev/null +++ b/api/security/patchRoleMapping.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_PatchRoleMapping_Request extends Global.Params { + body: Security_PatchRoleMapping_RequestBody; + role: string; +} + +export type Security_PatchRoleMapping_RequestBody = Security_Common.PatchOperation[] + +export interface Security_PatchRoleMapping_Response extends ApiResponse { + body: Security_PatchRoleMapping_ResponseBody; +} + +export type Security_PatchRoleMapping_ResponseBody = Security_Common.Ok + diff --git a/api/security/patchRoleMapping.js b/api/security/patchRoleMapping.js new file mode 100644 index 000000000..f6fab6020 --- /dev/null +++ b/api/security/patchRoleMapping.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Updates individual attributes of a role mapping. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-role-mapping - security.patch_role_mapping} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.role + * @param {array} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function patchRoleMappingFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.role == null) return handleMissingParam('role', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, role, ...querystring } = params; + role = parsePathParam(role); + + const path = '/_plugins/_security/api/rolesmapping/' + role; + const method = 'PATCH'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = patchRoleMappingFunc; diff --git a/api/security/patchRoleMappings.d.ts b/api/security/patchRoleMappings.d.ts new file mode 100644 index 000000000..decb67155 --- /dev/null +++ b/api/security/patchRoleMappings.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_PatchRoleMappings_Request extends Global.Params { + body: Security_PatchRoleMappings_RequestBody; +} + +export type Security_PatchRoleMappings_RequestBody = Security_Common.PatchOperation[] + +export interface Security_PatchRoleMappings_Response extends ApiResponse { + body: Security_PatchRoleMappings_ResponseBody; +} + +export type Security_PatchRoleMappings_ResponseBody = Security_Common.Ok + diff --git a/api/security/patchRoleMappings.js b/api/security/patchRoleMappings.js new file mode 100644 index 000000000..0c981e57e --- /dev/null +++ b/api/security/patchRoleMappings.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Creates or updates multiple role mappings in a single call. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-role-mappings - security.patch_role_mappings} + * + * @memberOf API-Security + * + * @param {object} params + * @param {array} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function patchRoleMappingsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/rolesmapping'; + const method = 'PATCH'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = patchRoleMappingsFunc; diff --git a/api/security/patchRoles.d.ts b/api/security/patchRoles.d.ts new file mode 100644 index 000000000..c6ed3e7ec --- /dev/null +++ b/api/security/patchRoles.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_PatchRoles_Request extends Global.Params { + body: Security_PatchRoles_RequestBody; +} + +export type Security_PatchRoles_RequestBody = Security_Common.PatchOperation[] + +export interface Security_PatchRoles_Response extends ApiResponse { + body: Security_PatchRoles_ResponseBody; +} + +export type Security_PatchRoles_ResponseBody = Security_Common.Ok + diff --git a/api/security/patchRoles.js b/api/security/patchRoles.js new file mode 100644 index 000000000..de0ea1642 --- /dev/null +++ b/api/security/patchRoles.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Creates, updates, or deletes multiple roles in a single call. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-roles - security.patch_roles} + * + * @memberOf API-Security + * + * @param {object} params + * @param {array} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function patchRolesFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/roles'; + const method = 'PATCH'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = patchRolesFunc; diff --git a/api/security/patchTenant.d.ts b/api/security/patchTenant.d.ts new file mode 100644 index 000000000..cda859287 --- /dev/null +++ b/api/security/patchTenant.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_PatchTenant_Request extends Global.Params { + body: Security_PatchTenant_RequestBody; + tenant: string; +} + +export type Security_PatchTenant_RequestBody = Security_Common.PatchOperation[] + +export interface Security_PatchTenant_Response extends ApiResponse { + body: Security_PatchTenant_ResponseBody; +} + +export type Security_PatchTenant_ResponseBody = Security_Common.Ok + diff --git a/api/security/patchTenant.js b/api/security/patchTenant.js new file mode 100644 index 000000000..4e7e78358 --- /dev/null +++ b/api/security/patchTenant.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Add, delete, or modify a single tenant. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-tenant - security.patch_tenant} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.tenant + * @param {array} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function patchTenantFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.tenant == null) return handleMissingParam('tenant', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, tenant, ...querystring } = params; + tenant = parsePathParam(tenant); + + const path = '/_plugins/_security/api/tenants/' + tenant; + const method = 'PATCH'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = patchTenantFunc; diff --git a/api/security/patchTenants.d.ts b/api/security/patchTenants.d.ts new file mode 100644 index 000000000..3cd209c33 --- /dev/null +++ b/api/security/patchTenants.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_PatchTenants_Request extends Global.Params { + body: Security_PatchTenants_RequestBody; +} + +export type Security_PatchTenants_RequestBody = Security_Common.PatchOperation[] + +export interface Security_PatchTenants_Response extends ApiResponse { + body: Security_PatchTenants_ResponseBody; +} + +export type Security_PatchTenants_ResponseBody = Security_Common.Ok + diff --git a/api/security/patchTenants.js b/api/security/patchTenants.js new file mode 100644 index 000000000..b5cbe3b46 --- /dev/null +++ b/api/security/patchTenants.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Add, delete, or modify multiple tenants in a single call. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-tenants - security.patch_tenants} + * + * @memberOf API-Security + * + * @param {object} params + * @param {array} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function patchTenantsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/tenants'; + const method = 'PATCH'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = patchTenantsFunc; diff --git a/api/security/patchUser.d.ts b/api/security/patchUser.d.ts new file mode 100644 index 000000000..ab235bf16 --- /dev/null +++ b/api/security/patchUser.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_PatchUser_Request extends Global.Params { + body: Security_PatchUser_RequestBody; + username: string; +} + +export type Security_PatchUser_RequestBody = Security_Common.PatchOperation[] + +export interface Security_PatchUser_Response extends ApiResponse { + body: Security_PatchUser_ResponseBody; +} + +export type Security_PatchUser_ResponseBody = Security_Common.Ok + diff --git a/api/security/patchUser.js b/api/security/patchUser.js new file mode 100644 index 000000000..0706ae0c0 --- /dev/null +++ b/api/security/patchUser.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Updates individual attributes of an internal user. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-user - security.patch_user} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.username + * @param {array} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function patchUserFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.username == null) return handleMissingParam('username', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, username, ...querystring } = params; + username = parsePathParam(username); + + const path = '/_plugins/_security/api/internalusers/' + username; + const method = 'PATCH'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = patchUserFunc; diff --git a/api/security/patchUsers.d.ts b/api/security/patchUsers.d.ts new file mode 100644 index 000000000..9c3d22cfe --- /dev/null +++ b/api/security/patchUsers.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_PatchUsers_Request extends Global.Params { + body: Security_PatchUsers_RequestBody; +} + +export type Security_PatchUsers_RequestBody = Security_Common.PatchOperation[] + +export interface Security_PatchUsers_Response extends ApiResponse { + body: Security_PatchUsers_ResponseBody; +} + +export type Security_PatchUsers_ResponseBody = Security_Common.Ok + diff --git a/api/security/patchUsers.js b/api/security/patchUsers.js new file mode 100644 index 000000000..32dd42158 --- /dev/null +++ b/api/security/patchUsers.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Creates, updates, or deletes multiple internal users in a single call. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#patch-users - security.patch_users} + * + * @memberOf API-Security + * + * @param {object} params + * @param {array} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function patchUsersFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/internalusers'; + const method = 'PATCH'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = patchUsersFunc; diff --git a/api/security/postDashboardsInfo.d.ts b/api/security/postDashboardsInfo.d.ts new file mode 100644 index 000000000..4cffc802e --- /dev/null +++ b/api/security/postDashboardsInfo.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_PostDashboardsInfo_Request extends Global.Params { + body?: Security_Common.DashboardsInfo; +} + +export interface Security_PostDashboardsInfo_Response extends ApiResponse { + body: Security_PostDashboardsInfo_ResponseBody; +} + +export type Security_PostDashboardsInfo_ResponseBody = Security_Common.DashboardsInfo + diff --git a/api/security/postDashboardsInfo.js b/api/security/postDashboardsInfo.js new file mode 100644 index 000000000..b0ecf9a4b --- /dev/null +++ b/api/security/postDashboardsInfo.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Updates the current security-dashboards plugin configuration. + *
See Also: {@link undefined - security.post_dashboards_info} + * + * @memberOf API-Security + * + * @param {object} [params] + * @param {object} [params.body] + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function postDashboardsInfoFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/dashboardsinfo'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = postDashboardsInfoFunc; diff --git a/api/security/reloadHttpCertificates.d.ts b/api/security/reloadHttpCertificates.d.ts new file mode 100644 index 000000000..a9cce582f --- /dev/null +++ b/api/security/reloadHttpCertificates.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export type Security_ReloadHttpCertificates_Request = Global.Params & Record + +export interface Security_ReloadHttpCertificates_Response extends ApiResponse { + body: Security_ReloadHttpCertificates_ResponseBody; +} + +export type Security_ReloadHttpCertificates_ResponseBody = Security_Common.Ok + diff --git a/api/security/reloadHttpCertificates.js b/api/security/reloadHttpCertificates.js new file mode 100644 index 000000000..49e0a8603 --- /dev/null +++ b/api/security/reloadHttpCertificates.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Reload HTTP layer communication certificates. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#reload-http-certificates - security.reload_http_certificates} + * + * @memberOf API-Security + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function reloadHttpCertificatesFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/ssl/http/reloadcerts'; + const method = 'PUT'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = reloadHttpCertificatesFunc; diff --git a/api/security/reloadTransportCertificates.d.ts b/api/security/reloadTransportCertificates.d.ts new file mode 100644 index 000000000..066c99ea5 --- /dev/null +++ b/api/security/reloadTransportCertificates.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export type Security_ReloadTransportCertificates_Request = Global.Params & Record + +export interface Security_ReloadTransportCertificates_Response extends ApiResponse { + body: Security_ReloadTransportCertificates_ResponseBody; +} + +export type Security_ReloadTransportCertificates_ResponseBody = Security_Common.Ok + diff --git a/api/security/reloadTransportCertificates.js b/api/security/reloadTransportCertificates.js new file mode 100644 index 000000000..ea25c7536 --- /dev/null +++ b/api/security/reloadTransportCertificates.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Reload Transport layer communication certificates. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#reload-transport-certificates - security.reload_transport_certificates} + * + * @memberOf API-Security + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function reloadTransportCertificatesFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/ssl/transport/reloadcerts'; + const method = 'PUT'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = reloadTransportCertificatesFunc; diff --git a/api/security/tenantInfo.d.ts b/api/security/tenantInfo.d.ts new file mode 100644 index 000000000..9b13f25da --- /dev/null +++ b/api/security/tenantInfo.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export type Security_TenantInfo_Request = Global.Params & Record + +export interface Security_TenantInfo_Response extends ApiResponse { + body: Security_TenantInfo_ResponseBody; +} + +export type Security_TenantInfo_ResponseBody = Security_Common.TenantInfo + diff --git a/api/security/tenantInfo.js b/api/security/tenantInfo.js new file mode 100644 index 000000000..e725aa9f8 --- /dev/null +++ b/api/security/tenantInfo.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Retrieves the tenant names if any exist. Only accessible to super admins or kibanaserver user. + *
See Also: {@link undefined - security.tenant_info} + * + * @memberOf API-Security + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function tenantInfoFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/tenantinfo'; + const method = body ? 'POST' : 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = tenantInfoFunc; diff --git a/api/security/updateAuditConfiguration.d.ts b/api/security/updateAuditConfiguration.d.ts new file mode 100644 index 000000000..1d8b874dc --- /dev/null +++ b/api/security/updateAuditConfiguration.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_UpdateAuditConfiguration_Request extends Global.Params { + body: Security_Common.AuditConfig; +} + +export interface Security_UpdateAuditConfiguration_Response extends ApiResponse { + body: Security_UpdateAuditConfiguration_ResponseBody; +} + +export type Security_UpdateAuditConfiguration_ResponseBody = Security_Common.Ok + diff --git a/api/security/updateAuditConfiguration.js b/api/security/updateAuditConfiguration.js new file mode 100644 index 000000000..43e0238e8 --- /dev/null +++ b/api/security/updateAuditConfiguration.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Updates the audit configuration. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#audit-logs - security.update_audit_configuration} + * + * @memberOf API-Security + * + * @param {object} params + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function updateAuditConfigurationFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/audit/config'; + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = updateAuditConfigurationFunc; diff --git a/api/security/updateConfiguration.d.ts b/api/security/updateConfiguration.d.ts new file mode 100644 index 000000000..72d50d069 --- /dev/null +++ b/api/security/updateConfiguration.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_UpdateConfiguration_Request extends Global.Params { + body: Security_Common.DynamicConfig; +} + +export interface Security_UpdateConfiguration_Response extends ApiResponse { + body: Security_UpdateConfiguration_ResponseBody; +} + +export type Security_UpdateConfiguration_ResponseBody = Security_Common.Ok + diff --git a/api/security/updateConfiguration.js b/api/security/updateConfiguration.js new file mode 100644 index 000000000..5943a9cd7 --- /dev/null +++ b/api/security/updateConfiguration.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Adds or updates the existing configuration using the REST API. Only accessible by admins and users with rest api access and only when put or patch is enabled. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#update-configuration - security.update_configuration} + * + * @memberOf API-Security + * + * @param {object} params + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function updateConfigurationFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/securityconfig/config'; + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = updateConfigurationFunc; diff --git a/api/security/updateDistinguishedName.d.ts b/api/security/updateDistinguishedName.d.ts new file mode 100644 index 000000000..7b0809943 --- /dev/null +++ b/api/security/updateDistinguishedName.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_UpdateDistinguishedName_Request extends Global.Params { + body?: Security_Common.PatchOperation; + cluster_name: string; +} + +export interface Security_UpdateDistinguishedName_Response extends ApiResponse { + body: Security_UpdateDistinguishedName_ResponseBody; +} + +export type Security_UpdateDistinguishedName_ResponseBody = Security_Common.Ok + diff --git a/api/security/updateDistinguishedName.js b/api/security/updateDistinguishedName.js new file mode 100644 index 000000000..e51be903a --- /dev/null +++ b/api/security/updateDistinguishedName.js @@ -0,0 +1,50 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Adds or updates the specified distinguished names in the cluster or node allow list. Only accessible to super-admins and with rest-api permissions when enabled. + *
See Also: {@link https://opensearch.org/docs/latest/security/access-control/api/#update-distinguished-names - security.update_distinguished_name} + * + * @memberOf API-Security + * + * @param {object} params + * @param {string} params.cluster_name + * @param {object} [params.body] + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function updateDistinguishedNameFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.cluster_name == null) return handleMissingParam('cluster_name', this, callback); + + let { body, cluster_name, ...querystring } = params; + cluster_name = parsePathParam(cluster_name); + + const path = '/_plugins/_security/api/nodesdn/' + cluster_name; + const method = 'PUT'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = updateDistinguishedNameFunc; diff --git a/api/security/validate.d.ts b/api/security/validate.d.ts new file mode 100644 index 000000000..9c676530a --- /dev/null +++ b/api/security/validate.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export interface Security_Validate_Request extends Global.Params { + accept_invalid?: boolean; +} + +export interface Security_Validate_Response extends ApiResponse { + body: Security_Validate_ResponseBody; +} + +export type Security_Validate_ResponseBody = Security_Common.Ok + diff --git a/api/security/validate.js b/api/security/validate.js new file mode 100644 index 000000000..7f71c9f96 --- /dev/null +++ b/api/security/validate.js @@ -0,0 +1,47 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Checks whether the v6 security configuration is valid and ready to be migrated to v7. + *
See Also: {@link undefined - security.validate} + * + * @memberOf API-Security + * + * @param {object} [params] + * @param {boolean} [params.accept_invalid] + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function validateFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/api/validate'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = validateFunc; diff --git a/api/security/whoAmI.d.ts b/api/security/whoAmI.d.ts new file mode 100644 index 000000000..3a901edfe --- /dev/null +++ b/api/security/whoAmI.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export type Security_WhoAmI_Request = Global.Params & Record + +export interface Security_WhoAmI_Response extends ApiResponse { + body: Security_WhoAmI_ResponseBody; +} + +export type Security_WhoAmI_ResponseBody = Security_Common.WhoAmI + diff --git a/api/security/whoAmI.js b/api/security/whoAmI.js new file mode 100644 index 000000000..89aabe4dc --- /dev/null +++ b/api/security/whoAmI.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Gets the user identity related information for currently logged in user. + *
See Also: {@link undefined - security.who_am_i} + * + * @memberOf API-Security + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function whoAmIFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/whoami'; + const method = body ? 'POST' : 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = whoAmIFunc; diff --git a/api/security/whoAmIProtected.d.ts b/api/security/whoAmIProtected.d.ts new file mode 100644 index 000000000..081056a77 --- /dev/null +++ b/api/security/whoAmIProtected.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Security_Common from '../_types/security._common' + +export type Security_WhoAmIProtected_Request = Global.Params & Record + +export interface Security_WhoAmIProtected_Response extends ApiResponse { + body: Security_WhoAmIProtected_ResponseBody; +} + +export type Security_WhoAmIProtected_ResponseBody = Security_Common.WhoAmI + diff --git a/api/security/whoAmIProtected.js b/api/security/whoAmIProtected.js new file mode 100644 index 000000000..d6adf18d9 --- /dev/null +++ b/api/security/whoAmIProtected.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Gets the user identity related information for currently logged in user. User needs to have access to this endpoint when authorization at REST layer is enabled. + *
See Also: {@link undefined - security.who_am_i_protected} + * + * @memberOf API-Security + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function whoAmIProtectedFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_security/whoamiprotected'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = whoAmIProtectedFunc; diff --git a/api/snapshot/_api.js b/api/snapshot/_api.js new file mode 100644 index 000000000..5b6bcfdaf --- /dev/null +++ b/api/snapshot/_api.js @@ -0,0 +1,46 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Snapshot */ + +function SnapshotApi(bindObj) { + this.cleanupRepository = require('./cleanupRepository').bind(bindObj); + this.clone = require('./clone').bind(bindObj); + this.create = require('./create').bind(bindObj); + this.createRepository = require('./createRepository').bind(bindObj); + this.delete = require('./delete').bind(bindObj); + this.deleteRepository = require('./deleteRepository').bind(bindObj); + this.get = require('./get').bind(bindObj); + this.getRepository = require('./getRepository').bind(bindObj); + this.restore = require('./restore').bind(bindObj); + this.status = require('./status').bind(bindObj); + this.verifyRepository = require('./verifyRepository').bind(bindObj); + + // Deprecated: Use cleanupRepository instead. + this.cleanup_repository = require('./cleanupRepository').bind(bindObj); + // Deprecated: Use createRepository instead. + this.create_repository = require('./createRepository').bind(bindObj); + // Deprecated: Use deleteRepository instead. + this.delete_repository = require('./deleteRepository').bind(bindObj); + // Deprecated: Use getRepository instead. + this.get_repository = require('./getRepository').bind(bindObj); + // Deprecated: Use verifyRepository instead. + this.verify_repository = require('./verifyRepository').bind(bindObj); +} + +module.exports = SnapshotApi; diff --git a/api/snapshot/cleanupRepository.d.ts b/api/snapshot/cleanupRepository.d.ts new file mode 100644 index 000000000..f8cb2c504 --- /dev/null +++ b/api/snapshot/cleanupRepository.d.ts @@ -0,0 +1,36 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Snapshot_CleanupRepository from '../_types/snapshot.cleanup_repository' + +export interface Snapshot_CleanupRepository_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + master_timeout?: Common.Duration; + repository: Common.Name; + timeout?: Common.Duration; +} + +export interface Snapshot_CleanupRepository_Response extends ApiResponse { + body: Snapshot_CleanupRepository_ResponseBody; +} + +export interface Snapshot_CleanupRepository_ResponseBody { + results: Snapshot_CleanupRepository.CleanupRepositoryResults; +} + diff --git a/api/snapshot/cleanupRepository.js b/api/snapshot/cleanupRepository.js new file mode 100644 index 000000000..699aafcf6 --- /dev/null +++ b/api/snapshot/cleanupRepository.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Removes stale data from repository. + *
See Also: {@link https://opensearch.org/docs/latest - snapshot.cleanup_repository} + * + * @memberOf API-Snapshot + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Period to wait for a connection to the master node. + * @param {string} [params.timeout] - Period to wait for a response. + * @param {string} params.repository - Snapshot repository to clean up. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function cleanupRepositoryFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.repository == null) return handleMissingParam('repository', this, callback); + + let { body, repository, ...querystring } = params; + repository = parsePathParam(repository); + + const path = '/_snapshot/' + repository + '/_cleanup'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = cleanupRepositoryFunc; diff --git a/api/snapshot/clone.d.ts b/api/snapshot/clone.d.ts new file mode 100644 index 000000000..acc0213a5 --- /dev/null +++ b/api/snapshot/clone.d.ts @@ -0,0 +1,39 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Snapshot_Clone_Request extends Global.Params { + body: Snapshot_Clone_RequestBody; + cluster_manager_timeout?: Common.Duration; + master_timeout?: Common.Duration; + repository: Common.Name; + snapshot: Common.Name; + target_snapshot: Common.Name; +} + +export interface Snapshot_Clone_RequestBody { + indices: string; +} + +export interface Snapshot_Clone_Response extends ApiResponse { + body: Snapshot_Clone_ResponseBody; +} + +export type Snapshot_Clone_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/snapshot/clone.js b/api/snapshot/clone.js new file mode 100644 index 000000000..aedb11285 --- /dev/null +++ b/api/snapshot/clone.js @@ -0,0 +1,58 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Clones indices from one snapshot into another snapshot in the same repository. + *
See Also: {@link https://opensearch.org/docs/latest - snapshot.clone} + * + * @memberOf API-Snapshot + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Explicit operation timeout for connection to master node + * @param {string} params.repository - A repository name + * @param {string} params.snapshot - The name of the snapshot to clone from + * @param {string} params.target_snapshot - The name of the cloned snapshot to create + * @param {object} params.body - The snapshot clone definition + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function cloneFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.repository == null) return handleMissingParam('repository', this, callback); + if (params.snapshot == null) return handleMissingParam('snapshot', this, callback); + if (params.target_snapshot == null) return handleMissingParam('target_snapshot', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, repository, snapshot, target_snapshot, ...querystring } = params; + repository = parsePathParam(repository); + snapshot = parsePathParam(snapshot); + target_snapshot = parsePathParam(target_snapshot); + + const path = '/_snapshot/' + repository + '/' + snapshot + '/_clone/' + target_snapshot; + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = cloneFunc; diff --git a/api/snapshot/create.d.ts b/api/snapshot/create.d.ts new file mode 100644 index 000000000..6a386b0d3 --- /dev/null +++ b/api/snapshot/create.d.ts @@ -0,0 +1,48 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Snapshot_Common from '../_types/snapshot._common' + +export interface Snapshot_Create_Request extends Global.Params { + body?: Snapshot_Create_RequestBody; + cluster_manager_timeout?: Common.Duration; + master_timeout?: Common.Duration; + repository: Common.Name; + snapshot: Common.Name; + wait_for_completion?: boolean; +} + +export interface Snapshot_Create_RequestBody { + feature_states?: string[]; + ignore_unavailable?: boolean; + include_global_state?: boolean; + indices?: Common.Indices; + metadata?: Common.Metadata; + partial?: boolean; +} + +export interface Snapshot_Create_Response extends ApiResponse { + body: Snapshot_Create_ResponseBody; +} + +export interface Snapshot_Create_ResponseBody { + accepted?: boolean; + snapshot?: Snapshot_Common.SnapshotInfo; +} + diff --git a/api/snapshot/create.js b/api/snapshot/create.js new file mode 100644 index 000000000..645dd8414 --- /dev/null +++ b/api/snapshot/create.js @@ -0,0 +1,56 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Creates a snapshot in a repository. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/snapshots/create-snapshot/ - snapshot.create} + * + * @memberOf API-Snapshot + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {boolean} [params.wait_for_completion=false] - If `true`, the request returns a response when the snapshot is complete. If `false`, the request returns a response when the snapshot initializes. + * @param {string} params.repository - Repository for the snapshot. + * @param {string} params.snapshot - Name of the snapshot. Must be unique in the repository. + * @param {object} [params.body] - The snapshot definition + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function createFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.repository == null) return handleMissingParam('repository', this, callback); + if (params.snapshot == null) return handleMissingParam('snapshot', this, callback); + + let { body, repository, snapshot, ...querystring } = params; + repository = parsePathParam(repository); + snapshot = parsePathParam(snapshot); + + const path = '/_snapshot/' + repository + '/' + snapshot; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = createFunc; diff --git a/api/snapshot/createRepository.d.ts b/api/snapshot/createRepository.d.ts new file mode 100644 index 000000000..4e07b14f1 --- /dev/null +++ b/api/snapshot/createRepository.d.ts @@ -0,0 +1,42 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Snapshot_Common from '../_types/snapshot._common' + +export interface Snapshot_CreateRepository_Request extends Global.Params { + body: Snapshot_CreateRepository_RequestBody; + cluster_manager_timeout?: Common.Duration; + master_timeout?: Common.Duration; + repository: Common.Name; + timeout?: Common.Duration; + verify?: boolean; +} + +export interface Snapshot_CreateRepository_RequestBody { + repository?: Snapshot_Common.Repository; + settings: Snapshot_Common.RepositorySettings; + type: string; +} + +export interface Snapshot_CreateRepository_Response extends ApiResponse { + body: Snapshot_CreateRepository_ResponseBody; +} + +export type Snapshot_CreateRepository_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/snapshot/createRepository.js b/api/snapshot/createRepository.js new file mode 100644 index 000000000..1ea4a8a55 --- /dev/null +++ b/api/snapshot/createRepository.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Creates a repository. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/snapshots/create-repository/ - snapshot.create_repository} + * + * @memberOf API-Snapshot + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Explicit operation timeout for connection to master node + * @param {string} [params.timeout] - Explicit operation timeout + * @param {boolean} [params.verify] - Whether to verify the repository after creation + * @param {string} params.repository - A repository name + * @param {object} params.body - The repository definition + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function createRepositoryFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.repository == null) return handleMissingParam('repository', this, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, repository, ...querystring } = params; + repository = parsePathParam(repository); + + const path = '/_snapshot/' + repository; + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = createRepositoryFunc; diff --git a/api/snapshot/delete.d.ts b/api/snapshot/delete.d.ts new file mode 100644 index 000000000..f52cef298 --- /dev/null +++ b/api/snapshot/delete.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Snapshot_Delete_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + master_timeout?: Common.Duration; + repository: Common.Name; + snapshot: Common.Name; +} + +export interface Snapshot_Delete_Response extends ApiResponse { + body: Snapshot_Delete_ResponseBody; +} + +export type Snapshot_Delete_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/snapshot/delete.js b/api/snapshot/delete.js new file mode 100644 index 000000000..984170992 --- /dev/null +++ b/api/snapshot/delete.js @@ -0,0 +1,54 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Deletes a snapshot. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/snapshots/delete-snapshot/ - snapshot.delete} + * + * @memberOf API-Snapshot + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Explicit operation timeout for connection to master node + * @param {string} params.repository - A repository name + * @param {string} params.snapshot - A comma-separated list of snapshot names + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.repository == null) return handleMissingParam('repository', this, callback); + if (params.snapshot == null) return handleMissingParam('snapshot', this, callback); + + let { body, repository, snapshot, ...querystring } = params; + repository = parsePathParam(repository); + snapshot = parsePathParam(snapshot); + + const path = '/_snapshot/' + repository + '/' + snapshot; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteFunc; diff --git a/api/snapshot/deleteRepository.d.ts b/api/snapshot/deleteRepository.d.ts new file mode 100644 index 000000000..34766e16c --- /dev/null +++ b/api/snapshot/deleteRepository.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Snapshot_DeleteRepository_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + master_timeout?: Common.Duration; + repository: Common.Names; + timeout?: Common.Duration; +} + +export interface Snapshot_DeleteRepository_Response extends ApiResponse { + body: Snapshot_DeleteRepository_ResponseBody; +} + +export type Snapshot_DeleteRepository_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/snapshot/deleteRepository.js b/api/snapshot/deleteRepository.js new file mode 100644 index 000000000..9778b2d9f --- /dev/null +++ b/api/snapshot/deleteRepository.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Deletes a repository. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/snapshots/delete-snapshot-repository/ - snapshot.delete_repository} + * + * @memberOf API-Snapshot + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Explicit operation timeout for connection to master node + * @param {string} [params.timeout] - Explicit operation timeout + * @param {string} params.repository - Name of the snapshot repository to unregister. Wildcard (`*`) patterns are supported. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteRepositoryFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.repository == null) return handleMissingParam('repository', this, callback); + + let { body, repository, ...querystring } = params; + repository = parsePathParam(repository); + + const path = '/_snapshot/' + repository; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteRepositoryFunc; diff --git a/api/snapshot/get.d.ts b/api/snapshot/get.d.ts new file mode 100644 index 000000000..2dd385c72 --- /dev/null +++ b/api/snapshot/get.d.ts @@ -0,0 +1,42 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Snapshot_Get from '../_types/snapshot.get' +import * as Snapshot_Common from '../_types/snapshot._common' + +export interface Snapshot_Get_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + ignore_unavailable?: boolean; + master_timeout?: Common.Duration; + repository: Common.Name; + snapshot: Common.Names; + verbose?: boolean; +} + +export interface Snapshot_Get_Response extends ApiResponse { + body: Snapshot_Get_ResponseBody; +} + +export interface Snapshot_Get_ResponseBody { + remaining: number; + responses?: Snapshot_Get.SnapshotResponseItem[]; + snapshots?: Snapshot_Common.SnapshotInfo[]; + total: number; +} + diff --git a/api/snapshot/get.js b/api/snapshot/get.js new file mode 100644 index 000000000..7c7e43f0e --- /dev/null +++ b/api/snapshot/get.js @@ -0,0 +1,56 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Returns information about a snapshot. + *
See Also: {@link https://opensearch.org/docs/latest - snapshot.get} + * + * @memberOf API-Snapshot + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {boolean} [params.ignore_unavailable=false] - If false, the request returns an error for any snapshots that are unavailable. + * @param {string} [params.master_timeout] DEPRECATED - 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. + * @param {boolean} [params.verbose] - If true, returns additional information about each snapshot such as the version of OpenSearch which took the snapshot, the start and end times of the snapshot, and the number of shards snapshotted. + * @param {string} params.repository - Comma-separated list of snapshot repository names used to limit the request. Wildcard (*) expressions are supported. + * @param {string} params.snapshot - Comma-separated list of snapshot names to retrieve. Also accepts wildcards (*). - To get information about all snapshots in a registered repository, use a wildcard (*) or _all. - To get information about any snapshots that are currently running, use _current. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.repository == null) return handleMissingParam('repository', this, callback); + if (params.snapshot == null) return handleMissingParam('snapshot', this, callback); + + let { body, repository, snapshot, ...querystring } = params; + repository = parsePathParam(repository); + snapshot = parsePathParam(snapshot); + + const path = '/_snapshot/' + repository + '/' + snapshot; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getFunc; diff --git a/api/snapshot/getRepository.d.ts b/api/snapshot/getRepository.d.ts new file mode 100644 index 000000000..f84f0a1a8 --- /dev/null +++ b/api/snapshot/getRepository.d.ts @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Snapshot_Common from '../_types/snapshot._common' + +export interface Snapshot_GetRepository_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + local?: boolean; + master_timeout?: Common.Duration; + repository?: Common.Names; +} + +export interface Snapshot_GetRepository_Response extends ApiResponse { + body: Snapshot_GetRepository_ResponseBody; +} + +export type Snapshot_GetRepository_ResponseBody = Record + diff --git a/api/snapshot/getRepository.js b/api/snapshot/getRepository.js new file mode 100644 index 000000000..61cfa9f43 --- /dev/null +++ b/api/snapshot/getRepository.js @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns information about a repository. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/snapshots/get-snapshot-repository/ - snapshot.get_repository} + * + * @memberOf API-Snapshot + * + * @param {object} [params] + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {boolean} [params.local=false] - Return local information, do not retrieve the state from cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Explicit operation timeout for connection to master node + * @param {string} [params.repository] - A comma-separated list of repository names + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getRepositoryFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, repository, ...querystring } = params; + repository = parsePathParam(repository); + + const path = ['/_snapshot/', repository].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getRepositoryFunc; diff --git a/api/snapshot/restore.d.ts b/api/snapshot/restore.d.ts new file mode 100644 index 000000000..4152159df --- /dev/null +++ b/api/snapshot/restore.d.ts @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Indices_Common from '../_types/indices._common' +import * as Snapshot_Restore from '../_types/snapshot.restore' + +export interface Snapshot_Restore_Request extends Global.Params { + body?: Snapshot_Restore_RequestBody; + cluster_manager_timeout?: Common.Duration; + master_timeout?: Common.Duration; + repository: Common.Name; + snapshot: Common.Name; + wait_for_completion?: boolean; +} + +export interface Snapshot_Restore_RequestBody { + feature_states?: string[]; + ignore_index_settings?: string[]; + ignore_unavailable?: boolean; + include_aliases?: boolean; + include_global_state?: boolean; + index_settings?: Indices_Common.IndexSettings; + indices?: Common.Indices; + partial?: boolean; + rename_pattern?: string; + rename_replacement?: string; +} + +export interface Snapshot_Restore_Response extends ApiResponse { + body: Snapshot_Restore_ResponseBody; +} + +export interface Snapshot_Restore_ResponseBody { + snapshot: Snapshot_Restore.SnapshotRestore; +} + diff --git a/api/snapshot/restore.js b/api/snapshot/restore.js new file mode 100644 index 000000000..9c2172bd9 --- /dev/null +++ b/api/snapshot/restore.js @@ -0,0 +1,56 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Restores a snapshot. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/snapshots/restore-snapshot/ - snapshot.restore} + * + * @memberOf API-Snapshot + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Explicit operation timeout for connection to master node + * @param {boolean} [params.wait_for_completion=false] - Should this request wait until the operation has completed before returning + * @param {string} params.repository - A repository name + * @param {string} params.snapshot - A snapshot name + * @param {object} [params.body] - Details of what to restore + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function restoreFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.repository == null) return handleMissingParam('repository', this, callback); + if (params.snapshot == null) return handleMissingParam('snapshot', this, callback); + + let { body, repository, snapshot, ...querystring } = params; + repository = parsePathParam(repository); + snapshot = parsePathParam(snapshot); + + const path = '/_snapshot/' + repository + '/' + snapshot + '/_restore'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = restoreFunc; diff --git a/api/snapshot/status.d.ts b/api/snapshot/status.d.ts new file mode 100644 index 000000000..5e2cfa7f6 --- /dev/null +++ b/api/snapshot/status.d.ts @@ -0,0 +1,37 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Snapshot_Common from '../_types/snapshot._common' + +export interface Snapshot_Status_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + ignore_unavailable?: boolean; + master_timeout?: Common.Duration; + repository?: Common.Name; + snapshot?: Common.Names; +} + +export interface Snapshot_Status_Response extends ApiResponse { + body: Snapshot_Status_ResponseBody; +} + +export interface Snapshot_Status_ResponseBody { + snapshots: Snapshot_Common.Status[]; +} + diff --git a/api/snapshot/status.js b/api/snapshot/status.js new file mode 100644 index 000000000..416e9fbf7 --- /dev/null +++ b/api/snapshot/status.js @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Returns information about the status of a snapshot. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/snapshots/get-snapshot-status/ - snapshot.status} + * + * @memberOf API-Snapshot + * + * @param {object} [params] + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {boolean} [params.ignore_unavailable=false] - Whether to ignore unavailable snapshots, defaults to false which means a SnapshotMissingException is thrown + * @param {string} [params.master_timeout] DEPRECATED - Explicit operation timeout for connection to master node + * @param {string} [params.repository] - A repository name + * @param {string} [params.snapshot] - A comma-separated list of snapshot names + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function statusFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, repository, snapshot, ...querystring } = params; + repository = parsePathParam(repository); + snapshot = parsePathParam(snapshot); + + const path = ['/_snapshot/', repository, '/', snapshot, '/_status'].filter(c => c).join('').replace('//', '/'); + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = statusFunc; diff --git a/api/snapshot/verifyRepository.d.ts b/api/snapshot/verifyRepository.d.ts new file mode 100644 index 000000000..33863a1f4 --- /dev/null +++ b/api/snapshot/verifyRepository.d.ts @@ -0,0 +1,36 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Snapshot_VerifyRepository from '../_types/snapshot.verify_repository' + +export interface Snapshot_VerifyRepository_Request extends Global.Params { + cluster_manager_timeout?: Common.Duration; + master_timeout?: Common.Duration; + repository: Common.Name; + timeout?: Common.Duration; +} + +export interface Snapshot_VerifyRepository_Response extends ApiResponse { + body: Snapshot_VerifyRepository_ResponseBody; +} + +export interface Snapshot_VerifyRepository_ResponseBody { + nodes: Record; +} + diff --git a/api/snapshot/verifyRepository.js b/api/snapshot/verifyRepository.js new file mode 100644 index 000000000..ff5c6abef --- /dev/null +++ b/api/snapshot/verifyRepository.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Verifies a repository. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/snapshots/verify-snapshot-repository/ - snapshot.verify_repository} + * + * @memberOf API-Snapshot + * + * @param {object} params + * @param {string} [params.cluster_manager_timeout] - Operation timeout for connection to cluster-manager node. + * @param {string} [params.master_timeout] DEPRECATED - Explicit operation timeout for connection to master node + * @param {string} [params.timeout] - Explicit operation timeout + * @param {string} params.repository - A repository name + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function verifyRepositoryFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.repository == null) return handleMissingParam('repository', this, callback); + + let { body, repository, ...querystring } = params; + repository = parsePathParam(repository); + + const path = '/_snapshot/' + repository + '/_verify'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = verifyRepositoryFunc; diff --git a/api/sql/_api.js b/api/sql/_api.js new file mode 100644 index 000000000..8bcfd53e6 --- /dev/null +++ b/api/sql/_api.js @@ -0,0 +1,35 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Sql */ + +function SqlApi(bindObj) { + this.close = require('./close').bind(bindObj); + this.explain = require('./explain').bind(bindObj); + this.getStats = require('./getStats').bind(bindObj); + this.postStats = require('./postStats').bind(bindObj); + this.query = require('./query').bind(bindObj); + this.settings = require('./settings').bind(bindObj); + + // Deprecated: Use getStats instead. + this.get_stats = require('./getStats').bind(bindObj); + // Deprecated: Use postStats instead. + this.post_stats = require('./postStats').bind(bindObj); +} + +module.exports = SqlApi; diff --git a/api/sql/close.d.ts b/api/sql/close.d.ts new file mode 100644 index 000000000..87c9c2b1a --- /dev/null +++ b/api/sql/close.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Sql_Common from '../_types/sql._common' + +export interface Sql_Close_Request extends Global.Params { + body: Sql_Common.SqlClose; + format?: string; + sanitize?: boolean; +} + +export interface Sql_Close_Response extends ApiResponse { + body: Sql_Close_ResponseBody; +} + +export type Sql_Close_ResponseBody = Sql_Common.SqlCloseResponse + diff --git a/api/sql/close.js b/api/sql/close.js new file mode 100644 index 000000000..280ac1dbb --- /dev/null +++ b/api/sql/close.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Clear the cursor context. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ - sql.close} + * + * @memberOf API-Sql + * + * @param {object} params + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {boolean} [params.sanitize=true] - Specifies whether to escape special characters in the results + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function closeFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_sql/close'; + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = closeFunc; diff --git a/api/sql/explain.d.ts b/api/sql/explain.d.ts new file mode 100644 index 000000000..988b4c3da --- /dev/null +++ b/api/sql/explain.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Sql_Common from '../_types/sql._common' + +export interface Sql_Explain_Request extends Global.Params { + body: Sql_Common.Explain; + format?: string; + sanitize?: boolean; +} + +export interface Sql_Explain_Response extends ApiResponse { + body: Sql_Explain_ResponseBody; +} + +export type Sql_Explain_ResponseBody = Sql_Common.ExplainResponse + diff --git a/api/sql/explain.js b/api/sql/explain.js new file mode 100644 index 000000000..aa2c32859 --- /dev/null +++ b/api/sql/explain.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Shows how a query is executed against OpenSearch. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ - sql.explain} + * + * @memberOf API-Sql + * + * @param {object} params + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {boolean} [params.sanitize=true] - Specifies whether to escape special characters in the results + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function explainFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_sql/_explain'; + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = explainFunc; diff --git a/api/sql/getStats.d.ts b/api/sql/getStats.d.ts new file mode 100644 index 000000000..23494b0e5 --- /dev/null +++ b/api/sql/getStats.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' + +export interface Sql_GetStats_Request extends Global.Params { + format?: string; + sanitize?: boolean; +} + +export interface Sql_GetStats_Response extends ApiResponse { + body: Sql_GetStats_ResponseBody; +} + +export type Sql_GetStats_ResponseBody = Record + diff --git a/api/sql/getStats.js b/api/sql/getStats.js new file mode 100644 index 000000000..3211a88fb --- /dev/null +++ b/api/sql/getStats.js @@ -0,0 +1,48 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Collect metrics for the plugin within the interval. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ - sql.get_stats} + * + * @memberOf API-Sql + * + * @param {object} [params] + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {boolean} [params.sanitize=true] - Specifies whether to escape special characters in the results + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getStatsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_sql/stats'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getStatsFunc; diff --git a/api/sql/postStats.d.ts b/api/sql/postStats.d.ts new file mode 100644 index 000000000..537efce21 --- /dev/null +++ b/api/sql/postStats.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Sql_Common from '../_types/sql._common' + +export interface Sql_PostStats_Request extends Global.Params { + body: Sql_Common.Stats; + format?: string; + sanitize?: boolean; +} + +export interface Sql_PostStats_Response extends ApiResponse { + body: Sql_PostStats_ResponseBody; +} + +export type Sql_PostStats_ResponseBody = Record + diff --git a/api/sql/postStats.js b/api/sql/postStats.js new file mode 100644 index 000000000..7906f5626 --- /dev/null +++ b/api/sql/postStats.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * By a stats endpoint, you are able to collect metrics for the plugin within the interval. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/sql/monitoring/ - sql.post_stats} + * + * @memberOf API-Sql + * + * @param {object} params + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {boolean} [params.sanitize=true] - Specifies whether to escape special characters in the results + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function postStatsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_sql/stats'; + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = postStatsFunc; diff --git a/api/sql/query.d.ts b/api/sql/query.d.ts new file mode 100644 index 000000000..8570d7427 --- /dev/null +++ b/api/sql/query.d.ts @@ -0,0 +1,32 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Sql_Common from '../_types/sql._common' + +export interface Sql_Query_Request extends Global.Params { + body: Sql_Common.Query; + format?: string; + sanitize?: boolean; +} + +export interface Sql_Query_Response extends ApiResponse { + body: Sql_Query_ResponseBody; +} + +export type Sql_Query_ResponseBody = Sql_Common.QueryResponse + diff --git a/api/sql/query.js b/api/sql/query.js new file mode 100644 index 000000000..bc986ed81 --- /dev/null +++ b/api/sql/query.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Send a SQL/PPL query to the SQL plugin. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/sql/sql-ppl-api/ - sql.query} + * + * @memberOf API-Sql + * + * @param {object} params + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {boolean} [params.sanitize=true] - Specifies whether to escape special characters in the results + * @param {object} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function queryFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_sql'; + const method = 'POST'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = queryFunc; diff --git a/api/sql/settings.d.ts b/api/sql/settings.d.ts new file mode 100644 index 000000000..082b1e065 --- /dev/null +++ b/api/sql/settings.d.ts @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Sql_Common from '../_types/sql._common' + +export interface Sql_Settings_Request extends Global.Params { + body: Sql_Settings_RequestBody; + format?: string; +} + +export type Sql_Settings_RequestBody = Sql_Common.SqlSettingsPlain | Sql_Common.SqlSettings + +export interface Sql_Settings_Response extends ApiResponse { + body: Sql_Settings_ResponseBody; +} + +export type Sql_Settings_ResponseBody = Sql_Common.SqlSettingsResponse + diff --git a/api/sql/settings.js b/api/sql/settings.js new file mode 100644 index 000000000..050bec68a --- /dev/null +++ b/api/sql/settings.js @@ -0,0 +1,48 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, handleMissingParam } = require('../utils'); + +/** + * Adds SQL settings to the standard OpenSearch cluster settings. + *
See Also: {@link https://opensearch.org/docs/latest/search-plugins/sql/settings/ - sql.settings} + * + * @memberOf API-Sql + * + * @param {object} params + * @param {string} [params.format] - A short version of the Accept header, e.g. json, yaml. + * @param {string} params.body + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function settingsFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.body == null) return handleMissingParam('body', this, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_query/settings'; + const method = 'PUT'; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = settingsFunc; diff --git a/api/tasks/_api.js b/api/tasks/_api.js new file mode 100644 index 000000000..260c74ae5 --- /dev/null +++ b/api/tasks/_api.js @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Tasks */ + +function TasksApi(bindObj) { + this.cancel = require('./cancel').bind(bindObj); + this.get = require('./get').bind(bindObj); + this.list = require('./list').bind(bindObj); + +} + +module.exports = TasksApi; diff --git a/api/tasks/cancel.d.ts b/api/tasks/cancel.d.ts new file mode 100644 index 000000000..dbfdca4b0 --- /dev/null +++ b/api/tasks/cancel.d.ts @@ -0,0 +1,35 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Tasks_Common from '../_types/tasks._common' + +export interface Tasks_Cancel_Request extends Global.Params { + actions?: string | string[]; + nodes?: string[]; + parent_task_id?: string; + task_id?: Common.TaskId; + wait_for_completion?: boolean; +} + +export interface Tasks_Cancel_Response extends ApiResponse { + body: Tasks_Cancel_ResponseBody; +} + +export type Tasks_Cancel_ResponseBody = Tasks_Common.TaskListResponseBase + diff --git a/api/tasks/cancel.js b/api/tasks/cancel.js new file mode 100644 index 000000000..544ec6b3c --- /dev/null +++ b/api/tasks/cancel.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam } = require('../utils'); + +/** + * Cancels a task, if it can be cancelled through an API. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/tasks/#task-canceling - tasks.cancel} + * + * @memberOf API-Tasks + * + * @param {object} [params] + * @param {string} [params.actions] - Comma-separated list or wildcard expression of actions used to limit the request. + * @param {array} [params.nodes] - Comma-separated list of node IDs or names used to limit the request. + * @param {string} [params.parent_task_id] - Parent task ID used to limit the tasks. + * @param {boolean} [params.wait_for_completion=false] - Should the request block until the cancellation of the task and its descendant tasks is completed. Defaults to false + * @param {string} [params.task_id] - ID of the task. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function cancelFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, task_id, ...querystring } = params; + task_id = parsePathParam(task_id); + + const path = ['/_tasks/', task_id, '/_cancel'].filter(c => c).join('').replace('//', '/'); + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = cancelFunc; diff --git a/api/tasks/get.d.ts b/api/tasks/get.d.ts new file mode 100644 index 000000000..9dea35643 --- /dev/null +++ b/api/tasks/get.d.ts @@ -0,0 +1,38 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Tasks_Common from '../_types/tasks._common' + +export interface Tasks_Get_Request extends Global.Params { + task_id: Common.Id; + timeout?: Common.Duration; + wait_for_completion?: boolean; +} + +export interface Tasks_Get_Response extends ApiResponse { + body: Tasks_Get_ResponseBody; +} + +export interface Tasks_Get_ResponseBody { + completed: boolean; + error?: Common.ErrorCause; + response?: Record; + task: Tasks_Common.TaskInfo; +} + diff --git a/api/tasks/get.js b/api/tasks/get.js new file mode 100644 index 000000000..275298047 --- /dev/null +++ b/api/tasks/get.js @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Returns information about a task. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/tasks/ - tasks.get} + * + * @memberOf API-Tasks + * + * @param {object} params + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {boolean} [params.wait_for_completion=false] - If `true`, the request blocks until the task has completed. + * @param {string} params.task_id - ID of the task. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.task_id == null) return handleMissingParam('task_id', this, callback); + + let { body, task_id, ...querystring } = params; + task_id = parsePathParam(task_id); + + const path = '/_tasks/' + task_id; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getFunc; diff --git a/api/tasks/list.d.ts b/api/tasks/list.d.ts new file mode 100644 index 000000000..7adf1ea9c --- /dev/null +++ b/api/tasks/list.d.ts @@ -0,0 +1,37 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Tasks_Common from '../_types/tasks._common' +import * as Common from '../_types/_common' + +export interface Tasks_List_Request extends Global.Params { + actions?: string | string[]; + detailed?: boolean; + group_by?: Tasks_Common.GroupBy; + nodes?: string[]; + parent_task_id?: Common.Id; + timeout?: Common.Duration; + wait_for_completion?: boolean; +} + +export interface Tasks_List_Response extends ApiResponse { + body: Tasks_List_ResponseBody; +} + +export type Tasks_List_ResponseBody = Tasks_Common.TaskListResponseBase + diff --git a/api/tasks/list.js b/api/tasks/list.js new file mode 100644 index 000000000..83d0e4a97 --- /dev/null +++ b/api/tasks/list.js @@ -0,0 +1,53 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns a list of tasks. + *
See Also: {@link https://opensearch.org/docs/latest/api-reference/tasks/ - tasks.list} + * + * @memberOf API-Tasks + * + * @param {object} [params] + * @param {string} [params.actions] - Comma-separated list or wildcard expression of actions used to limit the request. + * @param {boolean} [params.detailed=false] - If `true`, the response includes detailed information about shard recoveries. + * @param {string} [params.group_by] - Key used to group tasks in the response. + * @param {array} [params.nodes] - Comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes. + * @param {string} [params.parent_task_id] - Parent task ID used to limit returned information. To return all tasks, omit this parameter or use a value of `-1`. + * @param {string} [params.timeout] - Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. + * @param {boolean} [params.wait_for_completion=false] - If `true`, the request blocks until the operation is complete. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function listFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_tasks'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = listFunc; diff --git a/api/transforms/_api.js b/api/transforms/_api.js new file mode 100644 index 000000000..637b2c58f --- /dev/null +++ b/api/transforms/_api.js @@ -0,0 +1,33 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +/** @namespace API-Transforms */ + +function TransformsApi(bindObj) { + this.delete = require('./delete').bind(bindObj); + this.explain = require('./explain').bind(bindObj); + this.get = require('./get').bind(bindObj); + this.preview = require('./preview').bind(bindObj); + this.put = require('./put').bind(bindObj); + this.search = require('./search').bind(bindObj); + this.start = require('./start').bind(bindObj); + this.stop = require('./stop').bind(bindObj); + +} + +module.exports = TransformsApi; diff --git a/api/transforms/delete.d.ts b/api/transforms/delete.d.ts new file mode 100644 index 000000000..822c64b4b --- /dev/null +++ b/api/transforms/delete.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Transforms_Delete_Request extends Global.Params { + id: Common.Id; +} + +export interface Transforms_Delete_Response extends ApiResponse { + body: Transforms_Delete_ResponseBody; +} + +export type Transforms_Delete_ResponseBody = Record + diff --git a/api/transforms/delete.js b/api/transforms/delete.js new file mode 100644 index 000000000..6b8dee09e --- /dev/null +++ b/api/transforms/delete.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Delete an index transform. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#delete-a-transform-job - transforms.delete} + * + * @memberOf API-Transforms + * + * @param {object} params + * @param {string} params.id - Transform to delete + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function deleteFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + + let { body, id, ...querystring } = params; + id = parsePathParam(id); + + const path = '/_plugins/_transform/' + id; + const method = 'DELETE'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = deleteFunc; diff --git a/api/transforms/explain.d.ts b/api/transforms/explain.d.ts new file mode 100644 index 000000000..9a5770bbe --- /dev/null +++ b/api/transforms/explain.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Transforms_Common from '../_types/transforms._common' + +export interface Transforms_Explain_Request extends Global.Params { + id: Common.Id; +} + +export interface Transforms_Explain_Response extends ApiResponse { + body: Transforms_Explain_ResponseBody; +} + +export type Transforms_Explain_ResponseBody = Transforms_Common.ExplainResponse + diff --git a/api/transforms/explain.js b/api/transforms/explain.js new file mode 100644 index 000000000..06241d293 --- /dev/null +++ b/api/transforms/explain.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Returns the status and metadata of a transform job. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#get-the-status-of-a-transform-job - transforms.explain} + * + * @memberOf API-Transforms + * + * @param {object} params + * @param {string} params.id - Transform to explain + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function explainFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + + let { body, id, ...querystring } = params; + id = parsePathParam(id); + + const path = '/_plugins/_transform/' + id + '/_explain'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = explainFunc; diff --git a/api/transforms/get.d.ts b/api/transforms/get.d.ts new file mode 100644 index 000000000..3febb4ada --- /dev/null +++ b/api/transforms/get.d.ts @@ -0,0 +1,31 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' +import * as Transforms_Common from '../_types/transforms._common' + +export interface Transforms_Get_Request extends Global.Params { + id: Common.Id; +} + +export interface Transforms_Get_Response extends ApiResponse { + body: Transforms_Get_ResponseBody; +} + +export type Transforms_Get_ResponseBody = Transforms_Common.TransformEntity + diff --git a/api/transforms/get.js b/api/transforms/get.js new file mode 100644 index 000000000..d79d97d0c --- /dev/null +++ b/api/transforms/get.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Returns the status and metadata of a transform job. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#get-a-transform-jobs-details - transforms.get} + * + * @memberOf API-Transforms + * + * @param {object} params + * @param {string} params.id - Transform to access + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function getFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + + let { body, id, ...querystring } = params; + id = parsePathParam(id); + + const path = '/_plugins/_transform/' + id; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = getFunc; diff --git a/api/transforms/preview.d.ts b/api/transforms/preview.d.ts new file mode 100644 index 000000000..68ee16c4e --- /dev/null +++ b/api/transforms/preview.d.ts @@ -0,0 +1,28 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Transforms_Common from '../_types/transforms._common' + +export type Transforms_Preview_Request = Global.Params & Record + +export interface Transforms_Preview_Response extends ApiResponse { + body: Transforms_Preview_ResponseBody; +} + +export type Transforms_Preview_ResponseBody = Transforms_Common.Preview + diff --git a/api/transforms/preview.js b/api/transforms/preview.js new file mode 100644 index 000000000..97b3a8d06 --- /dev/null +++ b/api/transforms/preview.js @@ -0,0 +1,45 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns a preview of what a transformed index would look like. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#preview-a-transform-jobs-results - transforms.preview} + * + * @memberOf API-Transforms + * + * @param {object} [params] - (Unused) + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function previewFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_transform/_preview'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = previewFunc; diff --git a/api/transforms/put.d.ts b/api/transforms/put.d.ts new file mode 100644 index 000000000..bcd8db800 --- /dev/null +++ b/api/transforms/put.d.ts @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Transforms_Common from '../_types/transforms._common' +import * as Common from '../_types/_common' + +export interface Transforms_Put_Request extends Global.Params { + body?: Transforms_Common.Transform; + id: Common.Id; + if_primary_term?: number; + if_seq_no?: Common.SequenceNumber; +} + +export interface Transforms_Put_Response extends ApiResponse { + body: Transforms_Put_ResponseBody; +} + +export type Transforms_Put_ResponseBody = Transforms_Common.TransformEntity + diff --git a/api/transforms/put.js b/api/transforms/put.js new file mode 100644 index 000000000..9f607730d --- /dev/null +++ b/api/transforms/put.js @@ -0,0 +1,52 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Create an index transform, or update a transform if if_seq_no and if_primary_term are provided. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#create-a-transform-job - transforms.put} + * + * @memberOf API-Transforms + * + * @param {object} params + * @param {number} [params.if_primary_term] - Only perform the operation if the document has this primary term. + * @param {number} [params.if_seq_no] - Only perform the operation if the document has this sequence number. + * @param {string} params.id - Transform to create/update + * @param {object} [params.body] + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function putFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + + let { body, id, ...querystring } = params; + id = parsePathParam(id); + + const path = '/_plugins/_transform/' + id; + const method = 'PUT'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = putFunc; diff --git a/api/transforms/search.d.ts b/api/transforms/search.d.ts new file mode 100644 index 000000000..e185a04c3 --- /dev/null +++ b/api/transforms/search.d.ts @@ -0,0 +1,34 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Transforms_Common from '../_types/transforms._common' + +export interface Transforms_Search_Request extends Global.Params { + from?: number; + search?: string; + size?: number; + sortDirection?: string; + sortField?: string; +} + +export interface Transforms_Search_Response extends ApiResponse { + body: Transforms_Search_ResponseBody; +} + +export type Transforms_Search_ResponseBody = Transforms_Common.TransformsResponse + diff --git a/api/transforms/search.js b/api/transforms/search.js new file mode 100644 index 000000000..2b3412843 --- /dev/null +++ b/api/transforms/search.js @@ -0,0 +1,51 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments } = require('../utils'); + +/** + * Returns the details of all transform jobs. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#get-a-transform-jobs-details - transforms.search} + * + * @memberOf API-Transforms + * + * @param {object} [params] + * @param {number} [params.from] - The starting transform to return. Default is `0`. + * @param {string} [params.search] - The search term to use to filter results. + * @param {number} [params.size] - Specifies the number of transforms to return. Default is `10`. + * @param {string} [params.sortDirection] - Specifies the direction to sort results in. Can be `ASC` or `DESC`. Default is `ASC`. + * @param {string} [params.sortField] - The field to sort results with. + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function searchFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + + let { body, ...querystring } = params; + + const path = '/_plugins/_transform'; + const method = 'GET'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = searchFunc; diff --git a/api/transforms/start.d.ts b/api/transforms/start.d.ts new file mode 100644 index 000000000..8c32ba6e8 --- /dev/null +++ b/api/transforms/start.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Transforms_Start_Request extends Global.Params { + id: Common.Id; +} + +export interface Transforms_Start_Response extends ApiResponse { + body: Transforms_Start_ResponseBody; +} + +export type Transforms_Start_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/transforms/start.js b/api/transforms/start.js new file mode 100644 index 000000000..8ff5cbc09 --- /dev/null +++ b/api/transforms/start.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Start transform. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#start-a-transform-job - transforms.start} + * + * @memberOf API-Transforms + * + * @param {object} params + * @param {string} params.id - Transform to start + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function startFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + + let { body, id, ...querystring } = params; + id = parsePathParam(id); + + const path = '/_plugins/_transform/' + id + '/_start'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = startFunc; diff --git a/api/transforms/stop.d.ts b/api/transforms/stop.d.ts new file mode 100644 index 000000000..7862bfb2f --- /dev/null +++ b/api/transforms/stop.d.ts @@ -0,0 +1,30 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +import { ApiResponse } from '../../lib/Transport' +import * as Global from '../_types/_global' +import * as Common from '../_types/_common' + +export interface Transforms_Stop_Request extends Global.Params { + id: Common.Id; +} + +export interface Transforms_Stop_Response extends ApiResponse { + body: Transforms_Stop_ResponseBody; +} + +export type Transforms_Stop_ResponseBody = Common.AcknowledgedResponseBase + diff --git a/api/transforms/stop.js b/api/transforms/stop.js new file mode 100644 index 000000000..f43c81726 --- /dev/null +++ b/api/transforms/stop.js @@ -0,0 +1,49 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * This file was generated from the OpenSearch API Spec. Do NOT edit it + * manually. If you want to make changes, either update the spec or + * modify the API generator. + */ + +'use strict'; + +const { normalizeArguments, parsePathParam, handleMissingParam } = require('../utils'); + +/** + * Stop transform. + *
See Also: {@link https://opensearch.org/docs/latest/im-plugin/index-transforms/transforms-apis/#stop-a-transform-job - transforms.stop} + * + * @memberOf API-Transforms + * + * @param {object} params + * @param {string} params.id - Transform to stop + * + * @param {TransportRequestOptions} [options] - Options for {@link Transport#request} + * @param {function} [callback] - Callback that handles errors and response + * + * @returns {{abort: function(), then: function(), catch: function()}|Promise|*} + */ +function stopFunc(params, options, callback) { + [params, options, callback] = normalizeArguments(params, options, callback); + if (params.id == null) return handleMissingParam('id', this, callback); + + let { body, id, ...querystring } = params; + id = parsePathParam(id); + + const path = '/_plugins/_transform/' + id + '/_stop'; + const method = 'POST'; + body = body || ''; + + return this.transport.request({ method, path, querystring, body }, options, callback); +} + +module.exports = stopFunc; diff --git a/api/types.d.ts b/api/types.d.ts deleted file mode 100644 index e0089dd6b..000000000 --- a/api/types.d.ts +++ /dev/null @@ -1,10014 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -export interface BulkCreateOperation extends BulkOperation { } - -export interface BulkCreateResponseItem extends BulkResponseItemBase { } - -export interface BulkDeleteOperation extends BulkOperation { } - -export interface BulkDeleteResponseItem extends BulkResponseItemBase { } - -export interface BulkIndexOperation extends BulkOperation { } - -export interface BulkIndexResponseItem extends BulkResponseItemBase { } - -export interface BulkOperation { - _id?: Id; - _index?: IndexName; - retry_on_conflict?: integer; - routing?: Routing; - version?: VersionNumber; - version_type?: VersionType; -} - -export interface BulkOperationContainer { - index?: BulkIndexOperation; - create?: BulkCreateOperation; - update?: BulkUpdateOperation; - delete?: BulkDeleteOperation; -} - -export interface BulkRequest extends RequestBase { - index?: IndexName; - pipeline?: string; - refresh?: Refresh; - routing?: Routing; - _source?: boolean | Fields; - _source_excludes?: Fields; - _source_includes?: Fields; - timeout?: Time; - wait_for_active_shards?: WaitForActiveShards; - require_alias?: boolean; - body?: (BulkOperationContainer | TSource)[]; -} - -export interface BulkResponse { - errors: boolean; - items: BulkResponseItemContainer[]; - took: long; - ingest_took?: long; -} - -export interface BulkResponseItemBase { - _id?: string | null; - _index: string; - status: integer; - error?: ErrorCause; - _primary_term?: long; - result?: string; - _seq_no?: SequenceNumber; - _shards?: ShardStatistics; - _version?: VersionNumber; - forced_refresh?: boolean; - get?: InlineGet>; -} - -export interface BulkResponseItemContainer { - index?: BulkIndexResponseItem; - create?: BulkCreateResponseItem; - update?: BulkUpdateResponseItem; - delete?: BulkDeleteResponseItem; -} - -export interface BulkUpdateOperation extends BulkOperation { } - -export interface BulkUpdateResponseItem extends BulkResponseItemBase { } - -export interface ClearScrollRequest extends RequestBase { - scroll_id?: Ids; - body?: { - scroll_id?: Ids; - }; -} - -export interface ClearScrollResponse { - succeeded: boolean; - num_freed: integer; -} - -export interface CountRequest extends RequestBase { - index?: Indices; - allow_no_indices?: boolean; - analyzer?: string; - analyze_wildcard?: boolean; - default_operator?: DefaultOperator; - df?: string; - expand_wildcards?: ExpandWildcards; - ignore_throttled?: boolean; - ignore_unavailable?: boolean; - lenient?: boolean; - min_score?: double; - preference?: string; - query_on_query_string?: string; - routing?: Routing; - terminate_after?: long; - q?: string; - body?: { - query?: QueryDslQueryContainer; - }; -} - -export interface CountResponse { - count: long; - _shards: ShardStatistics; -} - -export interface CreateRequest extends RequestBase { - id: Id; - index: IndexName; - pipeline?: string; - refresh?: Refresh; - routing?: Routing; - timeout?: Time; - version?: VersionNumber; - version_type?: VersionType; - wait_for_active_shards?: WaitForActiveShards; - body?: TDocument; -} - -export interface CreateResponse extends WriteResponseBase { } - -export interface DeleteRequest extends RequestBase { - id: Id; - index: IndexName; - if_primary_term?: long; - if_seq_no?: SequenceNumber; - refresh?: Refresh; - routing?: Routing; - timeout?: Time; - version?: VersionNumber; - version_type?: VersionType; - wait_for_active_shards?: WaitForActiveShards; -} - -export interface DeleteResponse extends WriteResponseBase { } - -export interface DeleteByQueryRequest extends RequestBase { - index: Indices; - allow_no_indices?: boolean; - analyzer?: string; - analyze_wildcard?: boolean; - conflicts?: Conflicts; - default_operator?: DefaultOperator; - df?: string; - expand_wildcards?: ExpandWildcards; - from?: long; - ignore_unavailable?: boolean; - lenient?: boolean; - max_docs?: long; - preference?: string; - refresh?: boolean; - request_cache?: boolean; - requests_per_second?: long; - routing?: Routing; - q?: string; - scroll?: Time; - scroll_size?: long; - search_timeout?: Time; - search_type?: SearchType; - size?: long; - slices?: long; - sort?: string[]; - _source?: boolean | Fields; - _source_excludes?: Fields; - _source_includes?: Fields; - stats?: string[]; - terminate_after?: long; - timeout?: Time; - version?: boolean; - wait_for_active_shards?: WaitForActiveShards; - wait_for_completion?: boolean; - body?: { - max_docs?: long; - query?: QueryDslQueryContainer; - slice?: SlicedScroll; - }; -} - -export interface DeleteByQueryResponse { - batches?: long; - deleted?: long; - failures?: BulkIndexByScrollFailure[]; - noops?: long; - requests_per_second?: float; - retries?: Retries; - slice_id?: integer; - task?: TaskId; - throttled_millis?: long; - throttled_until_millis?: long; - timed_out?: boolean; - took?: long; - total?: long; - version_conflicts?: long; -} - -export interface DeleteByQueryRethrottleRequest extends RequestBase { - task_id: Id; - requests_per_second?: long; -} - -export interface DeleteByQueryRethrottleResponse extends TaskListResponse { } - -export interface DeleteScriptRequest extends RequestBase { - id: Id - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time -} - -export interface DeleteScriptResponse extends AcknowledgedResponseBase { } - -export interface ExistsRequest extends RequestBase { - id: Id; - index: IndexName; - preference?: string; - realtime?: boolean; - refresh?: boolean; - routing?: Routing; - source_enabled?: boolean; - source_excludes?: Fields; - source_includes?: Fields; - stored_fields?: Fields; - version?: VersionNumber; - version_type?: VersionType; -} - -export type ExistsResponse = boolean; - -export interface ExistsSourceRequest extends RequestBase { - id: Id; - index: IndexName; - preference?: string; - realtime?: boolean; - refresh?: boolean; - routing?: Routing; - source_enabled?: boolean; - source_excludes?: Fields; - source_includes?: Fields; - version?: VersionNumber; - version_type?: VersionType; -} - -export type ExistsSourceResponse = boolean; - -export interface ExplainExplanation { - description: string; - details: ExplainExplanationDetail[]; - value: float; -} - -export interface ExplainExplanationDetail { - description: string; - details?: ExplainExplanationDetail[]; - value: float; -} - -export interface ExplainRequest extends RequestBase { - id: Id; - index: IndexName; - analyzer?: string; - analyze_wildcard?: boolean; - default_operator?: DefaultOperator; - df?: string; - lenient?: boolean; - preference?: string; - query_on_query_string?: string; - routing?: Routing; - _source?: boolean | Fields; - _source_excludes?: Fields; - _source_includes?: Fields; - stored_fields?: Fields; - q?: string; - body?: { - query?: QueryDslQueryContainer; - }; -} - -export interface ExplainResponse { - _index: IndexName; - _id: Id; - matched: boolean; - explanation?: ExplainExplanationDetail; - get?: InlineGet; -} - -export interface FieldCapsFieldCapabilitiesBodyIndexFilter { - range?: FieldCapsFieldCapabilitiesBodyIndexFilterRange; - match_none?: EmptyObject; - term?: FieldCapsFieldCapabilitiesBodyIndexFilterTerm; -} - -export interface FieldCapsFieldCapabilitiesBodyIndexFilterRange { - timestamp: FieldCapsFieldCapabilitiesBodyIndexFilterRangeTimestamp; -} - -export interface FieldCapsFieldCapabilitiesBodyIndexFilterRangeTimestamp { - gte?: integer; - gt?: integer; - lte?: integer; - lt?: integer; -} - -export interface FieldCapsFieldCapabilitiesBodyIndexFilterTerm { - versionControl: FieldCapsFieldCapabilitiesBodyIndexFilterTermVersionControl; -} - -export interface FieldCapsFieldCapabilitiesBodyIndexFilterTermVersionControl { - value: string; -} - -export interface FieldCapsFieldCapability { - aggregatable: boolean; - indices?: Indices; - meta?: Record; - non_aggregatable_indices?: Indices; - non_searchable_indices?: Indices; - searchable: boolean; - type: string; -} - -export interface FieldCapsRequest extends RequestBase { - index?: Indices; - allow_no_indices?: boolean; - expand_wildcards?: ExpandWildcards; - fields?: Fields; - ignore_unavailable?: boolean; - include_unmapped?: boolean; - body?: { - index_filter?: FieldCapsFieldCapabilitiesBodyIndexFilter; - }; -} - -export interface FieldCapsResponse { - indices: Indices; - fields: Record>; -} - -export interface GetRequest extends RequestBase { - id: Id; - index: IndexName; - preference?: string; - realtime?: boolean; - refresh?: boolean; - routing?: Routing; - source_enabled?: boolean; - _source_excludes?: Fields; - _source_includes?: Fields; - stored_fields?: Fields; - version?: VersionNumber; - version_type?: VersionType; - _source?: boolean | Fields; -} - -export interface GetResponse { - _index: IndexName; - fields?: Record; - found: boolean; - _id: Id; - _primary_term?: long; - _routing?: string; - _seq_no?: SequenceNumber; - _source?: TDocument; - _version?: VersionNumber; -} - -export interface GetScriptRequest extends RequestBase { - id: Id - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time -} - -export interface GetScriptResponse { - _id: Id; - found: boolean; - script?: StoredScript; -} - -export interface GetScriptContextContext { - methods: GetScriptContextContextMethod[]; - name: Name; -} - -export interface GetScriptContextContextMethod { - name: Name; - return_type: string; - params: GetScriptContextContextMethodParam[]; -} - -export interface GetScriptContextContextMethodParam { - name: Name; - type: string; -} - -export interface GetScriptContextRequest extends RequestBase { } - -export interface GetScriptContextResponse { - contexts: GetScriptContextContext[]; -} - -export interface GetScriptLanguagesLanguageContext { - contexts: string[]; - language: ScriptLanguage; -} - -export interface GetScriptLanguagesRequest extends RequestBase { } - -export interface GetScriptLanguagesResponse { - language_contexts: GetScriptLanguagesLanguageContext[]; - types_allowed: string[]; -} - -export interface GetSourceRequest extends GetRequest { } - -export type GetSourceResponse = TDocument; - -export interface IndexRequest extends RequestBase { - id?: Id; - index: IndexName; - if_primary_term?: long; - if_seq_no?: SequenceNumber; - op_type?: OpType; - pipeline?: string; - refresh?: Refresh; - routing?: Routing; - timeout?: Time; - version?: VersionNumber; - version_type?: VersionType; - wait_for_active_shards?: WaitForActiveShards; - require_alias?: boolean; - body?: TDocument; -} - -export interface IndexResponse extends WriteResponseBase { } - -export interface InfoRequest extends RequestBase { } - -export interface InfoResponse { - cluster_name: Name; - cluster_uuid: Uuid; - name: Name; - version: OpenSearchVersionInfo; -} - -export interface MgetHit { - error?: MainError; - fields?: Record; - found?: boolean; - _id: Id; - _index: IndexName; - _primary_term?: long; - _routing?: Routing; - _seq_no?: SequenceNumber; - _source?: TDocument; - _version?: VersionNumber; -} - -export type MgetMultiGetId = string | integer; - -export interface MgetOperation { - _id: MgetMultiGetId; - _index?: IndexName; - routing?: Routing; - _source?: boolean | Fields | SearchSourceFilter; - stored_fields?: Fields; - version?: VersionNumber; - version_type?: VersionType; -} - -export interface MgetRequest extends RequestBase { - index?: IndexName; - preference?: string; - realtime?: boolean; - refresh?: boolean; - routing?: Routing; - _source?: boolean | Fields; - _source_excludes?: Fields; - _source_includes?: Fields; - stored_fields?: Fields; - body?: { - docs?: MgetOperation[]; - ids?: MgetMultiGetId[]; - }; -} - -export interface MgetResponse { - docs: MgetHit[]; -} - -export interface MsearchBody { - aggregations?: Record; - aggs?: Record; - query?: QueryDslQueryContainer; - from?: integer; - size?: integer; - pit?: SearchPointInTimeReference; - track_total_hits?: boolean | integer; - suggest?: SearchSuggestContainer | Record; -} - -export interface MsearchHeader { - allow_no_indices?: boolean; - expand_wildcards?: ExpandWildcards; - ignore_unavailable?: boolean; - index?: Indices; - preference?: string; - request_cache?: boolean; - routing?: string; - search_type?: SearchType; -} - -export interface MsearchRequest extends RequestBase { - index?: Indices; - allow_no_indices?: boolean; - ccs_minimize_roundtrips?: boolean; - expand_wildcards?: ExpandWildcards; - ignore_throttled?: boolean; - ignore_unavailable?: boolean; - max_concurrent_searches?: long; - max_concurrent_shard_requests?: long; - pre_filter_shard_size?: long; - search_type?: SearchType; - rest_total_hits_as_int?: boolean; - typed_keys?: boolean; - body?: (MsearchHeader | MsearchBody)[]; -} - -export interface MsearchResponse { - took: long; - responses: (MsearchSearchResult | ErrorResponseBase)[]; -} - -export interface MsearchSearchResult extends SearchResponse { - status: integer; -} - -export interface MsearchTemplateRequest extends RequestBase { - index?: Indices; - ccs_minimize_roundtrips?: boolean; - max_concurrent_searches?: long; - search_type?: SearchType; - rest_total_hits_as_int?: boolean; - typed_keys?: boolean; - body?: MsearchTemplateTemplateItem[]; -} - -export interface MsearchTemplateResponse { - responses: SearchResponse[]; - took: long; -} - -export interface MsearchTemplateTemplateItem { - id?: Id; - index?: Indices; - params?: Record; - source?: string; -} - -export interface MtermvectorsOperation { - doc: object; - fields: Fields; - field_statistics: boolean; - filter: TermvectorsFilter; - _id: Id; - _index: IndexName; - offsets: boolean; - payloads: boolean; - positions: boolean; - routing: Routing; - term_statistics: boolean; - version: VersionNumber; - version_type: VersionType; -} - -export interface MtermvectorsRequest extends RequestBase { - index?: IndexName; - fields?: Fields; - field_statistics?: boolean; - offsets?: boolean; - payloads?: boolean; - positions?: boolean; - preference?: string; - realtime?: boolean; - routing?: Routing; - term_statistics?: boolean; - version?: VersionNumber; - version_type?: VersionType; - body?: { - docs?: MtermvectorsOperation[]; - ids?: Id[]; - }; -} - -export interface MtermvectorsResponse { - docs: MtermvectorsTermVectorsResult[]; -} - -export interface MtermvectorsTermVectorsResult { - found: boolean; - id: Id; - index: IndexName; - term_vectors: Record; - took: long; - version: VersionNumber; -} - -export interface PingRequest extends RequestBase { } - -export type PingResponse = boolean; - -export interface PutScriptRequest extends RequestBase { - id: Id - context?: Name - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time - body?: { - script?: StoredScript; - }; -} - -export interface PutScriptResponse extends AcknowledgedResponseBase { } - -export interface RankEvalDocumentRating { - _id: Id; - _index: IndexName; - rating: integer; -} - -export interface RankEvalRankEvalHit { - _id: Id; - _index: IndexName; - _score: double; -} - -export interface RankEvalRankEvalHitItem { - hit: RankEvalRankEvalHit; - rating?: double; -} - -export interface RankEvalRankEvalMetric { - precision?: RankEvalRankEvalMetricPrecision; - recall?: RankEvalRankEvalMetricRecall; - mean_reciprocal_rank?: RankEvalRankEvalMetricMeanReciprocalRank; - dcg?: RankEvalRankEvalMetricDiscountedCumulativeGain; - expected_reciprocal_rank?: RankEvalRankEvalMetricExpectedReciprocalRank; -} - -export interface RankEvalRankEvalMetricBase { - k?: integer; -} - -export interface RankEvalRankEvalMetricDetail { - metric_score: double; - unrated_docs: RankEvalUnratedDocument[]; - hits: RankEvalRankEvalHitItem[]; - metric_details: Record>; -} - -export interface RankEvalRankEvalMetricDiscountedCumulativeGain extends RankEvalRankEvalMetricBase { - normalize?: boolean; -} - -export interface RankEvalRankEvalMetricExpectedReciprocalRank extends RankEvalRankEvalMetricBase { - maximum_relevance: integer; -} - -export interface RankEvalRankEvalMetricMeanReciprocalRank - extends RankEvalRankEvalMetricRatingTreshold { } - -export interface RankEvalRankEvalMetricPrecision extends RankEvalRankEvalMetricRatingTreshold { - ignore_unlabeled?: boolean; -} - -export interface RankEvalRankEvalMetricRatingTreshold extends RankEvalRankEvalMetricBase { - relevant_rating_threshold?: integer; -} - -export interface RankEvalRankEvalMetricRecall extends RankEvalRankEvalMetricRatingTreshold { } - -export interface RankEvalRankEvalQuery { - query: QueryDslQueryContainer; - size?: integer; -} - -export interface RankEvalRankEvalRequestItem { - id: Id; - request?: RankEvalRankEvalQuery; - ratings: RankEvalDocumentRating[]; - template_id?: Id; - params?: Record; -} - -export interface RankEvalRequest extends RequestBase { - index: Indices; - allow_no_indices?: boolean; - expand_wildcards?: ExpandWildcards; - ignore_unavailable?: boolean; - search_type?: string; - body?: { - requests: RankEvalRankEvalRequestItem[]; - metric?: RankEvalRankEvalMetric; - }; -} - -export interface RankEvalResponse { - metric_score: double; - details: Record; - failures: Record; -} - -export interface RankEvalUnratedDocument { - _id: Id; - _index: IndexName; -} - -export interface ReindexDestination { - index: IndexName; - op_type?: OpType; - pipeline?: string; - routing?: Routing; - version_type?: VersionType; -} - -export interface ReindexRemoteSource { - connect_timeout: Time; - host: Host; - username: Username; - password: Password; - socket_timeout: Time; -} - -export interface ReindexRequest extends RequestBase { - refresh?: boolean; - requests_per_second?: long; - scroll?: Time; - slices?: long; - timeout?: Time; - wait_for_active_shards?: WaitForActiveShards; - wait_for_completion?: boolean; - require_alias?: boolean; - body?: { - conflicts?: Conflicts; - dest?: ReindexDestination; - max_docs?: long; - script?: Script; - size?: long; - source?: ReindexSource; - }; -} - -export interface ReindexResponse { - batches?: long; - created?: long; - deleted?: long; - failures?: BulkIndexByScrollFailure[]; - noops?: long; - retries?: Retries; - requests_per_second?: long; - slice_id?: integer; - task?: TaskId; - throttled_millis?: EpochMillis; - throttled_until_millis?: EpochMillis; - timed_out?: boolean; - took?: Time; - total?: long; - updated?: long; - version_conflicts?: long; -} - -export interface ReindexSource { - index: Indices; - query?: QueryDslQueryContainer; - remote?: ReindexRemoteSource; - size?: integer; - slice?: SlicedScroll; - sort?: SearchSort; - _source?: Fields; -} - -export interface ReindexRethrottleReindexNode extends SpecUtilsBaseNode { - tasks: Record; -} - -export interface ReindexRethrottleReindexStatus { - batches: long; - created: long; - deleted: long; - noops: long; - requests_per_second: float; - retries: Retries; - throttled_millis: long; - throttled_until_millis: long; - total: long; - updated: long; - version_conflicts: long; -} - -export interface ReindexRethrottleReindexTask { - action: string; - cancellable: boolean; - description: string; - id: long; - node: Name; - running_time_in_nanos: long; - start_time_in_millis: long; - status: ReindexRethrottleReindexStatus; - type: string; - headers: HttpHeaders; -} - -export interface ReindexRethrottleRequest extends RequestBase { - task_id: Id; - requests_per_second?: long; -} - -export interface ReindexRethrottleResponse { - nodes: Record; -} - -export interface RenderSearchTemplateRequest extends RequestBase { - body?: { - file?: string; - params?: Record; - source?: string; - }; -} - -export interface RenderSearchTemplateResponse { - template_output: Record; -} - -export interface ScriptsPainlessExecutePainlessContextSetup { - document: any; - index: IndexName; - query: QueryDslQueryContainer; -} - -export interface ScriptsPainlessExecutePainlessExecutionPosition { - offset: integer; - start: integer; - end: integer; -} - -export interface ScriptsPainlessExecuteRequest extends RequestBase { - body?: { - context?: string; - context_setup?: ScriptsPainlessExecutePainlessContextSetup; - script?: InlineScript; - }; -} - -export interface ScriptsPainlessExecuteResponse { - result: TResult; -} - -export interface ScrollRequest extends RequestBase { - scroll_id?: Id; - scroll?: Time; - rest_total_hits_as_int?: boolean; - total_hits_as_integer?: boolean; - body?: { - scroll?: Time; - scroll_id: ScrollId; - rest_total_hits_as_int?: boolean; - }; -} - -export interface ScrollResponse extends SearchResponse { } - -export interface SearchRequest extends RequestBase { - index?: Indices; - allow_no_indices?: boolean; - allow_partial_search_results?: boolean; - analyzer?: string; - analyze_wildcard?: boolean; - batched_reduce_size?: long; - ccs_minimize_roundtrips?: boolean; - default_operator?: DefaultOperator; - df?: string; - docvalue_fields?: Fields; - expand_wildcards?: ExpandWildcards; - explain?: boolean; - ignore_throttled?: boolean; - ignore_unavailable?: boolean; - lenient?: boolean; - max_concurrent_shard_requests?: long; - min_compatible_shard_node?: VersionString; - preference?: string; - pre_filter_shard_size?: long; - request_cache?: boolean; - routing?: Routing; - scroll?: Time; - search_pipeline?: string; - search_type?: SearchType; - stats?: string[]; - stored_fields?: Fields; - suggest_field?: Field; - suggest_mode?: SuggestMode; - suggest_size?: long; - suggest_text?: string; - terminate_after?: long; - timeout?: Time; - track_total_hits?: boolean | integer; - track_scores?: boolean; - typed_keys?: boolean; - rest_total_hits_as_int?: boolean; - version?: boolean; - _source?: boolean | Fields; - _source_excludes?: Fields; - _source_includes?: Fields; - seq_no_primary_term?: boolean; - q?: string; - size?: integer; - from?: integer; - sort?: string | string[]; - body?: { - aggs?: Record; - aggregations?: Record; - collapse?: SearchFieldCollapse; - explain?: boolean; - from?: integer; - highlight?: SearchHighlight; - track_total_hits?: boolean | integer; - indices_boost?: Record[]; - docvalue_fields?: SearchDocValueField | (Field | SearchDocValueField)[]; - min_score?: double; - post_filter?: QueryDslQueryContainer; - profile?: boolean; - query?: QueryDslQueryContainer; - rescore?: SearchRescore | SearchRescore[]; - script_fields?: Record; - search_pipeline?: Record; - search_after?: (integer | string)[]; - size?: integer; - slice?: SlicedScroll; - sort?: SearchSort; - _source?: boolean | Fields | SearchSourceFilter; - fields?: (Field | DateField)[]; - suggest?: SearchSuggestContainer | Record; - terminate_after?: long; - timeout?: string; - track_scores?: boolean; - version?: boolean; - seq_no_primary_term?: boolean; - stored_fields?: Fields; - pit?: SearchPointInTimeReference; - runtime_mappings?: MappingRuntimeFields; - stats?: string[]; - }; -} - -export interface SearchResponse { - took: long; - timed_out: boolean; - _shards: ShardStatistics; - hits: SearchHitsMetadata; - aggregations?: Record; - _clusters?: ClusterStatistics; - documents?: TDocument[]; - fields?: Record; - max_score?: double; - num_reduce_phases?: long; - profile?: SearchProfile; - pit_id?: Id; - _scroll_id?: ScrollId; - suggest?: Record[]>; - terminated_early?: boolean; -} - -export interface SearchAggregationBreakdown { - build_aggregation: long; - build_aggregation_count: long; - build_leaf_collector: long; - build_leaf_collector_count: long; - collect: long; - collect_count: long; - initialize: long; - initialize_count: long; - post_collection?: long; - post_collection_count?: long; - reduce: long; - reduce_count: long; -} - -export interface SearchAggregationProfile { - breakdown: SearchAggregationBreakdown; - description: string; - time_in_nanos: long; - type: string; - debug?: SearchAggregationProfileDebug; - children?: SearchAggregationProfileDebug[]; -} - -export interface SearchAggregationProfileDebug { } - -export type SearchBoundaryScanner = 'chars' | 'sentence' | 'word'; - -export interface SearchCollector { - name: string; - reason: string; - time_in_nanos: long; - children?: SearchCollector[]; -} - -export interface SearchCompletionSuggestOption { - collate_match?: boolean; - contexts?: Record; - fields?: Record; - _id: string; - _index: IndexName; - _type?: Type; - _routing?: Routing; - _score: double; - _source: TDocument; - text: string; -} - -export interface SearchCompletionSuggester extends SearchSuggesterBase { - contexts?: Record; - fuzzy?: SearchSuggestFuzziness; - prefix?: string; - regex?: string; - skip_duplicates?: boolean; -} - -export type SearchContext = string | QueryDslGeoLocation; - -export interface SearchDirectGenerator { - field: Field; - max_edits?: integer; - max_inspections?: float; - max_term_freq?: float; - min_doc_freq?: float; - min_word_length?: integer; - post_filter?: string; - pre_filter?: string; - prefix_length?: integer; - size?: integer; - suggest_mode?: SuggestMode; -} - -export interface SearchDocValueField { - field: Field; - format?: string; -} - -export interface SearchFieldCollapse { - field: Field; - inner_hits?: SearchInnerHits | SearchInnerHits[]; - max_concurrent_group_searches?: integer; -} - -export interface SearchFieldSort { - missing?: AggregationsMissing; - mode?: SearchSortMode; - nested?: SearchNestedSortValue; - order?: SearchSortOrder; - unmapped_type?: MappingFieldType; -} - -export interface SearchGeoDistanceSortKeys { - mode?: SearchSortMode; - distance_type?: GeoDistanceType; - order?: SearchSortOrder; - unit?: DistanceUnit; -} -export type SearchGeoDistanceSort = - | SearchGeoDistanceSortKeys - | { [property: string]: QueryDslGeoLocation | QueryDslGeoLocation[] }; - -export interface SearchHighlight { - fields: Record; - type?: SearchHighlighterType; - boundary_chars?: string; - boundary_max_scan?: integer; - boundary_scanner?: SearchBoundaryScanner; - boundary_scanner_locale?: string; - encoder?: SearchHighlighterEncoder; - fragmenter?: SearchHighlighterFragmenter; - fragment_offset?: integer; - fragment_size?: integer; - max_fragment_length?: integer; - no_match_size?: integer; - number_of_fragments?: integer; - order?: SearchHighlighterOrder; - post_tags?: string[]; - pre_tags?: string[]; - require_field_match?: boolean; - tags_schema?: SearchHighlighterTagsSchema; - highlight_query?: QueryDslQueryContainer; - max_analyzed_offset?: string | integer; -} - -export interface SearchHighlightField { - boundary_chars?: string; - boundary_max_scan?: integer; - boundary_scanner?: SearchBoundaryScanner; - boundary_scanner_locale?: string; - field?: Field; - force_source?: boolean; - fragmenter?: SearchHighlighterFragmenter; - fragment_offset?: integer; - fragment_size?: integer; - highlight_query?: QueryDslQueryContainer; - matched_fields?: Fields; - max_fragment_length?: integer; - no_match_size?: integer; - number_of_fragments?: integer; - order?: SearchHighlighterOrder; - phrase_limit?: integer; - post_tags?: string[]; - pre_tags?: string[]; - require_field_match?: boolean; - tags_schema?: SearchHighlighterTagsSchema; - type?: SearchHighlighterType | string; -} - -export type SearchHighlighterEncoder = 'default' | 'html'; - -export type SearchHighlighterFragmenter = 'simple' | 'span'; - -export type SearchHighlighterOrder = 'score'; - -export type SearchHighlighterTagsSchema = 'styled'; - -export type SearchHighlighterType = 'plain' | 'fvh' | 'unified'; - -export interface SearchHit { - _index: IndexName; - _id: Id; - _score?: double; - _explanation?: ExplainExplanation; - fields?: Record; - highlight?: Record; - inner_hits?: Record; - matched_queries?: string[]; - _nested?: SearchNestedIdentity; - _ignored?: string[]; - _shard?: string; - _node?: string; - _routing?: string; - _source?: TDocument; - _seq_no?: SequenceNumber; - _primary_term?: long; - _version?: VersionNumber; - sort?: SearchSortResults; -} - -export interface SearchHitsMetadata { - total: SearchTotalHits | long; - hits: SearchHit[]; - max_score?: double; -} - -export interface SearchInnerHits { - name?: Name; - size?: integer; - from?: integer; - collapse?: SearchFieldCollapse; - docvalue_fields?: Fields; - explain?: boolean; - highlight?: SearchHighlight; - ignore_unmapped?: boolean; - script_fields?: Record; - seq_no_primary_term?: boolean; - fields?: Fields; - sort?: SearchSort; - _source?: boolean | SearchSourceFilter; - version?: boolean; -} - -export interface SearchInnerHitsMetadata { - total: SearchTotalHits | long; - hits: SearchHit>[]; - max_score?: double; -} - -export interface SearchInnerHitsResult { - hits: SearchInnerHitsMetadata; -} - -export interface SearchLaplaceSmoothingModel { - alpha: double; -} - -export interface SearchLinearInterpolationSmoothingModel { - bigram_lambda: double; - trigram_lambda: double; - unigram_lambda: double; -} - -export interface SearchNestedIdentity { - field: Field; - offset: integer; - _nested?: SearchNestedIdentity; -} - -export interface SearchNestedSortValue { - filter?: QueryDslQueryContainer; - max_children?: integer; - path: Field; -} - -export interface SearchPhraseSuggestCollate { - params?: Record; - prune?: boolean; - query: SearchPhraseSuggestCollateQuery; -} - -export interface SearchPhraseSuggestCollateQuery { - id?: Id; - source?: string; -} - -export interface SearchPhraseSuggestHighlight { - post_tag: string; - pre_tag: string; -} - -export interface SearchPhraseSuggestOption { - text: string; - highlighted: string; - score: double; -} - -export interface SearchPhraseSuggester extends SearchSuggesterBase { - collate?: SearchPhraseSuggestCollate; - confidence?: double; - direct_generator?: SearchDirectGenerator[]; - force_unigrams?: boolean; - gram_size?: integer; - highlight?: SearchPhraseSuggestHighlight; - max_errors?: double; - real_word_error_likelihood?: double; - separator?: string; - shard_size?: integer; - smoothing?: SearchSmoothingModelContainer; - text?: string; - token_limit?: integer; -} - -export interface SearchPointInTimeReference { - id: Id; - keep_alive?: Time; -} - -export interface SearchProfile { - shards: SearchShardProfile[]; -} - -export interface SearchQueryBreakdown { - advance: long; - advance_count: long; - build_scorer: long; - build_scorer_count: long; - create_weight: long; - create_weight_count: long; - match: long; - match_count: long; - shallow_advance: long; - shallow_advance_count: long; - next_doc: long; - next_doc_count: long; - score: long; - score_count: long; - compute_max_score: long; - compute_max_score_count: long; - set_min_competitive_score: long; - set_min_competitive_score_count: long; -} - -export interface SearchQueryProfile { - breakdown: SearchQueryBreakdown; - description: string; - time_in_nanos: long; - type: string; - children?: SearchQueryProfile[]; -} - -export interface SearchRescore { - query: SearchRescoreQuery; - window_size?: integer; -} - -export interface SearchRescoreQuery { - rescore_query: QueryDslQueryContainer; - query_weight?: double; - rescore_query_weight?: double; - score_mode?: SearchScoreMode; -} - -export type SearchScoreMode = 'avg' | 'max' | 'min' | 'multiply' | 'total'; - -export interface SearchScoreSort { - mode?: SearchSortMode; - order?: SearchSortOrder; -} - -export interface SearchScriptSort { - order?: SearchSortOrder; - script: Script; - type?: string; -} - -export interface SearchSearchProfile { - collector: SearchCollector[]; - query: SearchQueryProfile[]; - rewrite_time: long; -} - -export interface SearchShardProfile { - aggregations: SearchAggregationProfile[]; - id: string; - searches: SearchSearchProfile[]; -} - -export interface SearchSmoothingModelContainer { - laplace?: SearchLaplaceSmoothingModel; - linear_interpolation?: SearchLinearInterpolationSmoothingModel; - stupid_backoff?: SearchStupidBackoffSmoothingModel; -} - -export type SearchSort = SearchSortCombinations | SearchSortCombinations[]; - -export type SearchSortCombinations = Field | SearchSortContainer | SearchSortOrder; - -export interface SearchSortContainerKeys { - _score?: SearchScoreSort; - _doc?: SearchScoreSort; - _geo_distance?: SearchGeoDistanceSort; - _script?: SearchScriptSort; -} -export type SearchSortContainer = - | SearchSortContainerKeys - | { [property: string]: SearchFieldSort | SearchSortOrder }; - -export type SearchSortMode = 'min' | 'max' | 'sum' | 'avg' | 'median'; - -export type SearchSortOrder = 'asc' | 'desc' | '_doc'; - -export type SearchSortResults = (long | double | string | null)[]; - -export interface SearchSourceFilter { - excludes?: Fields; - includes?: Fields; - exclude?: Fields; - include?: Fields; -} - -export type SearchStringDistance = - | 'internal' - | 'damerau_levenshtein' - | 'levenshtein' - | 'jaro_winkler' - | 'ngram'; - -export interface SearchStupidBackoffSmoothingModel { - discount: double; -} - -export interface SearchSuggest { - length: integer; - offset: integer; - options: SearchSuggestOption[]; - text: string; -} - -export interface SearchSuggestContainer { - completion?: SearchCompletionSuggester; - phrase?: SearchPhraseSuggester; - prefix?: string; - regex?: string; - term?: SearchTermSuggester; - text?: string; -} - -export interface SearchSuggestContextQuery { - boost?: double; - context: SearchContext; - neighbours?: Distance[] | integer[]; - precision?: Distance | integer; - prefix?: boolean; -} - -export interface SearchSuggestFuzziness { - fuzziness: Fuzziness; - min_length: integer; - prefix_length: integer; - transpositions: boolean; - unicode_aware: boolean; -} - -export type SearchSuggestOption = - | SearchCompletionSuggestOption - | SearchPhraseSuggestOption - | SearchTermSuggestOption; - -export type SearchSuggestSort = 'score' | 'frequency'; - -export interface SearchSuggesterBase { - field: Field; - analyzer?: string; - size?: integer; -} - -export interface SearchTermSuggestOption { - text: string; - freq?: long; - score: double; -} - -export interface SearchTermSuggester extends SearchSuggesterBase { - lowercase_terms?: boolean; - max_edits?: integer; - max_inspections?: integer; - max_term_freq?: float; - min_doc_freq?: float; - min_word_length?: integer; - prefix_length?: integer; - shard_size?: integer; - sort?: SearchSuggestSort; - string_distance?: SearchStringDistance; - suggest_mode?: SuggestMode; - text?: string; -} - -export interface SearchTotalHits { - relation: SearchTotalHitsRelation; - value: long; -} - -export type SearchTotalHitsRelation = 'eq' | 'gte'; - -export interface SearchShardsRequest extends RequestBase { - index?: Indices; - allow_no_indices?: boolean; - expand_wildcards?: ExpandWildcards; - ignore_unavailable?: boolean; - local?: boolean; - preference?: string; - routing?: Routing; -} - -export interface SearchShardsResponse { - nodes: Record; - shards: NodeShard[][]; - indices: Record; -} - -export interface SearchShardsShardStoreIndex { - aliases?: Name[]; - filter?: QueryDslQueryContainer; -} - -export interface SearchTemplateRequest extends RequestBase { - index?: Indices; - allow_no_indices?: boolean; - ccs_minimize_roundtrips?: boolean; - expand_wildcards?: ExpandWildcards; - explain?: boolean; - ignore_throttled?: boolean; - ignore_unavailable?: boolean; - preference?: string; - profile?: boolean; - routing?: Routing; - scroll?: Time; - search_type?: SearchType; - total_hits_as_integer?: boolean; - typed_keys?: boolean; - body?: { - id?: Id; - params?: Record; - source?: string; - }; -} - -export interface SearchTemplateResponse { - _shards: ShardStatistics; - timed_out: boolean; - took: integer; - hits: SearchHitsMetadata; -} - -export interface TermsEnumRequest extends RequestBase { - index: IndexName; - body?: { - field: Field; - size?: integer; - timeout?: Time; - case_insensitive?: boolean; - index_filter?: QueryDslQueryContainer; - string?: string; - search_after?: string; - }; -} - -export interface TermsEnumResponse { - _shards: ShardStatistics; - terms: string[]; - complete: boolean; -} - -export interface TermvectorsFieldStatistics { - doc_count: integer; - sum_doc_freq: long; - sum_ttf: long; -} - -export interface TermvectorsFilter { - max_doc_freq?: integer; - max_num_terms?: integer; - max_term_freq?: integer; - max_word_length?: integer; - min_doc_freq?: integer; - min_term_freq?: integer; - min_word_length?: integer; -} - -export interface TermvectorsRequest extends RequestBase { - index: IndexName; - id?: Id; - fields?: Fields; - field_statistics?: boolean; - offsets?: boolean; - payloads?: boolean; - positions?: boolean; - preference?: string; - realtime?: boolean; - routing?: Routing; - term_statistics?: boolean; - version?: VersionNumber; - version_type?: VersionType; - body?: { - doc?: TDocument; - filter?: TermvectorsFilter; - per_field_analyzer?: Record; - }; -} - -export interface TermvectorsResponse { - found: boolean; - _id: Id; - _index: IndexName; - term_vectors?: Record; - took: long; - _version: VersionNumber; -} - -export interface TermvectorsTerm { - doc_freq?: integer; - score?: double; - term_freq: integer; - tokens: TermvectorsToken[]; - ttf?: integer; -} - -export interface TermvectorsTermVector { - field_statistics: TermvectorsFieldStatistics; - terms: Record; -} - -export interface TermvectorsToken { - end_offset?: integer; - payload?: string; - position: integer; - start_offset?: integer; -} - -export interface UpdateRequest - extends RequestBase { - id: Id; - index: IndexName; - if_primary_term?: long; - if_seq_no?: SequenceNumber; - lang?: string; - refresh?: Refresh; - require_alias?: boolean; - retry_on_conflict?: long; - routing?: Routing; - source_enabled?: boolean; - timeout?: Time; - wait_for_active_shards?: WaitForActiveShards; - _source?: boolean | Fields; - _source_excludes?: Fields; - _source_includes?: Fields; - body?: { - detect_noop?: boolean; - doc?: TPartialDocument; - doc_as_upsert?: boolean; - script?: Script; - scripted_upsert?: boolean; - _source?: boolean | SearchSourceFilter; - upsert?: TDocument; - }; -} - -export interface UpdateResponse extends WriteResponseBase { - get?: InlineGet; -} - -export interface UpdateByQueryRequest extends RequestBase { - index: Indices; - allow_no_indices?: boolean; - analyzer?: string; - analyze_wildcard?: boolean; - conflicts?: Conflicts; - default_operator?: DefaultOperator; - df?: string; - expand_wildcards?: ExpandWildcards; - from?: long; - ignore_unavailable?: boolean; - lenient?: boolean; - pipeline?: string; - preference?: string; - query_on_query_string?: string; - refresh?: boolean; - request_cache?: boolean; - requests_per_second?: long; - routing?: Routing; - scroll?: Time; - scroll_size?: long; - search_timeout?: Time; - search_type?: SearchType; - size?: long; - slices?: long; - sort?: string[]; - source_enabled?: boolean; - source_excludes?: Fields; - source_includes?: Fields; - stats?: string[]; - terminate_after?: long; - timeout?: Time; - version?: boolean; - version_type?: boolean; - wait_for_active_shards?: WaitForActiveShards; - wait_for_completion?: boolean; - body?: { - max_docs?: long; - query?: QueryDslQueryContainer; - script?: Script; - slice?: SlicedScroll; - conflicts?: Conflicts; - }; -} - -export interface UpdateByQueryResponse { - batches?: long; - failures?: BulkIndexByScrollFailure[]; - noops?: long; - deleted?: long; - requests_per_second?: float; - retries?: Retries; - task?: TaskId; - timed_out?: boolean; - took?: long; - total?: long; - updated?: long; - version_conflicts?: long; - throttled_millis?: ulong; - throttled_until_millis?: ulong; -} - -export interface UpdateByQueryRethrottleRequest extends RequestBase { - task_id: Id; - requests_per_second?: long; -} - -export interface UpdateByQueryRethrottleResponse { - nodes: Record; -} - -export interface UpdateByQueryRethrottleUpdateByQueryRethrottleNode extends SpecUtilsBaseNode { - tasks: Record; -} - -export interface SpecUtilsBaseNode { - attributes: Record; - host: Host; - ip: Ip; - name: Name; - roles?: NodeRoles; - transport_address: TransportAddress; -} - -export interface AcknowledgedResponseBase { - acknowledged: boolean; -} - -export type AggregateName = string; - -export interface BulkIndexByScrollFailure { - cause: MainError; - id: Id; - index: IndexName; - status: integer; - type: string; -} - -export interface BulkStats { - total_operations: long; - total_time?: string; - total_time_in_millis: long; - total_size?: ByteSize; - total_size_in_bytes: long; - avg_time?: string; - avg_time_in_millis: long; - avg_size?: ByteSize; - avg_size_in_bytes: long; -} - -export type ByteSize = long | string; - -export type Bytes = 'b' | 'k' | 'kb' | 'm' | 'mb' | 'g' | 'gb' | 't' | 'tb' | 'p' | 'pb'; - -export type CategoryId = string; - -export interface ClusterStatistics { - skipped: integer; - successful: integer; - total: integer; -} - -export interface CompletionStats { - size_in_bytes: long; - size?: ByteSize; - fields?: Record; -} - -export type Conflicts = 'abort' | 'proceed'; - -export type DataStreamName = string; - -export interface DateField { - field: Field; - format?: string; - include_unmapped?: boolean; -} - -export type DateMath = string; - -export type DateMathTime = string; - -export type DateString = string; - -export type DefaultOperator = 'AND' | 'OR'; - -export interface DictionaryResponseBase { - [key: string]: TValue; -} - -export type Distance = string; - -export type DistanceUnit = 'in' | 'ft' | 'yd' | 'mi' | 'nmi' | 'km' | 'm' | 'cm' | 'mm'; - -export interface DocStats { - count: long; - deleted: long; -} - -export interface OpenSearchVersionInfo { - build_date: DateString; - build_hash: string; - build_snapshot: boolean; - build_type: string; - distribution: string; - lucene_version: VersionString; - minimum_index_compatibility_version: VersionString; - minimum_wire_compatibility_version: VersionString; - number: string; -} - -export interface EmptyObject { } - -export type EpochMillis = string | long; - -export interface ErrorCause { - type: string; - reason: string; - caused_by?: ErrorCause; - shard?: integer | string; - stack_trace?: string; - root_cause?: ErrorCause[]; - bytes_limit?: long; - bytes_wanted?: long; - column?: integer; - col?: integer; - failed_shards?: ShardFailure[]; - grouped?: boolean; - index?: IndexName; - index_uuid?: Uuid; - language?: string; - licensed_expired_feature?: string; - line?: integer; - max_buckets?: integer; - phase?: string; - property_name?: string; - processor_type?: string; - resource_id?: Ids; - 'resource.id'?: Ids; - resource_type?: string; - 'resource.type'?: string; - script?: string; - script_stack?: string[]; - header?: HttpHeaders; - lang?: string; - position?: ScriptsPainlessExecutePainlessExecutionPosition; -} - -export interface ErrorResponseBase { - error: MainError | string; - status: integer; -} - -export type ExpandWildcardOptions = 'all' | 'open' | 'closed' | 'hidden' | 'none'; - -export type ExpandWildcards = ExpandWildcardOptions | ExpandWildcardOptions[] | string; - -export type Field = string; - -export interface FieldMemoryUsage { - memory_size?: ByteSize; - memory_size_in_bytes: long; -} - -export interface FieldSizeUsage { - size?: ByteSize; - size_in_bytes: long; -} - -export interface FielddataStats { - evictions?: long; - memory_size?: ByteSize; - memory_size_in_bytes: long; - fields?: Record; -} - -export type Fields = Field | Field[]; - -export interface FlushStats { - periodic: long; - total: long; - total_time?: string; - total_time_in_millis: long; -} - -export type Fuzziness = string | integer; - -export type GeoDistanceType = 'arc' | 'plane'; - -export type GeoHashPrecision = number; - -export type GeoShapeRelation = 'intersects' | 'disjoint' | 'within' | 'contains'; - -export type GeoTilePrecision = number; - -export interface GetStats { - current: long; - exists_time?: string; - exists_time_in_millis: long; - exists_total: long; - missing_time?: string; - missing_time_in_millis: long; - missing_total: long; - time?: string; - time_in_millis: long; - total: long; -} - -export type GroupBy = 'nodes' | 'parents' | 'none'; - -export type Health = 'green' | 'yellow' | 'red'; - -export type Host = string; - -export type HttpHeaders = Record; - -export type Id = string; - -export type Ids = Id | Id[]; - -export type IndexAlias = string; - -export type IndexName = string; - -export type IndexPattern = string; - -export type IndexPatterns = IndexPattern[]; - -export interface IndexedScript extends ScriptBase { - id: Id; -} - -export interface IndexingStats { - index_current: long; - delete_current: long; - delete_time?: string; - delete_time_in_millis: long; - delete_total: long; - is_throttled: boolean; - noop_update_total: long; - throttle_time?: string; - throttle_time_in_millis: long; - index_time?: string; - index_time_in_millis: long; - index_total: long; - index_failed: long; - types?: Record; -} - -export type Indices = string | string[]; - -export interface IndicesResponseBase extends AcknowledgedResponseBase { - _shards?: ShardStatistics; -} - -export interface InlineGet { - fields?: Record; - found: boolean; - _seq_no: SequenceNumber; - _primary_term: long; - _routing?: Routing; - _source: TDocument; -} - -export interface InlineScript extends ScriptBase { - source: string; -} - -export type Ip = string; - -export interface LatLon { - lat: double; - lon: double; -} - -export type Level = 'cluster' | 'indices' | 'shards'; - -export type LifecycleOperationMode = 'RUNNING' | 'STOPPING' | 'STOPPED'; - -export interface MainError extends ErrorCause { - headers?: Record; - root_cause: ErrorCause[]; -} - -export interface MergesStats { - current: long; - current_docs: long; - current_size?: string; - current_size_in_bytes: long; - total: long; - total_auto_throttle?: string; - total_auto_throttle_in_bytes: long; - total_docs: long; - total_size?: string; - total_size_in_bytes: long; - total_stopped_time?: string; - total_stopped_time_in_millis: long; - total_throttled_time?: string; - total_throttled_time_in_millis: long; - total_time?: string; - total_time_in_millis: long; -} - -export type Metadata = Record; - -export type Metrics = string | string[]; - -export type MinimumShouldMatch = integer | string; - -export type MultiTermQueryRewrite = string; - -export type Name = string; - -export type Names = string | string[]; - -export type Namespace = string; - -export interface NodeAttributes { - attributes: Record; - ephemeral_id: Id; - id?: Id; - name: NodeName; - transport_address: TransportAddress; - roles?: NodeRoles; -} - -export type NodeId = string; - -export type NodeIds = string; - -export type NodeName = string; - -// TODO: remove master role if it is not supported. -export type NodeRole = 'cluster_manager' | 'master' | 'data' | 'client' | 'ingest' | 'voting_only' | 'remote_cluster_client' | 'coordinating_only' - -export type NodeRoles = NodeRole[]; - -export interface NodeShard { - state: IndicesStatsShardRoutingState; - primary: boolean; - node?: NodeName; - shard: integer; - index: IndexName; - allocation_id?: Record; - recovery_source?: Record; - unassigned_info?: ClusterAllocationExplainUnassignedInformation; -} - -export interface NodeStatistics { - failures?: ErrorCause[]; - total: integer; - successful: integer; - failed: integer; -} - -export type OpType = 'index' | 'create'; - -export type Password = string; - -export type Percentage = string | float; - -export type PipelineName = string; - -export interface PluginStats { - classname: string; - description: string; - opensearch_version: VersionString; - extended_plugins: string[]; - has_native_controller: boolean; - java_version: VersionString; - name: Name; - version: VersionString; - licensed: boolean; - type: string; -} - -export type PropertyName = string; - -export interface QueryCacheStats { - cache_count: integer; - cache_size: integer; - evictions: integer; - hit_count: integer; - memory_size?: ByteSize; - memory_size_in_bytes: integer; - miss_count: integer; - total_count: integer; -} - -export interface RecoveryStats { - current_as_source: long; - current_as_target: long; - throttle_time?: string; - throttle_time_in_millis: long; -} - -export type Refresh = boolean | RefreshOptions; - -export type RefreshOptions = 'wait_for'; - -export interface RefreshStats { - external_total: long; - external_total_time_in_millis: long; - listeners: long; - total: long; - total_time?: string; - total_time_in_millis: long; -} - -export type RelationName = string; - -export interface RequestBase extends SpecUtilsCommonQueryParameters { } - -export interface RequestCacheStats { - evictions: long; - hit_count: long; - memory_size?: string; - memory_size_in_bytes: long; - miss_count: long; -} - -export type Result = 'Error' | 'created' | 'updated' | 'deleted' | 'not_found' | 'noop'; - -export interface Retries { - bulk: long; - search: long; -} - -export type Routing = string | number; - -export type Script = InlineScript | IndexedScript | string; - -export interface ScriptBase { - lang?: ScriptLanguage; - params?: Record; -} - -export interface ScriptField { - script: Script; -} - -export type ScriptLanguage = 'painless' | 'expression' | 'mustache' | 'java'; - -export interface ScriptTransform { - lang: string; - params: Record; -} - -export type ScrollId = string; - -export interface SearchStats { - fetch_current: long; - fetch_time_in_millis: long; - fetch_total: long; - open_contexts?: long; - query_current: long; - query_time_in_millis: long; - query_total: long; - scroll_current: long; - scroll_time_in_millis: long; - scroll_total: long; - suggest_current: long; - suggest_time_in_millis: long; - suggest_total: long; - groups?: Record; -} - -export interface SearchTransform { - timeout: Time; -} - -export type SearchType = 'query_then_fetch' | 'dfs_query_then_fetch'; - -export interface SegmentsStats { - count: integer; - doc_values_memory?: ByteSize; - doc_values_memory_in_bytes: integer; - file_sizes: Record; - fixed_bit_set?: ByteSize; - fixed_bit_set_memory_in_bytes: integer; - index_writer_memory?: ByteSize; - index_writer_max_memory_in_bytes?: integer; - index_writer_memory_in_bytes: integer; - max_unsafe_auto_id_timestamp: integer; - memory?: ByteSize; - memory_in_bytes: integer; - norms_memory?: ByteSize; - norms_memory_in_bytes: integer; - points_memory?: ByteSize; - points_memory_in_bytes: integer; - stored_memory?: ByteSize; - stored_fields_memory_in_bytes: integer; - terms_memory_in_bytes: integer; - terms_memory?: ByteSize; - term_vectory_memory?: ByteSize; - term_vectors_memory_in_bytes: integer; - version_map_memory?: ByteSize; - version_map_memory_in_bytes: integer; -} - -export type SequenceNumber = integer; - -export type Service = string; - -export type ShapeRelation = 'intersects' | 'disjoint' | 'within'; - -export interface ShardFailure { - index?: IndexName; - node?: string; - reason: ErrorCause; - shard: integer; - status?: string; -} - -export interface ShardStatistics { - failed: uint; - successful: uint; - total: uint; - failures?: ShardFailure[]; - skipped?: uint; -} - -export interface ShardsOperationResponseBase { - _shards: ShardStatistics; -} - -export type Size = 'Raw' | 'k' | 'm' | 'g' | 't' | 'p'; - -export interface SlicedScroll { - field?: Field; - id: integer; - max: integer; -} - -export interface StoreStats { - size?: ByteSize; - size_in_bytes: integer; - reserved?: ByteSize; - reserved_in_bytes: integer; - total_data_set_size?: ByteSize; - total_data_set_size_in_bytes?: integer; -} - -export interface StoredScript { - lang?: ScriptLanguage; - source: string; -} - -export type SuggestMode = 'missing' | 'popular' | 'always'; - -export type SuggestionName = string; - -export type TaskId = string | integer; - -export type ThreadType = 'cpu' | 'wait' | 'block'; - -export type Time = string | integer; - -export type TimeSpan = string; - -export type Timestamp = string; - -export interface TranslogStats { - earliest_last_modified_age: long; - operations: long; - size?: string; - size_in_bytes: long; - uncommitted_operations: integer; - uncommitted_size?: string; - uncommitted_size_in_bytes: long; -} - -export type TransportAddress = string; - -export type Type = string; - -export type Types = Type | Type[]; - -export type Username = string; - -export type Uuid = string; - -export type VersionNumber = long; - -export type VersionString = string; - -export type VersionType = 'internal' | 'external' | 'external_gte' | 'force'; - -export type WaitForActiveShardOptions = 'all'; - -export type WaitForActiveShards = integer | WaitForActiveShardOptions; - -export type WaitForEvents = 'immediate' | 'urgent' | 'high' | 'normal' | 'low' | 'languid'; - -export type WaitForStatus = 'green' | 'yellow' | 'red'; - -export interface WarmerStats { - current: long; - total: long; - total_time?: string; - total_time_in_millis: long; -} - -export interface WriteResponseBase { - _id: Id; - _index: IndexName; - _primary_term: long; - result: Result; - _seq_no: SequenceNumber; - _shards: ShardStatistics; - _version: VersionNumber; - forced_refresh?: boolean; - error?: ErrorCause; -} - -export type double = number; - -export type float = number; - -export type integer = number; - -export type long = number; - -export type uint = number; - -export type ulong = number; - -export interface AggregationsAdjacencyMatrixAggregation extends AggregationsBucketAggregationBase { - filters?: Record; -} - -export type AggregationsAggregate = - | AggregationsSingleBucketAggregate - | AggregationsAutoDateHistogramAggregate - | AggregationsFiltersAggregate - | AggregationsSignificantTermsAggregate - | AggregationsTermsAggregate - | AggregationsBucketAggregate - | AggregationsCompositeBucketAggregate - | AggregationsMultiBucketAggregate - | AggregationsMatrixStatsAggregate - | AggregationsKeyedValueAggregate - | AggregationsMetricAggregate; - -export interface AggregationsAggregateBase { - meta?: Record; -} - -export interface AggregationsAggregation { - meta?: Record; - name?: string; -} - -export interface AggregationsAggregationContainer { - aggs?: Record; - meta?: Record; - adjacency_matrix?: AggregationsAdjacencyMatrixAggregation; - aggregations?: Record; - auto_date_histogram?: AggregationsAutoDateHistogramAggregation; - avg?: AggregationsAverageAggregation; - avg_bucket?: AggregationsAverageBucketAggregation; - boxplot?: AggregationsBoxplotAggregation; - bucket_script?: AggregationsBucketScriptAggregation; - bucket_selector?: AggregationsBucketSelectorAggregation; - bucket_sort?: AggregationsBucketSortAggregation; - cardinality?: AggregationsCardinalityAggregation; - children?: AggregationsChildrenAggregation; - composite?: AggregationsCompositeAggregation; - cumulative_cardinality?: AggregationsCumulativeCardinalityAggregation; - cumulative_sum?: AggregationsCumulativeSumAggregation; - date_histogram?: AggregationsDateHistogramAggregation; - date_range?: AggregationsDateRangeAggregation; - derivative?: AggregationsDerivativeAggregation; - diversified_sampler?: AggregationsDiversifiedSamplerAggregation; - extended_stats?: AggregationsExtendedStatsAggregation; - extended_stats_bucket?: AggregationsExtendedStatsBucketAggregation; - filter?: QueryDslQueryContainer; - filters?: AggregationsFiltersAggregation; - geo_bounds?: AggregationsGeoBoundsAggregation; - geo_centroid?: AggregationsGeoCentroidAggregation; - geo_distance?: AggregationsGeoDistanceAggregation; - geohash_grid?: AggregationsGeoHashGridAggregation; - geo_line?: AggregationsGeoLineAggregation; - geotile_grid?: AggregationsGeoTileGridAggregation; - global?: AggregationsGlobalAggregation; - histogram?: AggregationsHistogramAggregation; - ip_range?: AggregationsIpRangeAggregation; - inference?: AggregationsInferenceAggregation; - line?: AggregationsGeoLineAggregation; - matrix_stats?: AggregationsMatrixStatsAggregation; - max?: AggregationsMaxAggregation; - max_bucket?: AggregationsMaxBucketAggregation; - median_absolute_deviation?: AggregationsMedianAbsoluteDeviationAggregation; - min?: AggregationsMinAggregation; - min_bucket?: AggregationsMinBucketAggregation; - missing?: AggregationsMissingAggregation; - moving_avg?: AggregationsMovingAverageAggregation; - moving_percentiles?: AggregationsMovingPercentilesAggregation; - moving_fn?: AggregationsMovingFunctionAggregation; - multi_terms?: AggregationsMultiTermsAggregation; - nested?: AggregationsNestedAggregation; - normalize?: AggregationsNormalizeAggregation; - parent?: AggregationsParentAggregation; - percentile_ranks?: AggregationsPercentileRanksAggregation; - percentiles?: AggregationsPercentilesAggregation; - percentiles_bucket?: AggregationsPercentilesBucketAggregation; - range?: AggregationsRangeAggregation; - rare_terms?: AggregationsRareTermsAggregation; - rate?: AggregationsRateAggregation; - reverse_nested?: AggregationsReverseNestedAggregation; - sampler?: AggregationsSamplerAggregation; - scripted_metric?: AggregationsScriptedMetricAggregation; - serial_diff?: AggregationsSerialDifferencingAggregation; - significant_terms?: AggregationsSignificantTermsAggregation; - significant_text?: AggregationsSignificantTextAggregation; - stats?: AggregationsStatsAggregation; - stats_bucket?: AggregationsStatsBucketAggregation; - string_stats?: AggregationsStringStatsAggregation; - sum?: AggregationsSumAggregation; - sum_bucket?: AggregationsSumBucketAggregation; - terms?: AggregationsTermsAggregation; - top_hits?: AggregationsTopHitsAggregation; - t_test?: AggregationsTTestAggregation; - top_metrics?: AggregationsTopMetricsAggregation; - value_count?: AggregationsValueCountAggregation; - weighted_avg?: AggregationsWeightedAverageAggregation; - variable_width_histogram?: AggregationsVariableWidthHistogramAggregation; -} - -export interface AggregationsAggregationRange { - from?: double | string; - key?: string; - to?: double | string; -} - -export interface AggregationsAutoDateHistogramAggregate - extends AggregationsMultiBucketAggregate> { - interval: DateMathTime; -} - -export interface AggregationsAutoDateHistogramAggregation - extends AggregationsBucketAggregationBase { - buckets?: integer; - field?: Field; - format?: string; - minimum_interval?: AggregationsMinimumInterval; - missing?: DateString; - offset?: string; - params?: Record; - script?: Script; - time_zone?: string; -} - -export interface AggregationsAverageAggregation extends AggregationsFormatMetricAggregationBase { } - -export interface AggregationsAverageBucketAggregation extends AggregationsPipelineAggregationBase { } - -export interface AggregationsBoxPlotAggregate extends AggregationsAggregateBase { - min: double; - max: double; - q1: double; - q2: double; - q3: double; -} - -export interface AggregationsBoxplotAggregation extends AggregationsMetricAggregationBase { - compression?: double; -} - -export type AggregationsBucket = - | AggregationsCompositeBucket - | AggregationsDateHistogramBucket - | AggregationsFiltersBucketItem - | AggregationsIpRangeBucket - | AggregationsRangeBucket - | AggregationsRareTermsBucket - | AggregationsSignificantTermsBucket - | AggregationsKeyedBucket; - -export interface AggregationsBucketAggregate extends AggregationsAggregateBase { - after_key: Record; - bg_count: long; - doc_count: long; - doc_count_error_upper_bound: long; - sum_other_doc_count: long; - interval: DateMathTime; - items: AggregationsBucket; -} - -export interface AggregationsBucketAggregationBase extends AggregationsAggregation { - aggregations?: Record; -} - -export interface AggregationsBucketScriptAggregation extends AggregationsPipelineAggregationBase { - script?: Script; -} - -export interface AggregationsBucketSelectorAggregation extends AggregationsPipelineAggregationBase { - script?: Script; -} - -export interface AggregationsBucketSortAggregation extends AggregationsAggregation { - from?: integer; - gap_policy?: AggregationsGapPolicy; - size?: integer; - sort?: SearchSort; -} - -export interface AggregationsBucketsPath { } - -export interface AggregationsCardinalityAggregation extends AggregationsMetricAggregationBase { - precision_threshold?: integer; - rehash?: boolean; -} - -export interface AggregationsChiSquareHeuristic { - background_is_superset: boolean; - include_negatives: boolean; -} - -export interface AggregationsChildrenAggregation extends AggregationsBucketAggregationBase { - type?: RelationName; -} - -export interface AggregationsClassificationInferenceOptions { - num_top_classes?: integer; - num_top_feature_importance_values?: integer; - prediction_field_type?: string; - results_field?: string; - top_classes_results_field?: string; -} - -export interface AggregationsCompositeAggregation extends AggregationsBucketAggregationBase { - after?: Record; - size?: integer; - sources?: Record[]; -} - -export interface AggregationsCompositeAggregationSource { - terms?: AggregationsTermsAggregation; - histogram?: AggregationsHistogramAggregation; - date_histogram?: AggregationsDateHistogramAggregation; - geotile_grid?: AggregationsGeoTileGridAggregation; -} - -export interface AggregationsCompositeBucketKeys { } -export type AggregationsCompositeBucket = - | AggregationsCompositeBucketKeys - | { [property: string]: AggregationsAggregate }; - -export interface AggregationsCompositeBucketAggregate - extends AggregationsMultiBucketAggregate> { - after_key: Record; -} - -export interface AggregationsCumulativeCardinalityAggregation - extends AggregationsPipelineAggregationBase { } - -export interface AggregationsCumulativeSumAggregation extends AggregationsPipelineAggregationBase { } - -export interface AggregationsDateHistogramAggregation extends AggregationsBucketAggregationBase { - calendar_interval?: AggregationsDateInterval | Time; - extended_bounds?: AggregationsExtendedBounds; - hard_bounds?: AggregationsExtendedBounds; - field?: Field; - fixed_interval?: AggregationsDateInterval | Time; - format?: string; - interval?: AggregationsDateInterval | Time; - min_doc_count?: integer; - missing?: DateString; - offset?: Time; - order?: AggregationsHistogramOrder; - params?: Record; - script?: Script; - time_zone?: string; -} - -export interface AggregationsDateHistogramBucketKeys { } - -export type AggregationsDateHistogramBucket = - | AggregationsDateHistogramBucketKeys - | { [property: string]: AggregationsAggregate }; - -export type AggregationsDateInterval = - | 'second' - | 'minute' - | 'hour' - | 'day' - | 'week' - | 'month' - | 'quarter' - | 'year'; - -export interface AggregationsDateRangeAggregation extends AggregationsBucketAggregationBase { - field?: Field; - format?: string; - missing?: AggregationsMissing; - ranges?: AggregationsDateRangeExpression[]; - time_zone?: string; -} - -export interface AggregationsDateRangeExpression { - from?: DateMath | float; - from_as_string?: string; - to_as_string?: string; - key?: string; - to?: DateMath | float; - doc_count?: long; -} - -export interface AggregationsDerivativeAggregation extends AggregationsPipelineAggregationBase { } - -export interface AggregationsDiversifiedSamplerAggregation - extends AggregationsBucketAggregationBase { - execution_hint?: AggregationsSamplerAggregationExecutionHint; - max_docs_per_value?: integer; - script?: Script; - shard_size?: integer; - field?: Field; -} - -export interface AggregationsEwmaModelSettings { - alpha?: float; -} - -export interface AggregationsExtendedBounds { - max: T; - min: T; -} - -export interface AggregationsExtendedStatsAggregate extends AggregationsStatsAggregate { - std_deviation_bounds: AggregationsStandardDeviationBounds; - sum_of_squares?: double; - variance?: double; - variance_population?: double; - variance_sampling?: double; - std_deviation?: double; - std_deviation_population?: double; - std_deviation_sampling?: double; -} - -export interface AggregationsExtendedStatsAggregation - extends AggregationsFormatMetricAggregationBase { - sigma?: double; -} - -export interface AggregationsExtendedStatsBucketAggregation - extends AggregationsPipelineAggregationBase { - sigma?: double; -} - -export interface AggregationsFiltersAggregate extends AggregationsAggregateBase { - buckets: AggregationsFiltersBucketItem[] | Record; -} - -export interface AggregationsFiltersAggregation extends AggregationsBucketAggregationBase { - filters?: Record | QueryDslQueryContainer[]; - other_bucket?: boolean; - other_bucket_key?: string; -} - -export interface AggregationsFiltersBucketItemKeys { - doc_count: long; -} -export type AggregationsFiltersBucketItem = - | AggregationsFiltersBucketItemKeys - | { [property: string]: AggregationsAggregate }; - -export interface AggregationsFormatMetricAggregationBase extends AggregationsMetricAggregationBase { - format?: string; -} - -export interface AggregationsFormattableMetricAggregation - extends AggregationsMetricAggregationBase { - format?: string; -} - -export type AggregationsGapPolicy = 'skip' | 'insert_zeros'; - -export interface AggregationsGeoBounds { - bottom_right: LatLon; - top_left: LatLon; -} - -export interface AggregationsGeoBoundsAggregate extends AggregationsAggregateBase { - bounds: AggregationsGeoBounds; -} - -export interface AggregationsGeoBoundsAggregation extends AggregationsMetricAggregationBase { - wrap_longitude?: boolean; -} - -export interface AggregationsGeoCentroidAggregate extends AggregationsAggregateBase { - count: long; - location: QueryDslGeoLocation; -} - -export interface AggregationsGeoCentroidAggregation extends AggregationsMetricAggregationBase { - count?: long; - location?: QueryDslGeoLocation; -} - -export interface AggregationsGeoDistanceAggregation extends AggregationsBucketAggregationBase { - distance_type?: GeoDistanceType; - field?: Field; - origin?: QueryDslGeoLocation | string; - ranges?: AggregationsAggregationRange[]; - unit?: DistanceUnit; -} - -export interface AggregationsGeoHashGridAggregation extends AggregationsBucketAggregationBase { - bounds?: QueryDslBoundingBox; - field?: Field; - precision?: GeoHashPrecision; - shard_size?: integer; - size?: integer; -} - -export interface AggregationsGeoLineAggregate extends AggregationsAggregateBase { - type: string; - geometry: AggregationsLineStringGeoShape; - properties: AggregationsGeoLineProperties; -} - -export interface AggregationsGeoLineAggregation { - point: AggregationsGeoLinePoint; - sort: AggregationsGeoLineSort; - include_sort?: boolean; - sort_order?: SearchSortOrder; - size?: integer; -} - -export interface AggregationsGeoLinePoint { - field: Field; -} - -export interface AggregationsGeoLineProperties { - complete: boolean; - sort_values: double[]; -} - -export interface AggregationsGeoLineSort { - field: Field; -} - -export interface AggregationsGeoTileGridAggregation extends AggregationsBucketAggregationBase { - field?: Field; - precision?: GeoTilePrecision; - shard_size?: integer; - size?: integer; - bounds?: AggregationsGeoBounds; -} - -export interface AggregationsGlobalAggregation extends AggregationsBucketAggregationBase { } - -export interface AggregationsGoogleNormalizedDistanceHeuristic { - background_is_superset: boolean; -} - -export interface AggregationsHdrMethod { - number_of_significant_value_digits?: integer; -} - -export interface AggregationsHdrPercentileItem { - key: double; - value: double; -} - -export interface AggregationsHdrPercentilesAggregate extends AggregationsAggregateBase { - values: AggregationsHdrPercentileItem[]; -} - -export interface AggregationsHistogramAggregation extends AggregationsBucketAggregationBase { - extended_bounds?: AggregationsExtendedBounds; - hard_bounds?: AggregationsExtendedBounds; - field?: Field; - interval?: double; - min_doc_count?: integer; - missing?: double; - offset?: double; - order?: AggregationsHistogramOrder; - script?: Script; - format?: string; -} - -export interface AggregationsHistogramOrder { - _count?: SearchSortOrder; - _key?: SearchSortOrder; -} - -export interface AggregationsHoltLinearModelSettings { - alpha?: float; - beta?: float; -} - -export interface AggregationsHoltWintersModelSettings { - alpha?: float; - beta?: float; - gamma?: float; - pad?: boolean; - period?: integer; - type?: AggregationsHoltWintersType; -} - -export type AggregationsHoltWintersType = 'add' | 'mult'; - -export interface AggregationsInferenceAggregation extends AggregationsPipelineAggregationBase { - model_id: Name; - inference_config?: AggregationsInferenceConfigContainer; -} - -export interface AggregationsInferenceConfigContainer { - regression?: AggregationsRegressionInferenceOptions; - classification?: AggregationsClassificationInferenceOptions; -} - -export interface AggregationsIpRangeAggregation extends AggregationsBucketAggregationBase { - field?: Field; - ranges?: AggregationsIpRangeAggregationRange[]; -} - -export interface AggregationsIpRangeAggregationRange { - from?: string; - mask?: string; - to?: string; -} - -export interface AggregationsIpRangeBucketKeys { } -export type AggregationsIpRangeBucket = - | AggregationsIpRangeBucketKeys - | { [property: string]: AggregationsAggregate }; - -export interface AggregationsKeyedBucketKeys { - doc_count: long; - key: TKey; - key_as_string: string; -} -export type AggregationsKeyedBucket = - | AggregationsKeyedBucketKeys - | { [property: string]: AggregationsAggregate }; - -export interface AggregationsKeyedValueAggregate extends AggregationsValueAggregate { - keys: string[]; -} - -export interface AggregationsLineStringGeoShape { - coordinates: QueryDslGeoCoordinate[]; -} - -export interface AggregationsMatrixAggregation extends AggregationsAggregation { - fields?: Fields; - missing?: Record; -} - -export interface AggregationsMatrixStatsAggregate extends AggregationsAggregateBase { - correlation: Record; - covariance: Record; - count: integer; - kurtosis: double; - mean: double; - skewness: double; - variance: double; - name: string; -} - -export interface AggregationsMatrixStatsAggregation extends AggregationsMatrixAggregation { - mode?: AggregationsMatrixStatsMode; -} - -export type AggregationsMatrixStatsMode = 'avg' | 'min' | 'max' | 'sum' | 'median'; - -export interface AggregationsMaxAggregation extends AggregationsFormatMetricAggregationBase { } - -export interface AggregationsMaxBucketAggregation extends AggregationsPipelineAggregationBase { } - -export interface AggregationsMedianAbsoluteDeviationAggregation - extends AggregationsFormatMetricAggregationBase { - compression?: double; -} - -export type AggregationsMetricAggregate = - | AggregationsValueAggregate - | AggregationsBoxPlotAggregate - | AggregationsGeoBoundsAggregate - | AggregationsGeoCentroidAggregate - | AggregationsGeoLineAggregate - | AggregationsPercentilesAggregate - | AggregationsScriptedMetricAggregate - | AggregationsStatsAggregate - | AggregationsStringStatsAggregate - | AggregationsTopHitsAggregate - | AggregationsTopMetricsAggregate - | AggregationsExtendedStatsAggregate - | AggregationsTDigestPercentilesAggregate - | AggregationsHdrPercentilesAggregate; - -export interface AggregationsMetricAggregationBase { - field?: Field; - missing?: AggregationsMissing; - script?: Script; -} - -export interface AggregationsMinAggregation extends AggregationsFormatMetricAggregationBase { } - -export interface AggregationsMinBucketAggregation extends AggregationsPipelineAggregationBase { } - -export type AggregationsMinimumInterval = 'second' | 'minute' | 'hour' | 'day' | 'month' | 'year'; - -export type AggregationsMissing = string | integer | double | boolean; - -export interface AggregationsMissingAggregation extends AggregationsBucketAggregationBase { - field?: Field; - missing?: AggregationsMissing; -} - -export interface AggregationsMovingAverageAggregation extends AggregationsPipelineAggregationBase { - minimize?: boolean; - model?: AggregationsMovingAverageModel; - settings: AggregationsMovingAverageSettings; - predict?: integer; - window?: integer; -} - -export type AggregationsMovingAverageModel = 'linear' | 'simple' | 'ewma' | 'holt' | 'holt_winters'; - -export type AggregationsMovingAverageSettings = - | AggregationsEwmaModelSettings - | AggregationsHoltLinearModelSettings - | AggregationsHoltWintersModelSettings; - -export interface AggregationsMovingFunctionAggregation extends AggregationsPipelineAggregationBase { - script?: string; - shift?: integer; - window?: integer; -} - -export interface AggregationsMovingPercentilesAggregation - extends AggregationsPipelineAggregationBase { - window?: integer; - shift?: integer; -} - -export interface AggregationsMultiBucketAggregate - extends AggregationsAggregateBase { - buckets: TBucket[]; -} - -export interface AggregationsMultiTermLookup { - field: Field; -} - -export interface AggregationsMultiTermsAggregation extends AggregationsBucketAggregationBase { - terms: AggregationsMultiTermLookup[]; -} - -export interface AggregationsMutualInformationHeuristic { - background_is_superset: boolean; - include_negatives: boolean; -} - -export interface AggregationsNestedAggregation extends AggregationsBucketAggregationBase { - path?: Field; -} - -export interface AggregationsNormalizeAggregation extends AggregationsPipelineAggregationBase { - method?: AggregationsNormalizeMethod; -} - -export type AggregationsNormalizeMethod = - | 'rescale_0_1' - | 'rescale_0_100' - | 'percent_of_sum' - | 'mean' - | 'zscore' - | 'softmax'; - -export interface AggregationsParentAggregation extends AggregationsBucketAggregationBase { - type?: RelationName; -} - -export interface AggregationsPercentageScoreHeuristic { } - -export interface AggregationsPercentileItem { - percentile: double; - value: double; -} - -export interface AggregationsPercentileRanksAggregation - extends AggregationsFormatMetricAggregationBase { - keyed?: boolean; - values?: double[]; - hdr?: AggregationsHdrMethod; - tdigest?: AggregationsTDigest; -} - -export interface AggregationsPercentilesAggregate extends AggregationsAggregateBase { - items: AggregationsPercentileItem[]; -} - -export interface AggregationsPercentilesAggregation - extends AggregationsFormatMetricAggregationBase { - keyed?: boolean; - percents?: double[]; - hdr?: AggregationsHdrMethod; - tdigest?: AggregationsTDigest; -} - -export interface AggregationsPercentilesBucketAggregation - extends AggregationsPipelineAggregationBase { - percents?: double[]; -} - -export interface AggregationsPipelineAggregationBase extends AggregationsAggregation { - buckets_path?: AggregationsBucketsPath; - format?: string; - gap_policy?: AggregationsGapPolicy; -} - -export interface AggregationsRangeAggregation extends AggregationsBucketAggregationBase { - field?: Field; - ranges?: AggregationsAggregationRange[]; - script?: Script; -} - -export interface AggregationsRangeBucketKeys { } -export type AggregationsRangeBucket = - | AggregationsRangeBucketKeys - | { [property: string]: AggregationsAggregate }; - -export interface AggregationsRareTermsAggregation extends AggregationsBucketAggregationBase { - exclude?: string | string[]; - field?: Field; - include?: string | string[] | AggregationsTermsInclude; - max_doc_count?: long; - missing?: AggregationsMissing; - precision?: double; - value_type?: string; -} - -export interface AggregationsRareTermsBucketKeys { } -export type AggregationsRareTermsBucket = - | AggregationsRareTermsBucketKeys - | { [property: string]: AggregationsAggregate }; - -export interface AggregationsRateAggregation extends AggregationsFormatMetricAggregationBase { - unit?: AggregationsDateInterval; - mode?: AggregationsRateMode; -} - -export type AggregationsRateMode = 'sum' | 'value_count'; - -export interface AggregationsRegressionInferenceOptions { - results_field: Field; - num_top_feature_importance_values?: integer; -} - -export interface AggregationsReverseNestedAggregation extends AggregationsBucketAggregationBase { - path?: Field; -} - -export interface AggregationsSamplerAggregation extends AggregationsBucketAggregationBase { - shard_size?: integer; -} - -export type AggregationsSamplerAggregationExecutionHint = 'map' | 'global_ordinals' | 'bytes_hash'; - -export interface AggregationsScriptedHeuristic { - script: Script; -} - -export interface AggregationsScriptedMetricAggregate extends AggregationsAggregateBase { - value: any; -} - -export interface AggregationsScriptedMetricAggregation extends AggregationsMetricAggregationBase { - combine_script?: Script; - init_script?: Script; - map_script?: Script; - params?: Record; - reduce_script?: Script; -} - -export interface AggregationsSerialDifferencingAggregation - extends AggregationsPipelineAggregationBase { - lag?: integer; -} - -export interface AggregationsSignificantTermsAggregate - extends AggregationsMultiBucketAggregate { - bg_count: long; - doc_count: long; -} - -export interface AggregationsSignificantTermsAggregation extends AggregationsBucketAggregationBase { - background_filter?: QueryDslQueryContainer; - chi_square?: AggregationsChiSquareHeuristic; - exclude?: string | string[]; - execution_hint?: AggregationsTermsAggregationExecutionHint; - field?: Field; - gnd?: AggregationsGoogleNormalizedDistanceHeuristic; - include?: string | string[]; - min_doc_count?: long; - mutual_information?: AggregationsMutualInformationHeuristic; - percentage?: AggregationsPercentageScoreHeuristic; - script_heuristic?: AggregationsScriptedHeuristic; - shard_min_doc_count?: long; - shard_size?: integer; - size?: integer; -} - -export interface AggregationsSignificantTermsBucketKeys { } -export type AggregationsSignificantTermsBucket = - | AggregationsSignificantTermsBucketKeys - | { [property: string]: AggregationsAggregate }; - -export interface AggregationsSignificantTextAggregation extends AggregationsBucketAggregationBase { - background_filter?: QueryDslQueryContainer; - chi_square?: AggregationsChiSquareHeuristic; - exclude?: string | string[]; - execution_hint?: AggregationsTermsAggregationExecutionHint; - field?: Field; - filter_duplicate_text?: boolean; - gnd?: AggregationsGoogleNormalizedDistanceHeuristic; - include?: string | string[]; - min_doc_count?: long; - mutual_information?: AggregationsMutualInformationHeuristic; - percentage?: AggregationsPercentageScoreHeuristic; - script_heuristic?: AggregationsScriptedHeuristic; - shard_min_doc_count?: long; - shard_size?: integer; - size?: integer; - source_fields?: Fields; -} - -export interface AggregationsSingleBucketAggregateKeys extends AggregationsAggregateBase { - doc_count: double; -} -export type AggregationsSingleBucketAggregate = - | AggregationsSingleBucketAggregateKeys - | { [property: string]: AggregationsAggregate }; - -export interface AggregationsStandardDeviationBounds { - lower?: double; - upper?: double; - lower_population?: double; - upper_population?: double; - lower_sampling?: double; - upper_sampling?: double; -} - -export interface AggregationsStatsAggregate extends AggregationsAggregateBase { - count: double; - sum: double; - avg?: double; - max?: double; - min?: double; -} - -export interface AggregationsStatsAggregation extends AggregationsFormatMetricAggregationBase { } - -export interface AggregationsStatsBucketAggregation extends AggregationsPipelineAggregationBase { } - -export interface AggregationsStringStatsAggregate extends AggregationsAggregateBase { - count: long; - min_length: integer; - max_length: integer; - avg_length: double; - entropy: double; - distribution?: Record; -} - -export interface AggregationsStringStatsAggregation extends AggregationsMetricAggregationBase { - show_distribution?: boolean; -} - -export interface AggregationsSumAggregation extends AggregationsFormatMetricAggregationBase { } - -export interface AggregationsSumBucketAggregation extends AggregationsPipelineAggregationBase { } - -export interface AggregationsTDigest { - compression?: integer; -} - -export interface AggregationsTDigestPercentilesAggregate extends AggregationsAggregateBase { - values: Record; -} - -export interface AggregationsTTestAggregation extends AggregationsAggregation { - a?: AggregationsTestPopulation; - b?: AggregationsTestPopulation; - type?: AggregationsTTestType; -} - -export type AggregationsTTestType = 'paired' | 'homoscedastic' | 'heteroscedastic'; - -export interface AggregationsTermsAggregate - extends AggregationsMultiBucketAggregate { - doc_count_error_upper_bound: long; - sum_other_doc_count: long; -} - -export interface AggregationsTermsAggregation extends AggregationsBucketAggregationBase { - collect_mode?: AggregationsTermsAggregationCollectMode; - exclude?: string | string[]; - execution_hint?: AggregationsTermsAggregationExecutionHint; - field?: Field; - include?: string | string[] | AggregationsTermsInclude; - min_doc_count?: integer; - missing?: AggregationsMissing; - missing_bucket?: boolean; - value_type?: string; - order?: AggregationsTermsAggregationOrder; - script?: Script; - shard_size?: integer; - show_term_doc_count_error?: boolean; - size?: integer; -} - -export type AggregationsTermsAggregationCollectMode = 'depth_first' | 'breadth_first'; - -export type AggregationsTermsAggregationExecutionHint = - | 'map' - | 'global_ordinals' - | 'global_ordinals_hash' - | 'global_ordinals_low_cardinality'; - -export type AggregationsTermsAggregationOrder = - | SearchSortOrder - | Record - | Record[]; - -export interface AggregationsTermsInclude { - num_partitions: long; - partition: long; -} - -export interface AggregationsTestPopulation { - field: Field; - script?: Script; - filter?: QueryDslQueryContainer; -} - -export interface AggregationsTopHitsAggregate extends AggregationsAggregateBase { - hits: SearchHitsMetadata>; -} - -export interface AggregationsTopHitsAggregation extends AggregationsMetricAggregationBase { - docvalue_fields?: Fields; - explain?: boolean; - from?: integer; - highlight?: SearchHighlight; - script_fields?: Record; - size?: integer; - sort?: SearchSort; - _source?: boolean | SearchSourceFilter | Fields; - stored_fields?: Fields; - track_scores?: boolean; - version?: boolean; - seq_no_primary_term?: boolean; -} - -export interface AggregationsTopMetrics { - sort: (long | double | string)[]; - metrics: Record; -} - -export interface AggregationsTopMetricsAggregate extends AggregationsAggregateBase { - top: AggregationsTopMetrics[]; -} - -export interface AggregationsTopMetricsAggregation extends AggregationsMetricAggregationBase { - metrics?: AggregationsTopMetricsValue | AggregationsTopMetricsValue[]; - size?: integer; - sort?: SearchSort; -} - -export interface AggregationsTopMetricsValue { - field: Field; -} - -export interface AggregationsValueAggregate extends AggregationsAggregateBase { - value: double; - value_as_string?: string; -} - -export interface AggregationsValueCountAggregation - extends AggregationsFormattableMetricAggregation { } - -export type AggregationsValueType = - | 'string' - | 'long' - | 'double' - | 'number' - | 'date' - | 'date_nanos' - | 'ip' - | 'numeric' - | 'geo_point' - | 'boolean'; - -export interface AggregationsVariableWidthHistogramAggregation { - field?: Field; - buckets?: integer; - shard_size?: integer; - initial_buffer?: integer; -} - -export interface AggregationsWeightedAverageAggregation extends AggregationsAggregation { - format?: string; - value?: AggregationsWeightedAverageValue; - value_type?: AggregationsValueType; - weight?: AggregationsWeightedAverageValue; -} - -export interface AggregationsWeightedAverageValue { - field?: Field; - missing?: double; - script?: Script; -} - -export interface AnalysisAsciiFoldingTokenFilter extends AnalysisTokenFilterBase { - preserve_original: boolean; -} - -export type AnalysisCharFilter = - | AnalysisHtmlStripCharFilter - | AnalysisMappingCharFilter - | AnalysisPatternReplaceTokenFilter; - -export interface AnalysisCharFilterBase { - type: string; - version?: VersionString; -} - -export interface AnalysisCharGroupTokenizer extends AnalysisTokenizerBase { - tokenize_on_chars: string[]; -} - -export interface AnalysisCommonGramsTokenFilter extends AnalysisTokenFilterBase { - common_words: string[]; - common_words_path: string; - ignore_case: boolean; - query_mode: boolean; -} - -export interface AnalysisCompoundWordTokenFilterBase extends AnalysisTokenFilterBase { - hyphenation_patterns_path: string; - max_subword_size: integer; - min_subword_size: integer; - min_word_size: integer; - only_longest_match: boolean; - word_list: string[]; - word_list_path: string; -} - -export interface AnalysisConditionTokenFilter extends AnalysisTokenFilterBase { - filter: string[]; - script: Script; -} - -export type AnalysisDelimitedPayloadEncoding = 'int' | 'float' | 'identity'; - -export interface AnalysisDelimitedPayloadTokenFilter extends AnalysisTokenFilterBase { - delimiter: string; - encoding: AnalysisDelimitedPayloadEncoding; -} - -export type AnalysisEdgeNGramSide = 'front' | 'back'; - -export interface AnalysisEdgeNGramTokenFilter extends AnalysisTokenFilterBase { - max_gram: integer; - min_gram: integer; - side: AnalysisEdgeNGramSide; -} - -export interface AnalysisEdgeNGramTokenizer extends AnalysisTokenizerBase { - custom_token_chars: string; - max_gram: integer; - min_gram: integer; - token_chars: AnalysisTokenChar[]; -} - -export interface AnalysisElisionTokenFilter extends AnalysisTokenFilterBase { - articles: string[]; - articles_case: boolean; -} - -export interface AnalysisFingerprintTokenFilter extends AnalysisTokenFilterBase { - max_output_size: integer; - separator: string; -} - -export interface AnalysisHtmlStripCharFilter extends AnalysisCharFilterBase { } - -export interface AnalysisHunspellTokenFilter extends AnalysisTokenFilterBase { - dedup: boolean; - dictionary: string; - locale: string; - longest_only: boolean; -} - -export interface AnalysisHyphenationDecompounderTokenFilter - extends AnalysisCompoundWordTokenFilterBase { } - -export interface AnalysisKStemTokenFilter extends AnalysisTokenFilterBase { } - -export type AnalysisKeepTypesMode = 'include' | 'exclude'; - -export interface AnalysisKeepTypesTokenFilter extends AnalysisTokenFilterBase { - mode: AnalysisKeepTypesMode; - types: string[]; -} - -export interface AnalysisKeepWordsTokenFilter extends AnalysisTokenFilterBase { - keep_words: string[]; - keep_words_case: boolean; - keep_words_path: string; -} - -export interface AnalysisKeywordMarkerTokenFilter extends AnalysisTokenFilterBase { - ignore_case: boolean; - keywords: string[]; - keywords_path: string; - keywords_pattern: string; -} - -export interface AnalysisKeywordTokenizer extends AnalysisTokenizerBase { - buffer_size: integer; -} - -export interface AnalysisLengthTokenFilter extends AnalysisTokenFilterBase { - max: integer; - min: integer; -} - -export interface AnalysisLetterTokenizer extends AnalysisTokenizerBase { } - -export interface AnalysisLimitTokenCountTokenFilter extends AnalysisTokenFilterBase { - consume_all_tokens: boolean; - max_token_count: integer; -} - -export interface AnalysisLowercaseTokenFilter extends AnalysisTokenFilterBase { - language: string; -} - -export interface AnalysisLowercaseTokenizer extends AnalysisTokenizerBase { } - -export interface AnalysisMappingCharFilter extends AnalysisCharFilterBase { - mappings: string[]; - mappings_path: string; -} - -export interface AnalysisMultiplexerTokenFilter extends AnalysisTokenFilterBase { - filters: string[]; - preserve_original: boolean; -} - -export interface AnalysisNGramTokenFilter extends AnalysisTokenFilterBase { - max_gram: integer; - min_gram: integer; -} - -export interface AnalysisNGramTokenizer extends AnalysisTokenizerBase { - custom_token_chars: string; - max_gram: integer; - min_gram: integer; - token_chars: AnalysisTokenChar[]; -} - -export type AnalysisNoriDecompoundMode = 'discard' | 'none' | 'mixed'; - -export interface AnalysisNoriPartOfSpeechTokenFilter extends AnalysisTokenFilterBase { - stoptags: string[]; -} - -export interface AnalysisNoriTokenizer extends AnalysisTokenizerBase { - decompound_mode: AnalysisNoriDecompoundMode; - discard_punctuation: boolean; - user_dictionary: string; - user_dictionary_rules: string[]; -} - -export interface AnalysisPathHierarchyTokenizer extends AnalysisTokenizerBase { - buffer_size: integer; - delimiter: string; - replacement: string; - reverse: boolean; - skip: integer; -} - -export interface AnalysisPatternCaptureTokenFilter extends AnalysisTokenFilterBase { - patterns: string[]; - preserve_original: boolean; -} - -export interface AnalysisPatternReplaceTokenFilter extends AnalysisTokenFilterBase { - flags: string; - pattern: string; - replacement: string; -} - -export interface AnalysisPorterStemTokenFilter extends AnalysisTokenFilterBase { } - -export interface AnalysisPredicateTokenFilter extends AnalysisTokenFilterBase { - script: Script; -} - -export interface AnalysisRemoveDuplicatesTokenFilter extends AnalysisTokenFilterBase { } - -export interface AnalysisReverseTokenFilter extends AnalysisTokenFilterBase { } - -export interface AnalysisShingleTokenFilter extends AnalysisTokenFilterBase { - filler_token: string; - max_shingle_size: integer; - min_shingle_size: integer; - output_unigrams: boolean; - output_unigrams_if_no_shingles: boolean; - token_separator: string; -} - -export type AnalysisSnowballLanguage = - | 'Armenian' - | 'Basque' - | 'Catalan' - | 'Danish' - | 'Dutch' - | 'English' - | 'Finnish' - | 'French' - | 'German' - | 'German2' - | 'Hungarian' - | 'Italian' - | 'Kp' - | 'Lovins' - | 'Norwegian' - | 'Porter' - | 'Portuguese' - | 'Romanian' - | 'Russian' - | 'Spanish' - | 'Swedish' - | 'Turkish'; - -export interface AnalysisSnowballTokenFilter extends AnalysisTokenFilterBase { - language: AnalysisSnowballLanguage; -} - -export interface AnalysisStandardTokenizer extends AnalysisTokenizerBase { - max_token_length: integer; -} - -export interface AnalysisStemmerOverrideTokenFilter extends AnalysisTokenFilterBase { - rules: string[]; - rules_path: string; -} - -export interface AnalysisStemmerTokenFilter extends AnalysisTokenFilterBase { - language: string; -} - -export interface AnalysisStopTokenFilter extends AnalysisTokenFilterBase { - ignore_case?: boolean; - remove_trailing?: boolean; - stopwords: AnalysisStopWords; - stopwords_path?: string; -} - -export type AnalysisStopWords = string | string[]; - -export type AnalysisSynonymFormat = 'solr' | 'wordnet'; - -export interface AnalysisSynonymGraphTokenFilter extends AnalysisTokenFilterBase { - expand: boolean; - format: AnalysisSynonymFormat; - lenient: boolean; - synonyms: string[]; - synonyms_path: string; - tokenizer: string; - updateable: boolean; -} - -export interface AnalysisSynonymTokenFilter extends AnalysisTokenFilterBase { - expand: boolean; - format: AnalysisSynonymFormat; - lenient: boolean; - synonyms: string[]; - synonyms_path: string; - tokenizer: string; - updateable: boolean; -} - -export type AnalysisTokenChar = - | 'letter' - | 'digit' - | 'whitespace' - | 'punctuation' - | 'symbol' - | 'custom'; - -export type AnalysisTokenFilter = - | AnalysisAsciiFoldingTokenFilter - | AnalysisCommonGramsTokenFilter - | AnalysisConditionTokenFilter - | AnalysisDelimitedPayloadTokenFilter - | AnalysisEdgeNGramTokenFilter - | AnalysisElisionTokenFilter - | AnalysisFingerprintTokenFilter - | AnalysisHunspellTokenFilter - | AnalysisHyphenationDecompounderTokenFilter - | AnalysisKeepTypesTokenFilter - | AnalysisKeepWordsTokenFilter - | AnalysisKeywordMarkerTokenFilter - | AnalysisKStemTokenFilter - | AnalysisLengthTokenFilter - | AnalysisLimitTokenCountTokenFilter - | AnalysisLowercaseTokenFilter - | AnalysisMultiplexerTokenFilter - | AnalysisNGramTokenFilter - | AnalysisNoriPartOfSpeechTokenFilter - | AnalysisPatternCaptureTokenFilter - | AnalysisPatternReplaceTokenFilter - | AnalysisPorterStemTokenFilter - | AnalysisPredicateTokenFilter - | AnalysisRemoveDuplicatesTokenFilter - | AnalysisReverseTokenFilter - | AnalysisShingleTokenFilter - | AnalysisSnowballTokenFilter - | AnalysisStemmerOverrideTokenFilter - | AnalysisStemmerTokenFilter - | AnalysisStopTokenFilter - | AnalysisSynonymGraphTokenFilter - | AnalysisSynonymTokenFilter - | AnalysisTrimTokenFilter - | AnalysisTruncateTokenFilter - | AnalysisUniqueTokenFilter - | AnalysisUppercaseTokenFilter - | AnalysisWordDelimiterGraphTokenFilter - | AnalysisWordDelimiterTokenFilter; - -export interface AnalysisTokenFilterBase { - type: string; - version?: VersionString; -} - -export type AnalysisTokenizer = - | AnalysisCharGroupTokenizer - | AnalysisEdgeNGramTokenizer - | AnalysisKeywordTokenizer - | AnalysisLetterTokenizer - | AnalysisLowercaseTokenizer - | AnalysisNGramTokenizer - | AnalysisNoriTokenizer - | AnalysisPathHierarchyTokenizer - | AnalysisStandardTokenizer - | AnalysisUaxEmailUrlTokenizer - | AnalysisWhitespaceTokenizer; - -export interface AnalysisTokenizerBase { - type: string; - version?: VersionString; -} - -export interface AnalysisTrimTokenFilter extends AnalysisTokenFilterBase { } - -export interface AnalysisTruncateTokenFilter extends AnalysisTokenFilterBase { - length: integer; -} - -export interface AnalysisUaxEmailUrlTokenizer extends AnalysisTokenizerBase { - max_token_length: integer; -} - -export interface AnalysisUniqueTokenFilter extends AnalysisTokenFilterBase { - only_on_same_position: boolean; -} - -export interface AnalysisUppercaseTokenFilter extends AnalysisTokenFilterBase { } - -export interface AnalysisWhitespaceTokenizer extends AnalysisTokenizerBase { - max_token_length: integer; -} - -export interface AnalysisWordDelimiterGraphTokenFilter extends AnalysisTokenFilterBase { - adjust_offsets: boolean; - catenate_all: boolean; - catenate_numbers: boolean; - catenate_words: boolean; - generate_number_parts: boolean; - generate_word_parts: boolean; - preserve_original: boolean; - protected_words: string[]; - protected_words_path: string; - split_on_case_change: boolean; - split_on_numerics: boolean; - stem_english_possessive: boolean; - type_table: string[]; - type_table_path: string; -} - -export interface AnalysisWordDelimiterTokenFilter extends AnalysisTokenFilterBase { - catenate_all: boolean; - catenate_numbers: boolean; - catenate_words: boolean; - generate_number_parts: boolean; - generate_word_parts: boolean; - preserve_original: boolean; - protected_words: string[]; - protected_words_path: string; - split_on_case_change: boolean; - split_on_numerics: boolean; - stem_english_possessive: boolean; - type_table: string[]; - type_table_path: string; -} - -export interface MappingAllField { - analyzer: string; - enabled: boolean; - omit_norms: boolean; - search_analyzer: string; - similarity: string; - store: boolean; - store_term_vector_offsets: boolean; - store_term_vector_payloads: boolean; - store_term_vector_positions: boolean; - store_term_vectors: boolean; -} - -export interface MappingBinaryProperty extends MappingDocValuesPropertyBase { - type: 'binary'; -} - -export interface MappingBooleanProperty extends MappingDocValuesPropertyBase { - boost?: double; - fielddata?: IndicesNumericFielddata; - index?: boolean; - null_value?: boolean; - type: 'boolean'; -} - -export interface MappingCompletionProperty extends MappingDocValuesPropertyBase { - analyzer?: string; - contexts?: MappingSuggestContext[]; - max_input_length?: integer; - preserve_position_increments?: boolean; - preserve_separators?: boolean; - search_analyzer?: string; - type: 'completion'; -} - -export interface MappingConstantKeywordProperty extends MappingPropertyBase { - value?: any; - type: 'constant_keyword'; -} - -export type MappingCoreProperty = - | MappingObjectProperty - | MappingNestedProperty - | MappingSearchAsYouTypeProperty - | MappingTextProperty - | MappingDocValuesProperty; - -export interface MappingCorePropertyBase extends MappingPropertyBase { - copy_to?: Fields; - similarity?: string; - store?: boolean; -} - -export interface MappingDateNanosProperty extends MappingDocValuesPropertyBase { - boost?: double; - format?: string; - ignore_malformed?: boolean; - index?: boolean; - null_value?: DateString; - precision_step?: integer; - type: 'date_nanos'; -} - -export interface MappingDateProperty extends MappingDocValuesPropertyBase { - boost?: double; - fielddata?: IndicesNumericFielddata; - format?: string; - ignore_malformed?: boolean; - index?: boolean; - null_value?: DateString; - precision_step?: integer; - type: 'date'; -} - -export interface MappingDateRangeProperty extends MappingRangePropertyBase { - format?: string; - type: 'date_range'; -} - -export type MappingDocValuesProperty = - | MappingBinaryProperty - | MappingBooleanProperty - | MappingDateProperty - | MappingDateNanosProperty - | MappingKeywordProperty - | MappingNumberProperty - | MappingRangeProperty - | MappingGeoPointProperty - | MappingGeoShapeProperty - | MappingCompletionProperty - | MappingGenericProperty - | MappingIpProperty - | MappingMurmur3HashProperty - | MappingShapeProperty - | MappingTokenCountProperty - | MappingVersionProperty - | MappingWildcardProperty - | MappingPointProperty; - -export interface MappingDocValuesPropertyBase extends MappingCorePropertyBase { - doc_values?: boolean; -} - -export interface MappingDoubleRangeProperty extends MappingRangePropertyBase { - type: 'double_range'; -} - -export type MappingDynamicMapping = 'strict' | 'runtime' | 'true' | 'false'; - -export interface MappingDynamicTemplate { - mapping?: MappingPropertyBase; - match?: string; - match_mapping_type?: string; - match_pattern?: MappingMatchType; - path_match?: string; - path_unmatch?: string; - unmatch?: string; -} - -export interface MappingFieldAliasProperty extends MappingPropertyBase { - path?: Field; - type: 'alias'; -} - -export interface MappingFieldMapping { } - -export interface MappingFieldNamesField { - enabled: boolean; -} - -export type MappingFieldType = - | 'none' - | 'geo_point' - | 'geo_shape' - | 'ip' - | 'binary' - | 'keyword' - | 'text' - | 'search_as_you_type' - | 'date' - | 'date_nanos' - | 'boolean' - | 'completion' - | 'nested' - | 'object' - | 'murmur3' - | 'token_count' - | 'percolator' - | 'integer' - | 'long' - | 'short' - | 'byte' - | 'float' - | 'half_float' - | 'scaled_float' - | 'double' - | 'integer_range' - | 'float_range' - | 'long_range' - | 'double_range' - | 'date_range' - | 'ip_range' - | 'alias' - | 'join' - | 'rank_feature' - | 'rank_features' - | 'flattened' - | 'shape' - | 'histogram' - | 'constant_keyword'; - -export interface MappingFlattenedProperty extends MappingPropertyBase { - boost?: double; - depth_limit?: integer; - doc_values?: boolean; - eager_global_ordinals?: boolean; - index?: boolean; - index_options?: MappingIndexOptions; - null_value?: string; - similarity?: string; - split_queries_on_whitespace?: boolean; - type: 'flattened'; -} - -export interface MappingFloatRangeProperty extends MappingRangePropertyBase { - type: 'float_range'; -} - -export interface MappingGenericProperty extends MappingDocValuesPropertyBase { - analyzer?: string; - boost?: double; - fielddata?: IndicesStringFielddata; - ignore_malformed?: boolean; - index?: boolean; - index_options?: MappingIndexOptions; - norms?: boolean; - null_value?: string; - position_increment_gap?: integer; - search_analyzer?: string; - term_vector?: MappingTermVectorOption; - type: string; -} - -export type MappingGeoOrientation = - | 'right' - | 'RIGHT' - | 'counterclockwise' - | 'COUNTERCLOCKWISE' - | 'ccw' - | 'CCW' - | 'left' - | 'LEFT' - | 'clockwise' - | 'CLOCKWISE' - | 'cw' - | 'CW'; - -export interface MappingGeoPointProperty extends MappingDocValuesPropertyBase { - ignore_malformed?: boolean; - ignore_z_value?: boolean; - null_value?: QueryDslGeoLocation; - type: 'geo_point'; -} - -export interface MappingGeoShapeProperty extends MappingDocValuesPropertyBase { - coerce?: boolean; - ignore_malformed?: boolean; - ignore_z_value?: boolean; - orientation?: MappingGeoOrientation; - strategy?: MappingGeoStrategy; - type: 'geo_shape'; -} - -export type MappingGeoStrategy = 'recursive' | 'term'; - -export interface MappingHistogramProperty extends MappingPropertyBase { - ignore_malformed?: boolean; - type: 'histogram'; -} - -export interface MappingIndexField { - enabled: boolean; -} - -export type MappingIndexOptions = 'docs' | 'freqs' | 'positions' | 'offsets'; - -export interface MappingIntegerRangeProperty extends MappingRangePropertyBase { - type: 'integer_range'; -} - -export interface MappingIpProperty extends MappingDocValuesPropertyBase { - boost?: double; - index?: boolean; - null_value?: string; - type: 'ip'; -} - -export interface MappingIpRangeProperty extends MappingRangePropertyBase { - type: 'ip_range'; -} - -export interface MappingJoinProperty extends MappingPropertyBase { - relations?: Record; - type: 'join'; -} - -export interface MappingKeywordProperty extends MappingDocValuesPropertyBase { - boost?: double; - eager_global_ordinals?: boolean; - index?: boolean; - index_options?: MappingIndexOptions; - normalizer?: string; - norms?: boolean; - null_value?: string; - split_queries_on_whitespace?: boolean; - type: 'keyword'; -} - -export interface MappingLongRangeProperty extends MappingRangePropertyBase { - type: 'long_range'; -} - -export type MappingMatchType = 'simple' | 'regex'; - -export interface MappingMurmur3HashProperty extends MappingDocValuesPropertyBase { - type: 'murmur3'; -} - -export interface MappingNestedProperty extends MappingCorePropertyBase { - enabled?: boolean; - include_in_parent?: boolean; - include_in_root?: boolean; - type: 'nested'; -} - -export interface MappingNumberProperty extends MappingDocValuesPropertyBase { - boost?: double; - coerce?: boolean; - fielddata?: IndicesNumericFielddata; - ignore_malformed?: boolean; - index?: boolean; - null_value?: double; - scaling_factor?: double; - type: MappingNumberType; -} - -export type MappingNumberType = - | 'float' - | 'half_float' - | 'scaled_float' - | 'double' - | 'integer' - | 'long' - | 'short' - | 'byte' - | 'unsigned_long'; - -export interface MappingObjectProperty extends MappingCorePropertyBase { - enabled?: boolean; - type?: 'object'; -} - -export interface MappingPercolatorProperty extends MappingPropertyBase { - type: 'percolator'; -} - -export interface MappingPointProperty extends MappingDocValuesPropertyBase { - ignore_malformed?: boolean; - ignore_z_value?: boolean; - null_value?: string; - type: 'point'; -} - -export type MappingProperty = - | MappingFlattenedProperty - | MappingJoinProperty - | MappingPercolatorProperty - | MappingRankFeatureProperty - | MappingRankFeaturesProperty - | MappingConstantKeywordProperty - | MappingFieldAliasProperty - | MappingHistogramProperty - | MappingCoreProperty; - -export interface MappingPropertyBase { - local_metadata?: Metadata; - meta?: Record; - name?: PropertyName; - properties?: Record; - ignore_above?: integer; - dynamic?: boolean | MappingDynamicMapping; - fields?: Record; -} - -export type MappingRangeProperty = - | MappingLongRangeProperty - | MappingIpRangeProperty - | MappingIntegerRangeProperty - | MappingFloatRangeProperty - | MappingDoubleRangeProperty - | MappingDateRangeProperty; - -export interface MappingRangePropertyBase extends MappingDocValuesPropertyBase { - boost?: double; - coerce?: boolean; - index?: boolean; -} - -export interface MappingRankFeatureProperty extends MappingPropertyBase { - positive_score_impact?: boolean; - type: 'rank_feature'; -} - -export interface MappingRankFeaturesProperty extends MappingPropertyBase { - type: 'rank_features'; -} - -export interface MappingRoutingField { - required: boolean; -} - -export interface MappingRuntimeField { - format?: string; - script?: Script; - type: MappingRuntimeFieldType; -} - -export type MappingRuntimeFieldType = - | 'boolean' - | 'date' - | 'double' - | 'geo_point' - | 'ip' - | 'keyword' - | 'long'; - -export type MappingRuntimeFields = Record; - -export interface MappingSearchAsYouTypeProperty extends MappingCorePropertyBase { - analyzer?: string; - index?: boolean; - index_options?: MappingIndexOptions; - max_shingle_size?: integer; - norms?: boolean; - search_analyzer?: string; - search_quote_analyzer?: string; - term_vector?: MappingTermVectorOption; - type: 'search_as_you_type'; -} - -export type MappingShapeOrientation = - | 'right' - | 'counterclockwise' - | 'ccw' - | 'left' - | 'clockwise' - | 'cw'; - -export interface MappingShapeProperty extends MappingDocValuesPropertyBase { - coerce?: boolean; - ignore_malformed?: boolean; - ignore_z_value?: boolean; - orientation?: MappingShapeOrientation; - type: 'shape'; -} - -export interface MappingSizeField { - enabled: boolean; -} - -export interface MappingSourceField { - compress?: boolean; - compress_threshold?: string; - enabled: boolean; - excludes?: string[]; - includes?: string[]; -} - -export interface MappingSuggestContext { - name: Name; - path?: Field; - type: string; - precision?: integer; -} - -export type MappingTermVectorOption = - | 'no' - | 'yes' - | 'with_offsets' - | 'with_positions' - | 'with_positions_offsets' - | 'with_positions_offsets_payloads'; - -export interface MappingTextIndexPrefixes { - max_chars: integer; - min_chars: integer; -} - -export interface MappingTextProperty extends MappingCorePropertyBase { - analyzer?: string; - boost?: double; - eager_global_ordinals?: boolean; - fielddata?: boolean; - fielddata_frequency_filter?: IndicesFielddataFrequencyFilter; - index?: boolean; - index_options?: MappingIndexOptions; - index_phrases?: boolean; - index_prefixes?: MappingTextIndexPrefixes; - norms?: boolean; - position_increment_gap?: integer; - search_analyzer?: string; - search_quote_analyzer?: string; - term_vector?: MappingTermVectorOption; - type: 'text'; -} - -export interface MappingTokenCountProperty extends MappingDocValuesPropertyBase { - analyzer?: string; - boost?: double; - index?: boolean; - null_value?: double; - enable_position_increments?: boolean; - type: 'token_count'; -} - -export interface MappingTypeMapping { - all_field?: MappingAllField; - date_detection?: boolean; - dynamic?: boolean | MappingDynamicMapping; - dynamic_date_formats?: string[]; - dynamic_templates?: - | Record - | Record[]; - _field_names?: MappingFieldNamesField; - index_field?: MappingIndexField; - _meta?: Metadata; - numeric_detection?: boolean; - properties?: Record; - _routing?: MappingRoutingField; - _size?: MappingSizeField; - _source?: MappingSourceField; - runtime?: Record; -} - -export interface MappingVersionProperty extends MappingDocValuesPropertyBase { - type: 'version'; -} - -export interface MappingWildcardProperty extends MappingDocValuesPropertyBase { - type: 'wildcard'; -} - -export interface QueryDslBoolQuery extends QueryDslQueryBase { - filter?: QueryDslQueryContainer | QueryDslQueryContainer[]; - minimum_should_match?: MinimumShouldMatch; - must?: QueryDslQueryContainer | QueryDslQueryContainer[]; - must_not?: QueryDslQueryContainer | QueryDslQueryContainer[]; - should?: QueryDslQueryContainer | QueryDslQueryContainer[]; -} - -export interface QueryDslBoostingQuery extends QueryDslQueryBase { - negative_boost?: double; - negative?: QueryDslQueryContainer; - positive?: QueryDslQueryContainer; -} - -export interface QueryDslBoundingBox { - bottom_right?: QueryDslGeoLocation; - top_left?: QueryDslGeoLocation; - wkt?: string; -} - -export type QueryDslChildScoreMode = 'none' | 'avg' | 'sum' | 'max' | 'min'; - -export interface QueryDslCombinedFieldsQuery { - query: string; - fields: Field[]; - operator?: string; -} - -export interface QueryDslCommonTermsQuery extends QueryDslQueryBase { - analyzer?: string; - cutoff_frequency?: double; - high_freq_operator?: QueryDslOperator; - low_freq_operator?: QueryDslOperator; - minimum_should_match?: MinimumShouldMatch; - query?: string; -} - -export interface QueryDslConstantScoreQuery extends QueryDslQueryBase { - filter?: QueryDslQueryContainer; -} - -export interface QueryDslDateDecayFunctionKeys extends QueryDslDecayFunctionBase { } -export type QueryDslDateDecayFunction = - | QueryDslDateDecayFunctionKeys - | { [property: string]: QueryDslDecayPlacement }; - -export type QueryDslDecayFunction = - | QueryDslDateDecayFunction - | QueryDslNumericDecayFunction - | QueryDslGeoDecayFunction; - -export interface QueryDslDecayFunctionBase extends QueryDslScoreFunctionBase { - multi_value_mode?: QueryDslMultiValueMode; -} - -export interface QueryDslDecayPlacement { - decay?: double; - offset?: TScale; - scale?: TScale; - origin?: TOrigin; -} - -export interface QueryDslDisMaxQuery extends QueryDslQueryBase { - queries?: QueryDslQueryContainer[]; - tie_breaker?: double; -} - -export interface QueryDslDistanceFeatureQuery extends QueryDslQueryBase { - origin?: number[] | QueryDslGeoCoordinate | DateMath; - pivot?: Distance | Time; - field?: Field; -} - -export interface QueryDslExistsQuery extends QueryDslQueryBase { - field?: Field; -} - -export interface QueryDslFieldLookup { - id?: Id; - index?: IndexName; - path?: Field; - routing?: Routing; -} - -export type QueryDslFieldValueFactorModifier = - | 'none' - | 'log' - | 'log1p' - | 'log2p' - | 'ln' - | 'ln1p' - | 'ln2p' - | 'square' - | 'sqrt' - | 'reciprocal'; - -export interface QueryDslFieldValueFactorScoreFunction extends QueryDslScoreFunctionBase { - field: Field; - factor?: double; - missing?: double; - modifier?: QueryDslFieldValueFactorModifier; -} - -export type QueryDslFunctionBoostMode = 'multiply' | 'replace' | 'sum' | 'avg' | 'max' | 'min'; - -export interface QueryDslFunctionScoreContainer { - exp?: QueryDslDecayFunction; - gauss?: QueryDslDecayFunction; - linear?: QueryDslDecayFunction; - field_value_factor?: QueryDslFieldValueFactorScoreFunction; - random_score?: QueryDslRandomScoreFunction; - script_score?: QueryDslScriptScoreFunction; - filter?: QueryDslQueryContainer; - weight?: double; -} - -export type QueryDslFunctionScoreMode = 'multiply' | 'sum' | 'avg' | 'first' | 'max' | 'min'; - -export interface QueryDslFunctionScoreQuery extends QueryDslQueryBase { - boost_mode?: QueryDslFunctionBoostMode; - functions?: QueryDslFunctionScoreContainer[]; - max_boost?: double; - min_score?: double; - query?: QueryDslQueryContainer; - score_mode?: QueryDslFunctionScoreMode; -} - -export interface QueryDslFuzzyQuery extends QueryDslQueryBase { - max_expansions?: integer; - prefix_length?: integer; - rewrite?: MultiTermQueryRewrite; - transpositions?: boolean; - fuzziness?: Fuzziness; - value: any; -} - -export interface QueryDslGeoBoundingBoxQuery extends QueryDslQueryBase { - bounding_box?: QueryDslBoundingBox; - type?: QueryDslGeoExecution; - validation_method?: QueryDslGeoValidationMethod; - top_left?: LatLon; - bottom_right?: LatLon; -} - -export type QueryDslGeoCoordinate = string | double[] | QueryDslThreeDimensionalPoint; - -export interface QueryDslGeoDecayFunctionKeys extends QueryDslDecayFunctionBase { } -export type QueryDslGeoDecayFunction = - | QueryDslGeoDecayFunctionKeys - | { [property: string]: QueryDslDecayPlacement }; - -export interface QueryDslGeoDistanceQueryKeys extends QueryDslQueryBase { - distance?: Distance; - distance_type?: GeoDistanceType; - validation_method?: QueryDslGeoValidationMethod; -} -export type QueryDslGeoDistanceQuery = - | QueryDslGeoDistanceQueryKeys - | { [property: string]: QueryDslGeoLocation }; - -export type QueryDslGeoExecution = 'memory' | 'indexed'; - -export type QueryDslGeoLocation = string | double[] | QueryDslTwoDimensionalPoint; - -export interface QueryDslGeoPolygonQuery extends QueryDslQueryBase { - points?: QueryDslGeoLocation[]; - validation_method?: QueryDslGeoValidationMethod; -} - -export interface QueryDslGeoShape { - type?: string; -} - -export interface QueryDslGeoShapeQuery extends QueryDslQueryBase { - ignore_unmapped?: boolean; - indexed_shape?: QueryDslFieldLookup; - relation?: GeoShapeRelation; - shape?: QueryDslGeoShape; -} - -export type QueryDslGeoValidationMethod = 'coerce' | 'ignore_malformed' | 'strict'; - -export interface QueryDslHasChildQuery extends QueryDslQueryBase { - ignore_unmapped?: boolean; - inner_hits?: SearchInnerHits; - max_children?: integer; - min_children?: integer; - query?: QueryDslQueryContainer; - score_mode?: QueryDslChildScoreMode; - type?: RelationName; -} - -export interface QueryDslHasParentQuery extends QueryDslQueryBase { - ignore_unmapped?: boolean; - inner_hits?: SearchInnerHits; - parent_type?: RelationName; - query?: QueryDslQueryContainer; - score?: boolean; -} - -export interface QueryDslIdsQuery extends QueryDslQueryBase { - values?: Id[] | long[]; -} - -export interface QueryDslIntervalsAllOf { - intervals?: QueryDslIntervalsContainer[]; - max_gaps?: integer; - ordered?: boolean; - filter?: QueryDslIntervalsFilter; -} - -export interface QueryDslIntervalsAnyOf { - intervals?: QueryDslIntervalsContainer[]; - filter?: QueryDslIntervalsFilter; -} - -export interface QueryDslIntervalsContainer { - all_of?: QueryDslIntervalsAllOf; - any_of?: QueryDslIntervalsAnyOf; - fuzzy?: QueryDslIntervalsFuzzy; - match?: QueryDslIntervalsMatch; - prefix?: QueryDslIntervalsPrefix; - wildcard?: QueryDslIntervalsWildcard; -} - -export interface QueryDslIntervalsFilter { - after?: QueryDslIntervalsContainer; - before?: QueryDslIntervalsContainer; - contained_by?: QueryDslIntervalsContainer; - containing?: QueryDslIntervalsContainer; - not_contained_by?: QueryDslIntervalsContainer; - not_containing?: QueryDslIntervalsContainer; - not_overlapping?: QueryDslIntervalsContainer; - overlapping?: QueryDslIntervalsContainer; - script?: Script; -} - -export interface QueryDslIntervalsFuzzy { - analyzer?: string; - fuzziness?: Fuzziness; - prefix_length?: integer; - term?: string; - transpositions?: boolean; - use_field?: Field; -} - -export interface QueryDslIntervalsMatch { - analyzer?: string; - max_gaps?: integer; - ordered?: boolean; - query?: string; - use_field?: Field; - filter?: QueryDslIntervalsFilter; -} - -export interface QueryDslIntervalsPrefix { - analyzer?: string; - prefix?: string; - use_field?: Field; -} - -export interface QueryDslIntervalsQuery extends QueryDslQueryBase { - all_of?: QueryDslIntervalsAllOf; - any_of?: QueryDslIntervalsAnyOf; - fuzzy?: QueryDslIntervalsFuzzy; - match?: QueryDslIntervalsMatch; - prefix?: QueryDslIntervalsPrefix; - wildcard?: QueryDslIntervalsWildcard; -} - -export interface QueryDslIntervalsWildcard { - analyzer?: string; - pattern?: string; - use_field?: Field; -} - -export type QueryDslLike = string | QueryDslLikeDocument; - -export interface QueryDslLikeDocument { - doc?: any; - fields?: Fields; - _id?: Id | number; - _type?: Type; - _index?: IndexName; - per_field_analyzer?: Record; - routing?: Routing; -} - -export interface QueryDslMatchAllQuery extends QueryDslQueryBase { - norm_field?: string; -} - -export interface QueryDslMatchBoolPrefixQuery extends QueryDslQueryBase { - analyzer?: string; - fuzziness?: Fuzziness; - fuzzy_rewrite?: MultiTermQueryRewrite; - fuzzy_transpositions?: boolean; - max_expansions?: integer; - minimum_should_match?: MinimumShouldMatch; - operator?: QueryDslOperator; - prefix_length?: integer; - query?: string; -} - -export interface QueryDslMatchNoneQuery extends QueryDslQueryBase { } - -export interface QueryDslMatchPhrasePrefixQuery extends QueryDslQueryBase { - analyzer?: string; - max_expansions?: integer; - query?: string; - slop?: integer; - zero_terms_query?: QueryDslZeroTermsQuery; -} - -export interface QueryDslMatchPhraseQuery extends QueryDslQueryBase { - analyzer?: string; - query?: string; - slop?: integer; -} - -export interface QueryDslMatchQuery extends QueryDslQueryBase { - analyzer?: string; - auto_generate_synonyms_phrase_query?: boolean; - cutoff_frequency?: double; - fuzziness?: Fuzziness; - fuzzy_rewrite?: MultiTermQueryRewrite; - fuzzy_transpositions?: boolean; - lenient?: boolean; - max_expansions?: integer; - minimum_should_match?: MinimumShouldMatch; - operator?: QueryDslOperator; - prefix_length?: integer; - query?: string | float | boolean; - zero_terms_query?: QueryDslZeroTermsQuery; -} - -export interface QueryDslMoreLikeThisQuery extends QueryDslQueryBase { - analyzer?: string; - boost_terms?: double; - fields?: Fields; - include?: boolean; - like?: QueryDslLike | QueryDslLike[]; - max_doc_freq?: integer; - max_query_terms?: integer; - max_word_length?: integer; - min_doc_freq?: integer; - minimum_should_match?: MinimumShouldMatch; - min_term_freq?: integer; - min_word_length?: integer; - per_field_analyzer?: Record; - routing?: Routing; - stop_words?: AnalysisStopWords; - unlike?: QueryDslLike | QueryDslLike[]; - version?: VersionNumber; - version_type?: VersionType; -} - -export interface QueryDslMultiMatchQuery extends QueryDslQueryBase { - analyzer?: string; - auto_generate_synonyms_phrase_query?: boolean; - cutoff_frequency?: double; - fields?: Fields; - fuzziness?: Fuzziness; - fuzzy_rewrite?: MultiTermQueryRewrite; - fuzzy_transpositions?: boolean; - lenient?: boolean; - max_expansions?: integer; - minimum_should_match?: MinimumShouldMatch; - operator?: QueryDslOperator; - prefix_length?: integer; - query?: string; - slop?: integer; - tie_breaker?: double; - type?: QueryDslTextQueryType; - use_dis_max?: boolean; - zero_terms_query?: QueryDslZeroTermsQuery; -} - -export type QueryDslMultiValueMode = 'min' | 'max' | 'avg' | 'sum'; - -export interface QueryDslNamedQueryKeys { - boost?: float; - _name?: string; - ignore_unmapped?: boolean; -} -export type QueryDslNamedQuery = - | QueryDslNamedQueryKeys - | { [property: string]: TQuery }; - -export interface QueryDslNestedQuery extends QueryDslQueryBase { - ignore_unmapped?: boolean; - inner_hits?: SearchInnerHits; - path?: Field; - query?: QueryDslQueryContainer; - score_mode?: QueryDslNestedScoreMode; -} - -export type QueryDslNestedScoreMode = 'avg' | 'sum' | 'min' | 'max' | 'none'; - -export interface QueryDslNumericDecayFunctionKeys extends QueryDslDecayFunctionBase { } -export type QueryDslNumericDecayFunction = - | QueryDslNumericDecayFunctionKeys - | { [property: string]: QueryDslDecayPlacement }; - -export type QueryDslOperator = 'and' | 'or' | 'AND' | 'OR'; - -export interface QueryDslParentIdQuery extends QueryDslQueryBase { - id?: Id; - ignore_unmapped?: boolean; - type?: RelationName; -} - -export interface QueryDslPercolateQuery extends QueryDslQueryBase { - document?: any; - documents?: any[]; - field?: Field; - id?: Id; - index?: IndexName; - preference?: string; - routing?: Routing; - version?: VersionNumber; -} - -export interface QueryDslPinnedQuery extends QueryDslQueryBase { - ids?: Id[] | long[]; - organic?: QueryDslQueryContainer; -} - -export interface QueryDslPrefixQuery extends QueryDslQueryBase { - rewrite?: MultiTermQueryRewrite; - value: string; -} - -export interface QueryDslQueryBase { - boost?: float; - _name?: string; -} - -export interface QueryDslQueryContainer { - bool?: QueryDslBoolQuery; - boosting?: QueryDslBoostingQuery; - common?: Record; - combined_fields?: QueryDslCombinedFieldsQuery; - constant_score?: QueryDslConstantScoreQuery; - dis_max?: QueryDslDisMaxQuery; - distance_feature?: - | Record - | QueryDslDistanceFeatureQuery; - exists?: QueryDslExistsQuery; - function_score?: QueryDslFunctionScoreQuery; - fuzzy?: Record; - geo_bounding_box?: QueryDslNamedQuery; - geo_distance?: QueryDslGeoDistanceQuery; - geo_polygon?: QueryDslNamedQuery; - geo_shape?: QueryDslNamedQuery; - has_child?: QueryDslHasChildQuery; - has_parent?: QueryDslHasParentQuery; - ids?: QueryDslIdsQuery; - intervals?: QueryDslNamedQuery; - match?: QueryDslNamedQuery; - match_all?: QueryDslMatchAllQuery; - match_bool_prefix?: QueryDslNamedQuery; - match_none?: QueryDslMatchNoneQuery; - match_phrase?: QueryDslNamedQuery; - match_phrase_prefix?: QueryDslNamedQuery; - more_like_this?: QueryDslMoreLikeThisQuery; - multi_match?: QueryDslMultiMatchQuery; - nested?: QueryDslNestedQuery; - parent_id?: QueryDslParentIdQuery; - percolate?: QueryDslPercolateQuery; - pinned?: QueryDslPinnedQuery; - prefix?: QueryDslNamedQuery; - query_string?: QueryDslQueryStringQuery; - range?: QueryDslNamedQuery; - rank_feature?: QueryDslNamedQuery; - regexp?: QueryDslNamedQuery; - script?: QueryDslScriptQuery; - script_score?: QueryDslScriptScoreQuery; - shape?: QueryDslNamedQuery; - simple_query_string?: QueryDslSimpleQueryStringQuery; - span_containing?: QueryDslSpanContainingQuery; - field_masking_span?: QueryDslSpanFieldMaskingQuery; - span_first?: QueryDslSpanFirstQuery; - span_multi?: QueryDslSpanMultiTermQuery; - span_near?: QueryDslSpanNearQuery; - span_not?: QueryDslSpanNotQuery; - span_or?: QueryDslSpanOrQuery; - span_term?: QueryDslNamedQuery; - span_within?: QueryDslSpanWithinQuery; - template?: QueryDslQueryTemplate; - term?: QueryDslNamedQuery; - terms?: QueryDslNamedQuery; - terms_set?: QueryDslNamedQuery; - wildcard?: QueryDslNamedQuery; - type?: QueryDslTypeQuery; -} - -export interface QueryDslQueryStringQuery extends QueryDslQueryBase { - allow_leading_wildcard?: boolean; - analyzer?: string; - analyze_wildcard?: boolean; - auto_generate_synonyms_phrase_query?: boolean; - default_field?: Field; - default_operator?: QueryDslOperator; - enable_position_increments?: boolean; - escape?: boolean; - fields?: Fields; - fuzziness?: Fuzziness; - fuzzy_max_expansions?: integer; - fuzzy_prefix_length?: integer; - fuzzy_rewrite?: MultiTermQueryRewrite; - fuzzy_transpositions?: boolean; - lenient?: boolean; - max_determinized_states?: integer; - minimum_should_match?: MinimumShouldMatch; - phrase_slop?: double; - query?: string; - quote_analyzer?: string; - quote_field_suffix?: string; - rewrite?: MultiTermQueryRewrite; - tie_breaker?: double; - time_zone?: string; - type?: QueryDslTextQueryType; -} - -export interface QueryDslQueryTemplate { - source: string; -} - -export interface QueryDslRandomScoreFunction extends QueryDslScoreFunctionBase { - field?: Field; - seed?: long | string; -} - -export interface QueryDslRangeQuery extends QueryDslQueryBase { - gt?: double | DateMath; - gte?: double | DateMath; - lt?: double | DateMath; - lte?: double | DateMath; - relation?: QueryDslRangeRelation; - time_zone?: string; - from?: double | DateMath; - to?: double | DateMath; -} - -export type QueryDslRangeRelation = 'within' | 'contains' | 'intersects'; - -export interface QueryDslRankFeatureFunction { } - -export interface QueryDslRankFeatureQuery extends QueryDslQueryBase { - function?: QueryDslRankFeatureFunction; -} - -export interface QueryDslRegexpQuery extends QueryDslQueryBase { - flags?: string; - max_determinized_states?: integer; - value?: string; -} - -export interface QueryDslScoreFunctionBase { - filter?: QueryDslQueryContainer; - weight?: double; -} - -export interface QueryDslScriptQuery extends QueryDslQueryBase { - script?: Script; -} - -export interface QueryDslScriptScoreFunction extends QueryDslScoreFunctionBase { - script: Script; -} - -export interface QueryDslScriptScoreQuery extends QueryDslQueryBase { - query?: QueryDslQueryContainer; - script?: Script; -} - -export interface QueryDslShapeQuery extends QueryDslQueryBase { - ignore_unmapped?: boolean; - indexed_shape?: QueryDslFieldLookup; - relation?: ShapeRelation; - shape?: QueryDslGeoShape; -} - -export type QueryDslSimpleQueryStringFlags = - | 'NONE' - | 'AND' - | 'OR' - | 'NOT' - | 'PREFIX' - | 'PHRASE' - | 'PRECEDENCE' - | 'ESCAPE' - | 'WHITESPACE' - | 'FUZZY' - | 'NEAR' - | 'SLOP' - | 'ALL'; - -export interface QueryDslSimpleQueryStringQuery extends QueryDslQueryBase { - analyzer?: string; - analyze_wildcard?: boolean; - auto_generate_synonyms_phrase_query?: boolean; - default_operator?: QueryDslOperator; - fields?: Fields; - flags?: QueryDslSimpleQueryStringFlags | string; - fuzzy_max_expansions?: integer; - fuzzy_prefix_length?: integer; - fuzzy_transpositions?: boolean; - lenient?: boolean; - minimum_should_match?: MinimumShouldMatch; - query?: string; - quote_field_suffix?: string; -} - -export interface QueryDslSpanContainingQuery extends QueryDslQueryBase { - big?: QueryDslSpanQuery; - little?: QueryDslSpanQuery; -} - -export interface QueryDslSpanFieldMaskingQuery extends QueryDslQueryBase { - field?: Field; - query?: QueryDslSpanQuery; -} - -export interface QueryDslSpanFirstQuery extends QueryDslQueryBase { - end?: integer; - match?: QueryDslSpanQuery; -} - -export interface QueryDslSpanGapQuery extends QueryDslQueryBase { - field?: Field; - width?: integer; -} - -export interface QueryDslSpanMultiTermQuery extends QueryDslQueryBase { - match?: QueryDslQueryContainer; -} - -export interface QueryDslSpanNearQuery extends QueryDslQueryBase { - clauses?: QueryDslSpanQuery[]; - in_order?: boolean; - slop?: integer; -} - -export interface QueryDslSpanNotQuery extends QueryDslQueryBase { - dist?: integer; - exclude?: QueryDslSpanQuery; - include?: QueryDslSpanQuery; - post?: integer; - pre?: integer; -} - -export interface QueryDslSpanOrQuery extends QueryDslQueryBase { - clauses?: QueryDslSpanQuery[]; -} - -export interface QueryDslSpanQuery extends QueryDslQueryBase { - span_containing?: QueryDslNamedQuery; - field_masking_span?: QueryDslNamedQuery; - span_first?: QueryDslNamedQuery; - span_gap?: QueryDslNamedQuery; - span_multi?: QueryDslSpanMultiTermQuery; - span_near?: QueryDslNamedQuery; - span_not?: QueryDslNamedQuery; - span_or?: QueryDslNamedQuery; - span_term?: QueryDslNamedQuery; - span_within?: QueryDslNamedQuery; -} - -export interface QueryDslSpanTermQuery extends QueryDslQueryBase { - value: string; -} - -export interface QueryDslSpanWithinQuery extends QueryDslQueryBase { - big?: QueryDslSpanQuery; - little?: QueryDslSpanQuery; -} - -export interface QueryDslTermQuery extends QueryDslQueryBase { - value?: string | float | boolean; -} - -export interface QueryDslTermsQuery extends QueryDslQueryBase { - terms?: string[]; - index?: IndexName; - id?: Id; - path?: string; - routing?: Routing; -} - -export interface QueryDslTermsSetQuery extends QueryDslQueryBase { - minimum_should_match_field?: Field; - minimum_should_match_script?: Script; - terms?: string[]; -} - -export type QueryDslTextQueryType = - | 'best_fields' - | 'most_fields' - | 'cross_fields' - | 'phrase' - | 'phrase_prefix' - | 'bool_prefix'; - -export interface QueryDslThreeDimensionalPoint { - lat: double; - lon: double; - z?: double; -} - -export interface QueryDslTwoDimensionalPoint { - lat: double; - lon: double; -} - -export interface QueryDslTypeQuery extends QueryDslQueryBase { - value: string; -} - -export interface QueryDslWildcardQuery extends QueryDslQueryBase { - rewrite?: MultiTermQueryRewrite; - value: string; -} - -export type QueryDslZeroTermsQuery = 'all' | 'none'; -export interface CatCatRequestBase extends RequestBase, SpecUtilsCommonCatQueryParameters { } - -export interface CatAliasesAliasesRecord { - alias?: string; - a?: string; - index?: IndexName; - i?: IndexName; - idx?: IndexName; - filter?: string; - f?: string; - fi?: string; - 'routing.index'?: string; - ri?: string; - routingIndex?: string; - 'routing.search'?: string; - rs?: string; - routingSearch?: string; - is_write_index?: string; - w?: string; - isWriteIndex?: string; -} - -export interface CatAliasesRequest extends CatCatRequestBase { - name?: Names; - expand_wildcards?: ExpandWildcards; -} - -export type CatAliasesResponse = CatAliasesAliasesRecord[]; - -export interface CatAllocationAllocationRecord { - shards?: string; - s?: string; - 'disk.indices'?: ByteSize; - di?: ByteSize; - diskIndices?: ByteSize; - 'disk.used'?: ByteSize; - du?: ByteSize; - diskUsed?: ByteSize; - 'disk.avail'?: ByteSize; - da?: ByteSize; - diskAvail?: ByteSize; - 'disk.total'?: ByteSize; - dt?: ByteSize; - diskTotal?: ByteSize; - 'disk.percent'?: Percentage; - dp?: Percentage; - diskPercent?: Percentage; - host?: Host; - h?: Host; - ip?: Ip; - node?: string; - n?: string; -} - -export interface CatAllocationRequest extends CatCatRequestBase { - node_id?: NodeIds; - bytes?: Bytes; -} - -export type CatAllocationResponse = CatAllocationAllocationRecord[]; - -export interface CatCountCountRecord { - epoch?: EpochMillis; - t?: EpochMillis; - time?: EpochMillis; - timestamp?: DateString; - ts?: DateString; - hms?: DateString; - hhmmss?: DateString; - count?: string; - dc?: string; - 'docs.count'?: string; - docsCount?: string; -} - -export interface CatCountRequest extends CatCatRequestBase { - index?: Indices; -} - -export type CatCountResponse = CatCountCountRecord[]; - -export interface CatFielddataFielddataRecord { - id?: string; - host?: string; - h?: string; - ip?: string; - node?: string; - n?: string; - field?: string; - f?: string; - size?: string; -} - -export interface CatFielddataRequest extends CatCatRequestBase { - fields?: Fields; - bytes?: Bytes; -} - -export type CatFielddataResponse = CatFielddataFielddataRecord[]; - -export interface CatHealthHealthRecord { - epoch?: EpochMillis; - time?: EpochMillis; - timestamp?: DateString; - ts?: DateString; - hms?: DateString; - hhmmss?: DateString; - cluster?: string; - cl?: string; - status?: string; - st?: string; - 'node.total'?: string; - nt?: string; - nodeTotal?: string; - 'node.data'?: string; - nd?: string; - nodeData?: string; - shards?: string; - t?: string; - sh?: string; - 'shards.total'?: string; - shardsTotal?: string; - pri?: string; - p?: string; - 'shards.primary'?: string; - shardsPrimary?: string; - relo?: string; - r?: string; - 'shards.relocating'?: string; - shardsRelocating?: string; - init?: string; - i?: string; - 'shards.initializing'?: string; - shardsInitializing?: string; - unassign?: string; - u?: string; - 'shards.unassigned'?: string; - shardsUnassigned?: string; - pending_tasks?: string; - pt?: string; - pendingTasks?: string; - max_task_wait_time?: string; - mtwt?: string; - maxTaskWaitTime?: string; - active_shards_percent?: string; - asp?: string; - activeShardsPercent?: string; -} - -export interface CatHealthRequest extends CatCatRequestBase { - include_timestamp?: boolean; - ts?: boolean; -} - -export type CatHealthResponse = CatHealthHealthRecord[]; - -export interface CatHelpHelpRecord { - endpoint: string; -} - -export interface CatHelpRequest extends CatCatRequestBase { } - -export type CatHelpResponse = CatHelpHelpRecord[]; - -export interface CatIndicesIndicesRecord { - health?: string; - h?: string; - status?: string; - s?: string; - index?: string; - i?: string; - idx?: string; - uuid?: string; - id?: string; - pri?: string; - p?: string; - 'shards.primary'?: string; - shardsPrimary?: string; - rep?: string; - r?: string; - 'shards.replica'?: string; - shardsReplica?: string; - 'docs.count'?: string; - dc?: string; - docsCount?: string; - 'docs.deleted'?: string; - dd?: string; - docsDeleted?: string; - 'creation.date'?: string; - cd?: string; - 'creation.date.string'?: string; - cds?: string; - 'store.size'?: string; - ss?: string; - storeSize?: string; - 'pri.store.size'?: string; - 'completion.size'?: string; - cs?: string; - completionSize?: string; - 'pri.completion.size'?: string; - 'fielddata.memory_size'?: string; - fm?: string; - fielddataMemory?: string; - 'pri.fielddata.memory_size'?: string; - 'fielddata.evictions'?: string; - fe?: string; - fielddataEvictions?: string; - 'pri.fielddata.evictions'?: string; - 'query_cache.memory_size'?: string; - qcm?: string; - queryCacheMemory?: string; - 'pri.query_cache.memory_size'?: string; - 'query_cache.evictions'?: string; - qce?: string; - queryCacheEvictions?: string; - 'pri.query_cache.evictions'?: string; - 'request_cache.memory_size'?: string; - rcm?: string; - requestCacheMemory?: string; - 'pri.request_cache.memory_size'?: string; - 'request_cache.evictions'?: string; - rce?: string; - requestCacheEvictions?: string; - 'pri.request_cache.evictions'?: string; - 'request_cache.hit_count'?: string; - rchc?: string; - requestCacheHitCount?: string; - 'pri.request_cache.hit_count'?: string; - 'request_cache.miss_count'?: string; - rcmc?: string; - requestCacheMissCount?: string; - 'pri.request_cache.miss_count'?: string; - 'flush.total'?: string; - ft?: string; - flushTotal?: string; - 'pri.flush.total'?: string; - 'flush.total_time'?: string; - ftt?: string; - flushTotalTime?: string; - 'pri.flush.total_time'?: string; - 'get.current'?: string; - gc?: string; - getCurrent?: string; - 'pri.get.current'?: string; - 'get.time'?: string; - gti?: string; - getTime?: string; - 'pri.get.time'?: string; - 'get.total'?: string; - gto?: string; - getTotal?: string; - 'pri.get.total'?: string; - 'get.exists_time'?: string; - geti?: string; - getExistsTime?: string; - 'pri.get.exists_time'?: string; - 'get.exists_total'?: string; - geto?: string; - getExistsTotal?: string; - 'pri.get.exists_total'?: string; - 'get.missing_time'?: string; - gmti?: string; - getMissingTime?: string; - 'pri.get.missing_time'?: string; - 'get.missing_total'?: string; - gmto?: string; - getMissingTotal?: string; - 'pri.get.missing_total'?: string; - 'indexing.delete_current'?: string; - idc?: string; - indexingDeleteCurrent?: string; - 'pri.indexing.delete_current'?: string; - 'indexing.delete_time'?: string; - idti?: string; - indexingDeleteTime?: string; - 'pri.indexing.delete_time'?: string; - 'indexing.delete_total'?: string; - idto?: string; - indexingDeleteTotal?: string; - 'pri.indexing.delete_total'?: string; - 'indexing.index_current'?: string; - iic?: string; - indexingIndexCurrent?: string; - 'pri.indexing.index_current'?: string; - 'indexing.index_time'?: string; - iiti?: string; - indexingIndexTime?: string; - 'pri.indexing.index_time'?: string; - 'indexing.index_total'?: string; - iito?: string; - indexingIndexTotal?: string; - 'pri.indexing.index_total'?: string; - 'indexing.index_failed'?: string; - iif?: string; - indexingIndexFailed?: string; - 'pri.indexing.index_failed'?: string; - 'merges.current'?: string; - mc?: string; - mergesCurrent?: string; - 'pri.merges.current'?: string; - 'merges.current_docs'?: string; - mcd?: string; - mergesCurrentDocs?: string; - 'pri.merges.current_docs'?: string; - 'merges.current_size'?: string; - mcs?: string; - mergesCurrentSize?: string; - 'pri.merges.current_size'?: string; - 'merges.total'?: string; - mt?: string; - mergesTotal?: string; - 'pri.merges.total'?: string; - 'merges.total_docs'?: string; - mtd?: string; - mergesTotalDocs?: string; - 'pri.merges.total_docs'?: string; - 'merges.total_size'?: string; - mts?: string; - mergesTotalSize?: string; - 'pri.merges.total_size'?: string; - 'merges.total_time'?: string; - mtt?: string; - mergesTotalTime?: string; - 'pri.merges.total_time'?: string; - 'refresh.total'?: string; - rto?: string; - refreshTotal?: string; - 'pri.refresh.total'?: string; - 'refresh.time'?: string; - rti?: string; - refreshTime?: string; - 'pri.refresh.time'?: string; - 'refresh.external_total'?: string; - reto?: string; - 'pri.refresh.external_total'?: string; - 'refresh.external_time'?: string; - reti?: string; - 'pri.refresh.external_time'?: string; - 'refresh.listeners'?: string; - rli?: string; - refreshListeners?: string; - 'pri.refresh.listeners'?: string; - 'search.fetch_current'?: string; - sfc?: string; - searchFetchCurrent?: string; - 'pri.search.fetch_current'?: string; - 'search.fetch_time'?: string; - sfti?: string; - searchFetchTime?: string; - 'pri.search.fetch_time'?: string; - 'search.fetch_total'?: string; - sfto?: string; - searchFetchTotal?: string; - 'pri.search.fetch_total'?: string; - 'search.open_contexts'?: string; - so?: string; - searchOpenContexts?: string; - 'pri.search.open_contexts'?: string; - 'search.query_current'?: string; - sqc?: string; - searchQueryCurrent?: string; - 'pri.search.query_current'?: string; - 'search.query_time'?: string; - sqti?: string; - searchQueryTime?: string; - 'pri.search.query_time'?: string; - 'search.query_total'?: string; - sqto?: string; - searchQueryTotal?: string; - 'pri.search.query_total'?: string; - 'search.scroll_current'?: string; - scc?: string; - searchScrollCurrent?: string; - 'pri.search.scroll_current'?: string; - 'search.scroll_time'?: string; - scti?: string; - searchScrollTime?: string; - 'pri.search.scroll_time'?: string; - 'search.scroll_total'?: string; - scto?: string; - searchScrollTotal?: string; - 'pri.search.scroll_total'?: string; - 'segments.count'?: string; - sc?: string; - segmentsCount?: string; - 'pri.segments.count'?: string; - 'segments.memory'?: string; - sm?: string; - segmentsMemory?: string; - 'pri.segments.memory'?: string; - 'segments.index_writer_memory'?: string; - siwm?: string; - segmentsIndexWriterMemory?: string; - 'pri.segments.index_writer_memory'?: string; - 'segments.version_map_memory'?: string; - svmm?: string; - segmentsVersionMapMemory?: string; - 'pri.segments.version_map_memory'?: string; - 'segments.fixed_bitset_memory'?: string; - sfbm?: string; - fixedBitsetMemory?: string; - 'pri.segments.fixed_bitset_memory'?: string; - 'warmer.current'?: string; - wc?: string; - warmerCurrent?: string; - 'pri.warmer.current'?: string; - 'warmer.total'?: string; - wto?: string; - warmerTotal?: string; - 'pri.warmer.total'?: string; - 'warmer.total_time'?: string; - wtt?: string; - warmerTotalTime?: string; - 'pri.warmer.total_time'?: string; - 'suggest.current'?: string; - suc?: string; - suggestCurrent?: string; - 'pri.suggest.current'?: string; - 'suggest.time'?: string; - suti?: string; - suggestTime?: string; - 'pri.suggest.time'?: string; - 'suggest.total'?: string; - suto?: string; - suggestTotal?: string; - 'pri.suggest.total'?: string; - 'memory.total'?: string; - tm?: string; - memoryTotal?: string; - 'pri.memory.total'?: string; - 'search.throttled'?: string; - sth?: string; - 'bulk.total_operations'?: string; - bto?: string; - bulkTotalOperation?: string; - 'pri.bulk.total_operations'?: string; - 'bulk.total_time'?: string; - btti?: string; - bulkTotalTime?: string; - 'pri.bulk.total_time'?: string; - 'bulk.total_size_in_bytes'?: string; - btsi?: string; - bulkTotalSizeInBytes?: string; - 'pri.bulk.total_size_in_bytes'?: string; - 'bulk.avg_time'?: string; - bati?: string; - bulkAvgTime?: string; - 'pri.bulk.avg_time'?: string; - 'bulk.avg_size_in_bytes'?: string; - basi?: string; - bulkAvgSizeInBytes?: string; - 'pri.bulk.avg_size_in_bytes'?: string; -} - -export interface CatIndicesRequest extends CatCatRequestBase { - index?: Indices; - bytes?: Bytes; - expand_wildcards?: ExpandWildcards; - health?: Health; - include_unloaded_segments?: boolean; - pri?: boolean; -} - -export type CatIndicesResponse = CatIndicesIndicesRecord[]; - -export interface CatClusterManagerClusterManagerRecord { - id?: string - host?: string - h?: string - ip?: string - node?: string - n?: string -} - -/** -* // TODO: delete CatMasterMasterRecord interface when it is removed from OpenSearch -* @deprecated use CatClusterManagerClusterManagerRecord instead -*/ -export interface CatMasterMasterRecord { - id?: string; - host?: string; - h?: string; - ip?: string; - node?: string; - n?: string; -} - -export interface CatClusterManagerRequest extends CatCatRequestBase { -} - -/** -* // TODO: delete CatMasterRequest interface when it is removed from OpenSearch -* @deprecated use CatClusterManagerRequest instead -*/ -export interface CatMasterRequest extends CatCatRequestBase { -} - -export type CatClusterManagerResponse = CatClusterManagerClusterManagerRecord[] - -/** -* // TODO: delete CatMasterResponse type when it is removed from OpenSearch -* @deprecated use CatClusterManagerResponse instead -*/ -export type CatMasterResponse = CatMasterMasterRecord[] - -export interface CatNodeAttributesNodeAttributesRecord { - node?: string; - id?: string; - pid?: string; - host?: string; - h?: string; - ip?: string; - i?: string; - port?: string; - attr?: string; - value?: string; -} - -export interface CatNodeAttributesRequest extends CatCatRequestBase { } - -export type CatNodeAttributesResponse = CatNodeAttributesNodeAttributesRecord[]; - -export interface CatNodesNodesRecord { - id?: Id - nodeId?: Id - pid?: string - p?: string - ip?: string - i?: string - port?: string - po?: string - http_address?: string - http?: string - version?: VersionString - v?: VersionString - flavor?: string - f?: string - type?: Type - t?: Type - build?: string - b?: string - jdk?: string - j?: string - 'disk.total'?: ByteSize - dt?: ByteSize - diskTotal?: ByteSize - 'disk.used'?: ByteSize - du?: ByteSize - diskUsed?: ByteSize - 'disk.avail'?: ByteSize - d?: ByteSize - da?: ByteSize - disk?: ByteSize - diskAvail?: ByteSize - 'disk.used_percent'?: Percentage - dup?: Percentage - diskUsedPercent?: Percentage - 'heap.current'?: string - hc?: string - heapCurrent?: string - 'heap.percent'?: Percentage - hp?: Percentage - heapPercent?: Percentage - 'heap.max'?: string - hm?: string - heapMax?: string - 'ram.current'?: string - rc?: string - ramCurrent?: string - 'ram.percent'?: Percentage - rp?: Percentage - ramPercent?: Percentage - 'ram.max'?: string - rn?: string - ramMax?: string - 'file_desc.current'?: string - fdc?: string - fileDescriptorCurrent?: string - 'file_desc.percent'?: Percentage - fdp?: Percentage - fileDescriptorPercent?: Percentage - 'file_desc.max'?: string - fdm?: string - fileDescriptorMax?: string - cpu?: string - load_1m?: string - load_5m?: string - load_15m?: string - l?: string - uptime?: string - u?: string - 'node.role'?: string - r?: string - role?: string - nodeRole?: string - cluster_manager?: string - /** - * @deprecated use cluster_manager instead - */ - master?: string - m?: string - name?: Name - n?: Name - 'completion.size'?: string - cs?: string - completionSize?: string - 'fielddata.memory_size'?: string - fm?: string - fielddataMemory?: string - 'fielddata.evictions'?: string - fe?: string - fielddataEvictions?: string - 'query_cache.memory_size'?: string - qcm?: string - queryCacheMemory?: string - 'query_cache.evictions'?: string - qce?: string - queryCacheEvictions?: string - 'query_cache.hit_count'?: string - qchc?: string - queryCacheHitCount?: string - 'query_cache.miss_count'?: string - qcmc?: string - queryCacheMissCount?: string - 'request_cache.memory_size'?: string - rcm?: string - requestCacheMemory?: string - 'request_cache.evictions'?: string - rce?: string - requestCacheEvictions?: string - 'request_cache.hit_count'?: string - rchc?: string - requestCacheHitCount?: string - 'request_cache.miss_count'?: string - rcmc?: string - requestCacheMissCount?: string - 'flush.total'?: string - ft?: string - flushTotal?: string - 'flush.total_time'?: string - ftt?: string - flushTotalTime?: string - 'get.current'?: string - gc?: string - getCurrent?: string - 'get.time'?: string - gti?: string - getTime?: string - 'get.total'?: string - gto?: string - getTotal?: string - 'get.exists_time'?: string - geti?: string - getExistsTime?: string - 'get.exists_total'?: string - geto?: string - getExistsTotal?: string - 'get.missing_time'?: string - gmti?: string - getMissingTime?: string - 'get.missing_total'?: string - gmto?: string - getMissingTotal?: string - 'indexing.delete_current'?: string - idc?: string - indexingDeleteCurrent?: string - 'indexing.delete_time'?: string - idti?: string - indexingDeleteTime?: string - 'indexing.delete_total'?: string - idto?: string - indexingDeleteTotal?: string - 'indexing.index_current'?: string - iic?: string - indexingIndexCurrent?: string - 'indexing.index_time'?: string - iiti?: string - indexingIndexTime?: string - 'indexing.index_total'?: string - iito?: string - indexingIndexTotal?: string - 'indexing.index_failed'?: string - iif?: string - indexingIndexFailed?: string - 'merges.current'?: string - mc?: string - mergesCurrent?: string - 'merges.current_docs'?: string - mcd?: string - mergesCurrentDocs?: string - 'merges.current_size'?: string - mcs?: string - mergesCurrentSize?: string - 'merges.total'?: string - mt?: string - mergesTotal?: string - 'merges.total_docs'?: string - mtd?: string - mergesTotalDocs?: string - 'merges.total_size'?: string - mts?: string - mergesTotalSize?: string - 'merges.total_time'?: string - mtt?: string - mergesTotalTime?: string - 'refresh.total'?: string - 'refresh.time'?: string - 'refresh.external_total'?: string - rto?: string - refreshTotal?: string - 'refresh.external_time'?: string - rti?: string - refreshTime?: string - 'refresh.listeners'?: string - rli?: string - refreshListeners?: string - 'script.compilations'?: string - scrcc?: string - scriptCompilations?: string - 'script.cache_evictions'?: string - scrce?: string - scriptCacheEvictions?: string - 'script.compilation_limit_triggered'?: string - scrclt?: string - scriptCacheCompilationLimitTriggered?: string - 'search.fetch_current'?: string - sfc?: string - searchFetchCurrent?: string - 'search.fetch_time'?: string - sfti?: string - searchFetchTime?: string - 'search.fetch_total'?: string - sfto?: string - searchFetchTotal?: string - 'search.open_contexts'?: string - so?: string - searchOpenContexts?: string - 'search.query_current'?: string - sqc?: string - searchQueryCurrent?: string - 'search.query_time'?: string - sqti?: string - searchQueryTime?: string - 'search.query_total'?: string - sqto?: string - searchQueryTotal?: string - 'search.scroll_current'?: string - scc?: string - searchScrollCurrent?: string - 'search.scroll_time'?: string - scti?: string - searchScrollTime?: string - 'search.scroll_total'?: string - scto?: string - searchScrollTotal?: string - 'segments.count'?: string - sc?: string - segmentsCount?: string - 'segments.memory'?: string - sm?: string - segmentsMemory?: string - 'segments.index_writer_memory'?: string - siwm?: string - segmentsIndexWriterMemory?: string - 'segments.version_map_memory'?: string - svmm?: string - segmentsVersionMapMemory?: string - 'segments.fixed_bitset_memory'?: string - sfbm?: string - fixedBitsetMemory?: string - 'suggest.current'?: string - suc?: string - suggestCurrent?: string - 'suggest.time'?: string - suti?: string - suggestTime?: string - 'suggest.total'?: string - suto?: string - suggestTotal?: string - 'bulk.total_operations'?: string - bto?: string - bulkTotalOperations?: string - 'bulk.total_time'?: string - btti?: string - bulkTotalTime?: string - 'bulk.total_size_in_bytes'?: string - btsi?: string - bulkTotalSizeInBytes?: string - 'bulk.avg_time'?: string - bati?: string - bulkAvgTime?: string - 'bulk.avg_size_in_bytes'?: string - basi?: string - bulkAvgSizeInBytes?: string -} - -export interface CatNodesRequest extends CatCatRequestBase { - bytes?: Bytes; - full_id?: boolean | string; -} - -export type CatNodesResponse = CatNodesNodesRecord[]; - -export interface CatPendingTasksPendingTasksRecord { - insertOrder?: string; - o?: string; - timeInQueue?: string; - t?: string; - priority?: string; - p?: string; - source?: string; - s?: string; -} - -export interface CatPendingTasksRequest extends CatCatRequestBase { } - -export type CatPendingTasksResponse = CatPendingTasksPendingTasksRecord[]; - -export interface CatPluginsPluginsRecord { - id?: NodeId; - name?: Name; - n?: Name; - component?: string; - c?: string; - version?: VersionString; - v?: VersionString; - description?: string; - d?: string; - type?: Type; - t?: Type; -} - -export interface CatPluginsRequest extends CatCatRequestBase { } - -export type CatPluginsResponse = CatPluginsPluginsRecord[]; - -export interface CatRecoveryRecoveryRecord { - index?: IndexName; - i?: IndexName; - idx?: IndexName; - shard?: string; - s?: string; - sh?: string; - start_time?: string; - start?: string; - start_time_millis?: string; - start_millis?: string; - stop_time?: string; - stop?: string; - stop_time_millis?: string; - stop_millis?: string; - time?: string; - t?: string; - ti?: string; - type?: Type; - ty?: Type; - stage?: string; - st?: string; - source_host?: string; - shost?: string; - source_node?: string; - snode?: string; - target_host?: string; - thost?: string; - target_node?: string; - tnode?: string; - repository?: string; - rep?: string; - snapshot?: string; - snap?: string; - files?: string; - f?: string; - files_recovered?: string; - fr?: string; - files_percent?: Percentage; - fp?: Percentage; - files_total?: string; - tf?: string; - bytes?: string; - b?: string; - bytes_recovered?: string; - br?: string; - bytes_percent?: Percentage; - bp?: Percentage; - bytes_total?: string; - tb?: string; - translog_ops?: string; - to?: string; - translog_ops_recovered?: string; - tor?: string; - translog_ops_percent?: Percentage; - top?: Percentage; -} - -export interface CatRecoveryRequest extends CatCatRequestBase { - index?: Indices; - active_only?: boolean; - bytes?: Bytes; - detailed?: boolean; -} - -export type CatRecoveryResponse = CatRecoveryRecoveryRecord[]; - -export interface CatRepositoriesRepositoriesRecord { - id?: string; - repoId?: string; - type?: string; - t?: string; -} - -export interface CatRepositoriesRequest extends CatCatRequestBase { } - -export type CatRepositoriesResponse = CatRepositoriesRepositoriesRecord[]; - -export interface CatSegmentsRequest extends CatCatRequestBase { - index?: Indices; - bytes?: Bytes; -} - -export type CatSegmentsResponse = CatSegmentsSegmentsRecord[]; - -export interface CatSegmentsSegmentsRecord { - index?: IndexName; - i?: IndexName; - idx?: IndexName; - shard?: string; - s?: string; - sh?: string; - prirep?: string; - p?: string; - pr?: string; - primaryOrReplica?: string; - ip?: string; - id?: NodeId; - segment?: string; - seg?: string; - generation?: string; - g?: string; - gen?: string; - 'docs.count'?: string; - dc?: string; - docsCount?: string; - 'docs.deleted'?: string; - dd?: string; - docsDeleted?: string; - size?: ByteSize; - si?: ByteSize; - 'size.memory'?: ByteSize; - sm?: ByteSize; - sizeMemory?: ByteSize; - committed?: string; - ic?: string; - isCommitted?: string; - searchable?: string; - is?: string; - isSearchable?: string; - version?: VersionString; - v?: VersionString; - compound?: string; - ico?: string; - isCompound?: string; -} - -export interface CatShardsRequest extends CatCatRequestBase { - index?: Indices; - bytes?: Bytes; -} - -export type CatShardsResponse = CatShardsShardsRecord[]; - -export interface CatShardsShardsRecord { - index?: string; - i?: string; - idx?: string; - shard?: string; - s?: string; - sh?: string; - prirep?: string; - p?: string; - pr?: string; - primaryOrReplica?: string; - state?: string; - st?: string; - docs?: string; - d?: string; - dc?: string; - store?: string; - sto?: string; - ip?: string; - id?: string; - node?: string; - n?: string; - sync_id?: string; - 'unassigned.reason'?: string; - ur?: string; - 'unassigned.at'?: string; - ua?: string; - 'unassigned.for'?: string; - uf?: string; - 'unassigned.details'?: string; - ud?: string; - 'recoverysource.type'?: string; - rs?: string; - 'completion.size'?: string; - cs?: string; - completionSize?: string; - 'fielddata.memory_size'?: string; - fm?: string; - fielddataMemory?: string; - 'fielddata.evictions'?: string; - fe?: string; - fielddataEvictions?: string; - 'query_cache.memory_size'?: string; - qcm?: string; - queryCacheMemory?: string; - 'query_cache.evictions'?: string; - qce?: string; - queryCacheEvictions?: string; - 'flush.total'?: string; - ft?: string; - flushTotal?: string; - 'flush.total_time'?: string; - ftt?: string; - flushTotalTime?: string; - 'get.current'?: string; - gc?: string; - getCurrent?: string; - 'get.time'?: string; - gti?: string; - getTime?: string; - 'get.total'?: string; - gto?: string; - getTotal?: string; - 'get.exists_time'?: string; - geti?: string; - getExistsTime?: string; - 'get.exists_total'?: string; - geto?: string; - getExistsTotal?: string; - 'get.missing_time'?: string; - gmti?: string; - getMissingTime?: string; - 'get.missing_total'?: string; - gmto?: string; - getMissingTotal?: string; - 'indexing.delete_current'?: string; - idc?: string; - indexingDeleteCurrent?: string; - 'indexing.delete_time'?: string; - idti?: string; - indexingDeleteTime?: string; - 'indexing.delete_total'?: string; - idto?: string; - indexingDeleteTotal?: string; - 'indexing.index_current'?: string; - iic?: string; - indexingIndexCurrent?: string; - 'indexing.index_time'?: string; - iiti?: string; - indexingIndexTime?: string; - 'indexing.index_total'?: string; - iito?: string; - indexingIndexTotal?: string; - 'indexing.index_failed'?: string; - iif?: string; - indexingIndexFailed?: string; - 'merges.current'?: string; - mc?: string; - mergesCurrent?: string; - 'merges.current_docs'?: string; - mcd?: string; - mergesCurrentDocs?: string; - 'merges.current_size'?: string; - mcs?: string; - mergesCurrentSize?: string; - 'merges.total'?: string; - mt?: string; - mergesTotal?: string; - 'merges.total_docs'?: string; - mtd?: string; - mergesTotalDocs?: string; - 'merges.total_size'?: string; - mts?: string; - mergesTotalSize?: string; - 'merges.total_time'?: string; - mtt?: string; - mergesTotalTime?: string; - 'refresh.total'?: string; - 'refresh.time'?: string; - 'refresh.external_total'?: string; - rto?: string; - refreshTotal?: string; - 'refresh.external_time'?: string; - rti?: string; - refreshTime?: string; - 'refresh.listeners'?: string; - rli?: string; - refreshListeners?: string; - 'search.fetch_current'?: string; - sfc?: string; - searchFetchCurrent?: string; - 'search.fetch_time'?: string; - sfti?: string; - searchFetchTime?: string; - 'search.fetch_total'?: string; - sfto?: string; - searchFetchTotal?: string; - 'search.open_contexts'?: string; - so?: string; - searchOpenContexts?: string; - 'search.query_current'?: string; - sqc?: string; - searchQueryCurrent?: string; - 'search.query_time'?: string; - sqti?: string; - searchQueryTime?: string; - 'search.query_total'?: string; - sqto?: string; - searchQueryTotal?: string; - 'search.scroll_current'?: string; - scc?: string; - searchScrollCurrent?: string; - 'search.scroll_time'?: string; - scti?: string; - searchScrollTime?: string; - 'search.scroll_total'?: string; - scto?: string; - searchScrollTotal?: string; - 'segments.count'?: string; - sc?: string; - segmentsCount?: string; - 'segments.memory'?: string; - sm?: string; - segmentsMemory?: string; - 'segments.index_writer_memory'?: string; - siwm?: string; - segmentsIndexWriterMemory?: string; - 'segments.version_map_memory'?: string; - svmm?: string; - segmentsVersionMapMemory?: string; - 'segments.fixed_bitset_memory'?: string; - sfbm?: string; - fixedBitsetMemory?: string; - 'seq_no.max'?: string; - sqm?: string; - maxSeqNo?: string; - 'seq_no.local_checkpoint'?: string; - localCheckpoint?: string; - 'seq_no.global_checkpoint'?: string; - sqg?: string; - globalCheckpoint?: string; - 'warmer.current'?: string; - wc?: string; - warmerCurrent?: string; - 'warmer.total'?: string; - wto?: string; - warmerTotal?: string; - 'warmer.total_time'?: string; - wtt?: string; - warmerTotalTime?: string; - 'path.data'?: string; - pd?: string; - dataPath?: string; - 'path.state'?: string; - ps?: string; - statsPath?: string; - 'bulk.total_operations'?: string; - bto?: string; - bulkTotalOperations?: string; - 'bulk.total_time'?: string; - btti?: string; - bulkTotalTime?: string; - 'bulk.total_size_in_bytes'?: string; - btsi?: string; - bulkTotalSizeInBytes?: string; - 'bulk.avg_time'?: string; - bati?: string; - bulkAvgTime?: string; - 'bulk.avg_size_in_bytes'?: string; - basi?: string; - bulkAvgSizeInBytes?: string; -} - -export interface CatSnapshotsRequest extends CatCatRequestBase { - repository?: Names; - ignore_unavailable?: boolean; -} - -export type CatSnapshotsResponse = CatSnapshotsSnapshotsRecord[]; - -export interface CatSnapshotsSnapshotsRecord { - id?: string; - snapshot?: string; - repository?: string; - re?: string; - repo?: string; - status?: string; - s?: string; - start_epoch?: EpochMillis; - ste?: EpochMillis; - startEpoch?: EpochMillis; - start_time?: DateString; - sti?: DateString; - startTime?: DateString; - end_epoch?: EpochMillis; - ete?: EpochMillis; - endEpoch?: EpochMillis; - end_time?: DateString; - eti?: DateString; - endTime?: DateString; - duration?: Time; - dur?: Time; - indices?: string; - i?: string; - successful_shards?: string; - ss?: string; - failed_shards?: string; - fs?: string; - total_shards?: string; - ts?: string; - reason?: string; - r?: string; -} - -export interface CatTasksRequest extends CatCatRequestBase { - actions?: string[]; - detailed?: boolean; - node_id?: string[]; - parent_task?: long; -} - -export type CatTasksResponse = CatTasksTasksRecord[]; - -export interface CatTasksTasksRecord { - id?: Id; - action?: string; - ac?: string; - task_id?: Id; - ti?: Id; - parent_task_id?: string; - pti?: string; - type?: Type; - ty?: Type; - start_time?: string; - start?: string; - timestamp?: string; - ts?: string; - hms?: string; - hhmmss?: string; - running_time_ns?: string; - running_time?: string; - time?: string; - node_id?: NodeId; - ni?: NodeId; - ip?: string; - i?: string; - port?: string; - po?: string; - node?: string; - n?: string; - version?: VersionString; - v?: VersionString; - x_opaque_id?: string; - x?: string; - description?: string; - desc?: string; -} - -export interface CatTemplatesRequest extends CatCatRequestBase { - name?: Name; -} - -export type CatTemplatesResponse = CatTemplatesTemplatesRecord[]; - -export interface CatTemplatesTemplatesRecord { - name?: Name; - n?: Name; - index_patterns?: string; - t?: string; - order?: string; - o?: string; - p?: string; - version?: VersionString; - v?: VersionString; - composed_of?: string; - c?: string; -} - -export interface CatThreadPoolRequest extends CatCatRequestBase { - thread_pool_patterns?: Names; - size?: Size | boolean; -} - -export type CatThreadPoolResponse = CatThreadPoolThreadPoolRecord[]; - -export interface CatThreadPoolThreadPoolRecord { - node_name?: string; - nn?: string; - node_id?: NodeId; - id?: NodeId; - ephemeral_node_id?: string; - eid?: string; - pid?: string; - p?: string; - host?: string; - h?: string; - ip?: string; - i?: string; - port?: string; - po?: string; - name?: string; - n?: string; - type?: string; - t?: string; - active?: string; - a?: string; - pool_size?: string; - psz?: string; - queue?: string; - q?: string; - queue_size?: string; - qs?: string; - rejected?: string; - r?: string; - largest?: string; - l?: string; - completed?: string; - c?: string; - core?: string; - cr?: string; - max?: string; - mx?: string; - size?: string; - sz?: string; - keep_alive?: string; - ka?: string; -} - -export interface ClusterClusterStateBlockIndex { - description?: string; - retryable?: boolean; - levels?: string[]; - aliases?: IndexAlias[]; - aliases_version?: VersionNumber; - version?: VersionNumber; - mapping_version?: VersionNumber; - settings_version?: VersionNumber; - routing_num_shards?: VersionNumber; - state?: string; - settings?: Record; - in_sync_allocations?: Record; - primary_terms?: Record; - mappings?: Record; - rollover_info?: Record; - timestamp_range?: Record; - system?: boolean; -} - -export interface ClusterClusterStateDeletedSnapshots { - snapshot_deletions: string[]; -} - -export interface ClusterClusterStateIndexLifecycle { - policies: Record; - operation_mode: LifecycleOperationMode; -} - -export interface ClusterClusterStateIndexLifecyclePolicy { } - -export interface ClusterClusterStateIndexLifecycleSummary { - policy: ClusterClusterStateIndexLifecyclePolicy; - headers: HttpHeaders; - version: VersionNumber; - modified_date: long; - modified_date_string: DateString; -} - -export interface ClusterClusterStateIngest { - pipeline: ClusterClusterStateIngestPipeline[]; -} - -export interface ClusterClusterStateIngestPipeline { - id: Id; - config: ClusterClusterStateIngestPipelineConfig; -} - -export interface ClusterClusterStateIngestPipelineConfig { - description?: string; - version?: VersionNumber; - processors: IngestProcessorContainer[]; -} - -export interface ClusterClusterStateMetadata { - cluster_uuid: Uuid; - cluster_uuid_committed: boolean; - templates: ClusterClusterStateMetadataTemplate; - indices?: Record; - 'index-graveyard': ClusterClusterStateMetadataIndexGraveyard; - cluster_coordination: ClusterClusterStateMetadataClusterCoordination; - ingest?: ClusterClusterStateIngest; - repositories?: Record; - component_template?: Record; - index_template?: Record; - index_lifecycle?: ClusterClusterStateIndexLifecycle; -} - -export interface ClusterClusterStateMetadataClusterCoordination { - term: integer; - last_committed_config: string[]; - last_accepted_config: string[]; - voting_config_exclusions: ClusterVotingConfigExclusionsItem[]; -} - -export interface ClusterClusterStateMetadataIndexGraveyard { - tombstones: ClusterTombstone[]; -} - -export interface ClusterClusterStateMetadataTemplate { } - -export interface ClusterClusterStateRoutingNodes { - unassigned: NodeShard[]; - nodes: Record; -} - -export interface ClusterClusterStateSnapshots { - snapshots: SnapshotStatus[]; -} - -export type ClusterClusterStatus = 'green' | 'yellow' | 'red'; - -export interface ClusterComponentTemplate { - name: Name; - component_template: ClusterComponentTemplateNode; -} - -export interface ClusterComponentTemplateNode { - template: ClusterComponentTemplateSummary; - version?: VersionNumber; - _meta?: Metadata; -} - -export interface ClusterComponentTemplateSummary { - _meta?: Metadata; - version?: VersionNumber; - settings: Record; - mappings?: MappingTypeMapping; - aliases?: Record; -} - -export interface ClusterTombstone { - index: ClusterTombstoneIndex; - delete_date?: DateString; - delete_date_in_millis: long; -} - -export interface ClusterTombstoneIndex { - index_name: Name; - index_uuid: Uuid; -} - -export interface ClusterVotingConfigExclusionsItem { - node_id: Id; - node_name: Name; -} - -export interface ClusterAllocationExplainAllocationDecision { - decider: string; - decision: ClusterAllocationExplainAllocationExplainDecision; - explanation: string; -} - -export type ClusterAllocationExplainAllocationExplainDecision = - | 'NO' - | 'YES' - | 'THROTTLE' - | 'ALWAYS'; - -export interface ClusterAllocationExplainAllocationStore { - allocation_id: string; - found: boolean; - in_sync: boolean; - matching_size_in_bytes: long; - matching_sync_id: boolean; - store_exception: string; -} - -export interface ClusterAllocationExplainClusterInfo { - nodes: Record; - shard_sizes: Record; - shard_data_set_sizes?: Record; - shard_paths: Record; - reserved_sizes: ClusterAllocationExplainReservedSize[]; -} - -export interface ClusterAllocationExplainCurrentNode { - id: Id; - name: Name; - attributes: Record; - transport_address: TransportAddress; - weight_ranking: integer; -} - -export type ClusterAllocationExplainDecision = - | 'yes' - | 'no' - | 'worse_balance' - | 'throttled' - | 'awaiting_info' - | 'allocation_delayed' - | 'no_valid_shard_copy' - | 'no_attempt'; - -export interface ClusterAllocationExplainDiskUsage { - path: string; - total_bytes: long; - used_bytes: long; - free_bytes: long; - free_disk_percent: double; - used_disk_percent: double; -} - -export interface ClusterAllocationExplainNodeAllocationExplanation { - deciders: ClusterAllocationExplainAllocationDecision[]; - node_attributes: Record; - node_decision: ClusterAllocationExplainDecision; - node_id: Id; - node_name: Name; - store?: ClusterAllocationExplainAllocationStore; - transport_address: TransportAddress; - weight_ranking: integer; -} - -export interface ClusterAllocationExplainNodeDiskUsage { - node_name: Name; - least_available: ClusterAllocationExplainDiskUsage; - most_available: ClusterAllocationExplainDiskUsage; -} - -export interface ClusterAllocationExplainRequest extends RequestBase { - include_disk_info?: boolean; - include_yes_decisions?: boolean; - body?: { - current_node?: string; - index?: IndexName; - primary?: boolean; - shard?: integer; - }; -} - -export interface ClusterAllocationExplainReservedSize { - node_id: Id; - path: string; - total: long; - shards: string[]; -} - -export interface ClusterAllocationExplainResponse { - allocate_explanation?: string; - allocation_delay?: string; - allocation_delay_in_millis?: long; - can_allocate?: ClusterAllocationExplainDecision; - can_move_to_other_node?: ClusterAllocationExplainDecision; - can_rebalance_cluster?: ClusterAllocationExplainDecision; - can_rebalance_cluster_decisions?: ClusterAllocationExplainAllocationDecision[]; - can_rebalance_to_other_node?: ClusterAllocationExplainDecision; - can_remain_decisions?: ClusterAllocationExplainAllocationDecision[]; - can_remain_on_current_node?: ClusterAllocationExplainDecision; - cluster_info?: ClusterAllocationExplainClusterInfo; - configured_delay?: string; - configured_delay_in_millis?: long; - current_node?: ClusterAllocationExplainCurrentNode; - current_state: string; - index: IndexName; - move_explanation?: string; - node_allocation_decisions?: ClusterAllocationExplainNodeAllocationExplanation[]; - primary: boolean; - rebalance_explanation?: string; - remaining_delay?: string; - remaining_delay_in_millis?: long; - shard: integer; - unassigned_info?: ClusterAllocationExplainUnassignedInformation; -} - -export interface ClusterAllocationExplainUnassignedInformation { - at: DateString; - last_allocation_status?: string; - reason: ClusterAllocationExplainUnassignedInformationReason; - details?: string; - failed_allocation_attempts?: integer; - delayed?: boolean; - allocation_status?: string; -} - -export type ClusterAllocationExplainUnassignedInformationReason = - | 'INDEX_CREATED' - | 'CLUSTER_RECOVERED' - | 'INDEX_REOPENED' - | 'DANGLING_INDEX_IMPORTED' - | 'NEW_INDEX_RESTORED' - | 'EXISTING_INDEX_RESTORED' - | 'REPLICA_ADDED' - | 'ALLOCATION_FAILED' - | 'NODE_LEFT' - | 'REROUTE_CANCELLED' - | 'REINITIALIZED' - | 'REALLOCATED_REPLICA' - | 'PRIMARY_FAILED' - | 'FORCED_EMPTY_PRIMARY' - | 'MANUAL_ALLOCATION'; - - -export interface ClusterDeleteComponentTemplateRequest extends RequestBase { - name: Name - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time -} - -export interface ClusterDeleteComponentTemplateResponse extends AcknowledgedResponseBase { } - -export interface ClusterDeleteVotingConfigExclusionsRequest extends RequestBase { - body?: { - stub: string; - }; -} - -export interface ClusterDeleteVotingConfigExclusionsResponse { - stub: integer; -} - -export interface ClusterExistsComponentTemplateRequest extends RequestBase { - stub_a: string; - stub_b: string; - body?: { - stub_c: string; - }; -} - -export interface ClusterExistsComponentTemplateResponse { - stub: integer; -} - - -export interface ClusterGetComponentTemplateRequest extends RequestBase { - name?: Name - flat_settings?: boolean - local?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time -} - -export interface ClusterGetComponentTemplateResponse { - component_templates: ClusterComponentTemplate[]; -} - - -export interface ClusterGetSettingsRequest extends RequestBase { - flat_settings?: boolean - include_defaults?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time -} - -export interface ClusterGetSettingsResponse { - persistent: Record; - transient: Record; - defaults?: Record; -} - -export interface ClusterHealthIndexHealthStats { - active_primary_shards: integer; - active_shards: integer; - initializing_shards: integer; - number_of_replicas: integer; - number_of_shards: integer; - relocating_shards: integer; - shards?: Record; - status: Health; - unassigned_shards: integer; -} - - -export interface ClusterHealthRequest extends RequestBase { - index?: Indices - expand_wildcards?: ExpandWildcards - level?: Level - local?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time - wait_for_active_shards?: WaitForActiveShards - wait_for_events?: WaitForEvents - wait_for_nodes?: string - wait_for_no_initializing_shards?: boolean - wait_for_no_relocating_shards?: boolean - wait_for_status?: WaitForStatus -} - -export interface ClusterHealthResponse { - active_primary_shards: integer; - active_shards: integer; - active_shards_percent_as_number: Percentage; - cluster_name: string; - delayed_unassigned_shards: integer; - indices?: Record; - initializing_shards: integer; - number_of_data_nodes: integer; - number_of_in_flight_fetch: integer; - number_of_nodes: integer; - number_of_pending_tasks: integer; - relocating_shards: integer; - status: Health; - task_max_waiting_in_queue_millis: EpochMillis; - timed_out: boolean; - unassigned_shards: integer; -} - -export interface ClusterHealthShardHealthStats { - active_shards: integer; - initializing_shards: integer; - primary_active: boolean; - relocating_shards: integer; - status: Health; - unassigned_shards: integer; -} - -export interface ClusterPendingTasksPendingTask { - insert_order: integer; - priority: string; - source: string; - time_in_queue: string; - time_in_queue_millis: integer; -} - - -export interface ClusterPendingTasksRequest extends RequestBase { - local?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time -} - -export interface ClusterPendingTasksResponse { - tasks: ClusterPendingTasksPendingTask[]; -} - - -export interface ClusterPutComponentTemplateRequest extends RequestBase { - name: Name - create?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - body?: { - template: IndicesIndexState; - aliases?: Record; - mappings?: MappingTypeMapping; - settings?: IndicesIndexSettings; - version?: VersionNumber; - _meta?: Metadata; - }; -} - -export interface ClusterPutComponentTemplateResponse extends AcknowledgedResponseBase { } - - -export interface ClusterPutSettingsRequest extends RequestBase { - flat_settings?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time - body?: { - persistent?: Record; - transient?: Record; - }; -} - -export interface ClusterPutSettingsResponse { - acknowledged: boolean; - persistent: Record; - transient: Record; -} - -export interface ClusterPutVotingConfigExclusionsRequest extends RequestBase { - node_names?: Names; - node_ids?: Ids; - timeout?: Time; - wait_for_removal?: boolean; -} - -export interface ClusterPutVotingConfigExclusionsResponse { - stub: integer; -} - -export interface ClusterRemoteInfoClusterRemoteInfo { - connected: boolean; - initial_connect_timeout: Time; - max_connections_per_cluster: integer; - num_nodes_connected: long; - seeds: string[]; - skip_unavailable: boolean; -} - -export interface ClusterRemoteInfoRequest extends RequestBase { - body?: { - stub: string; - }; -} - -export interface ClusterRemoteInfoResponse - extends DictionaryResponseBase { } - -export interface ClusterRerouteCommand { - cancel?: ClusterRerouteCommandCancelAction; - move?: ClusterRerouteCommandMoveAction; - allocate_replica?: ClusterRerouteCommandAllocateReplicaAction; - allocate_stale_primary?: ClusterRerouteCommandAllocatePrimaryAction; - allocate_empty_primary?: ClusterRerouteCommandAllocatePrimaryAction; -} - -export interface ClusterRerouteCommandAllocatePrimaryAction { - index: IndexName; - shard: integer; - node: string; - accept_data_loss: boolean; -} - -export interface ClusterRerouteCommandAllocateReplicaAction { - index: IndexName; - shard: integer; - node: string; -} - -export interface ClusterRerouteCommandCancelAction { - index: IndexName; - shard: integer; - node: string; - allow_primary?: boolean; -} - -export interface ClusterRerouteCommandMoveAction { - index: IndexName; - shard: integer; - from_node: string; - to_node: string; -} - - -export interface ClusterRerouteRequest extends RequestBase { - dry_run?: boolean - explain?: boolean - metric?: Metrics - retry_failed?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time - body?: { - commands?: ClusterRerouteCommand[]; - }; -} - -export interface ClusterRerouteRerouteDecision { - decider: string; - decision: string; - explanation: string; -} - -export interface ClusterRerouteRerouteExplanation { - command: string; - decisions: ClusterRerouteRerouteDecision[]; - parameters: ClusterRerouteRerouteParameters; -} - -export interface ClusterRerouteRerouteParameters { - allow_primary: boolean; - index: IndexName; - node: NodeName; - shard: integer; - from_node?: NodeName; - to_node?: NodeName; -} - -export interface ClusterRerouteRerouteState { - cluster_uuid: Uuid - state_uuid?: Uuid - cluster_manager_node?: string - master_node?: string - version?: VersionNumber - blocks?: EmptyObject - nodes?: Record - routing_table?: Record - routing_nodes?: ClusterClusterStateRoutingNodes - security_tokens?: Record - snapshots?: ClusterClusterStateSnapshots - snapshot_deletions?: ClusterClusterStateDeletedSnapshots - metadata?: ClusterClusterStateMetadata -} - -export interface ClusterRerouteResponse extends AcknowledgedResponseBase { - explanations?: ClusterRerouteRerouteExplanation[]; - state: ClusterRerouteRerouteState; -} - -export interface ClusterStateClusterStateBlocks { - indices?: Record>; -} - -export interface ClusterStateRequest extends RequestBase { - metric?: Metrics - index?: Indices - allow_no_indices?: boolean - expand_wildcards?: ExpandWildcards - flat_settings?: boolean - ignore_unavailable?: boolean - local?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - wait_for_metadata_version?: VersionNumber - wait_for_timeout?: Time -} - -export interface ClusterStateResponse { - cluster_name: Name - cluster_uuid: Uuid - cluster_manager_node?: string - master_node?: string - state?: string[] - state_uuid?: Uuid - version?: VersionNumber - blocks?: ClusterStateClusterStateBlocks - metadata?: ClusterClusterStateMetadata - nodes?: Record - routing_table?: Record - routing_nodes?: ClusterClusterStateRoutingNodes - snapshots?: ClusterClusterStateSnapshots - snapshot_deletions?: ClusterClusterStateDeletedSnapshots -} - -export interface ClusterStatsCharFilterTypes { - char_filter_types: ClusterStatsFieldTypes[]; - tokenizer_types: ClusterStatsFieldTypes[]; - filter_types: ClusterStatsFieldTypes[]; - analyzer_types: ClusterStatsFieldTypes[]; - built_in_char_filters: ClusterStatsFieldTypes[]; - built_in_tokenizers: ClusterStatsFieldTypes[]; - built_in_filters: ClusterStatsFieldTypes[]; - built_in_analyzers: ClusterStatsFieldTypes[]; -} - -export interface ClusterStatsClusterFileSystem { - available_in_bytes: long; - free_in_bytes: long; - total_in_bytes: long; -} - -export interface ClusterStatsClusterIndices { - completion: CompletionStats; - count: long; - docs: DocStats; - fielddata: FielddataStats; - query_cache: QueryCacheStats; - segments: SegmentsStats; - shards: ClusterStatsClusterIndicesShards; - store: StoreStats; - mappings: ClusterStatsFieldTypesMappings; - analysis: ClusterStatsCharFilterTypes; - versions?: ClusterStatsIndicesVersions[]; -} - -export interface ClusterStatsClusterIndicesShards { - index?: ClusterStatsClusterIndicesShardsIndex; - primaries?: double; - replication?: double; - total?: double; -} - -export interface ClusterStatsClusterIndicesShardsIndex { - primaries: ClusterStatsClusterShardMetrics; - replication: ClusterStatsClusterShardMetrics; - shards: ClusterStatsClusterShardMetrics; -} - -export interface ClusterStatsClusterIngest { - number_of_pipelines: integer; - processor_stats: Record; -} - -export interface ClusterStatsClusterJvm { - max_uptime_in_millis: long; - mem: ClusterStatsClusterJvmMemory; - threads: long; - versions: ClusterStatsClusterJvmVersion[]; -} - -export interface ClusterStatsClusterJvmMemory { - heap_max_in_bytes: long; - heap_used_in_bytes: long; -} - -export interface ClusterStatsClusterJvmVersion { - bundled_jdk: boolean; - count: integer; - using_bundled_jdk: boolean; - version: VersionString; - vm_name: string; - vm_vendor: string; - vm_version: VersionString; -} - -export interface ClusterStatsClusterNetworkTypes { - http_types: Record; - transport_types: Record; -} - -export interface ClusterStatsClusterNodeCount { - coordinating_only: integer - data: integer - ingest: integer - cluster_manager?: integer - /** - * @deprecated use cluster_manager instead - */ - master?: integer - total: integer - voting_only: integer - remote_cluster_client: integer -} - -export interface ClusterStatsClusterNodes { - count: ClusterStatsClusterNodeCount; - discovery_types: Record; - fs: ClusterStatsClusterFileSystem; - ingest: ClusterStatsClusterIngest; - jvm: ClusterStatsClusterJvm; - network_types: ClusterStatsClusterNetworkTypes; - os: ClusterStatsClusterOperatingSystem; - packaging_types: ClusterStatsNodePackagingType[]; - plugins: PluginStats[]; - process: ClusterStatsClusterProcess; - versions: VersionString[]; -} - -export interface ClusterStatsClusterOperatingSystem { - allocated_processors: integer; - available_processors: integer; - mem: ClusterStatsOperatingSystemMemoryInfo; - names: ClusterStatsClusterOperatingSystemName[]; - pretty_names: ClusterStatsClusterOperatingSystemName[]; - architectures?: ClusterStatsClusterOperatingSystemArchitecture[]; -} - -export interface ClusterStatsClusterOperatingSystemArchitecture { - count: integer; - arch: string; -} - -export interface ClusterStatsClusterOperatingSystemName { - count: integer; - name: Name; -} - -export interface ClusterStatsClusterProcess { - cpu: ClusterStatsClusterProcessCpu; - open_file_descriptors: ClusterStatsClusterProcessOpenFileDescriptors; -} - -export interface ClusterStatsClusterProcessCpu { - percent: integer; -} - -export interface ClusterStatsClusterProcessOpenFileDescriptors { - avg: long; - max: long; - min: long; -} - -export interface ClusterStatsClusterProcessor { - count: long; - current: long; - failed: long; - time_in_millis: long; -} - -export interface ClusterStatsClusterShardMetrics { - avg: double; - max: double; - min: double; -} - -export interface ClusterStatsFieldTypes { - name: Name; - count: integer; - index_count: integer; - script_count?: integer; -} - -export interface ClusterStatsFieldTypesMappings { - field_types: ClusterStatsFieldTypes[]; - runtime_field_types?: ClusterStatsRuntimeFieldTypes[]; -} - -export interface ClusterStatsIndicesVersions { - index_count: integer; - primary_shard_count: integer; - total_primary_bytes: long; - version: VersionString; -} - -export interface ClusterStatsNodePackagingType { - count: integer; - flavor: string; - type: string; -} - -export interface ClusterStatsOperatingSystemMemoryInfo { - free_in_bytes: long; - free_percent: integer; - total_in_bytes: long; - used_in_bytes: long; - used_percent: integer; -} - -export interface ClusterStatsRequest extends RequestBase { - node_id?: NodeIds; - flat_settings?: boolean; - timeout?: Time; -} - -export interface ClusterStatsResponse extends NodesNodesResponseBase { - cluster_name: Name; - cluster_uuid: Uuid; - indices: ClusterStatsClusterIndices; - nodes: ClusterStatsClusterNodes; - status: ClusterClusterStatus; - timestamp: long; -} - -export interface ClusterStatsRuntimeFieldTypes { - name: Name; - count: integer; - index_count: integer; - scriptless_count: integer; - shadowed_count: integer; - lang: string[]; - lines_max: integer; - lines_total: integer; - chars_max: integer; - chars_total: integer; - source_max: integer; - source_total: integer; - doc_max: integer; - doc_total: integer; -} - -export interface DanglingIndicesIndexDeleteRequest extends RequestBase { - stub_a: string; - stub_b: string; - body?: { - stub_c: string; - }; -} - -export interface DanglingIndicesIndexDeleteResponse { - stub: integer; -} - -export interface DanglingIndicesIndexImportRequest extends RequestBase { - stub_a: string; - stub_b: string; - body?: { - stub_c: string; - }; -} - -export interface DanglingIndicesIndexImportResponse { - stub: integer; -} - -export interface DanglingIndicesIndicesListRequest extends RequestBase { - stub_a: string; - stub_b: string; - body?: { - stub_c: string; - }; -} - -export interface DanglingIndicesIndicesListResponse { - stub: integer; -} - -export interface FeaturesGetFeaturesRequest extends RequestBase { - stub_a: string; - stub_b: string; - body?: { - stub_c: string; - }; -} - -export interface FeaturesGetFeaturesResponse { - stub: integer; -} - -export interface FeaturesResetFeaturesRequest extends RequestBase { - stub_a: string; - stub_b: string; - body?: { - stub_c: string; - }; -} - -export interface FeaturesResetFeaturesResponse { - stub: integer; -} - -export interface IndicesAlias { - filter?: QueryDslQueryContainer; - index_routing?: Routing; - is_hidden?: boolean; - is_write_index?: boolean; - routing?: Routing; - search_routing?: Routing; -} - -export interface IndicesAliasDefinition { - filter?: QueryDslQueryContainer; - index_routing?: string; - is_write_index?: boolean; - routing?: string; - search_routing?: string; -} - -export type IndicesDataStreamHealthStatus = 'GREEN' | 'green' | 'YELLOW' | 'yellow' | 'RED' | 'red'; - -export interface IndicesFielddataFrequencyFilter { - max: double; - min: double; - min_segment_size: integer; -} - -export type IndicesIndexCheckOnStartup = 'false' | 'checksum' | 'true'; - -export interface IndicesIndexRouting { - allocation?: IndicesIndexRoutingAllocation; - rebalance?: IndicesIndexRoutingRebalance; -} - -export interface IndicesIndexRoutingAllocation { - enable?: IndicesIndexRoutingAllocationOptions; - include?: IndicesIndexRoutingAllocationInclude; - initial_recovery?: IndicesIndexRoutingAllocationInitialRecovery; - disk?: IndicesIndexRoutingAllocationDisk; -} - -export interface IndicesIndexRoutingAllocationDisk { - threshold_enabled: boolean | string; -} - -export interface IndicesIndexRoutingAllocationInclude { - _tier_preference?: string; - _id?: Id; -} - -export interface IndicesIndexRoutingAllocationInitialRecovery { - _id?: Id; -} - -export type IndicesIndexRoutingAllocationOptions = 'all' | 'primaries' | 'new_primaries' | 'none'; - -export interface IndicesIndexRoutingRebalance { - enable: IndicesIndexRoutingRebalanceOptions; -} - -export type IndicesIndexRoutingRebalanceOptions = 'all' | 'primaries' | 'replicas' | 'none'; - -export interface IndicesIndexSettingBlocks { - read_only?: boolean; - 'index.blocks.read_only'?: boolean; - read_only_allow_delete?: boolean; - 'index.blocks.read_only_allow_delete'?: boolean; - read?: boolean; - 'index.blocks.read'?: boolean; - write?: boolean | string; - 'index.blocks.write'?: boolean | string; - metadata?: boolean; - 'index.blocks.metadata'?: boolean; -} - -export interface IndicesIndexSettings { - number_of_shards?: integer | string; - 'index.number_of_shards'?: integer | string; - number_of_replicas?: integer | string; - 'index.number_of_replicas'?: integer | string; - number_of_routing_shards?: integer; - 'index.number_of_routing_shards'?: integer; - check_on_startup?: IndicesIndexCheckOnStartup; - 'index.check_on_startup'?: IndicesIndexCheckOnStartup; - codec?: string; - 'index.codec'?: string; - routing_partition_size?: integer | string; - 'index.routing_partition_size'?: integer | string; - 'soft_deletes.retention_lease.period'?: Time; - 'index.soft_deletes.retention_lease.period'?: Time; - load_fixed_bitset_filters_eagerly?: boolean; - 'index.load_fixed_bitset_filters_eagerly'?: boolean; - hidden?: boolean | string; - 'index.hidden'?: boolean | string; - auto_expand_replicas?: string; - 'index.auto_expand_replicas'?: string; - 'search.idle.after'?: Time; - 'index.search.idle.after'?: Time; - refresh_interval?: Time; - 'index.refresh_interval'?: Time; - max_result_window?: integer; - 'index.max_result_window'?: integer; - max_inner_result_window?: integer; - 'index.max_inner_result_window'?: integer; - max_rescore_window?: integer; - 'index.max_rescore_window'?: integer; - max_docvalue_fields_search?: integer; - 'index.max_docvalue_fields_search'?: integer; - max_script_fields?: integer; - 'index.max_script_fields'?: integer; - max_ngram_diff?: integer; - 'index.max_ngram_diff'?: integer; - max_shingle_diff?: integer; - 'index.max_shingle_diff'?: integer; - blocks?: IndicesIndexSettingBlocks; - 'index.blocks'?: IndicesIndexSettingBlocks; - max_refresh_listeners?: integer; - 'index.max_refresh_listeners'?: integer; - 'analyze.max_token_count'?: integer; - 'index.analyze.max_token_count'?: integer; - 'highlight.max_analyzed_offset'?: integer; - 'index.highlight.max_analyzed_offset'?: integer; - max_terms_count?: integer; - 'index.max_terms_count'?: integer; - max_regex_length?: integer; - 'index.max_regex_length'?: integer; - routing?: IndicesIndexRouting; - 'index.routing'?: IndicesIndexRouting; - gc_deletes?: Time; - 'index.gc_deletes'?: Time; - default_pipeline?: PipelineName; - 'index.default_pipeline'?: PipelineName; - final_pipeline?: PipelineName; - 'index.final_pipeline'?: PipelineName; - lifecycle?: IndicesIndexSettingsLifecycle; - 'index.lifecycle'?: IndicesIndexSettingsLifecycle; - provided_name?: Name; - 'index.provided_name'?: Name; - creation_date?: DateString; - 'index.creation_date'?: DateString; - uuid?: Uuid; - 'index.uuid'?: Uuid; - version?: IndicesIndexVersioning; - 'index.version'?: IndicesIndexVersioning; - verified_before_close?: boolean | string; - 'index.verified_before_close'?: boolean | string; - format?: string | integer; - 'index.format'?: string | integer; - max_slices_per_scroll?: integer; - 'index.max_slices_per_scroll'?: integer; - 'translog.durability'?: string; - 'index.translog.durability'?: string; - 'query_string.lenient'?: boolean | string; - 'index.query_string.lenient'?: boolean | string; - priority?: integer | string; - 'index.priority'?: integer | string; - top_metrics_max_size?: integer; - analysis?: IndicesIndexSettingsAnalysis; -} - -export interface IndicesIndexSettingsAnalysis { - char_filter?: Record; -} - -export interface IndicesIndexSettingsLifecycle { - name: Name; -} - -export interface IndicesIndexState { - aliases?: Record; - mappings?: MappingTypeMapping; - settings: IndicesIndexSettings | IndicesIndexStatePrefixedSettings; -} - -export interface IndicesIndexStatePrefixedSettings { - index: IndicesIndexSettings; -} - -export interface IndicesIndexVersioning { - created: VersionString; -} - -export interface IndicesNumericFielddata { - format: IndicesNumericFielddataFormat; -} - -export type IndicesNumericFielddataFormat = 'array' | 'disabled'; - -export interface IndicesOverlappingIndexTemplate { - name: Name; - index_patterns?: IndexName[]; -} - -export interface IndicesStringFielddata { - format: IndicesStringFielddataFormat; -} - -export type IndicesStringFielddataFormat = 'paged_bytes' | 'disabled'; - -export interface IndicesTemplateMapping { - aliases: Record; - index_patterns: Name[]; - mappings: MappingTypeMapping; - order: integer; - settings: Record; - version?: VersionNumber; -} - -export type IndicesAddBlockIndicesBlockOptions = 'metadata' | 'read' | 'read_only' | 'write'; - -export interface IndicesAddBlockIndicesBlockStatus { - name: IndexName; - blocked: boolean; -} - -export interface IndicesAddBlockRequest extends RequestBase { - index: IndexName - block: IndicesAddBlockIndicesBlockOptions - allow_no_indices?: boolean - expand_wildcards?: ExpandWildcards - ignore_unavailable?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time -} - -export interface IndicesAddBlockResponse extends AcknowledgedResponseBase { - shards_acknowledged: boolean; - indices: IndicesAddBlockIndicesBlockStatus[]; -} - -export interface IndicesAnalyzeAnalyzeDetail { - analyzer?: IndicesAnalyzeAnalyzerDetail; - charfilters?: IndicesAnalyzeCharFilterDetail[]; - custom_analyzer: boolean; - tokenfilters?: IndicesAnalyzeTokenDetail[]; - tokenizer?: IndicesAnalyzeTokenDetail; -} - -export interface IndicesAnalyzeAnalyzeToken { - end_offset: long; - position: long; - position_length?: long; - start_offset: long; - token: string; - type: string; -} - -export interface IndicesAnalyzeAnalyzerDetail { - name: string; - tokens: IndicesAnalyzeExplainAnalyzeToken[]; -} - -export interface IndicesAnalyzeCharFilterDetail { - filtered_text: string[]; - name: string; -} - -export interface IndicesAnalyzeExplainAnalyzeToken { - bytes: string; - end_offset: long; - keyword?: boolean; - position: long; - positionLength: long; - start_offset: long; - termFrequency: long; - token: string; - type: string; -} - -export interface IndicesAnalyzeRequest extends RequestBase { - index?: IndexName; - body?: { - analyzer?: string; - attributes?: string[]; - char_filter?: (string | AnalysisCharFilter)[]; - explain?: boolean; - field?: Field; - filter?: (string | AnalysisTokenFilter)[]; - normalizer?: string; - text?: IndicesAnalyzeTextToAnalyze; - tokenizer?: string | AnalysisTokenizer; - }; -} - -export interface IndicesAnalyzeResponse { - detail?: IndicesAnalyzeAnalyzeDetail; - tokens?: IndicesAnalyzeAnalyzeToken[]; -} - -export type IndicesAnalyzeTextToAnalyze = string | string[]; - -export interface IndicesAnalyzeTokenDetail { - name: string; - tokens: IndicesAnalyzeExplainAnalyzeToken[]; -} - -export interface IndicesClearCacheRequest extends RequestBase { - index?: Indices; - allow_no_indices?: boolean; - expand_wildcards?: ExpandWildcards; - fielddata?: boolean; - fields?: Fields; - ignore_unavailable?: boolean; - query?: boolean; - request?: boolean; -} - -export interface IndicesClearCacheResponse extends ShardsOperationResponseBase { } - -export interface IndicesCloneRequest extends RequestBase { - index: IndexName - target: Name - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time - wait_for_active_shards?: WaitForActiveShards - body?: { - aliases?: Record; - settings?: Record; - }; -} - -export interface IndicesCloneResponse extends AcknowledgedResponseBase { - index: IndexName; - shards_acknowledged: boolean; -} - -export interface IndicesCloseCloseIndexResult { - closed: boolean; - shards?: Record; -} - -export interface IndicesCloseCloseShardResult { - failures: ShardFailure[]; -} - -export interface IndicesCloseRequest extends RequestBase { - index: Indices - allow_no_indices?: boolean - expand_wildcards?: ExpandWildcards - ignore_unavailable?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time - wait_for_active_shards?: WaitForActiveShards -} - -export interface IndicesCloseResponse extends AcknowledgedResponseBase { - indices: Record; - shards_acknowledged: boolean; -} - -export interface IndicesCreateRequest extends RequestBase { - index: IndexName - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time - wait_for_active_shards?: WaitForActiveShards - body?: { - aliases?: Record; - mappings?: Record | MappingTypeMapping; - settings?: Record; - }; -} - -export interface IndicesCreateResponse extends AcknowledgedResponseBase { - index: IndexName; - shards_acknowledged: boolean; -} - -export interface IndicesDeleteRequest extends RequestBase { - index: Indices - allow_no_indices?: boolean - expand_wildcards?: ExpandWildcards - ignore_unavailable?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time -} - -export interface IndicesDeleteResponse extends IndicesResponseBase { } - -export interface IndicesDeleteAliasRequest extends RequestBase { - index: Indices - name: Names - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time -} - -export interface IndicesDeleteAliasResponse extends AcknowledgedResponseBase { } - -export interface IndicesDeleteIndexTemplateRequest extends RequestBase { - name: Name; -} - -export interface IndicesDeleteIndexTemplateResponse extends AcknowledgedResponseBase { } - -export interface IndicesDeleteTemplateRequest extends RequestBase { - name: Name - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time -} - -export interface IndicesDeleteTemplateResponse extends AcknowledgedResponseBase { } - -export interface IndicesExistsRequest extends RequestBase { - index: Indices; - allow_no_indices?: boolean; - expand_wildcards?: ExpandWildcards; - flat_settings?: boolean; - ignore_unavailable?: boolean; - include_defaults?: boolean; - local?: boolean; -} - -export type IndicesExistsResponse = boolean; - -export interface IndicesExistsAliasRequest extends RequestBase { - name: Names; - index?: Indices; - allow_no_indices?: boolean; - expand_wildcards?: ExpandWildcards; - ignore_unavailable?: boolean; - local?: boolean; -} - -export type IndicesExistsAliasResponse = boolean; - -export interface IndicesExistsIndexTemplateRequest extends RequestBase { - name: Name - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time -} - -export type IndicesExistsIndexTemplateResponse = boolean; - -export interface IndicesExistsTemplateRequest extends RequestBase { - name: Names - flat_settings?: boolean - local?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time -} - -export type IndicesExistsTemplateResponse = boolean; - -export interface IndicesFlushRequest extends RequestBase { - index?: Indices; - allow_no_indices?: boolean; - expand_wildcards?: ExpandWildcards; - force?: boolean; - ignore_unavailable?: boolean; - wait_if_ongoing?: boolean; -} - -export interface IndicesFlushResponse extends ShardsOperationResponseBase { } - -export interface IndicesForcemergeRequest extends RequestBase { - index?: Indices; - allow_no_indices?: boolean; - expand_wildcards?: ExpandWildcards; - flush?: boolean; - ignore_unavailable?: boolean; - max_num_segments?: long; - only_expunge_deletes?: boolean; -} - -export interface IndicesForcemergeResponse extends ShardsOperationResponseBase { } - -export interface IndicesGetRequest extends RequestBase { - index: Indices - allow_no_indices?: boolean - expand_wildcards?: ExpandWildcards - flat_settings?: boolean - ignore_unavailable?: boolean - include_defaults?: boolean - local?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time -} - -export interface IndicesGetResponse extends DictionaryResponseBase { } - -export interface IndicesGetAliasIndexAliases { - aliases: Record; -} - -export interface IndicesGetAliasRequest extends RequestBase { - name?: Names; - index?: Indices; - allow_no_indices?: boolean; - expand_wildcards?: ExpandWildcards; - ignore_unavailable?: boolean; - local?: boolean; -} - -export interface IndicesGetAliasResponse - extends DictionaryResponseBase { } - -export interface IndicesGetFieldMappingRequest extends RequestBase { - fields: Fields; - index?: Indices; - allow_no_indices?: boolean; - expand_wildcards?: ExpandWildcards; - ignore_unavailable?: boolean; - include_defaults?: boolean; - local?: boolean; -} - -export interface IndicesGetFieldMappingResponse - extends DictionaryResponseBase { } - -export interface IndicesGetFieldMappingTypeFieldMappings { - mappings: Record; -} - -export interface IndicesGetIndexTemplateIndexTemplate { - index_patterns: Name[]; - composed_of: Name[]; - template: IndicesGetIndexTemplateIndexTemplateSummary; - version?: VersionNumber; - priority?: long; - _meta?: Metadata; - allow_auto_create?: boolean; - data_stream?: Record; -} - -export interface IndicesGetIndexTemplateIndexTemplateItem { - name: Name; - index_template: IndicesGetIndexTemplateIndexTemplate; -} - -export interface IndicesGetIndexTemplateIndexTemplateSummary { - aliases?: Record; - mappings?: MappingTypeMapping; - settings?: Record; -} - -export interface IndicesGetIndexTemplateRequest extends RequestBase { - name?: Name; - local?: boolean; - body?: { - flat_settings?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - } -} - -export interface IndicesGetIndexTemplateResponse { - index_templates: IndicesGetIndexTemplateIndexTemplateItem[]; -} - -export interface IndicesGetMappingIndexMappingRecord { - item?: MappingTypeMapping; - mappings: MappingTypeMapping; -} - -export interface IndicesGetMappingRequest extends RequestBase { - index?: Indices - allow_no_indices?: boolean - expand_wildcards?: ExpandWildcards - ignore_unavailable?: boolean - local?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time -} - -export interface IndicesGetMappingResponse - extends DictionaryResponseBase { } - -export interface IndicesGetSettingsRequest extends RequestBase { - index?: Indices - name?: Names - allow_no_indices?: boolean - expand_wildcards?: ExpandWildcards - flat_settings?: boolean - ignore_unavailable?: boolean - include_defaults?: boolean - local?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time -} - -export interface IndicesGetSettingsResponse - extends DictionaryResponseBase { } - -export interface IndicesGetTemplateRequest extends RequestBase { - name?: Names - flat_settings?: boolean - local?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time -} - -export interface IndicesGetTemplateResponse - extends DictionaryResponseBase { } - -export interface IndicesGetUpgradeRequest extends RequestBase { - stub: string; -} - -export interface IndicesGetUpgradeResponse { - overlapping?: IndicesOverlappingIndexTemplate[]; - template?: IndicesTemplateMapping; -} - -export interface IndicesOpenRequest extends RequestBase { - index: Indices - allow_no_indices?: boolean - expand_wildcards?: ExpandWildcards - ignore_unavailable?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time - wait_for_active_shards?: WaitForActiveShards -} - -export interface IndicesOpenResponse extends AcknowledgedResponseBase { - shards_acknowledged: boolean; -} - -export interface IndicesPutAliasRequest extends RequestBase { - index: Indices - name: Name - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time - body?: { - filter?: QueryDslQueryContainer; - index_routing?: Routing; - is_write_index?: boolean; - routing?: Routing; - search_routing?: Routing; - }; -} - -export interface IndicesPutAliasResponse extends AcknowledgedResponseBase { } - -export interface IndicesPutIndexTemplateIndexTemplateMapping { - aliases?: Record; - mappings?: MappingTypeMapping; - settings?: IndicesIndexSettings; -} - -export interface IndicesPutIndexTemplateRequest extends RequestBase { - name: Name; - body?: { - index_patterns?: Indices; - composed_of?: Name[]; - template?: IndicesPutIndexTemplateIndexTemplateMapping; - data_stream?: EmptyObject; - priority?: integer; - version?: VersionNumber; - _meta?: Metadata; - }; -} - -export interface IndicesPutIndexTemplateResponse extends AcknowledgedResponseBase { } - -export interface IndicesPutMappingRequest extends RequestBase { - index?: Indices - allow_no_indices?: boolean - expand_wildcards?: ExpandWildcards - ignore_unavailable?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time - write_index_only?: boolean - body?: { - all_field?: MappingAllField; - date_detection?: boolean; - dynamic?: boolean | MappingDynamicMapping; - dynamic_date_formats?: string[]; - dynamic_templates?: - | Record - | Record[]; - field_names_field?: MappingFieldNamesField; - index_field?: MappingIndexField; - meta?: Record; - numeric_detection?: boolean; - properties?: Record; - routing_field?: MappingRoutingField; - size_field?: MappingSizeField; - source_field?: MappingSourceField; - runtime?: MappingRuntimeFields; - }; -} - -export interface IndicesPutMappingResponse extends IndicesResponseBase { } - -export interface IndicesPutSettingsIndexSettingsBody extends IndicesIndexSettings { - settings?: IndicesIndexSettings; -} - -export interface IndicesPutSettingsRequest extends RequestBase { - index?: Indices - allow_no_indices?: boolean - expand_wildcards?: ExpandWildcards - flat_settings?: boolean - ignore_unavailable?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - preserve_existing?: boolean - timeout?: Time - body?: IndicesPutSettingsIndexSettingsBody -} - -export interface IndicesPutSettingsResponse extends AcknowledgedResponseBase { } - -export interface IndicesPutTemplateRequest extends RequestBase { - name: Name - create?: boolean - flat_settings?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time - body?: { - aliases?: Record; - index_patterns?: string | string[]; - mappings?: MappingTypeMapping; - order?: integer; - settings?: Record; - version?: VersionNumber; - }; -} - -export interface IndicesPutTemplateResponse extends AcknowledgedResponseBase { } - -export interface IndicesRecoveryFileDetails { - length: long; - name: string; - recovered: long; -} - -export interface IndicesRecoveryRecoveryBytes { - percent: Percentage; - recovered?: ByteSize; - recovered_in_bytes: ByteSize; - reused?: ByteSize; - reused_in_bytes: ByteSize; - total?: ByteSize; - total_in_bytes: ByteSize; -} - -export interface IndicesRecoveryRecoveryFiles { - details?: IndicesRecoveryFileDetails[]; - percent: Percentage; - recovered: long; - reused: long; - total: long; -} - -export interface IndicesRecoveryRecoveryIndexStatus { - bytes?: IndicesRecoveryRecoveryBytes; - files: IndicesRecoveryRecoveryFiles; - size: IndicesRecoveryRecoveryBytes; - source_throttle_time?: Time; - source_throttle_time_in_millis: EpochMillis; - target_throttle_time?: Time; - target_throttle_time_in_millis: EpochMillis; - total_time_in_millis: EpochMillis; - total_time?: Time; -} - -export interface IndicesRecoveryRecoveryOrigin { - hostname?: string; - host?: Host; - transport_address?: TransportAddress; - id?: Id; - ip?: Ip; - name?: Name; - bootstrap_new_history_uuid?: boolean; - repository?: Name; - snapshot?: Name; - version?: VersionString; - restoreUUID?: Uuid; - index?: IndexName; -} - -export interface IndicesRecoveryRecoveryStartStatus { - check_index_time: long; - total_time_in_millis: string; -} - -export interface IndicesRecoveryRecoveryStatus { - shards: IndicesRecoveryShardRecovery[]; -} - -export interface IndicesRecoveryRequest extends RequestBase { - index?: Indices; - active_only?: boolean; - detailed?: boolean; -} - -export interface IndicesRecoveryResponse - extends DictionaryResponseBase { } - -export interface IndicesRecoveryShardRecovery { - id: long; - index: IndicesRecoveryRecoveryIndexStatus; - primary: boolean; - source: IndicesRecoveryRecoveryOrigin; - stage: string; - start?: IndicesRecoveryRecoveryStartStatus; - start_time?: DateString; - start_time_in_millis: EpochMillis; - stop_time?: DateString; - stop_time_in_millis: EpochMillis; - target: IndicesRecoveryRecoveryOrigin; - total_time?: DateString; - total_time_in_millis: EpochMillis; - translog: IndicesRecoveryTranslogStatus; - type: Type; - verify_index: IndicesRecoveryVerifyIndex; -} - -export interface IndicesRecoveryTranslogStatus { - percent: Percentage; - recovered: long; - total: long; - total_on_start: long; - total_time?: string; - total_time_in_millis: EpochMillis; -} - -export interface IndicesRecoveryVerifyIndex { - check_index_time?: Time; - check_index_time_in_millis: EpochMillis; - total_time?: Time; - total_time_in_millis: EpochMillis; -} - -export interface IndicesRefreshRequest extends RequestBase { - index?: Indices; - allow_no_indices?: boolean; - expand_wildcards?: ExpandWildcards; - ignore_unavailable?: boolean; -} - -export interface IndicesRefreshResponse extends ShardsOperationResponseBase { } - -export interface IndicesResolveIndexRequest extends RequestBase { - name: Names; - expand_wildcards?: ExpandWildcards; -} - -export interface IndicesResolveIndexResolveIndexAliasItem { - name: Name; - indices: Indices; -} - -export interface IndicesResolveIndexResolveIndexDataStreamsItem { - name: DataStreamName; - timestamp_field: Field; - backing_indices: Indices; -} - -export interface IndicesResolveIndexResolveIndexItem { - name: Name; - aliases?: string[]; - attributes: string[]; - data_stream?: DataStreamName; -} - -export interface IndicesResolveIndexResponse { - indices: IndicesResolveIndexResolveIndexItem[]; - aliases: IndicesResolveIndexResolveIndexAliasItem[]; - data_streams: IndicesResolveIndexResolveIndexDataStreamsItem[]; -} - -export interface IndicesRolloverRequest extends RequestBase { - alias: IndexAlias - new_index?: IndexName - dry_run?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time - wait_for_active_shards?: WaitForActiveShards - body?: { - aliases?: Record; - conditions?: IndicesRolloverRolloverConditions; - mappings?: Record | MappingTypeMapping; - settings?: Record; - }; -} - -export interface IndicesRolloverResponse extends AcknowledgedResponseBase { - conditions: Record; - dry_run: boolean; - new_index: string; - old_index: string; - rolled_over: boolean; - shards_acknowledged: boolean; -} - -export interface IndicesRolloverRolloverConditions { - max_age?: Time; - max_docs?: long; - max_size?: string; - max_primary_shard_size?: ByteSize; -} - -export interface IndicesSegmentsIndexSegment { - shards: Record; -} - -export interface IndicesSegmentsRequest extends RequestBase { - index?: Indices; - allow_no_indices?: boolean; - expand_wildcards?: ExpandWildcards; - ignore_unavailable?: boolean; - verbose?: boolean; -} - -export interface IndicesSegmentsResponse { - indices: Record; - _shards: ShardStatistics; -} - -export interface IndicesSegmentsSegment { - attributes: Record; - committed: boolean; - compound: boolean; - deleted_docs: long; - generation: integer; - memory_in_bytes: double; - search: boolean; - size_in_bytes: double; - num_docs: long; - version: VersionString; -} - -export interface IndicesSegmentsShardSegmentRouting { - node: string; - primary: boolean; - state: string; -} - -export interface IndicesSegmentsShardsSegment { - num_committed_segments: integer; - routing: IndicesSegmentsShardSegmentRouting; - num_search_segments: integer; - segments: Record; -} - -export interface IndicesShardStoresIndicesShardStores { - shards: Record; -} - -export interface IndicesShardStoresRequest extends RequestBase { - index?: Indices; - allow_no_indices?: boolean; - expand_wildcards?: ExpandWildcards; - ignore_unavailable?: boolean; - status?: string | string[]; -} - -export interface IndicesShardStoresResponse { - indices: Record; -} - -export interface IndicesShardStoresShardStore { - allocation: IndicesShardStoresShardStoreAllocation; - allocation_id: Id; - attributes: Record; - id: Id; - legacy_version: VersionNumber; - name: Name; - store_exception: IndicesShardStoresShardStoreException; - transport_address: TransportAddress; -} - -export type IndicesShardStoresShardStoreAllocation = 'primary' | 'replica' | 'unused'; - -export interface IndicesShardStoresShardStoreException { - reason: string; - type: string; -} - -export interface IndicesShardStoresShardStoreWrapper { - stores: IndicesShardStoresShardStore[]; -} - -export interface IndicesShrinkRequest extends RequestBase { - index: IndexName - target: IndexName - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time - wait_for_active_shards?: WaitForActiveShards - body?: { - aliases?: Record; - settings?: Record; - }; -} - -export interface IndicesShrinkResponse extends AcknowledgedResponseBase { - shards_acknowledged: boolean; - index: IndexName; -} - -export interface IndicesSimulateIndexTemplateRequest extends RequestBase { - name?: Name; - body?: { - index_patterns?: IndexName[]; - composed_of?: Name[]; - overlapping?: IndicesOverlappingIndexTemplate[]; - template?: IndicesTemplateMapping; - }; -} - -export interface IndicesSimulateIndexTemplateResponse { } - -export interface IndicesSimulateTemplateRequest extends RequestBase { - name?: Name - create?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - body?: IndicesGetIndexTemplateIndexTemplate -} - -export interface IndicesSimulateTemplateResponse { - stub: string; -} - -export interface IndicesSplitRequest extends RequestBase { - index: IndexName - target: IndexName - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time - wait_for_active_shards?: WaitForActiveShards - body?: { - aliases?: Record; - settings?: Record; - }; -} - -export interface IndicesSplitResponse extends AcknowledgedResponseBase { - shards_acknowledged: boolean; - index: IndexName; -} - -export interface IndicesStatsIndexStats { - completion?: CompletionStats; - docs?: DocStats; - fielddata?: FielddataStats; - flush?: FlushStats; - get?: GetStats; - indexing?: IndexingStats; - merges?: MergesStats; - query_cache?: QueryCacheStats; - recovery?: RecoveryStats; - refresh?: RefreshStats; - request_cache?: RequestCacheStats; - search?: SearchStats; - segments?: SegmentsStats; - store?: StoreStats; - translog?: TranslogStats; - warmer?: WarmerStats; - bulk?: BulkStats; -} - -export interface IndicesStatsIndicesStats { - primaries: IndicesStatsIndexStats; - shards?: Record; - total: IndicesStatsIndexStats; - uuid?: Uuid; -} - -export interface IndicesStatsRequest extends RequestBase { - metric?: Metrics; - index?: Indices; - completion_fields?: Fields; - expand_wildcards?: ExpandWildcards; - fielddata_fields?: Fields; - fields?: Fields; - forbid_closed_indices?: boolean; - groups?: string | string[]; - include_segment_file_sizes?: boolean; - include_unloaded_segments?: boolean; - level?: Level; - types?: Types; -} - -export interface IndicesStatsResponse { - indices?: Record; - _shards: ShardStatistics; - _all: IndicesStatsIndicesStats; -} - -export interface IndicesStatsShardCommit { - generation: integer; - id: Id; - num_docs: long; - user_data: Record; -} - -export interface IndicesStatsShardFileSizeInfo { - description: string; - size_in_bytes: long; - min_size_in_bytes?: long; - max_size_in_bytes?: long; - average_size_in_bytes?: long; - count?: long; -} - -export interface IndicesStatsShardLease { - id: Id; - retaining_seq_no: SequenceNumber; - timestamp: long; - source: string; -} - -export interface IndicesStatsShardPath { - data_path: string; - is_custom_data_path: boolean; - state_path: string; -} - -export interface IndicesStatsShardQueryCache { - cache_count: long; - cache_size: long; - evictions: long; - hit_count: long; - memory_size_in_bytes: long; - miss_count: long; - total_count: long; -} - -export interface IndicesStatsShardRetentionLeases { - primary_term: long; - version: VersionNumber; - leases: IndicesStatsShardLease[]; -} - -export interface IndicesStatsShardRouting { - node: string; - primary: boolean; - relocating_node?: string; - state: IndicesStatsShardRoutingState; -} - -export type IndicesStatsShardRoutingState = - | 'UNASSIGNED' - | 'INITIALIZING' - | 'STARTED' - | 'RELOCATING'; - -export interface IndicesStatsShardSequenceNumber { - global_checkpoint: long; - local_checkpoint: long; - max_seq_no: SequenceNumber; -} - -export interface IndicesStatsShardStats { - commit: IndicesStatsShardCommit; - completion: CompletionStats; - docs: DocStats; - fielddata: FielddataStats; - flush: FlushStats; - get: GetStats; - indexing: IndexingStats; - merges: MergesStats; - shard_path: IndicesStatsShardPath; - query_cache: IndicesStatsShardQueryCache; - recovery: RecoveryStats; - refresh: RefreshStats; - request_cache: RequestCacheStats; - retention_leases: IndicesStatsShardRetentionLeases; - routing: IndicesStatsShardRouting; - search: SearchStats; - segments: SegmentsStats; - seq_no: IndicesStatsShardSequenceNumber; - store: StoreStats; - translog: TranslogStats; - warmer: WarmerStats; - bulk?: BulkStats; -} - -export interface IndicesUpdateAliasesIndicesUpdateAliasBulk { } - -export interface IndicesUpdateAliasesRequest extends RequestBase { - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time - body?: { - actions?: IndicesUpdateAliasesIndicesUpdateAliasBulk[]; - }; -} - -export interface IndicesUpdateAliasesResponse extends AcknowledgedResponseBase { } - -export interface IndicesUpgradeRequest extends RequestBase { - stub_b: integer; - stub_a: integer; - body?: { - stub_c: integer; - }; -} - -export interface IndicesUpgradeResponse { - stub: integer; -} - -export interface IndicesValidateQueryIndicesValidationExplanation { - error?: string; - explanation?: string; - index: IndexName; - valid: boolean; -} - -export interface IndicesValidateQueryRequest extends RequestBase { - index?: Indices; - allow_no_indices?: boolean; - all_shards?: boolean; - analyzer?: string; - analyze_wildcard?: boolean; - default_operator?: DefaultOperator; - df?: string; - expand_wildcards?: ExpandWildcards; - explain?: boolean; - ignore_unavailable?: boolean; - lenient?: boolean; - query_on_query_string?: string; - rewrite?: boolean; - q?: string; - body?: { - query?: QueryDslQueryContainer; - }; -} - -export interface IndicesValidateQueryResponse { - explanations?: IndicesValidateQueryIndicesValidationExplanation[]; - _shards?: ShardStatistics; - valid: boolean; - error?: string; -} - -export interface IngestAppendProcessor extends IngestProcessorBase { - field: Field; - value: any[]; - allow_duplicates?: boolean; -} - -export interface IngestAttachmentProcessor extends IngestProcessorBase { - field: Field; - ignore_missing?: boolean; - indexed_chars?: long; - indexed_chars_field?: Field; - properties?: string[]; - target_field?: Field; - resource_name?: string; -} - -export interface IngestBytesProcessor extends IngestProcessorBase { - field: Field; - ignore_missing?: boolean; - target_field?: Field; -} - -export interface IngestCircleProcessor extends IngestProcessorBase { - error_distance: double; - field: Field; - ignore_missing: boolean; - shape_type: IngestShapeType; - target_field: Field; -} - -export interface IngestConvertProcessor extends IngestProcessorBase { - field: Field; - ignore_missing?: boolean; - target_field: Field; - type: IngestConvertType; -} - -export type IngestConvertType = - | 'integer' - | 'long' - | 'float' - | 'double' - | 'string' - | 'boolean' - | 'auto'; - -export interface IngestCsvProcessor extends IngestProcessorBase { - empty_value: any; - description?: string; - field: Field; - ignore_missing?: boolean; - quote?: string; - separator?: string; - target_fields: Fields; - trim: boolean; -} - -export interface IngestDateIndexNameProcessor extends IngestProcessorBase { - date_formats: string[]; - date_rounding: string | IngestDateRounding; - field: Field; - index_name_format: string; - index_name_prefix: string; - locale: string; - timezone: string; -} - -export interface IngestDateProcessor extends IngestProcessorBase { - field: Field; - formats: string[]; - locale?: string; - target_field?: Field; - timezone?: string; -} - -export type IngestDateRounding = 's' | 'm' | 'h' | 'd' | 'w' | 'M' | 'y'; - -export interface IngestDissectProcessor extends IngestProcessorBase { - append_separator: string; - field: Field; - ignore_missing: boolean; - pattern: string; -} - -export interface IngestDotExpanderProcessor extends IngestProcessorBase { - field: Field; - path?: string; -} - -export interface IngestDropProcessor extends IngestProcessorBase { } - -export interface IngestEnrichProcessor extends IngestProcessorBase { - field: Field; - ignore_missing?: boolean; - max_matches?: integer; - override?: boolean; - policy_name: string; - shape_relation?: GeoShapeRelation; - target_field: Field; -} - -export interface IngestFailProcessor extends IngestProcessorBase { - message: string; -} - -export interface IngestForeachProcessor extends IngestProcessorBase { - field: Field; - ignore_missing?: boolean; - processor: IngestProcessorContainer; -} - -export interface IngestGeoIpProcessor extends IngestProcessorBase { - database_file: string; - field: Field; - first_only: boolean; - ignore_missing: boolean; - properties: string[]; - target_field: Field; -} - -export interface IngestGrokProcessor extends IngestProcessorBase { - field: Field; - ignore_missing?: boolean; - pattern_definitions: Record; - patterns: string[]; - trace_match?: boolean; -} - -export interface IngestGsubProcessor extends IngestProcessorBase { - field: Field; - ignore_missing?: boolean; - pattern: string; - replacement: string; - target_field?: Field; -} - -export interface IngestInferenceConfig { - regression?: IngestInferenceConfigRegression; -} - -export interface IngestInferenceConfigRegression { - results_field: string; -} - -export interface IngestInferenceProcessor extends IngestProcessorBase { - model_id: Id; - target_field: Field; - field_map?: Record; - inference_config?: IngestInferenceConfig; -} - -export interface IngestJoinProcessor extends IngestProcessorBase { - field: Field; - separator: string; - target_field?: Field; -} - -export interface IngestJsonProcessor extends IngestProcessorBase { - add_to_root: boolean; - field: Field; - target_field: Field; -} - -export interface IngestKeyValueProcessor extends IngestProcessorBase { - exclude_keys?: string[]; - field: Field; - field_split: string; - ignore_missing?: boolean; - include_keys?: string[]; - prefix?: string; - strip_brackets?: boolean; - target_field?: Field; - trim_key?: string; - trim_value?: string; - value_split: string; -} - -export interface IngestLowercaseProcessor extends IngestProcessorBase { - field: Field; - ignore_missing?: boolean; - target_field?: Field; -} - -export interface IngestPipeline { - description?: string; - on_failure?: IngestProcessorContainer[]; - processors?: IngestProcessorContainer[]; - version?: VersionNumber; -} - -export interface IngestPipelineConfig { - description?: string; - version?: VersionNumber; - processors: IngestProcessorContainer[]; -} - -export interface IngestPipelineProcessor extends IngestProcessorBase { - name: Name; -} - -export interface IngestProcessorBase { - if?: string; - ignore_failure?: boolean; - on_failure?: IngestProcessorContainer[]; - tag?: string; -} - -export interface IngestProcessorContainer { - attachment?: IngestAttachmentProcessor; - append?: IngestAppendProcessor; - csv?: IngestCsvProcessor; - convert?: IngestConvertProcessor; - date?: IngestDateProcessor; - date_index_name?: IngestDateIndexNameProcessor; - dot_expander?: IngestDotExpanderProcessor; - fail?: IngestFailProcessor; - foreach?: IngestForeachProcessor; - json?: IngestJsonProcessor; - user_agent?: IngestUserAgentProcessor; - kv?: IngestKeyValueProcessor; - geoip?: IngestGeoIpProcessor; - grok?: IngestGrokProcessor; - gsub?: IngestGsubProcessor; - join?: IngestJoinProcessor; - lowercase?: IngestLowercaseProcessor; - remove?: IngestRemoveProcessor; - rename?: IngestRenameProcessor; - script?: Script; - set?: IngestSetProcessor; - sort?: IngestSortProcessor; - split?: IngestSplitProcessor; - trim?: IngestTrimProcessor; - uppercase?: IngestUppercaseProcessor; - urldecode?: IngestUrlDecodeProcessor; - bytes?: IngestBytesProcessor; - dissect?: IngestDissectProcessor; - set_security_user?: IngestSetSecurityUserProcessor; - pipeline?: IngestPipelineProcessor; - drop?: IngestDropProcessor; - circle?: IngestCircleProcessor; - inference?: IngestInferenceProcessor; -} - -export interface IngestRemoveProcessor extends IngestProcessorBase { - field: Fields; - ignore_missing?: boolean; -} - -export interface IngestRenameProcessor extends IngestProcessorBase { - field: Field; - ignore_missing?: boolean; - target_field: Field; -} - -export interface IngestSetProcessor extends IngestProcessorBase { - field: Field; - override?: boolean; - value: any; -} - -export interface IngestSetSecurityUserProcessor extends IngestProcessorBase { - field: Field; - properties?: string[]; -} - -export type IngestShapeType = 'geo_shape' | 'shape'; - -export interface IngestSortProcessor extends IngestProcessorBase { - field: Field; - order: SearchSortOrder; - target_field: Field; -} - -export interface IngestSplitProcessor extends IngestProcessorBase { - field: Field; - ignore_missing?: boolean; - preserve_trailing?: boolean; - separator: string; - target_field?: Field; -} - -export interface IngestTrimProcessor extends IngestProcessorBase { - field: Field; - ignore_missing?: boolean; - target_field?: Field; -} - -export interface IngestUppercaseProcessor extends IngestProcessorBase { - field: Field; - ignore_missing?: boolean; - target_field?: Field; -} - -export interface IngestUrlDecodeProcessor extends IngestProcessorBase { - field: Field; - ignore_missing?: boolean; - target_field?: Field; -} - -export interface IngestUserAgentProcessor extends IngestProcessorBase { - field: Field; - ignore_missing: boolean; - options: IngestUserAgentProperty[]; - regex_file: string; - target_field: Field; -} - -export type IngestUserAgentProperty = - | 'NAME' - | 'MAJOR' - | 'MINOR' - | 'PATCH' - | 'OS' - | 'OS_NAME' - | 'OS_MAJOR' - | 'OS_MINOR' - | 'DEVICE' - | 'BUILD'; - -export interface IngestDeletePipelineRequest extends RequestBase { - id: Id - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time -} - -export interface IngestDeletePipelineResponse extends AcknowledgedResponseBase { } - -export interface IngestGeoIpStatsGeoIpDownloadStatistics { - successful_downloads: integer; - failed_downloads: integer; - total_download_time: integer; - database_count: integer; - skipped_updates: integer; -} - -export interface IngestGeoIpStatsGeoIpNodeDatabaseName { - name: Name; -} - -export interface IngestGeoIpStatsGeoIpNodeDatabases { - databases: IngestGeoIpStatsGeoIpNodeDatabaseName[]; - files_in_temp: string[]; -} - -export interface IngestGeoIpStatsRequest extends RequestBase { } - -export interface IngestGeoIpStatsResponse { - stats: IngestGeoIpStatsGeoIpDownloadStatistics; - nodes: Record; -} - -export interface IngestGetPipelineRequest extends RequestBase { - id?: Id - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - summary?: boolean -} - -export interface IngestGetPipelineResponse extends DictionaryResponseBase { } - -export interface IngestProcessorGrokRequest extends RequestBase { } - -export interface IngestProcessorGrokResponse { - patterns: Record; -} - -export interface IngestPutPipelineRequest extends RequestBase { - id: Id - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time - body?: { - description?: string; - on_failure?: IngestProcessorContainer[]; - processors?: IngestProcessorContainer[]; - version?: VersionNumber; - }; -} - -export interface IngestPutPipelineResponse extends AcknowledgedResponseBase { } - -export interface IngestSimulatePipelineDocument { - _id?: Id; - _index?: IndexName; - _source: any; -} - -export interface IngestSimulatePipelineDocumentSimulation { - _id: Id; - _index: IndexName; - _ingest: IngestSimulatePipelineIngest; - _parent?: string; - _routing?: string; - _source: Record; - _type?: Type; -} - -export interface IngestSimulatePipelineIngest { - timestamp: DateString; - pipeline?: Name; -} - -export interface IngestSimulatePipelinePipelineSimulation { - doc?: IngestSimulatePipelineDocumentSimulation; - processor_results?: IngestSimulatePipelinePipelineSimulation[]; - tag?: string; - processor_type?: string; -} - -export interface IngestSimulatePipelineRequest extends RequestBase { - id?: Id; - verbose?: boolean; - body?: { - docs?: IngestSimulatePipelineDocument[]; - pipeline?: IngestPipeline; - }; -} - -export interface IngestSimulatePipelineResponse { - docs: IngestSimulatePipelinePipelineSimulation[]; -} - -export interface NodesAdaptiveSelection { - avg_queue_size: long; - avg_response_time: long; - avg_response_time_ns: long; - avg_service_time: string; - avg_service_time_ns: long; - outgoing_searches: long; - rank: string; -} - -export interface NodesBreaker { - estimated_size: string; - estimated_size_in_bytes: long; - limit_size: string; - limit_size_in_bytes: long; - overhead: float; - tripped: float; -} - -export interface NodesCpu { - percent: integer; - sys?: string; - sys_in_millis?: long; - total?: string; - total_in_millis?: long; - user?: string; - user_in_millis?: long; - load_average?: Record; -} - -export interface NodesDataPathStats { - available: string; - available_in_bytes: long; - disk_queue: string; - disk_reads: long; - disk_read_size: string; - disk_read_size_in_bytes: long; - disk_writes: long; - disk_write_size: string; - disk_write_size_in_bytes: long; - free: string; - free_in_bytes: long; - mount: string; - path: string; - total: string; - total_in_bytes: long; - type: string; -} - -export interface NodesExtendedMemoryStats extends NodesMemoryStats { - free_percent: integer; - used_percent: integer; - total_in_bytes: integer; - free_in_bytes: integer; - used_in_bytes: integer; -} - -export interface NodesFileSystem { - data: NodesDataPathStats[]; - timestamp: long; - total: NodesFileSystemTotal; -} - -export interface NodesFileSystemTotal { - available: string; - available_in_bytes: long; - free: string; - free_in_bytes: long; - total: string; - total_in_bytes: long; -} - -export interface NodesGarbageCollector { - collectors: Record; -} - -export interface NodesGarbageCollectorTotal { - collection_count: long; - collection_time: string; - collection_time_in_millis: long; -} - -export interface NodesHttp { - current_open: integer; - total_opened: long; -} - -export interface NodesIngest { - pipelines: Record; - total: NodesIngestTotal; -} - -export interface NodesIngestTotal { - count: long; - current: long; - failed: long; - processors: NodesKeyedProcessor[]; - time_in_millis: long; -} - -export interface NodesJvm { - buffer_pools: Record; - classes: NodesJvmClasses; - gc: NodesGarbageCollector; - mem: NodesMemoryStats; - threads: NodesJvmThreads; - timestamp: long; - uptime: string; - uptime_in_millis: long; -} - -export interface NodesJvmClasses { - current_loaded_count: long; - total_loaded_count: long; - total_unloaded_count: long; -} - -export interface NodesJvmThreads { - count: long; - peak_count: long; -} - -export interface NodesKeyedProcessor { - statistics: NodesProcess; - type: string; -} - -export interface NodesMemoryStats { - resident?: string; - resident_in_bytes?: long; - share?: string; - share_in_bytes?: long; - total_virtual?: string; - total_virtual_in_bytes?: long; - total_in_bytes: long; - free_in_bytes: long; - used_in_bytes: long; -} - -export interface NodesNodeBufferPool { - count: long; - total_capacity: string; - total_capacity_in_bytes: long; - used: string; - used_in_bytes: long; -} - -export interface NodesNodesResponseBase { - _nodes: NodeStatistics; -} - -export interface NodesOperatingSystem { - cpu: NodesCpu; - mem: NodesExtendedMemoryStats; - swap: NodesMemoryStats; - timestamp: long; -} - -export interface NodesProcess { - cpu: NodesCpu; - mem: NodesMemoryStats; - open_file_descriptors: integer; - timestamp: long; -} - -export interface NodesScripting { - cache_evictions: long; - compilations: long; -} - -export interface NodesStats { - adaptive_selection: Record; - breakers: Record; - fs: NodesFileSystem; - host: Host; - http: NodesHttp; - indices: IndicesStatsIndexStats; - ingest: NodesIngest; - ip: Ip | Ip[]; - jvm: NodesJvm; - name: Name; - os: NodesOperatingSystem; - process: NodesProcess; - roles: NodeRoles; - script: NodesScripting; - thread_pool: Record; - timestamp: long; - transport: NodesTransport; - transport_address: TransportAddress; - attributes: Record; -} - -export interface NodesThreadCount { - active: long; - completed: long; - largest: long; - queue: long; - rejected: long; - threads: long; -} - -export interface NodesTransport { - rx_count: long; - rx_size: string; - rx_size_in_bytes: long; - server_open: integer; - tx_count: long; - tx_size: string; - tx_size_in_bytes: long; -} - -export interface NodesHotThreadsHotThread { - hosts: Host[]; - node_id: Id; - node_name: Name; - threads: string[]; -} - -export interface NodesHotThreadsRequest extends RequestBase { - node_id?: NodeIds; - ignore_idle_threads?: boolean; - interval?: Time; - snapshots?: long; - threads?: long; - thread_type?: ThreadType; - timeout?: Time; -} - -export interface NodesHotThreadsResponse { - hot_threads: NodesHotThreadsHotThread[]; -} - -export interface NodesInfoNodeInfo { - attributes: Record; - build_hash: string; - build_type: string; - host: Host; - http?: NodesInfoNodeInfoHttp; - ip: Ip; - jvm?: NodesInfoNodeJvmInfo; - name: Name; - network?: NodesInfoNodeInfoNetwork; - os?: NodesInfoNodeOperatingSystemInfo; - plugins?: PluginStats[]; - process?: NodesInfoNodeProcessInfo; - roles: NodeRoles; - settings?: NodesInfoNodeInfoSettings; - thread_pool?: Record; - total_indexing_buffer?: long; - total_indexing_buffer_in_bytes?: ByteSize; - transport?: NodesInfoNodeInfoTransport; - transport_address: TransportAddress; - version: VersionString; - modules?: PluginStats[]; - ingest?: NodesInfoNodeInfoIngest; - aggregations?: Record; -} - -export interface NodesInfoNodeInfoAction { - destructive_requires_name: string; -} - -export interface NodesInfoNodeInfoAggregation { - types: string[]; -} - -export interface NodesInfoNodeInfoBootstrap { - memory_lock: string; -} - -export interface NodesInfoNodeInfoClient { - type: string; -} - -export interface NodesInfoNodeInfoDiscover { - seed_hosts: string; -} - -export interface NodesInfoNodeInfoHttp { - bound_address: string[]; - max_content_length?: ByteSize; - max_content_length_in_bytes: long; - publish_address: string; -} - -export interface NodesInfoNodeInfoIngest { - processors: NodesInfoNodeInfoIngestProcessor[]; -} - -export interface NodesInfoNodeInfoIngestProcessor { - type: string; -} - -export interface NodesInfoNodeInfoJvmMemory { - direct_max?: ByteSize; - direct_max_in_bytes: long; - heap_init?: ByteSize; - heap_init_in_bytes: long; - heap_max?: ByteSize; - heap_max_in_bytes: long; - non_heap_init?: ByteSize; - non_heap_init_in_bytes: long; - non_heap_max?: ByteSize; - non_heap_max_in_bytes: long; -} - -export interface NodesInfoNodeInfoMemory { - total: string; - total_in_bytes: long; -} - -export interface NodesInfoNodeInfoNetwork { - primary_interface: NodesInfoNodeInfoNetworkInterface; - refresh_interval: integer; -} - -export interface NodesInfoNodeInfoNetworkInterface { - address: string; - mac_address: string; - name: Name; -} - -export interface NodesInfoNodeInfoOSCPU { - cache_size: string; - cache_size_in_bytes: integer; - cores_per_socket: integer; - mhz: integer; - model: string; - total_cores: integer; - total_sockets: integer; - vendor: string; -} - -export interface NodesInfoNodeInfoPath { - logs: string; - home: string; - repo: string[]; - data?: string[]; -} - -export interface NodesInfoNodeInfoRepositories { - url: NodesInfoNodeInfoRepositoriesUrl; -} - -export interface NodesInfoNodeInfoRepositoriesUrl { - allowed_urls: string; -} - -export interface NodesInfoNodeInfoScript { - allowed_types: string; - disable_max_compilations_rate: string; -} - -export interface NodesInfoNodeInfoSearch { - remote: NodesInfoNodeInfoSearchRemote; -} - -export interface NodesInfoNodeInfoSearchRemote { - connect: string; -} - -export interface NodesInfoNodeInfoSettings { - cluster: NodesInfoNodeInfoSettingsCluster; - node: NodesInfoNodeInfoSettingsNode; - path: NodesInfoNodeInfoPath; - repositories?: NodesInfoNodeInfoRepositories; - discovery?: NodesInfoNodeInfoDiscover; - action?: NodesInfoNodeInfoAction; - client: NodesInfoNodeInfoClient; - http: NodesInfoNodeInfoSettingsHttp; - bootstrap?: NodesInfoNodeInfoBootstrap; - transport: NodesInfoNodeInfoSettingsTransport; - network?: NodesInfoNodeInfoSettingsNetwork; - script?: NodesInfoNodeInfoScript; - search?: NodesInfoNodeInfoSearch; -} - -export interface NodesInfoNodeInfoSettingsCluster { - name: Name - routing?: IndicesIndexRouting - election: NodesInfoNodeInfoSettingsClusterElection - initial_cluster_manager_nodes?: string - initial_master_nodes?: string -} - -export interface NodesInfoNodeInfoSettingsClusterElection { - strategy: Name; -} - -export interface NodesInfoNodeInfoSettingsHttp { - type: string | NodesInfoNodeInfoSettingsHttpType; - 'type.default'?: string; - compression?: boolean | string; - port?: integer | string; -} - -export interface NodesInfoNodeInfoSettingsHttpType { - default: string; -} - -export interface NodesInfoNodeInfoSettingsNetwork { - host: Host; -} - -export interface NodesInfoNodeInfoSettingsNode { - name: Name; - attr: Record; - max_local_storage_nodes?: string; -} - -export interface NodesInfoNodeInfoSettingsTransport { - type: string | NodesInfoNodeInfoSettingsTransportType; - 'type.default'?: string; - features?: NodesInfoNodeInfoSettingsTransportFeatures; -} - -export interface NodesInfoNodeInfoSettingsTransportFeatures { } - -export interface NodesInfoNodeInfoSettingsTransportType { - default: string; -} - -export interface NodesInfoNodeInfoTransport { - bound_address: string[]; - publish_address: string; - profiles: Record; -} - -export interface NodesInfoNodeJvmInfo { - gc_collectors: string[]; - mem: NodesInfoNodeInfoJvmMemory; - memory_pools: string[]; - pid: integer; - start_time_in_millis: long; - version: VersionString; - vm_name: Name; - vm_vendor: string; - vm_version: VersionString; - bundled_jdk: boolean; - using_bundled_jdk: boolean; - using_compressed_ordinary_object_pointers?: boolean | string; - input_arguments: string[]; -} - -export interface NodesInfoNodeOperatingSystemInfo { - arch: string; - available_processors: integer; - allocated_processors?: integer; - name: Name; - pretty_name: Name; - refresh_interval_in_millis: integer; - version: VersionString; - cpu?: NodesInfoNodeInfoOSCPU; - mem?: NodesInfoNodeInfoMemory; - swap?: NodesInfoNodeInfoMemory; -} - -export interface NodesInfoNodeProcessInfo { - id: long; - mlockall: boolean; - refresh_interval_in_millis: long; -} - -export interface NodesInfoNodeThreadPoolInfo { - core?: integer; - keep_alive?: string; - max?: integer; - queue_size: integer; - size?: integer; - type: string; -} - -export interface NodesInfoRequest extends RequestBase { - node_id?: NodeIds - metric?: Metrics - flat_settings?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time -} - -export interface NodesInfoResponse extends NodesNodesResponseBase { - cluster_name: Name; - nodes: Record; -} - -export interface NodesReloadSecureSettingsNodeReloadException { - name: Name; - reload_exception?: NodesReloadSecureSettingsNodeReloadExceptionCausedBy; -} - -export interface NodesReloadSecureSettingsNodeReloadExceptionCausedBy { - type: string; - reason: string; - caused_by?: NodesReloadSecureSettingsNodeReloadExceptionCausedBy; -} - -export interface NodesReloadSecureSettingsRequest extends RequestBase { - node_id?: NodeIds; - timeout?: Time; - body?: { - secure_settings_password?: Password; - }; -} - -export interface NodesReloadSecureSettingsResponse extends NodesNodesResponseBase { - cluster_name: Name; - nodes: Record; -} - -export interface NodesStatsRequest extends RequestBase { - node_id?: NodeIds - metric?: Metrics - index_metric?: Metrics - completion_fields?: Fields - fielddata_fields?: Fields - fields?: Fields - groups?: boolean - include_segment_file_sizes?: boolean - level?: Level - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time - types?: string[] - include_unloaded_segments?: boolean -} - -export interface NodesStatsResponse extends NodesNodesResponseBase { - cluster_name: Name; - nodes: Record; -} - -export interface NodesUsageNodeUsage { - rest_actions: Record; - since: EpochMillis; - timestamp: EpochMillis; - aggregations: Record; -} - -export interface NodesUsageRequest extends RequestBase { - node_id?: NodeIds; - metric?: Metrics; - timeout?: Time; -} - -export interface NodesUsageResponse extends NodesNodesResponseBase { - cluster_name: Name; - nodes: Record; -} - -export interface ShutdownDeleteNodeRequest extends RequestBase { - body?: { - stub: string; - }; -} - -export interface ShutdownDeleteNodeResponse { - stub: boolean; -} - -export interface ShutdownGetNodeRequest extends RequestBase { - body?: { - stub: string; - }; -} - -export interface ShutdownGetNodeResponse { - stub: boolean; -} - -export interface ShutdownPutNodeRequest extends RequestBase { - body?: { - stub: string; - }; -} - -export interface ShutdownPutNodeResponse { - stub: boolean; -} - -export interface SnapshotFileCountSnapshotStats { - file_count: integer; - size_in_bytes: long; -} - -export interface SnapshotIndexDetails { - shard_count: integer; - size?: ByteSize; - size_in_bytes: long; - max_segments_per_shard: long; -} - -export interface SnapshotInfoFeatureState { - feature_name: string; - indices: Indices; -} - -export interface SnapshotRepository { - type: string; - uuid?: Uuid; - settings: SnapshotRepositorySettings; -} - -export interface SnapshotRepositorySettings { - chunk_size?: string; - compress?: string | boolean; - concurrent_streams?: string | integer; - location: string; - read_only?: string | boolean; - readonly?: string | boolean; -} - -export interface SnapshotShardsStats { - done: long; - failed: long; - finalizing: long; - initializing: long; - started: long; - total: long; -} - -export type SnapshotShardsStatsStage = 'DONE' | 'FAILURE' | 'FINALIZE' | 'INIT' | 'STARTED'; - -export interface SnapshotShardsStatsSummary { - incremental: SnapshotShardsStatsSummaryItem; - total: SnapshotShardsStatsSummaryItem; - start_time_in_millis: long; - time_in_millis: long; -} - -export interface SnapshotShardsStatsSummaryItem { - file_count: long; - size_in_bytes: long; -} - -export interface SnapshotSnapshotIndexStats { - shards: Record; - shards_stats: SnapshotShardsStats; - stats: SnapshotSnapshotStats; -} - -export interface SnapshotSnapshotInfo { - data_streams: string[]; - duration?: Time; - duration_in_millis?: EpochMillis; - end_time?: Time; - end_time_in_millis?: EpochMillis; - failures?: SnapshotSnapshotShardFailure[]; - include_global_state?: boolean; - indices: IndexName[]; - index_details?: Record; - metadata?: Metadata; - reason?: string; - snapshot: Name; - shards?: ShardStatistics; - start_time?: Time; - start_time_in_millis?: EpochMillis; - state?: string; - uuid: Uuid; - version?: VersionString; - version_id?: VersionNumber; - feature_states?: SnapshotInfoFeatureState[]; -} - -export interface SnapshotSnapshotShardFailure { - index: IndexName; - node_id: Id; - reason: string; - shard_id: Id; - status: string; -} - -export interface SnapshotSnapshotShardsStatus { - stage: SnapshotShardsStatsStage; - stats: SnapshotShardsStatsSummary; -} - -export interface SnapshotSnapshotStats { - incremental: SnapshotFileCountSnapshotStats; - start_time_in_millis: long; - time_in_millis: long; - total: SnapshotFileCountSnapshotStats; -} - -export interface SnapshotStatus { - include_global_state: boolean; - indices: Record; - repository: string; - shards_stats: SnapshotShardsStats; - snapshot: string; - state: string; - stats: SnapshotSnapshotStats; - uuid: Uuid; -} - -export interface SnapshotCleanupRepositoryCleanupRepositoryResults { - deleted_blobs: long; - deleted_bytes: long; -} - -export interface SnapshotCleanupRepositoryRequest extends RequestBase { - repository: Name - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time -} - -export interface SnapshotCleanupRepositoryResponse { - results: SnapshotCleanupRepositoryCleanupRepositoryResults; -} - -export interface SnapshotCloneRequest extends RequestBase { - repository: Name - snapshot: Name - target_snapshot: Name - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time - body?: { - indices: string; - }; -} - -export interface SnapshotCloneResponse extends AcknowledgedResponseBase { } - -export interface SnapshotCreateRequest extends RequestBase { - repository: Name - snapshot: Name - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - wait_for_completion?: boolean - body?: { - ignore_unavailable?: boolean; - include_global_state?: boolean; - indices?: Indices; - metadata?: Metadata; - partial?: boolean; - }; -} - -export interface SnapshotCreateResponse { - accepted?: boolean; - snapshot?: SnapshotSnapshotInfo; -} - -export interface SnapshotCreateRepositoryRequest extends RequestBase { - repository: Name - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time - verify?: boolean - body?: { - repository?: SnapshotRepository; - type: string; - settings: SnapshotRepositorySettings; - }; -} - -export interface SnapshotCreateRepositoryResponse extends AcknowledgedResponseBase { } - -export interface SnapshotDeleteRequest extends RequestBase { - repository: Name - snapshot: Name - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time -} - -export interface SnapshotDeleteResponse extends AcknowledgedResponseBase { } - -export interface SnapshotDeleteRepositoryRequest extends RequestBase { - repository: Names - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time -} - -export interface SnapshotDeleteRepositoryResponse extends AcknowledgedResponseBase { } - -export interface SnapshotGetRequest extends RequestBase { - repository: Name - snapshot: Names - ignore_unavailable?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - verbose?: boolean - index_details?: boolean - human?: boolean -} - -export interface SnapshotGetResponse { - responses?: SnapshotGetSnapshotResponseItem[]; - snapshots?: SnapshotSnapshotInfo[]; -} - -export interface SnapshotGetSnapshotResponseItem { - repository: Name; - snapshots?: SnapshotSnapshotInfo[]; - error?: ErrorCause; -} - -export interface SnapshotGetRepositoryRequest extends RequestBase { - repository?: Names - local?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time -} - -export interface SnapshotGetRepositoryResponse - extends DictionaryResponseBase { } - -export interface SnapshotRestoreRequest extends RequestBase { - repository: Name - snapshot: Name - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - wait_for_completion?: boolean - body?: { - ignore_index_settings?: string[]; - ignore_unavailable?: boolean; - include_aliases?: boolean; - include_global_state?: boolean; - index_settings?: IndicesPutSettingsRequest; - indices?: Indices; - partial?: boolean; - rename_pattern?: string; - rename_replacement?: string; - }; -} - -export interface SnapshotRestoreResponse { - snapshot: SnapshotRestoreSnapshotRestore; -} - -export interface SnapshotRestoreSnapshotRestore { - indices: IndexName[]; - snapshot: string; - shards: ShardStatistics; -} - -export interface SnapshotStatusRequest extends RequestBase { - repository?: Name - snapshot?: Names - ignore_unavailable?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time -} - -export interface SnapshotStatusResponse { - snapshots: SnapshotStatus[]; -} - -export interface SnapshotVerifyRepositoryCompactNodeInfo { - name: Name; -} - -export interface SnapshotVerifyRepositoryRequest extends RequestBase { - repository: Name - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - timeout?: Time -} - -export interface SnapshotVerifyRepositoryResponse { - nodes: Record; -} - -export interface TaskInfo { - action: string; - cancellable: boolean; - children?: TaskInfo[]; - description?: string; - headers: HttpHeaders; - id: long; - node: string; - running_time_in_nanos: long; - start_time_in_millis: long; - status?: TaskStatus; - type: string; - parent_task_id?: Id; -} - -export interface TaskState { - action: string; - cancellable: boolean; - description?: string; - headers: HttpHeaders; - id: long; - node: string; - parent_task_id?: TaskId; - running_time_in_nanos: long; - start_time_in_millis: long; - status?: TaskStatus; - type: string; -} - -export interface TaskStatus { - batches: long; - canceled?: string; - created: long; - deleted: long; - noops: long; - failures?: string[]; - requests_per_second: float; - retries: Retries; - throttled?: Time; - throttled_millis: long; - throttled_until?: Time; - throttled_until_millis: long; - timed_out?: boolean; - took?: long; - total: long; - updated: long; - version_conflicts: long; -} - -export interface TaskTaskExecutingNode extends SpecUtilsBaseNode { - tasks: Record; -} - -export interface TaskCancelRequest extends RequestBase { - task_id?: TaskId; - actions?: string | string[]; - nodes?: string[]; - parent_task_id?: string; - wait_for_completion?: boolean; -} - -export interface TaskCancelResponse { - node_failures?: ErrorCause[]; - nodes: Record; -} - -export interface TaskGetRequest extends RequestBase { - task_id: Id; - timeout?: Time; - wait_for_completion?: boolean; -} - -export interface TaskGetResponse { - completed: boolean; - task: TaskInfo; - response?: TaskStatus; - error?: ErrorCause; -} - -export interface TaskListRequest extends RequestBase { - actions?: string | string[]; - detailed?: boolean; - group_by?: GroupBy; - nodes?: string[]; - parent_task_id?: Id; - timeout?: Time; - wait_for_completion?: boolean; -} - -export interface TaskListResponse { - node_failures?: ErrorCause[]; - nodes?: Record; - tasks?: Record | TaskInfo[]; -} - -export interface SpecUtilsAdditionalProperties { } - -export interface SpecUtilsCommonQueryParameters { - error_trace?: boolean; - filter_path?: string | string[]; - human?: boolean; - pretty?: boolean; - source_query_string?: string; -} - -export interface SpecUtilsCommonCatQueryParameters { - format?: string - h?: Names - help?: boolean - local?: boolean - cluster_manager_timeout?: Time - /** - * @deprecated use cluster_manager_timeout instead - */ - master_timeout?: Time - s?: string[] - v?: boolean -} - -export interface PointInTime { - pit_id: string; - creation_time: Time; - keep_alive: Time -} - -export interface PointInTimeDelete { - pit_id: string; - successful: boolean -} - -export interface PointInTimeCreateRequest extends RequestBase { - index: Indices; - keep_alive: string; - preference?: string; - routing?: string; - expand_wildcards?: ExpandWildcards; - allow_partial_pit_creation?: boolean -} - -export interface PointInTimeCreateResponse extends ShardsOperationResponseBase { - pit_id: string; - creation_time: Time; -} - -export interface PointInTimeGetAllRequest extends RequestBase { } - -export interface PointInTimeGetAllResponse { - pits: PointInTime[]; -} - -export interface PointInTimeDeleteAllRequest extends RequestBase { } - -export interface PointInTimeDeleteAllResponse { - pits: PointInTimeDelete[]; -} - -export interface PointInTimeDeleteRequest extends RequestBase { - body?: { - pit_id: string[] - }; -} - -export interface PointInTimeDeleteResponse { - pits: PointInTimeDelete[]; -} diff --git a/api/utils.js b/api/utils.js index 2fe703158..16a79b93d 100644 --- a/api/utils.js +++ b/api/utils.js @@ -30,9 +30,17 @@ 'use strict'; const result = { body: null, statusCode: null, headers: null, warnings: null }; -const kConfigurationError = Symbol('configuration error'); +const kConfigErr = Symbol('configuration error'); -function handleError(err, callback) { +function noop() {} + +function parsePathParam(param) { + if (param == null) return null; + return encodeURIComponent(param); +} + +function handleMissingParam(param, apiModule, callback) { + const err = new apiModule[kConfigErr]('Missing required parameter: ' + param); if (callback) { process.nextTick(callback, err, result); return { then: noop, catch: noop, abort: noop }; @@ -40,21 +48,6 @@ function handleError(err, callback) { return Promise.reject(err); } -function encodePathParam(camelName, snakeName = null) { - if (camelName == null && snakeName == null) return null; - return encodeURIComponent(snakeName || camelName); -} - -function snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) { - const target = {}; - const keys = Object.keys(querystring); - for (let i = 0, len = keys.length; i < len; i++) { - const key = keys[i]; - target[snakeCase[key] || key] = querystring[key]; - } - return target; -} - function normalizeArguments(params, options, callback) { if (typeof options === 'function') { callback = options; @@ -68,13 +61,27 @@ function normalizeArguments(params, options, callback) { return [params, options, callback]; } -function noop() {} +// function apiFunc (bindObj, cache, path) { // Used for lazy loading but not compatible with Webpack +// return function (...args) { +// if (!cache[path]) cache[path] = require(path).bind(bindObj); +// return cache[path](...args); +// } +// } + +function logMemoryUsage(context = '') { + const memoryUsage = process.memoryUsage(); + console.log(`Memory usage: ${context} + RSS: ${Math.round((memoryUsage.rss / 1024 / 1024) * 100) / 100} MB + Heap Total: ${Math.round((memoryUsage.heapTotal / 1024 / 1024) * 100) / 100} MB + Heap Used: ${Math.round((memoryUsage.heapUsed / 1024 / 1024) * 100) / 100} MB + External: ${Math.round((memoryUsage.external / 1024 / 1024) * 100) / 100} MB`); +} module.exports = { - handleError, - snakeCaseKeys, + handleMissingParam, + parsePathParam, normalizeArguments, noop, - kConfigurationError, - encodePathParam, + kConfigErr, + logMemoryUsage, }; diff --git a/guides/advanced_index_actions.md b/guides/advanced_index_actions.md index da1776c0c..f7cd14fa9 100644 --- a/guides/advanced_index_actions.md +++ b/guides/advanced_index_actions.md @@ -15,78 +15,78 @@ client.indices.create({index: 'movies'}) ``` ## API Actions ### Clear index cache -You can clear the cache of an index or indices by using the `indices.clear_cache` API action. The following example clears the cache of the `movies` index: +You can clear the cache of an index or indices by using the `indices.clearCache` API action. The following example clears the cache of the `movies` index: ```javascript -client.indices.clear_cache({index: 'movies'}) +await client.indices.clearCache({index: 'movies'}) ``` -By default, the `indices.clear_cache` API action clears all types of cache. To clear specific types of cache pass the the `query`, `fielddata`, or `request` parameter to the API action: +By default, the `indices.clearCache` API action clears all types of cache. To clear specific types of cache pass the the `query`, `fielddata`, or `request` parameter to the API action: ```javascript -client.indices.clear_cache({index: 'movies', query: true}) -client.indices.clear_cache({index: 'movies', fielddata: true, request: true}) +await client.indices.clearCache({index: 'movies', query: true}) +await client.indices.clearCache({index: 'movies', fielddata: true, request: true}) ``` ### Flush index Sometimes you might want to flush an index or indices to make sure that all data in the transaction log is persisted to the index. To flush an index or indices use the `indices.flush` API action. The following example flushes the `movies` index: ```javascript -client.indices.flush({index: 'movies'}) +await client.indices.flush({index: 'movies'}) ``` ### Refresh index You can refresh an index or indices to make sure that all changes are available for search. To refresh an index or indices use the `indices.refresh` API action: ```javascript -client.indices.refresh({index: 'movies'}) +await client.indices.refresh({index: 'movies'}) ``` ### Open/Close index You can close an index to prevent read and write operations on the index. A closed index does not have to maintain certain data structures that an opened index require, reducing the memory and disk space required by the index. The following example closes and reopens the `movies` index: ```javascript -client.indices.close({index: 'movies'}) -client.indices.open({index: 'movies'}) +await client.indices.close({index: 'movies'}) +await client.indices.open({index: 'movies'}) ``` ### Force merge index You can force merge an index or indices to reduce the number of segments in the index. This can be useful if you have a large number of small segments in the index. Merging segments reduces the memory footprint of the index. Do note that this action is resource intensive and it is only recommended for read-only indices. The following example force merges the `movies` index: ```javascript -client.indices.forcemerge({index: 'movies'}) +await client.indices.forcemerge({index: 'movies'}) ``` ### Clone index You can clone an index to create a new index with the same mappings, data, and MOST of the settings. The source index must be in read-only state for cloning. The following example blocks write operations from `movies` index, clones the said index to create a new index named `movies_clone`, then re-enables write: ```javascript -client.indices.add_block({index: 'movies', block: 'write'}) -client.indices.clone({index: 'movies', target: 'movies_clone'}) -client.indices.put_settings({index: 'movies', body: { index: { blocks: { write: false } } } }) +await client.indices.addBlock({index: 'movies', block: 'write'}) +await client.indices.clone({index: 'movies', target: 'movies_clone'}) +await client.indices.putSettings({index: 'movies', body: { index: { blocks: { write: false } } } }) ``` ### Split index You can split an index into another index with more primary shards. The source index must be in read-only state for splitting. The following example create the read-only `books` index with 30 routing shards and 5 shards (which is divisible by 30), splits index into `bigger_books` with 10 shards (which is also divisible by 30), then re-enables write: ```javascript -client.indices.create({ +await client.indices.create({ index: 'books', body: { settings: { index: { number_of_shards: 5, number_of_routing_shards: 30, blocks: { write: true } } } } }) -client.indices.split({ +await client.indices.split({ index: 'books', target: 'bigger_books', body: { settings: { index: { number_of_shards: 10 } } } }) -client.indices.put_settings({index: 'books', body: { index: { blocks: { write: false } } } }) +await client.indices.putSettings({index: 'books', body: { index: { blocks: { write: false } } } }) ``` ## Cleanup Let's delete all the indices we created in this guide: ```javascript -client.indices.delete({index: ['movies', 'books', 'movies_clone', 'bigger_books']}); +await client.indices.delete({index: ['movies', 'books', 'movies_clone', 'bigger_books']}); ``` \ No newline at end of file diff --git a/guides/bulk.md b/guides/bulk.md index b2c9d05c9..eced20397 100644 --- a/guides/bulk.md +++ b/guides/bulk.md @@ -122,5 +122,5 @@ client.helpers To clean up the resources created in this guide, delete the `movies` and `books` indices: ```javascript -client.indices.delete({ index: [movies, books] }); +await client.indices.delete({ index: [movies, books] }); ``` diff --git a/guides/document_lifecycle.md b/guides/document_lifecycle.md index 06d27bf12..00f3835a9 100644 --- a/guides/document_lifecycle.md +++ b/guides/document_lifecycle.md @@ -27,8 +27,8 @@ client.indices.exists({ index: index }) ### Create a new document with specified ID To create a new document, use the `create` or `index` API action. The following code creates two new documents with IDs of `1` and `2`: ```javascript -client.create({index: index, id: 1, body: { title: 'Beauty and the Beast', year: 1991 }}) -client.create({index: index, id: 2, body: { title: 'Beauty and the Beast - Live Action', year: 2017 }}) +await client.create({index: index, id: 1, body: { title: 'Beauty and the Beast', year: 1991 }}) +await client.create({index: index, id: 2, body: { title: 'Beauty and the Beast - Live Action', year: 2017 }}) ``` Note that the `create` action is NOT idempotent. If you try to create a document with an ID that already exists, the request will fail: @@ -40,18 +40,18 @@ client.create({ index: index, id: 1, body: { title: 'Just Another Movie' } }) The `index` action, on the other hand, is idempotent. If you try to index a document with an existing ID, the request will succeed and overwrite the existing document. Note that no new document will be created in this case. You can think of the `index` action as an upsert: ```javascript -client.index({index: index, id: 2, body: { title: 'Updated Title' }}) -client.index({index: index, id: 2, body: { title: 'The Lion King', year: 1994 }}) +await client.index({index: index, id: 2, body: { title: 'Updated Title' }}) +await client.index({index: index, id: 2, body: { title: 'The Lion King', year: 1994 }}) ``` ### Create a new document with auto-generated ID You can also create a new document with an auto-generated ID by omitting the `id` parameter. The following code creates documents with an auto-generated IDs in the `movies` index: ```javascript -puts client.create({index: index, body: { title: 'The Lion King 2', year: 1998 }}) -# OR client.index({index: index, body: { title: 'The Lion King 2', year: 1998 }}) +await client.create({index: index, body: { title: 'The Lion King 2', year: 1998 }}) +await client.index({index: index, body: { title: 'The Lion King 2', year: 1998 }}) ``` In this case, the ID of the created document in the `result` field of the response body: -```javascript +```json { "_index": "movies", "_type": "_doc", @@ -120,18 +120,18 @@ client.exists({ ### Update a document To update a document, use the `update` API action. The following code updates the `year` field of the document with ID `1` in the `movies` index: ```javascript -client.update({index: index, id: 1, body: { doc: { year: 1995 } }}) +await client.update({index: index, id: 1, body: { doc: { year: 1995 } }}) ``` Alternatively, you can use the `script` parameter to update a document using a script. The following code increments the `year` field of the of document with ID `1` by 5 using painless script, the default scripting language in OpenSearch: ```javascript -client.update({index: index, id: 1, body: { script: { source: 'ctx._source.year += 5' } }}) +await client.update({index: index, id: 1, body: { script: { source: 'ctx._source.year += 5' } }}) ``` Note that while both `update` and `index` actions perform updates, they are not the same. The `update` action is a partial update, while the `index` action is a full update. The `update` action only updates the fields that are specified in the request body, while the `index` action overwrites the entire document with the new document. ### Update multiple documents by query To update documents that match a query, use the `update_by_query` API action. The following code decreases the `year` field of all documents with `year` greater than 2023: ```javascript -client.update_by_query({index: index, body: { +await client.update_by_query({index: index, body: { script: { source: 'ctx._source.year -= 1' }, query: { range: { year: { gt: 2023 } } } }}) @@ -140,17 +140,17 @@ client.update_by_query({index: index, body: { ### Delete a document To delete a document, use the `delete` API action. The following code deletes the document with ID `1`: ```javascript -client.delete({index: index, id: 1}) +await client.delete({index: index, id: 1}) ``` By default, the `delete` action is not idempotent. If you try to delete a document that does not exist, or delete the same document twice, you will run into Not Found (404) error. You can make the `delete` action idempotent by setting the `ignore` parameter to `404`: ```javascript -client.delete({index: index, id: 1, ignore: 404}) +await client.delete({index: index, id: 1, ignore: 404}) ``` ### Delete multiple documents by query To delete documents that match a query, use the `delete_by_query` API action. The following code deletes all documents with `year` greater than 2023: ```javascript -client.delete_by_query({index: index, body: { +await client.delete_by_query({index: index, body: { query: { range: { year: { gt: 2023 } } } }}) ``` @@ -158,5 +158,5 @@ client.delete_by_query({index: index, body: { ## Cleanup To clean up the resources created in this guide, delete the `movies` index: ```javascript -client.indices.delete({index: index}) +await client.indices.delete({index: index}) ``` diff --git a/guides/index_lifecycle.md b/guides/index_lifecycle.md index 8c87cec95..8cbddcb93 100644 --- a/guides/index_lifecycle.md +++ b/guides/index_lifecycle.md @@ -23,12 +23,12 @@ client.info().then(response => { You can quickly create an index with default settings and mappings by using the `indices.create` API action. The following example creates an index named `paintings` with default settings and mappings: ```javascript -client.indices.create({index: 'paintings'}) +await client.indices.create({index: 'paintings'}) ``` To specify settings and mappings, you can pass them as the `body` of the request. The following example creates an index named `movies` with custom settings and mappings: ```javascript -client.indices.create({ +await client.indices.create({ index: 'movies', body: { settings: { @@ -52,7 +52,7 @@ When you create a new document for an index, OpenSearch will automatically creat client.indices.exists({ index: 'burner' }).then((exists) => { console.log(exists); // => false }); -client.create({index: 'burner', body: { lorem: 'ipsum' }}); +await client.create({index: 'burner', body: { lorem: 'ipsum' }}); client.indices.exists({ index: 'burner' }).then((exists) => { console.log(exists); // => true }); @@ -60,12 +60,12 @@ client.indices.exists({ index: 'burner' }).then((exists) => { ### Update an Index -You can update an index's settings and mappings by using the `indices.put_settings` and `indices.put_mapping` API actions. +You can update an index's settings and mappings by using the `indices.putSettings` and `indices.putMapping` API actions. The following example updates the `movies` index's number of replicas to `0`: ```javascript -client.indices.put_settings({ +await client.indices.putSettings({ index: 'movies', body: { index: { @@ -77,7 +77,7 @@ client.indices.put_settings({ The following example updates the `movies` index's mappings to add a new field named `director`: ```javascript -client.indices.put_mapping({ +await client.indices.putMapping({ index: 'movies', body: { properties: { @@ -96,7 +96,7 @@ client.indices.get({ index: 'movies' }) ``` The response body contains the index's settings and mappings: -```javascript +```json { "movies": { "aliases": {}, @@ -124,19 +124,11 @@ The response body contains the index's settings and mappings: Let's delete the `movies` index by using the `indices.delete` API action: ```javascript -client.indices.delete({index: 'movies'}) +await client.indices.delete({index: 'movies'}) ``` We can also delete multiple indices at once: ```javascript -client.indices.delete({index: ['movies', 'paintings', 'burner'], ignore_unavailable: true,}) +await client.indices.delete({index: ['movies', 'paintings', 'burner'], ignore_unavailable: true,}) ``` Notice that we are passing `ignore_unavailable: true` to the request. This tells the client to ignore throwing error and deleting the index if it doesn't exist. Without it, the above `delete` request will throw an error because the `movies` index has already been deleted in the previous example. - -## Cleanup - -All resources created in this guide are automatically deleted when the cluster is stopped. You can stop the cluster by running the following command: - -```bash -docker-compose down -``` diff --git a/guides/index_template.md b/guides/index_template.md index 356ddcdf6..d9b587998 100644 --- a/guides/index_template.md +++ b/guides/index_template.md @@ -19,7 +19,7 @@ const client = new Client({ You can create an index template to define default settings and mappings for indices of certain patterns. The following example creates an index template named `books` with default settings and mappings for indices of the `books-*` pattern: ```javascript -client.indices.put_index_template({ +client.indices.putIndexTemplate({ name: 'books', body: { index_patterns: ['books-*'], @@ -60,7 +60,7 @@ client.indices.create({ index: 'books-nonfiction' }) If multiple index templates match the index's name, OpenSearch will apply the template with the highest priority. The following example creates two index templates named `books-*` and `books-fiction-*` with different settings: ```javascript -client.indices.put_index_template({ +client.indices.putIndexTemplate({ name: 'books', body: { index_patterns: ['books-*'], @@ -76,11 +76,11 @@ client.indices.put_index_template({ console.log(`Index template created: ${resp}`); }); -client.indices.put_index_template({ +client.indices.putIndexTemplate({ name: 'books-fiction', body: { index_patterns: ['books-fiction-*'], - priority: 1, # higher priority than the `books` template + priority: 1, // higher priority than the `books` template template: { settings: { index: { @@ -112,7 +112,7 @@ client.indices.create({ index: 'books-fiction-romance' }) Composable index templates are a new type of index template that allow you to define multiple component templates and compose them into a final template. The following example creates a component template named `books_mappings` with default mappings for indices of the `books-*` and `books-fiction-*` patterns: ```javascript -client.cluster.put_component_template({ +client.cluster.putComponentTemplate({ name: 'books_mappings', body: { template: { @@ -131,11 +131,11 @@ client.cluster.put_component_template({ console.log(`Component template created: ${resp}`); }); -client.indices.put_index_template({ +client.indices.putIndexTemplate({ name: 'books', body: { index_patterns: ['books-*'], - composed_of: ['books_mappings'], # use the `books_mappings` component template + composed_of: ['books_mappings'], // use the `books_mappings` component template priority: 0, template: { settings: { @@ -151,11 +151,11 @@ client.indices.put_index_template({ console.log(`Index template created: ${resp}`); }); -client.indices.put_index_template({ +client.indices.putIndexTemplate({ name: 'books', body: { index_patterns: ['books-*'], - composed_of: ['books_mappings'], # use the `books_mappings` component template + composed_of: ['books_mappings'], // use the `books_mappings` component template priority: 1, template: { settings: { @@ -185,10 +185,10 @@ client.indices.create({ index: 'books-fiction-horror' }) ``` ### Get an Index Template -You can get an index template with the `get_index_template` API action: +You can get an index template with the `getIndexTemplate` API action: ```javascript -client.indices.get_index_template({name: 'books'}).then(response => { +client.indices.getIndexTemplate({name: 'books'}).then(response => { console.log(response.body); }); ``` @@ -197,7 +197,7 @@ client.indices.get_index_template({name: 'books'}).then(response => { You can delete an index template with the `delete_template` API action: ```javascript -client.indices.delete_index_template({ +client.indices.deleteIndexTemplate({ name: 'books' }).then((response) => { console.log(`Index template deleted: ${response}`); @@ -214,13 +214,13 @@ client.indices.delete({ console.log(`Index deleted: ${response}`) }); -client.indices.delete_index_template({ +client.indices.deleteIndexTemplate({ name: 'books-fiction' }).then(response => { console.log(`Index template deleted: ${response}`) }); -client.cluster.delete_index_template({ +client.cluster.deleteIndexTemplate({ name: 'books_mappings' }).then(response => { console.log(`Component template deleted: ${response}`) diff --git a/index.d.ts b/index.d.ts index 67752eddd..84cabcb64 100644 --- a/index.d.ts +++ b/index.d.ts @@ -8,6 +8,8 @@ * */ + + /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -27,5804 +29,21 @@ * under the License. */ -/// - -import { ConnectionOptions as TlsConnectionOptions } from 'tls'; import Transport, { ApiError, ApiResponse, - RequestEvent, - TransportRequestParams, - TransportRequestOptions, - nodeFilterFn, - nodeSelectorFn, - generateRequestIdFn, - TransportRequestCallback, - TransportRequestPromise, - RequestBody, - RequestNDBody, - Context, - MemoryCircuitBreakerOptions, } from './lib/Transport'; -import { URL } from 'url'; -import Connection, { AgentOptions, agentFn } from './lib/Connection'; +import Connection from './lib/Connection'; import { ConnectionPool, BaseConnectionPool, CloudConnectionPool, ResurrectEvent, - BasicAuth, - AwsSigv4Auth, } from './lib/pool'; import Serializer from './lib/Serializer'; -import Helpers from './lib/Helpers'; import * as errors from './lib/errors'; -import * as opensearchtypes from './api/types'; -import * as RequestParams from './api/requestParams'; - -declare type callbackFn = ( - err: ApiError, - result: ApiResponse -) => void; - -// Extend API -interface ClientExtendsCallbackOptions { - ConfigurationError: errors.ConfigurationError; - makeRequest( - params: TransportRequestParams, - options?: TransportRequestOptions - ): Promise | void; - result: { - body: null; - statusCode: null; - headers: null; - warnings: null; - }; -} -declare type extendsCallback = (options: ClientExtendsCallbackOptions) => any; -// /Extend API - -// TODO: delete master role when it is removed from OpenSearch -interface NodeOptions { - url: URL; - id?: string; - agent?: AgentOptions; - ssl?: TlsConnectionOptions; - headers?: Record; - roles?: { - cluster_manager?: boolean; - /** - * @deprecated use cluster_manager instead - */ - master?: boolean; - data: boolean; - ingest: boolean; - }; -} - -interface ClientOptions { - node?: string | string[] | NodeOptions | NodeOptions[]; - nodes?: string | string[] | NodeOptions | NodeOptions[]; - Connection?: typeof Connection; - ConnectionPool?: typeof ConnectionPool; - Transport?: typeof Transport; - Serializer?: typeof Serializer; - maxRetries?: number; - requestTimeout?: number; - pingTimeout?: number; - sniffInterval?: number | boolean; - sniffOnStart?: boolean; - sniffEndpoint?: string; - sniffOnConnectionFault?: boolean; - resurrectStrategy?: 'ping' | 'optimistic' | 'none'; - suggestCompression?: boolean; - compression?: 'gzip'; - ssl?: TlsConnectionOptions; - agent?: AgentOptions | agentFn | false; - nodeFilter?: nodeFilterFn; - nodeSelector?: nodeSelectorFn | string; - headers?: Record; - opaqueIdPrefix?: string; - generateRequestId?: generateRequestIdFn; - name?: string | symbol; - auth?: BasicAuth | AwsSigv4Auth; - context?: Context; - proxy?: string | URL; - enableMetaHeader?: boolean; - cloud?: { - id: string; - // TODO: remove username and password here in 8 - username?: string; - password?: string; - }; - disablePrototypePoisoningProtection?: boolean | 'proto' | 'constructor'; - memoryCircuitBreaker?: MemoryCircuitBreakerOptions; - enableLongNumeralSupport?: boolean; -} - -declare class Client { - constructor(opts: ClientOptions); - connectionPool: ConnectionPool; - transport: Transport; - serializer: Serializer; - extend(method: string, fn: extendsCallback): void; - extend(method: string, opts: { force: boolean }, fn: extendsCallback): void; - helpers: Helpers; - child(opts?: ClientOptions): Client; - close(callback: Function): void; - close(): Promise; - emit(event: string | symbol, ...args: any[]): boolean; - on(event: 'request', listener: (err: ApiError, meta: RequestEvent) => void): this; - on(event: 'response', listener: (err: ApiError, meta: RequestEvent) => void): this; - on(event: 'sniff', listener: (err: ApiError, meta: RequestEvent) => void): this; - on(event: 'resurrect', listener: (err: null, meta: ResurrectEvent) => void): this; - once(event: 'request', listener: (err: ApiError, meta: RequestEvent) => void): this; - once(event: 'response', listener: (err: ApiError, meta: RequestEvent) => void): this; - once(event: 'sniff', listener: (err: ApiError, meta: RequestEvent) => void): this; - once(event: 'resurrect', listener: (err: null, meta: ResurrectEvent) => void): this; - off(event: string | symbol, listener: (...args: any[]) => void): this; - /* GENERATED */ - bulk< - TResponse = Record, - TRequestBody extends RequestNDBody = Record[], - TContext = Context - >( - params?: RequestParams.Bulk, - options?: TransportRequestOptions - ): TransportRequestPromise>; - bulk< - TResponse = Record, - TRequestBody extends RequestNDBody = Record[], - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - bulk< - TResponse = Record, - TRequestBody extends RequestNDBody = Record[], - TContext = Context - >( - params: RequestParams.Bulk, - callback: callbackFn - ): TransportRequestCallback; - bulk< - TResponse = Record, - TRequestBody extends RequestNDBody = Record[], - TContext = Context - >( - params: RequestParams.Bulk, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - cat: { - aliases, TContext = Context>( - params?: RequestParams.CatAliases, - options?: TransportRequestOptions - ): TransportRequestPromise>; - aliases, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - aliases, TContext = Context>( - params: RequestParams.CatAliases, - callback: callbackFn - ): TransportRequestCallback; - aliases, TContext = Context>( - params: RequestParams.CatAliases, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - allocation, TContext = Context>( - params?: RequestParams.CatAllocation, - options?: TransportRequestOptions - ): TransportRequestPromise>; - allocation, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - allocation, TContext = Context>( - params: RequestParams.CatAllocation, - callback: callbackFn - ): TransportRequestCallback; - allocation, TContext = Context>( - params: RequestParams.CatAllocation, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - cluster_manager, TContext = Context>( - params?: RequestParams.CatClusterManager, - options?: TransportRequestOptions - ): TransportRequestPromise>; - cluster_manager, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - cluster_manager, TContext = Context>( - params: RequestParams.CatClusterManager, - callback: callbackFn - ): TransportRequestCallback; - cluster_manager, TContext = Context>( - params: RequestParams.CatClusterManager, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - count, TContext = Context>( - params?: RequestParams.CatCount, - options?: TransportRequestOptions - ): TransportRequestPromise>; - count, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - count, TContext = Context>( - params: RequestParams.CatCount, - callback: callbackFn - ): TransportRequestCallback; - count, TContext = Context>( - params: RequestParams.CatCount, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - fielddata, TContext = Context>( - params?: RequestParams.CatFielddata, - options?: TransportRequestOptions - ): TransportRequestPromise>; - fielddata, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - fielddata, TContext = Context>( - params: RequestParams.CatFielddata, - callback: callbackFn - ): TransportRequestCallback; - fielddata, TContext = Context>( - params: RequestParams.CatFielddata, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - health, TContext = Context>( - params?: RequestParams.CatHealth, - options?: TransportRequestOptions - ): TransportRequestPromise>; - health, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - health, TContext = Context>( - params: RequestParams.CatHealth, - callback: callbackFn - ): TransportRequestCallback; - health, TContext = Context>( - params: RequestParams.CatHealth, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - help, TContext = Context>( - params?: RequestParams.CatHelp, - options?: TransportRequestOptions - ): TransportRequestPromise>; - help, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - help, TContext = Context>( - params: RequestParams.CatHelp, - callback: callbackFn - ): TransportRequestCallback; - help, TContext = Context>( - params: RequestParams.CatHelp, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - indices, TContext = Context>( - params?: RequestParams.CatIndices, - options?: TransportRequestOptions - ): TransportRequestPromise>; - indices, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - indices, TContext = Context>( - params: RequestParams.CatIndices, - callback: callbackFn - ): TransportRequestCallback; - indices, TContext = Context>( - params: RequestParams.CatIndices, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - /** - * // TODO: delete cat.master when it is removed from OpenSearch - * @deprecated use cat.cluster_manager instead - */ - master, TContext = Context>( - params?: RequestParams.CatMaster, - options?: TransportRequestOptions - ): TransportRequestPromise>; - /** - * // TODO: delete cat.master when it is removed from OpenSearch - * @deprecated use cat.cluster_manager instead - */ - master, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - /** - * // TODO: delete cat.master when it is removed from OpenSearch - * @deprecated use cat.cluster_manager instead - */ - master, TContext = Context>( - params: RequestParams.CatMaster, - callback: callbackFn - ): TransportRequestCallback; - /** - * // TODO: delete cat.master when it is removed from OpenSearch - * @deprecated use cat.cluster_manager instead - */ - master, TContext = Context>( - params: RequestParams.CatMaster, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - nodeattrs, TContext = Context>( - params?: RequestParams.CatNodeattrs, - options?: TransportRequestOptions - ): TransportRequestPromise>; - nodeattrs, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - nodeattrs, TContext = Context>( - params: RequestParams.CatNodeattrs, - callback: callbackFn - ): TransportRequestCallback; - nodeattrs, TContext = Context>( - params: RequestParams.CatNodeattrs, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - nodes, TContext = Context>( - params?: RequestParams.CatNodes, - options?: TransportRequestOptions - ): TransportRequestPromise>; - nodes, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - nodes, TContext = Context>( - params: RequestParams.CatNodes, - callback: callbackFn - ): TransportRequestCallback; - nodes, TContext = Context>( - params: RequestParams.CatNodes, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - pending_tasks, TContext = Context>( - params?: RequestParams.CatPendingTasks, - options?: TransportRequestOptions - ): TransportRequestPromise>; - pending_tasks, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - pending_tasks, TContext = Context>( - params: RequestParams.CatPendingTasks, - callback: callbackFn - ): TransportRequestCallback; - pending_tasks, TContext = Context>( - params: RequestParams.CatPendingTasks, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - pendingTasks, TContext = Context>( - params?: RequestParams.CatPendingTasks, - options?: TransportRequestOptions - ): TransportRequestPromise>; - pendingTasks, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - pendingTasks, TContext = Context>( - params: RequestParams.CatPendingTasks, - callback: callbackFn - ): TransportRequestCallback; - pendingTasks, TContext = Context>( - params: RequestParams.CatPendingTasks, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - plugins, TContext = Context>( - params?: RequestParams.CatPlugins, - options?: TransportRequestOptions - ): TransportRequestPromise>; - plugins, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - plugins, TContext = Context>( - params: RequestParams.CatPlugins, - callback: callbackFn - ): TransportRequestCallback; - plugins, TContext = Context>( - params: RequestParams.CatPlugins, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - recovery, TContext = Context>( - params?: RequestParams.CatRecovery, - options?: TransportRequestOptions - ): TransportRequestPromise>; - recovery, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - recovery, TContext = Context>( - params: RequestParams.CatRecovery, - callback: callbackFn - ): TransportRequestCallback; - recovery, TContext = Context>( - params: RequestParams.CatRecovery, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - repositories, TContext = Context>( - params?: RequestParams.CatRepositories, - options?: TransportRequestOptions - ): TransportRequestPromise>; - repositories, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - repositories, TContext = Context>( - params: RequestParams.CatRepositories, - callback: callbackFn - ): TransportRequestCallback; - repositories, TContext = Context>( - params: RequestParams.CatRepositories, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - segments, TContext = Context>( - params?: RequestParams.CatSegments, - options?: TransportRequestOptions - ): TransportRequestPromise>; - segments, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - segments, TContext = Context>( - params: RequestParams.CatSegments, - callback: callbackFn - ): TransportRequestCallback; - segments, TContext = Context>( - params: RequestParams.CatSegments, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - shards, TContext = Context>( - params?: RequestParams.CatShards, - options?: TransportRequestOptions - ): TransportRequestPromise>; - shards, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - shards, TContext = Context>( - params: RequestParams.CatShards, - callback: callbackFn - ): TransportRequestCallback; - shards, TContext = Context>( - params: RequestParams.CatShards, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - snapshots, TContext = Context>( - params?: RequestParams.CatSnapshots, - options?: TransportRequestOptions - ): TransportRequestPromise>; - snapshots, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - snapshots, TContext = Context>( - params: RequestParams.CatSnapshots, - callback: callbackFn - ): TransportRequestCallback; - snapshots, TContext = Context>( - params: RequestParams.CatSnapshots, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - tasks, TContext = Context>( - params?: RequestParams.CatTasks, - options?: TransportRequestOptions - ): TransportRequestPromise>; - tasks, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - tasks, TContext = Context>( - params: RequestParams.CatTasks, - callback: callbackFn - ): TransportRequestCallback; - tasks, TContext = Context>( - params: RequestParams.CatTasks, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - templates, TContext = Context>( - params?: RequestParams.CatTemplates, - options?: TransportRequestOptions - ): TransportRequestPromise>; - templates, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - templates, TContext = Context>( - params: RequestParams.CatTemplates, - callback: callbackFn - ): TransportRequestCallback; - templates, TContext = Context>( - params: RequestParams.CatTemplates, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - thread_pool, TContext = Context>( - params?: RequestParams.CatThreadPool, - options?: TransportRequestOptions - ): TransportRequestPromise>; - thread_pool, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - thread_pool, TContext = Context>( - params: RequestParams.CatThreadPool, - callback: callbackFn - ): TransportRequestCallback; - thread_pool, TContext = Context>( - params: RequestParams.CatThreadPool, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - threadPool, TContext = Context>( - params?: RequestParams.CatThreadPool, - options?: TransportRequestOptions - ): TransportRequestPromise>; - threadPool, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - threadPool, TContext = Context>( - params: RequestParams.CatThreadPool, - callback: callbackFn - ): TransportRequestCallback; - threadPool, TContext = Context>( - params: RequestParams.CatThreadPool, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - }; - clear_scroll< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.ClearScroll, - options?: TransportRequestOptions - ): TransportRequestPromise>; - clear_scroll< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - clear_scroll< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ClearScroll, - callback: callbackFn - ): TransportRequestCallback; - clear_scroll< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ClearScroll, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - clearScroll< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.ClearScroll, - options?: TransportRequestOptions - ): TransportRequestPromise>; - clearScroll< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - clearScroll< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ClearScroll, - callback: callbackFn - ): TransportRequestCallback; - clearScroll< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ClearScroll, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - cluster: { - allocation_explain< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.ClusterAllocationExplain, - options?: TransportRequestOptions - ): TransportRequestPromise>; - allocation_explain< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - allocation_explain< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ClusterAllocationExplain, - callback: callbackFn - ): TransportRequestCallback; - allocation_explain< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ClusterAllocationExplain, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - allocationExplain< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.ClusterAllocationExplain, - options?: TransportRequestOptions - ): TransportRequestPromise>; - allocationExplain< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - allocationExplain< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ClusterAllocationExplain, - callback: callbackFn - ): TransportRequestCallback; - allocationExplain< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ClusterAllocationExplain, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - delete_component_template, TContext = Context>( - params?: RequestParams.ClusterDeleteComponentTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - delete_component_template, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - delete_component_template, TContext = Context>( - params: RequestParams.ClusterDeleteComponentTemplate, - callback: callbackFn - ): TransportRequestCallback; - delete_component_template, TContext = Context>( - params: RequestParams.ClusterDeleteComponentTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deleteComponentTemplate, TContext = Context>( - params?: RequestParams.ClusterDeleteComponentTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteComponentTemplate, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - deleteComponentTemplate, TContext = Context>( - params: RequestParams.ClusterDeleteComponentTemplate, - callback: callbackFn - ): TransportRequestCallback; - deleteComponentTemplate, TContext = Context>( - params: RequestParams.ClusterDeleteComponentTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - delete_voting_config_exclusions, TContext = Context>( - params?: RequestParams.ClusterDeleteVotingConfigExclusions, - options?: TransportRequestOptions - ): TransportRequestPromise>; - delete_voting_config_exclusions, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - delete_voting_config_exclusions, TContext = Context>( - params: RequestParams.ClusterDeleteVotingConfigExclusions, - callback: callbackFn - ): TransportRequestCallback; - delete_voting_config_exclusions, TContext = Context>( - params: RequestParams.ClusterDeleteVotingConfigExclusions, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deleteVotingConfigExclusions, TContext = Context>( - params?: RequestParams.ClusterDeleteVotingConfigExclusions, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteVotingConfigExclusions, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - deleteVotingConfigExclusions, TContext = Context>( - params: RequestParams.ClusterDeleteVotingConfigExclusions, - callback: callbackFn - ): TransportRequestCallback; - deleteVotingConfigExclusions, TContext = Context>( - params: RequestParams.ClusterDeleteVotingConfigExclusions, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - exists_component_template( - params?: RequestParams.ClusterExistsComponentTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - exists_component_template( - callback: callbackFn - ): TransportRequestCallback; - exists_component_template( - params: RequestParams.ClusterExistsComponentTemplate, - callback: callbackFn - ): TransportRequestCallback; - exists_component_template( - params: RequestParams.ClusterExistsComponentTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - existsComponentTemplate( - params?: RequestParams.ClusterExistsComponentTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - existsComponentTemplate( - callback: callbackFn - ): TransportRequestCallback; - existsComponentTemplate( - params: RequestParams.ClusterExistsComponentTemplate, - callback: callbackFn - ): TransportRequestCallback; - existsComponentTemplate( - params: RequestParams.ClusterExistsComponentTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get_component_template, TContext = Context>( - params?: RequestParams.ClusterGetComponentTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get_component_template, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get_component_template, TContext = Context>( - params: RequestParams.ClusterGetComponentTemplate, - callback: callbackFn - ): TransportRequestCallback; - get_component_template, TContext = Context>( - params: RequestParams.ClusterGetComponentTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getComponentTemplate, TContext = Context>( - params?: RequestParams.ClusterGetComponentTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getComponentTemplate, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - getComponentTemplate, TContext = Context>( - params: RequestParams.ClusterGetComponentTemplate, - callback: callbackFn - ): TransportRequestCallback; - getComponentTemplate, TContext = Context>( - params: RequestParams.ClusterGetComponentTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get_settings, TContext = Context>( - params?: RequestParams.ClusterGetSettings, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get_settings, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get_settings, TContext = Context>( - params: RequestParams.ClusterGetSettings, - callback: callbackFn - ): TransportRequestCallback; - get_settings, TContext = Context>( - params: RequestParams.ClusterGetSettings, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getSettings, TContext = Context>( - params?: RequestParams.ClusterGetSettings, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getSettings, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - getSettings, TContext = Context>( - params: RequestParams.ClusterGetSettings, - callback: callbackFn - ): TransportRequestCallback; - getSettings, TContext = Context>( - params: RequestParams.ClusterGetSettings, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - health, TContext = Context>( - params?: RequestParams.ClusterHealth, - options?: TransportRequestOptions - ): TransportRequestPromise>; - health, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - health, TContext = Context>( - params: RequestParams.ClusterHealth, - callback: callbackFn - ): TransportRequestCallback; - health, TContext = Context>( - params: RequestParams.ClusterHealth, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - pending_tasks, TContext = Context>( - params?: RequestParams.ClusterPendingTasks, - options?: TransportRequestOptions - ): TransportRequestPromise>; - pending_tasks, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - pending_tasks, TContext = Context>( - params: RequestParams.ClusterPendingTasks, - callback: callbackFn - ): TransportRequestCallback; - pending_tasks, TContext = Context>( - params: RequestParams.ClusterPendingTasks, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - pendingTasks, TContext = Context>( - params?: RequestParams.ClusterPendingTasks, - options?: TransportRequestOptions - ): TransportRequestPromise>; - pendingTasks, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - pendingTasks, TContext = Context>( - params: RequestParams.ClusterPendingTasks, - callback: callbackFn - ): TransportRequestCallback; - pendingTasks, TContext = Context>( - params: RequestParams.ClusterPendingTasks, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - post_voting_config_exclusions, TContext = Context>( - params?: RequestParams.ClusterPostVotingConfigExclusions, - options?: TransportRequestOptions - ): TransportRequestPromise>; - post_voting_config_exclusions, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - post_voting_config_exclusions, TContext = Context>( - params: RequestParams.ClusterPostVotingConfigExclusions, - callback: callbackFn - ): TransportRequestCallback; - post_voting_config_exclusions, TContext = Context>( - params: RequestParams.ClusterPostVotingConfigExclusions, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - postVotingConfigExclusions, TContext = Context>( - params?: RequestParams.ClusterPostVotingConfigExclusions, - options?: TransportRequestOptions - ): TransportRequestPromise>; - postVotingConfigExclusions, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - postVotingConfigExclusions, TContext = Context>( - params: RequestParams.ClusterPostVotingConfigExclusions, - callback: callbackFn - ): TransportRequestCallback; - postVotingConfigExclusions, TContext = Context>( - params: RequestParams.ClusterPostVotingConfigExclusions, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - put_component_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.ClusterPutComponentTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - put_component_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - put_component_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ClusterPutComponentTemplate, - callback: callbackFn - ): TransportRequestCallback; - put_component_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ClusterPutComponentTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - putComponentTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.ClusterPutComponentTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - putComponentTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - putComponentTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ClusterPutComponentTemplate, - callback: callbackFn - ): TransportRequestCallback; - putComponentTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ClusterPutComponentTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - put_settings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.ClusterPutSettings, - options?: TransportRequestOptions - ): TransportRequestPromise>; - put_settings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - put_settings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ClusterPutSettings, - callback: callbackFn - ): TransportRequestCallback; - put_settings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ClusterPutSettings, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - putSettings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.ClusterPutSettings, - options?: TransportRequestOptions - ): TransportRequestPromise>; - putSettings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - putSettings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ClusterPutSettings, - callback: callbackFn - ): TransportRequestCallback; - putSettings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ClusterPutSettings, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - remote_info, TContext = Context>( - params?: RequestParams.ClusterRemoteInfo, - options?: TransportRequestOptions - ): TransportRequestPromise>; - remote_info, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - remote_info, TContext = Context>( - params: RequestParams.ClusterRemoteInfo, - callback: callbackFn - ): TransportRequestCallback; - remote_info, TContext = Context>( - params: RequestParams.ClusterRemoteInfo, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - remoteInfo, TContext = Context>( - params?: RequestParams.ClusterRemoteInfo, - options?: TransportRequestOptions - ): TransportRequestPromise>; - remoteInfo, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - remoteInfo, TContext = Context>( - params: RequestParams.ClusterRemoteInfo, - callback: callbackFn - ): TransportRequestCallback; - remoteInfo, TContext = Context>( - params: RequestParams.ClusterRemoteInfo, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - reroute< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.ClusterReroute, - options?: TransportRequestOptions - ): TransportRequestPromise>; - reroute< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - reroute< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ClusterReroute, - callback: callbackFn - ): TransportRequestCallback; - reroute< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ClusterReroute, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - state, TContext = Context>( - params?: RequestParams.ClusterState, - options?: TransportRequestOptions - ): TransportRequestPromise>; - state, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - state, TContext = Context>( - params: RequestParams.ClusterState, - callback: callbackFn - ): TransportRequestCallback; - state, TContext = Context>( - params: RequestParams.ClusterState, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - stats, TContext = Context>( - params?: RequestParams.ClusterStats, - options?: TransportRequestOptions - ): TransportRequestPromise>; - stats, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - stats, TContext = Context>( - params: RequestParams.ClusterStats, - callback: callbackFn - ): TransportRequestCallback; - stats, TContext = Context>( - params: RequestParams.ClusterStats, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - }; - count< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.Count, - options?: TransportRequestOptions - ): TransportRequestPromise>; - count< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - count< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.Count, - callback: callbackFn - ): TransportRequestCallback; - count< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.Count, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - create< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.Create, - options?: TransportRequestOptions - ): TransportRequestPromise>; - create< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - create< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.Create, - callback: callbackFn - ): TransportRequestCallback; - create< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.Create, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - create_pit, TContext = Context>( - params?: RequestParams.CreatePit, - options?: TransportRequestOptions - ): TransportRequestPromise>; - create_pit, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - create_pit, TContext = Context>( - params: RequestParams.CreatePit, - callback: callbackFn - ): TransportRequestCallback; - create_pit, TContext = Context>( - params: RequestParams.CreatePit, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - createPit, TContext = Context>( - params?: RequestParams.CreatePit, - options?: TransportRequestOptions - ): TransportRequestPromise>; - createPit, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - createPit, TContext = Context>( - params: RequestParams.CreatePit, - callback: callbackFn - ): TransportRequestCallback; - createPit, TContext = Context>( - params: RequestParams.CreatePit, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - dangling_indices: { - delete_dangling_index, TContext = Context>( - params?: RequestParams.DanglingIndicesDeleteDanglingIndex, - options?: TransportRequestOptions - ): TransportRequestPromise>; - delete_dangling_index, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - delete_dangling_index, TContext = Context>( - params: RequestParams.DanglingIndicesDeleteDanglingIndex, - callback: callbackFn - ): TransportRequestCallback; - delete_dangling_index, TContext = Context>( - params: RequestParams.DanglingIndicesDeleteDanglingIndex, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deleteDanglingIndex, TContext = Context>( - params?: RequestParams.DanglingIndicesDeleteDanglingIndex, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteDanglingIndex, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - deleteDanglingIndex, TContext = Context>( - params: RequestParams.DanglingIndicesDeleteDanglingIndex, - callback: callbackFn - ): TransportRequestCallback; - deleteDanglingIndex, TContext = Context>( - params: RequestParams.DanglingIndicesDeleteDanglingIndex, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - import_dangling_index, TContext = Context>( - params?: RequestParams.DanglingIndicesImportDanglingIndex, - options?: TransportRequestOptions - ): TransportRequestPromise>; - import_dangling_index, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - import_dangling_index, TContext = Context>( - params: RequestParams.DanglingIndicesImportDanglingIndex, - callback: callbackFn - ): TransportRequestCallback; - import_dangling_index, TContext = Context>( - params: RequestParams.DanglingIndicesImportDanglingIndex, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - importDanglingIndex, TContext = Context>( - params?: RequestParams.DanglingIndicesImportDanglingIndex, - options?: TransportRequestOptions - ): TransportRequestPromise>; - importDanglingIndex, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - importDanglingIndex, TContext = Context>( - params: RequestParams.DanglingIndicesImportDanglingIndex, - callback: callbackFn - ): TransportRequestCallback; - importDanglingIndex, TContext = Context>( - params: RequestParams.DanglingIndicesImportDanglingIndex, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - list_dangling_indices, TContext = Context>( - params?: RequestParams.DanglingIndicesListDanglingIndices, - options?: TransportRequestOptions - ): TransportRequestPromise>; - list_dangling_indices, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - list_dangling_indices, TContext = Context>( - params: RequestParams.DanglingIndicesListDanglingIndices, - callback: callbackFn - ): TransportRequestCallback; - list_dangling_indices, TContext = Context>( - params: RequestParams.DanglingIndicesListDanglingIndices, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - listDanglingIndices, TContext = Context>( - params?: RequestParams.DanglingIndicesListDanglingIndices, - options?: TransportRequestOptions - ): TransportRequestPromise>; - listDanglingIndices, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - listDanglingIndices, TContext = Context>( - params: RequestParams.DanglingIndicesListDanglingIndices, - callback: callbackFn - ): TransportRequestCallback; - listDanglingIndices, TContext = Context>( - params: RequestParams.DanglingIndicesListDanglingIndices, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - }; - danglingIndices: { - delete_dangling_index, TContext = Context>( - params?: RequestParams.DanglingIndicesDeleteDanglingIndex, - options?: TransportRequestOptions - ): TransportRequestPromise>; - delete_dangling_index, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - delete_dangling_index, TContext = Context>( - params: RequestParams.DanglingIndicesDeleteDanglingIndex, - callback: callbackFn - ): TransportRequestCallback; - delete_dangling_index, TContext = Context>( - params: RequestParams.DanglingIndicesDeleteDanglingIndex, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deleteDanglingIndex, TContext = Context>( - params?: RequestParams.DanglingIndicesDeleteDanglingIndex, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteDanglingIndex, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - deleteDanglingIndex, TContext = Context>( - params: RequestParams.DanglingIndicesDeleteDanglingIndex, - callback: callbackFn - ): TransportRequestCallback; - deleteDanglingIndex, TContext = Context>( - params: RequestParams.DanglingIndicesDeleteDanglingIndex, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - import_dangling_index, TContext = Context>( - params?: RequestParams.DanglingIndicesImportDanglingIndex, - options?: TransportRequestOptions - ): TransportRequestPromise>; - import_dangling_index, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - import_dangling_index, TContext = Context>( - params: RequestParams.DanglingIndicesImportDanglingIndex, - callback: callbackFn - ): TransportRequestCallback; - import_dangling_index, TContext = Context>( - params: RequestParams.DanglingIndicesImportDanglingIndex, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - importDanglingIndex, TContext = Context>( - params?: RequestParams.DanglingIndicesImportDanglingIndex, - options?: TransportRequestOptions - ): TransportRequestPromise>; - importDanglingIndex, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - importDanglingIndex, TContext = Context>( - params: RequestParams.DanglingIndicesImportDanglingIndex, - callback: callbackFn - ): TransportRequestCallback; - importDanglingIndex, TContext = Context>( - params: RequestParams.DanglingIndicesImportDanglingIndex, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - list_dangling_indices, TContext = Context>( - params?: RequestParams.DanglingIndicesListDanglingIndices, - options?: TransportRequestOptions - ): TransportRequestPromise>; - list_dangling_indices, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - list_dangling_indices, TContext = Context>( - params: RequestParams.DanglingIndicesListDanglingIndices, - callback: callbackFn - ): TransportRequestCallback; - list_dangling_indices, TContext = Context>( - params: RequestParams.DanglingIndicesListDanglingIndices, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - listDanglingIndices, TContext = Context>( - params?: RequestParams.DanglingIndicesListDanglingIndices, - options?: TransportRequestOptions - ): TransportRequestPromise>; - listDanglingIndices, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - listDanglingIndices, TContext = Context>( - params: RequestParams.DanglingIndicesListDanglingIndices, - callback: callbackFn - ): TransportRequestCallback; - listDanglingIndices, TContext = Context>( - params: RequestParams.DanglingIndicesListDanglingIndices, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - }; - delete, TContext = Context>( - params?: RequestParams.Delete, - options?: TransportRequestOptions - ): TransportRequestPromise>; - delete, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - delete, TContext = Context>( - params: RequestParams.Delete, - callback: callbackFn - ): TransportRequestCallback; - delete, TContext = Context>( - params: RequestParams.Delete, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - delete_all_pits, TContext = Context>( - params?: RequestParams.DeleteAllPits, - options?: TransportRequestOptions - ): TransportRequestPromise>; - delete_all_pits, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - delete_all_pits, TContext = Context>( - params: RequestParams.DeleteAllPits, - callback: callbackFn - ): TransportRequestCallback; - delete_all_pits, TContext = Context>( - params: RequestParams.DeleteAllPits, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deleteAllPits, TContext = Context>( - params?: RequestParams.DeleteAllPits, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteAllPits, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - deleteAllPits, TContext = Context>( - params: RequestParams.DeleteAllPits, - callback: callbackFn - ): TransportRequestCallback; - deleteAllPits, TContext = Context>( - params: RequestParams.DeleteAllPits, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - delete_by_query< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.DeleteByQuery, - options?: TransportRequestOptions - ): TransportRequestPromise>; - delete_by_query< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - delete_by_query< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.DeleteByQuery, - callback: callbackFn - ): TransportRequestCallback; - delete_by_query< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.DeleteByQuery, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deleteByQuery< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.DeleteByQuery, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteByQuery< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - deleteByQuery< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.DeleteByQuery, - callback: callbackFn - ): TransportRequestCallback; - deleteByQuery< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.DeleteByQuery, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - delete_by_query_rethrottle, TContext = Context>( - params?: RequestParams.DeleteByQueryRethrottle, - options?: TransportRequestOptions - ): TransportRequestPromise>; - delete_by_query_rethrottle, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - delete_by_query_rethrottle, TContext = Context>( - params: RequestParams.DeleteByQueryRethrottle, - callback: callbackFn - ): TransportRequestCallback; - delete_by_query_rethrottle, TContext = Context>( - params: RequestParams.DeleteByQueryRethrottle, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deleteByQueryRethrottle, TContext = Context>( - params?: RequestParams.DeleteByQueryRethrottle, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteByQueryRethrottle, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - deleteByQueryRethrottle, TContext = Context>( - params: RequestParams.DeleteByQueryRethrottle, - callback: callbackFn - ): TransportRequestCallback; - deleteByQueryRethrottle, TContext = Context>( - params: RequestParams.DeleteByQueryRethrottle, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - delete_pit< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.DeletePit, - options?: TransportRequestOptions - ): TransportRequestPromise>; - delete_pit< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - delete_pit< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.DeletePit, - callback: callbackFn - ): TransportRequestCallback; - delete_pit< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.DeletePit, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deletePit< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.DeletePit, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deletePit< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - deletePit< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.DeletePit, - callback: callbackFn - ): TransportRequestCallback; - deletePit< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.DeletePit, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - delete_script, TContext = Context>( - params?: RequestParams.DeleteScript, - options?: TransportRequestOptions - ): TransportRequestPromise>; - delete_script, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - delete_script, TContext = Context>( - params: RequestParams.DeleteScript, - callback: callbackFn - ): TransportRequestCallback; - delete_script, TContext = Context>( - params: RequestParams.DeleteScript, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deleteScript, TContext = Context>( - params?: RequestParams.DeleteScript, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteScript, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - deleteScript, TContext = Context>( - params: RequestParams.DeleteScript, - callback: callbackFn - ): TransportRequestCallback; - deleteScript, TContext = Context>( - params: RequestParams.DeleteScript, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - exists( - params?: RequestParams.Exists, - options?: TransportRequestOptions - ): TransportRequestPromise>; - exists( - callback: callbackFn - ): TransportRequestCallback; - exists( - params: RequestParams.Exists, - callback: callbackFn - ): TransportRequestCallback; - exists( - params: RequestParams.Exists, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - exists_source( - params?: RequestParams.ExistsSource, - options?: TransportRequestOptions - ): TransportRequestPromise>; - exists_source( - callback: callbackFn - ): TransportRequestCallback; - exists_source( - params: RequestParams.ExistsSource, - callback: callbackFn - ): TransportRequestCallback; - exists_source( - params: RequestParams.ExistsSource, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - existsSource( - params?: RequestParams.ExistsSource, - options?: TransportRequestOptions - ): TransportRequestPromise>; - existsSource( - callback: callbackFn - ): TransportRequestCallback; - existsSource( - params: RequestParams.ExistsSource, - callback: callbackFn - ): TransportRequestCallback; - existsSource( - params: RequestParams.ExistsSource, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - explain< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.Explain, - options?: TransportRequestOptions - ): TransportRequestPromise>; - explain< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - explain< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.Explain, - callback: callbackFn - ): TransportRequestCallback; - explain< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.Explain, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - features: { - get_features, TContext = Context>( - params?: RequestParams.FeaturesGetFeatures, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get_features, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get_features, TContext = Context>( - params: RequestParams.FeaturesGetFeatures, - callback: callbackFn - ): TransportRequestCallback; - get_features, TContext = Context>( - params: RequestParams.FeaturesGetFeatures, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getFeatures, TContext = Context>( - params?: RequestParams.FeaturesGetFeatures, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getFeatures, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - getFeatures, TContext = Context>( - params: RequestParams.FeaturesGetFeatures, - callback: callbackFn - ): TransportRequestCallback; - getFeatures, TContext = Context>( - params: RequestParams.FeaturesGetFeatures, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - reset_features, TContext = Context>( - params?: RequestParams.FeaturesResetFeatures, - options?: TransportRequestOptions - ): TransportRequestPromise>; - reset_features, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - reset_features, TContext = Context>( - params: RequestParams.FeaturesResetFeatures, - callback: callbackFn - ): TransportRequestCallback; - reset_features, TContext = Context>( - params: RequestParams.FeaturesResetFeatures, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - resetFeatures, TContext = Context>( - params?: RequestParams.FeaturesResetFeatures, - options?: TransportRequestOptions - ): TransportRequestPromise>; - resetFeatures, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - resetFeatures, TContext = Context>( - params: RequestParams.FeaturesResetFeatures, - callback: callbackFn - ): TransportRequestCallback; - resetFeatures, TContext = Context>( - params: RequestParams.FeaturesResetFeatures, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - }; - field_caps< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.FieldCaps, - options?: TransportRequestOptions - ): TransportRequestPromise>; - field_caps< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - field_caps< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.FieldCaps, - callback: callbackFn - ): TransportRequestCallback; - field_caps< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.FieldCaps, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - fieldCaps< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.FieldCaps, - options?: TransportRequestOptions - ): TransportRequestPromise>; - fieldCaps< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - fieldCaps< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.FieldCaps, - callback: callbackFn - ): TransportRequestCallback; - fieldCaps< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.FieldCaps, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get, TContext = Context>( - params?: RequestParams.Get, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get, TContext = Context>( - params: RequestParams.Get, - callback: callbackFn - ): TransportRequestCallback; - get, TContext = Context>( - params: RequestParams.Get, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get_all_pits, TContext = Context>( - params?: RequestParams.GetAllPits, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get_all_pits, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get_all_pits, TContext = Context>( - params: RequestParams.GetAllPits, - callback: callbackFn - ): TransportRequestCallback; - get_all_pits, TContext = Context>( - params: RequestParams.GetAllPits, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getAllPits, TContext = Context>( - params?: RequestParams.GetAllPits, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getAllPits, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - getAllPits, TContext = Context>( - params: RequestParams.GetAllPits, - callback: callbackFn - ): TransportRequestCallback; - getAllPits, TContext = Context>( - params: RequestParams.GetAllPits, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get_script, TContext = Context>( - params?: RequestParams.GetScript, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get_script, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get_script, TContext = Context>( - params: RequestParams.GetScript, - callback: callbackFn - ): TransportRequestCallback; - get_script, TContext = Context>( - params: RequestParams.GetScript, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getScript, TContext = Context>( - params?: RequestParams.GetScript, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getScript, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - getScript, TContext = Context>( - params: RequestParams.GetScript, - callback: callbackFn - ): TransportRequestCallback; - getScript, TContext = Context>( - params: RequestParams.GetScript, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get_script_context, TContext = Context>( - params?: RequestParams.GetScriptContext, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get_script_context, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get_script_context, TContext = Context>( - params: RequestParams.GetScriptContext, - callback: callbackFn - ): TransportRequestCallback; - get_script_context, TContext = Context>( - params: RequestParams.GetScriptContext, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getScriptContext, TContext = Context>( - params?: RequestParams.GetScriptContext, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getScriptContext, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - getScriptContext, TContext = Context>( - params: RequestParams.GetScriptContext, - callback: callbackFn - ): TransportRequestCallback; - getScriptContext, TContext = Context>( - params: RequestParams.GetScriptContext, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get_script_languages, TContext = Context>( - params?: RequestParams.GetScriptLanguages, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get_script_languages, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get_script_languages, TContext = Context>( - params: RequestParams.GetScriptLanguages, - callback: callbackFn - ): TransportRequestCallback; - get_script_languages, TContext = Context>( - params: RequestParams.GetScriptLanguages, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getScriptLanguages, TContext = Context>( - params?: RequestParams.GetScriptLanguages, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getScriptLanguages, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - getScriptLanguages, TContext = Context>( - params: RequestParams.GetScriptLanguages, - callback: callbackFn - ): TransportRequestCallback; - getScriptLanguages, TContext = Context>( - params: RequestParams.GetScriptLanguages, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get_source, TContext = Context>( - params?: RequestParams.GetSource, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get_source, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get_source, TContext = Context>( - params: RequestParams.GetSource, - callback: callbackFn - ): TransportRequestCallback; - get_source, TContext = Context>( - params: RequestParams.GetSource, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getSource, TContext = Context>( - params?: RequestParams.GetSource, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getSource, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - getSource, TContext = Context>( - params: RequestParams.GetSource, - callback: callbackFn - ): TransportRequestCallback; - getSource, TContext = Context>( - params: RequestParams.GetSource, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - http: { - connect, TContext = Context>( - params: RequestParams.HttpParams, - options?: TransportRequestOptions, - callback?: callbackFn - ): TransportRequestPromise>; - delete, TContext = Context>( - params: RequestParams.HttpParams, - options?: TransportRequestOptions, - callback?: callbackFn - ): TransportRequestPromise>; - get, TContext = Context>( - params: RequestParams.HttpParams, - options?: TransportRequestOptions, - callback?: callbackFn - ): TransportRequestPromise>; - head, TContext = Context>( - params: RequestParams.HttpParams, - options?: TransportRequestOptions, - callback?: callbackFn - ): TransportRequestPromise>; - options, TContext = Context>( - params: RequestParams.HttpParams, - options?: TransportRequestOptions, - callback?: callbackFn - ): TransportRequestPromise>; - patch, TContext = Context>( - params: RequestParams.HttpParams, - options?: TransportRequestOptions, - callback?: callbackFn - ): TransportRequestPromise>; - post, TContext = Context>( - params: RequestParams.HttpParams, - options?: TransportRequestOptions, - callback?: callbackFn - ): TransportRequestPromise>; - put, TContext = Context>( - params: RequestParams.HttpParams, - options?: TransportRequestOptions, - callback?: callbackFn - ): TransportRequestPromise>; - trace, TContext = Context>( - params: RequestParams.HttpParams, - options?: TransportRequestOptions, - callback?: callbackFn - ): TransportRequestPromise>; - }; - index< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.Index, - options?: TransportRequestOptions - ): TransportRequestPromise>; - index< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - index< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.Index, - callback: callbackFn - ): TransportRequestCallback; - index< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.Index, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - indices: { - add_block, TContext = Context>( - params?: RequestParams.IndicesAddBlock, - options?: TransportRequestOptions - ): TransportRequestPromise>; - add_block, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - add_block, TContext = Context>( - params: RequestParams.IndicesAddBlock, - callback: callbackFn - ): TransportRequestCallback; - add_block, TContext = Context>( - params: RequestParams.IndicesAddBlock, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - addBlock, TContext = Context>( - params?: RequestParams.IndicesAddBlock, - options?: TransportRequestOptions - ): TransportRequestPromise>; - addBlock, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - addBlock, TContext = Context>( - params: RequestParams.IndicesAddBlock, - callback: callbackFn - ): TransportRequestCallback; - addBlock, TContext = Context>( - params: RequestParams.IndicesAddBlock, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - analyze< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesAnalyze, - options?: TransportRequestOptions - ): TransportRequestPromise>; - analyze< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - analyze< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesAnalyze, - callback: callbackFn - ): TransportRequestCallback; - analyze< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesAnalyze, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - clear_cache, TContext = Context>( - params?: RequestParams.IndicesClearCache, - options?: TransportRequestOptions - ): TransportRequestPromise>; - clear_cache, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - clear_cache, TContext = Context>( - params: RequestParams.IndicesClearCache, - callback: callbackFn - ): TransportRequestCallback; - clear_cache, TContext = Context>( - params: RequestParams.IndicesClearCache, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - clearCache, TContext = Context>( - params?: RequestParams.IndicesClearCache, - options?: TransportRequestOptions - ): TransportRequestPromise>; - clearCache, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - clearCache, TContext = Context>( - params: RequestParams.IndicesClearCache, - callback: callbackFn - ): TransportRequestCallback; - clearCache, TContext = Context>( - params: RequestParams.IndicesClearCache, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - clone< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesClone, - options?: TransportRequestOptions - ): TransportRequestPromise>; - clone< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - clone< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesClone, - callback: callbackFn - ): TransportRequestCallback; - clone< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesClone, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - close, TContext = Context>( - params?: RequestParams.IndicesClose, - options?: TransportRequestOptions - ): TransportRequestPromise>; - close, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - close, TContext = Context>( - params: RequestParams.IndicesClose, - callback: callbackFn - ): TransportRequestCallback; - close, TContext = Context>( - params: RequestParams.IndicesClose, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - create< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesCreate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - create< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - create< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesCreate, - callback: callbackFn - ): TransportRequestCallback; - create< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesCreate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - delete, TContext = Context>( - params?: RequestParams.IndicesDelete, - options?: TransportRequestOptions - ): TransportRequestPromise>; - delete, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - delete, TContext = Context>( - params: RequestParams.IndicesDelete, - callback: callbackFn - ): TransportRequestCallback; - delete, TContext = Context>( - params: RequestParams.IndicesDelete, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - delete_alias, TContext = Context>( - params?: RequestParams.IndicesDeleteAlias, - options?: TransportRequestOptions - ): TransportRequestPromise>; - delete_alias, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - delete_alias, TContext = Context>( - params: RequestParams.IndicesDeleteAlias, - callback: callbackFn - ): TransportRequestCallback; - delete_alias, TContext = Context>( - params: RequestParams.IndicesDeleteAlias, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deleteAlias, TContext = Context>( - params?: RequestParams.IndicesDeleteAlias, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteAlias, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - deleteAlias, TContext = Context>( - params: RequestParams.IndicesDeleteAlias, - callback: callbackFn - ): TransportRequestCallback; - deleteAlias, TContext = Context>( - params: RequestParams.IndicesDeleteAlias, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - delete_index_template, TContext = Context>( - params?: RequestParams.IndicesDeleteIndexTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - delete_index_template, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - delete_index_template, TContext = Context>( - params: RequestParams.IndicesDeleteIndexTemplate, - callback: callbackFn - ): TransportRequestCallback; - delete_index_template, TContext = Context>( - params: RequestParams.IndicesDeleteIndexTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deleteIndexTemplate, TContext = Context>( - params?: RequestParams.IndicesDeleteIndexTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteIndexTemplate, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - deleteIndexTemplate, TContext = Context>( - params: RequestParams.IndicesDeleteIndexTemplate, - callback: callbackFn - ): TransportRequestCallback; - deleteIndexTemplate, TContext = Context>( - params: RequestParams.IndicesDeleteIndexTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use delete_index_template instead */ - delete_template, TContext = Context>( - params?: RequestParams.IndicesDeleteTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - /** @deprecated use delete_index_template instead */ - delete_template, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use delete_index_template instead */ - delete_template, TContext = Context>( - params: RequestParams.IndicesDeleteTemplate, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use delete_index_template instead */ - delete_template, TContext = Context>( - params: RequestParams.IndicesDeleteTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use deleteIndexTemplate instead */ - deleteTemplate, TContext = Context>( - params?: RequestParams.IndicesDeleteTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - /** @deprecated use deleteIndexTemplate instead */ - deleteTemplate, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use deleteIndexTemplate instead */ - deleteTemplate, TContext = Context>( - params: RequestParams.IndicesDeleteTemplate, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use deleteIndexTemplate instead */ - deleteTemplate, TContext = Context>( - params: RequestParams.IndicesDeleteTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - disk_usage, TContext = Context>( - params?: RequestParams.IndicesDiskUsage, - options?: TransportRequestOptions - ): TransportRequestPromise>; - disk_usage, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - disk_usage, TContext = Context>( - params: RequestParams.IndicesDiskUsage, - callback: callbackFn - ): TransportRequestCallback; - disk_usage, TContext = Context>( - params: RequestParams.IndicesDiskUsage, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - diskUsage, TContext = Context>( - params?: RequestParams.IndicesDiskUsage, - options?: TransportRequestOptions - ): TransportRequestPromise>; - diskUsage, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - diskUsage, TContext = Context>( - params: RequestParams.IndicesDiskUsage, - callback: callbackFn - ): TransportRequestCallback; - diskUsage, TContext = Context>( - params: RequestParams.IndicesDiskUsage, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - exists( - params?: RequestParams.IndicesExists, - options?: TransportRequestOptions - ): TransportRequestPromise>; - exists( - callback: callbackFn - ): TransportRequestCallback; - exists( - params: RequestParams.IndicesExists, - callback: callbackFn - ): TransportRequestCallback; - exists( - params: RequestParams.IndicesExists, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - exists_alias( - params?: RequestParams.IndicesExistsAlias, - options?: TransportRequestOptions - ): TransportRequestPromise>; - exists_alias( - callback: callbackFn - ): TransportRequestCallback; - exists_alias( - params: RequestParams.IndicesExistsAlias, - callback: callbackFn - ): TransportRequestCallback; - exists_alias( - params: RequestParams.IndicesExistsAlias, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - existsAlias( - params?: RequestParams.IndicesExistsAlias, - options?: TransportRequestOptions - ): TransportRequestPromise>; - existsAlias( - callback: callbackFn - ): TransportRequestCallback; - existsAlias( - params: RequestParams.IndicesExistsAlias, - callback: callbackFn - ): TransportRequestCallback; - existsAlias( - params: RequestParams.IndicesExistsAlias, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - exists_index_template( - params?: RequestParams.IndicesExistsIndexTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - exists_index_template( - callback: callbackFn - ): TransportRequestCallback; - exists_index_template( - params: RequestParams.IndicesExistsIndexTemplate, - callback: callbackFn - ): TransportRequestCallback; - exists_index_template( - params: RequestParams.IndicesExistsIndexTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - existsIndexTemplate( - params?: RequestParams.IndicesExistsIndexTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - existsIndexTemplate( - callback: callbackFn - ): TransportRequestCallback; - existsIndexTemplate( - params: RequestParams.IndicesExistsIndexTemplate, - callback: callbackFn - ): TransportRequestCallback; - existsIndexTemplate( - params: RequestParams.IndicesExistsIndexTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use exists_index_template instead */ - exists_template( - params?: RequestParams.IndicesExistsTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - /** @deprecated use exists_index_template instead */ - exists_template( - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use exists_index_template instead */ - exists_template( - params: RequestParams.IndicesExistsTemplate, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use exists_index_template instead */ - exists_template( - params: RequestParams.IndicesExistsTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use existsIndexTemplate instead */ - existsTemplate( - params?: RequestParams.IndicesExistsTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - /** @deprecated use existsIndexTemplate instead */ - existsTemplate( - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use existsIndexTemplate instead */ - existsTemplate( - params: RequestParams.IndicesExistsTemplate, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use existsIndexTemplate instead */ - existsTemplate( - params: RequestParams.IndicesExistsTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - field_usage_stats, TContext = Context>( - params?: RequestParams.IndicesFieldUsageStats, - options?: TransportRequestOptions - ): TransportRequestPromise>; - field_usage_stats, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - field_usage_stats, TContext = Context>( - params: RequestParams.IndicesFieldUsageStats, - callback: callbackFn - ): TransportRequestCallback; - field_usage_stats, TContext = Context>( - params: RequestParams.IndicesFieldUsageStats, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - fieldUsageStats, TContext = Context>( - params?: RequestParams.IndicesFieldUsageStats, - options?: TransportRequestOptions - ): TransportRequestPromise>; - fieldUsageStats, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - fieldUsageStats, TContext = Context>( - params: RequestParams.IndicesFieldUsageStats, - callback: callbackFn - ): TransportRequestCallback; - fieldUsageStats, TContext = Context>( - params: RequestParams.IndicesFieldUsageStats, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - flush, TContext = Context>( - params?: RequestParams.IndicesFlush, - options?: TransportRequestOptions - ): TransportRequestPromise>; - flush, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - flush, TContext = Context>( - params: RequestParams.IndicesFlush, - callback: callbackFn - ): TransportRequestCallback; - flush, TContext = Context>( - params: RequestParams.IndicesFlush, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - forcemerge, TContext = Context>( - params?: RequestParams.IndicesForcemerge, - options?: TransportRequestOptions - ): TransportRequestPromise>; - forcemerge, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - forcemerge, TContext = Context>( - params: RequestParams.IndicesForcemerge, - callback: callbackFn - ): TransportRequestCallback; - forcemerge, TContext = Context>( - params: RequestParams.IndicesForcemerge, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get, TContext = Context>( - params?: RequestParams.IndicesGet, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get, TContext = Context>( - params: RequestParams.IndicesGet, - callback: callbackFn - ): TransportRequestCallback; - get, TContext = Context>( - params: RequestParams.IndicesGet, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get_alias, TContext = Context>( - params?: RequestParams.IndicesGetAlias, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get_alias, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get_alias, TContext = Context>( - params: RequestParams.IndicesGetAlias, - callback: callbackFn - ): TransportRequestCallback; - get_alias, TContext = Context>( - params: RequestParams.IndicesGetAlias, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getAlias, TContext = Context>( - params?: RequestParams.IndicesGetAlias, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getAlias, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - getAlias, TContext = Context>( - params: RequestParams.IndicesGetAlias, - callback: callbackFn - ): TransportRequestCallback; - getAlias, TContext = Context>( - params: RequestParams.IndicesGetAlias, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get_field_mapping, TContext = Context>( - params?: RequestParams.IndicesGetFieldMapping, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get_field_mapping, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get_field_mapping, TContext = Context>( - params: RequestParams.IndicesGetFieldMapping, - callback: callbackFn - ): TransportRequestCallback; - get_field_mapping, TContext = Context>( - params: RequestParams.IndicesGetFieldMapping, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getFieldMapping, TContext = Context>( - params?: RequestParams.IndicesGetFieldMapping, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getFieldMapping, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - getFieldMapping, TContext = Context>( - params: RequestParams.IndicesGetFieldMapping, - callback: callbackFn - ): TransportRequestCallback; - getFieldMapping, TContext = Context>( - params: RequestParams.IndicesGetFieldMapping, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get_index_template, TContext = Context>( - params?: RequestParams.IndicesGetIndexTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get_index_template, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get_index_template, TContext = Context>( - params: RequestParams.IndicesGetIndexTemplate, - callback: callbackFn - ): TransportRequestCallback; - get_index_template, TContext = Context>( - params: RequestParams.IndicesGetIndexTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getIndexTemplate, TContext = Context>( - params?: RequestParams.IndicesGetIndexTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getIndexTemplate, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - getIndexTemplate, TContext = Context>( - params: RequestParams.IndicesGetIndexTemplate, - callback: callbackFn - ): TransportRequestCallback; - getIndexTemplate, TContext = Context>( - params: RequestParams.IndicesGetIndexTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get_mapping, TContext = Context>( - params?: RequestParams.IndicesGetMapping, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get_mapping, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get_mapping, TContext = Context>( - params: RequestParams.IndicesGetMapping, - callback: callbackFn - ): TransportRequestCallback; - get_mapping, TContext = Context>( - params: RequestParams.IndicesGetMapping, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getMapping, TContext = Context>( - params?: RequestParams.IndicesGetMapping, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getMapping, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - getMapping, TContext = Context>( - params: RequestParams.IndicesGetMapping, - callback: callbackFn - ): TransportRequestCallback; - getMapping, TContext = Context>( - params: RequestParams.IndicesGetMapping, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get_settings, TContext = Context>( - params?: RequestParams.IndicesGetSettings, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get_settings, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get_settings, TContext = Context>( - params: RequestParams.IndicesGetSettings, - callback: callbackFn - ): TransportRequestCallback; - get_settings, TContext = Context>( - params: RequestParams.IndicesGetSettings, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getSettings, TContext = Context>( - params?: RequestParams.IndicesGetSettings, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getSettings, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - getSettings, TContext = Context>( - params: RequestParams.IndicesGetSettings, - callback: callbackFn - ): TransportRequestCallback; - getSettings, TContext = Context>( - params: RequestParams.IndicesGetSettings, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use get_index_template instead */ - get_template, TContext = Context>( - params?: RequestParams.IndicesGetTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - /** @deprecated use get_index_template instead */ - get_template, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use get_index_template instead */ - get_template, TContext = Context>( - params: RequestParams.IndicesGetTemplate, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use get_index_template instead */ - get_template, TContext = Context>( - params: RequestParams.IndicesGetTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use getIndexTemplate instead */ - getTemplate, TContext = Context>( - params?: RequestParams.IndicesGetTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - /** @deprecated use getIndexTemplate instead */ - getTemplate, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use getIndexTemplate instead */ - getTemplate, TContext = Context>( - params: RequestParams.IndicesGetTemplate, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use getIndexTemplate instead */ - getTemplate, TContext = Context>( - params: RequestParams.IndicesGetTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get_upgrade, TContext = Context>( - params?: RequestParams.IndicesGetUpgrade, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get_upgrade, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get_upgrade, TContext = Context>( - params: RequestParams.IndicesGetUpgrade, - callback: callbackFn - ): TransportRequestCallback; - get_upgrade, TContext = Context>( - params: RequestParams.IndicesGetUpgrade, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getUpgrade, TContext = Context>( - params?: RequestParams.IndicesGetUpgrade, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getUpgrade, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - getUpgrade, TContext = Context>( - params: RequestParams.IndicesGetUpgrade, - callback: callbackFn - ): TransportRequestCallback; - getUpgrade, TContext = Context>( - params: RequestParams.IndicesGetUpgrade, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - open, TContext = Context>( - params?: RequestParams.IndicesOpen, - options?: TransportRequestOptions - ): TransportRequestPromise>; - open, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - open, TContext = Context>( - params: RequestParams.IndicesOpen, - callback: callbackFn - ): TransportRequestCallback; - open, TContext = Context>( - params: RequestParams.IndicesOpen, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - put_alias< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesPutAlias, - options?: TransportRequestOptions - ): TransportRequestPromise>; - put_alias< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - put_alias< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesPutAlias, - callback: callbackFn - ): TransportRequestCallback; - put_alias< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesPutAlias, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - putAlias< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesPutAlias, - options?: TransportRequestOptions - ): TransportRequestPromise>; - putAlias< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - putAlias< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesPutAlias, - callback: callbackFn - ): TransportRequestCallback; - putAlias< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesPutAlias, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - put_index_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesPutIndexTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - put_index_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - put_index_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesPutIndexTemplate, - callback: callbackFn - ): TransportRequestCallback; - put_index_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesPutIndexTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - putIndexTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesPutIndexTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - putIndexTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - putIndexTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesPutIndexTemplate, - callback: callbackFn - ): TransportRequestCallback; - putIndexTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesPutIndexTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - put_mapping< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesPutMapping, - options?: TransportRequestOptions - ): TransportRequestPromise>; - put_mapping< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - put_mapping< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesPutMapping, - callback: callbackFn - ): TransportRequestCallback; - put_mapping< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesPutMapping, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - putMapping< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesPutMapping, - options?: TransportRequestOptions - ): TransportRequestPromise>; - putMapping< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - putMapping< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesPutMapping, - callback: callbackFn - ): TransportRequestCallback; - putMapping< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesPutMapping, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - put_settings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesPutSettings, - options?: TransportRequestOptions - ): TransportRequestPromise>; - put_settings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - put_settings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesPutSettings, - callback: callbackFn - ): TransportRequestCallback; - put_settings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesPutSettings, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - putSettings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesPutSettings, - options?: TransportRequestOptions - ): TransportRequestPromise>; - putSettings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - putSettings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesPutSettings, - callback: callbackFn - ): TransportRequestCallback; - putSettings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesPutSettings, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use put_index_template instead */ - put_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesPutTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - /** @deprecated use put_index_template instead */ - put_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use put_index_template instead */ - put_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesPutTemplate, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use put_index_template instead */ - put_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesPutTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use putIndexTemplate instead */ - putTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesPutTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - /** @deprecated use putIndexTemplate instead */ - putTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use putIndexTemplate instead */ - putTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesPutTemplate, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use putIndexTemplate instead */ - putTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesPutTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - recovery, TContext = Context>( - params?: RequestParams.IndicesRecovery, - options?: TransportRequestOptions - ): TransportRequestPromise>; - recovery, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - recovery, TContext = Context>( - params: RequestParams.IndicesRecovery, - callback: callbackFn - ): TransportRequestCallback; - recovery, TContext = Context>( - params: RequestParams.IndicesRecovery, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - refresh, TContext = Context>( - params?: RequestParams.IndicesRefresh, - options?: TransportRequestOptions - ): TransportRequestPromise>; - refresh, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - refresh, TContext = Context>( - params: RequestParams.IndicesRefresh, - callback: callbackFn - ): TransportRequestCallback; - refresh, TContext = Context>( - params: RequestParams.IndicesRefresh, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - resolve_index, TContext = Context>( - params?: RequestParams.IndicesResolveIndex, - options?: TransportRequestOptions - ): TransportRequestPromise>; - resolve_index, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - resolve_index, TContext = Context>( - params: RequestParams.IndicesResolveIndex, - callback: callbackFn - ): TransportRequestCallback; - resolve_index, TContext = Context>( - params: RequestParams.IndicesResolveIndex, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - resolveIndex, TContext = Context>( - params?: RequestParams.IndicesResolveIndex, - options?: TransportRequestOptions - ): TransportRequestPromise>; - resolveIndex, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - resolveIndex, TContext = Context>( - params: RequestParams.IndicesResolveIndex, - callback: callbackFn - ): TransportRequestCallback; - resolveIndex, TContext = Context>( - params: RequestParams.IndicesResolveIndex, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - rollover< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesRollover, - options?: TransportRequestOptions - ): TransportRequestPromise>; - rollover< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - rollover< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesRollover, - callback: callbackFn - ): TransportRequestCallback; - rollover< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesRollover, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - segments, TContext = Context>( - params?: RequestParams.IndicesSegments, - options?: TransportRequestOptions - ): TransportRequestPromise>; - segments, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - segments, TContext = Context>( - params: RequestParams.IndicesSegments, - callback: callbackFn - ): TransportRequestCallback; - segments, TContext = Context>( - params: RequestParams.IndicesSegments, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - shard_stores, TContext = Context>( - params?: RequestParams.IndicesShardStores, - options?: TransportRequestOptions - ): TransportRequestPromise>; - shard_stores, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - shard_stores, TContext = Context>( - params: RequestParams.IndicesShardStores, - callback: callbackFn - ): TransportRequestCallback; - shard_stores, TContext = Context>( - params: RequestParams.IndicesShardStores, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - shardStores, TContext = Context>( - params?: RequestParams.IndicesShardStores, - options?: TransportRequestOptions - ): TransportRequestPromise>; - shardStores, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - shardStores, TContext = Context>( - params: RequestParams.IndicesShardStores, - callback: callbackFn - ): TransportRequestCallback; - shardStores, TContext = Context>( - params: RequestParams.IndicesShardStores, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - shrink< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesShrink, - options?: TransportRequestOptions - ): TransportRequestPromise>; - shrink< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - shrink< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesShrink, - callback: callbackFn - ): TransportRequestCallback; - shrink< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesShrink, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - simulate_index_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesSimulateIndexTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - simulate_index_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - simulate_index_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesSimulateIndexTemplate, - callback: callbackFn - ): TransportRequestCallback; - simulate_index_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesSimulateIndexTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - simulateIndexTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesSimulateIndexTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - simulateIndexTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - simulateIndexTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesSimulateIndexTemplate, - callback: callbackFn - ): TransportRequestCallback; - simulateIndexTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesSimulateIndexTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use simulate_index_template instead */ - simulate_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesSimulateTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - /** @deprecated use simulate_index_template instead */ - simulate_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use simulate_index_template instead */ - simulate_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesSimulateTemplate, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use simulate_index_template instead */ - simulate_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesSimulateTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use simulateIndexTemplate instead */ - simulateTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesSimulateTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - /** @deprecated use simulateIndexTemplate instead */ - simulateTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use simulateIndexTemplate instead */ - simulateTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesSimulateTemplate, - callback: callbackFn - ): TransportRequestCallback; - /** @deprecated use simulateIndexTemplate instead */ - simulateTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesSimulateTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - split< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesSplit, - options?: TransportRequestOptions - ): TransportRequestPromise>; - split< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - split< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesSplit, - callback: callbackFn - ): TransportRequestCallback; - split< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesSplit, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - stats, TContext = Context>( - params?: RequestParams.IndicesStats, - options?: TransportRequestOptions - ): TransportRequestPromise>; - stats, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - stats, TContext = Context>( - params: RequestParams.IndicesStats, - callback: callbackFn - ): TransportRequestCallback; - stats, TContext = Context>( - params: RequestParams.IndicesStats, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - update_aliases< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesUpdateAliases, - options?: TransportRequestOptions - ): TransportRequestPromise>; - update_aliases< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - update_aliases< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesUpdateAliases, - callback: callbackFn - ): TransportRequestCallback; - update_aliases< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesUpdateAliases, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - updateAliases< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesUpdateAliases, - options?: TransportRequestOptions - ): TransportRequestPromise>; - updateAliases< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - updateAliases< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesUpdateAliases, - callback: callbackFn - ): TransportRequestCallback; - updateAliases< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesUpdateAliases, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - upgrade, TContext = Context>( - params?: RequestParams.IndicesUpgrade, - options?: TransportRequestOptions - ): TransportRequestPromise>; - upgrade, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - upgrade, TContext = Context>( - params: RequestParams.IndicesUpgrade, - callback: callbackFn - ): TransportRequestCallback; - upgrade, TContext = Context>( - params: RequestParams.IndicesUpgrade, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - validate_query< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesValidateQuery, - options?: TransportRequestOptions - ): TransportRequestPromise>; - validate_query< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - validate_query< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesValidateQuery, - callback: callbackFn - ): TransportRequestCallback; - validate_query< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesValidateQuery, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - validateQuery< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IndicesValidateQuery, - options?: TransportRequestOptions - ): TransportRequestPromise>; - validateQuery< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - validateQuery< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesValidateQuery, - callback: callbackFn - ): TransportRequestCallback; - validateQuery< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IndicesValidateQuery, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - }; - info, TContext = Context>( - params?: RequestParams.Info, - options?: TransportRequestOptions - ): TransportRequestPromise>; - info, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - info, TContext = Context>( - params: RequestParams.Info, - callback: callbackFn - ): TransportRequestCallback; - info, TContext = Context>( - params: RequestParams.Info, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - ingest: { - delete_pipeline, TContext = Context>( - params?: RequestParams.IngestDeletePipeline, - options?: TransportRequestOptions - ): TransportRequestPromise>; - delete_pipeline, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - delete_pipeline, TContext = Context>( - params: RequestParams.IngestDeletePipeline, - callback: callbackFn - ): TransportRequestCallback; - delete_pipeline, TContext = Context>( - params: RequestParams.IngestDeletePipeline, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deletePipeline, TContext = Context>( - params?: RequestParams.IngestDeletePipeline, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deletePipeline, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - deletePipeline, TContext = Context>( - params: RequestParams.IngestDeletePipeline, - callback: callbackFn - ): TransportRequestCallback; - deletePipeline, TContext = Context>( - params: RequestParams.IngestDeletePipeline, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - geo_ip_stats, TContext = Context>( - params?: RequestParams.IngestGeoIpStats, - options?: TransportRequestOptions - ): TransportRequestPromise>; - geo_ip_stats, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - geo_ip_stats, TContext = Context>( - params: RequestParams.IngestGeoIpStats, - callback: callbackFn - ): TransportRequestCallback; - geo_ip_stats, TContext = Context>( - params: RequestParams.IngestGeoIpStats, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - geoIpStats, TContext = Context>( - params?: RequestParams.IngestGeoIpStats, - options?: TransportRequestOptions - ): TransportRequestPromise>; - geoIpStats, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - geoIpStats, TContext = Context>( - params: RequestParams.IngestGeoIpStats, - callback: callbackFn - ): TransportRequestCallback; - geoIpStats, TContext = Context>( - params: RequestParams.IngestGeoIpStats, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get_pipeline, TContext = Context>( - params?: RequestParams.IngestGetPipeline, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get_pipeline, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get_pipeline, TContext = Context>( - params: RequestParams.IngestGetPipeline, - callback: callbackFn - ): TransportRequestCallback; - get_pipeline, TContext = Context>( - params: RequestParams.IngestGetPipeline, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getPipeline, TContext = Context>( - params?: RequestParams.IngestGetPipeline, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getPipeline, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - getPipeline, TContext = Context>( - params: RequestParams.IngestGetPipeline, - callback: callbackFn - ): TransportRequestCallback; - getPipeline, TContext = Context>( - params: RequestParams.IngestGetPipeline, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - processor_grok, TContext = Context>( - params?: RequestParams.IngestProcessorGrok, - options?: TransportRequestOptions - ): TransportRequestPromise>; - processor_grok, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - processor_grok, TContext = Context>( - params: RequestParams.IngestProcessorGrok, - callback: callbackFn - ): TransportRequestCallback; - processor_grok, TContext = Context>( - params: RequestParams.IngestProcessorGrok, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - processorGrok, TContext = Context>( - params?: RequestParams.IngestProcessorGrok, - options?: TransportRequestOptions - ): TransportRequestPromise>; - processorGrok, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - processorGrok, TContext = Context>( - params: RequestParams.IngestProcessorGrok, - callback: callbackFn - ): TransportRequestCallback; - processorGrok, TContext = Context>( - params: RequestParams.IngestProcessorGrok, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - put_pipeline< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IngestPutPipeline, - options?: TransportRequestOptions - ): TransportRequestPromise>; - put_pipeline< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - put_pipeline< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IngestPutPipeline, - callback: callbackFn - ): TransportRequestCallback; - put_pipeline< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IngestPutPipeline, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - putPipeline< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IngestPutPipeline, - options?: TransportRequestOptions - ): TransportRequestPromise>; - putPipeline< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - putPipeline< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IngestPutPipeline, - callback: callbackFn - ): TransportRequestCallback; - putPipeline< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IngestPutPipeline, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - simulate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.IngestSimulate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - simulate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - simulate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IngestSimulate, - callback: callbackFn - ): TransportRequestCallback; - simulate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.IngestSimulate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - }; - mget< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.Mget, - options?: TransportRequestOptions - ): TransportRequestPromise>; - mget< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - mget< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.Mget, - callback: callbackFn - ): TransportRequestCallback; - mget< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.Mget, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - msearch< - TResponse = Record, - TRequestBody extends RequestNDBody = Record[], - TContext = Context - >( - params?: RequestParams.Msearch, - options?: TransportRequestOptions - ): TransportRequestPromise>; - msearch< - TResponse = Record, - TRequestBody extends RequestNDBody = Record[], - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - msearch< - TResponse = Record, - TRequestBody extends RequestNDBody = Record[], - TContext = Context - >( - params: RequestParams.Msearch, - callback: callbackFn - ): TransportRequestCallback; - msearch< - TResponse = Record, - TRequestBody extends RequestNDBody = Record[], - TContext = Context - >( - params: RequestParams.Msearch, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - msearch_template< - TResponse = Record, - TRequestBody extends RequestNDBody = Record[], - TContext = Context - >( - params?: RequestParams.MsearchTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - msearch_template< - TResponse = Record, - TRequestBody extends RequestNDBody = Record[], - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - msearch_template< - TResponse = Record, - TRequestBody extends RequestNDBody = Record[], - TContext = Context - >( - params: RequestParams.MsearchTemplate, - callback: callbackFn - ): TransportRequestCallback; - msearch_template< - TResponse = Record, - TRequestBody extends RequestNDBody = Record[], - TContext = Context - >( - params: RequestParams.MsearchTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - msearchTemplate< - TResponse = Record, - TRequestBody extends RequestNDBody = Record[], - TContext = Context - >( - params?: RequestParams.MsearchTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - msearchTemplate< - TResponse = Record, - TRequestBody extends RequestNDBody = Record[], - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - msearchTemplate< - TResponse = Record, - TRequestBody extends RequestNDBody = Record[], - TContext = Context - >( - params: RequestParams.MsearchTemplate, - callback: callbackFn - ): TransportRequestCallback; - msearchTemplate< - TResponse = Record, - TRequestBody extends RequestNDBody = Record[], - TContext = Context - >( - params: RequestParams.MsearchTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - mtermvectors< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.Mtermvectors, - options?: TransportRequestOptions - ): TransportRequestPromise>; - mtermvectors< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - mtermvectors< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.Mtermvectors, - callback: callbackFn - ): TransportRequestCallback; - mtermvectors< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.Mtermvectors, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - nodes: { - clear_metering_archive, TContext = Context>( - params?: RequestParams.NodesClearMeteringArchive, - options?: TransportRequestOptions - ): TransportRequestPromise>; - clear_metering_archive, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - clear_metering_archive, TContext = Context>( - params: RequestParams.NodesClearMeteringArchive, - callback: callbackFn - ): TransportRequestCallback; - clear_metering_archive, TContext = Context>( - params: RequestParams.NodesClearMeteringArchive, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - clearMeteringArchive, TContext = Context>( - params?: RequestParams.NodesClearMeteringArchive, - options?: TransportRequestOptions - ): TransportRequestPromise>; - clearMeteringArchive, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - clearMeteringArchive, TContext = Context>( - params: RequestParams.NodesClearMeteringArchive, - callback: callbackFn - ): TransportRequestCallback; - clearMeteringArchive, TContext = Context>( - params: RequestParams.NodesClearMeteringArchive, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get_metering_info, TContext = Context>( - params?: RequestParams.NodesGetMeteringInfo, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get_metering_info, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get_metering_info, TContext = Context>( - params: RequestParams.NodesGetMeteringInfo, - callback: callbackFn - ): TransportRequestCallback; - get_metering_info, TContext = Context>( - params: RequestParams.NodesGetMeteringInfo, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getMeteringInfo, TContext = Context>( - params?: RequestParams.NodesGetMeteringInfo, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getMeteringInfo, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - getMeteringInfo, TContext = Context>( - params: RequestParams.NodesGetMeteringInfo, - callback: callbackFn - ): TransportRequestCallback; - getMeteringInfo, TContext = Context>( - params: RequestParams.NodesGetMeteringInfo, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - hot_threads, TContext = Context>( - params?: RequestParams.NodesHotThreads, - options?: TransportRequestOptions - ): TransportRequestPromise>; - hot_threads, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - hot_threads, TContext = Context>( - params: RequestParams.NodesHotThreads, - callback: callbackFn - ): TransportRequestCallback; - hot_threads, TContext = Context>( - params: RequestParams.NodesHotThreads, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - hotThreads, TContext = Context>( - params?: RequestParams.NodesHotThreads, - options?: TransportRequestOptions - ): TransportRequestPromise>; - hotThreads, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - hotThreads, TContext = Context>( - params: RequestParams.NodesHotThreads, - callback: callbackFn - ): TransportRequestCallback; - hotThreads, TContext = Context>( - params: RequestParams.NodesHotThreads, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - info, TContext = Context>( - params?: RequestParams.NodesInfo, - options?: TransportRequestOptions - ): TransportRequestPromise>; - info, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - info, TContext = Context>( - params: RequestParams.NodesInfo, - callback: callbackFn - ): TransportRequestCallback; - info, TContext = Context>( - params: RequestParams.NodesInfo, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - reload_secure_settings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.NodesReloadSecureSettings, - options?: TransportRequestOptions - ): TransportRequestPromise>; - reload_secure_settings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - reload_secure_settings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.NodesReloadSecureSettings, - callback: callbackFn - ): TransportRequestCallback; - reload_secure_settings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.NodesReloadSecureSettings, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - reloadSecureSettings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.NodesReloadSecureSettings, - options?: TransportRequestOptions - ): TransportRequestPromise>; - reloadSecureSettings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - reloadSecureSettings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.NodesReloadSecureSettings, - callback: callbackFn - ): TransportRequestCallback; - reloadSecureSettings< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.NodesReloadSecureSettings, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - stats, TContext = Context>( - params?: RequestParams.NodesStats, - options?: TransportRequestOptions - ): TransportRequestPromise>; - stats, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - stats, TContext = Context>( - params: RequestParams.NodesStats, - callback: callbackFn - ): TransportRequestCallback; - stats, TContext = Context>( - params: RequestParams.NodesStats, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - usage, TContext = Context>( - params?: RequestParams.NodesUsage, - options?: TransportRequestOptions - ): TransportRequestPromise>; - usage, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - usage, TContext = Context>( - params: RequestParams.NodesUsage, - callback: callbackFn - ): TransportRequestCallback; - usage, TContext = Context>( - params: RequestParams.NodesUsage, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - }; - ping( - params?: RequestParams.Ping, - options?: TransportRequestOptions - ): TransportRequestPromise>; - ping( - callback: callbackFn - ): TransportRequestCallback; - ping( - params: RequestParams.Ping, - callback: callbackFn - ): TransportRequestCallback; - ping( - params: RequestParams.Ping, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - put_script< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.PutScript, - options?: TransportRequestOptions - ): TransportRequestPromise>; - put_script< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - put_script< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.PutScript, - callback: callbackFn - ): TransportRequestCallback; - put_script< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.PutScript, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - putScript< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.PutScript, - options?: TransportRequestOptions - ): TransportRequestPromise>; - putScript< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - putScript< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.PutScript, - callback: callbackFn - ): TransportRequestCallback; - putScript< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.PutScript, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - rank_eval< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.RankEval, - options?: TransportRequestOptions - ): TransportRequestPromise>; - rank_eval< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - rank_eval< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.RankEval, - callback: callbackFn - ): TransportRequestCallback; - rank_eval< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.RankEval, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - rankEval< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.RankEval, - options?: TransportRequestOptions - ): TransportRequestPromise>; - rankEval< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - rankEval< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.RankEval, - callback: callbackFn - ): TransportRequestCallback; - rankEval< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.RankEval, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - reindex< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.Reindex, - options?: TransportRequestOptions - ): TransportRequestPromise>; - reindex< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - reindex< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.Reindex, - callback: callbackFn - ): TransportRequestCallback; - reindex< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.Reindex, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - reindex_rethrottle, TContext = Context>( - params?: RequestParams.ReindexRethrottle, - options?: TransportRequestOptions - ): TransportRequestPromise>; - reindex_rethrottle, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - reindex_rethrottle, TContext = Context>( - params: RequestParams.ReindexRethrottle, - callback: callbackFn - ): TransportRequestCallback; - reindex_rethrottle, TContext = Context>( - params: RequestParams.ReindexRethrottle, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - reindexRethrottle, TContext = Context>( - params?: RequestParams.ReindexRethrottle, - options?: TransportRequestOptions - ): TransportRequestPromise>; - reindexRethrottle, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - reindexRethrottle, TContext = Context>( - params: RequestParams.ReindexRethrottle, - callback: callbackFn - ): TransportRequestCallback; - reindexRethrottle, TContext = Context>( - params: RequestParams.ReindexRethrottle, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - render_search_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.RenderSearchTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - render_search_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - render_search_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.RenderSearchTemplate, - callback: callbackFn - ): TransportRequestCallback; - render_search_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.RenderSearchTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - renderSearchTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.RenderSearchTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - renderSearchTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - renderSearchTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.RenderSearchTemplate, - callback: callbackFn - ): TransportRequestCallback; - renderSearchTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.RenderSearchTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - rollups: { - delete, TContext = Context>( - params?: Record, - options?: TransportRequestOptions - ): TransportRequestPromise>; - delete, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - delete, TContext = Context>( - params: Record, - callback: callbackFn - ): TransportRequestCallback; - delete, TContext = Context>( - params: Record, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get, TContext = Context>( - params?: Record, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get, TContext = Context>( - params: Record, - callback: callbackFn - ): TransportRequestCallback; - get, TContext = Context>( - params: Record, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - put, TContext = Context>( - params?: Record, - options?: TransportRequestOptions - ): TransportRequestPromise>; - put, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - put, TContext = Context>( - params: Record, - callback: callbackFn - ): TransportRequestCallback; - put, TContext = Context>( - params: Record, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - explain, TContext = Context>( - params?: Record, - options?: TransportRequestOptions - ): TransportRequestPromise>; - explain, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - explain, TContext = Context>( - params: Record, - callback: callbackFn - ): TransportRequestCallback; - explain, TContext = Context>( - params: Record, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - start, TContext = Context>( - params?: Record, - options?: TransportRequestOptions - ): TransportRequestPromise>; - start, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - start, TContext = Context>( - params: Record, - callback: callbackFn - ): TransportRequestCallback; - start, TContext = Context>( - params: Record, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - stop, TContext = Context>( - params?: Record, - options?: TransportRequestOptions - ): TransportRequestPromise>; - stop, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - stop, TContext = Context>( - params: Record, - callback: callbackFn - ): TransportRequestCallback; - stop, TContext = Context>( - params: Record, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - }; - scripts_painless_execute< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.ScriptsPainlessExecute, - options?: TransportRequestOptions - ): TransportRequestPromise>; - scripts_painless_execute< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - scripts_painless_execute< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ScriptsPainlessExecute, - callback: callbackFn - ): TransportRequestCallback; - scripts_painless_execute< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ScriptsPainlessExecute, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - scriptsPainlessExecute< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.ScriptsPainlessExecute, - options?: TransportRequestOptions - ): TransportRequestPromise>; - scriptsPainlessExecute< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - scriptsPainlessExecute< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ScriptsPainlessExecute, - callback: callbackFn - ): TransportRequestCallback; - scriptsPainlessExecute< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ScriptsPainlessExecute, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - scroll< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.Scroll, - options?: TransportRequestOptions - ): TransportRequestPromise>; - scroll< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - scroll< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.Scroll, - callback: callbackFn - ): TransportRequestCallback; - scroll< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.Scroll, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - search< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.Search, - options?: TransportRequestOptions - ): TransportRequestPromise>; - search< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - search< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.Search, - callback: callbackFn - ): TransportRequestCallback; - search< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.Search, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - search_shards, TContext = Context>( - params?: RequestParams.SearchShards, - options?: TransportRequestOptions - ): TransportRequestPromise>; - search_shards, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - search_shards, TContext = Context>( - params: RequestParams.SearchShards, - callback: callbackFn - ): TransportRequestCallback; - search_shards, TContext = Context>( - params: RequestParams.SearchShards, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - searchShards, TContext = Context>( - params?: RequestParams.SearchShards, - options?: TransportRequestOptions - ): TransportRequestPromise>; - searchShards, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - searchShards, TContext = Context>( - params: RequestParams.SearchShards, - callback: callbackFn - ): TransportRequestCallback; - searchShards, TContext = Context>( - params: RequestParams.SearchShards, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - search_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.SearchTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - search_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - search_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.SearchTemplate, - callback: callbackFn - ): TransportRequestCallback; - search_template< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.SearchTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - searchTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.SearchTemplate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - searchTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - searchTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.SearchTemplate, - callback: callbackFn - ): TransportRequestCallback; - searchTemplate< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.SearchTemplate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - shutdown: { - delete_node, TContext = Context>( - params?: RequestParams.ShutdownDeleteNode, - options?: TransportRequestOptions - ): TransportRequestPromise>; - delete_node, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - delete_node, TContext = Context>( - params: RequestParams.ShutdownDeleteNode, - callback: callbackFn - ): TransportRequestCallback; - delete_node, TContext = Context>( - params: RequestParams.ShutdownDeleteNode, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deleteNode, TContext = Context>( - params?: RequestParams.ShutdownDeleteNode, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteNode, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - deleteNode, TContext = Context>( - params: RequestParams.ShutdownDeleteNode, - callback: callbackFn - ): TransportRequestCallback; - deleteNode, TContext = Context>( - params: RequestParams.ShutdownDeleteNode, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get_node, TContext = Context>( - params?: RequestParams.ShutdownGetNode, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get_node, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get_node, TContext = Context>( - params: RequestParams.ShutdownGetNode, - callback: callbackFn - ): TransportRequestCallback; - get_node, TContext = Context>( - params: RequestParams.ShutdownGetNode, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getNode, TContext = Context>( - params?: RequestParams.ShutdownGetNode, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getNode, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - getNode, TContext = Context>( - params: RequestParams.ShutdownGetNode, - callback: callbackFn - ): TransportRequestCallback; - getNode, TContext = Context>( - params: RequestParams.ShutdownGetNode, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - put_node< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.ShutdownPutNode, - options?: TransportRequestOptions - ): TransportRequestPromise>; - put_node< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - put_node< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ShutdownPutNode, - callback: callbackFn - ): TransportRequestCallback; - put_node< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ShutdownPutNode, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - putNode< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.ShutdownPutNode, - options?: TransportRequestOptions - ): TransportRequestPromise>; - putNode< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - putNode< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ShutdownPutNode, - callback: callbackFn - ): TransportRequestCallback; - putNode< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.ShutdownPutNode, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - }; - snapshot: { - cleanup_repository, TContext = Context>( - params?: RequestParams.SnapshotCleanupRepository, - options?: TransportRequestOptions - ): TransportRequestPromise>; - cleanup_repository, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - cleanup_repository, TContext = Context>( - params: RequestParams.SnapshotCleanupRepository, - callback: callbackFn - ): TransportRequestCallback; - cleanup_repository, TContext = Context>( - params: RequestParams.SnapshotCleanupRepository, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - cleanupRepository, TContext = Context>( - params?: RequestParams.SnapshotCleanupRepository, - options?: TransportRequestOptions - ): TransportRequestPromise>; - cleanupRepository, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - cleanupRepository, TContext = Context>( - params: RequestParams.SnapshotCleanupRepository, - callback: callbackFn - ): TransportRequestCallback; - cleanupRepository, TContext = Context>( - params: RequestParams.SnapshotCleanupRepository, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - clone< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.SnapshotClone, - options?: TransportRequestOptions - ): TransportRequestPromise>; - clone< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - clone< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.SnapshotClone, - callback: callbackFn - ): TransportRequestCallback; - clone< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.SnapshotClone, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - create< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.SnapshotCreate, - options?: TransportRequestOptions - ): TransportRequestPromise>; - create< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - create< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.SnapshotCreate, - callback: callbackFn - ): TransportRequestCallback; - create< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.SnapshotCreate, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - create_repository< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.SnapshotCreateRepository, - options?: TransportRequestOptions - ): TransportRequestPromise>; - create_repository< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - create_repository< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.SnapshotCreateRepository, - callback: callbackFn - ): TransportRequestCallback; - create_repository< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.SnapshotCreateRepository, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - createRepository< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.SnapshotCreateRepository, - options?: TransportRequestOptions - ): TransportRequestPromise>; - createRepository< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - createRepository< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.SnapshotCreateRepository, - callback: callbackFn - ): TransportRequestCallback; - createRepository< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.SnapshotCreateRepository, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - delete, TContext = Context>( - params?: RequestParams.SnapshotDelete, - options?: TransportRequestOptions - ): TransportRequestPromise>; - delete, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - delete, TContext = Context>( - params: RequestParams.SnapshotDelete, - callback: callbackFn - ): TransportRequestCallback; - delete, TContext = Context>( - params: RequestParams.SnapshotDelete, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - delete_repository, TContext = Context>( - params?: RequestParams.SnapshotDeleteRepository, - options?: TransportRequestOptions - ): TransportRequestPromise>; - delete_repository, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - delete_repository, TContext = Context>( - params: RequestParams.SnapshotDeleteRepository, - callback: callbackFn - ): TransportRequestCallback; - delete_repository, TContext = Context>( - params: RequestParams.SnapshotDeleteRepository, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - deleteRepository, TContext = Context>( - params?: RequestParams.SnapshotDeleteRepository, - options?: TransportRequestOptions - ): TransportRequestPromise>; - deleteRepository, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - deleteRepository, TContext = Context>( - params: RequestParams.SnapshotDeleteRepository, - callback: callbackFn - ): TransportRequestCallback; - deleteRepository, TContext = Context>( - params: RequestParams.SnapshotDeleteRepository, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get, TContext = Context>( - params?: RequestParams.SnapshotGet, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get, TContext = Context>( - params: RequestParams.SnapshotGet, - callback: callbackFn - ): TransportRequestCallback; - get, TContext = Context>( - params: RequestParams.SnapshotGet, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get_repository, TContext = Context>( - params?: RequestParams.SnapshotGetRepository, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get_repository, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get_repository, TContext = Context>( - params: RequestParams.SnapshotGetRepository, - callback: callbackFn - ): TransportRequestCallback; - get_repository, TContext = Context>( - params: RequestParams.SnapshotGetRepository, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - getRepository, TContext = Context>( - params?: RequestParams.SnapshotGetRepository, - options?: TransportRequestOptions - ): TransportRequestPromise>; - getRepository, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - getRepository, TContext = Context>( - params: RequestParams.SnapshotGetRepository, - callback: callbackFn - ): TransportRequestCallback; - getRepository, TContext = Context>( - params: RequestParams.SnapshotGetRepository, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - repository_analyze, TContext = Context>( - params?: RequestParams.SnapshotRepositoryAnalyze, - options?: TransportRequestOptions - ): TransportRequestPromise>; - repository_analyze, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - repository_analyze, TContext = Context>( - params: RequestParams.SnapshotRepositoryAnalyze, - callback: callbackFn - ): TransportRequestCallback; - repository_analyze, TContext = Context>( - params: RequestParams.SnapshotRepositoryAnalyze, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - repositoryAnalyze, TContext = Context>( - params?: RequestParams.SnapshotRepositoryAnalyze, - options?: TransportRequestOptions - ): TransportRequestPromise>; - repositoryAnalyze, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - repositoryAnalyze, TContext = Context>( - params: RequestParams.SnapshotRepositoryAnalyze, - callback: callbackFn - ): TransportRequestCallback; - repositoryAnalyze, TContext = Context>( - params: RequestParams.SnapshotRepositoryAnalyze, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - restore< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.SnapshotRestore, - options?: TransportRequestOptions - ): TransportRequestPromise>; - restore< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - callback: callbackFn - ): TransportRequestCallback; - restore< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.SnapshotRestore, - callback: callbackFn - ): TransportRequestCallback; - restore< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.SnapshotRestore, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - status, TContext = Context>( - params?: RequestParams.SnapshotStatus, - options?: TransportRequestOptions - ): TransportRequestPromise>; - status, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - status, TContext = Context>( - params: RequestParams.SnapshotStatus, - callback: callbackFn - ): TransportRequestCallback; - status, TContext = Context>( - params: RequestParams.SnapshotStatus, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - verify_repository, TContext = Context>( - params?: RequestParams.SnapshotVerifyRepository, - options?: TransportRequestOptions - ): TransportRequestPromise>; - verify_repository, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - verify_repository, TContext = Context>( - params: RequestParams.SnapshotVerifyRepository, - callback: callbackFn - ): TransportRequestCallback; - verify_repository, TContext = Context>( - params: RequestParams.SnapshotVerifyRepository, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - verifyRepository, TContext = Context>( - params?: RequestParams.SnapshotVerifyRepository, - options?: TransportRequestOptions - ): TransportRequestPromise>; - verifyRepository, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - verifyRepository, TContext = Context>( - params: RequestParams.SnapshotVerifyRepository, - callback: callbackFn - ): TransportRequestCallback; - verifyRepository, TContext = Context>( - params: RequestParams.SnapshotVerifyRepository, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - }; - tasks: { - cancel, TContext = Context>( - params?: RequestParams.TasksCancel, - options?: TransportRequestOptions - ): TransportRequestPromise>; - cancel, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - cancel, TContext = Context>( - params: RequestParams.TasksCancel, - callback: callbackFn - ): TransportRequestCallback; - cancel, TContext = Context>( - params: RequestParams.TasksCancel, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get, TContext = Context>( - params?: RequestParams.TasksGet, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get, TContext = Context>( - params: RequestParams.TasksGet, - callback: callbackFn - ): TransportRequestCallback; - get, TContext = Context>( - params: RequestParams.TasksGet, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - list, TContext = Context>( - params?: RequestParams.TasksList, - options?: TransportRequestOptions - ): TransportRequestPromise>; - list, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - list, TContext = Context>( - params: RequestParams.TasksList, - callback: callbackFn - ): TransportRequestCallback; - list, TContext = Context>( - params: RequestParams.TasksList, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - }; - terms_enum< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.TermsEnum, - options?: TransportRequestOptions - ): TransportRequestPromise>; - terms_enum< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - terms_enum< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.TermsEnum, - callback: callbackFn - ): TransportRequestCallback; - terms_enum< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.TermsEnum, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - termsEnum< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.TermsEnum, - options?: TransportRequestOptions - ): TransportRequestPromise>; - termsEnum< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - termsEnum< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.TermsEnum, - callback: callbackFn - ): TransportRequestCallback; - termsEnum< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.TermsEnum, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - termvectors< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.Termvectors, - options?: TransportRequestOptions - ): TransportRequestPromise>; - termvectors< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - termvectors< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.Termvectors, - callback: callbackFn - ): TransportRequestCallback; - termvectors< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.Termvectors, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - transforms: { - search, TContext = Context>( - params?: Record, - options?: TransportRequestOptions - ): TransportRequestPromise>; - search, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - search, TContext = Context>( - params: Record, - callback: callbackFn - ): TransportRequestCallback; - search, TContext = Context>( - params: Record, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - preview, TContext = Context>( - params?: Record, - options?: TransportRequestOptions - ): TransportRequestPromise>; - preview, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - preview, TContext = Context>( - params: Record, - callback: callbackFn - ): TransportRequestCallback; - preview, TContext = Context>( - params: Record, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - delete, TContext = Context>( - params?: Record, - options?: TransportRequestOptions - ): TransportRequestPromise>; - delete, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - delete, TContext = Context>( - params: Record, - callback: callbackFn - ): TransportRequestCallback; - delete, TContext = Context>( - params: Record, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - get, TContext = Context>( - params?: Record, - options?: TransportRequestOptions - ): TransportRequestPromise>; - get, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - get, TContext = Context>( - params: Record, - callback: callbackFn - ): TransportRequestCallback; - get, TContext = Context>( - params: Record, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - put, TContext = Context>( - params?: Record, - options?: TransportRequestOptions - ): TransportRequestPromise>; - put, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - put, TContext = Context>( - params: Record, - callback: callbackFn - ): TransportRequestCallback; - put, TContext = Context>( - params: Record, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - explain, TContext = Context>( - params?: Record, - options?: TransportRequestOptions - ): TransportRequestPromise>; - explain, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - explain, TContext = Context>( - params: Record, - callback: callbackFn - ): TransportRequestCallback; - explain, TContext = Context>( - params: Record, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - start, TContext = Context>( - params?: Record, - options?: TransportRequestOptions - ): TransportRequestPromise>; - start, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - start, TContext = Context>( - params: Record, - callback: callbackFn - ): TransportRequestCallback; - start, TContext = Context>( - params: Record, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - stop, TContext = Context>( - params?: Record, - options?: TransportRequestOptions - ): TransportRequestPromise>; - stop, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - stop, TContext = Context>( - params: Record, - callback: callbackFn - ): TransportRequestCallback; - stop, TContext = Context>( - params: Record, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - }; - update< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.Update, - options?: TransportRequestOptions - ): TransportRequestPromise>; - update< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - update< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.Update, - callback: callbackFn - ): TransportRequestCallback; - update< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.Update, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - update_by_query< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.UpdateByQuery, - options?: TransportRequestOptions - ): TransportRequestPromise>; - update_by_query< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - update_by_query< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.UpdateByQuery, - callback: callbackFn - ): TransportRequestCallback; - update_by_query< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.UpdateByQuery, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - updateByQuery< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params?: RequestParams.UpdateByQuery, - options?: TransportRequestOptions - ): TransportRequestPromise>; - updateByQuery< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >(callback: callbackFn): TransportRequestCallback; - updateByQuery< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.UpdateByQuery, - callback: callbackFn - ): TransportRequestCallback; - updateByQuery< - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context - >( - params: RequestParams.UpdateByQuery, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - update_by_query_rethrottle, TContext = Context>( - params?: RequestParams.UpdateByQueryRethrottle, - options?: TransportRequestOptions - ): TransportRequestPromise>; - update_by_query_rethrottle, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - update_by_query_rethrottle, TContext = Context>( - params: RequestParams.UpdateByQueryRethrottle, - callback: callbackFn - ): TransportRequestCallback; - update_by_query_rethrottle, TContext = Context>( - params: RequestParams.UpdateByQueryRethrottle, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - updateByQueryRethrottle, TContext = Context>( - params?: RequestParams.UpdateByQueryRethrottle, - options?: TransportRequestOptions - ): TransportRequestPromise>; - updateByQueryRethrottle, TContext = Context>( - callback: callbackFn - ): TransportRequestCallback; - updateByQueryRethrottle, TContext = Context>( - params: RequestParams.UpdateByQueryRethrottle, - callback: callbackFn - ): TransportRequestCallback; - updateByQueryRethrottle, TContext = Context>( - params: RequestParams.UpdateByQueryRethrottle, - options: TransportRequestOptions, - callback: callbackFn - ): TransportRequestCallback; - /* /GENERATED */ -} +import * as API from './api'; +import { Client, ClientOptions, NodeOptions, ClientExtendsCallbackOptions } from './lib/Client'; declare const events: { SERIALIZATION: string; @@ -5836,6 +55,7 @@ declare const events: { }; export { + API, Client, Transport, ConnectionPool, @@ -5847,10 +67,7 @@ export { errors, ApiError, ApiResponse, - RequestEvent, ResurrectEvent, - opensearchtypes, - RequestParams, ClientOptions, NodeOptions, ClientExtendsCallbackOptions, diff --git a/index.js b/index.js index 2987a72a4..3efcfe614 100644 --- a/index.js +++ b/index.js @@ -8,6 +8,8 @@ * */ + + /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with @@ -29,309 +31,12 @@ 'use strict'; -const { EventEmitter } = require('events'); -const { URL } = require('url'); -const debug = require('debug')('opensearch'); +const { Client } = require('./lib/Client'); const Transport = require('./lib/Transport'); +const { ConnectionPool } = require('./lib/pool'); const Connection = require('./lib/Connection'); -const { ConnectionPool, CloudConnectionPool } = require('./lib/pool'); -const Helpers = require('./lib/Helpers'); const Serializer = require('./lib/Serializer'); const errors = require('./lib/errors'); -const { ConfigurationError } = errors; -const { prepareHeaders } = Connection.internals; -let clientVersion = require('./package.json').version; -/* istanbul ignore next */ -if (clientVersion.includes('-')) { - // clean prerelease - clientVersion = clientVersion.slice(0, clientVersion.indexOf('-')) + 'p'; -} - -const kInitialOptions = Symbol('opensearchjs-initial-options'); -const kChild = Symbol('opensearchjs-child'); -const kExtensions = Symbol('opensearchjs-extensions'); -const kEventEmitter = Symbol('opensearchjs-event-emitter'); - -const OpenSearchAPI = require('./api'); - -class Client extends OpenSearchAPI { - constructor(opts = {}) { - super({ ConfigurationError }); - if (opts.cloud && opts[kChild] === undefined) { - const { id, username, password } = opts.cloud; - // the cloud id is `cluster-name:base64encodedurl` - // the url is a string divided by two '$', the first is the cloud url - // the second the opensearch instance, the third the opensearchDashboards instance - const cloudUrls = Buffer.from(id.split(':')[1], 'base64').toString().split('$'); - - // TODO: remove username and password here in 8 - if (username && password) { - opts.auth = Object.assign({}, opts.auth, { username, password }); - } - opts.node = `https://${cloudUrls[1]}.${cloudUrls[0]}`; - - // Cloud has better performances with compression enabled - // see https://github.com/elastic/elasticsearch-py/pull/704. - // So unless the user specifies otherwise, we enable compression. - if (opts.compression == null) opts.compression = 'gzip'; - if (opts.suggestCompression == null) opts.suggestCompression = true; - if (opts.ssl == null || (opts.ssl && opts.ssl.secureProtocol == null)) { - opts.ssl = opts.ssl || {}; - opts.ssl.secureProtocol = 'TLSv1_2_method'; - } - } - - if (!opts.node && !opts.nodes) { - throw new ConfigurationError('Missing node(s) option'); - } - - if (opts[kChild] === undefined) { - const checkAuth = getAuth(opts.node || opts.nodes); - if (checkAuth && checkAuth.username && checkAuth.password) { - opts.auth = Object.assign({}, opts.auth, { - username: checkAuth.username, - password: checkAuth.password, - }); - } - } - - const options = - opts[kChild] !== undefined - ? opts[kChild].initialOptions - : Object.assign( - {}, - { - Connection, - Transport, - Serializer, - ConnectionPool: opts.cloud ? CloudConnectionPool : ConnectionPool, - maxRetries: 3, - requestTimeout: 30000, - pingTimeout: 3000, - sniffInterval: false, - sniffOnStart: false, - sniffEndpoint: '_nodes/_all/http', - sniffOnConnectionFault: false, - resurrectStrategy: 'ping', - suggestCompression: false, - compression: false, - ssl: null, - agent: null, - headers: {}, - nodeFilter: null, - nodeSelector: 'round-robin', - generateRequestId: null, - name: 'opensearch-js', - auth: null, - opaqueIdPrefix: null, - context: null, - proxy: null, - enableMetaHeader: true, - disablePrototypePoisoningProtection: false, - enableLongNumeralSupport: false, - }, - opts - ); - - if (process.env.OPENSEARCH_CLIENT_APIVERSIONING === 'true') { - options.headers = Object.assign( - { accept: 'application/vnd.opensearch+json; compatible-with=7' }, - options.headers - ); - } - - this[kInitialOptions] = options; - this[kExtensions] = []; - this.name = options.name; - - if (opts[kChild] !== undefined) { - this.serializer = options[kChild].serializer; - this.connectionPool = options[kChild].connectionPool; - this[kEventEmitter] = options[kChild].eventEmitter; - } else { - this[kEventEmitter] = new EventEmitter(); - this.serializer = new options.Serializer({ - disablePrototypePoisoningProtection: options.disablePrototypePoisoningProtection, - enableLongNumeralSupport: options.enableLongNumeralSupport, - }); - this.connectionPool = new options.ConnectionPool({ - pingTimeout: options.pingTimeout, - resurrectStrategy: options.resurrectStrategy, - ssl: options.ssl, - agent: options.agent, - proxy: options.proxy, - Connection: options.Connection, - auth: options.auth, - emit: this[kEventEmitter].emit.bind(this[kEventEmitter]), - sniffEnabled: - options.sniffInterval !== false || - options.sniffOnStart !== false || - options.sniffOnConnectionFault !== false, - }); - // Add the connections before initialize the Transport - this.connectionPool.addConnection(options.node || options.nodes); - } - - this.transport = new options.Transport({ - emit: this[kEventEmitter].emit.bind(this[kEventEmitter]), - connectionPool: this.connectionPool, - serializer: this.serializer, - maxRetries: options.maxRetries, - requestTimeout: options.requestTimeout, - sniffInterval: options.sniffInterval, - sniffOnStart: options.sniffOnStart, - sniffOnConnectionFault: options.sniffOnConnectionFault, - sniffEndpoint: options.sniffEndpoint, - suggestCompression: options.suggestCompression, - compression: options.compression, - headers: options.headers, - nodeFilter: options.nodeFilter, - nodeSelector: options.nodeSelector, - generateRequestId: options.generateRequestId, - name: options.name, - opaqueIdPrefix: options.opaqueIdPrefix, - context: options.context, - memoryCircuitBreaker: options.memoryCircuitBreaker, - auth: options.auth, - }); - - this.helpers = new Helpers({ - client: this, - maxRetries: options.maxRetries, - }); - } - - get emit() { - return this[kEventEmitter].emit.bind(this[kEventEmitter]); - } - - get on() { - return this[kEventEmitter].on.bind(this[kEventEmitter]); - } - - get once() { - return this[kEventEmitter].once.bind(this[kEventEmitter]); - } - - get off() { - return this[kEventEmitter].off.bind(this[kEventEmitter]); - } - - extend(name, opts, fn) { - if (typeof opts === 'function') { - fn = opts; - opts = {}; - } - - let [namespace, method] = name.split('.'); - if (method == null) { - method = namespace; - namespace = null; - } - - if (namespace != null) { - if (this[namespace] != null && this[namespace][method] != null && opts.force !== true) { - throw new Error(`The method "${method}" already exists on namespace "${namespace}"`); - } - - if (this[namespace] == null) this[namespace] = {}; - this[namespace][method] = fn({ - makeRequest: this.transport.request.bind(this.transport), - result: { body: null, statusCode: null, headers: null, warnings: null }, - ConfigurationError, - }); - } else { - if (this[method] != null && opts.force !== true) { - throw new Error(`The method "${method}" already exists`); - } - - this[method] = fn({ - makeRequest: this.transport.request.bind(this.transport), - result: { body: null, statusCode: null, headers: null, warnings: null }, - ConfigurationError, - }); - } - - this[kExtensions].push({ name, opts, fn }); - } - - child(opts) { - // Merge the new options with the initial ones - const options = Object.assign({}, this[kInitialOptions], opts); - // Pass to the child client the parent instances that cannot be overriden - options[kChild] = { - connectionPool: this.connectionPool, - serializer: this.serializer, - eventEmitter: this[kEventEmitter], - initialOptions: options, - }; - - /* istanbul ignore else */ - if (options.auth !== undefined) { - options.headers = prepareHeaders(options.headers, options.auth); - } - - const client = new Client(options); - // sync compatible check - const tSymbol = Object.getOwnPropertySymbols(this.transport).filter( - (symbol) => symbol.description === 'compatible check' - )[0]; - client.transport[tSymbol] = this.transport[tSymbol]; - // Add parent extensions - if (this[kExtensions].length > 0) { - this[kExtensions].forEach(({ name, opts, fn }) => { - client.extend(name, opts, fn); - }); - } - return client; - } - - close(callback) { - if (callback == null) { - return new Promise((resolve) => { - this.close(resolve); - }); - } - debug('Closing the client'); - this.connectionPool.empty(callback); - } -} - -function getAuth(node) { - if (Array.isArray(node)) { - for (const url of node) { - const auth = getUsernameAndPassword(url); - if (auth.username !== '' && auth.password !== '') { - return auth; - } - } - - return null; - } - - const auth = getUsernameAndPassword(node); - if (auth.username !== '' && auth.password !== '') { - return auth; - } - - return null; - - function getUsernameAndPassword(node) { - /* istanbul ignore else */ - if (typeof node === 'string') { - const { username, password } = new URL(node); - return { - username: decodeURIComponent(username), - password: decodeURIComponent(password), - }; - } else if (node.url instanceof URL) { - return { - username: decodeURIComponent(node.url.username), - password: decodeURIComponent(node.url.password), - }; - } - } -} const events = { RESPONSE: 'response', @@ -348,6 +53,6 @@ module.exports = { ConnectionPool, Connection, Serializer, - events, errors, + events, }; diff --git a/index.mjs b/index.mjs index 2d2d89e7f..582e8fc07 100644 --- a/index.mjs +++ b/index.mjs @@ -8,6 +8,8 @@ * */ + + /* * Licensed to Elasticsearch B.V. under one or more contributor * license agreements. See the NOTICE file distributed with diff --git a/lib/Client.d.ts b/lib/Client.d.ts new file mode 100644 index 000000000..ad2f5c57e --- /dev/null +++ b/lib/Client.d.ts @@ -0,0 +1,128 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +import { ConnectionOptions as TlsConnectionOptions } from 'tls'; +import { URL } from 'url'; +import OpenSearchAPI from '../api/OpenSearchAPI'; +import Serializer from './Serializer'; +import Helpers from './Helpers'; +import Connection, { AgentOptions, agentFn } from './Connection'; +import * as errors from './errors'; +import Transport, { + ApiError, + ApiResponse, + TransportRequestParams, + TransportRequestOptions, + nodeFilterFn, + nodeSelectorFn, + generateRequestIdFn, + MemoryCircuitBreakerOptions, +} from './Transport' +import { + ConnectionPool, + ResurrectEvent, + BasicAuth, + AwsSigv4Auth +} from './pool'; + +declare type extendsCallback = (options: ClientExtendsCallbackOptions) => any; + +// Extend API +interface ClientExtendsCallbackOptions { + ConfigurationError: errors.ConfigurationError; + makeRequest( + params: TransportRequestParams, + options?: TransportRequestOptions + ): Promise | void; + result: { + body: null; + statusCode: null; + headers: null; + warnings: null; + }; +} + +interface NodeOptions { + url: URL; + id?: string; + agent?: AgentOptions; + ssl?: TlsConnectionOptions; + headers?: Record; + roles?: { + cluster_manager?: boolean; + master?: boolean; // Deprecated. Use cluster_manager instead + data: boolean; + ingest: boolean; + }; +} + +interface ClientOptions { + node?: string | string[] | NodeOptions | NodeOptions[]; + nodes?: string | string[] | NodeOptions | NodeOptions[]; + Connection?: typeof Connection; + ConnectionPool?: typeof ConnectionPool; + Transport?: typeof Transport; + Serializer?: typeof Serializer; + maxRetries?: number; + requestTimeout?: number; + pingTimeout?: number; + sniffInterval?: number | boolean; + sniffOnStart?: boolean; + sniffEndpoint?: string; + sniffOnConnectionFault?: boolean; + resurrectStrategy?: 'ping' | 'optimistic' | 'none'; + suggestCompression?: boolean; + compression?: 'gzip'; + ssl?: TlsConnectionOptions; + agent?: AgentOptions | agentFn | false; + nodeFilter?: nodeFilterFn; + nodeSelector?: nodeSelectorFn | string; + headers?: Record; + opaqueIdPrefix?: string; + generateRequestId?: generateRequestIdFn; + name?: string | symbol; + auth?: BasicAuth | AwsSigv4Auth; + context?: unknown; + proxy?: string | URL; + enableMetaHeader?: boolean; + cloud?: { + id: string; + username?: string; + password?: string; + }; + disablePrototypePoisoningProtection?: boolean | 'proto' | 'constructor'; + memoryCircuitBreaker?: MemoryCircuitBreakerOptions; + enableLongNumeralSupport?: boolean; +} + +declare class Client extends OpenSearchAPI { + constructor(opts: ClientOptions); + connectionPool: ConnectionPool; + transport: Transport; + serializer: Serializer; + extend(method: string, fn: extendsCallback): void; + extend(method: string, opts: { force: boolean }, fn: extendsCallback): void; + helpers: Helpers; + child(opts?: ClientOptions): Client; + close(callback: Function): void; + close(): Promise; + emit(event: string | symbol, ...args: any[]): boolean; + on(event: 'request', listener: (err: ApiError, meta: ApiResponse) => void): this; + on(event: 'response', listener: (err: ApiError, meta: ApiResponse) => void): this; + on(event: 'sniff', listener: (err: ApiError, meta: ApiResponse) => void): this; + on(event: 'resurrect', listener: (err: null, meta: ResurrectEvent) => void): this; + once(event: 'request', listener: (err: ApiError, meta: ApiResponse) => void): this; + once(event: 'response', listener: (err: ApiError, meta: ApiResponse) => void): this; + once(event: 'sniff', listener: (err: ApiError, meta: ApiResponse) => void): this; + once(event: 'resurrect', listener: (err: null, meta: ResurrectEvent) => void): this; + off(event: string | symbol, listener: (...args: any[]) => void): this; +} + +export { Client, ClientOptions, NodeOptions, ClientExtendsCallbackOptions }; diff --git a/lib/Client.js b/lib/Client.js new file mode 100644 index 000000000..312de1896 --- /dev/null +++ b/lib/Client.js @@ -0,0 +1,330 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + * + */ + +/* + * 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. + */ + +'use strict'; + +const { EventEmitter } = require('events'); +const { URL } = require('url'); +const debug = require('debug')('opensearch'); +const Transport = require('./Transport'); +const Connection = require('./Connection'); +const { ConnectionPool, CloudConnectionPool } = require('./pool'); +const Helpers = require('./Helpers'); +const Serializer = require('./Serializer'); +const errors = require('./errors'); +const { ConfigurationError } = errors; +const { prepareHeaders } = Connection.internals; + +const kInitialOptions = Symbol('opensearchjs-initial-options'); +const kChild = Symbol('opensearchjs-child'); +const kExtensions = Symbol('opensearchjs-extensions'); +const kEventEmitter = Symbol('opensearchjs-event-emitter'); + +const OpenSearchAPI = require('../api/OpenSearchAPI'); + +class Client extends OpenSearchAPI { + constructor(opts = {}) { + super({ ConfigurationError }); + if (opts.cloud && opts[kChild] === undefined) { + const { id, username, password } = opts.cloud; + // the cloud id is `cluster-name:base64encodedurl` + // the url is a string divided by two '$', the first is the cloud url + // the second the opensearch instance, the third the opensearchDashboards instance + const cloudUrls = Buffer.from(id.split(':')[1], 'base64').toString().split('$'); + + // TODO: remove username and password here in 8 + if (username && password) { + opts.auth = Object.assign({}, opts.auth, { username, password }); + } + opts.node = `https://${cloudUrls[1]}.${cloudUrls[0]}`; + + // Cloud has better performances with compression enabled + // see https://github.com/elastic/elasticsearch-py/pull/704. + // So unless the user specifies otherwise, we enable compression. + if (opts.compression == null) opts.compression = 'gzip'; + if (opts.suggestCompression == null) opts.suggestCompression = true; + if (opts.ssl == null || (opts.ssl && opts.ssl.secureProtocol == null)) { + opts.ssl = opts.ssl || {}; + opts.ssl.secureProtocol = 'TLSv1_2_method'; + } + } + + if (!opts.node && !opts.nodes) { + throw new ConfigurationError('Missing node(s) option'); + } + + if (opts[kChild] === undefined) { + const checkAuth = getAuth(opts.node || opts.nodes); + if (checkAuth && checkAuth.username && checkAuth.password) { + opts.auth = Object.assign({}, opts.auth, { + username: checkAuth.username, + password: checkAuth.password, + }); + } + } + + const options = + opts[kChild] !== undefined + ? opts[kChild].initialOptions + : Object.assign( + {}, + { + Connection, + Transport, + Serializer, + ConnectionPool: opts.cloud ? CloudConnectionPool : ConnectionPool, + maxRetries: 3, + requestTimeout: 30000, + pingTimeout: 3000, + sniffInterval: false, + sniffOnStart: false, + sniffEndpoint: '_nodes/_all/http', + sniffOnConnectionFault: false, + resurrectStrategy: 'ping', + suggestCompression: false, + compression: false, + ssl: null, + agent: null, + headers: {}, + nodeFilter: null, + nodeSelector: 'round-robin', + generateRequestId: null, + name: 'opensearch-js', + auth: null, + opaqueIdPrefix: null, + context: null, + proxy: null, + enableMetaHeader: true, + disablePrototypePoisoningProtection: false, + enableLongNumeralSupport: false, + }, + opts + ); + + if (process.env.OPENSEARCH_CLIENT_APIVERSIONING === 'true') { + options.headers = Object.assign( + { accept: 'application/vnd.opensearch+json; compatible-with=7' }, + options.headers + ); + } + + this[kInitialOptions] = options; + this[kExtensions] = []; + this.name = options.name; + + if (opts[kChild] !== undefined) { + this.serializer = options[kChild].serializer; + this.connectionPool = options[kChild].connectionPool; + this[kEventEmitter] = options[kChild].eventEmitter; + } else { + this[kEventEmitter] = new EventEmitter(); + this.serializer = new options.Serializer({ + disablePrototypePoisoningProtection: options.disablePrototypePoisoningProtection, + enableLongNumeralSupport: options.enableLongNumeralSupport, + }); + this.connectionPool = new options.ConnectionPool({ + pingTimeout: options.pingTimeout, + resurrectStrategy: options.resurrectStrategy, + ssl: options.ssl, + agent: options.agent, + proxy: options.proxy, + Connection: options.Connection, + auth: options.auth, + emit: this[kEventEmitter].emit.bind(this[kEventEmitter]), + sniffEnabled: + options.sniffInterval !== false || + options.sniffOnStart !== false || + options.sniffOnConnectionFault !== false, + }); + // Add the connections before initialize the Transport + this.connectionPool.addConnection(options.node || options.nodes); + } + + this.transport = new options.Transport({ + emit: this[kEventEmitter].emit.bind(this[kEventEmitter]), + connectionPool: this.connectionPool, + serializer: this.serializer, + maxRetries: options.maxRetries, + requestTimeout: options.requestTimeout, + sniffInterval: options.sniffInterval, + sniffOnStart: options.sniffOnStart, + sniffOnConnectionFault: options.sniffOnConnectionFault, + sniffEndpoint: options.sniffEndpoint, + suggestCompression: options.suggestCompression, + compression: options.compression, + headers: options.headers, + nodeFilter: options.nodeFilter, + nodeSelector: options.nodeSelector, + generateRequestId: options.generateRequestId, + name: options.name, + opaqueIdPrefix: options.opaqueIdPrefix, + context: options.context, + memoryCircuitBreaker: options.memoryCircuitBreaker, + auth: options.auth, + }); + + this.helpers = new Helpers({ + client: this, + maxRetries: options.maxRetries, + }); + } + + get emit() { + return this[kEventEmitter].emit.bind(this[kEventEmitter]); + } + + get on() { + return this[kEventEmitter].on.bind(this[kEventEmitter]); + } + + get once() { + return this[kEventEmitter].once.bind(this[kEventEmitter]); + } + + get off() { + return this[kEventEmitter].off.bind(this[kEventEmitter]); + } + + extend(name, opts, fn) { + if (typeof opts === 'function') { + fn = opts; + opts = {}; + } + + let [namespace, method] = name.split('.'); + if (method == null) { + method = namespace; + namespace = null; + } + + if (namespace != null) { + if (this[namespace] != null && this[namespace][method] != null && opts.force !== true) { + throw new Error(`The method "${method}" already exists on namespace "${namespace}"`); + } + + if (this[namespace] == null) this[namespace] = {}; + this[namespace][method] = fn({ + makeRequest: this.transport.request.bind(this.transport), + result: { body: null, statusCode: null, headers: null, warnings: null }, + ConfigurationError, + }); + } else { + if (this[method] != null && opts.force !== true) { + throw new Error(`The method "${method}" already exists`); + } + + this[method] = fn({ + makeRequest: this.transport.request.bind(this.transport), + result: { body: null, statusCode: null, headers: null, warnings: null }, + ConfigurationError, + }); + } + + this[kExtensions].push({ name, opts, fn }); + } + + child(opts) { + // Merge the new options with the initial ones + const options = Object.assign({}, this[kInitialOptions], opts); + // Pass to the child client the parent instances that cannot be overriden + options[kChild] = { + connectionPool: this.connectionPool, + serializer: this.serializer, + eventEmitter: this[kEventEmitter], + initialOptions: options, + }; + + /* istanbul ignore else */ + if (options.auth !== undefined) { + options.headers = prepareHeaders(options.headers, options.auth); + } + + const client = new Client(options); + // sync compatible check + const tSymbol = Object.getOwnPropertySymbols(this.transport).filter( + (symbol) => symbol.description === 'compatible check' + )[0]; + client.transport[tSymbol] = this.transport[tSymbol]; + // Add parent extensions + if (this[kExtensions].length > 0) { + this[kExtensions].forEach(({ name, opts, fn }) => { + client.extend(name, opts, fn); + }); + } + return client; + } + + close(callback) { + if (callback == null) { + return new Promise((resolve) => { + this.close(resolve); + }); + } + debug('Closing the client'); + this.connectionPool.empty(callback); + } +} + +function getAuth(node) { + if (Array.isArray(node)) { + for (const url of node) { + const auth = getUsernameAndPassword(url); + if (auth.username !== '' && auth.password !== '') { + return auth; + } + } + + return null; + } + + const auth = getUsernameAndPassword(node); + if (auth.username !== '' && auth.password !== '') { + return auth; + } + + return null; + + function getUsernameAndPassword(node) { + /* istanbul ignore else */ + if (typeof node === 'string') { + const { username, password } = new URL(node); + return { + username: decodeURIComponent(username), + password: decodeURIComponent(password), + }; + } else if (node.url instanceof URL) { + return { + username: decodeURIComponent(node.url.username), + password: decodeURIComponent(node.url.password), + }; + } + } +} + +module.exports = { Client }; diff --git a/lib/Helpers.d.ts b/lib/Helpers.d.ts index 88b315edb..ab6cf57fc 100644 --- a/lib/Helpers.d.ts +++ b/lib/Helpers.d.ts @@ -28,25 +28,24 @@ */ import { Readable as ReadableStream } from 'stream'; -import { TransportRequestOptions, ApiError, ApiResponse, RequestBody, Context } from './Transport'; -import { Search, Msearch, Bulk } from '../api/requestParams'; +import { TransportRequestOptions, ApiError, ApiResponse, RequestBody } from './Transport'; +import { Search_Request } from '../api'; +import { Msearch_Request } from '../api'; +import { Bulk_Request } from '../api'; export default class Helpers { - search>( - params: Search, + search( + params: Search_Request, options?: TransportRequestOptions ): Promise; scrollSearch< - TDocument = unknown, - TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context + TDocument = unknown >( - params: Search, + params: Search_Request, options?: TransportRequestOptions - ): AsyncIterable>; - scrollDocuments>( - params: Search, + ): AsyncIterable>; + scrollDocuments( + params: Search_Request, options?: TransportRequestOptions ): AsyncIterable; msearch(options?: MsearchHelperOptions, reqOptions?: TransportRequestOptions): MsearchHelper; @@ -57,10 +56,8 @@ export default class Helpers { } export interface ScrollSearchResponse< - TDocument = unknown, - TResponse = Record, - TContext = Context -> extends ApiResponse { + TDocument = unknown +> extends ApiResponse { clear: () => Promise; documents: TDocument[]; } @@ -115,7 +112,7 @@ type UpdateAction = [UpdateActionOperation, Record]; type Action = IndexAction | CreateAction | UpdateAction | DeleteAction; type Omit = Pick>; -export interface BulkHelperOptions extends Omit { +export interface BulkHelperOptions extends Omit { datasource: TDocument[] | Buffer | ReadableStream | AsyncIterator; onDocument: (doc: TDocument) => Action; flushBytes?: number; @@ -142,7 +139,7 @@ export interface OnDropDocument { retried: boolean; } -export interface MsearchHelperOptions extends Omit { +export interface MsearchHelperOptions extends Omit { operations?: number; flushInterval?: number; concurrency?: number; @@ -150,27 +147,25 @@ export interface MsearchHelperOptions extends Omit { wait?: number; } -declare type callbackFn = ( +declare type callbackFn = ( err: ApiError, - result: ApiResponse + result: ApiResponse ) => void; export interface MsearchHelper extends Promise { stop(error?: Error): void; search< TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context + TRequestBody extends RequestBody = Record >( - header: Omit, + header: Omit, body: TRequestBody - ): Promise>; + ): Promise; search< TResponse = Record, - TRequestBody extends RequestBody = Record, - TContext = Context + TRequestBody extends RequestBody = Record >( - header: Omit, + header: Omit, body: TRequestBody, - callback: callbackFn + callback: callbackFn ): void; } diff --git a/lib/Helpers.js b/lib/Helpers.js index a648aea9a..682316b42 100644 --- a/lib/Helpers.js +++ b/lib/Helpers.js @@ -792,8 +792,6 @@ function addDocumentsGetter(result) { function appendFilterPath(filter, params, force) { if (params.filter_path !== undefined) { params.filter_path += ',' + filter; - } else if (params.filterPath !== undefined) { - params.filterPath += ',' + filter; } else if (force === true) { params.filter_path = filter; } diff --git a/lib/Transport.d.ts b/lib/Transport.d.ts index ab46c81fa..79d1efc84 100644 --- a/lib/Transport.d.ts +++ b/lib/Transport.d.ts @@ -44,8 +44,6 @@ export type ApiError = | errors.RequestAbortedError | errors.NotCompatibleError; -export type Context = unknown; - export interface nodeSelectorFn { (connections: Connection[]): Connection; } @@ -85,13 +83,13 @@ interface TransportOptions { auth?: BasicAuth | AwsSigv4Auth; } -export interface RequestEvent, TContext = Context> { - body: TResponse; +export interface ApiResponse { + body: any; statusCode: number | null; headers: Record | null; warnings: string[] | null; meta: { - context: TContext; + context: unknown; name: string | symbol; request: { params: TransportRequestParams; @@ -108,11 +106,6 @@ export interface RequestEvent, TContext = Contex }; } -// ApiResponse and RequestEvent are the same thing -// we are doing this for have more clear names -export interface ApiResponse, TContext = Context> - extends RequestEvent {} - export type RequestBody> = T | string | Buffer | ReadableStream; export type RequestNDBody[]> = | T @@ -138,7 +131,7 @@ export interface TransportRequestOptions { querystring?: Record; compression?: 'gzip'; id?: any; - context?: Context; + context?: unknown; warnings?: string[]; opaqueId?: string; } diff --git a/lib/errors.d.ts b/lib/errors.d.ts index a907f5110..6c8f07fa0 100644 --- a/lib/errors.d.ts +++ b/lib/errors.d.ts @@ -27,40 +27,31 @@ * under the License. */ -import { ApiResponse, Context } from './Transport'; +import { ApiResponse } from './Transport'; export declare class OpenSearchClientError extends Error { name: string; message: string; } -export declare class TimeoutError< - TResponse = Record, - TContext = Context -> extends OpenSearchClientError { +export declare class TimeoutError extends OpenSearchClientError { name: string; message: string; - meta: ApiResponse; + meta: ApiResponse; constructor(message: string, meta: ApiResponse); } -export declare class ConnectionError< - TResponse = Record, - TContext = Context -> extends OpenSearchClientError { +export declare class ConnectionError extends OpenSearchClientError { name: string; message: string; - meta: ApiResponse; + meta: ApiResponse; constructor(message: string, meta?: ApiResponse); } -export declare class NoLivingConnectionsError< - TResponse = Record, - TContext = Context -> extends OpenSearchClientError { +export declare class NoLivingConnectionsError extends OpenSearchClientError { name: string; message: string; - meta: ApiResponse; + meta: ApiResponse; constructor(message: string, meta: ApiResponse); } @@ -84,35 +75,26 @@ export declare class ConfigurationError extends OpenSearchClientError { constructor(message: string); } -export declare class ResponseError< - TResponse = Record, - TContext = Context -> extends OpenSearchClientError { +export declare class ResponseError extends OpenSearchClientError { name: string; message: string; - meta: ApiResponse; - body: TResponse; + meta: ApiResponse; + body: Record; statusCode: number; headers: Record; constructor(meta: ApiResponse); } -export declare class RequestAbortedError< - TResponse = Record, - TContext = Context -> extends OpenSearchClientError { +export declare class RequestAbortedError extends OpenSearchClientError { name: string; message: string; - meta: ApiResponse; + meta: ApiResponse; constructor(message: string, meta?: ApiResponse); } -export declare class NotCompatibleError< - TResponse = Record, - TContext = Context -> extends OpenSearchClientError { +export declare class NotCompatibleError extends OpenSearchClientError { name: string; message: string; - meta: ApiResponse; + meta: ApiResponse; constructor(meta: ApiResponse); } diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 000000000..4075d1630 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,8920 @@ +{ + "name": "@opensearch-project/opensearch", + "version": "3.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "@opensearch-project/opensearch", + "version": "3.0.0", + "license": "Apache-2.0", + "dependencies": { + "aws4": "^1.11.0", + "debug": "^4.3.1", + "hpagent": "^1.2.0", + "json11": "^1.1.2", + "ms": "^2.1.3", + "secure-json-parse": "^2.4.0" + }, + "devDependencies": { + "@aws-sdk/types": "^3.160.0", + "@babel/eslint-parser": "^7.19.1", + "@sinonjs/fake-timers": "github:sinonjs/fake-timers#0bfffc1", + "@types/node": "^22.0.0", + "convert-hrtime": "^5.0.0", + "cross-zip": "^4.0.0", + "dedent": "^1.1.0", + "deepmerge": "^4.2.2", + "dezalgo": "^1.0.3", + "eslint": "^8.30.0", + "eslint-config-prettier": "^9.0.0", + "eslint-plugin-prettier": "^5.0.0", + "faker": "^5.5.3", + "fast-deep-equal": "^3.1.3", + "into-stream": "^6.0.0", + "js-yaml": "^4.1.0", + "jsdoc": "^4.0.0", + "license-checker": "^25.0.1", + "minimist": "^1.2.5", + "node-fetch": "^3.2.10", + "ora": "^8.0.1", + "prettier": "^3.0.1", + "pretty-hrtime": "^1.0.3", + "proxy": "^1.0.2", + "rimraf": "^6.0.1", + "semver": "^7.3.5", + "simple-git": "^3.15.0", + "simple-statistics": "^7.7.0", + "split2": "^4.1.0", + "stoppable": "^1.1.0", + "tap": "^16.3.0", + "tsd": "^0.27.0", + "workq": "^3.0.0", + "xmlbuilder2": "^3.0.2" + }, + "engines": { + "node": ">=18", + "yarn": "^1.22.10" + } + }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@aws-sdk/types": { + "version": "3.577.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.577.0.tgz", + "integrity": "sha512-FT2JZES3wBKN/alfmhlo+3ZOq/XJ0C7QOZcDNrpKjB0kqYoKjhVKZ/Hx6ArR0czkKfHzBBEs6y40ebIHx2nSmA==", + "dev": true, + "dependencies": { + "@smithy/types": "^3.0.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.7.tgz", + "integrity": "sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.7.tgz", + "integrity": "sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-compilation-targets": "^7.24.7", + "@babel/helper-module-transforms": "^7.24.7", + "@babel/helpers": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/template": "^7.24.7", + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/eslint-parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.24.7.tgz", + "integrity": "sha512-SO5E3bVxDuxyNxM5agFv480YA2HO6ohZbGxbazZdIk3KQOPOGVNw6q78I9/lbviIf95eq6tPozeYnJLbjnC8IA==", + "dev": true, + "dependencies": { + "@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1", + "eslint-visitor-keys": "^2.1.0", + "semver": "^6.3.1" + }, + "engines": { + "node": "^10.13.0 || ^12.13.0 || >=14.0.0" + }, + "peerDependencies": { + "@babel/core": "^7.11.0", + "eslint": "^7.5.0 || ^8.0.0 || ^9.0.0" + } + }, + "node_modules/@babel/eslint-parser/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", + "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.7", + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.25", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz", + "integrity": "sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.24.7", + "@babel/helper-validator-option": "^7.24.7", + "browserslist": "^4.22.2", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", + "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", + "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", + "dev": true, + "dependencies": { + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", + "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", + "integrity": "sha512-8AyH3C+74cgCVVXow/myrynrAGv+nTVg5vKu2nZph9x7RcRwzmh0VFallJuFTZ9mx6u4eSdXZfcOzSqTUm0HCA==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz", + "integrity": "sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-module-imports": "^7.24.7", + "@babel/helper-simple-access": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.24.7.tgz", + "integrity": "sha512-zBAIvbCMh5Ts+b86r/CjU+4XGYIs+R1j951gxI3KmmxBMhCg4oQMsv6ZXQ64XOm/cvzfU1FmoCyt6+owc5QMYg==", + "dev": true, + "dependencies": { + "@babel/traverse": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", + "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", + "dev": true, + "dependencies": { + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", + "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz", + "integrity": "sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.7.tgz", + "integrity": "sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==", + "dev": true, + "dependencies": { + "@babel/template": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/template": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", + "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz", + "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.24.7", + "@babel/generator": "^7.24.7", + "@babel/helper-environment-visitor": "^7.24.7", + "@babel/helper-function-name": "^7.24.7", + "@babel/helper-hoist-variables": "^7.24.7", + "@babel/helper-split-export-declaration": "^7.24.7", + "@babel/parser": "^7.24.7", + "@babel/types": "^7.24.7", + "debug": "^4.3.1", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", + "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-validator-identifier": "^7.24.7", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", + "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", + "dev": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "13.19.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", + "integrity": "sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/js": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", + "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "deprecated": "Use @eslint/config-array instead", + "dev": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==", + "deprecated": "Use @eslint/object-schema instead", + "dev": true + }, + "node_modules/@isaacs/cliui": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", + "integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==", + "dev": true, + "dependencies": { + "string-width": "^5.1.2", + "string-width-cjs": "npm:string-width@^4.2.0", + "strip-ansi": "^7.0.1", + "strip-ansi-cjs": "npm:strip-ansi@^6.0.1", + "wrap-ansi": "^8.1.0", + "wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/ansi-styles": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", + "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/emoji-regex": { + "version": "9.2.2", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", + "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", + "dev": true + }, + "node_modules/@isaacs/cliui/node_modules/string-width": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", + "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", + "dev": true, + "dependencies": { + "eastasianwidth": "^0.2.0", + "emoji-regex": "^9.2.2", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@isaacs/cliui/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/@isaacs/cliui/node_modules/wrap-ansi": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz", + "integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^6.1.0", + "string-width": "^5.0.1", + "strip-ansi": "^7.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.2.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.24" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.25", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz", + "integrity": "sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@jsdoc/salty": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@jsdoc/salty/-/salty-0.2.2.tgz", + "integrity": "sha512-A1FrVnc7L9qI2gUGsfN0trTiJNK72Y0CL/VAyrmYEmeKI3pnHDawP64CEev31XLyAAOx2xmDo3tbadPxC0CSbw==", + "dev": true, + "dependencies": { + "lodash": "^4.17.21" + }, + "engines": { + "node": ">=v12.0.0" + } + }, + "node_modules/@kwsites/file-exists": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@kwsites/file-exists/-/file-exists-1.1.1.tgz", + "integrity": "sha512-m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1" + } + }, + "node_modules/@kwsites/promise-deferred": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz", + "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==", + "dev": true + }, + "node_modules/@nicolo-ribaudo/eslint-scope-5-internals": { + "version": "5.1.1-v1", + "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz", + "integrity": "sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg==", + "dev": true, + "dependencies": { + "eslint-scope": "5.1.1" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@oozcitak/dom": { + "version": "1.15.10", + "resolved": "https://registry.npmjs.org/@oozcitak/dom/-/dom-1.15.10.tgz", + "integrity": "sha512-0JT29/LaxVgRcGKvHmSrUTEvZ8BXvZhGl2LASRUgHqDTC1M5g1pLmVv56IYNyt3bG2CUjDkc67wnyZC14pbQrQ==", + "dev": true, + "dependencies": { + "@oozcitak/infra": "1.0.8", + "@oozcitak/url": "1.0.4", + "@oozcitak/util": "8.3.8" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/@oozcitak/infra": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@oozcitak/infra/-/infra-1.0.8.tgz", + "integrity": "sha512-JRAUc9VR6IGHOL7OGF+yrvs0LO8SlqGnPAMqyzOuFZPSZSXI7Xf2O9+awQPSMXgIWGtgUf/dA6Hs6X6ySEaWTg==", + "dev": true, + "dependencies": { + "@oozcitak/util": "8.3.8" + }, + "engines": { + "node": ">=6.0" + } + }, + "node_modules/@oozcitak/url": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@oozcitak/url/-/url-1.0.4.tgz", + "integrity": "sha512-kDcD8y+y3FCSOvnBI6HJgl00viO/nGbQoCINmQ0h98OhnGITrWR3bOGfwYCthgcrV8AnTJz8MzslTQbC3SOAmw==", + "dev": true, + "dependencies": { + "@oozcitak/infra": "1.0.8", + "@oozcitak/util": "8.3.8" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/@oozcitak/util": { + "version": "8.3.8", + "resolved": "https://registry.npmjs.org/@oozcitak/util/-/util-8.3.8.tgz", + "integrity": "sha512-T8TbSnGsxo6TDBJx/Sgv/BlVJL3tshxZP7Aq5R1mSnM5OcHY2dQaxLMu2+E8u3gN0MLOzdjurqN4ZRVuzQycOQ==", + "dev": true, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/@pkgjs/parseargs": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz", + "integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==", + "dev": true, + "optional": true, + "engines": { + "node": ">=14" + } + }, + "node_modules/@pkgr/utils": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@pkgr/utils/-/utils-2.4.2.tgz", + "integrity": "sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "fast-glob": "^3.3.0", + "is-glob": "^4.0.3", + "open": "^9.1.0", + "picocolors": "^1.0.0", + "tslib": "^2.6.0" + }, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/@sinonjs/commons": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", + "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", + "dev": true, + "dependencies": { + "type-detect": "4.0.8" + } + }, + "node_modules/@sinonjs/fake-timers": { + "version": "6.0.1", + "resolved": "git+ssh://git@github.com/sinonjs/fake-timers.git#0bfffc1810990f6e5dc42c5238e48cd90bd41265", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@sinonjs/commons": "^1.7.0" + } + }, + "node_modules/@smithy/types": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-3.0.0.tgz", + "integrity": "sha512-VvWuQk2RKFuOr98gFhjca7fkBS+xLLURT8bUjk5XQoV0ZLm7WPwWPPY3/AwzTLuUBDeoKDCthfe1AsTUWaSEhw==", + "dev": true, + "dependencies": { + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/@tsd/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/@tsd/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-+UgxOvJUl5rQdPFSSOOwhmSmpThm8DJ3HwHxAOq5XYe7CcmG1LcM2QeqWwILzUIT5tbeMqY8qABiCsRtIjk/2g==", + "dev": true + }, + "node_modules/@types/eslint": { + "version": "8.56.10", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz", + "integrity": "sha512-Shavhk87gCtY2fhXDctcfS3e6FdxWkCx1iUZ9eEUbh7rTqlZT0/IzOkCOVt0fCjcFuZ9FPYfuezTBImfHCDBGQ==", + "dev": true, + "optional": true, + "peer": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/estree": { + "version": "0.0.50", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz", + "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==", + "dev": true + }, + "node_modules/@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true + }, + "node_modules/@types/linkify-it": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==", + "dev": true + }, + "node_modules/@types/markdown-it": { + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.1.tgz", + "integrity": "sha512-4NpsnpYl2Gt1ljyBGrKMxFYAYvpqbnnkgP/i/g+NLpjEUa3obn1XJCur9YbEXKDAkaXqsR1LbDnGEJ0MmKFxfg==", + "dev": true, + "dependencies": { + "@types/linkify-it": "^5", + "@types/mdurl": "^2" + } + }, + "node_modules/@types/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==", + "dev": true + }, + "node_modules/@types/minimist": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.2.tgz", + "integrity": "sha512-jhuKLIRrhvCPLqwPcx6INqmKeiA5EWrsCOPhrlFSrbrmU4ZMPjj5Ul/oLCMDO98XRUIwVm78xICz4EPCektzeQ==", + "dev": true + }, + "node_modules/@types/node": { + "version": "22.5.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.3.tgz", + "integrity": "sha512-njripolh85IA9SQGTAqbmnNZTdxv7X/4OYGPz8tgy5JDr8MP+uDBa921GpYEoDDnwm0Hmn5ZPeJgiiSTPoOzkQ==", + "dev": true, + "dependencies": { + "undici-types": "~6.19.2" + } + }, + "node_modules/@types/normalize-package-data": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", + "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", + "dev": true + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true + }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, + "node_modules/acorn": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/anymatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/append-transform": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", + "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", + "dev": true, + "dependencies": { + "default-require-extensions": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA= sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", + "dev": true + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true + }, + "node_modules/args": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/args/-/args-5.0.1.tgz", + "integrity": "sha512-1kqmFCFsPffavQFGt8OxJdIcETti99kySRUPMpOhaGjL6mRJn8HFU1OxKY5bMqfZKUwTQc1mZkAjmGYaVOHFtQ==", + "dev": true, + "dependencies": { + "camelcase": "5.0.0", + "chalk": "2.4.2", + "leven": "2.1.0", + "mri": "1.1.4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/array-find-index": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", + "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E= sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/asap": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", + "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY= sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==", + "dev": true + }, + "node_modules/async-hook-domain": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/async-hook-domain/-/async-hook-domain-2.0.4.tgz", + "integrity": "sha512-14LjCmlK1PK8eDtTezR6WX8TMaYNIzBIsd2D1sGoGjgx0BuNMMoSdk7i/drlbtamy0AWv9yv2tkB+ASdmeqFIw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/aws4": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.0.tgz", + "integrity": "sha512-3AungXC4I8kKsS9PuS4JH2nc+0bVY/mjgrephHTIi8fpEeGsTHBUJeosp0Wc1myYMElmD0B3Oc4XL/HVJ4PV2g==" + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/basic-auth-parser": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/basic-auth-parser/-/basic-auth-parser-0.0.2.tgz", + "integrity": "sha1-zp5xp38jwSee7NJlmypGJEwVbkE= sha512-Y7OBvWn+JnW45JWHLY6ybYub2k9cXCMrtCyO1Hds2s6eqClqWhPnOQpgXUPjAiMHj+A8TEPIQQ1dYENnJoBOHQ==", + "dev": true + }, + "node_modules/big-integer": { + "version": "1.6.51", + "resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.51.tgz", + "integrity": "sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/bind-obj-methods": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bind-obj-methods/-/bind-obj-methods-3.0.0.tgz", + "integrity": "sha512-nLEaaz3/sEzNSyPWRsN9HNsqwk1AUyECtGj+XwGdIi3xABnEqecvXtIJ0wehQXuuER5uZ/5fTs2usONgYjG+iw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/bluebird": { + "version": "3.7.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", + "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", + "dev": true + }, + "node_modules/bplist-parser": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/bplist-parser/-/bplist-parser-0.2.0.tgz", + "integrity": "sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==", + "dev": true, + "dependencies": { + "big-integer": "^1.6.44" + }, + "engines": { + "node": ">= 5.10.0" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.23.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz", + "integrity": "sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001629", + "electron-to-chromium": "^1.4.796", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.16" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/bundle-name": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bundle-name/-/bundle-name-3.0.0.tgz", + "integrity": "sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==", + "dev": true, + "dependencies": { + "run-applescript": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/caching-transform": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", + "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", + "dev": true, + "dependencies": { + "hasha": "^5.0.0", + "make-dir": "^3.0.0", + "package-hash": "^4.0.0", + "write-file-atomic": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", + "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/camelcase-keys/node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001632", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001632.tgz", + "integrity": "sha512-udx3o7yHJfUxMLkGohMlVHCvFvWmirKh9JAH/d7WOLPetlH+LTL5cocMZ0t7oZx/mdlOWXti97xLZWc8uURRHg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/catharsis": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/catharsis/-/catharsis-0.9.0.tgz", + "integrity": "sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==", + "dev": true, + "dependencies": { + "lodash": "^4.17.15" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/chokidar": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", + "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", + "dev": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cli-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-4.0.0.tgz", + "integrity": "sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==", + "dev": true, + "dependencies": { + "restore-cursor": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cli-spinners": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.9.2.tgz", + "integrity": "sha512-ywqV+5MmyL4E7ybXgKys4DugZbX0FC6LnwrhjuykIjnK9k8OQacQ7axGKnjDXWNhns0xot3bZI5h55H8yo9cJg==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true, + "bin": { + "color-support": "bin.js" + } + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs= sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/convert-hrtime": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/convert-hrtime/-/convert-hrtime-5.0.0.tgz", + "integrity": "sha512-lOETlkIeYSJWcbbcvjRKGxVMXJR+8+OQb/mTPbA4ObPMytYIsUbuOE0Jzy60hjARYszq1id0j8KgVhC+WGZVTg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/cross-zip": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/cross-zip/-/cross-zip-4.0.1.tgz", + "integrity": "sha512-n63i0lZ0rvQ6FXiGQ+/JFCKAUyPFhLQYJIqKaa+tSJtfKeULF/IDNDAbdnSIxgS4NTuw2b0+lj8LzfITuq+ZxQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "engines": { + "node": ">=12.10" + } + }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.0.tgz", + "integrity": "sha512-Vr3mLBA8qWmcuschSLAOogKgQ/Jwxulv3RNE4FXnYWRGujzrRWQI4m12fQqRkwX06C0KanhLr4hK+GydchZsaA==", + "dev": true, + "engines": { + "node": ">= 12" + } + }, + "node_modules/debug": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", + "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/debug/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "node_modules/debuglog": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/debuglog/-/debuglog-1.0.1.tgz", + "integrity": "sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI= sha512-syBZ+rnAK3EgMsH2aYEOLUW7mZSY9Gb+0wUMCFsZvcmiz+HigA0LOcq/HoQqVuGG+EKykunc7QG2bzrponfaSw==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decamelize-keys": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.0.tgz", + "integrity": "sha1-0XGoeTMlKAfrPLYdwcFEXQeN8tk= sha512-ocLWuYzRPoS9bfiSdDd3cxvrzovVMZnRDVEzAs+hWIVXGDbHxWMECij2OBuyB/An0FFW/nLuq6Kv1i/YC5Qfzg==", + "dev": true, + "dependencies": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decamelize-keys/node_modules/map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha1-2TPOuSBdgr3PSIb2dCvcK03qFG0= sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/dedent": { + "version": "1.5.3", + "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz", + "integrity": "sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ==", + "dev": true, + "peerDependencies": { + "babel-plugin-macros": "^3.1.0" + }, + "peerDependenciesMeta": { + "babel-plugin-macros": { + "optional": true + } + } + }, + "node_modules/deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= sha512-GtxAN4HvBachZzm4OnWqc45ESpUCMwkYcsjnsPs23FwJbsO+k4t0k9bQCgOmzIlpHO28+WPK/KRbRk0DDHuuDw==", + "dev": true + }, + "node_modules/deepmerge": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", + "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/default-browser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/default-browser/-/default-browser-4.0.0.tgz", + "integrity": "sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==", + "dev": true, + "dependencies": { + "bundle-name": "^3.0.0", + "default-browser-id": "^3.0.0", + "execa": "^7.1.1", + "titleize": "^3.0.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-browser-id": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz", + "integrity": "sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==", + "dev": true, + "dependencies": { + "bplist-parser": "^0.2.0", + "untildify": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/default-require-extensions": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.0.tgz", + "integrity": "sha512-ek6DpXq/SCpvjhpFsLFRVtIxJCRw6fUR42lYMVZuUMK7n8eMz4Uh5clckdBjEpLhn/gEBZo7hDJnJcwdKLKQjg==", + "dev": true, + "dependencies": { + "strip-bom": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/define-lazy-prop": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/define-lazy-prop/-/define-lazy-prop-3.0.0.tgz", + "integrity": "sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/dezalgo": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.4.tgz", + "integrity": "sha512-rXSP0bf+5n0Qonsb+SVVfNfIsimO4HEtmnIpPHY8Q1UCzKlQrDMfdobr8nJOOsRgWCyMRqeSBQzmWUMq7zvVig==", + "dev": true, + "dependencies": { + "asap": "^2.0.0", + "wrappy": "1" + } + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "dependencies": { + "path-type": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/eastasianwidth": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", + "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", + "dev": true + }, + "node_modules/electron-to-chromium": { + "version": "1.4.799", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.799.tgz", + "integrity": "sha512-3D3DwWkRTzrdEpntY0hMLYwj7SeBk1138CkPE8sBDSj3WzrzOiG2rHm3luw8jucpf+WiyLBCZyU9lMHyQI9M9Q==", + "dev": true + }, + "node_modules/emoji-regex": { + "version": "10.3.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-10.3.0.tgz", + "integrity": "sha512-QpLs9D9v9kArv4lfDEgg1X/gN5XLnf/A6l9cs8SPZLRZR3ZkY9+kwIQTxm+fsSej5UMYGE8fdoaZVIBlqG0XTw==", + "dev": true + }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true + }, + "node_modules/escalade": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", + "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint": { + "version": "8.57.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", + "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "dev": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.57.0", + "@humanwhocodes/config-array": "^0.11.14", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-prettier": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", + "dev": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-formatter-pretty": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/eslint-formatter-pretty/-/eslint-formatter-pretty-4.1.0.tgz", + "integrity": "sha512-IsUTtGxF1hrH6lMWiSl1WbGaiP01eT6kzywdY1U+zLc0MP+nwEnUiS9UI8IaOTUhTeQJLlCEWIbXINBH4YJbBQ==", + "dev": true, + "dependencies": { + "@types/eslint": "^7.2.13", + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.0", + "eslint-rule-docs": "^1.1.5", + "log-symbols": "^4.0.0", + "plur": "^4.0.0", + "string-width": "^4.2.0", + "supports-hyperlinks": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-formatter-pretty/node_modules/@types/eslint": { + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.29.0.tgz", + "integrity": "sha512-VNcvioYDH8/FxaeTKkM4/TiTwt6pBV9E3OfGmvaw8tPl0rrHCJ4Ll15HRT+pMiFAf/MLQvAzC+6RzUMEL9Ceng==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/eslint-formatter-pretty/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/eslint-formatter-pretty/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/eslint-formatter-pretty/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/eslint-formatter-pretty/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/eslint-formatter-pretty/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/eslint-formatter-pretty/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint-formatter-pretty/node_modules/is-unicode-supported": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", + "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-formatter-pretty/node_modules/log-symbols": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", + "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", + "dev": true, + "dependencies": { + "chalk": "^4.1.0", + "is-unicode-supported": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint-formatter-pretty/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint-formatter-pretty/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint-plugin-prettier": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz", + "integrity": "sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==", + "dev": true, + "dependencies": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.8.6" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-plugin-prettier" + }, + "peerDependencies": { + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "eslint-config-prettier": "*", + "prettier": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, + "eslint-config-prettier": { + "optional": true + } + } + }, + "node_modules/eslint-rule-docs": { + "version": "1.1.231", + "resolved": "https://registry.npmjs.org/eslint-rule-docs/-/eslint-rule-docs-1.1.231.tgz", + "integrity": "sha512-egHz9A1WG7b8CS0x1P6P/Rj5FqZOjray/VjpJa14tMZalfRKvpE2ONJ3plCM7+PcinmU4tcmbPLv0VtwzSdLVA==", + "dev": true + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz", + "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/eslint/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/eslint/node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/eslint/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/eslint/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/eslint/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint/node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/eslint/node_modules/globals": { + "version": "13.19.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.19.0.tgz", + "integrity": "sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/eslint/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/events-to-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-1.1.2.tgz", + "integrity": "sha1-LUH1Y+H+QA7Uli/hpNXGp1Od9/Y= sha512-inRWzRY7nG+aXZxBzEqYKB3HPgwflZRopAjDCHv0whhRx+MTUr1ei0ICZUypdyE0HRm4L2d5VEcIqLD6yl+BFA==", + "dev": true + }, + "node_modules/execa": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-7.2.0.tgz", + "integrity": "sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.1", + "human-signals": "^4.3.0", + "is-stream": "^3.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^5.1.0", + "onetime": "^6.0.0", + "signal-exit": "^3.0.7", + "strip-final-newline": "^3.0.0" + }, + "engines": { + "node": "^14.18.0 || ^16.14.0 || >=18.0.0" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/execa/node_modules/mimic-fn": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-4.0.0.tgz", + "integrity": "sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/execa/node_modules/onetime": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-6.0.0.tgz", + "integrity": "sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==", + "dev": true, + "dependencies": { + "mimic-fn": "^4.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/faker": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/faker/-/faker-5.5.3.tgz", + "integrity": "sha512-wLTv2a28wjUyWkbnX7u/ABZBkUkIF2fCd73V6P2oFqEGEktDfzWx4UxrSqtPRw0xPRAcjeAOIiJWqZm3pP4u3g==", + "dev": true + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, + "node_modules/fast-glob": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", + "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "dev": true, + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.4" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true + }, + "node_modules/fastq": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.11.1.tgz", + "integrity": "sha512-HOnr8Mc60eNYl1gzwp6r5RoUyAn5/glBolUzP/Ez6IFVPMPirxn/9phgL6zhOtaTy7ISwPvQ+wT+hfcRZh/bzw==", + "dev": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-cache-dir": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", + "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", + "dev": true, + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/findit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findit/-/findit-2.0.0.tgz", + "integrity": "sha1-ZQnwEmr0wXhVHPqZOU4DLhOk1W4= sha512-ENZS237/Hr8bjczn5eKuBohLgaD0JyUd0arxretR1f9RO46vZHA1b2y0VorgGV3WaOT3c+78P8h7v4JGJ1i/rg==", + "dev": true + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flat-cache/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/flatted": { + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.5.tgz", + "integrity": "sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg==", + "dev": true + }, + "node_modules/foreground-child": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "dev": true, + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, + "node_modules/from2": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", + "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8= sha512-OMcX/4IC/uqEPVgGeyfN22LJk6AZrMkRZHxcHBMBvHScDGgwTm2GT2Wkgtocyd3JfZffjj2kYUDXXII0Fk9W0g==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.0" + } + }, + "node_modules/fromentries": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", + "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/fs-exists-cached": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-exists-cached/-/fs-exists-cached-1.0.0.tgz", + "integrity": "sha1-zyVVTKBQ3EmuZla0HeQiWJidy84= sha512-kSxoARUDn4F2RPXX48UXnaFKwVU7Ivd/6qpzZL29MCDmr9sTvybv4gFCp+qaI4fM9m0z9fgz/yJvi56GAz+BZg==", + "dev": true + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8= sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/function-loop": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/function-loop/-/function-loop-2.0.1.tgz", + "integrity": "sha512-ktIR+O6i/4h+j/ZhZJNdzeI4i9lEPeEK6UPR2EVyTVBqOwcU3Za9xYKLH64ZR9HmcROyRrOkizNyjjtWJzDDkQ==", + "dev": true + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-east-asian-width": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz", + "integrity": "sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "deprecated": "Glob versions prior to v9 are no longer supported", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/globby": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.4.tgz", + "integrity": "sha512-9O4MVG9ioZJ08ffbcyVYyLOJLk5JQ688pJ4eMGLpdWLHq/Wr1D9BlriLQyL0E+jbkuePVZXYFj47QM/v093wHg==", + "dev": true, + "dependencies": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.10", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", + "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", + "dev": true + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true + }, + "node_modules/hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0= sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/hasha": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", + "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", + "dev": true, + "dependencies": { + "is-stream": "^2.0.0", + "type-fest": "^0.8.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/hasha/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, + "node_modules/hpagent": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/hpagent/-/hpagent-1.2.0.tgz", + "integrity": "sha512-A91dYTeIB6NoXG+PxTQpCCDDnfHsW9kc06Lvpu1TEe9gnd6ZFeiBoRO9JvzEv6xK7EX97/dUE8g/vBMTqTS3CA==", + "engines": { + "node": ">=14" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/human-signals": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-4.3.1.tgz", + "integrity": "sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==", + "dev": true, + "engines": { + "node": ">=14.18.0" + } + }, + "node_modules/ignore": { + "version": "5.2.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", + "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o= sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/into-stream": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/into-stream/-/into-stream-6.0.0.tgz", + "integrity": "sha512-XHbaOAvP+uFKUFsOgoNPRjLkwB+I22JFPFe5OjTkQ0nwgj6+pSjb4NmB6VMxaPshLiOf+zcpOCBQuLwC1KHhZA==", + "dev": true, + "dependencies": { + "from2": "^2.3.0", + "p-is-promise": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/irregular-plurals": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.3.0.tgz", + "integrity": "sha512-MVBLKUTangM3EfRPFROhmWQQKRDsrgI83J8GS3jXy+OwYqiR2/aoWndYQ5416jLE3uaGgLH7ncme3X9y09gZ3g==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-core-module": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz", + "integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-docker": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz", + "integrity": "sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-inside-container": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-inside-container/-/is-inside-container-1.0.0.tgz", + "integrity": "sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==", + "dev": true, + "dependencies": { + "is-docker": "^3.0.0" + }, + "bin": { + "is-inside-container": "cli.js" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-interactive": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-interactive/-/is-interactive-2.0.0.tgz", + "integrity": "sha512-qP1vozQRI+BMOPcjFzrjXuQvdak2pHNUMZoeG2eRbiSqyvbEf/wQtEOTOX1guk6E3t36RkaqiSt8A/6YElNxLQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4= sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-stream": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-3.0.0.tgz", + "integrity": "sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "dev": true + }, + "node_modules/is-unicode-supported": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-2.0.0.tgz", + "integrity": "sha512-FRdAyx5lusK1iHG0TWpVtk9+1i+GjrzRffhDg4ovQ7mcidMQ6mj+MhKPmvh7Xwyv5gIS06ns49CA7Sqg7lC22Q==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-wsl": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "dependencies": { + "is-docker": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-wsl/node_modules/is-docker": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/is-docker/-/is-docker-2.2.1.tgz", + "integrity": "sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==", + "dev": true, + "bin": { + "is-docker": "cli.js" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", + "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-hook": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", + "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", + "dev": true, + "dependencies": { + "append-transform": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/istanbul-lib-processinfo": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.3.tgz", + "integrity": "sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg==", + "dev": true, + "dependencies": { + "archy": "^1.0.0", + "cross-spawn": "^7.0.3", + "istanbul-lib-coverage": "^3.2.0", + "p-map": "^3.0.0", + "rimraf": "^3.0.0", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-processinfo/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.0.tgz", + "integrity": "sha512-wcdi+uAKzfiGT2abPpKZ0hSU1rGQjUQnLvtY5MpQ7QCTahD3VODhcu4wcfY1YtkGaDD5yuydOLINXsfbus9ROw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^3.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.0.tgz", + "integrity": "sha512-c16LpFRkR8vQXyHZ5nLpY35JZtzj1PQY1iZmesUbf1FZHbIupcWfjgOXBY9YHkLEQ6puz1u4Dgj6qmU/DisrZg==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-reports": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.0.2.tgz", + "integrity": "sha512-9tZvz7AiR3PEDNGiV9vIouQ/EAcqMXFmkcA1CDFTwOB98OZVDL0PH9glHotf5Ugp6GCOTypfzGWI/OqjWNCRUw==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jackspeak": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-1.4.2.tgz", + "integrity": "sha512-GHeGTmnuaHnvS+ZctRB01bfxARuu9wW83ENbuiweu07SFcVlZrJpcshSre/keGT7YGBhLHg/+rXCNSrsEHKU4Q==", + "dev": true, + "dependencies": { + "cliui": "^7.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/js2xmlparser": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz", + "integrity": "sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==", + "dev": true, + "dependencies": { + "xmlcreate": "^2.0.4" + } + }, + "node_modules/jsdoc": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-4.0.3.tgz", + "integrity": "sha512-Nu7Sf35kXJ1MWDZIMAuATRQTg1iIPdzh7tqJ6jjvaU/GfDf+qi5UV8zJR3Mo+/pYFvm8mzay4+6O5EWigaQBQw==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.20.15", + "@jsdoc/salty": "^0.2.1", + "@types/markdown-it": "^14.1.1", + "bluebird": "^3.7.2", + "catharsis": "^0.9.0", + "escape-string-regexp": "^2.0.0", + "js2xmlparser": "^4.0.2", + "klaw": "^3.0.0", + "markdown-it": "^14.1.0", + "markdown-it-anchor": "^8.6.7", + "marked": "^4.0.10", + "mkdirp": "^1.0.4", + "requizzle": "^0.2.3", + "strip-json-comments": "^3.1.0", + "underscore": "~1.13.2" + }, + "bin": { + "jsdoc": "jsdoc.js" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/jsdoc/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE= sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true + }, + "node_modules/json11": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/json11/-/json11-1.1.2.tgz", + "integrity": "sha512-5r1RHT1/Gr/jsI/XZZj/P6F11BKM8xvTaftRuiLkQI9Z2PFDukM82Ysxw8yDszb3NJP/NKnRlSGmhUdG99rlBw==", + "bin": { + "json11": "dist/cli.mjs" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/klaw": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-3.0.0.tgz", + "integrity": "sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.9" + } + }, + "node_modules/leven": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz", + "integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA= sha512-nvVPLpIHUxCUoRLrFqTgSxXJ614d8AgQoWl7zPe/2VadE8+1dpU3LBhowRuBAcuwruWtOdD8oYC9jDNJjXDPyA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/libtap": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/libtap/-/libtap-1.4.0.tgz", + "integrity": "sha512-STLFynswQ2A6W14JkabgGetBNk6INL1REgJ9UeNKw5llXroC2cGLgKTqavv0sl8OLVztLLipVKMcQ7yeUcqpmg==", + "dev": true, + "dependencies": { + "async-hook-domain": "^2.0.4", + "bind-obj-methods": "^3.0.0", + "diff": "^4.0.2", + "function-loop": "^2.0.1", + "minipass": "^3.1.5", + "own-or": "^1.0.0", + "own-or-env": "^1.0.2", + "signal-exit": "^3.0.4", + "stack-utils": "^2.0.4", + "tap-parser": "^11.0.0", + "tap-yaml": "^1.0.0", + "tcompare": "^5.0.6", + "trivial-deferred": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/license-checker": { + "version": "25.0.1", + "resolved": "https://registry.npmjs.org/license-checker/-/license-checker-25.0.1.tgz", + "integrity": "sha512-mET5AIwl7MR2IAKYYoVBBpV0OnkKQ1xGj2IMMeEFIs42QAkEVjRtFZGWmQ28WeU7MP779iAgOaOy93Mn44mn6g==", + "dev": true, + "dependencies": { + "chalk": "^2.4.1", + "debug": "^3.1.0", + "mkdirp": "^0.5.1", + "nopt": "^4.0.1", + "read-installed": "~4.0.3", + "semver": "^5.5.0", + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0", + "spdx-satisfies": "^4.0.0", + "treeify": "^1.1.0" + }, + "bin": { + "license-checker": "bin/license-checker" + } + }, + "node_modules/license-checker/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/license-checker/node_modules/mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/license-checker/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/lines-and-columns": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.1.6.tgz", + "integrity": "sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= sha512-8ZmlJFVK9iCmtLz19HpSsR8HaAMWBT284VMNednLwlIMDP2hJDCIhUp0IZ2xUcZ+Ob6BM0VvCSJwzASDM45NLQ==", + "dev": true + }, + "node_modules/linkify-it": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==", + "dev": true, + "dependencies": { + "uc.micro": "^2.0.0" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI= sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true + }, + "node_modules/log-symbols": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-6.0.0.tgz", + "integrity": "sha512-i24m8rpwhmPIS4zscNzK6MSEhk0DUWa/8iYQWxhffV8jkI4Phvs3F+quL5xvS0gdQR0FyTCMMH33Y78dDTzzIw==", + "dev": true, + "dependencies": { + "chalk": "^5.3.0", + "is-unicode-supported": "^1.3.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/log-symbols/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/log-symbols/node_modules/is-unicode-supported": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-1.3.0.tgz", + "integrity": "sha512-43r2mRvz+8JRIKnWJ+3j8JtjRKZ6GmjzfaE/qiBJnikNnYv/6bagRJ1kUhNk8R5EX/GkobD+r+sfxCPJsiKBLQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/map-obj": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz", + "integrity": "sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/markdown-it": { + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-14.1.0.tgz", + "integrity": "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==", + "dev": true, + "dependencies": { + "argparse": "^2.0.1", + "entities": "^4.4.0", + "linkify-it": "^5.0.0", + "mdurl": "^2.0.0", + "punycode.js": "^2.3.1", + "uc.micro": "^2.1.0" + }, + "bin": { + "markdown-it": "bin/markdown-it.mjs" + } + }, + "node_modules/markdown-it-anchor": { + "version": "8.6.7", + "resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.7.tgz", + "integrity": "sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==", + "dev": true, + "peerDependencies": { + "@types/markdown-it": "*", + "markdown-it": "*" + } + }, + "node_modules/marked": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.2.4.tgz", + "integrity": "sha512-Wcc9ikX7Q5E4BYDPvh1C6QNSxrjC9tBgz+A/vAhp59KXUgachw++uMvMKiSW8oA85nopmPZcEvBoex/YLMsiyA==", + "dev": true, + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==", + "dev": true + }, + "node_modules/meow": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/meow/-/meow-9.0.0.tgz", + "integrity": "sha512-+obSblOQmRhcyBt62furQqRAQpNyWXo8BuQ5bN7dG8wmwQ+vwHKp/rCFD4CrTP8CsDQD1sjoZ94K417XEUk8IQ==", + "dev": true, + "dependencies": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize": "^1.2.0", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow/node_modules/hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/meow/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/meow/node_modules/normalize-package-data": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^4.0.1", + "is-core-module": "^2.5.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/meow/node_modules/type-fest": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "dev": true, + "dependencies": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minipass/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/mri": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.4.tgz", + "integrity": "sha512-6y7IjGPm8AzlvoUrwAaw1tLnUBudaS3752vcd8JtrpGGQn+rXIe63LFVHm/YMwtqAuh+LJPCFdlLYPWM1nYn6w==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc= sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "dev": true, + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, + "node_modules/node-preload": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", + "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", + "dev": true, + "dependencies": { + "process-on-spawn": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/node-releases": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "dev": true + }, + "node_modules/nopt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", + "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", + "dev": true, + "dependencies": { + "abbrev": "1", + "osenv": "^0.1.4" + }, + "bin": { + "nopt": "bin/nopt.js" + } + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/npm-normalize-package-bin": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/npm-normalize-package-bin/-/npm-normalize-package-bin-1.0.1.tgz", + "integrity": "sha512-EPfafl6JL5/rU+ot6P3gRSCpPDW5VmIzX959Ob1+ySFUuuYHWHekXpwdUZcKP5C+DS4GEtdJluwBjnsNDl+fSA==", + "dev": true + }, + "node_modules/npm-run-path": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-5.1.0.tgz", + "integrity": "sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==", + "dev": true, + "dependencies": { + "path-key": "^4.0.0" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/npm-run-path/node_modules/path-key": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-4.0.0.tgz", + "integrity": "sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/nyc": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", + "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", + "dev": true, + "dependencies": { + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "caching-transform": "^4.0.0", + "convert-source-map": "^1.7.0", + "decamelize": "^1.2.0", + "find-cache-dir": "^3.2.0", + "find-up": "^4.1.0", + "foreground-child": "^2.0.0", + "get-package-type": "^0.1.0", + "glob": "^7.1.6", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-hook": "^3.0.0", + "istanbul-lib-instrument": "^4.0.0", + "istanbul-lib-processinfo": "^2.0.2", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.2", + "make-dir": "^3.0.0", + "node-preload": "^0.2.1", + "p-map": "^3.0.0", + "process-on-spawn": "^1.0.0", + "resolve-from": "^5.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "spawn-wrap": "^2.0.0", + "test-exclude": "^6.0.0", + "yargs": "^15.0.2" + }, + "bin": { + "nyc": "bin/nyc.js" + }, + "engines": { + "node": ">=8.9" + } + }, + "node_modules/nyc/node_modules/convert-source-map": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", + "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.1" + } + }, + "node_modules/nyc/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/nyc/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E= sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/open": { + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/open/-/open-9.1.0.tgz", + "integrity": "sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==", + "dev": true, + "dependencies": { + "default-browser": "^4.0.0", + "define-lazy-prop": "^3.0.0", + "is-inside-container": "^1.0.0", + "is-wsl": "^2.2.0" + }, + "engines": { + "node": ">=14.16" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/opener": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", + "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", + "dev": true, + "bin": { + "opener": "bin/opener-bin.js" + } + }, + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/ora": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/ora/-/ora-8.0.1.tgz", + "integrity": "sha512-ANIvzobt1rls2BDny5fWZ3ZVKyD6nscLvfFRpQgfWsythlcsVUC9kL0zq6j2Z5z9wwp1kd7wpsD/T9qNPVLCaQ==", + "dev": true, + "dependencies": { + "chalk": "^5.3.0", + "cli-cursor": "^4.0.0", + "cli-spinners": "^2.9.2", + "is-interactive": "^2.0.0", + "is-unicode-supported": "^2.0.0", + "log-symbols": "^6.0.0", + "stdin-discarder": "^0.2.1", + "string-width": "^7.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/ora/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/ora/node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/ora/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M= sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "deprecated": "This package is no longer supported.", + "dev": true, + "dependencies": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "node_modules/own-or": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/own-or/-/own-or-1.0.0.tgz", + "integrity": "sha1-Tod/vtqaLsgAD7wLyuOWRe6L+Nw= sha512-NfZr5+Tdf6MB8UI9GLvKRs4cXY8/yB0w3xtt84xFdWy8hkGjn+JFc60VhzS/hFRfbyxFcGYMTjnF4Me+RbbqrA==", + "dev": true + }, + "node_modules/own-or-env": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/own-or-env/-/own-or-env-1.0.2.tgz", + "integrity": "sha512-NQ7v0fliWtK7Lkb+WdFqe6ky9XAzYmlkXthQrBbzlYbmFKoAYbDDcwmOm6q8kOuwSRXW8bdL5ORksploUJmWgw==", + "dev": true, + "dependencies": { + "own-or": "^1.0.0" + } + }, + "node_modules/p-is-promise": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-3.0.0.tgz", + "integrity": "sha512-Wo8VsW4IRQSKVXsJCn7TomUaVtyfjVDn3nUP7kE967BQk0CwFpdbZs0X0uk5sW9mkBa9eNM7hCMaG93WUAwxYQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/package-hash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", + "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.15", + "hasha": "^5.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", + "integrity": "sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==", + "dev": true + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18= sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-scurry": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz", + "integrity": "sha512-ypGJsmGtdXUOeM5u93TyeIEfEhM6s+ljAhrk5vAvSx8uyY/02OvrZnA0YNGUrPXfpJMgI1ODd3nwz8Npx4O4cg==", + "dev": true, + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.0.0.tgz", + "integrity": "sha512-Qv32eSV1RSCfhY3fpPE2GNZ8jgM9X7rdAfemLWqTUxwiyIC4jJ6Sy0fZ8H+oLWevO6i4/bizg7c8d8i6bxrzbA==", + "dev": true, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/path-scurry/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", + "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/plur": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/plur/-/plur-4.0.0.tgz", + "integrity": "sha512-4UGewrYgqDFw9vV6zNV+ADmPAUAfJPKtGvb/VdpQAx25X5f3xXdGdyOEVFwkl8Hl/tl7+xbeHqSEM+D5/TirUg==", + "dev": true, + "dependencies": { + "irregular-plurals": "^3.2.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.1.tgz", + "integrity": "sha512-7CAwy5dRsxs8PHXT3twixW9/OEll8MLE0VRPCJyl7CkS6VHGPSlsVaWTiASPTyGyYRyApxlaWTzwUxVNrhcwDg==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE= sha512-66hKPCr+72mlfiSjlEB1+45IjXSqvVAIy6mocupoww4tBFE9R9IhwwUGoI4G++Tc9Aq+2rxOt0RFU6gPcrte0A==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "node_modules/process-on-spawn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", + "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", + "dev": true, + "dependencies": { + "fromentries": "^1.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/proxy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/proxy/-/proxy-1.0.2.tgz", + "integrity": "sha512-KNac2ueWRpjbUh77OAFPZuNdfEqNynm9DD4xHT14CccGpW8wKZwEkN0yjlb7X9G9Z9F55N0Q+1z+WfgAhwYdzQ==", + "dev": true, + "dependencies": { + "args": "5.0.1", + "basic-auth-parser": "0.0.2", + "debug": "^4.1.1" + }, + "bin": { + "proxy": "bin/proxy.js" + } + }, + "node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/punycode.js": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode.js/-/punycode.js-2.3.1.tgz", + "integrity": "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-installed": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/read-installed/-/read-installed-4.0.3.tgz", + "integrity": "sha1-/5uLZ/GH0eTCm5/rMfayI6zRkGc= sha512-O03wg/IYuV/VtnK2h/KXEt9VIbMUFbk3ERG0Iu4FhLZw0EP0T9znqrYDGn6ncbEsXUFaUjiVAWXHzxwt3lhRPQ==", + "deprecated": "This package is no longer supported.", + "dev": true, + "dependencies": { + "debuglog": "^1.0.1", + "read-package-json": "^2.0.0", + "readdir-scoped-modules": "^1.0.0", + "semver": "2 || 3 || 4 || 5", + "slide": "~1.1.3", + "util-extend": "^1.0.1" + }, + "optionalDependencies": { + "graceful-fs": "^4.1.2" + } + }, + "node_modules/read-installed/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/read-package-json": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/read-package-json/-/read-package-json-2.1.2.tgz", + "integrity": "sha512-D1KmuLQr6ZSJS0tW8hf3WGpRlwszJOXZ3E8Yd/DNRaM5d+1wVRZdHlpGBLAuovjr28LbWvjpWkBHMxpRGGjzNA==", + "deprecated": "This package is no longer supported. Please use @npmcli/package-json instead.", + "dev": true, + "dependencies": { + "glob": "^7.1.1", + "json-parse-even-better-errors": "^2.3.0", + "normalize-package-data": "^2.0.0", + "npm-normalize-package-bin": "^1.0.0" + } + }, + "node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readdir-scoped-modules": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/readdir-scoped-modules/-/readdir-scoped-modules-1.1.0.tgz", + "integrity": "sha512-asaikDeqAQg7JifRsZn1NJZXo9E+VwlyCfbkZhwyISinqk5zNS6266HS5kah6P0SaQKGF6SkNnZVHUzHFYxYDw==", + "deprecated": "This functionality has been moved to @npmcli/fs", + "dev": true, + "dependencies": { + "debuglog": "^1.0.1", + "dezalgo": "^1.0.0", + "graceful-fs": "^4.1.2", + "once": "^1.3.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "dev": true, + "dependencies": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/release-zalgo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", + "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA= sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA==", + "dev": true, + "dependencies": { + "es6-error": "^4.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I= sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "node_modules/requizzle": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/requizzle/-/requizzle-0.2.4.tgz", + "integrity": "sha512-JRrFk1D4OQ4SqovXOgdav+K8EAhSB/LJZqCz8tbX0KObcdeM15Ss59ozWMBWmmINMagCwmqn4ZNryUGpBsl6Jw==", + "dev": true, + "dependencies": { + "lodash": "^4.17.21" + } + }, + "node_modules/resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dev": true, + "dependencies": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/restore-cursor": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-4.0.0.tgz", + "integrity": "sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==", + "dev": true, + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.0.1.tgz", + "integrity": "sha512-9dkvaxAsk/xNXSJzMgFqqMCuFgt2+KsOFek3TMLfo8NCPfWpBmqwyNn5Y+NX56QUYfCtsyhF3ayiboEoUmJk/A==", + "dev": true, + "dependencies": { + "glob": "^11.0.0", + "package-json-from-dist": "^1.0.0" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/rimraf/node_modules/foreground-child": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", + "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^4.0.1" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-11.0.0.tgz", + "integrity": "sha512-9UiX/Bl6J2yaBbxKoEBRm4Cipxgok8kQYcOPEhScPwebu2I0HoQOuYdIO6S3hLuWoZgpDpwQZMzTFxgpkyT76g==", + "dev": true, + "dependencies": { + "foreground-child": "^3.1.0", + "jackspeak": "^4.0.1", + "minimatch": "^10.0.0", + "minipass": "^7.1.2", + "package-json-from-dist": "^1.0.0", + "path-scurry": "^2.0.0" + }, + "bin": { + "glob": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/jackspeak": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-4.0.1.tgz", + "integrity": "sha512-cub8rahkh0Q/bw1+GxP7aeSe29hHHn2V4m29nnDlvCdlgU+3UGxkZp7Z53jLUdpX3jdTO0nJZUDl3xvbWc2Xog==", + "dev": true, + "dependencies": { + "@isaacs/cliui": "^8.0.2" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "optionalDependencies": { + "@pkgjs/parseargs": "^0.11.0" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "10.0.1", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.0.1.tgz", + "integrity": "sha512-ethXTt3SGGR+95gudmqJ1eNhRO7eGEGIgYA9vnPatK4/etz2MEVDno5GMCibdMTuBMyElzIlgxMna3K94XDIDQ==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minipass": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", + "integrity": "sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==", + "dev": true, + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/rimraf/node_modules/signal-exit": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", + "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "dev": true, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-applescript": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/run-applescript/-/run-applescript-5.0.0.tgz", + "integrity": "sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==", + "dev": true, + "dependencies": { + "execa": "^5.0.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-applescript/node_modules/execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sindresorhus/execa?sponsor=1" + } + }, + "node_modules/run-applescript/node_modules/human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true, + "engines": { + "node": ">=10.17.0" + } + }, + "node_modules/run-applescript/node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/run-applescript/node_modules/npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "dependencies": { + "path-key": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/run-applescript/node_modules/strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/secure-json-parse": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-2.7.0.tgz", + "integrity": "sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==" + }, + "node_modules/semver": { + "version": "7.6.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", + "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc= sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "dev": true + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/simple-git": { + "version": "3.24.0", + "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.24.0.tgz", + "integrity": "sha512-QqAKee9Twv+3k8IFOFfPB2hnk6as6Y6ACUpwCtQvRYBAes23Wv3SZlHVobAzqcE8gfsisCvPw3HGW3HYM+VYYw==", + "dev": true, + "dependencies": { + "@kwsites/file-exists": "^1.1.1", + "@kwsites/promise-deferred": "^1.1.1", + "debug": "^4.3.4" + }, + "funding": { + "type": "github", + "url": "https://github.com/steveukx/git-js?sponsor=1" + } + }, + "node_modules/simple-statistics": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/simple-statistics/-/simple-statistics-7.8.3.tgz", + "integrity": "sha512-JFvMY00t6SBGtwMuJ+nqgsx9ylkMiJ5JlK9bkj8AdvniIe5615wWQYkKHXe84XtSuc40G/tlrPu0A5/NlJvv8A==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/slide": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/slide/-/slide-1.1.6.tgz", + "integrity": "sha1-VusCfWW00tzmyy4tMsTUr8nh1wc= sha512-NwrtjCg+lZoqhFU8fOwl4ay2ei8PaqCBOUV3/ektPY9trO1yQ1oXEfmHAhKArUVUr/hOHvy5f6AdP17dCM0zMw==", + "dev": true, + "engines": { + "node": "*" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/spawn-wrap": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", + "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", + "dev": true, + "dependencies": { + "foreground-child": "^2.0.0", + "is-windows": "^1.0.2", + "make-dir": "^3.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "which": "^2.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/spawn-wrap/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/spdx-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/spdx-compare/-/spdx-compare-1.0.0.tgz", + "integrity": "sha512-C1mDZOX0hnu0ep9dfmuoi03+eOdDoz2yvK79RxbcrVEG1NO1Ph35yW102DHWKN4pk80nwCgeMmSY5L25VE4D9A==", + "dev": true, + "dependencies": { + "array-find-index": "^1.0.2", + "spdx-expression-parse": "^3.0.0", + "spdx-ranges": "^2.0.0" + } + }, + "node_modules/spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.10", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.10.tgz", + "integrity": "sha512-oie3/+gKf7QtpitB0LYLETe+k8SifzsX4KixvpOsbI6S0kRiRQ5MKOio8eMSAKQ17N06+wdEOXRiId+zOxo0hA==", + "dev": true + }, + "node_modules/spdx-ranges": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/spdx-ranges/-/spdx-ranges-2.1.1.tgz", + "integrity": "sha512-mcdpQFV7UDAgLpXEE/jOMqvK4LBoO0uTQg0uvXUewmEFhpiZx5yJSZITHB8w1ZahKdhfZqP5GPEOKLyEq5p8XA==", + "dev": true + }, + "node_modules/spdx-satisfies": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/spdx-satisfies/-/spdx-satisfies-4.0.1.tgz", + "integrity": "sha512-WVzZ/cXAzoNmjCWiEluEA3BjHp5tiUmmhn9MK+X0tBbR9sOqtC6UQwmgCNrAIZvNlMuBUYAaHYfb2oqlF9SwKA==", + "dev": true, + "dependencies": { + "spdx-compare": "^1.0.0", + "spdx-expression-parse": "^3.0.0", + "spdx-ranges": "^2.0.0" + } + }, + "node_modules/split2": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/split2/-/split2-4.2.0.tgz", + "integrity": "sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==", + "dev": true, + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "node_modules/stack-utils": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.5.tgz", + "integrity": "sha512-xrQcmYhOsn/1kX+Vraq+7j4oE2j/6BFscZ0etmYg81xuM8Gq0022Pxb8+IqgOFUIaxHs0KaSb7T1+OegiNrNFA==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/stdin-discarder": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/stdin-discarder/-/stdin-discarder-0.2.1.tgz", + "integrity": "sha512-wRXvkxiYhOAduH+LFL/Qpim5zIWKYH1yEGvU0W8PgmabrZZ29iC1LKS8i443SYct12oZmQH7nyEonKiV8RTIsg==", + "dev": true, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/stoppable": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz", + "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==", + "dev": true, + "engines": { + "node": ">=4", + "npm": ">=6" + } + }, + "node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/string-width": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-7.0.0.tgz", + "integrity": "sha512-GPQHj7row82Hjo9hKZieKcHIhaAIKOJvFSIZXuCU9OASVZrMNUaZuz++SPVrBjnLsnk4k+z9f2EIypgxf2vNFw==", + "dev": true, + "dependencies": { + "emoji-regex": "^10.3.0", + "get-east-asian-width": "^1.0.0", + "strip-ansi": "^7.1.0" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/string-width-cjs": { + "name": "string-width", + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/string-width/node_modules/ansi-regex": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", + "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/ansi-regex?sponsor=1" + } + }, + "node_modules/string-width/node_modules/strip-ansi": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "dev": true, + "dependencies": { + "ansi-regex": "^6.0.1" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/chalk/strip-ansi?sponsor=1" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi-cjs": { + "name": "strip-ansi", + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-final-newline": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-3.0.0.tgz", + "integrity": "sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-hyperlinks": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.2.0.tgz", + "integrity": "sha512-6sXEzV5+I5j8Bmq9/vUphGRM/RJNT9SCURJLjwfOg51heRtguGWDzcaBlgAzKhQa0EVNpPEKzQuBwZ8S8WaCeQ==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0", + "supports-color": "^7.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-hyperlinks/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/supports-hyperlinks/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/synckit": { + "version": "0.8.6", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.6.tgz", + "integrity": "sha512-laHF2savN6sMeHCjLRkheIU4wo3Zg9Ln5YOjOo7sZ5dVQW8yF5pPE5SIw1dsPhq3TRp1jisKRCdPhfs/1WMqDA==", + "dev": true, + "dependencies": { + "@pkgr/utils": "^2.4.2", + "tslib": "^2.6.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, + "node_modules/tap": { + "version": "16.3.8", + "resolved": "https://registry.npmjs.org/tap/-/tap-16.3.8.tgz", + "integrity": "sha512-ARpCLtOFST37MholnZm7JMFikGq0x/T9uBdZH83iuddPNgwDTZQiD8+4x7VABUfVWS0ozKUkmHZ5OOzMI3fLPg==", + "bundleDependencies": [ + "ink", + "treport", + "@types/react", + "@isaacs/import-jsx", + "react" + ], + "dev": true, + "dependencies": { + "@isaacs/import-jsx": "^4.0.1", + "@types/react": "^17.0.52", + "chokidar": "^3.3.0", + "findit": "^2.0.0", + "foreground-child": "^2.0.0", + "fs-exists-cached": "^1.0.0", + "glob": "^7.2.3", + "ink": "^3.2.0", + "isexe": "^2.0.0", + "istanbul-lib-processinfo": "^2.0.3", + "jackspeak": "^1.4.2", + "libtap": "^1.4.0", + "minipass": "^3.3.4", + "mkdirp": "^1.0.4", + "nyc": "^15.1.0", + "opener": "^1.5.1", + "react": "^17.0.2", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.6", + "source-map-support": "^0.5.16", + "tap-mocha-reporter": "^5.0.3", + "tap-parser": "^11.0.2", + "tap-yaml": "^1.0.2", + "tcompare": "^5.0.7", + "treport": "^3.0.4", + "which": "^2.0.2" + }, + "bin": { + "tap": "bin/run.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "peerDependencies": { + "coveralls": "^3.1.1", + "flow-remove-types": ">=2.112.0", + "ts-node": ">=8.5.2", + "typescript": ">=3.7.2" + }, + "peerDependenciesMeta": { + "coveralls": { + "optional": true + }, + "flow-remove-types": { + "optional": true + }, + "ts-node": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/tap-mocha-reporter": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/tap-mocha-reporter/-/tap-mocha-reporter-5.0.3.tgz", + "integrity": "sha512-6zlGkaV4J+XMRFkN0X+yuw6xHbE9jyCZ3WUKfw4KxMyRGOpYSRuuQTRJyWX88WWuLdVTuFbxzwXhXuS2XE6o0g==", + "dev": true, + "dependencies": { + "color-support": "^1.1.0", + "debug": "^4.1.1", + "diff": "^4.0.1", + "escape-string-regexp": "^2.0.0", + "glob": "^7.0.5", + "tap-parser": "^11.0.0", + "tap-yaml": "^1.0.0", + "unicode-length": "^2.0.2" + }, + "bin": { + "tap-mocha-reporter": "index.js" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/tap-mocha-reporter/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap-parser": { + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-11.0.2.tgz", + "integrity": "sha512-6qGlC956rcORw+fg7Fv1iCRAY8/bU9UabUAhs3mXRH6eRmVZcNPLheSXCYaVaYeSwx5xa/1HXZb1537YSvwDZg==", + "dev": true, + "dependencies": { + "events-to-array": "^1.0.1", + "minipass": "^3.1.6", + "tap-yaml": "^1.0.0" + }, + "bin": { + "tap-parser": "bin/cmd.js" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/tap-yaml": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tap-yaml/-/tap-yaml-1.0.2.tgz", + "integrity": "sha512-GegASpuqBnRNdT1U+yuUPZ8rEU64pL35WPBpCISWwff4dErS2/438barz7WFJl4Nzh3Y05tfPidZnH+GaV1wMg==", + "dev": true, + "dependencies": { + "yaml": "^1.10.2" + } + }, + "node_modules/tap/node_modules/@ampproject/remapping": { + "version": "2.2.1", + "dev": true, + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/tap/node_modules/@babel/code-frame": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/highlight": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/compat-data": { + "version": "7.22.9", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/core": { + "version": "7.22.9", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.22.5", + "@babel/generator": "^7.22.9", + "@babel/helper-compilation-targets": "^7.22.9", + "@babel/helper-module-transforms": "^7.22.9", + "@babel/helpers": "^7.22.6", + "@babel/parser": "^7.22.7", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.8", + "@babel/types": "^7.22.5", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.2", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/tap/node_modules/@babel/generator": { + "version": "7.22.9", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-annotate-as-pure": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-compilation-targets": { + "version": "7.22.9", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.22.9", + "@babel/helper-validator-option": "^7.22.5", + "browserslist": "^4.21.9", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-environment-visitor": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-function-name": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.22.5", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-module-imports": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-module-transforms": { + "version": "7.22.9", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-plugin-utils": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-simple-access": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-split-export-declaration": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-validator-identifier": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-validator-option": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helpers": { + "version": "7.22.6", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.6", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/highlight": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.5", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/parser": { + "version": "7.22.7", + "dev": true, + "inBundle": true, + "license": "MIT", + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/tap/node_modules/@babel/plugin-proposal-object-rest-spread": { + "version": "7.20.7", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.20.5", + "@babel/helper-compilation-targets": "^7.20.7", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.20.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/tap/node_modules/@babel/plugin-syntax-jsx": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/tap/node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", + "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/tap/node_modules/@babel/plugin-transform-destructuring": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/tap/node_modules/@babel/plugin-transform-parameters": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/tap/node_modules/@babel/plugin-transform-react-jsx": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-jsx": "^7.22.5", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/tap/node_modules/@babel/template": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.22.5", + "@babel/parser": "^7.22.5", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/traverse": { + "version": "7.22.8", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.22.5", + "@babel/generator": "^7.22.7", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.22.7", + "@babel/types": "^7.22.5", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/types": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@isaacs/import-jsx": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@isaacs/import-jsx/-/import-jsx-4.0.1.tgz", + "integrity": "sha512-l34FEsEqpdYdGcQjRCxWy+7rHY6euUbOBz9FI+Mq6oQeVhNegHcXFSJxVxrJvOpO31NbnDjS74quKXDlPDearA==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.5.5", + "@babel/plugin-proposal-object-rest-spread": "^7.5.5", + "@babel/plugin-transform-destructuring": "^7.5.0", + "@babel/plugin-transform-react-jsx": "^7.3.0", + "caller-path": "^3.0.1", + "find-cache-dir": "^3.2.0", + "make-dir": "^3.0.2", + "resolve-from": "^3.0.0", + "rimraf": "^3.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tap/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/tap/node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/tap/node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/tap/node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.18", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "node_modules/tap/node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/@types/prop-types": { + "version": "15.7.5", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/@types/react": { + "version": "17.0.62", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/tap/node_modules/@types/scheduler": { + "version": "0.16.3", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/@types/yoga-layout": { + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@types/yoga-layout/-/yoga-layout-1.9.2.tgz", + "integrity": "sha512-S9q47ByT2pPvD65IvrWp7qppVMpk9WGMbVq9wbWZOHg6tnXSD4vyhao6nOSBwwfDdV2p3Kx9evA9vI+XWTfDvw==", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/ansi-escapes": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz", + "integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tap/node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "dev": true, + "inBundle": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tap/node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tap/node_modules/ansicolors": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/ansicolors/-/ansicolors-0.3.2.tgz", + "integrity": "sha1-ZlWX3oap/+Oqm/vmyuXG6kJrSXk=", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/auto-bind": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/auto-bind/-/auto-bind-4.0.0.tgz", + "integrity": "sha512-Hdw8qdNiqdJ8LqT0iK0sVzkFbzg6fhnQqqfWhBDxcHZvU75+B+ayzTy8x+k5Ix0Y92XOhOUlx74ps+bA6BeYMQ==", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tap/node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/tap/node_modules/browserslist": { + "version": "4.21.9", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "inBundle": true, + "license": "MIT", + "dependencies": { + "caniuse-lite": "^1.0.30001503", + "electron-to-chromium": "^1.4.431", + "node-releases": "^2.0.12", + "update-browserslist-db": "^1.0.11" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/tap/node_modules/caller-callsite": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-4.1.0.tgz", + "integrity": "sha512-99nnnGlJexTc41xwQTr+mWl15OI5PPczUJzM4YRE7QjkefMKCXGa5gfQjCOuVrD+1TjI/fevIDHg2nz3iYN5Ig==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/caller-path": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-3.0.1.tgz", + "integrity": "sha512-fhmztL4wURO/BzwJUJ4aVRdnKEFskPBbrJ8fNgl7XdUiD1ygzzlt+nhPgUBSRq2ciEVubo6x+W8vJQzm55QLLQ==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "caller-callsite": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/tap/node_modules/caniuse-lite": { + "version": "1.0.30001517", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "inBundle": true, + "license": "CC-BY-4.0" + }, + "node_modules/tap/node_modules/cardinal": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/cardinal/-/cardinal-2.1.1.tgz", + "integrity": "sha1-fMEFXYItISlU0HsIXeolHMe8VQU=", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansicolors": "~0.3.2", + "redeyed": "~2.1.0" + }, + "bin": { + "cdl": "bin/cdl.js" + } + }, + "node_modules/tap/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tap/node_modules/ci-info": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", + "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/cli-boxes": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.1.tgz", + "integrity": "sha512-y4coMcylgSCdVinjiDBuR8PCC2bLjyGTwEmPb9NHR/QaNU6EUOXcTY/s6VjGMD6ENSEaeQYHCY0GNGS5jfMwPw==", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tap/node_modules/cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/cli-truncate": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-2.1.0.tgz", + "integrity": "sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tap/node_modules/code-excerpt": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/code-excerpt/-/code-excerpt-3.0.0.tgz", + "integrity": "sha512-VHNTVhd7KsLGOqfX3SyeO8RyYPMp1GJOg194VITk04WMYCv4plV68YWe6TJZxd9MhobjtpMRnVky01gqZsalaw==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "convert-to-spaces": "^1.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tap/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/tap/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/convert-source-map": { + "version": "1.9.0", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/convert-to-spaces": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/convert-to-spaces/-/convert-to-spaces-1.0.2.tgz", + "integrity": "sha512-cj09EBuObp9gZNQCzc7hByQyrs6jVGE+o9kSJmeUoj+GiPiJvi5LYqEH/Hmme4+MTLHM+Ejtq+FChpjjEnsPdQ==", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/tap/node_modules/csstype": { + "version": "3.1.2", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/debug": { + "version": "4.3.4", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/tap/node_modules/electron-to-chromium": { + "version": "1.4.477", + "dev": true, + "inBundle": true, + "license": "ISC" + }, + "node_modules/tap/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/tap/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/tap/node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "inBundle": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tap/node_modules/events-to-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-1.1.2.tgz", + "integrity": "sha1-LUH1Y+H+QA7Uli/hpNXGp1Od9/Y=", + "dev": true, + "inBundle": true, + "license": "ISC" + }, + "node_modules/tap/node_modules/find-cache-dir": { + "version": "3.3.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, + "node_modules/tap/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true, + "inBundle": true, + "license": "ISC" + }, + "node_modules/tap/node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/tap/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/tap/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/tap/node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/tap/node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "inBundle": true, + "license": "ISC" + }, + "node_modules/tap/node_modules/ink": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/ink/-/ink-3.2.0.tgz", + "integrity": "sha512-firNp1q3xxTzoItj/eOOSZQnYSlyrWks5llCTVX37nJ59K3eXbQ8PtzCguqo8YI19EELo5QxaKnJd4VxzhU8tg==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^4.2.1", + "auto-bind": "4.0.0", + "chalk": "^4.1.0", + "cli-boxes": "^2.2.0", + "cli-cursor": "^3.1.0", + "cli-truncate": "^2.1.0", + "code-excerpt": "^3.0.0", + "indent-string": "^4.0.0", + "is-ci": "^2.0.0", + "lodash": "^4.17.20", + "patch-console": "^1.0.0", + "react-devtools-core": "^4.19.1", + "react-reconciler": "^0.26.2", + "scheduler": "^0.20.2", + "signal-exit": "^3.0.2", + "slice-ansi": "^3.0.0", + "stack-utils": "^2.0.2", + "string-width": "^4.2.2", + "type-fest": "^0.12.0", + "widest-line": "^3.1.0", + "wrap-ansi": "^6.2.0", + "ws": "^7.5.5", + "yoga-layout-prebuilt": "^1.9.6" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": ">=16.8.0", + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/tap/node_modules/ink/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/tap/node_modules/ink/node_modules/chalk": { + "version": "4.1.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/tap/node_modules/ink/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/tap/node_modules/ink/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/ink/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/ink/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/is-ci": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", + "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "ci-info": "^2.0.0" + }, + "bin": { + "is-ci": "bin.js" + } + }, + "node_modules/tap/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "inBundle": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tap/node_modules/json5": { + "version": "2.2.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tap/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/loose-envify": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", + "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/tap/node_modules/lru-cache": { + "version": "5.1.1", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/tap/node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tap/node_modules/mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/tap/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tap/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/minipass/node_modules/yallist": { + "version": "4.0.0", + "dev": true, + "inBundle": true, + "license": "ISC" + }, + "node_modules/tap/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/node-releases": { + "version": "2.0.13", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tap/node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/tap/node_modules/onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tap/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tap/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/tap/node_modules/patch-console": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/patch-console/-/patch-console-1.0.0.tgz", + "integrity": "sha512-nxl9nrnLQmh64iTzMfyylSlRozL7kAXIaxw1fVcLYdyhNkJCRUzirRZTikXGJsg+hc4fqpneTK6iU2H1Q8THSA==", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/tap/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tap/node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true, + "inBundle": true, + "license": "ISC" + }, + "node_modules/tap/node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/punycode": { + "version": "2.3.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/tap/node_modules/react": { + "version": "17.0.2", + "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", + "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tap/node_modules/react-devtools-core": { + "version": "4.28.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "shell-quote": "^1.6.1", + "ws": "^7" + } + }, + "node_modules/tap/node_modules/react-reconciler": { + "version": "0.26.2", + "resolved": "https://registry.npmjs.org/react-reconciler/-/react-reconciler-0.26.2.tgz", + "integrity": "sha512-nK6kgY28HwrMNwDnMui3dvm3rCFjZrcGiuwLc5COUipBK5hWHLOxMJhSnSomirqWwjPBJKV1QcbkI0VJr7Gl1Q==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "scheduler": "^0.20.2" + }, + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "react": "^17.0.2" + } + }, + "node_modules/tap/node_modules/redeyed": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/redeyed/-/redeyed-2.1.1.tgz", + "integrity": "sha1-iYS1gV2ZyyIEacme7v/jiRPmzAs=", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "esprima": "~4.0.0" + } + }, + "node_modules/tap/node_modules/resolve-from": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-3.0.0.tgz", + "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/tap/node_modules/restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/tap/node_modules/scheduler": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", + "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "node_modules/tap/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "inBundle": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/tap/node_modules/shell-quote": { + "version": "1.8.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tap/node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true, + "inBundle": true, + "license": "ISC" + }, + "node_modules/tap/node_modules/slice-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-3.0.0.tgz", + "integrity": "sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/tap/node_modules/slice-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/tap/node_modules/slice-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/stack-utils": { + "version": "2.0.6", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tap/node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tap/node_modules/tap-parser": { + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-11.0.2.tgz", + "integrity": "sha512-6qGlC956rcORw+fg7Fv1iCRAY8/bU9UabUAhs3mXRH6eRmVZcNPLheSXCYaVaYeSwx5xa/1HXZb1537YSvwDZg==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "events-to-array": "^1.0.1", + "minipass": "^3.1.6", + "tap-yaml": "^1.0.0" + }, + "bin": { + "tap-parser": "bin/cmd.js" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/tap/node_modules/tap-yaml": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tap-yaml/-/tap-yaml-1.0.2.tgz", + "integrity": "sha512-GegASpuqBnRNdT1U+yuUPZ8rEU64pL35WPBpCISWwff4dErS2/438barz7WFJl4Nzh3Y05tfPidZnH+GaV1wMg==", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "yaml": "^1.10.2" + } + }, + "node_modules/tap/node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/tap/node_modules/treport": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/treport/-/treport-3.0.4.tgz", + "integrity": "sha512-zUw1sfJypuoZi0I54woo6CNsfvMrv+OwLBD0/wc4LhMW8MA0MbSE+4fNObn22JSR8x9lOYccuAzfBfZ2IemzoQ==", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "@isaacs/import-jsx": "^4.0.1", + "cardinal": "^2.1.1", + "chalk": "^3.0.0", + "ink": "^3.2.0", + "ms": "^2.1.2", + "tap-parser": "^11.0.0", + "tap-yaml": "^1.0.0", + "unicode-length": "^2.0.2" + }, + "peerDependencies": { + "react": "^17.0.2" + } + }, + "node_modules/tap/node_modules/treport/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/tap/node_modules/treport/node_modules/chalk": { + "version": "3.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/treport/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/tap/node_modules/treport/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/treport/node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/treport/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/type-fest": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.12.0.tgz", + "integrity": "sha512-53RyidyjvkGpnWPMF9bQgFtWp+Sl8O2Rp13VavmJgfAP9WWG6q6TkrKU8iyJdnwnfgHI6k2hTlgqH4aSdjoTbg==", + "dev": true, + "inBundle": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tap/node_modules/unicode-length": { + "version": "2.1.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "punycode": "^2.0.0" + } + }, + "node_modules/tap/node_modules/update-browserslist-db": { + "version": "1.0.11", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "inBundle": true, + "license": "MIT", + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/tap/node_modules/widest-line": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz", + "integrity": "sha512-NsmoXalsWVDMGupxZ5R08ka9flZjjiLvHVAWYOKtiKM8ujtZWr9cRffak+uSE48+Ob8ObalXpwyeUiyDD6QFgg==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "string-width": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/tap/node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/tap/node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true, + "inBundle": true, + "license": "ISC" + }, + "node_modules/tap/node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/tap/node_modules/yallist": { + "version": "3.1.1", + "dev": true, + "inBundle": true, + "license": "ISC" + }, + "node_modules/tap/node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, + "node_modules/tap/node_modules/yoga-layout-prebuilt": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/yoga-layout-prebuilt/-/yoga-layout-prebuilt-1.10.0.tgz", + "integrity": "sha512-YnOmtSbv4MTf7RGJMK0FvZ+KD8OEe/J5BNnR0GHhD8J/XcG/Qvxgszm0Un6FTHWW4uHlTgP0IztiXQnGyIR45g==", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@types/yoga-layout": "1.9.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tcompare": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/tcompare/-/tcompare-5.0.7.tgz", + "integrity": "sha512-d9iddt6YYGgyxJw5bjsN7UJUO1kGOtjSlNy/4PoGYAjQS5pAT/hzIoLf1bZCw+uUxRmZJh7Yy1aA7xKVRT9B4w==", + "dev": true, + "dependencies": { + "diff": "^4.0.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true + }, + "node_modules/titleize": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz", + "integrity": "sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4= sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/treeify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/treeify/-/treeify-1.1.0.tgz", + "integrity": "sha512-1m4RA7xVAJrSGrrXGs0L3YTwyvBs2S8PbRHaLZAkFw7JR8oIFwYtysxlBZhYIa7xSyiYJKZ3iGrrk55cGA3i9A==", + "dev": true, + "engines": { + "node": ">=0.6" + } + }, + "node_modules/trim-newlines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/trivial-deferred": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/trivial-deferred/-/trivial-deferred-1.0.1.tgz", + "integrity": "sha1-N21NKdlR1jaKb3oK6FwvTV4GWPM= sha512-dagAKX7vaesNNAwOc9Np9C2mJ+7YopF4lk+jE2JML9ta4kZ91Y6UruJNH65bLRYoUROD8EY+Pmi44qQWwXR7sw==", + "dev": true + }, + "node_modules/tsd": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/tsd/-/tsd-0.27.0.tgz", + "integrity": "sha512-G/2Sejk9N21TcuWlHwrvVWwIyIl2mpECFPbnJvFMsFN1xQCIbi2QnvG4fkw3VitFhNF6dy38cXxKJ8Paq8kOGQ==", + "dev": true, + "dependencies": { + "@tsd/typescript": "~4.9.5", + "eslint-formatter-pretty": "^4.1.0", + "globby": "^11.0.1", + "meow": "^9.0.0", + "path-exists": "^4.0.0", + "read-pkg-up": "^7.0.0" + }, + "bin": { + "tsd": "dist/cli.js" + }, + "engines": { + "node": ">=14.16" + } + }, + "node_modules/tslib": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", + "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==", + "dev": true + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, + "node_modules/uc.micro": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", + "integrity": "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A==", + "dev": true + }, + "node_modules/underscore": { + "version": "1.13.6", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", + "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", + "dev": true + }, + "node_modules/undici-types": { + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", + "dev": true + }, + "node_modules/unicode-length": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unicode-length/-/unicode-length-2.0.2.tgz", + "integrity": "sha512-Ph/j1VbS3/r77nhoY2WU0GWGjVYOHL3xpKp0y/Eq2e5r0mT/6b649vm7KFO6RdAdrZkYLdxphYVgvODxPB+Ebg==", + "dev": true, + "dependencies": { + "punycode": "^2.0.0", + "strip-ansi": "^3.0.1" + } + }, + "node_modules/unicode-length/node_modules/ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/unicode-length/node_modules/strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", + "dev": true, + "dependencies": { + "ansi-regex": "^2.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/untildify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz", + "integrity": "sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.16", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", + "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.2", + "picocolors": "^1.0.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/util-extend": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/util-extend/-/util-extend-1.0.3.tgz", + "integrity": "sha1-p8IW0mdUUWljeztu3GypEZ4v+T8= sha512-mLs5zAK+ctllYBj+iAQvlDCwoxU/WDOUaJkcFudeiAX6OajC6BKXJUa9a+tbtkC11dz2Ufb7h0lyvIOVn4LADA==", + "dev": true + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/web-streams-polyfill": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", + "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==", + "dev": true + }, + "node_modules/workq": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/workq/-/workq-3.0.0.tgz", + "integrity": "sha512-zCLwCuqc1WMiCtcbtKBtkgOkFHCvGsmkJ6IbgazOcctPXGjM8/AYKBjYaJvKzsMigbUW3CFApZudMor4E6D6zA==", + "dev": true, + "dependencies": { + "debug": "^4.1.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs": { + "name": "wrap-ansi", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi-cjs/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrap-ansi-cjs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/wrap-ansi-cjs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/wrap-ansi/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/wrap-ansi/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "node_modules/xmlbuilder2": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/xmlbuilder2/-/xmlbuilder2-3.1.1.tgz", + "integrity": "sha512-WCSfbfZnQDdLQLiMdGUQpMxxckeQ4oZNMNhLVkcekTu7xhD4tuUDyAPoY8CwXvBYE6LwBHd6QW2WZXlOWr1vCw==", + "dev": true, + "dependencies": { + "@oozcitak/dom": "1.15.10", + "@oozcitak/infra": "1.0.8", + "@oozcitak/util": "8.3.8", + "js-yaml": "3.14.1" + }, + "engines": { + "node": ">=12.0" + } + }, + "node_modules/xmlbuilder2/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/xmlbuilder2/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/xmlcreate": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz", + "integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==", + "dev": true + }, + "node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/yargs/node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/yargs/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/yargs/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/yargs/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/yargs/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/yargs/node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/package.json b/package.json index c3117f294..0cdb38530 100644 --- a/package.json +++ b/package.json @@ -9,12 +9,6 @@ "types": "./index.d.ts", "import": "./index.mjs" }, - "./api/new": { - "types": "./api/new.d.ts" - }, - "./api/types": { - "types": "./api/types.d.ts" - }, "./aws": "./lib/aws/index.js", "./aws-v3": "./lib/aws/index-v3.js", "./*": "./*" @@ -32,8 +26,17 @@ ] } }, + "files": [ + "api/", + "lib/", + "index.d.ts", + "index.js", + "index.mjs", + "README.md", + "LICENSE.txt" + ], "homepage": "https://www.opensearch.org/", - "version": "2.12.0", + "version": "3.0.0", "versionCanary": "7.10.0-canary.6", "keywords": [ "opensearch", @@ -78,7 +81,7 @@ "eslint": "^8.30.0", "eslint-config-prettier": "^9.0.0", "eslint-plugin-prettier": "^5.0.0", - "faker": "^6.6.6", + "faker": "^5.5.3", "fast-deep-equal": "^3.1.3", "into-stream": "^6.0.0", "js-yaml": "^4.1.0", @@ -104,8 +107,8 @@ "dependencies": { "aws4": "^1.11.0", "debug": "^4.3.1", - "json11": "^1.1.2", "hpagent": "^1.2.0", + "json11": "^1.1.2", "ms": "^2.1.3", "secure-json-parse": "^2.4.0" }, @@ -121,7 +124,7 @@ "url": "https://github.com/opensearch-project/opensearch-js/issues" }, "engines": { - "node": ">=10", + "node": ">=18", "yarn": "^1.22.10" }, "tsd": { diff --git a/samples/bulk.js b/samples/bulk.js index 4cd1d8a07..4030fe080 100644 --- a/samples/bulk.js +++ b/samples/bulk.js @@ -86,6 +86,9 @@ const start = async () => { .then((result) => { console.log(result); }); + + await client.indices.delete({ index: movies }); + await client.indices.delete({ index: books }); }; start().then(() => console.log('done')); diff --git a/samples/msearch.js b/samples/msearch.js index fe8c4a4bf..466c8ac7e 100644 --- a/samples/msearch.js +++ b/samples/msearch.js @@ -7,6 +7,7 @@ * compatible open source license. * */ + const { Client } = require('@opensearch-project/opensearch'); // Instantiate a client with basic auth as setup in the README.md file diff --git a/samples/search.js b/samples/search.js index 0cd86706e..f6a4ad750 100644 --- a/samples/search.js +++ b/samples/search.js @@ -7,6 +7,7 @@ * compatible open source license. * */ + const { Client } = require('@opensearch-project/opensearch'); // Instantiate a client with basic auth as setup in the README.md file diff --git a/samples/transforms.ts b/samples/transforms.js similarity index 93% rename from samples/transforms.ts rename to samples/transforms.js index df86ade8c..de4dfd2d9 100644 --- a/samples/transforms.ts +++ b/samples/transforms.js @@ -81,38 +81,38 @@ const start = async () => { interval: { period: 1, unit: 'Minutes', - start_time: 0 - } + start_time: 0, + }, }, description: 'Sample transform job', source_index: sourceIndex, target_index: transformIndex, data_selection_query: { - match_all: {} + match_all: {}, }, page_size: 1, groups: [ { terms: { source_field: 'gender', - target_field: 'gender' - } + target_field: 'gender', + }, }, { terms: { source_field: 'age', - target_field: 'age' - } - } + target_field: 'age', + }, + }, ], aggregations: { quantity: { sum: { - field: 'salary' - } - } - } - } + field: 'salary', + }, + }, + }, + }, }, }); diff --git a/scripts/generate.js b/scripts/generate.js deleted file mode 100644 index d23ef4b98..000000000 --- a/scripts/generate.js +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -const { join } = require('path'); -const { readdirSync, writeFileSync, readFileSync } = require('fs'); -const minimist = require('minimist'); -const ora = require('ora'); -const rimraf = require('rimraf'); -const standard = require('standard'); -const downloadArtifacts = require('./download-artifacts'); -const { generate, genFactory, generateDocs, generateRequestTypes } = require('./utils'); - -start( - minimist(process.argv.slice(2), { - string: ['version', 'hash'], - }) -); - -function start(opts) { - if (opts.version == null) { - console.error('Missing version parameter'); - process.exit(1); - } - - const packageFolder = join(__dirname, '..', 'api'); - const apiOutputFolder = join(packageFolder, 'api'); - const mainOutputFile = join(packageFolder, 'index.js'); - const docOutputFile = join(__dirname, '..', 'docs', 'reference.asciidoc'); - const typeDefFile = join(__dirname, '..', 'index.d.ts'); - const requestParamsOutputFile = join(packageFolder, 'requestParams.d.ts'); - - let log; - downloadArtifacts({ version: opts.version, hash: opts.hash }) - .then(onArtifactsDownloaded) - .catch((err) => { - console.log(err); - process.exit(1); - }); - - function onArtifactsDownloaded() { - log = ora('Generating APIs').start(); - - log.text = 'Cleaning API folder...'; - rimraf.sync(join(apiOutputFolder, '*.js')); - - const allSpec = readdirSync(downloadArtifacts.locations.specFolder) - .filter((file) => file !== '_common.json') - .filter((file) => !file.includes('deprecated')) - .sort() - .map((file) => require(join(downloadArtifacts.locations.specFolder, file))); - - const namespaces = namespacify(readdirSync(downloadArtifacts.locations.specFolder)); - for (const namespace in namespaces) { - if (namespace === '_common') continue; - const code = generate( - namespace, - namespaces[namespace], - downloadArtifacts.locations.specFolder, - opts.version - ); - const filePath = join(apiOutputFolder, `${namespace}.js`); - writeFileSync(filePath, code, { encoding: 'utf8' }); - } - - writeFileSync(requestParamsOutputFile, generateRequestTypes(opts.version, allSpec), { - encoding: 'utf8', - }); - - const { fn: factory, types } = genFactory( - apiOutputFolder, - downloadArtifacts.locations.specFolder, - namespaces - ); - writeFileSync(mainOutputFile, factory, { encoding: 'utf8' }); - - const oldTypeDefString = readFileSync(typeDefFile, 'utf8'); - const start = oldTypeDefString.indexOf('/* GENERATED */'); - const end = oldTypeDefString.indexOf('/* /GENERATED */'); - const newTypeDefString = - oldTypeDefString.slice(0, start + 15) + '\n' + types + '\n ' + oldTypeDefString.slice(end); - writeFileSync(typeDefFile, newTypeDefString, { encoding: 'utf8' }); - - lintFiles(log, () => { - log.text = 'Generating documentation'; - writeFileSync( - docOutputFile, - generateDocs( - require(join(downloadArtifacts.locations.specFolder, '_common.json')), - allSpec - ), - { encoding: 'utf8' } - ); - - log.succeed('Done!'); - }); - } - - function lintFiles(log, cb) { - log.text = 'Linting...'; - const files = [join(packageFolder, '*.js'), join(apiOutputFolder, '*.js')]; - standard.lintFiles(files, { fix: true }, (err) => { - if (err) { - return log.fail(err.message); - } - cb(); - }); - } - - function namespacify(apis) { - return apis - .map((api) => api.slice(0, -5)) - .filter((api) => api !== '_common') - .filter((api) => !api.includes('deprecated')) - .reduce((acc, val) => { - if (val.includes('.')) { - val = val.split('.'); - acc[val[0]] = acc[val[0]] || []; - acc[val[0]].push(val[1]); - } else { - acc[val] = []; - } - return acc; - }, {}); - } -} diff --git a/scripts/release-canary.js b/scripts/release-canary.js deleted file mode 100644 index 93c24d07b..000000000 --- a/scripts/release-canary.js +++ /dev/null @@ -1,165 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ -'use strict'; - -/** - * Script for releasing the canary client to npm. - * It should be executed from the top level directory of the repository. - * - * Usage: - * node scripts/release-canary.js --otp - * - * You can reset the canary count via the `--reset` option - * node scripts/release-canary.js --otp --reset - * - * You can also do a dry run with the `--dry-run` option - * node scripts/release-canary.js --otp --dry-run - */ - -const readline = require('readline'); -const assert = require('assert'); -const { execSync } = require('child_process'); -const { writeFile, readFile } = require('fs').promises; -const { join } = require('path'); -const minimist = require('minimist'); -const chalk = require('chalk'); - -async function release(opts) { - assert( - process.cwd() !== __dirname, - 'You should run the script from the top level directory of the repository' - ); - assert(typeof opts.otp === 'string', 'Missing OTP'); - const packageJson = JSON.parse(await readFile(join(__dirname, '..', 'package.json'), 'utf8')); - - const originalName = packageJson.name; - const originalVersion = packageJson.version; - const currentCanaryVersion = packageJson.versionCanary; - const originalTypes = packageJson.types; - const originalNpmIgnore = await readFile(join(__dirname, '..', '.npmignore'), 'utf8'); - - const newCanaryInteger = opts.reset - ? 1 - : Number(currentCanaryVersion.split('-')[1].split('.')[1]) + 1; - const newCanaryVersion = `${originalVersion.split('-')[0]}-canary.${newCanaryInteger}`; - - // Update the package.json with the correct name and new version - packageJson.name = '@opensearch/opensearch-canary'; - packageJson.version = newCanaryVersion; - packageJson.versionCanary = newCanaryVersion; - packageJson.types = './api/new.d.ts'; - packageJson.commitHash = execSync('git log -1 --pretty=format:%h').toString(); - - // update the package.json - await writeFile( - join(__dirname, '..', 'package.json'), - JSON.stringify(packageJson, null, 2) + '\n', - 'utf8' - ); - - // update the npmignore to publish the opensearchDashboards types as well - const newNpmIgnore = - originalNpmIgnore.slice(0, originalNpmIgnore.indexOf('# CANARY-PACKAGE')) + - originalNpmIgnore.slice(originalNpmIgnore.indexOf('# /CANARY-PACKAGE') + 17); - await writeFile(join(__dirname, '..', '.npmignore'), newNpmIgnore, 'utf8'); - - // confirm the package.json changes with the user - const diff = execSync('git diff').toString().split('\n').map(colorDiff).join('\n'); - console.log(diff); - const answer = await confirm(); - // release on npm with provided otp - if (answer) { - execSync(`npm publish --otp ${opts.otp} ${opts['dry-run'] ? '--dry-run' : ''}`, { - stdio: 'inherit', - }); - } else { - // the changes were not good, restore the previous canary version - packageJson.versionCanary = currentCanaryVersion; - } - - // restore the package.json to the original values - packageJson.name = originalName; - packageJson.version = originalVersion; - packageJson.types = originalTypes; - delete packageJson.commitHash; - - await writeFile( - join(__dirname, '..', 'package.json'), - JSON.stringify(packageJson, null, 2) + '\n', - 'utf8' - ); - - await writeFile(join(__dirname, '..', '.npmignore'), originalNpmIgnore, 'utf8'); -} - -function confirm() { - return new Promise((resolve) => { - const rl = readline.createInterface({ - input: process.stdin, - output: process.stdout, - }); - - rl.question('Does it look good? (y/n) ', (answer) => { - resolve(answer === 'y'); - rl.close(); - }); - }); -} - -function colorDiff(line) { - if (line.startsWith('+')) { - return chalk.green(line); - } else if (line.startsWith('-')) { - return chalk.red(line); - } else { - return line; - } -} - -release( - minimist(process.argv.slice(2), { - unknown(option) { - console.log(`Unrecognized option: ${option}`); - process.exit(1); - }, - string: [ - // The otp code for publishing the package - 'otp', - ], - boolean: [ - // Reset the canary version to '1' - 'reset', - // run all the steps but publish - 'dry-run', - ], - }) -).catch((err) => { - console.log(err); - process.exit(1); -}); diff --git a/scripts/utils/clone-opensearch.js b/scripts/utils/clone-opensearch.js deleted file mode 100644 index ee2ae177a..000000000 --- a/scripts/utils/clone-opensearch.js +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -const { accessSync, mkdirSync } = require('fs'); -const { join } = require('path'); -const Git = require('simple-git'); - -const opensearchRepo = 'https://github.com/opensearch-project/OpenSearch.git'; -const opensearchFolder = join(__dirname, '..', '..', 'opensearch'); -const apiFolder = join( - opensearchFolder, - 'rest-api-spec', - 'src', - 'main', - 'resources', - 'rest-api-spec', - 'api' -); - -function cloneAndCheckout(opts, callback) { - const { log, tag, branch } = opts; - withTag(tag, callback); - - /** - * Sets the OpenSearch repository to the given tag. - * If the repository is not present in `opensearchFolder` it will - * clone the repository and the checkout the tag. - * If the repository is already present but it cannot checkout to - * the given tag, it will perform a pull and then try again. - * @param {string} tag - * @param {function} callback - */ - function withTag(tag, callback) { - let fresh = false; - let retry = 0; - - if (!pathExist(opensearchFolder)) { - if (!createFolder(opensearchFolder)) { - log.fail('Failed folder creation'); - return; - } - fresh = true; - } - - const git = Git(opensearchFolder); - - if (fresh) { - clone(checkout); - } else if (opts.branch) { - checkout(true); - } else { - checkout(); - } - - function checkout(alsoPull = false) { - if (branch) { - log.text = `Checking out branch '${branch}'`; - } else { - log.text = `Checking out tag '${tag}'`; - } - git.checkout(branch || tag, (err) => { - if (err) { - if (retry++ > 0) { - callback(new Error(`Cannot checkout tag '${tag}'`), { apiFolder }); - return; - } - return pull(checkout); - } - if (alsoPull) { - return pull(checkout); - } - callback(null, { apiFolder }); - }); - } - - function pull(cb) { - log.text = 'Pulling opensearch repository...'; - git.pull((err) => { - if (err) { - callback(err, { apiFolder }); - return; - } - cb(); - }); - } - - function clone(cb) { - log.text = 'Cloning opensearch repository...'; - git.clone(opensearchRepo, opensearchFolder, (err) => { - if (err) { - callback(err, { apiFolder }); - return; - } - cb(); - }); - } - } - - /** - * Checks if the given path exists - * @param {string} path - * @returns {boolean} true if exists, false if not - */ - function pathExist(path) { - try { - accessSync(path); - return true; - } catch (err) { - return false; - } - } - - /** - * Creates the given folder - * @param {string} name - * @returns {boolean} true on success, false on failure - */ - function createFolder(name) { - try { - mkdirSync(name); - return true; - } catch (err) { - return false; - } - } -} - -module.exports = cloneAndCheckout; diff --git a/scripts/utils/generateApis.js b/scripts/utils/generateApis.js deleted file mode 100644 index c35f9164c..000000000 --- a/scripts/utils/generateApis.js +++ /dev/null @@ -1,573 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -/* eslint camelcase: 0 */ - -/* eslint camelcase: 0 */ - -'use strict'; - -const { join } = require('path'); -const dedent = require('dedent'); -const allowedMethods = { - noBody: ['GET', 'HEAD', 'DELETE'], - body: ['POST', 'PUT', 'DELETE'], -}; - -// if a parameter is depracted in a minor release -// we should be able to support it until the next major -const deprecatedParameters = require('./patch.json'); - -// list of apis that does not need any kind of validation -// because of how the url is built or the `type` handling in ES7 -const noPathValidation = [ - 'create', - 'exists', - 'explain', - 'get', - 'get_source', - 'index', - 'indices.get_alias', - 'indices.exists_alias', - 'indices.get_field_mapping', - 'indices.get_mapping', - 'indices.get_settings', - 'indices.put_mapping', - 'indices.stats', - 'delete', - 'nodes.info', - 'nodes.stats', - 'nodes.usage', - 'tasks.cancel', - 'termvectors', - 'update', -]; - -function generateNamespace(namespace, nested, specFolder, version) { - const common = require(join(specFolder, '_common.json')); - let code = dedent` - /* - * 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. - */ - - 'use strict' - - /* eslint camelcase: 0 */ - /* eslint no-unused-vars: 0 */ - - const { handleError, snakeCaseKeys, normalizeArguments, kConfigurationError } = require('../utils') -`; - if (nested.length > 0) { - let getters = ''; - for (const n of nested) { - if (n.includes('_')) { - const nameSnaked = n - .replace(/\.([a-z])/g, (k) => k[1].toUpperCase()) - .replace(/_([a-z])/g, (k) => k[1].toUpperCase()); - getters += `${n}: { get () { return this.${nameSnaked} } },\n`; - } - } - const api = generateMultiApi(version, namespace, nested, common, specFolder); - if (getters.length > 0) { - getters = `Object.defineProperties(${api.namespace}Api.prototype, {\n${getters}})`; - } - - code += ` - const acceptedQuerystring = ${JSON.stringify(api.acceptedQuerystring)} - const snakeCase = ${JSON.stringify(api.snakeCase)} - - function ${api.namespace}Api (transport, ConfigurationError) { - this.transport = transport - this[kConfigurationError] = ConfigurationError - } - - ${api.code} - - ${getters} - - module.exports = ${api.namespace}Api - `; - } else { - const spec = require(join(specFolder, `${namespace}.json`)); - const api = generateSingleApi(version, spec, common); - code += ` - const acceptedQuerystring = ${JSON.stringify(api.acceptedQuerystring)} - const snakeCase = ${JSON.stringify(api.snakeCase)} - - ${api.code} - - module.exports = ${api.name}Api - `; - } - return code; -} - -function generateMultiApi(version, namespace, nested, common, specFolder) { - const namespaceSnaked = namespace - .replace(/\.([a-z])/g, (k) => k[1].toUpperCase()) - .replace(/_([a-z])/g, (k) => k[1].toUpperCase()); - let code = ''; - const snakeCase = {}; - const acceptedQuerystring = []; - for (const n of nested) { - const nameSnaked = n - .replace(/\.([a-z])/g, (k) => k[1].toUpperCase()) - .replace(/_([a-z])/g, (k) => k[1].toUpperCase()); - const spec = require(join(specFolder, `${namespace}.${n}.json`)); - const api = generateSingleApi(version, spec, common); - code += `${Uppercase(namespaceSnaked)}Api.prototype.${nameSnaked} = ${api.code}\n\n`; - Object.assign(snakeCase, api.snakeCase); - for (const q of api.acceptedQuerystring) { - if (!acceptedQuerystring.includes(q)) { - acceptedQuerystring.push(q); - } - } - } - return { code, snakeCase, acceptedQuerystring, namespace: Uppercase(namespaceSnaked) }; -} - -function generateSingleApi(version, spec, common) { - const release = version.charAt(0); - const api = Object.keys(spec)[0]; - const name = api - .replace(/\.([a-z])/g, (k) => k[1].toUpperCase()) - .replace(/_([a-z])/g, (k) => k[1].toUpperCase()); - - const { paths } = spec[api].url; - const { params } = spec[api]; - const acceptedQuerystring = []; - const required = []; - - const methods = paths.reduce((acc, val) => { - for (const method of val.methods) { - if (!acc.includes(method)) acc.push(method); - } - return acc; - }, []); - const parts = paths.reduce((acc, val) => { - if (!val.parts) return acc; - for (const part of Object.keys(val.parts)) { - if (!acc.includes(part)) acc.push(part); - } - return acc; - }, []); - - // get the required parts from the url - // if the url has at least one static path, - // then there are not required parts of the url - let allParts = []; - for (const path of paths) { - if (path.parts) { - allParts.push(Object.keys(path.parts)); - } else { - allParts = []; - break; - } - } - if (allParts.length > 0) { - intersect(...allParts).forEach((r) => required.push(r)); - } - - for (const key in params) { - if (params[key].required) { - required.push(key); - } - - acceptedQuerystring.push(key); - if (deprecatedParameters[release] && deprecatedParameters[release][key]) { - acceptedQuerystring.push(deprecatedParameters[release][key]); - } - } - - for (const key in spec[api]) { - const k = spec[api][key]; - if (k && k.required) { - required.push(key); - } - } - if (common && common.params) { - for (const key in common.params) { - acceptedQuerystring.push(key); - } - } - - const code = ` - function ${name}Api (params, options, callback) { - ;[params, options, callback] = normalizeArguments(params, options, callback) - - ${genRequiredChecks()} - - ${genUrlValidation(paths, api)} - - let { ${genQueryDenylist(false)}, ...querystring } = params - querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring) - - let path = '' - ${buildPath(api)} - - // build request object - const request = { - method, - path, - ${genBody(api, methods, spec[api].body, spec)} - querystring - } - - return this.transport.request(request, options, callback) - } - `.trim(); // always call trim to avoid newlines - - return { - name, - code, - acceptedQuerystring: acceptedQuerystring, - snakeCase: genSnakeCaseMap(), - documentation: generateDocumentation(spec[api], api), - }; - - function genRequiredChecks() { - const code = required.map(_genRequiredCheck).concat(_noBody()).filter(Boolean); - - if (code.length) { - code.unshift('// check required parameters'); - } - - return code.join('\n '); - - function _genRequiredCheck(param) { - const camelCased = - param[0] === '_' - ? '_' + param.slice(1).replace(/_([a-z])/g, (k) => k[1].toUpperCase()) - : param.replace(/_([a-z])/g, (k) => k[1].toUpperCase()); - - if (param === camelCased) { - const check = ` - if (params['${param}'] == null) { - const err = new this[kConfigurationError]('Missing required parameter: ${param}') - return handleError(err, callback) - } - `; - return check.trim(); - } else { - const check = ` - if (params['${param}'] == null && params['${camelCased}'] == null) { - const err = new this[kConfigurationError]('Missing required parameter: ${param} or ${camelCased}') - return handleError(err, callback) - } - `; - return check.trim(); - } - } - - function _noBody() { - const check = ` - if (params.body != null) { - const err = new this[kConfigurationError]('This API does not require a body') - return handleError(err, callback) - } - `; - return spec[api].body === null ? check.trim() : ''; - } - } - - function genSnakeCaseMap() { - const toCamelCase = (str) => { - return str[0] === '_' - ? '_' + str.slice(1).replace(/_([a-z])/g, (k) => k[1].toUpperCase()) - : str.replace(/_([a-z])/g, (k) => k[1].toUpperCase()); - }; - - return acceptedQuerystring.reduce((acc, val) => { - if (toCamelCase(val) !== val) { - acc[toCamelCase(val)] = val; - } - return acc; - }, {}); - } - - function genQueryDenylist(addQuotes = true) { - const toCamelCase = (str) => { - return str[0] === '_' - ? '_' + str.slice(1).replace(/_([a-z])/g, (k) => k[1].toUpperCase()) - : str.replace(/_([a-z])/g, (k) => k[1].toUpperCase()); - }; - - const denylist = ['method', 'body']; - parts.forEach((p) => { - const camelStr = toCamelCase(p); - if (camelStr !== p) denylist.push(`${camelStr}`); - denylist.push(`${p}`); - }); - return addQuotes ? denylist.map((q) => `'${q}'`) : denylist; - } - - function buildPath() { - const toCamelCase = (str) => { - return str[0] === '_' - ? '_' + str.slice(1).replace(/_([a-z])/g, (k) => k[1].toUpperCase()) - : str.replace(/_([a-z])/g, (k) => k[1].toUpperCase()); - }; - - const genAccessKey = (str) => { - const camelStr = toCamelCase(str); - return camelStr === str ? str : `${str} || ${camelStr}`; - }; - - const genCheck = (path) => { - return path - .split('/') - .filter(Boolean) - .map((p) => (p.startsWith('{') ? `(${genAccessKey(p.slice(1, -1))}) != null` : false)) - .filter(Boolean) - .join(' && '); - }; - - const genPath = (path) => { - path = path - .split('/') - .filter(Boolean) - .map((p) => - p.startsWith('{') ? `encodeURIComponent(${genAccessKey(p.slice(1, -1))})` : `'${p}'` - ) - .join(" + '/' + "); - return path.length > 0 ? "'/' + " + path : "'/'"; - }; - - let hasStaticPath = false; - let sortedPaths = paths - // some legacy API have mutliple statis paths - // this filter removes them - .filter((p) => { - if (p.path.includes('{')) return true; - if (hasStaticPath === false && p.deprecated == null) { - hasStaticPath = true; - return true; - } - return false; - }) - // sort by number of parameters (desc) - .sort((a, b) => Object.keys(b.parts || {}).length - Object.keys(a.parts || {}).length); - - const allDeprecated = paths.filter((path) => path.deprecated != null); - if (allDeprecated.length === paths.length) sortedPaths = [paths[0]]; - - let code = ''; - for (let i = 0; i < sortedPaths.length; i++) { - const { path, methods } = sortedPaths[i]; - if (sortedPaths.length === 1) { - code += `if (method == null) method = ${generatePickMethod(methods)} - path = ${genPath(path)} - `; - } else if (i === 0) { - code += `if (${genCheck(path)}) { - if (method == null) method = ${generatePickMethod(methods)} - path = ${genPath(path)} - } - `; - } else if (i === sortedPaths.length - 1) { - code += ` else { - if (method == null) method = ${generatePickMethod(methods)} - path = ${genPath(path)} - } - `; - } else { - code += ` else if (${genCheck(path)}) { - if (method == null) method = ${generatePickMethod(methods)} - path = ${genPath(path)} - } - `; - } - } - - return code; - } -} - -function generatePickMethod(methods) { - if (methods.length === 1) { - return `'${methods[0]}'`; - } - const bodyMethod = getBodyMethod(methods); - const noBodyMethod = getNoBodyMethod(methods); - if (bodyMethod && noBodyMethod) { - return `body == null ? '${noBodyMethod}' : '${bodyMethod}'`; - } else if (bodyMethod) { - return `'${bodyMethod}'`; - } else { - return `'${noBodyMethod}'`; - } -} - -function genBody(api, methods, body, spec) { - const bodyMethod = getBodyMethod(methods); - const { content_type } = spec[api].headers; - if (content_type && content_type.includes('application/x-ndjson')) { - return 'bulkBody: body,'; - } - if (body === null && bodyMethod) { - return "body: '',"; - } else if (bodyMethod) { - return "body: body || '',"; - } else { - return 'body: null,'; - } -} - -function getBodyMethod(methods) { - const m = methods.filter((m) => ~allowedMethods.body.indexOf(m)); - if (m.length) return m[0]; - return null; -} - -function getNoBodyMethod(methods) { - const m = methods.filter((m) => ~allowedMethods.noBody.indexOf(m)); - if (m.length) return m[0]; - return null; -} - -function genUrlValidation(paths, api) { - // this api does not need url validation - if (!needsPathValidation(api)) return ''; - // gets only the dynamic components of the url in an array - // then we reverse it. A parameters always require what is - // at its right in the array. - const chunks = paths - .sort((a, b) => - Object.keys(a.parts || {}).length > Object.keys(b.parts || {}).length ? -1 : 1 - ) - .slice(0, 1) - .reduce((acc, val) => val.path, '') - // .reduce((a, b) => a.path.split('/').length > b.path.split('/').length ? a.path : b.path) - .split('/') - .filter((s) => s.startsWith('{')) - .map((s) => s.slice(1, -1)) - .reverse(); - - let code = ''; - - const len = chunks.length; - chunks.forEach((chunk, index) => { - if (index === len - 1) return; - const params = []; - let camelCased = - chunk[0] === '_' - ? '_' + chunk.slice(1).replace(/_([a-z])/g, (k) => k[1].toUpperCase()) - : chunk.replace(/_([a-z])/g, (k) => k[1].toUpperCase()); - - if (chunk === camelCased) { - code += `${index ? '} else ' : ''}if (params['${chunk}'] != null && (`; - } else { - code += `${ - index ? '} else ' : '' - }if ((params['${chunk}'] != null || params['${camelCased}'] != null) && (`; - } - for (let i = index + 1; i < len; i++) { - params.push(chunks[i]); - // url parts can be declared in camelCase fashion - camelCased = - chunks[i][0] === '_' - ? '_' + chunks[i].slice(1).replace(/_([a-z])/g, (k) => k[1].toUpperCase()) - : chunks[i].replace(/_([a-z])/g, (k) => k[1].toUpperCase()); - - if (chunks[i] === camelCased) { - code += `params['${chunks[i]}'] == null${i === len - 1 ? '' : ' || '}`; - } else { - code += `(params['${chunks[i]}'] == null && params['${camelCased}'] == null)${ - i === len - 1 ? '' : ' || ' - }`; - } - } - code += `)) { - const err = new this[kConfigurationError]('Missing required parameter of the url: ${params.join( - ', ' - )}') - return handleError(err, callback) - `; - }); - - if (chunks.length > 1) { - code += '\n}'; - } - - if (code.length) { - code = '// check required url components\n' + code; - } - - return code.trim(); -} - -function generateDocumentation({ documentation }, op) { - // we use `replace(/\u00A0/g, ' ')` to remove no breaking spaces - // because some parts of the description fields are using it - - if (documentation == null) return ''; - - let doc = '/**\n'; - doc += ` * Perform a ${op} request\n`; - if (documentation.description) { - doc += ` * ${documentation.description.replace(/\u00A0/g, ' ')}\n`; - } - if (documentation.url) { - doc += ` * ${documentation.url}\n`; - } - doc += ' */'; - - return doc; -} - -function needsPathValidation(api) { - return noPathValidation.indexOf(api) === -1; -} - -function intersect(first, ...rest) { - return rest.reduce((accum, current) => { - return accum.filter((x) => current.indexOf(x) !== -1); - }, first); -} - -function Uppercase(str) { - return str[0].toUpperCase() + str.slice(1); -} - -module.exports = generateNamespace; diff --git a/scripts/utils/generateDocs.js b/scripts/utils/generateDocs.js deleted file mode 100644 index 35de635da..000000000 --- a/scripts/utils/generateDocs.js +++ /dev/null @@ -1,318 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -const { readdirSync } = require('fs'); -const { join } = require('path'); -const dedent = require('dedent'); - -const codeExamples = readdirSync(join(__dirname, '..', '..', 'docs', 'examples')) - .map((file) => file.slice(0, -9)) - .filter((api) => api !== 'index'); - -function generateDocs(common, spec) { - let doc = dedent` - [[api-reference]] - - //////// - - - - =========================================================================================================================== - || || - || || - || || - || ██████╗ ███████╗ █████╗ ██████╗ ███╗ ███╗███████╗ || - || ██╔══██╗██╔════╝██╔══██╗██╔══██╗████╗ ████║██╔════╝ || - || ██████╔╝█████╗ ███████║██║ ██║██╔████╔██║█████╗ || - || ██╔══██╗██╔══╝ ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ || - || ██║ ██║███████╗██║ ██║██████╔╝██║ ╚═╝ ██║███████╗ || - || ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ || - || || - || || - || This file is autogenerated, DO NOT send pull requests that changes this file directly. || - || You should update the script that does the generation, which can be found in '/scripts/utils/generateDocs.js'. || - || || - || You can run the script with the following command: || - || node scripts/generate --branch || - || or || - || node scripts/generate --tag || - || || - || || - || || - =========================================================================================================================== - - - - //////// - - == API Reference - - This document contains the entire list of the OpenSearch API supported by the client. The client is entirely licensed under Apache 2.0. - - OpenSearch exposes an HTTP layer to communicate with, and the client is a library that will help you do this. Because of this reason, you will see HTTP related parameters, such as ${'`'}body${'`'} or ${'`'}headers${'`'}. - - Every API can accept two objects, the first contains all the parameters that will be sent to OpenSearch, while the second includes the request specific parameters, such as timeouts, headers, and so on. - In the first object, every parameter but the body will be sent via querystring or url parameter, depending on the API, and every unrecognized parameter will be sent as querystring. - - [source,js] - ---- - // promise API - const result = await client.search({ - index: 'my-index', - from: 20, - size: 10, - body: { foo: 'bar' } - }, { - ignore: [404], - maxRetries: 3 - }) - - // callback API - client.search({ - index: 'my-index', - from: 20, - size: 10, - body: { foo: 'bar' } - }, { - ignore: [404], - maxRetries: 3 - }, (err, result) => { - if (err) console.log(err) - }) - ---- - - In this document, you will find the reference of every parameter accepted by the querystring or the url. If you also need to send the body, you can find the documentation of its format in the reference link that is present along with every endpoint. - - \n\n`; - doc += commonParameters(common); - spec.forEach((s) => { - doc += '\n' + generateApiDoc(s); - }); - return doc; -} - -function commonParameters(spec) { - let doc = dedent` - [discrete] - === Common parameters - Parameters that are accepted by all API endpoints. - - link:{ref}/common-options.html[Documentation] - [cols=2*] - |===\n`; - Object.keys(spec.params).forEach((key) => { - const name = - isSnakeCased(key) && key !== camelify(key) - ? '`' + key + '` or `' + camelify(key) + '`' - : '`' + key + '`'; - - doc += dedent` - |${name} - |${'`' + spec.params[key].type + '`'} - ${spec.params[key].description}`; - if (spec.params[key].default) { - doc += ` + - _Default:_ ${'`' + spec.params[key].default + '`'}`; - } - doc += '\n\n'; - }); - - doc += dedent` - |=== - `; - return doc; -} - -function generateApiDoc(spec) { - const name = Object.keys(spec)[0]; - const documentationUrl = - spec[name].documentation && spec[name].documentation.url - ? fixLink(name, spec[name].documentation.url) - : ''; - const params = []; - // url params - const urlParts = spec[name].url.paths.reduce((acc, path) => { - if (!path.parts) return acc; - for (const part in path.parts) { - if (acc[part] != null) continue; - acc[part] = path.parts[part]; - } - return acc; - }, {}); - if (urlParts) { - Object.keys(urlParts).forEach((param) => { - params.push({ - name: param, - type: getType(urlParts[param].type, urlParts[param].options), - description: urlParts[param].description, - default: urlParts[param].default, - deprecated: !!urlParts[param].deprecated, - }); - }); - } - - // query params - const urlParams = spec[name].params; - if (urlParams) { - Object.keys(urlParams).forEach((param) => { - const duplicate = params.find((ele) => ele.name === param); - if (duplicate) return; - params.push({ - name: param, - type: getType(urlParams[param].type, urlParams[param].options), - description: urlParams[param].description, - default: urlParams[param].default, - deprecated: !!urlParams[param].deprecated, - }); - }); - } - - // body params - const body = spec[name].body; - if (body) { - params.push({ - name: 'body', - type: 'object', - description: body.description, - default: body.default, - deprecated: !!body.deprecated, - }); - } - - const codeParameters = params - .reduce((acc, val) => { - const code = `${val.name}: ${val.type},`; - acc += acc === '' ? code : '\n ' + code; - - return acc; - }, '') - // remove last comma - .slice(0, -1); - - const stability = spec[name].stability === 'stable' ? '' : `*Stability:* ${spec[name].stability}`; - - let doc = dedent` - [discrete] - === ${camelify(name)} - ${stability} - [source,ts] - ---- - client.${camelify(name)}(${codeParameters.length > 0 ? `{\n ${codeParameters}\n}` : ''}) - ----\n`; - if (documentationUrl) { - doc += `link:${documentationUrl}[Documentation] +\n`; - } - if (codeExamples.includes(name)) { - doc += `{jsclient}/${name.replace(/\./g, '_')}_examples.html[Code Example] +\n`; - } - - if (params.length !== 0) { - doc += dedent`[cols=2*] - |===\n`; - doc += params.reduce((acc, val) => { - const name = - isSnakeCased(val.name) && val.name !== camelify(val.name) - ? '`' + val.name + '` or `' + camelify(val.name) + '`' - : '`' + val.name + '`'; - acc += dedent` - |${name} - |${'`' + val.type.replace(/\|/g, '\\|') + '`'} - ${val.description}`; - if (val.default) { - acc += ` +\n_Default:_ ${'`' + val.default + '`'}`; - } - if (val.deprecated) { - acc += ' +\n\nWARNING: This parameter has been deprecated.'; - } - return acc + '\n\n'; - }, ''); - - doc += dedent` - |=== - `; - } - doc += '\n'; - return doc; -} - -const LINK_OVERRIDES = { - 'ingest.delete_pipeline': '{ref}/delete-pipeline-api.html', - 'ingest.get_pipeline': '{ref}/get-pipeline-api.html', - 'ingest.put_pipeline': '{ref}/put-pipeline-api.html', - 'ingest.simulate': '{ref}/simulate-pipeline-api.html', - 'ingest.processor_grok': '{ref}/grok-processor.html#grok-processor-rest-get', -}; -// Fixes bad urls in the JSON spec -function fixLink(name, str) { - const override = LINK_OVERRIDES[name]; - if (override) return override; - if (!str) return ''; - /* Replace references to the guide with the attribute {ref} because - * the json files in the OpenSearch repo are a bit of a mess. */ - str = str.replace( - /^.+guide\/en\/opensearch\/reference\/[^/]+\/([^./]*\.html(?:#.+)?)$/, - '{ref}/$1' - ); - str = str.replace(/frozen\.html/, 'freeze-index-api.html'); - str = str.replace(/ml-file-structure\.html/, 'ml-find-file-structure.html'); - str = str.replace(/security-api-get-user-privileges\.html/, 'security-api-get-privileges.html'); - - return str; -} - -function getType(type, options) { - switch (type) { - case 'list': - return 'string | string[]'; - case 'date': - case 'time': - case 'timeout': - return 'string'; - case 'enum': - return options.map((k) => `'${k}'`).join(' | '); - case 'int': - case 'double': - case 'long': - return 'number'; - default: - return type; - } -} - -function camelify(str) { - return str[0] === '_' - ? '_' + str.slice(1).replace(/_([a-z])/g, (k) => k[1].toUpperCase()) - : str.replace(/_([a-z])/g, (k) => k[1].toUpperCase()); -} - -function isSnakeCased(str) { - return !!~str.indexOf('_'); -} - -module.exports = generateDocs; diff --git a/scripts/utils/generateMain.js b/scripts/utils/generateMain.js deleted file mode 100644 index a24c7cb69..000000000 --- a/scripts/utils/generateMain.js +++ /dev/null @@ -1,408 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -/* eslint-disable no-template-curly-in-string */ -/* eslint camelcase: 0 */ - -'use strict'; - -const { readdirSync } = require('fs'); -const { join } = require('path'); -const dedent = require('dedent'); -const deepmerge = require('deepmerge'); - -function genFactory(folder, specFolder, namespaces) { - // get all the API files - // const apiFiles = readdirSync(folder) - const apiFiles = readdirSync(specFolder) - .filter((file) => file !== '_common.json') - .filter((file) => !file.includes('deprecated')) - .sort(); - const types = apiFiles - .map((file) => { - const name = file - .slice(0, -5) - .replace(/\.([a-z])/g, (k) => k[1].toUpperCase()) - .replace(/_([a-z])/g, (k) => k[1].toUpperCase()); - - return file - .slice(0, -5) // remove `.json` extension - .split('.') - .reverse() - .reduce((acc, val) => { - const spec = readSpec(specFolder, file.slice(0, -5)); - const isHead = isHeadMethod(spec, file.slice(0, -5)); - const body = hasBody(spec, file.slice(0, -5)); - const methods = - acc === null - ? buildMethodDefinition( - { opensearchDashboards: false }, - val, - name, - body, - isHead, - spec - ) - : null; - const obj = {}; - if (methods) { - for (const m of methods) { - obj[m.key] = m.val; - } - } else { - obj[val] = acc; - if (isSnakeCased(val)) { - obj[camelify(val)] = acc; - } - } - return obj; - }, null); - }) - .reduce((acc, val) => deepmerge(acc, val), {}); - - const opensearchDashboardsTypes = apiFiles - .map((file) => { - const name = file - .slice(0, -5) - .replace(/\.([a-z])/g, (k) => k[1].toUpperCase()) - .replace(/_([a-z])/g, (k) => k[1].toUpperCase()); - - return file - .slice(0, -5) // remove `.json` extension - .split('.') - .reverse() - .reduce((acc, val) => { - const spec = readSpec(specFolder, file.slice(0, -5)); - const isHead = isHeadMethod(spec, file.slice(0, -5)); - const body = hasBody(spec, file.slice(0, -5)); - const methods = - acc === null - ? buildMethodDefinition({ opensearchDashboards: true }, val, name, body, isHead, spec) - : null; - const obj = {}; - if (methods) { - for (const m of methods) { - obj[m.key] = m.val; - } - } else { - obj[camelify(val)] = acc; - } - return obj; - }, null); - }) - .reduce((acc, val) => deepmerge(acc, val), {}); - - // serialize the type object - const typesStr = Object.keys(types) - .map((key) => { - const line = ` ${key}: ${JSON.stringify(types[key], null, 4)}`; - if (line.slice(-1) === '}') { - return line.slice(0, -1) + ' }'; - } - return line; - }) - .join('\n') - // remove useless quotes and commas - .replace(/"/g, '') - .replace(/,$/gm, ''); - const opensearchDashboardsTypesStr = Object.keys(opensearchDashboardsTypes) - .map((key) => { - const line = ` ${key}: ${JSON.stringify(opensearchDashboardsTypes[key], null, 4)}`; - if (line.slice(-1) === '}') { - return line.slice(0, -1) + ' }'; - } - return line; - }) - .join('\n') - // remove useless quotes and commas - .replace(/"/g, '') - .replace(/,$/gm, ''); - - let apisStr = ''; - const getters = []; - for (const namespace in namespaces) { - if (namespaces[namespace].length > 0) { - getters.push(`${camelify(namespace)}: { - get () { - if (this[k${toPascalCase(camelify(namespace))}] === null) { - this[k${toPascalCase(camelify(namespace))}] = new ${toPascalCase( - camelify(namespace) - )}Api(this.transport, this[kConfigurationError]) - } - return this[k${toPascalCase(camelify(namespace))}] - } - },\n`); - if (namespace.includes('_')) { - getters.push(`${namespace}: { get () { return this.${camelify(namespace)} } },\n`); - } - } else { - apisStr += `OpenSearchAPI.prototype.${camelify(namespace)} = ${camelify(namespace)}Api\n`; - if (namespace.includes('_')) { - getters.push(`${namespace}: { get () { return this.${camelify(namespace)} } },\n`); - } - } - } - - apisStr += '\nObject.defineProperties(OpenSearchAPI.prototype, {\n'; - for (const getter of getters) { - apisStr += getter; - } - apisStr += '})'; - - let modules = ''; - let symbols = ''; - let symbolsInstance = ''; - for (const namespace in namespaces) { - if (namespaces[namespace].length > 0) { - modules += `const ${toPascalCase(camelify(namespace))}Api = require('./api/${namespace}')\n`; - symbols += `const k${toPascalCase(camelify(namespace))} = Symbol('${toPascalCase( - camelify(namespace) - )}')\n`; - symbolsInstance += `this[k${toPascalCase(camelify(namespace))}] = null\n`; - } else { - modules += `const ${camelify(namespace)}Api = require('./api/${namespace}')\n`; - } - } - - const fn = dedent` - /* - * 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. - */ - - 'use strict' - - ${modules} - - const { kConfigurationError } = require('./utils') - ${symbols} - - function OpenSearchAPI (opts) { - this[kConfigurationError] = opts.ConfigurationError - ${symbolsInstance} - } - - ${apisStr} - - module.exports = OpenSearchAPI - `; - - // new line at the end of file - return { - fn: fn + '\n', - types: typesStr, - opensearchDashboardsTypes: opensearchDashboardsTypesStr, - }; -} - -// from snake_case to camelCase -function camelify(str) { - return str.replace(/_([a-z])/g, (k) => k[1].toUpperCase()); -} - -function isSnakeCased(str) { - return !!~str.indexOf('_'); -} - -function toPascalCase(str) { - return str[0].toUpperCase() + str.slice(1); -} - -function buildMethodDefinition(opts, api, name, hasBody, isHead, spec) { - const Name = toPascalCase(name); - const { content_type } = spec[Object.keys(spec)[0]].headers; - const bodyType = - content_type && content_type.includes('application/x-ndjson') ? 'RequestNDBody' : 'RequestBody'; - const responseType = isHead ? 'boolean' : 'Record'; - const defaultBodyType = - content_type && content_type.includes('application/x-ndjson') - ? 'Record[]' - : 'Record'; - - if (opts.opensearchDashboards) { - if (hasBody) { - return [ - { - key: `${camelify( - api - )}(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, - val: 'TransportRequestPromise>', - }, - ]; - } else { - return [ - { - key: `${camelify( - api - )}(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, - val: 'TransportRequestPromise>', - }, - ]; - } - } - - if (hasBody) { - let methods = [ - { - key: `${api}(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, - val: 'TransportRequestPromise>', - }, - { - key: `${api}(callback: callbackFn)`, - val: 'TransportRequestCallback', - }, - { - key: `${api}(params: RequestParams.${Name}, callback: callbackFn)`, - val: 'TransportRequestCallback', - }, - { - key: `${api}(params: RequestParams.${Name}, options: TransportRequestOptions, callback: callbackFn)`, - val: 'TransportRequestCallback', - }, - ]; - if (isSnakeCased(api)) { - methods = methods.concat([ - { - key: `${camelify( - api - )}(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, - val: 'TransportRequestPromise>', - }, - { - key: `${camelify( - api - )}(callback: callbackFn)`, - val: 'TransportRequestCallback', - }, - { - key: `${camelify( - api - )}(params: RequestParams.${Name}, callback: callbackFn)`, - val: 'TransportRequestCallback', - }, - { - key: `${camelify( - api - )}(params: RequestParams.${Name}, options: TransportRequestOptions, callback: callbackFn)`, - val: 'TransportRequestCallback', - }, - ]); - } - return methods; - } else { - let methods = [ - { - key: `${api}(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, - val: 'TransportRequestPromise>', - }, - { - key: `${api}(callback: callbackFn)`, - val: 'TransportRequestCallback', - }, - { - key: `${api}(params: RequestParams.${Name}, callback: callbackFn)`, - val: 'TransportRequestCallback', - }, - { - key: `${api}(params: RequestParams.${Name}, options: TransportRequestOptions, callback: callbackFn)`, - val: 'TransportRequestCallback', - }, - ]; - if (isSnakeCased(api)) { - methods = methods.concat([ - { - key: `${camelify( - api - )}(params?: RequestParams.${Name}, options?: TransportRequestOptions)`, - val: 'TransportRequestPromise>', - }, - { - key: `${camelify( - api - )}(callback: callbackFn)`, - val: 'TransportRequestCallback', - }, - { - key: `${camelify( - api - )}(params: RequestParams.${Name}, callback: callbackFn)`, - val: 'TransportRequestCallback', - }, - { - key: `${camelify( - api - )}(params: RequestParams.${Name}, options: TransportRequestOptions, callback: callbackFn)`, - val: 'TransportRequestCallback', - }, - ]); - } - return methods; - } -} - -function hasBody(spec, api) { - return !!spec[api].body; -} - -function isHeadMethod(spec, api) { - const { paths } = spec[api].url; - const methods = []; - for (const path of paths) { - for (const method of path.methods) { - if (!methods.includes(method)) { - methods.push(method); - } - } - } - return methods.length === 1 && methods[0] === 'HEAD'; -} - -function readSpec(specFolder, file) { - try { - return require(join(specFolder, file)); - } catch (err) { - throw new Error(`Cannot read spec file ${file}`); - } -} - -module.exports = genFactory; diff --git a/scripts/utils/generateRequestTypes.js b/scripts/utils/generateRequestTypes.js deleted file mode 100644 index a5a3eb8a0..000000000 --- a/scripts/utils/generateRequestTypes.js +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -/* eslint camelcase: 0 */ - -'use strict'; - -const deprecatedParameters = require('./patch.json'); - -function generate(version, api) { - const release = version.charAt(0); - let types = `/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -import { RequestBody, RequestNDBody } from '../lib/Transport' - -export interface Generic { - method?: string; - filter_path?: string | string[]; - pretty?: boolean; - human?: boolean; - error_trace?: boolean; - source?: string; -} -`; - - api.forEach(generateRequestType); - return types; - - function generateRequestType(spec) { - const api = Object.keys(spec)[0]; - const name = api - .replace(/\.([a-z])/g, (k) => k[1].toUpperCase()) - .replace(/_([a-z])/g, (k) => k[1].toUpperCase()); - - const { paths = {} } = spec[api].url; - const { body, params = {} } = spec[api]; - - // get the required parts from the url - // if the url has at least one static path, - // then there are not required parts of the url - let allParts = []; - let requiredParts = []; - for (const path of paths) { - if (path.parts) { - allParts.push(Object.keys(path.parts)); - } else { - allParts = []; - break; - } - } - if (allParts.length > 0) { - requiredParts = intersect(...allParts); - } - - const parts = paths.reduce((acc, path) => { - if (!path.parts) return acc; - for (const part in path.parts) { - if (acc[part] != null) continue; - acc[part] = { key: part, value: path.parts[part], required: requiredParts.includes(part) }; - } - return acc; - }, {}); - const deprecatedParametersToAdd = []; - const paramsArr = Object.keys(params) - .filter((k) => !Object.keys(parts).includes(k)) - .map((k) => { - if (deprecatedParameters[release] && deprecatedParameters[release][k]) { - deprecatedParametersToAdd.push({ - key: deprecatedParameters[release][k], - value: params[k], - required: params[k].required, - }); - } - return { key: k, value: params[k], required: params[k].required }; - }); - - const partsArr = Object.keys(parts).map((k) => parts[k]); - deprecatedParametersToAdd.forEach((k) => partsArr.push(k)); - - const genLine = (e) => { - const optional = e.required ? '' : '?'; - return `${e.key}${optional}: ${getType(e.value.type, e.value.options)};`; - }; - - const { content_type } = spec[api].headers; - const bodyGeneric = - content_type && content_type.includes('application/x-ndjson') - ? 'RequestNDBody' - : 'RequestBody'; - - const code = ` -export interface ${toPascalCase(name)}${body ? `` : ''} extends Generic { - ${partsArr.map(genLine).join('\n ')} - ${paramsArr.map(genLine).join('\n ')} - ${body ? `body${body.required ? '' : '?'}: T;` : ''} -} -`; - - types += '\n'; - // remove empty lines - types += code.replace(/^\s*\n/gm, ''); - } - - function getType(type, options) { - switch (type) { - case 'list': - return 'string | string[]'; - case 'date': - case 'time': - case 'timeout': - return 'string'; - case 'enum': { - // the following code changes 'true' | 'false' to boolean - let foundTrue = false; - let foundFalse = false; - options = options - .map((k) => { - if (k === 'true') { - foundTrue = true; - return true; - } else if (k === 'false') { - foundFalse = true; - return false; - } else { - return `'${k}'`; - } - }) - .filter((k) => { - if (foundTrue && foundFalse && (k === true || k === false)) { - return false; - } - return true; - }); - if (foundTrue && foundFalse) { - options.push('boolean'); - } - return options.join(' | '); - } - case 'int': - case 'double': - case 'long': - return 'number'; - case 'boolean|long': - return 'boolean | number'; - default: - return type; - } - } -} - -function intersect(first, ...rest) { - return rest.reduce((accum, current) => { - return accum.filter((x) => current.indexOf(x) !== -1); - }, first); -} - -function toPascalCase(str) { - return str[0].toUpperCase() + str.slice(1); -} - -module.exports = generate; diff --git a/scripts/utils/index.js b/scripts/utils/index.js deleted file mode 100644 index 8f374d12a..000000000 --- a/scripts/utils/index.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -'use strict'; - -const generate = require('./generateApis'); -const cloneAndCheckout = require('./clone-opensearch'); -const genFactory = require('./generateMain'); -const generateDocs = require('./generateDocs'); -const generateRequestTypes = require('./generateRequestTypes'); - -module.exports = { - generate, - cloneAndCheckout, - genFactory, - generateDocs, - generateRequestTypes, -}; diff --git a/scripts/utils/patch.json b/scripts/utils/patch.json deleted file mode 100644 index 3023a6271..000000000 --- a/scripts/utils/patch.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "6": { - "_source_includes": "_source_include", - "_source_excludes": "_source_exclude" - }, - "7": { - "_source_includes": "_source_include", - "_source_excludes": "_source_exclude" - }, - "8": { - "_source_includes": "_source_include", - "_source_excludes": "_source_exclude" - } -} diff --git a/test/acceptance/proxy.test.js b/test/acceptance/proxy.test.js index dc2cf1b06..f9461b294 100644 --- a/test/acceptance/proxy.test.js +++ b/test/acceptance/proxy.test.js @@ -23,7 +23,7 @@ test('http-http proxy support', async (t) => { const server = await createServer(); const proxy = await createProxy(); server.on('request', (req, res) => { - t.equal(req.url, '/_cluster/health'); + t.equal(req.url, '/_cluster/health/'); res.setHeader('content-type', 'application/json'); res.end(JSON.stringify({ hello: 'world' })); }); @@ -44,7 +44,7 @@ test('http-https proxy support', async (t) => { const server = await createSecureServer(); const proxy = await createProxy(); server.on('request', (req, res) => { - t.equal(req.url, '/_cluster/health'); + t.equal(req.url, '/_cluster/health/'); res.setHeader('content-type', 'application/json'); res.end(JSON.stringify({ hello: 'world' })); }); @@ -65,7 +65,7 @@ test('https-http proxy support', async (t) => { const server = await createServer(); const proxy = await createSecureProxy(); server.on('request', (req, res) => { - t.equal(req.url, '/_cluster/health'); + t.equal(req.url, '/_cluster/health/'); res.setHeader('content-type', 'application/json'); res.end(JSON.stringify({ hello: 'world' })); }); @@ -86,7 +86,7 @@ test('https-https proxy support', async (t) => { const server = await createSecureServer(); const proxy = await createSecureProxy(); server.on('request', (req, res) => { - t.equal(req.url, '/_cluster/health'); + t.equal(req.url, '/_cluster/health/'); res.setHeader('content-type', 'application/json'); res.end(JSON.stringify({ hello: 'world' })); }); @@ -107,7 +107,7 @@ test('http basic authentication', async (t) => { const server = await createServer(); const proxy = await createProxy(); server.on('request', (req, res) => { - t.equal(req.url, '/_cluster/health'); + t.equal(req.url, '/_cluster/health/'); res.setHeader('content-type', 'application/json'); res.end(JSON.stringify({ hello: 'world' })); }); @@ -136,7 +136,7 @@ test('https basic authentication', async (t) => { const server = await createSecureServer(); const proxy = await createProxy(); server.on('request', (req, res) => { - t.equal(req.url, '/_cluster/health'); + t.equal(req.url, '/_cluster/health/'); res.setHeader('content-type', 'application/json'); res.end(JSON.stringify({ hello: 'world' })); }); diff --git a/test/types/api-response-body.test-d.ts b/test/types/api-response-body.test-d.ts deleted file mode 100644 index e9bd9f5cc..000000000 --- a/test/types/api-response-body.test-d.ts +++ /dev/null @@ -1,317 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -import { expectType, expectError } from 'tsd'; -import { Readable as ReadableStream } from 'stream'; -import { TransportRequestCallback, Context } from '../../lib/Transport'; -import { Client, ApiError } from '../../'; - -const client = new Client({ - node: 'http://localhost:9200', -}); - -interface SearchBody { - query: { - match: { foo: string }; - }; -} - -interface ShardsResponse { - total: number; - successful: number; - failed: number; - skipped: number; -} - -interface Explanation { - value: number; - description: string; - details: Explanation[]; -} - -interface SearchResponse { - took: number; - timed_out: boolean; - _scroll_id?: string; - _shards: ShardsResponse; - hits: { - total: number; - max_score: number; - hits: Array<{ - _index: string; - _type: string; - _id: string; - _score: number; - _source: T; - _version?: number; - _explanation?: Explanation; - fields?: any; - highlight?: any; - inner_hits?: any; - matched_queries?: string[]; - sort?: string[]; - }>; - }; - aggregations?: any; -} - -interface Source { - foo: string; -} - -// body that does not respect the RequestBody constraint -expectError( - client - .search({ - index: 'hello', - body: 42, - }) - .then(console.log) -); - -// No generics (promise style) -{ - const response = await client.search({ - index: 'test', - body: { - query: { - match: { foo: 'bar' }, - }, - }, - }); - - expectType>(response.body); - expectType(response.meta.context); -} - -// Define only the response body (promise style) -{ - const response = await client.search>({ - index: 'test', - body: { - query: { - match: { foo: 'bar' }, - }, - }, - }); - - expectType>(response.body); - expectType(response.meta.context); -} - -// Define response body and request body (promise style) -{ - const response = await client.search, SearchBody>({ - index: 'test', - body: { - query: { - match: { foo: 'bar' }, - }, - }, - }); - - expectType>(response.body); - expectType(response.meta.context); -} - -// Define response body, request body and the context (promise style) -{ - const response = await client.search, SearchBody, Context>({ - index: 'test', - body: { - query: { - match: { foo: 'bar' }, - }, - }, - }); - - expectType>(response.body); - expectType(response.meta.context); -} - -// Send request body as string (promise style) -{ - const response = await client.search({ - index: 'test', - body: 'hello world', - }); - - expectType>(response.body); - expectType(response.meta.context); -} - -// Send request body as buffer (promise style) -{ - const response = await client.search({ - index: 'test', - body: Buffer.from('hello world'), - }); - - expectType>(response.body); - expectType(response.meta.context); -} - -// Send request body as readable stream (promise style) -{ - const response = await client.search({ - index: 'test', - body: new ReadableStream(), - }); - - expectType>(response.body); - expectType(response.meta.context); -} - -// No generics (callback style) -{ - const result = client.search( - { - index: 'test', - body: { - query: { - match: { foo: 'bar' }, - }, - }, - }, - (err, response) => { - expectType(err); - expectType>(response.body); - expectType(response.meta.context); - } - ); - expectType(result); -} - -// Define only the response body (callback style) -{ - const result = client.search>( - { - index: 'test', - body: { - query: { - match: { foo: 'bar' }, - }, - }, - }, - (err, response) => { - expectType(err); - expectType>(response.body); - expectType(response.meta.context); - } - ); - expectType(result); -} - -// Define response body and request body (callback style) -{ - const result = client.search, SearchBody>( - { - index: 'test', - body: { - query: { - match: { foo: 'bar' }, - }, - }, - }, - (err, response) => { - expectType(err); - expectType>(response.body); - expectType(response.meta.context); - } - ); - expectType(result); -} - -// Define response body, request body and the context (callback style) -{ - const result = client.search, SearchBody, Context>( - { - index: 'test', - body: { - query: { - match: { foo: 'bar' }, - }, - }, - }, - (err, response) => { - expectType(err); - expectType>(response.body); - expectType(response.meta.context); - } - ); - expectType(result); -} - -// Send request body as string (callback style) -{ - const result = client.search( - { - index: 'test', - body: 'hello world', - }, - (err, response) => { - expectType(err); - expectType>(response.body); - expectType(response.meta.context); - } - ); - expectType(result); -} - -// Send request body as buffer (callback style) -{ - const result = client.search( - { - index: 'test', - body: Buffer.from('hello world'), - }, - (err, response) => { - expectType(err); - expectType>(response.body); - expectType(response.meta.context); - } - ); - expectType(result); -} - -// Send request body as readable stream (callback style) -{ - const result = client.search( - { - index: 'test', - body: new ReadableStream(), - }, - (err, response) => { - expectType(err); - expectType>(response.body); - expectType(response.meta.context); - } - ); - expectType(result); -} diff --git a/test/types/api-response.test-d.ts b/test/types/api-response.test-d.ts deleted file mode 100644 index 25668d672..000000000 --- a/test/types/api-response.test-d.ts +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -import { expectType } from 'tsd'; -import { TransportRequestCallback, Context } from '../../lib/Transport'; -import { Client, ApiError } from '../../'; - -const client = new Client({ - node: 'http://localhost:9200', -}); - -// No generics (promise style) -{ - const response = await client.cat.count({ index: 'test' }); - - expectType>(response.body); - expectType(response.meta.context); -} - -// Define only the response body (promise style) -{ - const response = await client.cat.count({ index: 'test' }); - - expectType(response.body); - expectType(response.meta.context); -} - -// Define response body and the context (promise style) -{ - const response = await client.cat.count({ index: 'test' }); - - expectType(response.body); - expectType(response.meta.context); -} - -// No generics (callback style) -{ - const result = client.cat.count({ index: 'test' }, (err, response) => { - expectType(err); - expectType>(response.body); - expectType(response.meta.context); - }); - expectType(result); -} - -// Define only the response body (callback style) -{ - const result = client.cat.count({ index: 'test' }, (err, response) => { - expectType(err); - expectType(response.body); - expectType(response.meta.context); - }); - expectType(result); -} - -// Define response body and the context (callback style) -{ - const result = client.cat.count({ index: 'test' }, (err, response) => { - expectType(err); - expectType(response.body); - expectType(response.meta.context); - }); - expectType(result); -} diff --git a/test/types/awssigv4signer-v3.test-d.ts b/test/types/awssigv4signer-v3.test-d.ts index 1f9ec29b1..fee804043 100644 --- a/test/types/awssigv4signer-v3.test-d.ts +++ b/test/types/awssigv4signer-v3.test-d.ts @@ -7,6 +7,7 @@ * compatible open source license. * */ + import { expectType } from 'tsd'; const { v4: uuidv4 } = require('uuid'); import { diff --git a/test/types/awssigv4signer.test-d.ts b/test/types/awssigv4signer.test-d.ts index 33d2d82db..dcb688832 100644 --- a/test/types/awssigv4signer.test-d.ts +++ b/test/types/awssigv4signer.test-d.ts @@ -7,6 +7,7 @@ * compatible open source license. * */ + import { expectType } from 'tsd'; const { v4: uuidv4 } = require('uuid'); import { AwsSigv4SignerResponse, AwsSigv4Signer } from '../../lib/aws'; diff --git a/test/types/client.test-d.ts b/test/types/client.test-d.ts deleted file mode 100644 index cf924aa5d..000000000 --- a/test/types/client.test-d.ts +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -import { expectType } from 'tsd'; -import { Client, ApiError, ApiResponse, RequestEvent, ResurrectEvent } from '../../'; -import { TransportRequestCallback, TransportRequestPromise } from '../../lib/Transport'; - -const client = new Client({ - node: 'http://localhost:9200', -}); - -client.on('request', (err, meta) => { - expectType(err); - expectType(meta); -}); - -client.on('response', (err, meta) => { - expectType(err); - expectType(meta); -}); - -client.on('sniff', (err, meta) => { - expectType(err); - expectType(meta); -}); - -client.on('resurrect', (err, meta) => { - expectType(err); - expectType(meta); -}); - -// Test all overloads - -// Callbacks style -{ - const result = client.info((err, result) => { - expectType(err); - expectType(result); - }); - expectType(result); - expectType(result.abort()); -} - -{ - const result = client.info({ pretty: true }, (err, result) => { - expectType(err); - expectType(result); - }); - expectType(result); - expectType(result.abort()); -} - -{ - const result = client.info({ pretty: true }, { ignore: [404] }, (err, result) => { - expectType(err); - expectType(result); - }); - expectType(result); - expectType(result.abort()); -} - -// Promise style -{ - const promise = client.info(); - expectType>(promise); - promise - .then((result) => expectType(result)) - .catch((err: ApiError) => expectType(err)); - expectType(promise.abort()); -} - -{ - const promise = client.info({ pretty: true }); - expectType>(promise); - promise - .then((result) => expectType(result)) - .catch((err: ApiError) => expectType(err)); - expectType(promise.abort()); -} - -{ - const promise = client.info({ pretty: true }, { ignore: [404] }); - expectType>(promise); - promise - .then((result) => expectType(result)) - .catch((err: ApiError) => expectType(err)); - expectType(promise.abort()); -} - -// Promise style with async await -{ - const promise = client.info(); - expectType>(promise); - expectType(promise.abort()); - try { - expectType(await promise); - } catch (err) { - expectType(err); - } -} - -{ - const promise = client.info({ pretty: true }); - expectType>(promise); - expectType(promise.abort()); - try { - expectType(await promise); - } catch (err) { - expectType(err); - } -} - -{ - const promise = client.info({ pretty: true }, { ignore: [404] }); - expectType>(promise); - expectType(promise.abort()); - try { - expectType(await promise); - } catch (err) { - expectType(err); - } -} diff --git a/test/types/helpers.test-d.ts b/test/types/helpers.test-d.ts deleted file mode 100644 index f07630569..000000000 --- a/test/types/helpers.test-d.ts +++ /dev/null @@ -1,508 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -import { expectType, expectError, expectAssignable } from 'tsd'; -import { Client } from '../../'; -import { - BulkHelper, - BulkStats, - BulkHelperOptions, - ScrollSearchResponse, - OnDropDocument, - MsearchHelper, -} from '../../lib/Helpers'; -import { ApiResponse, ApiError, Context } from '../../lib/Transport'; - -const client = new Client({ - node: 'http://localhost:9200', -}); - -/// .helpers.bulk - -const b = client.helpers.bulk>({ - datasource: [], - onDocument(doc) { - expectType>(doc); - return { index: { _index: 'test' } }; - }, - flushBytes: 5000000, - flushInterval: 30000, - concurrency: 5, - retries: 3, - wait: 5000, - onDrop(doc) { - expectType>>(doc); - }, - refreshOnCompletion: true, - pipeline: 'my-pipeline', -}); - -expectType>(b); -expectType>(b.abort()); -b.then((stats) => expectType(stats)); - -// body can't be provided -expectError( - client.helpers.bulk({ - datasource: [], - onDocument(doc) { - return { index: { _index: 'test' } }; - }, - body: [], - }) -); - -// test onDocument actions -// index -{ - const options = { - datasource: [], - onDocument(doc: Record) { - return { index: { _index: 'test' } }; - }, - }; - expectAssignable>>(options); -} -// create -{ - const options = { - datasource: [], - onDocument(doc: Record) { - return { create: { _index: 'test' } }; - }, - }; - expectAssignable>>(options); -} -// update -{ - // without `:BulkHelperOptions` this test cannot pass - // but if we write these options inline inside - // a `.helper.bulk`, it works as expected - const options: BulkHelperOptions> = { - datasource: [], - onDocument(doc: Record) { - return [{ update: { _index: 'test' } }, doc]; - }, - }; - expectAssignable>>(options); -} -// delete -{ - const options = { - datasource: [], - onDocument(doc: Record) { - return { delete: { _index: 'test' } }; - }, - }; - expectAssignable>>(options); -} - -/// .helpers.scrollSearch - -// just search params -{ - async function test() { - const scrollSearch = client.helpers.scrollSearch({ - index: 'test', - body: { - query: { - match: { foo: 'bar' }, - }, - }, - }); - - for await (const response of scrollSearch) { - expectAssignable(response); - } - } -} - -// search params and options -{ - async function test() { - const scrollSearch = client.helpers.scrollSearch( - { - index: 'test', - body: { - query: { - match: { foo: 'bar' }, - }, - }, - }, - { ignore: [404] } - ); - - for await (const response of scrollSearch) { - expectAssignable(response); - expectType>(response.body); - expectType(response.documents); - expectType(response.meta.context); - } - } -} - -// with type defs -{ - interface ShardsResponse { - total: number; - successful: number; - failed: number; - skipped: number; - } - - interface Explanation { - value: number; - description: string; - details: Explanation[]; - } - - interface SearchResponse { - took: number; - timed_out: boolean; - _scroll_id?: string; - _shards: ShardsResponse; - hits: { - total: number; - max_score: number; - hits: Array<{ - _index: string; - _type: string; - _id: string; - _score: number; - _source: T; - _version?: number; - _explanation?: Explanation; - fields?: any; - highlight?: any; - inner_hits?: any; - matched_queries?: string[]; - sort?: string[]; - }>; - }; - aggregations?: any; - } - - interface Source { - foo: string; - } - - async function test() { - const scrollSearch = client.helpers.scrollSearch>({ - index: 'test', - body: { - query: { - match: { foo: 'bar' }, - }, - }, - }); - - for await (const response of scrollSearch) { - expectAssignable(response); - expectType>(response.body); - expectType(response.documents); - expectType(response.meta.context); - } - } -} - -{ - interface SearchBody { - query: { - match: { foo: string }; - }; - } - - interface ShardsResponse { - total: number; - successful: number; - failed: number; - skipped: number; - } - - interface Explanation { - value: number; - description: string; - details: Explanation[]; - } - - interface SearchResponse { - took: number; - timed_out: boolean; - _scroll_id?: string; - _shards: ShardsResponse; - hits: { - total: number; - max_score: number; - hits: Array<{ - _index: string; - _type: string; - _id: string; - _score: number; - _source: T; - _version?: number; - _explanation?: Explanation; - fields?: any; - highlight?: any; - inner_hits?: any; - matched_queries?: string[]; - sort?: string[]; - }>; - }; - aggregations?: any; - } - - interface Source { - foo: string; - } - - async function test() { - const scrollSearch = client.helpers.scrollSearch< - Source, - SearchResponse, - SearchBody, - Record - >({ - index: 'test', - body: { - query: { - match: { foo: 'bar' }, - }, - }, - }); - - for await (const response of scrollSearch) { - expectAssignable(response); - expectType>(response.body); - expectType(response.documents); - expectType>(response.meta.context); - } - } -} - -/// .helpers.scrollDocuments - -// just search params -{ - async function test() { - const scrollDocuments = client.helpers.scrollDocuments({ - index: 'test', - body: { - query: { - match: { foo: 'bar' }, - }, - }, - }); - - for await (const document of scrollDocuments) { - expectType(document); - } - } -} - -// search params and options -{ - async function test() { - const scrollDocuments = client.helpers.scrollDocuments( - { - index: 'test', - body: { - query: { - match: { foo: 'bar' }, - }, - }, - }, - { ignore: [404] } - ); - - for await (const document of scrollDocuments) { - expectType(document); - } - } -} - -// with type defs -{ - interface Source { - foo: string; - } - - async function test() { - const scrollDocuments = client.helpers.scrollDocuments({ - index: 'test', - body: { - query: { - match: { foo: 'bar' }, - }, - }, - }); - - for await (const document of scrollDocuments) { - expectType(document); - } - } -} - -{ - interface SearchBody { - query: { - match: { foo: string }; - }; - } - - interface Source { - foo: string; - } - - async function test() { - const scrollDocuments = client.helpers.scrollDocuments({ - index: 'test', - body: { - query: { - match: { foo: 'bar' }, - }, - }, - }); - - for await (const document of scrollDocuments) { - expectType(document); - } - } -} - -/// .helpers.search - -// just search params -{ - const p = client.helpers.search({ - index: 'test', - body: { - query: { - match: { foo: 'bar' }, - }, - }, - }); - - expectType>(p); - expectType(await p); -} - -// search params and options -{ - const p = client.helpers.search( - { - index: 'test', - body: { - query: { - match: { foo: 'bar' }, - }, - }, - }, - { ignore: [404] } - ); - - expectType>(p); - expectType(await p); -} - -// with type defs -{ - interface Source { - foo: string; - } - - const p = client.helpers.search({ - index: 'test', - body: { - query: { - match: { foo: 'bar' }, - }, - }, - }); - - expectType>(p); - expectType(await p); -} - -{ - interface SearchBody { - query: { - match: { foo: string }; - }; - } - - interface Source { - foo: string; - } - - const p = client.helpers.search({ - index: 'test', - body: { - query: { - match: { foo: 'bar' }, - }, - }, - }); - - expectType>(p); - expectType(await p); -} - -/// .helpers.msearch - -const s = client.helpers.msearch({ - operations: 5, - flushInterval: 500, - concurrency: 5, - retries: 5, - wait: 5000, -}); - -expectType(s); -expectType(s.stop()); -expectType(s.stop(new Error('kaboom'))); - -expectType, unknown>>>( - s.search({ index: 'foo' }, { query: {} }) -); -expectType>>( - s.search, string>({ index: 'foo' }, { query: {} }) -); - -expectType( - s.search({ index: 'foo' }, { query: {} }, (err, result) => { - expectType(err); - expectType(result); - }) -); -expectType( - s.search, string>({ index: 'foo' }, { query: {} }, (err, result) => { - expectType(err); - expectType>(result); - }) -); diff --git a/test/types/new-types.test-d.ts b/test/types/new-types.test-d.ts deleted file mode 100644 index 18f8dc08a..000000000 --- a/test/types/new-types.test-d.ts +++ /dev/null @@ -1,127 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -/* - * 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. - */ - -import { expectType, expectNotType, expectError } from 'tsd'; -import { - Client, - RequestEvent, - ResurrectEvent, - ApiError, - ApiResponse, - opensearchtypes, -} from '../../'; -import type { Client as NewTypes } from '../../api/new'; -import { TransportRequestPromise, Context } from '../../lib/Transport'; - -// @ts-expect-error -const client: NewTypes = new Client({ - node: 'http://localhost:9200', -}); - -client.on('request', (err, meta) => { - expectType(err); - expectType(meta); -}); - -client.on('response', (err, meta) => { - expectType(err); - expectType(meta); -}); - -client.on('sniff', (err, meta) => { - expectType(err); - expectType(meta); -}); - -client.on('resurrect', (err, meta) => { - expectType(err); - expectType(meta); -}); - -// No generics -{ - const response = await client.cat.count({ index: 'test' }); - - expectType(response.body); - expectType(response.meta.context); -} - -// Define only the context -{ - const response = await client.cat.count({ index: 'test' }); - - expectType(response.body); - expectType(response.meta.context); -} - -// Check API returned type and optional parameters -{ - const promise = client.info(); - expectType>>(promise); - promise - .then((result) => expectType>(result)) - .catch((err: ApiError) => expectType(err)); - expectType(promise.abort()); -} - -{ - const promise = client.info({ pretty: true }); - expectType>>(promise); - promise - .then((result) => expectType>(result)) - .catch((err: ApiError) => expectType(err)); - expectType(promise.abort()); -} - -{ - const promise = client.info({ pretty: true }, { ignore: [404] }); - expectType>>(promise); - promise - .then((result) => expectType>(result)) - .catch((err: ApiError) => expectType(err)); - expectType(promise.abort()); -} - -// body that does not respect the RequestBody constraint -expectError( - client - .search({ - index: 'hello', - body: 42, - }) - .then(console.log) -); - -// @ts-expect-error -client.async_search.get(); - -// the child api should return a OpenSearchDashboardsClient instance -const child = client.child(); -expectType(child); -expectNotType(child); diff --git a/test/types/transport.test-d.ts b/test/types/transport.test-d.ts index 3381f97cf..93ed24a7c 100644 --- a/test/types/transport.test-d.ts +++ b/test/types/transport.test-d.ts @@ -35,11 +35,10 @@ import { TransportRequestOptions, TransportRequestCallback, TransportRequestPromise, - RequestEvent, + ApiResponse, ApiError, RequestBody, RequestNDBody, - ApiResponse, } from '../../lib/Transport'; const params = { @@ -84,7 +83,7 @@ const response = { expectAssignable(params); expectAssignable({ method: 'GET', path: '/' }); expectAssignable(options); -expectAssignable(response); +expectAssignable(response); expectAssignable(response); // verify that RequestBody, RequestNDBody and ResponseBody works as expected diff --git a/test/types/types.test-d.ts b/test/types/types.test-d.ts deleted file mode 100644 index 6337ac701..000000000 --- a/test/types/types.test-d.ts +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright OpenSearch Contributors - * SPDX-License-Identifier: Apache-2.0 - * - * The OpenSearch Contributors require contributions made to - * this file be licensed under the Apache-2.0 license or a - * compatible open source license. - * - */ - -import { expectAssignable } from 'tsd'; -import { MappingProperty } from '../../api/types'; - -// https://github.com/opensearch-project/opensearch-js/issues/703 -// only manifested when value is in a variable, so the following would *not* catch it: -// -// expectAssignable({ type: 'date' }); - -const x = { type: 'date' }; -expectAssignable(x); diff --git a/test/unit/client.test.js b/test/unit/client.test.js index e1d3557f2..c7828f945 100644 --- a/test/unit/client.test.js +++ b/test/unit/client.test.js @@ -877,6 +877,7 @@ test('Disable keep alive agent', (t) => { buildServer(handler, ({ port }, server) => { const client = new Client({ node: `http://localhost:${port}`, + headers: { connection: 'close' }, agent: false, }); diff --git a/test/unit/connection.test.js b/test/unit/connection.test.js index 3724de112..c690f2652 100644 --- a/test/unit/connection.test.js +++ b/test/unit/connection.test.js @@ -249,7 +249,7 @@ test('Disable keep alive', (t) => { buildServer(handler, ({ port }, server) => { const connection = new Connection({ url: new URL(`http://localhost:${port}`), - agent: false, + headers: { connection: 'close' }, }); connection.request( { diff --git a/test/unit/helpers/search.test.js b/test/unit/helpers/search.test.js index 24177d1c0..7ccab93ec 100644 --- a/test/unit/helpers/search.test.js +++ b/test/unit/helpers/search.test.js @@ -82,7 +82,7 @@ test('kGetHits fallback', async (t) => { t.same(result, []); }); -test('Merge filter paths (snake_case)', async (t) => { +test('Merge filter paths', async (t) => { const MockConnection = connection.buildMockConnection({ onRequest(params) { t.equal(params.querystring, 'filter_path=foo%2Chits.hits._source'); @@ -112,34 +112,3 @@ test('Merge filter paths (snake_case)', async (t) => { }); t.same(result, [{ one: 'one' }, { two: 'two' }, { three: 'three' }]); }); - -test('Merge filter paths (camelCase)', async (t) => { - const MockConnection = connection.buildMockConnection({ - onRequest(params) { - t.equal(params.querystring, 'filter_path=foo%2Chits.hits._source'); - return { - body: { - hits: { - hits: [ - { _source: { one: 'one' } }, - { _source: { two: 'two' } }, - { _source: { three: 'three' } }, - ], - }, - }, - }; - }, - }); - - const client = new Client({ - node: 'http://localhost:9200', - Connection: MockConnection, - }); - - const result = await client.helpers.search({ - index: 'test', - filterPath: 'foo', - body: { foo: 'bar' }, - }); - t.same(result, [{ one: 'one' }, { two: 'two' }, { three: 'three' }]); -}); diff --git a/test/unit/lib/aws/awssignv4signer-versions.test.js b/test/unit/lib/aws/awssignv4signer-versions.test.js index e0b37c751..e9faec46e 100644 --- a/test/unit/lib/aws/awssignv4signer-versions.test.js +++ b/test/unit/lib/aws/awssignv4signer-versions.test.js @@ -7,6 +7,7 @@ * compatible open source license. * */ + const { test } = require('tap'); const AwsSigv4Signer = require('../../../../lib/aws/AwsSigv4Signer'); diff --git a/test/unit/lib/aws/awssigv4signer.test.js b/test/unit/lib/aws/awssigv4signer.test.js index e5ddc3205..e2bced332 100644 --- a/test/unit/lib/aws/awssigv4signer.test.js +++ b/test/unit/lib/aws/awssigv4signer.test.js @@ -7,6 +7,7 @@ * compatible open source license. * */ + const { test } = require('tap'); const { URL } = require('url'); const { v4: uuidv4 } = require('uuid');