fix types
This commit is contained in:
@@ -199,7 +199,6 @@ export type Database = {
|
|||||||
changed_by: string
|
changed_by: string
|
||||||
created_at: string
|
created_at: string
|
||||||
extra_data: Json | null
|
extra_data: Json | null
|
||||||
extra_data: Json | null
|
|
||||||
id: number
|
id: number
|
||||||
}
|
}
|
||||||
Insert: {
|
Insert: {
|
||||||
@@ -208,7 +207,6 @@ export type Database = {
|
|||||||
changed_by: string
|
changed_by: string
|
||||||
created_at?: string
|
created_at?: string
|
||||||
extra_data?: Json | null
|
extra_data?: Json | null
|
||||||
extra_data?: Json | null
|
|
||||||
id?: number
|
id?: number
|
||||||
}
|
}
|
||||||
Update: {
|
Update: {
|
||||||
@@ -217,7 +215,6 @@ export type Database = {
|
|||||||
changed_by?: string
|
changed_by?: string
|
||||||
created_at?: string
|
created_at?: string
|
||||||
extra_data?: Json | null
|
extra_data?: Json | null
|
||||||
extra_data?: Json | null
|
|
||||||
id?: number
|
id?: number
|
||||||
}
|
}
|
||||||
Relationships: []
|
Relationships: []
|
||||||
@@ -340,6 +337,91 @@ export type Database = {
|
|||||||
}
|
}
|
||||||
medreport: {
|
medreport: {
|
||||||
Tables: {
|
Tables: {
|
||||||
|
account_balance_entries: {
|
||||||
|
Row: {
|
||||||
|
account_id: string
|
||||||
|
amount: number
|
||||||
|
created_at: string
|
||||||
|
created_by: string | null
|
||||||
|
description: string | null
|
||||||
|
entry_type: string
|
||||||
|
expires_at: string | null
|
||||||
|
id: string
|
||||||
|
is_active: boolean
|
||||||
|
reference_id: string | null
|
||||||
|
source_company_id: string | null
|
||||||
|
}
|
||||||
|
Insert: {
|
||||||
|
account_id: string
|
||||||
|
amount: number
|
||||||
|
created_at?: string
|
||||||
|
created_by?: string | null
|
||||||
|
description?: string | null
|
||||||
|
entry_type: string
|
||||||
|
expires_at?: string | null
|
||||||
|
id?: string
|
||||||
|
is_active?: boolean
|
||||||
|
reference_id?: string | null
|
||||||
|
source_company_id?: string | null
|
||||||
|
}
|
||||||
|
Update: {
|
||||||
|
account_id?: string
|
||||||
|
amount?: number
|
||||||
|
created_at?: string
|
||||||
|
created_by?: string | null
|
||||||
|
description?: string | null
|
||||||
|
entry_type?: string
|
||||||
|
expires_at?: string | null
|
||||||
|
id?: string
|
||||||
|
is_active?: boolean
|
||||||
|
reference_id?: string | null
|
||||||
|
source_company_id?: string | null
|
||||||
|
}
|
||||||
|
Relationships: [
|
||||||
|
{
|
||||||
|
foreignKeyName: "account_balance_entries_account_id_fkey"
|
||||||
|
columns: ["account_id"]
|
||||||
|
isOneToOne: false
|
||||||
|
referencedRelation: "accounts"
|
||||||
|
referencedColumns: ["id"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
foreignKeyName: "account_balance_entries_account_id_fkey"
|
||||||
|
columns: ["account_id"]
|
||||||
|
isOneToOne: false
|
||||||
|
referencedRelation: "user_account_workspace"
|
||||||
|
referencedColumns: ["id"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
foreignKeyName: "account_balance_entries_account_id_fkey"
|
||||||
|
columns: ["account_id"]
|
||||||
|
isOneToOne: false
|
||||||
|
referencedRelation: "user_accounts"
|
||||||
|
referencedColumns: ["id"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
foreignKeyName: "account_balance_entries_source_company_id_fkey"
|
||||||
|
columns: ["source_company_id"]
|
||||||
|
isOneToOne: false
|
||||||
|
referencedRelation: "accounts"
|
||||||
|
referencedColumns: ["id"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
foreignKeyName: "account_balance_entries_source_company_id_fkey"
|
||||||
|
columns: ["source_company_id"]
|
||||||
|
isOneToOne: false
|
||||||
|
referencedRelation: "user_account_workspace"
|
||||||
|
referencedColumns: ["id"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
foreignKeyName: "account_balance_entries_source_company_id_fkey"
|
||||||
|
columns: ["source_company_id"]
|
||||||
|
isOneToOne: false
|
||||||
|
referencedRelation: "user_accounts"
|
||||||
|
referencedColumns: ["id"]
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
account_params: {
|
account_params: {
|
||||||
Row: {
|
Row: {
|
||||||
account_id: string
|
account_id: string
|
||||||
@@ -751,9 +833,6 @@ export type Database = {
|
|||||||
response_value_is_negative: boolean | null
|
response_value_is_negative: boolean | null
|
||||||
response_value_is_within_norm: boolean | null
|
response_value_is_within_norm: boolean | null
|
||||||
status: string | null
|
status: string | null
|
||||||
response_value_is_negative: boolean | null
|
|
||||||
response_value_is_within_norm: boolean | null
|
|
||||||
status: string | null
|
|
||||||
unit: string | null
|
unit: string | null
|
||||||
updated_at: string | null
|
updated_at: string | null
|
||||||
}
|
}
|
||||||
@@ -772,12 +851,9 @@ export type Database = {
|
|||||||
original_response_element: Json
|
original_response_element: Json
|
||||||
response_time?: string | null
|
response_time?: string | null
|
||||||
response_value?: number | null
|
response_value?: number | null
|
||||||
response_time?: string | null
|
|
||||||
response_value?: number | null
|
|
||||||
response_value_is_negative?: boolean | null
|
response_value_is_negative?: boolean | null
|
||||||
response_value_is_within_norm?: boolean | null
|
response_value_is_within_norm?: boolean | null
|
||||||
status?: string | null
|
status?: string | null
|
||||||
status?: string | null
|
|
||||||
unit?: string | null
|
unit?: string | null
|
||||||
updated_at?: string | null
|
updated_at?: string | null
|
||||||
}
|
}
|
||||||
@@ -799,7 +875,6 @@ export type Database = {
|
|||||||
response_value_is_negative?: boolean | null
|
response_value_is_negative?: boolean | null
|
||||||
response_value_is_within_norm?: boolean | null
|
response_value_is_within_norm?: boolean | null
|
||||||
status?: string | null
|
status?: string | null
|
||||||
status?: string | null
|
|
||||||
unit?: string | null
|
unit?: string | null
|
||||||
updated_at?: string | null
|
updated_at?: string | null
|
||||||
}
|
}
|
||||||
@@ -851,6 +926,64 @@ export type Database = {
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
benefit_distribution_schedule: {
|
||||||
|
Row: {
|
||||||
|
benefit_amount: number
|
||||||
|
benefit_occurrence: string
|
||||||
|
company_id: string
|
||||||
|
created_at: string
|
||||||
|
id: string
|
||||||
|
is_active: boolean
|
||||||
|
last_distributed_at: string | null
|
||||||
|
next_distribution_at: string
|
||||||
|
updated_at: string
|
||||||
|
}
|
||||||
|
Insert: {
|
||||||
|
benefit_amount: number
|
||||||
|
benefit_occurrence: string
|
||||||
|
company_id: string
|
||||||
|
created_at?: string
|
||||||
|
id?: string
|
||||||
|
is_active?: boolean
|
||||||
|
last_distributed_at?: string | null
|
||||||
|
next_distribution_at: string
|
||||||
|
updated_at?: string
|
||||||
|
}
|
||||||
|
Update: {
|
||||||
|
benefit_amount?: number
|
||||||
|
benefit_occurrence?: string
|
||||||
|
company_id?: string
|
||||||
|
created_at?: string
|
||||||
|
id?: string
|
||||||
|
is_active?: boolean
|
||||||
|
last_distributed_at?: string | null
|
||||||
|
next_distribution_at?: string
|
||||||
|
updated_at?: string
|
||||||
|
}
|
||||||
|
Relationships: [
|
||||||
|
{
|
||||||
|
foreignKeyName: "benefit_distribution_schedule_company_id_fkey"
|
||||||
|
columns: ["company_id"]
|
||||||
|
isOneToOne: false
|
||||||
|
referencedRelation: "accounts"
|
||||||
|
referencedColumns: ["id"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
foreignKeyName: "benefit_distribution_schedule_company_id_fkey"
|
||||||
|
columns: ["company_id"]
|
||||||
|
isOneToOne: false
|
||||||
|
referencedRelation: "user_account_workspace"
|
||||||
|
referencedColumns: ["id"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
foreignKeyName: "benefit_distribution_schedule_company_id_fkey"
|
||||||
|
columns: ["company_id"]
|
||||||
|
isOneToOne: false
|
||||||
|
referencedRelation: "user_accounts"
|
||||||
|
referencedColumns: ["id"]
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
billing_customers: {
|
billing_customers: {
|
||||||
Row: {
|
Row: {
|
||||||
account_id: string
|
account_id: string
|
||||||
@@ -1349,7 +1482,6 @@ export type Database = {
|
|||||||
id: number
|
id: number
|
||||||
status: Database["medreport"]["Enums"]["analysis_feedback_status"]
|
status: Database["medreport"]["Enums"]["analysis_feedback_status"]
|
||||||
updated_at: string | null
|
updated_at: string | null
|
||||||
updated_at: string | null
|
|
||||||
updated_by: string | null
|
updated_by: string | null
|
||||||
user_id: string
|
user_id: string
|
||||||
value: string | null
|
value: string | null
|
||||||
@@ -1362,7 +1494,6 @@ export type Database = {
|
|||||||
id?: number
|
id?: number
|
||||||
status?: Database["medreport"]["Enums"]["analysis_feedback_status"]
|
status?: Database["medreport"]["Enums"]["analysis_feedback_status"]
|
||||||
updated_at?: string | null
|
updated_at?: string | null
|
||||||
updated_at?: string | null
|
|
||||||
updated_by?: string | null
|
updated_by?: string | null
|
||||||
user_id: string
|
user_id: string
|
||||||
value?: string | null
|
value?: string | null
|
||||||
@@ -1375,7 +1506,6 @@ export type Database = {
|
|||||||
id?: number
|
id?: number
|
||||||
status?: Database["medreport"]["Enums"]["analysis_feedback_status"]
|
status?: Database["medreport"]["Enums"]["analysis_feedback_status"]
|
||||||
updated_at?: string | null
|
updated_at?: string | null
|
||||||
updated_at?: string | null
|
|
||||||
updated_by?: string | null
|
updated_by?: string | null
|
||||||
user_id?: string
|
user_id?: string
|
||||||
value?: string | null
|
value?: string | null
|
||||||
@@ -1462,7 +1592,6 @@ export type Database = {
|
|||||||
Row: {
|
Row: {
|
||||||
action: string
|
action: string
|
||||||
created_at: string | null
|
created_at: string | null
|
||||||
created_at: string | null
|
|
||||||
has_analysis_results: boolean
|
has_analysis_results: boolean
|
||||||
has_error: boolean
|
has_error: boolean
|
||||||
id: string
|
id: string
|
||||||
@@ -1472,13 +1601,6 @@ export type Database = {
|
|||||||
response_xml: string | null
|
response_xml: string | null
|
||||||
updated_at: string | null
|
updated_at: string | null
|
||||||
xml: string | null
|
xml: string | null
|
||||||
id: string
|
|
||||||
medipost_external_order_id: string | null
|
|
||||||
medipost_private_message_id: string | null
|
|
||||||
medusa_order_id: string | null
|
|
||||||
response_xml: string | null
|
|
||||||
updated_at: string | null
|
|
||||||
xml: string | null
|
|
||||||
}
|
}
|
||||||
Insert: {
|
Insert: {
|
||||||
action: string
|
action: string
|
||||||
@@ -1505,31 +1627,7 @@ export type Database = {
|
|||||||
response_xml?: string | null
|
response_xml?: string | null
|
||||||
updated_at?: string | null
|
updated_at?: string | null
|
||||||
xml?: string | null
|
xml?: string | null
|
||||||
created_at?: string | null
|
|
||||||
has_analysis_results?: boolean
|
|
||||||
has_error?: boolean
|
|
||||||
id?: string
|
|
||||||
medipost_external_order_id?: string | null
|
|
||||||
medipost_private_message_id?: string | null
|
|
||||||
medusa_order_id?: string | null
|
|
||||||
response_xml?: string | null
|
|
||||||
updated_at?: string | null
|
|
||||||
xml?: string | null
|
|
||||||
}
|
}
|
||||||
Update: {
|
|
||||||
action?: string
|
|
||||||
created_at?: string | null
|
|
||||||
has_analysis_results?: boolean
|
|
||||||
has_error?: boolean
|
|
||||||
id?: string
|
|
||||||
medipost_external_order_id?: string | null
|
|
||||||
medipost_private_message_id?: string | null
|
|
||||||
medusa_order_id?: string | null
|
|
||||||
response_xml?: string | null
|
|
||||||
updated_at?: string | null
|
|
||||||
xml?: string | null
|
|
||||||
}
|
|
||||||
Relationships: []
|
|
||||||
Relationships: []
|
Relationships: []
|
||||||
}
|
}
|
||||||
medreport_product_groups: {
|
medreport_product_groups: {
|
||||||
@@ -2097,10 +2195,23 @@ export type Database = {
|
|||||||
}
|
}
|
||||||
Returns: Database["medreport"]["Tables"]["invitations"]["Row"][]
|
Returns: Database["medreport"]["Tables"]["invitations"]["Row"][]
|
||||||
}
|
}
|
||||||
|
calculate_next_distribution_date: {
|
||||||
|
Args: { p_current_date?: string; p_occurrence: string }
|
||||||
|
Returns: string
|
||||||
|
}
|
||||||
can_action_account_member: {
|
can_action_account_member: {
|
||||||
Args: { target_team_account_id: string; target_user_id: string }
|
Args: { target_team_account_id: string; target_user_id: string }
|
||||||
Returns: boolean
|
Returns: boolean
|
||||||
}
|
}
|
||||||
|
consume_account_balance: {
|
||||||
|
Args: {
|
||||||
|
p_account_id: string
|
||||||
|
p_amount: number
|
||||||
|
p_description: string
|
||||||
|
p_reference_id?: string
|
||||||
|
}
|
||||||
|
Returns: boolean
|
||||||
|
}
|
||||||
create_invitation: {
|
create_invitation: {
|
||||||
Args: { account_id: string; email: string; role: string }
|
Args: { account_id: string; email: string; role: string }
|
||||||
Returns: {
|
Returns: {
|
||||||
@@ -2154,6 +2265,18 @@ export type Database = {
|
|||||||
updated_by: string | null
|
updated_by: string | null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
distribute_health_benefits: {
|
||||||
|
Args: {
|
||||||
|
p_benefit_amount: number
|
||||||
|
p_benefit_occurrence?: string
|
||||||
|
p_company_id: string
|
||||||
|
}
|
||||||
|
Returns: undefined
|
||||||
|
}
|
||||||
|
get_account_balance: {
|
||||||
|
Args: { p_account_id: string }
|
||||||
|
Returns: number
|
||||||
|
}
|
||||||
get_account_invitations: {
|
get_account_invitations: {
|
||||||
Args: { account_slug: string }
|
Args: { account_slug: string }
|
||||||
Returns: {
|
Returns: {
|
||||||
@@ -2199,6 +2322,18 @@ export type Database = {
|
|||||||
personal_code: string
|
personal_code: string
|
||||||
}[]
|
}[]
|
||||||
}
|
}
|
||||||
|
get_latest_analysis_response_elements_for_current_user: {
|
||||||
|
Args: { p_user_id: string }
|
||||||
|
Returns: {
|
||||||
|
analysis_name: string
|
||||||
|
analysis_name_lab: string
|
||||||
|
norm_lower: number
|
||||||
|
norm_status: number
|
||||||
|
norm_upper: number
|
||||||
|
response_time: string
|
||||||
|
response_value: number
|
||||||
|
}[]
|
||||||
|
}
|
||||||
get_latest_medipost_dispatch_state_for_order: {
|
get_latest_medipost_dispatch_state_for_order: {
|
||||||
Args: { medusa_order_id: string }
|
Args: { medusa_order_id: string }
|
||||||
Returns: {
|
Returns: {
|
||||||
@@ -2301,9 +2436,10 @@ export type Database = {
|
|||||||
order_has_medipost_dispatch_error: {
|
order_has_medipost_dispatch_error: {
|
||||||
Args: { medusa_order_id: string }
|
Args: { medusa_order_id: string }
|
||||||
Returns: boolean
|
Returns: boolean
|
||||||
order_has_medipost_dispatch_error: {
|
}
|
||||||
Args: { medusa_order_id: string }
|
process_periodic_benefit_distributions: {
|
||||||
Returns: boolean
|
Args: Record<PropertyKey, never>
|
||||||
|
Returns: undefined
|
||||||
}
|
}
|
||||||
revoke_nonce: {
|
revoke_nonce: {
|
||||||
Args: { p_id: string; p_reason?: string }
|
Args: { p_id: string; p_reason?: string }
|
||||||
@@ -2329,27 +2465,11 @@ export type Database = {
|
|||||||
Args: { new_owner_id: string; target_account_id: string }
|
Args: { new_owner_id: string; target_account_id: string }
|
||||||
Returns: undefined
|
Returns: undefined
|
||||||
}
|
}
|
||||||
|
trigger_benefit_distribution: {
|
||||||
|
Args: { p_company_id: string }
|
||||||
|
Returns: undefined
|
||||||
|
}
|
||||||
update_account: {
|
update_account: {
|
||||||
Args:
|
|
||||||
| {
|
|
||||||
p_city: string
|
|
||||||
p_email: string
|
|
||||||
p_has_consent_personal_data: boolean
|
|
||||||
p_last_name: string
|
|
||||||
p_name: string
|
|
||||||
p_personal_code: string
|
|
||||||
p_phone: string
|
|
||||||
p_uid: string
|
|
||||||
}
|
|
||||||
| {
|
|
||||||
p_city: string
|
|
||||||
p_has_consent_personal_data: boolean
|
|
||||||
p_last_name: string
|
|
||||||
p_name: string
|
|
||||||
p_personal_code: string
|
|
||||||
p_phone: string
|
|
||||||
p_uid: string
|
|
||||||
}
|
|
||||||
Args:
|
Args:
|
||||||
| {
|
| {
|
||||||
p_city: string
|
p_city: string
|
||||||
@@ -2388,6 +2508,14 @@ export type Database = {
|
|||||||
user_id: string
|
user_id: string
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
upsert_benefit_distribution_schedule: {
|
||||||
|
Args: {
|
||||||
|
p_benefit_amount: number
|
||||||
|
p_benefit_occurrence: string
|
||||||
|
p_company_id: string
|
||||||
|
}
|
||||||
|
Returns: undefined
|
||||||
|
}
|
||||||
upsert_order: {
|
upsert_order: {
|
||||||
Args: {
|
Args: {
|
||||||
billing_provider: Database["medreport"]["Enums"]["billing_provider"]
|
billing_provider: Database["medreport"]["Enums"]["billing_provider"]
|
||||||
|
|||||||
Reference in New Issue
Block a user