From 0f890056ff24885602afe232039f453a7e18f592 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Laurent=20Saint-F=C3=A9lix?= Date: Fri, 3 May 2024 17:52:47 +0200 Subject: [PATCH 1/5] Add dangling types to the generic-less schema (#2542) * add dangling types to the genericless schema * fix linting * add an explicit pass in expandInterface for missing behaviors * please the linter gods by using a const --- compiler/src/transform/expand-generics.ts | 37 +++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/compiler/src/transform/expand-generics.ts b/compiler/src/transform/expand-generics.ts index 065bce4ba6..07378e9c51 100644 --- a/compiler/src/transform/expand-generics.ts +++ b/compiler/src/transform/expand-generics.ts @@ -134,6 +134,26 @@ export function expandGenerics (inputModel: Model): Model { } } + /** + * Add dangling types like CommonQueryParameters & BaseEsqlVersion to the generic less schema. + * @param type the type definition + */ + function addDanglingTypeIfNotSeen (type: TypeDefinition): void { + switch (type.kind) { + case 'type_alias': + if (type.generics !== undefined && type.generics.length > 0) { + return + } + break + case 'interface': + if (type.generics !== undefined && type.generics.length > 0) { + return + } + break + } + addIfNotSeen(type.name, () => type) + } + /** * Expand an interface definition. * @@ -148,6 +168,18 @@ export function expandGenerics (inputModel: Model): Model { result.inherits = expandInherits(result.inherits, mappings) + // We add to the schema the non generics behaviors + // CommonQueryParameters + // CommonCatQueryParameters + if (result.behaviors != null) { + result.behaviors.forEach(b => { + if (b.generics == null) { + const type = getType(b.type) + addIfNotSeen(b.type, () => type) + } + }) + } + if (result.behaviors != null) { // We keep the generic parameters, but expand their value result.behaviors = result.behaviors.map(b => { @@ -361,6 +393,11 @@ export function expandGenerics (inputModel: Model): Model { expandRootType(endpoint.response) } + // Allows to retrieve EsqlBase*EsqlVersion + for (const type of inputModel.types) { + addDanglingTypeIfNotSeen(type) + } + sortTypeDefinitions(types) return { From 17c8dea02c679aa24745e6ec30f8e30ee6068850 Mon Sep 17 00:00:00 2001 From: Laura Trotta <153528055+l-trotta@users.noreply.github.com> Date: Mon, 6 May 2024 11:34:13 +0200 Subject: [PATCH 2/5] changed inference name to avoid duplicate (#2544) --- output/openapi/elasticsearch-serverless-openapi.json | 6 +++--- output/schema/schema.json | 6 +++--- output/typescript/types.ts | 6 +++--- specification/inference/_types/Services.ts | 2 +- specification/inference/get/GetResponse.ts | 4 ++-- specification/inference/put/PutResponse.ts | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 555e299981..8545007008 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -21125,7 +21125,7 @@ "endpoints": { "type": "array", "items": { - "$ref": "#/components/schemas/inference._types:InferenceEndpointContainer" + "$ref": "#/components/schemas/inference._types:InferenceEndpointInfo" } } }, @@ -21151,7 +21151,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/inference._types:InferenceEndpointContainer" + "$ref": "#/components/schemas/inference._types:InferenceEndpointInfo" } } } @@ -52291,7 +52291,7 @@ "completion" ] }, - "inference._types:InferenceEndpointContainer": { + "inference._types:InferenceEndpointInfo": { "allOf": [ { "$ref": "#/components/schemas/inference._types:InferenceEndpoint" diff --git a/output/schema/schema.json b/output/schema/schema.json index 699f4d8500..d0311ed22a 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -134206,7 +134206,7 @@ }, "kind": "interface", "name": { - "name": "InferenceEndpointContainer", + "name": "InferenceEndpointInfo", "namespace": "inference._types" }, "properties": [ @@ -134627,7 +134627,7 @@ "value": { "kind": "instance_of", "type": { - "name": "InferenceEndpointContainer", + "name": "InferenceEndpointInfo", "namespace": "inference._types" } } @@ -134837,7 +134837,7 @@ "value": { "kind": "instance_of", "type": { - "name": "InferenceEndpointContainer", + "name": "InferenceEndpointInfo", "namespace": "inference._types" } } diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 7e3a457fce..fd9a8321df 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -12064,7 +12064,7 @@ export interface InferenceInferenceEndpoint { task_settings: InferenceTaskSettings } -export interface InferenceInferenceEndpointContainer extends InferenceInferenceEndpoint { +export interface InferenceInferenceEndpointInfo extends InferenceInferenceEndpoint { inference_id: string task_type: InferenceTaskType } @@ -12116,7 +12116,7 @@ export interface InferenceGetRequest extends RequestBase { } export interface InferenceGetResponse { - endpoints: InferenceInferenceEndpointContainer[] + endpoints: InferenceInferenceEndpointInfo[] } export interface InferenceInferenceRequest extends RequestBase { @@ -12138,7 +12138,7 @@ export interface InferencePutRequest extends RequestBase { body?: InferenceInferenceEndpoint } -export type InferencePutResponse = InferenceInferenceEndpointContainer +export type InferencePutResponse = InferenceInferenceEndpointInfo export interface IngestAppendProcessor extends IngestProcessorBase { field: Field diff --git a/specification/inference/_types/Services.ts b/specification/inference/_types/Services.ts index 96fccb4266..a0dfd137a2 100644 --- a/specification/inference/_types/Services.ts +++ b/specification/inference/_types/Services.ts @@ -41,7 +41,7 @@ export class InferenceEndpoint { /** * Represents an inference endpoint as returned by the GET API */ -export class InferenceEndpointContainer extends InferenceEndpoint { +export class InferenceEndpointInfo extends InferenceEndpoint { /** * The inference Id */ diff --git a/specification/inference/get/GetResponse.ts b/specification/inference/get/GetResponse.ts index f2da5c550d..3561098ebf 100644 --- a/specification/inference/get/GetResponse.ts +++ b/specification/inference/get/GetResponse.ts @@ -17,10 +17,10 @@ * under the License. */ -import { InferenceEndpointContainer } from '@inference/_types/Services' +import { InferenceEndpointInfo } from '@inference/_types/Services' export class Response { body: { - endpoints: Array + endpoints: Array } } diff --git a/specification/inference/put/PutResponse.ts b/specification/inference/put/PutResponse.ts index f08fb59869..d40639b031 100644 --- a/specification/inference/put/PutResponse.ts +++ b/specification/inference/put/PutResponse.ts @@ -17,8 +17,8 @@ * under the License. */ -import { InferenceEndpointContainer } from '@inference/_types/Services' +import { InferenceEndpointInfo } from '@inference/_types/Services' export class Response { - body: InferenceEndpointContainer + body: InferenceEndpointInfo } From 2731ca86d53fc032b7af96f2808e9df3e10e0362 Mon Sep 17 00:00:00 2001 From: Nikolaj Volgushev Date: Tue, 7 May 2024 15:38:22 +0200 Subject: [PATCH 3/5] API specification changes for custom roles (#2491) --- .../elasticsearch-serverless-openapi.json | 343 ++++++++++++++++-- output/schema/schema.json | 146 ++++++-- output/schema/schema/schema.json | 133 ++++++- output/schema/validation-errors.json | 11 + output/typescript/types.ts | 2 +- specification/security/_types/Privileges.ts | 99 ++++- .../get_role/SecurityGetRoleRequest.ts | 2 +- .../put_role/SecurityPutRoleRequest.ts | 5 +- 8 files changed, 659 insertions(+), 82 deletions(-) diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 8545007008..54ef09fde2 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -17568,6 +17568,101 @@ } } }, + "/_security/role/{name}": { + "get": { + "tags": [ + "security.get_role" + ], + "summary": "Retrieves roles in the native realm.", + "description": "Retrieves roles in the native realm.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html" + }, + "operationId": "security-get-role", + "parameters": [ + { + "$ref": "#/components/parameters/security.get_role#name" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/security.get_role#200" + } + } + }, + "put": { + "tags": [ + "security.put_role" + ], + "summary": "Adds and updates roles in the native realm.", + "description": "Adds and updates roles in the native realm.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html" + }, + "operationId": "security-put-role", + "parameters": [ + { + "$ref": "#/components/parameters/security.put_role#name" + }, + { + "$ref": "#/components/parameters/security.put_role#refresh" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/security.put_role" + }, + "responses": { + "200": { + "$ref": "#/components/responses/security.put_role#200" + } + } + }, + "post": { + "tags": [ + "security.put_role" + ], + "summary": "Adds and updates roles in the native realm.", + "description": "Adds and updates roles in the native realm.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html" + }, + "operationId": "security-put-role-1", + "parameters": [ + { + "$ref": "#/components/parameters/security.put_role#name" + }, + { + "$ref": "#/components/parameters/security.put_role#refresh" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/security.put_role" + }, + "responses": { + "200": { + "$ref": "#/components/responses/security.put_role#200" + } + } + } + }, + "/_security/role": { + "get": { + "tags": [ + "security.get_role" + ], + "summary": "Retrieves roles in the native realm.", + "description": "Retrieves roles in the native realm.", + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html" + }, + "operationId": "security-get-role-1", + "responses": { + "200": { + "$ref": "#/components/responses/security.get_role#200" + } + } + } + }, "/_security/user/_has_privileges": { "get": { "tags": [ @@ -21849,6 +21944,19 @@ } } }, + "security.get_role#200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/security.get_role:Role" + } + } + } + } + }, "security.has_privileges#200": { "description": "", "content": { @@ -21889,6 +21997,24 @@ } } }, + "security.put_role#200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "role": { + "$ref": "#/components/schemas/security._types:CreatedStatus" + } + }, + "required": [ + "role" + ] + } + } + } + }, "security.query_api_keys#200": { "description": "", "content": { @@ -26976,6 +27102,17 @@ }, "style": "form" }, + "security.get_role#name": { + "in": "path", + "name": "name", + "description": "The name of the role. You can specify multiple roles as a comma-separated list. If you do not specify this parameter, the API returns information about all roles.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Names" + }, + "style": "simple" + }, "security.has_privileges#user": { "in": "path", "name": "user", @@ -26987,6 +27124,27 @@ }, "style": "simple" }, + "security.put_role#name": { + "in": "path", + "name": "name", + "description": "The name of the role.", + "required": true, + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Name" + }, + "style": "simple" + }, + "security.put_role#refresh": { + "in": "query", + "name": "refresh", + "description": "If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.", + "deprecated": false, + "schema": { + "$ref": "#/components/schemas/_types:Refresh" + }, + "style": "form" + }, "security.query_api_keys#with_limited_by": { "in": "query", "name": "with_limited_by", @@ -28743,6 +28901,59 @@ }, "required": true }, + "security.put_role": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "applications": { + "description": "A list of application privilege entries.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types:ApplicationPrivileges" + } + }, + "cluster": { + "description": "A list of cluster privileges. These privileges define the cluster-level actions for users with this role.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types:ClusterPrivilege" + } + }, + "indices": { + "description": "A list of indices permissions entries.", + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types:IndicesPrivileges" + } + }, + "metadata": { + "$ref": "#/components/schemas/_types:Metadata" + }, + "run_as": { + "externalDocs": { + "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/run-as-privilege.html" + }, + "description": "A list of users that the owners of this role can impersonate. *Note*: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty `run_as` field, but a non-empty list will be rejected.", + "type": "array", + "items": { + "type": "string" + } + }, + "transient_metadata": { + "description": "Indicates roles that might be incompatible with the current cluster license, specifically roles with document and field level security. When the cluster license doesn’t allow certain features for a given role, this parameter is updated dynamically to list the incompatible features. If `enabled` is `false`, the role is ignored, but is still listed in the response from the authenticate API.", + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + } + } + }, + "required": true + }, "security.query_api_keys": { "content": { "application/json": { @@ -59808,10 +60019,6 @@ }, "query": { "$ref": "#/components/schemas/security._types:IndicesPrivilegesQuery" - }, - "allow_restricted_indices": { - "description": "Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`.", - "type": "boolean" } }, "required": [ @@ -59846,13 +60053,9 @@ "maintenance", "manage", "manage_data_stream_lifecycle", - "manage_follow_index", - "manage_ilm", - "manage_leader_index", "monitor", "none", "read", - "read_cross_cluster", "view_index_metadata", "write" ] @@ -60019,6 +60222,93 @@ "name" ] }, + "security.get_role:Role": { + "type": "object", + "properties": { + "cluster": { + "type": "array", + "items": { + "type": "string" + } + }, + "indices": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types:IndicesPrivileges" + } + }, + "metadata": { + "$ref": "#/components/schemas/_types:Metadata" + }, + "run_as": { + "type": "array", + "items": { + "type": "string" + } + }, + "transient_metadata": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "applications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types:ApplicationPrivileges" + } + }, + "role_templates": { + "type": "array", + "items": { + "$ref": "#/components/schemas/security._types:RoleTemplate" + } + }, + "global": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "object", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + }, + "required": [ + "cluster", + "indices", + "metadata", + "run_as", + "applications" + ] + }, + "security._types:RoleTemplate": { + "type": "object", + "properties": { + "format": { + "$ref": "#/components/schemas/security._types:TemplateFormat" + }, + "template": { + "$ref": "#/components/schemas/_types:Script" + } + }, + "required": [ + "template" + ] + }, + "security._types:TemplateFormat": { + "type": "string", + "enum": [ + "string", + "json" + ] + }, "security.has_privileges:ApplicationPrivilegesCheck": { "type": "object", "properties": { @@ -60052,57 +60342,33 @@ "enum": [ "all", "cancel_task", - "create_snapshot", - "cross_cluster_replication", - "cross_cluster_search", - "delegate_pki", - "grant_api_key", "manage", "manage_api_key", - "manage_autoscaling", "manage_behavioral_analytics", - "manage_ccr", "manage_data_frame_transforms", "manage_data_stream_global_retention", "manage_enrich", - "manage_ilm", "manage_index_templates", - "manage_inference", "manage_ingest_pipelines", "manage_logstash_pipelines", "manage_ml", - "manage_oidc", "manage_own_api_key", "manage_pipeline", - "manage_rollup", - "manage_saml", "manage_search_application", "manage_search_query_rules", "manage_search_synonyms", "manage_security", - "manage_service_account", - "manage_slm", - "manage_token", "manage_transform", - "manage_user_profile", - "manage_watcher", "monitor", "monitor_data_frame_transforms", "monitor_data_stream_global_retention", "monitor_enrich", "monitor_inference", "monitor_ml", - "monitor_rollup", - "monitor_snapshot", - "monitor_text_structure", "monitor_transform", - "monitor_watcher", + "read_pipeline", "none", "post_behavioral_analytics_event", - "read_ccr", - "read_connector_secrets", - "read_fleet_secrets", - "read_ilm", "read_pipeline", "read_security", "read_slm", @@ -60152,6 +60418,17 @@ "type": "boolean" } }, + "security._types:CreatedStatus": { + "type": "object", + "properties": { + "created": { + "type": "boolean" + } + }, + "required": [ + "created" + ] + }, "security.query_api_keys:ApiKeyAggregationContainer": { "allOf": [ { diff --git a/output/schema/schema.json b/output/schema/schema.json index d0311ed22a..ccd36de80a 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -16285,7 +16285,7 @@ "availability": { "serverless": { "stability": "stable", - "visibility": "private" + "visibility": "public" }, "stack": { "since": "0.0.0", @@ -17030,7 +17030,7 @@ "availability": { "serverless": { "stability": "stable", - "visibility": "private" + "visibility": "public" }, "stack": { "since": "0.0.0", @@ -177861,7 +177861,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L218-L220" + "specLocation": "security/_types/Privileges.ts#L307-L309" }, { "kind": "interface", @@ -177947,20 +177947,35 @@ "name": "cancel_task" }, { + "availability": { + "stack": {} + }, "name": "create_snapshot" }, { + "availability": { + "stack": {} + }, + "name": "grant_api_key" + }, + { + "availability": { + "stack": {} + }, "name": "cross_cluster_replication" }, { + "availability": { + "stack": {} + }, "name": "cross_cluster_search" }, { + "availability": { + "stack": {} + }, "name": "delegate_pki" }, - { - "name": "grant_api_key" - }, { "name": "manage" }, @@ -177968,12 +177983,18 @@ "name": "manage_api_key" }, { + "availability": { + "stack": {} + }, "name": "manage_autoscaling" }, { "name": "manage_behavioral_analytics" }, { + "availability": { + "stack": {} + }, "name": "manage_ccr" }, { @@ -177986,12 +178007,18 @@ "name": "manage_enrich" }, { + "availability": { + "stack": {} + }, "name": "manage_ilm" }, { "name": "manage_index_templates" }, { + "availability": { + "stack": {} + }, "name": "manage_inference" }, { @@ -178004,6 +178031,9 @@ "name": "manage_ml" }, { + "availability": { + "stack": {} + }, "name": "manage_oidc" }, { @@ -178013,9 +178043,15 @@ "name": "manage_pipeline" }, { + "availability": { + "stack": {} + }, "name": "manage_rollup" }, { + "availability": { + "stack": {} + }, "name": "manage_saml" }, { @@ -178031,21 +178067,36 @@ "name": "manage_security" }, { + "availability": { + "stack": {} + }, "name": "manage_service_account" }, { + "availability": { + "stack": {} + }, "name": "manage_slm" }, { + "availability": { + "stack": {} + }, "name": "manage_token" }, { "name": "manage_transform" }, { + "availability": { + "stack": {} + }, "name": "manage_user_profile" }, { + "availability": { + "stack": {} + }, "name": "manage_watcher" }, { @@ -178067,37 +178118,64 @@ "name": "monitor_ml" }, { + "availability": { + "stack": {} + }, "name": "monitor_rollup" }, { + "availability": { + "stack": {} + }, "name": "monitor_snapshot" }, { + "availability": { + "stack": {} + }, "name": "monitor_text_structure" }, { "name": "monitor_transform" }, { + "availability": { + "stack": {} + }, "name": "monitor_watcher" }, { - "name": "none" + "availability": { + "stack": {} + }, + "name": "read_ccr" }, { - "name": "post_behavioral_analytics_event" + "availability": { + "stack": {} + }, + "name": "read_ilm" }, { - "name": "read_ccr" + "name": "read_pipeline" }, { - "name": "read_connector_secrets" + "availability": { + "stack": {} + }, + "name": "read_slm" }, { - "name": "read_fleet_secrets" + "availability": { + "stack": {} + }, + "name": "transport_client" }, { - "name": "read_ilm" + "name": "none" + }, + { + "name": "post_behavioral_analytics_event" }, { "name": "read_pipeline" @@ -178122,7 +178200,7 @@ "name": "ClusterPrivilege", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L41-L102" + "specLocation": "security/_types/Privileges.ts#L41-L178" }, { "kind": "interface", @@ -178243,7 +178321,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L214-L216" + "specLocation": "security/_types/Privileges.ts#L303-L305" }, { "kind": "enum", @@ -178307,12 +178385,21 @@ "name": "manage_data_stream_lifecycle" }, { + "availability": { + "stack": {} + }, "name": "manage_follow_index" }, { + "availability": { + "stack": {} + }, "name": "manage_ilm" }, { + "availability": { + "stack": {} + }, "name": "manage_leader_index" }, { @@ -178325,6 +178412,9 @@ "name": "read" }, { + "availability": { + "stack": {} + }, "name": "read_cross_cluster" }, { @@ -178338,7 +178428,7 @@ "name": "IndexPrivilege", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L188-L212" + "specLocation": "security/_types/Privileges.ts#L265-L301" }, { "kind": "interface", @@ -178401,6 +178491,9 @@ } }, { + "availability": { + "stack": {} + }, "description": "Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`.", "name": "allow_restricted_indices", "required": false, @@ -178414,7 +178507,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L104-L127" + "specLocation": "security/_types/Privileges.ts#L180-L204" }, { "codegenNames": [ @@ -178428,7 +178521,7 @@ "name": "IndicesPrivilegesQuery", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L153-L161", + "specLocation": "security/_types/Privileges.ts#L230-L238", "type": { "items": [ { @@ -178478,7 +178571,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L222-L224" + "specLocation": "security/_types/Privileges.ts#L311-L313" }, { "kind": "interface", @@ -178972,7 +179065,7 @@ "name": "RoleTemplateInlineQuery", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L182-L183", + "specLocation": "security/_types/Privileges.ts#L259-L260", "type": { "items": [ { @@ -179052,7 +179145,7 @@ } ], "shortcutProperty": "source", - "specLocation": "security/_types/Privileges.ts#L175-L180" + "specLocation": "security/_types/Privileges.ts#L252-L257" }, { "kind": "interface", @@ -179076,7 +179169,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L163-L173" + "specLocation": "security/_types/Privileges.ts#L240-L250" }, { "codegenNames": [ @@ -179088,7 +179181,7 @@ "name": "RoleTemplateScript", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L185-L186", + "specLocation": "security/_types/Privileges.ts#L262-L263", "type": { "items": [ { @@ -179318,7 +179411,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L129-L151" + "specLocation": "security/_types/Privileges.ts#L206-L228" }, { "kind": "interface", @@ -184675,6 +184768,9 @@ } }, { + "availability": { + "stack": {} + }, "description": "An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware. Support for global privileges is currently limited to the management of application privileges.", "name": "global", "required": false, @@ -184721,7 +184817,7 @@ } }, { - "description": "A list of users that the owners of this role can impersonate.", + "description": "A list of users that the owners of this role can impersonate. *Note*: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty `run_as` field, but a non-empty list will be rejected.", "docId": "run-as-privilege", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/run-as-privilege.html", "name": "run_as", @@ -184798,7 +184894,7 @@ } } ], - "specLocation": "security/put_role/SecurityPutRoleRequest.ts#L30-L79" + "specLocation": "security/put_role/SecurityPutRoleRequest.ts#L30-L80" }, { "body": { diff --git a/output/schema/schema/schema.json b/output/schema/schema/schema.json index b2ad8759b3..00855ae086 100644 --- a/output/schema/schema/schema.json +++ b/output/schema/schema/schema.json @@ -16003,7 +16003,7 @@ "availability": { "serverless": { "stability": "stable", - "visibility": "private" + "visibility": "public" }, "stack": { "since": "0.0.0", @@ -16748,7 +16748,7 @@ "availability": { "serverless": { "stability": "stable", - "visibility": "private" + "visibility": "public" }, "stack": { "since": "0.0.0", @@ -129989,6 +129989,21 @@ "namespace": "_types" } } +<<<<<<< HEAD + }, + { + "description": "The configuration option ignore_missing_component_templates can be used when an index template\nreferences a component template that might not exist", + "name": "ignore_missing_component_templates", + "required": false, + "type": { + "kind": "array_of", + "value": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } +======= }, { "description": "The configuration option ignore_missing_component_templates can be used when an index template\nreferences a component template that might not exist", @@ -130014,6 +130029,7 @@ "type": { "name": "boolean", "namespace": "_builtins" +>>>>>>> main } } } @@ -130097,7 +130113,11 @@ } } ], +<<<<<<< HEAD + "specLocation": "indices/simulate_template/IndicesSimulateTemplateRequest.ts#L27-L114" +======= "specLocation": "indices/simulate_template/IndicesSimulateTemplateRequest.ts#L27-L119" +>>>>>>> main }, { "body": { @@ -133385,6 +133405,10 @@ } } ], +<<<<<<< HEAD + "query": [], + "specLocation": "inference/inference/InferenceRequest.ts#L25-L58" +======= "query": [ { "description": "Specifies the amount of time to wait for the inference request to complete.", @@ -133401,6 +133425,7 @@ } ], "specLocation": "inference/inference/InferenceRequest.ts#L26-L66" +>>>>>>> main }, { "body": { @@ -176506,7 +176531,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L193-L195" + "specLocation": "security/_types/Privileges.ts#L266-L268" }, { "kind": "interface", @@ -176592,9 +176617,15 @@ "name": "cancel_task" }, { + "availability": { + "stack": {} + }, "name": "create_snapshot" }, { + "availability": { + "stack": {} + }, "name": "grant_api_key" }, { @@ -176604,18 +176635,27 @@ "name": "manage_api_key" }, { + "availability": { + "stack": {} + }, "name": "manage_ccr" }, { "name": "manage_enrich" }, { + "availability": { + "stack": {} + }, "name": "manage_ilm" }, { "name": "manage_index_templates" }, { + "availability": { + "stack": {} + }, "name": "manage_ingest_pipelines" }, { @@ -176625,6 +176665,9 @@ "name": "manage_ml" }, { + "availability": { + "stack": {} + }, "name": "manage_oidc" }, { @@ -176634,30 +176677,51 @@ "name": "manage_pipeline" }, { + "availability": { + "stack": {} + }, "name": "manage_rollup" }, { + "availability": { + "stack": {} + }, "name": "manage_saml" }, { "name": "manage_security" }, { + "availability": { + "stack": {} + }, "name": "manage_service_account" }, { + "availability": { + "stack": {} + }, "name": "manage_slm" }, { + "availability": { + "stack": {} + }, "name": "manage_token" }, { "name": "manage_transform" }, { + "availability": { + "stack": {} + }, "name": "manage_user_profile" }, { + "availability": { + "stack": {} + }, "name": "manage_watcher" }, { @@ -176667,9 +176731,15 @@ "name": "monitor_ml" }, { + "availability": { + "stack": {} + }, "name": "monitor_rollup" }, { + "availability": { + "stack": {} + }, "name": "monitor_snapshot" }, { @@ -176679,21 +176749,36 @@ "name": "monitor_transform" }, { + "availability": { + "stack": {} + }, "name": "monitor_watcher" }, { + "availability": { + "stack": {} + }, "name": "read_ccr" }, { + "availability": { + "stack": {} + }, "name": "read_ilm" }, { "name": "read_pipeline" }, { + "availability": { + "stack": {} + }, "name": "read_slm" }, { + "availability": { + "stack": {} + }, "name": "transport_client" } ], @@ -176701,7 +176786,7 @@ "name": "ClusterPrivilege", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L41-L80" + "specLocation": "security/_types/Privileges.ts#L41-L140" }, { "kind": "interface", @@ -176822,7 +176907,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L189-L191" + "specLocation": "security/_types/Privileges.ts#L262-L264" }, { "kind": "enum", @@ -176880,12 +176965,21 @@ "name": "manage" }, { + "availability": { + "stack": {} + }, "name": "manage_follow_index" }, { + "availability": { + "stack": {} + }, "name": "manage_ilm" }, { + "availability": { + "stack": {} + }, "name": "manage_leader_index" }, { @@ -176895,6 +176989,9 @@ "name": "read" }, { + "availability": { + "stack": {} + }, "name": "read_cross_cluster" }, { @@ -176908,7 +177005,7 @@ "name": "IndexPrivilege", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L166-L187" + "specLocation": "security/_types/Privileges.ts#L227-L260" }, { "kind": "interface", @@ -176971,6 +177068,9 @@ } }, { + "availability": { + "stack": {} + }, "description": "Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`.", "name": "allow_restricted_indices", "required": false, @@ -176984,7 +177084,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L82-L105" + "specLocation": "security/_types/Privileges.ts#L142-L166" }, { "codegenNames": [ @@ -176998,7 +177098,7 @@ "name": "IndicesPrivilegesQuery", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L131-L139", + "specLocation": "security/_types/Privileges.ts#L192-L200", "type": { "items": [ { @@ -177048,7 +177148,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L197-L199" + "specLocation": "security/_types/Privileges.ts#L270-L272" }, { "kind": "interface", @@ -177542,7 +177642,7 @@ "name": "RoleTemplateInlineQuery", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L160-L161", + "specLocation": "security/_types/Privileges.ts#L221-L222", "type": { "items": [ { @@ -177622,7 +177722,7 @@ } ], "shortcutProperty": "source", - "specLocation": "security/_types/Privileges.ts#L153-L158" + "specLocation": "security/_types/Privileges.ts#L214-L219" }, { "kind": "interface", @@ -177646,7 +177746,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L141-L151" + "specLocation": "security/_types/Privileges.ts#L202-L212" }, { "codegenNames": [ @@ -177658,7 +177758,7 @@ "name": "RoleTemplateScript", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L163-L164", + "specLocation": "security/_types/Privileges.ts#L224-L225", "type": { "items": [ { @@ -177888,7 +177988,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L107-L129" + "specLocation": "security/_types/Privileges.ts#L168-L190" }, { "kind": "interface", @@ -183245,6 +183345,9 @@ } }, { + "availability": { + "stack": {} + }, "description": "An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware. Support for global privileges is currently limited to the management of application privileges.", "name": "global", "required": false, @@ -183368,7 +183471,7 @@ } } ], - "specLocation": "security/put_role/SecurityPutRoleRequest.ts#L30-L79" + "specLocation": "security/put_role/SecurityPutRoleRequest.ts#L30-L80" }, { "body": { diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 5cea2e671c..4bfea48167 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -1292,6 +1292,17 @@ ], "response": [] }, + "security.has_privileges": { + "request": [ + "enum definition security._types:ClusterPrivilege - Duplicate enum member codegen_name 'read_pipeline'", + "enum definition security._types:ClusterPrivilege - Duplicate enum member name 'read_pipeline'", + "enum definition security._types:ClusterPrivilege - Duplicate enum member codegen_name 'read_slm'", + "enum definition security._types:ClusterPrivilege - Duplicate enum member name 'read_slm'", + "enum definition security._types:ClusterPrivilege - Duplicate enum member codegen_name 'transport_client'", + "enum definition security._types:ClusterPrivilege - Duplicate enum member name 'transport_client'" + ], + "response": [] + }, "security.oidc_authenticate": { "request": [ "Missing request & response" diff --git a/output/typescript/types.ts b/output/typescript/types.ts index fd9a8321df..3adab7cab1 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -16714,7 +16714,7 @@ export interface SecurityClusterNode { name: Name } -export type SecurityClusterPrivilege = 'all' | 'cancel_task' | 'create_snapshot' | 'cross_cluster_replication' | 'cross_cluster_search' | 'delegate_pki' | 'grant_api_key' | 'manage' | 'manage_api_key' | 'manage_autoscaling' | 'manage_behavioral_analytics' | 'manage_ccr' | 'manage_data_frame_transforms' | 'manage_data_stream_global_retention' | 'manage_enrich' | 'manage_ilm' | 'manage_index_templates' | 'manage_inference' | 'manage_ingest_pipelines' | 'manage_logstash_pipelines' | 'manage_ml' | 'manage_oidc' | 'manage_own_api_key' | 'manage_pipeline' | 'manage_rollup' | 'manage_saml' | 'manage_search_application' | 'manage_search_query_rules' | 'manage_search_synonyms' | 'manage_security' | 'manage_service_account' | 'manage_slm' | 'manage_token' | 'manage_transform' | 'manage_user_profile' | 'manage_watcher' | 'monitor' | 'monitor_data_frame_transforms' | 'monitor_data_stream_global_retention' | 'monitor_enrich' | 'monitor_inference' | 'monitor_ml' | 'monitor_rollup' | 'monitor_snapshot' | 'monitor_text_structure' | 'monitor_transform' | 'monitor_watcher' | 'none' | 'post_behavioral_analytics_event' | 'read_ccr' | 'read_connector_secrets' | 'read_fleet_secrets' | 'read_ilm' | 'read_pipeline' | 'read_security' | 'read_slm' | 'transport_client' | 'write_connector_secrets' | 'write_fleet_secrets'| string +export type SecurityClusterPrivilege = 'all' | 'cancel_task' | 'create_snapshot' | 'grant_api_key' | 'cross_cluster_replication' | 'cross_cluster_search' | 'delegate_pki' | 'manage' | 'manage_api_key' | 'manage_autoscaling' | 'manage_behavioral_analytics' | 'manage_ccr' | 'manage_data_frame_transforms' | 'manage_data_stream_global_retention' | 'manage_enrich' | 'manage_ilm' | 'manage_index_templates' | 'manage_inference' | 'manage_ingest_pipelines' | 'manage_logstash_pipelines' | 'manage_ml' | 'manage_oidc' | 'manage_own_api_key' | 'manage_pipeline' | 'manage_rollup' | 'manage_saml' | 'manage_search_application' | 'manage_search_query_rules' | 'manage_search_synonyms' | 'manage_security' | 'manage_service_account' | 'manage_slm' | 'manage_token' | 'manage_transform' | 'manage_user_profile' | 'manage_watcher' | 'monitor' | 'monitor_data_frame_transforms' | 'monitor_data_stream_global_retention' | 'monitor_enrich' | 'monitor_inference' | 'monitor_ml' | 'monitor_rollup' | 'monitor_snapshot' | 'monitor_text_structure' | 'monitor_transform' | 'monitor_watcher' | 'read_ccr' | 'read_ilm' | 'read_pipeline' | 'read_slm' | 'transport_client' | 'none' | 'post_behavioral_analytics_event' | 'read_pipeline' | 'read_security' | 'read_slm' | 'transport_client' | 'write_connector_secrets' | 'write_fleet_secrets'| string export interface SecurityCreatedStatus { created: boolean diff --git a/specification/security/_types/Privileges.ts b/specification/security/_types/Privileges.ts index d013df8308..a5c6d479b6 100644 --- a/specification/security/_types/Privileges.ts +++ b/specification/security/_types/Privileges.ts @@ -42,39 +42,90 @@ export class ApplicationPrivileges { export enum ClusterPrivilege { all, cancel_task, + /** + * @availability stack + */ create_snapshot, + /** + * @availability stack + */ + grant_api_key, + /** + * @availability stack + */ cross_cluster_replication, + /** + * @availability stack + */ cross_cluster_search, + /** + * @availability stack + */ delegate_pki, - grant_api_key, manage, manage_api_key, + /** + * @availability stack + */ manage_autoscaling, manage_behavioral_analytics, + /** + * @availability stack + */ manage_ccr, manage_data_frame_transforms, manage_data_stream_global_retention, manage_enrich, + /** + * @availability stack + */ manage_ilm, manage_index_templates, + /** + * @availability stack + */ manage_inference, manage_ingest_pipelines, manage_logstash_pipelines, manage_ml, + /** + * @availability stack + */ manage_oidc, manage_own_api_key, manage_pipeline, + /** + * @availability stack + */ manage_rollup, + /** + * @availability stack + */ manage_saml, manage_search_application, manage_search_query_rules, manage_search_synonyms, manage_security, + /** + * @availability stack + */ manage_service_account, + /** + * @availability stack + */ manage_slm, + /** + * @availability stack + */ manage_token, manage_transform, + /** + * @availability stack + */ manage_user_profile, + /** + * @availability stack + */ manage_watcher, monitor, monitor_data_frame_transforms, @@ -82,18 +133,43 @@ export enum ClusterPrivilege { monitor_enrich, monitor_inference, monitor_ml, + /** + * @availability stack + */ monitor_rollup, + /** + * @availability stack + */ monitor_snapshot, + /** + * @availability stack + */ monitor_text_structure, monitor_transform, + /** + * @availability stack + */ monitor_watcher, - none, - post_behavioral_analytics_event, + /** + * @availability stack + */ read_ccr, - read_connector_secrets, - read_fleet_secrets, + /** + * @availability stack + */ read_ilm, read_pipeline, + /** + * @availability stack + */ + read_slm, + /** + * @availability stack + */ + transport_client, + none, + post_behavioral_analytics_event, + read_pipeline, read_security, read_slm, transport_client, @@ -122,6 +198,7 @@ export class IndicesPrivileges { /** * Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`. * @server_default false + * @availability stack */ allow_restricted_indices?: boolean } @@ -200,12 +277,24 @@ export enum IndexPrivilege { maintenance, manage, manage_data_stream_lifecycle, + /** + * @availability stack + */ manage_follow_index, + /** + * @availability stack + */ manage_ilm, + /** + * @availability stack + */ manage_leader_index, monitor, none, read, + /** + * @availability stack + */ read_cross_cluster, view_index_metadata, write diff --git a/specification/security/get_role/SecurityGetRoleRequest.ts b/specification/security/get_role/SecurityGetRoleRequest.ts index f981198896..dead7d4477 100644 --- a/specification/security/get_role/SecurityGetRoleRequest.ts +++ b/specification/security/get_role/SecurityGetRoleRequest.ts @@ -25,7 +25,7 @@ import { Names } from '@_types/common' * The get roles API cannot retrieve roles that are defined in roles files. * @rest_spec_name security.get_role * @availability stack since=0.0.0 stability=stable - * @availability serverless stability=stable visibility=private + * @availability serverless stability=stable visibility=public * @cluster_privileges manage_security */ export interface Request extends RequestBase { diff --git a/specification/security/put_role/SecurityPutRoleRequest.ts b/specification/security/put_role/SecurityPutRoleRequest.ts index 4a0c8656b1..2d5177bb5a 100644 --- a/specification/security/put_role/SecurityPutRoleRequest.ts +++ b/specification/security/put_role/SecurityPutRoleRequest.ts @@ -32,7 +32,7 @@ import { Metadata, Name, Refresh } from '@_types/common' * The create or update roles API cannot update roles that are defined in roles files. * @rest_spec_name security.put_role * @availability stack since=0.0.0 stability=stable - * @availability serverless stability=stable visibility=private + * @availability serverless stability=stable visibility=public * @cluster_privileges manage_security */ export interface Request extends RequestBase { @@ -56,6 +56,7 @@ export interface Request extends RequestBase { cluster?: ClusterPrivilege[] /** * An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware. Support for global privileges is currently limited to the management of application privileges. + * @availability stack */ global?: Dictionary /** @@ -67,7 +68,7 @@ export interface Request extends RequestBase { */ metadata?: Metadata /** - * A list of users that the owners of this role can impersonate. + * A list of users that the owners of this role can impersonate. *Note*: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty `run_as` field, but a non-empty list will be rejected. * @doc_id run-as-privilege */ run_as?: string[] From 8d0b9be127b5ca759345e10ea9d571a7ea352b6f Mon Sep 17 00:00:00 2001 From: Nikolaj Volgushev Date: Tue, 7 May 2024 16:15:29 +0200 Subject: [PATCH 4/5] Revert "API specification changes for custom roles (#2491)" (#2546) This reverts commit 2731ca86d53fc032b7af96f2808e9df3e10e0362. --- .../elasticsearch-serverless-openapi.json | 343 ++---------------- output/schema/schema.json | 146 ++------ output/schema/schema/schema.json | 133 +------ output/schema/validation-errors.json | 11 - output/typescript/types.ts | 2 +- specification/security/_types/Privileges.ts | 99 +---- .../get_role/SecurityGetRoleRequest.ts | 2 +- .../put_role/SecurityPutRoleRequest.ts | 5 +- 8 files changed, 82 insertions(+), 659 deletions(-) diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 54ef09fde2..8545007008 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -17568,101 +17568,6 @@ } } }, - "/_security/role/{name}": { - "get": { - "tags": [ - "security.get_role" - ], - "summary": "Retrieves roles in the native realm.", - "description": "Retrieves roles in the native realm.", - "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html" - }, - "operationId": "security-get-role", - "parameters": [ - { - "$ref": "#/components/parameters/security.get_role#name" - } - ], - "responses": { - "200": { - "$ref": "#/components/responses/security.get_role#200" - } - } - }, - "put": { - "tags": [ - "security.put_role" - ], - "summary": "Adds and updates roles in the native realm.", - "description": "Adds and updates roles in the native realm.", - "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html" - }, - "operationId": "security-put-role", - "parameters": [ - { - "$ref": "#/components/parameters/security.put_role#name" - }, - { - "$ref": "#/components/parameters/security.put_role#refresh" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/security.put_role" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.put_role#200" - } - } - }, - "post": { - "tags": [ - "security.put_role" - ], - "summary": "Adds and updates roles in the native realm.", - "description": "Adds and updates roles in the native realm.", - "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-role.html" - }, - "operationId": "security-put-role-1", - "parameters": [ - { - "$ref": "#/components/parameters/security.put_role#name" - }, - { - "$ref": "#/components/parameters/security.put_role#refresh" - } - ], - "requestBody": { - "$ref": "#/components/requestBodies/security.put_role" - }, - "responses": { - "200": { - "$ref": "#/components/responses/security.put_role#200" - } - } - } - }, - "/_security/role": { - "get": { - "tags": [ - "security.get_role" - ], - "summary": "Retrieves roles in the native realm.", - "description": "Retrieves roles in the native realm.", - "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-role.html" - }, - "operationId": "security-get-role-1", - "responses": { - "200": { - "$ref": "#/components/responses/security.get_role#200" - } - } - } - }, "/_security/user/_has_privileges": { "get": { "tags": [ @@ -21944,19 +21849,6 @@ } } }, - "security.get_role#200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/security.get_role:Role" - } - } - } - } - }, "security.has_privileges#200": { "description": "", "content": { @@ -21997,24 +21889,6 @@ } } }, - "security.put_role#200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "role": { - "$ref": "#/components/schemas/security._types:CreatedStatus" - } - }, - "required": [ - "role" - ] - } - } - } - }, "security.query_api_keys#200": { "description": "", "content": { @@ -27102,17 +26976,6 @@ }, "style": "form" }, - "security.get_role#name": { - "in": "path", - "name": "name", - "description": "The name of the role. You can specify multiple roles as a comma-separated list. If you do not specify this parameter, the API returns information about all roles.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types:Names" - }, - "style": "simple" - }, "security.has_privileges#user": { "in": "path", "name": "user", @@ -27124,27 +26987,6 @@ }, "style": "simple" }, - "security.put_role#name": { - "in": "path", - "name": "name", - "description": "The name of the role.", - "required": true, - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types:Name" - }, - "style": "simple" - }, - "security.put_role#refresh": { - "in": "query", - "name": "refresh", - "description": "If `true` (the default) then refresh the affected shards to make this operation visible to search, if `wait_for` then wait for a refresh to make this operation visible to search, if `false` then do nothing with refreshes.", - "deprecated": false, - "schema": { - "$ref": "#/components/schemas/_types:Refresh" - }, - "style": "form" - }, "security.query_api_keys#with_limited_by": { "in": "query", "name": "with_limited_by", @@ -28901,59 +28743,6 @@ }, "required": true }, - "security.put_role": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "applications": { - "description": "A list of application privilege entries.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types:ApplicationPrivileges" - } - }, - "cluster": { - "description": "A list of cluster privileges. These privileges define the cluster-level actions for users with this role.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types:ClusterPrivilege" - } - }, - "indices": { - "description": "A list of indices permissions entries.", - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types:IndicesPrivileges" - } - }, - "metadata": { - "$ref": "#/components/schemas/_types:Metadata" - }, - "run_as": { - "externalDocs": { - "url": "https://www.elastic.co/guide/en/elasticsearch/reference/current/run-as-privilege.html" - }, - "description": "A list of users that the owners of this role can impersonate. *Note*: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty `run_as` field, but a non-empty list will be rejected.", - "type": "array", - "items": { - "type": "string" - } - }, - "transient_metadata": { - "description": "Indicates roles that might be incompatible with the current cluster license, specifically roles with document and field level security. When the cluster license doesn’t allow certain features for a given role, this parameter is updated dynamically to list the incompatible features. If `enabled` is `false`, the role is ignored, but is still listed in the response from the authenticate API.", - "type": "object", - "additionalProperties": { - "type": "object" - } - } - } - } - } - }, - "required": true - }, "security.query_api_keys": { "content": { "application/json": { @@ -60019,6 +59808,10 @@ }, "query": { "$ref": "#/components/schemas/security._types:IndicesPrivilegesQuery" + }, + "allow_restricted_indices": { + "description": "Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`.", + "type": "boolean" } }, "required": [ @@ -60053,9 +59846,13 @@ "maintenance", "manage", "manage_data_stream_lifecycle", + "manage_follow_index", + "manage_ilm", + "manage_leader_index", "monitor", "none", "read", + "read_cross_cluster", "view_index_metadata", "write" ] @@ -60222,93 +60019,6 @@ "name" ] }, - "security.get_role:Role": { - "type": "object", - "properties": { - "cluster": { - "type": "array", - "items": { - "type": "string" - } - }, - "indices": { - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types:IndicesPrivileges" - } - }, - "metadata": { - "$ref": "#/components/schemas/_types:Metadata" - }, - "run_as": { - "type": "array", - "items": { - "type": "string" - } - }, - "transient_metadata": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "applications": { - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types:ApplicationPrivileges" - } - }, - "role_templates": { - "type": "array", - "items": { - "$ref": "#/components/schemas/security._types:RoleTemplate" - } - }, - "global": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "type": "string" - } - } - } - } - } - }, - "required": [ - "cluster", - "indices", - "metadata", - "run_as", - "applications" - ] - }, - "security._types:RoleTemplate": { - "type": "object", - "properties": { - "format": { - "$ref": "#/components/schemas/security._types:TemplateFormat" - }, - "template": { - "$ref": "#/components/schemas/_types:Script" - } - }, - "required": [ - "template" - ] - }, - "security._types:TemplateFormat": { - "type": "string", - "enum": [ - "string", - "json" - ] - }, "security.has_privileges:ApplicationPrivilegesCheck": { "type": "object", "properties": { @@ -60342,33 +60052,57 @@ "enum": [ "all", "cancel_task", + "create_snapshot", + "cross_cluster_replication", + "cross_cluster_search", + "delegate_pki", + "grant_api_key", "manage", "manage_api_key", + "manage_autoscaling", "manage_behavioral_analytics", + "manage_ccr", "manage_data_frame_transforms", "manage_data_stream_global_retention", "manage_enrich", + "manage_ilm", "manage_index_templates", + "manage_inference", "manage_ingest_pipelines", "manage_logstash_pipelines", "manage_ml", + "manage_oidc", "manage_own_api_key", "manage_pipeline", + "manage_rollup", + "manage_saml", "manage_search_application", "manage_search_query_rules", "manage_search_synonyms", "manage_security", + "manage_service_account", + "manage_slm", + "manage_token", "manage_transform", + "manage_user_profile", + "manage_watcher", "monitor", "monitor_data_frame_transforms", "monitor_data_stream_global_retention", "monitor_enrich", "monitor_inference", "monitor_ml", + "monitor_rollup", + "monitor_snapshot", + "monitor_text_structure", "monitor_transform", - "read_pipeline", + "monitor_watcher", "none", "post_behavioral_analytics_event", + "read_ccr", + "read_connector_secrets", + "read_fleet_secrets", + "read_ilm", "read_pipeline", "read_security", "read_slm", @@ -60418,17 +60152,6 @@ "type": "boolean" } }, - "security._types:CreatedStatus": { - "type": "object", - "properties": { - "created": { - "type": "boolean" - } - }, - "required": [ - "created" - ] - }, "security.query_api_keys:ApiKeyAggregationContainer": { "allOf": [ { diff --git a/output/schema/schema.json b/output/schema/schema.json index ccd36de80a..d0311ed22a 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -16285,7 +16285,7 @@ "availability": { "serverless": { "stability": "stable", - "visibility": "public" + "visibility": "private" }, "stack": { "since": "0.0.0", @@ -17030,7 +17030,7 @@ "availability": { "serverless": { "stability": "stable", - "visibility": "public" + "visibility": "private" }, "stack": { "since": "0.0.0", @@ -177861,7 +177861,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L307-L309" + "specLocation": "security/_types/Privileges.ts#L218-L220" }, { "kind": "interface", @@ -177947,35 +177947,20 @@ "name": "cancel_task" }, { - "availability": { - "stack": {} - }, "name": "create_snapshot" }, { - "availability": { - "stack": {} - }, - "name": "grant_api_key" - }, - { - "availability": { - "stack": {} - }, "name": "cross_cluster_replication" }, { - "availability": { - "stack": {} - }, "name": "cross_cluster_search" }, { - "availability": { - "stack": {} - }, "name": "delegate_pki" }, + { + "name": "grant_api_key" + }, { "name": "manage" }, @@ -177983,18 +177968,12 @@ "name": "manage_api_key" }, { - "availability": { - "stack": {} - }, "name": "manage_autoscaling" }, { "name": "manage_behavioral_analytics" }, { - "availability": { - "stack": {} - }, "name": "manage_ccr" }, { @@ -178007,18 +177986,12 @@ "name": "manage_enrich" }, { - "availability": { - "stack": {} - }, "name": "manage_ilm" }, { "name": "manage_index_templates" }, { - "availability": { - "stack": {} - }, "name": "manage_inference" }, { @@ -178031,9 +178004,6 @@ "name": "manage_ml" }, { - "availability": { - "stack": {} - }, "name": "manage_oidc" }, { @@ -178043,15 +178013,9 @@ "name": "manage_pipeline" }, { - "availability": { - "stack": {} - }, "name": "manage_rollup" }, { - "availability": { - "stack": {} - }, "name": "manage_saml" }, { @@ -178067,36 +178031,21 @@ "name": "manage_security" }, { - "availability": { - "stack": {} - }, "name": "manage_service_account" }, { - "availability": { - "stack": {} - }, "name": "manage_slm" }, { - "availability": { - "stack": {} - }, "name": "manage_token" }, { "name": "manage_transform" }, { - "availability": { - "stack": {} - }, "name": "manage_user_profile" }, { - "availability": { - "stack": {} - }, "name": "manage_watcher" }, { @@ -178118,64 +178067,37 @@ "name": "monitor_ml" }, { - "availability": { - "stack": {} - }, "name": "monitor_rollup" }, { - "availability": { - "stack": {} - }, "name": "monitor_snapshot" }, { - "availability": { - "stack": {} - }, "name": "monitor_text_structure" }, { "name": "monitor_transform" }, { - "availability": { - "stack": {} - }, "name": "monitor_watcher" }, { - "availability": { - "stack": {} - }, - "name": "read_ccr" - }, - { - "availability": { - "stack": {} - }, - "name": "read_ilm" + "name": "none" }, { - "name": "read_pipeline" + "name": "post_behavioral_analytics_event" }, { - "availability": { - "stack": {} - }, - "name": "read_slm" + "name": "read_ccr" }, { - "availability": { - "stack": {} - }, - "name": "transport_client" + "name": "read_connector_secrets" }, { - "name": "none" + "name": "read_fleet_secrets" }, { - "name": "post_behavioral_analytics_event" + "name": "read_ilm" }, { "name": "read_pipeline" @@ -178200,7 +178122,7 @@ "name": "ClusterPrivilege", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L41-L178" + "specLocation": "security/_types/Privileges.ts#L41-L102" }, { "kind": "interface", @@ -178321,7 +178243,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L303-L305" + "specLocation": "security/_types/Privileges.ts#L214-L216" }, { "kind": "enum", @@ -178385,21 +178307,12 @@ "name": "manage_data_stream_lifecycle" }, { - "availability": { - "stack": {} - }, "name": "manage_follow_index" }, { - "availability": { - "stack": {} - }, "name": "manage_ilm" }, { - "availability": { - "stack": {} - }, "name": "manage_leader_index" }, { @@ -178412,9 +178325,6 @@ "name": "read" }, { - "availability": { - "stack": {} - }, "name": "read_cross_cluster" }, { @@ -178428,7 +178338,7 @@ "name": "IndexPrivilege", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L265-L301" + "specLocation": "security/_types/Privileges.ts#L188-L212" }, { "kind": "interface", @@ -178491,9 +178401,6 @@ } }, { - "availability": { - "stack": {} - }, "description": "Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`.", "name": "allow_restricted_indices", "required": false, @@ -178507,7 +178414,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L180-L204" + "specLocation": "security/_types/Privileges.ts#L104-L127" }, { "codegenNames": [ @@ -178521,7 +178428,7 @@ "name": "IndicesPrivilegesQuery", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L230-L238", + "specLocation": "security/_types/Privileges.ts#L153-L161", "type": { "items": [ { @@ -178571,7 +178478,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L311-L313" + "specLocation": "security/_types/Privileges.ts#L222-L224" }, { "kind": "interface", @@ -179065,7 +178972,7 @@ "name": "RoleTemplateInlineQuery", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L259-L260", + "specLocation": "security/_types/Privileges.ts#L182-L183", "type": { "items": [ { @@ -179145,7 +179052,7 @@ } ], "shortcutProperty": "source", - "specLocation": "security/_types/Privileges.ts#L252-L257" + "specLocation": "security/_types/Privileges.ts#L175-L180" }, { "kind": "interface", @@ -179169,7 +179076,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L240-L250" + "specLocation": "security/_types/Privileges.ts#L163-L173" }, { "codegenNames": [ @@ -179181,7 +179088,7 @@ "name": "RoleTemplateScript", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L262-L263", + "specLocation": "security/_types/Privileges.ts#L185-L186", "type": { "items": [ { @@ -179411,7 +179318,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L206-L228" + "specLocation": "security/_types/Privileges.ts#L129-L151" }, { "kind": "interface", @@ -184768,9 +184675,6 @@ } }, { - "availability": { - "stack": {} - }, "description": "An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware. Support for global privileges is currently limited to the management of application privileges.", "name": "global", "required": false, @@ -184817,7 +184721,7 @@ } }, { - "description": "A list of users that the owners of this role can impersonate. *Note*: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty `run_as` field, but a non-empty list will be rejected.", + "description": "A list of users that the owners of this role can impersonate.", "docId": "run-as-privilege", "docUrl": "https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/run-as-privilege.html", "name": "run_as", @@ -184894,7 +184798,7 @@ } } ], - "specLocation": "security/put_role/SecurityPutRoleRequest.ts#L30-L80" + "specLocation": "security/put_role/SecurityPutRoleRequest.ts#L30-L79" }, { "body": { diff --git a/output/schema/schema/schema.json b/output/schema/schema/schema.json index 00855ae086..b2ad8759b3 100644 --- a/output/schema/schema/schema.json +++ b/output/schema/schema/schema.json @@ -16003,7 +16003,7 @@ "availability": { "serverless": { "stability": "stable", - "visibility": "public" + "visibility": "private" }, "stack": { "since": "0.0.0", @@ -16748,7 +16748,7 @@ "availability": { "serverless": { "stability": "stable", - "visibility": "public" + "visibility": "private" }, "stack": { "since": "0.0.0", @@ -129989,21 +129989,6 @@ "namespace": "_types" } } -<<<<<<< HEAD - }, - { - "description": "The configuration option ignore_missing_component_templates can be used when an index template\nreferences a component template that might not exist", - "name": "ignore_missing_component_templates", - "required": false, - "type": { - "kind": "array_of", - "value": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } -======= }, { "description": "The configuration option ignore_missing_component_templates can be used when an index template\nreferences a component template that might not exist", @@ -130029,7 +130014,6 @@ "type": { "name": "boolean", "namespace": "_builtins" ->>>>>>> main } } } @@ -130113,11 +130097,7 @@ } } ], -<<<<<<< HEAD - "specLocation": "indices/simulate_template/IndicesSimulateTemplateRequest.ts#L27-L114" -======= "specLocation": "indices/simulate_template/IndicesSimulateTemplateRequest.ts#L27-L119" ->>>>>>> main }, { "body": { @@ -133405,10 +133385,6 @@ } } ], -<<<<<<< HEAD - "query": [], - "specLocation": "inference/inference/InferenceRequest.ts#L25-L58" -======= "query": [ { "description": "Specifies the amount of time to wait for the inference request to complete.", @@ -133425,7 +133401,6 @@ } ], "specLocation": "inference/inference/InferenceRequest.ts#L26-L66" ->>>>>>> main }, { "body": { @@ -176531,7 +176506,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L266-L268" + "specLocation": "security/_types/Privileges.ts#L193-L195" }, { "kind": "interface", @@ -176617,15 +176592,9 @@ "name": "cancel_task" }, { - "availability": { - "stack": {} - }, "name": "create_snapshot" }, { - "availability": { - "stack": {} - }, "name": "grant_api_key" }, { @@ -176635,27 +176604,18 @@ "name": "manage_api_key" }, { - "availability": { - "stack": {} - }, "name": "manage_ccr" }, { "name": "manage_enrich" }, { - "availability": { - "stack": {} - }, "name": "manage_ilm" }, { "name": "manage_index_templates" }, { - "availability": { - "stack": {} - }, "name": "manage_ingest_pipelines" }, { @@ -176665,9 +176625,6 @@ "name": "manage_ml" }, { - "availability": { - "stack": {} - }, "name": "manage_oidc" }, { @@ -176677,51 +176634,30 @@ "name": "manage_pipeline" }, { - "availability": { - "stack": {} - }, "name": "manage_rollup" }, { - "availability": { - "stack": {} - }, "name": "manage_saml" }, { "name": "manage_security" }, { - "availability": { - "stack": {} - }, "name": "manage_service_account" }, { - "availability": { - "stack": {} - }, "name": "manage_slm" }, { - "availability": { - "stack": {} - }, "name": "manage_token" }, { "name": "manage_transform" }, { - "availability": { - "stack": {} - }, "name": "manage_user_profile" }, { - "availability": { - "stack": {} - }, "name": "manage_watcher" }, { @@ -176731,15 +176667,9 @@ "name": "monitor_ml" }, { - "availability": { - "stack": {} - }, "name": "monitor_rollup" }, { - "availability": { - "stack": {} - }, "name": "monitor_snapshot" }, { @@ -176749,36 +176679,21 @@ "name": "monitor_transform" }, { - "availability": { - "stack": {} - }, "name": "monitor_watcher" }, { - "availability": { - "stack": {} - }, "name": "read_ccr" }, { - "availability": { - "stack": {} - }, "name": "read_ilm" }, { "name": "read_pipeline" }, { - "availability": { - "stack": {} - }, "name": "read_slm" }, { - "availability": { - "stack": {} - }, "name": "transport_client" } ], @@ -176786,7 +176701,7 @@ "name": "ClusterPrivilege", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L41-L140" + "specLocation": "security/_types/Privileges.ts#L41-L80" }, { "kind": "interface", @@ -176907,7 +176822,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L262-L264" + "specLocation": "security/_types/Privileges.ts#L189-L191" }, { "kind": "enum", @@ -176965,21 +176880,12 @@ "name": "manage" }, { - "availability": { - "stack": {} - }, "name": "manage_follow_index" }, { - "availability": { - "stack": {} - }, "name": "manage_ilm" }, { - "availability": { - "stack": {} - }, "name": "manage_leader_index" }, { @@ -176989,9 +176895,6 @@ "name": "read" }, { - "availability": { - "stack": {} - }, "name": "read_cross_cluster" }, { @@ -177005,7 +176908,7 @@ "name": "IndexPrivilege", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L227-L260" + "specLocation": "security/_types/Privileges.ts#L166-L187" }, { "kind": "interface", @@ -177068,9 +176971,6 @@ } }, { - "availability": { - "stack": {} - }, "description": "Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`.", "name": "allow_restricted_indices", "required": false, @@ -177084,7 +176984,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L142-L166" + "specLocation": "security/_types/Privileges.ts#L82-L105" }, { "codegenNames": [ @@ -177098,7 +176998,7 @@ "name": "IndicesPrivilegesQuery", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L192-L200", + "specLocation": "security/_types/Privileges.ts#L131-L139", "type": { "items": [ { @@ -177148,7 +177048,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L270-L272" + "specLocation": "security/_types/Privileges.ts#L197-L199" }, { "kind": "interface", @@ -177642,7 +177542,7 @@ "name": "RoleTemplateInlineQuery", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L221-L222", + "specLocation": "security/_types/Privileges.ts#L160-L161", "type": { "items": [ { @@ -177722,7 +177622,7 @@ } ], "shortcutProperty": "source", - "specLocation": "security/_types/Privileges.ts#L214-L219" + "specLocation": "security/_types/Privileges.ts#L153-L158" }, { "kind": "interface", @@ -177746,7 +177646,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L202-L212" + "specLocation": "security/_types/Privileges.ts#L141-L151" }, { "codegenNames": [ @@ -177758,7 +177658,7 @@ "name": "RoleTemplateScript", "namespace": "security._types" }, - "specLocation": "security/_types/Privileges.ts#L224-L225", + "specLocation": "security/_types/Privileges.ts#L163-L164", "type": { "items": [ { @@ -177988,7 +177888,7 @@ } } ], - "specLocation": "security/_types/Privileges.ts#L168-L190" + "specLocation": "security/_types/Privileges.ts#L107-L129" }, { "kind": "interface", @@ -183345,9 +183245,6 @@ } }, { - "availability": { - "stack": {} - }, "description": "An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware. Support for global privileges is currently limited to the management of application privileges.", "name": "global", "required": false, @@ -183471,7 +183368,7 @@ } } ], - "specLocation": "security/put_role/SecurityPutRoleRequest.ts#L30-L80" + "specLocation": "security/put_role/SecurityPutRoleRequest.ts#L30-L79" }, { "body": { diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 4bfea48167..5cea2e671c 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -1292,17 +1292,6 @@ ], "response": [] }, - "security.has_privileges": { - "request": [ - "enum definition security._types:ClusterPrivilege - Duplicate enum member codegen_name 'read_pipeline'", - "enum definition security._types:ClusterPrivilege - Duplicate enum member name 'read_pipeline'", - "enum definition security._types:ClusterPrivilege - Duplicate enum member codegen_name 'read_slm'", - "enum definition security._types:ClusterPrivilege - Duplicate enum member name 'read_slm'", - "enum definition security._types:ClusterPrivilege - Duplicate enum member codegen_name 'transport_client'", - "enum definition security._types:ClusterPrivilege - Duplicate enum member name 'transport_client'" - ], - "response": [] - }, "security.oidc_authenticate": { "request": [ "Missing request & response" diff --git a/output/typescript/types.ts b/output/typescript/types.ts index 3adab7cab1..fd9a8321df 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -16714,7 +16714,7 @@ export interface SecurityClusterNode { name: Name } -export type SecurityClusterPrivilege = 'all' | 'cancel_task' | 'create_snapshot' | 'grant_api_key' | 'cross_cluster_replication' | 'cross_cluster_search' | 'delegate_pki' | 'manage' | 'manage_api_key' | 'manage_autoscaling' | 'manage_behavioral_analytics' | 'manage_ccr' | 'manage_data_frame_transforms' | 'manage_data_stream_global_retention' | 'manage_enrich' | 'manage_ilm' | 'manage_index_templates' | 'manage_inference' | 'manage_ingest_pipelines' | 'manage_logstash_pipelines' | 'manage_ml' | 'manage_oidc' | 'manage_own_api_key' | 'manage_pipeline' | 'manage_rollup' | 'manage_saml' | 'manage_search_application' | 'manage_search_query_rules' | 'manage_search_synonyms' | 'manage_security' | 'manage_service_account' | 'manage_slm' | 'manage_token' | 'manage_transform' | 'manage_user_profile' | 'manage_watcher' | 'monitor' | 'monitor_data_frame_transforms' | 'monitor_data_stream_global_retention' | 'monitor_enrich' | 'monitor_inference' | 'monitor_ml' | 'monitor_rollup' | 'monitor_snapshot' | 'monitor_text_structure' | 'monitor_transform' | 'monitor_watcher' | 'read_ccr' | 'read_ilm' | 'read_pipeline' | 'read_slm' | 'transport_client' | 'none' | 'post_behavioral_analytics_event' | 'read_pipeline' | 'read_security' | 'read_slm' | 'transport_client' | 'write_connector_secrets' | 'write_fleet_secrets'| string +export type SecurityClusterPrivilege = 'all' | 'cancel_task' | 'create_snapshot' | 'cross_cluster_replication' | 'cross_cluster_search' | 'delegate_pki' | 'grant_api_key' | 'manage' | 'manage_api_key' | 'manage_autoscaling' | 'manage_behavioral_analytics' | 'manage_ccr' | 'manage_data_frame_transforms' | 'manage_data_stream_global_retention' | 'manage_enrich' | 'manage_ilm' | 'manage_index_templates' | 'manage_inference' | 'manage_ingest_pipelines' | 'manage_logstash_pipelines' | 'manage_ml' | 'manage_oidc' | 'manage_own_api_key' | 'manage_pipeline' | 'manage_rollup' | 'manage_saml' | 'manage_search_application' | 'manage_search_query_rules' | 'manage_search_synonyms' | 'manage_security' | 'manage_service_account' | 'manage_slm' | 'manage_token' | 'manage_transform' | 'manage_user_profile' | 'manage_watcher' | 'monitor' | 'monitor_data_frame_transforms' | 'monitor_data_stream_global_retention' | 'monitor_enrich' | 'monitor_inference' | 'monitor_ml' | 'monitor_rollup' | 'monitor_snapshot' | 'monitor_text_structure' | 'monitor_transform' | 'monitor_watcher' | 'none' | 'post_behavioral_analytics_event' | 'read_ccr' | 'read_connector_secrets' | 'read_fleet_secrets' | 'read_ilm' | 'read_pipeline' | 'read_security' | 'read_slm' | 'transport_client' | 'write_connector_secrets' | 'write_fleet_secrets'| string export interface SecurityCreatedStatus { created: boolean diff --git a/specification/security/_types/Privileges.ts b/specification/security/_types/Privileges.ts index a5c6d479b6..d013df8308 100644 --- a/specification/security/_types/Privileges.ts +++ b/specification/security/_types/Privileges.ts @@ -42,90 +42,39 @@ export class ApplicationPrivileges { export enum ClusterPrivilege { all, cancel_task, - /** - * @availability stack - */ create_snapshot, - /** - * @availability stack - */ - grant_api_key, - /** - * @availability stack - */ cross_cluster_replication, - /** - * @availability stack - */ cross_cluster_search, - /** - * @availability stack - */ delegate_pki, + grant_api_key, manage, manage_api_key, - /** - * @availability stack - */ manage_autoscaling, manage_behavioral_analytics, - /** - * @availability stack - */ manage_ccr, manage_data_frame_transforms, manage_data_stream_global_retention, manage_enrich, - /** - * @availability stack - */ manage_ilm, manage_index_templates, - /** - * @availability stack - */ manage_inference, manage_ingest_pipelines, manage_logstash_pipelines, manage_ml, - /** - * @availability stack - */ manage_oidc, manage_own_api_key, manage_pipeline, - /** - * @availability stack - */ manage_rollup, - /** - * @availability stack - */ manage_saml, manage_search_application, manage_search_query_rules, manage_search_synonyms, manage_security, - /** - * @availability stack - */ manage_service_account, - /** - * @availability stack - */ manage_slm, - /** - * @availability stack - */ manage_token, manage_transform, - /** - * @availability stack - */ manage_user_profile, - /** - * @availability stack - */ manage_watcher, monitor, monitor_data_frame_transforms, @@ -133,42 +82,17 @@ export enum ClusterPrivilege { monitor_enrich, monitor_inference, monitor_ml, - /** - * @availability stack - */ monitor_rollup, - /** - * @availability stack - */ monitor_snapshot, - /** - * @availability stack - */ monitor_text_structure, monitor_transform, - /** - * @availability stack - */ monitor_watcher, - /** - * @availability stack - */ - read_ccr, - /** - * @availability stack - */ - read_ilm, - read_pipeline, - /** - * @availability stack - */ - read_slm, - /** - * @availability stack - */ - transport_client, none, post_behavioral_analytics_event, + read_ccr, + read_connector_secrets, + read_fleet_secrets, + read_ilm, read_pipeline, read_security, read_slm, @@ -198,7 +122,6 @@ export class IndicesPrivileges { /** * Set to `true` if using wildcard or regular expressions for patterns that cover restricted indices. Implicitly, restricted indices have limited privileges that can cause pattern tests to fail. If restricted indices are explicitly included in the `names` list, Elasticsearch checks privileges against these indices regardless of the value set for `allow_restricted_indices`. * @server_default false - * @availability stack */ allow_restricted_indices?: boolean } @@ -277,24 +200,12 @@ export enum IndexPrivilege { maintenance, manage, manage_data_stream_lifecycle, - /** - * @availability stack - */ manage_follow_index, - /** - * @availability stack - */ manage_ilm, - /** - * @availability stack - */ manage_leader_index, monitor, none, read, - /** - * @availability stack - */ read_cross_cluster, view_index_metadata, write diff --git a/specification/security/get_role/SecurityGetRoleRequest.ts b/specification/security/get_role/SecurityGetRoleRequest.ts index dead7d4477..f981198896 100644 --- a/specification/security/get_role/SecurityGetRoleRequest.ts +++ b/specification/security/get_role/SecurityGetRoleRequest.ts @@ -25,7 +25,7 @@ import { Names } from '@_types/common' * The get roles API cannot retrieve roles that are defined in roles files. * @rest_spec_name security.get_role * @availability stack since=0.0.0 stability=stable - * @availability serverless stability=stable visibility=public + * @availability serverless stability=stable visibility=private * @cluster_privileges manage_security */ export interface Request extends RequestBase { diff --git a/specification/security/put_role/SecurityPutRoleRequest.ts b/specification/security/put_role/SecurityPutRoleRequest.ts index 2d5177bb5a..4a0c8656b1 100644 --- a/specification/security/put_role/SecurityPutRoleRequest.ts +++ b/specification/security/put_role/SecurityPutRoleRequest.ts @@ -32,7 +32,7 @@ import { Metadata, Name, Refresh } from '@_types/common' * The create or update roles API cannot update roles that are defined in roles files. * @rest_spec_name security.put_role * @availability stack since=0.0.0 stability=stable - * @availability serverless stability=stable visibility=public + * @availability serverless stability=stable visibility=private * @cluster_privileges manage_security */ export interface Request extends RequestBase { @@ -56,7 +56,6 @@ export interface Request extends RequestBase { cluster?: ClusterPrivilege[] /** * An object defining global privileges. A global privilege is a form of cluster privilege that is request-aware. Support for global privileges is currently limited to the management of application privileges. - * @availability stack */ global?: Dictionary /** @@ -68,7 +67,7 @@ export interface Request extends RequestBase { */ metadata?: Metadata /** - * A list of users that the owners of this role can impersonate. *Note*: in Serverless, the run-as feature is disabled. For API compatibility, you can still specify an empty `run_as` field, but a non-empty list will be rejected. + * A list of users that the owners of this role can impersonate. * @doc_id run-as-privilege */ run_as?: string[] From 53edb7836cd4d15fc15c1341a5eb7bf9dfb5d50a Mon Sep 17 00:00:00 2001 From: Laura Trotta <153528055+l-trotta@users.noreply.github.com> Date: Wed, 8 May 2024 12:09:30 +0200 Subject: [PATCH 5/5] Java issues batch 4 (#2549) * removed internal parameter `cause` * seq_no in base response optional * add optional `keep` field to removeProcessor (610) * added optional separator field to adjacencyMatrix (629) * added element_type to dense vector field (632) * definitely removed `cause` --- .../elasticsearch-serverless-openapi.json | 26 +-- output/schema/schema.json | 198 ++++++++++-------- output/schema/validation-errors.json | 1 - output/typescript/types.ts | 6 +- specification/_types/Base.ts | 2 +- specification/_types/aggregations/bucket.ts | 4 + specification/_types/mapping/complex.ts | 1 + .../ClusterPutComponentTemplateRequest.ts | 3 - specification/ingest/_types/Processors.ts | 4 + 9 files changed, 135 insertions(+), 110 deletions(-) diff --git a/output/openapi/elasticsearch-serverless-openapi.json b/output/openapi/elasticsearch-serverless-openapi.json index 8545007008..1b8915a2a2 100644 --- a/output/openapi/elasticsearch-serverless-openapi.json +++ b/output/openapi/elasticsearch-serverless-openapi.json @@ -1567,9 +1567,6 @@ }, { "$ref": "#/components/parameters/cluster.put_component_template#master_timeout" - }, - { - "$ref": "#/components/parameters/cluster.put_component_template#cause" } ], "requestBody": { @@ -1600,9 +1597,6 @@ }, { "$ref": "#/components/parameters/cluster.put_component_template#master_timeout" - }, - { - "$ref": "#/components/parameters/cluster.put_component_template#cause" } ], "requestBody": { @@ -23233,15 +23227,6 @@ }, "style": "form" }, - "cluster.put_component_template#cause": { - "in": "query", - "name": "cause", - "deprecated": false, - "schema": { - "type": "string" - }, - "style": "form" - }, "count#index": { "in": "path", "name": "index", @@ -34060,6 +34045,10 @@ "additionalProperties": { "$ref": "#/components/schemas/_types.query_dsl:QueryContainer" } + }, + "separator": { + "description": "Separator used to concatenate filter names. Defaults to &.", + "type": "string" } } } @@ -48254,6 +48243,9 @@ "dense_vector" ] }, + "element_type": { + "type": "string" + }, "dims": { "type": "number" }, @@ -50666,7 +50658,6 @@ "_id", "_index", "result", - "_seq_no", "_shards", "_version" ] @@ -53367,6 +53358,9 @@ "field": { "$ref": "#/components/schemas/_types:Fields" }, + "keep": { + "$ref": "#/components/schemas/_types:Fields" + }, "ignore_missing": { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", "type": "boolean" diff --git a/output/schema/schema.json b/output/schema/schema.json index d0311ed22a..85285f2676 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -49315,7 +49315,7 @@ }, { "name": "_seq_no", - "required": true, + "required": false, "type": { "kind": "instance_of", "type": { @@ -49540,9 +49540,21 @@ } } } + }, + { + "description": "Separator used to concatenate filter names. Defaults to &.", + "name": "separator", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } } ], - "specLocation": "_types/aggregations/bucket.ts#L55-L61" + "specLocation": "_types/aggregations/bucket.ts#L55-L65" }, { "attachedBehaviors": [ @@ -50101,7 +50113,7 @@ "name": "AggregateOrder", "namespace": "_types.aggregations" }, - "specLocation": "_types/aggregations/bucket.ts#L974-L976", + "specLocation": "_types/aggregations/bucket.ts#L978-L980", "type": { "items": [ { @@ -51374,7 +51386,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L670-L683" + "specLocation": "_types/aggregations/bucket.ts#L674-L687" }, { "kind": "interface", @@ -51596,7 +51608,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L63-L98" + "specLocation": "_types/aggregations/bucket.ts#L67-L102" }, { "inherits": { @@ -52391,7 +52403,7 @@ "name": "CalendarInterval", "namespace": "_types.aggregations" }, - "specLocation": "_types/aggregations/bucket.ts#L247-L264" + "specLocation": "_types/aggregations/bucket.ts#L251-L268" }, { "inherits": { @@ -52645,7 +52657,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L1036-L1100" + "specLocation": "_types/aggregations/bucket.ts#L1040-L1104" }, { "codegenNames": [ @@ -52657,7 +52669,7 @@ "name": "CategorizeTextAnalyzer", "namespace": "_types.aggregations" }, - "specLocation": "_types/aggregations/bucket.ts#L1102-L1105", + "specLocation": "_types/aggregations/bucket.ts#L1106-L1109", "type": { "items": [ { @@ -52710,7 +52722,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L733-L742" + "specLocation": "_types/aggregations/bucket.ts#L737-L746" }, { "attachedBehaviors": [ @@ -52757,7 +52769,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L109-L114" + "specLocation": "_types/aggregations/bucket.ts#L113-L118" }, { "inherits": { @@ -52802,7 +52814,7 @@ "name": "CompositeAggregateKey", "namespace": "_types.aggregations" }, - "specLocation": "_types/aggregations/bucket.ts#L116-L116", + "specLocation": "_types/aggregations/bucket.ts#L120-L120", "type": { "key": { "kind": "instance_of", @@ -52887,7 +52899,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L118-L134" + "specLocation": "_types/aggregations/bucket.ts#L122-L138" }, { "kind": "interface", @@ -52965,7 +52977,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L155-L164" + "specLocation": "_types/aggregations/bucket.ts#L159-L168" }, { "kind": "interface", @@ -53023,7 +53035,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L136-L153" + "specLocation": "_types/aggregations/bucket.ts#L140-L157" }, { "attachedBehaviors": [ @@ -53126,7 +53138,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L172-L180" + "specLocation": "_types/aggregations/bucket.ts#L176-L184" }, { "inherits": { @@ -53164,7 +53176,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L182-L185" + "specLocation": "_types/aggregations/bucket.ts#L186-L189" }, { "inherits": { @@ -53191,7 +53203,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L168-L170" + "specLocation": "_types/aggregations/bucket.ts#L172-L174" }, { "inherits": { @@ -53206,7 +53218,7 @@ "namespace": "_types.aggregations" }, "properties": [], - "specLocation": "_types/aggregations/bucket.ts#L166-L166" + "specLocation": "_types/aggregations/bucket.ts#L170-L170" }, { "description": "Result of the `cumulative_cardinality` aggregation", @@ -53325,7 +53337,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L1107-L1111" + "specLocation": "_types/aggregations/bucket.ts#L1111-L1115" }, { "inherits": { @@ -53572,7 +53584,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L187-L245" + "specLocation": "_types/aggregations/bucket.ts#L191-L249" }, { "attachedBehaviors": [ @@ -53730,7 +53742,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L266-L292" + "specLocation": "_types/aggregations/bucket.ts#L270-L296" }, { "kind": "interface", @@ -53776,7 +53788,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L303-L316" + "specLocation": "_types/aggregations/bucket.ts#L307-L320" }, { "inherits": { @@ -53908,7 +53920,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L318-L339" + "specLocation": "_types/aggregations/bucket.ts#L322-L343" }, { "description": "Result of a `terms` aggregation when the field is some kind of decimal number like a float, double, or distance.", @@ -54071,7 +54083,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L487-L496" + "specLocation": "_types/aggregations/bucket.ts#L491-L500" }, { "inherits": { @@ -54411,7 +54423,7 @@ "name": "FieldDateMath", "namespace": "_types.aggregations" }, - "specLocation": "_types/aggregations/bucket.ts#L294-L301", + "specLocation": "_types/aggregations/bucket.ts#L298-L305", "type": { "items": [ { @@ -54549,7 +54561,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L356-L376" + "specLocation": "_types/aggregations/bucket.ts#L360-L380" }, { "attachedBehaviors": [ @@ -54722,7 +54734,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L1158-L1182" + "specLocation": "_types/aggregations/bucket.ts#L1162-L1186" }, { "attachedBehaviors": [ @@ -54822,7 +54834,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L1144-L1156" + "specLocation": "_types/aggregations/bucket.ts#L1148-L1160" }, { "kind": "enum", @@ -55076,7 +55088,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L378-L401" + "specLocation": "_types/aggregations/bucket.ts#L382-L405" }, { "inherits": { @@ -55179,7 +55191,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L403-L428" + "specLocation": "_types/aggregations/bucket.ts#L407-L432" }, { "attachedBehaviors": [ @@ -55529,7 +55541,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L430-L456" + "specLocation": "_types/aggregations/bucket.ts#L434-L460" }, { "attachedBehaviors": [ @@ -55637,7 +55649,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L458-L483" + "specLocation": "_types/aggregations/bucket.ts#L462-L487" }, { "attachedBehaviors": [ @@ -55671,7 +55683,7 @@ "namespace": "_types.aggregations" }, "properties": [], - "specLocation": "_types/aggregations/bucket.ts#L485-L485" + "specLocation": "_types/aggregations/bucket.ts#L489-L489" }, { "kind": "interface", @@ -55693,7 +55705,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L744-L749" + "specLocation": "_types/aggregations/bucket.ts#L748-L753" }, { "kind": "interface", @@ -55937,7 +55949,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L498-L544" + "specLocation": "_types/aggregations/bucket.ts#L502-L548" }, { "attachedBehaviors": [ @@ -56578,7 +56590,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L1113-L1142" + "specLocation": "_types/aggregations/bucket.ts#L1117-L1146" }, { "attachedBehaviors": [ @@ -56709,7 +56721,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L546-L555" + "specLocation": "_types/aggregations/bucket.ts#L550-L559" }, { "kind": "interface", @@ -56779,7 +56791,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L557-L570" + "specLocation": "_types/aggregations/bucket.ts#L561-L574" }, { "attachedBehaviors": [ @@ -57497,7 +57509,7 @@ "name": "MinimumInterval", "namespace": "_types.aggregations" }, - "specLocation": "_types/aggregations/bucket.ts#L100-L107" + "specLocation": "_types/aggregations/bucket.ts#L104-L111" }, { "kind": "type_alias", @@ -57596,7 +57608,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L572-L578" + "specLocation": "_types/aggregations/bucket.ts#L576-L582" }, { "kind": "enum", @@ -57946,7 +57958,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L622-L632" + "specLocation": "_types/aggregations/bucket.ts#L626-L636" }, { "inherits": { @@ -58091,7 +58103,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L580-L620" + "specLocation": "_types/aggregations/bucket.ts#L584-L624" }, { "attachedBehaviors": [ @@ -58180,7 +58192,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L751-L760" + "specLocation": "_types/aggregations/bucket.ts#L755-L764" }, { "attachedBehaviors": [ @@ -58227,7 +58239,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L634-L639" + "specLocation": "_types/aggregations/bucket.ts#L638-L643" }, { "inherits": { @@ -58337,7 +58349,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L641-L646" + "specLocation": "_types/aggregations/bucket.ts#L645-L650" }, { "kind": "interface", @@ -58346,7 +58358,7 @@ "namespace": "_types.aggregations" }, "properties": [], - "specLocation": "_types/aggregations/bucket.ts#L762-L762" + "specLocation": "_types/aggregations/bucket.ts#L766-L766" }, { "inherits": { @@ -58759,7 +58771,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L648-L668" + "specLocation": "_types/aggregations/bucket.ts#L652-L672" }, { "attachedBehaviors": [ @@ -58935,7 +58947,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L685-L715" + "specLocation": "_types/aggregations/bucket.ts#L689-L719" }, { "inherits": { @@ -59080,7 +59092,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L717-L723" + "specLocation": "_types/aggregations/bucket.ts#L721-L727" }, { "attachedBehaviors": [ @@ -59128,7 +59140,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L725-L731" + "specLocation": "_types/aggregations/bucket.ts#L729-L735" }, { "kind": "enum", @@ -59150,7 +59162,7 @@ "name": "SamplerAggregationExecutionHint", "namespace": "_types.aggregations" }, - "specLocation": "_types/aggregations/bucket.ts#L341-L354" + "specLocation": "_types/aggregations/bucket.ts#L345-L358" }, { "kind": "interface", @@ -59171,7 +59183,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L764-L766" + "specLocation": "_types/aggregations/bucket.ts#L768-L770" }, { "inherits": { @@ -59677,7 +59689,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L768-L832" + "specLocation": "_types/aggregations/bucket.ts#L772-L836" }, { "attachedBehaviors": [ @@ -59939,7 +59951,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L834-L906" + "specLocation": "_types/aggregations/bucket.ts#L838-L910" }, { "inherits": { @@ -61333,7 +61345,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L908-L968" + "specLocation": "_types/aggregations/bucket.ts#L912-L972" }, { "kind": "enum", @@ -61351,7 +61363,7 @@ "name": "TermsAggregationCollectMode", "namespace": "_types.aggregations" }, - "specLocation": "_types/aggregations/bucket.ts#L978-L987" + "specLocation": "_types/aggregations/bucket.ts#L982-L991" }, { "kind": "enum", @@ -61373,7 +61385,7 @@ "name": "TermsAggregationExecutionHint", "namespace": "_types.aggregations" }, - "specLocation": "_types/aggregations/bucket.ts#L989-L994" + "specLocation": "_types/aggregations/bucket.ts#L993-L998" }, { "attachedBehaviors": [ @@ -61415,7 +61427,7 @@ "name": "TermsExclude", "namespace": "_types.aggregations" }, - "specLocation": "_types/aggregations/bucket.ts#L999-L1000", + "specLocation": "_types/aggregations/bucket.ts#L1003-L1004", "type": { "items": [ { @@ -61450,7 +61462,7 @@ "name": "TermsInclude", "namespace": "_types.aggregations" }, - "specLocation": "_types/aggregations/bucket.ts#L996-L997", + "specLocation": "_types/aggregations/bucket.ts#L1000-L1001", "type": { "items": [ { @@ -61513,7 +61525,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L1002-L1011" + "specLocation": "_types/aggregations/bucket.ts#L1006-L1015" }, { "kind": "interface", @@ -62240,7 +62252,7 @@ } } ], - "specLocation": "_types/aggregations/bucket.ts#L1013-L1034" + "specLocation": "_types/aggregations/bucket.ts#L1017-L1038" }, { "attachedBehaviors": [ @@ -68562,7 +68574,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L60-L65" + "specLocation": "_types/mapping/complex.ts#L61-L66" }, { "kind": "interface", @@ -69306,6 +69318,17 @@ "value": "dense_vector" } }, + { + "name": "element_type", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, { "name": "dims", "required": false, @@ -69351,7 +69374,7 @@ } } ], - "specLocation": "_types/mapping/complex.ts#L52-L58" + "specLocation": "_types/mapping/complex.ts#L52-L59" }, { "inherits": { @@ -102495,20 +102518,9 @@ "namespace": "_types" } } - }, - { - "name": "cause", - "required": false, - "type": { - "kind": "instance_of", - "type": { - "name": "string", - "namespace": "_builtins" - } - } } ], - "specLocation": "cluster/put_component_template/ClusterPutComponentTemplateRequest.ts#L26-L96" + "specLocation": "cluster/put_component_template/ClusterPutComponentTemplateRequest.ts#L25-L93" }, { "body": { @@ -137454,6 +137466,18 @@ } } }, + { + "description": "Fields to be kept. When set, all fields other than those specified are removed.", + "name": "keep", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "Fields", + "namespace": "_types" + } + } + }, { "description": "If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document.", "name": "ignore_missing", @@ -137468,7 +137492,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L941-L951" + "specLocation": "ingest/_types/Processors.ts#L941-L955" }, { "inherits": { @@ -137521,7 +137545,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L953-L969" + "specLocation": "ingest/_types/Processors.ts#L957-L973" }, { "inherits": { @@ -137603,7 +137627,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L971-L999" + "specLocation": "ingest/_types/Processors.ts#L975-L1003" }, { "inherits": { @@ -137675,7 +137699,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1001-L1021" + "specLocation": "ingest/_types/Processors.ts#L1005-L1025" }, { "inherits": { @@ -137761,7 +137785,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1023-L1057" + "specLocation": "ingest/_types/Processors.ts#L1027-L1061" }, { "inherits": { @@ -137804,7 +137828,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1059-L1068" + "specLocation": "ingest/_types/Processors.ts#L1063-L1072" }, { "kind": "enum", @@ -137820,7 +137844,7 @@ "name": "ShapeType", "namespace": "ingest._types" }, - "specLocation": "ingest/_types/Processors.ts#L1070-L1073" + "specLocation": "ingest/_types/Processors.ts#L1074-L1077" }, { "inherits": { @@ -137873,7 +137897,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1075-L1091" + "specLocation": "ingest/_types/Processors.ts#L1079-L1095" }, { "inherits": { @@ -137952,7 +137976,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1093-L1118" + "specLocation": "ingest/_types/Processors.ts#L1097-L1122" }, { "inherits": { @@ -138006,7 +138030,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1120-L1136" + "specLocation": "ingest/_types/Processors.ts#L1124-L1140" }, { "inherits": { @@ -138060,7 +138084,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1138-L1154" + "specLocation": "ingest/_types/Processors.ts#L1142-L1158" }, { "inherits": { @@ -138114,7 +138138,7 @@ } } ], - "specLocation": "ingest/_types/Processors.ts#L1156-L1172" + "specLocation": "ingest/_types/Processors.ts#L1160-L1176" }, { "inherits": { diff --git a/output/schema/validation-errors.json b/output/schema/validation-errors.json index 5cea2e671c..c6ce965a08 100644 --- a/output/schema/validation-errors.json +++ b/output/schema/validation-errors.json @@ -475,7 +475,6 @@ }, "cluster.put_component_template": { "request": [ - "Request: query parameter 'cause' does not exist in the json spec", "Request: missing json spec query parameter 'timeout'", "request definition cluster.put_component_template:Request / body / Property 'template' / instance_of - Non-leaf type cannot be used here: 'indices._types:IndexState'" ], diff --git a/output/typescript/types.ts b/output/typescript/types.ts index fd9a8321df..af1bacc5cf 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -2828,7 +2828,7 @@ export interface WriteResponseBase { _index: IndexName _primary_term?: long result: Result - _seq_no: SequenceNumber + _seq_no?: SequenceNumber _shards: ShardStatistics _version: VersionNumber forced_refresh?: boolean @@ -2855,6 +2855,7 @@ export interface AggregationsAdjacencyMatrixAggregate extends AggregationsMultiB export interface AggregationsAdjacencyMatrixAggregation extends AggregationsBucketAggregationBase { filters?: Record + separator?: string } export interface AggregationsAdjacencyMatrixBucketKeys extends AggregationsMultiBucketBase { @@ -4972,6 +4973,7 @@ export interface MappingDenseVectorIndexOptions { export interface MappingDenseVectorProperty extends MappingPropertyBase { type: 'dense_vector' + element_type?: string dims?: integer similarity?: string index?: boolean @@ -8691,7 +8693,6 @@ export interface ClusterPutComponentTemplateRequest extends RequestBase { name: Name create?: boolean master_timeout?: Duration - cause?: string body?: { template: IndicesIndexState version?: VersionNumber @@ -12396,6 +12397,7 @@ export interface IngestProcessorContainer { export interface IngestRemoveProcessor extends IngestProcessorBase { field: Fields + keep?: Fields ignore_missing?: boolean } diff --git a/specification/_types/Base.ts b/specification/_types/Base.ts index 3b4c3b9dca..2ac27fe0c5 100644 --- a/specification/_types/Base.ts +++ b/specification/_types/Base.ts @@ -38,7 +38,7 @@ export class WriteResponseBase { _index: IndexName _primary_term?: long result: Result - _seq_no: SequenceNumber + _seq_no?: SequenceNumber _shards: ShardStatistics _version: VersionNumber forced_refresh?: boolean diff --git a/specification/_types/aggregations/bucket.ts b/specification/_types/aggregations/bucket.ts index 061abe95f8..024e56f38a 100644 --- a/specification/_types/aggregations/bucket.ts +++ b/specification/_types/aggregations/bucket.ts @@ -58,6 +58,10 @@ export class AdjacencyMatrixAggregation extends BucketAggregationBase { * At least one filter is required. */ filters?: Dictionary + /** + * Separator used to concatenate filter names. Defaults to &. + */ + separator?: string } export class AutoDateHistogramAggregation extends BucketAggregationBase { diff --git a/specification/_types/mapping/complex.ts b/specification/_types/mapping/complex.ts index 0db891ede8..3af6956075 100644 --- a/specification/_types/mapping/complex.ts +++ b/specification/_types/mapping/complex.ts @@ -51,6 +51,7 @@ export class ObjectProperty extends CorePropertyBase { export class DenseVectorProperty extends PropertyBase { type: 'dense_vector' + element_type?: string dims?: integer similarity?: string index?: boolean diff --git a/specification/cluster/put_component_template/ClusterPutComponentTemplateRequest.ts b/specification/cluster/put_component_template/ClusterPutComponentTemplateRequest.ts index 4e0a120a5e..8c1b406feb 100644 --- a/specification/cluster/put_component_template/ClusterPutComponentTemplateRequest.ts +++ b/specification/cluster/put_component_template/ClusterPutComponentTemplateRequest.ts @@ -21,7 +21,6 @@ import { IndexState } from '@indices/_types/IndexState' import { RequestBase } from '@_types/Base' import { Metadata, Name, VersionNumber } from '@_types/common' import { Duration } from '@_types/Time' -import { ErrorCause } from '@_types/Errors' /** * Creates or updates a component template. @@ -66,8 +65,6 @@ export interface Request extends RequestBase { * If no response is received before the timeout expires, the request fails and returns an error. * @server_default 30s */ master_timeout?: Duration - - cause?: string } body: { /** diff --git a/specification/ingest/_types/Processors.ts b/specification/ingest/_types/Processors.ts index 19ce5600f5..f6df66d73c 100644 --- a/specification/ingest/_types/Processors.ts +++ b/specification/ingest/_types/Processors.ts @@ -943,6 +943,10 @@ export class RemoveProcessor extends ProcessorBase { * Fields to be removed. Supports template snippets. */ field: Fields + /** + * Fields to be kept. When set, all fields other than those specified are removed. + */ + keep?: Fields /** * If `true` and `field` does not exist or is `null`, the processor quietly exits without modifying the document. * @server_default false