export type Json =
| string
| number
| boolean
| null
| { [key: string]: Json | undefined }
| Json[];
export interface Database {
graphql_public: {
Tables: {
[_ in never]: never;
};
Views: {
[_ in never]: never;
};
Functions: {
graphql: {
Args: {
operationName?: string;
query?: string;
variables?: Json;
extensions?: Json;
};
Returns: Json;
};
};
Enums: {
[_ in never]: never;
};
CompositeTypes: {
[_ in never]: never;
};
};
public: {
Tables: {
Assistance: {
Row: {
created_at: string;
created_by: string;
email: string;
id: number;
notes: string;
position: number | null;
resolved_at: string | null;
resolved_by: string | null;
};
Insert: {
created_at?: string;
created_by: string;
email: string;
id?: number;
notes: string;
position?: number | null;
resolved_at?: string | null;
resolved_by?: string | null;
};
Update: {
created_at?: string;
created_by?: string;
email?: string;
id?: number;
notes?: string;
position?: number | null;
resolved_at?: string | null;
resolved_by?: string | null;
};
Relationships: [
{
foreignKeyName: "Assistance_created_by_fkey";
columns: ["created_by"];
referencedRelation: "users";
referencedColumns: ["id"];
},
{
foreignKeyName: "Assistance_created_by_fkey";
columns: ["created_by"];
referencedRelation: "users_view";
referencedColumns: ["id"];
},
{
foreignKeyName: "Assistance_email_fkey";
columns: ["email"];
referencedRelation: "IncomingEmails";
referencedColumns: ["id"];
},
{
foreignKeyName: "Assistance_email_fkey";
columns: ["email"];
referencedRelation: "email_queue";
referencedColumns: ["email_id"];
},
{
foreignKeyName: "Assistance_email_fkey";
columns: ["email"];
referencedRelation: "external_api_results";
referencedColumns: ["email_id"];
},
{
foreignKeyName: "Assistance_email_fkey";
columns: ["email"];
referencedRelation: "sedna_email_queue";
referencedColumns: ["email_id"];
},
{
foreignKeyName: "Assistance_position_fkey";
columns: ["position"];
referencedRelation: "Positions";
referencedColumns: ["id"];
},
{
foreignKeyName: "Assistance_resolved_by_fkey";
columns: ["resolved_by"];
referencedRelation: "users";
referencedColumns: ["id"];
},
{
foreignKeyName: "Assistance_resolved_by_fkey";
columns: ["resolved_by"];
referencedRelation: "users_view";
referencedColumns: ["id"];
}
];
};
Cargo: {
Row: {
charter_type: string | null;
charterer: string | null;
discharging: number[] | null;
discharging_json: Json[] | null;
end_date: string | null;
id: number;
loading: number[] | null;
loading_json: Json[] | null;
name: string;
notes: string | null;
quantity: number;
report: string;
start_date: string | null;
tolerance: number | null;
tolerance_type: string;
type: string | null;
unit: string | null;
updated_at: string;
};
Insert: {
charter_type?: string | null;
charterer?: string | null;
discharging?: number[] | null;
discharging_json?: Json[] | null;
end_date?: string | null;
id?: number;
loading?: number[] | null;
loading_json?: Json[] | null;
name?: string;
notes?: string | null;
quantity: number;
report: string;
start_date?: string | null;
tolerance?: number | null;
tolerance_type?: string;
type?: string | null;
unit?: string | null;
updated_at?: string;
};
Update: {
charter_type?: string | null;
charterer?: string | null;
discharging?: number[] | null;
discharging_json?: Json[] | null;
end_date?: string | null;
id?: number;
loading?: number[] | null;
loading_json?: Json[] | null;
name?: string;
notes?: string | null;
quantity?: number;
report?: string;
start_date?: string | null;
tolerance?: number | null;
tolerance_type?: string;
type?: string | null;
unit?: string | null;
updated_at?: string;
};
Relationships: [
{
foreignKeyName: "Cargo_report_fkey";
columns: ["report"];
referencedRelation: "CargoReports";
referencedColumns: ["id"];
}
];
};
CargoParserResults: {
Row: {
created_at: string | null;
email: string | null;
email_id: string;
filename: string | null;
result: Json | null;
tokens: Json | null;
type: string | null;
version: string | null;
};
Insert: {
created_at?: string | null;
email?: string | null;
email_id: string;
filename?: string | null;
result?: Json | null;
tokens?: Json | null;
type?: string | null;
version?: string | null;
};
Update: {
created_at?: string | null;
email?: string | null;
email_id?: string;
filename?: string | null;
result?: Json | null;
tokens?: Json | null;
type?: string | null;
version?: string | null;
};
Relationships: [
{
foreignKeyName: "CargoParserResults_email_id_fkey";
columns: ["email_id"];
referencedRelation: "IncomingEmails";
referencedColumns: ["id"];
},
{
foreignKeyName: "CargoParserResults_email_id_fkey";
columns: ["email_id"];
referencedRelation: "email_queue";
referencedColumns: ["email_id"];
},
{
foreignKeyName: "CargoParserResults_email_id_fkey";
columns: ["email_id"];
referencedRelation: "external_api_results";
referencedColumns: ["email_id"];
},
{
foreignKeyName: "CargoParserResults_email_id_fkey";
columns: ["email_id"];
referencedRelation: "sedna_email_queue";
referencedColumns: ["email_id"];
}
];
};
CargoReports: {
Row: {
complete: boolean | null;
completed_by: string | null;
created_at: string | null;
created_by: string | null;
email: string | null;
id: string;
};
Insert: {
complete?: boolean | null;
completed_by?: string | null;
created_at?: string | null;
created_by?: string | null;
email?: string | null;
id?: string;
};
Update: {
complete?: boolean | null;
completed_by?: string | null;
created_at?: string | null;
created_by?: string | null;
email?: string | null;
id?: string;
};
Relationships: [
{
foreignKeyName: "CargoReports_completed_by_fkey";
columns: ["completed_by"];
referencedRelation: "users";
referencedColumns: ["id"];
},
{
foreignKeyName: "CargoReports_completed_by_fkey";
columns: ["completed_by"];
referencedRelation: "users_view";
referencedColumns: ["id"];
},
{
foreignKeyName: "CargoReports_created_by_fkey";
columns: ["created_by"];
referencedRelation: "users";
referencedColumns: ["id"];
},
{
foreignKeyName: "CargoReports_created_by_fkey";
columns: ["created_by"];
referencedRelation: "users_view";
referencedColumns: ["id"];
},
{
foreignKeyName: "CargoReports_email_fkey";
columns: ["email"];
referencedRelation: "IncomingEmails";
referencedColumns: ["id"];
},
{
foreignKeyName: "CargoReports_email_fkey";
columns: ["email"];
referencedRelation: "email_queue";
referencedColumns: ["email_id"];
},
{
foreignKeyName: "CargoReports_email_fkey";
columns: ["email"];
referencedRelation: "external_api_results";
referencedColumns: ["email_id"];
},
{
foreignKeyName: "CargoReports_email_fkey";
columns: ["email"];
referencedRelation: "sedna_email_queue";
referencedColumns: ["email_id"];
}
];
};
Clients: {
Row: {
api_key: string | null;
broker_id: number | null;
cargo: boolean;
created_at: string | null;
external_partner: string | null;
id: string;
name: string;
notes: string | null;
priority: number;
status: string | null;
user_count: number;
};
Insert: {
api_key?: string | null;
broker_id?: number | null;
cargo?: boolean;
created_at?: string | null;
external_partner?: string | null;
id?: string;
name: string;
notes?: string | null;
priority?: number;
status?: string | null;
user_count?: number;
};
Update: {
api_key?: string | null;
broker_id?: number | null;
cargo?: boolean;
created_at?: string | null;
external_partner?: string | null;
id?: string;
name?: string;
notes?: string | null;
priority?: number;
status?: string | null;
user_count?: number;
};
Relationships: [];
};
FailedEmails: {
Row: {
completed: string | null;
created_at: string;
filename: string | null;
id: string;
message: string | null;
};
Insert: {
completed?: string | null;
created_at?: string;
filename?: string | null;
id?: string;
message?: string | null;
};
Update: {
completed?: string | null;
created_at?: string;
filename?: string | null;
id?: string;
message?: string | null;
};
Relationships: [];
};
FeatureFlagRules: {
Row: {
created_at: string;
environments: string[] | null;
flag: number | null;
id: number;
invert: boolean;
users_email: string[] | null;
};
Insert: {
created_at?: string;
environments?: string[] | null;
flag?: number | null;
id?: number;
invert?: boolean;
users_email?: string[] | null;
};
Update: {
created_at?: string;
environments?: string[] | null;
flag?: number | null;
id?: number;
invert?: boolean;
users_email?: string[] | null;
};
Relationships: [
{
foreignKeyName: "FeatureFlagRules_flag_fkey";
columns: ["flag"];
referencedRelation: "FeatureFlags";
referencedColumns: ["id"];
}
];
};
FeatureFlags: {
Row: {
active: boolean;
created_at: string;
id: number;
name: string;
};
Insert: {
active?: boolean;
created_at?: string;
id?: number;
name: string;
};
Update: {
active?: boolean;
created_at?: string;
id?: number;
name?: string;
};
Relationships: [];
};
IncomingEmailHistory: {
Row: {
client: string | null;
email: string | null;
external_id: string | null;
filename: string | null;
id: number;
received_at: string | null;
source: string | null;
};
Insert: {
client?: string | null;
email?: string | null;
external_id?: string | null;
filename?: string | null;
id?: number;
received_at?: string | null;
source?: string | null;
};
Update: {
client?: string | null;
email?: string | null;
external_id?: string | null;
filename?: string | null;
id?: number;
received_at?: string | null;
source?: string | null;
};
Relationships: [
{
foreignKeyName: "IncomingEmailHistory_email_fkey";
columns: ["email"];
referencedRelation: "IncomingEmails";
referencedColumns: ["id"];
},
{
foreignKeyName: "IncomingEmailHistory_email_fkey";
columns: ["email"];
referencedRelation: "email_queue";
referencedColumns: ["email_id"];
},
{
foreignKeyName: "IncomingEmailHistory_email_fkey";
columns: ["email"];
referencedRelation: "external_api_results";
referencedColumns: ["email_id"];
},
{
foreignKeyName: "IncomingEmailHistory_email_fkey";
columns: ["email"];
referencedRelation: "sedna_email_queue";
referencedColumns: ["email_id"];
}
];
};
IncomingEmails: {
Row: {
attachments: Json[] | null;
body_html: string;
body_text: string | null;
body_text_hash: string | null;
classification: string | null;
clients: string[] | null;
complete: boolean;
completed_at: string | null;
completed_by: string | null;
created_at: string | null;
from: string;
id: string;
priority: number;
received: string | null;
subject: string;
to: string;
};
Insert: {
attachments?: Json[] | null;
body_html?: string;
body_text?: string | null;
body_text_hash?: string | null;
classification?: string | null;
clients?: string[] | null;
complete?: boolean;
completed_at?: string | null;
completed_by?: string | null;
created_at?: string | null;
from?: string;
id?: string;
priority?: number;
received?: string | null;
subject?: string;
to?: string;
};
Update: {
attachments?: Json[] | null;
body_html?: string;
body_text?: string | null;
body_text_hash?: string | null;
classification?: string | null;
clients?: string[] | null;
complete?: boolean;
completed_at?: string | null;
completed_by?: string | null;
created_at?: string | null;
from?: string;
id?: string;
priority?: number;
received?: string | null;
subject?: string;
to?: string;
};
Relationships: [];
};
JunkEmailSender: {
Row: {
created_at: string;
email_address: string | null;
id: number;
};
Insert: {
created_at?: string;
email_address?: string | null;
id?: number;
};
Update: {
created_at?: string;
email_address?: string | null;
id?: number;
};
Relationships: [];
};
ParserResults: {
Row: {
cargo_confidence: number | null;
created_at: string | null;
email_id: string;
filename: string;
junk_confidence: number | null;
position_confidence: number | null;
};
Insert: {
cargo_confidence?: number | null;
created_at?: string | null;
email_id: string;
filename: string;
junk_confidence?: number | null;
position_confidence?: number | null;
};
Update: {
cargo_confidence?: number | null;
created_at?: string | null;
email_id?: string;
filename?: string;
junk_confidence?: number | null;
position_confidence?: number | null;
};
Relationships: [
{
foreignKeyName: "ParserResults_email_id_fkey";
columns: ["email_id"];
referencedRelation: "IncomingEmails";
referencedColumns: ["id"];
},
{
foreignKeyName: "ParserResults_email_id_fkey";
columns: ["email_id"];
referencedRelation: "email_queue";
referencedColumns: ["email_id"];
},
{
foreignKeyName: "ParserResults_email_id_fkey";
columns: ["email_id"];
referencedRelation: "external_api_results";
referencedColumns: ["email_id"];
},
{
foreignKeyName: "ParserResults_email_id_fkey";
columns: ["email_id"];
referencedRelation: "sedna_email_queue";
referencedColumns: ["email_id"];
}
];
};
PositionParserResults: {
Row: {
created_at: string | null;
email: string | null;
email_id: string;
filename: string | null;
result: Json | null;
tokens: Json | null;
type: string | null;
version: string | null;
};
Insert: {
created_at?: string | null;
email?: string | null;
email_id: string;
filename?: string | null;
result?: Json | null;
tokens?: Json | null;
type?: string | null;
version?: string | null;
};
Update: {
created_at?: string | null;
email?: string | null;
email_id?: string;
filename?: string | null;
result?: Json | null;
tokens?: Json | null;
type?: string | null;
version?: string | null;
};
Relationships: [
{
foreignKeyName: "PositionParserResults_email_id_fkey";
columns: ["email_id"];
referencedRelation: "IncomingEmails";
referencedColumns: ["id"];
},
{
foreignKeyName: "PositionParserResults_email_id_fkey";
columns: ["email_id"];
referencedRelation: "email_queue";
referencedColumns: ["email_id"];
},
{
foreignKeyName: "PositionParserResults_email_id_fkey";
columns: ["email_id"];
referencedRelation: "external_api_results";
referencedColumns: ["email_id"];
},
{
foreignKeyName: "PositionParserResults_email_id_fkey";
columns: ["email_id"];
referencedRelation: "sedna_email_queue";
referencedColumns: ["email_id"];
}
];
};
Positions: {
Row: {
complete: boolean;
completed_by: string | null;
created_at: string | null;
created_by: string | null;
email: string;
id: number;
positions: Json[] | null;
};
Insert: {
complete?: boolean;
completed_by?: string | null;
created_at?: string | null;
created_by?: string | null;
email: string;
id?: number;
positions?: Json[] | null;
};
Update: {
complete?: boolean;
completed_by?: string | null;
created_at?: string | null;
created_by?: string | null;
email?: string;
id?: number;
positions?: Json[] | null;
};
Relationships: [
{
foreignKeyName: "Positions_completed_by_fkey";
columns: ["completed_by"];
referencedRelation: "users";
referencedColumns: ["id"];
},
{
foreignKeyName: "Positions_completed_by_fkey";
columns: ["completed_by"];
referencedRelation: "users_view";
referencedColumns: ["id"];
},
{
foreignKeyName: "Positions_created_by_fkey";
columns: ["created_by"];
referencedRelation: "users";
referencedColumns: ["id"];
},
{
foreignKeyName: "Positions_created_by_fkey";
columns: ["created_by"];
referencedRelation: "users_view";
referencedColumns: ["id"];
},
{
foreignKeyName: "Positions_email_fkey";
columns: ["email"];
referencedRelation: "IncomingEmails";
referencedColumns: ["id"];
},
{
foreignKeyName: "Positions_email_fkey";
columns: ["email"];
referencedRelation: "email_queue";
referencedColumns: ["email_id"];
},
{
foreignKeyName: "Positions_email_fkey";
columns: ["email"];
referencedRelation: "external_api_results";
referencedColumns: ["email_id"];
},
{
foreignKeyName: "Positions_email_fkey";
columns: ["email"];
referencedRelation: "sedna_email_queue";
referencedColumns: ["email_id"];
}
];
};
UserHistory: {
Row: {
action: string;
created_at: string | null;
detail: Json | null;
id: number;
user: string | null;
};
Insert: {
action: string;
created_at?: string | null;
detail?: Json | null;
id?: number;
user?: string | null;
};
Update: {
action?: string;
created_at?: string | null;
detail?: Json | null;
id?: number;
user?: string | null;
};
Relationships: [
{
foreignKeyName: "UserHistory_user_fkey";
columns: ["user"];
referencedRelation: "users";
referencedColumns: ["id"];
},
{
foreignKeyName: "UserHistory_user_fkey";
columns: ["user"];
referencedRelation: "users_view";
referencedColumns: ["id"];
}
];
};
UserLastWorkedOn: {
Row: {
email: string | null;
id: number;
shift_start: string | null;
updated_at: string;
user: string;
};
Insert: {
email?: string | null;
id?: number;
shift_start?: string | null;
updated_at?: string;
user: string;
};
Update: {
email?: string | null;
id?: number;
shift_start?: string | null;
updated_at?: string;
user?: string;
};
Relationships: [
{
foreignKeyName: "UserLastWorkedOn_email_fkey";
columns: ["email"];
referencedRelation: "IncomingEmails";
referencedColumns: ["id"];
},
{
foreignKeyName: "UserLastWorkedOn_email_fkey";
columns: ["email"];
referencedRelation: "email_queue";
referencedColumns: ["email_id"];
},
{
foreignKeyName: "UserLastWorkedOn_email_fkey";
columns: ["email"];
referencedRelation: "external_api_results";
referencedColumns: ["email_id"];
},
{
foreignKeyName: "UserLastWorkedOn_email_fkey";
columns: ["email"];
referencedRelation: "sedna_email_queue";
referencedColumns: ["email_id"];
},
{
foreignKeyName: "UserLastWorkedOn_user_fkey";
columns: ["user"];
referencedRelation: "users";
referencedColumns: ["id"];
},
{
foreignKeyName: "UserLastWorkedOn_user_fkey";
columns: ["user"];
referencedRelation: "users_view";
referencedColumns: ["id"];
}
];
};
UserRole: {
Row: {
admin: boolean;
created_at: string | null;
id: number;
manager: boolean;
user: string;
};
Insert: {
admin?: boolean;
created_at?: string | null;
id?: number;
manager?: boolean;
user: string;
};
Update: {
admin?: boolean;
created_at?: string | null;
id?: number;
manager?: boolean;
user?: string;
};
Relationships: [
{
foreignKeyName: "UserRole_user_fkey";
columns: ["user"];
referencedRelation: "users";
referencedColumns: ["id"];
},
{
foreignKeyName: "UserRole_user_fkey";
columns: ["user"];
referencedRelation: "users_view";
referencedColumns: ["id"];
}
];
};
UserScores: {
Row: {
created_at: string;
created_by: string | null;
detail: Json | null;
email: string;
id: number;
notes: string | null;
score_cargo: number | null;
score_classification: number | null;
score_position: number | null;
user: string;
};
Insert: {
created_at?: string;
created_by?: string | null;
detail?: Json | null;
email: string;
id?: number;
notes?: string | null;
score_cargo?: number | null;
score_classification?: number | null;
score_position?: number | null;
user: string;
};
Update: {
created_at?: string;
created_by?: string | null;
detail?: Json | null;
email?: string;
id?: number;
notes?: string | null;
score_cargo?: number | null;
score_classification?: number | null;
score_position?: number | null;
user?: string;
};
Relationships: [
{
foreignKeyName: "UserScores_created_by_fkey";
columns: ["created_by"];
referencedRelation: "users";
referencedColumns: ["id"];
},
{
foreignKeyName: "UserScores_created_by_fkey";
columns: ["created_by"];
referencedRelation: "users_view";
referencedColumns: ["id"];
},
{
foreignKeyName: "UserScores_email_fkey";
columns: ["email"];
referencedRelation: "IncomingEmails";
referencedColumns: ["id"];
},
{
foreignKeyName: "UserScores_email_fkey";
columns: ["email"];
referencedRelation: "email_queue";
referencedColumns: ["email_id"];
},
{
foreignKeyName: "UserScores_email_fkey";
columns: ["email"];
referencedRelation: "external_api_results";
referencedColumns: ["email_id"];
},
{
foreignKeyName: "UserScores_email_fkey";
columns: ["email"];
referencedRelation: "sedna_email_queue";
referencedColumns: ["email_id"];
},
{
foreignKeyName: "UserScores_user_fkey";
columns: ["user"];
referencedRelation: "users";
referencedColumns: ["id"];
},
{
foreignKeyName: "UserScores_user_fkey";
columns: ["user"];
referencedRelation: "users_view";
referencedColumns: ["id"];
}
];
};
};
Views: {
classifier_comparison: {
Row: {
cargo_confidence: number | null;
created_at: string | null;
filename: string | null;
junk_confidence: number | null;
manual_classification: string | null;
manual_is_cargo: boolean | null;
manual_is_junk: boolean | null;
manual_is_position: boolean | null;
parser_classification: string | null;
parser_is_cargo: boolean | null;
parser_is_junk: boolean | null;
parser_is_position: boolean | null;
position_confidence: number | null;
};
Relationships: [];
};
email_queue: {
Row: {
email_id: string | null;
filename: string | null;
priority: number | null;
received: string | null;
started_at: string | null;
user: string | null;
};
Relationships: [
{
foreignKeyName: "UserLastWorkedOn_user_fkey";
columns: ["user"];
referencedRelation: "users";
referencedColumns: ["id"];
},
{
foreignKeyName: "UserLastWorkedOn_user_fkey";
columns: ["user"];
referencedRelation: "users_view";
referencedColumns: ["id"];
}
];
};
external_api_results: {
Row: {
client: string | null;
completed_at: string | null;
email_id: string | null;
external_id: string | null;
filename: string | null;
received_at: string | null;
source: string | null;
};
Relationships: [];
};
last_months_auto_process_graph: {
Row: {
Cargoes: number | null;
"Confident-Junk": number | null;
day: string | null;
Junk: number | null;
"Keyword-Junk": number | null;
New_Emails: number | null;
Positions: number | null;
"Spam-Sender-Junk": number | null;
Total_Cargoes: number | null;
Total_Junk: number | null;
Total_Positions: number | null;
};
Relationships: [];
};
last_months_duplicate_graph: {
Row: {
day: string | null;
Duplicates: number | null;
Emails: number | null;
Percentage: number | null;
};
Relationships: [];
};
last_weeks_email_volume_graph: {
Row: {
emails: number | null;
interval: string | null;
};
Relationships: [];
};
sedna_email_queue: {
Row: {
client: string | null;
email_id: string | null;
filename: string | null;
priority: number | null;
received: string | null;
started_at: string | null;
user: string | null;
};
Relationships: [
{
foreignKeyName: "UserLastWorkedOn_user_fkey";
columns: ["user"];
referencedRelation: "users";
referencedColumns: ["id"];
},
{
foreignKeyName: "UserLastWorkedOn_user_fkey";
columns: ["user"];
referencedRelation: "users_view";
referencedColumns: ["id"];
}
];
};
user_scores_last_seven_days: {
Row: {
cargo_data_points: number | null;
classification_data_points: number | null;
position_data_points: number | null;
total_cargo_score: number | null;
total_classification_score: number | null;
total_data_points: number | null;
total_position_score: number | null;
total_score: number | null;
total_score_percentage: number | null;
user: string | null;
};
Relationships: [];
};
user_scores_last_thirty_days: {
Row: {
cargo_data_points: number | null;
classification_data_points: number | null;
position_data_points: number | null;
total_cargo_score: number | null;
total_classification_score: number | null;
total_data_points: number | null;
total_position_score: number | null;
total_score: number | null;
total_score_percentage: number | null;
user: string | null;
};
Relationships: [];
};
users_view: {
raw_user_meta_data: any;
Row: {
email: string | null;
id: string | null;
};
Insert: {
email?: string | null;
id?: string | null;
};
Update: {
email?: string | null;
id?: string | null;
};
Relationships: [];
};
};
Functions: {
[_ in never]: never;
};
Enums: {
[_ in never]: never;
};
CompositeTypes: {
[_ in never]: never;
};
};
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;
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;
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;
public?: boolean | null;
updated_at?: string | null;
};
Relationships: [
{
foreignKeyName: "buckets_owner_fkey";
columns: ["owner"];
referencedRelation: "users";
referencedColumns: ["id"];
},
{
foreignKeyName: "buckets_owner_fkey";
columns: ["owner"];
referencedRelation: "users_view";
referencedColumns: ["id"];
}
];
};
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;
path_tokens: string[] | null;
updated_at: string | 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;
path_tokens?: string[] | null;
updated_at?: string | 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;
path_tokens?: string[] | null;
updated_at?: string | null;
version?: string | null;
};
Relationships: [
{
foreignKeyName: "objects_bucketId_fkey";
columns: ["bucket_id"];
referencedRelation: "buckets";
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: unknown;
};
get_size_by_bucket: {
Args: Record<PropertyKey, never>;
Returns: {
size: number;
bucket_id: 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;
};
};
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter