UNPKG

@a11ywatch/core

Version:
131 lines (130 loc) 4.72 kB
export declare const WebsitesController: ({ user }?: { user: any; }) => { getCollection: import("mongodb").Collection<import("bson").Document>; getWebsite: ({ userId, url, domain, }: import("../../../types/schema").Website) => Promise<[import("../../../types/schema").Website, any]>; getWebsites: ({ userId }: { userId: any; }, chain?: boolean) => Promise<import("mongodb").WithId<import("bson").Document>[] | (import("mongodb").Collection<import("bson").Document> | import("mongodb").WithId<import("bson").Document>[])[]>; getWebsitesPaginated: (limit?: number, filter?: {}, page?: number, offset?: number, project?: Record<string, 0 | 1>) => Promise<[import("../../../types/schema").Website[], any]>; getWebsitesWithUsers: (userLimit?: number, filter?: {}) => Promise<[import("../../../types/schema").Website[], any]>; addWebsite: ({ userId, url, customHeaders, canScan, pageInsights, mobile, ua, standard, actions, robots, subdomains, tld, ignore, rules, runners, proxy, sitemap, monitoringEnabled, }: { userId: any; url: any; customHeaders: any; canScan: any; pageInsights: any; mobile: any; ua: any; standard: any; actions: any; robots?: boolean; subdomains?: boolean; tld?: boolean; ignore?: any[]; rules?: any[]; runners?: any[]; proxy?: string; sitemap?: boolean; monitoringEnabled?: boolean; }) => Promise<{ website: { actions: any; userId: any; url: string; domain: string; pageInsights: boolean; pageHeaders: any[]; pageLoadTime: { duration: number; durationFormated: string; color: string; }; lastScanDate: string; online: boolean; ua: string; mobile: boolean; standard: string; actionsEnabled: boolean; monitoringEnabled: boolean; robots: boolean; subdomains: boolean; tld: boolean; order: number; verified: boolean; verificationCode: string; ignore: any[]; rules: any[]; runners: any[]; proxy: string; }; code: number; success: boolean; message: string; }>; removeWebsite: ({ userId, url, domain, deleteMany, }: { userId: any; url?: string; domain?: string; deleteMany?: boolean; }) => Promise<{ code: number; success: boolean; message: string; website?: undefined; } | { website: import("../../../types/schema").Website; code: number; success: boolean; message: string; }>; updateWebsite: ({ userId, url, pageHeaders, pageInsights, mobile, standard, ua, actions, robots, tld, subdomains, ignore, rules, runners, proxy, sitemap, monitoringEnabled, actionsEnabled, }: Partial<import("../../../types/schema").Website> & { actions?: Record<string, unknown>[]; }) => Promise<{ website: { actions: Record<string, unknown>[]; actionsEnabled: boolean; robots: boolean; pageHeaders: import("../../../types/schema").PageHeaders[]; pageInsights: boolean; mobile: boolean; standard: string; ua: string; subdomains: boolean; tld: boolean; ignore: string[]; rules: string[]; runners: string[]; proxy: string; sitemap: boolean; monitoringEnabled: boolean; __typename?: "Website"; id?: string; url?: string; user?: import("../../../types/schema").User; userId?: number; domain?: string; pageLoadTime?: import("../../../types/schema").PageLoadTimeMeta; issuesInfo?: import("../../../types/schema").IssueMeta; pages?: import("../../../types/schema").Pages[]; lastScanDate?: number | Date; documentTitle?: string; cdn?: string; online?: boolean; timestamp?: string; insight?: import("../../../types/schema").PageInsights; verified?: boolean; }; code: number; success: boolean; message: string; }>; sortWebsites: ({ userId, order }: { userId: any; order?: any[]; }) => Promise<{ code: number; success: boolean; message: string; }>; };