UNPKG

@lcap/nasl

Version:

NetEase Application Specific Language

83 lines 2.59 kB
/// <reference types="node" /> import { BatchInstructResult } from '@lcap/nasl-types'; import type { NaslServer } from 'src/server/naslServer'; import { App } from '../../concepts'; export declare const batchQuery: ({ body, headers, config }: { body: any[]; headers: Record<string, string>; config?: object; }) => any; export declare const batchAction: ({ body, headers }: { body: any[]; headers: Record<string, string>; }) => any; export declare const batchInstruct: ({ body, headers }: { body: any[]; headers: Record<string, string>; }) => Promise<BatchInstructResult>; export declare const cleanUselessUnit: ({ body, headers }: { body: { items: { type: "playground" | "empty_logic" | "useless_var"; paths: string[]; }[]; }; headers: Record<string, string>; }) => any; export declare const breakpoint: ({ body }: { body: any; }) => any; export declare const aiCoachActionRecord: ({ body }: { body: any; }) => any; export declare function getTabTimestamp(): string; export declare const databaseTypes: ({ query }: { query: any; }) => any; export declare function getGlobalChangedTime(): number; export interface ProxyApp extends App { _isCollectingCount: number; _collectingList: number[]; _historyList: number[]; _historyIndex: number; _historying: boolean; _timer: NodeJS.Timeout; _noTimer: NodeJS.Timeout; _actionMsg: string; _sourceType: string; _action: string; _extra?: any; naslServer: NaslServer; _historyName?: string; } export declare function handleApp(app: ProxyApp): void; export declare function getNaslIncrQuery(appId: string): Promise<{ fullNasl: any; naslAllData?: undefined; appTree?: undefined; } | { naslAllData: any[]; appTree: any; fullNasl?: undefined; }>; export declare const setStore: (store: any) => void; /** * 加载 app * @param appId 如果是从文件读,就不需要传 * @returns app 对象 */ export declare function loadApp(appId?: string, needEqual?: boolean): Promise<App>; /** * 初始化检查规则 * @param app */ export declare function initializeCheckRules(app: App): void; export declare function mountDatabaseTypes(app: App): Promise<void>; /** * 加载 app * @returns app 对象 */ export declare function loadAppSync(): App; export declare function changeTabTimestamp(appId: string): Promise<void>; export declare function saveNaslManual(app: App, ChangedNASLType: string, actions: any[], actionMsg: string): Promise<void>; //# sourceMappingURL=init.d.ts.map