Auto-generated code for 8.15 (#2322)

This commit is contained in:
Elastic Machine
2024-08-07 02:31:05 +10:00
committed by GitHub
parent b4eb8e5441
commit f609271107
5 changed files with 1942 additions and 27 deletions

View File

@ -2756,6 +2756,481 @@ client.cluster.stats({ ... })
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 responses `_nodes.failed` property. Defaults to no timeout.
[discrete]
=== connector
[discrete]
==== check_in
Updates the last_seen field in the connector, and sets it to current timestamp
{ref}/check-in-connector-api.html[Endpoint documentation]
[source,ts]
----
client.connector.checkIn({ connector_id })
----
[discrete]
==== Arguments
* *Request (object):*
** *`connector_id` (string)*: The unique identifier of the connector to be checked in
[discrete]
==== delete
Deletes a connector.
{ref}/delete-connector-api.html[Endpoint documentation]
[source,ts]
----
client.connector.delete({ connector_id })
----
[discrete]
==== Arguments
* *Request (object):*
** *`connector_id` (string)*: The unique identifier of the connector to be deleted
** *`delete_sync_jobs` (Optional, boolean)*: A flag indicating if associated sync jobs should be also removed. Defaults to false.
[discrete]
==== get
Retrieves a connector.
{ref}/get-connector-api.html[Endpoint documentation]
[source,ts]
----
client.connector.get({ connector_id })
----
[discrete]
==== Arguments
* *Request (object):*
** *`connector_id` (string)*: The unique identifier of the connector
[discrete]
==== list
Returns existing connectors.
{ref}/list-connector-api.html[Endpoint documentation]
[source,ts]
----
client.connector.list({ ... })
----
[discrete]
==== Arguments
* *Request (object):*
** *`from` (Optional, number)*: Starting offset (default: 0)
** *`size` (Optional, number)*: Specifies a max number of results to get
** *`index_name` (Optional, string | string[])*: A list of connector index names to fetch connector documents for
** *`connector_name` (Optional, string | string[])*: A list of connector names to fetch connector documents for
** *`service_type` (Optional, string | string[])*: A list of connector service types to fetch connector documents for
** *`query` (Optional, string)*: A wildcard query string that filters connectors with matching name, description or index name
[discrete]
==== post
Creates a connector.
{ref}/create-connector-api.html[Endpoint documentation]
[source,ts]
----
client.connector.post({ ... })
----
[discrete]
==== Arguments
* *Request (object):*
** *`description` (Optional, string)*
** *`index_name` (Optional, string)*
** *`is_native` (Optional, boolean)*
** *`language` (Optional, string)*
** *`name` (Optional, string)*
** *`service_type` (Optional, string)*
[discrete]
==== put
Creates or updates a connector.
{ref}/create-connector-api.html[Endpoint documentation]
[source,ts]
----
client.connector.put({ ... })
----
[discrete]
==== Arguments
* *Request (object):*
** *`connector_id` (Optional, string)*: The unique identifier of the connector to be created or updated. ID is auto-generated if not provided.
** *`description` (Optional, string)*
** *`index_name` (Optional, string)*
** *`is_native` (Optional, boolean)*
** *`language` (Optional, string)*
** *`name` (Optional, string)*
** *`service_type` (Optional, string)*
[discrete]
==== sync_job_cancel
Cancels a connector sync job.
{ref}/cancel-connector-sync-job-api.html[Endpoint documentation]
[source,ts]
----
client.connector.syncJobCancel({ connector_sync_job_id })
----
[discrete]
==== Arguments
* *Request (object):*
** *`connector_sync_job_id` (string)*: The unique identifier of the connector sync job
[discrete]
==== sync_job_check_in
Checks in a connector sync job (refreshes 'last_seen').
{ref}/check-in-connector-sync-job-api.html[Endpoint documentation]
[source,ts]
----
client.connector.syncJobCheckIn()
----
[discrete]
==== sync_job_claim
Claims a connector sync job.
[source,ts]
----
client.connector.syncJobClaim()
----
[discrete]
==== sync_job_delete
Deletes a connector sync job.
{ref}/delete-connector-sync-job-api.html[Endpoint documentation]
[source,ts]
----
client.connector.syncJobDelete({ connector_sync_job_id })
----
[discrete]
==== Arguments
* *Request (object):*
** *`connector_sync_job_id` (string)*: The unique identifier of the connector sync job to be deleted
[discrete]
==== sync_job_error
Sets an error for a connector sync job.
{ref}/set-connector-sync-job-error-api.html[Endpoint documentation]
[source,ts]
----
client.connector.syncJobError()
----
[discrete]
==== sync_job_get
Retrieves a connector sync job.
{ref}/get-connector-sync-job-api.html[Endpoint documentation]
[source,ts]
----
client.connector.syncJobGet({ connector_sync_job_id })
----
[discrete]
==== Arguments
* *Request (object):*
** *`connector_sync_job_id` (string)*: The unique identifier of the connector sync job
[discrete]
==== sync_job_list
Lists connector sync jobs.
{ref}/list-connector-sync-jobs-api.html[Endpoint documentation]
[source,ts]
----
client.connector.syncJobList({ ... })
----
[discrete]
==== Arguments
* *Request (object):*
** *`from` (Optional, number)*: Starting offset (default: 0)
** *`size` (Optional, number)*: Specifies a max number of results to get
** *`status` (Optional, Enum("canceling" | "canceled" | "completed" | "error" | "in_progress" | "pending" | "suspended"))*: A sync job status to fetch connector sync jobs for
** *`connector_id` (Optional, string)*: A connector id to fetch connector sync jobs for
** *`job_type` (Optional, Enum("full" | "incremental" | "access_control") | Enum("full" | "incremental" | "access_control")[])*: A list of job types to fetch the sync jobs for
[discrete]
==== sync_job_post
Creates a connector sync job.
{ref}/create-connector-sync-job-api.html[Endpoint documentation]
[source,ts]
----
client.connector.syncJobPost({ id })
----
[discrete]
==== Arguments
* *Request (object):*
** *`id` (string)*: The id of the associated connector
** *`job_type` (Optional, Enum("full" | "incremental" | "access_control"))*
** *`trigger_method` (Optional, Enum("on_demand" | "scheduled"))*
[discrete]
==== sync_job_update_stats
Updates the stats fields in the connector sync job document.
{ref}/set-connector-sync-job-stats-api.html[Endpoint documentation]
[source,ts]
----
client.connector.syncJobUpdateStats()
----
[discrete]
==== update_active_filtering
Activates the valid draft filtering for a connector.
{ref}/update-connector-filtering-api.html[Endpoint documentation]
[source,ts]
----
client.connector.updateActiveFiltering({ connector_id })
----
[discrete]
==== Arguments
* *Request (object):*
** *`connector_id` (string)*: The unique identifier of the connector to be updated
[discrete]
==== update_api_key_id
Updates the API key id in the connector document
{ref}/update-connector-api-key-id-api.html[Endpoint documentation]
[source,ts]
----
client.connector.updateApiKeyId({ connector_id })
----
[discrete]
==== Arguments
* *Request (object):*
** *`connector_id` (string)*: The unique identifier of the connector to be updated
** *`api_key_id` (Optional, string)*
** *`api_key_secret_id` (Optional, string)*
[discrete]
==== update_configuration
Updates the configuration field in the connector document
{ref}/update-connector-configuration-api.html[Endpoint documentation]
[source,ts]
----
client.connector.updateConfiguration({ connector_id })
----
[discrete]
==== Arguments
* *Request (object):*
** *`connector_id` (string)*: The unique identifier of the connector to be updated
** *`configuration` (Optional, Record<string, { category, default_value, depends_on, display, label, options, order, placeholder, required, sensitive, tooltip, type, ui_restrictions, validations, value }>)*
** *`values` (Optional, Record<string, User-defined value>)*
[discrete]
==== update_error
Updates the filtering field in the connector document
{ref}/update-connector-error-api.html[Endpoint documentation]
[source,ts]
----
client.connector.updateError({ connector_id, error })
----
[discrete]
==== Arguments
* *Request (object):*
** *`connector_id` (string)*: The unique identifier of the connector to be updated
** *`error` (T | null)*
[discrete]
==== update_features
Updates the connector features in the connector document.
{ref}/update-connector-features-api.html[Endpoint documentation]
[source,ts]
----
client.connector.updateFeatures()
----
[discrete]
==== update_filtering
Updates the filtering field in the connector document
{ref}/update-connector-filtering-api.html[Endpoint documentation]
[source,ts]
----
client.connector.updateFiltering({ connector_id })
----
[discrete]
==== Arguments
* *Request (object):*
** *`connector_id` (string)*: The unique identifier of the connector to be updated
** *`filtering` (Optional, { active, domain, draft }[])*
** *`rules` (Optional, { created_at, field, id, order, policy, rule, updated_at, value }[])*
** *`advanced_snippet` (Optional, { created_at, updated_at, value })*
[discrete]
==== update_filtering_validation
Updates the draft filtering validation info for a connector.
[source,ts]
----
client.connector.updateFilteringValidation({ connector_id, validation })
----
[discrete]
==== Arguments
* *Request (object):*
** *`connector_id` (string)*: The unique identifier of the connector to be updated
** *`validation` ({ errors, state })*
[discrete]
==== update_index_name
Updates the index_name in the connector document
{ref}/update-connector-index-name-api.html[Endpoint documentation]
[source,ts]
----
client.connector.updateIndexName({ connector_id, index_name })
----
[discrete]
==== Arguments
* *Request (object):*
** *`connector_id` (string)*: The unique identifier of the connector to be updated
** *`index_name` (T | null)*
[discrete]
==== update_name
Updates the name and description fields in the connector document
{ref}/update-connector-name-description-api.html[Endpoint documentation]
[source,ts]
----
client.connector.updateName({ connector_id })
----
[discrete]
==== Arguments
* *Request (object):*
** *`connector_id` (string)*: The unique identifier of the connector to be updated
** *`name` (Optional, string)*
** *`description` (Optional, string)*
[discrete]
==== update_native
Updates the is_native flag in the connector document
[source,ts]
----
client.connector.updateNative({ connector_id, is_native })
----
[discrete]
==== Arguments
* *Request (object):*
** *`connector_id` (string)*: The unique identifier of the connector to be updated
** *`is_native` (boolean)*
[discrete]
==== update_pipeline
Updates the pipeline field in the connector document
{ref}/update-connector-pipeline-api.html[Endpoint documentation]
[source,ts]
----
client.connector.updatePipeline({ connector_id, pipeline })
----
[discrete]
==== Arguments
* *Request (object):*
** *`connector_id` (string)*: The unique identifier of the connector to be updated
** *`pipeline` ({ extract_binary_content, name, reduce_whitespace, run_ml_inference })*
[discrete]
==== update_scheduling
Updates the scheduling field in the connector document
{ref}/update-connector-scheduling-api.html[Endpoint documentation]
[source,ts]
----
client.connector.updateScheduling({ connector_id, scheduling })
----
[discrete]
==== Arguments
* *Request (object):*
** *`connector_id` (string)*: The unique identifier of the connector to be updated
** *`scheduling` ({ access_control, full, incremental })*
[discrete]
==== update_service_type
Updates the service type of the connector
{ref}/update-connector-service-type-api.html[Endpoint documentation]
[source,ts]
----
client.connector.updateServiceType({ connector_id, service_type })
----
[discrete]
==== Arguments
* *Request (object):*
** *`connector_id` (string)*: The unique identifier of the connector to be updated
** *`service_type` (string)*
[discrete]
==== update_status
Updates the status of the connector
{ref}/update-connector-status-api.html[Endpoint documentation]
[source,ts]
----
client.connector.updateStatus({ connector_id, status })
----
[discrete]
==== Arguments
* *Request (object):*
** *`connector_id` (string)*: The unique identifier of the connector to be updated
** *`status` (Enum("created" | "needs_configuration" | "configured" | "connected" | "error"))*
[discrete]
=== dangling_indices
[discrete]
@ -8999,7 +9474,7 @@ client.security.putPrivileges({ ... })
==== Arguments
* *Request (object):*
** *`privileges` (Optional, Record<string, Record<string, User-defined value>>)*
** *`privileges` (Optional, Record<string, Record<string, { allocate, delete, downsample, freeze, forcemerge, migrate, readonly, rollover, set_priority, searchable_snapshot, shrink, unfollow, wait_for_snapshot }>>)*
** *`refresh` (Optional, Enum(true | false | "wait_for"))*: If `true` (the default) then refresh 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` then do nothing with refreshes.
[discrete]

1318
src/api/api/connector.ts Normal file

File diff suppressed because it is too large Load Diff

View File

@ -35,6 +35,7 @@ import CcrApi from './api/ccr'
import clearScrollApi from './api/clear_scroll'
import closePointInTimeApi from './api/close_point_in_time'
import ClusterApi from './api/cluster'
import ConnectorApi from './api/connector'
import countApi from './api/count'
import createApi from './api/create'
import DanglingIndicesApi from './api/dangling_indices'
@ -123,6 +124,7 @@ export default interface API {
clearScroll: typeof clearScrollApi
closePointInTime: typeof closePointInTimeApi
cluster: ClusterApi
connector: ConnectorApi
count: typeof countApi
create: typeof createApi
danglingIndices: DanglingIndicesApi
@ -206,6 +208,7 @@ const kAutoscaling = Symbol('Autoscaling')
const kCat = Symbol('Cat')
const kCcr = Symbol('Ccr')
const kCluster = Symbol('Cluster')
const kConnector = Symbol('Connector')
const kDanglingIndices = Symbol('DanglingIndices')
const kEnrich = Symbol('Enrich')
const kEql = Symbol('Eql')
@ -248,6 +251,7 @@ export default class API {
[kCat]: symbol | null
[kCcr]: symbol | null
[kCluster]: symbol | null
[kConnector]: symbol | null
[kDanglingIndices]: symbol | null
[kEnrich]: symbol | null
[kEql]: symbol | null
@ -289,6 +293,7 @@ export default class API {
this[kCat] = null
this[kCcr] = null
this[kCluster] = null
this[kConnector] = null
this[kDanglingIndices] = null
this[kEnrich] = null
this[kEql] = null
@ -389,6 +394,9 @@ Object.defineProperties(API.prototype, {
cluster: {
get () { return this[kCluster] === null ? (this[kCluster] = new ClusterApi(this.transport)) : this[kCluster] }
},
connector: {
get () { return this[kConnector] === null ? (this[kConnector] = new ConnectorApi(this.transport)) : this[kConnector] }
},
danglingIndices: {
get () { return this[kDanglingIndices] === null ? (this[kDanglingIndices] = new DanglingIndicesApi(this.transport)) : this[kDanglingIndices] }
},

View File

@ -9125,9 +9125,9 @@ export interface ConnectorConnectorConfigProperties {
required: boolean
sensitive: boolean
tooltip?: string | null
type: ConnectorConnectorFieldType
ui_restrictions: string[]
validations: ConnectorValidation[]
type?: ConnectorConnectorFieldType
ui_restrictions?: string[]
validations?: ConnectorValidation[]
value: any
}
@ -9971,22 +9971,51 @@ export interface GraphExploreResponse {
vertices: GraphVertex[]
}
export type IlmActions = any
export interface IlmConfigurations {
rollover?: IndicesRolloverRolloverConditions
forcemerge?: IlmForceMergeConfiguration
shrink?: IlmShrinkConfiguration
export interface IlmActions {
allocate?: IlmAllocateAction
delete?: IlmDeleteAction
downsample?: IlmDownsampleAction
freeze?: EmptyObject
forcemerge?: IlmForceMergeAction
migrate?: IlmMigrateAction
readonly?: EmptyObject
rollover?: IlmRolloverAction
set_priority?: IlmSetPriorityAction
searchable_snapshot?: IlmSearchableSnapshotAction
shrink?: IlmShrinkAction
unfollow?: EmptyObject
wait_for_snapshot?: IlmWaitForSnapshotAction
}
export interface IlmForceMergeConfiguration {
export interface IlmAllocateAction {
number_of_replicas?: integer
total_shards_per_node?: integer
include?: Record<string, string>
exclude?: Record<string, string>
require?: Record<string, string>
}
export interface IlmDeleteAction {
delete_searchable_snapshot?: boolean
}
export interface IlmDownsampleAction {
fixed_interval: DurationLarge
wait_timeout?: Duration
}
export interface IlmForceMergeAction {
max_num_segments: integer
index_codec?: string
}
export interface IlmMigrateAction {
enabled?: boolean
}
export interface IlmPhase {
actions?: IlmActions
min_age?: Duration | long
configurations?: IlmConfigurations
}
export interface IlmPhases {
@ -10002,8 +10031,36 @@ export interface IlmPolicy {
_meta?: Metadata
}
export interface IlmShrinkConfiguration {
number_of_shards: integer
export interface IlmRolloverAction {
max_size?: ByteSize
max_primary_shard_size?: ByteSize
max_age?: Duration
max_docs?: long
max_primary_shard_docs?: long
min_size?: ByteSize
min_primary_shard_size?: ByteSize
min_age?: Duration
min_docs?: long
min_primary_shard_docs?: long
}
export interface IlmSearchableSnapshotAction {
snapshot_repository: string
force_merge_index?: boolean
}
export interface IlmSetPriorityAction {
priority?: integer
}
export interface IlmShrinkAction {
number_of_shards?: integer
max_primary_shard_size?: ByteSize
allow_write_after_shrink?: boolean
}
export interface IlmWaitForSnapshotAction {
policy: string
}
export interface IlmDeleteLifecycleRequest extends RequestBase {

View File

@ -9226,9 +9226,9 @@ export interface ConnectorConnectorConfigProperties {
required: boolean
sensitive: boolean
tooltip?: string | null
type: ConnectorConnectorFieldType
ui_restrictions: string[]
validations: ConnectorValidation[]
type?: ConnectorConnectorFieldType
ui_restrictions?: string[]
validations?: ConnectorValidation[]
value: any
}
@ -10136,22 +10136,51 @@ export interface GraphExploreResponse {
vertices: GraphVertex[]
}
export type IlmActions = any
export interface IlmConfigurations {
rollover?: IndicesRolloverRolloverConditions
forcemerge?: IlmForceMergeConfiguration
shrink?: IlmShrinkConfiguration
export interface IlmActions {
allocate?: IlmAllocateAction
delete?: IlmDeleteAction
downsample?: IlmDownsampleAction
freeze?: EmptyObject
forcemerge?: IlmForceMergeAction
migrate?: IlmMigrateAction
readonly?: EmptyObject
rollover?: IlmRolloverAction
set_priority?: IlmSetPriorityAction
searchable_snapshot?: IlmSearchableSnapshotAction
shrink?: IlmShrinkAction
unfollow?: EmptyObject
wait_for_snapshot?: IlmWaitForSnapshotAction
}
export interface IlmForceMergeConfiguration {
export interface IlmAllocateAction {
number_of_replicas?: integer
total_shards_per_node?: integer
include?: Record<string, string>
exclude?: Record<string, string>
require?: Record<string, string>
}
export interface IlmDeleteAction {
delete_searchable_snapshot?: boolean
}
export interface IlmDownsampleAction {
fixed_interval: DurationLarge
wait_timeout?: Duration
}
export interface IlmForceMergeAction {
max_num_segments: integer
index_codec?: string
}
export interface IlmMigrateAction {
enabled?: boolean
}
export interface IlmPhase {
actions?: IlmActions
min_age?: Duration | long
configurations?: IlmConfigurations
}
export interface IlmPhases {
@ -10167,8 +10196,36 @@ export interface IlmPolicy {
_meta?: Metadata
}
export interface IlmShrinkConfiguration {
number_of_shards: integer
export interface IlmRolloverAction {
max_size?: ByteSize
max_primary_shard_size?: ByteSize
max_age?: Duration
max_docs?: long
max_primary_shard_docs?: long
min_size?: ByteSize
min_primary_shard_size?: ByteSize
min_age?: Duration
min_docs?: long
min_primary_shard_docs?: long
}
export interface IlmSearchableSnapshotAction {
snapshot_repository: string
force_merge_index?: boolean
}
export interface IlmSetPriorityAction {
priority?: integer
}
export interface IlmShrinkAction {
number_of_shards?: integer
max_primary_shard_size?: ByteSize
allow_write_after_shrink?: boolean
}
export interface IlmWaitForSnapshotAction {
policy: string
}
export interface IlmDeleteLifecycleRequest extends RequestBase {