添加 Cookie 组件 (#633)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
2024-10-31 12:56:15 +08:00
committed by GitHub
parent 3bdc79162e
commit 97a0f04808
63 changed files with 6119 additions and 806 deletions
+57
View File
@@ -4,8 +4,10 @@ export interface TokenResp {
id: number;
name: string;
}
export interface GlobalConf {
platformConf: AllPlatformConf;
siteConf: AllSiteConf;
loaded: boolean;
}
@@ -13,6 +15,10 @@ export interface AllPlatformConf {
[idx: string]: PlatformConfig;
}
export interface AllSiteConf {
[idx: string]: SiteConfig;
}
export interface CategoryConfig {
[idx: number]: string;
}
@@ -22,9 +28,15 @@ export interface PlatformConfig {
categories: CategoryConfig;
enabledTag: boolean;
platformName: string;
siteName: string;
hasTarget: boolean;
}
export interface SiteConfig {
name: string;
enable_cookie: string;
}
export interface SubscribeConfig {
platformName: string;
target: string;
@@ -69,3 +81,48 @@ export interface PlatformWeightConfigResp {
platform_name: string;
weight: WeightConfig;
}
export interface Target {
platform_name: string;
target_name: string;
target: string;
}
export interface Cookie {
id: number;
site_name: string;
content: string;
cookie_name: string;
last_usage: Date;
status: string;
cd_milliseconds: number;
is_universal: boolean;
is_anonymous: boolean;
tags: { [key: string]: string };
}
export interface CookieTarget {
target: Target;
cookie_id: number;
}
export interface NewCookieParam {
siteName: string;
content: string;
}
export interface DelCookieParam {
cookieId: string;
}
export interface NewCookieTargetParam {
platformName: string;
target: string;
cookieId: number;
}
export interface DelCookieTargetParam {
platformName: string;
target: string;
cookieId: number;
}