From 77c484d7b7a96f4b84433d5344f886fcd00d9f10 Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Thu, 18 Jul 2024 09:05:55 -0700 Subject: [PATCH 1/5] Add OpenAPI overlays (#2728) --- .spectral.yaml | 6 +++--- Makefile | 3 +++ ...elasticsearch-serverless-openapi-overlays.yaml | 15 +++++++++++++++ 3 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 docs/overlays/elasticsearch-serverless-openapi-overlays.yaml diff --git a/.spectral.yaml b/.spectral.yaml index 6763814cd1..109addd298 100644 --- a/.spectral.yaml +++ b/.spectral.yaml @@ -14,9 +14,9 @@ rules: oas3-valid-schema-example: false oas2-valid-media-example: false # Operations - operation-operationId: false - operation-operationId-unique: false - operation-operationId-valid-in-url: false + operation-operationId: warn + operation-operationId-unique: warn + operation-operationId-valid-in-url: warn operation-tag-defined: warn operation-tags: warn # Responses diff --git a/Makefile b/Makefile index aa566d3c07..6f42c3b17c 100644 --- a/Makefile +++ b/Makefile @@ -59,6 +59,9 @@ dump-routes: ## Create a new schema with all generics expanded contrib: | generate license-check spec-format-fix transform-to-openapi filter-for-serverless ## Pre contribution target +overlay-docs: ## Apply overlays to OpenAPI documents + @npx bump overlay "output/openapi/elasticsearch-serverless-openapi.json" "docs/overlays/elasticsearch-serverless-openapi-overlays.yaml" > "output/openapi/elasticsearch-serverless-openapi.new.json" + lint-docs: ## Lint the OpenAPI documents @npx @stoplight/spectral-cli lint output/openapi/*.json --ruleset .spectral.yaml diff --git a/docs/overlays/elasticsearch-serverless-openapi-overlays.yaml b/docs/overlays/elasticsearch-serverless-openapi-overlays.yaml new file mode 100644 index 0000000000..e79f9947d7 --- /dev/null +++ b/docs/overlays/elasticsearch-serverless-openapi-overlays.yaml @@ -0,0 +1,15 @@ +# overlays.yaml +overlay: 1.0.0 +info: + title: Overlays for the Elasticsearch Serverless OpenAPI document + version: 0.0.1 +actions: + - target: '$.info' + description: Add a document description + update: + description: > + **Technical preview** + This functionality is in technical preview and may be changed or removed in a future release. + Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. + + From a003a41f5d90dc38381c69570e9278ce1f6eeea4 Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Fri, 19 Jul 2024 06:02:56 -0400 Subject: [PATCH 2/5] ESQL: define the `tables` parameter (#2706) Adds support for the tables parameter and documents the profile option. --- output/openapi/elasticsearch-openapi.json | 94 ++++++++ .../elasticsearch-serverless-openapi.json | 94 ++++++++ output/schema/schema-serverless.json | 226 +++++++++++++++++- output/schema/schema.json | 226 +++++++++++++++++- output/typescript/types.ts | 16 ++ .../esql/_types/TableValuesContainer.ts | 33 +++ specification/esql/query/QueryRequest.ts | 13 + 7 files changed, 700 insertions(+), 2 deletions(-) create mode 100644 specification/esql/_types/TableValuesContainer.ts diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 7c0daf8946..02d0f90233 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -8191,11 +8191,22 @@ } }, "profile": { + "description": "If provided and `true` the response will include an extra `profile` object\nwith information on how the query was executed. This information is for human debugging\nand its format can change at any time but it can give some insight into the performance\nof each part of the query.", "type": "boolean" }, "query": { "description": "The ES|QL query API accepts an ES|QL query string in the query parameter, runs it, and returns the results.", "type": "string" + }, + "tables": { + "description": "Tables to use with the LOOKUP operation. The top level key is the table\nname and the next level key is the column name.", + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/esql._types:TableValuesContainer" + } + } } }, "required": [ @@ -80080,6 +80091,89 @@ "head" ] }, + "esql._types:TableValuesContainer": { + "type": "object", + "properties": { + "integer": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types:TableValuesIntegerValue" + } + }, + "keyword": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types:TableValuesKeywordValue" + } + }, + "long": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types:TableValuesLongValue" + } + }, + "double": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types:TableValuesLongDouble" + } + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "esql._types:TableValuesIntegerValue": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "array", + "items": { + "type": "number" + } + } + ] + }, + "esql._types:TableValuesKeywordValue": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "esql._types:TableValuesLongValue": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "array", + "items": { + "type": "number" + } + } + ] + }, + "esql._types:TableValuesLongDouble": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "array", + "items": { + "type": "number" + } + } + ] + }, "_types:EsqlColumns": { "type": "object" }, diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 249ef9c57e..738bd2a411 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -5471,11 +5471,22 @@ } }, "profile": { + "description": "If provided and `true` the response will include an extra `profile` object\nwith information on how the query was executed. This information is for human debugging\nand its format can change at any time but it can give some insight into the performance\nof each part of the query.", "type": "boolean" }, "query": { "description": "The ES|QL query API accepts an ES|QL query string in the query parameter, runs it, and returns the results.", "type": "string" + }, + "tables": { + "description": "Tables to use with the LOOKUP operation. The top level key is the table\nname and the next level key is the column name.", + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/esql._types:TableValuesContainer" + } + } } }, "required": [ @@ -52323,6 +52334,89 @@ "head" ] }, + "esql._types:TableValuesContainer": { + "type": "object", + "properties": { + "integer": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types:TableValuesIntegerValue" + } + }, + "keyword": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types:TableValuesKeywordValue" + } + }, + "long": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types:TableValuesLongValue" + } + }, + "double": { + "type": "array", + "items": { + "$ref": "#/components/schemas/esql._types:TableValuesLongDouble" + } + } + }, + "minProperties": 1, + "maxProperties": 1 + }, + "esql._types:TableValuesIntegerValue": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "array", + "items": { + "type": "number" + } + } + ] + }, + "esql._types:TableValuesKeywordValue": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "esql._types:TableValuesLongValue": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "array", + "items": { + "type": "number" + } + } + ] + }, + "esql._types:TableValuesLongDouble": { + "oneOf": [ + { + "type": "number" + }, + { + "type": "array", + "items": { + "type": "number" + } + } + ] + }, "_types:EsqlColumns": { "type": "object" }, diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 15d3f9ab33..1a4a04ea3d 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -17803,6 +17803,7 @@ } }, { + "description": "If provided and `true` the response will include an extra `profile` object\nwith information on how the query was executed. This information is for human debugging\nand its format can change at any time but it can give some insight into the performance\nof each part of the query.", "name": "profile", "required": false, "type": { @@ -17824,6 +17825,40 @@ "namespace": "_builtins" } } + }, + { + "description": "Tables to use with the LOOKUP operation. The top level key is the table\nname and the next level key is the column name.", + "name": "tables", + "required": false, + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "TableValuesContainer", + "namespace": "esql._types" + } + } + } + } } ] }, @@ -17879,7 +17914,7 @@ } } ], - "specLocation": "esql/query/QueryRequest.ts#L24-L76" + "specLocation": "esql/query/QueryRequest.ts#L26-L89" }, { "body": { @@ -89128,6 +89163,126 @@ }, "specLocation": "eql/search/types.ts#L20-L32" }, + { + "kind": "type_alias", + "name": { + "name": "TableValuesIntegerValue", + "namespace": "esql._types" + }, + "specLocation": "esql/_types/TableValuesContainer.ts#L30-L30", + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + } + ], + "kind": "union_of" + } + }, + { + "kind": "type_alias", + "name": { + "name": "TableValuesKeywordValue", + "namespace": "esql._types" + }, + "specLocation": "esql/_types/TableValuesContainer.ts#L31-L31", + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "kind": "union_of" + } + }, + { + "kind": "type_alias", + "name": { + "name": "TableValuesLongDouble", + "namespace": "esql._types" + }, + "specLocation": "esql/_types/TableValuesContainer.ts#L33-L33", + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" + } + } + } + ], + "kind": "union_of" + } + }, + { + "kind": "type_alias", + "name": { + "name": "TableValuesLongValue", + "namespace": "esql._types" + }, + "specLocation": "esql/_types/TableValuesContainer.ts#L32-L32", + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + } + ], + "kind": "union_of" + } + }, { "kind": "type_alias", "name": { @@ -113217,6 +113372,75 @@ ], "specLocation": "eql/_types/EqlHits.ts#L56-L64" }, + { + "kind": "interface", + "name": { + "name": "TableValuesContainer", + "namespace": "esql._types" + }, + "properties": [ + { + "name": "integer", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "TableValuesIntegerValue", + "namespace": "esql._types" + } + } + } + }, + { + "name": "keyword", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "TableValuesKeywordValue", + "namespace": "esql._types" + } + } + } + }, + { + "name": "long", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "TableValuesLongValue", + "namespace": "esql._types" + } + } + } + }, + { + "name": "double", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "TableValuesLongDouble", + "namespace": "esql._types" + } + } + } + } + ], + "specLocation": "esql/_types/TableValuesContainer.ts#L22-L28", + "variants": { + "kind": "container" + } + }, { "kind": "interface", "name": { diff --git a/output/schema/schema.json b/output/schema/schema.json index c9a00ca46d..b0d751ed8b 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -112687,6 +112687,195 @@ }, "specLocation": "eql/search/types.ts#L20-L32" }, + { + "kind": "interface", + "name": { + "name": "TableValuesContainer", + "namespace": "esql._types" + }, + "properties": [ + { + "name": "integer", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "TableValuesIntegerValue", + "namespace": "esql._types" + } + } + } + }, + { + "name": "keyword", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "TableValuesKeywordValue", + "namespace": "esql._types" + } + } + } + }, + { + "name": "long", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "TableValuesLongValue", + "namespace": "esql._types" + } + } + } + }, + { + "name": "double", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "TableValuesLongDouble", + "namespace": "esql._types" + } + } + } + } + ], + "specLocation": "esql/_types/TableValuesContainer.ts#L22-L28", + "variants": { + "kind": "container" + } + }, + { + "kind": "type_alias", + "name": { + "name": "TableValuesIntegerValue", + "namespace": "esql._types" + }, + "specLocation": "esql/_types/TableValuesContainer.ts#L30-L30", + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "integer", + "namespace": "_types" + } + } + } + ], + "kind": "union_of" + } + }, + { + "kind": "type_alias", + "name": { + "name": "TableValuesKeywordValue", + "namespace": "esql._types" + }, + "specLocation": "esql/_types/TableValuesContainer.ts#L31-L31", + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "kind": "union_of" + } + }, + { + "kind": "type_alias", + "name": { + "name": "TableValuesLongDouble", + "namespace": "esql._types" + }, + "specLocation": "esql/_types/TableValuesContainer.ts#L33-L33", + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "double", + "namespace": "_types" + } + } + } + ], + "kind": "union_of" + } + }, + { + "kind": "type_alias", + "name": { + "name": "TableValuesLongValue", + "namespace": "esql._types" + }, + "specLocation": "esql/_types/TableValuesContainer.ts#L32-L32", + "type": { + "items": [ + { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "long", + "namespace": "_types" + } + } + } + ], + "kind": "union_of" + } + }, { "attachedBehaviors": [ "CommonQueryParameters" @@ -112747,6 +112936,7 @@ } }, { + "description": "If provided and `true` the response will include an extra `profile` object\nwith information on how the query was executed. This information is for human debugging\nand its format can change at any time but it can give some insight into the performance\nof each part of the query.", "name": "profile", "required": false, "type": { @@ -112768,6 +112958,40 @@ "namespace": "_builtins" } } + }, + { + "description": "Tables to use with the LOOKUP operation. The top level key is the table\nname and the next level key is the column name.", + "name": "tables", + "required": false, + "type": { + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "key": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + "kind": "dictionary_of", + "singleKey": false, + "value": { + "kind": "instance_of", + "type": { + "name": "TableValuesContainer", + "namespace": "esql._types" + } + } + } + } } ] }, @@ -112823,7 +113047,7 @@ } } ], - "specLocation": "esql/query/QueryRequest.ts#L24-L76" + "specLocation": "esql/query/QueryRequest.ts#L26-L89" }, { "body": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index e128bc14cf..c2ecf989e5 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -9891,6 +9891,21 @@ export type EqlSearchResponse = EqlEqlSearchResponseBase> } } diff --git a/specification/esql/_types/TableValuesContainer.ts b/specification/esql/_types/TableValuesContainer.ts new file mode 100644 index 0000000000..eb5eadd002 --- /dev/null +++ b/specification/esql/_types/TableValuesContainer.ts @@ -0,0 +1,33 @@ +/* + * 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 { double, integer, long } from '@_types/Numeric' + +/** @variants container */ +export interface TableValuesContainer { + integer?: TableValuesIntegerValue[] + keyword?: TableValuesKeywordValue[] + long?: TableValuesLongValue[] + double?: TableValuesLongDouble[] +} + +type TableValuesIntegerValue = integer | integer[] +type TableValuesKeywordValue = string | string[] +type TableValuesLongValue = long | long[] +type TableValuesLongDouble = double | double[] diff --git a/specification/esql/query/QueryRequest.ts b/specification/esql/query/QueryRequest.ts index a9eae673b6..8f73012632 100644 --- a/specification/esql/query/QueryRequest.ts +++ b/specification/esql/query/QueryRequest.ts @@ -17,9 +17,11 @@ * under the License. */ +import { Dictionary } from '@spec_utils/Dictionary' import { RequestBase } from '@_types/Base' import { QueryContainer } from '@_types/query_dsl/abstractions' import { FieldValue } from '@_types/common' +import { TableValuesContainer } from '@esql/_types/TableValuesContainer' /** * Executes an ES|QL request @@ -67,10 +69,21 @@ export interface Request extends RequestBase { * @doc_id esql-query-params */ params?: Array + /** + * If provided and `true` the response will include an extra `profile` object + * with information on how the query was executed. This information is for human debugging + * and its format can change at any time but it can give some insight into the performance + * of each part of the query. + */ profile?: boolean /** * The ES|QL query API accepts an ES|QL query string in the query parameter, runs it, and returns the results. */ query: string + /** + * Tables to use with the LOOKUP operation. The top level key is the table + * name and the next level key is the column name. + */ + tables?: Dictionary> } } From 85b5c315ec6c42ef73e198c67bf2cdff5b43f424 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 16:30:50 +0200 Subject: [PATCH 3/5] Update rest-api-spec (#2733) Co-authored-by: delvedor <4865608+delvedor@users.noreply.github.com> --- output/schema/schema.json | 85 ++++++++++++++++++- output/schema/validation-errors.json | 18 ++++ .../ingest.delete_geoip_database.json | 28 ++++++ .../_json_spec/ingest.get_geoip_database.json | 32 +++++++ .../_json_spec/ingest.put_geoip_database.json | 32 +++++++ ...security.create_cross_cluster_api_key.json | 2 +- ...security.update_cross_cluster_api_key.json | 2 +- 7 files changed, 195 insertions(+), 4 deletions(-) create mode 100644 specification/_json_spec/ingest.delete_geoip_database.json create mode 100644 specification/_json_spec/ingest.get_geoip_database.json create mode 100644 specification/_json_spec/ingest.put_geoip_database.json diff --git a/output/schema/schema.json b/output/schema/schema.json index b0d751ed8b..34b239cb6c 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -8448,6 +8448,31 @@ } ] }, + { + "availability": { + "stack": { + "stability": "stable", + "visibility": "public" + } + }, + "description": "Deletes a geoip database configuration", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/TODO.html", + "name": "ingest.delete_geoip_database", + "request": null, + "requestBodyRequired": false, + "response": null, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "DELETE" + ], + "path": "/_ingest/geoip/database/{id}" + } + ] + }, { "availability": { "serverless": { @@ -8519,6 +8544,37 @@ } ] }, + { + "availability": { + "stack": { + "stability": "stable", + "visibility": "public" + } + }, + "description": "Returns geoip database configuration.", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/TODO.html", + "name": "ingest.get_geoip_database", + "request": null, + "requestBodyRequired": false, + "response": null, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "GET" + ], + "path": "/_ingest/geoip/database" + }, + { + "methods": [ + "GET" + ], + "path": "/_ingest/geoip/database/{id}" + } + ] + }, { "availability": { "serverless": { @@ -8596,6 +8652,31 @@ } ] }, + { + "availability": { + "stack": { + "stability": "stable", + "visibility": "public" + } + }, + "description": "Puts the configuration for a geoip database to be downloaded", + "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/master/TODO.html", + "name": "ingest.put_geoip_database", + "request": null, + "requestBodyRequired": true, + "response": null, + "responseMediaType": [ + "application/json" + ], + "urls": [ + { + "methods": [ + "PUT" + ], + "path": "/_ingest/geoip/database/{id}" + } + ] + }, { "availability": { "serverless": { @@ -15144,7 +15225,7 @@ { "availability": { "stack": { - "stability": "beta", + "stability": "stable", "visibility": "public" } }, @@ -16974,7 +17055,7 @@ { "availability": { "stack": { - "stability": "beta", + "stability": "stable", "visibility": "public" } }, diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 8e534b8888..a47cde3dfd 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -874,6 +874,24 @@ ], "response": [] }, + "ingest.delete_geoip_database": { + "request": [ + "Missing request & response" + ], + "response": [] + }, + "ingest.get_geoip_database": { + "request": [ + "Missing request & response" + ], + "response": [] + }, + "ingest.put_geoip_database": { + "request": [ + "Missing request & response" + ], + "response": [] + }, "license.delete": { "request": [ "Request: missing json spec query parameter 'master_timeout'", diff --git a/specification/_json_spec/ingest.delete_geoip_database.json b/specification/_json_spec/ingest.delete_geoip_database.json new file mode 100644 index 0000000000..54024bbe18 --- /dev/null +++ b/specification/_json_spec/ingest.delete_geoip_database.json @@ -0,0 +1,28 @@ +{ + "ingest.delete_geoip_database": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/TODO.html", + "description": "Deletes a geoip database configuration" + }, + "stability": "stable", + "visibility": "public", + "headers": { + "accept": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_ingest/geoip/database/{id}", + "methods": ["DELETE"], + "parts": { + "id": { + "type": "list", + "description": "A comma-separated list of geoip database configurations to delete" + } + } + } + ] + }, + "params": {} + } +} diff --git a/specification/_json_spec/ingest.get_geoip_database.json b/specification/_json_spec/ingest.get_geoip_database.json new file mode 100644 index 0000000000..58c467faf3 --- /dev/null +++ b/specification/_json_spec/ingest.get_geoip_database.json @@ -0,0 +1,32 @@ +{ + "ingest.get_geoip_database": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/TODO.html", + "description": "Returns geoip database configuration." + }, + "stability": "stable", + "visibility": "public", + "headers": { + "accept": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_ingest/geoip/database", + "methods": ["GET"] + }, + { + "path": "/_ingest/geoip/database/{id}", + "methods": ["GET"], + "parts": { + "id": { + "type": "list", + "description": "A comma-separated list of geoip database configurations to get; use `*` to get all geoip database configurations" + } + } + } + ] + }, + "params": {} + } +} diff --git a/specification/_json_spec/ingest.put_geoip_database.json b/specification/_json_spec/ingest.put_geoip_database.json new file mode 100644 index 0000000000..fcd446db80 --- /dev/null +++ b/specification/_json_spec/ingest.put_geoip_database.json @@ -0,0 +1,32 @@ +{ + "ingest.put_geoip_database": { + "documentation": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/master/TODO.html", + "description": "Puts the configuration for a geoip database to be downloaded" + }, + "stability": "stable", + "visibility": "public", + "headers": { + "accept": ["application/json"] + }, + "url": { + "paths": [ + { + "path": "/_ingest/geoip/database/{id}", + "methods": ["PUT"], + "parts": { + "id": { + "type": "string", + "description": "The id of the database configuration" + } + } + } + ] + }, + "params": {}, + "body": { + "description": "The database configuration definition", + "required": true + } + } +} diff --git a/specification/_json_spec/security.create_cross_cluster_api_key.json b/specification/_json_spec/security.create_cross_cluster_api_key.json index 1b958c1d34..0665a38446 100644 --- a/specification/_json_spec/security.create_cross_cluster_api_key.json +++ b/specification/_json_spec/security.create_cross_cluster_api_key.json @@ -4,7 +4,7 @@ "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-cross-cluster-api-key.html", "description": "Creates a cross-cluster API key for API key based remote cluster access." }, - "stability": "beta", + "stability": "stable", "visibility": "public", "headers": { "accept": ["application/json"], diff --git a/specification/_json_spec/security.update_cross_cluster_api_key.json b/specification/_json_spec/security.update_cross_cluster_api_key.json index dc7140ca0f..7f10d6d254 100644 --- a/specification/_json_spec/security.update_cross_cluster_api_key.json +++ b/specification/_json_spec/security.update_cross_cluster_api_key.json @@ -4,7 +4,7 @@ "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-update-cross-cluster-api-key.html", "description": "Updates attributes of an existing cross-cluster API key." }, - "stability": "beta", + "stability": "stable", "visibility": "public", "headers": { "accept": ["application/json"], From 8711e52d563766c06424b69b01e60f25a140ce13 Mon Sep 17 00:00:00 2001 From: Laura Trotta <153528055+l-trotta@users.noreply.github.com> Date: Wed, 24 Jul 2024 12:15:00 +0200 Subject: [PATCH 4/5] shortcuts (#2731) --- output/schema/schema-serverless.json | 46 +++++++++++----------- output/schema/schema.json | 46 +++++++++++----------- output/typescript/types.ts | 4 +- specification/_global/rank_eval/types.ts | 3 ++ specification/_types/query_dsl/compound.ts | 3 ++ 5 files changed, 56 insertions(+), 46 deletions(-) diff --git a/output/schema/schema-serverless.json b/output/schema/schema-serverless.json index 1a4a04ea3d..df45374b28 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -49151,7 +49151,8 @@ } } ], - "specLocation": "_types/query_dsl/compound.ts#L93-L119" + "shortcutProperty": "functions", + "specLocation": "_types/query_dsl/compound.ts#L93-L122" }, { "kind": "enum", @@ -49185,7 +49186,7 @@ "name": "FunctionBoostMode", "namespace": "_types.query_dsl" }, - "specLocation": "_types/query_dsl/compound.ts#L279-L305" + "specLocation": "_types/query_dsl/compound.ts#L282-L308" }, { "esQuirk": "this container is valid without a variant. Despite being documented as a function, 'weight'\nis actually a container property that can be combined with a function. Comment in the ES code\n(SearchModule#registerScoreFunctions) says: Weight doesn't have its own parser, so every function\nsupports it out of the box. Can be a single function too when not associated to any other function,\nwhich is why it needs to be registered manually here.", @@ -49292,7 +49293,7 @@ } } ], - "specLocation": "_types/query_dsl/compound.ts#L210-L250", + "specLocation": "_types/query_dsl/compound.ts#L213-L253", "variants": { "kind": "container" } @@ -49309,7 +49310,7 @@ "name": "DecayFunction", "namespace": "_types.query_dsl" }, - "specLocation": "_types/query_dsl/compound.ts#L199-L208", + "specLocation": "_types/query_dsl/compound.ts#L202-L211", "type": { "items": [ { @@ -49375,7 +49376,7 @@ "namespace": "_types.query_dsl" }, "properties": [], - "specLocation": "_types/query_dsl/compound.ts#L188-L191" + "specLocation": "_types/query_dsl/compound.ts#L191-L194" }, { "attachedBehaviors": [ @@ -49455,7 +49456,7 @@ } } ], - "specLocation": "_types/query_dsl/compound.ts#L175-L186" + "specLocation": "_types/query_dsl/compound.ts#L178-L189" }, { "description": "In some places in the specification an object consists of a static set of properties and a single additional property\nwith an arbitrary name but a statically defined type. This is typically used for configurations associated\nto a single field. Meaning that object should theoretically extend SingleKeyDictionary but expose\na set of known keys. And possibly the object might already be part of an object graph and have a parent class.\nThis puts it into a bind that needs a client specific solution.\nWe therefore document the requirement to accept a single unknown property with this interface.", @@ -49545,7 +49546,7 @@ } } ], - "specLocation": "_types/query_dsl/compound.ts#L154-L173" + "specLocation": "_types/query_dsl/compound.ts#L157-L176" }, { "kind": "enum", @@ -49571,7 +49572,7 @@ "name": "MultiValueMode", "namespace": "_types.query_dsl" }, - "specLocation": "_types/query_dsl/compound.ts#L352-L369" + "specLocation": "_types/query_dsl/compound.ts#L355-L372" }, { "attachedBehaviors": [ @@ -49605,7 +49606,7 @@ "namespace": "_types.query_dsl" }, "properties": [], - "specLocation": "_types/query_dsl/compound.ts#L193-L193" + "specLocation": "_types/query_dsl/compound.ts#L196-L196" }, { "attachedBehaviors": [ @@ -49639,7 +49640,7 @@ "namespace": "_types.query_dsl" }, "properties": [], - "specLocation": "_types/query_dsl/compound.ts#L192-L192" + "specLocation": "_types/query_dsl/compound.ts#L195-L195" }, { "attachedBehaviors": [ @@ -49673,7 +49674,7 @@ "namespace": "_types.query_dsl" }, "properties": [], - "specLocation": "_types/query_dsl/compound.ts#L194-L197" + "specLocation": "_types/query_dsl/compound.ts#L197-L200" }, { "kind": "interface", @@ -49732,7 +49733,7 @@ } } ], - "specLocation": "_types/query_dsl/compound.ts#L133-L152" + "specLocation": "_types/query_dsl/compound.ts#L136-L155" }, { "kind": "enum", @@ -49782,7 +49783,7 @@ "name": "FieldValueFactorModifier", "namespace": "_types.query_dsl" }, - "specLocation": "_types/query_dsl/compound.ts#L307-L350" + "specLocation": "_types/query_dsl/compound.ts#L310-L353" }, { "kind": "interface", @@ -49826,7 +49827,7 @@ } } ], - "specLocation": "_types/query_dsl/compound.ts#L128-L131" + "specLocation": "_types/query_dsl/compound.ts#L131-L134" }, { "kind": "interface", @@ -49848,7 +49849,7 @@ } } ], - "specLocation": "_types/query_dsl/compound.ts#L121-L126" + "specLocation": "_types/query_dsl/compound.ts#L124-L129" }, { "kind": "interface", @@ -49998,7 +49999,7 @@ "name": "FunctionScoreMode", "namespace": "_types.query_dsl" }, - "specLocation": "_types/query_dsl/compound.ts#L252-L277" + "specLocation": "_types/query_dsl/compound.ts#L255-L280" }, { "inherits": { @@ -132480,7 +132481,8 @@ } } ], - "specLocation": "_global/rank_eval/types.ts#L111-L114" + "shortcutProperty": "query", + "specLocation": "_global/rank_eval/types.ts#L111-L117" }, { "kind": "interface", @@ -132526,7 +132528,7 @@ } } ], - "specLocation": "_global/rank_eval/types.ts#L116-L123" + "specLocation": "_global/rank_eval/types.ts#L119-L126" }, { "kind": "interface", @@ -132857,7 +132859,7 @@ } } ], - "specLocation": "_global/rank_eval/types.ts#L125-L134" + "specLocation": "_global/rank_eval/types.ts#L128-L137" }, { "kind": "interface", @@ -132889,7 +132891,7 @@ } } ], - "specLocation": "_global/rank_eval/types.ts#L147-L150" + "specLocation": "_global/rank_eval/types.ts#L150-L153" }, { "kind": "interface", @@ -132933,7 +132935,7 @@ } } ], - "specLocation": "_global/rank_eval/types.ts#L136-L139" + "specLocation": "_global/rank_eval/types.ts#L139-L142" }, { "kind": "interface", @@ -132976,7 +132978,7 @@ } } ], - "specLocation": "_global/rank_eval/types.ts#L141-L145" + "specLocation": "_global/rank_eval/types.ts#L144-L148" }, { "kind": "interface", diff --git a/output/schema/schema.json b/output/schema/schema.json index 34b239cb6c..9b02613d57 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -29186,7 +29186,7 @@ } } ], - "specLocation": "_global/rank_eval/types.ts#L116-L123" + "specLocation": "_global/rank_eval/types.ts#L119-L126" }, { "kind": "interface", @@ -29229,7 +29229,7 @@ } } ], - "specLocation": "_global/rank_eval/types.ts#L141-L145" + "specLocation": "_global/rank_eval/types.ts#L144-L148" }, { "kind": "interface", @@ -29273,7 +29273,7 @@ } } ], - "specLocation": "_global/rank_eval/types.ts#L136-L139" + "specLocation": "_global/rank_eval/types.ts#L139-L142" }, { "kind": "interface", @@ -29443,7 +29443,7 @@ } } ], - "specLocation": "_global/rank_eval/types.ts#L125-L134" + "specLocation": "_global/rank_eval/types.ts#L128-L137" }, { "description": "Discounted cumulative gain (DCG)", @@ -29636,7 +29636,8 @@ } } ], - "specLocation": "_global/rank_eval/types.ts#L111-L114" + "shortcutProperty": "query", + "specLocation": "_global/rank_eval/types.ts#L111-L117" }, { "kind": "interface", @@ -29930,7 +29931,7 @@ } } ], - "specLocation": "_global/rank_eval/types.ts#L147-L150" + "specLocation": "_global/rank_eval/types.ts#L150-L153" }, { "kind": "interface", @@ -74056,7 +74057,7 @@ "namespace": "_types.query_dsl" }, "properties": [], - "specLocation": "_types/query_dsl/compound.ts#L193-L193" + "specLocation": "_types/query_dsl/compound.ts#L196-L196" }, { "inherits": { @@ -74150,7 +74151,7 @@ "name": "DecayFunction", "namespace": "_types.query_dsl" }, - "specLocation": "_types/query_dsl/compound.ts#L199-L208", + "specLocation": "_types/query_dsl/compound.ts#L202-L211", "type": { "items": [ { @@ -74270,7 +74271,7 @@ } } ], - "specLocation": "_types/query_dsl/compound.ts#L175-L186" + "specLocation": "_types/query_dsl/compound.ts#L178-L189" }, { "generics": [ @@ -74340,7 +74341,7 @@ } } ], - "specLocation": "_types/query_dsl/compound.ts#L154-L173" + "specLocation": "_types/query_dsl/compound.ts#L157-L176" }, { "inherits": { @@ -74675,7 +74676,7 @@ "name": "FieldValueFactorModifier", "namespace": "_types.query_dsl" }, - "specLocation": "_types/query_dsl/compound.ts#L307-L350" + "specLocation": "_types/query_dsl/compound.ts#L310-L353" }, { "kind": "interface", @@ -74734,7 +74735,7 @@ } } ], - "specLocation": "_types/query_dsl/compound.ts#L133-L152" + "specLocation": "_types/query_dsl/compound.ts#L136-L155" }, { "kind": "enum", @@ -74768,7 +74769,7 @@ "name": "FunctionBoostMode", "namespace": "_types.query_dsl" }, - "specLocation": "_types/query_dsl/compound.ts#L279-L305" + "specLocation": "_types/query_dsl/compound.ts#L282-L308" }, { "esQuirk": "this container is valid without a variant. Despite being documented as a function, 'weight'\nis actually a container property that can be combined with a function. Comment in the ES code\n(SearchModule#registerScoreFunctions) says: Weight doesn't have its own parser, so every function\nsupports it out of the box. Can be a single function too when not associated to any other function,\nwhich is why it needs to be registered manually here.", @@ -74875,7 +74876,7 @@ } } ], - "specLocation": "_types/query_dsl/compound.ts#L210-L250", + "specLocation": "_types/query_dsl/compound.ts#L213-L253", "variants": { "kind": "container" } @@ -74912,7 +74913,7 @@ "name": "FunctionScoreMode", "namespace": "_types.query_dsl" }, - "specLocation": "_types/query_dsl/compound.ts#L252-L277" + "specLocation": "_types/query_dsl/compound.ts#L255-L280" }, { "inherits": { @@ -75005,7 +75006,8 @@ } } ], - "specLocation": "_types/query_dsl/compound.ts#L93-L119" + "shortcutProperty": "functions", + "specLocation": "_types/query_dsl/compound.ts#L93-L122" }, { "inherits": { @@ -75243,7 +75245,7 @@ "namespace": "_types.query_dsl" }, "properties": [], - "specLocation": "_types/query_dsl/compound.ts#L194-L197" + "specLocation": "_types/query_dsl/compound.ts#L197-L200" }, { "inherits": { @@ -77710,7 +77712,7 @@ "name": "MultiValueMode", "namespace": "_types.query_dsl" }, - "specLocation": "_types/query_dsl/compound.ts#L352-L369" + "specLocation": "_types/query_dsl/compound.ts#L355-L372" }, { "inherits": { @@ -77848,7 +77850,7 @@ "namespace": "_types.query_dsl" }, "properties": [], - "specLocation": "_types/query_dsl/compound.ts#L192-L192" + "specLocation": "_types/query_dsl/compound.ts#L195-L195" }, { "kind": "enum", @@ -79686,7 +79688,7 @@ } } ], - "specLocation": "_types/query_dsl/compound.ts#L128-L131" + "specLocation": "_types/query_dsl/compound.ts#L131-L134" }, { "codegenNames": [ @@ -80276,7 +80278,7 @@ } } ], - "specLocation": "_types/query_dsl/compound.ts#L121-L126" + "specLocation": "_types/query_dsl/compound.ts#L124-L129" }, { "inherits": { @@ -81879,7 +81881,7 @@ "namespace": "_types.query_dsl" }, "properties": [], - "specLocation": "_types/query_dsl/compound.ts#L188-L191" + "specLocation": "_types/query_dsl/compound.ts#L191-L194" }, { "inherits": { diff --git a/output/typescript/types.ts b/output/typescript/types.ts index c2ecf989e5..09619655b2 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -964,7 +964,7 @@ export interface RankEvalRankEvalQuery { export interface RankEvalRankEvalRequestItem { id: Id - request?: RankEvalRankEvalQuery + request?: RankEvalRankEvalQuery | QueryDslQueryContainer ratings: RankEvalDocumentRating[] template_id?: Id params?: Record @@ -5905,7 +5905,7 @@ export interface QueryDslQueryContainer { dis_max?: QueryDslDisMaxQuery distance_feature?: QueryDslDistanceFeatureQuery exists?: QueryDslExistsQuery - function_score?: QueryDslFunctionScoreQuery + function_score?: QueryDslFunctionScoreQuery | QueryDslFunctionScoreContainer[] fuzzy?: Partial> geo_bounding_box?: QueryDslGeoBoundingBoxQuery geo_distance?: QueryDslGeoDistanceQuery diff --git a/specification/_global/rank_eval/types.ts b/specification/_global/rank_eval/types.ts index d6903eabe5..0d16c5c7b2 100644 --- a/specification/_global/rank_eval/types.ts +++ b/specification/_global/rank_eval/types.ts @@ -108,6 +108,9 @@ export class RankEvalRequestItem { params?: Dictionary } +/** + * @shortcut_property query + */ export class RankEvalQuery { query: QueryContainer size?: integer diff --git a/specification/_types/query_dsl/compound.ts b/specification/_types/query_dsl/compound.ts index 35b4ce0020..2bd27b9e81 100644 --- a/specification/_types/query_dsl/compound.ts +++ b/specification/_types/query_dsl/compound.ts @@ -90,6 +90,9 @@ export class DisMaxQuery extends QueryBase { tie_breaker?: double } +/** + * @shortcut_property functions + */ export class FunctionScoreQuery extends QueryBase { /** * Defines how he newly computed score is combined with the score of the query From 4b67d9a824878e54a250d4c9c333474a9a06a141 Mon Sep 17 00:00:00 2001 From: Jedr Blaszyk Date: Fri, 26 Jul 2024 14:04:36 +0200 Subject: [PATCH 5/5] [Connector APIs] Update existing endpoints for 8.15 (#2675) --- output/openapi/elasticsearch-openapi.json | 185 +++--- .../elasticsearch-serverless-openapi.json | 268 +++------ output/schema/schema-serverless.json | 535 ++++++------------ output/schema/schema.json | 336 ++++++----- output/schema/validation-errors.json | 18 +- output/typescript/types.ts | 49 +- specification/connector/_types/Connector.ts | 23 +- specification/connector/_types/SyncJob.ts | 1 + .../delete/ConnectorDeleteRequest.ts | 5 +- .../ConnectorUpdateLastSyncRequest.ts | 13 +- .../connector/post/ConnectorPostRequest.ts | 5 +- .../connector/post/ConnectorPostResponse.ts | 2 + .../connector/put/ConnectorPutRequest.ts | 9 +- .../connector/put/ConnectorPutResponse.ts | 2 + .../sync_job_list/SyncJobListRequest.ts | 2 +- .../ConnectorUpdateAPIKeyIDRequest.ts | 6 +- .../update_name/ConnectorUpdateNameRequest.ts | 2 +- 17 files changed, 582 insertions(+), 879 deletions(-) diff --git a/output/openapi/elasticsearch-openapi.json b/output/openapi/elasticsearch-openapi.json index 02d0f90233..22d0a0dd3f 100644 --- a/output/openapi/elasticsearch-openapi.json +++ b/output/openapi/elasticsearch-openapi.json @@ -4447,8 +4447,7 @@ { "in": "query", "name": "delete_sync_jobs", - "description": "Determines whether associated sync jobs are also deleted.", - "required": true, + "description": "A flag indicating if associated sync jobs should be also removed. Defaults to false.", "deprecated": false, "schema": { "type": "boolean" @@ -4502,14 +4501,7 @@ "type": "object", "properties": { "last_access_control_sync_error": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/_spec_utils:NullValue" - } - ] + "type": "string" }, "last_access_control_sync_scheduled_at": { "$ref": "#/components/schemas/_types:DateTime" @@ -4527,24 +4519,10 @@ "type": "number" }, "last_seen": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types:DateTime" - }, - { - "$ref": "#/components/schemas/_spec_utils:NullValue" - } - ] + "$ref": "#/components/schemas/_types:DateTime" }, "last_sync_error": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/_spec_utils:NullValue" - } - ] + "type": "string" }, "last_sync_scheduled_at": { "$ref": "#/components/schemas/_types:DateTime" @@ -4554,6 +4532,9 @@ }, "last_synced": { "$ref": "#/components/schemas/_types:DateTime" + }, + "sync_cursor": { + "type": "object" } } } @@ -4726,14 +4707,7 @@ "type": "string" }, "index_name": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types:IndexName" - }, - { - "$ref": "#/components/schemas/_spec_utils:NullValue" - } - ] + "$ref": "#/components/schemas/_types:IndexName" }, "is_native": { "type": "boolean" @@ -4747,10 +4721,7 @@ "service_type": { "type": "string" } - }, - "required": [ - "index_name" - ] + } } } } @@ -4763,11 +4734,15 @@ "schema": { "type": "object", "properties": { + "result": { + "$ref": "#/components/schemas/_types:Result" + }, "id": { "$ref": "#/components/schemas/_types:Id" } }, "required": [ + "result", "id" ] } @@ -4959,10 +4934,17 @@ "description": "A comma-separated list of job types to fetch the sync jobs for", "deprecated": false, "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/connector._types:SyncJobType" - } + "oneOf": [ + { + "$ref": "#/components/schemas/connector._types:SyncJobType" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/connector._types:SyncJobType" + } + } + ] }, "style": "form" } @@ -5131,24 +5113,10 @@ "type": "object", "properties": { "api_key_id": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/_spec_utils:NullValue" - } - ] + "type": "string" }, "api_key_secret_id": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/_spec_utils:NullValue" - } - ] + "type": "string" } } } @@ -5566,10 +5534,7 @@ "description": { "type": "string" } - }, - "required": [ - "name" - ] + } } } }, @@ -37822,10 +37787,14 @@ "properties": { "result": { "$ref": "#/components/schemas/_types:Result" + }, + "id": { + "$ref": "#/components/schemas/_types:Id" } }, "required": [ - "result" + "result", + "id" ] } } @@ -42517,7 +42486,7 @@ "connector.put#connector_id": { "in": "path", "name": "connector_id", - "description": "The unique identifier of the connector to be created or updated", + "description": "The unique identifier of the connector to be created or updated. ID is auto-generated if not provided.", "required": true, "deprecated": false, "schema": { @@ -50344,14 +50313,7 @@ "type": "string" }, "index_name": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types:IndexName" - }, - { - "$ref": "#/components/schemas/_spec_utils:NullValue" - } - ] + "$ref": "#/components/schemas/_types:IndexName" }, "is_native": { "type": "boolean" @@ -50365,10 +50327,7 @@ "service_type": { "type": "string" } - }, - "required": [ - "index_name" - ] + } } } } @@ -78689,6 +78648,9 @@ "api_key_id": { "type": "string" }, + "api_key_secret_id": { + "type": "string" + }, "configuration": { "$ref": "#/components/schemas/connector._types:ConnectorConfiguration" }, @@ -78699,7 +78661,15 @@ "type": "string" }, "error": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] }, "features": { "$ref": "#/components/schemas/connector._types:ConnectorFeatures" @@ -78714,7 +78684,15 @@ "$ref": "#/components/schemas/_types:Id" }, "index_name": { - "$ref": "#/components/schemas/_types:IndexName" + "oneOf": [ + { + "$ref": "#/components/schemas/_types:IndexName" + }, + { + "nullable": true, + "type": "string" + } + ] }, "is_native": { "type": "boolean" @@ -78770,6 +78748,9 @@ "status": { "$ref": "#/components/schemas/connector._types:ConnectorStatus" }, + "sync_cursor": { + "type": "object" + }, "sync_now": { "type": "boolean" } @@ -78780,7 +78761,6 @@ "filtering", "is_native", "scheduling", - "service_type", "status", "sync_now" ] @@ -78831,7 +78811,15 @@ "type": "boolean" }, "tooltip": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] }, "type": { "$ref": "#/components/schemas/connector._types:ConnectorFieldType" @@ -78849,7 +78837,7 @@ } }, "value": { - "$ref": "#/components/schemas/_types:ScalarValue" + "type": "object" } }, "required": [ @@ -78919,7 +78907,7 @@ "type": "string" }, "value": { - "type": "string" + "$ref": "#/components/schemas/_types:ScalarValue" } }, "required": [ @@ -79004,10 +78992,7 @@ ] }, "constraint": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types:ScalarValue" - } + "type": "string" } }, "required": [ @@ -79025,7 +79010,10 @@ ] }, "constraint": { - "type": "string" + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:ScalarValue" + } } }, "required": [ @@ -79118,15 +79106,12 @@ "document_level_security": { "$ref": "#/components/schemas/connector._types:FeatureEnabled" }, - "filtering_advanced_config": { - "type": "boolean" - }, - "filtering_rules": { - "type": "boolean" - }, "incremental_sync": { "$ref": "#/components/schemas/connector._types:FeatureEnabled" }, + "native_connector_api_keys": { + "$ref": "#/components/schemas/connector._types:FeatureEnabled" + }, "sync_rules": { "$ref": "#/components/schemas/connector._types:SyncRulesFeature" } @@ -79169,7 +79154,6 @@ }, "required": [ "active", - "domain", "draft" ] }, @@ -79393,11 +79377,6 @@ "error" ] }, - "_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:ConnectorSyncJob": { "type": "object", "properties": { @@ -79496,6 +79475,9 @@ }, "service_type": { "type": "string" + }, + "sync_cursor": { + "type": "object" } }, "required": [ @@ -79521,6 +79503,11 @@ "scheduled" ] }, + "_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/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 738bd2a411..14f42a0381 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -1957,8 +1957,7 @@ { "in": "query", "name": "delete_sync_jobs", - "description": "Determines whether associated sync jobs are also deleted.", - "required": true, + "description": "A flag indicating if associated sync jobs should be also removed. Defaults to false.", "deprecated": false, "schema": { "type": "boolean" @@ -1982,119 +1981,6 @@ "x-available-since": "8.12.0" } }, - "/_connector/{connector_id}/_last_sync": { - "put": { - "tags": [ - "connector.last_sync" - ], - "summary": "Updates last sync stats in the connector document", - "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/update-connector-last-sync-api.html" - }, - "operationId": "connector-last-sync", - "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": { - "last_access_control_sync_error": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/_spec_utils:NullValue" - } - ] - }, - "last_access_control_sync_scheduled_at": { - "$ref": "#/components/schemas/_types:DateTime" - }, - "last_access_control_sync_status": { - "$ref": "#/components/schemas/connector._types:SyncStatus" - }, - "last_deleted_document_count": { - "type": "number" - }, - "last_incremental_sync_scheduled_at": { - "$ref": "#/components/schemas/_types:DateTime" - }, - "last_indexed_document_count": { - "type": "number" - }, - "last_seen": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types:DateTime" - }, - { - "$ref": "#/components/schemas/_spec_utils:NullValue" - } - ] - }, - "last_sync_error": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/_spec_utils:NullValue" - } - ] - }, - "last_sync_scheduled_at": { - "$ref": "#/components/schemas/_types:DateTime" - }, - "last_sync_status": { - "$ref": "#/components/schemas/connector._types:SyncStatus" - }, - "last_synced": { - "$ref": "#/components/schemas/_types:DateTime" - } - } - } - } - }, - "required": true - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "result": { - "$ref": "#/components/schemas/_types:Result" - } - }, - "required": [ - "result" - ] - } - } - } - } - }, - "x-technical-preview": true, - "x-available-since": "8.12.0" - } - }, "/_connector": { "get": { "tags": [ @@ -2236,14 +2122,7 @@ "type": "string" }, "index_name": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types:IndexName" - }, - { - "$ref": "#/components/schemas/_spec_utils:NullValue" - } - ] + "$ref": "#/components/schemas/_types:IndexName" }, "is_native": { "type": "boolean" @@ -2257,10 +2136,7 @@ "service_type": { "type": "string" } - }, - "required": [ - "index_name" - ] + } } } } @@ -2273,11 +2149,15 @@ "schema": { "type": "object", "properties": { + "result": { + "$ref": "#/components/schemas/_types:Result" + }, "id": { "$ref": "#/components/schemas/_types:Id" } }, "required": [ + "result", "id" ] } @@ -2469,10 +2349,17 @@ "description": "A comma-separated list of job types to fetch the sync jobs for", "deprecated": false, "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/connector._types:SyncJobType" - } + "oneOf": [ + { + "$ref": "#/components/schemas/connector._types:SyncJobType" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/connector._types:SyncJobType" + } + } + ] }, "style": "form" } @@ -2641,24 +2528,10 @@ "type": "object", "properties": { "api_key_id": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/_spec_utils:NullValue" - } - ] + "type": "string" }, "api_key_secret_id": { - "oneOf": [ - { - "type": "string" - }, - { - "$ref": "#/components/schemas/_spec_utils:NullValue" - } - ] + "type": "string" } } } @@ -3076,10 +2949,7 @@ "description": { "type": "string" } - }, - "required": [ - "name" - ] + } } } }, @@ -21133,10 +21003,14 @@ "properties": { "result": { "$ref": "#/components/schemas/_types:Result" + }, + "id": { + "$ref": "#/components/schemas/_types:Id" } }, "required": [ - "result" + "result", + "id" ] } } @@ -23770,7 +23644,7 @@ "connector.put#connector_id": { "in": "path", "name": "connector_id", - "description": "The unique identifier of the connector to be created or updated", + "description": "The unique identifier of the connector to be created or updated. ID is auto-generated if not provided.", "required": true, "deprecated": false, "schema": { @@ -28063,14 +27937,7 @@ "type": "string" }, "index_name": { - "oneOf": [ - { - "$ref": "#/components/schemas/_types:IndexName" - }, - { - "$ref": "#/components/schemas/_spec_utils:NullValue" - } - ] + "$ref": "#/components/schemas/_types:IndexName" }, "is_native": { "type": "boolean" @@ -28084,10 +27951,7 @@ "service_type": { "type": "string" } - }, - "required": [ - "index_name" - ] + } } } } @@ -51077,6 +50941,9 @@ "api_key_id": { "type": "string" }, + "api_key_secret_id": { + "type": "string" + }, "configuration": { "$ref": "#/components/schemas/connector._types:ConnectorConfiguration" }, @@ -51087,7 +50954,15 @@ "type": "string" }, "error": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] }, "features": { "$ref": "#/components/schemas/connector._types:ConnectorFeatures" @@ -51102,7 +50977,15 @@ "$ref": "#/components/schemas/_types:Id" }, "index_name": { - "$ref": "#/components/schemas/_types:IndexName" + "oneOf": [ + { + "$ref": "#/components/schemas/_types:IndexName" + }, + { + "nullable": true, + "type": "string" + } + ] }, "is_native": { "type": "boolean" @@ -51158,6 +51041,9 @@ "status": { "$ref": "#/components/schemas/connector._types:ConnectorStatus" }, + "sync_cursor": { + "type": "object" + }, "sync_now": { "type": "boolean" } @@ -51168,7 +51054,6 @@ "filtering", "is_native", "scheduling", - "service_type", "status", "sync_now" ] @@ -51219,7 +51104,15 @@ "type": "boolean" }, "tooltip": { - "type": "string" + "oneOf": [ + { + "type": "string" + }, + { + "nullable": true, + "type": "string" + } + ] }, "type": { "$ref": "#/components/schemas/connector._types:ConnectorFieldType" @@ -51237,7 +51130,7 @@ } }, "value": { - "$ref": "#/components/schemas/_types:ScalarValue" + "type": "object" } }, "required": [ @@ -51307,7 +51200,7 @@ "type": "string" }, "value": { - "type": "string" + "$ref": "#/components/schemas/_types:ScalarValue" } }, "required": [ @@ -51392,10 +51285,7 @@ ] }, "constraint": { - "type": "array", - "items": { - "$ref": "#/components/schemas/_types:ScalarValue" - } + "type": "string" } }, "required": [ @@ -51413,7 +51303,10 @@ ] }, "constraint": { - "type": "string" + "type": "array", + "items": { + "$ref": "#/components/schemas/_types:ScalarValue" + } } }, "required": [ @@ -51506,15 +51399,12 @@ "document_level_security": { "$ref": "#/components/schemas/connector._types:FeatureEnabled" }, - "filtering_advanced_config": { - "type": "boolean" - }, - "filtering_rules": { - "type": "boolean" - }, "incremental_sync": { "$ref": "#/components/schemas/connector._types:FeatureEnabled" }, + "native_connector_api_keys": { + "$ref": "#/components/schemas/connector._types:FeatureEnabled" + }, "sync_rules": { "$ref": "#/components/schemas/connector._types:SyncRulesFeature" } @@ -51557,7 +51447,6 @@ }, "required": [ "active", - "domain", "draft" ] }, @@ -51781,11 +51670,6 @@ "error" ] }, - "_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:ConnectorSyncJob": { "type": "object", "properties": { @@ -51884,6 +51768,9 @@ }, "service_type": { "type": "string" + }, + "sync_cursor": { + "type": "object" } }, "required": [ @@ -51909,6 +51796,11 @@ "scheduled" ] }, + "_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-serverless.json b/output/schema/schema-serverless.json index df45374b28..8e11ff63b4 100644 --- a/output/schema/schema-serverless.json +++ b/output/schema/schema-serverless.json @@ -1073,45 +1073,6 @@ } ] }, - { - "availability": { - "serverless": { - "stability": "experimental", - "visibility": "public" - }, - "stack": { - "since": "8.12.0", - "stability": "experimental" - } - }, - "description": "Updates last sync stats in the connector document", - "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", - "namespace": "connector.last_sync" - }, - "requestBodyRequired": true, - "requestMediaType": [ - "application/json" - ], - "response": { - "name": "Response", - "namespace": "connector.last_sync" - }, - "responseMediaType": [ - "application/json" - ], - "urls": [ - { - "methods": [ - "PUT" - ], - "path": "/_connector/{connector_id}/_last_sync" - } - ] - }, { "availability": { "serverless": { @@ -13248,9 +13209,9 @@ ], "query": [ { - "description": "Determines whether associated sync jobs are also deleted.", + "description": "A flag indicating if associated sync jobs should be also removed. Defaults to false.", "name": "delete_sync_jobs", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -13260,7 +13221,7 @@ } } ], - "specLocation": "connector/delete/ConnectorDeleteRequest.ts#L22-L39" + "specLocation": "connector/delete/ConnectorDeleteRequest.ts#L22-L42" }, { "body": { @@ -13334,216 +13295,6 @@ }, "specLocation": "connector/get/ConnectorGetResponse.ts#L22-L24" }, - { - "attachedBehaviors": [ - "CommonQueryParameters" - ], - "body": { - "kind": "properties", - "properties": [ - { - "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": "last_access_control_sync_scheduled_at", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "DateTime", - "namespace": "_types" - } - } - }, - { - "name": "last_access_control_sync_status", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "SyncStatus", - "namespace": "connector._types" - } - } - }, - { - "name": "last_deleted_document_count", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" - } - } - }, - { - "name": "last_incremental_sync_scheduled_at", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "DateTime", - "namespace": "_types" - } - } - }, - { - "name": "last_indexed_document_count", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "long", - "namespace": "_types" - } - } - }, - { - "name": "last_seen", - "required": false, - "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "DateTime", - "namespace": "_types" - } - } - ], - "kind": "instance_of", - "type": { - "name": "WithNullValue", - "namespace": "_spec_utils" - } - } - }, - { - "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": "last_sync_scheduled_at", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "DateTime", - "namespace": "_types" - } - } - }, - { - "name": "last_sync_status", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "SyncStatus", - "namespace": "connector._types" - } - } - }, - { - "name": "last_synced", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "DateTime", - "namespace": "_types" - } - } - } - ] - }, - "description": "Updates last sync stats 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#L26-L56" - }, - { - "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" @@ -13698,21 +13449,12 @@ }, { "name": "index_name", - "required": true, + "required": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "IndexName", - "namespace": "_types" - } - } - ], "kind": "instance_of", "type": { - "name": "WithNullValue", - "namespace": "_spec_utils" + "name": "IndexName", + "namespace": "_types" } } }, @@ -13776,12 +13518,23 @@ }, "path": [], "query": [], - "specLocation": "connector/post/ConnectorPostRequest.ts#L23-L43" + "specLocation": "connector/post/ConnectorPostRequest.ts#L22-L42" }, { "body": { "kind": "properties", "properties": [ + { + "name": "result", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Result", + "namespace": "_types" + } + } + }, { "name": "id", "required": true, @@ -13800,7 +13553,7 @@ "name": "Response", "namespace": "connector.post" }, - "specLocation": "connector/post/ConnectorPostResponse.ts#L22-L26" + "specLocation": "connector/post/ConnectorPostResponse.ts#L23-L28" }, { "attachedBehaviors": [ @@ -13822,21 +13575,12 @@ }, { "name": "index_name", - "required": true, + "required": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "IndexName", - "namespace": "_types" - } - } - ], "kind": "instance_of", "type": { - "name": "WithNullValue", - "namespace": "_spec_utils" + "name": "IndexName", + "namespace": "_types" } } }, @@ -13900,9 +13644,9 @@ }, "path": [ { - "description": "The unique identifier of the connector to be created or updated", + "description": "The unique identifier of the connector to be created or updated. ID is auto-generated if not provided.", "name": "connector_id", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -13913,7 +13657,7 @@ } ], "query": [], - "specLocation": "connector/put/ConnectorPutRequest.ts#L23-L49" + "specLocation": "connector/put/ConnectorPutRequest.ts#L22-L48" }, { "body": { @@ -13929,6 +13673,17 @@ "namespace": "_types" } } + }, + { + "name": "id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } } ] }, @@ -13937,7 +13692,7 @@ "name": "Response", "namespace": "connector.put" }, - "specLocation": "connector/put/ConnectorPutResponse.ts#L22-L26" + "specLocation": "connector/put/ConnectorPutResponse.ts#L23-L28" }, { "attachedBehaviors": [ @@ -14181,14 +13936,26 @@ "name": "job_type", "required": false, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "SyncJobType", - "namespace": "connector._types" + "items": [ + { + "kind": "instance_of", + "type": { + "name": "SyncJobType", + "namespace": "connector._types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "SyncJobType", + "namespace": "connector._types" + } + } } - } + ], + "kind": "union_of" } } ], @@ -14386,19 +14153,10 @@ "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": "string", + "namespace": "_builtins" } } }, @@ -14406,19 +14164,10 @@ "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" + "name": "string", + "namespace": "_builtins" } } } @@ -14451,7 +14200,7 @@ } ], "query": [], - "specLocation": "connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts#L23-L44" + "specLocation": "connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts#L21-L42" }, { "body": { @@ -14915,7 +14664,7 @@ "properties": [ { "name": "name", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -88410,11 +88159,23 @@ "name": "tooltip", "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" } }, { @@ -88460,11 +88221,7 @@ "name": "value", "required": true, "type": { - "kind": "instance_of", - "type": { - "name": "ScalarValue", - "namespace": "_types" - } + "kind": "user_defined_value" } } ], @@ -88551,8 +88308,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScalarValue", + "namespace": "_types" } } } @@ -88710,13 +88467,10 @@ "name": "constraint", "required": true, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "ScalarValue", - "namespace": "_types" - } + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" } } } @@ -88742,10 +88496,13 @@ "name": "constraint", "required": true, "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "ScalarValue", + "namespace": "_types" + } } } } @@ -89053,7 +88810,7 @@ "name": "SyncJobTriggerMethod", "namespace": "connector._types" }, - "specLocation": "connector/_types/SyncJob.ts#L47-L50" + "specLocation": "connector/_types/SyncJob.ts#L48-L51" }, { "kind": "enum", @@ -89072,7 +88829,7 @@ "name": "SyncJobType", "namespace": "connector._types" }, - "specLocation": "connector/_types/SyncJob.ts#L41-L45" + "specLocation": "connector/_types/SyncJob.ts#L42-L46" }, { "kind": "enum", @@ -111400,6 +111157,17 @@ } } }, + { + "name": "api_key_secret_id", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, { "name": "configuration", "required": true, @@ -111437,11 +111205,23 @@ "name": "error", "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" } }, { @@ -111484,11 +111264,23 @@ "name": "index_name", "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "IndexName", - "namespace": "_types" - } + "items": [ + { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" } }, { @@ -111669,7 +111461,7 @@ }, { "name": "service_type", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -111689,6 +111481,13 @@ } } }, + { + "name": "sync_cursor", + "required": false, + "type": { + "kind": "user_defined_value" + } + }, { "name": "sync_now", "required": true, @@ -111701,7 +111500,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L238-L267" + "specLocation": "connector/_types/Connector.ts#L237-L268" }, { "kind": "interface", @@ -111722,29 +111521,18 @@ } }, { - "name": "filtering_advanced_config", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, - { - "name": "filtering_rules", + "name": "incremental_sync", "required": false, "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "_builtins" + "name": "FeatureEnabled", + "namespace": "connector._types" } } }, { - "name": "incremental_sync", + "name": "native_connector_api_keys", "required": false, "type": { "kind": "instance_of", @@ -111766,7 +111554,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L224-L230" + "specLocation": "connector/_types/Connector.ts#L224-L229" }, { "kind": "interface", @@ -111841,7 +111629,7 @@ }, { "name": "domain", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -112226,7 +112014,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L232-L236" + "specLocation": "connector/_types/Connector.ts#L231-L235" }, { "kind": "interface", @@ -112474,7 +112262,7 @@ } } ], - "specLocation": "connector/_types/SyncJob.ts#L52-L71" + "specLocation": "connector/_types/SyncJob.ts#L53-L72" }, { "kind": "interface", @@ -112559,9 +112347,16 @@ "namespace": "_builtins" } } + }, + { + "name": "sync_cursor", + "required": false, + "type": { + "kind": "user_defined_value" + } } ], - "specLocation": "connector/_types/SyncJob.ts#L31-L39" + "specLocation": "connector/_types/SyncJob.ts#L31-L40" }, { "kind": "interface", diff --git a/output/schema/schema.json b/output/schema/schema.json index 9b02613d57..205d473f7d 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -2979,7 +2979,7 @@ "availability": { "serverless": { "stability": "experimental", - "visibility": "public" + "visibility": "private" }, "stack": { "since": "8.12.0", @@ -106566,6 +106566,17 @@ } } }, + { + "name": "api_key_secret_id", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, { "name": "configuration", "required": true, @@ -106603,11 +106614,23 @@ "name": "error", "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" } }, { @@ -106650,11 +106673,23 @@ "name": "index_name", "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "IndexName", - "namespace": "_types" - } + "items": [ + { + "kind": "instance_of", + "type": { + "name": "IndexName", + "namespace": "_types" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" } }, { @@ -106835,7 +106870,7 @@ }, { "name": "service_type", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -106855,6 +106890,13 @@ } } }, + { + "name": "sync_cursor", + "required": false, + "type": { + "kind": "user_defined_value" + } + }, { "name": "sync_now", "required": true, @@ -106867,7 +106909,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L238-L267" + "specLocation": "connector/_types/Connector.ts#L237-L268" }, { "kind": "interface", @@ -106996,11 +107038,23 @@ "name": "tooltip", "required": false, "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } + "items": [ + { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + }, + { + "kind": "instance_of", + "type": { + "name": "null", + "namespace": "_builtins" + } + } + ], + "kind": "union_of" } }, { @@ -107046,11 +107100,7 @@ "name": "value", "required": true, "type": { - "kind": "instance_of", - "type": { - "name": "ScalarValue", - "namespace": "_types" - } + "kind": "user_defined_value" } } ], @@ -107127,29 +107177,18 @@ } }, { - "name": "filtering_advanced_config", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "boolean", - "namespace": "_builtins" - } - } - }, - { - "name": "filtering_rules", + "name": "incremental_sync", "required": false, "type": { "kind": "instance_of", "type": { - "name": "boolean", - "namespace": "_builtins" + "name": "FeatureEnabled", + "namespace": "connector._types" } } }, { - "name": "incremental_sync", + "name": "native_connector_api_keys", "required": false, "type": { "kind": "instance_of", @@ -107171,7 +107210,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L224-L230" + "specLocation": "connector/_types/Connector.ts#L224-L229" }, { "kind": "enum", @@ -107466,7 +107505,7 @@ } } ], - "specLocation": "connector/_types/SyncJob.ts#L52-L71" + "specLocation": "connector/_types/SyncJob.ts#L53-L72" }, { "kind": "interface", @@ -107755,7 +107794,7 @@ }, { "name": "domain", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -108111,10 +108150,13 @@ "name": "constraint", "required": true, "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "ScalarValue", + "namespace": "_types" + } } } } @@ -108223,13 +108265,10 @@ "name": "constraint", "required": true, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "ScalarValue", - "namespace": "_types" - } + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" } } } @@ -108306,7 +108345,7 @@ } } ], - "specLocation": "connector/_types/Connector.ts#L232-L236" + "specLocation": "connector/_types/Connector.ts#L231-L235" }, { "kind": "interface", @@ -108332,8 +108371,8 @@ "type": { "kind": "instance_of", "type": { - "name": "string", - "namespace": "_builtins" + "name": "ScalarValue", + "namespace": "_types" } } } @@ -108423,9 +108462,16 @@ "namespace": "_builtins" } } + }, + { + "name": "sync_cursor", + "required": false, + "type": { + "kind": "user_defined_value" + } } ], - "specLocation": "connector/_types/SyncJob.ts#L31-L39" + "specLocation": "connector/_types/SyncJob.ts#L31-L40" }, { "kind": "enum", @@ -108441,7 +108487,7 @@ "name": "SyncJobTriggerMethod", "namespace": "connector._types" }, - "specLocation": "connector/_types/SyncJob.ts#L47-L50" + "specLocation": "connector/_types/SyncJob.ts#L48-L51" }, { "kind": "enum", @@ -108460,7 +108506,7 @@ "name": "SyncJobType", "namespace": "connector._types" }, - "specLocation": "connector/_types/SyncJob.ts#L41-L45" + "specLocation": "connector/_types/SyncJob.ts#L42-L46" }, { "kind": "interface", @@ -108672,9 +108718,9 @@ ], "query": [ { - "description": "Determines whether associated sync jobs are also deleted.", + "description": "A flag indicating if associated sync jobs should be also removed. Defaults to false.", "name": "delete_sync_jobs", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -108684,7 +108730,7 @@ } } ], - "specLocation": "connector/delete/ConnectorDeleteRequest.ts#L22-L39" + "specLocation": "connector/delete/ConnectorDeleteRequest.ts#L22-L42" }, { "body": { @@ -108769,19 +108815,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" } } }, @@ -108844,19 +108881,10 @@ "name": "last_seen", "required": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "DateTime", - "namespace": "_types" - } - } - ], "kind": "instance_of", "type": { - "name": "WithNullValue", - "namespace": "_spec_utils" + "name": "DateTime", + "namespace": "_types" } } }, @@ -108864,19 +108892,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" } } }, @@ -108912,6 +108931,13 @@ "namespace": "_types" } } + }, + { + "name": "sync_cursor", + "required": false, + "type": { + "kind": "user_defined_value" + } } ] }, @@ -108942,7 +108968,7 @@ } ], "query": [], - "specLocation": "connector/last_sync/ConnectorUpdateLastSyncRequest.ts#L26-L56" + "specLocation": "connector/last_sync/ConnectorUpdateLastSyncRequest.ts#L26-L57" }, { "body": { @@ -109122,21 +109148,12 @@ }, { "name": "index_name", - "required": true, + "required": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "IndexName", - "namespace": "_types" - } - } - ], "kind": "instance_of", "type": { - "name": "WithNullValue", - "namespace": "_spec_utils" + "name": "IndexName", + "namespace": "_types" } } }, @@ -109200,12 +109217,23 @@ }, "path": [], "query": [], - "specLocation": "connector/post/ConnectorPostRequest.ts#L23-L43" + "specLocation": "connector/post/ConnectorPostRequest.ts#L22-L42" }, { "body": { "kind": "properties", "properties": [ + { + "name": "result", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Result", + "namespace": "_types" + } + } + }, { "name": "id", "required": true, @@ -109224,7 +109252,7 @@ "name": "Response", "namespace": "connector.post" }, - "specLocation": "connector/post/ConnectorPostResponse.ts#L22-L26" + "specLocation": "connector/post/ConnectorPostResponse.ts#L23-L28" }, { "attachedBehaviors": [ @@ -109246,21 +109274,12 @@ }, { "name": "index_name", - "required": true, + "required": false, "type": { - "generics": [ - { - "kind": "instance_of", - "type": { - "name": "IndexName", - "namespace": "_types" - } - } - ], "kind": "instance_of", "type": { - "name": "WithNullValue", - "namespace": "_spec_utils" + "name": "IndexName", + "namespace": "_types" } } }, @@ -109324,9 +109343,9 @@ }, "path": [ { - "description": "The unique identifier of the connector to be created or updated", + "description": "The unique identifier of the connector to be created or updated. ID is auto-generated if not provided.", "name": "connector_id", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -109337,7 +109356,7 @@ } ], "query": [], - "specLocation": "connector/put/ConnectorPutRequest.ts#L23-L49" + "specLocation": "connector/put/ConnectorPutRequest.ts#L22-L48" }, { "body": { @@ -109353,6 +109372,17 @@ "namespace": "_types" } } + }, + { + "name": "id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Id", + "namespace": "_types" + } + } } ] }, @@ -109361,7 +109391,7 @@ "name": "Response", "namespace": "connector.put" }, - "specLocation": "connector/put/ConnectorPutResponse.ts#L22-L26" + "specLocation": "connector/put/ConnectorPutResponse.ts#L23-L28" }, { "attachedBehaviors": [ @@ -109605,14 +109635,26 @@ "name": "job_type", "required": false, "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "SyncJobType", - "namespace": "connector._types" + "items": [ + { + "kind": "instance_of", + "type": { + "name": "SyncJobType", + "namespace": "connector._types" + } + }, + { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "SyncJobType", + "namespace": "connector._types" + } + } } - } + ], + "kind": "union_of" } } ], @@ -109810,19 +109852,10 @@ "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": "string", + "namespace": "_builtins" } } }, @@ -109830,19 +109863,10 @@ "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" + "name": "string", + "namespace": "_builtins" } } } @@ -109875,7 +109899,7 @@ } ], "query": [], - "specLocation": "connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts#L23-L44" + "specLocation": "connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts#L21-L42" }, { "body": { @@ -110339,7 +110363,7 @@ "properties": [ { "name": "name", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index a47cde3dfd..b76b48fb9c 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -535,18 +535,6 @@ ], "response": [] }, - "connector.last_sync": { - "request": [ - "type_alias definition _spec_utils:WithNullValue / union_of / instance_of - No type definition for '_spec_utils.WithNullValue:T'" - ], - "response": [] - }, - "connector.put": { - "request": [ - "Request: path parameter 'connector_id' is optional in the json spec" - ], - "response": [] - }, "connector.secret_delete": { "request": [ "Missing request & response" @@ -595,6 +583,12 @@ ], "response": [] }, + "connector.update_error": { + "request": [ + "type_alias definition _spec_utils:WithNullValue / union_of / instance_of - No type definition for '_spec_utils.WithNullValue:T'" + ], + "response": [] + }, "connector.update_features": { "request": [ "Missing request & response" diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 09619655b2..888b6e730a 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -9184,14 +9184,15 @@ export interface ClusterStatsStatsResponseBase extends NodesNodesResponseBase { export interface ConnectorConnector { api_key_id?: string + api_key_secret_id?: string configuration: ConnectorConnectorConfiguration custom_scheduling: ConnectorConnectorCustomScheduling description?: string - error?: string + error?: string | null features?: ConnectorConnectorFeatures filtering: ConnectorFilteringConfig[] id?: Id - index_name?: IndexName + index_name?: IndexName | null is_native: boolean language?: string last_access_control_sync_error?: string @@ -9208,8 +9209,9 @@ export interface ConnectorConnector { name?: string pipeline?: ConnectorIngestPipelineParams scheduling: ConnectorSchedulingConfiguration - service_type: string + service_type?: string status: ConnectorConnectorStatus + sync_cursor?: any sync_now: boolean } @@ -9224,11 +9226,11 @@ export interface ConnectorConnectorConfigProperties { placeholder?: string required: boolean sensitive: boolean - tooltip?: string + tooltip?: string | null type: ConnectorConnectorFieldType ui_restrictions: string[] validations: ConnectorValidation[] - value: ScalarValue + value: any } export type ConnectorConnectorConfiguration = Record @@ -9237,9 +9239,8 @@ export type ConnectorConnectorCustomScheduling = Record + last_access_control_sync_error?: string last_access_control_sync_scheduled_at?: DateTime last_access_control_sync_status?: ConnectorSyncStatus last_deleted_document_count?: long last_incremental_sync_scheduled_at?: DateTime last_indexed_document_count?: long - last_seen?: SpecUtilsWithNullValue - last_sync_error?: SpecUtilsWithNullValue + last_seen?: DateTime + last_sync_error?: string last_sync_scheduled_at?: DateTime last_sync_status?: ConnectorSyncStatus last_synced?: DateTime + sync_cursor?: any } } @@ -9470,7 +9473,7 @@ export interface ConnectorListResponse { export interface ConnectorPostRequest extends RequestBase { body?: { description?: string - index_name: SpecUtilsWithNullValue + index_name?: IndexName is_native?: boolean language?: string name?: string @@ -9479,14 +9482,15 @@ export interface ConnectorPostRequest extends RequestBase { } export interface ConnectorPostResponse { + result: Result id: Id } export interface ConnectorPutRequest extends RequestBase { - connector_id: Id + connector_id?: Id body?: { description?: string - index_name: SpecUtilsWithNullValue + index_name?: IndexName is_native?: boolean language?: string name?: string @@ -9496,6 +9500,7 @@ export interface ConnectorPutRequest extends RequestBase { export interface ConnectorPutResponse { result: Result + id: Id } export interface ConnectorSyncJobCancelRequest extends RequestBase { @@ -9523,7 +9528,7 @@ export interface ConnectorSyncJobListRequest extends RequestBase { size?: integer status?: ConnectorSyncStatus connector_id?: Id - job_type?: ConnectorSyncJobType[] + job_type?: ConnectorSyncJobType | ConnectorSyncJobType[] } export interface ConnectorSyncJobListResponse { @@ -9554,8 +9559,8 @@ export interface ConnectorUpdateActiveFilteringResponse { export interface ConnectorUpdateApiKeyIdRequest extends RequestBase { connector_id: Id body?: { - api_key_id?: SpecUtilsWithNullValue - api_key_secret_id?: SpecUtilsWithNullValue + api_key_id?: string + api_key_secret_id?: string } } @@ -9624,7 +9629,7 @@ export interface ConnectorUpdateIndexNameResponse { export interface ConnectorUpdateNameRequest extends RequestBase { connector_id: Id body?: { - name: string + name?: string description?: string } } diff --git a/specification/connector/_types/Connector.ts b/specification/connector/_types/Connector.ts index 4aef9fe7ef..ba9b639fc5 100644 --- a/specification/connector/_types/Connector.ts +++ b/specification/connector/_types/Connector.ts @@ -24,7 +24,7 @@ import { UserDefinedValue } from '@spec_utils/UserDefinedValue' interface SelectOption { label: string - value: string + value: ScalarValue } interface Dependency { @@ -67,12 +67,12 @@ export interface GreaterThanValidation { export interface ListTypeValidation { type: 'list_type' - constraint: ScalarValue[] + constraint: string } export interface IncludedInValidation { type: 'included_in' - constraint: string + constraint: ScalarValue[] } export interface RegexValidation { @@ -91,11 +91,11 @@ export interface ConnectorConfigProperties { placeholder?: string required: boolean sensitive: boolean - tooltip?: string + tooltip?: string | null type: ConnectorFieldType ui_restrictions: string[] validations: Validation[] - value: ScalarValue + value: UserDefinedValue } export type ConnectorConfiguration = Dictionary< @@ -208,7 +208,7 @@ export interface FilteringRules { export interface FilteringConfig { active: FilteringRules - domain: string + domain?: string draft: FilteringRules } @@ -223,9 +223,8 @@ interface SyncRulesFeature { export interface ConnectorFeatures { document_level_security?: FeatureEnabled - filtering_advanced_config?: boolean - filtering_rules?: boolean incremental_sync?: FeatureEnabled + native_connector_api_keys?: FeatureEnabled sync_rules?: SyncRulesFeature } @@ -237,14 +236,15 @@ export interface SchedulingConfiguration { export interface Connector { api_key_id?: string + api_key_secret_id?: string configuration: ConnectorConfiguration custom_scheduling: ConnectorCustomScheduling description?: string - error?: string + error?: string | null features?: ConnectorFeatures filtering: FilteringConfig[] id?: Id - index_name?: IndexName + index_name?: IndexName | null is_native: boolean language?: string last_access_control_sync_error?: string @@ -261,7 +261,8 @@ export interface Connector { name?: string pipeline?: IngestPipelineParams scheduling: SchedulingConfiguration - service_type: string + service_type?: string status: ConnectorStatus + sync_cursor?: UserDefinedValue sync_now: boolean } diff --git a/specification/connector/_types/SyncJob.ts b/specification/connector/_types/SyncJob.ts index 542fc6e725..2f8136e042 100644 --- a/specification/connector/_types/SyncJob.ts +++ b/specification/connector/_types/SyncJob.ts @@ -36,6 +36,7 @@ interface SyncJobConnectorReference { language?: string pipeline?: IngestPipelineParams service_type: string + sync_cursor?: UserDefinedValue } export enum SyncJobType { diff --git a/specification/connector/delete/ConnectorDeleteRequest.ts b/specification/connector/delete/ConnectorDeleteRequest.ts index 7f7b6adbe3..b3a9e6965e 100644 --- a/specification/connector/delete/ConnectorDeleteRequest.ts +++ b/specification/connector/delete/ConnectorDeleteRequest.ts @@ -34,6 +34,9 @@ export interface Request extends RequestBase { connector_id: Id } query_parameters: { - delete_sync_jobs: boolean + /** + * A flag indicating if associated sync jobs should be also removed. Defaults to false. + */ + delete_sync_jobs?: boolean } } diff --git a/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts b/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts index 68a04ca2a5..b94baf7e7a 100644 --- a/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts +++ b/specification/connector/last_sync/ConnectorUpdateLastSyncRequest.ts @@ -18,16 +18,16 @@ */ 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' import { DateTime } from '@_types/Time' +import { UserDefinedValue } from '@spec_utils/UserDefinedValue' +import { SyncStatus } from '../_types/Connector' /** * 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 + * @availability serverless stability=experimental visibility=private * @doc_id connector-last-sync */ export interface Request extends RequestBase { @@ -41,16 +41,17 @@ export interface Request extends RequestBase { * Connector last sync stats */ body: { - last_access_control_sync_error?: WithNullValue + last_access_control_sync_error?: string last_access_control_sync_scheduled_at?: DateTime last_access_control_sync_status?: SyncStatus last_deleted_document_count?: long last_incremental_sync_scheduled_at?: DateTime last_indexed_document_count?: long - last_seen?: WithNullValue - last_sync_error?: WithNullValue + last_seen?: DateTime + last_sync_error?: string last_sync_scheduled_at?: DateTime last_sync_status?: SyncStatus last_synced?: DateTime + sync_cursor?: UserDefinedValue } } diff --git a/specification/connector/post/ConnectorPostRequest.ts b/specification/connector/post/ConnectorPostRequest.ts index 6ccf1f716a..c9d2d0816d 100644 --- a/specification/connector/post/ConnectorPostRequest.ts +++ b/specification/connector/post/ConnectorPostRequest.ts @@ -18,7 +18,6 @@ */ import { RequestBase } from '@_types/Base' import { IndexName } from '@_types/common' -import { WithNullValue } from '@spec_utils/utils' /** * Creates a connector. @@ -32,9 +31,9 @@ export interface Request extends RequestBase { * The connector document to be created */ /** @codegen_name connector */ - body: { + body?: { description?: string - index_name: WithNullValue + index_name?: IndexName is_native?: boolean language?: string name?: string diff --git a/specification/connector/post/ConnectorPostResponse.ts b/specification/connector/post/ConnectorPostResponse.ts index 69e3a38113..d21635c3b7 100644 --- a/specification/connector/post/ConnectorPostResponse.ts +++ b/specification/connector/post/ConnectorPostResponse.ts @@ -17,10 +17,12 @@ * under the License. */ +import { Result } from '@_types/Result' import { Id } from '@_types/common' export class Response { body: { + result: Result id: Id } } diff --git a/specification/connector/put/ConnectorPutRequest.ts b/specification/connector/put/ConnectorPutRequest.ts index 58a5110847..10ce3fb8e9 100644 --- a/specification/connector/put/ConnectorPutRequest.ts +++ b/specification/connector/put/ConnectorPutRequest.ts @@ -18,7 +18,6 @@ */ import { RequestBase } from '@_types/Base' import { Id, IndexName } from '@_types/common' -import { WithNullValue } from '@spec_utils/utils' /** * Creates or updates a connector. @@ -30,17 +29,17 @@ import { WithNullValue } from '@spec_utils/utils' export interface Request extends RequestBase { path_parts: { /** - * The unique identifier of the connector to be created or updated + * The unique identifier of the connector to be created or updated. ID is auto-generated if not provided. */ - connector_id: Id + connector_id?: Id } /** * The connector document to be created */ /** @codegen_name connector */ - body: { + body?: { description?: string - index_name: WithNullValue + index_name?: IndexName is_native?: boolean language?: string name?: string diff --git a/specification/connector/put/ConnectorPutResponse.ts b/specification/connector/put/ConnectorPutResponse.ts index fc194d6f20..d21635c3b7 100644 --- a/specification/connector/put/ConnectorPutResponse.ts +++ b/specification/connector/put/ConnectorPutResponse.ts @@ -18,9 +18,11 @@ */ import { Result } from '@_types/Result' +import { Id } from '@_types/common' export class Response { body: { result: Result + id: Id } } diff --git a/specification/connector/sync_job_list/SyncJobListRequest.ts b/specification/connector/sync_job_list/SyncJobListRequest.ts index e35e78f732..33ec16cdc9 100644 --- a/specification/connector/sync_job_list/SyncJobListRequest.ts +++ b/specification/connector/sync_job_list/SyncJobListRequest.ts @@ -50,6 +50,6 @@ export interface Request extends RequestBase { /** * A comma-separated list of job types to fetch the sync jobs for */ - job_type?: SyncJobType[] + job_type?: SyncJobType | SyncJobType[] } } diff --git a/specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts b/specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts index 024bdd976a..e7305bbc2d 100644 --- a/specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts +++ b/specification/connector/update_api_key_id/ConnectorUpdateAPIKeyIDRequest.ts @@ -18,8 +18,6 @@ */ 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 @@ -38,7 +36,7 @@ export interface Request extends RequestBase { * The connector api key request body */ body: { - api_key_id?: WithNullValue - api_key_secret_id?: WithNullValue + api_key_id?: string + api_key_secret_id?: string } } diff --git a/specification/connector/update_name/ConnectorUpdateNameRequest.ts b/specification/connector/update_name/ConnectorUpdateNameRequest.ts index 9803e8f456..a50fbd06ea 100644 --- a/specification/connector/update_name/ConnectorUpdateNameRequest.ts +++ b/specification/connector/update_name/ConnectorUpdateNameRequest.ts @@ -37,7 +37,7 @@ export interface Request extends RequestBase { * The connector name and description */ body: { - name: string + name?: string description?: string } }