UNPKG

@herbertgao/surgio

Version:

Generating rules for Surge, Clash, Quantumult like a PRO

121 lines (120 loc) 8.53 kB
import { z } from 'zod'; import { SupportProviderEnum } from '../types'; export declare const ProviderValidator: z.ZodObject<{ type: z.ZodNativeEnum<typeof SupportProviderEnum>; addFlag: z.ZodOptional<z.ZodBoolean>; removeExistingFlag: z.ZodOptional<z.ZodBoolean>; mptcp: z.ZodOptional<z.ZodBoolean>; tfo: z.ZodOptional<z.ZodBoolean>; ecn: z.ZodOptional<z.ZodBoolean>; blockQuic: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"on">, z.ZodLiteral<"off">]>>; underlyingProxy: z.ZodOptional<z.ZodString>; startPort: z.ZodOptional<z.ZodNumber>; relayUrl: z.ZodOptional<z.ZodString>; requestUserAgent: z.ZodOptional<z.ZodString>; renameNode: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodString], z.ZodUnknown>, z.ZodUnion<[z.ZodString, z.ZodUndefined, z.ZodVoid]>>>; customFilters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodType<(nodeConfig: import("../types").PossibleNodeConfigType) => boolean, z.ZodTypeDef, (nodeConfig: import("../types").PossibleNodeConfigType) => boolean>, z.ZodType<{ readonly filter: <T extends import("../types").PossibleNodeConfigType>(nodeList: ReadonlyArray<T>) => ReadonlyArray<T>; readonly supportSort: true; }, z.ZodTypeDef, { readonly filter: <T extends import("../types").PossibleNodeConfigType>(nodeList: ReadonlyArray<T>) => ReadonlyArray<T>; readonly supportSort: true; }>]>>>; nodeFilter: z.ZodOptional<z.ZodUnion<[z.ZodType<(nodeConfig: import("../types").PossibleNodeConfigType) => boolean, z.ZodTypeDef, (nodeConfig: import("../types").PossibleNodeConfigType) => boolean>, z.ZodType<{ readonly filter: <T extends import("../types").PossibleNodeConfigType>(nodeList: ReadonlyArray<T>) => ReadonlyArray<T>; readonly supportSort: true; }, z.ZodTypeDef, { readonly filter: <T extends import("../types").PossibleNodeConfigType>(nodeList: ReadonlyArray<T>) => ReadonlyArray<T>; readonly supportSort: true; }>]>>; netflixFilter: z.ZodOptional<z.ZodUnion<[z.ZodType<(nodeConfig: import("../types").PossibleNodeConfigType) => boolean, z.ZodTypeDef, (nodeConfig: import("../types").PossibleNodeConfigType) => boolean>, z.ZodType<{ readonly filter: <T extends import("../types").PossibleNodeConfigType>(nodeList: ReadonlyArray<T>) => ReadonlyArray<T>; readonly supportSort: true; }, z.ZodTypeDef, { readonly filter: <T extends import("../types").PossibleNodeConfigType>(nodeList: ReadonlyArray<T>) => ReadonlyArray<T>; readonly supportSort: true; }>]>>; youtubePremiumFilter: z.ZodOptional<z.ZodUnion<[z.ZodType<(nodeConfig: import("../types").PossibleNodeConfigType) => boolean, z.ZodTypeDef, (nodeConfig: import("../types").PossibleNodeConfigType) => boolean>, z.ZodType<{ readonly filter: <T extends import("../types").PossibleNodeConfigType>(nodeList: ReadonlyArray<T>) => ReadonlyArray<T>; readonly supportSort: true; }, z.ZodTypeDef, { readonly filter: <T extends import("../types").PossibleNodeConfigType>(nodeList: ReadonlyArray<T>) => ReadonlyArray<T>; readonly supportSort: true; }>]>>; hooks: z.ZodOptional<z.ZodObject<{ afterNodeListResponse: z.ZodOptional<z.ZodType<(<T extends import("../types").PossibleNodeConfigType>(nodeList: T[], customParams: import("../provider").GetNodeListParams) => import("type-fest").Promisable<T[] | undefined | void>), z.ZodTypeDef, <T extends import("../types").PossibleNodeConfigType>(nodeList: T[], customParams: import("../provider").GetNodeListParams) => import("type-fest").Promisable<T[] | undefined | void>>>; onError: z.ZodOptional<z.ZodType<(error: Error) => import("type-fest").Promisable<unknown>, z.ZodTypeDef, (error: Error) => import("type-fest").Promisable<unknown>>>; }, "strip", z.ZodTypeAny, { afterNodeListResponse?: (<T extends import("../types").PossibleNodeConfigType>(nodeList: T[], customParams: import("../provider").GetNodeListParams) => import("type-fest").Promisable<T[] | undefined | void>) | undefined; onError?: ((error: Error) => import("type-fest").Promisable<unknown>) | undefined; }, { afterNodeListResponse?: (<T extends import("../types").PossibleNodeConfigType>(nodeList: T[], customParams: import("../provider").GetNodeListParams) => import("type-fest").Promisable<T[] | undefined | void>) | undefined; onError?: ((error: Error) => import("type-fest").Promisable<unknown>) | undefined; }>>; }, "strip", z.ZodTypeAny, { type: SupportProviderEnum; customFilters?: Record<string, ((nodeConfig: import("../types").PossibleNodeConfigType) => boolean) | { readonly filter: <T extends import("../types").PossibleNodeConfigType>(nodeList: ReadonlyArray<T>) => ReadonlyArray<T>; readonly supportSort: true; }> | undefined; tfo?: boolean | undefined; mptcp?: boolean | undefined; ecn?: boolean | undefined; blockQuic?: "auto" | "on" | "off" | undefined; underlyingProxy?: string | undefined; addFlag?: boolean | undefined; removeExistingFlag?: boolean | undefined; startPort?: number | undefined; relayUrl?: string | undefined; requestUserAgent?: string | undefined; renameNode?: ((args_0: string, ...args: unknown[]) => string | void | undefined) | undefined; nodeFilter?: ((nodeConfig: import("../types").PossibleNodeConfigType) => boolean) | { readonly filter: <T extends import("../types").PossibleNodeConfigType>(nodeList: ReadonlyArray<T>) => ReadonlyArray<T>; readonly supportSort: true; } | undefined; netflixFilter?: ((nodeConfig: import("../types").PossibleNodeConfigType) => boolean) | { readonly filter: <T extends import("../types").PossibleNodeConfigType>(nodeList: ReadonlyArray<T>) => ReadonlyArray<T>; readonly supportSort: true; } | undefined; youtubePremiumFilter?: ((nodeConfig: import("../types").PossibleNodeConfigType) => boolean) | { readonly filter: <T extends import("../types").PossibleNodeConfigType>(nodeList: ReadonlyArray<T>) => ReadonlyArray<T>; readonly supportSort: true; } | undefined; hooks?: { afterNodeListResponse?: (<T extends import("../types").PossibleNodeConfigType>(nodeList: T[], customParams: import("../provider").GetNodeListParams) => import("type-fest").Promisable<T[] | undefined | void>) | undefined; onError?: ((error: Error) => import("type-fest").Promisable<unknown>) | undefined; } | undefined; }, { type: SupportProviderEnum; customFilters?: Record<string, ((nodeConfig: import("../types").PossibleNodeConfigType) => boolean) | { readonly filter: <T extends import("../types").PossibleNodeConfigType>(nodeList: ReadonlyArray<T>) => ReadonlyArray<T>; readonly supportSort: true; }> | undefined; tfo?: boolean | undefined; mptcp?: boolean | undefined; ecn?: boolean | undefined; blockQuic?: "auto" | "on" | "off" | undefined; underlyingProxy?: string | undefined; addFlag?: boolean | undefined; removeExistingFlag?: boolean | undefined; startPort?: number | undefined; relayUrl?: string | undefined; requestUserAgent?: string | undefined; renameNode?: ((args_0: string, ...args: unknown[]) => string | void | undefined) | undefined; nodeFilter?: ((nodeConfig: import("../types").PossibleNodeConfigType) => boolean) | { readonly filter: <T extends import("../types").PossibleNodeConfigType>(nodeList: ReadonlyArray<T>) => ReadonlyArray<T>; readonly supportSort: true; } | undefined; netflixFilter?: ((nodeConfig: import("../types").PossibleNodeConfigType) => boolean) | { readonly filter: <T extends import("../types").PossibleNodeConfigType>(nodeList: ReadonlyArray<T>) => ReadonlyArray<T>; readonly supportSort: true; } | undefined; youtubePremiumFilter?: ((nodeConfig: import("../types").PossibleNodeConfigType) => boolean) | { readonly filter: <T extends import("../types").PossibleNodeConfigType>(nodeList: ReadonlyArray<T>) => ReadonlyArray<T>; readonly supportSort: true; } | undefined; hooks?: { afterNodeListResponse?: (<T extends import("../types").PossibleNodeConfigType>(nodeList: T[], customParams: import("../provider").GetNodeListParams) => import("type-fest").Promisable<T[] | undefined | void>) | undefined; onError?: ((error: Error) => import("type-fest").Promisable<unknown>) | undefined; } | undefined; }>;