From ba8f1077b5818f05800e40c23b4ac0b772c1af07 Mon Sep 17 00:00:00 2001 From: Jedr Blaszyk Date: Wed, 13 Dec 2023 14:30:24 +0100 Subject: [PATCH 01/16] Add _connector API definition --- .../elasticsearch-serverless-openapi.json | 3891 ++++++++++++----- output/schema/schema.json | 3679 ++++++++++++++++ output/schema/validation-errors.json | 6 + output/typescript/types.ts | 319 ++ .../_json_spec/connector.check_in.json | 27 + .../_json_spec/connector.delete.json | 27 + specification/_json_spec/connector.get.json | 27 + .../_json_spec/connector.last_sync.json | 32 + specification/_json_spec/connector.list.json | 33 + specification/_json_spec/connector.post.json | 26 + specification/_json_spec/connector.put.json | 32 + .../connector.update_configuration.json | 32 + .../_json_spec/connector.update_error.json | 32 + .../connector.update_filtering.json | 32 + .../_json_spec/connector.update_name.json | 32 + .../_json_spec/connector.update_pipeline.json | 32 + .../connector.update_scheduling.json | 32 + specification/connector/_types/Connector.ts | 241 + .../check_in/ConnectorCheckInRequest.ts | 35 + .../check_in/ConnectorCheckInResponse.ts | 26 + .../delete/ConnectorDeleteRequest.ts | 35 + .../delete/ConnectorDeleteResponse.ts | 24 + .../connector/get/ConnectorGetRequest.ts | 35 + .../connector/get/ConnectorGetResponse.ts | 24 + .../ConnectorUpdateLastSyncRequest.ts | 52 + .../ConnectorUpdateLastSyncResponse.ts | 26 + .../connector/list/ConnectorListRequest.ts | 39 + .../connector/list/ConnectorListResponse.ts | 28 + .../connector/post/ConnectorPostRequest.ts | 40 + .../connector/post/ConnectorPostResponse.ts | 26 + .../connector/put/ConnectorPutRequest.ts | 47 + .../connector/put/ConnectorPutResponse.ts | 26 + .../ConnectorUpdateConfigurationRequest.ts | 43 + .../ConnectorUpdateConfigurationResponse.ts | 26 + .../ConnectorUpdateErrorRequest.ts | 42 + .../ConnectorUpdateErrorResponse.ts | 26 + .../ConnectorUpdateFilteringRequest.ts | 43 + .../ConnectorUpdateFilteringResponse.ts | 26 + .../update_name/ConnectorUpdateNameRequest.ts | 42 + .../ConnectorUpdateNameResponse.ts | 26 + .../ConnectorUpdatePipelineRequest.ts | 43 + .../ConnectorUpdatePipelineResponse.ts | 26 + .../ConnectorUpdateSchedulingRequest.ts | 43 + .../ConnectorUpdateSchedulingResponse.ts | 26 + 44 files changed, 8364 insertions(+), 1043 deletions(-) create mode 100644 specification/_json_spec/connector.check_in.json create mode 100644 specification/_json_spec/connector.delete.json create mode 100644 specification/_json_spec/connector.get.json create mode 100644 specification/_json_spec/connector.last_sync.json create mode 100644 specification/_json_spec/connector.list.json create mode 100644 specification/_json_spec/connector.post.json create mode 100644 specification/_json_spec/connector.put.json create mode 100644 specification/_json_spec/connector.update_configuration.json create mode 100644 specification/_json_spec/connector.update_error.json create mode 100644 specification/_json_spec/connector.update_filtering.json create mode 100644 specification/_json_spec/connector.update_name.json create mode 100644 specification/_json_spec/connector.update_pipeline.json create mode 100644 specification/_json_spec/connector.update_scheduling.json create mode 100644 specification/connector/_types/Connector.ts create mode 100644 specification/connector/check_in/ConnectorCheckInRequest.ts create mode 100644 specification/connector/check_in/ConnectorCheckInResponse.ts create mode 100644 specification/connector/delete/ConnectorDeleteRequest.ts create mode 100644 specification/connector/delete/ConnectorDeleteResponse.ts create mode 100644 specification/connector/get/ConnectorGetRequest.ts create mode 100644 specification/connector/get/ConnectorGetResponse.ts create mode 100644 specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts create mode 100644 specification/connector/last_sync/ConnectorUpdateLastSyncResponse.ts create mode 100644 specification/connector/list/ConnectorListRequest.ts create mode 100644 specification/connector/list/ConnectorListResponse.ts create mode 100644 specification/connector/post/ConnectorPostRequest.ts create mode 100644 specification/connector/post/ConnectorPostResponse.ts create mode 100644 specification/connector/put/ConnectorPutRequest.ts create mode 100644 specification/connector/put/ConnectorPutResponse.ts create mode 100644 specification/connector/update_configuration/ConnectorUpdateConfigurationRequest.ts create mode 100644 specification/connector/update_configuration/ConnectorUpdateConfigurationResponse.ts create mode 100644 specification/connector/update_error/ConnectorUpdateErrorRequest.ts create mode 100644 specification/connector/update_error/ConnectorUpdateErrorResponse.ts create mode 100644 specification/connector/update_filtering/ConnectorUpdateFilteringRequest.ts create mode 100644 specification/connector/update_filtering/ConnectorUpdateFilteringResponse.ts create mode 100644 specification/connector/update_name/ConnectorUpdateNameRequest.ts create mode 100644 specification/connector/update_name/ConnectorUpdateNameResponse.ts create mode 100644 specification/connector/update_pipeline/ConnectorUpdatePipelineRequest.ts create mode 100644 specification/connector/update_pipeline/ConnectorUpdatePipelineResponse.ts create mode 100644 specification/connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts create mode 100644 specification/connector/update_scheduling/ConnectorUpdateSchedulingResponse.ts diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index b0a8df86d6..c5c9143086 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -1810,557 +1810,1470 @@ } } }, - "/_count": { - "get": { + "/_connector/{connector_id}/_check_in": { + "put": { "tags": [ - "count" + "connector.check_in" ], - "summary": "Returns number of documents matching a query.", - "description": "Returns number of documents matching a query.", + "summary": "Updates the last_seen timestamp in the connector document.", + "description": "Updates the last_seen timestamp in the connector document.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html" + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" }, - "operationId": "count-1", + "operationId": "connector-check-in", "parameters": [ { - "$ref": "#/components/parameters/count#allow_no_indices" - }, - { - "$ref": "#/components/parameters/count#analyzer" - }, - { - "$ref": "#/components/parameters/count#analyze_wildcard" - }, - { - "$ref": "#/components/parameters/count#default_operator" - }, - { - "$ref": "#/components/parameters/count#df" - }, - { - "$ref": "#/components/parameters/count#expand_wildcards" - }, - { - "$ref": "#/components/parameters/count#ignore_throttled" - }, - { - "$ref": "#/components/parameters/count#ignore_unavailable" - }, - { - "$ref": "#/components/parameters/count#lenient" - }, - { - "$ref": "#/components/parameters/count#min_score" - }, - { - "$ref": "#/components/parameters/count#preference" - }, - { - "$ref": "#/components/parameters/count#routing" - }, - { - "$ref": "#/components/parameters/count#terminate_after" - }, - { - "$ref": "#/components/parameters/count#q" + "in": "path", + "name": "connector_id", + "description": "The unique identifier of the connector to be checked in", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Id" + }, + "style": "simple" } ], - "requestBody": { - "$ref": "#/components/requestBodies/count" - }, "responses": { "200": { - "$ref": "#/components/responses/count#200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/_types:Result" + } + }, + "required": [ + "result" + ] + } + } + } } } - }, - "post": { + } + }, + "/_connector/{connector_id}": { + "get": { "tags": [ - "count" + "connector.get" ], - "summary": "Returns number of documents matching a query.", - "description": "Returns number of documents matching a query.", + "summary": "Returns the details about a connector.", + "description": "Returns the details about a connector.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html" + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" }, - "operationId": "count", + "operationId": "connector-get", "parameters": [ { - "$ref": "#/components/parameters/count#allow_no_indices" - }, - { - "$ref": "#/components/parameters/count#analyzer" - }, - { - "$ref": "#/components/parameters/count#analyze_wildcard" - }, - { - "$ref": "#/components/parameters/count#default_operator" - }, - { - "$ref": "#/components/parameters/count#df" - }, - { - "$ref": "#/components/parameters/count#expand_wildcards" - }, - { - "$ref": "#/components/parameters/count#ignore_throttled" - }, - { - "$ref": "#/components/parameters/count#ignore_unavailable" - }, - { - "$ref": "#/components/parameters/count#lenient" - }, - { - "$ref": "#/components/parameters/count#min_score" - }, - { - "$ref": "#/components/parameters/count#preference" - }, - { - "$ref": "#/components/parameters/count#routing" - }, - { - "$ref": "#/components/parameters/count#terminate_after" - }, - { - "$ref": "#/components/parameters/count#q" + "in": "path", + "name": "connector_id", + "description": "The unique identifier of the connector", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Id" + }, + "style": "simple" } ], - "requestBody": { - "$ref": "#/components/requestBodies/count" - }, "responses": { "200": { - "$ref": "#/components/responses/count#200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/connector._types:Connector" + } + } + } } } - } - }, - "/{index}/_count": { - "get": { + }, + "put": { "tags": [ - "count" + "connector.put" ], - "summary": "Returns number of documents matching a query.", - "description": "Returns number of documents matching a query.", + "summary": "Creates or updates a connector.", + "description": "Creates or updates a connector.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html" + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" }, - "operationId": "count-3", + "operationId": "connector-put", "parameters": [ { - "$ref": "#/components/parameters/count#index" - }, - { - "$ref": "#/components/parameters/count#allow_no_indices" - }, - { - "$ref": "#/components/parameters/count#analyzer" - }, - { - "$ref": "#/components/parameters/count#analyze_wildcard" - }, - { - "$ref": "#/components/parameters/count#default_operator" - }, - { - "$ref": "#/components/parameters/count#df" - }, - { - "$ref": "#/components/parameters/count#expand_wildcards" - }, - { - "$ref": "#/components/parameters/count#ignore_throttled" - }, - { - "$ref": "#/components/parameters/count#ignore_unavailable" - }, - { - "$ref": "#/components/parameters/count#lenient" - }, - { - "$ref": "#/components/parameters/count#min_score" - }, - { - "$ref": "#/components/parameters/count#preference" - }, - { - "$ref": "#/components/parameters/count#routing" - }, - { - "$ref": "#/components/parameters/count#terminate_after" - }, - { - "$ref": "#/components/parameters/count#q" + "in": "path", + "name": "connector_id", + "description": "The unique identifier of the connector to be created or updated", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Id" + }, + "style": "simple" } ], "requestBody": { - "$ref": "#/components/requestBodies/count" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "index_name": { + "type": "string" + }, + "is_native": { + "type": "boolean" + }, + "language": { + "type": "string" + }, + "name": { + "type": "string" + }, + "service_type": { + "type": "string" + } + }, + "required": [ + "index_name" + ] + } + } + }, + "required": true }, "responses": { "200": { - "$ref": "#/components/responses/count#200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/_types:Result" + } + }, + "required": [ + "result" + ] + } + } + } } } }, - "post": { + "delete": { "tags": [ - "count" + "connector.delete" ], - "summary": "Returns number of documents matching a query.", - "description": "Returns number of documents matching a query.", + "summary": "Deletes a connector.", + "description": "Deletes a connector.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html" + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" }, - "operationId": "count-2", + "operationId": "connector-delete", "parameters": [ { - "$ref": "#/components/parameters/count#index" - }, - { - "$ref": "#/components/parameters/count#allow_no_indices" - }, - { - "$ref": "#/components/parameters/count#analyzer" - }, - { - "$ref": "#/components/parameters/count#analyze_wildcard" - }, - { - "$ref": "#/components/parameters/count#default_operator" - }, - { - "$ref": "#/components/parameters/count#df" - }, - { - "$ref": "#/components/parameters/count#expand_wildcards" - }, - { - "$ref": "#/components/parameters/count#ignore_throttled" - }, - { - "$ref": "#/components/parameters/count#ignore_unavailable" - }, - { - "$ref": "#/components/parameters/count#lenient" - }, - { - "$ref": "#/components/parameters/count#min_score" - }, - { - "$ref": "#/components/parameters/count#preference" - }, - { - "$ref": "#/components/parameters/count#routing" - }, - { - "$ref": "#/components/parameters/count#terminate_after" - }, - { - "$ref": "#/components/parameters/count#q" + "in": "path", + "name": "connector_id", + "description": "The unique identifier of the connector to be deleted", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Id" + }, + "style": "simple" } ], - "requestBody": { - "$ref": "#/components/requestBodies/count" - }, "responses": { "200": { - "$ref": "#/components/responses/count#200" + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_types:AcknowledgedResponseBase" + } + } + } } } } }, - "/{index}/_create/{id}": { + "/_connector/{connector_id}/_last_sync": { "put": { "tags": [ - "create" + "connector.last_sync" ], - "summary": "Creates a new document in the index.\n\nReturns a 409 response when a document with a same ID already exists in the index.", - "description": "Creates a new document in the index.\n\nReturns a 409 response when a document with a same ID already exists in the index.", + "summary": "Updates the stats of last sync in the connector document.", + "description": "Updates the stats of last sync in the connector document.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html" + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" }, - "operationId": "create", + "operationId": "connector-last-sync", "parameters": [ { - "$ref": "#/components/parameters/create#index" - }, - { - "$ref": "#/components/parameters/create#id" - }, - { - "$ref": "#/components/parameters/create#pipeline" - }, - { - "$ref": "#/components/parameters/create#refresh" - }, - { - "$ref": "#/components/parameters/create#routing" - }, - { - "$ref": "#/components/parameters/create#timeout" - }, - { - "$ref": "#/components/parameters/create#version" - }, - { - "$ref": "#/components/parameters/create#version_type" - }, - { - "$ref": "#/components/parameters/create#wait_for_active_shards" + "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": { - "$ref": "#/components/requestBodies/create" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "last_access_control_sync_error": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "last_access_control_sync_scheduled_at": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "last_access_control_sync_status": { + "oneOf": [ + { + "$ref": "#/components/schemas/connector._types:SyncStatus" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "last_deleted_document_count": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "last_incremental_sync_scheduled_at": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "last_indexed_document_count": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "last_seen": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "last_sync_error": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "last_sync_scheduled_at": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "last_sync_status": { + "oneOf": [ + { + "$ref": "#/components/schemas/connector._types:SyncStatus" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "last_synced": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + } + }, + "required": [ + "last_access_control_sync_error", + "last_access_control_sync_scheduled_at", + "last_access_control_sync_status", + "last_deleted_document_count", + "last_incremental_sync_scheduled_at", + "last_indexed_document_count", + "last_seen", + "last_sync_error", + "last_sync_scheduled_at", + "last_sync_status", + "last_synced" + ] + } + } + }, + "required": true }, "responses": { "200": { - "$ref": "#/components/responses/create#200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/_types:Result" + } + }, + "required": [ + "result" + ] + } + } + } } } - }, - "post": { + } + }, + "/_connector": { + "get": { "tags": [ - "create" + "connector.list" ], - "summary": "Creates a new document in the index.\n\nReturns a 409 response when a document with a same ID already exists in the index.", - "description": "Creates a new document in the index.\n\nReturns a 409 response when a document with a same ID already exists in the index.", + "summary": "Lists all connectors.", + "description": "Lists all connectors.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html" + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" }, - "operationId": "create-1", + "operationId": "connector-list", "parameters": [ { - "$ref": "#/components/parameters/create#index" + "in": "query", + "name": "from", + "description": "Starting offset (default: 0)", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" }, { - "$ref": "#/components/parameters/create#id" - }, - { - "$ref": "#/components/parameters/create#pipeline" - }, - { - "$ref": "#/components/parameters/create#refresh" - }, - { - "$ref": "#/components/parameters/create#routing" - }, - { - "$ref": "#/components/parameters/create#timeout" - }, - { - "$ref": "#/components/parameters/create#version" - }, - { - "$ref": "#/components/parameters/create#version_type" - }, - { - "$ref": "#/components/parameters/create#wait_for_active_shards" + "in": "query", + "name": "size", + "description": "Specifies a max number of results to get", + "deprecated": false, + "schema": { + "type": "number" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "count": { + "type": "number" + }, + "results": { + "type": "array", + "items": { + "$ref": "#/components/schemas/connector._types:Connector" + } + } + }, + "required": [ + "count", + "results" + ] + } + } + } } + } + }, + "post": { + "tags": [ + "connector.post" ], + "summary": "Creates a connector.", + "description": "Creates a connector.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" + }, + "operationId": "connector-post", "requestBody": { - "$ref": "#/components/requestBodies/create" + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "index_name": { + "type": "string" + }, + "is_native": { + "type": "boolean" + }, + "language": { + "type": "string" + }, + "name": { + "type": "string" + }, + "service_type": { + "type": "string" + } + }, + "required": [ + "index_name" + ] + } + } + }, + "required": true }, "responses": { "200": { - "$ref": "#/components/responses/create#200" + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "$ref": "#/components/schemas/_types:Id" + } + }, + "required": [ + "id" + ] + } + } + } } } } }, - "/{index}/_doc/{id}": { - "get": { + "/_connector/{connector_id}/_configuration": { + "put": { "tags": [ - "get" + "connector.update_configuration" ], - "summary": "Returns a document.", - "description": "Returns a document.", + "summary": "Updates the connector configuration.", + "description": "Updates the connector configuration.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html" + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" }, - "operationId": "get", + "operationId": "connector-update-configuration", "parameters": [ { "in": "path", - "name": "index", - "description": "Name of the index that contains the document.", + "name": "connector_id", + "description": "The unique identifier of the connector to be updated", "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types:IndexName" + "$ref": "#/components/schemas/_types:Id" }, "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "configuration": { + "$ref": "#/components/schemas/connector._types:ConnectorConfiguration" + } + }, + "required": [ + "configuration" + ] + } + } }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/_types:Result" + } + }, + "required": [ + "result" + ] + } + } + } + } + } + } + }, + "/_connector/{connector_id}/_error": { + "put": { + "tags": [ + "connector.update_error" + ], + "summary": "Updates the error field in the connector document.", + "description": "Updates the error field in the connector document.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" + }, + "operationId": "connector-update-error", + "parameters": [ { "in": "path", - "name": "id", - "description": "Unique identifier of the document.", + "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": { + "error": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + } + }, + "required": [ + "error" + ] + } + } }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/_types:Result" + } + }, + "required": [ + "result" + ] + } + } + } + } + } + } + }, + "/_connector/{connector_id}/_filtering": { + "put": { + "tags": [ + "connector.update_filtering" + ], + "summary": "Updates the filtering field in the connector document.", + "description": "Updates the filtering field in the connector document.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" + }, + "operationId": "connector-update-filtering", + "parameters": [ { - "in": "query", - "name": "preference", - "description": "Specifies the node or shard the operation should be performed on. Random by default.", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, - { - "in": "query", - "name": "realtime", - "description": "If `true`, the request is real-time as opposed to near-real-time.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "refresh", - "description": "If true, Elasticsearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes.", - "deprecated": false, - "schema": { - "type": "boolean" - }, - "style": "form" - }, - { - "in": "query", - "name": "routing", - "description": "Target the specified primary shard.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types:Routing" - }, - "style": "form" - }, - { - "in": "query", - "name": "_source", - "description": "True or false to return the _source field or not, or a list of fields to return.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_global.search._types:SourceConfigParam" - }, - "style": "form" - }, - { - "in": "query", - "name": "_source_excludes", - "description": "A comma-separated list of source fields to exclude in the response.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types:Fields" - }, - "style": "form" - }, - { - "in": "query", - "name": "_source_includes", - "description": "A comma-separated list of source fields to include in the response.", + "in": "path", + "name": "connector_id", + "description": "The unique identifier of the connector to be updated", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types:Fields" + "$ref": "#/components/schemas/_types:Id" }, - "style": "form" + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "filtering": { + "type": "array", + "items": { + "$ref": "#/components/schemas/connector._types:FilteringConfig" + } + } + }, + "required": [ + "filtering" + ] + } + } }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/_types:Result" + } + }, + "required": [ + "result" + ] + } + } + } + } + } + } + }, + "/_connector/{connector_id}/_name": { + "put": { + "tags": [ + "connector.update_name" + ], + "summary": "Updates the name and/or description fields in the connector document.", + "description": "Updates the name and/or description fields in the connector document.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" + }, + "operationId": "connector-update-name", + "parameters": [ { - "in": "query", - "name": "stored_fields", - "description": "List of stored fields to return as part of a hit.\nIf no fields are specified, no stored fields are included in the response.\nIf this field is specified, the `_source` parameter defaults to false.", + "in": "path", + "name": "connector_id", + "description": "The unique identifier of the connector to be updated", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types:Fields" + "$ref": "#/components/schemas/_types:Id" }, - "style": "form" + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + } }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/_types:Result" + } + }, + "required": [ + "result" + ] + } + } + } + } + } + } + }, + "/_connector/{connector_id}/_pipeline": { + "put": { + "tags": [ + "connector.update_pipeline" + ], + "summary": "Updates the pipeline field in the connector document.", + "description": "Updates the pipeline field in the connector document.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" + }, + "operationId": "connector-update-pipeline", + "parameters": [ { - "in": "query", - "name": "version", - "description": "Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.", + "in": "path", + "name": "connector_id", + "description": "The unique identifier of the connector to be updated", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types:VersionNumber" + "$ref": "#/components/schemas/_types:Id" }, - "style": "form" + "style": "simple" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "pipeline": { + "$ref": "#/components/schemas/connector._types:IngestPipelineParams" + } + }, + "required": [ + "pipeline" + ] + } + } }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/_types:Result" + } + }, + "required": [ + "result" + ] + } + } + } + } + } + } + }, + "/_connector/{connector_id}/_scheduling": { + "put": { + "tags": [ + "connector.update_scheduling" + ], + "summary": "Updates the scheduling field in the connector document.", + "description": "Updates the scheduling field in the connector document.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" + }, + "operationId": "connector-update-scheduling", + "parameters": [ { - "in": "query", - "name": "version_type", - "description": "Specific version type: internal, external, external_gte.", + "in": "path", + "name": "connector_id", + "description": "The unique identifier of the connector to be updated", + "required": true, "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types:VersionType" + "$ref": "#/components/schemas/_types:Id" }, - "style": "form" + "style": "simple" } ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "scheduling": { + "$ref": "#/components/schemas/connector._types:SchedulingConfiguraton" + } + }, + "required": [ + "scheduling" + ] + } + } + }, + "required": true + }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/_global.get:GetResult" + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/_types:Result" + } + }, + "required": [ + "result" + ] } } } } } - }, - "put": { + } + }, + "/_count": { + "get": { "tags": [ - "index" + "count" ], - "summary": "Creates or updates a document in an index.", - "description": "Creates or updates a document in an index.", + "summary": "Returns number of documents matching a query.", + "description": "Returns number of documents matching a query.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html" + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html" }, - "operationId": "index", + "operationId": "count-1", "parameters": [ { - "$ref": "#/components/parameters/index#index" + "$ref": "#/components/parameters/count#allow_no_indices" }, { - "$ref": "#/components/parameters/index#id" + "$ref": "#/components/parameters/count#analyzer" }, { - "$ref": "#/components/parameters/index#if_primary_term" + "$ref": "#/components/parameters/count#analyze_wildcard" }, { - "$ref": "#/components/parameters/index#if_seq_no" + "$ref": "#/components/parameters/count#default_operator" }, { - "$ref": "#/components/parameters/index#op_type" + "$ref": "#/components/parameters/count#df" }, { - "$ref": "#/components/parameters/index#pipeline" + "$ref": "#/components/parameters/count#expand_wildcards" }, { - "$ref": "#/components/parameters/index#refresh" + "$ref": "#/components/parameters/count#ignore_throttled" }, { - "$ref": "#/components/parameters/index#routing" + "$ref": "#/components/parameters/count#ignore_unavailable" }, { - "$ref": "#/components/parameters/index#timeout" + "$ref": "#/components/parameters/count#lenient" }, { - "$ref": "#/components/parameters/index#version" + "$ref": "#/components/parameters/count#min_score" }, { - "$ref": "#/components/parameters/index#version_type" + "$ref": "#/components/parameters/count#preference" + }, + { + "$ref": "#/components/parameters/count#routing" + }, + { + "$ref": "#/components/parameters/count#terminate_after" + }, + { + "$ref": "#/components/parameters/count#q" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/count" + }, + "responses": { + "200": { + "$ref": "#/components/responses/count#200" + } + } + }, + "post": { + "tags": [ + "count" + ], + "summary": "Returns number of documents matching a query.", + "description": "Returns number of documents matching a query.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html" + }, + "operationId": "count", + "parameters": [ + { + "$ref": "#/components/parameters/count#allow_no_indices" + }, + { + "$ref": "#/components/parameters/count#analyzer" + }, + { + "$ref": "#/components/parameters/count#analyze_wildcard" + }, + { + "$ref": "#/components/parameters/count#default_operator" + }, + { + "$ref": "#/components/parameters/count#df" + }, + { + "$ref": "#/components/parameters/count#expand_wildcards" + }, + { + "$ref": "#/components/parameters/count#ignore_throttled" + }, + { + "$ref": "#/components/parameters/count#ignore_unavailable" + }, + { + "$ref": "#/components/parameters/count#lenient" + }, + { + "$ref": "#/components/parameters/count#min_score" + }, + { + "$ref": "#/components/parameters/count#preference" + }, + { + "$ref": "#/components/parameters/count#routing" + }, + { + "$ref": "#/components/parameters/count#terminate_after" + }, + { + "$ref": "#/components/parameters/count#q" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/count" + }, + "responses": { + "200": { + "$ref": "#/components/responses/count#200" + } + } + } + }, + "/{index}/_count": { + "get": { + "tags": [ + "count" + ], + "summary": "Returns number of documents matching a query.", + "description": "Returns number of documents matching a query.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html" + }, + "operationId": "count-3", + "parameters": [ + { + "$ref": "#/components/parameters/count#index" + }, + { + "$ref": "#/components/parameters/count#allow_no_indices" + }, + { + "$ref": "#/components/parameters/count#analyzer" + }, + { + "$ref": "#/components/parameters/count#analyze_wildcard" + }, + { + "$ref": "#/components/parameters/count#default_operator" + }, + { + "$ref": "#/components/parameters/count#df" + }, + { + "$ref": "#/components/parameters/count#expand_wildcards" + }, + { + "$ref": "#/components/parameters/count#ignore_throttled" + }, + { + "$ref": "#/components/parameters/count#ignore_unavailable" + }, + { + "$ref": "#/components/parameters/count#lenient" + }, + { + "$ref": "#/components/parameters/count#min_score" + }, + { + "$ref": "#/components/parameters/count#preference" + }, + { + "$ref": "#/components/parameters/count#routing" + }, + { + "$ref": "#/components/parameters/count#terminate_after" + }, + { + "$ref": "#/components/parameters/count#q" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/count" + }, + "responses": { + "200": { + "$ref": "#/components/responses/count#200" + } + } + }, + "post": { + "tags": [ + "count" + ], + "summary": "Returns number of documents matching a query.", + "description": "Returns number of documents matching a query.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/search-count.html" + }, + "operationId": "count-2", + "parameters": [ + { + "$ref": "#/components/parameters/count#index" + }, + { + "$ref": "#/components/parameters/count#allow_no_indices" + }, + { + "$ref": "#/components/parameters/count#analyzer" + }, + { + "$ref": "#/components/parameters/count#analyze_wildcard" + }, + { + "$ref": "#/components/parameters/count#default_operator" + }, + { + "$ref": "#/components/parameters/count#df" + }, + { + "$ref": "#/components/parameters/count#expand_wildcards" + }, + { + "$ref": "#/components/parameters/count#ignore_throttled" + }, + { + "$ref": "#/components/parameters/count#ignore_unavailable" + }, + { + "$ref": "#/components/parameters/count#lenient" + }, + { + "$ref": "#/components/parameters/count#min_score" + }, + { + "$ref": "#/components/parameters/count#preference" + }, + { + "$ref": "#/components/parameters/count#routing" + }, + { + "$ref": "#/components/parameters/count#terminate_after" + }, + { + "$ref": "#/components/parameters/count#q" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/count" + }, + "responses": { + "200": { + "$ref": "#/components/responses/count#200" + } + } + } + }, + "/{index}/_create/{id}": { + "put": { + "tags": [ + "create" + ], + "summary": "Creates a new document in the index.\n\nReturns a 409 response when a document with a same ID already exists in the index.", + "description": "Creates a new document in the index.\n\nReturns a 409 response when a document with a same ID already exists in the index.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html" + }, + "operationId": "create", + "parameters": [ + { + "$ref": "#/components/parameters/create#index" + }, + { + "$ref": "#/components/parameters/create#id" + }, + { + "$ref": "#/components/parameters/create#pipeline" + }, + { + "$ref": "#/components/parameters/create#refresh" + }, + { + "$ref": "#/components/parameters/create#routing" + }, + { + "$ref": "#/components/parameters/create#timeout" + }, + { + "$ref": "#/components/parameters/create#version" + }, + { + "$ref": "#/components/parameters/create#version_type" + }, + { + "$ref": "#/components/parameters/create#wait_for_active_shards" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/create" + }, + "responses": { + "200": { + "$ref": "#/components/responses/create#200" + } + } + }, + "post": { + "tags": [ + "create" + ], + "summary": "Creates a new document in the index.\n\nReturns a 409 response when a document with a same ID already exists in the index.", + "description": "Creates a new document in the index.\n\nReturns a 409 response when a document with a same ID already exists in the index.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html" + }, + "operationId": "create-1", + "parameters": [ + { + "$ref": "#/components/parameters/create#index" + }, + { + "$ref": "#/components/parameters/create#id" + }, + { + "$ref": "#/components/parameters/create#pipeline" + }, + { + "$ref": "#/components/parameters/create#refresh" + }, + { + "$ref": "#/components/parameters/create#routing" + }, + { + "$ref": "#/components/parameters/create#timeout" + }, + { + "$ref": "#/components/parameters/create#version" + }, + { + "$ref": "#/components/parameters/create#version_type" + }, + { + "$ref": "#/components/parameters/create#wait_for_active_shards" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/create" + }, + "responses": { + "200": { + "$ref": "#/components/responses/create#200" + } + } + } + }, + "/{index}/_doc/{id}": { + "get": { + "tags": [ + "get" + ], + "summary": "Returns a document.", + "description": "Returns a document.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html" + }, + "operationId": "get", + "parameters": [ + { + "in": "path", + "name": "index", + "description": "Name of the index that contains the document.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:IndexName" + }, + "style": "simple" + }, + { + "in": "path", + "name": "id", + "description": "Unique identifier of the document.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Id" + }, + "style": "simple" + }, + { + "in": "query", + "name": "preference", + "description": "Specifies the node or shard the operation should be performed on. Random by default.", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" + }, + { + "in": "query", + "name": "realtime", + "description": "If `true`, the request is real-time as opposed to near-real-time.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "refresh", + "description": "If true, Elasticsearch refreshes the affected shards to make this operation visible to search. If false, do nothing with refreshes.", + "deprecated": false, + "schema": { + "type": "boolean" + }, + "style": "form" + }, + { + "in": "query", + "name": "routing", + "description": "Target the specified primary shard.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Routing" + }, + "style": "form" + }, + { + "in": "query", + "name": "_source", + "description": "True or false to return the _source field or not, or a list of fields to return.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_global.search._types:SourceConfigParam" + }, + "style": "form" + }, + { + "in": "query", + "name": "_source_excludes", + "description": "A comma-separated list of source fields to exclude in the response.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "_source_includes", + "description": "A comma-separated list of source fields to include in the response.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "stored_fields", + "description": "List of stored fields to return as part of a hit.\nIf no fields are specified, no stored fields are included in the response.\nIf this field is specified, the `_source` parameter defaults to false.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "version", + "description": "Explicit version number for concurrency control. The specified version must match the current version of the document for the request to succeed.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:VersionNumber" + }, + "style": "form" + }, + { + "in": "query", + "name": "version_type", + "description": "Specific version type: internal, external, external_gte.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:VersionType" + }, + "style": "form" + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/_global.get:GetResult" + } + } + } + } + } + }, + "put": { + "tags": [ + "index" + ], + "summary": "Creates or updates a document in an index.", + "description": "Creates or updates a document in an index.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/docs-index_.html" + }, + "operationId": "index", + "parameters": [ + { + "$ref": "#/components/parameters/index#index" + }, + { + "$ref": "#/components/parameters/index#id" + }, + { + "$ref": "#/components/parameters/index#if_primary_term" + }, + { + "$ref": "#/components/parameters/index#if_seq_no" + }, + { + "$ref": "#/components/parameters/index#op_type" + }, + { + "$ref": "#/components/parameters/index#pipeline" + }, + { + "$ref": "#/components/parameters/index#refresh" + }, + { + "$ref": "#/components/parameters/index#routing" + }, + { + "$ref": "#/components/parameters/index#timeout" + }, + { + "$ref": "#/components/parameters/index#version" + }, + { + "$ref": "#/components/parameters/index#version_type" }, { "$ref": "#/components/parameters/index#wait_for_active_shards" @@ -46543,429 +47456,1460 @@ "null_value": { "type": "number" } - }, - "required": [ - "type" + }, + "required": [ + "type" + ] + } + ] + }, + "_types.mapping:FloatNumberProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping:NumberPropertyBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "float" + ] + }, + "null_value": { + "type": "number" + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.mapping:HalfFloatNumberProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping:NumberPropertyBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "half_float" + ] + }, + "null_value": { + "type": "number" + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.mapping:IntegerNumberProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping:NumberPropertyBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "integer" + ] + }, + "null_value": { + "type": "number" + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.mapping:LongNumberProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping:NumberPropertyBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "long" + ] + }, + "null_value": { + "type": "number" + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.mapping:ScaledFloatNumberProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping:NumberPropertyBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "scaled_float" + ] + }, + "null_value": { + "type": "number" + }, + "scaling_factor": { + "type": "number" + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.mapping:ShortNumberProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping:NumberPropertyBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "short" + ] + }, + "null_value": { + "$ref": "#/components/schemas/_types:short" + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types:short": { + "type": "number" + }, + "_types.mapping:UnsignedLongNumberProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping:NumberPropertyBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "unsigned_long" + ] + }, + "null_value": { + "$ref": "#/components/schemas/_types:ulong" + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types:ulong": { + "type": "number" + }, + "_types.mapping:DateRangeProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping:RangePropertyBase" + }, + { + "type": "object", + "properties": { + "format": { + "type": "string" + }, + "type": { + "type": "string", + "enum": [ + "date_range" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.mapping:RangePropertyBase": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping:DocValuesPropertyBase" + }, + { + "type": "object", + "properties": { + "boost": { + "type": "number" + }, + "coerce": { + "type": "boolean" + }, + "index": { + "type": "boolean" + } + } + } + ] + }, + "_types.mapping:DoubleRangeProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping:RangePropertyBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "double_range" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.mapping:FloatRangeProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping:RangePropertyBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "float_range" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.mapping:IntegerRangeProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping:RangePropertyBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "integer_range" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.mapping:IpRangeProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping:RangePropertyBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "ip_range" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.mapping:LongRangeProperty": { + "allOf": [ + { + "$ref": "#/components/schemas/_types.mapping:RangePropertyBase" + }, + { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "long_range" + ] + } + }, + "required": [ + "type" + ] + } + ] + }, + "_types.mapping:MatchType": { + "type": "string", + "enum": [ + "simple", + "regex" + ] + }, + "_types.mapping:FieldNamesField": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ] + }, + "_types.mapping:IndexField": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ] + }, + "_types.mapping:RoutingField": { + "type": "object", + "properties": { + "required": { + "type": "boolean" + } + }, + "required": [ + "required" + ] + }, + "_types.mapping:SizeField": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ] + }, + "_types.mapping:SourceField": { + "type": "object", + "properties": { + "compress": { + "type": "boolean" + }, + "compress_threshold": { + "type": "string" + }, + "enabled": { + "type": "boolean" + }, + "excludes": { + "type": "array", + "items": { + "type": "string" + } + }, + "includes": { + "type": "array", + "items": { + "type": "string" + } + }, + "mode": { + "$ref": "#/components/schemas/_types.mapping:SourceFieldMode" + } + } + }, + "_types.mapping:SourceFieldMode": { + "type": "string", + "enum": [ + "disabled", + "stored", + "synthetic" + ] + }, + "_types.mapping:DataStreamTimestamp": { + "type": "object", + "properties": { + "enabled": { + "type": "boolean" + } + }, + "required": [ + "enabled" + ] + }, + "indices._types:AliasDefinition": { + "type": "object", + "properties": { + "filter": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + }, + "index_routing": { + "description": "Value used to route indexing operations to a specific shard.\nIf specified, this overwrites the `routing` value for indexing operations.", + "type": "string" + }, + "is_write_index": { + "description": "If `true`, the index is the write index for the alias.", + "type": "boolean" + }, + "routing": { + "description": "Value used to route indexing and search operations to a specific shard.", + "type": "string" + }, + "search_routing": { + "description": "Value used to route search operations to a specific shard.\nIf specified, this overwrites the `routing` value for search operations.", + "type": "string" + }, + "is_hidden": { + "description": "If `true`, the alias is hidden.\nAll indices for the alias must have the same `is_hidden` value.", + "type": "boolean" + } + } + }, + "indices._types:DataStreamLifecycleWithRollover": { + "type": "object", + "properties": { + "data_retention": { + "$ref": "#/components/schemas/_types:Duration" + }, + "downsampling": { + "$ref": "#/components/schemas/indices._types:DataStreamLifecycleDownsampling" + }, + "rollover": { + "$ref": "#/components/schemas/indices._types:DataStreamLifecycleRolloverConditions" + } + } + }, + "indices._types:DataStreamLifecycleDownsampling": { + "type": "object", + "properties": { + "rounds": { + "description": "The list of downsampling rounds to execute as part of this downsampling configuration", + "type": "array", + "items": { + "$ref": "#/components/schemas/indices._types:DownsamplingRound" + } + } + }, + "required": [ + "rounds" + ] + }, + "indices._types:DownsamplingRound": { + "type": "object", + "properties": { + "after": { + "$ref": "#/components/schemas/_types:Duration" + }, + "config": { + "$ref": "#/components/schemas/indices._types:DownsampleConfig" + } + }, + "required": [ + "after", + "config" + ] + }, + "indices._types:DownsampleConfig": { + "type": "object", + "properties": { + "fixed_interval": { + "$ref": "#/components/schemas/_types:DurationLarge" + } + }, + "required": [ + "fixed_interval" + ] + }, + "indices._types:DataStreamLifecycleRolloverConditions": { + "type": "object", + "properties": { + "min_age": { + "$ref": "#/components/schemas/_types:Duration" + }, + "max_age": { + "type": "string" + }, + "min_docs": { + "type": "number" + }, + "max_docs": { + "type": "number" + }, + "min_size": { + "$ref": "#/components/schemas/_types:ByteSize" + }, + "max_size": { + "$ref": "#/components/schemas/_types:ByteSize" + }, + "min_primary_shard_size": { + "$ref": "#/components/schemas/_types:ByteSize" + }, + "max_primary_shard_size": { + "$ref": "#/components/schemas/_types:ByteSize" + }, + "min_primary_shard_docs": { + "type": "number" + }, + "max_primary_shard_docs": { + "type": "number" + } + } + }, + "_types:ClusterInfoTargets": { + "oneOf": [ + { + "$ref": "#/components/schemas/_types:ClusterInfoTarget" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:ClusterInfoTarget" + } + } + ] + }, + "_types:ClusterInfoTarget": { + "type": "string", + "enum": [ + "_all", + "http", + "ingest", + "thread_pool", + "script" + ] + }, + "nodes._types:Http": { + "type": "object", + "properties": { + "current_open": { + "description": "Current number of open HTTP connections for the node.", + "type": "number" + }, + "total_opened": { + "description": "Total number of HTTP connections opened for the node.", + "type": "number" + }, + "clients": { + "description": "Information on current and recently-closed HTTP client connections.\nClients that have been closed longer than the `http.client_stats.closed_channels.max_age` setting will not be represented here.", + "type": "array", + "items": { + "$ref": "#/components/schemas/nodes._types:Client" + } + } + } + }, + "nodes._types:Client": { + "type": "object", + "properties": { + "id": { + "description": "Unique ID for the HTTP client.", + "type": "number" + }, + "agent": { + "description": "Reported agent for the HTTP client.\nIf unavailable, this property is not included in the response.", + "type": "string" + }, + "local_address": { + "description": "Local address for the HTTP connection.", + "type": "string" + }, + "remote_address": { + "description": "Remote address for the HTTP connection.", + "type": "string" + }, + "last_uri": { + "description": "The URI of the client’s most recent request.", + "type": "string" + }, + "opened_time_millis": { + "description": "Time at which the client opened the connection.", + "type": "number" + }, + "closed_time_millis": { + "description": "Time at which the client closed the connection if the connection is closed.", + "type": "number" + }, + "last_request_time_millis": { + "description": "Time of the most recent request from this client.", + "type": "number" + }, + "request_count": { + "description": "Number of requests from this client.", + "type": "number" + }, + "request_size_bytes": { + "description": "Cumulative size in bytes of all requests from this client.", + "type": "number" + }, + "x_opaque_id": { + "description": "Value from the client’s `x-opaque-id` HTTP header.\nIf unavailable, this property is not included in the response.", + "type": "string" + } + } + }, + "nodes._types:Ingest": { + "type": "object", + "properties": { + "pipelines": { + "description": "Contains statistics about ingest pipelines for the node.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/nodes._types:IngestTotal" + } + }, + "total": { + "$ref": "#/components/schemas/nodes._types:IngestTotal" + } + } + }, + "nodes._types:IngestTotal": { + "type": "object", + "properties": { + "count": { + "description": "Total number of documents ingested during the lifetime of this node.", + "type": "number" + }, + "current": { + "description": "Total number of documents currently being ingested.", + "type": "number" + }, + "failed": { + "description": "Total number of failed ingest operations during the lifetime of this node.", + "type": "number" + }, + "processors": { + "description": "Total number of ingest processors.", + "type": "array", + "items": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/nodes._types:KeyedProcessor" + } + } + }, + "time_in_millis": { + "$ref": "#/components/schemas/_types:DurationValueUnitMillis" + } + } + }, + "nodes._types:KeyedProcessor": { + "type": "object", + "properties": { + "stats": { + "$ref": "#/components/schemas/nodes._types:Processor" + }, + "type": { + "type": "string" + } + } + }, + "nodes._types:Processor": { + "type": "object", + "properties": { + "count": { + "description": "Number of documents transformed by the processor.", + "type": "number" + }, + "current": { + "description": "Number of documents currently being transformed by the processor.", + "type": "number" + }, + "failed": { + "description": "Number of failed operations for the processor.", + "type": "number" + }, + "time_in_millis": { + "$ref": "#/components/schemas/_types:DurationValueUnitMillis" + } + } + }, + "nodes._types:ThreadCount": { + "type": "object", + "properties": { + "active": { + "description": "Number of active threads in the thread pool.", + "type": "number" + }, + "completed": { + "description": "Number of tasks completed by the thread pool executor.", + "type": "number" + }, + "largest": { + "description": "Highest number of active threads in the thread pool.", + "type": "number" + }, + "queue": { + "description": "Number of tasks in queue for the thread pool.", + "type": "number" + }, + "rejected": { + "description": "Number of tasks rejected by the thread pool executor.", + "type": "number" + }, + "threads": { + "description": "Number of threads in the thread pool.", + "type": "number" + } + } + }, + "nodes._types:Scripting": { + "type": "object", + "properties": { + "cache_evictions": { + "description": "Total number of times the script cache has evicted old data.", + "type": "number" + }, + "compilations": { + "description": "Total number of inline script compilations performed by the node.", + "type": "number" + }, + "compilations_history": { + "description": "Contains this recent history of script compilations.", + "type": "object", + "additionalProperties": { + "type": "number" + } + }, + "compilation_limit_triggered": { + "description": "Total number of times the script compilation circuit breaker has limited inline script compilations.", + "type": "number" + }, + "contexts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/nodes._types:Context" + } + } + } + }, + "nodes._types:Context": { + "type": "object", + "properties": { + "context": { + "type": "string" + }, + "compilations": { + "type": "number" + }, + "cache_evictions": { + "type": "number" + }, + "compilation_limit_triggered": { + "type": "number" + } + } + }, + "indices._types:IndexState": { + "type": "object", + "properties": { + "aliases": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/indices._types:Alias" + } + }, + "mappings": { + "$ref": "#/components/schemas/_types.mapping:TypeMapping" + }, + "settings": { + "$ref": "#/components/schemas/indices._types:IndexSettings" + }, + "defaults": { + "$ref": "#/components/schemas/indices._types:IndexSettings" + }, + "data_stream": { + "$ref": "#/components/schemas/_types:DataStreamName" + }, + "lifecycle": { + "$ref": "#/components/schemas/indices._types:DataStreamLifecycle" + } + } + }, + "indices._types:Alias": { + "type": "object", + "properties": { + "filter": { + "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" + }, + "index_routing": { + "$ref": "#/components/schemas/_types:Routing" + }, + "is_hidden": { + "description": "If `true`, the alias is hidden.\nAll indices for the alias must have the same `is_hidden` value.", + "type": "boolean" + }, + "is_write_index": { + "description": "If `true`, the index is the write index for the alias.", + "type": "boolean" + }, + "routing": { + "$ref": "#/components/schemas/_types:Routing" + }, + "search_routing": { + "$ref": "#/components/schemas/_types:Routing" + } + } + }, + "_types:DataStreamName": { + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-data-stream.html#indices-create-data-stream-api-path-params" + }, + "type": "string" + }, + "indices._types:DataStreamLifecycle": { + "type": "object", + "properties": { + "data_retention": { + "$ref": "#/components/schemas/_types:Duration" + }, + "downsampling": { + "$ref": "#/components/schemas/indices._types:DataStreamLifecycleDownsampling" + } + } + }, + "_types:Result": { + "type": "string", + "enum": [ + "created", + "updated", + "deleted", + "not_found", + "noop" + ] + }, + "connector._types:Connector": { + "type": "object", + "properties": { + "api_key_id": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "configuration": { + "$ref": "#/components/schemas/connector._types:ConnectorConfiguration" + }, + "custom_scheduling": { + "$ref": "#/components/schemas/connector._types:ConnectorCustomScheduling" + }, + "description": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "error": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "features": { + "$ref": "#/components/schemas/connector._types:ConnectorFeatures" + }, + "filtering": { + "type": "array", + "items": { + "$ref": "#/components/schemas/connector._types:FilteringConfig" + } + }, + "id": { + "$ref": "#/components/schemas/_types:Id" + }, + "index_name": { + "type": "string" + }, + "is_native": { + "type": "boolean" + }, + "language": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "last_access_control_sync_error": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "last_access_control_sync_scheduled_at": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "last_access_control_sync_status": { + "oneOf": [ + { + "$ref": "#/components/schemas/connector._types:SyncStatus" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "last_deleted_document_count": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" + } ] - } - ] - }, - "_types.mapping:FloatNumberProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping:NumberPropertyBase" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "float" - ] + "last_incremental_sync_scheduled_at": { + "oneOf": [ + { + "type": "string" }, - "null_value": { + { + "nullable": true, + "type": "string" + } + ] + }, + "last_indexed_document_count": { + "oneOf": [ + { "type": "number" + }, + { + "nullable": true, + "type": "string" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping:HalfFloatNumberProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping:NumberPropertyBase" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "half_float" - ] + "last_seen": { + "oneOf": [ + { + "type": "string" }, - "null_value": { - "type": "number" + { + "nullable": true, + "type": "string" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping:IntegerNumberProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping:NumberPropertyBase" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "integer" - ] + "last_sync_error": { + "oneOf": [ + { + "type": "string" }, - "null_value": { - "type": "number" + { + "nullable": true, + "type": "string" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping:LongNumberProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping:NumberPropertyBase" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "long" - ] + "last_sync_scheduled_at": { + "oneOf": [ + { + "type": "string" }, - "null_value": { - "type": "number" + { + "nullable": true, + "type": "string" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping:ScaledFloatNumberProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping:NumberPropertyBase" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "scaled_float" - ] + "last_sync_status": { + "oneOf": [ + { + "$ref": "#/components/schemas/connector._types:SyncStatus" }, - "null_value": { - "type": "number" + { + "nullable": true, + "type": "string" + } + ] + }, + "last_synced": { + "oneOf": [ + { + "type": "string" }, - "scaling_factor": { - "type": "number" + { + "nullable": true, + "type": "string" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping:ShortNumberProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping:NumberPropertyBase" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "short" - ] + "name": { + "oneOf": [ + { + "type": "string" }, - "null_value": { - "$ref": "#/components/schemas/_types:short" + { + "nullable": true, + "type": "string" } - }, - "required": [ - "type" ] - } - ] - }, - "_types:short": { - "type": "number" - }, - "_types.mapping:UnsignedLongNumberProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping:NumberPropertyBase" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "unsigned_long" - ] + "pipeline": { + "oneOf": [ + { + "$ref": "#/components/schemas/connector._types:IngestPipelineParams" }, - "null_value": { - "$ref": "#/components/schemas/_types:ulong" + { + "nullable": true, + "type": "string" } - }, - "required": [ - "type" ] - } - ] - }, - "_types:ulong": { - "type": "number" - }, - "_types.mapping:DateRangeProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping:RangePropertyBase" }, - { - "type": "object", - "properties": { - "format": { + "scheduling": { + "$ref": "#/components/schemas/connector._types:SchedulingConfiguraton" + }, + "service_type": { + "oneOf": [ + { "type": "string" }, - "type": { - "type": "string", - "enum": [ - "date_range" - ] + { + "nullable": true, + "type": "string" } - }, - "required": [ - "type" ] + }, + "status": { + "$ref": "#/components/schemas/connector._types:ConnectorStatus" + }, + "sync_now": { + "type": "boolean" } + }, + "required": [ + "api_key_id", + "configuration", + "custom_scheduling", + "description", + "error", + "features", + "filtering", + "index_name", + "is_native", + "language", + "last_access_control_sync_error", + "last_access_control_sync_scheduled_at", + "last_access_control_sync_status", + "last_deleted_document_count", + "last_incremental_sync_scheduled_at", + "last_indexed_document_count", + "last_seen", + "last_sync_error", + "last_sync_scheduled_at", + "last_sync_status", + "last_synced", + "name", + "scheduling", + "service_type", + "status", + "sync_now" ] }, - "_types.mapping:RangePropertyBase": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping:DocValuesPropertyBase" + "connector._types:ConnectorConfiguration": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/connector._types:ConnectorConfigProperties" + }, + { + "$ref": "#/components/schemas/connector._types:ConnectorConfigCategoryProperties" + }, + { + "nullable": true, + "type": "string" + } + ] + } + }, + "connector._types:ConnectorConfigProperties": { + "type": "object", + "properties": { + "category": { + "type": "string" }, - { - "type": "object", - "properties": { - "boost": { + "default_value": { + "oneOf": [ + { + "type": "string" + }, + { "type": "number" }, - "coerce": { + { "type": "boolean" }, - "index": { - "type": "boolean" + { + "nullable": true, + "type": "string" } + ] + }, + "depends_on": { + "type": "array", + "items": { + "$ref": "#/components/schemas/connector._types:Dependency" } - } - ] - }, - "_types.mapping:DoubleRangeProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping:RangePropertyBase" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "double_range" - ] - } - }, - "required": [ - "type" - ] - } - ] - }, - "_types.mapping:FloatRangeProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping:RangePropertyBase" + "display": { + "$ref": "#/components/schemas/connector._types:DisplayType" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "float_range" - ] + "label": { + "type": "string" + }, + "options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/connector._types:SelectOption" + } + }, + "order": { + "oneOf": [ + { + "type": "number" + }, + { + "nullable": true, + "type": "string" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping:IntegerRangeProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping:RangePropertyBase" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "integer_range" - ] + "placeholder": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "sensitive": { + "type": "boolean" + }, + "tooltip": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" } - }, - "required": [ - "type" ] - } - ] - }, - "_types.mapping:IpRangeProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping:RangePropertyBase" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "ip_range" - ] + "type": { + "$ref": "#/components/schemas/connector._types:ConnectorFieldType" + }, + "ui_restrictions": { + "type": "array", + "items": { + "type": "string" + } + }, + "validations": { + "type": "array", + "items": { + "$ref": "#/components/schemas/connector._types:Validation" + } + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "nullable": true, + "type": "string" } - }, - "required": [ - "type" ] } + }, + "required": [ + "default_value", + "depends_on", + "display", + "label", + "options", + "required", + "sensitive", + "tooltip", + "type", + "ui_restrictions", + "validations", + "value" ] }, - "_types.mapping:LongRangeProperty": { - "allOf": [ - { - "$ref": "#/components/schemas/_types.mapping:RangePropertyBase" + "connector._types:Dependency": { + "type": "object", + "properties": { + "field": { + "type": "string" }, - { - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "long_range" - ] + "value": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + }, + { + "nullable": true, + "type": "string" } - }, - "required": [ - "type" ] } + }, + "required": [ + "field", + "value" ] }, - "_types.mapping:MatchType": { + "connector._types:DisplayType": { "type": "string", "enum": [ - "simple", - "regex" + "TEXTBOX", + "TEXTAREA", + "NUMERIC", + "TOGGLE", + "DROPDOWN" ] }, - "_types.mapping:FieldNamesField": { + "connector._types:SelectOption": { "type": "object", "properties": { - "enabled": { - "type": "boolean" + "label": { + "type": "string" + }, + "value": { + "type": "string" } }, "required": [ - "enabled" + "label", + "value" ] }, - "_types.mapping:IndexField": { + "connector._types:ConnectorFieldType": { + "type": "string", + "enum": [ + "STRING", + "INTEGER", + "LIST", + "BOOLEAN" + ] + }, + "connector._types:Validation": { "type": "object", "properties": { - "enabled": { - "type": "boolean" + "constraint": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "number" + } + ] + }, + "type": { + "type": "string" } }, "required": [ - "enabled" + "constraint", + "type" ] }, - "_types.mapping:RoutingField": { + "connector._types:ConnectorConfigCategoryProperties": { "type": "object", "properties": { - "required": { - "type": "boolean" + "label": { + "type": "string" + }, + "order": { + "type": "number" + }, + "type": { + "type": "string", + "enum": [ + "\"category\"" + ] } }, "required": [ - "required" + "label", + "order", + "type" ] }, - "_types.mapping:SizeField": { + "connector._types:ConnectorCustomScheduling": { + "type": "object", + "additionalProperties": { + "oneOf": [ + { + "$ref": "#/components/schemas/connector._types:CustomScheduling" + }, + { + "nullable": true, + "type": "string" + } + ] + } + }, + "connector._types:CustomScheduling": { "type": "object", "properties": { + "configuration_overrides": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, "enabled": { "type": "boolean" + }, + "interval": { + "type": "string" + }, + "last_synced": { + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] + }, + "name": { + "type": "string" } }, "required": [ - "enabled" + "configuration_overrides", + "enabled", + "interval", + "last_synced", + "name" ] }, - "_types.mapping:SourceField": { + "connector._types:ConnectorFeatures": { "type": "object", "properties": { - "compress": { - "type": "boolean" - }, - "compress_threshold": { - "type": "string" + "[FeatureName.DOCUMENT_LEVEL_SECURITY]": { + "$ref": "#/components/schemas/connector._types:FeatureEnabled" }, - "enabled": { + "[FeatureName.FILTERING_ADVANCED_CONFIG]": { "type": "boolean" }, - "excludes": { - "type": "array", - "items": { - "type": "string" - } + "[FeatureName.FILTERING_RULES]": { + "type": "boolean" }, - "includes": { - "type": "array", - "items": { - "type": "string" - } + "[FeatureName.INCREMENTAL_SYNC]": { + "$ref": "#/components/schemas/connector._types:FeatureEnabled" }, - "mode": { - "$ref": "#/components/schemas/_types.mapping:SourceFieldMode" + "[FeatureName.SYNC_RULES]": { + "$ref": "#/components/schemas/connector._types:SyncRulesFeature" } } }, - "_types.mapping:SourceFieldMode": { - "type": "string", - "enum": [ - "disabled", - "stored", - "synthetic" - ] - }, - "_types.mapping:DataStreamTimestamp": { + "connector._types:FeatureEnabled": { "type": "object", "properties": { "enabled": { @@ -46976,435 +48920,306 @@ "enabled" ] }, - "indices._types:AliasDefinition": { + "connector._types:SyncRulesFeature": { "type": "object", "properties": { - "filter": { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - }, - "index_routing": { - "description": "Value used to route indexing operations to a specific shard.\nIf specified, this overwrites the `routing` value for indexing operations.", - "type": "string" - }, - "is_write_index": { - "description": "If `true`, the index is the write index for the alias.", - "type": "boolean" - }, - "routing": { - "description": "Value used to route indexing and search operations to a specific shard.", - "type": "string" - }, - "search_routing": { - "description": "Value used to route search operations to a specific shard.\nIf specified, this overwrites the `routing` value for search operations.", - "type": "string" + "advanced": { + "$ref": "#/components/schemas/connector._types:FeatureEnabled" }, - "is_hidden": { - "description": "If `true`, the alias is hidden.\nAll indices for the alias must have the same `is_hidden` value.", - "type": "boolean" + "basic": { + "$ref": "#/components/schemas/connector._types:FeatureEnabled" } } }, - "indices._types:DataStreamLifecycleWithRollover": { + "connector._types:FilteringConfig": { "type": "object", "properties": { - "data_retention": { - "$ref": "#/components/schemas/_types:Duration" + "active": { + "$ref": "#/components/schemas/connector._types:FilteringRules" }, - "downsampling": { - "$ref": "#/components/schemas/indices._types:DataStreamLifecycleDownsampling" + "domain": { + "type": "string" }, - "rollover": { - "$ref": "#/components/schemas/indices._types:DataStreamLifecycleRolloverConditions" - } - } - }, - "indices._types:DataStreamLifecycleDownsampling": { - "type": "object", - "properties": { - "rounds": { - "description": "The list of downsampling rounds to execute as part of this downsampling configuration", - "type": "array", - "items": { - "$ref": "#/components/schemas/indices._types:DownsamplingRound" - } + "draft": { + "$ref": "#/components/schemas/connector._types:FilteringRules" } }, "required": [ - "rounds" + "active", + "domain", + "draft" ] }, - "indices._types:DownsamplingRound": { + "connector._types:FilteringRules": { "type": "object", "properties": { - "after": { - "$ref": "#/components/schemas/_types:Duration" + "advanced_snippet": { + "$ref": "#/components/schemas/connector._types:FilteringAdvancedSnippet" }, - "config": { - "$ref": "#/components/schemas/indices._types:DownsampleConfig" + "rules": { + "type": "array", + "items": { + "$ref": "#/components/schemas/connector._types:FilteringRule" + } + }, + "validation": { + "$ref": "#/components/schemas/connector._types:FilteringRulesValidation" } }, "required": [ - "after", - "config" + "advanced_snippet", + "rules", + "validation" ] }, - "indices._types:DownsampleConfig": { + "connector._types:FilteringAdvancedSnippet": { "type": "object", "properties": { - "fixed_interval": { - "$ref": "#/components/schemas/_types:DurationLarge" + "created_at": { + "type": "string" + }, + "updated_at": { + "type": "string" + }, + "value": { + "type": "object", + "additionalProperties": { + "type": "object" + } } }, "required": [ - "fixed_interval" + "created_at", + "updated_at", + "value" ] }, - "indices._types:DataStreamLifecycleRolloverConditions": { + "connector._types:FilteringRule": { "type": "object", "properties": { - "min_age": { - "$ref": "#/components/schemas/_types:Duration" + "created_at": { + "type": "string" }, - "max_age": { + "field": { "type": "string" }, - "min_docs": { - "type": "number" + "id": { + "type": "string" }, - "max_docs": { + "order": { "type": "number" }, - "min_size": { - "$ref": "#/components/schemas/_types:ByteSize" - }, - "max_size": { - "$ref": "#/components/schemas/_types:ByteSize" - }, - "min_primary_shard_size": { - "$ref": "#/components/schemas/_types:ByteSize" + "policy": { + "$ref": "#/components/schemas/connector._types:FilteringPolicy" }, - "max_primary_shard_size": { - "$ref": "#/components/schemas/_types:ByteSize" + "rule": { + "$ref": "#/components/schemas/connector._types:FilteringRuleRule" }, - "min_primary_shard_docs": { - "type": "number" + "updated_at": { + "type": "string" }, - "max_primary_shard_docs": { - "type": "number" + "value": { + "type": "string" } - } + }, + "required": [ + "created_at", + "field", + "id", + "order", + "policy", + "rule", + "updated_at", + "value" + ] }, - "_types:ClusterInfoTargets": { + "connector._types:FilteringPolicy": { "oneOf": [ { - "$ref": "#/components/schemas/_types:ClusterInfoTarget" + "type": "string", + "enum": [ + "\"exclude\"" + ] }, { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types:ClusterInfoTarget" - } + "type": "string", + "enum": [ + "\"include\"" + ] } ] }, - "_types:ClusterInfoTarget": { - "type": "string", - "enum": [ - "_all", - "http", - "ingest", - "thread_pool", - "script" - ] - }, - "nodes._types:Http": { - "type": "object", - "properties": { - "current_open": { - "description": "Current number of open HTTP connections for the node.", - "type": "number" - }, - "total_opened": { - "description": "Total number of HTTP connections opened for the node.", - "type": "number" - }, - "clients": { - "description": "Information on current and recently-closed HTTP client connections.\nClients that have been closed longer than the `http.client_stats.closed_channels.max_age` setting will not be represented here.", - "type": "array", - "items": { - "$ref": "#/components/schemas/nodes._types:Client" - } - } - } - }, - "nodes._types:Client": { - "type": "object", - "properties": { - "id": { - "description": "Unique ID for the HTTP client.", - "type": "number" - }, - "agent": { - "description": "Reported agent for the HTTP client.\nIf unavailable, this property is not included in the response.", - "type": "string" - }, - "local_address": { - "description": "Local address for the HTTP connection.", - "type": "string" - }, - "remote_address": { - "description": "Remote address for the HTTP connection.", - "type": "string" - }, - "last_uri": { - "description": "The URI of the client’s most recent request.", - "type": "string" - }, - "opened_time_millis": { - "description": "Time at which the client opened the connection.", - "type": "number" + "connector._types:FilteringRuleRule": { + "oneOf": [ + { + "type": "string", + "enum": [ + "\"contains\"" + ] }, - "closed_time_millis": { - "description": "Time at which the client closed the connection if the connection is closed.", - "type": "number" + { + "type": "string", + "enum": [ + "\"ends_with\"" + ] }, - "last_request_time_millis": { - "description": "Time of the most recent request from this client.", - "type": "number" + { + "type": "string", + "enum": [ + "\"equals\"" + ] }, - "request_count": { - "description": "Number of requests from this client.", - "type": "number" + { + "type": "string", + "enum": [ + "\">\"" + ] }, - "request_size_bytes": { - "description": "Cumulative size in bytes of all requests from this client.", - "type": "number" + { + "type": "string", + "enum": [ + "\"<\"" + ] }, - "x_opaque_id": { - "description": "Value from the client’s `x-opaque-id` HTTP header.\nIf unavailable, this property is not included in the response.", - "type": "string" - } - } - }, - "nodes._types:Ingest": { - "type": "object", - "properties": { - "pipelines": { - "description": "Contains statistics about ingest pipelines for the node.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/nodes._types:IngestTotal" - } + { + "type": "string", + "enum": [ + "\"regex\"" + ] }, - "total": { - "$ref": "#/components/schemas/nodes._types:IngestTotal" + { + "type": "string", + "enum": [ + "\"starts_with\"" + ] } - } + ] }, - "nodes._types:IngestTotal": { + "connector._types:FilteringRulesValidation": { "type": "object", "properties": { - "count": { - "description": "Total number of documents ingested during the lifetime of this node.", - "type": "number" - }, - "current": { - "description": "Total number of documents currently being ingested.", - "type": "number" - }, - "failed": { - "description": "Total number of failed ingest operations during the lifetime of this node.", - "type": "number" - }, - "processors": { - "description": "Total number of ingest processors.", + "errors": { "type": "array", "items": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/nodes._types:KeyedProcessor" - } + "$ref": "#/components/schemas/connector._types:FilteringValidation" } }, - "time_in_millis": { - "$ref": "#/components/schemas/_types:DurationValueUnitMillis" - } - } - }, - "nodes._types:KeyedProcessor": { - "type": "object", - "properties": { - "stats": { - "$ref": "#/components/schemas/nodes._types:Processor" - }, - "type": { - "type": "string" - } - } - }, - "nodes._types:Processor": { - "type": "object", - "properties": { - "count": { - "description": "Number of documents transformed by the processor.", - "type": "number" - }, - "current": { - "description": "Number of documents currently being transformed by the processor.", - "type": "number" - }, - "failed": { - "description": "Number of failed operations for the processor.", - "type": "number" - }, - "time_in_millis": { - "$ref": "#/components/schemas/_types:DurationValueUnitMillis" - } - } - }, - "nodes._types:ThreadCount": { - "type": "object", - "properties": { - "active": { - "description": "Number of active threads in the thread pool.", - "type": "number" - }, - "completed": { - "description": "Number of tasks completed by the thread pool executor.", - "type": "number" - }, - "largest": { - "description": "Highest number of active threads in the thread pool.", - "type": "number" - }, - "queue": { - "description": "Number of tasks in queue for the thread pool.", - "type": "number" - }, - "rejected": { - "description": "Number of tasks rejected by the thread pool executor.", - "type": "number" - }, - "threads": { - "description": "Number of threads in the thread pool.", - "type": "number" + "state": { + "$ref": "#/components/schemas/connector._types:FilteringValidationState" } - } + }, + "required": [ + "errors", + "state" + ] }, - "nodes._types:Scripting": { + "connector._types:FilteringValidation": { "type": "object", "properties": { - "cache_evictions": { - "description": "Total number of times the script cache has evicted old data.", - "type": "number" - }, - "compilations": { - "description": "Total number of inline script compilations performed by the node.", - "type": "number" - }, - "compilations_history": { - "description": "Contains this recent history of script compilations.", - "type": "object", - "additionalProperties": { - "type": "number" + "ids": { + "type": "array", + "items": { + "type": "string" } }, - "compilation_limit_triggered": { - "description": "Total number of times the script compilation circuit breaker has limited inline script compilations.", - "type": "number" - }, - "contexts": { + "messages": { "type": "array", "items": { - "$ref": "#/components/schemas/nodes._types:Context" + "type": "string" } } - } + }, + "required": [ + "ids", + "messages" + ] }, - "nodes._types:Context": { + "connector._types:FilteringValidationState": { + "type": "string", + "enum": [ + "EDITED", + "INVALID", + "VALID" + ] + }, + "connector._types:SyncStatus": { + "type": "string", + "enum": [ + "CANCELING", + "CANCELED", + "COMPLETED", + "ERROR", + "IN_PROGRESS", + "PENDING", + "SUSPENDED" + ] + }, + "connector._types:IngestPipelineParams": { "type": "object", "properties": { - "context": { - "type": "string" + "extract_binary_content": { + "type": "boolean" }, - "compilations": { - "type": "number" + "name": { + "type": "string" }, - "cache_evictions": { - "type": "number" + "reduce_whitespace": { + "type": "boolean" }, - "compilation_limit_triggered": { - "type": "number" + "run_ml_inference": { + "type": "boolean" } - } + }, + "required": [ + "extract_binary_content", + "name", + "reduce_whitespace", + "run_ml_inference" + ] }, - "indices._types:IndexState": { + "connector._types:SchedulingConfiguraton": { "type": "object", "properties": { - "aliases": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/indices._types:Alias" - } - }, - "mappings": { - "$ref": "#/components/schemas/_types.mapping:TypeMapping" - }, - "settings": { - "$ref": "#/components/schemas/indices._types:IndexSettings" - }, - "defaults": { - "$ref": "#/components/schemas/indices._types:IndexSettings" + "access_control": { + "$ref": "#/components/schemas/connector._types:ConnectorScheduling" }, - "data_stream": { - "$ref": "#/components/schemas/_types:DataStreamName" + "full": { + "$ref": "#/components/schemas/connector._types:ConnectorScheduling" }, - "lifecycle": { - "$ref": "#/components/schemas/indices._types:DataStreamLifecycle" + "incremental": { + "$ref": "#/components/schemas/connector._types:ConnectorScheduling" } - } + }, + "required": [ + "access_control", + "full", + "incremental" + ] }, - "indices._types:Alias": { + "connector._types:ConnectorScheduling": { "type": "object", "properties": { - "filter": { - "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" - }, - "index_routing": { - "$ref": "#/components/schemas/_types:Routing" - }, - "is_hidden": { - "description": "If `true`, the alias is hidden.\nAll indices for the alias must have the same `is_hidden` value.", - "type": "boolean" - }, - "is_write_index": { - "description": "If `true`, the index is the write index for the alias.", + "enabled": { "type": "boolean" }, - "routing": { - "$ref": "#/components/schemas/_types:Routing" - }, - "search_routing": { - "$ref": "#/components/schemas/_types:Routing" + "interval": { + "type": "string" } - } - }, - "_types:DataStreamName": { - "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-data-stream.html#indices-create-data-stream-api-path-params" }, - "type": "string" + "required": [ + "enabled", + "interval" + ] }, - "indices._types:DataStreamLifecycle": { - "type": "object", - "properties": { - "data_retention": { - "$ref": "#/components/schemas/_types:Duration" - }, - "downsampling": { - "$ref": "#/components/schemas/indices._types:DataStreamLifecycleDownsampling" - } - } + "connector._types:ConnectorStatus": { + "type": "string", + "enum": [ + "CREATED", + "NEEDS_CONFIGURATION", + "CONFIGURED", + "CONNECTED", + "ERROR" + ] }, "_types:WriteResponseBase": { "type": "object", @@ -47444,16 +49259,6 @@ "_version" ] }, - "_types:Result": { - "type": "string", - "enum": [ - "created", - "updated", - "deleted", - "not_found", - "noop" - ] - }, "_types:Conflicts": { "type": "string", "enum": [ diff --git a/output/schema/schema.json b/output/schema/schema.json index 1303d3db2d..3becbbdde5 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -3073,6 +3073,527 @@ ], "visibility": "public" }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" + } + }, + "description": "Updates the last_seen timestamp in the connector document.", + "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "name": "connector.check_in", + "request": { + "name": "Request", + "namespace": "connector.check_in" + }, + "requestBodyRequired": false, + "response": { + "name": "Response", + "namespace": "connector.check_in" + }, + "responseMediaType": [ + "application/json" + ], + "since": "8.12.0", + "stability": "experimental", + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_connector/{connector_id}/_check_in" + } + ], + "visibility": "public" + }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" + } + }, + "description": "Deletes a connector.", + "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "name": "connector.delete", + "request": { + "name": "Request", + "namespace": "connector.delete" + }, + "requestBodyRequired": false, + "response": { + "name": "Response", + "namespace": "connector.delete" + }, + "responseMediaType": [ + "application/json" + ], + "since": "8.12.0", + "stability": "experimental", + "urls": [ + { + "methods": [ + "DELETE" + ], + "path": "/_connector/{connector_id}" + } + ], + "visibility": "public" + }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" + } + }, + "description": "Returns the details about a connector.", + "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "name": "connector.get", + "request": { + "name": "Request", + "namespace": "connector.get" + }, + "requestBodyRequired": false, + "response": { + "name": "Response", + "namespace": "connector.get" + }, + "responseMediaType": [ + "application/json" + ], + "since": "8.12.0", + "stability": "experimental", + "urls": [ + { + "methods": [ + "GET" + ], + "path": "/_connector/{connector_id}" + } + ], + "visibility": "public" + }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" + } + }, + "description": "Updates the stats of last sync in the connector document.", + "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "name": "connector.last_sync", + "request": { + "name": "Request", + "namespace": "connector.last_sync" + }, + "requestBodyRequired": true, + "requestMediaType": [ + "application/json" + ], + "response": { + "name": "Response", + "namespace": "connector.last_sync" + }, + "responseMediaType": [ + "application/json" + ], + "since": "8.12.0", + "stability": "experimental", + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_connector/{connector_id}/_last_sync" + } + ], + "visibility": "public" + }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" + } + }, + "description": "Lists all connectors.", + "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "name": "connector.list", + "request": { + "name": "Request", + "namespace": "connector.list" + }, + "requestBodyRequired": false, + "response": { + "name": "Response", + "namespace": "connector.list" + }, + "responseMediaType": [ + "application/json" + ], + "since": "8.12.0", + "stability": "experimental", + "urls": [ + { + "methods": [ + "GET" + ], + "path": "/_connector" + } + ], + "visibility": "public" + }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" + } + }, + "description": "Creates a connector.", + "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "name": "connector.post", + "request": { + "name": "Request", + "namespace": "connector.post" + }, + "requestBodyRequired": true, + "requestMediaType": [ + "application/json" + ], + "response": { + "name": "Response", + "namespace": "connector.post" + }, + "responseMediaType": [ + "application/json" + ], + "since": "8.12.0", + "stability": "experimental", + "urls": [ + { + "methods": [ + "POST" + ], + "path": "/_connector" + } + ], + "visibility": "public" + }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" + } + }, + "description": "Creates or updates a connector.", + "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "name": "connector.put", + "request": { + "name": "Request", + "namespace": "connector.put" + }, + "requestBodyRequired": true, + "requestMediaType": [ + "application/json" + ], + "response": { + "name": "Response", + "namespace": "connector.put" + }, + "responseMediaType": [ + "application/json" + ], + "since": "8.12.0", + "stability": "experimental", + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_connector/{connector_id}" + } + ], + "visibility": "public" + }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" + } + }, + "description": "Updates the connector configuration.", + "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "name": "connector.update_configuration", + "request": { + "name": "Request", + "namespace": "connector.update_configuration" + }, + "requestBodyRequired": true, + "requestMediaType": [ + "application/json" + ], + "response": { + "name": "Response", + "namespace": "connector.update_configuration" + }, + "responseMediaType": [ + "application/json" + ], + "since": "8.12.0", + "stability": "experimental", + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_connector/{connector_id}/_configuration" + } + ], + "visibility": "public" + }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" + } + }, + "description": "Updates the error field in the connector document.", + "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "name": "connector.update_error", + "request": { + "name": "Request", + "namespace": "connector.update_error" + }, + "requestBodyRequired": true, + "requestMediaType": [ + "application/json" + ], + "response": { + "name": "Response", + "namespace": "connector.update_error" + }, + "responseMediaType": [ + "application/json" + ], + "since": "8.12.0", + "stability": "experimental", + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_connector/{connector_id}/_error" + } + ], + "visibility": "public" + }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" + } + }, + "description": "Updates the filtering field in the connector document.", + "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "name": "connector.update_filtering", + "request": { + "name": "Request", + "namespace": "connector.update_filtering" + }, + "requestBodyRequired": true, + "requestMediaType": [ + "application/json" + ], + "response": { + "name": "Response", + "namespace": "connector.update_filtering" + }, + "responseMediaType": [ + "application/json" + ], + "since": "8.12.0", + "stability": "experimental", + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_connector/{connector_id}/_filtering" + } + ], + "visibility": "public" + }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" + } + }, + "description": "Updates the name and/or description fields in the connector document.", + "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "name": "connector.update_name", + "request": { + "name": "Request", + "namespace": "connector.update_name" + }, + "requestBodyRequired": true, + "requestMediaType": [ + "application/json" + ], + "response": { + "name": "Response", + "namespace": "connector.update_name" + }, + "responseMediaType": [ + "application/json" + ], + "since": "8.12.0", + "stability": "experimental", + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_connector/{connector_id}/_name" + } + ], + "visibility": "public" + }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" + } + }, + "description": "Updates the pipeline field in the connector document.", + "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "name": "connector.update_pipeline", + "request": { + "name": "Request", + "namespace": "connector.update_pipeline" + }, + "requestBodyRequired": true, + "requestMediaType": [ + "application/json" + ], + "response": { + "name": "Response", + "namespace": "connector.update_pipeline" + }, + "responseMediaType": [ + "application/json" + ], + "since": "8.12.0", + "stability": "experimental", + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_connector/{connector_id}/_pipeline" + } + ], + "visibility": "public" + }, + { + "availability": { + "serverless": { + "stability": "experimental", + "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" + } + }, + "description": "Updates the scheduling field in the connector document.", + "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "name": "connector.update_scheduling", + "request": { + "name": "Request", + "namespace": "connector.update_scheduling" + }, + "requestBodyRequired": true, + "requestMediaType": [ + "application/json" + ], + "response": { + "name": "Response", + "namespace": "connector.update_scheduling" + }, + "responseMediaType": [ + "application/json" + ], + "since": "8.12.0", + "stability": "experimental", + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_connector/{connector_id}/_scheduling" + } + ], + "visibility": "public" + }, { "availability": { "serverless": { @@ -104222,6 +104743,3164 @@ ], "specLocation": "cluster/stats/ClusterStatsResponse.ts#L25-L51" }, + { + "kind": "interface", + "name": { + "name": "Connector", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "api_key_id", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "configuration", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "ConnectorConfiguration", + "namespace": "connector._types" + } + } + }, + { + "name": "custom_scheduling", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "ConnectorCustomScheduling", + "namespace": "connector._types" + } + } + }, + { + "name": "description", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "error", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "features", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "ConnectorFeatures", + "namespace": "connector._types" + } + } + }, + { + "name": "filtering", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "FilteringConfig", + "namespace": "connector._types" + } + } + } + }, + { + "name": "id", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + }, + { + "name": "index_name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "is_native", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "language", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "last_access_control_sync_error", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "last_access_control_sync_scheduled_at", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "last_access_control_sync_status", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "SyncStatus", + "namespace": "connector._types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "last_deleted_document_count", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "number", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "last_incremental_sync_scheduled_at", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "last_indexed_document_count", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "number", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "last_seen", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "last_sync_error", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "last_sync_scheduled_at", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "last_sync_status", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "SyncStatus", + "namespace": "connector._types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "last_synced", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "name", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "pipeline", + "required": false, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "IngestPipelineParams", + "namespace": "connector._types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "scheduling", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "SchedulingConfiguraton", + "namespace": "connector._types" + } + } + }, + { + "name": "service_type", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "status", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "ConnectorStatus", + "namespace": "connector._types" + } + } + }, + { + "name": "sync_now", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "connector/_types/Connector.ts#L212-L241" + }, + { + "kind": "interface", + "name": { + "name": "ConnectorConfigCategoryProperties", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "label", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "order", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "number", + "namespace": "_builtins" + } + } + }, + { + "name": "type", + "required": true, + "type": { + "kind": "literal_value", + "value": "\"category\"" + } + } + ], + "specLocation": "connector/_types/Connector.ts#L48-L52" + }, + { + "kind": "interface", + "name": { + "name": "ConnectorConfigProperties", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "category", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "default_value", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "number", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "depends_on", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "Dependency", + "namespace": "connector._types" + } + } + } + }, + { + "name": "display", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "DisplayType", + "namespace": "connector._types" + } + } + }, + { + "name": "label", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "options", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "SelectOption", + "namespace": "connector._types" + } + } + } + }, + { + "name": "order", + "required": false, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "number", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "placeholder", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "required", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "sensitive", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "tooltip", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "type", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "ConnectorFieldType", + "namespace": "connector._types" + } + } + }, + { + "name": "ui_restrictions", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + }, + { + "name": "validations", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "Validation", + "namespace": "connector._types" + } + } + } + }, + { + "name": "value", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "number", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + } + ], + "specLocation": "connector/_types/Connector.ts#L59-L75" + }, + { + "kind": "type_alias", + "name": { + "name": "ConnectorConfiguration", + "namespace": "connector._types" + }, + "specLocation": "connector/_types/Connector.ts#L77-L80", + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "ConnectorConfigProperties", + "namespace": "connector._types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "ConnectorConfigCategoryProperties", + "namespace": "connector._types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + } + }, + { + "kind": "type_alias", + "name": { + "name": "ConnectorCustomScheduling", + "namespace": "connector._types" + }, + "specLocation": "connector/_types/Connector.ts#L95-L98", + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "CustomScheduling", + "namespace": "connector._types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + } + }, + { + "kind": "interface", + "name": { + "name": "ConnectorFeatures", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "[FeatureName.DOCUMENT_LEVEL_SECURITY]", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "FeatureEnabled", + "namespace": "connector._types" + } + } + }, + { + "name": "[FeatureName.FILTERING_ADVANCED_CONFIG]", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "[FeatureName.FILTERING_RULES]", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "[FeatureName.INCREMENTAL_SYNC]", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "FeatureEnabled", + "namespace": "connector._types" + } + } + }, + { + "name": "[FeatureName.SYNC_RULES]", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "SyncRulesFeature", + "namespace": "connector._types" + } + } + } + ], + "specLocation": "connector/_types/Connector.ts#L198-L204" + }, + { + "kind": "enum", + "members": [ + { + "name": "STRING" + }, + { + "name": "INTEGER" + }, + { + "name": "LIST" + }, + { + "name": "BOOLEAN" + } + ], + "name": { + "name": "ConnectorFieldType", + "namespace": "connector._types" + }, + "specLocation": "connector/_types/Connector.ts#L41-L46" + }, + { + "kind": "interface", + "name": { + "name": "ConnectorScheduling", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "enabled", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "interval", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "connector/_types/Connector.ts#L82-L85" + }, + { + "kind": "enum", + "members": [ + { + "name": "CREATED" + }, + { + "name": "NEEDS_CONFIGURATION" + }, + { + "name": "CONFIGURED" + }, + { + "name": "CONNECTED" + }, + { + "name": "ERROR" + } + ], + "name": { + "name": "ConnectorStatus", + "namespace": "connector._types" + }, + "specLocation": "connector/_types/Connector.ts#L100-L106" + }, + { + "kind": "interface", + "name": { + "name": "CustomScheduling", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "configuration_overrides", + "required": true, + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "kind": "user_defined_value" + } + } + }, + { + "name": "enabled", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "interval", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "last_synced", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "connector/_types/Connector.ts#L87-L93" + }, + { + "kind": "interface", + "name": { + "name": "Dependency", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "field", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "value", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "number", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + } + ], + "specLocation": "connector/_types/Connector.ts#L28-L31" + }, + { + "kind": "enum", + "members": [ + { + "name": "TEXTBOX" + }, + { + "name": "TEXTAREA" + }, + { + "name": "NUMERIC" + }, + { + "name": "TOGGLE" + }, + { + "name": "DROPDOWN" + } + ], + "name": { + "name": "DisplayType", + "namespace": "connector._types" + }, + "specLocation": "connector/_types/Connector.ts#L33-L39" + }, + { + "kind": "interface", + "name": { + "name": "FeatureEnabled", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "enabled", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "connector/_types/Connector.ts#L189-L191" + }, + { + "kind": "interface", + "name": { + "name": "FilteringAdvancedSnippet", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "created_at", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "updated_at", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "value", + "required": true, + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "kind": "user_defined_value" + } + } + } + ], + "specLocation": "connector/_types/Connector.ts#L158-L162" + }, + { + "kind": "interface", + "name": { + "name": "FilteringConfig", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "active", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "FilteringRules", + "namespace": "connector._types" + } + } + }, + { + "name": "domain", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "draft", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "FilteringRules", + "namespace": "connector._types" + } + } + } + ], + "specLocation": "connector/_types/Connector.ts#L175-L179" + }, + { + "kind": "type_alias", + "name": { + "name": "FilteringPolicy", + "namespace": "connector._types" + }, + "specLocation": "connector/_types/Connector.ts#L125-L125", + "type": { + "items": [ + { + "kind": "literal_value", + "value": "\"exclude\"" + }, + { + "kind": "literal_value", + "value": "\"include\"" + } + ], + "kind": "union_of" + } + }, + { + "kind": "interface", + "name": { + "name": "FilteringRule", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "created_at", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "field", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "order", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "number", + "namespace": "_builtins" + } + } + }, + { + "name": "policy", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "FilteringPolicy", + "namespace": "connector._types" + } + } + }, + { + "name": "rule", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "FilteringRuleRule", + "namespace": "connector._types" + } + } + }, + { + "name": "updated_at", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "value", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "connector/_types/Connector.ts#L136-L145" + }, + { + "kind": "type_alias", + "name": { + "name": "FilteringRuleRule", + "namespace": "connector._types" + }, + "specLocation": "connector/_types/Connector.ts#L127-L134", + "type": { + "items": [ + { + "kind": "literal_value", + "value": "\"contains\"" + }, + { + "kind": "literal_value", + "value": "\"ends_with\"" + }, + { + "kind": "literal_value", + "value": "\"equals\"" + }, + { + "kind": "literal_value", + "value": "\">\"" + }, + { + "kind": "literal_value", + "value": "\"<\"" + }, + { + "kind": "literal_value", + "value": "\"regex\"" + }, + { + "kind": "literal_value", + "value": "\"starts_with\"" + } + ], + "kind": "union_of" + } + }, + { + "kind": "interface", + "name": { + "name": "FilteringRules", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "advanced_snippet", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "FilteringAdvancedSnippet", + "namespace": "connector._types" + } + } + }, + { + "name": "rules", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "FilteringRule", + "namespace": "connector._types" + } + } + } + }, + { + "name": "validation", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "FilteringRulesValidation", + "namespace": "connector._types" + } + } + } + ], + "specLocation": "connector/_types/Connector.ts#L169-L173" + }, + { + "kind": "interface", + "name": { + "name": "FilteringRulesValidation", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "errors", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "FilteringValidation", + "namespace": "connector._types" + } + } + } + }, + { + "name": "state", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "FilteringValidationState", + "namespace": "connector._types" + } + } + } + ], + "specLocation": "connector/_types/Connector.ts#L164-L167" + }, + { + "kind": "interface", + "name": { + "name": "FilteringValidation", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "ids", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + }, + { + "name": "messages", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + } + ], + "specLocation": "connector/_types/Connector.ts#L147-L150" + }, + { + "kind": "enum", + "members": [ + { + "name": "EDITED" + }, + { + "name": "INVALID" + }, + { + "name": "VALID" + } + ], + "name": { + "name": "FilteringValidationState", + "namespace": "connector._types" + }, + "specLocation": "connector/_types/Connector.ts#L152-L156" + }, + { + "kind": "interface", + "name": { + "name": "IngestPipelineParams", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "extract_binary_content", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "reduce_whitespace", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "run_ml_inference", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "connector/_types/Connector.ts#L118-L123" + }, + { + "kind": "interface", + "name": { + "name": "SchedulingConfiguraton", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "access_control", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "ConnectorScheduling", + "namespace": "connector._types" + } + } + }, + { + "name": "full", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "ConnectorScheduling", + "namespace": "connector._types" + } + } + }, + { + "name": "incremental", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "ConnectorScheduling", + "namespace": "connector._types" + } + } + } + ], + "specLocation": "connector/_types/Connector.ts#L206-L210" + }, + { + "kind": "interface", + "name": { + "name": "SelectOption", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "label", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "value", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "connector/_types/Connector.ts#L23-L26" + }, + { + "kind": "interface", + "name": { + "name": "SyncRulesFeature", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "advanced", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "FeatureEnabled", + "namespace": "connector._types" + } + } + }, + { + "name": "basic", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "FeatureEnabled", + "namespace": "connector._types" + } + } + } + ], + "specLocation": "connector/_types/Connector.ts#L193-L196" + }, + { + "kind": "enum", + "members": [ + { + "name": "CANCELING" + }, + { + "name": "CANCELED" + }, + { + "name": "COMPLETED" + }, + { + "name": "ERROR" + }, + { + "name": "IN_PROGRESS" + }, + { + "name": "PENDING" + }, + { + "name": "SUSPENDED" + } + ], + "name": { + "name": "SyncStatus", + "namespace": "connector._types" + }, + "specLocation": "connector/_types/Connector.ts#L108-L116" + }, + { + "kind": "interface", + "name": { + "name": "Validation", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "constraint", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "number", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "type", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "connector/_types/Connector.ts#L54-L57" + }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Updates the last_seen field in the connector, and sets it to current timestamp", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.check_in" + }, + "path": [ + { + "description": "The unique identifier of the connector to be checked in", + "name": "connector_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + } + ], + "query": [], + "specLocation": "connector/check_in/ConnectorCheckInRequest.ts#L22-L35" + }, + { + "body": { + "kind": "properties", + "properties": [ + { + "name": "result", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Result", + "namespace": "_types" + } + } + } + ] + }, + "kind": "response", + "name": { + "name": "Response", + "namespace": "connector.check_in" + }, + "specLocation": "connector/check_in/ConnectorCheckInResponse.ts#L22-L26" + }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Deletes a connector.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.delete" + }, + "path": [ + { + "description": "The unique identifier of the connector to be deleted", + "name": "connector_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + } + ], + "query": [], + "specLocation": "connector/delete/ConnectorDeleteRequest.ts#L22-L35" + }, + { + "body": { + "kind": "value", + "value": { + "kind": "instance_of", + "type": { + "name": "AcknowledgedResponseBase", + "namespace": "_types" + } + } + }, + "kind": "response", + "name": { + "name": "Response", + "namespace": "connector.delete" + }, + "specLocation": "connector/delete/ConnectorDeleteResponse.ts#L22-L24" + }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Retrieves a connector.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.get" + }, + "path": [ + { + "description": "The unique identifier of the connector", + "name": "connector_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + } + ], + "query": [], + "specLocation": "connector/get/ConnectorGetRequest.ts#L22-L35" + }, + { + "body": { + "kind": "value", + "value": { + "kind": "instance_of", + "type": { + "name": "Connector", + "namespace": "connector._types" + } + } + }, + "kind": "response", + "name": { + "name": "Response", + "namespace": "connector.get" + }, + "specLocation": "connector/get/ConnectorGetResponse.ts#L22-L24" + }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "name": "last_access_control_sync_error", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "last_access_control_sync_scheduled_at", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "last_access_control_sync_status", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "SyncStatus", + "namespace": "connector._types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "last_deleted_document_count", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "number", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "last_incremental_sync_scheduled_at", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "last_indexed_document_count", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "number", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "last_seen", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "last_sync_error", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "last_sync_scheduled_at", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "last_sync_status", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "SyncStatus", + "namespace": "connector._types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + }, + { + "name": "last_synced", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + } + ] + }, + "description": "Updates the scheduling field in the connector document", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.last_sync" + }, + "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/last_sync/ConnectorUpdateLastSyncRequest.ts#L23-L52" + }, + { + "body": { + "kind": "properties", + "properties": [ + { + "name": "result", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Result", + "namespace": "_types" + } + } + } + ] + }, + "kind": "response", + "name": { + "name": "Response", + "namespace": "connector.last_sync" + }, + "specLocation": "connector/last_sync/ConnectorUpdateLastSyncResponse.ts#L22-L26" + }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Returns existing connectors.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.list" + }, + "path": [], + "query": [ + { + "description": "Starting offset (default: 0)", + "name": "from", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + }, + { + "description": "Specifies a max number of results to get", + "name": "size", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + } + ], + "specLocation": "connector/list/ConnectorListRequest.ts#L22-L39" + }, + { + "body": { + "kind": "properties", + "properties": [ + { + "name": "count", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + }, + { + "name": "results", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "Connector", + "namespace": "connector._types" + } + } + } + } + ] + }, + "kind": "response", + "name": { + "name": "Response", + "namespace": "connector.list" + }, + "specLocation": "connector/list/ConnectorListResponse.ts#L23-L28" + }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "name": "description", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "index_name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "is_native", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "language", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "name", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "service_type", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ] + }, + "description": "Creates a connector.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.post" + }, + "path": [], + "query": [], + "specLocation": "connector/post/ConnectorPostRequest.ts#L21-L40" + }, + { + "body": { + "kind": "properties", + "properties": [ + { + "name": "id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + } + ] + }, + "kind": "response", + "name": { + "name": "Response", + "namespace": "connector.post" + }, + "specLocation": "connector/post/ConnectorPostResponse.ts#L22-L26" + }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "name": "description", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "index_name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "is_native", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "language", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "name", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "service_type", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ] + }, + "description": "Creates or updates a connector.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.put" + }, + "path": [ + { + "description": "The unique identifier of the connector to be created or updated", + "name": "connector_id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } + } + ], + "query": [], + "specLocation": "connector/put/ConnectorPutRequest.ts#L22-L47" + }, + { + "body": { + "kind": "properties", + "properties": [ + { + "name": "result", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Result", + "namespace": "_types" + } + } + } + ] + }, + "kind": "response", + "name": { + "name": "Response", + "namespace": "connector.put" + }, + "specLocation": "connector/put/ConnectorPutResponse.ts#L22-L26" + }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "name": "configuration", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "ConnectorConfiguration", + "namespace": "connector._types" + } + } + } + ] + }, + "description": "Updates the configuration field in the connector document", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.update_configuration" + }, + "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_configuration/ConnectorUpdateConfigurationRequest.ts#L23-L43" + }, + { + "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_configuration" + }, + "specLocation": "connector/update_configuration/ConnectorUpdateConfigurationResponse.ts#L22-L26" + }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "name": "error", + "required": true, + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" + } + } + ] + }, + "description": "Updates the filtering field in the connector document", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.update_error" + }, + "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_error/ConnectorUpdateErrorRequest.ts#L22-L42" + }, + { + "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_error" + }, + "specLocation": "connector/update_error/ConnectorUpdateErrorResponse.ts#L22-L26" + }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "name": "filtering", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "FilteringConfig", + "namespace": "connector._types" + } + } + } + } + ] + }, + "description": "Updates the filtering field in the connector document", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.update_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_filtering/ConnectorUpdateFilteringRequest.ts#L23-L43" + }, + { + "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" + }, + "specLocation": "connector/update_filtering/ConnectorUpdateFilteringResponse.ts#L22-L26" + }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "name": "name", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "description", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ] + }, + "description": "Updates the name and description fields in the connector document", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.update_name" + }, + "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_name/ConnectorUpdateNameRequest.ts#L22-L42" + }, + { + "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_name" + }, + "specLocation": "connector/update_name/ConnectorUpdateNameResponse.ts#L22-L26" + }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "name": "pipeline", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "IngestPipelineParams", + "namespace": "connector._types" + } + } + } + ] + }, + "description": "Updates the pipeline field in the connector document", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.update_pipeline" + }, + "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_pipeline/ConnectorUpdatePipelineRequest.ts#L23-L43" + }, + { + "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_pipeline" + }, + "specLocation": "connector/update_pipeline/ConnectorUpdatePipelineResponse.ts#L22-L26" + }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "name": "scheduling", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "SchedulingConfiguraton", + "namespace": "connector._types" + } + } + } + ] + }, + "description": "Updates the scheduling field in the connector document", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.update_scheduling" + }, + "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_scheduling/ConnectorUpdateSchedulingRequest.ts#L23-L43" + }, + { + "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_scheduling" + }, + "specLocation": "connector/update_scheduling/ConnectorUpdateSchedulingResponse.ts#L22-L26" + }, { "attachedBehaviors": [ "CommonQueryParameters" diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index c894b6ea49..5cc80f006e 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -482,6 +482,12 @@ "response definition cluster.put_component_template:Response / body / instance_of - Non-leaf type cannot be used here: '_types:AcknowledgedResponseBase'" ] }, + "connector.delete": { + "request": [], + "response": [ + "response definition connector.delete:Response / body / instance_of - Non-leaf type cannot be used here: '_types:AcknowledgedResponseBase'" + ] + }, "create": { "request": [], "response": [ diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 10754b57d8..915c18f980 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -9026,6 +9026,325 @@ export interface ClusterStatsStatsResponseBase extends NodesNodesResponseBase { timestamp: long } +export interface ConnectorConnector { + api_key_id: string | null + configuration: ConnectorConnectorConfiguration + custom_scheduling: ConnectorConnectorCustomScheduling + description: string | null + error: string | null + features: ConnectorConnectorFeatures + filtering: ConnectorFilteringConfig[] + id?: Id + index_name: string + is_native: boolean + language: string | null + last_access_control_sync_error: string | null + last_access_control_sync_scheduled_at: string | null + last_access_control_sync_status: ConnectorSyncStatus | null + last_deleted_document_count: number | null + last_incremental_sync_scheduled_at: string | null + last_indexed_document_count: number | null + last_seen: string | null + last_sync_error: string | null + last_sync_scheduled_at: string | null + last_sync_status: ConnectorSyncStatus | null + last_synced: string | null + name: string | null + pipeline?: ConnectorIngestPipelineParams | null + scheduling: ConnectorSchedulingConfiguraton + service_type: string | null + status: ConnectorConnectorStatus + sync_now: boolean +} + +export interface ConnectorConnectorConfigCategoryProperties { + label: string + order: number + type: '"category"' +} + +export interface ConnectorConnectorConfigProperties { + category?: string + default_value: string | number | boolean | null + depends_on: ConnectorDependency[] + display: ConnectorDisplayType + label: string + options: ConnectorSelectOption[] + order?: number | null + placeholder?: string + required: boolean + sensitive: boolean + tooltip: string | null + type: ConnectorConnectorFieldType + ui_restrictions: string[] + validations: ConnectorValidation[] + value: string | number | boolean | null +} + +export type ConnectorConnectorConfiguration = Record + +export type ConnectorConnectorCustomScheduling = Record + +export interface ConnectorConnectorFeatures { + '[FeatureName.DOCUMENT_LEVEL_SECURITY]'?: ConnectorFeatureEnabled + '[FeatureName.FILTERING_ADVANCED_CONFIG]'?: boolean + '[FeatureName.FILTERING_RULES]'?: boolean + '[FeatureName.INCREMENTAL_SYNC]'?: ConnectorFeatureEnabled + '[FeatureName.SYNC_RULES]'?: ConnectorSyncRulesFeature +} + +export type ConnectorConnectorFieldType = 'STRING' | 'INTEGER' | 'LIST' | 'BOOLEAN' + +export interface ConnectorConnectorScheduling { + enabled: boolean + interval: string +} + +export type ConnectorConnectorStatus = 'CREATED' | 'NEEDS_CONFIGURATION' | 'CONFIGURED' | 'CONNECTED' | 'ERROR' + +export interface ConnectorCustomScheduling { + configuration_overrides: Record + enabled: boolean + interval: string + last_synced: string | null + name: string +} + +export interface ConnectorDependency { + field: string + value: string | number | boolean | null +} + +export type ConnectorDisplayType = 'TEXTBOX' | 'TEXTAREA' | 'NUMERIC' | 'TOGGLE' | 'DROPDOWN' + +export interface ConnectorFeatureEnabled { + enabled: boolean +} + +export interface ConnectorFilteringAdvancedSnippet { + created_at: string + updated_at: string + value: Record +} + +export interface ConnectorFilteringConfig { + active: ConnectorFilteringRules + domain: string + draft: ConnectorFilteringRules +} + +export type ConnectorFilteringPolicy = '"exclude"' | '"include"' + +export interface ConnectorFilteringRule { + created_at: string + field: string + id: string + order: number + policy: ConnectorFilteringPolicy + rule: ConnectorFilteringRuleRule + updated_at: string + value: string +} + +export type ConnectorFilteringRuleRule = '"contains"' | '"ends_with"' | '"equals"' | '">"' | '"<"' | '"regex"' | '"starts_with"' + +export interface ConnectorFilteringRules { + advanced_snippet: ConnectorFilteringAdvancedSnippet + rules: ConnectorFilteringRule[] + validation: ConnectorFilteringRulesValidation +} + +export interface ConnectorFilteringRulesValidation { + errors: ConnectorFilteringValidation[] + state: ConnectorFilteringValidationState +} + +export interface ConnectorFilteringValidation { + ids: string[] + messages: string[] +} + +export type ConnectorFilteringValidationState = 'EDITED' | 'INVALID' | 'VALID' + +export interface ConnectorIngestPipelineParams { + extract_binary_content: boolean + name: string + reduce_whitespace: boolean + run_ml_inference: boolean +} + +export interface ConnectorSchedulingConfiguraton { + access_control: ConnectorConnectorScheduling + full: ConnectorConnectorScheduling + incremental: ConnectorConnectorScheduling +} + +export interface ConnectorSelectOption { + label: string + value: string +} + +export interface ConnectorSyncRulesFeature { + advanced?: ConnectorFeatureEnabled + basic?: ConnectorFeatureEnabled +} + +export type ConnectorSyncStatus = 'CANCELING' | 'CANCELED' | 'COMPLETED' | 'ERROR' | 'IN_PROGRESS' | 'PENDING' | 'SUSPENDED' + +export interface ConnectorValidation { + constraint: string | number + type: string +} + +export interface ConnectorCheckInRequest extends RequestBase { + connector_id: Id +} + +export interface ConnectorCheckInResponse { + result: Result +} + +export interface ConnectorDeleteRequest extends RequestBase { + connector_id: Id +} + +export type ConnectorDeleteResponse = AcknowledgedResponseBase + +export interface ConnectorGetRequest extends RequestBase { + connector_id: Id +} + +export type ConnectorGetResponse = ConnectorConnector + +export interface ConnectorLastSyncRequest extends RequestBase { + connector_id: Id + body?: { + last_access_control_sync_error: string | null + last_access_control_sync_scheduled_at: string | null + last_access_control_sync_status: ConnectorSyncStatus | null + last_deleted_document_count: number | null + last_incremental_sync_scheduled_at: string | null + last_indexed_document_count: number | null + last_seen: string | null + last_sync_error: string | null + last_sync_scheduled_at: string | null + last_sync_status: ConnectorSyncStatus | null + last_synced: string | null + } +} + +export interface ConnectorLastSyncResponse { + result: Result +} + +export interface ConnectorListRequest extends RequestBase { + from?: integer + size?: integer +} + +export interface ConnectorListResponse { + count: long + results: ConnectorConnector[] +} + +export interface ConnectorPostRequest extends RequestBase { + body?: { + description?: string + index_name: string + is_native?: boolean + language?: string + name?: string + service_type?: string + } +} + +export interface ConnectorPostResponse { + id: Id +} + +export interface ConnectorPutRequest extends RequestBase { + connector_id: Id + body?: { + description?: string + index_name: string + is_native?: boolean + language?: string + name?: string + service_type?: string + } +} + +export interface ConnectorPutResponse { + result: Result +} + +export interface ConnectorUpdateConfigurationRequest extends RequestBase { + connector_id: Id + body?: { + configuration: ConnectorConnectorConfiguration + } +} + +export interface ConnectorUpdateConfigurationResponse { + result: Result +} + +export interface ConnectorUpdateErrorRequest extends RequestBase { + connector_id: Id + body?: { + error: string | null + } +} + +export interface ConnectorUpdateErrorResponse { + result: Result +} + +export interface ConnectorUpdateFilteringRequest extends RequestBase { + connector_id: Id + body?: { + filtering: ConnectorFilteringConfig[] + } +} + +export interface ConnectorUpdateFilteringResponse { + result: Result +} + +export interface ConnectorUpdateNameRequest extends RequestBase { + connector_id: Id + body?: { + name: string + description?: string + } +} + +export interface ConnectorUpdateNameResponse { + result: Result +} + +export interface ConnectorUpdatePipelineRequest extends RequestBase { + connector_id: Id + body?: { + pipeline: ConnectorIngestPipelineParams + } +} + +export interface ConnectorUpdatePipelineResponse { + result: Result +} + +export interface ConnectorUpdateSchedulingRequest extends RequestBase { + connector_id: Id + body?: { + scheduling: ConnectorSchedulingConfiguraton + } +} + +export interface ConnectorUpdateSchedulingResponse { + result: Result +} + export interface DanglingIndicesDeleteDanglingIndexRequest extends RequestBase { index_uuid: Uuid accept_data_loss: boolean diff --git a/specification/_json_spec/connector.check_in.json b/specification/_json_spec/connector.check_in.json new file mode 100644 index 0000000000..7246c0f60e --- /dev/null +++ b/specification/_json_spec/connector.check_in.json @@ -0,0 +1,27 @@ +{ + "connector.check_in": { + "documentation": { + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "description": "Updates the last_seen timestamp in the connector document." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_connector/{connector_id}/_check_in", + "methods": ["PUT"], + "parts": { + "connector_id": { + "type": "string", + "description": "The unique identifier of the connector to be updated." + } + } + } + ] + } + } +} diff --git a/specification/_json_spec/connector.delete.json b/specification/_json_spec/connector.delete.json new file mode 100644 index 0000000000..6116a2c21c --- /dev/null +++ b/specification/_json_spec/connector.delete.json @@ -0,0 +1,27 @@ +{ + "connector.delete": { + "documentation": { + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "description": "Deletes a connector." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_connector/{connector_id}", + "methods": ["DELETE"], + "parts": { + "connector_id": { + "type": "string", + "description": "The unique identifier of the connector to be deleted." + } + } + } + ] + } + } +} diff --git a/specification/_json_spec/connector.get.json b/specification/_json_spec/connector.get.json new file mode 100644 index 0000000000..473e7e6467 --- /dev/null +++ b/specification/_json_spec/connector.get.json @@ -0,0 +1,27 @@ +{ + "connector.get": { + "documentation": { + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "description": "Returns the details about a connector." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_connector/{connector_id}", + "methods": ["GET"], + "parts": { + "connector_id": { + "type": "string", + "description": "The unique identifier of the connector to be returned." + } + } + } + ] + } + } +} diff --git a/specification/_json_spec/connector.last_sync.json b/specification/_json_spec/connector.last_sync.json new file mode 100644 index 0000000000..5d28d9f288 --- /dev/null +++ b/specification/_json_spec/connector.last_sync.json @@ -0,0 +1,32 @@ +{ + "connector.last_sync": { + "documentation": { + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "description": "Updates the stats of last sync in the connector document." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_connector/{connector_id}/_last_sync", + "methods": ["PUT"], + "parts": { + "connector_id": { + "type": "string", + "description": "The unique identifier of the connector to be updated." + } + } + } + ] + }, + "body": { + "description": "Object with stats related to the last connector sync run.", + "required": true + } + } +} diff --git a/specification/_json_spec/connector.list.json b/specification/_json_spec/connector.list.json new file mode 100644 index 0000000000..985fbe4697 --- /dev/null +++ b/specification/_json_spec/connector.list.json @@ -0,0 +1,33 @@ +{ + "connector.list": { + "documentation": { + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "description": "Lists all connectors." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_connector", + "methods": ["GET"] + } + ] + }, + "params": { + "from": { + "type": "int", + "default": 0, + "description": "Starting offset (default: 0)" + }, + "size": { + "type": "int", + "default": 100, + "description": "specifies a max number of results to get (default: 100)" + } + } + } +} diff --git a/specification/_json_spec/connector.post.json b/specification/_json_spec/connector.post.json new file mode 100644 index 0000000000..33f8939ca4 --- /dev/null +++ b/specification/_json_spec/connector.post.json @@ -0,0 +1,26 @@ +{ + "connector.post": { + "documentation": { + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "description": "Creates a connector." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_connector", + "methods": ["POST"] + } + ] + }, + "body": { + "description": "The connector configuration.", + "required": true + } + } +} diff --git a/specification/_json_spec/connector.put.json b/specification/_json_spec/connector.put.json new file mode 100644 index 0000000000..f409b21a13 --- /dev/null +++ b/specification/_json_spec/connector.put.json @@ -0,0 +1,32 @@ +{ + "connector.put": { + "documentation": { + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "description": "Creates or updates a connector." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_connector/{connector_id}", + "methods": ["PUT"], + "parts": { + "connector_id": { + "type": "string", + "description": "The unique identifier of the connector to be created or updated." + } + } + } + ] + }, + "body": { + "description": "The connector configuration.", + "required": true + } + } +} diff --git a/specification/_json_spec/connector.update_configuration.json b/specification/_json_spec/connector.update_configuration.json new file mode 100644 index 0000000000..ad1300b1a3 --- /dev/null +++ b/specification/_json_spec/connector.update_configuration.json @@ -0,0 +1,32 @@ +{ + "connector.update_configuration": { + "documentation": { + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "description": "Updates the connector configuration." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_connector/{connector_id}/_configuration", + "methods": ["PUT"], + "parts": { + "connector_id": { + "type": "string", + "description": "The unique identifier of the connector to be updated." + } + } + } + ] + }, + "body": { + "description": "Mapping between field names to configuration.", + "required": true + } + } +} diff --git a/specification/_json_spec/connector.update_error.json b/specification/_json_spec/connector.update_error.json new file mode 100644 index 0000000000..38bb4919a9 --- /dev/null +++ b/specification/_json_spec/connector.update_error.json @@ -0,0 +1,32 @@ +{ + "connector.update_error": { + "documentation": { + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "description": "Updates the error field in the connector document." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_connector/{connector_id}/_error", + "methods": ["PUT"], + "parts": { + "connector_id": { + "type": "string", + "description": "The unique identifier of the connector to be updated." + } + } + } + ] + }, + "body": { + "description": "An object containing the connector's error.", + "required": true + } + } +} diff --git a/specification/_json_spec/connector.update_filtering.json b/specification/_json_spec/connector.update_filtering.json new file mode 100644 index 0000000000..1d69939dea --- /dev/null +++ b/specification/_json_spec/connector.update_filtering.json @@ -0,0 +1,32 @@ +{ + "connector.update_filtering": { + "documentation": { + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "description": "Updates the filtering field in the connector document." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_connector/{connector_id}/_filtering", + "methods": ["PUT"], + "parts": { + "connector_id": { + "type": "string", + "description": "The unique identifier of the connector to be updated." + } + } + } + ] + }, + "body": { + "description": "A list of connector filtering configurations.", + "required": true + } + } +} diff --git a/specification/_json_spec/connector.update_name.json b/specification/_json_spec/connector.update_name.json new file mode 100644 index 0000000000..d0cbd5bc6c --- /dev/null +++ b/specification/_json_spec/connector.update_name.json @@ -0,0 +1,32 @@ +{ + "connector.update_name": { + "documentation": { + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "description": "Updates the name and/or description fields in the connector document." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_connector/{connector_id}/_name", + "methods": ["PUT"], + "parts": { + "connector_id": { + "type": "string", + "description": "The unique identifier of the connector to be updated." + } + } + } + ] + }, + "body": { + "description": "An object containing the connector's name and/or description.", + "required": true + } + } +} diff --git a/specification/_json_spec/connector.update_pipeline.json b/specification/_json_spec/connector.update_pipeline.json new file mode 100644 index 0000000000..fba078863e --- /dev/null +++ b/specification/_json_spec/connector.update_pipeline.json @@ -0,0 +1,32 @@ +{ + "connector.update_pipeline": { + "documentation": { + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "description": "Updates the pipeline field in the connector document." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_connector/{connector_id}/_pipeline", + "methods": ["PUT"], + "parts": { + "connector_id": { + "type": "string", + "description": "The unique identifier of the connector to be updated." + } + } + } + ] + }, + "body": { + "description": "An object with connector ingest pipeline configuration.", + "required": true + } + } +} diff --git a/specification/_json_spec/connector.update_scheduling.json b/specification/_json_spec/connector.update_scheduling.json new file mode 100644 index 0000000000..88c3759bd5 --- /dev/null +++ b/specification/_json_spec/connector.update_scheduling.json @@ -0,0 +1,32 @@ +{ + "connector.update_scheduling": { + "documentation": { + "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "description": "Updates the scheduling field in the connector document." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": ["application/json"], + "content_type": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_connector/{connector_id}/_scheduling", + "methods": ["PUT"], + "parts": { + "connector_id": { + "type": "string", + "description": "The unique identifier of the connector to be updated." + } + } + } + ] + }, + "body": { + "description": "An object containing the connector's scheduling configuration.", + "required": true + } + } +} diff --git a/specification/connector/_types/Connector.ts b/specification/connector/_types/Connector.ts new file mode 100644 index 0000000000..c1bf6a5603 --- /dev/null +++ b/specification/connector/_types/Connector.ts @@ -0,0 +1,241 @@ +/* + * 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 { Id } from '@_types/common' +import { Dictionary } from '@spec_utils/Dictionary' +import { UserDefinedValue } from '@spec_utils/UserDefinedValue' + +interface SelectOption { + label: string + value: string +} + +interface Dependency { + field: string + value: string | number | boolean | null +} + +enum DisplayType { + TEXTBOX = 'textbox', + TEXTAREA = 'textarea', + NUMERIC = 'numeric', + TOGGLE = 'toggle', + DROPDOWN = 'dropdown' +} + +enum ConnectorFieldType { + STRING = 'str', + INTEGER = 'int', + LIST = 'list', + BOOLEAN = 'bool' +} + +interface ConnectorConfigCategoryProperties { + label: string + order: number + type: 'category' +} + +interface Validation { + constraint: string | number + type: string +} + +export interface ConnectorConfigProperties { + category?: string + default_value: string | number | boolean | null + depends_on: Dependency[] + display: DisplayType + label: string + options: SelectOption[] + order?: number | null + placeholder?: string + required: boolean + sensitive: boolean + tooltip: string | null + type: ConnectorFieldType + ui_restrictions: string[] + validations: Validation[] + value: string | number | boolean | null +} + +export type ConnectorConfiguration = Dictionary< + string, + ConnectorConfigProperties | ConnectorConfigCategoryProperties | null +> + +export interface ConnectorScheduling { + enabled: boolean + interval: string // interval has crontab syntax +} + +interface CustomScheduling { + configuration_overrides: Dictionary + enabled: boolean + interval: string + last_synced: string | null + name: string +} + +export type ConnectorCustomScheduling = Dictionary< + string, + CustomScheduling | null +> + +enum ConnectorStatus { + CREATED = 'created', + NEEDS_CONFIGURATION = 'needs_configuration', + CONFIGURED = 'configured', + CONNECTED = 'connected', + ERROR = 'error' +} + +export enum SyncStatus { + CANCELING = 'canceling', + CANCELED = 'canceled', + COMPLETED = 'completed', + ERROR = 'error', + IN_PROGRESS = 'in_progress', + PENDING = 'pending', + SUSPENDED = 'suspended' +} + +export interface IngestPipelineParams { + extract_binary_content: boolean + name: string + reduce_whitespace: boolean + run_ml_inference: boolean +} + +type FilteringPolicy = 'exclude' | 'include' + +type FilteringRuleRule = + | 'contains' + | 'ends_with' + | 'equals' + | '>' + | '<' + | 'regex' + | 'starts_with' + +interface FilteringRule { + created_at: string + field: string + id: string + order: number + policy: FilteringPolicy + rule: FilteringRuleRule + updated_at: string + value: string +} + +interface FilteringValidation { + ids: string[] + messages: string[] +} + +enum FilteringValidationState { + EDITED = 'edited', + INVALID = 'invalid', + VALID = 'valid' +} + +interface FilteringAdvancedSnippet { + created_at: string + updated_at: string + value: Dictionary +} + +interface FilteringRulesValidation { + errors: FilteringValidation[] + state: FilteringValidationState +} + +interface FilteringRules { + advanced_snippet: FilteringAdvancedSnippet + rules: FilteringRule[] + validation: FilteringRulesValidation +} + +export interface FilteringConfig { + active: FilteringRules + domain: string + draft: FilteringRules +} + +enum FeatureName { + FILTERING_ADVANCED_CONFIG = 'filtering_advanced_config', + FILTERING_RULES = 'filtering_rules', + DOCUMENT_LEVEL_SECURITY = 'document_level_security', + INCREMENTAL_SYNC = 'incremental_sync', + SYNC_RULES = 'sync_rules' +} + +interface FeatureEnabled { + enabled: boolean +} + +interface SyncRulesFeature { + advanced?: FeatureEnabled + basic?: FeatureEnabled +} + +export interface ConnectorFeatures { + [FeatureName.DOCUMENT_LEVEL_SECURITY]?: FeatureEnabled + [FeatureName.FILTERING_ADVANCED_CONFIG]?: boolean + [FeatureName.FILTERING_RULES]?: boolean + [FeatureName.INCREMENTAL_SYNC]?: FeatureEnabled + [FeatureName.SYNC_RULES]?: SyncRulesFeature +} + +export interface SchedulingConfiguraton { + access_control: ConnectorScheduling + full: ConnectorScheduling + incremental: ConnectorScheduling +} + +export interface Connector { + api_key_id: string | null + configuration: ConnectorConfiguration + custom_scheduling: ConnectorCustomScheduling + description: string | null + error: string | null + features: ConnectorFeatures + filtering: FilteringConfig[] + id?: Id + index_name: string + is_native: boolean + language: string | null + last_access_control_sync_error: string | null + last_access_control_sync_scheduled_at: string | null + last_access_control_sync_status: SyncStatus | null + last_deleted_document_count: number | null + last_incremental_sync_scheduled_at: string | null + last_indexed_document_count: number | null + last_seen: string | null + last_sync_error: string | null + last_sync_scheduled_at: string | null + last_sync_status: SyncStatus | null + last_synced: string | null + name: string | null + pipeline?: IngestPipelineParams | null + scheduling: SchedulingConfiguraton + service_type: string | null + status: ConnectorStatus + sync_now: boolean +} diff --git a/specification/connector/check_in/ConnectorCheckInRequest.ts b/specification/connector/check_in/ConnectorCheckInRequest.ts new file mode 100644 index 0000000000..4d2d4f05e0 --- /dev/null +++ b/specification/connector/check_in/ConnectorCheckInRequest.ts @@ -0,0 +1,35 @@ +/* + * 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' + +/** + * Updates the last_seen field in the connector, and sets it to current timestamp + * @rest_spec_name connector.check_in + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + */ +export interface Request extends RequestBase { + path_parts: { + /** + * The unique identifier of the connector to be checked in + */ + connector_id: Id + } +} diff --git a/specification/connector/check_in/ConnectorCheckInResponse.ts b/specification/connector/check_in/ConnectorCheckInResponse.ts new file mode 100644 index 0000000000..fc194d6f20 --- /dev/null +++ b/specification/connector/check_in/ConnectorCheckInResponse.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/delete/ConnectorDeleteRequest.ts b/specification/connector/delete/ConnectorDeleteRequest.ts new file mode 100644 index 0000000000..a8931d05d0 --- /dev/null +++ b/specification/connector/delete/ConnectorDeleteRequest.ts @@ -0,0 +1,35 @@ +/* + * 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' + +/** + * Deletes a connector. + * @rest_spec_name connector.delete + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + */ +export interface Request extends RequestBase { + path_parts: { + /** + * The unique identifier of the connector to be deleted + */ + connector_id: Id + } +} diff --git a/specification/connector/delete/ConnectorDeleteResponse.ts b/specification/connector/delete/ConnectorDeleteResponse.ts new file mode 100644 index 0000000000..7374da4a4c --- /dev/null +++ b/specification/connector/delete/ConnectorDeleteResponse.ts @@ -0,0 +1,24 @@ +/* + * 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 { AcknowledgedResponseBase } from '@_types/Base' + +export class Response { + body: AcknowledgedResponseBase +} diff --git a/specification/connector/get/ConnectorGetRequest.ts b/specification/connector/get/ConnectorGetRequest.ts new file mode 100644 index 0000000000..6af78bfe76 --- /dev/null +++ b/specification/connector/get/ConnectorGetRequest.ts @@ -0,0 +1,35 @@ +/* + * 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' + +/** + * Retrieves a connector. + * @rest_spec_name connector.get + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + */ +export interface Request extends RequestBase { + path_parts: { + /** + * The unique identifier of the connector + */ + connector_id: Id + } +} diff --git a/specification/connector/get/ConnectorGetResponse.ts b/specification/connector/get/ConnectorGetResponse.ts new file mode 100644 index 0000000000..fcd6d37908 --- /dev/null +++ b/specification/connector/get/ConnectorGetResponse.ts @@ -0,0 +1,24 @@ +/* + * 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 { Connector } from '../_types/Connector' + +export class Response { + body: Connector +} diff --git a/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts b/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts new file mode 100644 index 0000000000..fc607b0fd7 --- /dev/null +++ b/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts @@ -0,0 +1,52 @@ +/* + * 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 { SyncStatus } from '../_types/Connector' + +/** + * Updates the scheduling field in the connector document + * @rest_spec_name connector.last_sync + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + */ +export interface Request extends RequestBase { + path_parts: { + /** + * The unique identifier of the connector to be updated + */ + connector_id: Id + } + /** + * The connector scheduling object + */ + body: { + last_access_control_sync_error: string | null + last_access_control_sync_scheduled_at: string | null + last_access_control_sync_status: SyncStatus | null + last_deleted_document_count: number | null + last_incremental_sync_scheduled_at: string | null + last_indexed_document_count: number | null + last_seen: string | null + last_sync_error: string | null + last_sync_scheduled_at: string | null + last_sync_status: SyncStatus | null + last_synced: string | null + } +} diff --git a/specification/connector/last_sync/ConnectorUpdateLastSyncResponse.ts b/specification/connector/last_sync/ConnectorUpdateLastSyncResponse.ts new file mode 100644 index 0000000000..fc194d6f20 --- /dev/null +++ b/specification/connector/last_sync/ConnectorUpdateLastSyncResponse.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/list/ConnectorListRequest.ts b/specification/connector/list/ConnectorListRequest.ts new file mode 100644 index 0000000000..7247c2d247 --- /dev/null +++ b/specification/connector/list/ConnectorListRequest.ts @@ -0,0 +1,39 @@ +/* + * 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 { integer } from '@_types/Numeric' + +/** + * Returns existing connectors. + * @rest_spec_name connector.list + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + */ +export interface Request extends RequestBase { + query_parameters: { + /** + * Starting offset (default: 0) + */ + from?: integer + /** + * Specifies a max number of results to get + */ + size?: integer + } +} diff --git a/specification/connector/list/ConnectorListResponse.ts b/specification/connector/list/ConnectorListResponse.ts new file mode 100644 index 0000000000..b582d0f204 --- /dev/null +++ b/specification/connector/list/ConnectorListResponse.ts @@ -0,0 +1,28 @@ +/* + * 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 { long } from '@_types/Numeric' +import { Connector } from '../_types/Connector' + +export class Response { + body: { + count: long + results: Connector[] + } +} diff --git a/specification/connector/post/ConnectorPostRequest.ts b/specification/connector/post/ConnectorPostRequest.ts new file mode 100644 index 0000000000..26407aa9d0 --- /dev/null +++ b/specification/connector/post/ConnectorPostRequest.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' + +/** + * Creates a connector. + * @rest_spec_name connector.post + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + */ +export interface Request extends RequestBase { + /** + * The connector document to be created + */ + /** @codegen_name connector */ + body: { + description?: string + index_name: string + is_native?: boolean + language?: string + name?: string + service_type?: string + } +} diff --git a/specification/connector/post/ConnectorPostResponse.ts b/specification/connector/post/ConnectorPostResponse.ts new file mode 100644 index 0000000000..69e3a38113 --- /dev/null +++ b/specification/connector/post/ConnectorPostResponse.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 { Id } from '@_types/common' + +export class Response { + body: { + id: Id + } +} diff --git a/specification/connector/put/ConnectorPutRequest.ts b/specification/connector/put/ConnectorPutRequest.ts new file mode 100644 index 0000000000..04cb4ad1b2 --- /dev/null +++ b/specification/connector/put/ConnectorPutRequest.ts @@ -0,0 +1,47 @@ +/* + * 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' + +/** + * Creates or updates a connector. + * @rest_spec_name connector.put + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + */ +export interface Request extends RequestBase { + path_parts: { + /** + * The unique identifier of the connector to be created or updated + */ + connector_id: Id + } + /** + * The connector document to be created + */ + /** @codegen_name connector */ + body: { + description?: string + index_name: string + is_native?: boolean + language?: string + name?: string + service_type?: string + } +} diff --git a/specification/connector/put/ConnectorPutResponse.ts b/specification/connector/put/ConnectorPutResponse.ts new file mode 100644 index 0000000000..fc194d6f20 --- /dev/null +++ b/specification/connector/put/ConnectorPutResponse.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_configuration/ConnectorUpdateConfigurationRequest.ts b/specification/connector/update_configuration/ConnectorUpdateConfigurationRequest.ts new file mode 100644 index 0000000000..935be91c2e --- /dev/null +++ b/specification/connector/update_configuration/ConnectorUpdateConfigurationRequest.ts @@ -0,0 +1,43 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { RequestBase } from '@_types/Base' +import { Id } from '@_types/common' +import { ConnectorConfiguration } from '../_types/Connector' + +/** + * Updates the configuration field in the connector document + * @rest_spec_name connector.update_configuration + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + */ +export interface Request extends RequestBase { + path_parts: { + /** + * The unique identifier of the connector to be updated + */ + connector_id: Id + } + /** + * The connector configuration + */ + /** @codegen_name configuration */ + body: { + configuration: ConnectorConfiguration + } +} diff --git a/specification/connector/update_configuration/ConnectorUpdateConfigurationResponse.ts b/specification/connector/update_configuration/ConnectorUpdateConfigurationResponse.ts new file mode 100644 index 0000000000..fc194d6f20 --- /dev/null +++ b/specification/connector/update_configuration/ConnectorUpdateConfigurationResponse.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_error/ConnectorUpdateErrorRequest.ts b/specification/connector/update_error/ConnectorUpdateErrorRequest.ts new file mode 100644 index 0000000000..647a139b06 --- /dev/null +++ b/specification/connector/update_error/ConnectorUpdateErrorRequest.ts @@ -0,0 +1,42 @@ +/* + * 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' + +/** + * Updates the filtering field in the connector document + * @rest_spec_name connector.update_error + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + */ +export interface Request extends RequestBase { + path_parts: { + /** + * The unique identifier of the connector to be updated + */ + connector_id: Id + } + /** + * The connector error + */ + /** @codegen_name error */ + body: { + error: string | null + } +} diff --git a/specification/connector/update_error/ConnectorUpdateErrorResponse.ts b/specification/connector/update_error/ConnectorUpdateErrorResponse.ts new file mode 100644 index 0000000000..fc194d6f20 --- /dev/null +++ b/specification/connector/update_error/ConnectorUpdateErrorResponse.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 new file mode 100644 index 0000000000..12033bf9cc --- /dev/null +++ b/specification/connector/update_filtering/ConnectorUpdateFilteringRequest.ts @@ -0,0 +1,43 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { RequestBase } from '@_types/Base' +import { Id } from '@_types/common' +import { FilteringConfig } from '../_types/Connector' + +/** + * Updates the filtering field in the connector document + * @rest_spec_name connector.update_filtering + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + */ +export interface Request extends RequestBase { + path_parts: { + /** + * The unique identifier of the connector to be updated + */ + connector_id: Id + } + /** + * The connector filtering configuration + */ + /** @codegen_name filtering */ + body: { + filtering: FilteringConfig[] + } +} diff --git a/specification/connector/update_filtering/ConnectorUpdateFilteringResponse.ts b/specification/connector/update_filtering/ConnectorUpdateFilteringResponse.ts new file mode 100644 index 0000000000..fc194d6f20 --- /dev/null +++ b/specification/connector/update_filtering/ConnectorUpdateFilteringResponse.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_name/ConnectorUpdateNameRequest.ts b/specification/connector/update_name/ConnectorUpdateNameRequest.ts new file mode 100644 index 0000000000..fec603508f --- /dev/null +++ b/specification/connector/update_name/ConnectorUpdateNameRequest.ts @@ -0,0 +1,42 @@ +/* + * 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' + +/** + * Updates the name and description fields in the connector document + * @rest_spec_name connector.update_name + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + */ +export interface Request extends RequestBase { + path_parts: { + /** + * The unique identifier of the connector to be updated + */ + connector_id: Id + } + /** + * The connector name and description + */ + body: { + name: string + description?: string + } +} diff --git a/specification/connector/update_name/ConnectorUpdateNameResponse.ts b/specification/connector/update_name/ConnectorUpdateNameResponse.ts new file mode 100644 index 0000000000..fc194d6f20 --- /dev/null +++ b/specification/connector/update_name/ConnectorUpdateNameResponse.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_pipeline/ConnectorUpdatePipelineRequest.ts b/specification/connector/update_pipeline/ConnectorUpdatePipelineRequest.ts new file mode 100644 index 0000000000..8ee473d0b9 --- /dev/null +++ b/specification/connector/update_pipeline/ConnectorUpdatePipelineRequest.ts @@ -0,0 +1,43 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { RequestBase } from '@_types/Base' +import { Id } from '@_types/common' +import { IngestPipelineParams } from '../_types/Connector' + +/** + * Updates the pipeline field in the connector document + * @rest_spec_name connector.update_pipeline + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + */ +export interface Request extends RequestBase { + path_parts: { + /** + * The unique identifier of the connector to be updated + */ + connector_id: Id + } + /** + * The connector pipeline object + */ + /** @codegen_name pipeline */ + body: { + pipeline: IngestPipelineParams + } +} diff --git a/specification/connector/update_pipeline/ConnectorUpdatePipelineResponse.ts b/specification/connector/update_pipeline/ConnectorUpdatePipelineResponse.ts new file mode 100644 index 0000000000..fc194d6f20 --- /dev/null +++ b/specification/connector/update_pipeline/ConnectorUpdatePipelineResponse.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_scheduling/ConnectorUpdateSchedulingRequest.ts b/specification/connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts new file mode 100644 index 0000000000..b8d01e52e7 --- /dev/null +++ b/specification/connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts @@ -0,0 +1,43 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { RequestBase } from '@_types/Base' +import { Id } from '@_types/common' +import { SchedulingConfiguraton } from '../_types/Connector' + +/** + * Updates the scheduling field in the connector document + * @rest_spec_name connector.update_scheduling + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + */ +export interface Request extends RequestBase { + path_parts: { + /** + * The unique identifier of the connector to be updated + */ + connector_id: Id + } + /** + * The connector scheduling object + */ + /** @codegen_name scheduling */ + body: { + scheduling: SchedulingConfiguraton + } +} diff --git a/specification/connector/update_scheduling/ConnectorUpdateSchedulingResponse.ts b/specification/connector/update_scheduling/ConnectorUpdateSchedulingResponse.ts new file mode 100644 index 0000000000..fc194d6f20 --- /dev/null +++ b/specification/connector/update_scheduling/ConnectorUpdateSchedulingResponse.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 + } +} From 033e1f51c2439d72b364e3d6c8dffd90b5a86bac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20Saint-F=C3=A9lix?= Date: Thu, 21 Dec 2023 18:58:01 +0100 Subject: [PATCH 02/16] Add documentation links to endpoints --- specification/_doc_ids/table.csv | 13 +++++++++++++ .../connector/check_in/ConnectorCheckInRequest.ts | 1 + .../connector/delete/ConnectorDeleteRequest.ts | 1 + specification/connector/get/ConnectorGetRequest.ts | 1 + .../last_sync/ConnectorUpdateLastSyncRequest.ts | 1 + .../connector/list/ConnectorListRequest.ts | 1 + .../connector/post/ConnectorPostRequest.ts | 1 + specification/connector/put/ConnectorPutRequest.ts | 1 + .../ConnectorUpdateConfigurationRequest.ts | 1 + .../update_error/ConnectorUpdateErrorRequest.ts | 1 + .../ConnectorUpdateFilteringRequest.ts | 1 + .../update_name/ConnectorUpdateNameRequest.ts | 1 + .../ConnectorUpdatePipelineRequest.ts | 1 + .../ConnectorUpdateSchedulingRequest.ts | 1 + 14 files changed, 26 insertions(+) diff --git a/specification/_doc_ids/table.csv b/specification/_doc_ids/table.csv index 2bee472789..be086b4869 100644 --- a/specification/_doc_ids/table.csv +++ b/specification/_doc_ids/table.csv @@ -78,6 +78,19 @@ cluster-stats,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/c cluster-update-settings,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cluster-update-settings.html cluster,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/cluster.html common-options,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/common-options.html +connector-checkin,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/check-in-connector-api.html +connector-delete,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/delete-connector-api.html +connector-get,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/get-connector-api.html +connector-last-sync,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-last-sync-api.html +connector-list,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/list-connector-api.html +connector-post,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/create-connector-api.html +connector-put,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/create-connector-api.html +connector-configuration,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-configuration-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-name,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-name-description-api.html +connector-update-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-pipeline-api.html +connector-scheduling,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-scheduling-api.html convert-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/convert-processor.html cron-expressions,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/api-conventions.html#api-cron-expressions csv-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/csv-processor.html diff --git a/specification/connector/check_in/ConnectorCheckInRequest.ts b/specification/connector/check_in/ConnectorCheckInRequest.ts index 4d2d4f05e0..4c29b9c956 100644 --- a/specification/connector/check_in/ConnectorCheckInRequest.ts +++ b/specification/connector/check_in/ConnectorCheckInRequest.ts @@ -24,6 +24,7 @@ import { Id } from '@_types/common' * @rest_spec_name connector.check_in * @availability stack since=8.12.0 stability=experimental * @availability serverless stability=experimental visibility=public + * @doc_id connector-checkin */ export interface Request extends RequestBase { path_parts: { diff --git a/specification/connector/delete/ConnectorDeleteRequest.ts b/specification/connector/delete/ConnectorDeleteRequest.ts index a8931d05d0..ebfd921566 100644 --- a/specification/connector/delete/ConnectorDeleteRequest.ts +++ b/specification/connector/delete/ConnectorDeleteRequest.ts @@ -24,6 +24,7 @@ import { Id } from '@_types/common' * @rest_spec_name connector.delete * @availability stack since=8.12.0 stability=experimental * @availability serverless stability=experimental visibility=public + * @doc_id connector-delete */ export interface Request extends RequestBase { path_parts: { diff --git a/specification/connector/get/ConnectorGetRequest.ts b/specification/connector/get/ConnectorGetRequest.ts index 6af78bfe76..cf54bcd7d0 100644 --- a/specification/connector/get/ConnectorGetRequest.ts +++ b/specification/connector/get/ConnectorGetRequest.ts @@ -24,6 +24,7 @@ import { Id } from '@_types/common' * @rest_spec_name connector.get * @availability stack since=8.12.0 stability=experimental * @availability serverless stability=experimental visibility=public + * @doc_id connector-get */ export interface Request extends RequestBase { path_parts: { diff --git a/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts b/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts index fc607b0fd7..3070633bac 100644 --- a/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts +++ b/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts @@ -25,6 +25,7 @@ import { SyncStatus } from '../_types/Connector' * @rest_spec_name connector.last_sync * @availability stack since=8.12.0 stability=experimental * @availability serverless stability=experimental visibility=public + * @doc_id connector-last-sync */ export interface Request extends RequestBase { path_parts: { diff --git a/specification/connector/list/ConnectorListRequest.ts b/specification/connector/list/ConnectorListRequest.ts index 7247c2d247..5cabbe853b 100644 --- a/specification/connector/list/ConnectorListRequest.ts +++ b/specification/connector/list/ConnectorListRequest.ts @@ -24,6 +24,7 @@ import { integer } from '@_types/Numeric' * @rest_spec_name connector.list * @availability stack since=8.12.0 stability=experimental * @availability serverless stability=experimental visibility=public + * @doc_id connector-list */ export interface Request extends RequestBase { query_parameters: { diff --git a/specification/connector/post/ConnectorPostRequest.ts b/specification/connector/post/ConnectorPostRequest.ts index 26407aa9d0..5593df60fc 100644 --- a/specification/connector/post/ConnectorPostRequest.ts +++ b/specification/connector/post/ConnectorPostRequest.ts @@ -23,6 +23,7 @@ import { RequestBase } from '@_types/Base' * @rest_spec_name connector.post * @availability stack since=8.12.0 stability=experimental * @availability serverless stability=experimental visibility=public + * @doc_id connector-post */ export interface Request extends RequestBase { /** diff --git a/specification/connector/put/ConnectorPutRequest.ts b/specification/connector/put/ConnectorPutRequest.ts index 04cb4ad1b2..acc0eb851b 100644 --- a/specification/connector/put/ConnectorPutRequest.ts +++ b/specification/connector/put/ConnectorPutRequest.ts @@ -24,6 +24,7 @@ import { Id } from '@_types/common' * @rest_spec_name connector.put * @availability stack since=8.12.0 stability=experimental * @availability serverless stability=experimental visibility=public + * @doc_id connector-put */ export interface Request extends RequestBase { path_parts: { diff --git a/specification/connector/update_configuration/ConnectorUpdateConfigurationRequest.ts b/specification/connector/update_configuration/ConnectorUpdateConfigurationRequest.ts index 935be91c2e..04e70fde18 100644 --- a/specification/connector/update_configuration/ConnectorUpdateConfigurationRequest.ts +++ b/specification/connector/update_configuration/ConnectorUpdateConfigurationRequest.ts @@ -25,6 +25,7 @@ import { ConnectorConfiguration } from '../_types/Connector' * @rest_spec_name connector.update_configuration * @availability stack since=8.12.0 stability=experimental * @availability serverless stability=experimental visibility=public + * @doc_id connector-configuration */ export interface Request extends RequestBase { path_parts: { diff --git a/specification/connector/update_error/ConnectorUpdateErrorRequest.ts b/specification/connector/update_error/ConnectorUpdateErrorRequest.ts index 647a139b06..3069351519 100644 --- a/specification/connector/update_error/ConnectorUpdateErrorRequest.ts +++ b/specification/connector/update_error/ConnectorUpdateErrorRequest.ts @@ -24,6 +24,7 @@ import { Id } from '@_types/common' * @rest_spec_name connector.update_error * @availability stack since=8.12.0 stability=experimental * @availability serverless stability=experimental visibility=public + * @doc_id connector-update-error */ export interface Request extends RequestBase { path_parts: { diff --git a/specification/connector/update_filtering/ConnectorUpdateFilteringRequest.ts b/specification/connector/update_filtering/ConnectorUpdateFilteringRequest.ts index 12033bf9cc..7c66ecfc2d 100644 --- a/specification/connector/update_filtering/ConnectorUpdateFilteringRequest.ts +++ b/specification/connector/update_filtering/ConnectorUpdateFilteringRequest.ts @@ -25,6 +25,7 @@ import { FilteringConfig } from '../_types/Connector' * @rest_spec_name connector.update_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: { diff --git a/specification/connector/update_name/ConnectorUpdateNameRequest.ts b/specification/connector/update_name/ConnectorUpdateNameRequest.ts index fec603508f..fdadbb5705 100644 --- a/specification/connector/update_name/ConnectorUpdateNameRequest.ts +++ b/specification/connector/update_name/ConnectorUpdateNameRequest.ts @@ -24,6 +24,7 @@ import { Id } from '@_types/common' * @rest_spec_name connector.update_name * @availability stack since=8.12.0 stability=experimental * @availability serverless stability=experimental visibility=public + * @doc_id connector-update-name */ export interface Request extends RequestBase { path_parts: { diff --git a/specification/connector/update_pipeline/ConnectorUpdatePipelineRequest.ts b/specification/connector/update_pipeline/ConnectorUpdatePipelineRequest.ts index 8ee473d0b9..f092192a48 100644 --- a/specification/connector/update_pipeline/ConnectorUpdatePipelineRequest.ts +++ b/specification/connector/update_pipeline/ConnectorUpdatePipelineRequest.ts @@ -25,6 +25,7 @@ import { IngestPipelineParams } from '../_types/Connector' * @rest_spec_name connector.update_pipeline * @availability stack since=8.12.0 stability=experimental * @availability serverless stability=experimental visibility=public + * @doc_id connector-update-pipeline */ export interface Request extends RequestBase { path_parts: { diff --git a/specification/connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts b/specification/connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts index b8d01e52e7..4202c9914b 100644 --- a/specification/connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts +++ b/specification/connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts @@ -25,6 +25,7 @@ import { SchedulingConfiguraton } from '../_types/Connector' * @rest_spec_name connector.update_scheduling * @availability stack since=8.12.0 stability=experimental * @availability serverless stability=experimental visibility=public + * @doc_id connector-scheduling */ export interface Request extends RequestBase { path_parts: { From 9bb40659466d185dd88f552189e2ca11a632eb40 Mon Sep 17 00:00:00 2001 From: Jedr Blaszyk Date: Tue, 2 Jan 2024 16:09:01 +0100 Subject: [PATCH 03/16] Update specification/connector/_types/Connector.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Laurent Saint-Félix --- specification/connector/_types/Connector.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/specification/connector/_types/Connector.ts b/specification/connector/_types/Connector.ts index c1bf6a5603..e58544d193 100644 --- a/specification/connector/_types/Connector.ts +++ b/specification/connector/_types/Connector.ts @@ -196,11 +196,11 @@ interface SyncRulesFeature { } export interface ConnectorFeatures { - [FeatureName.DOCUMENT_LEVEL_SECURITY]?: FeatureEnabled - [FeatureName.FILTERING_ADVANCED_CONFIG]?: boolean - [FeatureName.FILTERING_RULES]?: boolean - [FeatureName.INCREMENTAL_SYNC]?: FeatureEnabled - [FeatureName.SYNC_RULES]?: SyncRulesFeature + document_level_security?: FeatureEnabled + filtering_advanced_config?: boolean + filtering_rules?: boolean + incremental_sync?: FeatureEnabled + sync_rules?: SyncRulesFeature } export interface SchedulingConfiguraton { From 6e2dcf68d020a6979901736a29880e91155cb92f Mon Sep 17 00:00:00 2001 From: Jedr Blaszyk Date: Tue, 2 Jan 2024 16:09:19 +0100 Subject: [PATCH 04/16] Update specification/connector/_types/Connector.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Laurent Saint-Félix --- specification/connector/_types/Connector.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/specification/connector/_types/Connector.ts b/specification/connector/_types/Connector.ts index e58544d193..1c91965239 100644 --- a/specification/connector/_types/Connector.ts +++ b/specification/connector/_types/Connector.ts @@ -178,13 +178,6 @@ export interface FilteringConfig { draft: FilteringRules } -enum FeatureName { - FILTERING_ADVANCED_CONFIG = 'filtering_advanced_config', - FILTERING_RULES = 'filtering_rules', - DOCUMENT_LEVEL_SECURITY = 'document_level_security', - INCREMENTAL_SYNC = 'incremental_sync', - SYNC_RULES = 'sync_rules' -} interface FeatureEnabled { enabled: boolean From 9bd62fbf6a16f2e55fa1cf02d9e72c171543c918 Mon Sep 17 00:00:00 2001 From: Jedr Blaszyk Date: Tue, 2 Jan 2024 16:09:25 +0100 Subject: [PATCH 05/16] Update specification/connector/_types/Connector.ts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Laurent Saint-Félix --- specification/connector/_types/Connector.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/connector/_types/Connector.ts b/specification/connector/_types/Connector.ts index 1c91965239..0104cf0a25 100644 --- a/specification/connector/_types/Connector.ts +++ b/specification/connector/_types/Connector.ts @@ -196,7 +196,7 @@ export interface ConnectorFeatures { sync_rules?: SyncRulesFeature } -export interface SchedulingConfiguraton { +export interface SchedulingConfiguration { access_control: ConnectorScheduling full: ConnectorScheduling incremental: ConnectorScheduling From cb6fb945e2c34f0c5fd9146473afcdf3dcdca422 Mon Sep 17 00:00:00 2001 From: Jedr Blaszyk Date: Tue, 2 Jan 2024 17:05:12 +0100 Subject: [PATCH 06/16] Update json_spec with correct doc links, address review feedback --- .../elasticsearch-serverless-openapi.json | 136 +++------- output/schema/schema.json | 255 +++++++----------- output/typescript/types.ts | 28 +- .../_json_spec/connector.check_in.json | 2 +- .../_json_spec/connector.delete.json | 2 +- specification/_json_spec/connector.get.json | 2 +- .../_json_spec/connector.last_sync.json | 2 +- specification/_json_spec/connector.list.json | 2 +- specification/_json_spec/connector.post.json | 2 +- specification/_json_spec/connector.put.json | 2 +- .../connector.update_configuration.json | 2 +- .../_json_spec/connector.update_error.json | 2 +- .../connector.update_filtering.json | 2 +- .../_json_spec/connector.update_name.json | 2 +- .../_json_spec/connector.update_pipeline.json | 2 +- .../connector.update_scheduling.json | 2 +- specification/connector/_types/Connector.ts | 33 ++- .../ConnectorUpdateSchedulingRequest.ts | 4 +- 18 files changed, 178 insertions(+), 304 deletions(-) diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index c5c9143086..922b80b761 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -1818,7 +1818,7 @@ "summary": "Updates the last_seen timestamp in the connector document.", "description": "Updates the last_seen timestamp in the connector document.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/check-in-connector-api.html" }, "operationId": "connector-check-in", "parameters": [ @@ -1864,7 +1864,7 @@ "summary": "Returns the details about a connector.", "description": "Returns the details about a connector.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/get-connector-api.html" }, "operationId": "connector-get", "parameters": [ @@ -1900,7 +1900,7 @@ "summary": "Creates or updates a connector.", "description": "Creates or updates a connector.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-api.html" }, "operationId": "connector-put", "parameters": [ @@ -1977,7 +1977,7 @@ "summary": "Deletes a connector.", "description": "Deletes a connector.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/delete-connector-api.html" }, "operationId": "connector-delete", "parameters": [ @@ -2015,7 +2015,7 @@ "summary": "Updates the stats of last sync in the connector document.", "description": "Updates the stats of last sync in the connector document.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-last-sync-api.html" }, "operationId": "connector-last-sync", "parameters": [ @@ -2207,7 +2207,7 @@ "summary": "Lists all connectors.", "description": "Lists all connectors.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/list-connector-api.html" }, "operationId": "connector-list", "parameters": [ @@ -2267,7 +2267,7 @@ "summary": "Creates a connector.", "description": "Creates a connector.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/create-connector-api.html" }, "operationId": "connector-post", "requestBody": { @@ -2333,7 +2333,7 @@ "summary": "Updates the connector configuration.", "description": "Updates the connector configuration.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-configuration-api.html" }, "operationId": "connector-update-configuration", "parameters": [ @@ -2397,7 +2397,7 @@ "summary": "Updates the error field in the connector document.", "description": "Updates the error field in the connector document.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-error-api.html" }, "operationId": "connector-update-error", "parameters": [ @@ -2469,7 +2469,7 @@ "summary": "Updates the filtering field in the connector document.", "description": "Updates the filtering field in the connector document.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-api.html" }, "operationId": "connector-update-filtering", "parameters": [ @@ -2536,7 +2536,7 @@ "summary": "Updates the name and/or description fields in the connector document.", "description": "Updates the name and/or description fields in the connector document.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-name-description-api.html" }, "operationId": "connector-update-name", "parameters": [ @@ -2603,7 +2603,7 @@ "summary": "Updates the pipeline field in the connector document.", "description": "Updates the pipeline field in the connector document.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-pipeline-api.html" }, "operationId": "connector-update-pipeline", "parameters": [ @@ -2667,7 +2667,7 @@ "summary": "Updates the scheduling field in the connector document.", "description": "Updates the scheduling field in the connector document.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html" + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-scheduling-api.html" }, "operationId": "connector-update-scheduling", "parameters": [ @@ -2690,7 +2690,7 @@ "type": "object", "properties": { "scheduling": { - "$ref": "#/components/schemas/connector._types:SchedulingConfiguraton" + "$ref": "#/components/schemas/connector._types:SchedulingConfiguration" } }, "required": [ @@ -48544,7 +48544,7 @@ ] }, "scheduling": { - "$ref": "#/components/schemas/connector._types:SchedulingConfiguraton" + "$ref": "#/components/schemas/connector._types:SchedulingConfiguration" }, "service_type": { "oneOf": [ @@ -48600,9 +48600,6 @@ { "$ref": "#/components/schemas/connector._types:ConnectorConfigProperties" }, - { - "$ref": "#/components/schemas/connector._types:ConnectorConfigCategoryProperties" - }, { "nullable": true, "type": "string" @@ -48815,28 +48812,6 @@ "type" ] }, - "connector._types:ConnectorConfigCategoryProperties": { - "type": "object", - "properties": { - "label": { - "type": "string" - }, - "order": { - "type": "number" - }, - "type": { - "type": "string", - "enum": [ - "\"category\"" - ] - } - }, - "required": [ - "label", - "order", - "type" - ] - }, "connector._types:ConnectorCustomScheduling": { "type": "object", "additionalProperties": { @@ -48892,19 +48867,19 @@ "connector._types:ConnectorFeatures": { "type": "object", "properties": { - "[FeatureName.DOCUMENT_LEVEL_SECURITY]": { + "document_level_security": { "$ref": "#/components/schemas/connector._types:FeatureEnabled" }, - "[FeatureName.FILTERING_ADVANCED_CONFIG]": { + "filtering_advanced_config": { "type": "boolean" }, - "[FeatureName.FILTERING_RULES]": { + "filtering_rules": { "type": "boolean" }, - "[FeatureName.INCREMENTAL_SYNC]": { + "incremental_sync": { "$ref": "#/components/schemas/connector._types:FeatureEnabled" }, - "[FeatureName.SYNC_RULES]": { + "sync_rules": { "$ref": "#/components/schemas/connector._types:SyncRulesFeature" } } @@ -49034,65 +49009,22 @@ ] }, "connector._types:FilteringPolicy": { - "oneOf": [ - { - "type": "string", - "enum": [ - "\"exclude\"" - ] - }, - { - "type": "string", - "enum": [ - "\"include\"" - ] - } + "type": "string", + "enum": [ + "EXCLUDE", + "INCLUDE" ] }, "connector._types:FilteringRuleRule": { - "oneOf": [ - { - "type": "string", - "enum": [ - "\"contains\"" - ] - }, - { - "type": "string", - "enum": [ - "\"ends_with\"" - ] - }, - { - "type": "string", - "enum": [ - "\"equals\"" - ] - }, - { - "type": "string", - "enum": [ - "\">\"" - ] - }, - { - "type": "string", - "enum": [ - "\"<\"" - ] - }, - { - "type": "string", - "enum": [ - "\"regex\"" - ] - }, - { - "type": "string", - "enum": [ - "\"starts_with\"" - ] - } + "type": "string", + "enum": [ + "CONTAINS", + "ENDS_WITH", + "EQUALS", + "GREATER_THAN", + "LESS_THAN", + "REGEX", + "STARTS_WITH" ] }, "connector._types:FilteringRulesValidation": { @@ -49177,7 +49109,7 @@ "run_ml_inference" ] }, - "connector._types:SchedulingConfiguraton": { + "connector._types:SchedulingConfiguration": { "type": "object", "properties": { "access_control": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 8921aa714e..fd525e3b40 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -3085,7 +3085,8 @@ } }, "description": "Updates the last_seen timestamp in the connector document.", - "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "docId": "connector-checkin", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/check-in-connector-api.html", "name": "connector.check_in", "request": { "name": "Request", @@ -3123,7 +3124,8 @@ } }, "description": "Deletes a connector.", - "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "docId": "connector-delete", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/delete-connector-api.html", "name": "connector.delete", "request": { "name": "Request", @@ -3161,7 +3163,8 @@ } }, "description": "Returns the details about a connector.", - "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "docId": "connector-get", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/get-connector-api.html", "name": "connector.get", "request": { "name": "Request", @@ -3199,7 +3202,8 @@ } }, "description": "Updates the stats of last sync in the connector document.", - "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "docId": "connector-last-sync", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-last-sync-api.html", "name": "connector.last_sync", "request": { "name": "Request", @@ -3240,7 +3244,8 @@ } }, "description": "Lists all connectors.", - "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "docId": "connector-list", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/list-connector-api.html", "name": "connector.list", "request": { "name": "Request", @@ -3278,7 +3283,8 @@ } }, "description": "Creates a connector.", - "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "docId": "connector-post", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/create-connector-api.html", "name": "connector.post", "request": { "name": "Request", @@ -3319,7 +3325,8 @@ } }, "description": "Creates or updates a connector.", - "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "docId": "connector-put", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/create-connector-api.html", "name": "connector.put", "request": { "name": "Request", @@ -3360,7 +3367,8 @@ } }, "description": "Updates the connector configuration.", - "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "docId": "connector-configuration", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-configuration-api.html", "name": "connector.update_configuration", "request": { "name": "Request", @@ -3401,7 +3409,8 @@ } }, "description": "Updates the error field in the connector document.", - "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "docId": "connector-update-error", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-error-api.html", "name": "connector.update_error", "request": { "name": "Request", @@ -3442,7 +3451,8 @@ } }, "description": "Updates the filtering field in the connector document.", - "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "docId": "connector-update-filtering", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-filtering-api.html", "name": "connector.update_filtering", "request": { "name": "Request", @@ -3483,7 +3493,8 @@ } }, "description": "Updates the name and/or description fields in the connector document.", - "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "docId": "connector-update-name", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-name-description-api.html", "name": "connector.update_name", "request": { "name": "Request", @@ -3524,7 +3535,8 @@ } }, "description": "Updates the pipeline field in the connector document.", - "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "docId": "connector-update-pipeline", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-pipeline-api.html", "name": "connector.update_pipeline", "request": { "name": "Request", @@ -3565,7 +3577,8 @@ } }, "description": "Updates the scheduling field in the connector document.", - "docUrl": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "docId": "connector-scheduling", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-scheduling-api.html", "name": "connector.update_scheduling", "request": { "name": "Request", @@ -105227,7 +105240,7 @@ "type": { "kind": "instance_of", "type": { - "name": "SchedulingConfiguraton", + "name": "SchedulingConfiguration", "namespace": "connector._types" } } @@ -105278,47 +105291,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L212-L241" - }, - { - "kind": "interface", - "name": { - "name": "ConnectorConfigCategoryProperties", - "namespace": "connector._types" - }, - "properties": [ - { - "name": "label", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - }, - { - "name": "order", - "required": true, - "type": { - "kind": "instance_of", - "type": { - "name": "number", - "namespace": "_builtins" - } - } - }, - { - "name": "type", - "required": true, - "type": { - "kind": "literal_value", - "value": "\"category\"" - } - } - ], - "specLocation": "connector/_types/Connector.ts#L48-L52" + "specLocation": "connector/_types/Connector.ts#L202-L231" }, { "kind": "interface", @@ -105581,7 +105554,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L59-L75" + "specLocation": "connector/_types/Connector.ts#L53-L69" }, { "kind": "type_alias", @@ -105589,7 +105562,7 @@ "name": "ConnectorConfiguration", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L77-L80", + "specLocation": "connector/_types/Connector.ts#L71-L74", "type": { "key": { "kind": "instance_of", @@ -105609,13 +105582,6 @@ "namespace": "connector._types" } }, - { - "kind": "instance_of", - "type": { - "name": "ConnectorConfigCategoryProperties", - "namespace": "connector._types" - } - }, { "kind": "instance_of", "type": { @@ -105634,7 +105600,7 @@ "name": "ConnectorCustomScheduling", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L95-L98", + "specLocation": "connector/_types/Connector.ts#L89-L92", "type": { "key": { "kind": "instance_of", @@ -105674,7 +105640,7 @@ }, "properties": [ { - "name": "[FeatureName.DOCUMENT_LEVEL_SECURITY]", + "name": "document_level_security", "required": false, "type": { "kind": "instance_of", @@ -105685,7 +105651,7 @@ } }, { - "name": "[FeatureName.FILTERING_ADVANCED_CONFIG]", + "name": "filtering_advanced_config", "required": false, "type": { "kind": "instance_of", @@ -105696,7 +105662,7 @@ } }, { - "name": "[FeatureName.FILTERING_RULES]", + "name": "filtering_rules", "required": false, "type": { "kind": "instance_of", @@ -105707,7 +105673,7 @@ } }, { - "name": "[FeatureName.INCREMENTAL_SYNC]", + "name": "incremental_sync", "required": false, "type": { "kind": "instance_of", @@ -105718,7 +105684,7 @@ } }, { - "name": "[FeatureName.SYNC_RULES]", + "name": "sync_rules", "required": false, "type": { "kind": "instance_of", @@ -105729,7 +105695,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L198-L204" + "specLocation": "connector/_types/Connector.ts#L188-L194" }, { "kind": "enum", @@ -105783,7 +105749,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L82-L85" + "specLocation": "connector/_types/Connector.ts#L76-L79" }, { "kind": "enum", @@ -105808,7 +105774,7 @@ "name": "ConnectorStatus", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L100-L106" + "specLocation": "connector/_types/Connector.ts#L94-L100" }, { "kind": "interface", @@ -105892,7 +105858,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L87-L93" + "specLocation": "connector/_types/Connector.ts#L81-L87" }, { "kind": "interface", @@ -105996,7 +105962,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L189-L191" + "specLocation": "connector/_types/Connector.ts#L179-L181" }, { "kind": "interface", @@ -106046,7 +106012,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L158-L162" + "specLocation": "connector/_types/Connector.ts#L156-L160" }, { "kind": "interface", @@ -106089,28 +106055,23 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L175-L179" + "specLocation": "connector/_types/Connector.ts#L173-L177" }, { - "kind": "type_alias", + "kind": "enum", + "members": [ + { + "name": "EXCLUDE" + }, + { + "name": "INCLUDE" + } + ], "name": { "name": "FilteringPolicy", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L125-L125", - "type": { - "items": [ - { - "kind": "literal_value", - "value": "\"exclude\"" - }, - { - "kind": "literal_value", - "value": "\"include\"" - } - ], - "kind": "union_of" - } + "specLocation": "connector/_types/Connector.ts#L119-L122" }, { "kind": "interface", @@ -106208,48 +106169,38 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L136-L145" + "specLocation": "connector/_types/Connector.ts#L134-L143" }, { - "kind": "type_alias", + "kind": "enum", + "members": [ + { + "name": "CONTAINS" + }, + { + "name": "ENDS_WITH" + }, + { + "name": "EQUALS" + }, + { + "name": "GREATER_THAN" + }, + { + "name": "LESS_THAN" + }, + { + "name": "REGEX" + }, + { + "name": "STARTS_WITH" + } + ], "name": { "name": "FilteringRuleRule", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L127-L134", - "type": { - "items": [ - { - "kind": "literal_value", - "value": "\"contains\"" - }, - { - "kind": "literal_value", - "value": "\"ends_with\"" - }, - { - "kind": "literal_value", - "value": "\"equals\"" - }, - { - "kind": "literal_value", - "value": "\">\"" - }, - { - "kind": "literal_value", - "value": "\"<\"" - }, - { - "kind": "literal_value", - "value": "\"regex\"" - }, - { - "kind": "literal_value", - "value": "\"starts_with\"" - } - ], - "kind": "union_of" - } + "specLocation": "connector/_types/Connector.ts#L124-L132" }, { "kind": "interface", @@ -106295,7 +106246,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L169-L173" + "specLocation": "connector/_types/Connector.ts#L167-L171" }, { "kind": "interface", @@ -106330,7 +106281,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L164-L167" + "specLocation": "connector/_types/Connector.ts#L162-L165" }, { "kind": "interface", @@ -106368,7 +106319,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L147-L150" + "specLocation": "connector/_types/Connector.ts#L145-L148" }, { "kind": "enum", @@ -106387,7 +106338,7 @@ "name": "FilteringValidationState", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L152-L156" + "specLocation": "connector/_types/Connector.ts#L150-L154" }, { "kind": "interface", @@ -106441,12 +106392,12 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L118-L123" + "specLocation": "connector/_types/Connector.ts#L112-L117" }, { "kind": "interface", "name": { - "name": "SchedulingConfiguraton", + "name": "SchedulingConfiguration", "namespace": "connector._types" }, "properties": [ @@ -106484,7 +106435,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L206-L210" + "specLocation": "connector/_types/Connector.ts#L196-L200" }, { "kind": "interface", @@ -106548,7 +106499,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L193-L196" + "specLocation": "connector/_types/Connector.ts#L183-L186" }, { "kind": "enum", @@ -106579,7 +106530,7 @@ "name": "SyncStatus", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L108-L116" + "specLocation": "connector/_types/Connector.ts#L102-L110" }, { "kind": "interface", @@ -106623,7 +106574,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L54-L57" + "specLocation": "connector/_types/Connector.ts#L48-L51" }, { "attachedBehaviors": [ @@ -106659,7 +106610,7 @@ } ], "query": [], - "specLocation": "connector/check_in/ConnectorCheckInRequest.ts#L22-L35" + "specLocation": "connector/check_in/ConnectorCheckInRequest.ts#L22-L36" }, { "body": { @@ -106719,7 +106670,7 @@ } ], "query": [], - "specLocation": "connector/delete/ConnectorDeleteRequest.ts#L22-L35" + "specLocation": "connector/delete/ConnectorDeleteRequest.ts#L22-L36" }, { "body": { @@ -106773,7 +106724,7 @@ } ], "query": [], - "specLocation": "connector/get/ConnectorGetRequest.ts#L22-L35" + "specLocation": "connector/get/ConnectorGetRequest.ts#L22-L36" }, { "body": { @@ -107082,7 +107033,7 @@ } ], "query": [], - "specLocation": "connector/last_sync/ConnectorUpdateLastSyncRequest.ts#L23-L52" + "specLocation": "connector/last_sync/ConnectorUpdateLastSyncRequest.ts#L23-L53" }, { "body": { @@ -107154,7 +107105,7 @@ } } ], - "specLocation": "connector/list/ConnectorListRequest.ts#L22-L39" + "specLocation": "connector/list/ConnectorListRequest.ts#L22-L40" }, { "body": { @@ -107283,7 +107234,7 @@ }, "path": [], "query": [], - "specLocation": "connector/post/ConnectorPostRequest.ts#L21-L40" + "specLocation": "connector/post/ConnectorPostRequest.ts#L21-L41" }, { "body": { @@ -107411,7 +107362,7 @@ } ], "query": [], - "specLocation": "connector/put/ConnectorPutRequest.ts#L22-L47" + "specLocation": "connector/put/ConnectorPutRequest.ts#L22-L48" }, { "body": { @@ -107484,7 +107435,7 @@ } ], "query": [], - "specLocation": "connector/update_configuration/ConnectorUpdateConfigurationRequest.ts#L23-L43" + "specLocation": "connector/update_configuration/ConnectorUpdateConfigurationRequest.ts#L23-L44" }, { "body": { @@ -107569,7 +107520,7 @@ } ], "query": [], - "specLocation": "connector/update_error/ConnectorUpdateErrorRequest.ts#L22-L42" + "specLocation": "connector/update_error/ConnectorUpdateErrorRequest.ts#L22-L43" }, { "body": { @@ -107645,7 +107596,7 @@ } ], "query": [], - "specLocation": "connector/update_filtering/ConnectorUpdateFilteringRequest.ts#L23-L43" + "specLocation": "connector/update_filtering/ConnectorUpdateFilteringRequest.ts#L23-L44" }, { "body": { @@ -107729,7 +107680,7 @@ } ], "query": [], - "specLocation": "connector/update_name/ConnectorUpdateNameRequest.ts#L22-L42" + "specLocation": "connector/update_name/ConnectorUpdateNameRequest.ts#L22-L43" }, { "body": { @@ -107802,7 +107753,7 @@ } ], "query": [], - "specLocation": "connector/update_pipeline/ConnectorUpdatePipelineRequest.ts#L23-L43" + "specLocation": "connector/update_pipeline/ConnectorUpdatePipelineRequest.ts#L23-L44" }, { "body": { @@ -107841,7 +107792,7 @@ "type": { "kind": "instance_of", "type": { - "name": "SchedulingConfiguraton", + "name": "SchedulingConfiguration", "namespace": "connector._types" } } @@ -107875,7 +107826,7 @@ } ], "query": [], - "specLocation": "connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts#L23-L43" + "specLocation": "connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts#L23-L44" }, { "body": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 915c18f980..089f1167df 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -9051,18 +9051,12 @@ export interface ConnectorConnector { last_synced: string | null name: string | null pipeline?: ConnectorIngestPipelineParams | null - scheduling: ConnectorSchedulingConfiguraton + scheduling: ConnectorSchedulingConfiguration service_type: string | null status: ConnectorConnectorStatus sync_now: boolean } -export interface ConnectorConnectorConfigCategoryProperties { - label: string - order: number - type: '"category"' -} - export interface ConnectorConnectorConfigProperties { category?: string default_value: string | number | boolean | null @@ -9081,16 +9075,16 @@ export interface ConnectorConnectorConfigProperties { value: string | number | boolean | null } -export type ConnectorConnectorConfiguration = Record +export type ConnectorConnectorConfiguration = Record export type ConnectorConnectorCustomScheduling = Record export interface ConnectorConnectorFeatures { - '[FeatureName.DOCUMENT_LEVEL_SECURITY]'?: ConnectorFeatureEnabled - '[FeatureName.FILTERING_ADVANCED_CONFIG]'?: boolean - '[FeatureName.FILTERING_RULES]'?: boolean - '[FeatureName.INCREMENTAL_SYNC]'?: ConnectorFeatureEnabled - '[FeatureName.SYNC_RULES]'?: ConnectorSyncRulesFeature + document_level_security?: ConnectorFeatureEnabled + filtering_advanced_config?: boolean + filtering_rules?: boolean + incremental_sync?: ConnectorFeatureEnabled + sync_rules?: ConnectorSyncRulesFeature } export type ConnectorConnectorFieldType = 'STRING' | 'INTEGER' | 'LIST' | 'BOOLEAN' @@ -9133,7 +9127,7 @@ export interface ConnectorFilteringConfig { draft: ConnectorFilteringRules } -export type ConnectorFilteringPolicy = '"exclude"' | '"include"' +export type ConnectorFilteringPolicy = 'EXCLUDE' | 'INCLUDE' export interface ConnectorFilteringRule { created_at: string @@ -9146,7 +9140,7 @@ export interface ConnectorFilteringRule { value: string } -export type ConnectorFilteringRuleRule = '"contains"' | '"ends_with"' | '"equals"' | '">"' | '"<"' | '"regex"' | '"starts_with"' +export type ConnectorFilteringRuleRule = 'CONTAINS' | 'ENDS_WITH' | 'EQUALS' | 'GREATER_THAN' | 'LESS_THAN' | 'REGEX' | 'STARTS_WITH' export interface ConnectorFilteringRules { advanced_snippet: ConnectorFilteringAdvancedSnippet @@ -9173,7 +9167,7 @@ export interface ConnectorIngestPipelineParams { run_ml_inference: boolean } -export interface ConnectorSchedulingConfiguraton { +export interface ConnectorSchedulingConfiguration { access_control: ConnectorConnectorScheduling full: ConnectorConnectorScheduling incremental: ConnectorConnectorScheduling @@ -9337,7 +9331,7 @@ export interface ConnectorUpdatePipelineResponse { export interface ConnectorUpdateSchedulingRequest extends RequestBase { connector_id: Id body?: { - scheduling: ConnectorSchedulingConfiguraton + scheduling: ConnectorSchedulingConfiguration } } diff --git a/specification/_json_spec/connector.check_in.json b/specification/_json_spec/connector.check_in.json index 7246c0f60e..eb81cad389 100644 --- a/specification/_json_spec/connector.check_in.json +++ b/specification/_json_spec/connector.check_in.json @@ -1,7 +1,7 @@ { "connector.check_in": { "documentation": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/check-in-connector-api.html", "description": "Updates the last_seen timestamp in the connector document." }, "stability": "experimental", diff --git a/specification/_json_spec/connector.delete.json b/specification/_json_spec/connector.delete.json index 6116a2c21c..bd0bd8de94 100644 --- a/specification/_json_spec/connector.delete.json +++ b/specification/_json_spec/connector.delete.json @@ -1,7 +1,7 @@ { "connector.delete": { "documentation": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/delete-connector-api.html", "description": "Deletes a connector." }, "stability": "experimental", diff --git a/specification/_json_spec/connector.get.json b/specification/_json_spec/connector.get.json index 473e7e6467..372267f8d6 100644 --- a/specification/_json_spec/connector.get.json +++ b/specification/_json_spec/connector.get.json @@ -1,7 +1,7 @@ { "connector.get": { "documentation": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/get-connector-api.html", "description": "Returns the details about a connector." }, "stability": "experimental", diff --git a/specification/_json_spec/connector.last_sync.json b/specification/_json_spec/connector.last_sync.json index 5d28d9f288..0ef4e37e5d 100644 --- a/specification/_json_spec/connector.last_sync.json +++ b/specification/_json_spec/connector.last_sync.json @@ -1,7 +1,7 @@ { "connector.last_sync": { "documentation": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-last-sync-api.html", "description": "Updates the stats of last sync in the connector document." }, "stability": "experimental", diff --git a/specification/_json_spec/connector.list.json b/specification/_json_spec/connector.list.json index 985fbe4697..75939d2bd9 100644 --- a/specification/_json_spec/connector.list.json +++ b/specification/_json_spec/connector.list.json @@ -1,7 +1,7 @@ { "connector.list": { "documentation": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/list-connector-api.html", "description": "Lists all connectors." }, "stability": "experimental", diff --git a/specification/_json_spec/connector.post.json b/specification/_json_spec/connector.post.json index 33f8939ca4..2f020f2c29 100644 --- a/specification/_json_spec/connector.post.json +++ b/specification/_json_spec/connector.post.json @@ -1,7 +1,7 @@ { "connector.post": { "documentation": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/create-connector-api.html", "description": "Creates a connector." }, "stability": "experimental", diff --git a/specification/_json_spec/connector.put.json b/specification/_json_spec/connector.put.json index f409b21a13..649b6b7a3b 100644 --- a/specification/_json_spec/connector.put.json +++ b/specification/_json_spec/connector.put.json @@ -1,7 +1,7 @@ { "connector.put": { "documentation": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/create-connector-api.html", "description": "Creates or updates a connector." }, "stability": "experimental", diff --git a/specification/_json_spec/connector.update_configuration.json b/specification/_json_spec/connector.update_configuration.json index ad1300b1a3..07f3dd4eb4 100644 --- a/specification/_json_spec/connector.update_configuration.json +++ b/specification/_json_spec/connector.update_configuration.json @@ -1,7 +1,7 @@ { "connector.update_configuration": { "documentation": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-configuration-api.html", "description": "Updates the connector configuration." }, "stability": "experimental", diff --git a/specification/_json_spec/connector.update_error.json b/specification/_json_spec/connector.update_error.json index 38bb4919a9..5b095850bd 100644 --- a/specification/_json_spec/connector.update_error.json +++ b/specification/_json_spec/connector.update_error.json @@ -1,7 +1,7 @@ { "connector.update_error": { "documentation": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-error-api.html", "description": "Updates the error field in the connector document." }, "stability": "experimental", diff --git a/specification/_json_spec/connector.update_filtering.json b/specification/_json_spec/connector.update_filtering.json index 1d69939dea..8779403b22 100644 --- a/specification/_json_spec/connector.update_filtering.json +++ b/specification/_json_spec/connector.update_filtering.json @@ -1,7 +1,7 @@ { "connector.update_filtering": { "documentation": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-filtering-api.html", "description": "Updates the filtering field in the connector document." }, "stability": "experimental", diff --git a/specification/_json_spec/connector.update_name.json b/specification/_json_spec/connector.update_name.json index d0cbd5bc6c..f68f7ae0a8 100644 --- a/specification/_json_spec/connector.update_name.json +++ b/specification/_json_spec/connector.update_name.json @@ -1,7 +1,7 @@ { "connector.update_name": { "documentation": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-name-description-api.html", "description": "Updates the name and/or description fields in the connector document." }, "stability": "experimental", diff --git a/specification/_json_spec/connector.update_pipeline.json b/specification/_json_spec/connector.update_pipeline.json index fba078863e..f9049f6821 100644 --- a/specification/_json_spec/connector.update_pipeline.json +++ b/specification/_json_spec/connector.update_pipeline.json @@ -1,7 +1,7 @@ { "connector.update_pipeline": { "documentation": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-pipeline-api.html", "description": "Updates the pipeline field in the connector document." }, "stability": "experimental", diff --git a/specification/_json_spec/connector.update_scheduling.json b/specification/_json_spec/connector.update_scheduling.json index 88c3759bd5..ee8b2544ab 100644 --- a/specification/_json_spec/connector.update_scheduling.json +++ b/specification/_json_spec/connector.update_scheduling.json @@ -1,7 +1,7 @@ { "connector.update_scheduling": { "documentation": { - "url": "https://www.elastic.co/guide/en/enterprise-search/current/connectors.html", + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-scheduling-api.html", "description": "Updates the scheduling field in the connector document." }, "stability": "experimental", diff --git a/specification/connector/_types/Connector.ts b/specification/connector/_types/Connector.ts index 0104cf0a25..7f8ccd4a10 100644 --- a/specification/connector/_types/Connector.ts +++ b/specification/connector/_types/Connector.ts @@ -45,12 +45,6 @@ enum ConnectorFieldType { BOOLEAN = 'bool' } -interface ConnectorConfigCategoryProperties { - label: string - order: number - type: 'category' -} - interface Validation { constraint: string | number type: string @@ -76,7 +70,7 @@ export interface ConnectorConfigProperties { export type ConnectorConfiguration = Dictionary< string, - ConnectorConfigProperties | ConnectorConfigCategoryProperties | null + ConnectorConfigProperties | null > export interface ConnectorScheduling { @@ -122,16 +116,20 @@ export interface IngestPipelineParams { run_ml_inference: boolean } -type FilteringPolicy = 'exclude' | 'include' +enum FilteringPolicy { + EXCLUDE = 'exclude', + INCLUDE = 'include' +} -type FilteringRuleRule = - | 'contains' - | 'ends_with' - | 'equals' - | '>' - | '<' - | 'regex' - | 'starts_with' +enum FilteringRuleRule { + CONTAINS = 'contains', + ENDS_WITH = 'ends_with', + EQUALS = 'equals', + GREATER_THAN = '>', + LESS_THAN = '<', + REGEX = 'regex', + STARTS_WITH = 'starts_with' +} interface FilteringRule { created_at: string @@ -178,7 +176,6 @@ export interface FilteringConfig { draft: FilteringRules } - interface FeatureEnabled { enabled: boolean } @@ -227,7 +224,7 @@ export interface Connector { last_synced: string | null name: string | null pipeline?: IngestPipelineParams | null - scheduling: SchedulingConfiguraton + scheduling: SchedulingConfiguration service_type: string | null status: ConnectorStatus sync_now: boolean diff --git a/specification/connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts b/specification/connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts index 4202c9914b..aef5bc8d66 100644 --- a/specification/connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts +++ b/specification/connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts @@ -18,7 +18,7 @@ */ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' -import { SchedulingConfiguraton } from '../_types/Connector' +import { SchedulingConfiguration } from '../_types/Connector' /** * Updates the scheduling field in the connector document @@ -39,6 +39,6 @@ export interface Request extends RequestBase { */ /** @codegen_name scheduling */ body: { - scheduling: SchedulingConfiguraton + scheduling: SchedulingConfiguration } } From 0de50c494618675bd638ead7d6773d323eab9108 Mon Sep 17 00:00:00 2001 From: Jedr Blaszyk Date: Thu, 4 Jan 2024 15:26:39 +0100 Subject: [PATCH 07/16] Update typo in the connector.last_sync comment --- output/schema/schema.json | 2 +- .../connector/last_sync/ConnectorUpdateLastSyncRequest.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/output/schema/schema.json b/output/schema/schema.json index 56b847e312..3979b375fa 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -107160,7 +107160,7 @@ } ] }, - "description": "Updates the scheduling field in the connector document", + "description": "Updates last sync stats in the connector document", "inherits": { "type": { "name": "RequestBase", diff --git a/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts b/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts index 3070633bac..45970bb251 100644 --- a/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts +++ b/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts @@ -21,7 +21,7 @@ import { Id } from '@_types/common' import { SyncStatus } from '../_types/Connector' /** - * Updates the scheduling field in the connector document + * Updates last sync stats in the connector document * @rest_spec_name connector.last_sync * @availability stack since=8.12.0 stability=experimental * @availability serverless stability=experimental visibility=public @@ -35,7 +35,7 @@ export interface Request extends RequestBase { connector_id: Id } /** - * The connector scheduling object + * Connector last sync stats */ body: { last_access_control_sync_error: string | null From 94131076c637c05910b9b61fa053d43a0b527dbd Mon Sep 17 00:00:00 2001 From: Jedr Blaszyk Date: Mon, 8 Jan 2024 12:27:44 +0100 Subject: [PATCH 08/16] Address review feedback, use optional where possible, use ScalarValue type, add CustomSchedulingConfigurationOverrides type --- .../elasticsearch-serverless-openapi.json | 297 +++------ output/schema/schema.json | 580 +++++++----------- output/typescript/types.ts | 74 ++- specification/connector/_types/Connector.ts | 134 ++-- 4 files changed, 429 insertions(+), 656 deletions(-) diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 169611582d..6be74131c7 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -48397,15 +48397,7 @@ "type": "object", "properties": { "api_key_id": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "type": "string" }, "configuration": { "$ref": "#/components/schemas/connector._types:ConnectorConfiguration" @@ -48414,15 +48406,7 @@ "$ref": "#/components/schemas/connector._types:ConnectorCustomScheduling" }, "description": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "type": "string" }, "error": { "oneOf": [ @@ -48454,15 +48438,7 @@ "type": "boolean" }, "language": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "type": "string" }, "last_access_control_sync_error": { "oneOf": [ @@ -48586,40 +48562,16 @@ ] }, "name": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "type": "string" }, "pipeline": { - "oneOf": [ - { - "$ref": "#/components/schemas/connector._types:IngestPipelineParams" - }, - { - "nullable": true, - "type": "string" - } - ] + "$ref": "#/components/schemas/connector._types:IngestPipelineParams" }, "scheduling": { "$ref": "#/components/schemas/connector._types:SchedulingConfiguration" }, "service_type": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "type": "string" }, "status": { "$ref": "#/components/schemas/connector._types:ConnectorStatus" @@ -48629,28 +48581,13 @@ } }, "required": [ - "api_key_id", "configuration", "custom_scheduling", - "description", "error", "features", "filtering", "index_name", "is_native", - "language", - "last_access_control_sync_error", - "last_access_control_sync_scheduled_at", - "last_access_control_sync_status", - "last_deleted_document_count", - "last_incremental_sync_scheduled_at", - "last_indexed_document_count", - "last_seen", - "last_sync_error", - "last_sync_scheduled_at", - "last_sync_status", - "last_synced", - "name", "scheduling", "service_type", "status", @@ -48660,15 +48597,7 @@ "connector._types:ConnectorConfiguration": { "type": "object", "additionalProperties": { - "oneOf": [ - { - "$ref": "#/components/schemas/connector._types:ConnectorConfigProperties" - }, - { - "nullable": true, - "type": "string" - } - ] + "$ref": "#/components/schemas/connector._types:ConnectorConfigProperties" } }, "connector._types:ConnectorConfigProperties": { @@ -48678,21 +48607,7 @@ "type": "string" }, "default_value": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "nullable": true, - "type": "string" - } - ] + "$ref": "#/components/schemas/_types:ScalarValue" }, "depends_on": { "type": "array", @@ -48713,15 +48628,7 @@ } }, "order": { - "oneOf": [ - { - "type": "number" - }, - { - "nullable": true, - "type": "string" - } - ] + "type": "number" }, "placeholder": { "type": "string" @@ -48733,15 +48640,7 @@ "type": "boolean" }, "tooltip": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "type": "string" }, "type": { "$ref": "#/components/schemas/connector._types:ConnectorFieldType" @@ -48759,21 +48658,7 @@ } }, "value": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "nullable": true, - "type": "string" - } - ] + "$ref": "#/components/schemas/_types:ScalarValue" } }, "required": [ @@ -48784,13 +48669,33 @@ "options", "required", "sensitive", - "tooltip", "type", "ui_restrictions", "validations", "value" ] }, + "_types:ScalarValue": { + "description": "A scalar value.", + "oneOf": [ + { + "type": "number" + }, + { + "type": "number" + }, + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "nullable": true, + "type": "string" + } + ] + }, "connector._types:Dependency": { "type": "object", "properties": { @@ -48798,21 +48703,7 @@ "type": "string" }, "value": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - }, - { - "nullable": true, - "type": "string" - } - ] + "$ref": "#/components/schemas/_types:ScalarValue" } }, "required": [ @@ -48823,11 +48714,11 @@ "connector._types:DisplayType": { "type": "string", "enum": [ - "TEXTBOX", - "TEXTAREA", - "NUMERIC", - "TOGGLE", - "DROPDOWN" + "textbox", + "textarea", + "numeric", + "toggle", + "dropdown" ] }, "connector._types:SelectOption": { @@ -48848,10 +48739,10 @@ "connector._types:ConnectorFieldType": { "type": "string", "enum": [ - "STRING", - "INTEGER", - "LIST", - "BOOLEAN" + "str", + "int", + "list", + "bool" ] }, "connector._types:Validation": { @@ -48879,25 +48770,14 @@ "connector._types:ConnectorCustomScheduling": { "type": "object", "additionalProperties": { - "oneOf": [ - { - "$ref": "#/components/schemas/connector._types:CustomScheduling" - }, - { - "nullable": true, - "type": "string" - } - ] + "$ref": "#/components/schemas/connector._types:CustomScheduling" } }, "connector._types:CustomScheduling": { "type": "object", "properties": { "configuration_overrides": { - "type": "object", - "additionalProperties": { - "type": "object" - } + "$ref": "#/components/schemas/connector._types:CustomSchedulingConfigurationOverrides" }, "enabled": { "type": "boolean" @@ -48906,15 +48786,7 @@ "type": "string" }, "last_synced": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "type": "string" }, "name": { "type": "string" @@ -48924,10 +48796,38 @@ "configuration_overrides", "enabled", "interval", - "last_synced", "name" ] }, + "connector._types:CustomSchedulingConfigurationOverrides": { + "type": "object", + "properties": { + "max_crawl_depth": { + "type": "number" + }, + "sitemap_discovery_disabled": { + "type": "boolean" + }, + "domain_allowlist": { + "type": "array", + "items": { + "type": "string" + } + }, + "sitemap_urls": { + "type": "array", + "items": { + "type": "string" + } + }, + "seed_urls": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, "connector._types:ConnectorFeatures": { "type": "object", "properties": { @@ -49075,20 +48975,20 @@ "connector._types:FilteringPolicy": { "type": "string", "enum": [ - "EXCLUDE", - "INCLUDE" + "exclude", + "include" ] }, "connector._types:FilteringRuleRule": { "type": "string", "enum": [ - "CONTAINS", - "ENDS_WITH", - "EQUALS", - "GREATER_THAN", - "LESS_THAN", - "REGEX", - "STARTS_WITH" + "contains", + "ends_with", + "equals", + "regex", + "starts_with", + "greater_than", + "less_than" ] }, "connector._types:FilteringRulesValidation": { @@ -49133,21 +49033,21 @@ "connector._types:FilteringValidationState": { "type": "string", "enum": [ - "EDITED", - "INVALID", - "VALID" + "edited", + "invalid", + "valid" ] }, "connector._types:SyncStatus": { "type": "string", "enum": [ - "CANCELING", - "CANCELED", - "COMPLETED", - "ERROR", - "IN_PROGRESS", - "PENDING", - "SUSPENDED" + "canceling", + "canceled", + "completed", + "error", + "in_progress", + "pending", + "suspended" ] }, "connector._types:IngestPipelineParams": { @@ -49199,6 +49099,7 @@ "type": "boolean" }, "interval": { + "description": "The interval is expressed using the crontab syntax", "type": "string" } }, @@ -49210,11 +49111,11 @@ "connector._types:ConnectorStatus": { "type": "string", "enum": [ - "CREATED", - "NEEDS_CONFIGURATION", - "CONFIGURED", - "CONNECTED", - "ERROR" + "created", + "needs_configuration", + "configured", + "connected", + "error" ] }, "_types:WriteResponseBase": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 3979b375fa..4dd456dc7d 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -104919,25 +104919,13 @@ "properties": [ { "name": "api_key_id", - "required": true, + "required": false, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } } }, { @@ -104964,25 +104952,13 @@ }, { "name": "description", - "required": true, + "required": false, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } } }, { @@ -105068,30 +105044,18 @@ }, { "name": "language", - "required": true, + "required": false, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } } }, { "name": "last_access_control_sync_error", - "required": true, + "required": false, "type": { "items": [ { @@ -105114,7 +105078,7 @@ }, { "name": "last_access_control_sync_scheduled_at", - "required": true, + "required": false, "type": { "items": [ { @@ -105137,7 +105101,7 @@ }, { "name": "last_access_control_sync_status", - "required": true, + "required": false, "type": { "items": [ { @@ -105160,7 +105124,7 @@ }, { "name": "last_deleted_document_count", - "required": true, + "required": false, "type": { "items": [ { @@ -105183,7 +105147,7 @@ }, { "name": "last_incremental_sync_scheduled_at", - "required": true, + "required": false, "type": { "items": [ { @@ -105206,7 +105170,7 @@ }, { "name": "last_indexed_document_count", - "required": true, + "required": false, "type": { "items": [ { @@ -105229,7 +105193,7 @@ }, { "name": "last_seen", - "required": true, + "required": false, "type": { "items": [ { @@ -105252,7 +105216,7 @@ }, { "name": "last_sync_error", - "required": true, + "required": false, "type": { "items": [ { @@ -105275,7 +105239,7 @@ }, { "name": "last_sync_scheduled_at", - "required": true, + "required": false, "type": { "items": [ { @@ -105298,7 +105262,7 @@ }, { "name": "last_sync_status", - "required": true, + "required": false, "type": { "items": [ { @@ -105321,7 +105285,7 @@ }, { "name": "last_synced", - "required": true, + "required": false, "type": { "items": [ { @@ -105344,48 +105308,24 @@ }, { "name": "name", - "required": true, + "required": false, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } } }, { "name": "pipeline", "required": false, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "IngestPipelineParams", - "namespace": "connector._types" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "IngestPipelineParams", + "namespace": "connector._types" + } } }, { @@ -105403,23 +105343,11 @@ "name": "service_type", "required": true, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } } }, { @@ -105445,7 +105373,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L202-L231" + "specLocation": "connector/_types/Connector.ts#L208-L237" }, { "kind": "interface", @@ -105469,37 +105397,11 @@ "name": "default_value", "required": true, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "number", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "ScalarValue", + "namespace": "_types" + } } }, { @@ -105556,23 +105458,11 @@ "name": "order", "required": false, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "number", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "number", + "namespace": "_builtins" + } } }, { @@ -105610,25 +105500,13 @@ }, { "name": "tooltip", - "required": true, + "required": false, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } } }, { @@ -105674,37 +105552,11 @@ "name": "value", "required": true, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "number", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "ScalarValue", + "namespace": "_types" + } } } ], @@ -105728,23 +105580,11 @@ "kind": "dictionary_of", "singleKey": false, "value": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "ConnectorConfigProperties", - "namespace": "connector._types" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "ConnectorConfigProperties", + "namespace": "connector._types" + } } } }, @@ -105754,7 +105594,7 @@ "name": "ConnectorCustomScheduling", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L89-L92", + "specLocation": "connector/_types/Connector.ts#L98-L98", "type": { "key": { "kind": "instance_of", @@ -105766,23 +105606,11 @@ "kind": "dictionary_of", "singleKey": false, "value": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "CustomScheduling", - "namespace": "connector._types" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "CustomScheduling", + "namespace": "connector._types" + } } } }, @@ -105849,22 +105677,22 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L188-L194" + "specLocation": "connector/_types/Connector.ts#L194-L200" }, { "kind": "enum", "members": [ { - "name": "STRING" + "name": "str" }, { - "name": "INTEGER" + "name": "int" }, { - "name": "LIST" + "name": "list" }, { - "name": "BOOLEAN" + "name": "bool" } ], "name": { @@ -105892,6 +105720,7 @@ } }, { + "description": "The interval is expressed using the crontab syntax", "name": "interval", "required": true, "type": { @@ -105903,32 +105732,32 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L76-L79" + "specLocation": "connector/_types/Connector.ts#L76-L80" }, { "kind": "enum", "members": [ { - "name": "CREATED" + "name": "created" }, { - "name": "NEEDS_CONFIGURATION" + "name": "needs_configuration" }, { - "name": "CONFIGURED" + "name": "configured" }, { - "name": "CONNECTED" + "name": "connected" }, { - "name": "ERROR" + "name": "error" } ], "name": { "name": "ConnectorStatus", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L94-L100" + "specLocation": "connector/_types/Connector.ts#L100-L106" }, { "kind": "interface", @@ -105941,17 +105770,10 @@ "name": "configuration_overrides", "required": true, "type": { - "key": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - "kind": "dictionary_of", - "singleKey": false, - "value": { - "kind": "user_defined_value" + "kind": "instance_of", + "type": { + "name": "CustomSchedulingConfigurationOverrides", + "namespace": "connector._types" } } }, @@ -105979,25 +105801,13 @@ }, { "name": "last_synced", - "required": true, + "required": false, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } } }, { @@ -106012,7 +105822,81 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L81-L87" + "specLocation": "connector/_types/Connector.ts#L90-L96" + }, + { + "kind": "interface", + "name": { + "name": "CustomSchedulingConfigurationOverrides", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "max_crawl_depth", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "number", + "namespace": "_builtins" + } + } + }, + { + "name": "sitemap_discovery_disabled", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + }, + { + "name": "domain_allowlist", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + }, + { + "name": "sitemap_urls", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + }, + { + "name": "seed_urls", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + } + ], + "specLocation": "connector/_types/Connector.ts#L82-L88" }, { "kind": "interface", @@ -106036,37 +105920,11 @@ "name": "value", "required": true, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "number", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "ScalarValue", + "namespace": "_types" + } } } ], @@ -106076,19 +105934,19 @@ "kind": "enum", "members": [ { - "name": "TEXTBOX" + "name": "textbox" }, { - "name": "TEXTAREA" + "name": "textarea" }, { - "name": "NUMERIC" + "name": "numeric" }, { - "name": "TOGGLE" + "name": "toggle" }, { - "name": "DROPDOWN" + "name": "dropdown" } ], "name": { @@ -106116,7 +105974,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L179-L181" + "specLocation": "connector/_types/Connector.ts#L185-L187" }, { "kind": "interface", @@ -106166,7 +106024,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L156-L160" + "specLocation": "connector/_types/Connector.ts#L162-L166" }, { "kind": "interface", @@ -106209,23 +106067,23 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L173-L177" + "specLocation": "connector/_types/Connector.ts#L179-L183" }, { "kind": "enum", "members": [ { - "name": "EXCLUDE" + "name": "exclude" }, { - "name": "INCLUDE" + "name": "include" } ], "name": { "name": "FilteringPolicy", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L119-L122" + "specLocation": "connector/_types/Connector.ts#L125-L128" }, { "kind": "interface", @@ -106323,38 +106181,38 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L134-L143" + "specLocation": "connector/_types/Connector.ts#L140-L149" }, { "kind": "enum", "members": [ { - "name": "CONTAINS" + "name": "contains" }, { - "name": "ENDS_WITH" + "name": "ends_with" }, { - "name": "EQUALS" + "name": "equals" }, { - "name": "GREATER_THAN" + "name": "regex" }, { - "name": "LESS_THAN" + "name": "starts_with" }, { - "name": "REGEX" + "name": "greater_than" }, { - "name": "STARTS_WITH" + "name": "less_than" } ], "name": { "name": "FilteringRuleRule", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L124-L132" + "specLocation": "connector/_types/Connector.ts#L130-L138" }, { "kind": "interface", @@ -106400,7 +106258,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L167-L171" + "specLocation": "connector/_types/Connector.ts#L173-L177" }, { "kind": "interface", @@ -106435,7 +106293,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L162-L165" + "specLocation": "connector/_types/Connector.ts#L168-L171" }, { "kind": "interface", @@ -106473,26 +106331,26 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L145-L148" + "specLocation": "connector/_types/Connector.ts#L151-L154" }, { "kind": "enum", "members": [ { - "name": "EDITED" + "name": "edited" }, { - "name": "INVALID" + "name": "invalid" }, { - "name": "VALID" + "name": "valid" } ], "name": { "name": "FilteringValidationState", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L150-L154" + "specLocation": "connector/_types/Connector.ts#L156-L160" }, { "kind": "interface", @@ -106546,7 +106404,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L112-L117" + "specLocation": "connector/_types/Connector.ts#L118-L123" }, { "kind": "interface", @@ -106589,7 +106447,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L196-L200" + "specLocation": "connector/_types/Connector.ts#L202-L206" }, { "kind": "interface", @@ -106653,38 +106511,38 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L183-L186" + "specLocation": "connector/_types/Connector.ts#L189-L192" }, { "kind": "enum", "members": [ { - "name": "CANCELING" + "name": "canceling" }, { - "name": "CANCELED" + "name": "canceled" }, { - "name": "COMPLETED" + "name": "completed" }, { - "name": "ERROR" + "name": "error" }, { - "name": "IN_PROGRESS" + "name": "in_progress" }, { - "name": "PENDING" + "name": "pending" }, { - "name": "SUSPENDED" + "name": "suspended" } ], "name": { "name": "SyncStatus", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L102-L110" + "specLocation": "connector/_types/Connector.ts#L108-L116" }, { "kind": "interface", diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 5acbe829d3..1ddc340c75 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -9040,57 +9040,57 @@ export interface ClusterStatsStatsResponseBase extends NodesNodesResponseBase { } export interface ConnectorConnector { - api_key_id: string | null + api_key_id?: string configuration: ConnectorConnectorConfiguration custom_scheduling: ConnectorConnectorCustomScheduling - description: string | null + description?: string error: string | null features: ConnectorConnectorFeatures filtering: ConnectorFilteringConfig[] id?: Id index_name: string is_native: boolean - language: string | null - last_access_control_sync_error: string | null - last_access_control_sync_scheduled_at: string | null - last_access_control_sync_status: ConnectorSyncStatus | null - last_deleted_document_count: number | null - last_incremental_sync_scheduled_at: string | null - last_indexed_document_count: number | null - last_seen: string | null - last_sync_error: string | null - last_sync_scheduled_at: string | null - last_sync_status: ConnectorSyncStatus | null - last_synced: string | null - name: string | null - pipeline?: ConnectorIngestPipelineParams | null + language?: string + last_access_control_sync_error?: string | null + last_access_control_sync_scheduled_at?: string | null + last_access_control_sync_status?: ConnectorSyncStatus | null + last_deleted_document_count?: number | null + last_incremental_sync_scheduled_at?: string | null + last_indexed_document_count?: number | null + last_seen?: string | null + last_sync_error?: string | null + last_sync_scheduled_at?: string | null + last_sync_status?: ConnectorSyncStatus | null + last_synced?: string | null + name?: string + pipeline?: ConnectorIngestPipelineParams scheduling: ConnectorSchedulingConfiguration - service_type: string | null + service_type: string status: ConnectorConnectorStatus sync_now: boolean } export interface ConnectorConnectorConfigProperties { category?: string - default_value: string | number | boolean | null + default_value: ScalarValue depends_on: ConnectorDependency[] display: ConnectorDisplayType label: string options: ConnectorSelectOption[] - order?: number | null + order?: number placeholder?: string required: boolean sensitive: boolean - tooltip: string | null + tooltip?: string type: ConnectorConnectorFieldType ui_restrictions: string[] validations: ConnectorValidation[] - value: string | number | boolean | null + value: ScalarValue } -export type ConnectorConnectorConfiguration = Record +export type ConnectorConnectorConfiguration = Record -export type ConnectorConnectorCustomScheduling = Record +export type ConnectorConnectorCustomScheduling = Record export interface ConnectorConnectorFeatures { document_level_security?: ConnectorFeatureEnabled @@ -9100,29 +9100,37 @@ export interface ConnectorConnectorFeatures { sync_rules?: ConnectorSyncRulesFeature } -export type ConnectorConnectorFieldType = 'STRING' | 'INTEGER' | 'LIST' | 'BOOLEAN' +export type ConnectorConnectorFieldType = 'str' | 'int' | 'list' | 'bool' export interface ConnectorConnectorScheduling { enabled: boolean interval: string } -export type ConnectorConnectorStatus = 'CREATED' | 'NEEDS_CONFIGURATION' | 'CONFIGURED' | 'CONNECTED' | 'ERROR' +export type ConnectorConnectorStatus = 'created' | 'needs_configuration' | 'configured' | 'connected' | 'error' export interface ConnectorCustomScheduling { - configuration_overrides: Record + configuration_overrides: ConnectorCustomSchedulingConfigurationOverrides enabled: boolean interval: string - last_synced: string | null + last_synced?: string name: string } +export interface ConnectorCustomSchedulingConfigurationOverrides { + max_crawl_depth?: number + sitemap_discovery_disabled?: boolean + domain_allowlist?: string[] + sitemap_urls?: string[] + seed_urls?: string[] +} + export interface ConnectorDependency { field: string - value: string | number | boolean | null + value: ScalarValue } -export type ConnectorDisplayType = 'TEXTBOX' | 'TEXTAREA' | 'NUMERIC' | 'TOGGLE' | 'DROPDOWN' +export type ConnectorDisplayType = 'textbox' | 'textarea' | 'numeric' | 'toggle' | 'dropdown' export interface ConnectorFeatureEnabled { enabled: boolean @@ -9140,7 +9148,7 @@ export interface ConnectorFilteringConfig { draft: ConnectorFilteringRules } -export type ConnectorFilteringPolicy = 'EXCLUDE' | 'INCLUDE' +export type ConnectorFilteringPolicy = 'exclude' | 'include' export interface ConnectorFilteringRule { created_at: string @@ -9153,7 +9161,7 @@ export interface ConnectorFilteringRule { value: string } -export type ConnectorFilteringRuleRule = 'CONTAINS' | 'ENDS_WITH' | 'EQUALS' | 'GREATER_THAN' | 'LESS_THAN' | 'REGEX' | 'STARTS_WITH' +export type ConnectorFilteringRuleRule = 'contains' | 'ends_with' | 'equals' | 'regex' | 'starts_with' | 'greater_than' | 'less_than' export interface ConnectorFilteringRules { advanced_snippet: ConnectorFilteringAdvancedSnippet @@ -9171,7 +9179,7 @@ export interface ConnectorFilteringValidation { messages: string[] } -export type ConnectorFilteringValidationState = 'EDITED' | 'INVALID' | 'VALID' +export type ConnectorFilteringValidationState = 'edited' | 'invalid' | 'valid' export interface ConnectorIngestPipelineParams { extract_binary_content: boolean @@ -9196,7 +9204,7 @@ export interface ConnectorSyncRulesFeature { basic?: ConnectorFeatureEnabled } -export type ConnectorSyncStatus = 'CANCELING' | 'CANCELED' | 'COMPLETED' | 'ERROR' | 'IN_PROGRESS' | 'PENDING' | 'SUSPENDED' +export type ConnectorSyncStatus = 'canceling' | 'canceled' | 'completed' | 'error' | 'in_progress' | 'pending' | 'suspended' export interface ConnectorValidation { constraint: string | number diff --git a/specification/connector/_types/Connector.ts b/specification/connector/_types/Connector.ts index 7f8ccd4a10..0ee993ee19 100644 --- a/specification/connector/_types/Connector.ts +++ b/specification/connector/_types/Connector.ts @@ -16,7 +16,7 @@ * specific language governing permissions and limitations * under the License. */ -import { Id } from '@_types/common' +import { Id, ScalarValue } from '@_types/common' import { Dictionary } from '@spec_utils/Dictionary' import { UserDefinedValue } from '@spec_utils/UserDefinedValue' @@ -27,22 +27,22 @@ interface SelectOption { interface Dependency { field: string - value: string | number | boolean | null + value: ScalarValue } enum DisplayType { - TEXTBOX = 'textbox', - TEXTAREA = 'textarea', - NUMERIC = 'numeric', - TOGGLE = 'toggle', - DROPDOWN = 'dropdown' + textbox, + textarea, + numeric, + toggle, + dropdown } enum ConnectorFieldType { - STRING = 'str', - INTEGER = 'int', - LIST = 'list', - BOOLEAN = 'bool' + str, + int, + list, + bool } interface Validation { @@ -52,61 +52,67 @@ interface Validation { export interface ConnectorConfigProperties { category?: string - default_value: string | number | boolean | null + default_value: ScalarValue depends_on: Dependency[] display: DisplayType label: string options: SelectOption[] - order?: number | null + order?: number placeholder?: string required: boolean sensitive: boolean - tooltip: string | null + tooltip?: string type: ConnectorFieldType ui_restrictions: string[] validations: Validation[] - value: string | number | boolean | null + value: ScalarValue } export type ConnectorConfiguration = Dictionary< string, - ConnectorConfigProperties | null + ConnectorConfigProperties > export interface ConnectorScheduling { enabled: boolean - interval: string // interval has crontab syntax + /** The interval is expressed using the crontab syntax */ + interval: string +} + +interface CustomSchedulingConfigurationOverrides { + max_crawl_depth?: number + sitemap_discovery_disabled?: boolean + domain_allowlist?: string[] + sitemap_urls?: string[] + seed_urls?: string[] } interface CustomScheduling { - configuration_overrides: Dictionary + configuration_overrides: CustomSchedulingConfigurationOverrides enabled: boolean interval: string - last_synced: string | null + last_synced?: string name: string } -export type ConnectorCustomScheduling = Dictionary< - string, - CustomScheduling | null -> +export type ConnectorCustomScheduling = Dictionary enum ConnectorStatus { - CREATED = 'created', - NEEDS_CONFIGURATION = 'needs_configuration', - CONFIGURED = 'configured', - CONNECTED = 'connected', - ERROR = 'error' + created, + needs_configuration, + configured, + connected, + error } export enum SyncStatus { - CANCELING = 'canceling', - CANCELED = 'canceled', - COMPLETED = 'completed', - ERROR = 'error', - IN_PROGRESS = 'in_progress', - PENDING = 'pending', - SUSPENDED = 'suspended' + canceling, + canceled, + completed, + error, + in_progress, + pending, + suspended } export interface IngestPipelineParams { @@ -117,18 +123,18 @@ export interface IngestPipelineParams { } enum FilteringPolicy { - EXCLUDE = 'exclude', - INCLUDE = 'include' + exclude, + include } enum FilteringRuleRule { - CONTAINS = 'contains', - ENDS_WITH = 'ends_with', - EQUALS = 'equals', - GREATER_THAN = '>', - LESS_THAN = '<', - REGEX = 'regex', - STARTS_WITH = 'starts_with' + contains, + ends_with, + equals, + regex, + starts_with, + greater_than = '>', + less_than = '<' } interface FilteringRule { @@ -148,9 +154,9 @@ interface FilteringValidation { } enum FilteringValidationState { - EDITED = 'edited', - INVALID = 'invalid', - VALID = 'valid' + edited, + invalid, + valid } interface FilteringAdvancedSnippet { @@ -200,32 +206,32 @@ export interface SchedulingConfiguration { } export interface Connector { - api_key_id: string | null + api_key_id?: string configuration: ConnectorConfiguration custom_scheduling: ConnectorCustomScheduling - description: string | null + description?: string error: string | null features: ConnectorFeatures filtering: FilteringConfig[] id?: Id index_name: string is_native: boolean - language: string | null - last_access_control_sync_error: string | null - last_access_control_sync_scheduled_at: string | null - last_access_control_sync_status: SyncStatus | null - last_deleted_document_count: number | null - last_incremental_sync_scheduled_at: string | null - last_indexed_document_count: number | null - last_seen: string | null - last_sync_error: string | null - last_sync_scheduled_at: string | null - last_sync_status: SyncStatus | null - last_synced: string | null - name: string | null - pipeline?: IngestPipelineParams | null + language?: string + last_access_control_sync_error?: string | null + last_access_control_sync_scheduled_at?: string | null + last_access_control_sync_status?: SyncStatus | null + last_deleted_document_count?: number | null + last_incremental_sync_scheduled_at?: string | null + last_indexed_document_count?: number | null + last_seen?: string | null + last_sync_error?: string | null + last_sync_scheduled_at?: string | null + last_sync_status?: SyncStatus | null + last_synced?: string | null + name?: string + pipeline?: IngestPipelineParams scheduling: SchedulingConfiguration - service_type: string | null + service_type: string status: ConnectorStatus sync_now: boolean } From 6eed5ce9765e9c5720f4b90cb99f05f3c78ec3c9 Mon Sep 17 00:00:00 2001 From: Jedr Blaszyk Date: Tue, 9 Jan 2024 14:14:47 +0100 Subject: [PATCH 09/16] Use long/integer/double types, use @variants for Validation def --- .../elasticsearch-serverless-openapi.json | 111 ++++++- output/schema/schema.json | 298 +++++++++++++----- output/typescript/types.ts | 40 ++- specification/connector/_types/Connector.ts | 45 ++- 4 files changed, 397 insertions(+), 97 deletions(-) diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 2883cace44..9bbf3bf839 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -48743,25 +48743,118 @@ ] }, "connector._types:Validation": { + "discriminator": { + "propertyName": "type" + }, + "oneOf": [ + { + "$ref": "#/components/schemas/connector._types:LessThanValidation" + }, + { + "$ref": "#/components/schemas/connector._types:GreaterThanValidation" + }, + { + "$ref": "#/components/schemas/connector._types:ListTypeValidation" + }, + { + "$ref": "#/components/schemas/connector._types:IncludedInValidation" + }, + { + "$ref": "#/components/schemas/connector._types:RegexValidation" + } + ] + }, + "connector._types:LessThanValidation": { "type": "object", "properties": { + "type": { + "type": "string", + "enum": [ + "\"less_than\"" + ] + }, "constraint": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "number" - } + "type": "number" + } + }, + "required": [ + "type", + "constraint" + ] + }, + "connector._types:GreaterThanValidation": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "\"greater_than\"" ] }, + "constraint": { + "type": "number" + } + }, + "required": [ + "type", + "constraint" + ] + }, + "connector._types:ListTypeValidation": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "\"list_type\"" + ] + }, + "constraint": { + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:ScalarValue" + } + } + }, + "required": [ + "type", + "constraint" + ] + }, + "connector._types:IncludedInValidation": { + "type": "object", + "properties": { "type": { + "type": "string", + "enum": [ + "\"included_in\"" + ] + }, + "constraint": { "type": "string" } }, "required": [ - "constraint", - "type" + "type", + "constraint" + ] + }, + "connector._types:RegexValidation": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "\"regex\"" + ] + }, + "constraint": { + "type": "string" + } + }, + "required": [ + "type", + "constraint" ] }, "connector._types:ConnectorCustomScheduling": { diff --git a/output/schema/schema.json b/output/schema/schema.json index b8ee47da4d..8a2e68cd1e 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -105130,8 +105130,8 @@ { "kind": "instance_of", "type": { - "name": "number", - "namespace": "_builtins" + "name": "long", + "namespace": "_types" } }, { @@ -105176,8 +105176,8 @@ { "kind": "instance_of", "type": { - "name": "number", - "namespace": "_builtins" + "name": "long", + "namespace": "_types" } }, { @@ -105373,7 +105373,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L208-L237" + "specLocation": "connector/_types/Connector.ts#L237-L266" }, { "kind": "interface", @@ -105460,8 +105460,8 @@ "type": { "kind": "instance_of", "type": { - "name": "number", - "namespace": "_builtins" + "name": "integer", + "namespace": "_types" } } }, @@ -105560,7 +105560,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L53-L69" + "specLocation": "connector/_types/Connector.ts#L82-L98" }, { "kind": "type_alias", @@ -105568,7 +105568,7 @@ "name": "ConnectorConfiguration", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L71-L74", + "specLocation": "connector/_types/Connector.ts#L100-L103", "type": { "key": { "kind": "instance_of", @@ -105594,7 +105594,7 @@ "name": "ConnectorCustomScheduling", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L98-L98", + "specLocation": "connector/_types/Connector.ts#L127-L127", "type": { "key": { "kind": "instance_of", @@ -105677,7 +105677,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L194-L200" + "specLocation": "connector/_types/Connector.ts#L223-L229" }, { "kind": "enum", @@ -105699,7 +105699,7 @@ "name": "ConnectorFieldType", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L41-L46" + "specLocation": "connector/_types/Connector.ts#L42-L47" }, { "kind": "interface", @@ -105732,7 +105732,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L76-L80" + "specLocation": "connector/_types/Connector.ts#L105-L109" }, { "kind": "enum", @@ -105757,7 +105757,7 @@ "name": "ConnectorStatus", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L100-L106" + "specLocation": "connector/_types/Connector.ts#L129-L135" }, { "kind": "interface", @@ -105822,7 +105822,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L90-L96" + "specLocation": "connector/_types/Connector.ts#L119-L125" }, { "kind": "interface", @@ -105837,8 +105837,8 @@ "type": { "kind": "instance_of", "type": { - "name": "number", - "namespace": "_builtins" + "name": "integer", + "namespace": "_types" } } }, @@ -105896,7 +105896,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L82-L88" + "specLocation": "connector/_types/Connector.ts#L111-L117" }, { "kind": "interface", @@ -105928,7 +105928,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L28-L31" + "specLocation": "connector/_types/Connector.ts#L29-L32" }, { "kind": "enum", @@ -105953,7 +105953,7 @@ "name": "DisplayType", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L33-L39" + "specLocation": "connector/_types/Connector.ts#L34-L40" }, { "kind": "interface", @@ -105974,7 +105974,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L185-L187" + "specLocation": "connector/_types/Connector.ts#L214-L216" }, { "kind": "interface", @@ -106024,7 +106024,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L162-L166" + "specLocation": "connector/_types/Connector.ts#L191-L195" }, { "kind": "interface", @@ -106067,7 +106067,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L179-L183" + "specLocation": "connector/_types/Connector.ts#L208-L212" }, { "kind": "enum", @@ -106083,7 +106083,7 @@ "name": "FilteringPolicy", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L125-L128" + "specLocation": "connector/_types/Connector.ts#L154-L157" }, { "kind": "interface", @@ -106131,8 +106131,8 @@ "type": { "kind": "instance_of", "type": { - "name": "number", - "namespace": "_builtins" + "name": "integer", + "namespace": "_types" } } }, @@ -106181,7 +106181,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L140-L149" + "specLocation": "connector/_types/Connector.ts#L169-L178" }, { "kind": "enum", @@ -106212,7 +106212,7 @@ "name": "FilteringRuleRule", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L130-L138" + "specLocation": "connector/_types/Connector.ts#L159-L167" }, { "kind": "interface", @@ -106258,7 +106258,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L173-L177" + "specLocation": "connector/_types/Connector.ts#L202-L206" }, { "kind": "interface", @@ -106293,7 +106293,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L168-L171" + "specLocation": "connector/_types/Connector.ts#L197-L200" }, { "kind": "interface", @@ -106331,7 +106331,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L151-L154" + "specLocation": "connector/_types/Connector.ts#L180-L183" }, { "kind": "enum", @@ -106350,7 +106350,65 @@ "name": "FilteringValidationState", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L156-L160" + "specLocation": "connector/_types/Connector.ts#L185-L189" + }, + { + "kind": "interface", + "name": { + "name": "GreaterThanValidation", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "type", + "required": true, + "type": { + "kind": "literal_value", + "value": "\"greater_than\"" + } + }, + { + "name": "constraint", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" + } + } + } + ], + "specLocation": "connector/_types/Connector.ts#L62-L65" + }, + { + "kind": "interface", + "name": { + "name": "IncludedInValidation", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "type", + "required": true, + "type": { + "kind": "literal_value", + "value": "\"included_in\"" + } + }, + { + "name": "constraint", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "connector/_types/Connector.ts#L72-L75" }, { "kind": "interface", @@ -106404,7 +106462,97 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L118-L123" + "specLocation": "connector/_types/Connector.ts#L147-L152" + }, + { + "kind": "interface", + "name": { + "name": "LessThanValidation", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "type", + "required": true, + "type": { + "kind": "literal_value", + "value": "\"less_than\"" + } + }, + { + "name": "constraint", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" + } + } + } + ], + "specLocation": "connector/_types/Connector.ts#L57-L60" + }, + { + "kind": "interface", + "name": { + "name": "ListTypeValidation", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "type", + "required": true, + "type": { + "kind": "literal_value", + "value": "\"list_type\"" + } + }, + { + "name": "constraint", + "required": true, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "ScalarValue", + "namespace": "_types" + } + } + } + } + ], + "specLocation": "connector/_types/Connector.ts#L67-L70" + }, + { + "kind": "interface", + "name": { + "name": "RegexValidation", + "namespace": "connector._types" + }, + "properties": [ + { + "name": "type", + "required": true, + "type": { + "kind": "literal_value", + "value": "\"regex\"" + } + }, + { + "name": "constraint", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "specLocation": "connector/_types/Connector.ts#L77-L80" }, { "kind": "interface", @@ -106447,7 +106595,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L202-L206" + "specLocation": "connector/_types/Connector.ts#L231-L235" }, { "kind": "interface", @@ -106479,7 +106627,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L23-L26" + "specLocation": "connector/_types/Connector.ts#L24-L27" }, { "kind": "interface", @@ -106511,7 +106659,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L189-L192" + "specLocation": "connector/_types/Connector.ts#L218-L221" }, { "kind": "enum", @@ -106542,51 +106690,59 @@ "name": "SyncStatus", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L108-L116" + "specLocation": "connector/_types/Connector.ts#L137-L145" }, { - "kind": "interface", + "kind": "type_alias", "name": { "name": "Validation", "namespace": "connector._types" }, - "properties": [ - { - "name": "constraint", - "required": true, - "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "number", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" - } - }, - { - "name": "type", - "required": true, - "type": { + "specLocation": "connector/_types/Connector.ts#L49-L55", + "type": { + "items": [ + { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "LessThanValidation", + "namespace": "connector._types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "GreaterThanValidation", + "namespace": "connector._types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "ListTypeValidation", + "namespace": "connector._types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "IncludedInValidation", + "namespace": "connector._types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "RegexValidation", + "namespace": "connector._types" } } - } - ], - "specLocation": "connector/_types/Connector.ts#L48-L51" + ], + "kind": "union_of" + }, + "variants": { + "kind": "internal_tag", + "tag": "type" + } }, { "attachedBehaviors": [ diff --git a/output/typescript/types.ts b/output/typescript/types.ts index de46d1401d..6f1af38df5 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -9054,9 +9054,9 @@ export interface ConnectorConnector { last_access_control_sync_error?: string | null last_access_control_sync_scheduled_at?: string | null last_access_control_sync_status?: ConnectorSyncStatus | null - last_deleted_document_count?: number | null + last_deleted_document_count?: long | null last_incremental_sync_scheduled_at?: string | null - last_indexed_document_count?: number | null + last_indexed_document_count?: long | null last_seen?: string | null last_sync_error?: string | null last_sync_scheduled_at?: string | null @@ -9077,7 +9077,7 @@ export interface ConnectorConnectorConfigProperties { display: ConnectorDisplayType label: string options: ConnectorSelectOption[] - order?: number + order?: integer placeholder?: string required: boolean sensitive: boolean @@ -9118,7 +9118,7 @@ export interface ConnectorCustomScheduling { } export interface ConnectorCustomSchedulingConfigurationOverrides { - max_crawl_depth?: number + max_crawl_depth?: integer sitemap_discovery_disabled?: boolean domain_allowlist?: string[] sitemap_urls?: string[] @@ -9154,7 +9154,7 @@ export interface ConnectorFilteringRule { created_at: string field: string id: string - order: number + order: integer policy: ConnectorFilteringPolicy rule: ConnectorFilteringRuleRule updated_at: string @@ -9181,6 +9181,16 @@ export interface ConnectorFilteringValidation { export type ConnectorFilteringValidationState = 'edited' | 'invalid' | 'valid' +export interface ConnectorGreaterThanValidation { + type: '"greater_than"' + constraint: double +} + +export interface ConnectorIncludedInValidation { + type: '"included_in"' + constraint: string +} + export interface ConnectorIngestPipelineParams { extract_binary_content: boolean name: string @@ -9188,6 +9198,21 @@ export interface ConnectorIngestPipelineParams { run_ml_inference: boolean } +export interface ConnectorLessThanValidation { + type: '"less_than"' + constraint: double +} + +export interface ConnectorListTypeValidation { + type: '"list_type"' + constraint: ScalarValue[] +} + +export interface ConnectorRegexValidation { + type: '"regex"' + constraint: string +} + export interface ConnectorSchedulingConfiguration { access_control: ConnectorConnectorScheduling full: ConnectorConnectorScheduling @@ -9206,10 +9231,7 @@ export interface ConnectorSyncRulesFeature { export type ConnectorSyncStatus = 'canceling' | 'canceled' | 'completed' | 'error' | 'in_progress' | 'pending' | 'suspended' -export interface ConnectorValidation { - constraint: string | number - type: string -} +export type ConnectorValidation = ConnectorLessThanValidation | ConnectorGreaterThanValidation | ConnectorListTypeValidation | ConnectorIncludedInValidation | ConnectorRegexValidation export interface ConnectorCheckInRequest extends RequestBase { connector_id: Id diff --git a/specification/connector/_types/Connector.ts b/specification/connector/_types/Connector.ts index 0ee993ee19..7c1932e07e 100644 --- a/specification/connector/_types/Connector.ts +++ b/specification/connector/_types/Connector.ts @@ -17,6 +17,7 @@ * under the License. */ import { Id, ScalarValue } from '@_types/common' +import { double, integer, long } from '@_types/Numeric' import { Dictionary } from '@spec_utils/Dictionary' import { UserDefinedValue } from '@spec_utils/UserDefinedValue' @@ -45,9 +46,37 @@ enum ConnectorFieldType { bool } -interface Validation { - constraint: string | number - type: string +/** @variants internal tag='type' */ +type Validation = + | LessThanValidation + | GreaterThanValidation + | ListTypeValidation + | IncludedInValidation + | RegexValidation + +export interface LessThanValidation { + type: 'less_than' + constraint: double +} + +export interface GreaterThanValidation { + type: 'greater_than' + constraint: double +} + +export interface ListTypeValidation { + type: 'list_type' + constraint: ScalarValue[] +} + +export interface IncludedInValidation { + type: 'included_in' + constraint: string +} + +export interface RegexValidation { + type: 'regex' + constraint: string } export interface ConnectorConfigProperties { @@ -57,7 +86,7 @@ export interface ConnectorConfigProperties { display: DisplayType label: string options: SelectOption[] - order?: number + order?: integer placeholder?: string required: boolean sensitive: boolean @@ -80,7 +109,7 @@ export interface ConnectorScheduling { } interface CustomSchedulingConfigurationOverrides { - max_crawl_depth?: number + max_crawl_depth?: integer sitemap_discovery_disabled?: boolean domain_allowlist?: string[] sitemap_urls?: string[] @@ -141,7 +170,7 @@ interface FilteringRule { created_at: string field: string id: string - order: number + order: integer policy: FilteringPolicy rule: FilteringRuleRule updated_at: string @@ -220,9 +249,9 @@ export interface Connector { last_access_control_sync_error?: string | null last_access_control_sync_scheduled_at?: string | null last_access_control_sync_status?: SyncStatus | null - last_deleted_document_count?: number | null + last_deleted_document_count?: long | null last_incremental_sync_scheduled_at?: string | null - last_indexed_document_count?: number | null + last_indexed_document_count?: long | null last_seen?: string | null last_sync_error?: string | null last_sync_scheduled_at?: string | null From a3376c9a023a09ee1f07042e9419262472710015 Mon Sep 17 00:00:00 2001 From: Jedr Blaszyk Date: Tue, 9 Jan 2024 14:18:31 +0100 Subject: [PATCH 10/16] Re-run make contrib --- .../elasticsearch-serverless-openapi.json | 14 +++++++------- output/schema/schema.json | 16 +++++++++------- output/typescript/types.ts | 12 ++++++------ 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 9bbf3bf839..1c9179682d 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -48770,7 +48770,7 @@ "type": { "type": "string", "enum": [ - "\"less_than\"" + "less_than" ] }, "constraint": { @@ -48788,7 +48788,7 @@ "type": { "type": "string", "enum": [ - "\"greater_than\"" + "greater_than" ] }, "constraint": { @@ -48806,7 +48806,7 @@ "type": { "type": "string", "enum": [ - "\"list_type\"" + "list_type" ] }, "constraint": { @@ -48827,7 +48827,7 @@ "type": { "type": "string", "enum": [ - "\"included_in\"" + "included_in" ] }, "constraint": { @@ -48845,7 +48845,7 @@ "type": { "type": "string", "enum": [ - "\"regex\"" + "regex" ] }, "constraint": { @@ -49077,8 +49077,8 @@ "equals", "regex", "starts_with", - "greater_than", - "less_than" + ">", + "<" ] }, "connector._types:FilteringRulesValidation": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 8a2e68cd1e..bc6e168201 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -106202,10 +106202,12 @@ "name": "starts_with" }, { - "name": "greater_than" + "codegenName": "greater_than", + "name": ">" }, { - "name": "less_than" + "codegenName": "less_than", + "name": "<" } ], "name": { @@ -106364,7 +106366,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "\"greater_than\"" + "value": "greater_than" } }, { @@ -106393,7 +106395,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "\"included_in\"" + "value": "included_in" } }, { @@ -106476,7 +106478,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "\"less_than\"" + "value": "less_than" } }, { @@ -106505,7 +106507,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "\"list_type\"" + "value": "list_type" } }, { @@ -106537,7 +106539,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "\"regex\"" + "value": "regex" } }, { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 6f1af38df5..7ba4885edb 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -9161,7 +9161,7 @@ export interface ConnectorFilteringRule { value: string } -export type ConnectorFilteringRuleRule = 'contains' | 'ends_with' | 'equals' | 'regex' | 'starts_with' | 'greater_than' | 'less_than' +export type ConnectorFilteringRuleRule = 'contains' | 'ends_with' | 'equals' | 'regex' | 'starts_with' | '>' | '<' export interface ConnectorFilteringRules { advanced_snippet: ConnectorFilteringAdvancedSnippet @@ -9182,12 +9182,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 } @@ -9199,17 +9199,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 } From 7b781fabc2be1ca486ac4a2e24d690414aae9a98 Mon Sep 17 00:00:00 2001 From: Jedr Blaszyk Date: Tue, 9 Apr 2024 14:33:09 +0200 Subject: [PATCH 11/16] Update _json_spec to current ES version --- output/schema/schema.json | 488 ++++++++++++------ output/schema/validation-errors.json | 45 ++ output/typescript/types.ts | 46 +- .../_json_spec/connector.check_in.json | 8 +- .../_json_spec/connector.delete.json | 8 +- specification/_json_spec/connector.get.json | 8 +- .../_json_spec/connector.last_sync.json | 12 +- specification/_json_spec/connector.list.json | 26 +- specification/_json_spec/connector.post.json | 12 +- specification/_json_spec/connector.put.json | 12 +- .../connector.update_api_key_id.json | 38 ++ .../connector.update_configuration.json | 12 +- .../_json_spec/connector.update_error.json | 12 +- .../connector.update_filtering.json | 12 +- .../connector.update_index_name.json | 38 ++ .../_json_spec/connector.update_name.json | 12 +- .../_json_spec/connector.update_native.json | 38 ++ .../_json_spec/connector.update_pipeline.json | 12 +- .../connector.update_scheduling.json | 12 +- .../connector.update_service_type.json | 38 ++ .../_json_spec/connector.update_status.json | 38 ++ specification/_spec_utils/utils.ts | 6 +- specification/connector/_types/Connector.ts | 243 ++++----- 23 files changed, 829 insertions(+), 347 deletions(-) create mode 100644 specification/_json_spec/connector.update_api_key_id.json create mode 100644 specification/_json_spec/connector.update_index_name.json create mode 100644 specification/_json_spec/connector.update_native.json create mode 100644 specification/_json_spec/connector.update_service_type.json create mode 100644 specification/_json_spec/connector.update_status.json diff --git a/output/schema/schema.json b/output/schema/schema.json index c2e81c61e9..0ef55c615c 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -3355,6 +3355,36 @@ ], "visibility": "public" }, + { + "availability": { + "stack": { + "stability": "experimental", + "visibility": "public" + } + }, + "description": "Updates the API key id and/or API key secret id fields in the connector document.", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-api-key-id-api.html", + "name": "connector.update_api_key_id", + "request": null, + "requestBodyRequired": true, + "requestMediaType": [ + "application/json" + ], + "response": null, + "responseMediaType": [ + "application/json" + ], + "stability": "experimental", + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_connector/{connector_id}/_api_key_id" + } + ], + "visibility": "public" + }, { "availability": { "serverless": { @@ -3481,6 +3511,36 @@ ], "visibility": "public" }, + { + "availability": { + "stack": { + "stability": "experimental", + "visibility": "public" + } + }, + "description": "Updates the index name of the connector.", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-index-name-api.html", + "name": "connector.update_index_name", + "request": null, + "requestBodyRequired": true, + "requestMediaType": [ + "application/json" + ], + "response": null, + "responseMediaType": [ + "application/json" + ], + "stability": "experimental", + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_connector/{connector_id}/_index_name" + } + ], + "visibility": "public" + }, { "availability": { "serverless": { @@ -3523,6 +3583,36 @@ ], "visibility": "public" }, + { + "availability": { + "stack": { + "stability": "experimental", + "visibility": "public" + } + }, + "description": "Updates the is_native flag of the connector.", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/connector-apis.html", + "name": "connector.update_native", + "request": null, + "requestBodyRequired": true, + "requestMediaType": [ + "application/json" + ], + "response": null, + "responseMediaType": [ + "application/json" + ], + "stability": "experimental", + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_connector/{connector_id}/_native" + } + ], + "visibility": "public" + }, { "availability": { "serverless": { @@ -3607,6 +3697,66 @@ ], "visibility": "public" }, + { + "availability": { + "stack": { + "stability": "experimental", + "visibility": "public" + } + }, + "description": "Updates the service type of the connector.", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-service-type-api.html", + "name": "connector.update_service_type", + "request": null, + "requestBodyRequired": true, + "requestMediaType": [ + "application/json" + ], + "response": null, + "responseMediaType": [ + "application/json" + ], + "stability": "experimental", + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_connector/{connector_id}/_service_type" + } + ], + "visibility": "public" + }, + { + "availability": { + "stack": { + "stability": "experimental", + "visibility": "public" + } + }, + "description": "Updates the status of the connector.", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-status-api.html", + "name": "connector.update_status", + "request": null, + "requestBodyRequired": true, + "requestMediaType": [ + "application/json" + ], + "response": null, + "responseMediaType": [ + "application/json" + ], + "stability": "experimental", + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_connector/{connector_id}/_status" + } + ], + "visibility": "public" + }, { "availability": { "serverless": { @@ -40957,6 +41107,22 @@ ], "specLocation": "_spec_utils/BaseNode.ts#L25-L32" }, + { + "description": "A `null` value that is to be interpreted as an actual value, unless other uses of `null` that are equivalent\nto a missing value. It is used for exemple in settings, where using the `NullValue` for a setting will reset\nit to its default value.", + "kind": "type_alias", + "name": { + "name": "NullValue", + "namespace": "_spec_utils" + }, + "specLocation": "_spec_utils/utils.ts#L22-L27", + "type": { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + }, { "description": "A set of flags that can be represented as a single enum value or a set of values that are encoded\nas a pipe-separated string\n\nDepending on the target language, code generators can use this hint to generate language specific\nflags enum constructs and the corresponding (de-)serialization code.", "generics": [ @@ -105346,23 +105512,20 @@ "name": "error", "required": true, "type": { - "items": [ + "generics": [ { "kind": "instance_of", "type": { "name": "string", "namespace": "_builtins" } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } } ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "Nullable", + "namespace": "connector._types" + } } }, { @@ -105405,10 +105568,19 @@ "name": "index_name", "required": true, "type": { + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + ], "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "Nullable", + "namespace": "connector._types" } } }, @@ -105438,253 +105610,202 @@ "name": "last_access_control_sync_error", "required": false, "type": { - "items": [ + "generics": [ { "kind": "instance_of", "type": { "name": "string", "namespace": "_builtins" } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } } ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "Nullable", + "namespace": "connector._types" + } } }, { "name": "last_access_control_sync_scheduled_at", "required": false, "type": { - "items": [ + "generics": [ { "kind": "instance_of", "type": { "name": "string", "namespace": "_builtins" } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } } ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "Nullable", + "namespace": "connector._types" + } } }, { "name": "last_access_control_sync_status", "required": false, "type": { - "items": [ + "generics": [ { "kind": "instance_of", "type": { "name": "SyncStatus", "namespace": "connector._types" } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } } ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "Nullable", + "namespace": "connector._types" + } } }, { "name": "last_deleted_document_count", "required": false, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } } }, { "name": "last_incremental_sync_scheduled_at", "required": false, "type": { - "items": [ + "generics": [ { "kind": "instance_of", "type": { "name": "string", "namespace": "_builtins" } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } } ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "Nullable", + "namespace": "connector._types" + } } }, { "name": "last_indexed_document_count", "required": false, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } } }, { "name": "last_seen", "required": false, "type": { - "items": [ + "generics": [ { "kind": "instance_of", "type": { "name": "string", "namespace": "_builtins" } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } } ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "Nullable", + "namespace": "connector._types" + } } }, { "name": "last_sync_error", "required": false, "type": { - "items": [ + "generics": [ { "kind": "instance_of", "type": { "name": "string", "namespace": "_builtins" } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } } ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "Nullable", + "namespace": "connector._types" + } } }, { "name": "last_sync_scheduled_at", "required": false, "type": { - "items": [ + "generics": [ { "kind": "instance_of", "type": { "name": "string", "namespace": "_builtins" } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } } ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "Nullable", + "namespace": "connector._types" + } } }, { "name": "last_sync_status", "required": false, "type": { - "items": [ + "generics": [ { "kind": "instance_of", "type": { "name": "SyncStatus", "namespace": "connector._types" } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } } ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "Nullable", + "namespace": "connector._types" + } } }, { "name": "last_synced", "required": false, "type": { - "items": [ + "generics": [ { "kind": "instance_of", "type": { "name": "string", "namespace": "_builtins" } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } } ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "Nullable", + "namespace": "connector._types" + } } }, { @@ -105754,7 +105875,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L237-L266" + "specLocation": "connector/_types/Connector.ts#L240-L269" }, { "kind": "interface", @@ -105941,7 +106062,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L82-L98" + "specLocation": "connector/_types/Connector.ts#L83-L99" }, { "kind": "type_alias", @@ -105949,7 +106070,7 @@ "name": "ConnectorConfiguration", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L100-L103", + "specLocation": "connector/_types/Connector.ts#L101-L104", "type": { "key": { "kind": "instance_of", @@ -105975,7 +106096,7 @@ "name": "ConnectorCustomScheduling", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L127-L127", + "specLocation": "connector/_types/Connector.ts#L128-L128", "type": { "key": { "kind": "instance_of", @@ -106058,7 +106179,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L223-L229" + "specLocation": "connector/_types/Connector.ts#L224-L230" }, { "kind": "enum", @@ -106080,7 +106201,7 @@ "name": "ConnectorFieldType", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L42-L47" + "specLocation": "connector/_types/Connector.ts#L43-L48" }, { "kind": "interface", @@ -106113,7 +106234,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L105-L109" + "specLocation": "connector/_types/Connector.ts#L106-L110" }, { "kind": "enum", @@ -106138,7 +106259,7 @@ "name": "ConnectorStatus", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L129-L135" + "specLocation": "connector/_types/Connector.ts#L130-L136" }, { "kind": "interface", @@ -106203,7 +106324,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L119-L125" + "specLocation": "connector/_types/Connector.ts#L120-L126" }, { "kind": "interface", @@ -106277,7 +106398,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L111-L117" + "specLocation": "connector/_types/Connector.ts#L112-L118" }, { "kind": "interface", @@ -106309,7 +106430,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L29-L32" + "specLocation": "connector/_types/Connector.ts#L30-L33" }, { "kind": "enum", @@ -106334,7 +106455,7 @@ "name": "DisplayType", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L34-L40" + "specLocation": "connector/_types/Connector.ts#L35-L41" }, { "kind": "interface", @@ -106355,7 +106476,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L214-L216" + "specLocation": "connector/_types/Connector.ts#L215-L217" }, { "kind": "interface", @@ -106405,7 +106526,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L191-L195" + "specLocation": "connector/_types/Connector.ts#L192-L196" }, { "kind": "interface", @@ -106448,7 +106569,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L208-L212" + "specLocation": "connector/_types/Connector.ts#L209-L213" }, { "kind": "enum", @@ -106464,7 +106585,7 @@ "name": "FilteringPolicy", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L154-L157" + "specLocation": "connector/_types/Connector.ts#L155-L158" }, { "kind": "interface", @@ -106562,7 +106683,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L169-L178" + "specLocation": "connector/_types/Connector.ts#L170-L179" }, { "kind": "enum", @@ -106595,7 +106716,7 @@ "name": "FilteringRuleRule", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L159-L167" + "specLocation": "connector/_types/Connector.ts#L160-L168" }, { "kind": "interface", @@ -106641,7 +106762,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L202-L206" + "specLocation": "connector/_types/Connector.ts#L203-L207" }, { "kind": "interface", @@ -106676,7 +106797,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L197-L200" + "specLocation": "connector/_types/Connector.ts#L198-L201" }, { "kind": "interface", @@ -106714,7 +106835,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L180-L183" + "specLocation": "connector/_types/Connector.ts#L181-L184" }, { "kind": "enum", @@ -106733,7 +106854,7 @@ "name": "FilteringValidationState", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L185-L189" + "specLocation": "connector/_types/Connector.ts#L186-L190" }, { "kind": "interface", @@ -106747,7 +106868,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "greater_than" + "value": "\"greater_than\"" } }, { @@ -106762,7 +106883,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L62-L65" + "specLocation": "connector/_types/Connector.ts#L63-L66" }, { "kind": "interface", @@ -106776,7 +106897,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "included_in" + "value": "\"included_in\"" } }, { @@ -106791,7 +106912,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L72-L75" + "specLocation": "connector/_types/Connector.ts#L73-L76" }, { "kind": "interface", @@ -106845,7 +106966,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L147-L152" + "specLocation": "connector/_types/Connector.ts#L148-L153" }, { "kind": "interface", @@ -106859,7 +106980,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "less_than" + "value": "\"less_than\"" } }, { @@ -106874,7 +106995,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L57-L60" + "specLocation": "connector/_types/Connector.ts#L58-L61" }, { "kind": "interface", @@ -106888,7 +107009,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "list_type" + "value": "\"list_type\"" } }, { @@ -106906,7 +107027,40 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L67-L70" + "specLocation": "connector/_types/Connector.ts#L68-L71" + }, + { + "generics": [ + { + "name": "T", + "namespace": "connector._types" + } + ], + "kind": "type_alias", + "name": { + "name": "Nullable", + "namespace": "connector._types" + }, + "specLocation": "connector/_types/Connector.ts#L238-L238", + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "T", + "namespace": "connector._types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "NullValue", + "namespace": "_spec_utils" + } + } + ], + "kind": "union_of" + } }, { "kind": "interface", @@ -106920,7 +107074,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "regex" + "value": "\"regex\"" } }, { @@ -106935,7 +107089,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L77-L80" + "specLocation": "connector/_types/Connector.ts#L78-L81" }, { "kind": "interface", @@ -106946,7 +107100,7 @@ "properties": [ { "name": "access_control", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -106957,7 +107111,7 @@ }, { "name": "full", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -106968,7 +107122,7 @@ }, { "name": "incremental", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -106978,7 +107132,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L231-L235" + "specLocation": "connector/_types/Connector.ts#L232-L236" }, { "kind": "interface", @@ -107010,7 +107164,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L24-L27" + "specLocation": "connector/_types/Connector.ts#L25-L28" }, { "kind": "interface", @@ -107042,7 +107196,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L218-L221" + "specLocation": "connector/_types/Connector.ts#L219-L222" }, { "kind": "enum", @@ -107073,7 +107227,7 @@ "name": "SyncStatus", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L137-L145" + "specLocation": "connector/_types/Connector.ts#L138-L146" }, { "kind": "type_alias", @@ -107081,7 +107235,7 @@ "name": "Validation", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L49-L55", + "specLocation": "connector/_types/Connector.ts#L50-L56", "type": { "items": [ { diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index a363b42cbd..4bc18ec7d8 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -488,6 +488,51 @@ "response definition connector.delete:Response / body / instance_of - Non-leaf type cannot be used here: '_types:AcknowledgedResponseBase'" ] }, + "connector.get": { + "request": [], + "response": [ + "type_alias definition connector._types:Nullable / union_of / instance_of - No type definition for 'connector._types:T'" + ] + }, + "connector.list": { + "request": [ + "Request: missing json spec query parameter 'index_name'", + "Request: missing json spec query parameter 'connector_name'", + "Request: missing json spec query parameter 'service_type'", + "Request: missing json spec query parameter 'query'" + ], + "response": [] + }, + "connector.update_api_key_id": { + "request": [ + "Missing request & response" + ], + "response": [] + }, + "connector.update_index_name": { + "request": [ + "Missing request & response" + ], + "response": [] + }, + "connector.update_native": { + "request": [ + "Missing request & response" + ], + "response": [] + }, + "connector.update_service_type": { + "request": [ + "Missing request & response" + ], + "response": [] + }, + "connector.update_status": { + "request": [ + "Missing request & response" + ], + "response": [] + }, "create": { "request": [], "response": [ diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 161423c583..5cae843fb6 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -2027,6 +2027,8 @@ export interface SpecUtilsBaseNode { transport_address: TransportAddress } +export type SpecUtilsNullValue = null + export type SpecUtilsPipeSeparatedFlags = T | string export type SpecUtilsStringified = T | string @@ -9071,24 +9073,24 @@ export interface ConnectorConnector { configuration: ConnectorConnectorConfiguration custom_scheduling: ConnectorConnectorCustomScheduling description?: string - error: string | null + error: ConnectorNullable features: ConnectorConnectorFeatures filtering: ConnectorFilteringConfig[] id?: Id - index_name: string + index_name: ConnectorNullable is_native: boolean language?: string - last_access_control_sync_error?: string | null - last_access_control_sync_scheduled_at?: string | null - last_access_control_sync_status?: ConnectorSyncStatus | null - last_deleted_document_count?: long | null - last_incremental_sync_scheduled_at?: string | null - last_indexed_document_count?: long | null - last_seen?: string | null - last_sync_error?: string | null - last_sync_scheduled_at?: string | null - last_sync_status?: ConnectorSyncStatus | null - last_synced?: string | null + last_access_control_sync_error?: ConnectorNullable + last_access_control_sync_scheduled_at?: ConnectorNullable + last_access_control_sync_status?: ConnectorNullable + last_deleted_document_count?: long + last_incremental_sync_scheduled_at?: ConnectorNullable + last_indexed_document_count?: long + last_seen?: ConnectorNullable + last_sync_error?: ConnectorNullable + last_sync_scheduled_at?: ConnectorNullable + last_sync_status?: ConnectorNullable + last_synced?: ConnectorNullable name?: string pipeline?: ConnectorIngestPipelineParams scheduling: ConnectorSchedulingConfiguration @@ -9209,12 +9211,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 } @@ -9226,24 +9228,26 @@ 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 type ConnectorNullable = T | SpecUtilsNullValue + export interface ConnectorRegexValidation { - type: 'regex' + type: '"regex"' constraint: string } export interface ConnectorSchedulingConfiguration { - access_control: ConnectorConnectorScheduling - full: ConnectorConnectorScheduling - incremental: ConnectorConnectorScheduling + access_control?: ConnectorConnectorScheduling + full?: ConnectorConnectorScheduling + incremental?: ConnectorConnectorScheduling } export interface ConnectorSelectOption { diff --git a/specification/_json_spec/connector.check_in.json b/specification/_json_spec/connector.check_in.json index eb81cad389..36535109df 100644 --- a/specification/_json_spec/connector.check_in.json +++ b/specification/_json_spec/connector.check_in.json @@ -7,13 +7,17 @@ "stability": "experimental", "visibility": "public", "headers": { - "accept": ["application/json"] + "accept": [ + "application/json" + ] }, "url": { "paths": [ { "path": "/_connector/{connector_id}/_check_in", - "methods": ["PUT"], + "methods": [ + "PUT" + ], "parts": { "connector_id": { "type": "string", diff --git a/specification/_json_spec/connector.delete.json b/specification/_json_spec/connector.delete.json index bd0bd8de94..88c4e85dac 100644 --- a/specification/_json_spec/connector.delete.json +++ b/specification/_json_spec/connector.delete.json @@ -7,13 +7,17 @@ "stability": "experimental", "visibility": "public", "headers": { - "accept": ["application/json"] + "accept": [ + "application/json" + ] }, "url": { "paths": [ { "path": "/_connector/{connector_id}", - "methods": ["DELETE"], + "methods": [ + "DELETE" + ], "parts": { "connector_id": { "type": "string", diff --git a/specification/_json_spec/connector.get.json b/specification/_json_spec/connector.get.json index 372267f8d6..2645df28c5 100644 --- a/specification/_json_spec/connector.get.json +++ b/specification/_json_spec/connector.get.json @@ -7,13 +7,17 @@ "stability": "experimental", "visibility": "public", "headers": { - "accept": ["application/json"] + "accept": [ + "application/json" + ] }, "url": { "paths": [ { "path": "/_connector/{connector_id}", - "methods": ["GET"], + "methods": [ + "GET" + ], "parts": { "connector_id": { "type": "string", diff --git a/specification/_json_spec/connector.last_sync.json b/specification/_json_spec/connector.last_sync.json index 0ef4e37e5d..f6d93555b7 100644 --- a/specification/_json_spec/connector.last_sync.json +++ b/specification/_json_spec/connector.last_sync.json @@ -7,14 +7,20 @@ "stability": "experimental", "visibility": "public", "headers": { - "accept": ["application/json"], - "content_type": ["application/json"] + "accept": [ + "application/json" + ], + "content_type": [ + "application/json" + ] }, "url": { "paths": [ { "path": "/_connector/{connector_id}/_last_sync", - "methods": ["PUT"], + "methods": [ + "PUT" + ], "parts": { "connector_id": { "type": "string", diff --git a/specification/_json_spec/connector.list.json b/specification/_json_spec/connector.list.json index 75939d2bd9..67d2250d3c 100644 --- a/specification/_json_spec/connector.list.json +++ b/specification/_json_spec/connector.list.json @@ -7,13 +7,17 @@ "stability": "experimental", "visibility": "public", "headers": { - "accept": ["application/json"] + "accept": [ + "application/json" + ] }, "url": { "paths": [ { "path": "/_connector", - "methods": ["GET"] + "methods": [ + "GET" + ] } ] }, @@ -26,7 +30,23 @@ "size": { "type": "int", "default": 100, - "description": "specifies a max number of results to get (default: 100)" + "description": "Specifies a max number of results to get (default: 100)" + }, + "index_name": { + "type": "list", + "description": "A comma-separated list of connector index names to fetch connector documents for" + }, + "connector_name": { + "type": "list", + "description": "A comma-separated list of connector names to fetch connector documents for" + }, + "service_type": { + "type": "list", + "description": "A comma-separated list of connector service types to fetch connector documents for" + }, + "query": { + "type": "string", + "description": "A search string for querying connectors, filtering results by matching against connector names, descriptions, and index names" } } } diff --git a/specification/_json_spec/connector.post.json b/specification/_json_spec/connector.post.json index 2f020f2c29..edc8650128 100644 --- a/specification/_json_spec/connector.post.json +++ b/specification/_json_spec/connector.post.json @@ -7,14 +7,20 @@ "stability": "experimental", "visibility": "public", "headers": { - "accept": ["application/json"], - "content_type": ["application/json"] + "accept": [ + "application/json" + ], + "content_type": [ + "application/json" + ] }, "url": { "paths": [ { "path": "/_connector", - "methods": ["POST"] + "methods": [ + "POST" + ] } ] }, diff --git a/specification/_json_spec/connector.put.json b/specification/_json_spec/connector.put.json index 649b6b7a3b..af733de6aa 100644 --- a/specification/_json_spec/connector.put.json +++ b/specification/_json_spec/connector.put.json @@ -7,14 +7,20 @@ "stability": "experimental", "visibility": "public", "headers": { - "accept": ["application/json"], - "content_type": ["application/json"] + "accept": [ + "application/json" + ], + "content_type": [ + "application/json" + ] }, "url": { "paths": [ { "path": "/_connector/{connector_id}", - "methods": ["PUT"], + "methods": [ + "PUT" + ], "parts": { "connector_id": { "type": "string", diff --git a/specification/_json_spec/connector.update_api_key_id.json b/specification/_json_spec/connector.update_api_key_id.json new file mode 100644 index 0000000000..cc989bfec8 --- /dev/null +++ b/specification/_json_spec/connector.update_api_key_id.json @@ -0,0 +1,38 @@ +{ + "connector.update_api_key_id": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-api-key-id-api.html", + "description": "Updates the API key id and/or API key secret id fields in the connector document." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": [ + "application/json" + ], + "content_type": [ + "application/json" + ] + }, + "url": { + "paths": [ + { + "path": "/_connector/{connector_id}/_api_key_id", + "methods": [ + "PUT" + ], + "parts": { + "connector_id": { + "type": "string", + "description": "The unique identifier of the connector to be updated." + } + } + } + ] + }, + "body": { + "description": "An object containing the connector's API key id and/or Connector Secret document id for that API key.", + "required": true + } + } +} diff --git a/specification/_json_spec/connector.update_configuration.json b/specification/_json_spec/connector.update_configuration.json index 07f3dd4eb4..1ececd7ea9 100644 --- a/specification/_json_spec/connector.update_configuration.json +++ b/specification/_json_spec/connector.update_configuration.json @@ -7,14 +7,20 @@ "stability": "experimental", "visibility": "public", "headers": { - "accept": ["application/json"], - "content_type": ["application/json"] + "accept": [ + "application/json" + ], + "content_type": [ + "application/json" + ] }, "url": { "paths": [ { "path": "/_connector/{connector_id}/_configuration", - "methods": ["PUT"], + "methods": [ + "PUT" + ], "parts": { "connector_id": { "type": "string", diff --git a/specification/_json_spec/connector.update_error.json b/specification/_json_spec/connector.update_error.json index 5b095850bd..150f71ad03 100644 --- a/specification/_json_spec/connector.update_error.json +++ b/specification/_json_spec/connector.update_error.json @@ -7,14 +7,20 @@ "stability": "experimental", "visibility": "public", "headers": { - "accept": ["application/json"], - "content_type": ["application/json"] + "accept": [ + "application/json" + ], + "content_type": [ + "application/json" + ] }, "url": { "paths": [ { "path": "/_connector/{connector_id}/_error", - "methods": ["PUT"], + "methods": [ + "PUT" + ], "parts": { "connector_id": { "type": "string", diff --git a/specification/_json_spec/connector.update_filtering.json b/specification/_json_spec/connector.update_filtering.json index 8779403b22..c2a9bf0720 100644 --- a/specification/_json_spec/connector.update_filtering.json +++ b/specification/_json_spec/connector.update_filtering.json @@ -7,14 +7,20 @@ "stability": "experimental", "visibility": "public", "headers": { - "accept": ["application/json"], - "content_type": ["application/json"] + "accept": [ + "application/json" + ], + "content_type": [ + "application/json" + ] }, "url": { "paths": [ { "path": "/_connector/{connector_id}/_filtering", - "methods": ["PUT"], + "methods": [ + "PUT" + ], "parts": { "connector_id": { "type": "string", diff --git a/specification/_json_spec/connector.update_index_name.json b/specification/_json_spec/connector.update_index_name.json new file mode 100644 index 0000000000..97d76f60c0 --- /dev/null +++ b/specification/_json_spec/connector.update_index_name.json @@ -0,0 +1,38 @@ +{ + "connector.update_index_name": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-index-name-api.html", + "description": "Updates the index name of the connector." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": [ + "application/json" + ], + "content_type": [ + "application/json" + ] + }, + "url": { + "paths": [ + { + "path": "/_connector/{connector_id}/_index_name", + "methods": [ + "PUT" + ], + "parts": { + "connector_id": { + "type": "string", + "description": "The unique identifier of the connector to be updated." + } + } + } + ] + }, + "body": { + "description": "An object containing the connector's index name.", + "required": true + } + } +} diff --git a/specification/_json_spec/connector.update_name.json b/specification/_json_spec/connector.update_name.json index f68f7ae0a8..a7ca1a9730 100644 --- a/specification/_json_spec/connector.update_name.json +++ b/specification/_json_spec/connector.update_name.json @@ -7,14 +7,20 @@ "stability": "experimental", "visibility": "public", "headers": { - "accept": ["application/json"], - "content_type": ["application/json"] + "accept": [ + "application/json" + ], + "content_type": [ + "application/json" + ] }, "url": { "paths": [ { "path": "/_connector/{connector_id}/_name", - "methods": ["PUT"], + "methods": [ + "PUT" + ], "parts": { "connector_id": { "type": "string", diff --git a/specification/_json_spec/connector.update_native.json b/specification/_json_spec/connector.update_native.json new file mode 100644 index 0000000000..5a13b44e82 --- /dev/null +++ b/specification/_json_spec/connector.update_native.json @@ -0,0 +1,38 @@ +{ + "connector.update_native": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/connector-apis.html", + "description": "Updates the is_native flag of the connector." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": [ + "application/json" + ], + "content_type": [ + "application/json" + ] + }, + "url": { + "paths": [ + { + "path": "/_connector/{connector_id}/_native", + "methods": [ + "PUT" + ], + "parts": { + "connector_id": { + "type": "string", + "description": "The unique identifier of the connector to be updated." + } + } + } + ] + }, + "body": { + "description": "An object containing the connector's is_native flag", + "required": true + } + } +} diff --git a/specification/_json_spec/connector.update_pipeline.json b/specification/_json_spec/connector.update_pipeline.json index f9049f6821..b7ab6abcf0 100644 --- a/specification/_json_spec/connector.update_pipeline.json +++ b/specification/_json_spec/connector.update_pipeline.json @@ -7,14 +7,20 @@ "stability": "experimental", "visibility": "public", "headers": { - "accept": ["application/json"], - "content_type": ["application/json"] + "accept": [ + "application/json" + ], + "content_type": [ + "application/json" + ] }, "url": { "paths": [ { "path": "/_connector/{connector_id}/_pipeline", - "methods": ["PUT"], + "methods": [ + "PUT" + ], "parts": { "connector_id": { "type": "string", diff --git a/specification/_json_spec/connector.update_scheduling.json b/specification/_json_spec/connector.update_scheduling.json index ee8b2544ab..98cee5c257 100644 --- a/specification/_json_spec/connector.update_scheduling.json +++ b/specification/_json_spec/connector.update_scheduling.json @@ -7,14 +7,20 @@ "stability": "experimental", "visibility": "public", "headers": { - "accept": ["application/json"], - "content_type": ["application/json"] + "accept": [ + "application/json" + ], + "content_type": [ + "application/json" + ] }, "url": { "paths": [ { "path": "/_connector/{connector_id}/_scheduling", - "methods": ["PUT"], + "methods": [ + "PUT" + ], "parts": { "connector_id": { "type": "string", diff --git a/specification/_json_spec/connector.update_service_type.json b/specification/_json_spec/connector.update_service_type.json new file mode 100644 index 0000000000..279d93c684 --- /dev/null +++ b/specification/_json_spec/connector.update_service_type.json @@ -0,0 +1,38 @@ +{ + "connector.update_service_type": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-service-type-api.html", + "description": "Updates the service type of the connector." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": [ + "application/json" + ], + "content_type": [ + "application/json" + ] + }, + "url": { + "paths": [ + { + "path": "/_connector/{connector_id}/_service_type", + "methods": [ + "PUT" + ], + "parts": { + "connector_id": { + "type": "string", + "description": "The unique identifier of the connector to be updated." + } + } + } + ] + }, + "body": { + "description": "An object containing the connector's service type.", + "required": true + } + } +} diff --git a/specification/_json_spec/connector.update_status.json b/specification/_json_spec/connector.update_status.json new file mode 100644 index 0000000000..ea5e506faa --- /dev/null +++ b/specification/_json_spec/connector.update_status.json @@ -0,0 +1,38 @@ +{ + "connector.update_status": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-status-api.html", + "description": "Updates the status of the connector." + }, + "stability": "experimental", + "visibility": "public", + "headers": { + "accept": [ + "application/json" + ], + "content_type": [ + "application/json" + ] + }, + "url": { + "paths": [ + { + "path": "/_connector/{connector_id}/_status", + "methods": [ + "PUT" + ], + "parts": { + "connector_id": { + "type": "string", + "description": "The unique identifier of the connector to be updated." + } + } + } + ] + }, + "body": { + "description": "An object containing the connector's status.", + "required": true + } + } +} diff --git a/specification/_spec_utils/utils.ts b/specification/_spec_utils/utils.ts index d2ae870ab1..a797b5c800 100644 --- a/specification/_spec_utils/utils.ts +++ b/specification/_spec_utils/utils.ts @@ -17,14 +17,14 @@ * under the License. */ -import { Stringified } from '@spec_utils/Stringified' +import { Stringified } from "@spec_utils/Stringified"; /** * A `null` value that is to be interpreted as an actual value, unless other uses of `null` that are equivalent * to a missing value. It is used for exemple in settings, where using the `NullValue` for a setting will reset * it to its default value. */ -type NullValue = null +type NullValue = null; /** * Settings in Elasticsearch are values that can be reset to their default by setting them to the `null` value. @@ -32,4 +32,4 @@ type NullValue = null * @es_quirk Because of how they are implemented internally, settings are always returned as strings, even * if their value has been set using a primitive type. */ -type Setting = Stringified | NullValue +type Setting = Stringified | NullValue; diff --git a/specification/connector/_types/Connector.ts b/specification/connector/_types/Connector.ts index 7c1932e07e..246df03a8f 100644 --- a/specification/connector/_types/Connector.ts +++ b/specification/connector/_types/Connector.ts @@ -16,19 +16,20 @@ * specific language governing permissions and limitations * under the License. */ -import { Id, ScalarValue } from '@_types/common' -import { double, integer, long } from '@_types/Numeric' -import { Dictionary } from '@spec_utils/Dictionary' -import { UserDefinedValue } from '@spec_utils/UserDefinedValue' +import { Id, ScalarValue } from "@_types/common"; +import { double, integer, long } from "@_types/Numeric"; +import { Dictionary } from "@spec_utils/Dictionary"; +import { UserDefinedValue } from "@spec_utils/UserDefinedValue"; +import { NullValue } from "@spec_utils/utils"; interface SelectOption { - label: string - value: string + label: string; + value: string; } interface Dependency { - field: string - value: ScalarValue + field: string; + value: ScalarValue; } enum DisplayType { @@ -36,14 +37,14 @@ enum DisplayType { textarea, numeric, toggle, - dropdown + dropdown, } enum ConnectorFieldType { str, int, list, - bool + bool, } /** @variants internal tag='type' */ @@ -52,86 +53,86 @@ type Validation = | GreaterThanValidation | ListTypeValidation | IncludedInValidation - | RegexValidation + | RegexValidation; export interface LessThanValidation { - type: 'less_than' - constraint: double + type: "less_than"; + constraint: double; } export interface GreaterThanValidation { - type: 'greater_than' - constraint: double + type: "greater_than"; + constraint: double; } export interface ListTypeValidation { - type: 'list_type' - constraint: ScalarValue[] + type: "list_type"; + constraint: ScalarValue[]; } export interface IncludedInValidation { - type: 'included_in' - constraint: string + type: "included_in"; + constraint: string; } export interface RegexValidation { - type: 'regex' - constraint: string + type: "regex"; + constraint: string; } export interface ConnectorConfigProperties { - category?: string - default_value: ScalarValue - depends_on: Dependency[] - display: DisplayType - label: string - options: SelectOption[] - order?: integer - placeholder?: string - required: boolean - sensitive: boolean - tooltip?: string - type: ConnectorFieldType - ui_restrictions: string[] - validations: Validation[] - value: ScalarValue + category?: string; + default_value: ScalarValue; + depends_on: Dependency[]; + display: DisplayType; + label: string; + options: SelectOption[]; + order?: integer; + placeholder?: string; + required: boolean; + sensitive: boolean; + tooltip?: string; + type: ConnectorFieldType; + ui_restrictions: string[]; + validations: Validation[]; + value: ScalarValue; } export type ConnectorConfiguration = Dictionary< string, ConnectorConfigProperties -> +>; export interface ConnectorScheduling { - enabled: boolean + enabled: boolean; /** The interval is expressed using the crontab syntax */ - interval: string + interval: string; } interface CustomSchedulingConfigurationOverrides { - max_crawl_depth?: integer - sitemap_discovery_disabled?: boolean - domain_allowlist?: string[] - sitemap_urls?: string[] - seed_urls?: string[] + max_crawl_depth?: integer; + sitemap_discovery_disabled?: boolean; + domain_allowlist?: string[]; + sitemap_urls?: string[]; + seed_urls?: string[]; } interface CustomScheduling { - configuration_overrides: CustomSchedulingConfigurationOverrides - enabled: boolean - interval: string - last_synced?: string - name: string + configuration_overrides: CustomSchedulingConfigurationOverrides; + enabled: boolean; + interval: string; + last_synced?: string; + name: string; } -export type ConnectorCustomScheduling = Dictionary +export type ConnectorCustomScheduling = Dictionary; enum ConnectorStatus { created, needs_configuration, configured, connected, - error + error, } export enum SyncStatus { @@ -141,19 +142,19 @@ export enum SyncStatus { error, in_progress, pending, - suspended + suspended, } export interface IngestPipelineParams { - extract_binary_content: boolean - name: string - reduce_whitespace: boolean - run_ml_inference: boolean + extract_binary_content: boolean; + name: string; + reduce_whitespace: boolean; + run_ml_inference: boolean; } enum FilteringPolicy { exclude, - include + include, } enum FilteringRuleRule { @@ -162,105 +163,107 @@ enum FilteringRuleRule { equals, regex, starts_with, - greater_than = '>', - less_than = '<' + greater_than = ">", + less_than = "<", } interface FilteringRule { - created_at: string - field: string - id: string - order: integer - policy: FilteringPolicy - rule: FilteringRuleRule - updated_at: string - value: string + created_at: string; + field: string; + id: string; + order: integer; + policy: FilteringPolicy; + rule: FilteringRuleRule; + updated_at: string; + value: string; } interface FilteringValidation { - ids: string[] - messages: string[] + ids: string[]; + messages: string[]; } enum FilteringValidationState { edited, invalid, - valid + valid, } interface FilteringAdvancedSnippet { - created_at: string - updated_at: string - value: Dictionary + created_at: string; + updated_at: string; + value: Dictionary; } interface FilteringRulesValidation { - errors: FilteringValidation[] - state: FilteringValidationState + errors: FilteringValidation[]; + state: FilteringValidationState; } interface FilteringRules { - advanced_snippet: FilteringAdvancedSnippet - rules: FilteringRule[] - validation: FilteringRulesValidation + advanced_snippet: FilteringAdvancedSnippet; + rules: FilteringRule[]; + validation: FilteringRulesValidation; } export interface FilteringConfig { - active: FilteringRules - domain: string - draft: FilteringRules + active: FilteringRules; + domain: string; + draft: FilteringRules; } interface FeatureEnabled { - enabled: boolean + enabled: boolean; } interface SyncRulesFeature { - advanced?: FeatureEnabled - basic?: FeatureEnabled + advanced?: FeatureEnabled; + basic?: FeatureEnabled; } export interface ConnectorFeatures { - document_level_security?: FeatureEnabled - filtering_advanced_config?: boolean - filtering_rules?: boolean - incremental_sync?: FeatureEnabled - sync_rules?: SyncRulesFeature + document_level_security?: FeatureEnabled; + filtering_advanced_config?: boolean; + filtering_rules?: boolean; + incremental_sync?: FeatureEnabled; + sync_rules?: SyncRulesFeature; } export interface SchedulingConfiguration { - access_control: ConnectorScheduling - full: ConnectorScheduling - incremental: ConnectorScheduling + access_control?: ConnectorScheduling; + full?: ConnectorScheduling; + incremental?: ConnectorScheduling; } +type Nullable = T | NullValue; + export interface Connector { - api_key_id?: string - configuration: ConnectorConfiguration - custom_scheduling: ConnectorCustomScheduling - description?: string - error: string | null - features: ConnectorFeatures - filtering: FilteringConfig[] - id?: Id - index_name: string - is_native: boolean - language?: string - last_access_control_sync_error?: string | null - last_access_control_sync_scheduled_at?: string | null - last_access_control_sync_status?: SyncStatus | null - last_deleted_document_count?: long | null - last_incremental_sync_scheduled_at?: string | null - last_indexed_document_count?: long | null - last_seen?: string | null - last_sync_error?: string | null - last_sync_scheduled_at?: string | null - last_sync_status?: SyncStatus | null - last_synced?: string | null - name?: string - pipeline?: IngestPipelineParams - scheduling: SchedulingConfiguration - service_type: string - status: ConnectorStatus - sync_now: boolean + api_key_id?: string; + configuration: ConnectorConfiguration; + custom_scheduling: ConnectorCustomScheduling; + description?: string; + error: Nullable; + features: ConnectorFeatures; + filtering: FilteringConfig[]; + id?: Id; + index_name: Nullable; + is_native: boolean; + language?: string; + last_access_control_sync_error?: Nullable; + last_access_control_sync_scheduled_at?: Nullable; + last_access_control_sync_status?: Nullable; + last_deleted_document_count?: long; + last_incremental_sync_scheduled_at?: Nullable; + last_indexed_document_count?: long; + last_seen?: Nullable; + last_sync_error?: Nullable; + last_sync_scheduled_at?: Nullable; + last_sync_status?: Nullable; + last_synced?: Nullable; + name?: string; + pipeline?: IngestPipelineParams; + scheduling: SchedulingConfiguration; + service_type: string; + status: ConnectorStatus; + sync_now: boolean; } From 7834fdd21d87369dfcaf23425c2d65fd57075393 Mon Sep 17 00:00:00 2001 From: Jedr Blaszyk Date: Tue, 9 Apr 2024 18:11:00 +0200 Subject: [PATCH 12/16] Update API definitions --- .../elasticsearch-serverless-openapi.json | 825 +++++++++------ output/schema/schema.json | 992 ++++++++++++------ output/schema/validation-errors.json | 32 +- output/typescript/types.ts | 123 ++- specification/_doc_ids/table.csv | 7 +- specification/connector/_types/Connector.ts | 28 +- .../ConnectorUpdateLastSyncRequest.ts | 24 +- .../connector/post/ConnectorPostRequest.ts | 3 +- .../connector/put/ConnectorPutRequest.ts | 3 +- .../ConnectorUpdateAPIKeyIDRequest.ts | 44 + .../ConnectorUpdateAPIKeyIDResponse.ts | 26 + .../ConnectorUpdateConfigurationRequest.ts | 5 +- .../ConnectorUpdateErrorRequest.ts | 3 +- .../ConnectorUpdateIndexNameRequest.ts | 43 + .../ConnectorUpdateIndexNameResponse.ts | 26 + .../ConnectorUpdateNativeRequest.ts | 42 + .../ConnectorUpdateNativeResponse.ts | 26 + .../ConnectorUpdateSchedulingRequest.ts | 2 +- .../ConnectorUpdateServiceTypeRequest.ts | 42 + .../ConnectorUpdateServiceTypeResponse.ts | 26 + .../ConnectorUpdateStatusRequest.ts | 43 + .../ConnectorUpdateStatusResponse.ts | 26 + 22 files changed, 1620 insertions(+), 771 deletions(-) create mode 100644 specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts create mode 100644 specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDResponse.ts create mode 100644 specification/connector/update_index_name/ConnectorUpdateIndexNameRequest.ts create mode 100644 specification/connector/update_index_name/ConnectorUpdateIndexNameResponse.ts create mode 100644 specification/connector/update_native/ConnectorUpdateNativeRequest.ts create mode 100644 specification/connector/update_native/ConnectorUpdateNativeResponse.ts create mode 100644 specification/connector/update_service_type/ConnectorUpdateServiceTypeRequest.ts create mode 100644 specification/connector/update_service_type/ConnectorUpdateServiceTypeResponse.ts create mode 100644 specification/connector/update_status/ConnectorUpdateStatusRequest.ts create mode 100644 specification/connector/update_status/ConnectorUpdateStatusResponse.ts diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 72cb91024d..d0aa6fe21f 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -1926,7 +1926,7 @@ "type": "string" }, "index_name": { - "type": "string" + "$ref": "#/components/schemas/_spec_utils:WithNullValuestring" }, "is_native": { "type": "boolean" @@ -2038,140 +2038,39 @@ "type": "object", "properties": { "last_access_control_sync_error": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "$ref": "#/components/schemas/_spec_utils:WithNullValuestring" }, "last_access_control_sync_scheduled_at": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "type": "string" }, "last_access_control_sync_status": { - "oneOf": [ - { - "$ref": "#/components/schemas/connector._types:SyncStatus" - }, - { - "nullable": true, - "type": "string" - } - ] + "$ref": "#/components/schemas/connector._types:SyncStatus" }, "last_deleted_document_count": { - "oneOf": [ - { - "type": "number" - }, - { - "nullable": true, - "type": "string" - } - ] + "type": "number" }, "last_incremental_sync_scheduled_at": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "type": "string" }, "last_indexed_document_count": { - "oneOf": [ - { - "type": "number" - }, - { - "nullable": true, - "type": "string" - } - ] + "type": "number" }, "last_seen": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "$ref": "#/components/schemas/_spec_utils:WithNullValuestring" }, "last_sync_error": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "$ref": "#/components/schemas/_spec_utils:WithNullValuestring" }, "last_sync_scheduled_at": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "type": "string" }, "last_sync_status": { - "oneOf": [ - { - "$ref": "#/components/schemas/connector._types:SyncStatus" - }, - { - "nullable": true, - "type": "string" - } - ] + "$ref": "#/components/schemas/connector._types:SyncStatus" }, "last_synced": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "type": "string" } - }, - "required": [ - "last_access_control_sync_error", - "last_access_control_sync_scheduled_at", - "last_access_control_sync_status", - "last_deleted_document_count", - "last_incremental_sync_scheduled_at", - "last_indexed_document_count", - "last_seen", - "last_sync_error", - "last_sync_scheduled_at", - "last_sync_status", - "last_synced" - ] + } } } }, @@ -2280,7 +2179,7 @@ "type": "string" }, "index_name": { - "type": "string" + "$ref": "#/components/schemas/_spec_utils:WithNullValuestring" }, "is_native": { "type": "boolean" @@ -2325,17 +2224,17 @@ } } }, - "/_connector/{connector_id}/_configuration": { + "/_connector/{connector_id}/_api_key_id": { "put": { "tags": [ - "connector.update_configuration" + "connector.update_api_key_id" ], - "summary": "Updates the connector configuration.", - "description": "Updates the connector configuration.", + "summary": "Updates the API key id and/or API key secret id fields in the connector document.", + "description": "Updates the API key id and/or API key secret id fields in the connector document.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-configuration-api.html" + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-api-key-id-api.html" }, - "operationId": "connector-update-configuration", + "operationId": "connector-update-api-key-id", "parameters": [ { "in": "path", @@ -2355,85 +2254,13 @@ "schema": { "type": "object", "properties": { - "configuration": { - "$ref": "#/components/schemas/connector._types:ConnectorConfiguration" - } - }, - "required": [ - "configuration" - ] - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/_types:Result" - } + "api_key_id": { + "$ref": "#/components/schemas/_spec_utils:WithNullValuestring" }, - "required": [ - "result" - ] - } - } - } - } - } - } - }, - "/_connector/{connector_id}/_error": { - "put": { - "tags": [ - "connector.update_error" - ], - "summary": "Updates the error field in the connector document.", - "description": "Updates the error field in the connector document.", - "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-error-api.html" - }, - "operationId": "connector-update-error", - "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": { - "error": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "api_key_secret_id": { + "$ref": "#/components/schemas/_spec_utils:WithNullValuestring" } - }, - "required": [ - "error" - ] + } } } }, @@ -2461,17 +2288,17 @@ } } }, - "/_connector/{connector_id}/_filtering": { + "/_connector/{connector_id}/_configuration": { "put": { "tags": [ - "connector.update_filtering" + "connector.update_configuration" ], - "summary": "Updates the filtering field in the connector document.", - "description": "Updates the filtering field in the connector document.", + "summary": "Updates the connector configuration.", + "description": "Updates the connector configuration.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-api.html" + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-configuration-api.html" }, - "operationId": "connector-update-filtering", + "operationId": "connector-update-configuration", "parameters": [ { "in": "path", @@ -2491,16 +2318,16 @@ "schema": { "type": "object", "properties": { - "filtering": { - "type": "array", - "items": { - "$ref": "#/components/schemas/connector._types:FilteringConfig" + "configuration": { + "$ref": "#/components/schemas/connector._types:ConnectorConfiguration" + }, + "values": { + "type": "object", + "additionalProperties": { + "type": "object" } } - }, - "required": [ - "filtering" - ] + } } } }, @@ -2528,17 +2355,17 @@ } } }, - "/_connector/{connector_id}/_name": { + "/_connector/{connector_id}/_error": { "put": { "tags": [ - "connector.update_name" + "connector.update_error" ], - "summary": "Updates the name and/or description fields in the connector document.", - "description": "Updates the name and/or description fields in the connector document.", + "summary": "Updates the error field in the connector document.", + "description": "Updates the error field in the connector document.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-name-description-api.html" + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-error-api.html" }, - "operationId": "connector-update-name", + "operationId": "connector-update-error", "parameters": [ { "in": "path", @@ -2558,15 +2385,12 @@ "schema": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "description": { - "type": "string" + "error": { + "$ref": "#/components/schemas/_spec_utils:WithNullValuestring" } }, "required": [ - "name" + "error" ] } } @@ -2595,17 +2419,17 @@ } } }, - "/_connector/{connector_id}/_pipeline": { + "/_connector/{connector_id}/_filtering": { "put": { "tags": [ - "connector.update_pipeline" + "connector.update_filtering" ], - "summary": "Updates the pipeline field in the connector document.", - "description": "Updates the pipeline field in the connector document.", + "summary": "Updates the filtering field in the connector document.", + "description": "Updates the filtering field in the connector document.", "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-pipeline-api.html" + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-filtering-api.html" }, - "operationId": "connector-update-pipeline", + "operationId": "connector-update-filtering", "parameters": [ { "in": "path", @@ -2625,12 +2449,274 @@ "schema": { "type": "object", "properties": { - "pipeline": { - "$ref": "#/components/schemas/connector._types:IngestPipelineParams" + "filtering": { + "type": "array", + "items": { + "$ref": "#/components/schemas/connector._types:FilteringConfig" + } } }, "required": [ - "pipeline" + "filtering" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/_types:Result" + } + }, + "required": [ + "result" + ] + } + } + } + } + } + } + }, + "/_connector/{connector_id}/_index_name": { + "put": { + "tags": [ + "connector.update_index_name" + ], + "summary": "Updates the index name of the connector.", + "description": "Updates the index name of the connector.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-index-name-api.html" + }, + "operationId": "connector-update-index-name", + "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": { + "index_name": { + "$ref": "#/components/schemas/_spec_utils:WithNullValuestring" + } + }, + "required": [ + "index_name" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/_types:Result" + } + }, + "required": [ + "result" + ] + } + } + } + } + } + } + }, + "/_connector/{connector_id}/_name": { + "put": { + "tags": [ + "connector.update_name" + ], + "summary": "Updates the name and/or description fields in the connector document.", + "description": "Updates the name and/or description fields in the connector document.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-name-description-api.html" + }, + "operationId": "connector-update-name", + "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": { + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/_types:Result" + } + }, + "required": [ + "result" + ] + } + } + } + } + } + } + }, + "/_connector/{connector_id}/_native": { + "put": { + "tags": [ + "connector.update_native" + ], + "summary": "Updates the is_native flag of the connector.", + "description": "Updates the is_native flag of the connector.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-native-api.html" + }, + "operationId": "connector-update-native", + "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": { + "is_native": { + "type": "boolean" + } + }, + "required": [ + "is_native" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/_types:Result" + } + }, + "required": [ + "result" + ] + } + } + } + } + } + } + }, + "/_connector/{connector_id}/_pipeline": { + "put": { + "tags": [ + "connector.update_pipeline" + ], + "summary": "Updates the pipeline field in the connector document.", + "description": "Updates the pipeline field in the connector document.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-pipeline-api.html" + }, + "operationId": "connector-update-pipeline", + "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": { + "pipeline": { + "$ref": "#/components/schemas/connector._types:IngestPipelineParams" + } + }, + "required": [ + "pipeline" ] } } @@ -2723,6 +2809,134 @@ } } }, + "/_connector/{connector_id}/_service_type": { + "put": { + "tags": [ + "connector.update_service_type" + ], + "summary": "Updates the service type of the connector.", + "description": "Updates the service type of the connector.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-service-type-api.html" + }, + "operationId": "connector-update-service-type", + "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": { + "service_type": { + "type": "string" + } + }, + "required": [ + "service_type" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/_types:Result" + } + }, + "required": [ + "result" + ] + } + } + } + } + } + } + }, + "/_connector/{connector_id}/_status": { + "put": { + "tags": [ + "connector.update_status" + ], + "summary": "Updates the status of the connector.", + "description": "Updates the status of the connector.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-status-api.html" + }, + "operationId": "connector-update-status", + "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": { + "status": { + "$ref": "#/components/schemas/connector._types:ConnectorStatus" + } + }, + "required": [ + "status" + ] + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "result": { + "$ref": "#/components/schemas/_types:Result" + } + }, + "required": [ + "result" + ] + } + } + } + } + } + } + }, "/_count": { "get": { "tags": [ @@ -48934,15 +49148,7 @@ "type": "string" }, "error": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "$ref": "#/components/schemas/_spec_utils:WithNullValuestring" }, "features": { "$ref": "#/components/schemas/connector._types:ConnectorFeatures" @@ -48957,7 +49163,7 @@ "$ref": "#/components/schemas/_types:Id" }, "index_name": { - "type": "string" + "$ref": "#/components/schemas/_spec_utils:WithNullValuestring" }, "is_native": { "type": "boolean" @@ -48966,125 +49172,37 @@ "type": "string" }, "last_access_control_sync_error": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "$ref": "#/components/schemas/_spec_utils:WithNullValuestring" }, "last_access_control_sync_scheduled_at": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "type": "string" }, "last_access_control_sync_status": { - "oneOf": [ - { - "$ref": "#/components/schemas/connector._types:SyncStatus" - }, - { - "nullable": true, - "type": "string" - } - ] + "$ref": "#/components/schemas/connector._types:SyncStatus" }, "last_deleted_document_count": { - "oneOf": [ - { - "type": "number" - }, - { - "nullable": true, - "type": "string" - } - ] + "type": "number" }, "last_incremental_sync_scheduled_at": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "type": "string" }, "last_indexed_document_count": { - "oneOf": [ - { - "type": "number" - }, - { - "nullable": true, - "type": "string" - } - ] + "type": "number" }, "last_seen": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "$ref": "#/components/schemas/_spec_utils:WithNullValuestring" }, "last_sync_error": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "$ref": "#/components/schemas/_spec_utils:WithNullValuestring" }, "last_sync_scheduled_at": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "type": "string" }, "last_sync_status": { - "oneOf": [ - { - "$ref": "#/components/schemas/connector._types:SyncStatus" - }, - { - "nullable": true, - "type": "string" - } - ] + "$ref": "#/components/schemas/connector._types:SyncStatus" }, "last_synced": { - "oneOf": [ - { - "type": "string" - }, - { - "nullable": true, - "type": "string" - } - ] + "type": "string" }, "name": { "type": "string" @@ -49446,6 +49564,22 @@ } } }, + "_spec_utils:WithNullValuestring": { + "description": "`WithNullValue` allows for explicit null assignments in contexts where `null` should be interpreted as an\nactual value.", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/_spec_utils:NullValue" + } + ] + }, + "_spec_utils:NullValue": { + "nullable": true, + "description": "A `null` value that is to be interpreted as an actual value, unless other uses of `null` that are equivalent\nto a missing value. It is used for exemple in settings, where using the `NullValue` for a setting will reset\nit to its default value.", + "type": "string" + }, "connector._types:ConnectorFeatures": { "type": "object", "properties": { @@ -49703,12 +49837,7 @@ "incremental": { "$ref": "#/components/schemas/connector._types:ConnectorScheduling" } - }, - "required": [ - "access_control", - "full", - "incremental" - ] + } }, "connector._types:ConnectorScheduling": { "type": "object", diff --git a/output/schema/schema.json b/output/schema/schema.json index 0ef55c615c..fd83a39564 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -3357,23 +3357,35 @@ }, { "availability": { - "stack": { + "serverless": { "stability": "experimental", "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" } }, "description": "Updates the API key id and/or API key secret id fields in the connector document.", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-api-key-id-api.html", + "docId": "connector-update-api-key-id", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-api-key-id-api.html", "name": "connector.update_api_key_id", - "request": null, + "request": { + "name": "Request", + "namespace": "connector.update_api_key_id" + }, "requestBodyRequired": true, "requestMediaType": [ "application/json" ], - "response": null, + "response": { + "name": "Response", + "namespace": "connector.update_api_key_id" + }, "responseMediaType": [ "application/json" ], + "since": "8.12.0", "stability": "experimental", "urls": [ { @@ -3513,23 +3525,35 @@ }, { "availability": { - "stack": { + "serverless": { "stability": "experimental", "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" } }, "description": "Updates the index name of the connector.", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-index-name-api.html", + "docId": "connector-update-index-name", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-index-name-api.html", "name": "connector.update_index_name", - "request": null, + "request": { + "name": "Request", + "namespace": "connector.update_index_name" + }, "requestBodyRequired": true, "requestMediaType": [ "application/json" ], - "response": null, + "response": { + "name": "Response", + "namespace": "connector.update_index_name" + }, "responseMediaType": [ "application/json" ], + "since": "8.12.0", "stability": "experimental", "urls": [ { @@ -3585,23 +3609,35 @@ }, { "availability": { - "stack": { + "serverless": { "stability": "experimental", "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" } }, "description": "Updates the is_native flag of the connector.", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/connector-apis.html", + "docId": "connector-update-native", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-native-api.html", "name": "connector.update_native", - "request": null, + "request": { + "name": "Request", + "namespace": "connector.update_native" + }, "requestBodyRequired": true, "requestMediaType": [ "application/json" ], - "response": null, + "response": { + "name": "Response", + "namespace": "connector.update_native" + }, "responseMediaType": [ "application/json" ], + "since": "8.12.0", "stability": "experimental", "urls": [ { @@ -3667,7 +3703,7 @@ } }, "description": "Updates the scheduling field in the connector document.", - "docId": "connector-scheduling", + "docId": "connector-update-scheduling", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-scheduling-api.html", "name": "connector.update_scheduling", "request": { @@ -3699,23 +3735,35 @@ }, { "availability": { - "stack": { + "serverless": { "stability": "experimental", "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" } }, "description": "Updates the service type of the connector.", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-service-type-api.html", + "docId": "connector-update-service-type", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-service-type-api.html", "name": "connector.update_service_type", - "request": null, + "request": { + "name": "Request", + "namespace": "connector.update_service_type" + }, "requestBodyRequired": true, "requestMediaType": [ "application/json" ], - "response": null, + "response": { + "name": "Response", + "namespace": "connector.update_service_type" + }, "responseMediaType": [ "application/json" ], + "since": "8.12.0", "stability": "experimental", "urls": [ { @@ -3729,23 +3777,35 @@ }, { "availability": { - "stack": { + "serverless": { "stability": "experimental", "visibility": "public" + }, + "stack": { + "since": "8.12.0", + "stability": "experimental" } }, "description": "Updates the status of the connector.", - "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/update-connector-status-api.html", + "docId": "connector-update-status", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-status-api.html", "name": "connector.update_status", - "request": null, + "request": { + "name": "Request", + "namespace": "connector.update_status" + }, "requestBodyRequired": true, "requestMediaType": [ "application/json" ], - "response": null, + "response": { + "name": "Response", + "namespace": "connector.update_status" + }, "responseMediaType": [ "application/json" ], + "since": "8.12.0", "stability": "experimental", "urls": [ { @@ -41207,6 +41267,40 @@ } } }, + { + "description": "`WithNullValue` allows for explicit null assignments in contexts where `null` should be interpreted as an\nactual value.", + "generics": [ + { + "name": "T", + "namespace": "_spec_utils" + } + ], + "kind": "type_alias", + "name": { + "name": "WithNullValue", + "namespace": "_spec_utils" + }, + "specLocation": "_spec_utils/utils.ts#L29-L33", + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "T", + "namespace": "_spec_utils" + } + }, + { + "kind": "instance_of", + "type": { + "name": "NullValue", + "namespace": "_spec_utils" + } + } + ], + "kind": "union_of" + } + }, { "kind": "interface", "name": { @@ -105523,8 +105617,8 @@ ], "kind": "instance_of", "type": { - "name": "Nullable", - "namespace": "connector._types" + "name": "WithNullValue", + "namespace": "_spec_utils" } } }, @@ -105579,8 +105673,8 @@ ], "kind": "instance_of", "type": { - "name": "Nullable", - "namespace": "connector._types" + "name": "WithNullValue", + "namespace": "_spec_utils" } } }, @@ -105621,8 +105715,8 @@ ], "kind": "instance_of", "type": { - "name": "Nullable", - "namespace": "connector._types" + "name": "WithNullValue", + "namespace": "_spec_utils" } } }, @@ -105630,19 +105724,10 @@ "name": "last_access_control_sync_scheduled_at", "required": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - ], "kind": "instance_of", "type": { - "name": "Nullable", - "namespace": "connector._types" + "name": "string", + "namespace": "_builtins" } } }, @@ -105650,18 +105735,9 @@ "name": "last_access_control_sync_status", "required": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "SyncStatus", - "namespace": "connector._types" - } - } - ], "kind": "instance_of", "type": { - "name": "Nullable", + "name": "SyncStatus", "namespace": "connector._types" } } @@ -105681,19 +105757,10 @@ "name": "last_incremental_sync_scheduled_at", "required": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - ], "kind": "instance_of", "type": { - "name": "Nullable", - "namespace": "connector._types" + "name": "string", + "namespace": "_builtins" } } }, @@ -105723,8 +105790,8 @@ ], "kind": "instance_of", "type": { - "name": "Nullable", - "namespace": "connector._types" + "name": "WithNullValue", + "namespace": "_spec_utils" } } }, @@ -105743,8 +105810,8 @@ ], "kind": "instance_of", "type": { - "name": "Nullable", - "namespace": "connector._types" + "name": "WithNullValue", + "namespace": "_spec_utils" } } }, @@ -105752,19 +105819,10 @@ "name": "last_sync_scheduled_at", "required": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - ], "kind": "instance_of", "type": { - "name": "Nullable", - "namespace": "connector._types" + "name": "string", + "namespace": "_builtins" } } }, @@ -105772,18 +105830,9 @@ "name": "last_sync_status", "required": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "SyncStatus", - "namespace": "connector._types" - } - } - ], "kind": "instance_of", "type": { - "name": "Nullable", + "name": "SyncStatus", "namespace": "connector._types" } } @@ -105792,19 +105841,10 @@ "name": "last_synced", "required": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - ], "kind": "instance_of", "type": { - "name": "Nullable", - "namespace": "connector._types" + "name": "string", + "namespace": "_builtins" } } }, @@ -105875,7 +105915,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L240-L269" + "specLocation": "connector/_types/Connector.ts#L238-L267" }, { "kind": "interface", @@ -106868,7 +106908,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "\"greater_than\"" + "value": "greater_than" } }, { @@ -106897,7 +106937,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "\"included_in\"" + "value": "included_in" } }, { @@ -106980,7 +107020,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "\"less_than\"" + "value": "less_than" } }, { @@ -107009,7 +107049,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "\"list_type\"" + "value": "list_type" } }, { @@ -107029,39 +107069,6 @@ ], "specLocation": "connector/_types/Connector.ts#L68-L71" }, - { - "generics": [ - { - "name": "T", - "namespace": "connector._types" - } - ], - "kind": "type_alias", - "name": { - "name": "Nullable", - "namespace": "connector._types" - }, - "specLocation": "connector/_types/Connector.ts#L238-L238", - "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "T", - "namespace": "connector._types" - } - }, - { - "kind": "instance_of", - "type": { - "name": "NullValue", - "namespace": "_spec_utils" - } - } - ], - "kind": "union_of" - } - }, { "kind": "interface", "name": { @@ -107074,7 +107081,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "\"regex\"" + "value": "regex" } }, { @@ -107458,255 +107465,150 @@ "properties": [ { "name": "last_access_control_sync_error", - "required": true, + "required": false, "type": { - "items": [ + "generics": [ { "kind": "instance_of", "type": { "name": "string", "namespace": "_builtins" } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } } ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "WithNullValue", + "namespace": "_spec_utils" + } } }, { "name": "last_access_control_sync_scheduled_at", - "required": true, + "required": false, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } } }, { "name": "last_access_control_sync_status", - "required": true, + "required": false, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "SyncStatus", - "namespace": "connector._types" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "SyncStatus", + "namespace": "connector._types" + } } }, { "name": "last_deleted_document_count", - "required": true, + "required": false, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "number", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } } }, { "name": "last_incremental_sync_scheduled_at", - "required": true, + "required": false, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } } }, { "name": "last_indexed_document_count", - "required": true, + "required": false, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "number", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } } }, { "name": "last_seen", - "required": true, + "required": false, "type": { - "items": [ + "generics": [ { "kind": "instance_of", "type": { "name": "string", "namespace": "_builtins" } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } } ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "WithNullValue", + "namespace": "_spec_utils" + } } }, { "name": "last_sync_error", - "required": true, + "required": false, "type": { - "items": [ + "generics": [ { "kind": "instance_of", "type": { "name": "string", "namespace": "_builtins" } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } } ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "WithNullValue", + "namespace": "_spec_utils" + } } }, { "name": "last_sync_scheduled_at", - "required": true, + "required": false, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } } }, { "name": "last_sync_status", - "required": true, + "required": false, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "SyncStatus", - "namespace": "connector._types" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "SyncStatus", + "namespace": "connector._types" + } } }, { "name": "last_synced", - "required": true, + "required": false, "type": { - "items": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } - } - ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } } } ] @@ -107738,7 +107640,7 @@ } ], "query": [], - "specLocation": "connector/last_sync/ConnectorUpdateLastSyncRequest.ts#L23-L53" + "specLocation": "connector/last_sync/ConnectorUpdateLastSyncRequest.ts#L25-L55" }, { "body": { @@ -107872,10 +107774,19 @@ "name": "index_name", "required": true, "type": { + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + ], "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "WithNullValue", + "namespace": "_spec_utils" } } }, @@ -107939,7 +107850,7 @@ }, "path": [], "query": [], - "specLocation": "connector/post/ConnectorPostRequest.ts#L21-L41" + "specLocation": "connector/post/ConnectorPostRequest.ts#L22-L42" }, { "body": { @@ -107987,10 +107898,19 @@ "name": "index_name", "required": true, "type": { + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + ], "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "WithNullValue", + "namespace": "_spec_utils" } } }, @@ -108067,7 +107987,7 @@ } ], "query": [], - "specLocation": "connector/put/ConnectorPutRequest.ts#L22-L48" + "specLocation": "connector/put/ConnectorPutRequest.ts#L23-L49" }, { "body": { @@ -108101,8 +108021,110 @@ "kind": "properties", "properties": [ { - "name": "configuration", + "name": "api_key_id", + "required": false, + "type": { + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + ], + "kind": "instance_of", + "type": { + "name": "WithNullValue", + "namespace": "_spec_utils" + } + } + }, + { + "name": "api_key_secret_id", + "required": false, + "type": { + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + ], + "kind": "instance_of", + "type": { + "name": "WithNullValue", + "namespace": "_spec_utils" + } + } + } + ] + }, + "description": "Updates the API key id in the connector document", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.update_api_key_id" + }, + "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_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts#L23-L44" + }, + { + "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_api_key_id" + }, + "specLocation": "connector/update_api_key_id/ConnectorUpdateAPIKeyIDResponse.ts#L22-L26" + }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "name": "configuration", + "required": false, "type": { "kind": "instance_of", "type": { @@ -108110,6 +108132,24 @@ "namespace": "connector._types" } } + }, + { + "name": "values", + "required": false, + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "kind": "user_defined_value" + } + } } ] }, @@ -108140,7 +108180,7 @@ } ], "query": [], - "specLocation": "connector/update_configuration/ConnectorUpdateConfigurationRequest.ts#L23-L44" + "specLocation": "connector/update_configuration/ConnectorUpdateConfigurationRequest.ts#L25-L47" }, { "body": { @@ -108177,23 +108217,20 @@ "name": "error", "required": true, "type": { - "items": [ + "generics": [ { "kind": "instance_of", "type": { "name": "string", "namespace": "_builtins" } - }, - { - "kind": "instance_of", - "type": { - "name": "null", - "namespace": "_builtins" - } } ], - "kind": "union_of" + "kind": "instance_of", + "type": { + "name": "WithNullValue", + "namespace": "_spec_utils" + } } } ] @@ -108225,7 +108262,7 @@ } ], "query": [], - "specLocation": "connector/update_error/ConnectorUpdateErrorRequest.ts#L22-L43" + "specLocation": "connector/update_error/ConnectorUpdateErrorRequest.ts#L23-L44" }, { "body": { @@ -108327,6 +108364,88 @@ }, "specLocation": "connector/update_filtering/ConnectorUpdateFilteringResponse.ts#L22-L26" }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "name": "index_name", + "required": true, + "type": { + "generics": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + ], + "kind": "instance_of", + "type": { + "name": "WithNullValue", + "namespace": "_spec_utils" + } + } + } + ] + }, + "description": "Updates the index_name in the connector document", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.update_index_name" + }, + "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_index_name/ConnectorUpdateIndexNameRequest.ts#L23-L43" + }, + { + "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_index_name" + }, + "specLocation": "connector/update_index_name/ConnectorUpdateIndexNameResponse.ts#L22-L26" + }, { "attachedBehaviors": [ "CommonQueryParameters" @@ -108411,6 +108530,79 @@ }, "specLocation": "connector/update_name/ConnectorUpdateNameResponse.ts#L22-L26" }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "name": "is_native", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ] + }, + "description": "Updates the is_native flag in the connector document", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.update_native" + }, + "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_native/ConnectorUpdateNativeRequest.ts#L22-L42" + }, + { + "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_native" + }, + "specLocation": "connector/update_native/ConnectorUpdateNativeResponse.ts#L22-L26" + }, { "attachedBehaviors": [ "CommonQueryParameters" @@ -108557,6 +108749,152 @@ }, "specLocation": "connector/update_scheduling/ConnectorUpdateSchedulingResponse.ts#L22-L26" }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "name": "service_type", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ] + }, + "description": "Updates the service type of the connector", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.update_service_type" + }, + "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_service_type/ConnectorUpdateServiceTypeRequest.ts#L22-L42" + }, + { + "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_service_type" + }, + "specLocation": "connector/update_service_type/ConnectorUpdateServiceTypeResponse.ts#L22-L26" + }, + { + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "name": "status", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "ConnectorStatus", + "namespace": "connector._types" + } + } + } + ] + }, + "description": "Updates the status of the connector", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "kind": "request", + "name": { + "name": "Request", + "namespace": "connector.update_status" + }, + "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_status/ConnectorUpdateStatusRequest.ts#L23-L43" + }, + { + "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_status" + }, + "specLocation": "connector/update_status/ConnectorUpdateStatusResponse.ts#L22-L26" + }, { "attachedBehaviors": [ "CommonQueryParameters" diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 4bc18ec7d8..cb9d46cf29 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -491,7 +491,7 @@ "connector.get": { "request": [], "response": [ - "type_alias definition connector._types:Nullable / union_of / instance_of - No type definition for 'connector._types:T'" + "type_alias definition _spec_utils:WithNullValue / union_of / instance_of - No type definition for '_spec_utils:T'" ] }, "connector.list": { @@ -503,36 +503,6 @@ ], "response": [] }, - "connector.update_api_key_id": { - "request": [ - "Missing request & response" - ], - "response": [] - }, - "connector.update_index_name": { - "request": [ - "Missing request & response" - ], - "response": [] - }, - "connector.update_native": { - "request": [ - "Missing request & response" - ], - "response": [] - }, - "connector.update_service_type": { - "request": [ - "Missing request & response" - ], - "response": [] - }, - "connector.update_status": { - "request": [ - "Missing request & response" - ], - "response": [] - }, "create": { "request": [], "response": [ diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 5cae843fb6..dc55119711 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -2035,6 +2035,8 @@ export type SpecUtilsStringified = T | string export type SpecUtilsVoid = void +export type SpecUtilsWithNullValue = T | SpecUtilsNullValue + export interface AcknowledgedResponseBase { acknowledged: boolean } @@ -9073,24 +9075,24 @@ export interface ConnectorConnector { configuration: ConnectorConnectorConfiguration custom_scheduling: ConnectorConnectorCustomScheduling description?: string - error: ConnectorNullable + error: SpecUtilsWithNullValue features: ConnectorConnectorFeatures filtering: ConnectorFilteringConfig[] id?: Id - index_name: ConnectorNullable + index_name: SpecUtilsWithNullValue is_native: boolean language?: string - last_access_control_sync_error?: ConnectorNullable - last_access_control_sync_scheduled_at?: ConnectorNullable - last_access_control_sync_status?: ConnectorNullable + last_access_control_sync_error?: SpecUtilsWithNullValue + last_access_control_sync_scheduled_at?: string + last_access_control_sync_status?: ConnectorSyncStatus last_deleted_document_count?: long - last_incremental_sync_scheduled_at?: ConnectorNullable + last_incremental_sync_scheduled_at?: string last_indexed_document_count?: long - last_seen?: ConnectorNullable - last_sync_error?: ConnectorNullable - last_sync_scheduled_at?: ConnectorNullable - last_sync_status?: ConnectorNullable - last_synced?: ConnectorNullable + last_seen?: SpecUtilsWithNullValue + last_sync_error?: SpecUtilsWithNullValue + last_sync_scheduled_at?: string + last_sync_status?: ConnectorSyncStatus + last_synced?: string name?: string pipeline?: ConnectorIngestPipelineParams scheduling: ConnectorSchedulingConfiguration @@ -9211,12 +9213,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 } @@ -9228,19 +9230,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 type ConnectorNullable = T | SpecUtilsNullValue - export interface ConnectorRegexValidation { - type: '"regex"' + type: 'regex' constraint: string } @@ -9287,17 +9287,17 @@ export type ConnectorGetResponse = ConnectorConnector export interface ConnectorLastSyncRequest extends RequestBase { connector_id: Id body?: { - last_access_control_sync_error: string | null - last_access_control_sync_scheduled_at: string | null - last_access_control_sync_status: ConnectorSyncStatus | null - last_deleted_document_count: number | null - last_incremental_sync_scheduled_at: string | null - last_indexed_document_count: number | null - last_seen: string | null - last_sync_error: string | null - last_sync_scheduled_at: string | null - last_sync_status: ConnectorSyncStatus | null - last_synced: string | null + last_access_control_sync_error?: SpecUtilsWithNullValue + last_access_control_sync_scheduled_at?: string + last_access_control_sync_status?: ConnectorSyncStatus + last_deleted_document_count?: long + last_incremental_sync_scheduled_at?: string + last_indexed_document_count?: long + last_seen?: SpecUtilsWithNullValue + last_sync_error?: SpecUtilsWithNullValue + last_sync_scheduled_at?: string + last_sync_status?: ConnectorSyncStatus + last_synced?: string } } @@ -9318,7 +9318,7 @@ export interface ConnectorListResponse { export interface ConnectorPostRequest extends RequestBase { body?: { description?: string - index_name: string + index_name: SpecUtilsWithNullValue is_native?: boolean language?: string name?: string @@ -9334,7 +9334,7 @@ export interface ConnectorPutRequest extends RequestBase { connector_id: Id body?: { description?: string - index_name: string + index_name: SpecUtilsWithNullValue is_native?: boolean language?: string name?: string @@ -9346,10 +9346,23 @@ export interface ConnectorPutResponse { result: Result } +export interface ConnectorUpdateApiKeyIdRequest extends RequestBase { + connector_id: Id + body?: { + api_key_id?: SpecUtilsWithNullValue + api_key_secret_id?: SpecUtilsWithNullValue + } +} + +export interface ConnectorUpdateApiKeyIdResponse { + result: Result +} + export interface ConnectorUpdateConfigurationRequest extends RequestBase { connector_id: Id body?: { - configuration: ConnectorConnectorConfiguration + configuration?: ConnectorConnectorConfiguration + values?: Record } } @@ -9360,7 +9373,7 @@ export interface ConnectorUpdateConfigurationResponse { export interface ConnectorUpdateErrorRequest extends RequestBase { connector_id: Id body?: { - error: string | null + error: SpecUtilsWithNullValue } } @@ -9379,6 +9392,17 @@ export interface ConnectorUpdateFilteringResponse { result: Result } +export interface ConnectorUpdateIndexNameRequest extends RequestBase { + connector_id: Id + body?: { + index_name: SpecUtilsWithNullValue + } +} + +export interface ConnectorUpdateIndexNameResponse { + result: Result +} + export interface ConnectorUpdateNameRequest extends RequestBase { connector_id: Id body?: { @@ -9391,6 +9415,17 @@ export interface ConnectorUpdateNameResponse { result: Result } +export interface ConnectorUpdateNativeRequest extends RequestBase { + connector_id: Id + body?: { + is_native: boolean + } +} + +export interface ConnectorUpdateNativeResponse { + result: Result +} + export interface ConnectorUpdatePipelineRequest extends RequestBase { connector_id: Id body?: { @@ -9413,6 +9448,28 @@ export interface ConnectorUpdateSchedulingResponse { result: Result } +export interface ConnectorUpdateServiceTypeRequest extends RequestBase { + connector_id: Id + body?: { + service_type: string + } +} + +export interface ConnectorUpdateServiceTypeResponse { + result: Result +} + +export interface ConnectorUpdateStatusRequest extends RequestBase { + connector_id: Id + body?: { + status: ConnectorConnectorStatus + } +} + +export interface ConnectorUpdateStatusResponse { + result: Result +} + export interface DanglingIndicesDeleteDanglingIndexRequest extends RequestBase { index_uuid: Uuid accept_data_loss: boolean diff --git a/specification/_doc_ids/table.csv b/specification/_doc_ids/table.csv index e6f2b1c92a..64814d7eb3 100644 --- a/specification/_doc_ids/table.csv +++ b/specification/_doc_ids/table.csv @@ -86,11 +86,16 @@ connector-list,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/ connector-post,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/create-connector-api.html connector-put,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/create-connector-api.html connector-configuration,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-configuration-api.html +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-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 connector-update-pipeline,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-pipeline-api.html -connector-scheduling,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-scheduling-api.html +connector-update-scheduling,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-scheduling-api.html +connector-update-service-type,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-service-type-api.html +connector-update-status,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/update-connector-status-api.html convert-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/convert-processor.html cron-expressions,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/api-conventions.html#api-cron-expressions csv-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/csv-processor.html diff --git a/specification/connector/_types/Connector.ts b/specification/connector/_types/Connector.ts index f563d9ba76..7b2874d984 100644 --- a/specification/connector/_types/Connector.ts +++ b/specification/connector/_types/Connector.ts @@ -20,7 +20,7 @@ import { Id, ScalarValue } from '@_types/common' import { double, integer, long } from '@_types/Numeric' import { Dictionary } from '@spec_utils/Dictionary' import { UserDefinedValue } from '@spec_utils/UserDefinedValue' -import { NullValue } from '@spec_utils/utils' +import { WithNullValue } from '@spec_utils/utils' interface SelectOption { label: string @@ -127,7 +127,7 @@ interface CustomScheduling { export type ConnectorCustomScheduling = Dictionary -enum ConnectorStatus { +export enum ConnectorStatus { created, needs_configuration, configured, @@ -235,31 +235,29 @@ export interface SchedulingConfiguration { incremental?: ConnectorScheduling } -type Nullable = T | NullValue - export interface Connector { api_key_id?: string configuration: ConnectorConfiguration custom_scheduling: ConnectorCustomScheduling description?: string - error: Nullable + error: WithNullValue features: ConnectorFeatures filtering: FilteringConfig[] id?: Id - index_name: Nullable + index_name: WithNullValue is_native: boolean language?: string - last_access_control_sync_error?: Nullable - last_access_control_sync_scheduled_at?: Nullable - last_access_control_sync_status?: Nullable + last_access_control_sync_error?: WithNullValue + last_access_control_sync_scheduled_at?: string + last_access_control_sync_status?: SyncStatus last_deleted_document_count?: long - last_incremental_sync_scheduled_at?: Nullable + last_incremental_sync_scheduled_at?: string last_indexed_document_count?: long - last_seen?: Nullable - last_sync_error?: Nullable - last_sync_scheduled_at?: Nullable - last_sync_status?: Nullable - last_synced?: Nullable + last_seen?: WithNullValue + last_sync_error?: WithNullValue + last_sync_scheduled_at?: string + last_sync_status?: SyncStatus + last_synced?: string name?: string pipeline?: IngestPipelineParams scheduling: SchedulingConfiguration diff --git a/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts b/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts index 45970bb251..1b65b4b57d 100644 --- a/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts +++ b/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts @@ -19,6 +19,8 @@ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' import { SyncStatus } from '../_types/Connector' +import { long } from '@_types/Numeric' +import { WithNullValue } from '@spec_utils/utils' /** * Updates last sync stats in the connector document @@ -38,16 +40,16 @@ export interface Request extends RequestBase { * Connector last sync stats */ body: { - last_access_control_sync_error: string | null - last_access_control_sync_scheduled_at: string | null - last_access_control_sync_status: SyncStatus | null - last_deleted_document_count: number | null - last_incremental_sync_scheduled_at: string | null - last_indexed_document_count: number | null - last_seen: string | null - last_sync_error: string | null - last_sync_scheduled_at: string | null - last_sync_status: SyncStatus | null - last_synced: string | null + last_access_control_sync_error?: WithNullValue + last_access_control_sync_scheduled_at?: string + last_access_control_sync_status?: SyncStatus + last_deleted_document_count?: long + last_incremental_sync_scheduled_at?: string + last_indexed_document_count?: long + last_seen?: WithNullValue + last_sync_error?: WithNullValue + last_sync_scheduled_at?: string + last_sync_status?: SyncStatus + last_synced?: string } } diff --git a/specification/connector/post/ConnectorPostRequest.ts b/specification/connector/post/ConnectorPostRequest.ts index 5593df60fc..65108071e4 100644 --- a/specification/connector/post/ConnectorPostRequest.ts +++ b/specification/connector/post/ConnectorPostRequest.ts @@ -17,6 +17,7 @@ * under the License. */ import { RequestBase } from '@_types/Base' +import { WithNullValue } from '@spec_utils/utils' /** * Creates a connector. @@ -32,7 +33,7 @@ export interface Request extends RequestBase { /** @codegen_name connector */ body: { description?: string - index_name: string + index_name: WithNullValue is_native?: boolean language?: string name?: string diff --git a/specification/connector/put/ConnectorPutRequest.ts b/specification/connector/put/ConnectorPutRequest.ts index acc0eb851b..479dbfd671 100644 --- a/specification/connector/put/ConnectorPutRequest.ts +++ b/specification/connector/put/ConnectorPutRequest.ts @@ -18,6 +18,7 @@ */ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' +import { WithNullValue } from '@spec_utils/utils' /** * Creates or updates a connector. @@ -39,7 +40,7 @@ export interface Request extends RequestBase { /** @codegen_name connector */ body: { description?: string - index_name: string + index_name: WithNullValue is_native?: boolean language?: string name?: string diff --git a/specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts b/specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts new file mode 100644 index 0000000000..034988f844 --- /dev/null +++ b/specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts @@ -0,0 +1,44 @@ +/* + * 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 { WithNullValue } from '@spec_utils/utils' + +/** + * Updates the API key id in the connector document + * @rest_spec_name connector.update_api_key_id + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + * @doc_id connector-update-api-key-id + */ +export interface Request extends RequestBase { + path_parts: { + /** + * The unique identifier of the connector to be updated + */ + connector_id: Id + } + /** + * The connector api key request body + */ + body: { + api_key_id?: WithNullValue + api_key_secret_id?: WithNullValue + } +} diff --git a/specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDResponse.ts b/specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDResponse.ts new file mode 100644 index 0000000000..fc194d6f20 --- /dev/null +++ b/specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDResponse.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_configuration/ConnectorUpdateConfigurationRequest.ts b/specification/connector/update_configuration/ConnectorUpdateConfigurationRequest.ts index 04e70fde18..d8ea69987a 100644 --- a/specification/connector/update_configuration/ConnectorUpdateConfigurationRequest.ts +++ b/specification/connector/update_configuration/ConnectorUpdateConfigurationRequest.ts @@ -19,6 +19,8 @@ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' import { ConnectorConfiguration } from '../_types/Connector' +import { Dictionary } from '@spec_utils/Dictionary' +import { UserDefinedValue } from '@spec_utils/UserDefinedValue' /** * Updates the configuration field in the connector document @@ -39,6 +41,7 @@ export interface Request extends RequestBase { */ /** @codegen_name configuration */ body: { - configuration: ConnectorConfiguration + configuration?: ConnectorConfiguration + values?: Dictionary } } diff --git a/specification/connector/update_error/ConnectorUpdateErrorRequest.ts b/specification/connector/update_error/ConnectorUpdateErrorRequest.ts index 3069351519..623a59cac9 100644 --- a/specification/connector/update_error/ConnectorUpdateErrorRequest.ts +++ b/specification/connector/update_error/ConnectorUpdateErrorRequest.ts @@ -18,6 +18,7 @@ */ import { RequestBase } from '@_types/Base' import { Id } from '@_types/common' +import { WithNullValue } from '@spec_utils/utils' /** * Updates the filtering field in the connector document @@ -38,6 +39,6 @@ export interface Request extends RequestBase { */ /** @codegen_name error */ body: { - error: string | null + error: WithNullValue } } diff --git a/specification/connector/update_index_name/ConnectorUpdateIndexNameRequest.ts b/specification/connector/update_index_name/ConnectorUpdateIndexNameRequest.ts new file mode 100644 index 0000000000..326a4b739d --- /dev/null +++ b/specification/connector/update_index_name/ConnectorUpdateIndexNameRequest.ts @@ -0,0 +1,43 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { RequestBase } from '@_types/Base' +import { Id } from '@_types/common' +import { WithNullValue } from '@spec_utils/utils' + +/** + * Updates the index_name in the connector document + * @rest_spec_name connector.update_index_name + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + * @doc_id connector-update-index-name + */ +export interface Request extends RequestBase { + path_parts: { + /** + * The unique identifier of the connector to be updated + */ + connector_id: Id + } + /** + * The connector index name + */ + body: { + index_name: WithNullValue + } +} diff --git a/specification/connector/update_index_name/ConnectorUpdateIndexNameResponse.ts b/specification/connector/update_index_name/ConnectorUpdateIndexNameResponse.ts new file mode 100644 index 0000000000..fc194d6f20 --- /dev/null +++ b/specification/connector/update_index_name/ConnectorUpdateIndexNameResponse.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_native/ConnectorUpdateNativeRequest.ts b/specification/connector/update_native/ConnectorUpdateNativeRequest.ts new file mode 100644 index 0000000000..803a91ef59 --- /dev/null +++ b/specification/connector/update_native/ConnectorUpdateNativeRequest.ts @@ -0,0 +1,42 @@ +/* + * 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' + +/** + * Updates the is_native flag in the connector document + * @rest_spec_name connector.update_native + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + * @doc_id connector-update-native + */ +export interface Request extends RequestBase { + path_parts: { + /** + * The unique identifier of the connector to be updated + */ + connector_id: Id + } + /** + * The connector is_native flag + */ + body: { + is_native: boolean + } +} diff --git a/specification/connector/update_native/ConnectorUpdateNativeResponse.ts b/specification/connector/update_native/ConnectorUpdateNativeResponse.ts new file mode 100644 index 0000000000..fc194d6f20 --- /dev/null +++ b/specification/connector/update_native/ConnectorUpdateNativeResponse.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_scheduling/ConnectorUpdateSchedulingRequest.ts b/specification/connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts index aef5bc8d66..75f184b21a 100644 --- a/specification/connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts +++ b/specification/connector/update_scheduling/ConnectorUpdateSchedulingRequest.ts @@ -25,7 +25,7 @@ import { SchedulingConfiguration } from '../_types/Connector' * @rest_spec_name connector.update_scheduling * @availability stack since=8.12.0 stability=experimental * @availability serverless stability=experimental visibility=public - * @doc_id connector-scheduling + * @doc_id connector-update-scheduling */ export interface Request extends RequestBase { path_parts: { diff --git a/specification/connector/update_service_type/ConnectorUpdateServiceTypeRequest.ts b/specification/connector/update_service_type/ConnectorUpdateServiceTypeRequest.ts new file mode 100644 index 0000000000..d89e2c3643 --- /dev/null +++ b/specification/connector/update_service_type/ConnectorUpdateServiceTypeRequest.ts @@ -0,0 +1,42 @@ +/* + * 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' + +/** + * Updates the service type of the connector + * @rest_spec_name connector.update_service_type + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + * @doc_id connector-update-service-type + */ +export interface Request extends RequestBase { + path_parts: { + /** + * The unique identifier of the connector to be updated + */ + connector_id: Id + } + /** + * The connector service type + */ + body: { + service_type: string + } +} diff --git a/specification/connector/update_service_type/ConnectorUpdateServiceTypeResponse.ts b/specification/connector/update_service_type/ConnectorUpdateServiceTypeResponse.ts new file mode 100644 index 0000000000..fc194d6f20 --- /dev/null +++ b/specification/connector/update_service_type/ConnectorUpdateServiceTypeResponse.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_status/ConnectorUpdateStatusRequest.ts b/specification/connector/update_status/ConnectorUpdateStatusRequest.ts new file mode 100644 index 0000000000..e1242c0e47 --- /dev/null +++ b/specification/connector/update_status/ConnectorUpdateStatusRequest.ts @@ -0,0 +1,43 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +import { RequestBase } from '@_types/Base' +import { Id } from '@_types/common' +import { ConnectorStatus } from '../_types/Connector' + +/** + * Updates the status of the connector + * @rest_spec_name connector.update_status + * @availability stack since=8.12.0 stability=experimental + * @availability serverless stability=experimental visibility=public + * @doc_id connector-update-status + */ +export interface Request extends RequestBase { + path_parts: { + /** + * The unique identifier of the connector to be updated + */ + connector_id: Id + } + /** + * The connector service type + */ + body: { + status: ConnectorStatus + } +} diff --git a/specification/connector/update_status/ConnectorUpdateStatusResponse.ts b/specification/connector/update_status/ConnectorUpdateStatusResponse.ts new file mode 100644 index 0000000000..fc194d6f20 --- /dev/null +++ b/specification/connector/update_status/ConnectorUpdateStatusResponse.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 + } +} From 4cade966ce6e3e8e7f26da051ee820cc703cb9cc Mon Sep 17 00:00:00 2001 From: Jedr Blaszyk Date: Tue, 9 Apr 2024 18:11:57 +0200 Subject: [PATCH 13/16] Update connector list params --- .../elasticsearch-serverless-openapi.json | 30 +++++++++++++++ output/schema/schema.json | 38 ++++++++++++++++++- output/schema/validation-errors.json | 3 -- output/typescript/types.ts | 3 ++ .../connector/list/ConnectorListRequest.ts | 13 +++++++ 5 files changed, 83 insertions(+), 4 deletions(-) diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index d0aa6fe21f..1f0be7470a 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -2129,6 +2129,36 @@ "type": "number" }, "style": "form" + }, + { + "in": "query", + "name": "index_name", + "description": "A comma-separated list of connector index names to fetch connector documents for", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "connector_name", + "description": "A comma-separated list of connector names to fetch connector documents for", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Fields" + }, + "style": "form" + }, + { + "in": "query", + "name": "service_type", + "description": "A comma-separated list of connector service types to fetch connector documents for", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Fields" + }, + "style": "form" } ], "responses": { diff --git a/output/schema/schema.json b/output/schema/schema.json index fd83a39564..9223514154 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -107710,9 +107710,45 @@ "namespace": "_types" } } + }, + { + "description": "A comma-separated list of connector index names to fetch connector documents for", + "name": "index_name", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Fields", + "namespace": "_types" + } + } + }, + { + "description": "A comma-separated list of connector names to fetch connector documents for", + "name": "connector_name", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Fields", + "namespace": "_types" + } + } + }, + { + "description": "A comma-separated list of connector service types to fetch connector documents for", + "name": "service_type", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Fields", + "namespace": "_types" + } + } } ], - "specLocation": "connector/list/ConnectorListRequest.ts#L22-L40" + "specLocation": "connector/list/ConnectorListRequest.ts#L23-L53" }, { "body": { diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index cb9d46cf29..21f1bed1a4 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -496,9 +496,6 @@ }, "connector.list": { "request": [ - "Request: missing json spec query parameter 'index_name'", - "Request: missing json spec query parameter 'connector_name'", - "Request: missing json spec query parameter 'service_type'", "Request: missing json spec query parameter 'query'" ], "response": [] diff --git a/output/typescript/types.ts b/output/typescript/types.ts index dc55119711..b05abbdc91 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -9308,6 +9308,9 @@ export interface ConnectorLastSyncResponse { export interface ConnectorListRequest extends RequestBase { from?: integer size?: integer + index_name?: Fields + connector_name?: Fields + service_type?: Fields } export interface ConnectorListResponse { diff --git a/specification/connector/list/ConnectorListRequest.ts b/specification/connector/list/ConnectorListRequest.ts index 5cabbe853b..26f79f74ea 100644 --- a/specification/connector/list/ConnectorListRequest.ts +++ b/specification/connector/list/ConnectorListRequest.ts @@ -17,6 +17,7 @@ * under the License. */ import { RequestBase } from '@_types/Base' +import { Fields } from '@_types/common' import { integer } from '@_types/Numeric' /** @@ -36,5 +37,17 @@ export interface Request extends RequestBase { * Specifies a max number of results to get */ size?: integer + /** + * A comma-separated list of connector index names to fetch connector documents for + */ + index_name?: Fields + /** + * A comma-separated list of connector names to fetch connector documents for + */ + connector_name?: Fields + /** + * A comma-separated list of connector service types to fetch connector documents for + */ + service_type?: Fields } } From 30271e3eeced4fa86bde264cdaed661e748b4ea9 Mon Sep 17 00:00:00 2001 From: Jedr Blaszyk Date: Wed, 10 Apr 2024 10:05:58 +0200 Subject: [PATCH 14/16] Add missing param for list request --- .../openapi/elasticsearch-serverless-openapi.json | 10 ++++++++++ output/schema/schema.json | 14 +++++++++++++- output/schema/validation-errors.json | 6 ------ output/typescript/types.ts | 1 + .../connector/list/ConnectorListRequest.ts | 4 ++++ 5 files changed, 28 insertions(+), 7 deletions(-) diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 1f0be7470a..e2af6f2db6 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -2159,6 +2159,16 @@ "$ref": "#/components/schemas/_types:Fields" }, "style": "form" + }, + { + "in": "query", + "name": "query", + "description": "A wildcard query string that filters connectors with matching name, description or index name", + "deprecated": false, + "schema": { + "type": "string" + }, + "style": "form" } ], "responses": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 9223514154..23c343fbd4 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -107746,9 +107746,21 @@ "namespace": "_types" } } + }, + { + "description": "A wildcard query string that filters connectors with matching name, description or index name", + "name": "query", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } } ], - "specLocation": "connector/list/ConnectorListRequest.ts#L23-L53" + "specLocation": "connector/list/ConnectorListRequest.ts#L23-L57" }, { "body": { diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 21f1bed1a4..fec223629e 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -494,12 +494,6 @@ "type_alias definition _spec_utils:WithNullValue / union_of / instance_of - No type definition for '_spec_utils:T'" ] }, - "connector.list": { - "request": [ - "Request: missing json spec query parameter 'query'" - ], - "response": [] - }, "create": { "request": [], "response": [ diff --git a/output/typescript/types.ts b/output/typescript/types.ts index b05abbdc91..43824b7070 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -9311,6 +9311,7 @@ export interface ConnectorListRequest extends RequestBase { index_name?: Fields connector_name?: Fields service_type?: Fields + query?: string } export interface ConnectorListResponse { diff --git a/specification/connector/list/ConnectorListRequest.ts b/specification/connector/list/ConnectorListRequest.ts index 26f79f74ea..2fbf28176f 100644 --- a/specification/connector/list/ConnectorListRequest.ts +++ b/specification/connector/list/ConnectorListRequest.ts @@ -49,5 +49,9 @@ export interface Request extends RequestBase { * A comma-separated list of connector service types to fetch connector documents for */ service_type?: Fields + /** + * A wildcard query string that filters connectors with matching name, description or index name + */ + query?: string } } From 04b8b13fa7485d5e57b015140f7e10b909edd952 Mon Sep 17 00:00:00 2001 From: Jedr Blaszyk Date: Wed, 10 Apr 2024 11:47:21 +0200 Subject: [PATCH 15/16] Fix typo in spec_utils --- specification/_spec_utils/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/_spec_utils/utils.ts b/specification/_spec_utils/utils.ts index 3aca9be5b7..d408d9d774 100644 --- a/specification/_spec_utils/utils.ts +++ b/specification/_spec_utils/utils.ts @@ -38,4 +38,4 @@ export type WithNullValue = T | NullValue * @es_quirk Because of how they are implemented internally, settings are always returned as strings, even * if their value has been set using a primitive type. */ -export type Setting = Stringified | NullValue +export type Setting = WithNullValue> From f7deb4a466a5591556d1db52a77ccba47c4d8f4b Mon Sep 17 00:00:00 2001 From: Jedr Blaszyk Date: Thu, 11 Apr 2024 09:57:58 +0200 Subject: [PATCH 16/16] Address review feedback --- .../elasticsearch-serverless-openapi.json | 60 ++++--- output/schema/schema.json | 151 ++++++------------ output/schema/validation-errors.json | 8 +- output/typescript/types.ts | 26 +-- specification/connector/_types/Connector.ts | 11 +- .../connector/list/ConnectorListRequest.ts | 8 +- 6 files changed, 108 insertions(+), 156 deletions(-) diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index e2af6f2db6..587cf1b143 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -2136,7 +2136,7 @@ "description": "A comma-separated list of connector index names to fetch connector documents for", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types:Fields" + "$ref": "#/components/schemas/_types:Indices" }, "style": "form" }, @@ -2146,7 +2146,7 @@ "description": "A comma-separated list of connector names to fetch connector documents for", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types:Fields" + "$ref": "#/components/schemas/_types:Names" }, "style": "form" }, @@ -2156,7 +2156,7 @@ "description": "A comma-separated list of connector service types to fetch connector documents for", "deprecated": false, "schema": { - "$ref": "#/components/schemas/_types:Fields" + "$ref": "#/components/schemas/_types:Names" }, "style": "form" }, @@ -49188,7 +49188,7 @@ "type": "string" }, "error": { - "$ref": "#/components/schemas/_spec_utils:WithNullValuestring" + "type": "string" }, "features": { "$ref": "#/components/schemas/connector._types:ConnectorFeatures" @@ -49203,7 +49203,7 @@ "$ref": "#/components/schemas/_types:Id" }, "index_name": { - "$ref": "#/components/schemas/_spec_utils:WithNullValuestring" + "type": "string" }, "is_native": { "type": "boolean" @@ -49212,7 +49212,7 @@ "type": "string" }, "last_access_control_sync_error": { - "$ref": "#/components/schemas/_spec_utils:WithNullValuestring" + "type": "string" }, "last_access_control_sync_scheduled_at": { "type": "string" @@ -49230,10 +49230,10 @@ "type": "number" }, "last_seen": { - "$ref": "#/components/schemas/_spec_utils:WithNullValuestring" + "type": "string" }, "last_sync_error": { - "$ref": "#/components/schemas/_spec_utils:WithNullValuestring" + "type": "string" }, "last_sync_scheduled_at": { "type": "string" @@ -49266,10 +49266,8 @@ "required": [ "configuration", "custom_scheduling", - "error", "features", "filtering", - "index_name", "is_native", "scheduling", "service_type", @@ -49456,7 +49454,7 @@ "type": { "type": "string", "enum": [ - "less_than" + "\"less_than\"" ] }, "constraint": { @@ -49474,7 +49472,7 @@ "type": { "type": "string", "enum": [ - "greater_than" + "\"greater_than\"" ] }, "constraint": { @@ -49492,7 +49490,7 @@ "type": { "type": "string", "enum": [ - "list_type" + "\"list_type\"" ] }, "constraint": { @@ -49513,7 +49511,7 @@ "type": { "type": "string", "enum": [ - "included_in" + "\"included_in\"" ] }, "constraint": { @@ -49531,7 +49529,7 @@ "type": { "type": "string", "enum": [ - "regex" + "\"regex\"" ] }, "constraint": { @@ -49604,22 +49602,6 @@ } } }, - "_spec_utils:WithNullValuestring": { - "description": "`WithNullValue` allows for explicit null assignments in contexts where `null` should be interpreted as an\nactual value.", - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/_spec_utils:NullValue" - } - ] - }, - "_spec_utils:NullValue": { - "nullable": true, - "description": "A `null` value that is to be interpreted as an actual value, unless other uses of `null` that are equivalent\nto a missing value. It is used for exemple in settings, where using the `NullValue` for a setting will reset\nit to its default value.", - "type": "string" - }, "connector._types:ConnectorFeatures": { "type": "object", "properties": { @@ -49905,6 +49887,22 @@ "error" ] }, + "_spec_utils:WithNullValuestring": { + "description": "`WithNullValue` allows for explicit null assignments in contexts where `null` should be interpreted as an\nactual value.", + "oneOf": [ + { + "type": "string" + }, + { + "$ref": "#/components/schemas/_spec_utils:NullValue" + } + ] + }, + "_spec_utils:NullValue": { + "nullable": true, + "description": "A `null` value that is to be interpreted as an actual value, unless other uses of `null` that are equivalent\nto a missing value. It is used for exemple in settings, where using the `NullValue` for a setting will reset\nit to its default value.", + "type": "string" + }, "_types:WriteResponseBase": { "type": "object", "properties": { diff --git a/output/schema/schema.json b/output/schema/schema.json index 23c343fbd4..358fed0fb5 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -105604,21 +105604,12 @@ }, { "name": "error", - "required": true, + "required": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - ], "kind": "instance_of", "type": { - "name": "WithNullValue", - "namespace": "_spec_utils" + "name": "string", + "namespace": "_builtins" } } }, @@ -105660,21 +105651,12 @@ }, { "name": "index_name", - "required": true, + "required": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - ], "kind": "instance_of", "type": { - "name": "WithNullValue", - "namespace": "_spec_utils" + "name": "string", + "namespace": "_builtins" } } }, @@ -105704,19 +105686,10 @@ "name": "last_access_control_sync_error", "required": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - ], "kind": "instance_of", "type": { - "name": "WithNullValue", - "namespace": "_spec_utils" + "name": "string", + "namespace": "_builtins" } } }, @@ -105779,19 +105752,10 @@ "name": "last_seen", "required": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - ], "kind": "instance_of", "type": { - "name": "WithNullValue", - "namespace": "_spec_utils" + "name": "string", + "namespace": "_builtins" } } }, @@ -105799,19 +105763,10 @@ "name": "last_sync_error", "required": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } - ], "kind": "instance_of", "type": { - "name": "WithNullValue", - "namespace": "_spec_utils" + "name": "string", + "namespace": "_builtins" } } }, @@ -105915,7 +105870,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L238-L267" + "specLocation": "connector/_types/Connector.ts#L237-L266" }, { "kind": "interface", @@ -106102,7 +106057,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L83-L99" + "specLocation": "connector/_types/Connector.ts#L82-L98" }, { "kind": "type_alias", @@ -106110,7 +106065,7 @@ "name": "ConnectorConfiguration", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L101-L104", + "specLocation": "connector/_types/Connector.ts#L100-L103", "type": { "key": { "kind": "instance_of", @@ -106136,7 +106091,7 @@ "name": "ConnectorCustomScheduling", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L128-L128", + "specLocation": "connector/_types/Connector.ts#L127-L127", "type": { "key": { "kind": "instance_of", @@ -106219,7 +106174,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L224-L230" + "specLocation": "connector/_types/Connector.ts#L223-L229" }, { "kind": "enum", @@ -106241,7 +106196,7 @@ "name": "ConnectorFieldType", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L43-L48" + "specLocation": "connector/_types/Connector.ts#L42-L47" }, { "kind": "interface", @@ -106274,7 +106229,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L106-L110" + "specLocation": "connector/_types/Connector.ts#L105-L109" }, { "kind": "enum", @@ -106299,7 +106254,7 @@ "name": "ConnectorStatus", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L130-L136" + "specLocation": "connector/_types/Connector.ts#L129-L135" }, { "kind": "interface", @@ -106364,7 +106319,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L120-L126" + "specLocation": "connector/_types/Connector.ts#L119-L125" }, { "kind": "interface", @@ -106438,7 +106393,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L112-L118" + "specLocation": "connector/_types/Connector.ts#L111-L117" }, { "kind": "interface", @@ -106470,7 +106425,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L30-L33" + "specLocation": "connector/_types/Connector.ts#L29-L32" }, { "kind": "enum", @@ -106495,7 +106450,7 @@ "name": "DisplayType", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L35-L41" + "specLocation": "connector/_types/Connector.ts#L34-L40" }, { "kind": "interface", @@ -106516,7 +106471,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L215-L217" + "specLocation": "connector/_types/Connector.ts#L214-L216" }, { "kind": "interface", @@ -106566,7 +106521,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L192-L196" + "specLocation": "connector/_types/Connector.ts#L191-L195" }, { "kind": "interface", @@ -106609,7 +106564,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L209-L213" + "specLocation": "connector/_types/Connector.ts#L208-L212" }, { "kind": "enum", @@ -106625,7 +106580,7 @@ "name": "FilteringPolicy", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L155-L158" + "specLocation": "connector/_types/Connector.ts#L154-L157" }, { "kind": "interface", @@ -106723,7 +106678,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L170-L179" + "specLocation": "connector/_types/Connector.ts#L169-L178" }, { "kind": "enum", @@ -106756,7 +106711,7 @@ "name": "FilteringRuleRule", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L160-L168" + "specLocation": "connector/_types/Connector.ts#L159-L167" }, { "kind": "interface", @@ -106802,7 +106757,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L203-L207" + "specLocation": "connector/_types/Connector.ts#L202-L206" }, { "kind": "interface", @@ -106837,7 +106792,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L198-L201" + "specLocation": "connector/_types/Connector.ts#L197-L200" }, { "kind": "interface", @@ -106875,7 +106830,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L181-L184" + "specLocation": "connector/_types/Connector.ts#L180-L183" }, { "kind": "enum", @@ -106894,7 +106849,7 @@ "name": "FilteringValidationState", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L186-L190" + "specLocation": "connector/_types/Connector.ts#L185-L189" }, { "kind": "interface", @@ -106908,7 +106863,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "greater_than" + "value": "\"greater_than\"" } }, { @@ -106923,7 +106878,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L63-L66" + "specLocation": "connector/_types/Connector.ts#L62-L65" }, { "kind": "interface", @@ -106937,7 +106892,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "included_in" + "value": "\"included_in\"" } }, { @@ -106952,7 +106907,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L73-L76" + "specLocation": "connector/_types/Connector.ts#L72-L75" }, { "kind": "interface", @@ -107006,7 +106961,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L148-L153" + "specLocation": "connector/_types/Connector.ts#L147-L152" }, { "kind": "interface", @@ -107020,7 +106975,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "less_than" + "value": "\"less_than\"" } }, { @@ -107035,7 +106990,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L58-L61" + "specLocation": "connector/_types/Connector.ts#L57-L60" }, { "kind": "interface", @@ -107049,7 +107004,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "list_type" + "value": "\"list_type\"" } }, { @@ -107067,7 +107022,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L68-L71" + "specLocation": "connector/_types/Connector.ts#L67-L70" }, { "kind": "interface", @@ -107081,7 +107036,7 @@ "required": true, "type": { "kind": "literal_value", - "value": "regex" + "value": "\"regex\"" } }, { @@ -107096,7 +107051,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L78-L81" + "specLocation": "connector/_types/Connector.ts#L77-L80" }, { "kind": "interface", @@ -107139,7 +107094,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L232-L236" + "specLocation": "connector/_types/Connector.ts#L231-L235" }, { "kind": "interface", @@ -107171,7 +107126,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L25-L28" + "specLocation": "connector/_types/Connector.ts#L24-L27" }, { "kind": "interface", @@ -107203,7 +107158,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L219-L222" + "specLocation": "connector/_types/Connector.ts#L218-L221" }, { "kind": "enum", @@ -107234,7 +107189,7 @@ "name": "SyncStatus", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L138-L146" + "specLocation": "connector/_types/Connector.ts#L137-L145" }, { "kind": "type_alias", @@ -107242,7 +107197,7 @@ "name": "Validation", "namespace": "connector._types" }, - "specLocation": "connector/_types/Connector.ts#L50-L56", + "specLocation": "connector/_types/Connector.ts#L49-L55", "type": { "items": [ { @@ -107718,7 +107673,7 @@ "type": { "kind": "instance_of", "type": { - "name": "Fields", + "name": "Indices", "namespace": "_types" } } @@ -107730,7 +107685,7 @@ "type": { "kind": "instance_of", "type": { - "name": "Fields", + "name": "Names", "namespace": "_types" } } @@ -107742,7 +107697,7 @@ "type": { "kind": "instance_of", "type": { - "name": "Fields", + "name": "Names", "namespace": "_types" } } diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index fec223629e..70bc460de8 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -488,11 +488,11 @@ "response definition connector.delete:Response / body / instance_of - Non-leaf type cannot be used here: '_types:AcknowledgedResponseBase'" ] }, - "connector.get": { - "request": [], - "response": [ + "connector.last_sync": { + "request": [ "type_alias definition _spec_utils:WithNullValue / union_of / instance_of - No type definition for '_spec_utils:T'" - ] + ], + "response": [] }, "create": { "request": [], diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 43824b7070..1043f52649 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -9075,21 +9075,21 @@ export interface ConnectorConnector { configuration: ConnectorConnectorConfiguration custom_scheduling: ConnectorConnectorCustomScheduling description?: string - error: SpecUtilsWithNullValue + error?: string features: ConnectorConnectorFeatures filtering: ConnectorFilteringConfig[] id?: Id - index_name: SpecUtilsWithNullValue + index_name?: string is_native: boolean language?: string - last_access_control_sync_error?: SpecUtilsWithNullValue + last_access_control_sync_error?: string last_access_control_sync_scheduled_at?: string last_access_control_sync_status?: ConnectorSyncStatus last_deleted_document_count?: long last_incremental_sync_scheduled_at?: string last_indexed_document_count?: long - last_seen?: SpecUtilsWithNullValue - last_sync_error?: SpecUtilsWithNullValue + last_seen?: string + last_sync_error?: string last_sync_scheduled_at?: string last_sync_status?: ConnectorSyncStatus last_synced?: string @@ -9213,12 +9213,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 } @@ -9230,17 +9230,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 } @@ -9308,9 +9308,9 @@ export interface ConnectorLastSyncResponse { export interface ConnectorListRequest extends RequestBase { from?: integer size?: integer - index_name?: Fields - connector_name?: Fields - service_type?: Fields + index_name?: Indices + connector_name?: Names + service_type?: Names query?: string } diff --git a/specification/connector/_types/Connector.ts b/specification/connector/_types/Connector.ts index 7b2874d984..a594663ff0 100644 --- a/specification/connector/_types/Connector.ts +++ b/specification/connector/_types/Connector.ts @@ -20,7 +20,6 @@ import { Id, ScalarValue } from '@_types/common' import { double, integer, long } from '@_types/Numeric' import { Dictionary } from '@spec_utils/Dictionary' import { UserDefinedValue } from '@spec_utils/UserDefinedValue' -import { WithNullValue } from '@spec_utils/utils' interface SelectOption { label: string @@ -240,21 +239,21 @@ export interface Connector { configuration: ConnectorConfiguration custom_scheduling: ConnectorCustomScheduling description?: string - error: WithNullValue + error?: string features: ConnectorFeatures filtering: FilteringConfig[] id?: Id - index_name: WithNullValue + index_name?: string is_native: boolean language?: string - last_access_control_sync_error?: WithNullValue + last_access_control_sync_error?: string last_access_control_sync_scheduled_at?: string last_access_control_sync_status?: SyncStatus last_deleted_document_count?: long last_incremental_sync_scheduled_at?: string last_indexed_document_count?: long - last_seen?: WithNullValue - last_sync_error?: WithNullValue + last_seen?: string + last_sync_error?: string last_sync_scheduled_at?: string last_sync_status?: SyncStatus last_synced?: string diff --git a/specification/connector/list/ConnectorListRequest.ts b/specification/connector/list/ConnectorListRequest.ts index 2fbf28176f..ab93a22cc5 100644 --- a/specification/connector/list/ConnectorListRequest.ts +++ b/specification/connector/list/ConnectorListRequest.ts @@ -17,7 +17,7 @@ * under the License. */ import { RequestBase } from '@_types/Base' -import { Fields } from '@_types/common' +import { Names, Indices } from '@_types/common' import { integer } from '@_types/Numeric' /** @@ -40,15 +40,15 @@ export interface Request extends RequestBase { /** * A comma-separated list of connector index names to fetch connector documents for */ - index_name?: Fields + index_name?: Indices /** * A comma-separated list of connector names to fetch connector documents for */ - connector_name?: Fields + connector_name?: Names /** * A comma-separated list of connector service types to fetch connector documents for */ - service_type?: Fields + service_type?: Names /** * A wildcard query string that filters connectors with matching name, description or index name */