diff --git a/output/schema/schema.json b/output/schema/schema.json index 5d4331d5dd..fe5672071f 100644 --- a/output/schema/schema.json +++ b/output/schema/schema.json @@ -3400,12 +3400,18 @@ "visibility": "private" } }, - "description": "Deletes a connector secret", + "description": "Deletes a connector secret.", "docUrl": null, "name": "connector.secret_delete", - "request": null, + "request": { + "name": "Request", + "namespace": "connector.secret_delete" + }, "requestBodyRequired": false, - "response": null, + "response": { + "name": "Response", + "namespace": "connector.secret_delete" + }, "responseMediaType": [ "application/json" ], @@ -3425,12 +3431,18 @@ "visibility": "private" } }, - "description": "Retrieves a secret stored by Connectors", + "description": "Retrieves a secret stored by Connectors.", "docUrl": null, "name": "connector.secret_get", - "request": null, + "request": { + "name": "Request", + "namespace": "connector.secret_get" + }, "requestBodyRequired": false, - "response": null, + "response": { + "name": "Response", + "namespace": "connector.secret_get" + }, "responseMediaType": [ "application/json" ], @@ -3450,12 +3462,18 @@ "visibility": "private" } }, - "description": "Creates a secret for a Connector", + "description": "Creates a secret for a Connector.", "docUrl": null, "name": "connector.secret_post", - "request": null, + "request": { + "name": "Request", + "namespace": "connector.secret_post" + }, "requestBodyRequired": true, - "response": null, + "response": { + "name": "Response", + "namespace": "connector.secret_post" + }, "responseMediaType": [ "application/json" ], @@ -3475,12 +3493,18 @@ "visibility": "private" } }, - "description": "Creates or updates a secret for a Connector", + "description": "Creates or updates a secret for a Connector.", "docUrl": null, "name": "connector.secret_put", - "request": null, + "request": { + "name": "Request", + "namespace": "connector.secret_put" + }, "requestBodyRequired": true, - "response": null, + "response": { + "name": "Response", + "namespace": "connector.secret_put" + }, "responseMediaType": [ "application/json" ], @@ -137234,6 +137258,270 @@ }, "specLocation": "connector/put/ConnectorPutResponse.ts#L23-L28" }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Deletes a connector secret.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "connector.secret_delete" + }, + "path": [ + { + "description": "The ID of the secret", + "name": "id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "query": [], + "specLocation": "connector/secret_delete/ConnectorSecretDeleteRequest.ts#L22-L39" + }, + { + "kind": "response", + "body": { + "kind": "properties", + "properties": [ + { + "name": "deleted", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "boolean", + "namespace": "_builtins" + } + } + } + ] + }, + "name": { + "name": "Response", + "namespace": "connector.secret_delete" + }, + "specLocation": "connector/secret_delete/ConnectorSecretDeleteResponse.ts#L20-L24" + }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "no_body" + }, + "description": "Retrieves a secret stored by Connectors.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "connector.secret_get" + }, + "path": [ + { + "description": "The ID of the secret", + "name": "id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "query": [], + "specLocation": "connector/secret_get/ConnectorSecretGetRequest.ts#L22-L39" + }, + { + "kind": "response", + "body": { + "kind": "properties", + "properties": [ + { + "name": "id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + }, + { + "name": "value", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ] + }, + "name": { + "name": "Response", + "namespace": "connector.secret_get" + }, + "specLocation": "connector/secret_get/ConnectorSecretGetResponse.ts#L20-L25" + }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "name": "value", + "required": false, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ] + }, + "description": "Creates a secret for a Connector.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "connector.secret_post" + }, + "path": [], + "query": [], + "specLocation": "connector/secret_post/ConnectorSecretPostRequest.ts#L22-L38" + }, + { + "kind": "response", + "body": { + "kind": "properties", + "properties": [ + { + "name": "id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ] + }, + "name": { + "name": "Response", + "namespace": "connector.secret_post" + }, + "specLocation": "connector/secret_post/ConnectorSecretPostResponse.ts#L20-L24" + }, + { + "kind": "request", + "attachedBehaviors": [ + "CommonQueryParameters" + ], + "body": { + "kind": "properties", + "properties": [ + { + "name": "value", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ] + }, + "description": "Creates or updates a secret for a Connector.", + "inherits": { + "type": { + "name": "RequestBase", + "namespace": "_types" + } + }, + "name": { + "name": "Request", + "namespace": "connector.secret_put" + }, + "path": [ + { + "description": "The ID of the secret", + "name": "id", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "string", + "namespace": "_builtins" + } + } + } + ], + "query": [], + "specLocation": "connector/secret_put/ConnectorSecretPutRequest.ts#L22-L42" + }, + { + "kind": "response", + "body": { + "kind": "properties", + "properties": [ + { + "name": "result", + "required": true, + "type": { + "kind": "instance_of", + "type": { + "name": "Result", + "namespace": "_types" + } + } + } + ] + }, + "name": { + "name": "Response", + "namespace": "connector.secret_put" + }, + "specLocation": "connector/secret_put/ConnectorSecretPutResponse.ts#L22-L26" + }, { "kind": "request", "attachedBehaviors": [ diff --git a/output/typescript/types.ts b/output/typescript/types.ts index b6fc1f0aca..4b049df804 100644 --- a/output/typescript/types.ts +++ b/output/typescript/types.ts @@ -10782,6 +10782,44 @@ export interface ConnectorPutResponse { id: Id } +export interface ConnectorSecretDeleteRequest extends RequestBase { + id: string +} + +export interface ConnectorSecretDeleteResponse { + deleted: boolean +} + +export interface ConnectorSecretGetRequest extends RequestBase { + id: string +} + +export interface ConnectorSecretGetResponse { + id: string + value: string +} + +export interface ConnectorSecretPostRequest extends RequestBase { + body?: { + value?: string + } +} + +export interface ConnectorSecretPostResponse { + id: string +} + +export interface ConnectorSecretPutRequest extends RequestBase { + id: string + body?: { + value: string + } +} + +export interface ConnectorSecretPutResponse { + result: Result +} + export interface ConnectorSyncJobCancelRequest extends RequestBase { connector_sync_job_id: Id } diff --git a/specification/connector/secret_delete/ConnectorSecretDeleteRequest.ts b/specification/connector/secret_delete/ConnectorSecretDeleteRequest.ts new file mode 100644 index 0000000000..c1296329e6 --- /dev/null +++ b/specification/connector/secret_delete/ConnectorSecretDeleteRequest.ts @@ -0,0 +1,39 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { RequestBase } from '@_types/Base' + +/** + * Deletes a connector secret. + * + * @rest_spec_name connector.secret_delete + * @availability stack stability=experimental visibility=private + */ +export interface Request extends RequestBase { + urls: [ + { + path: '/_connector/_secret/{id}' + methods: ['DELETE'] + } + ] + path_parts: { + /** The ID of the secret */ + id: string + } +} diff --git a/specification/connector/secret_delete/ConnectorSecretDeleteResponse.ts b/specification/connector/secret_delete/ConnectorSecretDeleteResponse.ts new file mode 100644 index 0000000000..51d10bac9a --- /dev/null +++ b/specification/connector/secret_delete/ConnectorSecretDeleteResponse.ts @@ -0,0 +1,24 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export class Response { + body: { + deleted: boolean + } +} diff --git a/specification/connector/secret_get/ConnectorSecretGetRequest.ts b/specification/connector/secret_get/ConnectorSecretGetRequest.ts new file mode 100644 index 0000000000..dd1d440c27 --- /dev/null +++ b/specification/connector/secret_get/ConnectorSecretGetRequest.ts @@ -0,0 +1,39 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { RequestBase } from '@_types/Base' + +/** + * Retrieves a secret stored by Connectors. + * + * @rest_spec_name connector.secret_get + * @availability stack stability=experimental visibility=private + */ +export interface Request extends RequestBase { + urls: [ + { + path: '/_connector/_secret/{id}' + methods: ['GET'] + } + ] + path_parts: { + /** The ID of the secret */ + id: string + } +} diff --git a/specification/connector/secret_get/ConnectorSecretGetResponse.ts b/specification/connector/secret_get/ConnectorSecretGetResponse.ts new file mode 100644 index 0000000000..f30aae70fc --- /dev/null +++ b/specification/connector/secret_get/ConnectorSecretGetResponse.ts @@ -0,0 +1,25 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export class Response { + body: { + id: string + value: string + } +} diff --git a/specification/connector/secret_post/ConnectorSecretPostRequest.ts b/specification/connector/secret_post/ConnectorSecretPostRequest.ts new file mode 100644 index 0000000000..9129b46d59 --- /dev/null +++ b/specification/connector/secret_post/ConnectorSecretPostRequest.ts @@ -0,0 +1,38 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { RequestBase } from '@_types/Base' + +/** + * Creates a secret for a Connector. + * + * @rest_spec_name connector.secret_post + * @availability stack stability=experimental visibility=private + */ +export interface Request extends RequestBase { + urls: [ + { + path: '/_connector/_secret' + methods: ['POST'] + } + ] + body: { + value?: string + } +} diff --git a/specification/connector/secret_post/ConnectorSecretPostResponse.ts b/specification/connector/secret_post/ConnectorSecretPostResponse.ts new file mode 100644 index 0000000000..c8491cd171 --- /dev/null +++ b/specification/connector/secret_post/ConnectorSecretPostResponse.ts @@ -0,0 +1,24 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +export class Response { + body: { + id: string + } +} diff --git a/specification/connector/secret_put/ConnectorSecretPutRequest.ts b/specification/connector/secret_put/ConnectorSecretPutRequest.ts new file mode 100644 index 0000000000..7e44e2975b --- /dev/null +++ b/specification/connector/secret_put/ConnectorSecretPutRequest.ts @@ -0,0 +1,42 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { RequestBase } from '@_types/Base' + +/** + * Creates or updates a secret for a Connector. + * + * @rest_spec_name connector.secret_put + * @availability stack stability=experimental visibility=private + */ +export interface Request extends RequestBase { + urls: [ + { + path: '/_connector/_secret/{id}' + methods: ['PUT'] + } + ] + path_parts: { + /** The ID of the secret */ + id: string + } + body: { + value: string + } +} diff --git a/specification/connector/secret_put/ConnectorSecretPutResponse.ts b/specification/connector/secret_put/ConnectorSecretPutResponse.ts new file mode 100644 index 0000000000..fc194d6f20 --- /dev/null +++ b/specification/connector/secret_put/ConnectorSecretPutResponse.ts @@ -0,0 +1,26 @@ +/* + * Licensed to Elasticsearch B.V. under one or more contributor + * license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright + * ownership. Elasticsearch B.V. licenses this file to you under + * the Apache License, Version 2.0 (the "License"); you may + * not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import { Result } from '@_types/Result' + +export class Response { + body: { + result: Result + } +}