import z from "zod"; import { ServiceClient } from "../../service-client"; import { CreateColumnSchema, CreateDatabaseSchema, CreateDataSourceSchema, CreateTableSchema, GetColumnSchema, GetDatabaseSchema, GetDataSourceSchema, GetTableSchema, ListColumnsSchema, ListDatabasesSchema, ListDataSourcesSchema, ListTablesSchema } from "./schema"; import { TColumn, TDatabase, TDataSource, TTable } from "./types"; export class DataSourceService extends ServiceClient { protected getServiceName(): string { return 'com.appconda.service.datasource'; } public async CreateDataSource(payload: z.infer): Promise { return await this.actionCall('CreateDataSource', payload); } public async GetDataSource(payload: z.infer): Promise { return await this.actionCall('GetDataSource', payload); } public async ListDataSources(payload: z.infer): Promise { return await this.actionCall('ListDataSources', payload); } public async CreateDatabase(payload: z.infer): Promise { return await this.actionCall('database', 'CreateDatabase', payload); } public async GetDatabase(payload: z.infer): Promise { return await this.actionCall('database', 'GetDatabase', payload); } public async ListDatabases(payload: z.infer): Promise { return await this.actionCall('database', 'ListDatabases', payload); } public async CreateTable(payload: z.infer): Promise { return await this.actionCall('table', 'CreateTable', payload); } public async GetTable(payload: z.infer): Promise { return await this.actionCall('table', 'GetTable', payload); } public async ListTables(payload: z.infer): Promise { return await this.actionCall('table', 'ListTables', payload); } public async CreateColumn(payload: z.infer): Promise { return await this.actionCall('column', 'CreateColumn', payload); } public async GetColumn(payload: z.infer): Promise { return await this.actionCall('column', 'GetColumn', payload); } public async ListColumns(payload: z.infer): Promise { return await this.actionCall('column', 'ListColumns', payload); } }