gitea +
This commit is contained in:
@@ -91,8 +91,8 @@ export const monitorAPI = {
|
||||
return response.data;
|
||||
},
|
||||
|
||||
check: async (id: string) => {
|
||||
const response = await api.post(`/monitors/${id}/check`);
|
||||
check: async (id: string, type: 'all' | 'content' | 'seo' = 'all') => {
|
||||
const response = await api.post(`/monitors/${id}/check`, { type });
|
||||
return response.data;
|
||||
},
|
||||
|
||||
@@ -103,6 +103,13 @@ export const monitorAPI = {
|
||||
return response.data;
|
||||
},
|
||||
|
||||
rankings: async (id: string, limit = 100) => {
|
||||
const response = await api.get(`/monitors/${id}/rankings`, {
|
||||
params: { limit },
|
||||
});
|
||||
return response.data;
|
||||
},
|
||||
|
||||
snapshot: async (id: string, snapshotId: string) => {
|
||||
const response = await api.get(`/monitors/${id}/history/${snapshotId}`);
|
||||
return response.data;
|
||||
|
||||
@@ -4,6 +4,12 @@ export interface Monitor {
|
||||
name: string
|
||||
frequency: number
|
||||
status: 'active' | 'paused' | 'error'
|
||||
elementSelector?: string
|
||||
ignoreRules?: { type: 'css' | 'regex' | 'text', value: string }[]
|
||||
keywordRules?: { keyword: string, type: 'appears' | 'disappears' | 'count', threshold?: number, caseSensitive?: boolean }[]
|
||||
seoKeywords?: string[]
|
||||
seoInterval?: 'daily' | '2d' | 'weekly' | 'monthly' | 'off'
|
||||
lastSeoCheckAt?: string
|
||||
last_checked_at?: string
|
||||
last_changed_at?: string
|
||||
consecutive_errors: number
|
||||
|
||||
Reference in New Issue
Block a user