Initial working state: CL3.5 complete (Plesk sync + suspend/unsuspend)
This commit is contained in:
311
lib/types.ts
Normal file
311
lib/types.ts
Normal file
@@ -0,0 +1,311 @@
|
||||
export type Json =
|
||||
| string
|
||||
| number
|
||||
| boolean
|
||||
| null
|
||||
| { [key: string]: Json }
|
||||
| Json[];
|
||||
|
||||
export type Database = {
|
||||
public: {
|
||||
Tables: {
|
||||
agencies: {
|
||||
Row: { id: string; name: string; created_at: string };
|
||||
Insert: { id?: string; name: string; created_at?: string };
|
||||
Update: { id?: string; name?: string; created_at?: string };
|
||||
};
|
||||
agency_members: {
|
||||
Row: {
|
||||
id: string;
|
||||
agency_id: string;
|
||||
user_id: string;
|
||||
role: "owner" | "admin" | "member";
|
||||
created_at: string;
|
||||
};
|
||||
Insert: {
|
||||
id?: string;
|
||||
agency_id: string;
|
||||
user_id: string;
|
||||
role: "owner" | "admin" | "member";
|
||||
created_at?: string;
|
||||
};
|
||||
Update: {
|
||||
id?: string;
|
||||
agency_id?: string;
|
||||
user_id?: string;
|
||||
role?: "owner" | "admin" | "member";
|
||||
created_at?: string;
|
||||
};
|
||||
};
|
||||
clients: {
|
||||
Row: {
|
||||
id: string;
|
||||
agency_id: string;
|
||||
name: string;
|
||||
email: string | null;
|
||||
phone: string | null;
|
||||
notes: string | null;
|
||||
created_at: string;
|
||||
};
|
||||
Insert: {
|
||||
id?: string;
|
||||
agency_id: string;
|
||||
name: string;
|
||||
email?: string | null;
|
||||
phone?: string | null;
|
||||
notes?: string | null;
|
||||
created_at?: string;
|
||||
};
|
||||
Update: {
|
||||
id?: string;
|
||||
agency_id?: string;
|
||||
name?: string;
|
||||
email?: string | null;
|
||||
phone?: string | null;
|
||||
notes?: string | null;
|
||||
created_at?: string;
|
||||
};
|
||||
};
|
||||
plesk_instances: {
|
||||
Row: {
|
||||
id: string;
|
||||
agency_id: string;
|
||||
name: string;
|
||||
base_url: string;
|
||||
auth_type: "api_key" | "basic";
|
||||
encrypted_secret: string;
|
||||
secret_kid: string | null;
|
||||
status: "connected" | "error" | "disabled" | "syncing";
|
||||
error_message: string | null;
|
||||
last_connected_at: string | null;
|
||||
last_sync_at: string | null;
|
||||
last_sync_status: string | null;
|
||||
last_sync_error: string | null;
|
||||
last_sync_subscriptions: number;
|
||||
last_sync_domains: number;
|
||||
created_at: string;
|
||||
};
|
||||
Insert: {
|
||||
id?: string;
|
||||
agency_id: string;
|
||||
name: string;
|
||||
base_url: string;
|
||||
auth_type: "api_key" | "basic";
|
||||
encrypted_secret: string;
|
||||
secret_kid?: string | null;
|
||||
status?: "connected" | "error" | "disabled" | "syncing";
|
||||
error_message?: string | null;
|
||||
last_connected_at?: string | null;
|
||||
last_sync_at?: string | null;
|
||||
last_sync_status?: string | null;
|
||||
last_sync_error?: string | null;
|
||||
last_sync_subscriptions?: number;
|
||||
last_sync_domains?: number;
|
||||
created_at?: string;
|
||||
};
|
||||
Update: {
|
||||
id?: string;
|
||||
agency_id?: string;
|
||||
name?: string;
|
||||
base_url?: string;
|
||||
auth_type?: "api_key" | "basic";
|
||||
encrypted_secret?: string;
|
||||
secret_kid?: string | null;
|
||||
status?: "connected" | "error" | "disabled" | "syncing";
|
||||
error_message?: string | null;
|
||||
last_connected_at?: string | null;
|
||||
last_sync_at?: string | null;
|
||||
last_sync_status?: string | null;
|
||||
last_sync_error?: string | null;
|
||||
last_sync_subscriptions?: number;
|
||||
last_sync_domains?: number;
|
||||
created_at?: string;
|
||||
};
|
||||
};
|
||||
plesk_subscriptions: {
|
||||
Row: {
|
||||
id: string;
|
||||
agency_id: string;
|
||||
plesk_instance_id: string;
|
||||
client_id: string | null;
|
||||
plesk_subscription_id: string;
|
||||
name: string | null;
|
||||
status: string | null;
|
||||
owner_login: string | null;
|
||||
plan_name: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
};
|
||||
Insert: {
|
||||
id?: string;
|
||||
agency_id: string;
|
||||
plesk_instance_id: string;
|
||||
client_id?: string | null;
|
||||
plesk_subscription_id: string;
|
||||
name?: string | null;
|
||||
status?: string | null;
|
||||
owner_login?: string | null;
|
||||
plan_name?: string | null;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
};
|
||||
Update: {
|
||||
id?: string;
|
||||
agency_id?: string;
|
||||
plesk_instance_id?: string;
|
||||
client_id?: string | null;
|
||||
plesk_subscription_id?: string;
|
||||
name?: string | null;
|
||||
status?: string | null;
|
||||
owner_login?: string | null;
|
||||
plan_name?: string | null;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
};
|
||||
};
|
||||
plesk_domains: {
|
||||
Row: {
|
||||
id: string;
|
||||
agency_id: string;
|
||||
plesk_instance_id: string;
|
||||
subscription_id: string | null;
|
||||
external_subscription_id: string | null;
|
||||
plesk_domain_id: string;
|
||||
domain_name: string;
|
||||
status: string | null;
|
||||
hosting_type: string | null;
|
||||
source_created_at: string | null;
|
||||
aliases_count: number | null;
|
||||
updated_at: string;
|
||||
created_at: string;
|
||||
};
|
||||
Insert: {
|
||||
id?: string;
|
||||
agency_id: string;
|
||||
plesk_instance_id: string;
|
||||
subscription_id?: string | null;
|
||||
external_subscription_id?: string | null;
|
||||
plesk_domain_id: string;
|
||||
domain_name: string;
|
||||
status?: string | null;
|
||||
hosting_type?: string | null;
|
||||
source_created_at?: string | null;
|
||||
aliases_count?: number | null;
|
||||
updated_at?: string;
|
||||
created_at?: string;
|
||||
};
|
||||
Update: {
|
||||
id?: string;
|
||||
agency_id?: string;
|
||||
plesk_instance_id?: string;
|
||||
subscription_id?: string | null;
|
||||
external_subscription_id?: string | null;
|
||||
plesk_domain_id?: string;
|
||||
domain_name?: string;
|
||||
status?: string | null;
|
||||
hosting_type?: string | null;
|
||||
source_created_at?: string | null;
|
||||
aliases_count?: number | null;
|
||||
updated_at?: string;
|
||||
created_at?: string;
|
||||
};
|
||||
};
|
||||
actions_log: {
|
||||
Row: {
|
||||
id: string;
|
||||
agency_id: string;
|
||||
actor_user_id: string | null;
|
||||
target_type: string;
|
||||
target_id: string | null;
|
||||
action: string;
|
||||
status: "pending" | "success" | "failed";
|
||||
error_message: string | null;
|
||||
metadata: Json;
|
||||
created_at: string;
|
||||
};
|
||||
Insert: {
|
||||
id?: string;
|
||||
agency_id: string;
|
||||
actor_user_id?: string | null;
|
||||
target_type: string;
|
||||
target_id?: string | null;
|
||||
action: string;
|
||||
status?: "pending" | "success" | "failed";
|
||||
error_message?: string | null;
|
||||
metadata?: Json;
|
||||
created_at?: string;
|
||||
};
|
||||
Update: {
|
||||
id?: string;
|
||||
agency_id?: string;
|
||||
actor_user_id?: string | null;
|
||||
target_type?: string;
|
||||
target_id?: string | null;
|
||||
action?: string;
|
||||
status?: "pending" | "success" | "failed";
|
||||
error_message?: string | null;
|
||||
metadata?: Json;
|
||||
created_at?: string;
|
||||
};
|
||||
};
|
||||
billing_accounts: {
|
||||
Row: {
|
||||
id: string;
|
||||
agency_id: string;
|
||||
stripe_customer_id: string | null;
|
||||
stripe_subscription_id: string | null;
|
||||
plan_id: string | null;
|
||||
subscription_status: string | null;
|
||||
current_period_end: string | null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
};
|
||||
Insert: {
|
||||
id?: string;
|
||||
agency_id: string;
|
||||
stripe_customer_id?: string | null;
|
||||
stripe_subscription_id?: string | null;
|
||||
plan_id?: string | null;
|
||||
subscription_status?: string | null;
|
||||
current_period_end?: string | null;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
};
|
||||
Update: {
|
||||
id?: string;
|
||||
agency_id?: string;
|
||||
stripe_customer_id?: string | null;
|
||||
stripe_subscription_id?: string | null;
|
||||
plan_id?: string | null;
|
||||
subscription_status?: string | null;
|
||||
current_period_end?: string | null;
|
||||
created_at?: string;
|
||||
updated_at?: string;
|
||||
};
|
||||
};
|
||||
entitlements: {
|
||||
Row: {
|
||||
id: string;
|
||||
agency_id: string;
|
||||
key: string;
|
||||
value: Json;
|
||||
created_at: string;
|
||||
};
|
||||
Insert: {
|
||||
id?: string;
|
||||
agency_id: string;
|
||||
key: string;
|
||||
value?: Json;
|
||||
created_at?: string;
|
||||
};
|
||||
Update: {
|
||||
id?: string;
|
||||
agency_id?: string;
|
||||
key?: string;
|
||||
value?: Json;
|
||||
created_at?: string;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user