@onvo-ai/js
Version:
The javascript SDK for Onvo AI dashboard builder
1,269 lines (1,265 loc) • 91.2 kB
text/typescript
import * as openapi3_ts_oas30_js from 'openapi3-ts/oas30.js';
import { ZodTypeDef, ZodRawShape, ZodTypeAny, z } from 'zod';
import { OAuth2Client, OAuth2Fetch } from '@badgateway/oauth2-client';
import { SupabaseClient } from '@supabase/supabase-js';
declare module 'zod' {
interface ZodType<Output, Def extends ZodTypeDef = ZodTypeDef, Input = Output> {
openapi(options: any): this;
}
interface ZodObject<T extends ZodRawShape> {
openapi(options: any): this;
}
interface ZodArray<T extends ZodTypeAny> {
openapi(options: any): this;
}
interface ZodOptional<T extends ZodTypeAny> {
openapi(options: any): this;
}
interface ZodNullable<T extends ZodTypeAny> {
openapi(options: any): this;
}
interface ZodEnum<T extends [string, ...string[]]> {
openapi(options: any): this;
}
}
type Json = string | number | boolean | null | {
[key: string]: Json | undefined;
} | Json[];
type Database = {
public: {
Tables: {
accounts: {
Row: {
avatar_url: string | null;
email: string | null;
full_name: string | null;
id: string;
phone_number: string | null;
updated_at: string | null;
};
Insert: {
avatar_url?: string | null;
email?: string | null;
full_name?: string | null;
id: string;
phone_number?: string | null;
updated_at?: string | null;
};
Update: {
avatar_url?: string | null;
email?: string | null;
full_name?: string | null;
id?: string;
phone_number?: string | null;
updated_at?: string | null;
};
Relationships: [];
};
api_keys: {
Row: {
created_at: string | null;
hash: string;
id: string;
last_used_at: string | null;
prefix: string;
scopes: string[];
suffix: string;
team: string;
title: string;
};
Insert: {
created_at?: string | null;
hash: string;
id?: string;
last_used_at?: string | null;
prefix: string;
scopes?: string[];
suffix: string;
team: string;
title: string;
};
Update: {
created_at?: string | null;
hash?: string;
id?: string;
last_used_at?: string | null;
prefix?: string;
scopes?: string[];
suffix?: string;
team?: string;
title?: string;
};
Relationships: [
{
foreignKeyName: "public_api_keys_team_fkey";
columns: ["team"];
isOneToOne: false;
referencedRelation: "teams";
referencedColumns: ["id"];
}
];
};
automation_runs: {
Row: {
automation: string;
conditions_passed: boolean | null;
error: string | null;
id: string;
method: string;
recipient_emails: string[] | null;
run_at: string;
status: string;
team: string;
webhook_sent: boolean | null;
};
Insert: {
automation: string;
conditions_passed?: boolean | null;
error?: string | null;
id?: string;
method?: string;
recipient_emails?: string[] | null;
run_at?: string;
status: string;
team: string;
webhook_sent?: boolean | null;
};
Update: {
automation?: string;
conditions_passed?: boolean | null;
error?: string | null;
id?: string;
method?: string;
recipient_emails?: string[] | null;
run_at?: string;
status?: string;
team?: string;
webhook_sent?: boolean | null;
};
Relationships: [
{
foreignKeyName: "automation_runs_automation_fkey";
columns: ["automation"];
isOneToOne: false;
referencedRelation: "automations";
referencedColumns: ["id"];
},
{
foreignKeyName: "public_automation_runs_team_fkey";
columns: ["team"];
isOneToOne: false;
referencedRelation: "teams";
referencedColumns: ["id"];
}
];
};
automations: {
Row: {
condition_operator: string | null;
conditions: Json;
created_at: string;
dashboard: string;
description: string | null;
email_body: string;
email_cc: string[] | null;
email_subject: string;
email_to: string | null;
enabled: boolean;
id: string;
last_run_at: string | null;
last_updated_at: string;
method: string;
next_run_at: string | null;
output_format: string;
schedule: string;
team: string;
timezone: string;
title: string;
webhook_url: string | null;
};
Insert: {
condition_operator?: string | null;
conditions?: Json;
created_at?: string;
dashboard: string;
description?: string | null;
email_body: string;
email_cc?: string[] | null;
email_subject: string;
email_to?: string | null;
enabled?: boolean;
id?: string;
last_run_at?: string | null;
last_updated_at?: string;
method: string;
next_run_at?: string | null;
output_format: string;
schedule: string;
team: string;
timezone?: string;
title: string;
webhook_url?: string | null;
};
Update: {
condition_operator?: string | null;
conditions?: Json;
created_at?: string;
dashboard?: string;
description?: string | null;
email_body?: string;
email_cc?: string[] | null;
email_subject?: string;
email_to?: string | null;
enabled?: boolean;
id?: string;
last_run_at?: string | null;
last_updated_at?: string;
method?: string;
next_run_at?: string | null;
output_format?: string;
schedule?: string;
team?: string;
timezone?: string;
title?: string;
webhook_url?: string | null;
};
Relationships: [
{
foreignKeyName: "automations_dashboard_fkey";
columns: ["dashboard"];
isOneToOne: false;
referencedRelation: "dashboards";
referencedColumns: ["id"];
},
{
foreignKeyName: "public_automations_team_fkey";
columns: ["team"];
isOneToOne: false;
referencedRelation: "teams";
referencedColumns: ["id"];
}
];
};
dashboard_datasources: {
Row: {
dashboard: string;
datasource: string;
team: string;
};
Insert: {
dashboard: string;
datasource: string;
team: string;
};
Update: {
dashboard?: string;
datasource?: string;
team?: string;
};
Relationships: [
{
foreignKeyName: "dashboard_datasources_dashboard_fkey";
columns: ["dashboard"];
isOneToOne: false;
referencedRelation: "dashboards";
referencedColumns: ["id"];
},
{
foreignKeyName: "dashboard_datasources_datasource_fkey";
columns: ["datasource"];
isOneToOne: false;
referencedRelation: "datasources";
referencedColumns: ["id"];
},
{
foreignKeyName: "public_dashboard_datasources_team_fkey";
columns: ["team"];
isOneToOne: false;
referencedRelation: "teams";
referencedColumns: ["id"];
}
];
};
dashboards: {
Row: {
created_at: string;
created_by: string | null;
description: string | null;
filters: Json;
id: string;
last_updated_at: string;
last_updated_by: string | null;
metadata: Json;
parent_dashboard: string | null;
settings: Json;
tabs: Json;
team: string;
thumbnail: string | null;
title: string;
};
Insert: {
created_at?: string;
created_by?: string | null;
description?: string | null;
filters?: Json;
id?: string;
last_updated_at?: string;
last_updated_by?: string | null;
metadata?: Json;
parent_dashboard?: string | null;
settings?: Json;
tabs?: Json;
team: string;
thumbnail?: string | null;
title: string;
};
Update: {
created_at?: string;
created_by?: string | null;
description?: string | null;
filters?: Json;
id?: string;
last_updated_at?: string;
last_updated_by?: string | null;
metadata?: Json;
parent_dashboard?: string | null;
settings?: Json;
tabs?: Json;
team?: string;
thumbnail?: string | null;
title?: string;
};
Relationships: [
{
foreignKeyName: "dashboards_created_by_fkey";
columns: ["created_by"];
isOneToOne: false;
referencedRelation: "accounts";
referencedColumns: ["id"];
},
{
foreignKeyName: "dashboards_last_updated_by_fkey";
columns: ["last_updated_by"];
isOneToOne: false;
referencedRelation: "accounts";
referencedColumns: ["id"];
},
{
foreignKeyName: "dashboards_parent_dashboard_fkey";
columns: ["parent_dashboard"];
isOneToOne: false;
referencedRelation: "dashboards";
referencedColumns: ["id"];
},
{
foreignKeyName: "public_dashboards_team_fkey";
columns: ["team"];
isOneToOne: false;
referencedRelation: "teams";
referencedColumns: ["id"];
}
];
};
datasources: {
Row: {
cache_duration: number;
columns: Json | null;
config: Json | null;
created_at: string;
created_by: string | null;
description: string | null;
filters: Json;
id: string;
integration: string | null;
last_updated_at: string;
last_updated_by: string | null;
metadata: Json;
parameters: Json | null;
size: number;
source: string;
team: string;
title: string;
};
Insert: {
cache_duration?: number;
columns?: Json | null;
config?: Json | null;
created_at?: string;
created_by?: string | null;
description?: string | null;
filters?: Json;
id?: string;
integration?: string | null;
last_updated_at?: string;
last_updated_by?: string | null;
metadata?: Json;
parameters?: Json | null;
size?: number;
source: string;
team: string;
title: string;
};
Update: {
cache_duration?: number;
columns?: Json | null;
config?: Json | null;
created_at?: string;
created_by?: string | null;
description?: string | null;
filters?: Json;
id?: string;
integration?: string | null;
last_updated_at?: string;
last_updated_by?: string | null;
metadata?: Json;
parameters?: Json | null;
size?: number;
source?: string;
team?: string;
title?: string;
};
Relationships: [
{
foreignKeyName: "datasources_created_by_fkey";
columns: ["created_by"];
isOneToOne: false;
referencedRelation: "accounts";
referencedColumns: ["id"];
},
{
foreignKeyName: "datasources_integration_fkey";
columns: ["integration"];
isOneToOne: false;
referencedRelation: "integrations";
referencedColumns: ["id"];
},
{
foreignKeyName: "datasources_last_updated_by_fkey";
columns: ["last_updated_by"];
isOneToOne: false;
referencedRelation: "accounts";
referencedColumns: ["id"];
},
{
foreignKeyName: "public_datasources_team_fkey";
columns: ["team"];
isOneToOne: false;
referencedRelation: "teams";
referencedColumns: ["id"];
}
];
};
embed_users: {
Row: {
created_at: string;
email: string | null;
id: string;
last_updated_at: string;
name: string;
parameters: Json | null;
team: string;
};
Insert: {
created_at?: string;
email?: string | null;
id: string;
last_updated_at?: string;
name: string;
parameters?: Json | null;
team: string;
};
Update: {
created_at?: string;
email?: string | null;
id?: string;
last_updated_at?: string;
name?: string;
parameters?: Json | null;
team?: string;
};
Relationships: [
{
foreignKeyName: "public_embed_users_team_fkey";
columns: ["team"];
isOneToOne: false;
referencedRelation: "teams";
referencedColumns: ["id"];
}
];
};
integration_tables: {
Row: {
description: string | null;
fields: Json | null;
id: string;
integration: string;
team: string;
title: string;
};
Insert: {
description?: string | null;
fields?: Json | null;
id: string;
integration?: string;
team: string;
title: string;
};
Update: {
description?: string | null;
fields?: Json | null;
id?: string;
integration?: string;
team?: string;
title?: string;
};
Relationships: [
{
foreignKeyName: "integration_tables_integration_fkey";
columns: ["integration"];
isOneToOne: false;
referencedRelation: "integrations";
referencedColumns: ["id"];
},
{
foreignKeyName: "integration_tables_team_fkey";
columns: ["team"];
isOneToOne: false;
referencedRelation: "teams";
referencedColumns: ["id"];
}
];
};
integrations: {
Row: {
config: Json;
created_at: string;
id: string;
provider: string;
status: string;
team: string;
title: string | null;
usage: number;
};
Insert: {
config?: Json;
created_at?: string;
id?: string;
provider: string;
status?: string;
team: string;
title?: string | null;
usage?: number;
};
Update: {
config?: Json;
created_at?: string;
id?: string;
provider?: string;
status?: string;
team?: string;
title?: string | null;
usage?: number;
};
Relationships: [
{
foreignKeyName: "public_integrations_team_fkey";
columns: ["team"];
isOneToOne: false;
referencedRelation: "teams";
referencedColumns: ["id"];
}
];
};
invites: {
Row: {
created_at: string;
email: string;
name: string;
team: string;
};
Insert: {
created_at?: string;
email: string;
name: string;
team: string;
};
Update: {
created_at?: string;
email?: string;
name?: string;
team?: string;
};
Relationships: [
{
foreignKeyName: "public_invites_team_fkey";
columns: ["team"];
isOneToOne: false;
referencedRelation: "teams";
referencedColumns: ["id"];
}
];
};
llm_settings: {
Row: {
analyst_agent_model: string;
analyst_agent_prompt: string | null;
analyst_agent_type: Database["public"]["Enums"]["LLM hosting type"];
custom_api_key: string | null;
custom_api_url: string | null;
programmer_agent_model: string;
programmer_agent_prompt: string | null;
programmer_agent_type: Database["public"]["Enums"]["LLM hosting type"];
team: string;
updated: boolean;
};
Insert: {
analyst_agent_model?: string;
analyst_agent_prompt?: string | null;
analyst_agent_type?: Database["public"]["Enums"]["LLM hosting type"];
custom_api_key?: string | null;
custom_api_url?: string | null;
programmer_agent_model?: string;
programmer_agent_prompt?: string | null;
programmer_agent_type?: Database["public"]["Enums"]["LLM hosting type"];
team: string;
updated?: boolean;
};
Update: {
analyst_agent_model?: string;
analyst_agent_prompt?: string | null;
analyst_agent_type?: Database["public"]["Enums"]["LLM hosting type"];
custom_api_key?: string | null;
custom_api_url?: string | null;
programmer_agent_model?: string;
programmer_agent_prompt?: string | null;
programmer_agent_type?: Database["public"]["Enums"]["LLM hosting type"];
team?: string;
updated?: boolean;
};
Relationships: [
{
foreignKeyName: "public_llm_settings_team_fkey";
columns: ["team"];
isOneToOne: true;
referencedRelation: "teams";
referencedColumns: ["id"];
}
];
};
logs: {
Row: {
account: string | null;
created_at: string;
dashboard: string | null;
embed_user: string | null;
id: string;
team: string | null;
type: string;
widget: string | null;
};
Insert: {
account?: string | null;
created_at?: string;
dashboard?: string | null;
embed_user?: string | null;
id?: string;
team?: string | null;
type: string;
widget?: string | null;
};
Update: {
account?: string | null;
created_at?: string;
dashboard?: string | null;
embed_user?: string | null;
id?: string;
team?: string | null;
type?: string;
widget?: string | null;
};
Relationships: [
{
foreignKeyName: "public_logs_account_fkey";
columns: ["account"];
isOneToOne: false;
referencedRelation: "accounts";
referencedColumns: ["id"];
},
{
foreignKeyName: "public_logs_dashboard_fkey";
columns: ["dashboard"];
isOneToOne: false;
referencedRelation: "dashboards";
referencedColumns: ["id"];
},
{
foreignKeyName: "public_logs_embed_user_team_fkey";
columns: ["embed_user", "team"];
isOneToOne: false;
referencedRelation: "embed_users";
referencedColumns: ["id", "team"];
},
{
foreignKeyName: "public_logs_team_fkey";
columns: ["team"];
isOneToOne: false;
referencedRelation: "teams";
referencedColumns: ["id"];
},
{
foreignKeyName: "public_logs_widget_fkey";
columns: ["widget"];
isOneToOne: false;
referencedRelation: "widgets";
referencedColumns: ["id"];
}
];
};
members: {
Row: {
account: string;
team: string;
};
Insert: {
account: string;
team: string;
};
Update: {
account?: string;
team?: string;
};
Relationships: [
{
foreignKeyName: "members_user_fkey";
columns: ["account"];
isOneToOne: false;
referencedRelation: "accounts";
referencedColumns: ["id"];
},
{
foreignKeyName: "public_members_team_fkey";
columns: ["team"];
isOneToOne: false;
referencedRelation: "teams";
referencedColumns: ["id"];
}
];
};
messages: {
Row: {
content: string | null;
created_at: string;
dashboard: string | null;
id: string;
question: string;
role: string | null;
team: string;
tool_call_id: string | null;
tool_calls: Json | null;
widget: string | null;
};
Insert: {
content?: string | null;
created_at?: string;
dashboard?: string | null;
id?: string;
question?: string;
role?: string | null;
team: string;
tool_call_id?: string | null;
tool_calls?: Json | null;
widget?: string | null;
};
Update: {
content?: string | null;
created_at?: string;
dashboard?: string | null;
id?: string;
question?: string;
role?: string | null;
team?: string;
tool_call_id?: string | null;
tool_calls?: Json | null;
widget?: string | null;
};
Relationships: [
{
foreignKeyName: "messages_dashboard_fkey";
columns: ["dashboard"];
isOneToOne: false;
referencedRelation: "dashboards";
referencedColumns: ["id"];
},
{
foreignKeyName: "messages_question_fkey";
columns: ["question"];
isOneToOne: false;
referencedRelation: "questions";
referencedColumns: ["id"];
},
{
foreignKeyName: "messages_team_fkey";
columns: ["team"];
isOneToOne: false;
referencedRelation: "teams";
referencedColumns: ["id"];
},
{
foreignKeyName: "messages_widget_fkey";
columns: ["widget"];
isOneToOne: false;
referencedRelation: "widgets";
referencedColumns: ["id"];
}
];
};
questions: {
Row: {
created_at: string;
dashboard: string;
id: string;
messages: Json;
query: string;
team: string | null;
};
Insert: {
created_at?: string;
dashboard: string;
id?: string;
messages?: Json;
query: string;
team?: string | null;
};
Update: {
created_at?: string;
dashboard?: string;
id?: string;
messages?: Json;
query?: string;
team?: string | null;
};
Relationships: [
{
foreignKeyName: "public_questions_team_fkey";
columns: ["team"];
isOneToOne: false;
referencedRelation: "teams";
referencedColumns: ["id"];
},
{
foreignKeyName: "questions_dashboard_fkey";
columns: ["dashboard"];
isOneToOne: false;
referencedRelation: "dashboards";
referencedColumns: ["id"];
}
];
};
sessions: {
Row: {
created_at: string;
dashboard: string;
embed_user: string;
parameters: Json;
team: string;
};
Insert: {
created_at?: string;
dashboard: string;
embed_user: string;
parameters?: Json;
team: string;
};
Update: {
created_at?: string;
dashboard?: string;
embed_user?: string;
parameters?: Json;
team?: string;
};
Relationships: [
{
foreignKeyName: "public_sessions_embed_user_team_fkey";
columns: ["embed_user", "team"];
isOneToOne: false;
referencedRelation: "embed_users";
referencedColumns: ["id", "team"];
},
{
foreignKeyName: "public_sessions_team_fkey";
columns: ["team"];
isOneToOne: false;
referencedRelation: "teams";
referencedColumns: ["id"];
},
{
foreignKeyName: "sessions_dashboard_fkey";
columns: ["dashboard"];
isOneToOne: false;
referencedRelation: "dashboards";
referencedColumns: ["id"];
}
];
};
subscription_plans: {
Row: {
accounts: number | null;
automations: boolean;
connected_datasources: number;
copilot: boolean;
custom_llm: boolean;
embed_users: number;
name: string;
premium_integrations: number;
};
Insert: {
accounts?: number | null;
automations?: boolean;
connected_datasources?: number;
copilot?: boolean;
custom_llm?: boolean;
embed_users?: number;
name: string;
premium_integrations?: number;
};
Update: {
accounts?: number | null;
automations?: boolean;
connected_datasources?: number;
copilot?: boolean;
custom_llm?: boolean;
embed_users?: number;
name?: string;
premium_integrations?: number;
};
Relationships: [];
};
subscriptions: {
Row: {
amount: number;
created_at: string;
currency: string;
integrations: string[];
interval: string;
period_end: string;
period_start: string;
product_name: string;
stripe_customer_id: string;
stripe_product_id: string;
stripe_subscription_id: string;
team: string;
};
Insert: {
amount: number;
created_at?: string;
currency: string;
integrations?: string[];
interval: string;
period_end: string;
period_start?: string;
product_name: string;
stripe_customer_id: string;
stripe_product_id: string;
stripe_subscription_id: string;
team: string;
};
Update: {
amount?: number;
created_at?: string;
currency?: string;
integrations?: string[];
interval?: string;
period_end?: string;
period_start?: string;
product_name?: string;
stripe_customer_id?: string;
stripe_product_id?: string;
stripe_subscription_id?: string;
team?: string;
};
Relationships: [
{
foreignKeyName: "public_subscriptions_team_fkey";
columns: ["team"];
isOneToOne: true;
referencedRelation: "teams";
referencedColumns: ["id"];
},
{
foreignKeyName: "subscriptions_product_name_fkey";
columns: ["product_name"];
isOneToOne: false;
referencedRelation: "subscription_plans";
referencedColumns: ["name"];
}
];
};
teams: {
Row: {
created_at: string | null;
email: string | null;
id: string;
logo: string | null;
name: string | null;
phone_number: string | null;
stripe_id: string | null;
};
Insert: {
created_at?: string | null;
email?: string | null;
id?: string;
logo?: string | null;
name?: string | null;
phone_number?: string | null;
stripe_id?: string | null;
};
Update: {
created_at?: string | null;
email?: string | null;
id?: string;
logo?: string | null;
name?: string | null;
phone_number?: string | null;
stripe_id?: string | null;
};
Relationships: [];
};
widgets: {
Row: {
code: string;
config: Json;
created_at: string;
dashboard: string;
engine: string;
error: string | null;
id: string;
layouts: Json;
messages: Json;
settings: Json;
tab: number;
team: string;
title: string;
type: string;
use_in_chat: boolean;
use_in_library: boolean | null;
};
Insert: {
code: string;
config?: Json;
created_at?: string;
dashboard: string;
engine?: string;
error?: string | null;
id?: string;
layouts?: Json;
messages?: Json;
settings?: Json;
tab?: number;
team: string;
title: string;
type?: string;
use_in_chat?: boolean;
use_in_library?: boolean | null;
};
Update: {
code?: string;
config?: Json;
created_at?: string;
dashboard?: string;
engine?: string;
error?: string | null;
id?: string;
layouts?: Json;
messages?: Json;
settings?: Json;
tab?: number;
team?: string;
title?: string;
type?: string;
use_in_chat?: boolean;
use_in_library?: boolean | null;
};
Relationships: [
{
foreignKeyName: "public_widgets_team_fkey";
columns: ["team"];
isOneToOne: false;
referencedRelation: "teams";
referencedColumns: ["id"];
},
{
foreignKeyName: "widgets_dashboard_fkey";
columns: ["dashboard"];
isOneToOne: false;
referencedRelation: "dashboards";
referencedColumns: ["id"];
}
];
};
};
Views: {
[_ in never]: never;
};
Functions: {
check_id_in_dashboards: {
Args: {
id: string;
json_data: Json;
};
Returns: boolean;
};
get_onboarding: {
Args: {
team_id: string;
};
Returns: Json;
};
string_to_uuid_array: {
Args: {
input_string: string;
};
Returns: string[];
};
stripe_can_create_automation: {
Args: {
organisation: string;
};
Returns: boolean;
};
stripe_can_create_dashboard_datasource: {
Args: {
organisation: string;
dashboard_id: string;
};
Returns: boolean;
};
stripe_can_create_embed_user: {
Args: {
organisation: string;
};
Returns: boolean;
};
stripe_can_create_invite: {
Args: {
organisation: string;
};
Returns: boolean;
};
stripe_can_create_llm_settings: {
Args: {
organisation: string;
};
Returns: boolean;
};
stripe_can_read_dashboard: {
Args: {
organisation: string;
};
Returns: boolean;
};
};
Enums: {
"LLM hosting type": "default" | "custom";
};
CompositeTypes: {
[_ in never]: never;
};
};
};
type DatabaseWithoutInternals = Omit<Database, "__InternalSupabase">;
type DefaultSchema = DatabaseWithoutInternals[Extract<keyof Database, "public">];
type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) | {
schema: keyof DatabaseWithoutInternals;
}, TableName extends DefaultSchemaTableNameOrOptions extends {
schema: keyof DatabaseWithoutInternals;
} ? keyof (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
schema: keyof DatabaseWithoutInternals;
} ? (DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
Row: infer R;
} ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) ? (DefaultSchema["Tables"] & DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
Row: infer R;
} ? R : never : never;
type TablesInsert<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
schema: keyof DatabaseWithoutInternals;
}, TableName extends DefaultSchemaTableNameOrOptions extends {
schema: keyof DatabaseWithoutInternals;
} ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
schema: keyof DatabaseWithoutInternals;
} ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
Insert: infer I;
} ? I : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
Insert: infer I;
} ? I : never : never;
type TablesUpdate<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
schema: keyof DatabaseWithoutInternals;
}, TableName extends DefaultSchemaTableNameOrOptions extends {
schema: keyof DatabaseWithoutInternals;
} ? keyof DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
schema: keyof DatabaseWithoutInternals;
} ? DatabaseWithoutInternals[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
Update: infer U;
} ? U : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
Update: infer U;
} ? U : never : never;
type Enums<DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] | {
schema: keyof DatabaseWithoutInternals;
}, EnumName extends DefaultSchemaEnumNameOrOptions extends {
schema: keyof DatabaseWithoutInternals;
} ? keyof DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"] : never = never> = DefaultSchemaEnumNameOrOptions extends {
schema: keyof DatabaseWithoutInternals;
} ? DatabaseWithoutInternals[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName] : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions] : never;
type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] | {
schema: keyof DatabaseWithoutInternals;
}, CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
schema: keyof DatabaseWithoutInternals;
} ? keyof DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] : never = never> = PublicCompositeTypeNameOrOptions extends {
schema: keyof DatabaseWithoutInternals;
} ? DatabaseWithoutInternals[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] : never;
declare const Constants: {
readonly public: {
readonly Enums: {
readonly "LLM hosting type": readonly ["default", "custom"];
};
};
};
type AnyObject = Record<string, any>;
type DeepPartialAny<T> = {
[P in keyof T]?: T[P] extends AnyObject ? DeepPartialAny<T[P]> : any;
};
type Modify<A, B extends DeepPartialAny<A>> = {
[K in keyof (A & B)]: K extends keyof B ? K extends keyof A ? A[K] extends AnyObject ? B[K] extends AnyObject ? Modify<A[K], B[K] & DeepPartialAny<A[K]>> : B[K] : B[K] : B[K] : K extends keyof A ? A[K] : never;
};
interface Metadata {
label: string;
value: string;
secure?: boolean;
}
declare const MetadataItemZod: any;
declare enum Table {
Countries = "countries",
Invites = "invites",
ItineraryInvites = "itinerary_invites",
Itineraries = "itineraries",
Members = "members",
Teams = "teams",
Travelers = "travelers",
Accounts = "accounts",
DataSources = "datasources",
EmbedUsers = "embed_users",
APIKeys = "api_keys",
Widgets = "widgets",
Dashboards = "dashboards",
DashboardDatasources = "dashboard_datasources",
Sessions = "sessions",
Questions = "questions",
Integrations = "integrations",
IntegrationTables = "integration_tables",
DecryptedIntegrations = "decrypted_integrations",
DecryptedSessions = "decrypted_sessions",
DecryptedWidgets = "decrypted_widgets",
DecryptedDatasources = "decrypted_datasources",
Subscriptions = "subscriptions",
SubscriptionPlans = "subscription_plans",
Automations = "automations",
AutomationRuns = "automation_runs",
Logs =