editor.ts 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. export type IEditorSQLRound = {
  2. db_name: string;
  3. round: number;
  4. round_name: string;
  5. };
  6. export type GetEditorSQLRoundRequest = IEditorSQLRound[];
  7. export type PostEditorSQLRunParams = {
  8. db_name: string;
  9. sql: string;
  10. };
  11. export type PostEditorChartRunParams = {
  12. db_name: string;
  13. sql?: string;
  14. chart_type?: string;
  15. };
  16. export type PostEditorChartRunResponse = {
  17. sql_data: {
  18. result_info: string;
  19. run_cost: string;
  20. colunms: string[];
  21. values: Record<string, any>[];
  22. };
  23. chart_values: Record<string, any>[];
  24. chart_type: string;
  25. };
  26. export type PostSQLEditorSubmitParams = {
  27. conv_uid: string;
  28. db_name: string;
  29. conv_round?: string | number | null;
  30. old_sql?: string;
  31. old_speak?: string;
  32. new_sql?: string;
  33. new_speak?: string;
  34. };
  35. export type PostEditorSqlParams = {
  36. con_uid: string;
  37. round: string | number;
  38. };
  39. // eslint-disable-next-line @typescript-eslint/no-empty-object-type
  40. export type PostEditorSqlRequest = {};
  41. export type GetEditorySqlParams = { con_uid: string; round: string | number };