diff --git a/src/clients/flinkSql/.openapi-generator/FILES b/src/clients/flinkSql/.openapi-generator/FILES index 47cb313744..c0dbb3ebb3 100644 --- a/src/clients/flinkSql/.openapi-generator/FILES +++ b/src/clients/flinkSql/.openapi-generator/FILES @@ -1,14 +1,22 @@ +apis/AgentsSqlV1Api.ts apis/ConnectionsSqlV1Api.ts +apis/MaterializedTableVersionsSqlV1Api.ts +apis/MaterializedTablesSqlV1Api.ts apis/StatementExceptionsSqlV1Api.ts apis/StatementResultsSqlV1Api.ts apis/StatementsSqlV1Api.ts +apis/ToolsSqlV1Api.ts apis/index.ts index.ts models/ColumnDetails.ts +models/CreateSqlv1AgentRequest.ts models/CreateSqlv1Connection201Response.ts models/CreateSqlv1ConnectionRequest.ts +models/CreateSqlv1MaterializedTable201Response.ts +models/CreateSqlv1MaterializedTableRequest.ts models/CreateSqlv1Statement201Response.ts models/CreateSqlv1StatementRequest.ts +models/CreateSqlv1ToolRequest.ts models/DataType.ts models/ErrorSource.ts models/ExceptionListMeta.ts @@ -16,6 +24,7 @@ models/Failure.ts models/GetSqlv1Connection200Response.ts models/GetSqlv1Statement200Response.ts models/GetSqlv1StatementResult200Response.ts +models/GetSqlv1Tool200Response.ts models/JsonPatchRequestAddReplace.ts models/JsonPatchRequestMoveCopy.ts models/JsonPatchRequestRemove.ts @@ -25,6 +34,13 @@ models/ObjectMeta.ts models/PatchRequestInner.ts models/ResultListMeta.ts models/RowFieldType.ts +models/SqlV1Agent.ts +models/SqlV1AgentList.ts +models/SqlV1AgentMetadata.ts +models/SqlV1AgentSpec.ts +models/SqlV1AgentStatus.ts +models/SqlV1ColumnCommon.ts +models/SqlV1ComputedColumn.ts models/SqlV1Connection.ts models/SqlV1ConnectionList.ts models/SqlV1ConnectionListDataInner.ts @@ -33,9 +49,27 @@ models/SqlV1ConnectionMetadata.ts models/SqlV1ConnectionSpec.ts models/SqlV1ConnectionSpecAuthData.ts models/SqlV1ConnectionStatus.ts +models/SqlV1MaterializedTable.ts +models/SqlV1MaterializedTableColumnDetails.ts +models/SqlV1MaterializedTableConstraint.ts +models/SqlV1MaterializedTableDistribution.ts +models/SqlV1MaterializedTableList.ts +models/SqlV1MaterializedTableMetadata.ts +models/SqlV1MaterializedTableSpec.ts +models/SqlV1MaterializedTableStatus.ts +models/SqlV1MaterializedTableVersion.ts +models/SqlV1MaterializedTableVersionList.ts +models/SqlV1MaterializedTableVersionMetadata.ts +models/SqlV1MaterializedTableVersionSpec.ts +models/SqlV1MaterializedTableWarning.ts +models/SqlV1MaterializedTableWatermark.ts +models/SqlV1MetadataColumn.ts +models/SqlV1PhysicalColumn.ts models/SqlV1PlaintextProvider.ts +models/SqlV1ResourceChange.ts models/SqlV1ResultSchema.ts models/SqlV1ScalingStatus.ts +models/SqlV1StateLimitStatus.ts models/SqlV1Statement.ts models/SqlV1StatementException.ts models/SqlV1StatementExceptionList.ts @@ -47,9 +81,20 @@ models/SqlV1StatementResult.ts models/SqlV1StatementResultResults.ts models/SqlV1StatementSpec.ts models/SqlV1StatementStatus.ts +models/SqlV1StatementStatusAffectedResource.ts models/SqlV1StatementTraits.ts +models/SqlV1StatementWarning.ts +models/SqlV1Tool.ts +models/SqlV1ToolList.ts +models/SqlV1ToolListDataInner.ts +models/SqlV1ToolListMetadata.ts +models/SqlV1ToolMetadata.ts +models/SqlV1ToolSpec.ts +models/SqlV1ToolStatus.ts models/StatementObjectMeta.ts +models/UpdateSqlv1AgentRequest.ts models/UpdateSqlv1ConnectionRequest.ts +models/UpdateSqlv1MaterializedTableRequest.ts models/UpdateSqlv1StatementRequest.ts models/index.ts runtime.ts diff --git a/src/clients/flinkSql/apis/AgentsSqlV1Api.ts b/src/clients/flinkSql/apis/AgentsSqlV1Api.ts new file mode 100644 index 0000000000..5ef5e7aa2e --- /dev/null +++ b/src/clients/flinkSql/apis/AgentsSqlV1Api.ts @@ -0,0 +1,544 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import * as runtime from "../runtime"; +import type { + CreateSqlv1AgentRequest, + Failure, + SqlV1Agent, + SqlV1AgentList, + UpdateSqlv1AgentRequest, +} from "../models/index"; +import { + CreateSqlv1AgentRequestFromJSON, + CreateSqlv1AgentRequestToJSON, + FailureFromJSON, + FailureToJSON, + SqlV1AgentFromJSON, + SqlV1AgentToJSON, + SqlV1AgentListFromJSON, + SqlV1AgentListToJSON, + UpdateSqlv1AgentRequestFromJSON, + UpdateSqlv1AgentRequestToJSON, +} from "../models/index"; + +export interface CreateSqlv1AgentOperationRequest { + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + CreateSqlv1AgentRequest?: CreateSqlv1AgentRequest; +} + +export interface DeleteSqlv1AgentRequest { + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + agent_name: string; +} + +export interface GetSqlv1AgentRequest { + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + agent_name: string; +} + +export interface ListSqlv1AgentsRequest { + organization_id: string; + environment_id: string; + page_size?: number; + page_token?: string; +} + +export interface UpdateSqlv1AgentOperationRequest { + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + agent_name: string; + UpdateSqlv1AgentRequest: UpdateSqlv1AgentRequest; +} + +/** + * + */ +export class AgentsSqlV1Api extends runtime.BaseAPI { + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to create an Agent. + * Create an Agent + */ + async createSqlv1AgentRaw( + requestParameters: CreateSqlv1AgentOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling createSqlv1Agent().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling createSqlv1Agent().', + ); + } + + if (requestParameters["kafka_cluster_id"] == null) { + throw new runtime.RequiredError( + "kafka_cluster_id", + 'Required parameter "kafka_cluster_id" was null or undefined when calling createSqlv1Agent().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/agents` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"kafka_cluster_id"}}`, + encodeURIComponent(String(requestParameters["kafka_cluster_id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: CreateSqlv1AgentRequestToJSON(requestParameters["CreateSqlv1AgentRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + CreateSqlv1AgentRequestFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to create an Agent. + * Create an Agent + */ + async createSqlv1Agent( + requestParameters: CreateSqlv1AgentOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.createSqlv1AgentRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Delete a specific Agent by name. + * Delete an Agent + */ + async deleteSqlv1AgentRaw( + requestParameters: DeleteSqlv1AgentRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling deleteSqlv1Agent().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling deleteSqlv1Agent().', + ); + } + + if (requestParameters["kafka_cluster_id"] == null) { + throw new runtime.RequiredError( + "kafka_cluster_id", + 'Required parameter "kafka_cluster_id" was null or undefined when calling deleteSqlv1Agent().', + ); + } + + if (requestParameters["agent_name"] == null) { + throw new runtime.RequiredError( + "agent_name", + 'Required parameter "agent_name" was null or undefined when calling deleteSqlv1Agent().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/agents/{agent_name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"kafka_cluster_id"}}`, + encodeURIComponent(String(requestParameters["kafka_cluster_id"])), + ) + .replace( + `{${"agent_name"}}`, + encodeURIComponent(String(requestParameters["agent_name"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Delete a specific Agent by name. + * Delete an Agent + */ + async deleteSqlv1Agent( + requestParameters: DeleteSqlv1AgentRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.deleteSqlv1AgentRaw(requestParameters, initOverrides); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific Agent by name. + * Read an Agent + */ + async getSqlv1AgentRaw( + requestParameters: GetSqlv1AgentRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling getSqlv1Agent().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling getSqlv1Agent().', + ); + } + + if (requestParameters["kafka_cluster_id"] == null) { + throw new runtime.RequiredError( + "kafka_cluster_id", + 'Required parameter "kafka_cluster_id" was null or undefined when calling getSqlv1Agent().', + ); + } + + if (requestParameters["agent_name"] == null) { + throw new runtime.RequiredError( + "agent_name", + 'Required parameter "agent_name" was null or undefined when calling getSqlv1Agent().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/agents/{agent_name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"kafka_cluster_id"}}`, + encodeURIComponent(String(requestParameters["kafka_cluster_id"])), + ) + .replace( + `{${"agent_name"}}`, + encodeURIComponent(String(requestParameters["agent_name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1AgentFromJSON(jsonValue)); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific Agent by name. + * Read an Agent + */ + async getSqlv1Agent( + requestParameters: GetSqlv1AgentRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSqlv1AgentRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all agents. + * List all agents + */ + async listSqlv1AgentsRaw( + requestParameters: ListSqlv1AgentsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling listSqlv1Agents().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling listSqlv1Agents().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["page_size"] != null) { + queryParameters["page_size"] = requestParameters["page_size"]; + } + + if (requestParameters["page_token"] != null) { + queryParameters["page_token"] = requestParameters["page_token"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/agents` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1AgentListFromJSON(jsonValue)); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all agents. + * List all agents + */ + async listSqlv1Agents( + requestParameters: ListSqlv1AgentsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listSqlv1AgentsRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to update an Agent\'s mutable fields. Mutable fields include: `description`, `model`, `prompt`, and `properties`. + * Alter an Agent + */ + async updateSqlv1AgentRaw( + requestParameters: UpdateSqlv1AgentOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling updateSqlv1Agent().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling updateSqlv1Agent().', + ); + } + + if (requestParameters["kafka_cluster_id"] == null) { + throw new runtime.RequiredError( + "kafka_cluster_id", + 'Required parameter "kafka_cluster_id" was null or undefined when calling updateSqlv1Agent().', + ); + } + + if (requestParameters["agent_name"] == null) { + throw new runtime.RequiredError( + "agent_name", + 'Required parameter "agent_name" was null or undefined when calling updateSqlv1Agent().', + ); + } + + if (requestParameters["UpdateSqlv1AgentRequest"] == null) { + throw new runtime.RequiredError( + "UpdateSqlv1AgentRequest", + 'Required parameter "UpdateSqlv1AgentRequest" was null or undefined when calling updateSqlv1Agent().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/agents/{agent_name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"kafka_cluster_id"}}`, + encodeURIComponent(String(requestParameters["kafka_cluster_id"])), + ) + .replace( + `{${"agent_name"}}`, + encodeURIComponent(String(requestParameters["agent_name"])), + ), + method: "PUT", + headers: headerParameters, + query: queryParameters, + body: UpdateSqlv1AgentRequestToJSON(requestParameters["UpdateSqlv1AgentRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1AgentFromJSON(jsonValue)); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to update an Agent\'s mutable fields. Mutable fields include: `description`, `model`, `prompt`, and `properties`. + * Alter an Agent + */ + async updateSqlv1Agent( + requestParameters: UpdateSqlv1AgentOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.updateSqlv1AgentRaw(requestParameters, initOverrides); + return await response.value(); + } +} diff --git a/src/clients/flinkSql/apis/ConnectionsSqlV1Api.ts b/src/clients/flinkSql/apis/ConnectionsSqlV1Api.ts index 60e0247c71..6a62d14616 100644 --- a/src/clients/flinkSql/apis/ConnectionsSqlV1Api.ts +++ b/src/clients/flinkSql/apis/ConnectionsSqlV1Api.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/apis/MaterializedTableVersionsSqlV1Api.ts b/src/clients/flinkSql/apis/MaterializedTableVersionsSqlV1Api.ts new file mode 100644 index 0000000000..05188114f4 --- /dev/null +++ b/src/clients/flinkSql/apis/MaterializedTableVersionsSqlV1Api.ts @@ -0,0 +1,265 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import * as runtime from "../runtime"; +import type { + Failure, + SqlV1MaterializedTableVersion, + SqlV1MaterializedTableVersionList, +} from "../models/index"; +import { + FailureFromJSON, + FailureToJSON, + SqlV1MaterializedTableVersionFromJSON, + SqlV1MaterializedTableVersionToJSON, + SqlV1MaterializedTableVersionListFromJSON, + SqlV1MaterializedTableVersionListToJSON, +} from "../models/index"; + +export interface GetSqlv1MaterializedTableVersionRequest { + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + table_name: string; + version: number; +} + +export interface ListSqlv1MaterializedTableVersionsRequest { + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + table_name: string; + page_size?: number; + page_token?: string; +} + +/** + * + */ +export class MaterializedTableVersionsSqlV1Api extends runtime.BaseAPI { + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific version of a Materialized Table. + * Read a materialized table version + */ + async getSqlv1MaterializedTableVersionRaw( + requestParameters: GetSqlv1MaterializedTableVersionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling getSqlv1MaterializedTableVersion().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling getSqlv1MaterializedTableVersion().', + ); + } + + if (requestParameters["kafka_cluster_id"] == null) { + throw new runtime.RequiredError( + "kafka_cluster_id", + 'Required parameter "kafka_cluster_id" was null or undefined when calling getSqlv1MaterializedTableVersion().', + ); + } + + if (requestParameters["table_name"] == null) { + throw new runtime.RequiredError( + "table_name", + 'Required parameter "table_name" was null or undefined when calling getSqlv1MaterializedTableVersion().', + ); + } + + if (requestParameters["version"] == null) { + throw new runtime.RequiredError( + "version", + 'Required parameter "version" was null or undefined when calling getSqlv1MaterializedTableVersion().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}/versions/{version}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"kafka_cluster_id"}}`, + encodeURIComponent(String(requestParameters["kafka_cluster_id"])), + ) + .replace(`{${"table_name"}}`, encodeURIComponent(String(requestParameters["table_name"]))) + .replace(`{${"version"}}`, encodeURIComponent(String(requestParameters["version"]))), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + SqlV1MaterializedTableVersionFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific version of a Materialized Table. + * Read a materialized table version + */ + async getSqlv1MaterializedTableVersion( + requestParameters: GetSqlv1MaterializedTableVersionRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSqlv1MaterializedTableVersionRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all versions for a specific Materialized Table. + * List all the versions of a materialized table + */ + async listSqlv1MaterializedTableVersionsRaw( + requestParameters: ListSqlv1MaterializedTableVersionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling listSqlv1MaterializedTableVersions().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling listSqlv1MaterializedTableVersions().', + ); + } + + if (requestParameters["kafka_cluster_id"] == null) { + throw new runtime.RequiredError( + "kafka_cluster_id", + 'Required parameter "kafka_cluster_id" was null or undefined when calling listSqlv1MaterializedTableVersions().', + ); + } + + if (requestParameters["table_name"] == null) { + throw new runtime.RequiredError( + "table_name", + 'Required parameter "table_name" was null or undefined when calling listSqlv1MaterializedTableVersions().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["page_size"] != null) { + queryParameters["page_size"] = requestParameters["page_size"]; + } + + if (requestParameters["page_token"] != null) { + queryParameters["page_token"] = requestParameters["page_token"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}/versions` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"kafka_cluster_id"}}`, + encodeURIComponent(String(requestParameters["kafka_cluster_id"])), + ) + .replace( + `{${"table_name"}}`, + encodeURIComponent(String(requestParameters["table_name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + SqlV1MaterializedTableVersionListFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all versions for a specific Materialized Table. + * List all the versions of a materialized table + */ + async listSqlv1MaterializedTableVersions( + requestParameters: ListSqlv1MaterializedTableVersionsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listSqlv1MaterializedTableVersionsRaw( + requestParameters, + initOverrides, + ); + return await response.value(); + } +} diff --git a/src/clients/flinkSql/apis/MaterializedTablesSqlV1Api.ts b/src/clients/flinkSql/apis/MaterializedTablesSqlV1Api.ts new file mode 100644 index 0000000000..a9f8bd051d --- /dev/null +++ b/src/clients/flinkSql/apis/MaterializedTablesSqlV1Api.ts @@ -0,0 +1,557 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import * as runtime from "../runtime"; +import type { + CreateSqlv1MaterializedTable201Response, + CreateSqlv1MaterializedTableRequest, + Failure, + SqlV1MaterializedTable, + SqlV1MaterializedTableList, + UpdateSqlv1MaterializedTableRequest, +} from "../models/index"; +import { + CreateSqlv1MaterializedTable201ResponseFromJSON, + CreateSqlv1MaterializedTable201ResponseToJSON, + CreateSqlv1MaterializedTableRequestFromJSON, + CreateSqlv1MaterializedTableRequestToJSON, + FailureFromJSON, + FailureToJSON, + SqlV1MaterializedTableFromJSON, + SqlV1MaterializedTableToJSON, + SqlV1MaterializedTableListFromJSON, + SqlV1MaterializedTableListToJSON, + UpdateSqlv1MaterializedTableRequestFromJSON, + UpdateSqlv1MaterializedTableRequestToJSON, +} from "../models/index"; + +export interface CreateSqlv1MaterializedTableOperationRequest { + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + CreateSqlv1MaterializedTableRequest?: CreateSqlv1MaterializedTableRequest; +} + +export interface DeleteSqlv1MaterializedTableRequest { + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + table_name: string; +} + +export interface GetSqlv1MaterializedTableRequest { + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + table_name: string; +} + +export interface ListSqlv1MaterializedTablesRequest { + organization_id: string; + environment_id: string; + page_size?: number; + page_token?: string; +} + +export interface UpdateSqlv1MaterializedTableOperationRequest { + organization_id: string; + environment_id: string; + kafka_cluster_id: string; + table_name: string; + UpdateSqlv1MaterializedTableRequest: UpdateSqlv1MaterializedTableRequest; +} + +/** + * + */ +export class MaterializedTablesSqlV1Api extends runtime.BaseAPI { + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Create a new Materialized Table. + * Create a materialized table + */ + async createSqlv1MaterializedTableRaw( + requestParameters: CreateSqlv1MaterializedTableOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling createSqlv1MaterializedTable().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling createSqlv1MaterializedTable().', + ); + } + + if (requestParameters["kafka_cluster_id"] == null) { + throw new runtime.RequiredError( + "kafka_cluster_id", + 'Required parameter "kafka_cluster_id" was null or undefined when calling createSqlv1MaterializedTable().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"kafka_cluster_id"}}`, + encodeURIComponent(String(requestParameters["kafka_cluster_id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: CreateSqlv1MaterializedTableRequestToJSON( + requestParameters["CreateSqlv1MaterializedTableRequest"], + ), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + CreateSqlv1MaterializedTable201ResponseFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Create a new Materialized Table. + * Create a materialized table + */ + async createSqlv1MaterializedTable( + requestParameters: CreateSqlv1MaterializedTableOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.createSqlv1MaterializedTableRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Delete a specific Materialized Table by name. + * Delete a materialized table + */ + async deleteSqlv1MaterializedTableRaw( + requestParameters: DeleteSqlv1MaterializedTableRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling deleteSqlv1MaterializedTable().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling deleteSqlv1MaterializedTable().', + ); + } + + if (requestParameters["kafka_cluster_id"] == null) { + throw new runtime.RequiredError( + "kafka_cluster_id", + 'Required parameter "kafka_cluster_id" was null or undefined when calling deleteSqlv1MaterializedTable().', + ); + } + + if (requestParameters["table_name"] == null) { + throw new runtime.RequiredError( + "table_name", + 'Required parameter "table_name" was null or undefined when calling deleteSqlv1MaterializedTable().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"kafka_cluster_id"}}`, + encodeURIComponent(String(requestParameters["kafka_cluster_id"])), + ) + .replace( + `{${"table_name"}}`, + encodeURIComponent(String(requestParameters["table_name"])), + ), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Delete a specific Materialized Table by name. + * Delete a materialized table + */ + async deleteSqlv1MaterializedTable( + requestParameters: DeleteSqlv1MaterializedTableRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.deleteSqlv1MaterializedTableRaw(requestParameters, initOverrides); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific Materialized Table by name. + * Read a materialized table + */ + async getSqlv1MaterializedTableRaw( + requestParameters: GetSqlv1MaterializedTableRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling getSqlv1MaterializedTable().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling getSqlv1MaterializedTable().', + ); + } + + if (requestParameters["kafka_cluster_id"] == null) { + throw new runtime.RequiredError( + "kafka_cluster_id", + 'Required parameter "kafka_cluster_id" was null or undefined when calling getSqlv1MaterializedTable().', + ); + } + + if (requestParameters["table_name"] == null) { + throw new runtime.RequiredError( + "table_name", + 'Required parameter "table_name" was null or undefined when calling getSqlv1MaterializedTable().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"kafka_cluster_id"}}`, + encodeURIComponent(String(requestParameters["kafka_cluster_id"])), + ) + .replace( + `{${"table_name"}}`, + encodeURIComponent(String(requestParameters["table_name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + SqlV1MaterializedTableFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a specific Materialized Table by name. + * Read a materialized table + */ + async getSqlv1MaterializedTable( + requestParameters: GetSqlv1MaterializedTableRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSqlv1MaterializedTableRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all materialized tables. + * List all materialized tables + */ + async listSqlv1MaterializedTablesRaw( + requestParameters: ListSqlv1MaterializedTablesRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling listSqlv1MaterializedTables().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling listSqlv1MaterializedTables().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["page_size"] != null) { + queryParameters["page_size"] = requestParameters["page_size"]; + } + + if (requestParameters["page_token"] != null) { + queryParameters["page_token"] = requestParameters["page_token"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/materialized-tables` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + SqlV1MaterializedTableListFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted and paginated list of all materialized tables. + * List all materialized tables + */ + async listSqlv1MaterializedTables( + requestParameters: ListSqlv1MaterializedTablesRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listSqlv1MaterializedTablesRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a Materialized Table\'s mutable fields. Mutable fields include: `query`, `stopped`, `compute_pool_id`, and `principal`. + * Update/Evolve a materialized table + */ + async updateSqlv1MaterializedTableRaw( + requestParameters: UpdateSqlv1MaterializedTableOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling updateSqlv1MaterializedTable().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling updateSqlv1MaterializedTable().', + ); + } + + if (requestParameters["kafka_cluster_id"] == null) { + throw new runtime.RequiredError( + "kafka_cluster_id", + 'Required parameter "kafka_cluster_id" was null or undefined when calling updateSqlv1MaterializedTable().', + ); + } + + if (requestParameters["table_name"] == null) { + throw new runtime.RequiredError( + "table_name", + 'Required parameter "table_name" was null or undefined when calling updateSqlv1MaterializedTable().', + ); + } + + if (requestParameters["UpdateSqlv1MaterializedTableRequest"] == null) { + throw new runtime.RequiredError( + "UpdateSqlv1MaterializedTableRequest", + 'Required parameter "UpdateSqlv1MaterializedTableRequest" was null or undefined when calling updateSqlv1MaterializedTable().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"kafka_cluster_id"}}`, + encodeURIComponent(String(requestParameters["kafka_cluster_id"])), + ) + .replace( + `{${"table_name"}}`, + encodeURIComponent(String(requestParameters["table_name"])), + ), + method: "PUT", + headers: headerParameters, + query: queryParameters, + body: UpdateSqlv1MaterializedTableRequestToJSON( + requestParameters["UpdateSqlv1MaterializedTableRequest"], + ), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + SqlV1MaterializedTableFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) Make a request to update a Materialized Table\'s mutable fields. Mutable fields include: `query`, `stopped`, `compute_pool_id`, and `principal`. + * Update/Evolve a materialized table + */ + async updateSqlv1MaterializedTable( + requestParameters: UpdateSqlv1MaterializedTableOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.updateSqlv1MaterializedTableRaw(requestParameters, initOverrides); + return await response.value(); + } +} diff --git a/src/clients/flinkSql/apis/StatementExceptionsSqlV1Api.ts b/src/clients/flinkSql/apis/StatementExceptionsSqlV1Api.ts index f3671420c4..f889cff0e3 100644 --- a/src/clients/flinkSql/apis/StatementExceptionsSqlV1Api.ts +++ b/src/clients/flinkSql/apis/StatementExceptionsSqlV1Api.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -64,6 +64,14 @@ export class StatementExceptionsSqlV1Api extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + if ( this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined) diff --git a/src/clients/flinkSql/apis/StatementResultsSqlV1Api.ts b/src/clients/flinkSql/apis/StatementResultsSqlV1Api.ts index 1b6d4aedc5..fcadd8ed9a 100644 --- a/src/clients/flinkSql/apis/StatementResultsSqlV1Api.ts +++ b/src/clients/flinkSql/apis/StatementResultsSqlV1Api.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -69,6 +69,14 @@ export class StatementResultsSqlV1Api extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + if ( this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined) diff --git a/src/clients/flinkSql/apis/StatementsSqlV1Api.ts b/src/clients/flinkSql/apis/StatementsSqlV1Api.ts index 8729414a7f..5651f06ef9 100644 --- a/src/clients/flinkSql/apis/StatementsSqlV1Api.ts +++ b/src/clients/flinkSql/apis/StatementsSqlV1Api.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -112,6 +112,14 @@ export class StatementsSqlV1Api extends runtime.BaseAPI { headerParameters["Content-Type"] = "application/json"; + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + if ( this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined) @@ -188,6 +196,14 @@ export class StatementsSqlV1Api extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + if ( this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined) @@ -264,6 +280,14 @@ export class StatementsSqlV1Api extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + if ( this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined) @@ -352,6 +376,14 @@ export class StatementsSqlV1Api extends runtime.BaseAPI { const headerParameters: runtime.HTTPHeaders = {}; + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + if ( this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined) @@ -429,6 +461,14 @@ export class StatementsSqlV1Api extends runtime.BaseAPI { headerParameters["Content-Type"] = "application/json-patch+json"; + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + if ( this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined) @@ -511,6 +551,14 @@ export class StatementsSqlV1Api extends runtime.BaseAPI { headerParameters["Content-Type"] = "application/json"; + if (this.configuration && this.configuration.accessToken) { + // oauth required + headerParameters["Authorization"] = await this.configuration.accessToken( + "external-access-token", + [], + ); + } + if ( this.configuration && (this.configuration.username !== undefined || this.configuration.password !== undefined) diff --git a/src/clients/flinkSql/apis/ToolsSqlV1Api.ts b/src/clients/flinkSql/apis/ToolsSqlV1Api.ts new file mode 100644 index 0000000000..7f7fa16738 --- /dev/null +++ b/src/clients/flinkSql/apis/ToolsSqlV1Api.ts @@ -0,0 +1,391 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import * as runtime from "../runtime"; +import type { + CreateSqlv1ToolRequest, + Failure, + GetSqlv1Tool200Response, + SqlV1ToolList, +} from "../models/index"; +import { + CreateSqlv1ToolRequestFromJSON, + CreateSqlv1ToolRequestToJSON, + FailureFromJSON, + FailureToJSON, + GetSqlv1Tool200ResponseFromJSON, + GetSqlv1Tool200ResponseToJSON, + SqlV1ToolListFromJSON, + SqlV1ToolListToJSON, +} from "../models/index"; + +export interface CreateSqlv1ToolOperationRequest { + organization_id: string; + environment_id: string; + CreateSqlv1ToolRequest?: CreateSqlv1ToolRequest; +} + +export interface DeleteSqlv1ToolRequest { + organization_id: string; + environment_id: string; + database_name: string; + tool_name: string; +} + +export interface GetSqlv1ToolRequest { + organization_id: string; + environment_id: string; + database_name: string; + tool_name: string; +} + +export interface ListSqlv1ToolsRequest { + organization_id: string; + environment_id: string; + database_name: string; + page_size?: number; + page_token?: string; +} + +/** + * + */ +export class ToolsSqlV1Api extends runtime.BaseAPI { + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a Tool. + * Create a Tool + */ + async createSqlv1ToolRaw( + requestParameters: CreateSqlv1ToolOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling createSqlv1Tool().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling createSqlv1Tool().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + headerParameters["Content-Type"] = "application/json"; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/tools` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ), + method: "POST", + headers: headerParameters, + query: queryParameters, + body: CreateSqlv1ToolRequestToJSON(requestParameters["CreateSqlv1ToolRequest"]), + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + CreateSqlv1ToolRequestFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to create a Tool. + * Create a Tool + */ + async createSqlv1Tool( + requestParameters: CreateSqlv1ToolOperationRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.createSqlv1ToolRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a Tool. + * Delete a Tool + */ + async deleteSqlv1ToolRaw( + requestParameters: DeleteSqlv1ToolRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling deleteSqlv1Tool().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling deleteSqlv1Tool().', + ); + } + + if (requestParameters["database_name"] == null) { + throw new runtime.RequiredError( + "database_name", + 'Required parameter "database_name" was null or undefined when calling deleteSqlv1Tool().', + ); + } + + if (requestParameters["tool_name"] == null) { + throw new runtime.RequiredError( + "tool_name", + 'Required parameter "tool_name" was null or undefined when calling deleteSqlv1Tool().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{database_name}/tools/{tool_name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"database_name"}}`, + encodeURIComponent(String(requestParameters["database_name"])), + ) + .replace(`{${"tool_name"}}`, encodeURIComponent(String(requestParameters["tool_name"]))), + method: "DELETE", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.VoidApiResponse(response); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to delete a Tool. + * Delete a Tool + */ + async deleteSqlv1Tool( + requestParameters: DeleteSqlv1ToolRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + await this.deleteSqlv1ToolRaw(requestParameters, initOverrides); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a Tool. + * Read a Tool + */ + async getSqlv1ToolRaw( + requestParameters: GetSqlv1ToolRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling getSqlv1Tool().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling getSqlv1Tool().', + ); + } + + if (requestParameters["database_name"] == null) { + throw new runtime.RequiredError( + "database_name", + 'Required parameter "database_name" was null or undefined when calling getSqlv1Tool().', + ); + } + + if (requestParameters["tool_name"] == null) { + throw new runtime.RequiredError( + "tool_name", + 'Required parameter "tool_name" was null or undefined when calling getSqlv1Tool().', + ); + } + + const queryParameters: any = {}; + + const headerParameters: runtime.HTTPHeaders = {}; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{database_name}/tools/{tool_name}` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"database_name"}}`, + encodeURIComponent(String(requestParameters["database_name"])), + ) + .replace(`{${"tool_name"}}`, encodeURIComponent(String(requestParameters["tool_name"]))), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => + GetSqlv1Tool200ResponseFromJSON(jsonValue), + ); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Make a request to read a Tool. + * Read a Tool + */ + async getSqlv1Tool( + requestParameters: GetSqlv1ToolRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.getSqlv1ToolRaw(requestParameters, initOverrides); + return await response.value(); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all Tools. + * List of Tools + */ + async listSqlv1ToolsRaw( + requestParameters: ListSqlv1ToolsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise> { + if (requestParameters["organization_id"] == null) { + throw new runtime.RequiredError( + "organization_id", + 'Required parameter "organization_id" was null or undefined when calling listSqlv1Tools().', + ); + } + + if (requestParameters["environment_id"] == null) { + throw new runtime.RequiredError( + "environment_id", + 'Required parameter "environment_id" was null or undefined when calling listSqlv1Tools().', + ); + } + + if (requestParameters["database_name"] == null) { + throw new runtime.RequiredError( + "database_name", + 'Required parameter "database_name" was null or undefined when calling listSqlv1Tools().', + ); + } + + const queryParameters: any = {}; + + if (requestParameters["page_size"] != null) { + queryParameters["page_size"] = requestParameters["page_size"]; + } + + if (requestParameters["page_token"] != null) { + queryParameters["page_token"] = requestParameters["page_token"]; + } + + const headerParameters: runtime.HTTPHeaders = {}; + + if ( + this.configuration && + (this.configuration.username !== undefined || this.configuration.password !== undefined) + ) { + headerParameters["Authorization"] = + "Basic " + btoa(this.configuration.username + ":" + this.configuration.password); + } + const response = await this.request( + { + path: `/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{database_name}/tools` + .replace( + `{${"organization_id"}}`, + encodeURIComponent(String(requestParameters["organization_id"])), + ) + .replace( + `{${"environment_id"}}`, + encodeURIComponent(String(requestParameters["environment_id"])), + ) + .replace( + `{${"database_name"}}`, + encodeURIComponent(String(requestParameters["database_name"])), + ), + method: "GET", + headers: headerParameters, + query: queryParameters, + }, + initOverrides, + ); + + return new runtime.JSONApiResponse(response, (jsonValue) => SqlV1ToolListFromJSON(jsonValue)); + } + + /** + * [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) Retrieve a sorted, filtered, paginated list of all Tools. + * List of Tools + */ + async listSqlv1Tools( + requestParameters: ListSqlv1ToolsRequest, + initOverrides?: RequestInit | runtime.InitOverrideFunction, + ): Promise { + const response = await this.listSqlv1ToolsRaw(requestParameters, initOverrides); + return await response.value(); + } +} diff --git a/src/clients/flinkSql/apis/index.ts b/src/clients/flinkSql/apis/index.ts index 4147fcacc2..a253b01d4f 100644 --- a/src/clients/flinkSql/apis/index.ts +++ b/src/clients/flinkSql/apis/index.ts @@ -1,6 +1,10 @@ /* tslint:disable */ /* eslint-disable */ +export * from "./AgentsSqlV1Api"; export * from "./ConnectionsSqlV1Api"; +export * from "./MaterializedTableVersionsSqlV1Api"; +export * from "./MaterializedTablesSqlV1Api"; export * from "./StatementExceptionsSqlV1Api"; export * from "./StatementResultsSqlV1Api"; export * from "./StatementsSqlV1Api"; +export * from "./ToolsSqlV1Api"; diff --git a/src/clients/flinkSql/models/ColumnDetails.ts b/src/clients/flinkSql/models/ColumnDetails.ts index a511c7afc2..097b867e16 100644 --- a/src/clients/flinkSql/models/ColumnDetails.ts +++ b/src/clients/flinkSql/models/ColumnDetails.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/CreateSqlv1AgentRequest.ts b/src/clients/flinkSql/models/CreateSqlv1AgentRequest.ts new file mode 100644 index 0000000000..d4f5dad67a --- /dev/null +++ b/src/clients/flinkSql/models/CreateSqlv1AgentRequest.ts @@ -0,0 +1,159 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +import type { SqlV1AgentMetadata } from "./SqlV1AgentMetadata"; +import { + SqlV1AgentMetadataFromJSON, + SqlV1AgentMetadataFromJSONTyped, + SqlV1AgentMetadataToJSON, + SqlV1AgentMetadataToJSONTyped, +} from "./SqlV1AgentMetadata"; +import type { SqlV1AgentStatus } from "./SqlV1AgentStatus"; +import { + SqlV1AgentStatusFromJSON, + SqlV1AgentStatusFromJSONTyped, + SqlV1AgentStatusToJSON, + SqlV1AgentStatusToJSONTyped, +} from "./SqlV1AgentStatus"; + +/** + * + * @export + * @interface CreateSqlv1AgentRequest + */ +export interface CreateSqlv1AgentRequest { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateSqlv1AgentRequest + */ + readonly api_version: CreateSqlv1AgentRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateSqlv1AgentRequest + */ + readonly kind: CreateSqlv1AgentRequestKindEnum; + /** + * + * @type {SqlV1AgentMetadata} + * @memberof CreateSqlv1AgentRequest + */ + metadata: SqlV1AgentMetadata; + /** + * The user-provided name of the agent, unique within this environment. + * @type {string} + * @memberof CreateSqlv1AgentRequest + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof CreateSqlv1AgentRequest + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof CreateSqlv1AgentRequest + */ + readonly environment_id: string; + /** + * + * @type {object} + * @memberof CreateSqlv1AgentRequest + */ + spec: object; + /** + * + * @type {SqlV1AgentStatus} + * @memberof CreateSqlv1AgentRequest + */ + readonly status?: SqlV1AgentStatus; +} + +/** + * @export + * @enum {string} + */ +export enum CreateSqlv1AgentRequestApiVersionEnum { + SqlV1 = "sql/v1", +} +/** + * @export + * @enum {string} + */ +export enum CreateSqlv1AgentRequestKindEnum { + Agent = "Agent", +} + +/** + * Check if a given object implements the CreateSqlv1AgentRequest interface. + */ +export function instanceOfCreateSqlv1AgentRequest(value: object): value is CreateSqlv1AgentRequest { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("organization_id" in value) || value["organization_id"] === undefined) return false; + if (!("environment_id" in value) || value["environment_id"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; +} + +export function CreateSqlv1AgentRequestFromJSON(json: any): CreateSqlv1AgentRequest { + return CreateSqlv1AgentRequestFromJSONTyped(json, false); +} + +export function CreateSqlv1AgentRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateSqlv1AgentRequest { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1AgentMetadataFromJSON(json["metadata"]), + name: json["name"], + organization_id: json["organization_id"], + environment_id: json["environment_id"], + spec: json["spec"], + status: json["status"] == null ? undefined : SqlV1AgentStatusFromJSON(json["status"]), + }; +} + +export function CreateSqlv1AgentRequestToJSON(json: any): CreateSqlv1AgentRequest { + return CreateSqlv1AgentRequestToJSONTyped(json, false); +} + +export function CreateSqlv1AgentRequestToJSONTyped( + value?: Omit< + CreateSqlv1AgentRequest, + "api_version" | "kind" | "organization_id" | "environment_id" | "status" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + metadata: SqlV1AgentMetadataToJSON(value["metadata"]), + name: value["name"], + spec: value["spec"], + }; +} diff --git a/src/clients/flinkSql/models/CreateSqlv1Connection201Response.ts b/src/clients/flinkSql/models/CreateSqlv1Connection201Response.ts index de7f6127b0..4165b79050 100644 --- a/src/clients/flinkSql/models/CreateSqlv1Connection201Response.ts +++ b/src/clients/flinkSql/models/CreateSqlv1Connection201Response.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/CreateSqlv1ConnectionRequest.ts b/src/clients/flinkSql/models/CreateSqlv1ConnectionRequest.ts index fa34eaecae..ef9b8c0ae0 100644 --- a/src/clients/flinkSql/models/CreateSqlv1ConnectionRequest.ts +++ b/src/clients/flinkSql/models/CreateSqlv1ConnectionRequest.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/CreateSqlv1MaterializedTable201Response.ts b/src/clients/flinkSql/models/CreateSqlv1MaterializedTable201Response.ts new file mode 100644 index 0000000000..12bdff495c --- /dev/null +++ b/src/clients/flinkSql/models/CreateSqlv1MaterializedTable201Response.ts @@ -0,0 +1,166 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +import type { SqlV1MaterializedTableMetadata } from "./SqlV1MaterializedTableMetadata"; +import { + SqlV1MaterializedTableMetadataFromJSON, + SqlV1MaterializedTableMetadataFromJSONTyped, + SqlV1MaterializedTableMetadataToJSON, + SqlV1MaterializedTableMetadataToJSONTyped, +} from "./SqlV1MaterializedTableMetadata"; +import type { SqlV1MaterializedTableStatus } from "./SqlV1MaterializedTableStatus"; +import { + SqlV1MaterializedTableStatusFromJSON, + SqlV1MaterializedTableStatusFromJSONTyped, + SqlV1MaterializedTableStatusToJSON, + SqlV1MaterializedTableStatusToJSONTyped, +} from "./SqlV1MaterializedTableStatus"; + +/** + * + * @export + * @interface CreateSqlv1MaterializedTable201Response + */ +export interface CreateSqlv1MaterializedTable201Response { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateSqlv1MaterializedTable201Response + */ + readonly api_version: CreateSqlv1MaterializedTable201ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateSqlv1MaterializedTable201Response + */ + readonly kind: CreateSqlv1MaterializedTable201ResponseKindEnum; + /** + * + * @type {SqlV1MaterializedTableMetadata} + * @memberof CreateSqlv1MaterializedTable201Response + */ + metadata: SqlV1MaterializedTableMetadata; + /** + * The user-provided name of the resource, unique within this environment. + * @type {string} + * @memberof CreateSqlv1MaterializedTable201Response + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof CreateSqlv1MaterializedTable201Response + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof CreateSqlv1MaterializedTable201Response + */ + readonly environment_id: string; + /** + * + * @type {object} + * @memberof CreateSqlv1MaterializedTable201Response + */ + spec: object; + /** + * + * @type {SqlV1MaterializedTableStatus} + * @memberof CreateSqlv1MaterializedTable201Response + */ + readonly status: SqlV1MaterializedTableStatus; +} + +/** + * @export + * @enum {string} + */ +export enum CreateSqlv1MaterializedTable201ResponseApiVersionEnum { + SqlV1 = "sql/v1", +} +/** + * @export + * @enum {string} + */ +export enum CreateSqlv1MaterializedTable201ResponseKindEnum { + MaterializedTable = "MaterializedTable", +} + +/** + * Check if a given object implements the CreateSqlv1MaterializedTable201Response interface. + */ +export function instanceOfCreateSqlv1MaterializedTable201Response( + value: object, +): value is CreateSqlv1MaterializedTable201Response { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("organization_id" in value) || value["organization_id"] === undefined) return false; + if (!("environment_id" in value) || value["environment_id"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + if (!("status" in value) || value["status"] === undefined) return false; + return true; +} + +export function CreateSqlv1MaterializedTable201ResponseFromJSON( + json: any, +): CreateSqlv1MaterializedTable201Response { + return CreateSqlv1MaterializedTable201ResponseFromJSONTyped(json, false); +} + +export function CreateSqlv1MaterializedTable201ResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateSqlv1MaterializedTable201Response { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1MaterializedTableMetadataFromJSON(json["metadata"]), + name: json["name"], + organization_id: json["organization_id"], + environment_id: json["environment_id"], + spec: json["spec"], + status: SqlV1MaterializedTableStatusFromJSON(json["status"]), + }; +} + +export function CreateSqlv1MaterializedTable201ResponseToJSON( + json: any, +): CreateSqlv1MaterializedTable201Response { + return CreateSqlv1MaterializedTable201ResponseToJSONTyped(json, false); +} + +export function CreateSqlv1MaterializedTable201ResponseToJSONTyped( + value?: Omit< + CreateSqlv1MaterializedTable201Response, + "api_version" | "kind" | "organization_id" | "environment_id" | "status" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + metadata: SqlV1MaterializedTableMetadataToJSON(value["metadata"]), + name: value["name"], + spec: value["spec"], + }; +} diff --git a/src/clients/flinkSql/models/CreateSqlv1MaterializedTableRequest.ts b/src/clients/flinkSql/models/CreateSqlv1MaterializedTableRequest.ts new file mode 100644 index 0000000000..29d9d43b34 --- /dev/null +++ b/src/clients/flinkSql/models/CreateSqlv1MaterializedTableRequest.ts @@ -0,0 +1,166 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +import type { SqlV1MaterializedTableMetadata } from "./SqlV1MaterializedTableMetadata"; +import { + SqlV1MaterializedTableMetadataFromJSON, + SqlV1MaterializedTableMetadataFromJSONTyped, + SqlV1MaterializedTableMetadataToJSON, + SqlV1MaterializedTableMetadataToJSONTyped, +} from "./SqlV1MaterializedTableMetadata"; +import type { SqlV1MaterializedTableStatus } from "./SqlV1MaterializedTableStatus"; +import { + SqlV1MaterializedTableStatusFromJSON, + SqlV1MaterializedTableStatusFromJSONTyped, + SqlV1MaterializedTableStatusToJSON, + SqlV1MaterializedTableStatusToJSONTyped, +} from "./SqlV1MaterializedTableStatus"; + +/** + * + * @export + * @interface CreateSqlv1MaterializedTableRequest + */ +export interface CreateSqlv1MaterializedTableRequest { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateSqlv1MaterializedTableRequest + */ + readonly api_version: CreateSqlv1MaterializedTableRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateSqlv1MaterializedTableRequest + */ + readonly kind: CreateSqlv1MaterializedTableRequestKindEnum; + /** + * + * @type {SqlV1MaterializedTableMetadata} + * @memberof CreateSqlv1MaterializedTableRequest + */ + metadata: SqlV1MaterializedTableMetadata; + /** + * The user-provided name of the resource, unique within this environment. + * @type {string} + * @memberof CreateSqlv1MaterializedTableRequest + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof CreateSqlv1MaterializedTableRequest + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof CreateSqlv1MaterializedTableRequest + */ + readonly environment_id: string; + /** + * + * @type {object} + * @memberof CreateSqlv1MaterializedTableRequest + */ + spec: object; + /** + * + * @type {SqlV1MaterializedTableStatus} + * @memberof CreateSqlv1MaterializedTableRequest + */ + readonly status?: SqlV1MaterializedTableStatus; +} + +/** + * @export + * @enum {string} + */ +export enum CreateSqlv1MaterializedTableRequestApiVersionEnum { + SqlV1 = "sql/v1", +} +/** + * @export + * @enum {string} + */ +export enum CreateSqlv1MaterializedTableRequestKindEnum { + MaterializedTable = "MaterializedTable", +} + +/** + * Check if a given object implements the CreateSqlv1MaterializedTableRequest interface. + */ +export function instanceOfCreateSqlv1MaterializedTableRequest( + value: object, +): value is CreateSqlv1MaterializedTableRequest { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("organization_id" in value) || value["organization_id"] === undefined) return false; + if (!("environment_id" in value) || value["environment_id"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; +} + +export function CreateSqlv1MaterializedTableRequestFromJSON( + json: any, +): CreateSqlv1MaterializedTableRequest { + return CreateSqlv1MaterializedTableRequestFromJSONTyped(json, false); +} + +export function CreateSqlv1MaterializedTableRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateSqlv1MaterializedTableRequest { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1MaterializedTableMetadataFromJSON(json["metadata"]), + name: json["name"], + organization_id: json["organization_id"], + environment_id: json["environment_id"], + spec: json["spec"], + status: + json["status"] == null ? undefined : SqlV1MaterializedTableStatusFromJSON(json["status"]), + }; +} + +export function CreateSqlv1MaterializedTableRequestToJSON( + json: any, +): CreateSqlv1MaterializedTableRequest { + return CreateSqlv1MaterializedTableRequestToJSONTyped(json, false); +} + +export function CreateSqlv1MaterializedTableRequestToJSONTyped( + value?: Omit< + CreateSqlv1MaterializedTableRequest, + "api_version" | "kind" | "organization_id" | "environment_id" | "status" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + metadata: SqlV1MaterializedTableMetadataToJSON(value["metadata"]), + name: value["name"], + spec: value["spec"], + }; +} diff --git a/src/clients/flinkSql/models/CreateSqlv1Statement201Response.ts b/src/clients/flinkSql/models/CreateSqlv1Statement201Response.ts index ba3de035a9..1ff2c48053 100644 --- a/src/clients/flinkSql/models/CreateSqlv1Statement201Response.ts +++ b/src/clients/flinkSql/models/CreateSqlv1Statement201Response.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/CreateSqlv1StatementRequest.ts b/src/clients/flinkSql/models/CreateSqlv1StatementRequest.ts index 0a9e6bb5e8..b8f33c8dbf 100644 --- a/src/clients/flinkSql/models/CreateSqlv1StatementRequest.ts +++ b/src/clients/flinkSql/models/CreateSqlv1StatementRequest.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/CreateSqlv1ToolRequest.ts b/src/clients/flinkSql/models/CreateSqlv1ToolRequest.ts new file mode 100644 index 0000000000..87b191ef14 --- /dev/null +++ b/src/clients/flinkSql/models/CreateSqlv1ToolRequest.ts @@ -0,0 +1,138 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +import type { SqlV1ToolStatus } from "./SqlV1ToolStatus"; +import { + SqlV1ToolStatusFromJSON, + SqlV1ToolStatusFromJSONTyped, + SqlV1ToolStatusToJSON, + SqlV1ToolStatusToJSONTyped, +} from "./SqlV1ToolStatus"; +import type { SqlV1ToolMetadata } from "./SqlV1ToolMetadata"; +import { + SqlV1ToolMetadataFromJSON, + SqlV1ToolMetadataFromJSONTyped, + SqlV1ToolMetadataToJSON, + SqlV1ToolMetadataToJSONTyped, +} from "./SqlV1ToolMetadata"; + +/** + * + * @export + * @interface CreateSqlv1ToolRequest + */ +export interface CreateSqlv1ToolRequest { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof CreateSqlv1ToolRequest + */ + readonly api_version?: CreateSqlv1ToolRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof CreateSqlv1ToolRequest + */ + readonly kind?: CreateSqlv1ToolRequestKindEnum; + /** + * + * @type {SqlV1ToolMetadata} + * @memberof CreateSqlv1ToolRequest + */ + metadata?: SqlV1ToolMetadata; + /** + * The user provided name of the tool, unique within this environment. + * @type {string} + * @memberof CreateSqlv1ToolRequest + */ + name: string; + /** + * + * @type {object} + * @memberof CreateSqlv1ToolRequest + */ + spec: object; + /** + * + * @type {SqlV1ToolStatus} + * @memberof CreateSqlv1ToolRequest + */ + status?: SqlV1ToolStatus; +} + +/** + * @export + * @enum {string} + */ +export enum CreateSqlv1ToolRequestApiVersionEnum { + SqlV1 = "sql/v1", +} +/** + * @export + * @enum {string} + */ +export enum CreateSqlv1ToolRequestKindEnum { + Tool = "Tool", +} + +/** + * Check if a given object implements the CreateSqlv1ToolRequest interface. + */ +export function instanceOfCreateSqlv1ToolRequest(value: object): value is CreateSqlv1ToolRequest { + if (!("name" in value) || value["name"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; +} + +export function CreateSqlv1ToolRequestFromJSON(json: any): CreateSqlv1ToolRequest { + return CreateSqlv1ToolRequestFromJSONTyped(json, false); +} + +export function CreateSqlv1ToolRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): CreateSqlv1ToolRequest { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + metadata: json["metadata"] == null ? undefined : SqlV1ToolMetadataFromJSON(json["metadata"]), + name: json["name"], + spec: json["spec"], + status: json["status"] == null ? undefined : SqlV1ToolStatusFromJSON(json["status"]), + }; +} + +export function CreateSqlv1ToolRequestToJSON(json: any): CreateSqlv1ToolRequest { + return CreateSqlv1ToolRequestToJSONTyped(json, false); +} + +export function CreateSqlv1ToolRequestToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + metadata: SqlV1ToolMetadataToJSON(value["metadata"]), + name: value["name"], + spec: value["spec"], + status: SqlV1ToolStatusToJSON(value["status"]), + }; +} diff --git a/src/clients/flinkSql/models/DataType.ts b/src/clients/flinkSql/models/DataType.ts index ad090ecfda..f23448ffc9 100644 --- a/src/clients/flinkSql/models/DataType.ts +++ b/src/clients/flinkSql/models/DataType.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -93,6 +93,12 @@ export interface DataType { * @memberof DataType */ fractional_precision?: number; + /** + * The class name of the structured data type (if applicable). + * @type {string} + * @memberof DataType + */ + class_name?: string; } /** @@ -126,6 +132,7 @@ export function DataTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): resolution: json["resolution"] == null ? undefined : json["resolution"], fractional_precision: json["fractional_precision"] == null ? undefined : json["fractional_precision"], + class_name: json["class_name"] == null ? undefined : json["class_name"], }; } @@ -154,5 +161,6 @@ export function DataTypeToJSONTyped( value["fields"] == null ? undefined : (value["fields"] as Array).map(RowFieldTypeToJSON), resolution: value["resolution"], fractional_precision: value["fractional_precision"], + class_name: value["class_name"], }; } diff --git a/src/clients/flinkSql/models/ErrorSource.ts b/src/clients/flinkSql/models/ErrorSource.ts index 6e8f1985d8..7d50c87736 100644 --- a/src/clients/flinkSql/models/ErrorSource.ts +++ b/src/clients/flinkSql/models/ErrorSource.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/ExceptionListMeta.ts b/src/clients/flinkSql/models/ExceptionListMeta.ts index a13f92946d..3db1020f8b 100644 --- a/src/clients/flinkSql/models/ExceptionListMeta.ts +++ b/src/clients/flinkSql/models/ExceptionListMeta.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/Failure.ts b/src/clients/flinkSql/models/Failure.ts index 44d91ad68f..eade361496 100644 --- a/src/clients/flinkSql/models/Failure.ts +++ b/src/clients/flinkSql/models/Failure.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/GetSqlv1Connection200Response.ts b/src/clients/flinkSql/models/GetSqlv1Connection200Response.ts index f019952bb2..7428f814fe 100644 --- a/src/clients/flinkSql/models/GetSqlv1Connection200Response.ts +++ b/src/clients/flinkSql/models/GetSqlv1Connection200Response.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/GetSqlv1Statement200Response.ts b/src/clients/flinkSql/models/GetSqlv1Statement200Response.ts index 6a97fcd2d7..f3fff21df0 100644 --- a/src/clients/flinkSql/models/GetSqlv1Statement200Response.ts +++ b/src/clients/flinkSql/models/GetSqlv1Statement200Response.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/GetSqlv1StatementResult200Response.ts b/src/clients/flinkSql/models/GetSqlv1StatementResult200Response.ts index 8019b6bc98..6def81789e 100644 --- a/src/clients/flinkSql/models/GetSqlv1StatementResult200Response.ts +++ b/src/clients/flinkSql/models/GetSqlv1StatementResult200Response.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/GetSqlv1Tool200Response.ts b/src/clients/flinkSql/models/GetSqlv1Tool200Response.ts new file mode 100644 index 0000000000..eb0c6b925d --- /dev/null +++ b/src/clients/flinkSql/models/GetSqlv1Tool200Response.ts @@ -0,0 +1,141 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +import type { SqlV1ToolStatus } from "./SqlV1ToolStatus"; +import { + SqlV1ToolStatusFromJSON, + SqlV1ToolStatusFromJSONTyped, + SqlV1ToolStatusToJSON, + SqlV1ToolStatusToJSONTyped, +} from "./SqlV1ToolStatus"; +import type { SqlV1ToolMetadata } from "./SqlV1ToolMetadata"; +import { + SqlV1ToolMetadataFromJSON, + SqlV1ToolMetadataFromJSONTyped, + SqlV1ToolMetadataToJSON, + SqlV1ToolMetadataToJSONTyped, +} from "./SqlV1ToolMetadata"; + +/** + * + * @export + * @interface GetSqlv1Tool200Response + */ +export interface GetSqlv1Tool200Response { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof GetSqlv1Tool200Response + */ + readonly api_version: GetSqlv1Tool200ResponseApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof GetSqlv1Tool200Response + */ + readonly kind: GetSqlv1Tool200ResponseKindEnum; + /** + * + * @type {SqlV1ToolMetadata} + * @memberof GetSqlv1Tool200Response + */ + metadata: SqlV1ToolMetadata; + /** + * The user provided name of the tool, unique within this environment. + * @type {string} + * @memberof GetSqlv1Tool200Response + */ + name: string; + /** + * + * @type {object} + * @memberof GetSqlv1Tool200Response + */ + spec: object; + /** + * + * @type {SqlV1ToolStatus} + * @memberof GetSqlv1Tool200Response + */ + status?: SqlV1ToolStatus; +} + +/** + * @export + * @enum {string} + */ +export enum GetSqlv1Tool200ResponseApiVersionEnum { + SqlV1 = "sql/v1", +} +/** + * @export + * @enum {string} + */ +export enum GetSqlv1Tool200ResponseKindEnum { + Tool = "Tool", +} + +/** + * Check if a given object implements the GetSqlv1Tool200Response interface. + */ +export function instanceOfGetSqlv1Tool200Response(value: object): value is GetSqlv1Tool200Response { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; +} + +export function GetSqlv1Tool200ResponseFromJSON(json: any): GetSqlv1Tool200Response { + return GetSqlv1Tool200ResponseFromJSONTyped(json, false); +} + +export function GetSqlv1Tool200ResponseFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): GetSqlv1Tool200Response { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1ToolMetadataFromJSON(json["metadata"]), + name: json["name"], + spec: json["spec"], + status: json["status"] == null ? undefined : SqlV1ToolStatusFromJSON(json["status"]), + }; +} + +export function GetSqlv1Tool200ResponseToJSON(json: any): GetSqlv1Tool200Response { + return GetSqlv1Tool200ResponseToJSONTyped(json, false); +} + +export function GetSqlv1Tool200ResponseToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + metadata: SqlV1ToolMetadataToJSON(value["metadata"]), + name: value["name"], + spec: value["spec"], + status: SqlV1ToolStatusToJSON(value["status"]), + }; +} diff --git a/src/clients/flinkSql/models/JsonPatchRequestAddReplace.ts b/src/clients/flinkSql/models/JsonPatchRequestAddReplace.ts index 1d8f007aa4..8cfb72dde9 100644 --- a/src/clients/flinkSql/models/JsonPatchRequestAddReplace.ts +++ b/src/clients/flinkSql/models/JsonPatchRequestAddReplace.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/JsonPatchRequestMoveCopy.ts b/src/clients/flinkSql/models/JsonPatchRequestMoveCopy.ts index 3333174af1..923c154125 100644 --- a/src/clients/flinkSql/models/JsonPatchRequestMoveCopy.ts +++ b/src/clients/flinkSql/models/JsonPatchRequestMoveCopy.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/JsonPatchRequestRemove.ts b/src/clients/flinkSql/models/JsonPatchRequestRemove.ts index 596ae87254..e19c0a7fc3 100644 --- a/src/clients/flinkSql/models/JsonPatchRequestRemove.ts +++ b/src/clients/flinkSql/models/JsonPatchRequestRemove.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/ListMeta.ts b/src/clients/flinkSql/models/ListMeta.ts index 63cc97aa7a..cecf58eb2a 100644 --- a/src/clients/flinkSql/models/ListMeta.ts +++ b/src/clients/flinkSql/models/ListMeta.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/ModelError.ts b/src/clients/flinkSql/models/ModelError.ts index f193e1bf1a..b1e74df29c 100644 --- a/src/clients/flinkSql/models/ModelError.ts +++ b/src/clients/flinkSql/models/ModelError.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/ObjectMeta.ts b/src/clients/flinkSql/models/ObjectMeta.ts index ae3aca5c14..15f8abe746 100644 --- a/src/clients/flinkSql/models/ObjectMeta.ts +++ b/src/clients/flinkSql/models/ObjectMeta.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/PatchRequestInner.ts b/src/clients/flinkSql/models/PatchRequestInner.ts index e9f80c1b88..a5c1169af1 100644 --- a/src/clients/flinkSql/models/PatchRequestInner.ts +++ b/src/clients/flinkSql/models/PatchRequestInner.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/ResultListMeta.ts b/src/clients/flinkSql/models/ResultListMeta.ts index c0472c2fb6..d7cf9f49f6 100644 --- a/src/clients/flinkSql/models/ResultListMeta.ts +++ b/src/clients/flinkSql/models/ResultListMeta.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/RowFieldType.ts b/src/clients/flinkSql/models/RowFieldType.ts index 1c3d11360c..d9b95e8160 100644 --- a/src/clients/flinkSql/models/RowFieldType.ts +++ b/src/clients/flinkSql/models/RowFieldType.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/SqlV1Agent.ts b/src/clients/flinkSql/models/SqlV1Agent.ts new file mode 100644 index 0000000000..31db27b776 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1Agent.ts @@ -0,0 +1,163 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +import type { SqlV1AgentMetadata } from "./SqlV1AgentMetadata"; +import { + SqlV1AgentMetadataFromJSON, + SqlV1AgentMetadataFromJSONTyped, + SqlV1AgentMetadataToJSON, + SqlV1AgentMetadataToJSONTyped, +} from "./SqlV1AgentMetadata"; +import type { SqlV1AgentStatus } from "./SqlV1AgentStatus"; +import { + SqlV1AgentStatusFromJSON, + SqlV1AgentStatusFromJSONTyped, + SqlV1AgentStatusToJSON, + SqlV1AgentStatusToJSONTyped, +} from "./SqlV1AgentStatus"; +import type { SqlV1AgentSpec } from "./SqlV1AgentSpec"; +import { + SqlV1AgentSpecFromJSON, + SqlV1AgentSpecFromJSONTyped, + SqlV1AgentSpecToJSON, + SqlV1AgentSpecToJSONTyped, +} from "./SqlV1AgentSpec"; + +/** + * Represents an Agent resource. + * @export + * @interface SqlV1Agent + */ +export interface SqlV1Agent { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1Agent + */ + readonly api_version: SqlV1AgentApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1Agent + */ + readonly kind: SqlV1AgentKindEnum; + /** + * + * @type {SqlV1AgentMetadata} + * @memberof SqlV1Agent + */ + metadata: SqlV1AgentMetadata; + /** + * The user-provided name of the agent, unique within this environment. + * @type {string} + * @memberof SqlV1Agent + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof SqlV1Agent + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof SqlV1Agent + */ + readonly environment_id: string; + /** + * + * @type {SqlV1AgentSpec} + * @memberof SqlV1Agent + */ + spec: SqlV1AgentSpec; + /** + * + * @type {SqlV1AgentStatus} + * @memberof SqlV1Agent + */ + readonly status?: SqlV1AgentStatus; +} + +/** + * @export + * @enum {string} + */ +export enum SqlV1AgentApiVersionEnum { + SqlV1 = "sql/v1", +} +/** + * @export + * @enum {string} + */ +export enum SqlV1AgentKindEnum { + Agent = "Agent", +} + +/** + * Check if a given object implements the SqlV1Agent interface. + */ +export function instanceOfSqlV1Agent(value: object): value is SqlV1Agent { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("organization_id" in value) || value["organization_id"] === undefined) return false; + if (!("environment_id" in value) || value["environment_id"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; +} + +export function SqlV1AgentFromJSON(json: any): SqlV1Agent { + return SqlV1AgentFromJSONTyped(json, false); +} + +export function SqlV1AgentFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1Agent { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1AgentMetadataFromJSON(json["metadata"]), + name: json["name"], + organization_id: json["organization_id"], + environment_id: json["environment_id"], + spec: SqlV1AgentSpecFromJSON(json["spec"]), + status: json["status"] == null ? undefined : SqlV1AgentStatusFromJSON(json["status"]), + }; +} + +export function SqlV1AgentToJSON(json: any): SqlV1Agent { + return SqlV1AgentToJSONTyped(json, false); +} + +export function SqlV1AgentToJSONTyped( + value?: Omit< + SqlV1Agent, + "api_version" | "kind" | "organization_id" | "environment_id" | "status" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + metadata: SqlV1AgentMetadataToJSON(value["metadata"]), + name: value["name"], + spec: SqlV1AgentSpecToJSON(value["spec"]), + }; +} diff --git a/src/clients/flinkSql/models/SqlV1AgentList.ts b/src/clients/flinkSql/models/SqlV1AgentList.ts new file mode 100644 index 0000000000..269196cb2a --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1AgentList.ts @@ -0,0 +1,124 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +import type { SqlV1Agent } from "./SqlV1Agent"; +import { + SqlV1AgentFromJSON, + SqlV1AgentFromJSONTyped, + SqlV1AgentToJSON, + SqlV1AgentToJSONTyped, +} from "./SqlV1Agent"; +import type { ListMeta } from "./ListMeta"; +import { + ListMetaFromJSON, + ListMetaFromJSONTyped, + ListMetaToJSON, + ListMetaToJSONTyped, +} from "./ListMeta"; + +/** + * A list of Agent resources. + * @export + * @interface SqlV1AgentList + */ +export interface SqlV1AgentList { + /** + * + * @type {string} + * @memberof SqlV1AgentList + */ + readonly api_version: SqlV1AgentListApiVersionEnum; + /** + * + * @type {string} + * @memberof SqlV1AgentList + */ + readonly kind: SqlV1AgentListKindEnum; + /** + * + * @type {ListMeta} + * @memberof SqlV1AgentList + */ + metadata: ListMeta; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof SqlV1AgentList + */ + data: Set; +} + +/** + * @export + * @enum {string} + */ +export enum SqlV1AgentListApiVersionEnum { + SqlV1 = "sql/v1", +} +/** + * @export + * @enum {string} + */ +export enum SqlV1AgentListKindEnum { + AgentList = "AgentList", +} + +/** + * Check if a given object implements the SqlV1AgentList interface. + */ +export function instanceOfSqlV1AgentList(value: object): value is SqlV1AgentList { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; +} + +export function SqlV1AgentListFromJSON(json: any): SqlV1AgentList { + return SqlV1AgentListFromJSONTyped(json, false); +} + +export function SqlV1AgentListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1AgentList { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: ListMetaFromJSON(json["metadata"]), + data: new Set((json["data"] as Array).map(SqlV1AgentFromJSON)), + }; +} + +export function SqlV1AgentListToJSON(json: any): SqlV1AgentList { + return SqlV1AgentListToJSONTyped(json, false); +} + +export function SqlV1AgentListToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + metadata: ListMetaToJSON(value["metadata"]), + data: Array.from(value["data"] as Set).map(SqlV1AgentToJSON), + }; +} diff --git a/src/clients/flinkSql/models/SqlV1AgentMetadata.ts b/src/clients/flinkSql/models/SqlV1AgentMetadata.ts new file mode 100644 index 0000000000..8358539e10 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1AgentMetadata.ts @@ -0,0 +1,117 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +/** + * + * @export + * @interface SqlV1AgentMetadata + */ +export interface SqlV1AgentMetadata { + /** + * + * @type {any} + * @memberof SqlV1AgentMetadata + */ + self: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1AgentMetadata + */ + created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1AgentMetadata + */ + updated_at?: Date; + /** + * + * @type {any} + * @memberof SqlV1AgentMetadata + */ + uid?: any | null; + /** + * + * @type {any} + * @memberof SqlV1AgentMetadata + */ + resource_version?: any | null; + /** + * + * @type {any} + * @memberof SqlV1AgentMetadata + */ + resource_name?: any | null; + /** + * + * @type {{ [key: string]: string; }} + * @memberof SqlV1AgentMetadata + */ + labels?: { [key: string]: string }; +} + +/** + * Check if a given object implements the SqlV1AgentMetadata interface. + */ +export function instanceOfSqlV1AgentMetadata(value: object): value is SqlV1AgentMetadata { + if (!("self" in value) || value["self"] === undefined) return false; + return true; +} + +export function SqlV1AgentMetadataFromJSON(json: any): SqlV1AgentMetadata { + return SqlV1AgentMetadataFromJSONTyped(json, false); +} + +export function SqlV1AgentMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1AgentMetadata { + if (json == null) { + return json; + } + return { + self: json["self"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + uid: json["uid"] == null ? undefined : json["uid"], + resource_version: json["resource_version"] == null ? undefined : json["resource_version"], + resource_name: json["resource_name"] == null ? undefined : json["resource_name"], + labels: json["labels"] == null ? undefined : json["labels"], + }; +} + +export function SqlV1AgentMetadataToJSON(json: any): SqlV1AgentMetadata { + return SqlV1AgentMetadataToJSONTyped(json, false); +} + +export function SqlV1AgentMetadataToJSONTyped( + value?: SqlV1AgentMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + self: value["self"], + created_at: value["created_at"] == null ? undefined : value["created_at"].toISOString(), + updated_at: value["updated_at"] == null ? undefined : value["updated_at"].toISOString(), + uid: value["uid"], + resource_version: value["resource_version"], + resource_name: value["resource_name"], + labels: value["labels"], + }; +} diff --git a/src/clients/flinkSql/models/SqlV1AgentSpec.ts b/src/clients/flinkSql/models/SqlV1AgentSpec.ts new file mode 100644 index 0000000000..b5b901f366 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1AgentSpec.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +/** + * The specifications of the Agent. + * @export + * @interface SqlV1AgentSpec + */ +export interface SqlV1AgentSpec { + /** + * The description of the agent. + * @type {string} + * @memberof SqlV1AgentSpec + */ + description?: string; + /** + * The name of the model the agent uses for inferencing. + * @type {string} + * @memberof SqlV1AgentSpec + */ + model?: string; + /** + * The instruction prompt that guides the agent's behavior. + * @type {string} + * @memberof SqlV1AgentSpec + */ + prompt?: string; + /** + * The list of tools available to the agent. + * @type {Array} + * @memberof SqlV1AgentSpec + */ + tools?: Array; + /** + * A set of key-value option pairs that configure the agent's behavior. + * @type {{ [key: string]: string; }} + * @memberof SqlV1AgentSpec + */ + properties?: { [key: string]: string }; +} + +/** + * Check if a given object implements the SqlV1AgentSpec interface. + */ +export function instanceOfSqlV1AgentSpec(value: object): value is SqlV1AgentSpec { + return true; +} + +export function SqlV1AgentSpecFromJSON(json: any): SqlV1AgentSpec { + return SqlV1AgentSpecFromJSONTyped(json, false); +} + +export function SqlV1AgentSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1AgentSpec { + if (json == null) { + return json; + } + return { + description: json["description"] == null ? undefined : json["description"], + model: json["model"] == null ? undefined : json["model"], + prompt: json["prompt"] == null ? undefined : json["prompt"], + tools: json["tools"] == null ? undefined : json["tools"], + properties: json["properties"] == null ? undefined : json["properties"], + }; +} + +export function SqlV1AgentSpecToJSON(json: any): SqlV1AgentSpec { + return SqlV1AgentSpecToJSONTyped(json, false); +} + +export function SqlV1AgentSpecToJSONTyped( + value?: SqlV1AgentSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + description: value["description"], + model: value["model"], + prompt: value["prompt"], + tools: value["tools"], + properties: value["properties"], + }; +} diff --git a/src/clients/flinkSql/models/SqlV1AgentStatus.ts b/src/clients/flinkSql/models/SqlV1AgentStatus.ts new file mode 100644 index 0000000000..0afe6929f1 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1AgentStatus.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +/** + * The status of the Agent. + * @export + * @interface SqlV1AgentStatus + */ +export interface SqlV1AgentStatus { + /** + * Describes the status of the agent: + * + * READY: The Agent is created; + * + * RUNNING: The Agent is created and running in a query; + * + * @type {string} + * @memberof SqlV1AgentStatus + */ + phase?: string; +} + +/** + * Check if a given object implements the SqlV1AgentStatus interface. + */ +export function instanceOfSqlV1AgentStatus(value: object): value is SqlV1AgentStatus { + return true; +} + +export function SqlV1AgentStatusFromJSON(json: any): SqlV1AgentStatus { + return SqlV1AgentStatusFromJSONTyped(json, false); +} + +export function SqlV1AgentStatusFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1AgentStatus { + if (json == null) { + return json; + } + return { + phase: json["phase"] == null ? undefined : json["phase"], + }; +} + +export function SqlV1AgentStatusToJSON(json: any): SqlV1AgentStatus { + return SqlV1AgentStatusToJSONTyped(json, false); +} + +export function SqlV1AgentStatusToJSONTyped( + value?: SqlV1AgentStatus | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + phase: value["phase"], + }; +} diff --git a/src/clients/flinkSql/models/SqlV1ColumnCommon.ts b/src/clients/flinkSql/models/SqlV1ColumnCommon.ts new file mode 100644 index 0000000000..dc6307213c --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1ColumnCommon.ts @@ -0,0 +1,94 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +import type { DataType } from "./DataType"; +import { + DataTypeFromJSON, + DataTypeFromJSONTyped, + DataTypeToJSON, + DataTypeToJSONTyped, +} from "./DataType"; + +/** + * + * @export + * @interface SqlV1ColumnCommon + */ +export interface SqlV1ColumnCommon { + /** + * The name of the column. + * @type {string} + * @memberof SqlV1ColumnCommon + */ + name: string; + /** + * + * @type {DataType} + * @memberof SqlV1ColumnCommon + */ + type: DataType; + /** + * A comment or description for the column. + * @type {string} + * @memberof SqlV1ColumnCommon + */ + comment?: string; +} + +/** + * Check if a given object implements the SqlV1ColumnCommon interface. + */ +export function instanceOfSqlV1ColumnCommon(value: object): value is SqlV1ColumnCommon { + if (!("name" in value) || value["name"] === undefined) return false; + if (!("type" in value) || value["type"] === undefined) return false; + return true; +} + +export function SqlV1ColumnCommonFromJSON(json: any): SqlV1ColumnCommon { + return SqlV1ColumnCommonFromJSONTyped(json, false); +} + +export function SqlV1ColumnCommonFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1ColumnCommon { + if (json == null) { + return json; + } + return { + name: json["name"], + type: DataTypeFromJSON(json["type"]), + comment: json["comment"] == null ? undefined : json["comment"], + }; +} + +export function SqlV1ColumnCommonToJSON(json: any): SqlV1ColumnCommon { + return SqlV1ColumnCommonToJSONTyped(json, false); +} + +export function SqlV1ColumnCommonToJSONTyped( + value?: SqlV1ColumnCommon | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + name: value["name"], + type: DataTypeToJSON(value["type"]), + comment: value["comment"], + }; +} diff --git a/src/clients/flinkSql/models/SqlV1ComputedColumn.ts b/src/clients/flinkSql/models/SqlV1ComputedColumn.ts new file mode 100644 index 0000000000..08c1cea307 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1ComputedColumn.ts @@ -0,0 +1,120 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +/** + * Computed columns are generated via an expression. + * @export + * @interface SqlV1ComputedColumn + */ +export interface SqlV1ComputedColumn { + /** + * + * @type {any} + * @memberof SqlV1ComputedColumn + */ + name: any | null; + /** + * + * @type {any} + * @memberof SqlV1ComputedColumn + */ + type: any | null; + /** + * A comment or description for the column. + * @type {string} + * @memberof SqlV1ComputedColumn + */ + comment?: string; + /** + * The kind of column. + * @type {string} + * @memberof SqlV1ComputedColumn + */ + kind: SqlV1ComputedColumnKindEnum; + /** + * The SQL expression used to compute the column value. + * @type {string} + * @memberof SqlV1ComputedColumn + */ + expression: string; + /** + * Indicates if the computed column is virtual. + * @type {boolean} + * @memberof SqlV1ComputedColumn + */ + virtual?: boolean; +} + +/** + * @export + * @enum {string} + */ +export enum SqlV1ComputedColumnKindEnum { + Computed = "Computed", +} + +/** + * Check if a given object implements the SqlV1ComputedColumn interface. + */ +export function instanceOfSqlV1ComputedColumn(value: object): value is SqlV1ComputedColumn { + if (!("name" in value) || value["name"] === undefined) return false; + if (!("type" in value) || value["type"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("expression" in value) || value["expression"] === undefined) return false; + return true; +} + +export function SqlV1ComputedColumnFromJSON(json: any): SqlV1ComputedColumn { + return SqlV1ComputedColumnFromJSONTyped(json, false); +} + +export function SqlV1ComputedColumnFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1ComputedColumn { + if (json == null) { + return json; + } + return { + name: json["name"], + type: json["type"], + comment: json["comment"] == null ? undefined : json["comment"], + kind: json["kind"], + expression: json["expression"], + virtual: json["virtual"] == null ? undefined : json["virtual"], + }; +} + +export function SqlV1ComputedColumnToJSON(json: any): SqlV1ComputedColumn { + return SqlV1ComputedColumnToJSONTyped(json, false); +} + +export function SqlV1ComputedColumnToJSONTyped( + value?: SqlV1ComputedColumn | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + name: value["name"], + type: value["type"], + comment: value["comment"], + kind: value["kind"], + expression: value["expression"], + virtual: value["virtual"], + }; +} diff --git a/src/clients/flinkSql/models/SqlV1Connection.ts b/src/clients/flinkSql/models/SqlV1Connection.ts index 24442fc626..99e41cdf6e 100644 --- a/src/clients/flinkSql/models/SqlV1Connection.ts +++ b/src/clients/flinkSql/models/SqlV1Connection.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/SqlV1ConnectionList.ts b/src/clients/flinkSql/models/SqlV1ConnectionList.ts index 0d2c7b6a5c..597d5d8548 100644 --- a/src/clients/flinkSql/models/SqlV1ConnectionList.ts +++ b/src/clients/flinkSql/models/SqlV1ConnectionList.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/SqlV1ConnectionListDataInner.ts b/src/clients/flinkSql/models/SqlV1ConnectionListDataInner.ts index bb4b0d2b31..472b88430d 100644 --- a/src/clients/flinkSql/models/SqlV1ConnectionListDataInner.ts +++ b/src/clients/flinkSql/models/SqlV1ConnectionListDataInner.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/SqlV1ConnectionListMetadata.ts b/src/clients/flinkSql/models/SqlV1ConnectionListMetadata.ts index 6e64c7daae..90c16d255c 100644 --- a/src/clients/flinkSql/models/SqlV1ConnectionListMetadata.ts +++ b/src/clients/flinkSql/models/SqlV1ConnectionListMetadata.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/SqlV1ConnectionMetadata.ts b/src/clients/flinkSql/models/SqlV1ConnectionMetadata.ts index d525d9d8b7..239bb4b196 100644 --- a/src/clients/flinkSql/models/SqlV1ConnectionMetadata.ts +++ b/src/clients/flinkSql/models/SqlV1ConnectionMetadata.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/SqlV1ConnectionSpec.ts b/src/clients/flinkSql/models/SqlV1ConnectionSpec.ts index 74485abbf2..9ce332d264 100644 --- a/src/clients/flinkSql/models/SqlV1ConnectionSpec.ts +++ b/src/clients/flinkSql/models/SqlV1ConnectionSpec.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/SqlV1ConnectionSpecAuthData.ts b/src/clients/flinkSql/models/SqlV1ConnectionSpecAuthData.ts index c6c4a22f96..d979d25d8d 100644 --- a/src/clients/flinkSql/models/SqlV1ConnectionSpecAuthData.ts +++ b/src/clients/flinkSql/models/SqlV1ConnectionSpecAuthData.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/SqlV1ConnectionStatus.ts b/src/clients/flinkSql/models/SqlV1ConnectionStatus.ts index aeee99a29e..1cfd1393ef 100644 --- a/src/clients/flinkSql/models/SqlV1ConnectionStatus.ts +++ b/src/clients/flinkSql/models/SqlV1ConnectionStatus.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTable.ts b/src/clients/flinkSql/models/SqlV1MaterializedTable.ts new file mode 100644 index 0000000000..0b9dfadbf3 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTable.ts @@ -0,0 +1,167 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +import type { SqlV1MaterializedTableMetadata } from "./SqlV1MaterializedTableMetadata"; +import { + SqlV1MaterializedTableMetadataFromJSON, + SqlV1MaterializedTableMetadataFromJSONTyped, + SqlV1MaterializedTableMetadataToJSON, + SqlV1MaterializedTableMetadataToJSONTyped, +} from "./SqlV1MaterializedTableMetadata"; +import type { SqlV1MaterializedTableSpec } from "./SqlV1MaterializedTableSpec"; +import { + SqlV1MaterializedTableSpecFromJSON, + SqlV1MaterializedTableSpecFromJSONTyped, + SqlV1MaterializedTableSpecToJSON, + SqlV1MaterializedTableSpecToJSONTyped, +} from "./SqlV1MaterializedTableSpec"; +import type { SqlV1MaterializedTableStatus } from "./SqlV1MaterializedTableStatus"; +import { + SqlV1MaterializedTableStatusFromJSON, + SqlV1MaterializedTableStatusFromJSONTyped, + SqlV1MaterializedTableStatusToJSON, + SqlV1MaterializedTableStatusToJSONTyped, +} from "./SqlV1MaterializedTableStatus"; + +/** + * Represents a Materialized Table resource. + * @export + * @interface SqlV1MaterializedTable + */ +export interface SqlV1MaterializedTable { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1MaterializedTable + */ + readonly api_version: SqlV1MaterializedTableApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1MaterializedTable + */ + readonly kind: SqlV1MaterializedTableKindEnum; + /** + * + * @type {SqlV1MaterializedTableMetadata} + * @memberof SqlV1MaterializedTable + */ + metadata: SqlV1MaterializedTableMetadata; + /** + * The user-provided name of the resource, unique within this environment. + * @type {string} + * @memberof SqlV1MaterializedTable + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof SqlV1MaterializedTable + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof SqlV1MaterializedTable + */ + readonly environment_id: string; + /** + * + * @type {SqlV1MaterializedTableSpec} + * @memberof SqlV1MaterializedTable + */ + spec: SqlV1MaterializedTableSpec; + /** + * + * @type {SqlV1MaterializedTableStatus} + * @memberof SqlV1MaterializedTable + */ + readonly status?: SqlV1MaterializedTableStatus; +} + +/** + * @export + * @enum {string} + */ +export enum SqlV1MaterializedTableApiVersionEnum { + SqlV1 = "sql/v1", +} +/** + * @export + * @enum {string} + */ +export enum SqlV1MaterializedTableKindEnum { + MaterializedTable = "MaterializedTable", +} + +/** + * Check if a given object implements the SqlV1MaterializedTable interface. + */ +export function instanceOfSqlV1MaterializedTable(value: object): value is SqlV1MaterializedTable { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("organization_id" in value) || value["organization_id"] === undefined) return false; + if (!("environment_id" in value) || value["environment_id"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; +} + +export function SqlV1MaterializedTableFromJSON(json: any): SqlV1MaterializedTable { + return SqlV1MaterializedTableFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTable { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1MaterializedTableMetadataFromJSON(json["metadata"]), + name: json["name"], + organization_id: json["organization_id"], + environment_id: json["environment_id"], + spec: SqlV1MaterializedTableSpecFromJSON(json["spec"]), + status: + json["status"] == null ? undefined : SqlV1MaterializedTableStatusFromJSON(json["status"]), + }; +} + +export function SqlV1MaterializedTableToJSON(json: any): SqlV1MaterializedTable { + return SqlV1MaterializedTableToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableToJSONTyped( + value?: Omit< + SqlV1MaterializedTable, + "api_version" | "kind" | "organization_id" | "environment_id" | "status" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + metadata: SqlV1MaterializedTableMetadataToJSON(value["metadata"]), + name: value["name"], + spec: SqlV1MaterializedTableSpecToJSON(value["spec"]), + }; +} diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableColumnDetails.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableColumnDetails.ts new file mode 100644 index 0000000000..d73da16ba5 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableColumnDetails.ts @@ -0,0 +1,103 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import type { SqlV1ComputedColumn } from "./SqlV1ComputedColumn"; +import { + instanceOfSqlV1ComputedColumn, + SqlV1ComputedColumnFromJSON, + SqlV1ComputedColumnFromJSONTyped, + SqlV1ComputedColumnToJSON, +} from "./SqlV1ComputedColumn"; +import type { SqlV1MetadataColumn } from "./SqlV1MetadataColumn"; +import { + instanceOfSqlV1MetadataColumn, + SqlV1MetadataColumnFromJSON, + SqlV1MetadataColumnFromJSONTyped, + SqlV1MetadataColumnToJSON, +} from "./SqlV1MetadataColumn"; +import type { SqlV1PhysicalColumn } from "./SqlV1PhysicalColumn"; +import { + instanceOfSqlV1PhysicalColumn, + SqlV1PhysicalColumnFromJSON, + SqlV1PhysicalColumnFromJSONTyped, + SqlV1PhysicalColumnToJSON, +} from "./SqlV1PhysicalColumn"; + +/** + * @type SqlV1MaterializedTableColumnDetails + * Details of a column in the Materialized Table. + * @export + */ +export type SqlV1MaterializedTableColumnDetails = + | ({ kind: "Computed" } & SqlV1ComputedColumn) + | ({ kind: "Metadata" } & SqlV1MetadataColumn) + | ({ kind: "Physical" } & SqlV1PhysicalColumn); + +export function SqlV1MaterializedTableColumnDetailsFromJSON( + json: any, +): SqlV1MaterializedTableColumnDetails { + return SqlV1MaterializedTableColumnDetailsFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableColumnDetailsFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableColumnDetails { + if (json == null) { + return json; + } + switch (json["kind"]) { + case "Computed": + return Object.assign({}, SqlV1ComputedColumnFromJSONTyped(json, true), { + kind: "Computed", + } as const); + case "Metadata": + return Object.assign({}, SqlV1MetadataColumnFromJSONTyped(json, true), { + kind: "Metadata", + } as const); + case "Physical": + return Object.assign({}, SqlV1PhysicalColumnFromJSONTyped(json, true), { + kind: "Physical", + } as const); + default: + throw new Error( + `No variant of SqlV1MaterializedTableColumnDetails exists with 'kind=${json["kind"]}'`, + ); + } +} + +export function SqlV1MaterializedTableColumnDetailsToJSON(json: any): any { + return SqlV1MaterializedTableColumnDetailsToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableColumnDetailsToJSONTyped( + value?: SqlV1MaterializedTableColumnDetails | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + switch (value["kind"]) { + case "Computed": + return Object.assign({}, SqlV1ComputedColumnToJSON(value), { kind: "Computed" } as const); + case "Metadata": + return Object.assign({}, SqlV1MetadataColumnToJSON(value), { kind: "Metadata" } as const); + case "Physical": + return Object.assign({}, SqlV1PhysicalColumnToJSON(value), { kind: "Physical" } as const); + default: + throw new Error( + `No variant of SqlV1MaterializedTableColumnDetails exists with 'kind=${value["kind"]}'`, + ); + } +} diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableConstraint.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableConstraint.ts new file mode 100644 index 0000000000..7ef18915ad --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableConstraint.ts @@ -0,0 +1,98 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +/** + * A constraint on the materialized table. + * @export + * @interface SqlV1MaterializedTableConstraint + */ +export interface SqlV1MaterializedTableConstraint { + /** + * + * @type {string} + * @memberof SqlV1MaterializedTableConstraint + */ + name?: string; + /** + * The type of constraint. + * @type {string} + * @memberof SqlV1MaterializedTableConstraint + */ + kind?: string; + /** + * + * @type {Array} + * @memberof SqlV1MaterializedTableConstraint + */ + column_names?: Array; + /** + * Whether the constraint is enforced. + * @type {boolean} + * @memberof SqlV1MaterializedTableConstraint + */ + enforced?: boolean; +} + +/** + * Check if a given object implements the SqlV1MaterializedTableConstraint interface. + */ +export function instanceOfSqlV1MaterializedTableConstraint( + value: object, +): value is SqlV1MaterializedTableConstraint { + return true; +} + +export function SqlV1MaterializedTableConstraintFromJSON( + json: any, +): SqlV1MaterializedTableConstraint { + return SqlV1MaterializedTableConstraintFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableConstraintFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableConstraint { + if (json == null) { + return json; + } + return { + name: json["name"] == null ? undefined : json["name"], + kind: json["kind"] == null ? undefined : json["kind"], + column_names: json["column_names"] == null ? undefined : json["column_names"], + enforced: json["enforced"] == null ? undefined : json["enforced"], + }; +} + +export function SqlV1MaterializedTableConstraintToJSON( + json: any, +): SqlV1MaterializedTableConstraint { + return SqlV1MaterializedTableConstraintToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableConstraintToJSONTyped( + value?: SqlV1MaterializedTableConstraint | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + name: value["name"], + kind: value["kind"], + column_names: value["column_names"], + enforced: value["enforced"], + }; +} diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableDistribution.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableDistribution.ts new file mode 100644 index 0000000000..a7b8b3f434 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableDistribution.ts @@ -0,0 +1,82 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +/** + * Distribution (bucket by) strategy. + * @export + * @interface SqlV1MaterializedTableDistribution + */ +export interface SqlV1MaterializedTableDistribution { + /** + * + * @type {Array} + * @memberof SqlV1MaterializedTableDistribution + */ + column_names?: Array; + /** + * The number of buckets. + * @type {number} + * @memberof SqlV1MaterializedTableDistribution + */ + buckets?: number; +} + +/** + * Check if a given object implements the SqlV1MaterializedTableDistribution interface. + */ +export function instanceOfSqlV1MaterializedTableDistribution( + value: object, +): value is SqlV1MaterializedTableDistribution { + return true; +} + +export function SqlV1MaterializedTableDistributionFromJSON( + json: any, +): SqlV1MaterializedTableDistribution { + return SqlV1MaterializedTableDistributionFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableDistributionFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableDistribution { + if (json == null) { + return json; + } + return { + column_names: json["column_names"] == null ? undefined : json["column_names"], + buckets: json["buckets"] == null ? undefined : json["buckets"], + }; +} + +export function SqlV1MaterializedTableDistributionToJSON( + json: any, +): SqlV1MaterializedTableDistribution { + return SqlV1MaterializedTableDistributionToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableDistributionToJSONTyped( + value?: SqlV1MaterializedTableDistribution | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + column_names: value["column_names"], + buckets: value["buckets"], + }; +} diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableList.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableList.ts new file mode 100644 index 0000000000..da6b885ed5 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableList.ts @@ -0,0 +1,126 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +import type { SqlV1MaterializedTable } from "./SqlV1MaterializedTable"; +import { + SqlV1MaterializedTableFromJSON, + SqlV1MaterializedTableFromJSONTyped, + SqlV1MaterializedTableToJSON, + SqlV1MaterializedTableToJSONTyped, +} from "./SqlV1MaterializedTable"; +import type { ListMeta } from "./ListMeta"; +import { + ListMetaFromJSON, + ListMetaFromJSONTyped, + ListMetaToJSON, + ListMetaToJSONTyped, +} from "./ListMeta"; + +/** + * A list of Materialized Table resources. + * @export + * @interface SqlV1MaterializedTableList + */ +export interface SqlV1MaterializedTableList { + /** + * + * @type {string} + * @memberof SqlV1MaterializedTableList + */ + readonly api_version: SqlV1MaterializedTableListApiVersionEnum; + /** + * + * @type {string} + * @memberof SqlV1MaterializedTableList + */ + readonly kind: SqlV1MaterializedTableListKindEnum; + /** + * + * @type {ListMeta} + * @memberof SqlV1MaterializedTableList + */ + metadata: ListMeta; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof SqlV1MaterializedTableList + */ + data: Set; +} + +/** + * @export + * @enum {string} + */ +export enum SqlV1MaterializedTableListApiVersionEnum { + SqlV1 = "sql/v1", +} +/** + * @export + * @enum {string} + */ +export enum SqlV1MaterializedTableListKindEnum { + MaterializedTableList = "MaterializedTableList", +} + +/** + * Check if a given object implements the SqlV1MaterializedTableList interface. + */ +export function instanceOfSqlV1MaterializedTableList( + value: object, +): value is SqlV1MaterializedTableList { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; +} + +export function SqlV1MaterializedTableListFromJSON(json: any): SqlV1MaterializedTableList { + return SqlV1MaterializedTableListFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableList { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: ListMetaFromJSON(json["metadata"]), + data: new Set((json["data"] as Array).map(SqlV1MaterializedTableFromJSON)), + }; +} + +export function SqlV1MaterializedTableListToJSON(json: any): SqlV1MaterializedTableList { + return SqlV1MaterializedTableListToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableListToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + metadata: ListMetaToJSON(value["metadata"]), + data: Array.from(value["data"] as Set).map(SqlV1MaterializedTableToJSON), + }; +} diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableMetadata.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableMetadata.ts new file mode 100644 index 0000000000..0f8b8b127f --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableMetadata.ts @@ -0,0 +1,119 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +/** + * + * @export + * @interface SqlV1MaterializedTableMetadata + */ +export interface SqlV1MaterializedTableMetadata { + /** + * + * @type {any} + * @memberof SqlV1MaterializedTableMetadata + */ + self: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1MaterializedTableMetadata + */ + created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1MaterializedTableMetadata + */ + updated_at?: Date; + /** + * + * @type {any} + * @memberof SqlV1MaterializedTableMetadata + */ + uid?: any | null; + /** + * + * @type {any} + * @memberof SqlV1MaterializedTableMetadata + */ + resource_version?: any | null; + /** + * + * @type {any} + * @memberof SqlV1MaterializedTableMetadata + */ + resource_name?: any | null; + /** + * + * @type {{ [key: string]: string; }} + * @memberof SqlV1MaterializedTableMetadata + */ + labels?: { [key: string]: string }; +} + +/** + * Check if a given object implements the SqlV1MaterializedTableMetadata interface. + */ +export function instanceOfSqlV1MaterializedTableMetadata( + value: object, +): value is SqlV1MaterializedTableMetadata { + if (!("self" in value) || value["self"] === undefined) return false; + return true; +} + +export function SqlV1MaterializedTableMetadataFromJSON(json: any): SqlV1MaterializedTableMetadata { + return SqlV1MaterializedTableMetadataFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableMetadata { + if (json == null) { + return json; + } + return { + self: json["self"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + uid: json["uid"] == null ? undefined : json["uid"], + resource_version: json["resource_version"] == null ? undefined : json["resource_version"], + resource_name: json["resource_name"] == null ? undefined : json["resource_name"], + labels: json["labels"] == null ? undefined : json["labels"], + }; +} + +export function SqlV1MaterializedTableMetadataToJSON(json: any): SqlV1MaterializedTableMetadata { + return SqlV1MaterializedTableMetadataToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableMetadataToJSONTyped( + value?: SqlV1MaterializedTableMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + self: value["self"], + created_at: value["created_at"] == null ? undefined : value["created_at"].toISOString(), + updated_at: value["updated_at"] == null ? undefined : value["updated_at"].toISOString(), + uid: value["uid"], + resource_version: value["resource_version"], + resource_name: value["resource_name"], + labels: value["labels"], + }; +} diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableSpec.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableSpec.ts new file mode 100644 index 0000000000..df56dff77e --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableSpec.ts @@ -0,0 +1,197 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +import type { SqlV1MaterializedTableWatermark } from "./SqlV1MaterializedTableWatermark"; +import { + SqlV1MaterializedTableWatermarkFromJSON, + SqlV1MaterializedTableWatermarkFromJSONTyped, + SqlV1MaterializedTableWatermarkToJSON, + SqlV1MaterializedTableWatermarkToJSONTyped, +} from "./SqlV1MaterializedTableWatermark"; +import type { SqlV1MaterializedTableConstraint } from "./SqlV1MaterializedTableConstraint"; +import { + SqlV1MaterializedTableConstraintFromJSON, + SqlV1MaterializedTableConstraintFromJSONTyped, + SqlV1MaterializedTableConstraintToJSON, + SqlV1MaterializedTableConstraintToJSONTyped, +} from "./SqlV1MaterializedTableConstraint"; +import type { SqlV1MaterializedTableDistribution } from "./SqlV1MaterializedTableDistribution"; +import { + SqlV1MaterializedTableDistributionFromJSON, + SqlV1MaterializedTableDistributionFromJSONTyped, + SqlV1MaterializedTableDistributionToJSON, + SqlV1MaterializedTableDistributionToJSONTyped, +} from "./SqlV1MaterializedTableDistribution"; +import type { SqlV1MaterializedTableColumnDetails } from "./SqlV1MaterializedTableColumnDetails"; +import { + SqlV1MaterializedTableColumnDetailsFromJSON, + SqlV1MaterializedTableColumnDetailsFromJSONTyped, + SqlV1MaterializedTableColumnDetailsToJSON, + SqlV1MaterializedTableColumnDetailsToJSONTyped, +} from "./SqlV1MaterializedTableColumnDetails"; + +/** + * The specifications of the Materialized Table. + * @export + * @interface SqlV1MaterializedTableSpec + */ +export interface SqlV1MaterializedTableSpec { + /** + * The ID of Kafka cluster hosting the Materialized Table's topic. Populated from the `kafka_cluster_id` path parameter on creation. + * @type {string} + * @memberof SqlV1MaterializedTableSpec + */ + readonly kafka_cluster_id?: string; + /** + * The id associated with the compute pool in context. + * If not specified, the materialized table will use the default compute pool. The default pool is automatically determined by the system. + * @type {string} + * @memberof SqlV1MaterializedTableSpec + */ + compute_pool_id?: string; + /** + * The id of a principal this Materialized Table query runs as. + * @type {string} + * @memberof SqlV1MaterializedTableSpec + */ + principal?: string; + /** + * Indicates whether the Materialized Table query should be stopped. + * @type {boolean} + * @memberof SqlV1MaterializedTableSpec + */ + stopped?: boolean; + /** + * Defines configuration properties for the table, equivalent to the SQL 'WITH' clause + * @type {{ [key: string]: string; }} + * @memberof SqlV1MaterializedTableSpec + */ + table_options?: { [key: string]: string }; + /** + * Session configurations equivalent to the SQL 'SET' statement. + * @type {{ [key: string]: string; }} + * @memberof SqlV1MaterializedTableSpec + */ + session_options?: { [key: string]: string }; + /** + * Details of each column in Materialized Table resource. If columns are not specified, we infer from query. If it's specified it must be compatible with the types in the query. + * @type {Array} + * @memberof SqlV1MaterializedTableSpec + */ + columns?: Array; + /** + * + * @type {SqlV1MaterializedTableWatermark} + * @memberof SqlV1MaterializedTableSpec + */ + watermark?: SqlV1MaterializedTableWatermark; + /** + * Specify table constraints. + * @type {Array} + * @memberof SqlV1MaterializedTableSpec + */ + constraints?: Array; + /** + * + * @type {SqlV1MaterializedTableDistribution} + * @memberof SqlV1MaterializedTableSpec + */ + distributed_by?: SqlV1MaterializedTableDistribution; + /** + * Contains the query section (usually starting with a SELECT) of the latest Materialized Table. + * @type {string} + * @memberof SqlV1MaterializedTableSpec + */ + query?: string; +} + +/** + * Check if a given object implements the SqlV1MaterializedTableSpec interface. + */ +export function instanceOfSqlV1MaterializedTableSpec( + value: object, +): value is SqlV1MaterializedTableSpec { + return true; +} + +export function SqlV1MaterializedTableSpecFromJSON(json: any): SqlV1MaterializedTableSpec { + return SqlV1MaterializedTableSpecFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableSpec { + if (json == null) { + return json; + } + return { + kafka_cluster_id: json["kafka_cluster_id"] == null ? undefined : json["kafka_cluster_id"], + compute_pool_id: json["compute_pool_id"] == null ? undefined : json["compute_pool_id"], + principal: json["principal"] == null ? undefined : json["principal"], + stopped: json["stopped"] == null ? undefined : json["stopped"], + table_options: json["table_options"] == null ? undefined : json["table_options"], + session_options: json["session_options"] == null ? undefined : json["session_options"], + columns: + json["columns"] == null + ? undefined + : (json["columns"] as Array).map(SqlV1MaterializedTableColumnDetailsFromJSON), + watermark: + json["watermark"] == null + ? undefined + : SqlV1MaterializedTableWatermarkFromJSON(json["watermark"]), + constraints: + json["constraints"] == null + ? undefined + : (json["constraints"] as Array).map(SqlV1MaterializedTableConstraintFromJSON), + distributed_by: + json["distributed_by"] == null + ? undefined + : SqlV1MaterializedTableDistributionFromJSON(json["distributed_by"]), + query: json["query"] == null ? undefined : json["query"], + }; +} + +export function SqlV1MaterializedTableSpecToJSON(json: any): SqlV1MaterializedTableSpec { + return SqlV1MaterializedTableSpecToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableSpecToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + compute_pool_id: value["compute_pool_id"], + principal: value["principal"], + stopped: value["stopped"], + table_options: value["table_options"], + session_options: value["session_options"], + columns: + value["columns"] == null + ? undefined + : (value["columns"] as Array).map(SqlV1MaterializedTableColumnDetailsToJSON), + watermark: SqlV1MaterializedTableWatermarkToJSON(value["watermark"]), + constraints: + value["constraints"] == null + ? undefined + : (value["constraints"] as Array).map(SqlV1MaterializedTableConstraintToJSON), + distributed_by: SqlV1MaterializedTableDistributionToJSON(value["distributed_by"]), + query: value["query"], + }; +} diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableStatus.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableStatus.ts new file mode 100644 index 0000000000..860cf496df --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableStatus.ts @@ -0,0 +1,134 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +import type { SqlV1ScalingStatus } from "./SqlV1ScalingStatus"; +import { + SqlV1ScalingStatusFromJSON, + SqlV1ScalingStatusFromJSONTyped, + SqlV1ScalingStatusToJSON, + SqlV1ScalingStatusToJSONTyped, +} from "./SqlV1ScalingStatus"; +import type { SqlV1StatementWarning } from "./SqlV1StatementWarning"; +import { + SqlV1StatementWarningFromJSON, + SqlV1StatementWarningFromJSONTyped, + SqlV1StatementWarningToJSON, + SqlV1StatementWarningToJSONTyped, +} from "./SqlV1StatementWarning"; + +/** + * The status of the Materialized Table. + * @export + * @interface SqlV1MaterializedTableStatus + */ +export interface SqlV1MaterializedTableStatus { + /** + * The lifecycle phase of the materialized table. + * @type {string} + * @memberof SqlV1MaterializedTableStatus + */ + phase?: string; + /** + * Optional. Human-readable description of phase. + * @type {string} + * @memberof SqlV1MaterializedTableStatus + */ + detail?: string; + /** + * List of warnings encountered during materialized table execution. + * @type {Array} + * @memberof SqlV1MaterializedTableStatus + */ + warnings?: Array; + /** + * Entire Materialized Table statement as submitted by user e.g CREATE OR ALTER MATERIALIZED TABLE ... + * @type {string} + * @memberof SqlV1MaterializedTableStatus + */ + creation_statement?: string; + /** + * + * @type {SqlV1ScalingStatus} + * @memberof SqlV1MaterializedTableStatus + */ + scaling_status?: SqlV1ScalingStatus; + /** + * Represents the evolution history of the Materialized Table. The current value indicates the latest version. + * @type {number} + * @memberof SqlV1MaterializedTableStatus + */ + version?: number; +} + +/** + * Check if a given object implements the SqlV1MaterializedTableStatus interface. + */ +export function instanceOfSqlV1MaterializedTableStatus( + value: object, +): value is SqlV1MaterializedTableStatus { + return true; +} + +export function SqlV1MaterializedTableStatusFromJSON(json: any): SqlV1MaterializedTableStatus { + return SqlV1MaterializedTableStatusFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableStatusFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableStatus { + if (json == null) { + return json; + } + return { + phase: json["phase"] == null ? undefined : json["phase"], + detail: json["detail"] == null ? undefined : json["detail"], + warnings: + json["warnings"] == null + ? undefined + : (json["warnings"] as Array).map(SqlV1StatementWarningFromJSON), + creation_statement: json["creation_statement"] == null ? undefined : json["creation_statement"], + scaling_status: + json["scaling_status"] == null + ? undefined + : SqlV1ScalingStatusFromJSON(json["scaling_status"]), + version: json["version"] == null ? undefined : json["version"], + }; +} + +export function SqlV1MaterializedTableStatusToJSON(json: any): SqlV1MaterializedTableStatus { + return SqlV1MaterializedTableStatusToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableStatusToJSONTyped( + value?: SqlV1MaterializedTableStatus | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + phase: value["phase"], + detail: value["detail"], + warnings: + value["warnings"] == null + ? undefined + : (value["warnings"] as Array).map(SqlV1StatementWarningToJSON), + creation_statement: value["creation_statement"], + scaling_status: SqlV1ScalingStatusToJSON(value["scaling_status"]), + version: value["version"], + }; +} diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableVersion.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableVersion.ts new file mode 100644 index 0000000000..0d42a92982 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableVersion.ts @@ -0,0 +1,155 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +import type { SqlV1MaterializedTableVersionSpec } from "./SqlV1MaterializedTableVersionSpec"; +import { + SqlV1MaterializedTableVersionSpecFromJSON, + SqlV1MaterializedTableVersionSpecFromJSONTyped, + SqlV1MaterializedTableVersionSpecToJSON, + SqlV1MaterializedTableVersionSpecToJSONTyped, +} from "./SqlV1MaterializedTableVersionSpec"; +import type { SqlV1MaterializedTableVersionMetadata } from "./SqlV1MaterializedTableVersionMetadata"; +import { + SqlV1MaterializedTableVersionMetadataFromJSON, + SqlV1MaterializedTableVersionMetadataFromJSONTyped, + SqlV1MaterializedTableVersionMetadataToJSON, + SqlV1MaterializedTableVersionMetadataToJSONTyped, +} from "./SqlV1MaterializedTableVersionMetadata"; + +/** + * Represents a specific version of a Materialized Table resource. + * @export + * @interface SqlV1MaterializedTableVersion + */ +export interface SqlV1MaterializedTableVersion { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1MaterializedTableVersion + */ + readonly api_version: SqlV1MaterializedTableVersionApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1MaterializedTableVersion + */ + readonly kind: SqlV1MaterializedTableVersionKindEnum; + /** + * + * @type {SqlV1MaterializedTableVersionMetadata} + * @memberof SqlV1MaterializedTableVersion + */ + metadata: SqlV1MaterializedTableVersionMetadata; + /** + * The resource version name, unique within the Kafka cluster. + * Name conforms to DNS Subdomain (RFC 1123). + * + * @type {string} + * @memberof SqlV1MaterializedTableVersion + */ + readonly name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof SqlV1MaterializedTableVersion + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof SqlV1MaterializedTableVersion + */ + readonly environment_id: string; + /** + * + * @type {SqlV1MaterializedTableVersionSpec} + * @memberof SqlV1MaterializedTableVersion + */ + spec: SqlV1MaterializedTableVersionSpec; +} + +/** + * @export + * @enum {string} + */ +export enum SqlV1MaterializedTableVersionApiVersionEnum { + SqlV1 = "sql/v1", +} +/** + * @export + * @enum {string} + */ +export enum SqlV1MaterializedTableVersionKindEnum { + MaterializedTableVersion = "MaterializedTableVersion", +} + +/** + * Check if a given object implements the SqlV1MaterializedTableVersion interface. + */ +export function instanceOfSqlV1MaterializedTableVersion( + value: object, +): value is SqlV1MaterializedTableVersion { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("organization_id" in value) || value["organization_id"] === undefined) return false; + if (!("environment_id" in value) || value["environment_id"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; +} + +export function SqlV1MaterializedTableVersionFromJSON(json: any): SqlV1MaterializedTableVersion { + return SqlV1MaterializedTableVersionFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableVersionFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableVersion { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1MaterializedTableVersionMetadataFromJSON(json["metadata"]), + name: json["name"], + organization_id: json["organization_id"], + environment_id: json["environment_id"], + spec: SqlV1MaterializedTableVersionSpecFromJSON(json["spec"]), + }; +} + +export function SqlV1MaterializedTableVersionToJSON(json: any): SqlV1MaterializedTableVersion { + return SqlV1MaterializedTableVersionToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableVersionToJSONTyped( + value?: Omit< + SqlV1MaterializedTableVersion, + "api_version" | "kind" | "name" | "organization_id" | "environment_id" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + metadata: SqlV1MaterializedTableVersionMetadataToJSON(value["metadata"]), + spec: SqlV1MaterializedTableVersionSpecToJSON(value["spec"]), + }; +} diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableVersionList.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableVersionList.ts new file mode 100644 index 0000000000..b29baf1f2e --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableVersionList.ts @@ -0,0 +1,130 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +import type { SqlV1MaterializedTableVersion } from "./SqlV1MaterializedTableVersion"; +import { + SqlV1MaterializedTableVersionFromJSON, + SqlV1MaterializedTableVersionFromJSONTyped, + SqlV1MaterializedTableVersionToJSON, + SqlV1MaterializedTableVersionToJSONTyped, +} from "./SqlV1MaterializedTableVersion"; +import type { ListMeta } from "./ListMeta"; +import { + ListMetaFromJSON, + ListMetaFromJSONTyped, + ListMetaToJSON, + ListMetaToJSONTyped, +} from "./ListMeta"; + +/** + * A list of Materialized Table Version resources. + * @export + * @interface SqlV1MaterializedTableVersionList + */ +export interface SqlV1MaterializedTableVersionList { + /** + * + * @type {string} + * @memberof SqlV1MaterializedTableVersionList + */ + readonly api_version: SqlV1MaterializedTableVersionListApiVersionEnum; + /** + * + * @type {string} + * @memberof SqlV1MaterializedTableVersionList + */ + readonly kind: SqlV1MaterializedTableVersionListKindEnum; + /** + * + * @type {ListMeta} + * @memberof SqlV1MaterializedTableVersionList + */ + metadata: ListMeta; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof SqlV1MaterializedTableVersionList + */ + data: Set; +} + +/** + * @export + * @enum {string} + */ +export enum SqlV1MaterializedTableVersionListApiVersionEnum { + SqlV1 = "sql/v1", +} +/** + * @export + * @enum {string} + */ +export enum SqlV1MaterializedTableVersionListKindEnum { + MaterializedTableVersionList = "MaterializedTableVersionList", +} + +/** + * Check if a given object implements the SqlV1MaterializedTableVersionList interface. + */ +export function instanceOfSqlV1MaterializedTableVersionList( + value: object, +): value is SqlV1MaterializedTableVersionList { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; +} + +export function SqlV1MaterializedTableVersionListFromJSON( + json: any, +): SqlV1MaterializedTableVersionList { + return SqlV1MaterializedTableVersionListFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableVersionListFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableVersionList { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: ListMetaFromJSON(json["metadata"]), + data: new Set((json["data"] as Array).map(SqlV1MaterializedTableVersionFromJSON)), + }; +} + +export function SqlV1MaterializedTableVersionListToJSON( + json: any, +): SqlV1MaterializedTableVersionList { + return SqlV1MaterializedTableVersionListToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableVersionListToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + metadata: ListMetaToJSON(value["metadata"]), + data: Array.from(value["data"] as Set).map(SqlV1MaterializedTableVersionToJSON), + }; +} diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableVersionMetadata.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableVersionMetadata.ts new file mode 100644 index 0000000000..97b31aab66 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableVersionMetadata.ts @@ -0,0 +1,107 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +/** + * + * @export + * @interface SqlV1MaterializedTableVersionMetadata + */ +export interface SqlV1MaterializedTableVersionMetadata { + /** + * + * @type {any} + * @memberof SqlV1MaterializedTableVersionMetadata + */ + self: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1MaterializedTableVersionMetadata + */ + created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1MaterializedTableVersionMetadata + */ + updated_at?: Date; + /** + * A system generated globally unique identifier for this resource. + * @type {string} + * @memberof SqlV1MaterializedTableVersionMetadata + */ + uid?: string; + /** + * A system generated string that uniquely identifies the version of this resource. + * @type {string} + * @memberof SqlV1MaterializedTableVersionMetadata + */ + resource_version?: string; +} + +/** + * Check if a given object implements the SqlV1MaterializedTableVersionMetadata interface. + */ +export function instanceOfSqlV1MaterializedTableVersionMetadata( + value: object, +): value is SqlV1MaterializedTableVersionMetadata { + if (!("self" in value) || value["self"] === undefined) return false; + return true; +} + +export function SqlV1MaterializedTableVersionMetadataFromJSON( + json: any, +): SqlV1MaterializedTableVersionMetadata { + return SqlV1MaterializedTableVersionMetadataFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableVersionMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableVersionMetadata { + if (json == null) { + return json; + } + return { + self: json["self"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + uid: json["uid"] == null ? undefined : json["uid"], + resource_version: json["resource_version"] == null ? undefined : json["resource_version"], + }; +} + +export function SqlV1MaterializedTableVersionMetadataToJSON( + json: any, +): SqlV1MaterializedTableVersionMetadata { + return SqlV1MaterializedTableVersionMetadataToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableVersionMetadataToJSONTyped( + value?: SqlV1MaterializedTableVersionMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + self: value["self"], + created_at: value["created_at"] == null ? undefined : value["created_at"].toISOString(), + updated_at: value["updated_at"] == null ? undefined : value["updated_at"].toISOString(), + uid: value["uid"], + resource_version: value["resource_version"], + }; +} diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableVersionSpec.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableVersionSpec.ts new file mode 100644 index 0000000000..4becdc6156 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableVersionSpec.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +import type { SqlV1ResourceChange } from "./SqlV1ResourceChange"; +import { + SqlV1ResourceChangeFromJSON, + SqlV1ResourceChangeFromJSONTyped, + SqlV1ResourceChangeToJSON, + SqlV1ResourceChangeToJSONTyped, +} from "./SqlV1ResourceChange"; + +/** + * The specifications of the Materialized Table Version. + * @export + * @interface SqlV1MaterializedTableVersionSpec + */ +export interface SqlV1MaterializedTableVersionSpec { + /** + * The version number of the Materialized Table. + * @type {number} + * @memberof SqlV1MaterializedTableVersionSpec + */ + readonly version: number; + /** + * The full SQL statement for the materialized table as generated by SHOW CREATE MATERIALIZED TABLE at the time of the evolution. + * + * @type {string} + * @memberof SqlV1MaterializedTableVersionSpec + */ + readonly statement: string; + /** + * Changes affecting resources since the previous version. + * @type {Array} + * @memberof SqlV1MaterializedTableVersionSpec + */ + readonly changes?: Array; +} + +/** + * Check if a given object implements the SqlV1MaterializedTableVersionSpec interface. + */ +export function instanceOfSqlV1MaterializedTableVersionSpec( + value: object, +): value is SqlV1MaterializedTableVersionSpec { + if (!("version" in value) || value["version"] === undefined) return false; + if (!("statement" in value) || value["statement"] === undefined) return false; + return true; +} + +export function SqlV1MaterializedTableVersionSpecFromJSON( + json: any, +): SqlV1MaterializedTableVersionSpec { + return SqlV1MaterializedTableVersionSpecFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableVersionSpecFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableVersionSpec { + if (json == null) { + return json; + } + return { + version: json["version"], + statement: json["statement"], + changes: + json["changes"] == null + ? undefined + : (json["changes"] as Array).map(SqlV1ResourceChangeFromJSON), + }; +} + +export function SqlV1MaterializedTableVersionSpecToJSON( + json: any, +): SqlV1MaterializedTableVersionSpec { + return SqlV1MaterializedTableVersionSpecToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableVersionSpecToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return {}; +} diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableWarning.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableWarning.ts new file mode 100644 index 0000000000..c80614b2f9 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableWarning.ts @@ -0,0 +1,104 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +/** + * Represents a non-fatal issue encountered during materialized table processing. + * @export + * @interface SqlV1MaterializedTableWarning + */ +export interface SqlV1MaterializedTableWarning { + /** + * Indicates the severity of the warning. + * + * LOW: Indicates a low severity warning and for informing the user. + * + * MODERATE: Indicates a moderate severity warning and may require user action. Could cause degraded statements if certain conditions apply. + * + * CRITICAL: Indicates a critical severity warning and requires user action. It will cause degraded statements eventually. + * + * @type {string} + * @memberof SqlV1MaterializedTableWarning + */ + severity: string; + /** + * The timestamp when the warning was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1MaterializedTableWarning + */ + readonly created_at: Date; + /** + * A machine-readable short, upper case summary delimited by underscore. + * @type {string} + * @memberof SqlV1MaterializedTableWarning + */ + reason: string; + /** + * A human-readable string containing the description of the warning. + * @type {string} + * @memberof SqlV1MaterializedTableWarning + */ + message: string; +} + +/** + * Check if a given object implements the SqlV1MaterializedTableWarning interface. + */ +export function instanceOfSqlV1MaterializedTableWarning( + value: object, +): value is SqlV1MaterializedTableWarning { + if (!("severity" in value) || value["severity"] === undefined) return false; + if (!("created_at" in value) || value["created_at"] === undefined) return false; + if (!("reason" in value) || value["reason"] === undefined) return false; + if (!("message" in value) || value["message"] === undefined) return false; + return true; +} + +export function SqlV1MaterializedTableWarningFromJSON(json: any): SqlV1MaterializedTableWarning { + return SqlV1MaterializedTableWarningFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableWarningFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableWarning { + if (json == null) { + return json; + } + return { + severity: json["severity"], + created_at: new Date(json["created_at"]), + reason: json["reason"], + message: json["message"], + }; +} + +export function SqlV1MaterializedTableWarningToJSON(json: any): SqlV1MaterializedTableWarning { + return SqlV1MaterializedTableWarningToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableWarningToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + severity: value["severity"], + reason: value["reason"], + message: value["message"], + }; +} diff --git a/src/clients/flinkSql/models/SqlV1MaterializedTableWatermark.ts b/src/clients/flinkSql/models/SqlV1MaterializedTableWatermark.ts new file mode 100644 index 0000000000..6881eb428a --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MaterializedTableWatermark.ts @@ -0,0 +1,80 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +/** + * Watermark strategy for the Materialized Table resource. + * @export + * @interface SqlV1MaterializedTableWatermark + */ +export interface SqlV1MaterializedTableWatermark { + /** + * + * @type {string} + * @memberof SqlV1MaterializedTableWatermark + */ + column_name?: string; + /** + * + * @type {string} + * @memberof SqlV1MaterializedTableWatermark + */ + expression?: string; +} + +/** + * Check if a given object implements the SqlV1MaterializedTableWatermark interface. + */ +export function instanceOfSqlV1MaterializedTableWatermark( + value: object, +): value is SqlV1MaterializedTableWatermark { + return true; +} + +export function SqlV1MaterializedTableWatermarkFromJSON( + json: any, +): SqlV1MaterializedTableWatermark { + return SqlV1MaterializedTableWatermarkFromJSONTyped(json, false); +} + +export function SqlV1MaterializedTableWatermarkFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MaterializedTableWatermark { + if (json == null) { + return json; + } + return { + column_name: json["column_name"] == null ? undefined : json["column_name"], + expression: json["expression"] == null ? undefined : json["expression"], + }; +} + +export function SqlV1MaterializedTableWatermarkToJSON(json: any): SqlV1MaterializedTableWatermark { + return SqlV1MaterializedTableWatermarkToJSONTyped(json, false); +} + +export function SqlV1MaterializedTableWatermarkToJSONTyped( + value?: SqlV1MaterializedTableWatermark | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + column_name: value["column_name"], + expression: value["expression"], + }; +} diff --git a/src/clients/flinkSql/models/SqlV1MetadataColumn.ts b/src/clients/flinkSql/models/SqlV1MetadataColumn.ts new file mode 100644 index 0000000000..8ea0018b86 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1MetadataColumn.ts @@ -0,0 +1,120 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +/** + * Metadata columns reference system properties. + * @export + * @interface SqlV1MetadataColumn + */ +export interface SqlV1MetadataColumn { + /** + * + * @type {any} + * @memberof SqlV1MetadataColumn + */ + name: any | null; + /** + * + * @type {any} + * @memberof SqlV1MetadataColumn + */ + type: any | null; + /** + * A comment or description for the column. + * @type {string} + * @memberof SqlV1MetadataColumn + */ + comment?: string; + /** + * The kind of column. + * @type {string} + * @memberof SqlV1MetadataColumn + */ + kind: SqlV1MetadataColumnKindEnum; + /** + * The system metadata key to reference. + * @type {string} + * @memberof SqlV1MetadataColumn + */ + metadata_key: string; + /** + * Indicates if the metadata column is virtual. + * @type {boolean} + * @memberof SqlV1MetadataColumn + */ + virtual?: boolean; +} + +/** + * @export + * @enum {string} + */ +export enum SqlV1MetadataColumnKindEnum { + Metadata = "Metadata", +} + +/** + * Check if a given object implements the SqlV1MetadataColumn interface. + */ +export function instanceOfSqlV1MetadataColumn(value: object): value is SqlV1MetadataColumn { + if (!("name" in value) || value["name"] === undefined) return false; + if (!("type" in value) || value["type"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata_key" in value) || value["metadata_key"] === undefined) return false; + return true; +} + +export function SqlV1MetadataColumnFromJSON(json: any): SqlV1MetadataColumn { + return SqlV1MetadataColumnFromJSONTyped(json, false); +} + +export function SqlV1MetadataColumnFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1MetadataColumn { + if (json == null) { + return json; + } + return { + name: json["name"], + type: json["type"], + comment: json["comment"] == null ? undefined : json["comment"], + kind: json["kind"], + metadata_key: json["metadata_key"], + virtual: json["virtual"] == null ? undefined : json["virtual"], + }; +} + +export function SqlV1MetadataColumnToJSON(json: any): SqlV1MetadataColumn { + return SqlV1MetadataColumnToJSONTyped(json, false); +} + +export function SqlV1MetadataColumnToJSONTyped( + value?: SqlV1MetadataColumn | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + name: value["name"], + type: value["type"], + comment: value["comment"], + kind: value["kind"], + metadata_key: value["metadata_key"], + virtual: value["virtual"], + }; +} diff --git a/src/clients/flinkSql/models/SqlV1PhysicalColumn.ts b/src/clients/flinkSql/models/SqlV1PhysicalColumn.ts new file mode 100644 index 0000000000..b6d09fca93 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1PhysicalColumn.ts @@ -0,0 +1,103 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +/** + * Physical columns define the structure of the table and the data types of its fields. + * @export + * @interface SqlV1PhysicalColumn + */ +export interface SqlV1PhysicalColumn { + /** + * + * @type {any} + * @memberof SqlV1PhysicalColumn + */ + name: any | null; + /** + * + * @type {any} + * @memberof SqlV1PhysicalColumn + */ + type: any | null; + /** + * A comment or description for the column. + * @type {string} + * @memberof SqlV1PhysicalColumn + */ + comment?: string; + /** + * The kind of column. + * @type {string} + * @memberof SqlV1PhysicalColumn + */ + kind: SqlV1PhysicalColumnKindEnum; +} + +/** + * @export + * @enum {string} + */ +export enum SqlV1PhysicalColumnKindEnum { + Physical = "Physical", +} + +/** + * Check if a given object implements the SqlV1PhysicalColumn interface. + */ +export function instanceOfSqlV1PhysicalColumn(value: object): value is SqlV1PhysicalColumn { + if (!("name" in value) || value["name"] === undefined) return false; + if (!("type" in value) || value["type"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + return true; +} + +export function SqlV1PhysicalColumnFromJSON(json: any): SqlV1PhysicalColumn { + return SqlV1PhysicalColumnFromJSONTyped(json, false); +} + +export function SqlV1PhysicalColumnFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1PhysicalColumn { + if (json == null) { + return json; + } + return { + name: json["name"], + type: json["type"], + comment: json["comment"] == null ? undefined : json["comment"], + kind: json["kind"], + }; +} + +export function SqlV1PhysicalColumnToJSON(json: any): SqlV1PhysicalColumn { + return SqlV1PhysicalColumnToJSONTyped(json, false); +} + +export function SqlV1PhysicalColumnToJSONTyped( + value?: SqlV1PhysicalColumn | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + name: value["name"], + type: value["type"], + comment: value["comment"], + kind: value["kind"], + }; +} diff --git a/src/clients/flinkSql/models/SqlV1PlaintextProvider.ts b/src/clients/flinkSql/models/SqlV1PlaintextProvider.ts index 88c7463d64..532232bb89 100644 --- a/src/clients/flinkSql/models/SqlV1PlaintextProvider.ts +++ b/src/clients/flinkSql/models/SqlV1PlaintextProvider.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/SqlV1ResourceChange.ts b/src/clients/flinkSql/models/SqlV1ResourceChange.ts new file mode 100644 index 0000000000..d3f8d90ad4 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1ResourceChange.ts @@ -0,0 +1,105 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +/** + * Details of a change to a specific resource. + * @export + * @interface SqlV1ResourceChange + */ +export interface SqlV1ResourceChange { + /** + * The type of resource that was changed. + * @type {string} + * @memberof SqlV1ResourceChange + */ + kind: string; + /** + * The environment containing the resource. Can be either the environment name or ID, depending on how it is referenced in the SQL statement text. + * @type {string} + * @memberof SqlV1ResourceChange + */ + environment_locator: string; + /** + * The database containing the resource. Can be either the database name or ID, depending on how it is referenced in the SQL statement text. + * @type {string} + * @memberof SqlV1ResourceChange + */ + database_locator: string; + /** + * The name of the resource, unique within its scope (environment and database). + * @type {string} + * @memberof SqlV1ResourceChange + */ + name: string; + /** + * Human-readable descriptions of the changes made to this resource. + * @type {Array} + * @memberof SqlV1ResourceChange + */ + details: Array; +} + +/** + * Check if a given object implements the SqlV1ResourceChange interface. + */ +export function instanceOfSqlV1ResourceChange(value: object): value is SqlV1ResourceChange { + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("environment_locator" in value) || value["environment_locator"] === undefined) return false; + if (!("database_locator" in value) || value["database_locator"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("details" in value) || value["details"] === undefined) return false; + return true; +} + +export function SqlV1ResourceChangeFromJSON(json: any): SqlV1ResourceChange { + return SqlV1ResourceChangeFromJSONTyped(json, false); +} + +export function SqlV1ResourceChangeFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1ResourceChange { + if (json == null) { + return json; + } + return { + kind: json["kind"], + environment_locator: json["environment_locator"], + database_locator: json["database_locator"], + name: json["name"], + details: json["details"], + }; +} + +export function SqlV1ResourceChangeToJSON(json: any): SqlV1ResourceChange { + return SqlV1ResourceChangeToJSONTyped(json, false); +} + +export function SqlV1ResourceChangeToJSONTyped( + value?: SqlV1ResourceChange | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + kind: value["kind"], + environment_locator: value["environment_locator"], + database_locator: value["database_locator"], + name: value["name"], + details: value["details"], + }; +} diff --git a/src/clients/flinkSql/models/SqlV1ResultSchema.ts b/src/clients/flinkSql/models/SqlV1ResultSchema.ts index 01fee03f94..e647290917 100644 --- a/src/clients/flinkSql/models/SqlV1ResultSchema.ts +++ b/src/clients/flinkSql/models/SqlV1ResultSchema.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/SqlV1ScalingStatus.ts b/src/clients/flinkSql/models/SqlV1ScalingStatus.ts index 4faf96527d..f843b2ca63 100644 --- a/src/clients/flinkSql/models/SqlV1ScalingStatus.ts +++ b/src/clients/flinkSql/models/SqlV1ScalingStatus.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/SqlV1StateLimitStatus.ts b/src/clients/flinkSql/models/SqlV1StateLimitStatus.ts new file mode 100644 index 0000000000..12f8ba395b --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1StateLimitStatus.ts @@ -0,0 +1,89 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +/** + * State limit status for this statement. + * @export + * @interface SqlV1StateLimitStatus + */ +export interface SqlV1StateLimitStatus { + /** + * OK: The statement is within state limits. + * + * APPROACHING_SOFT_LIMIT: The statement is approaching soft state limits. + * + * EXCEEDING_SOFT_LIMIT: The statement is exceeding soft state limits. + * + * APPROACHING_HARD_LIMIT: The statement is approaching hard state limits. + * + * EXCEEDING_HARD_LIMIT: The statement is exceeding hard state limits. + * + * @type {string} + * @memberof SqlV1StateLimitStatus + */ + readonly state_limit_state?: string; + /** + * The last time the state limit status was updated. + * @type {Date} + * @memberof SqlV1StateLimitStatus + */ + readonly last_updated?: Date; + /** + * Details about why state limit status is in its current state. + * @type {string} + * @memberof SqlV1StateLimitStatus + */ + readonly detail?: string; +} + +/** + * Check if a given object implements the SqlV1StateLimitStatus interface. + */ +export function instanceOfSqlV1StateLimitStatus(value: object): value is SqlV1StateLimitStatus { + return true; +} + +export function SqlV1StateLimitStatusFromJSON(json: any): SqlV1StateLimitStatus { + return SqlV1StateLimitStatusFromJSONTyped(json, false); +} + +export function SqlV1StateLimitStatusFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1StateLimitStatus { + if (json == null) { + return json; + } + return { + state_limit_state: json["state_limit_state"] == null ? undefined : json["state_limit_state"], + last_updated: json["last_updated"] == null ? undefined : new Date(json["last_updated"]), + detail: json["detail"] == null ? undefined : json["detail"], + }; +} + +export function SqlV1StateLimitStatusToJSON(json: any): SqlV1StateLimitStatus { + return SqlV1StateLimitStatusToJSONTyped(json, false); +} + +export function SqlV1StateLimitStatusToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return {}; +} diff --git a/src/clients/flinkSql/models/SqlV1Statement.ts b/src/clients/flinkSql/models/SqlV1Statement.ts index 69be4e33cb..afbdb11994 100644 --- a/src/clients/flinkSql/models/SqlV1Statement.ts +++ b/src/clients/flinkSql/models/SqlV1Statement.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/SqlV1StatementException.ts b/src/clients/flinkSql/models/SqlV1StatementException.ts index b273b38c5b..dd694bb3ed 100644 --- a/src/clients/flinkSql/models/SqlV1StatementException.ts +++ b/src/clients/flinkSql/models/SqlV1StatementException.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/SqlV1StatementExceptionList.ts b/src/clients/flinkSql/models/SqlV1StatementExceptionList.ts index ca1b58dc27..7b0d287808 100644 --- a/src/clients/flinkSql/models/SqlV1StatementExceptionList.ts +++ b/src/clients/flinkSql/models/SqlV1StatementExceptionList.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/SqlV1StatementList.ts b/src/clients/flinkSql/models/SqlV1StatementList.ts index e8c157aced..1bed829ecd 100644 --- a/src/clients/flinkSql/models/SqlV1StatementList.ts +++ b/src/clients/flinkSql/models/SqlV1StatementList.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/SqlV1StatementListDataInner.ts b/src/clients/flinkSql/models/SqlV1StatementListDataInner.ts index f1de57aca1..0eb61fa9d5 100644 --- a/src/clients/flinkSql/models/SqlV1StatementListDataInner.ts +++ b/src/clients/flinkSql/models/SqlV1StatementListDataInner.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/SqlV1StatementListMetadata.ts b/src/clients/flinkSql/models/SqlV1StatementListMetadata.ts index a0b3f24a72..6b5914295d 100644 --- a/src/clients/flinkSql/models/SqlV1StatementListMetadata.ts +++ b/src/clients/flinkSql/models/SqlV1StatementListMetadata.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/SqlV1StatementMetadata.ts b/src/clients/flinkSql/models/SqlV1StatementMetadata.ts index dd06889e8b..1f7ff039b2 100644 --- a/src/clients/flinkSql/models/SqlV1StatementMetadata.ts +++ b/src/clients/flinkSql/models/SqlV1StatementMetadata.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/SqlV1StatementResult.ts b/src/clients/flinkSql/models/SqlV1StatementResult.ts index 4e79ae8747..9bf0877138 100644 --- a/src/clients/flinkSql/models/SqlV1StatementResult.ts +++ b/src/clients/flinkSql/models/SqlV1StatementResult.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/SqlV1StatementResultResults.ts b/src/clients/flinkSql/models/SqlV1StatementResultResults.ts index 8007949dc9..58680c544f 100644 --- a/src/clients/flinkSql/models/SqlV1StatementResultResults.ts +++ b/src/clients/flinkSql/models/SqlV1StatementResultResults.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/SqlV1StatementSpec.ts b/src/clients/flinkSql/models/SqlV1StatementSpec.ts index d03183c0c2..06d67e5234 100644 --- a/src/clients/flinkSql/models/SqlV1StatementSpec.ts +++ b/src/clients/flinkSql/models/SqlV1StatementSpec.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -33,6 +33,7 @@ export interface SqlV1StatementSpec { properties?: { [key: string]: string }; /** * The id associated with the compute pool in context. + * If not specified, the statement will use the default compute pool. The default pool is automatically determined by the system. * @type {string} * @memberof SqlV1StatementSpec */ @@ -43,18 +44,21 @@ export interface SqlV1StatementSpec { * @memberof SqlV1StatementSpec */ principal?: string; - /** - * The list of ids of the principals granting permissions to run this statement. - * @type {Array} - * @memberof SqlV1StatementSpec - */ - authorized_principals?: Array; /** * Indicates whether the statement should be stopped. * @type {boolean} * @memberof SqlV1StatementSpec */ stopped?: boolean; + /** + * The execution mode of the statement. + * + * Note - The attribute is in a [Early Access lifecycle](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy) + * + * @type {string} + * @memberof SqlV1StatementSpec + */ + readonly execution_mode?: string; } /** @@ -80,9 +84,8 @@ export function SqlV1StatementSpecFromJSONTyped( properties: json["properties"] == null ? undefined : json["properties"], compute_pool_id: json["compute_pool_id"] == null ? undefined : json["compute_pool_id"], principal: json["principal"] == null ? undefined : json["principal"], - authorized_principals: - json["authorized_principals"] == null ? undefined : json["authorized_principals"], stopped: json["stopped"] == null ? undefined : json["stopped"], + execution_mode: json["execution_mode"] == null ? undefined : json["execution_mode"], }; } @@ -91,7 +94,7 @@ export function SqlV1StatementSpecToJSON(json: any): SqlV1StatementSpec { } export function SqlV1StatementSpecToJSONTyped( - value?: SqlV1StatementSpec | null, + value?: Omit | null, ignoreDiscriminator: boolean = false, ): any { if (value == null) { @@ -103,7 +106,6 @@ export function SqlV1StatementSpecToJSONTyped( properties: value["properties"], compute_pool_id: value["compute_pool_id"], principal: value["principal"], - authorized_principals: value["authorized_principals"], stopped: value["stopped"], }; } diff --git a/src/clients/flinkSql/models/SqlV1StatementStatus.ts b/src/clients/flinkSql/models/SqlV1StatementStatus.ts index 3c3ba88ade..d8e3b0221c 100644 --- a/src/clients/flinkSql/models/SqlV1StatementStatus.ts +++ b/src/clients/flinkSql/models/SqlV1StatementStatus.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -27,6 +27,27 @@ import { SqlV1ScalingStatusToJSON, SqlV1ScalingStatusToJSONTyped, } from "./SqlV1ScalingStatus"; +import type { SqlV1StateLimitStatus } from "./SqlV1StateLimitStatus"; +import { + SqlV1StateLimitStatusFromJSON, + SqlV1StateLimitStatusFromJSONTyped, + SqlV1StateLimitStatusToJSON, + SqlV1StateLimitStatusToJSONTyped, +} from "./SqlV1StateLimitStatus"; +import type { SqlV1StatementStatusAffectedResource } from "./SqlV1StatementStatusAffectedResource"; +import { + SqlV1StatementStatusAffectedResourceFromJSON, + SqlV1StatementStatusAffectedResourceFromJSONTyped, + SqlV1StatementStatusAffectedResourceToJSON, + SqlV1StatementStatusAffectedResourceToJSONTyped, +} from "./SqlV1StatementStatusAffectedResource"; +import type { SqlV1StatementWarning } from "./SqlV1StatementWarning"; +import { + SqlV1StatementWarningFromJSON, + SqlV1StatementWarningFromJSONTyped, + SqlV1StatementWarningToJSON, + SqlV1StatementWarningToJSONTyped, +} from "./SqlV1StatementWarning"; /** * The status of the Statement @@ -61,12 +82,24 @@ export interface SqlV1StatementStatus { * @memberof SqlV1StatementStatus */ scaling_status?: SqlV1ScalingStatus; + /** + * + * @type {SqlV1StateLimitStatus} + * @memberof SqlV1StatementStatus + */ + state_limit_status?: SqlV1StateLimitStatus; /** * Details about the execution status of this statement. * @type {string} * @memberof SqlV1StatementStatus */ readonly detail?: string; + /** + * List of warnings encountered during statement execution. + * @type {Array} + * @memberof SqlV1StatementStatus + */ + readonly warnings?: Array; /** * * @type {SqlV1StatementTraits} @@ -98,6 +131,33 @@ export interface SqlV1StatementStatus { * @memberof SqlV1StatementStatus */ readonly latest_offsets_timestamp?: Date; + /** + * The date and time in UTC (represented as RFC3339 format) at which the statement reached its final terminal state. + * This field is set when the Phase is COMPLETED, FAILED, or STOPPED. + * + * Note - The attribute is in a [Early Access lifecycle](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy) + * + * @type {Date} + * @memberof SqlV1StatementStatus + */ + end_time?: Date; + /** + * The total elapsed time (represented as ISO 8601 format) from when the statement transitioned from + * PENDING to RUNNING until it reached a final terminal state. This field is calculated and set when + * the Phase is COMPLETED, FAILED, or STOPPED. + * + * Note - The attribute is in a [Early Access lifecycle](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy) + * + * @type {string} + * @memberof SqlV1StatementStatus + */ + duration?: string; + /** + * + * @type {SqlV1StatementStatusAffectedResource} + * @memberof SqlV1StatementStatus + */ + affected_resource?: SqlV1StatementStatusAffectedResource; } /** @@ -125,7 +185,15 @@ export function SqlV1StatementStatusFromJSONTyped( json["scaling_status"] == null ? undefined : SqlV1ScalingStatusFromJSON(json["scaling_status"]), + state_limit_status: + json["state_limit_status"] == null + ? undefined + : SqlV1StateLimitStatusFromJSON(json["state_limit_status"]), detail: json["detail"] == null ? undefined : json["detail"], + warnings: + json["warnings"] == null + ? undefined + : (json["warnings"] as Array).map(SqlV1StatementWarningFromJSON), traits: json["traits"] == null ? undefined : SqlV1StatementTraitsFromJSON(json["traits"]), network_kind: json["network_kind"] == null ? undefined : json["network_kind"], latest_offsets: json["latest_offsets"] == null ? undefined : json["latest_offsets"], @@ -133,6 +201,12 @@ export function SqlV1StatementStatusFromJSONTyped( json["latest_offsets_timestamp"] == null ? undefined : new Date(json["latest_offsets_timestamp"]), + end_time: json["end_time"] == null ? undefined : new Date(json["end_time"]), + duration: json["duration"] == null ? undefined : json["duration"], + affected_resource: + json["affected_resource"] == null + ? undefined + : SqlV1StatementStatusAffectedResourceFromJSON(json["affected_resource"]), }; } @@ -143,7 +217,7 @@ export function SqlV1StatementStatusToJSON(json: any): SqlV1StatementStatus { export function SqlV1StatementStatusToJSONTyped( value?: Omit< SqlV1StatementStatus, - "phase" | "detail" | "network_kind" | "latest_offsets" | "latest_offsets_timestamp" + "phase" | "detail" | "warnings" | "network_kind" | "latest_offsets" | "latest_offsets_timestamp" > | null, ignoreDiscriminator: boolean = false, ): any { @@ -153,6 +227,10 @@ export function SqlV1StatementStatusToJSONTyped( return { scaling_status: SqlV1ScalingStatusToJSON(value["scaling_status"]), + state_limit_status: SqlV1StateLimitStatusToJSON(value["state_limit_status"]), traits: SqlV1StatementTraitsToJSON(value["traits"]), + end_time: value["end_time"] == null ? undefined : value["end_time"].toISOString(), + duration: value["duration"], + affected_resource: SqlV1StatementStatusAffectedResourceToJSON(value["affected_resource"]), }; } diff --git a/src/clients/flinkSql/models/SqlV1StatementStatusAffectedResource.ts b/src/clients/flinkSql/models/SqlV1StatementStatusAffectedResource.ts new file mode 100644 index 0000000000..f8e3728bdd --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1StatementStatusAffectedResource.ts @@ -0,0 +1,107 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +/** + * A reference to the resource created by this statement, if any. This field is set when a statement + * (e.g., CREATE MATERIALIZED TABLE) results in a new user-facing resource. + * + * Note - The attribute is in a [Early Access lifecycle](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy) + * + * @export + * @interface SqlV1StatementStatusAffectedResource + */ +export interface SqlV1StatementStatusAffectedResource { + /** + * The kind of resource that was created. + * @type {string} + * @memberof SqlV1StatementStatusAffectedResource + */ + kind: string; + /** + * The unique identifier for the environment containing the resource. + * @type {string} + * @memberof SqlV1StatementStatusAffectedResource + */ + environment_id: string; + /** + * The unique identifier for the database containing the resource. + * Only present for resource kinds that are scoped to a database. + * + * @type {string} + * @memberof SqlV1StatementStatusAffectedResource + */ + database_id?: string; + /** + * The name of the created resource, unique within its scope. + * @type {string} + * @memberof SqlV1StatementStatusAffectedResource + */ + resource_name: string; +} + +/** + * Check if a given object implements the SqlV1StatementStatusAffectedResource interface. + */ +export function instanceOfSqlV1StatementStatusAffectedResource( + value: object, +): value is SqlV1StatementStatusAffectedResource { + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("environment_id" in value) || value["environment_id"] === undefined) return false; + if (!("resource_name" in value) || value["resource_name"] === undefined) return false; + return true; +} + +export function SqlV1StatementStatusAffectedResourceFromJSON( + json: any, +): SqlV1StatementStatusAffectedResource { + return SqlV1StatementStatusAffectedResourceFromJSONTyped(json, false); +} + +export function SqlV1StatementStatusAffectedResourceFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1StatementStatusAffectedResource { + if (json == null) { + return json; + } + return { + kind: json["kind"], + environment_id: json["environment_id"], + database_id: json["database_id"] == null ? undefined : json["database_id"], + resource_name: json["resource_name"], + }; +} + +export function SqlV1StatementStatusAffectedResourceToJSON( + json: any, +): SqlV1StatementStatusAffectedResource { + return SqlV1StatementStatusAffectedResourceToJSONTyped(json, false); +} + +export function SqlV1StatementStatusAffectedResourceToJSONTyped( + value?: SqlV1StatementStatusAffectedResource | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + kind: value["kind"], + environment_id: value["environment_id"], + database_id: value["database_id"], + resource_name: value["resource_name"], + }; +} diff --git a/src/clients/flinkSql/models/SqlV1StatementTraits.ts b/src/clients/flinkSql/models/SqlV1StatementTraits.ts index d22aa74e2b..553d2f85fc 100644 --- a/src/clients/flinkSql/models/SqlV1StatementTraits.ts +++ b/src/clients/flinkSql/models/SqlV1StatementTraits.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -57,6 +57,12 @@ export interface SqlV1StatementTraits { * @memberof SqlV1StatementTraits */ schema?: SqlV1ResultSchema; + /** + * The names of connections that the SQL statement references (e.g., in FROM clauses). + * @type {Array} + * @memberof SqlV1StatementTraits + */ + connection_refs?: Array; } /** @@ -83,6 +89,7 @@ export function SqlV1StatementTraitsFromJSONTyped( is_append_only: json["is_append_only"] == null ? undefined : json["is_append_only"], upsert_columns: json["upsert_columns"] == null ? undefined : json["upsert_columns"], schema: json["schema"] == null ? undefined : SqlV1ResultSchemaFromJSON(json["schema"]), + connection_refs: json["connection_refs"] == null ? undefined : json["connection_refs"], }; } @@ -104,5 +111,6 @@ export function SqlV1StatementTraitsToJSONTyped( is_append_only: value["is_append_only"], upsert_columns: value["upsert_columns"], schema: SqlV1ResultSchemaToJSON(value["schema"]), + connection_refs: value["connection_refs"], }; } diff --git a/src/clients/flinkSql/models/SqlV1StatementWarning.ts b/src/clients/flinkSql/models/SqlV1StatementWarning.ts new file mode 100644 index 0000000000..3ef1410378 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1StatementWarning.ts @@ -0,0 +1,102 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +/** + * Represents a non-fatal issue encountered during statement processing. + * @export + * @interface SqlV1StatementWarning + */ +export interface SqlV1StatementWarning { + /** + * Indicates the severity of the warning. + * + * LOW: Indicates a low severity warning and for informing the user. + * + * MODERATE: Indicates a moderate severity warning and may require user action. Could cause degraded statements if certain conditions apply. + * + * CRITICAL: Indicates a critical severity warning and requires user action. It will cause degraded statements eventually. + * + * @type {string} + * @memberof SqlV1StatementWarning + */ + severity: string; + /** + * The timestamp when the warning was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1StatementWarning + */ + readonly created_at: Date; + /** + * A machine-readable short, upper case summary delimited by underscore. + * @type {string} + * @memberof SqlV1StatementWarning + */ + reason: string; + /** + * A human-readable string containing the description of the warning. + * @type {string} + * @memberof SqlV1StatementWarning + */ + message: string; +} + +/** + * Check if a given object implements the SqlV1StatementWarning interface. + */ +export function instanceOfSqlV1StatementWarning(value: object): value is SqlV1StatementWarning { + if (!("severity" in value) || value["severity"] === undefined) return false; + if (!("created_at" in value) || value["created_at"] === undefined) return false; + if (!("reason" in value) || value["reason"] === undefined) return false; + if (!("message" in value) || value["message"] === undefined) return false; + return true; +} + +export function SqlV1StatementWarningFromJSON(json: any): SqlV1StatementWarning { + return SqlV1StatementWarningFromJSONTyped(json, false); +} + +export function SqlV1StatementWarningFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1StatementWarning { + if (json == null) { + return json; + } + return { + severity: json["severity"], + created_at: new Date(json["created_at"]), + reason: json["reason"], + message: json["message"], + }; +} + +export function SqlV1StatementWarningToJSON(json: any): SqlV1StatementWarning { + return SqlV1StatementWarningToJSONTyped(json, false); +} + +export function SqlV1StatementWarningToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + severity: value["severity"], + reason: value["reason"], + message: value["message"], + }; +} diff --git a/src/clients/flinkSql/models/SqlV1Tool.ts b/src/clients/flinkSql/models/SqlV1Tool.ts new file mode 100644 index 0000000000..05dfa8cf62 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1Tool.ts @@ -0,0 +1,144 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +import type { SqlV1ToolSpec } from "./SqlV1ToolSpec"; +import { + SqlV1ToolSpecFromJSON, + SqlV1ToolSpecFromJSONTyped, + SqlV1ToolSpecToJSON, + SqlV1ToolSpecToJSONTyped, +} from "./SqlV1ToolSpec"; +import type { SqlV1ToolStatus } from "./SqlV1ToolStatus"; +import { + SqlV1ToolStatusFromJSON, + SqlV1ToolStatusFromJSONTyped, + SqlV1ToolStatusToJSON, + SqlV1ToolStatusToJSONTyped, +} from "./SqlV1ToolStatus"; +import type { SqlV1ToolMetadata } from "./SqlV1ToolMetadata"; +import { + SqlV1ToolMetadataFromJSON, + SqlV1ToolMetadataFromJSONTyped, + SqlV1ToolMetadataToJSON, + SqlV1ToolMetadataToJSONTyped, +} from "./SqlV1ToolMetadata"; + +/** + * `Tool` models a reusable tool resource backed by a connection that can be referenced + * by agents to perform actions. + * The API allows you to create your tools. + * ## The Tools Model + * + * @export + * @interface SqlV1Tool + */ +export interface SqlV1Tool { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1Tool + */ + readonly api_version?: SqlV1ToolApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1Tool + */ + readonly kind?: SqlV1ToolKindEnum; + /** + * + * @type {SqlV1ToolMetadata} + * @memberof SqlV1Tool + */ + metadata?: SqlV1ToolMetadata; + /** + * The user provided name of the tool, unique within this environment. + * @type {string} + * @memberof SqlV1Tool + */ + name?: string; + /** + * + * @type {SqlV1ToolSpec} + * @memberof SqlV1Tool + */ + spec?: SqlV1ToolSpec; + /** + * + * @type {SqlV1ToolStatus} + * @memberof SqlV1Tool + */ + status?: SqlV1ToolStatus; +} + +/** + * @export + * @enum {string} + */ +export enum SqlV1ToolApiVersionEnum { + SqlV1 = "sql/v1", +} +/** + * @export + * @enum {string} + */ +export enum SqlV1ToolKindEnum { + Tool = "Tool", +} + +/** + * Check if a given object implements the SqlV1Tool interface. + */ +export function instanceOfSqlV1Tool(value: object): value is SqlV1Tool { + return true; +} + +export function SqlV1ToolFromJSON(json: any): SqlV1Tool { + return SqlV1ToolFromJSONTyped(json, false); +} + +export function SqlV1ToolFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1Tool { + if (json == null) { + return json; + } + return { + api_version: json["api_version"] == null ? undefined : json["api_version"], + kind: json["kind"] == null ? undefined : json["kind"], + metadata: json["metadata"] == null ? undefined : SqlV1ToolMetadataFromJSON(json["metadata"]), + name: json["name"] == null ? undefined : json["name"], + spec: json["spec"] == null ? undefined : SqlV1ToolSpecFromJSON(json["spec"]), + status: json["status"] == null ? undefined : SqlV1ToolStatusFromJSON(json["status"]), + }; +} + +export function SqlV1ToolToJSON(json: any): SqlV1Tool { + return SqlV1ToolToJSONTyped(json, false); +} + +export function SqlV1ToolToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + metadata: SqlV1ToolMetadataToJSON(value["metadata"]), + name: value["name"], + spec: SqlV1ToolSpecToJSON(value["spec"]), + status: SqlV1ToolStatusToJSON(value["status"]), + }; +} diff --git a/src/clients/flinkSql/models/SqlV1ToolList.ts b/src/clients/flinkSql/models/SqlV1ToolList.ts new file mode 100644 index 0000000000..3f44505b2a --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1ToolList.ts @@ -0,0 +1,127 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +import type { SqlV1ToolListDataInner } from "./SqlV1ToolListDataInner"; +import { + SqlV1ToolListDataInnerFromJSON, + SqlV1ToolListDataInnerFromJSONTyped, + SqlV1ToolListDataInnerToJSON, + SqlV1ToolListDataInnerToJSONTyped, +} from "./SqlV1ToolListDataInner"; +import type { SqlV1ToolListMetadata } from "./SqlV1ToolListMetadata"; +import { + SqlV1ToolListMetadataFromJSON, + SqlV1ToolListMetadataFromJSONTyped, + SqlV1ToolListMetadataToJSON, + SqlV1ToolListMetadataToJSONTyped, +} from "./SqlV1ToolListMetadata"; + +/** + * `Tool` models a reusable tool resource backed by a connection that can be referenced + * by agents to perform actions. + * The API allows you to create your tools. + * ## The Tool Model + * + * @export + * @interface SqlV1ToolList + */ +export interface SqlV1ToolList { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1ToolList + */ + api_version: SqlV1ToolListApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1ToolList + */ + kind: SqlV1ToolListKindEnum; + /** + * + * @type {SqlV1ToolListMetadata} + * @memberof SqlV1ToolList + */ + metadata: SqlV1ToolListMetadata; + /** + * A data property that contains an array of resource items. Each entry in the array is a separate resource. + * @type {Set} + * @memberof SqlV1ToolList + */ + data: Set; +} + +/** + * @export + * @enum {string} + */ +export enum SqlV1ToolListApiVersionEnum { + SqlV1 = "sql/v1", +} +/** + * @export + * @enum {string} + */ +export enum SqlV1ToolListKindEnum { + ToolList = "ToolList", +} + +/** + * Check if a given object implements the SqlV1ToolList interface. + */ +export function instanceOfSqlV1ToolList(value: object): value is SqlV1ToolList { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("data" in value) || value["data"] === undefined) return false; + return true; +} + +export function SqlV1ToolListFromJSON(json: any): SqlV1ToolList { + return SqlV1ToolListFromJSONTyped(json, false); +} + +export function SqlV1ToolListFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ToolList { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1ToolListMetadataFromJSON(json["metadata"]), + data: new Set((json["data"] as Array).map(SqlV1ToolListDataInnerFromJSON)), + }; +} + +export function SqlV1ToolListToJSON(json: any): SqlV1ToolList { + return SqlV1ToolListToJSONTyped(json, false); +} + +export function SqlV1ToolListToJSONTyped( + value?: SqlV1ToolList | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + api_version: value["api_version"], + kind: value["kind"], + metadata: SqlV1ToolListMetadataToJSON(value["metadata"]), + data: Array.from(value["data"] as Set).map(SqlV1ToolListDataInnerToJSON), + }; +} diff --git a/src/clients/flinkSql/models/SqlV1ToolListDataInner.ts b/src/clients/flinkSql/models/SqlV1ToolListDataInner.ts new file mode 100644 index 0000000000..2dcca45539 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1ToolListDataInner.ts @@ -0,0 +1,142 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +import type { SqlV1ToolStatus } from "./SqlV1ToolStatus"; +import { + SqlV1ToolStatusFromJSON, + SqlV1ToolStatusFromJSONTyped, + SqlV1ToolStatusToJSON, + SqlV1ToolStatusToJSONTyped, +} from "./SqlV1ToolStatus"; +import type { SqlV1ToolMetadata } from "./SqlV1ToolMetadata"; +import { + SqlV1ToolMetadataFromJSON, + SqlV1ToolMetadataFromJSONTyped, + SqlV1ToolMetadataToJSON, + SqlV1ToolMetadataToJSONTyped, +} from "./SqlV1ToolMetadata"; + +/** + * + * @export + * @interface SqlV1ToolListDataInner + */ +export interface SqlV1ToolListDataInner { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof SqlV1ToolListDataInner + */ + readonly api_version: SqlV1ToolListDataInnerApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof SqlV1ToolListDataInner + */ + readonly kind: SqlV1ToolListDataInnerKindEnum; + /** + * + * @type {SqlV1ToolMetadata} + * @memberof SqlV1ToolListDataInner + */ + metadata: SqlV1ToolMetadata; + /** + * The user provided name of the tool, unique within this environment. + * @type {string} + * @memberof SqlV1ToolListDataInner + */ + name: string; + /** + * + * @type {object} + * @memberof SqlV1ToolListDataInner + */ + spec: object; + /** + * + * @type {SqlV1ToolStatus} + * @memberof SqlV1ToolListDataInner + */ + status: SqlV1ToolStatus; +} + +/** + * @export + * @enum {string} + */ +export enum SqlV1ToolListDataInnerApiVersionEnum { + SqlV1 = "sql/v1", +} +/** + * @export + * @enum {string} + */ +export enum SqlV1ToolListDataInnerKindEnum { + Tool = "Tool", +} + +/** + * Check if a given object implements the SqlV1ToolListDataInner interface. + */ +export function instanceOfSqlV1ToolListDataInner(value: object): value is SqlV1ToolListDataInner { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + if (!("status" in value) || value["status"] === undefined) return false; + return true; +} + +export function SqlV1ToolListDataInnerFromJSON(json: any): SqlV1ToolListDataInner { + return SqlV1ToolListDataInnerFromJSONTyped(json, false); +} + +export function SqlV1ToolListDataInnerFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1ToolListDataInner { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: SqlV1ToolMetadataFromJSON(json["metadata"]), + name: json["name"], + spec: json["spec"], + status: SqlV1ToolStatusFromJSON(json["status"]), + }; +} + +export function SqlV1ToolListDataInnerToJSON(json: any): SqlV1ToolListDataInner { + return SqlV1ToolListDataInnerToJSONTyped(json, false); +} + +export function SqlV1ToolListDataInnerToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + metadata: SqlV1ToolMetadataToJSON(value["metadata"]), + name: value["name"], + spec: value["spec"], + status: SqlV1ToolStatusToJSON(value["status"]), + }; +} diff --git a/src/clients/flinkSql/models/SqlV1ToolListMetadata.ts b/src/clients/flinkSql/models/SqlV1ToolListMetadata.ts new file mode 100644 index 0000000000..87b6af7896 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1ToolListMetadata.ts @@ -0,0 +1,100 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +/** + * + * @export + * @interface SqlV1ToolListMetadata + */ +export interface SqlV1ToolListMetadata { + /** + * + * @type {any} + * @memberof SqlV1ToolListMetadata + */ + self?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ToolListMetadata + */ + next?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ToolListMetadata + */ + first?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ToolListMetadata + */ + last?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ToolListMetadata + */ + prev?: any | null; +} + +/** + * Check if a given object implements the SqlV1ToolListMetadata interface. + */ +export function instanceOfSqlV1ToolListMetadata(value: object): value is SqlV1ToolListMetadata { + return true; +} + +export function SqlV1ToolListMetadataFromJSON(json: any): SqlV1ToolListMetadata { + return SqlV1ToolListMetadataFromJSONTyped(json, false); +} + +export function SqlV1ToolListMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1ToolListMetadata { + if (json == null) { + return json; + } + return { + self: json["self"] == null ? undefined : json["self"], + next: json["next"] == null ? undefined : json["next"], + first: json["first"] == null ? undefined : json["first"], + last: json["last"] == null ? undefined : json["last"], + prev: json["prev"] == null ? undefined : json["prev"], + }; +} + +export function SqlV1ToolListMetadataToJSON(json: any): SqlV1ToolListMetadata { + return SqlV1ToolListMetadataToJSONTyped(json, false); +} + +export function SqlV1ToolListMetadataToJSONTyped( + value?: SqlV1ToolListMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + self: value["self"], + next: value["next"], + first: value["first"], + last: value["last"], + prev: value["prev"], + }; +} diff --git a/src/clients/flinkSql/models/SqlV1ToolMetadata.ts b/src/clients/flinkSql/models/SqlV1ToolMetadata.ts new file mode 100644 index 0000000000..f956cadd23 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1ToolMetadata.ts @@ -0,0 +1,109 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +/** + * + * @export + * @interface SqlV1ToolMetadata + */ +export interface SqlV1ToolMetadata { + /** + * + * @type {any} + * @memberof SqlV1ToolMetadata + */ + self: any | null; + /** + * The date and time at which this object was created. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1ToolMetadata + */ + created_at?: Date; + /** + * The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. + * @type {Date} + * @memberof SqlV1ToolMetadata + */ + updated_at?: Date; + /** + * + * @type {any} + * @memberof SqlV1ToolMetadata + */ + uid?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ToolMetadata + */ + resource_version?: any | null; + /** + * + * @type {any} + * @memberof SqlV1ToolMetadata + */ + resource_name?: any | null; +} + +/** + * Check if a given object implements the SqlV1ToolMetadata interface. + */ +export function instanceOfSqlV1ToolMetadata(value: object): value is SqlV1ToolMetadata { + if (!("self" in value) || value["self"] === undefined) return false; + return true; +} + +export function SqlV1ToolMetadataFromJSON(json: any): SqlV1ToolMetadata { + return SqlV1ToolMetadataFromJSONTyped(json, false); +} + +export function SqlV1ToolMetadataFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1ToolMetadata { + if (json == null) { + return json; + } + return { + self: json["self"], + created_at: json["created_at"] == null ? undefined : new Date(json["created_at"]), + updated_at: json["updated_at"] == null ? undefined : new Date(json["updated_at"]), + uid: json["uid"] == null ? undefined : json["uid"], + resource_version: json["resource_version"] == null ? undefined : json["resource_version"], + resource_name: json["resource_name"] == null ? undefined : json["resource_name"], + }; +} + +export function SqlV1ToolMetadataToJSON(json: any): SqlV1ToolMetadata { + return SqlV1ToolMetadataToJSONTyped(json, false); +} + +export function SqlV1ToolMetadataToJSONTyped( + value?: SqlV1ToolMetadata | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + self: value["self"], + created_at: value["created_at"] == null ? undefined : value["created_at"].toISOString(), + updated_at: value["updated_at"] == null ? undefined : value["updated_at"].toISOString(), + uid: value["uid"], + resource_version: value["resource_version"], + resource_name: value["resource_name"], + }; +} diff --git a/src/clients/flinkSql/models/SqlV1ToolSpec.ts b/src/clients/flinkSql/models/SqlV1ToolSpec.ts new file mode 100644 index 0000000000..b2e287645c --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1ToolSpec.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +/** + * The spec of the Tool + * @export + * @interface SqlV1ToolSpec + */ +export interface SqlV1ToolSpec { + /** + * The name of the connection this tool uses. + * @type {string} + * @memberof SqlV1ToolSpec + */ + connection?: string; + /** + * A set of key-value option pairs that configure the tool's behavior. + * @type {{ [key: string]: string; }} + * @memberof SqlV1ToolSpec + */ + options?: { [key: string]: string }; +} + +/** + * Check if a given object implements the SqlV1ToolSpec interface. + */ +export function instanceOfSqlV1ToolSpec(value: object): value is SqlV1ToolSpec { + return true; +} + +export function SqlV1ToolSpecFromJSON(json: any): SqlV1ToolSpec { + return SqlV1ToolSpecFromJSONTyped(json, false); +} + +export function SqlV1ToolSpecFromJSONTyped(json: any, ignoreDiscriminator: boolean): SqlV1ToolSpec { + if (json == null) { + return json; + } + return { + connection: json["connection"] == null ? undefined : json["connection"], + options: json["options"] == null ? undefined : json["options"], + }; +} + +export function SqlV1ToolSpecToJSON(json: any): SqlV1ToolSpec { + return SqlV1ToolSpecToJSONTyped(json, false); +} + +export function SqlV1ToolSpecToJSONTyped( + value?: SqlV1ToolSpec | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + connection: value["connection"], + options: value["options"], + }; +} diff --git a/src/clients/flinkSql/models/SqlV1ToolStatus.ts b/src/clients/flinkSql/models/SqlV1ToolStatus.ts new file mode 100644 index 0000000000..713fbad9e8 --- /dev/null +++ b/src/clients/flinkSql/models/SqlV1ToolStatus.ts @@ -0,0 +1,81 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +/** + * The status of the Tool + * @export + * @interface SqlV1ToolStatus + */ +export interface SqlV1ToolStatus { + /** + * Describes the status of the tool: + * + * ACTIVE: The Tool is usable; + * + * INACTIVE: The Tool is not currently active; + * + * ERROR: The Tool encountered an error; + * + * @type {string} + * @memberof SqlV1ToolStatus + */ + readonly phase: string; + /** + * Details about why the tool transitioned into a given status. + * @type {string} + * @memberof SqlV1ToolStatus + */ + readonly detail?: string; +} + +/** + * Check if a given object implements the SqlV1ToolStatus interface. + */ +export function instanceOfSqlV1ToolStatus(value: object): value is SqlV1ToolStatus { + if (!("phase" in value) || value["phase"] === undefined) return false; + return true; +} + +export function SqlV1ToolStatusFromJSON(json: any): SqlV1ToolStatus { + return SqlV1ToolStatusFromJSONTyped(json, false); +} + +export function SqlV1ToolStatusFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): SqlV1ToolStatus { + if (json == null) { + return json; + } + return { + phase: json["phase"], + detail: json["detail"] == null ? undefined : json["detail"], + }; +} + +export function SqlV1ToolStatusToJSON(json: any): SqlV1ToolStatus { + return SqlV1ToolStatusToJSONTyped(json, false); +} + +export function SqlV1ToolStatusToJSONTyped( + value?: Omit | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return {}; +} diff --git a/src/clients/flinkSql/models/StatementObjectMeta.ts b/src/clients/flinkSql/models/StatementObjectMeta.ts index 71f3bc0034..ebfc33072a 100644 --- a/src/clients/flinkSql/models/StatementObjectMeta.ts +++ b/src/clients/flinkSql/models/StatementObjectMeta.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/UpdateSqlv1AgentRequest.ts b/src/clients/flinkSql/models/UpdateSqlv1AgentRequest.ts new file mode 100644 index 0000000000..9802e4c333 --- /dev/null +++ b/src/clients/flinkSql/models/UpdateSqlv1AgentRequest.ts @@ -0,0 +1,159 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +import type { SqlV1AgentStatus } from "./SqlV1AgentStatus"; +import { + SqlV1AgentStatusFromJSON, + SqlV1AgentStatusFromJSONTyped, + SqlV1AgentStatusToJSON, + SqlV1AgentStatusToJSONTyped, +} from "./SqlV1AgentStatus"; +import type { SqlV1AgentSpec } from "./SqlV1AgentSpec"; +import { + SqlV1AgentSpecFromJSON, + SqlV1AgentSpecFromJSONTyped, + SqlV1AgentSpecToJSON, + SqlV1AgentSpecToJSONTyped, +} from "./SqlV1AgentSpec"; + +/** + * + * @export + * @interface UpdateSqlv1AgentRequest + */ +export interface UpdateSqlv1AgentRequest { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof UpdateSqlv1AgentRequest + */ + readonly api_version: UpdateSqlv1AgentRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof UpdateSqlv1AgentRequest + */ + readonly kind: UpdateSqlv1AgentRequestKindEnum; + /** + * + * @type {object} + * @memberof UpdateSqlv1AgentRequest + */ + metadata: object; + /** + * The user-provided name of the agent, unique within this environment. + * @type {string} + * @memberof UpdateSqlv1AgentRequest + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof UpdateSqlv1AgentRequest + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof UpdateSqlv1AgentRequest + */ + readonly environment_id: string; + /** + * + * @type {SqlV1AgentSpec} + * @memberof UpdateSqlv1AgentRequest + */ + spec: SqlV1AgentSpec; + /** + * + * @type {SqlV1AgentStatus} + * @memberof UpdateSqlv1AgentRequest + */ + readonly status?: SqlV1AgentStatus; +} + +/** + * @export + * @enum {string} + */ +export enum UpdateSqlv1AgentRequestApiVersionEnum { + SqlV1 = "sql/v1", +} +/** + * @export + * @enum {string} + */ +export enum UpdateSqlv1AgentRequestKindEnum { + Agent = "Agent", +} + +/** + * Check if a given object implements the UpdateSqlv1AgentRequest interface. + */ +export function instanceOfUpdateSqlv1AgentRequest(value: object): value is UpdateSqlv1AgentRequest { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("organization_id" in value) || value["organization_id"] === undefined) return false; + if (!("environment_id" in value) || value["environment_id"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; +} + +export function UpdateSqlv1AgentRequestFromJSON(json: any): UpdateSqlv1AgentRequest { + return UpdateSqlv1AgentRequestFromJSONTyped(json, false); +} + +export function UpdateSqlv1AgentRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): UpdateSqlv1AgentRequest { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: json["metadata"], + name: json["name"], + organization_id: json["organization_id"], + environment_id: json["environment_id"], + spec: SqlV1AgentSpecFromJSON(json["spec"]), + status: json["status"] == null ? undefined : SqlV1AgentStatusFromJSON(json["status"]), + }; +} + +export function UpdateSqlv1AgentRequestToJSON(json: any): UpdateSqlv1AgentRequest { + return UpdateSqlv1AgentRequestToJSONTyped(json, false); +} + +export function UpdateSqlv1AgentRequestToJSONTyped( + value?: Omit< + UpdateSqlv1AgentRequest, + "api_version" | "kind" | "organization_id" | "environment_id" | "status" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + metadata: value["metadata"], + name: value["name"], + spec: SqlV1AgentSpecToJSON(value["spec"]), + }; +} diff --git a/src/clients/flinkSql/models/UpdateSqlv1ConnectionRequest.ts b/src/clients/flinkSql/models/UpdateSqlv1ConnectionRequest.ts index 9917681238..f2f39a9ac9 100644 --- a/src/clients/flinkSql/models/UpdateSqlv1ConnectionRequest.ts +++ b/src/clients/flinkSql/models/UpdateSqlv1ConnectionRequest.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/UpdateSqlv1MaterializedTableRequest.ts b/src/clients/flinkSql/models/UpdateSqlv1MaterializedTableRequest.ts new file mode 100644 index 0000000000..27864f1d77 --- /dev/null +++ b/src/clients/flinkSql/models/UpdateSqlv1MaterializedTableRequest.ts @@ -0,0 +1,166 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * SQL API v1 + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.0.1 + * Contact: flink-control-plane@confluent.io + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { mapValues } from "../runtime"; +import type { SqlV1MaterializedTableSpec } from "./SqlV1MaterializedTableSpec"; +import { + SqlV1MaterializedTableSpecFromJSON, + SqlV1MaterializedTableSpecFromJSONTyped, + SqlV1MaterializedTableSpecToJSON, + SqlV1MaterializedTableSpecToJSONTyped, +} from "./SqlV1MaterializedTableSpec"; +import type { SqlV1MaterializedTableStatus } from "./SqlV1MaterializedTableStatus"; +import { + SqlV1MaterializedTableStatusFromJSON, + SqlV1MaterializedTableStatusFromJSONTyped, + SqlV1MaterializedTableStatusToJSON, + SqlV1MaterializedTableStatusToJSONTyped, +} from "./SqlV1MaterializedTableStatus"; + +/** + * + * @export + * @interface UpdateSqlv1MaterializedTableRequest + */ +export interface UpdateSqlv1MaterializedTableRequest { + /** + * APIVersion defines the schema version of this representation of a resource. + * @type {string} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + readonly api_version: UpdateSqlv1MaterializedTableRequestApiVersionEnum; + /** + * Kind defines the object this REST resource represents. + * @type {string} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + readonly kind: UpdateSqlv1MaterializedTableRequestKindEnum; + /** + * + * @type {object} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + metadata: object; + /** + * The user-provided name of the resource, unique within this environment. + * @type {string} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + name: string; + /** + * The unique identifier for the organization. + * @type {string} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + readonly organization_id: string; + /** + * The unique identifier for the environment. + * @type {string} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + readonly environment_id: string; + /** + * + * @type {SqlV1MaterializedTableSpec} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + spec: SqlV1MaterializedTableSpec; + /** + * + * @type {SqlV1MaterializedTableStatus} + * @memberof UpdateSqlv1MaterializedTableRequest + */ + readonly status?: SqlV1MaterializedTableStatus; +} + +/** + * @export + * @enum {string} + */ +export enum UpdateSqlv1MaterializedTableRequestApiVersionEnum { + SqlV1 = "sql/v1", +} +/** + * @export + * @enum {string} + */ +export enum UpdateSqlv1MaterializedTableRequestKindEnum { + MaterializedTable = "MaterializedTable", +} + +/** + * Check if a given object implements the UpdateSqlv1MaterializedTableRequest interface. + */ +export function instanceOfUpdateSqlv1MaterializedTableRequest( + value: object, +): value is UpdateSqlv1MaterializedTableRequest { + if (!("api_version" in value) || value["api_version"] === undefined) return false; + if (!("kind" in value) || value["kind"] === undefined) return false; + if (!("metadata" in value) || value["metadata"] === undefined) return false; + if (!("name" in value) || value["name"] === undefined) return false; + if (!("organization_id" in value) || value["organization_id"] === undefined) return false; + if (!("environment_id" in value) || value["environment_id"] === undefined) return false; + if (!("spec" in value) || value["spec"] === undefined) return false; + return true; +} + +export function UpdateSqlv1MaterializedTableRequestFromJSON( + json: any, +): UpdateSqlv1MaterializedTableRequest { + return UpdateSqlv1MaterializedTableRequestFromJSONTyped(json, false); +} + +export function UpdateSqlv1MaterializedTableRequestFromJSONTyped( + json: any, + ignoreDiscriminator: boolean, +): UpdateSqlv1MaterializedTableRequest { + if (json == null) { + return json; + } + return { + api_version: json["api_version"], + kind: json["kind"], + metadata: json["metadata"], + name: json["name"], + organization_id: json["organization_id"], + environment_id: json["environment_id"], + spec: SqlV1MaterializedTableSpecFromJSON(json["spec"]), + status: + json["status"] == null ? undefined : SqlV1MaterializedTableStatusFromJSON(json["status"]), + }; +} + +export function UpdateSqlv1MaterializedTableRequestToJSON( + json: any, +): UpdateSqlv1MaterializedTableRequest { + return UpdateSqlv1MaterializedTableRequestToJSONTyped(json, false); +} + +export function UpdateSqlv1MaterializedTableRequestToJSONTyped( + value?: Omit< + UpdateSqlv1MaterializedTableRequest, + "api_version" | "kind" | "organization_id" | "environment_id" | "status" + > | null, + ignoreDiscriminator: boolean = false, +): any { + if (value == null) { + return value; + } + + return { + metadata: value["metadata"], + name: value["name"], + spec: SqlV1MaterializedTableSpecToJSON(value["spec"]), + }; +} diff --git a/src/clients/flinkSql/models/UpdateSqlv1StatementRequest.ts b/src/clients/flinkSql/models/UpdateSqlv1StatementRequest.ts index f29f558515..a6ae65b7e6 100644 --- a/src/clients/flinkSql/models/UpdateSqlv1StatementRequest.ts +++ b/src/clients/flinkSql/models/UpdateSqlv1StatementRequest.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/flinkSql/models/index.ts b/src/clients/flinkSql/models/index.ts index 88ca87e3c8..eeecb483ef 100644 --- a/src/clients/flinkSql/models/index.ts +++ b/src/clients/flinkSql/models/index.ts @@ -1,10 +1,14 @@ /* tslint:disable */ /* eslint-disable */ export * from "./ColumnDetails"; +export * from "./CreateSqlv1AgentRequest"; export * from "./CreateSqlv1Connection201Response"; export * from "./CreateSqlv1ConnectionRequest"; +export * from "./CreateSqlv1MaterializedTable201Response"; +export * from "./CreateSqlv1MaterializedTableRequest"; export * from "./CreateSqlv1Statement201Response"; export * from "./CreateSqlv1StatementRequest"; +export * from "./CreateSqlv1ToolRequest"; export * from "./DataType"; export * from "./ErrorSource"; export * from "./ExceptionListMeta"; @@ -12,6 +16,7 @@ export * from "./Failure"; export * from "./GetSqlv1Connection200Response"; export * from "./GetSqlv1Statement200Response"; export * from "./GetSqlv1StatementResult200Response"; +export * from "./GetSqlv1Tool200Response"; export * from "./JsonPatchRequestAddReplace"; export * from "./JsonPatchRequestMoveCopy"; export * from "./JsonPatchRequestRemove"; @@ -21,6 +26,13 @@ export * from "./ObjectMeta"; export * from "./PatchRequestInner"; export * from "./ResultListMeta"; export * from "./RowFieldType"; +export * from "./SqlV1Agent"; +export * from "./SqlV1AgentList"; +export * from "./SqlV1AgentMetadata"; +export * from "./SqlV1AgentSpec"; +export * from "./SqlV1AgentStatus"; +export * from "./SqlV1ColumnCommon"; +export * from "./SqlV1ComputedColumn"; export * from "./SqlV1Connection"; export * from "./SqlV1ConnectionList"; export * from "./SqlV1ConnectionListDataInner"; @@ -29,9 +41,27 @@ export * from "./SqlV1ConnectionMetadata"; export * from "./SqlV1ConnectionSpec"; export * from "./SqlV1ConnectionSpecAuthData"; export * from "./SqlV1ConnectionStatus"; +export * from "./SqlV1MaterializedTable"; +export * from "./SqlV1MaterializedTableColumnDetails"; +export * from "./SqlV1MaterializedTableConstraint"; +export * from "./SqlV1MaterializedTableDistribution"; +export * from "./SqlV1MaterializedTableList"; +export * from "./SqlV1MaterializedTableMetadata"; +export * from "./SqlV1MaterializedTableSpec"; +export * from "./SqlV1MaterializedTableStatus"; +export * from "./SqlV1MaterializedTableVersion"; +export * from "./SqlV1MaterializedTableVersionList"; +export * from "./SqlV1MaterializedTableVersionMetadata"; +export * from "./SqlV1MaterializedTableVersionSpec"; +export * from "./SqlV1MaterializedTableWarning"; +export * from "./SqlV1MaterializedTableWatermark"; +export * from "./SqlV1MetadataColumn"; +export * from "./SqlV1PhysicalColumn"; export * from "./SqlV1PlaintextProvider"; +export * from "./SqlV1ResourceChange"; export * from "./SqlV1ResultSchema"; export * from "./SqlV1ScalingStatus"; +export * from "./SqlV1StateLimitStatus"; export * from "./SqlV1Statement"; export * from "./SqlV1StatementException"; export * from "./SqlV1StatementExceptionList"; @@ -43,7 +73,18 @@ export * from "./SqlV1StatementResult"; export * from "./SqlV1StatementResultResults"; export * from "./SqlV1StatementSpec"; export * from "./SqlV1StatementStatus"; +export * from "./SqlV1StatementStatusAffectedResource"; export * from "./SqlV1StatementTraits"; +export * from "./SqlV1StatementWarning"; +export * from "./SqlV1Tool"; +export * from "./SqlV1ToolList"; +export * from "./SqlV1ToolListDataInner"; +export * from "./SqlV1ToolListMetadata"; +export * from "./SqlV1ToolMetadata"; +export * from "./SqlV1ToolSpec"; +export * from "./SqlV1ToolStatus"; export * from "./StatementObjectMeta"; +export * from "./UpdateSqlv1AgentRequest"; export * from "./UpdateSqlv1ConnectionRequest"; +export * from "./UpdateSqlv1MaterializedTableRequest"; export * from "./UpdateSqlv1StatementRequest"; diff --git a/src/clients/flinkSql/runtime.ts b/src/clients/flinkSql/runtime.ts index 81c0f00b14..3e21cdb8b8 100644 --- a/src/clients/flinkSql/runtime.ts +++ b/src/clients/flinkSql/runtime.ts @@ -5,7 +5,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.0.1 - * + * Contact: flink-control-plane@confluent.io * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech diff --git a/src/clients/sidecar-openapi-specs/flink-sql.openapi.yaml b/src/clients/sidecar-openapi-specs/flink-sql.openapi.yaml index 347b11dcd2..8bc61e593a 100644 --- a/src/clients/sidecar-openapi-specs/flink-sql.openapi.yaml +++ b/src/clients/sidecar-openapi-specs/flink-sql.openapi.yaml @@ -3,6 +3,10 @@ openapi: 3.0.0 info: title: SQL API v1 version: 0.0.1 + contact: + name: Flink + url: https://confluent.slack.com/app_redirect?channel=flink-ccloud + email: flink-control-plane@confluent.io x-api-id: a19bfe13-af66-493b-930a-5b7664bf52b7 x-audience: external-public x-tag-group: SQL API (%s) @@ -47,8 +51,8 @@ paths: required: false schema: type: string - x-extensible-enum: [AZUREML, AZUREOPENAI, BEDROCK, COUCHBASE, ELASTIC, - GOOGLEAI, MONGODB, OPENAI, PINECONE, SAGEMAKER, VERTEXAI] + x-extensible-enum: [AZUREML, AZUREOPENAI, A2A, ANTHROPIC, BEDROCK, CONFLUENT_JDBC, COSMOSDB, COUCHBASE, ELASTIC, + FIREWORKSAI, GOOGLEAI, MCP_SERVER, MONGODB, OPENAI, PINECONE, REST, S3VECTORS, SAGEMAKER, VERTEXAI] description: Filter the results by exact match for spec.connection_type - name: page_size in: query @@ -435,6 +439,7 @@ paths: - Statement Results (sql/v1) security: - resource-api-key: [] + - external-access-token: [] responses: '200': description: Statement Result. @@ -507,7 +512,9 @@ paths: schema: type: string example: lfcp-00000 - description: Filter the results by exact match for spec.compute_pool. + description: |- + Filter the results by exact match for spec.compute_pool_id. + When creating statements, if compute_pool_id is not specified, the statement will use the default compute pool. The default pool is automatically determined by the system. - name: page_size in: query required: false @@ -536,6 +543,7 @@ paths: - Statements (sql/v1) security: - resource-api-key: [] + - external-access-token: [] responses: '200': description: Statements. @@ -588,6 +596,7 @@ paths: - Statements (sql/v1) security: - resource-api-key: [] + - external-access-token: [] requestBody: content: application/json: @@ -603,7 +612,6 @@ paths: type: object required: - statement - - compute_pool_id responses: '201': @@ -634,7 +642,6 @@ paths: required: - statement_name - statement - - compute_pool_id '400': $ref: '#/components/responses/BadRequestError' '401': @@ -687,6 +694,7 @@ paths: - Statements (sql/v1) security: - resource-api-key: [] + - external-access-token: [] responses: '200': description: Statement. @@ -708,7 +716,6 @@ paths: required: - statement_name - statement - - compute_pool_id headers: X-Request-Id: schema: @@ -760,6 +767,7 @@ paths: - Statements (sql/v1) security: - resource-api-key: [] + - external-access-token: [] responses: '202': description: A Statement is being deleted. @@ -816,6 +824,7 @@ paths: - Statements (sql/v1) security: - resource-api-key: [] + - external-access-token: [] responses: '202': description: A Statement is being updated. @@ -857,7 +866,7 @@ paths: required: - resource_version patch: - x-lifecycle-stage: Early Access + x-lifecycle-stage: General Availability x-self-access: true x-request-access-name: SQL API v1 operationId: patchSqlv1Statement @@ -890,6 +899,7 @@ paths: - Statements (sql/v1) security: - resource-api-key: [] + - external-access-token: [] requestBody: content: application/json-patch+json: @@ -913,7 +923,6 @@ paths: required: - statement_name - statement - - compute_pool_id '400': $ref: '#/components/responses/BadRequestError' '401': @@ -970,6 +979,7 @@ paths: - Statement Exceptions (sql/v1) security: - resource-api-key: [] + - external-access-token: [] responses: '200': description: Statement Exceptions. @@ -995,68 +1005,2077 @@ paths: '500': $ref: '#/components/responses/DefaultSystemError' -components: - schemas: - sql.v1.Connection: - type: object - description: |- - `Connection` models a reusable endpoint and auth token to authenticate the caller to - use that endpoint. - Only `OrganizationAdmins` and `EnvironmentAdmins` will have the permissions to create, update and delete `Connections`. - `FlinkDevelopers` and `ModelResourceOwners` can later reference a `Connection` resource within their Model - creation statements. - The API allows you to list, create, read, and delete your connections. - ## The Connections Model - + # List Materialized Tables + /sql/v1/organizations/{organization_id}/environments/{environment_id}/materialized-tables: + get: + x-lifecycle-stage: Preview + x-self-access: true + x-request-access-name: SQL API v1 + operationId: listSqlv1MaterializedTables + summary: List all materialized tables + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Retrieve a sorted and paginated list of all materialized tables. + parameters: + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + description: The unique identifier for the organization. + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - name: page_size + in: query + required: false + schema: + type: integer + format: int32 + default: 10 + maximum: 100 + description: A pagination size for collection requests. + - name: page_token + in: query + required: false + schema: + type: string + maxLength: 255 + description: An opaque pagination token for collection requests. + tags: + - Materialized Tables (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + responses: + '200': + description: A list of Materialized Tables. + content: + application/json: + schema: + $ref: '#/components/schemas/sql.v1.MaterializedTableList' + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + + # Create a materialized table + /sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables: + post: + x-lifecycle-stage: Preview + operationId: createSqlv1MaterializedTable + summary: Create a materialized table + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Create a new Materialized Table. + parameters: + - in: path + name: organization_id + required: true + schema: + type: string + format: uuid + description: The unique identifier for the organization + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - in: path + name: kafka_cluster_id + required: true + schema: + type: string + description: The unique identifier for the database. + tags: + - Materialized Tables (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + requestBody: + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/sql.v1.MaterializedTable' + - type: object + required: + - name + - spec + properties: + spec: + type: object + required: + - query + responses: + '201': + description: Materialized Table is being created + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + Location: + schema: + type: string + format: uri + example: https://flink.region.provider.confluent.cloud/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name} + description: Materialized Table uri + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/sql.v1.MaterializedTable' + - type: object + required: + - spec + - status + properties: + spec: + type: object + required: + - query + - compute_pool_id + - principal + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '409': + $ref: '#/components/responses/ConflictError' + '422': + $ref: '#/components/responses/ValidationError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + # Get, Update, and Delete a specific Materialized Table + /sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}: + get: + x-lifecycle-stage: Preview + operationId: getSqlv1MaterializedTable + summary: Read a materialized table + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Retrieve a specific Materialized Table by name. + parameters: + - in: path + name: organization_id + required: true + schema: + type: string + format: uuid + description: The unique identifier for the organization + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - in: path + name: kafka_cluster_id + required: true + schema: + type: string + description: The unique identifier for the database. + - name: table_name + in: path + required: true + schema: + type: string + description: The unique identifier for the Materialized Table + tags: + - Materialized Tables (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + responses: + '200': + description: The requested Materialized Table. + content: + application/json: + schema: + $ref: '#/components/schemas/sql.v1.MaterializedTable' + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + put: + x-lifecycle-stage: Preview + operationId: updateSqlv1MaterializedTable + summary: Update/Evolve a materialized table + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Make a request to update a Materialized Table's mutable fields. + Mutable fields include: `query`, `stopped`, `compute_pool_id`, and `principal`. + parameters: + - in: path + name: organization_id + required: true + schema: + type: string + format: uuid + description: The unique identifier for the organization + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - in: path + name: kafka_cluster_id + required: true + schema: + type: string + description: The unique identifier for the database. + - name: table_name + in: path + required: true + schema: + type: string + description: The unique identifier for the Materialized Table + tags: + - Materialized Tables (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + requestBody: + description: The Materialized Table resource with updated spec fields. + required: true + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/sql.v1.MaterializedTable' + - type: object + required: + - spec + - name + - metadata + properties: + metadata: + type: object + required: + - resource_version + responses: + '201': + description: Materialized Table update accepted. + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + content: + application/json: + schema: + $ref: '#/components/schemas/sql.v1.MaterializedTable' + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '409': + $ref: '#/components/responses/ConflictError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + delete: + x-lifecycle-stage: Preview + operationId: deleteSqlv1MaterializedTable + summary: Delete a materialized table + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Delete a specific Materialized Table by name. + parameters: + - in: path + name: organization_id + required: true + schema: + type: string + format: uuid + description: The unique identifier for the organization + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - in: path + name: kafka_cluster_id + required: true + schema: + type: string + description: The unique identifier for the database. + - name: table_name + in: path + required: true + schema: + type: string + description: The unique identifier for the Materialized Table + tags: + - Materialized Tables (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + responses: + '202': + description: A Materialized Table is being deleted. + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + + # Materialized Table Versions API + /sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}/versions: + get: + x-lifecycle-stage: Preview + x-self-access: true + x-request-access-name: SQL API v1 + operationId: listSqlv1MaterializedTableVersions + summary: List all the versions of a materialized table + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Retrieve a sorted and paginated list of all versions for a specific Materialized Table. + parameters: + - in: path + name: organization_id + required: true + schema: + type: string + format: uuid + description: The unique identifier for the organization. + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - in: path + name: kafka_cluster_id + required: true + schema: + type: string + description: The unique identifier for the database. + - in: path + name: table_name + required: true + schema: + type: string + description: The unique identifier for the Materialized Table. + - name: page_size + in: query + required: false + schema: + type: integer + format: int32 + default: 10 + maximum: 100 + description: A pagination size for collection requests. + - name: page_token + in: query + required: false + schema: + type: string + maxLength: 255 + description: An opaque pagination token for collection requests. + tags: + - Materialized Table Versions (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + responses: + '200': + description: A list of Materialized Table Versions. + content: + application/json: + schema: + $ref: '#/components/schemas/sql.v1.MaterializedTableVersionList' + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + + /sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/materialized-tables/{table_name}/versions/{version}: + get: + x-lifecycle-stage: Preview + x-self-access: true + x-request-access-name: SQL API v1 + operationId: getSqlv1MaterializedTableVersion + summary: Read a materialized table version + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Retrieve a specific version of a Materialized Table. + parameters: + - in: path + name: organization_id + required: true + schema: + type: string + format: uuid + description: The unique identifier for the organization. + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - in: path + name: kafka_cluster_id + required: true + schema: + type: string + description: The unique identifier for the database. + - in: path + name: table_name + required: true + schema: + type: string + description: The unique identifier for the Materialized Table. + - in: path + name: version + required: true + schema: + type: integer + format: int32 + minimum: 1 + description: The version number of the Materialized Table. + tags: + - Materialized Table Versions (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + responses: + '200': + description: The requested Materialized Table Version. + content: + application/json: + schema: + $ref: '#/components/schemas/sql.v1.MaterializedTableVersion' + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + # List Agents + /sql/v1/organizations/{organization_id}/environments/{environment_id}/agents: + get: + x-lifecycle-stage: Preview + x-self-access: true + x-request-access-name: SQL API v1 + operationId: listSqlv1Agents + summary: List all agents + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Retrieve a sorted and paginated list of all agents. + parameters: + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + description: The unique identifier for the organization. + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - name: page_size + in: query + required: false + schema: + type: integer + format: int32 + default: 10 + maximum: 100 + description: A pagination size for collection requests. + - name: page_token + in: query + required: false + schema: + type: string + maxLength: 255 + description: An opaque pagination token for collection requests. + tags: + - Agents (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + responses: + '200': + description: A list of Agents. + content: + application/json: + schema: + $ref: '#/components/schemas/sql.v1.AgentList' + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + + # Create an agent + /sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/agents: + post: + x-lifecycle-stage: Preview + operationId: createSqlv1Agent + summary: Create an Agent + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Make a request to create an Agent. + parameters: + - in: path + name: organization_id + required: true + schema: + type: string + format: uuid + description: The unique identifier for the organization + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - in: path + name: kafka_cluster_id + required: true + schema: + type: string + description: The unique identifier for the database. + tags: + - Agents (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + requestBody: + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/sql.v1.Agent' + - type: object + required: + - name + - spec + properties: + spec: + type: object + required: + - model + - prompt + responses: + '200': + description: Agent. + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + Location: + schema: + type: string + format: uri + example: https://flink.region.provider.confluent.cloud/sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/agents/{agent_name} + description: Agent uri + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/sql.v1.Agent' + - type: object + required: + - name + - spec + properties: + spec: + type: object + required: + - model + - prompt + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '409': + $ref: '#/components/responses/ConflictError' + '422': + $ref: '#/components/responses/ValidationError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + # Get, Update, and Delete a specific Agent + /sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{kafka_cluster_id}/agents/{agent_name}: + get: + x-lifecycle-stage: Preview + operationId: getSqlv1Agent + summary: Read an Agent + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Retrieve a specific Agent by name. + parameters: + - in: path + name: organization_id + required: true + schema: + type: string + format: uuid + description: The unique identifier for the organization + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - in: path + name: kafka_cluster_id + required: true + schema: + type: string + description: The unique identifier for the database. + - name: agent_name + in: path + required: true + schema: + type: string + description: The unique identifier for the Agent + tags: + - Agents (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + responses: + '200': + description: The requested Agent. + content: + application/json: + schema: + $ref: '#/components/schemas/sql.v1.Agent' + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + put: + x-lifecycle-stage: Preview + operationId: updateSqlv1Agent + summary: Alter an Agent + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Make a request to update an Agent's mutable fields. + Mutable fields include: `description`, `model`, `prompt`, and `properties`. + parameters: + - in: path + name: organization_id + required: true + schema: + type: string + format: uuid + description: The unique identifier for the organization + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - in: path + name: kafka_cluster_id + required: true + schema: + type: string + description: The unique identifier for the database. + - name: agent_name + in: path + required: true + schema: + type: string + description: The unique identifier for the Agent + tags: + - Agents (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + requestBody: + description: The Agent resource with updated spec fields. + required: true + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/sql.v1.Agent' + - type: object + required: + - spec + - name + - metadata + properties: + metadata: + type: object + required: + - resource_version + responses: + '200': + description: Agent has been updated. + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + content: + application/json: + schema: + $ref: '#/components/schemas/sql.v1.Agent' + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '409': + $ref: '#/components/responses/ConflictError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + delete: + x-lifecycle-stage: Preview + operationId: deleteSqlv1Agent + summary: Delete an Agent + description: | + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + Delete a specific Agent by name. + parameters: + - in: path + name: organization_id + required: true + schema: + type: string + format: uuid + description: The unique identifier for the organization + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - in: path + name: kafka_cluster_id + required: true + schema: + type: string + description: The unique identifier for the database. + - name: agent_name + in: path + required: true + schema: + type: string + description: The unique identifier for the Agent + tags: + - Agents (sql/v1) + security: + - resource-api-key: [] + - external-access-token: [] + responses: + '200': + description: A Agent has been deleted. + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + + + # Tools API + /sql/v1/organizations/{organization_id}/environments/{environment_id}/tools: + x-lifecycle-stage: Preview + x-self-access: true + x-request-access-name: SQL API v1 + post: + x-lifecycle-stage: Preview + x-self-access: false + x-request-access-name: SQL API v1 + operationId: createSqlv1Tool + summary: Create a Tool + description: |- + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) + + Make a request to create a Tool. + parameters: + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + description: The unique identifier for the organization. + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + tags: + - Tools (sql/v1) + security: + - resource-api-key: [] + requestBody: + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/sql.v1.Tool' + - type: object + required: + - name + - spec + properties: + spec: + type: object + required: + - connection + + responses: + '201': + description: A Tool has been successfully created. + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + Location: + schema: + type: string + format: uri + example: https://flink.region.provider.confluent.cloud/sql/v1/organizations/{organization_id}/environments/{environment_id}/tools/{name} + description: Tool resource uri + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/sql.v1.Tool' + - type: object + required: + - name + - spec + properties: + spec: + type: object + required: + - connection + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '409': + $ref: '#/components/responses/ConflictError' + '422': + $ref: '#/components/responses/ValidationError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + + /sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{database_name}/tools: + x-lifecycle-stage: Preview + x-self-access: true + x-request-access-name: SQL API v1 + get: + x-lifecycle-stage: Preview + x-self-access: true + x-request-access-name: SQL API v1 + operationId: listSqlv1Tools + summary: List of Tools + description: |- + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) + + Retrieve a sorted, filtered, paginated list of all Tools. + parameters: + - in: path + name: organization_id + required: true + schema: + type: string + format: uuid + description: The unique identifier for the organization. + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - in: path + name: database_name + required: true + schema: + type: string + description: The name of the database. + - name: page_size + in: query + required: false + schema: + type: integer + default: 10 + maximum: 100 + x-max-page-items: 500 + description: A pagination size for collection requests. + - name: page_token + in: query + required: false + schema: + type: string + maxLength: 255 + description: An opaque pagination token for collection requests. + tags: + - Tools (sql/v1) + security: + - resource-api-key: [] + responses: + '200': + description: Tools. + content: + application/json: + schema: + $ref: '#/components/schemas/sql.v1.ToolList' + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + + /sql/v1/organizations/{organization_id}/environments/{environment_id}/databases/{database_name}/tools/{tool_name}: + x-lifecycle-stage: Preview + x-self-access: true + x-request-access-name: SQL API v1 + get: + x-lifecycle-stage: Preview + x-self-access: true + x-request-access-name: SQL API v1 + operationId: getSqlv1Tool + summary: Read a Tool + description: |- + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) + + Make a request to read a Tool. + parameters: + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + description: The unique identifier for the organization. + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - name: database_name + in: path + required: true + schema: + type: string + description: The name of the database. + - name: tool_name + in: path + required: true + schema: + type: string + description: The user provided name of the Tool. + tags: + - Tools (sql/v1) + security: + - resource-api-key: [] + responses: + '200': + description: Tool. + content: + application/json: + schema: + allOf: + - $ref: '#/components/schemas/sql.v1.Tool' + - type: object + required: + - api_version + - kind + - metadata + - name + - spec + properties: + spec: + type: object + required: + - connection + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + delete: + x-lifecycle-stage: Preview + x-self-access: false + x-request-access-name: SQL API v1 + operationId: deleteSqlv1Tool + summary: Delete a Tool + description: |- + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) + + Make a request to delete a Tool. + parameters: + - in: path + name: organization_id + schema: + type: string + format: uuid + required: true + description: The unique identifier for the organization. + - in: path + name: environment_id + required: true + schema: + type: string + description: The unique identifier for the environment. + - name: database_name + in: path + required: true + schema: + type: string + description: The name of the database. + - name: tool_name + in: path + required: true + schema: + type: string + description: The user provided name of the Tool. + tags: + - Tools (sql/v1) + security: + - resource-api-key: [] + responses: + '200': + description: A Tool has been deleted. + headers: + X-Request-Id: + schema: + type: string + description: The unique identifier for the API request. + '400': + $ref: '#/components/responses/BadRequestError' + '401': + $ref: '#/components/responses/UnauthenticatedError' + '403': + $ref: '#/components/responses/UnauthorizedError' + '404': + $ref: '#/components/responses/NotFoundError' + '429': + $ref: '#/components/responses/RateLimitError' + '500': + $ref: '#/components/responses/DefaultSystemError' + +components: + schemas: + sql.v1.MaterializedTable: + type: object + description: Represents a Materialized Table resource. + required: + - api_version + - kind + - metadata + - name + - organization_id + - environment_id + - spec + properties: + api_version: + type: string + enum: + - sql/v1 + description: APIVersion defines the schema version of this representation of a resource. + example: sql/v1 + readOnly: true + kind: + type: string + description: Kind defines the object this REST resource represents. + enum: + - MaterializedTable + readOnly: true + metadata: + allOf: + - $ref: '#/components/schemas/ObjectMeta' + - type: object + properties: + self: + example: https://flink.us-west1.aws.confluent.cloud/sql/v1/environments/env-123/databases/lkc-123/materialized-tables/high-value-orders + uid: + example: 12345678-1234-1234-1234-123456789012 + resource_version: + example: a23av + resource_name: + example: "" + labels: + type: object + additionalProperties: + type: string + name: + type: string + description: The user-provided name of the resource, unique within this environment. + pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*' + maxLength: 100 + example: "high-value-orders" + x-immutable: true + organization_id: + type: string + format: uuid + description: The unique identifier for the organization. + x-immutable: true + readOnly: true + environment_id: + type: string + description: The unique identifier for the environment. + x-immutable: true + readOnly: true + spec: + $ref: '#/components/schemas/sql.v1.MaterializedTableSpec' + status: + readOnly: true + allOf: + - $ref: '#/components/schemas/sql.v1.MaterializedTableStatus' + + sql.v1.MaterializedTableList: + type: object + description: A list of Materialized Table resources. + required: + - api_version + - kind + - metadata + - data + properties: + api_version: + type: string + enum: + - sql/v1 + readOnly: true + kind: + type: string + enum: + - MaterializedTableList + readOnly: true + metadata: + $ref: '#/components/schemas/ListMeta' + data: + type: array + description: A data property that contains an array of resource items. Each entry in the array is a separate resource. + items: + $ref: '#/components/schemas/sql.v1.MaterializedTable' + uniqueItems: true + + sql.v1.MaterializedTableSpec: + type: object + description: The specifications of the Materialized Table. + properties: + kafka_cluster_id: + type: string + description: The ID of Kafka cluster hosting the Materialized Table's topic. Populated from the `kafka_cluster_id` path parameter on creation. + example: "lkc-12345" + readOnly: true # Populated from path + compute_pool_id: + type: string + description: |- + The id associated with the compute pool in context. + If not specified, the materialized table will use the default compute pool. The default pool is automatically determined by the system. + example: "lfcp-123" + principal: + type: string + description: The id of a principal this Materialized Table query runs as. + example: "sa-abc123" + maxLength: 255 + stopped: + type: boolean + description: Indicates whether the Materialized Table query should be stopped. + example: false + table_options: + type: object + description: Defines configuration properties for the table, equivalent to the SQL 'WITH' clause + additionalProperties: + type: string + maxProperties: 8192 + session_options: + type: object + description: Session configurations equivalent to the SQL 'SET' statement. + additionalProperties: + type: string + maxProperties: 8192 + columns: + type: array + description: Details of each column in Materialized Table resource. If columns are not specified, we infer from query. If it's specified it must be compatible with the types in the query. + items: + $ref: '#/components/schemas/sql.v1.MaterializedTableColumnDetails' + watermark: + $ref: '#/components/schemas/sql.v1.MaterializedTableWatermark' + constraints: + type: array + description: Specify table constraints. + items: + $ref: '#/components/schemas/sql.v1.MaterializedTableConstraint' + distributed_by: + $ref: '#/components/schemas/sql.v1.MaterializedTableDistribution' + query: + type: string + description: Contains the query section (usually starting with a SELECT) of the latest Materialized Table. + example: "SELECT user_id, product_id, price, quantity FROM orders WHERE price > 1000;" + maxLength: 131072 + + sql.v1.MaterializedTableStatus: + type: object + description: The status of the Materialized Table. + properties: + phase: + type: string + x-extensible-enum: [PENDING, RUNNING, COMPLETED, DELETING, FAILING, FAILED, CREATING, ALTERING, DEGRADED, STOPPING, STOPPED] + description: The lifecycle phase of the materialized table. + example: RUNNING + detail: + type: string + description: Optional. Human-readable description of phase. + example: "Materialized table is running." + warnings: + type: array + description: List of warnings encountered during materialized table execution. + items: + $ref: '#/components/schemas/sql.v1.MaterializedTableWarning' + creation_statement: + type: string + description: Entire Materialized Table statement as submitted by user e.g CREATE OR ALTER MATERIALIZED TABLE ... + example: "CREATE OR ALTER MATERIALIZED TABLE high-value-orders AS SELECT user_id, product_id, price, quantity FROM orders WHERE price > 1000;" + scaling_status: + $ref: '#/components/schemas/sql.v1.ScalingStatus' + version: + type: integer + format: int32 + minimum: 1 + description: Represents the evolution history of the Materialized Table. The current value indicates the latest version. + example: 3 + + sql.v1.MaterializedTableVersion: + type: object + description: Represents a specific version of a Materialized Table resource. + required: + - api_version + - kind + - metadata + - name + - organization_id + - environment_id + - spec + properties: + api_version: + type: string + enum: + - sql/v1 + description: APIVersion defines the schema version of this representation of a resource. + example: sql/v1 + readOnly: true + kind: + type: string + description: Kind defines the object this REST resource represents. + enum: + - MaterializedTableVersion + readOnly: true + metadata: + allOf: + - $ref: '#/components/schemas/ObjectMeta' + - type: object + properties: + self: + example: https://flink.us-west1.aws.confluent.cloud/sql/v1/organizations/org-123/environments/env-123/databases/lkc-123/materialized-tables/high-value-orders/versions/4 + name: + type: string + description: | + The resource version name, unique within the Kafka cluster. + Name conforms to DNS Subdomain (RFC 1123). + pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*' + maxLength: 100 + example: "mt-123-v4" + readOnly: true + organization_id: + type: string + format: uuid + description: The unique identifier for the organization. + x-immutable: true + readOnly: true + environment_id: + type: string + description: The unique identifier for the environment. + x-immutable: true + readOnly: true + spec: + $ref: '#/components/schemas/sql.v1.MaterializedTableVersionSpec' + + sql.v1.MaterializedTableVersionList: + type: object + description: A list of Materialized Table Version resources. + required: + - api_version + - kind + - metadata + - data + properties: + api_version: + type: string + enum: + - sql/v1 + readOnly: true + kind: + type: string + enum: + - MaterializedTableVersionList + readOnly: true + metadata: + $ref: '#/components/schemas/ListMeta' + data: + type: array + description: A data property that contains an array of resource items. Each entry in the array is a separate resource. + items: + $ref: '#/components/schemas/sql.v1.MaterializedTableVersion' + uniqueItems: true + + sql.v1.MaterializedTableVersionSpec: + type: object + description: The specifications of the Materialized Table Version. + required: + - version + - statement + properties: + version: + type: integer + format: int32 + minimum: 1 + description: The version number of the Materialized Table. + example: 4 + readOnly: true + statement: + type: string + description: | + The full SQL statement for the materialized table as generated by SHOW CREATE MATERIALIZED TABLE at the time of the evolution. + example: "CREATE OR ALTER MATERIALIZED TABLE orders AS SELECT user_id, product_id, price FROM orders;" + readOnly: true + maxLength: 131072 + changes: + type: array + description: Changes affecting resources since the previous version. + items: + $ref: '#/components/schemas/sql.v1.ResourceChange' + readOnly: true + + sql.v1.ResourceChange: + type: object + description: Details of a change to a specific resource. + required: + - kind + - environment_locator + - database_locator + - name + - details + properties: + kind: + type: string + x-extensible-enum: [MATERIALIZED_TABLE, TABLE, VIEW, FUNCTION] + description: The type of resource that was changed. + example: MATERIALIZED_TABLE + environment_locator: + type: string + description: The environment containing the resource. Can be either the environment name or ID, depending on how it is referenced in the SQL statement text. + example: "env-abc" + database_locator: + type: string + description: The database containing the resource. Can be either the database name or ID, depending on how it is referenced in the SQL statement text. + example: "lkc-123" + name: + type: string + description: The name of the resource, unique within its scope (environment and database). + example: "orders" + details: + type: array + description: Human-readable descriptions of the changes made to this resource. + items: + type: string + example: ["Column 'product_name: VARCHAR' added", "Column 'product_id: BIGINT' added"] + readOnly: true + + sql.v1.MaterializedTableColumnDetails: + type: object + description: Details of a column in the Materialized Table. + discriminator: + propertyName: kind + mapping: + Physical: '#/components/schemas/sql.v1.PhysicalColumn' + Metadata: '#/components/schemas/sql.v1.MetadataColumn' + Computed: '#/components/schemas/sql.v1.ComputedColumn' + oneOf: + - $ref: '#/components/schemas/sql.v1.PhysicalColumn' + - $ref: '#/components/schemas/sql.v1.MetadataColumn' + - $ref: '#/components/schemas/sql.v1.ComputedColumn' + + sql.v1.ColumnCommon: + type: object + required: + - name + - type + properties: + name: + type: string + description: The name of the column. + type: + $ref: '#/components/schemas/DataType' + comment: + type: string + description: A comment or description for the column. + + sql.v1.PhysicalColumn: + description: Physical columns define the structure of the table and the data types of its fields. + allOf: + - $ref: '#/components/schemas/sql.v1.ColumnCommon' + - type: object + required: + - kind + properties: + name: + example: user_id + type: + example: + type: "BIGINT" + nullable: false + kind: + type: string + description: The kind of column. + enum: [Physical] + example: Physical + + sql.v1.MetadataColumn: + description: Metadata columns reference system properties. + allOf: + - $ref: '#/components/schemas/sql.v1.ColumnCommon' + - type: object + required: + - kind + - metadata_key + properties: + name: + example: table_offset + type: + example: + type: "BIGINT" + nullable: false + kind: + type: string + description: The kind of column. + enum: [Metadata] + example: Metadata + metadata_key: + type: string + description: The system metadata key to reference. + example: "offset" + virtual: + type: boolean + description: Indicates if the metadata column is virtual. + default: false + example: true + + sql.v1.ComputedColumn: + description: Computed columns are generated via an expression. + allOf: + - $ref: '#/components/schemas/sql.v1.ColumnCommon' + - type: object + required: + - kind + - expression + properties: + name: + example: total_price + type: + example: + type: "DECIMAL" + nullable: false + precision: 10 + scale: 2 + kind: + type: string + description: The kind of column. + enum: [Computed] + example: Computed + expression: + type: string + description: The SQL expression used to compute the column value. + example: "quantity * price" + virtual: + type: boolean + description: Indicates if the computed column is virtual. + default: false + example: true + + sql.v1.MaterializedTableWatermark: + type: object + description: Watermark strategy for the Materialized Table resource. + properties: + column_name: + type: string + example: "event_timestamp" + expression: + type: string + example: "event_timestamp - INTERVAL '5' SECOND" + + sql.v1.MaterializedTableConstraint: + type: object + description: A constraint on the materialized table. + properties: + name: + type: string + example: "pk_orders" + kind: + type: string + x-extensible-enum: [PRIMARY_KEY] + description: The type of constraint. + example: PRIMARY_KEY + column_names: + type: array + items: + type: string + example: ["user_id", "product_id"] + enforced: + type: boolean + description: Whether the constraint is enforced. + default: false + + sql.v1.MaterializedTableDistribution: + type: object + description: Distribution (bucket by) strategy. + properties: + column_names: + type: array + items: + type: string + example: ["user_id"] + buckets: + type: integer + format: int32 + minimum: 1 + default: 6 + description: The number of buckets. + example: 12 + sql.v1.MaterializedTableWarning: + type: object + description: Represents a non-fatal issue encountered during materialized table processing. + allOf: + - $ref: '#/components/schemas/sql.v1.StatementWarning' + + sql.v1.Connection: + type: object + description: |- + `Connection` models a reusable endpoint and auth token to authenticate the caller to + use that endpoint. + Only `OrganizationAdmins` and `EnvironmentAdmins` will have the permissions to create, update and delete `Connections`. + `FlinkDevelopers` and `ModelResourceOwners` can later reference a `Connection` resource within their Model + creation statements. + The API allows you to list, create, read, and delete your connections. + ## The Connections Model + + properties: + api_version: + type: string + enum: + - sql/v1 + description: APIVersion defines the schema version of this representation of a resource. + example: sql/v1 + readOnly: true + kind: + type: string + description: Kind defines the object this REST resource represents. + enum: + - Connection + readOnly: true + metadata: + allOf: + - $ref: '#/components/schemas/ObjectMeta' + - properties: + self: + example: https://flink.us-west1.aws.confluent.cloud/sql/v1/organizations/org-abc/environments/env-123/connections/my-openai-connection + uid: + example: 12345678-1234-1234-1234-123456789012 + resource_version: + example: a23av + resource_name: + example: "" + name: + type: string + example: my-openai-connection + description: The user provided name of the resource, unique within this environment. + pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*' + x-immutable: true + maxLength: 100 + spec: + $ref: '#/components/schemas/sql.v1.ConnectionSpec' + status: + $ref: '#/components/schemas/sql.v1.ConnectionStatus' + + sql.v1.ConnectionList: + type: object + description: |- + `Connection` models a reusable endpoint and auth token to authenticate the caller to + use that endpoint. + Only `OrgAdmins` and `EnvAdmins` will have the permissions to create, update and delete `Connections`. + `FlinkDevelopers` and `ModelResourceOwners` can later reference a `Connection` resource within their Model + creation statements. + The API allows you to list, create, read, and delete your connections. + ## The Connection Model + + required: + - api_version + - kind + - metadata + - data + properties: + api_version: + type: string + enum: + - sql/v1 + description: APIVersion defines the schema version of this representation of a resource. + example: sql/v1 + kind: + type: string + description: Kind defines the object this REST resource represents. + enum: + - ConnectionList + metadata: + allOf: + - $ref: '#/components/schemas/ListMeta' + - properties: + self: + example: https://flink.us-west1.aws.confluent.cloud/sql/v1/environments/env-123/connections + first: + example: https://flink.us-west1.aws.confluent.cloud/sql/v1/environments/env-abc123/connections + last: + example: "" + prev: + example: "" + next: + example: https://flink.us-west1.aws.confluent.cloud/sql/v1/environments/env-abc123/connections?page_token=UvmDWOB1iwfAIBPj6EYb + data: + type: array + description: A data property that contains an array of resource items. Each entry in the array is a separate resource. + items: + allOf: + - $ref: '#/components/schemas/sql.v1.Connection' + - type: object + required: + - api_version + - kind + - metadata + - spec + - status + - name + - organization_id + - environment_id + properties: + spec: + type: object + required: + - connection_type + - endpoint + uniqueItems: true + + sql.v1.ConnectionStatus: + type: object + required: + - phase + description: The status of the Connection + properties: + phase: + type: string + x-extensible-enum: [ACTIVE, UNREACHABLE, INVALID_AUTH] + description: | + Describes the status of the connection: + + READY: The Connection is usable; + + UNREACHABLE: The Connection endpoint is unreachable; + + INVALID_AUTH: The Connection auth token is invalid; + example: READY + readOnly: true + detail: + type: string + description: Details about why connection transitioned into a given status. + example: 'Lookup failed: ai.openai.com' + readOnly: true + readOnly: true + + sql.v1.PlaintextProvider: + type: object + description: | + Describes a sensitive piece of information passed in plaintext. + + Confluent only accepts authentication tokens of supported model providers from OrgAdmins and EnvAdmins. + For now, only 'PlainText' provider is supported. It stores authentication token details as opaque bytes in an encrypted form. + This option offers limited security as it only provides a single level of encryption. + properties: + kind: + description: | + Plaintext Provider Kind Type + type: string + enum: [PlaintextProvider] + x-immutable: true + data: + description: | + Authentication token in plaintext JSON string. + For composite tokens, provide them as JSON. + This is sensitive piece of information stored as opaque bytes in an encrypted form with single level of encryption. + + Scoped to an endpoint of a `Connection` resource. + type: string + format: byte + + sql.v1.ConnectionSpec: + type: object + description: Encapsulates the model provider access details + properties: + connection_type: + type: string + example: OPENAI + description: The type of this connection. + x-immutable: true + x-extensible-enum: [AZUREML, AZUREOPENAI, A2A, ANTHROPIC, BEDROCK, CONFLUENT_JDBC, COSMOSDB, COUCHBASE, ELASTIC, + FIREWORKSAI, GOOGLEAI, MCP_SERVER, MONGODB, OPENAI, PINECONE, REST, S3VECTORS, SAGEMAKER, VERTEXAI] + endpoint: + type: string + example: 'https://api.openai.com/v1/chat/completions' + description: The endpoint that is used to run model inferencing. + maxLength: 16384 + x-immutable: true + auth_data: + type: object + description: | + The vendor specific authentication token details + + The contents are stored as opaque bytes given in plaintext by an EnvAdmin. + In future, we would support more secure methods for distributing authentication tokens. + discriminator: + propertyName: kind + mapping: + PlaintextProvider: '#/components/schemas/sql.v1.PlaintextProvider' + oneOf: + - $ref: '#/components/schemas/sql.v1.PlaintextProvider' + x-immutable: false + x-enable-listmeta: true + x-enable-objectmeta: true + + + sql.v1.Agent: + type: object + description: Represents an Agent resource. + required: + - api_version + - kind + - metadata + - name + - organization_id + - environment_id + - spec + properties: + api_version: + type: string + enum: + - sql/v1 + description: APIVersion defines the schema version of this representation of a resource. + example: sql/v1 + readOnly: true + kind: + type: string + description: Kind defines the object this REST resource represents. + enum: + - Agent + readOnly: true + metadata: + allOf: + - $ref: '#/components/schemas/ObjectMeta' + - type: object + properties: + self: + example: https://flink.us-west1.aws.confluent.cloud/sql/v1/environments/env-123/databases/lkc-123/agents/chat-listener-agent + uid: + example: 12345678-1234-1234-1234-123456789012 + resource_version: + example: a23av + resource_name: + example: "" + labels: + type: object + additionalProperties: + type: string + name: + type: string + description: The user-provided name of the agent, unique within this environment. + pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*' + maxLength: 100 + example: "chat-listener-agent" + x-immutable: true + organization_id: + type: string + format: uuid + description: The unique identifier for the organization. + x-immutable: true + readOnly: true + environment_id: + type: string + description: The unique identifier for the environment. + x-immutable: true + readOnly: true + spec: + $ref: '#/components/schemas/sql.v1.AgentSpec' + status: + readOnly: true + allOf: + - $ref: '#/components/schemas/sql.v1.AgentStatus' + + sql.v1.AgentList: + type: object + description: A list of Agent resources. + required: + - api_version + - kind + - metadata + - data properties: api_version: type: string enum: - sql/v1 - description: APIVersion defines the schema version of this representation of a resource. - example: sql/v1 readOnly: true kind: type: string - description: Kind defines the object this REST resource represents. enum: - - Connection + - AgentList readOnly: true metadata: - allOf: - - $ref: '#/components/schemas/ObjectMeta' - - properties: - self: - example: https://flink.us-west1.aws.confluent.cloud/sql/v1/organizations/org-abc/environments/env-123/connections/my-openai-connection - uid: - example: 12345678-1234-1234-1234-123456789012 - resource_version: - example: a23av - resource_name: - example: "" - name: + $ref: '#/components/schemas/ListMeta' + data: + type: array + description: A data property that contains an array of resource items. Each entry in the array is a separate resource. + items: + $ref: '#/components/schemas/sql.v1.Agent' + uniqueItems: true + + sql.v1.AgentSpec: + type: object + description: The specifications of the Agent. + properties: + description: type: string - example: my-openai-connection - description: The user provided name of the resource, unique within this environment. - pattern: '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*' - x-immutable: true - maxLength: 100 - spec: - $ref: '#/components/schemas/sql.v1.ConnectionSpec' - status: - $ref: '#/components/schemas/sql.v1.ConnectionStatus' + example: 'An agent that listens to chat messages and creates issues' + description: The description of the agent. + model: + type: string + example: chat_listener + description: The name of the model the agent uses for inferencing. + prompt: + type: string + example: Create an issue from the content using bebb0fa3-e084-412d-a000-b02280558318 + as the team ID + description: The instruction prompt that guides the agent's behavior. + maxLength: 65536 + tools: + type: array + description: The list of tools available to the agent. + items: + type: string + example: + - linear-mcp-tool + properties: + type: object + description: A set of key-value option pairs that configure the agent's + behavior. + additionalProperties: + type: string + example: + max_iterations: '5' - sql.v1.ConnectionList: + sql.v1.AgentStatus: + type: object + description: The status of the Agent. + properties: + phase: + type: string + x-extensible-enum: [READY, RUNNING] + description: | + Describes the status of the agent: + + READY: The Agent is created; + + RUNNING: The Agent is created and running in a query; + example: RUNNING + + sql.v1.ToolList: type: object description: |- - `Connection` models a reusable endpoint and auth token to authenticate the caller to - use that endpoint. - Only `OrgAdmins` and `EnvAdmins` will have the permissions to create, update and delete `Connections`. - `FlinkDevelopers` and `ModelResourceOwners` can later reference a `Connection` resource within their Model - creation statements. - The API allows you to list, create, read, and delete your connections. - ## The Connection Model - + `Tool` models a reusable tool resource backed by a connection that can be referenced + by agents to perform actions. + The API allows you to create your tools. + ## The Tool Model + required: - api_version - kind @@ -1073,129 +3092,135 @@ components: type: string description: Kind defines the object this REST resource represents. enum: - - ConnectionList + - ToolList metadata: allOf: - $ref: '#/components/schemas/ListMeta' - properties: self: - example: https://flink.us-west1.aws.confluent.cloud/sql/v1/environments/env-123/connections + example: https://flink.us-west1.aws.confluent.cloud/sql/v1/organizations/org-abc/environments/env-123/databases/my-database/tools first: - example: https://flink.us-west1.aws.confluent.cloud/sql/v1/environments/env-abc123/connections + example: https://flink.us-west1.aws.confluent.cloud/sql/v1/organizations/org-abc/environments/env-123/databases/my-database/tools last: example: "" prev: example: "" next: - example: https://flink.us-west1.aws.confluent.cloud/sql/v1/environments/env-abc123/connections?page_token=UvmDWOB1iwfAIBPj6EYb + example: https://flink.us-west1.aws.confluent.cloud/sql/v1/organizations/org-abc/environments/env-123/databases/my-database/tools?page_token=UvmDWOB1iwfAIBPj6EYb data: type: array description: A data property that contains an array of resource items. Each entry in the array is a separate resource. items: allOf: - - $ref: '#/components/schemas/sql.v1.Connection' + - $ref: '#/components/schemas/sql.v1.Tool' - type: object required: - api_version - kind - metadata + - name - spec - status - - name - organization_id - environment_id properties: spec: type: object required: - - connection_type - - endpoint + - connection uniqueItems: true - sql.v1.ConnectionStatus: + sql.v1.Tool: type: object - required: - - phase - description: The status of the Connection + description: |- + `Tool` models a reusable tool resource backed by a connection that can be referenced + by agents to perform actions. + The API allows you to create your tools. + ## The Tools Model + properties: - phase: + api_version: type: string - x-extensible-enum: [ACTIVE, UNREACHABLE, INVALID_AUTH] - description: | - Describes the status of the connection: - - READY: The Connection is usable; - - UNREACHABLE: The Connection endpoint is unreachable; - - INVALID_AUTH: The Connection auth token is invalid; - example: READY + enum: + - sql/v1 + description: APIVersion defines the schema version of this representation of a resource. + example: sql/v1 readOnly: true - detail: + kind: type: string - description: Details about why connection transitioned into a given status. - example: 'Lookup failed: ai.openai.com' + description: Kind defines the object this REST resource represents. + enum: + - Tool readOnly: true - readOnly: true - - sql.v1.PlaintextProvider: - type: object - description: | - Describes a sensitive piece of information passed in plaintext. - - Confluent only accepts authentication tokens of supported model providers from OrgAdmins and EnvAdmins. - For now, only 'PlainText' provider is supported. It stores authentication token details as opaque bytes in an encrypted form. - This option offers limited security as it only provides a single level of encryption. - properties: - kind: - description: | - Plaintext Provider Kind Type + metadata: + allOf: + - $ref: '#/components/schemas/ObjectMeta' + - properties: + self: + example: https://flink.us-west1.aws.confluent.cloud/sql/v1/organizations/org-abc/environments/env-123/tools/linear-mcp-tool + uid: + example: 12345678-1234-1234-1234-123456789012 + resource_version: + example: a23av + resource_name: + example: "" + name: type: string - enum: [PlaintextProvider] + example: linear-mcp-tool + description: The user provided name of the tool, unique within this environment. + pattern: '[a-z0-9_]([-a-z0-9_]*[a-z0-9_])?' x-immutable: true - data: - description: | - Authentication token in plaintext JSON string. - For composite tokens, provide them as JSON. - This is sensitive piece of information stored as opaque bytes in an encrypted form with single level of encryption. + maxLength: 100 + spec: + $ref: '#/components/schemas/sql.v1.ToolSpec' + status: + $ref: '#/components/schemas/sql.v1.ToolStatus' - Scoped to an endpoint of a `Connection` resource. + sql.v1.ToolSpec: + type: object + description: The spec of the Tool + properties: + connection: type: string - format: byte + example: linear-mcp-connection-streamable + description: The name of the connection this tool uses. + options: + type: object + description: A set of key-value option pairs that configure the tool's behavior. + additionalProperties: + type: string + example: + type: 'mcp' + allowed_tools: 'create_issue, list_issues' + request_timeout: '30' + x-enable-listmeta: true + x-enable-objectmeta: true - sql.v1.ConnectionSpec: + sql.v1.ToolStatus: type: object - description: Encapsulates the model provider access details + required: + - phase + description: The status of the Tool properties: - connection_type: - type: string - example: OPENAI - description: The type of this connection. - x-immutable: true - x-extensible-enum: [OPENAI, AZUREML, AZUREOPENAI, BEDROCK, SAGEMAKER, GOOGLEAI, VERTEXAI, MONGODB, PINECONE, - ELASTIC] - endpoint: + phase: type: string - example: 'https://api.openai.com/v1/chat/completions' - description: The endpoint that is used to run model inferencing. - maxLength: 16384 - x-immutable: true - auth_data: - type: object + x-extensible-enum: [ACTIVE, INACTIVE, ERROR] description: | - The vendor specific authentication token details + Describes the status of the tool: - The contents are stored as opaque bytes given in plaintext by an EnvAdmin. - In future, we would support more secure methods for distributing authentication tokens. - discriminator: - propertyName: kind - mapping: - PlaintextProvider: '#/components/schemas/sql.v1.PlaintextProvider' - oneOf: - - $ref: '#/components/schemas/sql.v1.PlaintextProvider' - x-immutable: false - x-enable-listmeta: true - x-enable-objectmeta: true + ACTIVE: The Tool is usable; + + INACTIVE: The Tool is not currently active; + + ERROR: The Tool encountered an error; + example: ACTIVE + readOnly: true + detail: + type: string + description: Details about why the tool transitioned into a given status. + example: 'Tool is ready' + readOnly: true + readOnly: true sql.v1.Statement: type: object @@ -1235,7 +3260,7 @@ components: labels: type: object additionalProperties: - type: string + type: string name: type: string example: sql123 @@ -1288,11 +3313,19 @@ components: readOnly: true scaling_status: $ref: '#/components/schemas/sql.v1.ScalingStatus' + state_limit_status: + $ref: '#/components/schemas/sql.v1.StateLimitStatus' detail: type: string description: Details about the execution status of this statement. example: Statement is running successfully readOnly: true + warnings: + type: array + description: List of warnings encountered during statement execution. + items: + $ref: '#/components/schemas/sql.v1.StatementWarning' + readOnly: true traits: $ref: '#/components/schemas/sql.v1.StatementTraits' network_kind: @@ -1320,10 +3353,61 @@ components: latest_offsets_timestamp: type: string format: date-time - example: '2023-03-31T00:00:00-00:00' + example: '2025-11-10T16:20:00Z' description: The date and time at which the Kafka topic offsets were added to the statement status. It is represented in RFC3339 format and is in UTC. readOnly: true + end_time: + type: string + format: date-time + example: '2025-03-19T01:02:03-04:05' + description: | + The date and time in UTC (represented as RFC3339 format) at which the statement reached its final terminal state. + This field is set when the Phase is COMPLETED, FAILED, or STOPPED. + + Note - The attribute is in a [Early Access lifecycle](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy) + duration: + type: string + format: duration + example: 'PT2H30M' + description: | + The total elapsed time (represented as ISO 8601 format) from when the statement transitioned from + PENDING to RUNNING until it reached a final terminal state. This field is calculated and set when + the Phase is COMPLETED, FAILED, or STOPPED. + + Note - The attribute is in a [Early Access lifecycle](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy) + affected_resource: + type: object + description: | + A reference to the resource created by this statement, if any. This field is set when a statement + (e.g., CREATE MATERIALIZED TABLE) results in a new user-facing resource. + + Note - The attribute is in a [Early Access lifecycle](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy) + required: + - kind + - environment_id + - resource_name + properties: + kind: + type: string + x-extensible-enum: [MATERIALIZED_TABLE] + description: The kind of resource that was created. + example: MATERIALIZED_TABLE + environment_id: + type: string + description: The unique identifier for the environment containing the + resource. + example: env-abc + database_id: + type: string + description: | + The unique identifier for the database containing the resource. + Only present for resource kinds that are scoped to a database. + example: lkc-123 + resource_name: + type: string + description: The name of the created resource, unique within its scope. + example: my-materialized-table readOnly: true MultipleSearchFilter: description: Filter a collection by a string search for one or more values @@ -1357,6 +3441,12 @@ components: type: integer schema: $ref: '#/components/schemas/sql.v1.ResultSchema' + connection_refs: + type: array + description: The names of connections that the SQL statement references (e.g., in FROM clauses). + items: + type: string + example: ["my-postgres-connection", "my-kafka-connection"] readOnly: true sql.v1.StatementList: @@ -1420,7 +3510,6 @@ components: type: object required: - statement - - compute_pool_id uniqueItems: true sql.v1.StatementResult: @@ -1500,11 +3589,13 @@ components: description: A map (key-value pairs) of statement properties. additionalProperties: type: string - maximum: 8192 + maxProperties: 8192 compute_pool_id: type: string example: fcp-00000 - description: The id associated with the compute pool in context. + description: |- + The id associated with the compute pool in context. + If not specified, the statement will use the default compute pool. The default pool is automatically determined by the system. maxLength: 255 principal: type: string @@ -1512,18 +3603,19 @@ components: description: The id of a principal this statement runs as. maxLength: 255 x-immutable: true - authorized_principals: - type: array - example: [sa-abc123, sa-abc456] - description: The list of ids of the principals granting permissions to run this statement. - items: - type: string - maxLength: 255 - x-immutable: true stopped: type: boolean description: Indicates whether the statement should be stopped. example: false + execution_mode: + type: string + example: streaming + description: | + The execution mode of the statement. + + Note - The attribute is in a [Early Access lifecycle](https://docs.confluent.io/cloud/current/api.html#section/Versioning/API-Lifecycle-Policy) + maxLength: 255 + readOnly: true x-enable-listmeta: true x-enable-objectmeta: true @@ -1546,7 +3638,7 @@ components: updated_at: type: string format: date-time - example: '2023-03-31T00:00:00-00:00' + example: '2025-11-10T16:20:00Z' description: The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. uid: @@ -1577,7 +3669,7 @@ components: updated_at: type: string format: date-time - example: '2023-03-31T00:00:00-00:00' + example: '2025-11-10T16:20:00Z' description: The date and time at which this object was last updated. It is represented in RFC3339 format and is in UTC. uid: @@ -1660,6 +3752,43 @@ components: type: string readOnly: true + sql.v1.StateLimitStatus: + description: State limit status for this statement. + properties: + state_limit_state: + description: | + OK: The statement is within state limits. + + APPROACHING_SOFT_LIMIT: The statement is approaching soft state limits. + + EXCEEDING_SOFT_LIMIT: The statement is exceeding soft state limits. + + APPROACHING_HARD_LIMIT: The statement is approaching hard state limits. + + EXCEEDING_HARD_LIMIT: The statement is exceeding hard state limits. + example: OK + readOnly: true + type: string + x-extensible-enum: + - OK + - APPROACHING_SOFT_LIMIT + - EXCEEDING_SOFT_LIMIT + - APPROACHING_HARD_LIMIT + - EXCEEDING_HARD_LIMIT + last_updated: + description: The last time the state limit status was updated. + example: 1996-03-19T01:02:03-04:05 + format: date-time + readOnly: true + type: string + detail: + description: Details about why state limit status is in its current state. + example: The statement is within state limits. + type: string + readOnly: true + readOnly: true + type: object + sql.v1.ResultSchema: type: object description: "The table columns of the results schema." @@ -1735,6 +3864,9 @@ components: type: integer format: int32 description: "The fractional precision of the data type (if applicable)." + class_name: + type: string + description: "The class name of the structured data type (if applicable)." required: - type - nullable @@ -1801,6 +3933,47 @@ components: parameter: description: A string indicating which query parameter caused the error. type: string + sql.v1.StatementWarning: + type: object + description: Represents a non-fatal issue encountered during statement processing. + required: + - severity + - created_at + - reason + - message + properties: + severity: + $ref: '#/components/schemas/sql.v1.WarningSeverity' + created_at: + type: string + format: date-time + description: The timestamp when the warning was created. It is represented in RFC3339 format and is in UTC. + example: '2025-11-10T16:20:00Z' + readOnly: true + reason: + type: string + description: A machine-readable short, upper case summary delimited by underscore. + example: MISSING_WINDOW_START_END + message: + type: string + description: A human-readable string containing the description of the warning. + example: The statement is missing window start and end bounds which may lead to unbounded state growth. + + sql.v1.WarningSeverity: + type: string + x-extensible-enum: + - LOW + - MODERATE + - CRITICAL + description: | + Indicates the severity of the warning. + + LOW: Indicates a low severity warning and for informing the user. + + MODERATE: Indicates a moderate severity warning and may require user action. Could cause degraded statements if certain conditions apply. + + CRITICAL: Indicates a critical severity warning and requires user action. It will cause degraded statements eventually. + example: MODERATE # Exceptions API Components @@ -1817,8 +3990,8 @@ components: sql.v1.StatementExceptionList: type: object description: |- - StatementExceptionList is a list of exceptions coming from FAILED or FAILING Statements created by - the SQL Statements API. + StatementExceptionList is a list of exceptions coming from FAILED or FAILING Statements created by + the SQL Statements API. required: - api_version - kind @@ -1867,7 +4040,7 @@ components: timestamp: type: string format: date-time - example: '2023-03-31T00:00:00-00:00' + example: '2025-11-10T16:20:00Z' description: The date and time at which the exception occurred. It is represented in RFC3339 format and is in UTC. readOnly: true @@ -1946,6 +4119,13 @@ components: description: | Authenticate with resource-specific API Keys using HTTP Basic Auth. Treat the resource-specific API Key ID as the username and resource-specific API Key Secret as the password. + external-access-token: + type: oauth2 + description: Authenticate with OAuth 2.0. + flows: + clientCredentials: + tokenUrl: https:///token + scopes: {} responses: BadRequestError: description: Bad Request @@ -2152,3 +4332,37 @@ tags: The API allows you to list, create, read, and delete your connections. ## The Connections Model + - name: Agents (sql/v1) + description: |- + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) + + `Agent` models an AI agent that uses a specified model, prompt, and set of tools + to autonomously perform tasks. + The API allows you to create your agents. + ## The Agents Model + + - name: Tools (sql/v1) + description: |- + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300afba)](#section/Versioning/API-Lifecycle-Policy) + + `Tool` models a reusable tool resource backed by a connection that can be referenced + by agents to perform actions. + The API allows you to create your tools. + ## The Tools Model + + - name: Materialized Tables (sql/v1) + description: |- + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + `MaterializedTable` represents a core resource used to define and manage streaming SQL queries that persist results. + The API allows you to list, create, read, update, and delete your materialized tables. + ## The Materialized Table Model + + - name: Materialized Table Versions (sql/v1) + description: |- + [![Preview](https://img.shields.io/badge/Lifecycle%20Stage-Preview-%2300af91)](#section/Versioning/API-Lifecycle-Policy) + + `MaterializedTableVersion` represents a specific version of a Materialized Table, capturing the state and changes at that point in time. + The API allows you to list and read versions of your materialized tables. + ## The Materialized Table Version Model + \ No newline at end of file diff --git a/tests/unit/testResources/flinkStatement.ts b/tests/unit/testResources/flinkStatement.ts index 7d54e1d8a7..ae763e8293 100644 --- a/tests/unit/testResources/flinkStatement.ts +++ b/tests/unit/testResources/flinkStatement.ts @@ -61,7 +61,6 @@ export function createFlinkStatement(overrides: CreateFlinkStatementArgs = {}): compute_pool_id: overrides.computePoolId || TEST_CCLOUD_FLINK_COMPUTE_POOL_ID, statement: overrides.sqlStatement || "SELECT * FROM test_table", principal: "test-principal", - authorized_principals: [], properties: { "sql.current-catalog": TEST_CCLOUD_ENVIRONMENT.name, "sql.current-database": TEST_CCLOUD_KAFKA_CLUSTER.name,