Merge branch 'develop' into MED-97
This commit is contained in:
@@ -224,7 +224,6 @@ export type Database = {
|
||||
comment: string | null
|
||||
created_at: string
|
||||
id: number
|
||||
personal_code: number | null
|
||||
request_api: string
|
||||
request_api_method: string
|
||||
requested_end_date: string | null
|
||||
@@ -232,12 +231,12 @@ export type Database = {
|
||||
service_id: number | null
|
||||
service_provider_id: number | null
|
||||
status: Database["audit"]["Enums"]["request_status"]
|
||||
user_id: string | null
|
||||
}
|
||||
Insert: {
|
||||
comment?: string | null
|
||||
created_at?: string
|
||||
id?: number
|
||||
personal_code?: number | null
|
||||
request_api: string
|
||||
request_api_method: string
|
||||
requested_end_date?: string | null
|
||||
@@ -245,12 +244,12 @@ export type Database = {
|
||||
service_id?: number | null
|
||||
service_provider_id?: number | null
|
||||
status: Database["audit"]["Enums"]["request_status"]
|
||||
user_id?: string | null
|
||||
}
|
||||
Update: {
|
||||
comment?: string | null
|
||||
created_at?: string
|
||||
id?: number
|
||||
personal_code?: number | null
|
||||
request_api?: string
|
||||
request_api_method?: string
|
||||
requested_end_date?: string | null
|
||||
@@ -258,6 +257,7 @@ export type Database = {
|
||||
service_id?: number | null
|
||||
service_provider_id?: number | null
|
||||
status?: Database["audit"]["Enums"]["request_status"]
|
||||
user_id?: string | null
|
||||
}
|
||||
Relationships: []
|
||||
}
|
||||
@@ -339,48 +339,94 @@ export type Database = {
|
||||
Tables: {
|
||||
account_balance_entries: {
|
||||
Row: {
|
||||
id: string
|
||||
account_id: string
|
||||
amount: number
|
||||
entry_type: string
|
||||
description: string
|
||||
source_company_id: string
|
||||
reference_id: string
|
||||
created_at: string
|
||||
created_by: string
|
||||
expires_at: string
|
||||
created_by: string | null
|
||||
description: string | null
|
||||
entry_type: string
|
||||
expires_at: string | null
|
||||
id: string
|
||||
is_active: boolean
|
||||
is_analysis_order: boolean
|
||||
is_analysis_package_order: 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
|
||||
description: string
|
||||
source_company_id: string
|
||||
reference_id: string
|
||||
created_at: string
|
||||
created_by: string
|
||||
expires_at: string
|
||||
is_active: boolean
|
||||
expires_at?: string | null
|
||||
id?: string
|
||||
is_active?: boolean
|
||||
is_analysis_order?: boolean
|
||||
is_analysis_package_order?: boolean
|
||||
reference_id?: string | null
|
||||
source_company_id?: string | null
|
||||
}
|
||||
Update: {
|
||||
account_id?: string
|
||||
amount?: number
|
||||
entry_type?: string
|
||||
description?: string
|
||||
source_company_id?: string
|
||||
reference_id?: string
|
||||
created_at?: string
|
||||
created_by?: string
|
||||
expires_at?: string
|
||||
created_by?: string | null
|
||||
description?: string | null
|
||||
entry_type?: string
|
||||
expires_at?: string | null
|
||||
id?: string
|
||||
is_active?: boolean
|
||||
is_analysis_order?: boolean
|
||||
is_analysis_package_order?: 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: {
|
||||
Row: {
|
||||
@@ -886,6 +932,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: {
|
||||
Row: {
|
||||
account_id: string
|
||||
@@ -1102,32 +1206,76 @@ export type Database = {
|
||||
}
|
||||
Relationships: []
|
||||
}
|
||||
connected_online_locations: {
|
||||
Row: {
|
||||
address: string | null
|
||||
clinic_id: number
|
||||
created_at: string
|
||||
id: number
|
||||
name: string
|
||||
sync_id: number
|
||||
updated_at: string | null
|
||||
}
|
||||
Insert: {
|
||||
address?: string | null
|
||||
clinic_id: number
|
||||
created_at?: string
|
||||
id?: number
|
||||
name: string
|
||||
sync_id: number
|
||||
updated_at?: string | null
|
||||
}
|
||||
Update: {
|
||||
address?: string | null
|
||||
clinic_id?: number
|
||||
created_at?: string
|
||||
id?: number
|
||||
name?: string
|
||||
sync_id?: number
|
||||
updated_at?: string | null
|
||||
}
|
||||
Relationships: [
|
||||
{
|
||||
foreignKeyName: "connected_online_locations_clinic_id_fkey"
|
||||
columns: ["clinic_id"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "connected_online_providers"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
]
|
||||
}
|
||||
connected_online_providers: {
|
||||
Row: {
|
||||
address: string
|
||||
can_select_worker: boolean
|
||||
created_at: string
|
||||
email: string | null
|
||||
id: number
|
||||
key: string
|
||||
name: string
|
||||
personal_code_required: boolean
|
||||
phone_number: string | null
|
||||
updated_at: string | null
|
||||
}
|
||||
Insert: {
|
||||
address?: string
|
||||
can_select_worker: boolean
|
||||
created_at?: string
|
||||
email?: string | null
|
||||
id: number
|
||||
key: string
|
||||
name: string
|
||||
personal_code_required: boolean
|
||||
phone_number?: string | null
|
||||
updated_at?: string | null
|
||||
}
|
||||
Update: {
|
||||
address?: string
|
||||
can_select_worker?: boolean
|
||||
created_at?: string
|
||||
email?: string | null
|
||||
id?: number
|
||||
key?: string
|
||||
name?: string
|
||||
personal_code_required?: boolean
|
||||
phone_number?: string | null
|
||||
@@ -1137,54 +1285,131 @@ export type Database = {
|
||||
}
|
||||
connected_online_reservation: {
|
||||
Row: {
|
||||
booking_code: string
|
||||
booking_code: string | null
|
||||
clinic_id: number
|
||||
comments: string | null
|
||||
created_at: string
|
||||
discount_code: string | null
|
||||
id: number
|
||||
lang: string
|
||||
requires_payment: boolean
|
||||
location_sync_id: number | null
|
||||
medusa_cart_line_item_id: string | null
|
||||
requires_payment: boolean | null
|
||||
service_id: number
|
||||
service_user_id: number | null
|
||||
service_user_id: number
|
||||
start_time: string
|
||||
status: Database["medreport"]["Enums"]["connected_online_order_status"]
|
||||
sync_user_id: number
|
||||
updated_at: string | null
|
||||
user_id: string
|
||||
}
|
||||
Insert: {
|
||||
booking_code: string
|
||||
booking_code?: string | null
|
||||
clinic_id: number
|
||||
comments?: string | null
|
||||
created_at?: string
|
||||
discount_code?: string | null
|
||||
id?: number
|
||||
lang: string
|
||||
requires_payment: boolean
|
||||
location_sync_id?: number | null
|
||||
medusa_cart_line_item_id?: string | null
|
||||
requires_payment?: boolean | null
|
||||
service_id: number
|
||||
service_user_id?: number | null
|
||||
service_user_id: number
|
||||
start_time: string
|
||||
status: Database["medreport"]["Enums"]["connected_online_order_status"]
|
||||
sync_user_id: number
|
||||
updated_at?: string | null
|
||||
user_id: string
|
||||
}
|
||||
Update: {
|
||||
booking_code?: string
|
||||
booking_code?: string | null
|
||||
clinic_id?: number
|
||||
comments?: string | null
|
||||
created_at?: string
|
||||
discount_code?: string | null
|
||||
id?: number
|
||||
lang?: string
|
||||
requires_payment?: boolean
|
||||
location_sync_id?: number | null
|
||||
medusa_cart_line_item_id?: string | null
|
||||
requires_payment?: boolean | null
|
||||
service_id?: number
|
||||
service_user_id?: number | null
|
||||
service_user_id?: number
|
||||
start_time?: string
|
||||
status?: Database["medreport"]["Enums"]["connected_online_order_status"]
|
||||
sync_user_id?: number
|
||||
updated_at?: string | null
|
||||
user_id?: string
|
||||
}
|
||||
Relationships: []
|
||||
Relationships: [
|
||||
{
|
||||
foreignKeyName: "fk_reservation_clinic"
|
||||
columns: ["clinic_id"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "connected_online_providers"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
{
|
||||
foreignKeyName: "fk_reservation_service"
|
||||
columns: ["service_id"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "connected_online_services"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
]
|
||||
}
|
||||
connected_online_service_providers: {
|
||||
Row: {
|
||||
clinic_id: number
|
||||
created_at: string
|
||||
id: number
|
||||
is_deleted: boolean | null
|
||||
job_title_en: string | null
|
||||
job_title_et: string | null
|
||||
job_title_id: number | null
|
||||
job_title_ru: string | null
|
||||
name: string
|
||||
prefix: string | null
|
||||
spoken_languages: string[] | null
|
||||
updated_at: string | null
|
||||
}
|
||||
Insert: {
|
||||
clinic_id: number
|
||||
created_at?: string
|
||||
id: number
|
||||
is_deleted?: boolean | null
|
||||
job_title_en?: string | null
|
||||
job_title_et?: string | null
|
||||
job_title_id?: number | null
|
||||
job_title_ru?: string | null
|
||||
name: string
|
||||
prefix?: string | null
|
||||
spoken_languages?: string[] | null
|
||||
updated_at?: string | null
|
||||
}
|
||||
Update: {
|
||||
clinic_id?: number
|
||||
created_at?: string
|
||||
id?: number
|
||||
is_deleted?: boolean | null
|
||||
job_title_en?: string | null
|
||||
job_title_et?: string | null
|
||||
job_title_id?: number | null
|
||||
job_title_ru?: string | null
|
||||
name?: string
|
||||
prefix?: string | null
|
||||
spoken_languages?: string[] | null
|
||||
updated_at?: string | null
|
||||
}
|
||||
Relationships: [
|
||||
{
|
||||
foreignKeyName: "connected_online_service_providers_clinic_id_fkey"
|
||||
columns: ["clinic_id"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "connected_online_providers"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
]
|
||||
}
|
||||
connected_online_services: {
|
||||
Row: {
|
||||
@@ -1203,7 +1428,7 @@ export type Database = {
|
||||
price: number
|
||||
price_periods: string | null
|
||||
requires_payment: boolean
|
||||
sync_id: string
|
||||
sync_id: number
|
||||
updated_at: string | null
|
||||
}
|
||||
Insert: {
|
||||
@@ -1222,7 +1447,7 @@ export type Database = {
|
||||
price: number
|
||||
price_periods?: string | null
|
||||
requires_payment: boolean
|
||||
sync_id: string
|
||||
sync_id: number
|
||||
updated_at?: string | null
|
||||
}
|
||||
Update: {
|
||||
@@ -1241,7 +1466,7 @@ export type Database = {
|
||||
price?: number
|
||||
price_periods?: string | null
|
||||
requires_payment?: boolean
|
||||
sync_id?: string
|
||||
sync_id?: number
|
||||
updated_at?: string | null
|
||||
}
|
||||
Relationships: [
|
||||
@@ -1976,10 +2201,23 @@ export type Database = {
|
||||
}
|
||||
Returns: Database["medreport"]["Tables"]["invitations"]["Row"][]
|
||||
}
|
||||
calculate_next_distribution_date: {
|
||||
Args: { p_current_date?: string; p_occurrence: string }
|
||||
Returns: string
|
||||
}
|
||||
can_action_account_member: {
|
||||
Args: { target_team_account_id: string; target_user_id: string }
|
||||
Returns: boolean
|
||||
}
|
||||
consume_account_balance: {
|
||||
Args: {
|
||||
p_account_id: string
|
||||
p_amount: number
|
||||
p_description: string
|
||||
p_reference_id?: string
|
||||
}
|
||||
Returns: boolean
|
||||
}
|
||||
create_invitation: {
|
||||
Args: { account_id: string; email: string; role: string }
|
||||
Returns: {
|
||||
@@ -2033,6 +2271,18 @@ export type Database = {
|
||||
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: {
|
||||
Args: { account_slug: string }
|
||||
Returns: {
|
||||
@@ -2203,8 +2453,8 @@ export type Database = {
|
||||
Returns: boolean
|
||||
}
|
||||
process_periodic_benefit_distributions: {
|
||||
Args: {}
|
||||
Returns: void
|
||||
Args: Record<PropertyKey, never>
|
||||
Returns: undefined
|
||||
}
|
||||
revoke_nonce: {
|
||||
Args: { p_id: string; p_reason?: string }
|
||||
@@ -2230,6 +2480,10 @@ export type Database = {
|
||||
Args: { new_owner_id: string; target_account_id: string }
|
||||
Returns: undefined
|
||||
}
|
||||
trigger_benefit_distribution: {
|
||||
Args: { p_company_id: string }
|
||||
Returns: undefined
|
||||
}
|
||||
update_account: {
|
||||
Args:
|
||||
| {
|
||||
@@ -2269,6 +2523,14 @@ export type Database = {
|
||||
user_id: string
|
||||
}
|
||||
}
|
||||
upsert_benefit_distribution_schedule: {
|
||||
Args: {
|
||||
p_benefit_amount: number
|
||||
p_benefit_occurrence: string
|
||||
p_company_id: string
|
||||
}
|
||||
Returns: undefined
|
||||
}
|
||||
upsert_order: {
|
||||
Args: {
|
||||
billing_provider: Database["medreport"]["Enums"]["billing_provider"]
|
||||
@@ -2358,6 +2620,11 @@ export type Database = {
|
||||
| "invites.manage"
|
||||
application_role: "user" | "doctor" | "super_admin"
|
||||
billing_provider: "stripe" | "lemon-squeezy" | "paddle" | "montonio"
|
||||
connected_online_order_status:
|
||||
| "PENDING"
|
||||
| "CONFIRMED"
|
||||
| "REJECTED"
|
||||
| "CANCELLED"
|
||||
locale: "en" | "et" | "ru"
|
||||
notification_channel: "in_app" | "email"
|
||||
notification_type: "info" | "warning" | "error"
|
||||
@@ -8275,6 +8542,12 @@ export const Constants = {
|
||||
],
|
||||
application_role: ["user", "doctor", "super_admin"],
|
||||
billing_provider: ["stripe", "lemon-squeezy", "paddle", "montonio"],
|
||||
connected_online_order_status: [
|
||||
"PENDING",
|
||||
"CONFIRMED",
|
||||
"REJECTED",
|
||||
"CANCELLED",
|
||||
],
|
||||
locale: ["en", "et", "ru"],
|
||||
notification_channel: ["in_app", "email"],
|
||||
notification_type: ["info", "warning", "error"],
|
||||
|
||||
Reference in New Issue
Block a user