Co-authored-by: renee-png <262607627+renee-png@users.noreply.github.com>
This commit is contained in:
gpt-engineer-app[bot]
2026-04-17 02:51:56 +00:00
co-authored by renee-png
parent ff3afeef11
commit f524dc8fd1
2 changed files with 630 additions and 0 deletions
+391
View File
@@ -690,6 +690,47 @@ export type Database = {
},
]
}
comments: {
Row: {
author_id: string
body: string
case_id: string | null
created_at: string
edited_at: string | null
entity_id: string
entity_type: Database["public"]["Enums"]["comment_entity"]
id: string
}
Insert: {
author_id: string
body?: string
case_id?: string | null
created_at?: string
edited_at?: string | null
entity_id: string
entity_type: Database["public"]["Enums"]["comment_entity"]
id?: string
}
Update: {
author_id?: string
body?: string
case_id?: string | null
created_at?: string
edited_at?: string | null
entity_id?: string
entity_type?: Database["public"]["Enums"]["comment_entity"]
id?: string
}
Relationships: [
{
foreignKeyName: "comments_case_id_fkey"
columns: ["case_id"]
isOneToOne: false
referencedRelation: "cases"
referencedColumns: ["id"]
},
]
}
contacts: {
Row: {
address_line1: string | null
@@ -1517,6 +1558,73 @@ export type Database = {
},
]
}
notifications: {
Row: {
body: string | null
case_id: string | null
conversation_id: string | null
created_at: string
created_by: string | null
id: string
kind: Database["public"]["Enums"]["notification_kind"]
link: string | null
read_at: string | null
task_id: string | null
title: string
user_id: string
}
Insert: {
body?: string | null
case_id?: string | null
conversation_id?: string | null
created_at?: string
created_by?: string | null
id?: string
kind: Database["public"]["Enums"]["notification_kind"]
link?: string | null
read_at?: string | null
task_id?: string | null
title: string
user_id: string
}
Update: {
body?: string | null
case_id?: string | null
conversation_id?: string | null
created_at?: string
created_by?: string | null
id?: string
kind?: Database["public"]["Enums"]["notification_kind"]
link?: string | null
read_at?: string | null
task_id?: string | null
title?: string
user_id?: string
}
Relationships: [
{
foreignKeyName: "notifications_case_id_fkey"
columns: ["case_id"]
isOneToOne: false
referencedRelation: "cases"
referencedColumns: ["id"]
},
{
foreignKeyName: "notifications_conversation_id_fkey"
columns: ["conversation_id"]
isOneToOne: false
referencedRelation: "conversations"
referencedColumns: ["id"]
},
{
foreignKeyName: "notifications_task_id_fkey"
columns: ["task_id"]
isOneToOne: false
referencedRelation: "tasks"
referencedColumns: ["id"]
},
]
}
payment_plan_installments: {
Row: {
amount: number
@@ -1701,6 +1809,184 @@ export type Database = {
},
]
}
task_assignees: {
Row: {
assigned_by: string | null
created_at: string
id: string
task_id: string
user_id: string
}
Insert: {
assigned_by?: string | null
created_at?: string
id?: string
task_id: string
user_id: string
}
Update: {
assigned_by?: string | null
created_at?: string
id?: string
task_id?: string
user_id?: string
}
Relationships: [
{
foreignKeyName: "task_assignees_task_id_fkey"
columns: ["task_id"]
isOneToOne: false
referencedRelation: "tasks"
referencedColumns: ["id"]
},
]
}
task_comments: {
Row: {
author_id: string
body: string
created_at: string
edited_at: string | null
id: string
task_id: string
}
Insert: {
author_id: string
body?: string
created_at?: string
edited_at?: string | null
id?: string
task_id: string
}
Update: {
author_id?: string
body?: string
created_at?: string
edited_at?: string | null
id?: string
task_id?: string
}
Relationships: [
{
foreignKeyName: "task_comments_task_id_fkey"
columns: ["task_id"]
isOneToOne: false
referencedRelation: "tasks"
referencedColumns: ["id"]
},
]
}
task_history: {
Row: {
actor_id: string | null
created_at: string
detail: Json
event: string
id: string
task_id: string
}
Insert: {
actor_id?: string | null
created_at?: string
detail?: Json
event: string
id?: string
task_id: string
}
Update: {
actor_id?: string | null
created_at?: string
detail?: Json
event?: string
id?: string
task_id?: string
}
Relationships: [
{
foreignKeyName: "task_history_task_id_fkey"
columns: ["task_id"]
isOneToOne: false
referencedRelation: "tasks"
referencedColumns: ["id"]
},
]
}
tasks: {
Row: {
case_id: string | null
completed_at: string | null
completed_by: string | null
created_at: string
created_by: string | null
description: string | null
due_date: string | null
id: string
parent_task_id: string | null
priority: Database["public"]["Enums"]["task_priority"]
sort_order: number
status: Database["public"]["Enums"]["task_status"]
title: string
updated_at: string
workflow_template_id: string | null
}
Insert: {
case_id?: string | null
completed_at?: string | null
completed_by?: string | null
created_at?: string
created_by?: string | null
description?: string | null
due_date?: string | null
id?: string
parent_task_id?: string | null
priority?: Database["public"]["Enums"]["task_priority"]
sort_order?: number
status?: Database["public"]["Enums"]["task_status"]
title: string
updated_at?: string
workflow_template_id?: string | null
}
Update: {
case_id?: string | null
completed_at?: string | null
completed_by?: string | null
created_at?: string
created_by?: string | null
description?: string | null
due_date?: string | null
id?: string
parent_task_id?: string | null
priority?: Database["public"]["Enums"]["task_priority"]
sort_order?: number
status?: Database["public"]["Enums"]["task_status"]
title?: string
updated_at?: string
workflow_template_id?: string | null
}
Relationships: [
{
foreignKeyName: "tasks_case_id_fkey"
columns: ["case_id"]
isOneToOne: false
referencedRelation: "cases"
referencedColumns: ["id"]
},
{
foreignKeyName: "tasks_parent_task_id_fkey"
columns: ["parent_task_id"]
isOneToOne: false
referencedRelation: "tasks"
referencedColumns: ["id"]
},
{
foreignKeyName: "tasks_workflow_template_id_fkey"
columns: ["workflow_template_id"]
isOneToOne: false
referencedRelation: "workflow_templates"
referencedColumns: ["id"]
},
]
}
time_entries: {
Row: {
billable: boolean
@@ -1779,6 +2065,80 @@ export type Database = {
}
Relationships: []
}
workflow_template_tasks: {
Row: {
created_at: string
days_from_start: number
default_assignee_id: string | null
description: string | null
id: string
priority: Database["public"]["Enums"]["task_priority"]
sort_order: number
template_id: string
title: string
updated_at: string
}
Insert: {
created_at?: string
days_from_start?: number
default_assignee_id?: string | null
description?: string | null
id?: string
priority?: Database["public"]["Enums"]["task_priority"]
sort_order?: number
template_id: string
title: string
updated_at?: string
}
Update: {
created_at?: string
days_from_start?: number
default_assignee_id?: string | null
description?: string | null
id?: string
priority?: Database["public"]["Enums"]["task_priority"]
sort_order?: number
template_id?: string
title?: string
updated_at?: string
}
Relationships: [
{
foreignKeyName: "workflow_template_tasks_template_id_fkey"
columns: ["template_id"]
isOneToOne: false
referencedRelation: "workflow_templates"
referencedColumns: ["id"]
},
]
}
workflow_templates: {
Row: {
created_at: string
created_by: string | null
description: string | null
id: string
name: string
updated_at: string
}
Insert: {
created_at?: string
created_by?: string | null
description?: string | null
id?: string
name: string
updated_at?: string
}
Update: {
created_at?: string
created_by?: string | null
description?: string | null
id?: string
name?: string
updated_at?: string
}
Relationships: []
}
}
Views: {
[_ in never]: never
@@ -1788,6 +2148,10 @@ export type Database = {
Args: { _case_id: string; _user_id: string }
Returns: boolean
}
can_access_task: {
Args: { _task_id: string; _user_id: string }
Returns: boolean
}
has_role: {
Args: {
_role: Database["public"]["Enums"]["app_role"]
@@ -1811,7 +2175,20 @@ export type Database = {
| "closed_lost"
| "closed"
client_type: "hoa" | "individual" | "business" | "condo"
comment_entity: "case" | "document"
invoice_status: "draft" | "sent" | "paid" | "overdue" | "void"
notification_kind:
| "task_assigned"
| "task_mention"
| "task_comment"
| "task_due"
| "task_completed"
| "case_mention"
| "document_mention"
| "message_mention"
| "message"
task_priority: "low" | "normal" | "high" | "urgent"
task_status: "incomplete" | "complete"
}
CompositeTypes: {
[_ in never]: never
@@ -1949,7 +2326,21 @@ export const Constants = {
"closed",
],
client_type: ["hoa", "individual", "business", "condo"],
comment_entity: ["case", "document"],
invoice_status: ["draft", "sent", "paid", "overdue", "void"],
notification_kind: [
"task_assigned",
"task_mention",
"task_comment",
"task_due",
"task_completed",
"case_mention",
"document_mention",
"message_mention",
"message",
],
task_priority: ["low", "normal", "high", "urgent"],
task_status: ["incomplete", "complete"],
},
},
} as const