fix company creation for admin and inviting of new employees
This commit is contained in:
@@ -218,10 +218,24 @@ export type Database = {
|
||||
{
|
||||
foreignKeyName: "account_params_account_id_fkey"
|
||||
columns: ["account_id"]
|
||||
isOneToOne: true
|
||||
isOneToOne: false
|
||||
referencedRelation: "accounts"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
{
|
||||
foreignKeyName: "account_params_account_id_fkey"
|
||||
columns: ["account_id"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "user_account_workspace"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
{
|
||||
foreignKeyName: "account_params_account_id_fkey"
|
||||
columns: ["account_id"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "user_accounts"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
]
|
||||
}
|
||||
accounts: {
|
||||
@@ -316,7 +330,13 @@ export type Database = {
|
||||
user_id?: string
|
||||
}
|
||||
Relationships: [
|
||||
|
||||
{
|
||||
foreignKeyName: "accounts_memberships_account_id_fkey"
|
||||
columns: ["account_id"]
|
||||
isOneToOne: false
|
||||
referencedRelation: "accounts"
|
||||
referencedColumns: ["id"]
|
||||
},
|
||||
{
|
||||
foreignKeyName: "accounts_memberships_account_id_fkey"
|
||||
columns: ["account_id"]
|
||||
@@ -932,6 +952,7 @@ export type Database = {
|
||||
id: number
|
||||
invite_token: string
|
||||
invited_by: string
|
||||
personal_code: string | null
|
||||
role: string
|
||||
updated_at: string
|
||||
}
|
||||
@@ -943,6 +964,7 @@ export type Database = {
|
||||
id?: number
|
||||
invite_token: string
|
||||
invited_by: string
|
||||
personal_code?: string | null
|
||||
role: string
|
||||
updated_at?: string
|
||||
}
|
||||
@@ -954,6 +976,7 @@ export type Database = {
|
||||
id?: number
|
||||
invite_token?: string
|
||||
invited_by?: string
|
||||
personal_code?: string | null
|
||||
role?: string
|
||||
updated_at?: string
|
||||
}
|
||||
@@ -1543,7 +1566,7 @@ export type Database = {
|
||||
add_invitations_to_account: {
|
||||
Args: {
|
||||
account_slug: string
|
||||
invitations: Database["public"]["CompositeTypes"]["invitation"][]
|
||||
invitations: Database["medreport"]["CompositeTypes"]["invitation"][]
|
||||
}
|
||||
Returns: Database["medreport"]["Tables"]["invitations"]["Row"][]
|
||||
}
|
||||
@@ -1561,6 +1584,7 @@ export type Database = {
|
||||
id: number
|
||||
invite_token: string
|
||||
invited_by: string
|
||||
personal_code: string | null
|
||||
role: string
|
||||
updated_at: string
|
||||
}
|
||||
@@ -1577,7 +1601,9 @@ export type Database = {
|
||||
Returns: Json
|
||||
}
|
||||
create_team_account: {
|
||||
Args: { account_name: string }
|
||||
Args:
|
||||
| { account_name: string }
|
||||
| { account_name: string; new_personal_code: string }
|
||||
Returns: {
|
||||
city: string | null
|
||||
created_at: string | null
|
||||
@@ -1609,6 +1635,7 @@ export type Database = {
|
||||
created_at: string
|
||||
updated_at: string
|
||||
expires_at: string
|
||||
personal_code: string
|
||||
inviter_name: string
|
||||
inviter_email: string
|
||||
}[]
|
||||
@@ -1633,6 +1660,14 @@ export type Database = {
|
||||
Args: Record<PropertyKey, never>
|
||||
Returns: Json
|
||||
}
|
||||
get_invitations_with_account_ids: {
|
||||
Args: { company_id: string; personal_codes: string[] }
|
||||
Returns: {
|
||||
invite_token: string
|
||||
personal_code: string
|
||||
account_id: string
|
||||
}[]
|
||||
}
|
||||
get_nonce_status: {
|
||||
Args: { p_id: string }
|
||||
Returns: Json
|
||||
@@ -1846,7 +1881,11 @@ export type Database = {
|
||||
| "paused"
|
||||
}
|
||||
CompositeTypes: {
|
||||
[_ in never]: never
|
||||
invitation: {
|
||||
email: string | null
|
||||
role: string | null
|
||||
personal_code: string | null
|
||||
}
|
||||
}
|
||||
}
|
||||
public: {
|
||||
@@ -7531,14 +7570,6 @@ export type Database = {
|
||||
[_ in never]: never
|
||||
}
|
||||
Functions: {
|
||||
get_invitations_with_account_ids: {
|
||||
Args: { company_id: string; personal_codes: string[] }
|
||||
Returns: {
|
||||
invite_token: string
|
||||
personal_code: string
|
||||
account_id: string
|
||||
}[]
|
||||
}
|
||||
has_permission: {
|
||||
Args: {
|
||||
user_id: string
|
||||
|
||||
Reference in New Issue
Block a user