diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 01c6a00a1d..a29ac64cb9 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -1997,6 +1997,17 @@ "$ref": "#/components/schemas/_types:Id" }, "style": "simple" + }, + { + "in": "query", + "name": "delete_sync_jobs", + "description": "Determines whether associated sync jobs are also deleted.", + "required": true, + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" } ], "responses": { @@ -2540,6 +2551,52 @@ } } }, + "/_connector/{connector_id}/_filtering/_activate": { + "put": { + "tags": [ + "connector.update_active_filtering" + ], + "summary": "Activates the draft filtering rules if they are in a validated state.", + "description": "Activates the draft filtering rules if they are in a validated state.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-api.html" + }, + "operationId": "connector-update-active-filtering", + "parameters": [ + { + "in": "path", + "name": "connector_id", + "description": "The unique identifier of the connector to be updated", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Id" + }, + "style": "simple" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/_types:Result" + } + }, + "required": [ + "result" + ] + } + } + } + } + } + } + }, "/_connector/{connector_id}/_api_key_id": { "put": { "tags": [ @@ -2770,10 +2827,80 @@ "items": { "$ref": "#/components/schemas/connector._types:FilteringConfig" } + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/connector._types:FilteringRule" + } + }, + "advanced_snippet": { + "$ref": "#/components/schemas/connector._types:FilteringAdvancedSnippet" + } + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/_types:Result" + } + }, + "required": [ + "result" + ] + } + } + } + } + } + } + }, + "/_connector/{connector_id}/_filtering/_validation": { + "put": { + "tags": [ + "connector.update_filtering_validation" + ], + "summary": "Updates the validation info of the draft filtering rules.", + "description": "Updates the validation info of the draft filtering rules.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-validation-api.html" + }, + "operationId": "connector-update-filtering-validation", + "parameters": [ + { + "in": "path", + "name": "connector_id", + "description": "The unique identifier of the connector to be updated", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Id" + }, + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "validation": { + "$ref": "#/components/schemas/connector._types:FilteringRulesValidation" } }, "required": [ - "filtering" + "validation" ] } } @@ -49659,7 +49786,6 @@ "required": [ "configuration", "custom_scheduling", - "features", "filtering", "is_native", "scheduling", @@ -49847,7 +49973,7 @@ "type": { "type": "string", "enum": [ - "less_than" + "\"less_than\"" ] }, "constraint": { @@ -49865,7 +49991,7 @@ "type": { "type": "string", "enum": [ - "greater_than" + "\"greater_than\"" ] }, "constraint": { @@ -49883,7 +50009,7 @@ "type": { "type": "string", "enum": [ - "list_type" + "\"list_type\"" ] }, "constraint": { @@ -49904,7 +50030,7 @@ "type": { "type": "string", "enum": [ - "included_in" + "\"included_in\"" ] }, "constraint": { @@ -49922,7 +50048,7 @@ "type": { "type": "string", "enum": [ - "regex" + "\"regex\"" ] }, "constraint": { @@ -50095,8 +50221,6 @@ } }, "required": [ - "created_at", - "updated_at", "value" ] }, @@ -50129,13 +50253,11 @@ } }, "required": [ - "created_at", "field", "id", "order", "policy", "rule", - "updated_at", "value" ] }, @@ -50400,7 +50522,7 @@ "$ref": "#/components/schemas/connector._types:ConnectorConfiguration" }, "filtering": { - "$ref": "#/components/schemas/connector._types:FilteringConfig" + "$ref": "#/components/schemas/connector._types:FilteringRules" }, "id": { "$ref": "#/components/schemas/_types:Id" diff --git a/output/schema/schema.json b/output/schema/schema.json index e892dcc7d6..11ca1f7a12 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -3553,6 +3553,48 @@ ], "visibility": "public" }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" + } + }, + "description": "Activates the draft filtering rules if they are in a validated state.", + "docId": "connector-update-filtering", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-filtering-api.html", + "name": "connector.update_active_filtering", + "request": { + "name": "Request", + "namespace": "connector.update_active_filtering" + }, + "requestBodyRequired": false, + "requestMediaType": [ + "application/json" + ], + "response": { + "name": "Response", + "namespace": "connector.update_active_filtering" + }, + "responseMediaType": [ + "application/json" + ], + "since": "8.12.0", + "stability": "experimental", + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_connector/{connector_id}/_filtering/_activate" + } + ], + "visibility": "public" + }, { "availability": { "serverless": { @@ -3721,6 +3763,48 @@ ], "visibility": "public" }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" + } + }, + "description": "Updates the validation info of the draft filtering rules.", + "docId": "connector-update-filtering-validation", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-filtering-validation-api.html", + "name": "connector.update_filtering_validation", + "request": { + "name": "Request", + "namespace": "connector.update_filtering_validation" + }, + "requestBodyRequired": true, + "requestMediaType": [ + "application/json" + ], + "response": { + "name": "Response", + "namespace": "connector.update_filtering_validation" + }, + "responseMediaType": [ + "application/json" + ], + "since": "8.12.0", + "stability": "experimental", + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_connector/{connector_id}/_filtering/_validation" + } + ], + "visibility": "public" + }, { "availability": { "serverless": { @@ -105968,7 +106052,7 @@ }, { "name": "features", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -107050,7 +107134,7 @@ "properties": [ { "name": "created_at", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -107061,7 +107145,7 @@ }, { "name": "updated_at", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -107159,7 +107243,7 @@ "properties": [ { "name": "created_at", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -107225,7 +107309,7 @@ }, { "name": "updated_at", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -107431,7 +107515,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "greater_than" + "value": "\"greater_than\"" } }, { @@ -107460,7 +107544,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "included_in" + "value": "\"included_in\"" } }, { @@ -107543,7 +107627,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "less_than" + "value": "\"less_than\"" } }, { @@ -107572,7 +107656,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "list_type" + "value": "\"list_type\"" } }, { @@ -107604,7 +107688,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "regex" + "value": "\"regex\"" } }, { @@ -107720,7 +107804,7 @@ "type": { "kind": "instance_of", "type": { - "name": "FilteringConfig", + "name": "FilteringRules", "namespace": "connector._types" } } @@ -108026,8 +108110,21 @@ } } ], - "query": [], - "specLocation": "connector/delete/ConnectorDeleteRequest.ts#L22-L36" + "query": [ + { + "description": "Determines whether associated sync jobs are also deleted.", + "name": "delete_sync_jobs", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "connector/delete/ConnectorDeleteRequest.ts#L22-L39" }, { "body": { @@ -109082,6 +109179,66 @@ }, "specLocation": "connector/sync_job_post/SyncJobPostResponse.ts#L22-L26" }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Activates the valid draft filtering for a connector.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.update_active_filtering" + }, + "path": [ + { + "description": "The unique identifier of the connector to be updated", + "name": "connector_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + } + ], + "query": [], + "specLocation": "connector/update_active_filtering/ConnectorUpdateActiveFilteringRequest.ts#L22-L36" + }, + { + "body": { + "kind": "properties", + "properties": [ + { + "name": "result", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Result", + "namespace": "_types" + } + } + } + ] + }, + "kind": "response", + "name": { + "name": "Response", + "namespace": "connector.update_active_filtering" + }, + "specLocation": "connector/update_active_filtering/ConnectorUpdateActiveFilteringResponse.ts#L22-L26" + }, { "attachedBehaviors": [ "CommonQueryParameters" @@ -109366,7 +109523,7 @@ "properties": [ { "name": "filtering", - "required": true, + "required": false, "type": { "kind": "array_of", "value": { @@ -109377,6 +109534,31 @@ } } } + }, + { + "name": "rules", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "FilteringRule", + "namespace": "connector._types" + } + } + } + }, + { + "name": "advanced_snippet", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "FilteringAdvancedSnippet", + "namespace": "connector._types" + } + } } ] }, @@ -109407,7 +109589,7 @@ } ], "query": [], - "specLocation": "connector/update_filtering/ConnectorUpdateFilteringRequest.ts#L23-L44" + "specLocation": "connector/update_filtering/ConnectorUpdateFilteringRequest.ts#L27-L50" }, { "body": { @@ -109433,6 +109615,79 @@ }, "specLocation": "connector/update_filtering/ConnectorUpdateFilteringResponse.ts#L22-L26" }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "name": "validation", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "FilteringRulesValidation", + "namespace": "connector._types" + } + } + } + ] + }, + "description": "Updates the draft filtering validation info for a connector.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.update_filtering_validation" + }, + "path": [ + { + "description": "The unique identifier of the connector to be updated", + "name": "connector_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + } + ], + "query": [], + "specLocation": "connector/update_filtering_validation/ConnectorUpdateFilteringValidationRequest.ts#L23-L40" + }, + { + "body": { + "kind": "properties", + "properties": [ + { + "name": "result", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Result", + "namespace": "_types" + } + } + } + ] + }, + "kind": "response", + "name": { + "name": "Response", + "namespace": "connector.update_filtering_validation" + }, + "specLocation": "connector/update_filtering_validation/ConnectorUpdateFilteringValidationResponse.ts#L22-L26" + }, { "attachedBehaviors": [ "CommonQueryParameters" diff --git a/output/typescript/types.ts b/output/typescript/types.ts index b78330ed6d..b675fa0d18 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -9089,7 +9089,7 @@ export interface ConnectorConnector { custom_scheduling: ConnectorConnectorCustomScheduling description?: string error?: string - features: ConnectorConnectorFeatures + features?: ConnectorConnectorFeatures filtering: ConnectorFilteringConfig[] id?: Id index_name?: IndexName @@ -9202,8 +9202,8 @@ export interface ConnectorFeatureEnabled { } export interface ConnectorFilteringAdvancedSnippet { - created_at: DateTime - updated_at: DateTime + created_at?: DateTime + updated_at?: DateTime value: Record } @@ -9216,13 +9216,13 @@ export interface ConnectorFilteringConfig { export type ConnectorFilteringPolicy = 'exclude' | 'include' export interface ConnectorFilteringRule { - created_at: DateTime + created_at?: DateTime field: Field id: Id order: integer policy: ConnectorFilteringPolicy rule: ConnectorFilteringRuleRule - updated_at: DateTime + updated_at?: DateTime value: string } @@ -9247,12 +9247,12 @@ export interface ConnectorFilteringValidation { export type ConnectorFilteringValidationState = 'edited' | 'invalid' | 'valid' export interface ConnectorGreaterThanValidation { - type: 'greater_than' + type: '"greater_than"' constraint: double } export interface ConnectorIncludedInValidation { - type: 'included_in' + type: '"included_in"' constraint: string } @@ -9264,17 +9264,17 @@ export interface ConnectorIngestPipelineParams { } export interface ConnectorLessThanValidation { - type: 'less_than' + type: '"less_than"' constraint: double } export interface ConnectorListTypeValidation { - type: 'list_type' + type: '"list_type"' constraint: ScalarValue[] } export interface ConnectorRegexValidation { - type: 'regex' + type: '"regex"' constraint: string } @@ -9291,7 +9291,7 @@ export interface ConnectorSelectOption { export interface ConnectorSyncJobConnectorReference { configuration: ConnectorConnectorConfiguration - filtering: ConnectorFilteringConfig + filtering: ConnectorFilteringRules id: Id index_name: string language?: string @@ -9322,6 +9322,7 @@ export interface ConnectorCheckInResponse { export interface ConnectorDeleteRequest extends RequestBase { connector_id: Id + delete_sync_jobs: boolean } export type ConnectorDeleteResponse = AcknowledgedResponseBase @@ -9443,6 +9444,14 @@ export interface ConnectorSyncJobPostResponse { id: Id } +export interface ConnectorUpdateActiveFilteringRequest extends RequestBase { + connector_id: Id +} + +export interface ConnectorUpdateActiveFilteringResponse { + result: Result +} + export interface ConnectorUpdateApiKeyIdRequest extends RequestBase { connector_id: Id body?: { @@ -9481,7 +9490,9 @@ export interface ConnectorUpdateErrorResponse { export interface ConnectorUpdateFilteringRequest extends RequestBase { connector_id: Id body?: { - filtering: ConnectorFilteringConfig[] + filtering?: ConnectorFilteringConfig[] + rules?: ConnectorFilteringRule[] + advanced_snippet?: ConnectorFilteringAdvancedSnippet } } @@ -9489,6 +9500,17 @@ export interface ConnectorUpdateFilteringResponse { result: Result } +export interface ConnectorUpdateFilteringValidationRequest extends RequestBase { + connector_id: Id + body?: { + validation: ConnectorFilteringRulesValidation + } +} + +export interface ConnectorUpdateFilteringValidationResponse { + result: Result +} + export interface ConnectorUpdateIndexNameRequest extends RequestBase { connector_id: Id body?: { diff --git a/specification/_doc_ids/table.csv b/specification/_doc_ids/table.csv index d38b1efc78..2a2fb2b9b9 100644 --- a/specification/_doc_ids/table.csv +++ b/specification/_doc_ids/table.csv @@ -94,6 +94,7 @@ connector-configuration,https://www.elastic.co/guide/en/elasticsearch/reference/ connector-update-api-key-id,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-api-key-id-api.html connector-update-error,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-error-api.html connector-update-filtering,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-filtering-api.html +connector-update-filtering-validation,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-filtering-validation-api.html connector-update-index-name,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-index-name-api.html connector-update-name,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-name-description-api.html connector-update-native,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-native-api.html diff --git a/specification/_json_spec/connector.delete.json b/specification/_json_spec/connector.delete.json index bd0bd8de94..4b542d15da 100644 --- a/specification/_json_spec/connector.delete.json +++ b/specification/_json_spec/connector.delete.json @@ -22,6 +22,13 @@ } } ] + }, + "params": { + "delete_sync_jobs": { + "type": "boolean", + "default": false, + "description": "Determines whether associated sync jobs are also deleted." + } } } } diff --git a/specification/_json_spec/connector.update_active_filtering.json b/specification/_json_spec/connector.update_active_filtering.json new file mode 100644 index 0000000000..3886e3359a --- /dev/null +++ b/specification/_json_spec/connector.update_active_filtering.json @@ -0,0 +1,28 @@ +{ + "connector.update_active_filtering": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-filtering-api.html", + "description": "Activates the draft filtering rules if they are in a validated state." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_connector/{connector_id}/_filtering/_activate", + "methods": ["PUT"], + "parts": { + "connector_id": { + "type": "string", + "description": "The unique identifier of the connector to be updated." + } + } + } + ] + } + } +} diff --git a/specification/_json_spec/connector.update_filtering_validation.json b/specification/_json_spec/connector.update_filtering_validation.json new file mode 100644 index 0000000000..ac58c71d99 --- /dev/null +++ b/specification/_json_spec/connector.update_filtering_validation.json @@ -0,0 +1,32 @@ +{ + "connector.update_filtering_validation": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-filtering-api.html", + "description": "Updates the validation info of the draft filtering rules." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_connector/{connector_id}/_filtering/_validation", + "methods": ["PUT"], + "parts": { + "connector_id": { + "type": "string", + "description": "The unique identifier of the connector to be updated." + } + } + } + ] + }, + "body": { + "description": "Validation info for the draft filtering rules", + "required": true + } + } +} diff --git a/specification/connector/_types/Connector.ts b/specification/connector/_types/Connector.ts index fc1ee83269..4aef9fe7ef 100644 --- a/specification/connector/_types/Connector.ts +++ b/specification/connector/_types/Connector.ts @@ -167,14 +167,14 @@ enum FilteringRuleRule { less_than = '<' } -interface FilteringRule { - created_at: DateTime +export interface FilteringRule { + created_at?: DateTime field: Field id: Id order: integer policy: FilteringPolicy rule: FilteringRuleRule - updated_at: DateTime + updated_at?: DateTime value: string } @@ -189,18 +189,18 @@ enum FilteringValidationState { valid } -interface FilteringAdvancedSnippet { - created_at: DateTime - updated_at: DateTime +export interface FilteringAdvancedSnippet { + created_at?: DateTime + updated_at?: DateTime value: Dictionary } -interface FilteringRulesValidation { +export interface FilteringRulesValidation { errors: FilteringValidation[] state: FilteringValidationState } -interface FilteringRules { +export interface FilteringRules { advanced_snippet: FilteringAdvancedSnippet rules: FilteringRule[] validation: FilteringRulesValidation @@ -241,7 +241,7 @@ export interface Connector { custom_scheduling: ConnectorCustomScheduling description?: string error?: string - features: ConnectorFeatures + features?: ConnectorFeatures filtering: FilteringConfig[] id?: Id index_name?: IndexName diff --git a/specification/connector/_types/SyncJob.ts b/specification/connector/_types/SyncJob.ts index c8ac3deed2..542fc6e725 100644 --- a/specification/connector/_types/SyncJob.ts +++ b/specification/connector/_types/SyncJob.ts @@ -23,14 +23,14 @@ import { Dictionary } from '@spec_utils/Dictionary' import { UserDefinedValue } from '@spec_utils/UserDefinedValue' import { ConnectorConfiguration, - FilteringConfig, + FilteringRules, IngestPipelineParams, SyncStatus } from './Connector' interface SyncJobConnectorReference { configuration: ConnectorConfiguration - filtering: FilteringConfig + filtering: FilteringRules id: Id index_name: string language?: string diff --git a/specification/connector/delete/ConnectorDeleteRequest.ts b/specification/connector/delete/ConnectorDeleteRequest.ts index ebfd921566..92ebc4870b 100644 --- a/specification/connector/delete/ConnectorDeleteRequest.ts +++ b/specification/connector/delete/ConnectorDeleteRequest.ts @@ -33,4 +33,7 @@ export interface Request extends RequestBase { */ connector_id: Id } + query_parameters: { + delete_sync_jobs: boolean + } } diff --git a/specification/connector/update_active_filtering/ConnectorUpdateActiveFilteringRequest.ts b/specification/connector/update_active_filtering/ConnectorUpdateActiveFilteringRequest.ts new file mode 100644 index 0000000000..a92fb2b7bc --- /dev/null +++ b/specification/connector/update_active_filtering/ConnectorUpdateActiveFilteringRequest.ts @@ -0,0 +1,36 @@ +/* + * 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 { RequestBase } from '@_types/Base' +import { Id } from '@_types/common' + +/** + * Activates the valid draft filtering for a connector. + * @rest_spec_name connector.update_active_filtering + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + * @doc_id connector-update-filtering + */ +export interface Request extends RequestBase { + path_parts: { + /** + * The unique identifier of the connector to be updated + */ + connector_id: Id + } +} diff --git a/specification/connector/update_active_filtering/ConnectorUpdateActiveFilteringResponse.ts b/specification/connector/update_active_filtering/ConnectorUpdateActiveFilteringResponse.ts new file mode 100644 index 0000000000..fc194d6f20 --- /dev/null +++ b/specification/connector/update_active_filtering/ConnectorUpdateActiveFilteringResponse.ts @@ -0,0 +1,26 @@ +/* + * 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 { Result } from '@_types/Result' + +export class Response { + body: { + result: Result + } +} diff --git a/specification/connector/update_filtering/ConnectorUpdateFilteringRequest.ts b/specification/connector/update_filtering/ConnectorUpdateFilteringRequest.ts index 7c66ecfc2d..1341328e30 100644 --- a/specification/connector/update_filtering/ConnectorUpdateFilteringRequest.ts +++ b/specification/connector/update_filtering/ConnectorUpdateFilteringRequest.ts @@ -18,7 +18,11 @@ */ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' -import { FilteringConfig } from '../_types/Connector' +import { + FilteringAdvancedSnippet, + FilteringConfig, + FilteringRule +} from '../_types/Connector' /** * Updates the filtering field in the connector document @@ -35,10 +39,12 @@ export interface Request extends RequestBase { connector_id: Id } /** - * The connector filtering configuration + * The connector draft filtering configuration */ /** @codegen_name filtering */ body: { - filtering: FilteringConfig[] + filtering?: FilteringConfig[] + rules?: FilteringRule[] + advanced_snippet?: FilteringAdvancedSnippet } } diff --git a/specification/connector/update_filtering_validation/ConnectorUpdateFilteringValidationRequest.ts b/specification/connector/update_filtering_validation/ConnectorUpdateFilteringValidationRequest.ts new file mode 100644 index 0000000000..bbdb80f4ac --- /dev/null +++ b/specification/connector/update_filtering_validation/ConnectorUpdateFilteringValidationRequest.ts @@ -0,0 +1,40 @@ +/* + * 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 { RequestBase } from '@_types/Base' +import { Id } from '@_types/common' +import { FilteringRulesValidation } from 'connector/_types/Connector' + +/** + * Updates the draft filtering validation info for a connector. + * @rest_spec_name connector.update_filtering_validation + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + * @doc_id connector-update-filtering-validation + */ +export interface Request extends RequestBase { + path_parts: { + /** + * The unique identifier of the connector to be updated + */ + connector_id: Id + } + body: { + validation: FilteringRulesValidation + } +} diff --git a/specification/connector/update_filtering_validation/ConnectorUpdateFilteringValidationResponse.ts b/specification/connector/update_filtering_validation/ConnectorUpdateFilteringValidationResponse.ts new file mode 100644 index 0000000000..fc194d6f20 --- /dev/null +++ b/specification/connector/update_filtering_validation/ConnectorUpdateFilteringValidationResponse.ts @@ -0,0 +1,26 @@ +/* + * 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 { Result } from '@_types/Result' + +export class Response { + body: { + result: Result + } +}