feat(analytics): add site settings and public dashboard
This commit is contained in:
@@ -5,6 +5,9 @@ export interface Site {
|
||||
user_id: string
|
||||
domain: string
|
||||
name: string
|
||||
timezone?: string
|
||||
is_public?: boolean
|
||||
excluded_paths?: string[]
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
@@ -16,6 +19,10 @@ export interface CreateSiteRequest {
|
||||
|
||||
export interface UpdateSiteRequest {
|
||||
name: string
|
||||
timezone?: string
|
||||
is_public?: boolean
|
||||
password?: string
|
||||
excluded_paths?: string[]
|
||||
}
|
||||
|
||||
export async function listSites(): Promise<Site[]> {
|
||||
@@ -46,3 +53,9 @@ export async function deleteSite(id: string): Promise<void> {
|
||||
method: 'DELETE',
|
||||
})
|
||||
}
|
||||
|
||||
export async function resetSiteData(id: string): Promise<void> {
|
||||
await apiRequest(`/sites/${id}/reset`, {
|
||||
method: 'POST',
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user