./generate-ts-types.sh

This commit is contained in:
James Ketr 2025-09-15 12:29:21 -07:00
parent dc2e8e7e94
commit fb5942f9c6
2 changed files with 15 additions and 35 deletions

View File

@ -182,10 +182,7 @@ export class ApiClient {
}
async createRegisterBotProvider(data: any): Promise<any> {
return this.request<any>(this.getApiPath(`/ai-voicebot/api/bots/providers/register`), {
method: "POST",
body: data,
});
return this.request<any>(this.getApiPath(`/ai-voicebot/api/bots/providers/register`), { method: "POST", body: data });
}
async getListBotProviders(): Promise<any> {
@ -201,9 +198,7 @@ export class ApiClient {
}
async createRequestBotLeaveLobby(bot_instance_id: string): Promise<any> {
return this.request<any>(this.getApiPath(`/ai-voicebot/api/bots/instances/${bot_instance_id}/leave`), {
method: "POST",
});
return this.request<any>(this.getApiPath(`/ai-voicebot/api/bots/instances/${bot_instance_id}/leave`), { method: "POST" });
}
async getBotInstance(bot_instance_id: string): Promise<any> {
@ -223,23 +218,15 @@ export class ApiClient {
}
async getLobbyBotConfig(lobby_id: string, bot_instance_id: string): Promise<any> {
return this.request<any>(this.getApiPath(`/ai-voicebot/api/bots/config/lobby/${lobby_id}/bot/${bot_instance_id}`), {
method: "GET",
});
return this.request<any>(this.getApiPath(`/ai-voicebot/api/bots/config/lobby/${lobby_id}/bot/${bot_instance_id}`), { method: "GET" });
}
async deleteBotConfig(lobby_id: string, bot_instance_id: string): Promise<any> {
return this.request<any>(this.getApiPath(`/ai-voicebot/api/bots/config/lobby/${lobby_id}/bot/${bot_instance_id}`), {
method: "DELETE",
});
return this.request<any>(this.getApiPath(`/ai-voicebot/api/bots/config/lobby/${lobby_id}/bot/${bot_instance_id}`), { method: "DELETE" });
}
async createUpdateBotConfig(data: any, params?: Record<string, string>): Promise<any> {
return this.request<any>(this.getApiPath(`/ai-voicebot/api/bots/config/update`), {
method: "POST",
body: data,
params,
});
return this.request<any>(this.getApiPath(`/ai-voicebot/api/bots/config/update`), { method: "POST", body: data, params });
}
async getConfigStatistics(): Promise<any> {
@ -251,15 +238,11 @@ export class ApiClient {
}
async createRefreshBotSchema(bot_name: string): Promise<any> {
return this.request<any>(this.getApiPath(`/ai-voicebot/api/bots/config/schema/${bot_name}/refresh`), {
method: "POST",
});
return this.request<any>(this.getApiPath(`/ai-voicebot/api/bots/config/schema/${bot_name}/refresh`), { method: "POST" });
}
async deleteClearBotSchemaCache(bot_name: string): Promise<any> {
return this.request<any>(this.getApiPath(`/ai-voicebot/api/bots/config/schema/${bot_name}/cache`), {
method: "DELETE",
});
return this.request<any>(this.getApiPath(`/ai-voicebot/api/bots/config/schema/${bot_name}/cache`), { method: "DELETE" });
}
async getReadinessProbe(): Promise<any> {
@ -346,7 +329,7 @@ export const botsApi = {
getConfigStatistics: () => apiClient.getConfigStatistics(),
refreshAllSchemas: () => apiClient.createRefreshBotSchemas(),
refreshSchema: (bot_name: string) => apiClient.createRefreshBotSchema(bot_name),
clearSchemaCache: (bot_name: string) => apiClient.deleteClearBotSchemaCache(bot_name),
clearSchemaCache: (bot_name: string) => apiClient.deleteClearBotSchemaCache(bot_name)
};
export const metricsApi = {

View File

@ -402,11 +402,9 @@ export interface components {
*/
required?: boolean;
/** Options */
options?:
| {
options?: {
[key: string]: string;
}[]
| null;
}[] | null;
/** Min Value */
min_value?: number | null;
/** Max Value */
@ -433,11 +431,9 @@ export interface components {
/** Parameters */
parameters: components["schemas"]["BotConfigParameter"][];
/** Categories */
categories?:
| {
categories?: {
[key: string]: string[];
}[]
| null;
}[] | null;
};
/**
* BotConfigUpdateRequest
@ -797,6 +793,7 @@ export type $defs = Record<string, never>;
export type external = Record<string, never>;
export interface operations {
/**
* System Health
* @description System health check showing manager status and enhanced monitoring