mirror of
https://github.com/lucasrcsantana/story-generator.git
synced 2025-12-16 13:27:52 +00:00
- Adiciona suporte para Português (Brasil), Inglês (EUA) e Espanhol (Espanha) - Implementa nova etapa de seleção de idioma no fluxo de criação - Adiciona instruções específicas por idioma no prompt da IA - Atualiza CHANGELOG.md para versão 1.3.0
2698 lines
77 KiB
TypeScript
2698 lines
77 KiB
TypeScript
export type Json =
|
|
| string
|
|
| number
|
|
| boolean
|
|
| null
|
|
| { [key: string]: Json | undefined }
|
|
| Json[]
|
|
|
|
export type Database = {
|
|
auth: {
|
|
Tables: {
|
|
audit_log_entries: {
|
|
Row: {
|
|
created_at: string | null
|
|
id: string
|
|
instance_id: string | null
|
|
ip_address: string
|
|
payload: Json | null
|
|
}
|
|
Insert: {
|
|
created_at?: string | null
|
|
id: string
|
|
instance_id?: string | null
|
|
ip_address?: string
|
|
payload?: Json | null
|
|
}
|
|
Update: {
|
|
created_at?: string | null
|
|
id?: string
|
|
instance_id?: string | null
|
|
ip_address?: string
|
|
payload?: Json | null
|
|
}
|
|
Relationships: []
|
|
}
|
|
flow_state: {
|
|
Row: {
|
|
auth_code: string
|
|
auth_code_issued_at: string | null
|
|
authentication_method: string
|
|
code_challenge: string
|
|
code_challenge_method: Database["auth"]["Enums"]["code_challenge_method"]
|
|
created_at: string | null
|
|
id: string
|
|
provider_access_token: string | null
|
|
provider_refresh_token: string | null
|
|
provider_type: string
|
|
updated_at: string | null
|
|
user_id: string | null
|
|
}
|
|
Insert: {
|
|
auth_code: string
|
|
auth_code_issued_at?: string | null
|
|
authentication_method: string
|
|
code_challenge: string
|
|
code_challenge_method: Database["auth"]["Enums"]["code_challenge_method"]
|
|
created_at?: string | null
|
|
id: string
|
|
provider_access_token?: string | null
|
|
provider_refresh_token?: string | null
|
|
provider_type: string
|
|
updated_at?: string | null
|
|
user_id?: string | null
|
|
}
|
|
Update: {
|
|
auth_code?: string
|
|
auth_code_issued_at?: string | null
|
|
authentication_method?: string
|
|
code_challenge?: string
|
|
code_challenge_method?: Database["auth"]["Enums"]["code_challenge_method"]
|
|
created_at?: string | null
|
|
id?: string
|
|
provider_access_token?: string | null
|
|
provider_refresh_token?: string | null
|
|
provider_type?: string
|
|
updated_at?: string | null
|
|
user_id?: string | null
|
|
}
|
|
Relationships: []
|
|
}
|
|
identities: {
|
|
Row: {
|
|
created_at: string | null
|
|
email: string | null
|
|
id: string
|
|
identity_data: Json
|
|
last_sign_in_at: string | null
|
|
provider: string
|
|
provider_id: string
|
|
updated_at: string | null
|
|
user_id: string
|
|
}
|
|
Insert: {
|
|
created_at?: string | null
|
|
email?: string | null
|
|
id?: string
|
|
identity_data: Json
|
|
last_sign_in_at?: string | null
|
|
provider: string
|
|
provider_id: string
|
|
updated_at?: string | null
|
|
user_id: string
|
|
}
|
|
Update: {
|
|
created_at?: string | null
|
|
email?: string | null
|
|
id?: string
|
|
identity_data?: Json
|
|
last_sign_in_at?: string | null
|
|
provider?: string
|
|
provider_id?: string
|
|
updated_at?: string | null
|
|
user_id?: string
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "identities_user_id_fkey"
|
|
columns: ["user_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "users"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
instances: {
|
|
Row: {
|
|
created_at: string | null
|
|
id: string
|
|
raw_base_config: string | null
|
|
updated_at: string | null
|
|
uuid: string | null
|
|
}
|
|
Insert: {
|
|
created_at?: string | null
|
|
id: string
|
|
raw_base_config?: string | null
|
|
updated_at?: string | null
|
|
uuid?: string | null
|
|
}
|
|
Update: {
|
|
created_at?: string | null
|
|
id?: string
|
|
raw_base_config?: string | null
|
|
updated_at?: string | null
|
|
uuid?: string | null
|
|
}
|
|
Relationships: []
|
|
}
|
|
mfa_amr_claims: {
|
|
Row: {
|
|
authentication_method: string
|
|
created_at: string
|
|
id: string
|
|
session_id: string
|
|
updated_at: string
|
|
}
|
|
Insert: {
|
|
authentication_method: string
|
|
created_at: string
|
|
id: string
|
|
session_id: string
|
|
updated_at: string
|
|
}
|
|
Update: {
|
|
authentication_method?: string
|
|
created_at?: string
|
|
id?: string
|
|
session_id?: string
|
|
updated_at?: string
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "mfa_amr_claims_session_id_fkey"
|
|
columns: ["session_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "sessions"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
mfa_challenges: {
|
|
Row: {
|
|
created_at: string
|
|
factor_id: string
|
|
id: string
|
|
ip_address: unknown
|
|
otp_code: string | null
|
|
verified_at: string | null
|
|
web_authn_session_data: Json | null
|
|
}
|
|
Insert: {
|
|
created_at: string
|
|
factor_id: string
|
|
id: string
|
|
ip_address: unknown
|
|
otp_code?: string | null
|
|
verified_at?: string | null
|
|
web_authn_session_data?: Json | null
|
|
}
|
|
Update: {
|
|
created_at?: string
|
|
factor_id?: string
|
|
id?: string
|
|
ip_address?: unknown
|
|
otp_code?: string | null
|
|
verified_at?: string | null
|
|
web_authn_session_data?: Json | null
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "mfa_challenges_auth_factor_id_fkey"
|
|
columns: ["factor_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "mfa_factors"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
mfa_factors: {
|
|
Row: {
|
|
created_at: string
|
|
factor_type: Database["auth"]["Enums"]["factor_type"]
|
|
friendly_name: string | null
|
|
id: string
|
|
last_challenged_at: string | null
|
|
phone: string | null
|
|
secret: string | null
|
|
status: Database["auth"]["Enums"]["factor_status"]
|
|
updated_at: string
|
|
user_id: string
|
|
web_authn_aaguid: string | null
|
|
web_authn_credential: Json | null
|
|
}
|
|
Insert: {
|
|
created_at: string
|
|
factor_type: Database["auth"]["Enums"]["factor_type"]
|
|
friendly_name?: string | null
|
|
id: string
|
|
last_challenged_at?: string | null
|
|
phone?: string | null
|
|
secret?: string | null
|
|
status: Database["auth"]["Enums"]["factor_status"]
|
|
updated_at: string
|
|
user_id: string
|
|
web_authn_aaguid?: string | null
|
|
web_authn_credential?: Json | null
|
|
}
|
|
Update: {
|
|
created_at?: string
|
|
factor_type?: Database["auth"]["Enums"]["factor_type"]
|
|
friendly_name?: string | null
|
|
id?: string
|
|
last_challenged_at?: string | null
|
|
phone?: string | null
|
|
secret?: string | null
|
|
status?: Database["auth"]["Enums"]["factor_status"]
|
|
updated_at?: string
|
|
user_id?: string
|
|
web_authn_aaguid?: string | null
|
|
web_authn_credential?: Json | null
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "mfa_factors_user_id_fkey"
|
|
columns: ["user_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "users"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
one_time_tokens: {
|
|
Row: {
|
|
created_at: string
|
|
id: string
|
|
relates_to: string
|
|
token_hash: string
|
|
token_type: Database["auth"]["Enums"]["one_time_token_type"]
|
|
updated_at: string
|
|
user_id: string
|
|
}
|
|
Insert: {
|
|
created_at?: string
|
|
id: string
|
|
relates_to: string
|
|
token_hash: string
|
|
token_type: Database["auth"]["Enums"]["one_time_token_type"]
|
|
updated_at?: string
|
|
user_id: string
|
|
}
|
|
Update: {
|
|
created_at?: string
|
|
id?: string
|
|
relates_to?: string
|
|
token_hash?: string
|
|
token_type?: Database["auth"]["Enums"]["one_time_token_type"]
|
|
updated_at?: string
|
|
user_id?: string
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "one_time_tokens_user_id_fkey"
|
|
columns: ["user_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "users"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
refresh_tokens: {
|
|
Row: {
|
|
created_at: string | null
|
|
id: number
|
|
instance_id: string | null
|
|
parent: string | null
|
|
revoked: boolean | null
|
|
session_id: string | null
|
|
token: string | null
|
|
updated_at: string | null
|
|
user_id: string | null
|
|
}
|
|
Insert: {
|
|
created_at?: string | null
|
|
id?: number
|
|
instance_id?: string | null
|
|
parent?: string | null
|
|
revoked?: boolean | null
|
|
session_id?: string | null
|
|
token?: string | null
|
|
updated_at?: string | null
|
|
user_id?: string | null
|
|
}
|
|
Update: {
|
|
created_at?: string | null
|
|
id?: number
|
|
instance_id?: string | null
|
|
parent?: string | null
|
|
revoked?: boolean | null
|
|
session_id?: string | null
|
|
token?: string | null
|
|
updated_at?: string | null
|
|
user_id?: string | null
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "refresh_tokens_session_id_fkey"
|
|
columns: ["session_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "sessions"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
saml_providers: {
|
|
Row: {
|
|
attribute_mapping: Json | null
|
|
created_at: string | null
|
|
entity_id: string
|
|
id: string
|
|
metadata_url: string | null
|
|
metadata_xml: string
|
|
name_id_format: string | null
|
|
sso_provider_id: string
|
|
updated_at: string | null
|
|
}
|
|
Insert: {
|
|
attribute_mapping?: Json | null
|
|
created_at?: string | null
|
|
entity_id: string
|
|
id: string
|
|
metadata_url?: string | null
|
|
metadata_xml: string
|
|
name_id_format?: string | null
|
|
sso_provider_id: string
|
|
updated_at?: string | null
|
|
}
|
|
Update: {
|
|
attribute_mapping?: Json | null
|
|
created_at?: string | null
|
|
entity_id?: string
|
|
id?: string
|
|
metadata_url?: string | null
|
|
metadata_xml?: string
|
|
name_id_format?: string | null
|
|
sso_provider_id?: string
|
|
updated_at?: string | null
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "saml_providers_sso_provider_id_fkey"
|
|
columns: ["sso_provider_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "sso_providers"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
saml_relay_states: {
|
|
Row: {
|
|
created_at: string | null
|
|
flow_state_id: string | null
|
|
for_email: string | null
|
|
id: string
|
|
redirect_to: string | null
|
|
request_id: string
|
|
sso_provider_id: string
|
|
updated_at: string | null
|
|
}
|
|
Insert: {
|
|
created_at?: string | null
|
|
flow_state_id?: string | null
|
|
for_email?: string | null
|
|
id: string
|
|
redirect_to?: string | null
|
|
request_id: string
|
|
sso_provider_id: string
|
|
updated_at?: string | null
|
|
}
|
|
Update: {
|
|
created_at?: string | null
|
|
flow_state_id?: string | null
|
|
for_email?: string | null
|
|
id?: string
|
|
redirect_to?: string | null
|
|
request_id?: string
|
|
sso_provider_id?: string
|
|
updated_at?: string | null
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "saml_relay_states_flow_state_id_fkey"
|
|
columns: ["flow_state_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "flow_state"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "saml_relay_states_sso_provider_id_fkey"
|
|
columns: ["sso_provider_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "sso_providers"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
schema_migrations: {
|
|
Row: {
|
|
version: string
|
|
}
|
|
Insert: {
|
|
version: string
|
|
}
|
|
Update: {
|
|
version?: string
|
|
}
|
|
Relationships: []
|
|
}
|
|
sessions: {
|
|
Row: {
|
|
aal: Database["auth"]["Enums"]["aal_level"] | null
|
|
created_at: string | null
|
|
factor_id: string | null
|
|
id: string
|
|
ip: unknown | null
|
|
not_after: string | null
|
|
refreshed_at: string | null
|
|
tag: string | null
|
|
updated_at: string | null
|
|
user_agent: string | null
|
|
user_id: string
|
|
}
|
|
Insert: {
|
|
aal?: Database["auth"]["Enums"]["aal_level"] | null
|
|
created_at?: string | null
|
|
factor_id?: string | null
|
|
id: string
|
|
ip?: unknown | null
|
|
not_after?: string | null
|
|
refreshed_at?: string | null
|
|
tag?: string | null
|
|
updated_at?: string | null
|
|
user_agent?: string | null
|
|
user_id: string
|
|
}
|
|
Update: {
|
|
aal?: Database["auth"]["Enums"]["aal_level"] | null
|
|
created_at?: string | null
|
|
factor_id?: string | null
|
|
id?: string
|
|
ip?: unknown | null
|
|
not_after?: string | null
|
|
refreshed_at?: string | null
|
|
tag?: string | null
|
|
updated_at?: string | null
|
|
user_agent?: string | null
|
|
user_id?: string
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "sessions_user_id_fkey"
|
|
columns: ["user_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "users"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
sso_domains: {
|
|
Row: {
|
|
created_at: string | null
|
|
domain: string
|
|
id: string
|
|
sso_provider_id: string
|
|
updated_at: string | null
|
|
}
|
|
Insert: {
|
|
created_at?: string | null
|
|
domain: string
|
|
id: string
|
|
sso_provider_id: string
|
|
updated_at?: string | null
|
|
}
|
|
Update: {
|
|
created_at?: string | null
|
|
domain?: string
|
|
id?: string
|
|
sso_provider_id?: string
|
|
updated_at?: string | null
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "sso_domains_sso_provider_id_fkey"
|
|
columns: ["sso_provider_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "sso_providers"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
sso_providers: {
|
|
Row: {
|
|
created_at: string | null
|
|
id: string
|
|
resource_id: string | null
|
|
updated_at: string | null
|
|
}
|
|
Insert: {
|
|
created_at?: string | null
|
|
id: string
|
|
resource_id?: string | null
|
|
updated_at?: string | null
|
|
}
|
|
Update: {
|
|
created_at?: string | null
|
|
id?: string
|
|
resource_id?: string | null
|
|
updated_at?: string | null
|
|
}
|
|
Relationships: []
|
|
}
|
|
users: {
|
|
Row: {
|
|
aud: string | null
|
|
banned_until: string | null
|
|
confirmation_sent_at: string | null
|
|
confirmation_token: string | null
|
|
confirmed_at: string | null
|
|
created_at: string | null
|
|
deleted_at: string | null
|
|
email: string | null
|
|
email_change: string | null
|
|
email_change_confirm_status: number | null
|
|
email_change_sent_at: string | null
|
|
email_change_token_current: string | null
|
|
email_change_token_new: string | null
|
|
email_confirmed_at: string | null
|
|
encrypted_password: string | null
|
|
id: string
|
|
instance_id: string | null
|
|
invited_at: string | null
|
|
is_anonymous: boolean
|
|
is_sso_user: boolean
|
|
is_super_admin: boolean | null
|
|
last_sign_in_at: string | null
|
|
phone: string | null
|
|
phone_change: string | null
|
|
phone_change_sent_at: string | null
|
|
phone_change_token: string | null
|
|
phone_confirmed_at: string | null
|
|
raw_app_meta_data: Json | null
|
|
raw_user_meta_data: Json | null
|
|
reauthentication_sent_at: string | null
|
|
reauthentication_token: string | null
|
|
recovery_sent_at: string | null
|
|
recovery_token: string | null
|
|
role: string | null
|
|
updated_at: string | null
|
|
}
|
|
Insert: {
|
|
aud?: string | null
|
|
banned_until?: string | null
|
|
confirmation_sent_at?: string | null
|
|
confirmation_token?: string | null
|
|
confirmed_at?: string | null
|
|
created_at?: string | null
|
|
deleted_at?: string | null
|
|
email?: string | null
|
|
email_change?: string | null
|
|
email_change_confirm_status?: number | null
|
|
email_change_sent_at?: string | null
|
|
email_change_token_current?: string | null
|
|
email_change_token_new?: string | null
|
|
email_confirmed_at?: string | null
|
|
encrypted_password?: string | null
|
|
id: string
|
|
instance_id?: string | null
|
|
invited_at?: string | null
|
|
is_anonymous?: boolean
|
|
is_sso_user?: boolean
|
|
is_super_admin?: boolean | null
|
|
last_sign_in_at?: string | null
|
|
phone?: string | null
|
|
phone_change?: string | null
|
|
phone_change_sent_at?: string | null
|
|
phone_change_token?: string | null
|
|
phone_confirmed_at?: string | null
|
|
raw_app_meta_data?: Json | null
|
|
raw_user_meta_data?: Json | null
|
|
reauthentication_sent_at?: string | null
|
|
reauthentication_token?: string | null
|
|
recovery_sent_at?: string | null
|
|
recovery_token?: string | null
|
|
role?: string | null
|
|
updated_at?: string | null
|
|
}
|
|
Update: {
|
|
aud?: string | null
|
|
banned_until?: string | null
|
|
confirmation_sent_at?: string | null
|
|
confirmation_token?: string | null
|
|
confirmed_at?: string | null
|
|
created_at?: string | null
|
|
deleted_at?: string | null
|
|
email?: string | null
|
|
email_change?: string | null
|
|
email_change_confirm_status?: number | null
|
|
email_change_sent_at?: string | null
|
|
email_change_token_current?: string | null
|
|
email_change_token_new?: string | null
|
|
email_confirmed_at?: string | null
|
|
encrypted_password?: string | null
|
|
id?: string
|
|
instance_id?: string | null
|
|
invited_at?: string | null
|
|
is_anonymous?: boolean
|
|
is_sso_user?: boolean
|
|
is_super_admin?: boolean | null
|
|
last_sign_in_at?: string | null
|
|
phone?: string | null
|
|
phone_change?: string | null
|
|
phone_change_sent_at?: string | null
|
|
phone_change_token?: string | null
|
|
phone_confirmed_at?: string | null
|
|
raw_app_meta_data?: Json | null
|
|
raw_user_meta_data?: Json | null
|
|
reauthentication_sent_at?: string | null
|
|
reauthentication_token?: string | null
|
|
recovery_sent_at?: string | null
|
|
recovery_token?: string | null
|
|
role?: string | null
|
|
updated_at?: string | null
|
|
}
|
|
Relationships: []
|
|
}
|
|
}
|
|
Views: {
|
|
[_ in never]: never
|
|
}
|
|
Functions: {
|
|
email: {
|
|
Args: Record<PropertyKey, never>
|
|
Returns: string
|
|
}
|
|
jwt: {
|
|
Args: Record<PropertyKey, never>
|
|
Returns: Json
|
|
}
|
|
role: {
|
|
Args: Record<PropertyKey, never>
|
|
Returns: string
|
|
}
|
|
uid: {
|
|
Args: Record<PropertyKey, never>
|
|
Returns: string
|
|
}
|
|
}
|
|
Enums: {
|
|
aal_level: "aal1" | "aal2" | "aal3"
|
|
code_challenge_method: "s256" | "plain"
|
|
factor_status: "unverified" | "verified"
|
|
factor_type: "totp" | "webauthn" | "phone"
|
|
one_time_token_type:
|
|
| "confirmation_token"
|
|
| "reauthentication_token"
|
|
| "recovery_token"
|
|
| "email_change_token_new"
|
|
| "email_change_token_current"
|
|
| "phone_change_token"
|
|
}
|
|
CompositeTypes: {
|
|
[_ in never]: never
|
|
}
|
|
}
|
|
public: {
|
|
Tables: {
|
|
achievement_types: {
|
|
Row: {
|
|
created_at: string | null
|
|
description: string | null
|
|
id: string
|
|
name: string
|
|
}
|
|
Insert: {
|
|
created_at?: string | null
|
|
description?: string | null
|
|
id?: string
|
|
name: string
|
|
}
|
|
Update: {
|
|
created_at?: string | null
|
|
description?: string | null
|
|
id?: string
|
|
name?: string
|
|
}
|
|
Relationships: []
|
|
}
|
|
achievements: {
|
|
Row: {
|
|
description: string | null
|
|
id: string
|
|
name: string | null
|
|
}
|
|
Insert: {
|
|
description?: string | null
|
|
id?: string
|
|
name?: string | null
|
|
}
|
|
Update: {
|
|
description?: string | null
|
|
id?: string
|
|
name?: string | null
|
|
}
|
|
Relationships: []
|
|
}
|
|
classes: {
|
|
Row: {
|
|
created_at: string
|
|
grade: string
|
|
id: string
|
|
name: string
|
|
period: string | null
|
|
school_id: string
|
|
teacher_id: string | null
|
|
updated_at: string
|
|
year: number
|
|
}
|
|
Insert: {
|
|
created_at?: string
|
|
grade: string
|
|
id?: string
|
|
name: string
|
|
period?: string | null
|
|
school_id: string
|
|
teacher_id?: string | null
|
|
updated_at?: string
|
|
year: number
|
|
}
|
|
Update: {
|
|
created_at?: string
|
|
grade?: string
|
|
id?: string
|
|
name?: string
|
|
period?: string | null
|
|
school_id?: string
|
|
teacher_id?: string | null
|
|
updated_at?: string
|
|
year?: number
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "classes_school_id_fkey"
|
|
columns: ["school_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "schools"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
interests: {
|
|
Row: {
|
|
category: string
|
|
created_at: string
|
|
id: string
|
|
item: string
|
|
student_id: string
|
|
updated_at: string
|
|
}
|
|
Insert: {
|
|
category: string
|
|
created_at?: string
|
|
id?: string
|
|
item: string
|
|
student_id: string
|
|
updated_at?: string
|
|
}
|
|
Update: {
|
|
category?: string
|
|
created_at?: string
|
|
id?: string
|
|
item?: string
|
|
student_id?: string
|
|
updated_at?: string
|
|
}
|
|
Relationships: []
|
|
}
|
|
media_types: {
|
|
Row: {
|
|
created_at: string | null
|
|
description: string | null
|
|
id: string
|
|
name: string
|
|
}
|
|
Insert: {
|
|
created_at?: string | null
|
|
description?: string | null
|
|
id?: string
|
|
name: string
|
|
}
|
|
Update: {
|
|
created_at?: string | null
|
|
description?: string | null
|
|
id?: string
|
|
name?: string
|
|
}
|
|
Relationships: []
|
|
}
|
|
phonics_achievements: {
|
|
Row: {
|
|
created_at: string | null
|
|
description: string | null
|
|
icon_url: string | null
|
|
id: string
|
|
name: string
|
|
points: number | null
|
|
required_count: number | null
|
|
type_id: string | null
|
|
}
|
|
Insert: {
|
|
created_at?: string | null
|
|
description?: string | null
|
|
icon_url?: string | null
|
|
id?: string
|
|
name: string
|
|
points?: number | null
|
|
required_count?: number | null
|
|
type_id?: string | null
|
|
}
|
|
Update: {
|
|
created_at?: string | null
|
|
description?: string | null
|
|
icon_url?: string | null
|
|
id?: string
|
|
name?: string
|
|
points?: number | null
|
|
required_count?: number | null
|
|
type_id?: string | null
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "phonics_achievements_type_id_fkey"
|
|
columns: ["type_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "achievement_types"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
phonics_categories: {
|
|
Row: {
|
|
created_at: string | null
|
|
description: string | null
|
|
id: string
|
|
level: number
|
|
name: string
|
|
order_index: number
|
|
updated_at: string | null
|
|
}
|
|
Insert: {
|
|
created_at?: string | null
|
|
description?: string | null
|
|
id?: string
|
|
level: number
|
|
name: string
|
|
order_index: number
|
|
updated_at?: string | null
|
|
}
|
|
Update: {
|
|
created_at?: string | null
|
|
description?: string | null
|
|
id?: string
|
|
level?: number
|
|
name?: string
|
|
order_index?: number
|
|
updated_at?: string | null
|
|
}
|
|
Relationships: []
|
|
}
|
|
phonics_exercise_media: {
|
|
Row: {
|
|
alt_text: string | null
|
|
created_at: string | null
|
|
exercise_id: string | null
|
|
id: string
|
|
media_type_id: string | null
|
|
order_index: number | null
|
|
url: string
|
|
}
|
|
Insert: {
|
|
alt_text?: string | null
|
|
created_at?: string | null
|
|
exercise_id?: string | null
|
|
id?: string
|
|
media_type_id?: string | null
|
|
order_index?: number | null
|
|
url: string
|
|
}
|
|
Update: {
|
|
alt_text?: string | null
|
|
created_at?: string | null
|
|
exercise_id?: string | null
|
|
id?: string
|
|
media_type_id?: string | null
|
|
order_index?: number | null
|
|
url?: string
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "phonics_exercise_media_exercise_id_fkey"
|
|
columns: ["exercise_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "phonics_exercises"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "phonics_exercise_media_media_type_id_fkey"
|
|
columns: ["media_type_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "media_types"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
phonics_exercise_types: {
|
|
Row: {
|
|
created_at: string | null
|
|
description: string | null
|
|
id: string
|
|
name: string
|
|
}
|
|
Insert: {
|
|
created_at?: string | null
|
|
description?: string | null
|
|
id?: string
|
|
name: string
|
|
}
|
|
Update: {
|
|
created_at?: string | null
|
|
description?: string | null
|
|
id?: string
|
|
name?: string
|
|
}
|
|
Relationships: []
|
|
}
|
|
phonics_exercise_words: {
|
|
Row: {
|
|
created_at: string | null
|
|
exercise_id: string | null
|
|
id: string
|
|
is_correct_answer: boolean | null
|
|
order_index: number | null
|
|
word_id: string | null
|
|
}
|
|
Insert: {
|
|
created_at?: string | null
|
|
exercise_id?: string | null
|
|
id?: string
|
|
is_correct_answer?: boolean | null
|
|
order_index?: number | null
|
|
word_id?: string | null
|
|
}
|
|
Update: {
|
|
created_at?: string | null
|
|
exercise_id?: string | null
|
|
id?: string
|
|
is_correct_answer?: boolean | null
|
|
order_index?: number | null
|
|
word_id?: string | null
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "phonics_exercise_words_exercise_id_fkey"
|
|
columns: ["exercise_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "phonics_exercises"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "phonics_exercise_words_word_id_fkey"
|
|
columns: ["word_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "phonics_words"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
phonics_exercises: {
|
|
Row: {
|
|
category_id: string | null
|
|
created_at: string | null
|
|
description: string | null
|
|
difficulty_level: number
|
|
estimated_time_seconds: number | null
|
|
id: string
|
|
instructions: string
|
|
is_active: boolean | null
|
|
points: number | null
|
|
required_score: number | null
|
|
title: string
|
|
type_id: string | null
|
|
updated_at: string | null
|
|
}
|
|
Insert: {
|
|
category_id?: string | null
|
|
created_at?: string | null
|
|
description?: string | null
|
|
difficulty_level: number
|
|
estimated_time_seconds?: number | null
|
|
id?: string
|
|
instructions: string
|
|
is_active?: boolean | null
|
|
points?: number | null
|
|
required_score?: number | null
|
|
title: string
|
|
type_id?: string | null
|
|
updated_at?: string | null
|
|
}
|
|
Update: {
|
|
category_id?: string | null
|
|
created_at?: string | null
|
|
description?: string | null
|
|
difficulty_level?: number
|
|
estimated_time_seconds?: number | null
|
|
id?: string
|
|
instructions?: string
|
|
is_active?: boolean | null
|
|
points?: number | null
|
|
required_score?: number | null
|
|
title?: string
|
|
type_id?: string | null
|
|
updated_at?: string | null
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "phonics_exercises_type_id_fkey"
|
|
columns: ["type_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "phonics_exercise_types"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
phonics_word_audio: {
|
|
Row: {
|
|
audio_path: string
|
|
audio_url: string
|
|
created_at: string | null
|
|
id: string
|
|
word: string
|
|
}
|
|
Insert: {
|
|
audio_path: string
|
|
audio_url: string
|
|
created_at?: string | null
|
|
id?: string
|
|
word: string
|
|
}
|
|
Update: {
|
|
audio_path?: string
|
|
audio_url?: string
|
|
created_at?: string | null
|
|
id?: string
|
|
word?: string
|
|
}
|
|
Relationships: []
|
|
}
|
|
phonics_words: {
|
|
Row: {
|
|
created_at: string | null
|
|
id: string
|
|
phonetic_transcription: string | null
|
|
syllables_count: number
|
|
word: string
|
|
}
|
|
Insert: {
|
|
created_at?: string | null
|
|
id?: string
|
|
phonetic_transcription?: string | null
|
|
syllables_count: number
|
|
word: string
|
|
}
|
|
Update: {
|
|
created_at?: string | null
|
|
id?: string
|
|
phonetic_transcription?: string | null
|
|
syllables_count?: number
|
|
word?: string
|
|
}
|
|
Relationships: []
|
|
}
|
|
schools: {
|
|
Row: {
|
|
address: string | null
|
|
created_at: string
|
|
director_name: string
|
|
email: string | null
|
|
id: string
|
|
name: string
|
|
phone: string | null
|
|
updated_at: string
|
|
}
|
|
Insert: {
|
|
address?: string | null
|
|
created_at?: string
|
|
director_name?: string
|
|
email?: string | null
|
|
id?: string
|
|
name: string
|
|
phone?: string | null
|
|
updated_at?: string
|
|
}
|
|
Update: {
|
|
address?: string | null
|
|
created_at?: string
|
|
director_name?: string
|
|
email?: string | null
|
|
id?: string
|
|
name?: string
|
|
phone?: string | null
|
|
updated_at?: string
|
|
}
|
|
Relationships: []
|
|
}
|
|
stories: {
|
|
Row: {
|
|
character_id: string | null
|
|
content: Json
|
|
context: string | null
|
|
created_at: string
|
|
id: string
|
|
language_type: Database["public"]["Enums"]["language_enum"]
|
|
setting_id: string | null
|
|
status: string | null
|
|
student_id: string
|
|
subject_id: string | null
|
|
theme_id: string | null
|
|
title: string
|
|
updated_at: string
|
|
}
|
|
Insert: {
|
|
character_id?: string | null
|
|
content: Json
|
|
context?: string | null
|
|
created_at?: string
|
|
id?: string
|
|
language_type?: Database["public"]["Enums"]["language_enum"]
|
|
setting_id?: string | null
|
|
status?: string | null
|
|
student_id: string
|
|
subject_id?: string | null
|
|
theme_id?: string | null
|
|
title: string
|
|
updated_at?: string
|
|
}
|
|
Update: {
|
|
character_id?: string | null
|
|
content?: Json
|
|
context?: string | null
|
|
created_at?: string
|
|
id?: string
|
|
language_type?: Database["public"]["Enums"]["language_enum"]
|
|
setting_id?: string | null
|
|
status?: string | null
|
|
student_id?: string
|
|
subject_id?: string | null
|
|
theme_id?: string | null
|
|
title?: string
|
|
updated_at?: string
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "fk_story_character"
|
|
columns: ["character_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "story_characters"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "fk_story_setting"
|
|
columns: ["setting_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "story_settings"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "fk_story_subject"
|
|
columns: ["subject_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "story_subjects"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "fk_story_theme"
|
|
columns: ["theme_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "story_themes"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "stories_character_id_fkey"
|
|
columns: ["character_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "story_characters"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "stories_setting_id_fkey"
|
|
columns: ["setting_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "story_settings"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "stories_student_id_fkey"
|
|
columns: ["student_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "students"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "stories_subject_id_fkey"
|
|
columns: ["subject_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "story_subjects"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "stories_theme_id_fkey"
|
|
columns: ["theme_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "story_themes"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
story_characters: {
|
|
Row: {
|
|
active: boolean | null
|
|
created_at: string
|
|
description: string
|
|
icon: string
|
|
id: string
|
|
slug: string
|
|
title: string
|
|
updated_at: string
|
|
}
|
|
Insert: {
|
|
active?: boolean | null
|
|
created_at?: string
|
|
description: string
|
|
icon: string
|
|
id?: string
|
|
slug: string
|
|
title: string
|
|
updated_at?: string
|
|
}
|
|
Update: {
|
|
active?: boolean | null
|
|
created_at?: string
|
|
description?: string
|
|
icon?: string
|
|
id?: string
|
|
slug?: string
|
|
title?: string
|
|
updated_at?: string
|
|
}
|
|
Relationships: []
|
|
}
|
|
story_exercise_words: {
|
|
Row: {
|
|
created_at: string | null
|
|
exercise_type: string
|
|
id: string
|
|
phonemes: string[] | null
|
|
story_id: string | null
|
|
syllable_pattern: string | null
|
|
word: string
|
|
}
|
|
Insert: {
|
|
created_at?: string | null
|
|
exercise_type: string
|
|
id?: string
|
|
phonemes?: string[] | null
|
|
story_id?: string | null
|
|
syllable_pattern?: string | null
|
|
word: string
|
|
}
|
|
Update: {
|
|
created_at?: string | null
|
|
exercise_type?: string
|
|
id?: string
|
|
phonemes?: string[] | null
|
|
story_id?: string | null
|
|
syllable_pattern?: string | null
|
|
word?: string
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "story_exercise_words_story_id_fkey"
|
|
columns: ["story_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "stories"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "story_exercise_words_story_id_fkey"
|
|
columns: ["story_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "story_details"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
story_generations: {
|
|
Row: {
|
|
ai_response: string
|
|
created_at: string
|
|
id: string
|
|
language_type: Database["public"]["Enums"]["language_enum"]
|
|
model_used: string
|
|
original_prompt: string
|
|
story_id: string | null
|
|
}
|
|
Insert: {
|
|
ai_response: string
|
|
created_at?: string
|
|
id?: string
|
|
language_type?: Database["public"]["Enums"]["language_enum"]
|
|
model_used: string
|
|
original_prompt: string
|
|
story_id?: string | null
|
|
}
|
|
Update: {
|
|
ai_response?: string
|
|
created_at?: string
|
|
id?: string
|
|
language_type?: Database["public"]["Enums"]["language_enum"]
|
|
model_used?: string
|
|
original_prompt?: string
|
|
story_id?: string | null
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "story_generations_story_id_fkey"
|
|
columns: ["story_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "stories"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "story_generations_story_id_fkey"
|
|
columns: ["story_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "story_details"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
story_pages: {
|
|
Row: {
|
|
created_at: string
|
|
id: string
|
|
image_path: string | null
|
|
image_path_large: string | null
|
|
image_path_medium: string | null
|
|
image_path_thumb: string | null
|
|
image_url: string
|
|
image_url_large: string | null
|
|
image_url_medium: string | null
|
|
image_url_thumb: string | null
|
|
page_number: number
|
|
story_id: string | null
|
|
text: string
|
|
}
|
|
Insert: {
|
|
created_at?: string
|
|
id?: string
|
|
image_path?: string | null
|
|
image_path_large?: string | null
|
|
image_path_medium?: string | null
|
|
image_path_thumb?: string | null
|
|
image_url: string
|
|
image_url_large?: string | null
|
|
image_url_medium?: string | null
|
|
image_url_thumb?: string | null
|
|
page_number: number
|
|
story_id?: string | null
|
|
text: string
|
|
}
|
|
Update: {
|
|
created_at?: string
|
|
id?: string
|
|
image_path?: string | null
|
|
image_path_large?: string | null
|
|
image_path_medium?: string | null
|
|
image_path_thumb?: string | null
|
|
image_url?: string
|
|
image_url_large?: string | null
|
|
image_url_medium?: string | null
|
|
image_url_thumb?: string | null
|
|
page_number?: number
|
|
story_id?: string | null
|
|
text?: string
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "fk_story"
|
|
columns: ["story_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "stories"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "fk_story"
|
|
columns: ["story_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "story_details"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
story_recordings: {
|
|
Row: {
|
|
accuracy_score: number | null
|
|
analysis: Json | null
|
|
audio_url: string | null
|
|
comprehension_score: number | null
|
|
created_at: string
|
|
error_count: number | null
|
|
error_message: string | null
|
|
fluency_score: number | null
|
|
id: string
|
|
improvements: string[] | null
|
|
pause_count: number | null
|
|
processed_at: string | null
|
|
pronunciation_score: number | null
|
|
self_corrections: number | null
|
|
status: string
|
|
story_id: string | null
|
|
strengths: string[] | null
|
|
student_id: string | null
|
|
suggestions: string | null
|
|
transcription: string | null
|
|
words_per_minute: number | null
|
|
}
|
|
Insert: {
|
|
accuracy_score?: number | null
|
|
analysis?: Json | null
|
|
audio_url?: string | null
|
|
comprehension_score?: number | null
|
|
created_at?: string
|
|
error_count?: number | null
|
|
error_message?: string | null
|
|
fluency_score?: number | null
|
|
id?: string
|
|
improvements?: string[] | null
|
|
pause_count?: number | null
|
|
processed_at?: string | null
|
|
pronunciation_score?: number | null
|
|
self_corrections?: number | null
|
|
status?: string
|
|
story_id?: string | null
|
|
strengths?: string[] | null
|
|
student_id?: string | null
|
|
suggestions?: string | null
|
|
transcription?: string | null
|
|
words_per_minute?: number | null
|
|
}
|
|
Update: {
|
|
accuracy_score?: number | null
|
|
analysis?: Json | null
|
|
audio_url?: string | null
|
|
comprehension_score?: number | null
|
|
created_at?: string
|
|
error_count?: number | null
|
|
error_message?: string | null
|
|
fluency_score?: number | null
|
|
id?: string
|
|
improvements?: string[] | null
|
|
pause_count?: number | null
|
|
processed_at?: string | null
|
|
pronunciation_score?: number | null
|
|
self_corrections?: number | null
|
|
status?: string
|
|
story_id?: string | null
|
|
strengths?: string[] | null
|
|
student_id?: string | null
|
|
suggestions?: string | null
|
|
transcription?: string | null
|
|
words_per_minute?: number | null
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "fk_story"
|
|
columns: ["story_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "stories"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "fk_story"
|
|
columns: ["story_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "story_details"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "story_recordings_student_id_fkey"
|
|
columns: ["student_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "students"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
story_settings: {
|
|
Row: {
|
|
active: boolean | null
|
|
created_at: string
|
|
description: string
|
|
icon: string
|
|
id: string
|
|
slug: string
|
|
title: string
|
|
updated_at: string
|
|
}
|
|
Insert: {
|
|
active?: boolean | null
|
|
created_at?: string
|
|
description: string
|
|
icon: string
|
|
id?: string
|
|
slug: string
|
|
title: string
|
|
updated_at?: string
|
|
}
|
|
Update: {
|
|
active?: boolean | null
|
|
created_at?: string
|
|
description?: string
|
|
icon?: string
|
|
id?: string
|
|
slug?: string
|
|
title?: string
|
|
updated_at?: string
|
|
}
|
|
Relationships: []
|
|
}
|
|
story_subjects: {
|
|
Row: {
|
|
active: boolean | null
|
|
created_at: string
|
|
description: string
|
|
icon: string
|
|
id: string
|
|
slug: string
|
|
title: string
|
|
updated_at: string
|
|
}
|
|
Insert: {
|
|
active?: boolean | null
|
|
created_at?: string
|
|
description: string
|
|
icon: string
|
|
id?: string
|
|
slug: string
|
|
title: string
|
|
updated_at?: string
|
|
}
|
|
Update: {
|
|
active?: boolean | null
|
|
created_at?: string
|
|
description?: string
|
|
icon?: string
|
|
id?: string
|
|
slug?: string
|
|
title?: string
|
|
updated_at?: string
|
|
}
|
|
Relationships: []
|
|
}
|
|
story_themes: {
|
|
Row: {
|
|
active: boolean | null
|
|
created_at: string
|
|
description: string
|
|
icon: string
|
|
id: string
|
|
slug: string
|
|
title: string
|
|
updated_at: string
|
|
}
|
|
Insert: {
|
|
active?: boolean | null
|
|
created_at?: string
|
|
description: string
|
|
icon: string
|
|
id?: string
|
|
slug: string
|
|
title: string
|
|
updated_at?: string
|
|
}
|
|
Update: {
|
|
active?: boolean | null
|
|
created_at?: string
|
|
description?: string
|
|
icon?: string
|
|
id?: string
|
|
slug?: string
|
|
title?: string
|
|
updated_at?: string
|
|
}
|
|
Relationships: []
|
|
}
|
|
student_achievements: {
|
|
Row: {
|
|
achievement_id: string | null
|
|
earned_at: string | null
|
|
id: string
|
|
metadata: Json | null
|
|
student_id: string | null
|
|
}
|
|
Insert: {
|
|
achievement_id?: string | null
|
|
earned_at?: string | null
|
|
id?: string
|
|
metadata?: Json | null
|
|
student_id?: string | null
|
|
}
|
|
Update: {
|
|
achievement_id?: string | null
|
|
earned_at?: string | null
|
|
id?: string
|
|
metadata?: Json | null
|
|
student_id?: string | null
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "student_achievements_achievement_id_fkey1"
|
|
columns: ["achievement_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "achievements"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "student_achievements_student_id_fkey1"
|
|
columns: ["student_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "students"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
student_achievements_old: {
|
|
Row: {
|
|
achievement_id: string | null
|
|
earned_at: string | null
|
|
id: string
|
|
metadata: Json | null
|
|
student_id: string | null
|
|
}
|
|
Insert: {
|
|
achievement_id?: string | null
|
|
earned_at?: string | null
|
|
id?: string
|
|
metadata?: Json | null
|
|
student_id?: string | null
|
|
}
|
|
Update: {
|
|
achievement_id?: string | null
|
|
earned_at?: string | null
|
|
id?: string
|
|
metadata?: Json | null
|
|
student_id?: string | null
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "student_achievements_achievement_id_fkey"
|
|
columns: ["achievement_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "achievements"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "student_achievements_student_id_fkey"
|
|
columns: ["student_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "students"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
student_phonics_achievements: {
|
|
Row: {
|
|
achievement_id: string | null
|
|
earned_at: string | null
|
|
id: string
|
|
student_id: string | null
|
|
}
|
|
Insert: {
|
|
achievement_id?: string | null
|
|
earned_at?: string | null
|
|
id?: string
|
|
student_id?: string | null
|
|
}
|
|
Update: {
|
|
achievement_id?: string | null
|
|
earned_at?: string | null
|
|
id?: string
|
|
student_id?: string | null
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "student_phonics_achievements_achievement_id_fkey"
|
|
columns: ["achievement_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "phonics_achievements"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
student_phonics_attempt_answers: {
|
|
Row: {
|
|
answer_text: string | null
|
|
attempt_id: string | null
|
|
created_at: string | null
|
|
id: string
|
|
is_correct: boolean
|
|
word_id: string | null
|
|
}
|
|
Insert: {
|
|
answer_text?: string | null
|
|
attempt_id?: string | null
|
|
created_at?: string | null
|
|
id?: string
|
|
is_correct: boolean
|
|
word_id?: string | null
|
|
}
|
|
Update: {
|
|
answer_text?: string | null
|
|
attempt_id?: string | null
|
|
created_at?: string | null
|
|
id?: string
|
|
is_correct?: boolean
|
|
word_id?: string | null
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "student_phonics_attempt_answers_attempt_id_fkey"
|
|
columns: ["attempt_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "student_phonics_attempts"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "student_phonics_attempt_answers_word_id_fkey"
|
|
columns: ["word_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "phonics_words"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
student_phonics_attempts: {
|
|
Row: {
|
|
created_at: string | null
|
|
exercise_id: string | null
|
|
id: string
|
|
score: number
|
|
student_id: string | null
|
|
time_spent_seconds: number | null
|
|
}
|
|
Insert: {
|
|
created_at?: string | null
|
|
exercise_id?: string | null
|
|
id?: string
|
|
score: number
|
|
student_id?: string | null
|
|
time_spent_seconds?: number | null
|
|
}
|
|
Update: {
|
|
created_at?: string | null
|
|
exercise_id?: string | null
|
|
id?: string
|
|
score?: number
|
|
student_id?: string | null
|
|
time_spent_seconds?: number | null
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "student_phonics_attempts_exercise_id_fkey"
|
|
columns: ["exercise_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "phonics_exercises"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
student_phonics_progress: {
|
|
Row: {
|
|
attempts: number | null
|
|
best_score: number | null
|
|
completed: boolean | null
|
|
completed_at: string | null
|
|
correct_answers_count: number | null
|
|
created_at: string | null
|
|
exercise_id: string | null
|
|
id: string
|
|
last_attempt_at: string | null
|
|
last_score: number | null
|
|
stars: number | null
|
|
student_id: string | null
|
|
total_answers_count: number | null
|
|
total_time_spent_seconds: number | null
|
|
updated_at: string | null
|
|
xp_earned: number | null
|
|
}
|
|
Insert: {
|
|
attempts?: number | null
|
|
best_score?: number | null
|
|
completed?: boolean | null
|
|
completed_at?: string | null
|
|
correct_answers_count?: number | null
|
|
created_at?: string | null
|
|
exercise_id?: string | null
|
|
id?: string
|
|
last_attempt_at?: string | null
|
|
last_score?: number | null
|
|
stars?: number | null
|
|
student_id?: string | null
|
|
total_answers_count?: number | null
|
|
total_time_spent_seconds?: number | null
|
|
updated_at?: string | null
|
|
xp_earned?: number | null
|
|
}
|
|
Update: {
|
|
attempts?: number | null
|
|
best_score?: number | null
|
|
completed?: boolean | null
|
|
completed_at?: string | null
|
|
correct_answers_count?: number | null
|
|
created_at?: string | null
|
|
exercise_id?: string | null
|
|
id?: string
|
|
last_attempt_at?: string | null
|
|
last_score?: number | null
|
|
stars?: number | null
|
|
student_id?: string | null
|
|
total_answers_count?: number | null
|
|
total_time_spent_seconds?: number | null
|
|
updated_at?: string | null
|
|
xp_earned?: number | null
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "student_phonics_progress_exercise_id_fkey"
|
|
columns: ["exercise_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "phonics_exercises"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
students: {
|
|
Row: {
|
|
accessibility_settings: Json | null
|
|
avatar_settings: Json | null
|
|
avatar_url: string | null
|
|
birth_date: string | null
|
|
class_id: string
|
|
created_at: string
|
|
dark_mode: boolean | null
|
|
email: string
|
|
guardian_email: string | null
|
|
guardian_name: string | null
|
|
guardian_phone: string | null
|
|
id: string
|
|
language: Database["public"]["Enums"]["language_enum"] | null
|
|
last_active_at: string | null
|
|
name: string
|
|
nickname: string | null
|
|
notification_preferences: Json | null
|
|
preferred_font_size: number | null
|
|
preferred_themes: string[] | null
|
|
reading_goals: Json | null
|
|
school_id: string
|
|
status: string
|
|
updated_at: string
|
|
uppercase_text_preferences: boolean | null
|
|
}
|
|
Insert: {
|
|
accessibility_settings?: Json | null
|
|
avatar_settings?: Json | null
|
|
avatar_url?: string | null
|
|
birth_date?: string | null
|
|
class_id: string
|
|
created_at?: string
|
|
dark_mode?: boolean | null
|
|
email: string
|
|
guardian_email?: string | null
|
|
guardian_name?: string | null
|
|
guardian_phone?: string | null
|
|
id?: string
|
|
language?: Database["public"]["Enums"]["language_enum"] | null
|
|
last_active_at?: string | null
|
|
name: string
|
|
nickname?: string | null
|
|
notification_preferences?: Json | null
|
|
preferred_font_size?: number | null
|
|
preferred_themes?: string[] | null
|
|
reading_goals?: Json | null
|
|
school_id: string
|
|
status?: string
|
|
updated_at?: string
|
|
uppercase_text_preferences?: boolean | null
|
|
}
|
|
Update: {
|
|
accessibility_settings?: Json | null
|
|
avatar_settings?: Json | null
|
|
avatar_url?: string | null
|
|
birth_date?: string | null
|
|
class_id?: string
|
|
created_at?: string
|
|
dark_mode?: boolean | null
|
|
email?: string
|
|
guardian_email?: string | null
|
|
guardian_name?: string | null
|
|
guardian_phone?: string | null
|
|
id?: string
|
|
language?: Database["public"]["Enums"]["language_enum"] | null
|
|
last_active_at?: string | null
|
|
name?: string
|
|
nickname?: string | null
|
|
notification_preferences?: Json | null
|
|
preferred_font_size?: number | null
|
|
preferred_themes?: string[] | null
|
|
reading_goals?: Json | null
|
|
school_id?: string
|
|
status?: string
|
|
updated_at?: string
|
|
uppercase_text_preferences?: boolean | null
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "students_class_id_fkey"
|
|
columns: ["class_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "classes"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "students_school_id_fkey"
|
|
columns: ["school_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "schools"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
teacher_classes: {
|
|
Row: {
|
|
class_id: string
|
|
created_at: string
|
|
id: string
|
|
teacher_id: string
|
|
}
|
|
Insert: {
|
|
class_id: string
|
|
created_at?: string
|
|
id?: string
|
|
teacher_id: string
|
|
}
|
|
Update: {
|
|
class_id?: string
|
|
created_at?: string
|
|
id?: string
|
|
teacher_id?: string
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "teacher_classes_class_id_fkey"
|
|
columns: ["class_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "classes"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "teacher_classes_teacher_id_fkey"
|
|
columns: ["teacher_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "teachers"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
teacher_invites: {
|
|
Row: {
|
|
created_at: string
|
|
email: string
|
|
expires_at: string
|
|
id: string
|
|
message: string | null
|
|
name: string
|
|
school_id: string
|
|
status: string | null
|
|
subject: string | null
|
|
token: string
|
|
}
|
|
Insert: {
|
|
created_at?: string
|
|
email: string
|
|
expires_at: string
|
|
id?: string
|
|
message?: string | null
|
|
name: string
|
|
school_id: string
|
|
status?: string | null
|
|
subject?: string | null
|
|
token: string
|
|
}
|
|
Update: {
|
|
created_at?: string
|
|
email?: string
|
|
expires_at?: string
|
|
id?: string
|
|
message?: string | null
|
|
name?: string
|
|
school_id?: string
|
|
status?: string | null
|
|
subject?: string | null
|
|
token?: string
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "teacher_invites_school_id_fkey"
|
|
columns: ["school_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "schools"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
teachers: {
|
|
Row: {
|
|
class_ids: string[] | null
|
|
created_at: string
|
|
email: string
|
|
id: string
|
|
name: string
|
|
phone: string | null
|
|
school_id: string
|
|
status: string | null
|
|
subject: string | null
|
|
updated_at: string
|
|
}
|
|
Insert: {
|
|
class_ids?: string[] | null
|
|
created_at?: string
|
|
email: string
|
|
id?: string
|
|
name: string
|
|
phone?: string | null
|
|
school_id: string
|
|
status?: string | null
|
|
subject?: string | null
|
|
updated_at?: string
|
|
}
|
|
Update: {
|
|
class_ids?: string[] | null
|
|
created_at?: string
|
|
email?: string
|
|
id?: string
|
|
name?: string
|
|
phone?: string | null
|
|
school_id?: string
|
|
status?: string | null
|
|
subject?: string | null
|
|
updated_at?: string
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "teachers_school_id_fkey"
|
|
columns: ["school_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "schools"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
}
|
|
Views: {
|
|
story_details: {
|
|
Row: {
|
|
character_icon: string | null
|
|
character_id: string | null
|
|
character_title: string | null
|
|
content: Json | null
|
|
context: string | null
|
|
created_at: string | null
|
|
id: string | null
|
|
setting_icon: string | null
|
|
setting_id: string | null
|
|
setting_title: string | null
|
|
status: string | null
|
|
student_id: string | null
|
|
subject_icon: string | null
|
|
subject_id: string | null
|
|
subject_title: string | null
|
|
theme_icon: string | null
|
|
theme_id: string | null
|
|
theme_title: string | null
|
|
title: string | null
|
|
updated_at: string | null
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "fk_story_character"
|
|
columns: ["character_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "story_characters"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "fk_story_setting"
|
|
columns: ["setting_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "story_settings"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "fk_story_subject"
|
|
columns: ["subject_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "story_subjects"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "fk_story_theme"
|
|
columns: ["theme_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "story_themes"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "stories_character_id_fkey"
|
|
columns: ["character_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "story_characters"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "stories_setting_id_fkey"
|
|
columns: ["setting_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "story_settings"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "stories_student_id_fkey"
|
|
columns: ["student_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "students"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "stories_subject_id_fkey"
|
|
columns: ["subject_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "story_subjects"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "stories_theme_id_fkey"
|
|
columns: ["theme_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "story_themes"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
}
|
|
Functions: {
|
|
create_school: {
|
|
Args: {
|
|
school_id: string
|
|
school_name: string
|
|
school_email: string
|
|
director_name: string
|
|
}
|
|
Returns: undefined
|
|
}
|
|
get_teacher_class_count: {
|
|
Args: {
|
|
teacher_id: string
|
|
}
|
|
Returns: number
|
|
}
|
|
invite_teacher: {
|
|
Args: {
|
|
p_school_id: string
|
|
p_name: string
|
|
p_email: string
|
|
p_subject: string
|
|
p_message: string
|
|
}
|
|
Returns: string
|
|
}
|
|
}
|
|
Enums: {
|
|
interest_category:
|
|
| "pets"
|
|
| "entertainment"
|
|
| "hobbies"
|
|
| "places"
|
|
| "food"
|
|
| "school"
|
|
| "shows"
|
|
| "music"
|
|
| "art"
|
|
| "dreams"
|
|
| "achievements"
|
|
language_enum: "en-US" | "pt-BR" | "es-ES"
|
|
recording_status: "pending_analysis" | "processing" | "analyzed" | "error"
|
|
user_role: "school" | "teacher" | "student" | "admin"
|
|
}
|
|
CompositeTypes: {
|
|
analysis_details: {
|
|
words_per_minute: number | null
|
|
pause_count: number | null
|
|
error_count: number | null
|
|
self_corrections: number | null
|
|
}
|
|
analysis_feedback: {
|
|
strengths: string[] | null
|
|
improvements: string[] | null
|
|
suggestions: string | null
|
|
}
|
|
analysis_metrics: {
|
|
fluency: number | null
|
|
pronunciation: number | null
|
|
accuracy: number | null
|
|
comprehension: number | null
|
|
}
|
|
}
|
|
}
|
|
storage: {
|
|
Tables: {
|
|
buckets: {
|
|
Row: {
|
|
allowed_mime_types: string[] | null
|
|
avif_autodetection: boolean | null
|
|
created_at: string | null
|
|
file_size_limit: number | null
|
|
id: string
|
|
name: string
|
|
owner: string | null
|
|
owner_id: string | null
|
|
public: boolean | null
|
|
updated_at: string | null
|
|
}
|
|
Insert: {
|
|
allowed_mime_types?: string[] | null
|
|
avif_autodetection?: boolean | null
|
|
created_at?: string | null
|
|
file_size_limit?: number | null
|
|
id: string
|
|
name: string
|
|
owner?: string | null
|
|
owner_id?: string | null
|
|
public?: boolean | null
|
|
updated_at?: string | null
|
|
}
|
|
Update: {
|
|
allowed_mime_types?: string[] | null
|
|
avif_autodetection?: boolean | null
|
|
created_at?: string | null
|
|
file_size_limit?: number | null
|
|
id?: string
|
|
name?: string
|
|
owner?: string | null
|
|
owner_id?: string | null
|
|
public?: boolean | null
|
|
updated_at?: string | null
|
|
}
|
|
Relationships: []
|
|
}
|
|
migrations: {
|
|
Row: {
|
|
executed_at: string | null
|
|
hash: string
|
|
id: number
|
|
name: string
|
|
}
|
|
Insert: {
|
|
executed_at?: string | null
|
|
hash: string
|
|
id: number
|
|
name: string
|
|
}
|
|
Update: {
|
|
executed_at?: string | null
|
|
hash?: string
|
|
id?: number
|
|
name?: string
|
|
}
|
|
Relationships: []
|
|
}
|
|
objects: {
|
|
Row: {
|
|
bucket_id: string | null
|
|
created_at: string | null
|
|
id: string
|
|
last_accessed_at: string | null
|
|
metadata: Json | null
|
|
name: string | null
|
|
owner: string | null
|
|
owner_id: string | null
|
|
path_tokens: string[] | null
|
|
updated_at: string | null
|
|
user_metadata: Json | null
|
|
version: string | null
|
|
}
|
|
Insert: {
|
|
bucket_id?: string | null
|
|
created_at?: string | null
|
|
id?: string
|
|
last_accessed_at?: string | null
|
|
metadata?: Json | null
|
|
name?: string | null
|
|
owner?: string | null
|
|
owner_id?: string | null
|
|
path_tokens?: string[] | null
|
|
updated_at?: string | null
|
|
user_metadata?: Json | null
|
|
version?: string | null
|
|
}
|
|
Update: {
|
|
bucket_id?: string | null
|
|
created_at?: string | null
|
|
id?: string
|
|
last_accessed_at?: string | null
|
|
metadata?: Json | null
|
|
name?: string | null
|
|
owner?: string | null
|
|
owner_id?: string | null
|
|
path_tokens?: string[] | null
|
|
updated_at?: string | null
|
|
user_metadata?: Json | null
|
|
version?: string | null
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "objects_bucketId_fkey"
|
|
columns: ["bucket_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "buckets"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
s3_multipart_uploads: {
|
|
Row: {
|
|
bucket_id: string
|
|
created_at: string
|
|
id: string
|
|
in_progress_size: number
|
|
key: string
|
|
owner_id: string | null
|
|
upload_signature: string
|
|
user_metadata: Json | null
|
|
version: string
|
|
}
|
|
Insert: {
|
|
bucket_id: string
|
|
created_at?: string
|
|
id: string
|
|
in_progress_size?: number
|
|
key: string
|
|
owner_id?: string | null
|
|
upload_signature: string
|
|
user_metadata?: Json | null
|
|
version: string
|
|
}
|
|
Update: {
|
|
bucket_id?: string
|
|
created_at?: string
|
|
id?: string
|
|
in_progress_size?: number
|
|
key?: string
|
|
owner_id?: string | null
|
|
upload_signature?: string
|
|
user_metadata?: Json | null
|
|
version?: string
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "s3_multipart_uploads_bucket_id_fkey"
|
|
columns: ["bucket_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "buckets"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
s3_multipart_uploads_parts: {
|
|
Row: {
|
|
bucket_id: string
|
|
created_at: string
|
|
etag: string
|
|
id: string
|
|
key: string
|
|
owner_id: string | null
|
|
part_number: number
|
|
size: number
|
|
upload_id: string
|
|
version: string
|
|
}
|
|
Insert: {
|
|
bucket_id: string
|
|
created_at?: string
|
|
etag: string
|
|
id?: string
|
|
key: string
|
|
owner_id?: string | null
|
|
part_number: number
|
|
size?: number
|
|
upload_id: string
|
|
version: string
|
|
}
|
|
Update: {
|
|
bucket_id?: string
|
|
created_at?: string
|
|
etag?: string
|
|
id?: string
|
|
key?: string
|
|
owner_id?: string | null
|
|
part_number?: number
|
|
size?: number
|
|
upload_id?: string
|
|
version?: string
|
|
}
|
|
Relationships: [
|
|
{
|
|
foreignKeyName: "s3_multipart_uploads_parts_bucket_id_fkey"
|
|
columns: ["bucket_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "buckets"
|
|
referencedColumns: ["id"]
|
|
},
|
|
{
|
|
foreignKeyName: "s3_multipart_uploads_parts_upload_id_fkey"
|
|
columns: ["upload_id"]
|
|
isOneToOne: false
|
|
referencedRelation: "s3_multipart_uploads"
|
|
referencedColumns: ["id"]
|
|
},
|
|
]
|
|
}
|
|
}
|
|
Views: {
|
|
[_ in never]: never
|
|
}
|
|
Functions: {
|
|
can_insert_object: {
|
|
Args: {
|
|
bucketid: string
|
|
name: string
|
|
owner: string
|
|
metadata: Json
|
|
}
|
|
Returns: undefined
|
|
}
|
|
extension: {
|
|
Args: {
|
|
name: string
|
|
}
|
|
Returns: string
|
|
}
|
|
filename: {
|
|
Args: {
|
|
name: string
|
|
}
|
|
Returns: string
|
|
}
|
|
foldername: {
|
|
Args: {
|
|
name: string
|
|
}
|
|
Returns: string[]
|
|
}
|
|
get_size_by_bucket: {
|
|
Args: Record<PropertyKey, never>
|
|
Returns: {
|
|
size: number
|
|
bucket_id: string
|
|
}[]
|
|
}
|
|
list_multipart_uploads_with_delimiter: {
|
|
Args: {
|
|
bucket_id: string
|
|
prefix_param: string
|
|
delimiter_param: string
|
|
max_keys?: number
|
|
next_key_token?: string
|
|
next_upload_token?: string
|
|
}
|
|
Returns: {
|
|
key: string
|
|
id: string
|
|
created_at: string
|
|
}[]
|
|
}
|
|
list_objects_with_delimiter: {
|
|
Args: {
|
|
bucket_id: string
|
|
prefix_param: string
|
|
delimiter_param: string
|
|
max_keys?: number
|
|
start_after?: string
|
|
next_token?: string
|
|
}
|
|
Returns: {
|
|
name: string
|
|
id: string
|
|
metadata: Json
|
|
updated_at: string
|
|
}[]
|
|
}
|
|
operation: {
|
|
Args: Record<PropertyKey, never>
|
|
Returns: string
|
|
}
|
|
search: {
|
|
Args: {
|
|
prefix: string
|
|
bucketname: string
|
|
limits?: number
|
|
levels?: number
|
|
offsets?: number
|
|
search?: string
|
|
sortcolumn?: string
|
|
sortorder?: string
|
|
}
|
|
Returns: {
|
|
name: string
|
|
id: string
|
|
updated_at: string
|
|
created_at: string
|
|
last_accessed_at: string
|
|
metadata: Json
|
|
}[]
|
|
}
|
|
}
|
|
Enums: {
|
|
[_ in never]: never
|
|
}
|
|
CompositeTypes: {
|
|
[_ in never]: never
|
|
}
|
|
}
|
|
}
|
|
|
|
type PublicSchema = Database[Extract<keyof Database, "public">]
|
|
|
|
export type Tables<
|
|
PublicTableNameOrOptions extends
|
|
| keyof (PublicSchema["Tables"] & PublicSchema["Views"])
|
|
| { schema: keyof Database },
|
|
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
|
|
Database[PublicTableNameOrOptions["schema"]]["Views"])
|
|
: never = never,
|
|
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
|
|
Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
|
|
Row: infer R
|
|
}
|
|
? R
|
|
: never
|
|
: PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
|
|
PublicSchema["Views"])
|
|
? (PublicSchema["Tables"] &
|
|
PublicSchema["Views"])[PublicTableNameOrOptions] extends {
|
|
Row: infer R
|
|
}
|
|
? R
|
|
: never
|
|
: never
|
|
|
|
export type TablesInsert<
|
|
PublicTableNameOrOptions extends
|
|
| keyof PublicSchema["Tables"]
|
|
| { schema: keyof Database },
|
|
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
|
|
: never = never,
|
|
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
Insert: infer I
|
|
}
|
|
? I
|
|
: never
|
|
: PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
|
|
? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
|
|
Insert: infer I
|
|
}
|
|
? I
|
|
: never
|
|
: never
|
|
|
|
export type TablesUpdate<
|
|
PublicTableNameOrOptions extends
|
|
| keyof PublicSchema["Tables"]
|
|
| { schema: keyof Database },
|
|
TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
|
|
? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
|
|
: never = never,
|
|
> = PublicTableNameOrOptions extends { schema: keyof Database }
|
|
? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
|
|
Update: infer U
|
|
}
|
|
? U
|
|
: never
|
|
: PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
|
|
? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
|
|
Update: infer U
|
|
}
|
|
? U
|
|
: never
|
|
: never
|
|
|
|
export type Enums<
|
|
PublicEnumNameOrOptions extends
|
|
| keyof PublicSchema["Enums"]
|
|
| { schema: keyof Database },
|
|
EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
|
|
? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
|
|
: never = never,
|
|
> = PublicEnumNameOrOptions extends { schema: keyof Database }
|
|
? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
|
|
: PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
|
|
? PublicSchema["Enums"][PublicEnumNameOrOptions]
|
|
: never
|
|
|
|
export type CompositeTypes<
|
|
PublicCompositeTypeNameOrOptions extends
|
|
| keyof PublicSchema["CompositeTypes"]
|
|
| { schema: keyof Database },
|
|
CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
|
|
schema: keyof Database
|
|
}
|
|
? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"]
|
|
: never = never,
|
|
> = PublicCompositeTypeNameOrOptions extends { schema: keyof Database }
|
|
? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName]
|
|
: PublicCompositeTypeNameOrOptions extends keyof PublicSchema["CompositeTypes"]
|
|
? PublicSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions]
|
|
: never
|